Sign In Start Free Trial
Account

Add to playlist

Create a Playlist

Modal Close icon
You need to login to use this feature.
  • Book Overview & Buying Moodle 1.9 Extension Development
  • Table Of Contents Toc
Moodle 1.9 Extension Development

Moodle 1.9 Extension Development

3.7 (7)
close
close
Moodle 1.9 Extension Development

Moodle 1.9 Extension Development

3.7 (7)

Overview of this book

Moodle gives you the power to create and customize feature-rich plug-ins. If you can write Moodle plug-ins, you can make it do just about anything. From making the site easier to administer, to new features, to completely changing the way it looks; plug-ins are the method Moodle offers to customize and extend its functionality. This book will show you how to build all sorts of Moodle plug-ins: admin plug-ins, Blocks, Activities, Grading components, Reports, Fliters that change the way your site works and looks. You will develop standard Moodle plug-ins such as Activities, Filters, and Blocks by creating functioning code that you can execute in your own Moodle installation. Writing modular plug-ins for Moodle will be a large focus of this book.This book will take you inside Moodle and provide you with the ability to develop code the “Moodle way”.This book will expose you to all of the core code functions in Moodle, in a progressive, understandable way. You will learn what libraries are available, what the API calls are, how it is structured and how it can be expanded beyond the plug-in system.You will begin by getting an understanding of the basic architecture that Moodle uses to operate in. Next you will build your first plug-in; a block. You will carry on building other Moodle plug-ins, gaining knowledge of the “Moodle way” of coding, before plunging deeper into the API and inner libraries. Lastly, you will learn how to integrate Moodle with other systems using a variety of methods.When you have completed, you will have a solid understanding of Moodle programming and knowledge of how to extend its functionality in whatever way you want.
Table of Contents (19 chapters)
close
close
Moodle 1.9 Extension Development
Credits
About the Authors
About the Reviewer
Preface

Chapter 13. Building Forms with formslib

formslib is the preferred Moodle way of creating and processing forms in the Moodle system. It provides easy mechanisms to:

  • Define specific form elements for your form

  • Ensure that your output complies with XHTML Strict DTD and 508 accessibility

  • Customize display format with standard CSS

  • Process data securely without extra processing

  • Validate data and provide user feedback according to your definitions

  • Easily add Help pop-ups to any form element

  • Display shortcut form element groups for specific Moodle functionality

formslib uses the PEAR QuickForm libraries, and extends these for specific Moodle functionality. It can likewise be used to add more specific form elements, through extension.

In most cases, using it is simply a matter of creating a new class that extends the Moodle class, moodleform, and then adding your own definitions. Once defined, you can instantiate an object of the new class, initialize it, load data into it, extract submitted data from it...

Visually different images
CONTINUE READING
83
Tech Concepts
36
Programming languages
73
Tech Tools
Icon Unlimited access to the largest independent learning library in tech of over 8,000 expert-authored tech books and videos.
Icon Innovative learning tools, including AI book assistants, code context explainers, and text-to-speech.
Icon 50+ new titles added per month and exclusive early access to books as they are being written.
Moodle 1.9 Extension Development
notes
bookmark Notes and Bookmarks search Search in title playlist Add to playlist font-size Font size

Change the font size

margin-width Margin width

Change margin width

day-mode Day/Sepia/Night Modes

Change background colour

Close icon Search
Country selected

Close icon Your notes and bookmarks

Confirmation

Modal Close icon
claim successful

Buy this book with your credits?

Modal Close icon
Are you sure you want to buy this book with one of your credits?
Close
YES, BUY

Submit Your Feedback

Modal Close icon
Modal Close icon
Modal Close icon