Note:

If you want to create a new page for developers, you should create it on the Moodle Developer Resource site.

Patching forms tutorial

From MoodleDocs
Revision as of 14:31, 8 June 2008 by Gary Anderson (talk | contribs) (Start of page for patching forms)
(diff) ← Older revision | Latest revision (diff) | Newer revision → (diff)

by Gary Anderson

One of the easiest local modifications that an institution can make to customize their Moodle site is to make simple modifications to the form elements that appear on pages. This tutorial will demonstrate how to do such modifications including changing default values, hiding elements so they are not available to users, and setting elements to "advanced" so that the user sees it only if they click on the "show advanced" button.

Warning

Making custom changes to the PHP scripting code in Moodle should be done carefully. You should always test your code before using it on your production site and should backup the original scripts. You should always comment your code so you know what has been changed.

Having said that, these patches are among the simplest and the recovery from an error is easy: simply replace the file with original from the core distribution.

Moodle Forms Overview

Changing defaults

Hiding fields

==Setting fields to "Advanced""