<?xml version="1.0"?>
<feed xmlns="http://www.w3.org/2005/Atom" xml:lang="en">
	<id>https://docs.moodle.org/dev/api.php?action=feedcontributions&amp;feedformat=atom&amp;user=Ganderson</id>
	<title>MoodleDocs - User contributions [en]</title>
	<link rel="self" type="application/atom+xml" href="https://docs.moodle.org/dev/api.php?action=feedcontributions&amp;feedformat=atom&amp;user=Ganderson"/>
	<link rel="alternate" type="text/html" href="https://docs.moodle.org/dev/Special:Contributions/Ganderson"/>
	<updated>2026-04-18T19:27:15Z</updated>
	<subtitle>User contributions</subtitle>
	<generator>MediaWiki 1.43.5</generator>
	<entry>
		<id>https://docs.moodle.org/dev/index.php?title=Question_engine&amp;diff=3331</id>
		<title>Question engine</title>
		<link rel="alternate" type="text/html" href="https://docs.moodle.org/dev/index.php?title=Question_engine&amp;diff=3331"/>
		<updated>2010-12-23T13:24:53Z</updated>

		<summary type="html">&lt;p&gt;Ganderson: /* Questions */ Add Wikipedia link to define the term QTI&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;{{Template:Question development}}&lt;br /&gt;
&lt;br /&gt;
Moodle has a powerful question engine with a modular structure to allow question type plug-ins. The question engine is responsible for rendering the questions and for processing student responses. It is used by the [[Quiz developer docs|quiz module]] and it is planned that in future it will be used by the Lesson and other modules.&lt;br /&gt;
&lt;br /&gt;
Historically the question engine started as a part of the quiz module. Only since Moodle 1.6 is it a separate core component of Moodle that can be used by any other Moodle component or module. During this restructuring the code was moved from mod/quiz/ to question/ and the tables and functions were renamed. Wherever the old table or function name contained &#039;quiz_&#039; the new one will contain &#039;question_&#039;&lt;br /&gt;
&lt;br /&gt;
==Terminology==&lt;br /&gt;
&lt;br /&gt;
When talking about the question engine there are certain terms that can cause confusion because they can be used with different meanings. In Moodle we have adopted a certain terminology that will be explained below.&lt;br /&gt;
&lt;br /&gt;
===Questions===&lt;br /&gt;
&lt;br /&gt;
A &#039;&#039;&#039;question&#039;&#039;&#039; is the set of definitions (question name, question text, possible answers, grading rules, feedback, etc.) that constitute a reusable assessment item. So it includes much more than what one would in everyday language call a question.&lt;br /&gt;
In the terminology of the [http://en.wikipedia.org/wiki/QTI QTI] specification a &#039;question&#039; is more appropriately called an &#039;&#039;&#039;assessment item&#039;&#039;&#039; or just &#039;item&#039; for short. &lt;br /&gt;
&lt;br /&gt;
There are different types of questions, like for example multiple-choice questions or numerical questions. These are referred to as &#039;&#039;&#039;[[Question engine#Question types|question types]]&#039;&#039;&#039; in Moodle.&lt;br /&gt;
&lt;br /&gt;
Since version 1.5 Moodle is able to handle so-called &#039;&#039;&#039;[[Adaptive questions]]&#039;&#039;&#039;, also known as &#039;adaptive items&#039; in QTI speak. These are questions that interact with the student by going through several states depending on the student responses. For example a complicated mathematical question that is answered incorrectly, but is likely to be incorrect because of a common mistake, could provide the user with a hint towards this mistake, apply a penalty and allow a second attempt at this question. Quizzes can be run in &#039;adaptive mode&#039;, in which case Moodle provides buttons to mark each question individually.&lt;br /&gt;
&lt;br /&gt;
===Answers===&lt;br /&gt;
&lt;br /&gt;
In Moodle the term &#039;&#039;&#039;&#039;answer&#039;&#039;&#039;&#039; is used exclusively for the &#039;&#039;&#039;teacher-defined answers&#039;&#039;&#039; of a question. It is easy to get confused between these teacher-defined answers and the answers that the students actually give. We have therefore adopted the convention to refer to the student-supplied answers as &#039;responses&#039; and to reserve the term &#039;answers&#039; to apply to teacher-defined answers. In question types that rely on teacher-supplied answers these are used in the grading process by comparing them with the student responses. Of course not all question types use teacher-defined answers but use some more intelligent way to process the student responses. &lt;br /&gt;
&lt;br /&gt;
Perhaps one should also stress that &#039;answer&#039; is not always used in the sense of &#039;correct answer&#039;. For example every choice in a multiple-choice question is referred to as an answer. Other systems use the term &#039;distractor&#039; for wrong answers. &lt;br /&gt;
&lt;br /&gt;
In Moodle we always use the term &#039;&#039;&#039;&#039;responses&#039;&#039;&#039;&#039; to refer to the students&#039; responses to a question. This term is always used in plural, although for some questiontypes there is only one possible response.&lt;br /&gt;
&lt;br /&gt;
There is unfortunately, for historical reasons, one exception to the above rule: The question_states table has a field &#039;answer&#039; whose purpose it actually is to hold the student&#039;s responses.&lt;br /&gt;
&lt;br /&gt;
===Attempts===&lt;br /&gt;
&lt;br /&gt;
In Moodle the term &#039;&#039;&#039;&#039;attempt&#039;&#039;&#039;&#039; is used in the sense of &amp;quot;Attempt at a quiz&amp;quot; (or another activity involving questions). Depending on the quiz settings, a student may be allowed several attempts at a quiz. An attempt is finished when the student clicks on the corresponding button on the attempt page. Students do not have to complete an attempt in one visit. They can navigate away from the quiz page and return later to continue the same attempt.&lt;br /&gt;
&lt;br /&gt;
Each module that uses the question engine should hold its own data for the attempts in its own tables. When the module calls the question engine functions it is often expected to pass an attempt object.&lt;br /&gt;
&lt;br /&gt;
Within one and the same quiz attempt a student may make several attempts at answering a particular question, at least if the questiontype allows it and the quiz is set up in adaptive mode. These will always be referred to as &#039;&#039;&#039;&#039;question sessions&#039;&#039;&#039;&#039; or sometimes &#039;attempts at a question, never just as &#039;attempts&#039;.&lt;br /&gt;
&lt;br /&gt;
===Sessions, States, Events===&lt;br /&gt;
&lt;br /&gt;
When a new attempt is started, a new &#039;&#039;&#039;session&#039;&#039;&#039; is started for each question. So in a sense a session is for a question what an attempt is for a whole quiz. A question session lasts no longer than an attempt and for each question there can only by one session within one attempt.&lt;br /&gt;
&lt;br /&gt;
Moodle allows the student to interact with a question repeatedly within one session and each such interaction leads to a new &#039;&#039;&#039;state&#039;&#039;&#039;. The first state is created when the session is created. A new state is then created when a student saves, validates or submits an answer or .... The student&#039;s responses and, if appropriate, the results of response processing (grading) are stored in the new state that gets created.&lt;br /&gt;
&lt;br /&gt;
The type of &#039;&#039;&#039;event&#039;&#039;&#039; that led to the creation of a particular state is saved along with the state. The types of events currently used are:&lt;br /&gt;
;open :A new session has just been created and this is the opening state. Usually it doesn&#039;t hold student responses yet (except where a quiz attempt is based on a previous attempt because the &#039;attemptonlast&#039; option is set).&lt;br /&gt;
;save:The student has clicked the save button.&lt;br /&gt;
;validate:The student has asked for his responses to be validated. This means it is checked that they are valid responses. In the case of mathematical questions which requires the input of a mathematical expression in some linear format the question type may want to display the validated result back to the student in typeset form. Similar things may apply to other subject-specific question types. If a student response is found to be invalid the student is told so but no penalty is applied. The invalid response is stored with the state.&lt;br /&gt;
;grade:The student has pressed the submit button. The grade is calculated and stored with the attempt.&lt;br /&gt;
;duplicategrade:The student has pressed the submit button but the response to this question has not actually changed. This happens a lot in quizzes with several questions on one page where the student may have changed the responses for one question only. I believe that states created by this type of event are not stored in the database.&lt;br /&gt;
;close:The last state in a session which is now closed. Currently a session closes only when the attempt closes, either because the student requests it or because the timelimit elapses.&lt;br /&gt;
&lt;br /&gt;
There are now plans to introduce another event type&lt;br /&gt;
;submit:The student has submitted his responses for grading but grading has not yet taken place. This will be used by teacher-marked question types like the essay questions for example.&lt;br /&gt;
&lt;br /&gt;
==Code documentation==&lt;br /&gt;
&lt;br /&gt;
The code is documented according to [http://www.phpdoc.org/ PHPdocumentor] conventions. The explanations here in the wiki are meant to complement this.&lt;br /&gt;
&lt;br /&gt;
Inline comments should be used liberally in the code. The following conventions make it easier to search for comments with special meaning:&lt;br /&gt;
* use TODO in comments about things that need to be done&lt;br /&gt;
* use ??? in comments that are questions about the code&lt;br /&gt;
&lt;br /&gt;
Code is organised into packages&lt;br /&gt;
* Package questionbank - code that relates to the questionbank system&lt;br /&gt;
** Subpackage questiontypes - code that relates to the question types, including the question type base class.&lt;br /&gt;
** Subpackage importexport - code that relates to importing and exporting questions.&lt;br /&gt;
&lt;br /&gt;
Generally, the base classes default_questiontype and qformat_default should contain most of the documentation, since all question types should follow the same interface. There is no value in repeating the same information on all the various subclasses. The subclasses should concentrate on describing any new methods they have that do not come from the base class.&lt;br /&gt;
&lt;br /&gt;
See the [http://manual.phpdoc.org/HTMLSmartyConverter/HandS/phpDocumentor/tutorial_phpDocumentor.quickstart.pkg.html#coding.phpcomments PHPdocumentor manual] for more advice on writing good comments.&lt;br /&gt;
&lt;br /&gt;
Moodle PHPdocs can be seen here: http://phpdocs.moodle.org/.&lt;br /&gt;
&lt;br /&gt;
==API==&lt;br /&gt;
&lt;br /&gt;
The library lib/questionlib.php contains all functions that need to be available to any module wanting to use questions (this is new in Moodle 1.6, in Moodle 1.5 this was part of mod/quiz/locallib.php). Loading this library instantiates all questiontype classes by loading the questiontype.php files&lt;br /&gt;
&lt;br /&gt;
A description of the API still needs to be written. Also lib/questionlib.php should be cleaned up a bit to distinguish between the API functions and the helper functions.&lt;br /&gt;
&lt;br /&gt;
==Organisation==&lt;br /&gt;
The default questiontype class is defined in &#039;&#039;&#039;question/type/questiontype.php&#039;&#039;&#039; (in Moodle 1.5 this was still in mod/quiz/locallib.php). The individual questiontypes extend this class in their own questiontype.php file. For documentation of the questiontype classes one should often look at the documentation of the default question type because much of the documentation that is in the default class is not repeated in the other questiontype classes.&lt;br /&gt;
&lt;br /&gt;
While questiontypes are realized as classes, the question engine is not written in a truly object-oriented way. Instead it follows the Moodle model of using objects mostly only as alternatives to arrays to hold database records. So none of the question, attempt, and state objects that play a central role in the module have any methods. Only the questiontype objects have methods. Strangely enough the quiz module instantiates one object of each questiontype class at the start and then reuses their methods for the different questions. If one is used to the Moodle way of programming then this is easy enough to handle.&lt;br /&gt;
&lt;br /&gt;
==Objects and data structures==&lt;br /&gt;
&lt;br /&gt;
Key to understanding how the question engine works is to understand how the different kinds of object work together. The most important ones are:&lt;br /&gt;
&lt;br /&gt;
*Questions&lt;br /&gt;
*Attempts&lt;br /&gt;
*States&lt;br /&gt;
&lt;br /&gt;
Questions are data created by the teacher. Attempts and States are data created by the student when interacting with a quiz. &lt;br /&gt;
&lt;br /&gt;
The Moodle quiz module allows students to make several attempts at a quiz. Data about such an &#039;&#039;&#039;attempt&#039;&#039;&#039; is stored in an attempt object. The Moodle question engine was optimized to deal with such attempts and therefore every module wanting to use the question engine also has to implement the attempt object and pass it to many of the question engine functions. The attempt object holds for example information about how the quiz was randomized for this attempt and the ordering of the questions and answers.&lt;br /&gt;
&lt;br /&gt;
Moodle allows students to interact repeatedly with a single question. So for example the student might initially just save an answer, later mark it, then correct it if it was marked incorrect. When the student first views a question within a particular attempt a &#039;&#039;&#039;question session&#039;&#039;&#039; and the first question state is created. Each time the student interacts with the question a new &#039;&#039;&#039;question state&#039;&#039;&#039; is created. So states are indexed by user id, attempt id and question id.&lt;br /&gt;
&lt;br /&gt;
===Database structure===&lt;br /&gt;
All this data needs to be kept in Moodle&#039;s database. How this is achieved is explained on a separate page about the &#039;&#039;&#039;[[Quiz database structure]]&#039;&#039;&#039;, which also contains a useful diagram.&lt;br /&gt;
&lt;br /&gt;
As is customary in Moodle, most runtime objects simply represent the data from a particular database record. So for example a $quiz object has fields corresponding to all the fields in the [[Quiz database structure#quiz|quiz table]]. In some cases the objects have some additional fields that are added at runtime. This is particularly the case for $question and $state objects. These additional fields are also described on the page about the &#039;&#039;&#039;[[Quiz database structure]]&#039;&#039;&#039;. Many functions that are used to process these objects make use of the additional fields and it is therefore necessary to use the correct functions for creating these objects.&lt;br /&gt;
&lt;br /&gt;
===Runtime objects===&lt;br /&gt;
Some objects used by the quiz module are purely runtime object and do not correspond to a database table. The structure of these objects is explained in detail on a separate page about the &#039;&#039;&#039;[[Quiz runtime objects]]&#039;&#039;&#039;.&lt;br /&gt;
&lt;br /&gt;
The main script of the quiz module is attempt.php which will have to deal with all these objects. Studying the &#039;&#039;&#039;[[Quiz attempt|explanation of attempt.php]]&#039;&#039;&#039; is therefore a good way to start to study the quiz module code.&lt;br /&gt;
&lt;br /&gt;
==Response storage==&lt;br /&gt;
&lt;br /&gt;
The student&#039;s responses to a question are stored in &amp;lt;code&amp;gt;$state-&amp;gt;responses&amp;lt;/code&amp;gt;. Questiontypes are completely free to implement the storage mechanism of their responses (and other state information) the way they want. Still, the standard questiontypes all follow a similar model. The default storage model and the questiontype specific variations are explained below.&lt;br /&gt;
&lt;br /&gt;
The flexibility for the questiontypes to choose their response storage mechanism freely and to convert from the storage model to the runtime model is provided by a set of three functions, which allow to initialise the runtime &amp;lt;code&amp;gt;$state-&amp;gt;responses&amp;lt;/code&amp;gt; field, to convert from the runtime to the storage model and vice versa:&lt;br /&gt;
&lt;br /&gt;
;&amp;lt;code&amp;gt;create_session_and_responses()&amp;lt;/code&amp;gt;&lt;br /&gt;
:Initializes the $state object, in particular the &amp;lt;code&amp;gt;$state-&amp;gt;responses&amp;lt;/code&amp;gt; field&lt;br /&gt;
&lt;br /&gt;
;&amp;lt;code&amp;gt;restore_session_and_responses()&amp;lt;/code&amp;gt;&lt;br /&gt;
:Loads the question type specific session data from the database into the &amp;lt;code&amp;gt;$state&amp;lt;/code&amp;gt; object, in particular it loads the responses that have been saved for the given &amp;lt;code&amp;gt;$state&amp;lt;/code&amp;gt; into the &amp;lt;code&amp;gt;$state-&amp;gt;responses&amp;lt;/code&amp;gt; field.&lt;br /&gt;
&lt;br /&gt;
;&amp;lt;code&amp;gt;save_session_and_responses()&amp;lt;/code&amp;gt;&lt;br /&gt;
:Saves the question type specific session data from the $state object to the database. In particular, for most questiontypes, it saves the responses from the &amp;lt;code&amp;gt;$state-&amp;gt;responses&amp;lt;/code&amp;gt; to the database.&lt;br /&gt;
&lt;br /&gt;
The generic quiz module code saves the contents form the &amp;lt;code&amp;gt;&amp;lt;nowiki&amp;gt;$state-&amp;gt;responses[&#039;&#039;]&amp;lt;/nowiki&amp;gt;&amp;lt;/code&amp;gt; field to the answer field in the [[Quiz database structure#quiz_states|quiz_states table]] and also automatically restores the contents of this field to &amp;lt;code&amp;gt;&amp;lt;nowiki&amp;gt;$state-&amp;gt;responses[&#039;&#039;]&amp;lt;/nowiki&amp;gt;&amp;lt;/code&amp;gt;. This means that any questiontype, which only expects a single value as its response can skip the implementation of the three methods described above. All questiontypes that have multiple value responses need to implement these methods. &lt;br /&gt;
&lt;br /&gt;
The default questiontypes handle this problem by serializing/de-serializing the responses to/from the answer field in the quiz_states table. However, it is also possible (and may be better practice) to extend the quiz_states table with a questiontype specific table, i.e. take the id of the quiz_states record as a foreign key in the questiontype specific table. Because the value of &amp;lt;code&amp;gt;&amp;lt;nowiki&amp;gt;$state-&amp;gt;responses[&#039;&#039;]&amp;lt;/nowiki&amp;gt;&amp;lt;/code&amp;gt; is set to the value of the answer field, questiontypes that serialize their response need to overwrite (in &amp;lt;code&amp;gt;save_session_and_responses()&amp;lt;/code&amp;gt;) whatever value the generic code set this field to with their serialized value (usually achieved with a simple set_field). &lt;br /&gt;
&lt;br /&gt;
In the method &amp;lt;code&amp;gt;restore_session_and_responses()&amp;lt;/code&amp;gt; the serialized value can be read from &amp;lt;code&amp;gt;&amp;lt;nowiki&amp;gt;$state-&amp;gt;responses[&#039;&#039;]&amp;lt;/nowiki&amp;gt;&amp;lt;/code&amp;gt; because this is where the value from answer field of the quiz_states table has been moved. Care needs to be taken that this array value is then unset or the whole array overwritten, so that the array does not accidentally contain a value with the empty string index.&lt;br /&gt;
&lt;br /&gt;
==Response processing==&lt;br /&gt;
&lt;br /&gt;
The runtime model for responses dictates the structure of the $state-&amp;gt;responses array. Starting with the names of the form elements this section goes through the relevant processing steps and thus attempts to clarify why the keys of the $state-&amp;gt;responses array can differ for different questiontypes; even more, it explains how the array keys are chosen and set.&lt;br /&gt;
&lt;br /&gt;
Although it may initially seem strange to start with the naming convention of the form fields, the reason for this will become clear later on. The controls (i.e. the form fields) of a question get printed by the method &amp;lt;code&amp;gt;print_question_formulation_and_controls()&amp;lt;/code&amp;gt;. The convention only dictates that the name of the control element(s) must begin with the value of &amp;lt;code&amp;gt;$question-&amp;gt;name_prefix&amp;lt;/code&amp;gt;. The &amp;lt;code&amp;gt;$question-&amp;gt;name_prefix&amp;lt;/code&amp;gt; is a string starting with &amp;quot;resp&amp;quot; followed by the question id and an underscore, e.g. &amp;lt;code&amp;gt;resp56_&amp;lt;/code&amp;gt;. In the default case, when there is only a single control element (this includes the case of a list of equally named radio buttons), no postfix is appended to the name prefix. For questiontypes that allow or require multiple form elements, an arbitrary string can be appended to the name prefix to form the name of these form elements. The postfix must not include any relational data (i.e. ids of records in the quiz_answers table), because this can lead to problems with regrading of versioned questions.&lt;br /&gt;
&lt;br /&gt;
After the printing of the question the server only sees it again when it is submitted. So the submitted data will contain several values indexed by strings starting with &amp;lt;code&amp;gt;respXX_&amp;lt;/code&amp;gt;. Upon submission, the function &amp;lt;code&amp;gt;quiz_process_responses()&amp;lt;/code&amp;gt; is called, which assigns the submitted responses to the state of the question with id XX, using the postfix (i.e. everything after the underscore) as array keys. In the default case with only one control element the name only consists of the name prefix. This explains why the default index of the &amp;lt;code&amp;gt;$state-&amp;gt;responses&amp;lt;/code&amp;gt; array is the empty string. The value of each array element is obviously the value that was submitted by the form, basically a raw response.&lt;br /&gt;
&lt;br /&gt;
The function &amp;lt;code&amp;gt;quiz_process_responses()&amp;lt;/code&amp;gt; in turn calls the questiontype specific method &amp;lt;code&amp;gt;grade_responses()&amp;lt;/code&amp;gt; to assign a grade to the submitted responses and &amp;lt;code&amp;gt;compare_responses()&amp;lt;/code&amp;gt; to determine whether the response was identical to the previous submission and to avoid regrading the same responses repeatedly. These questiontype specific functions need to be aware of the expected keys of the &amp;lt;code&amp;gt;$state-&amp;gt;responses&amp;lt;/code&amp;gt; array.&lt;br /&gt;
&lt;br /&gt;
Finally, the methods &amp;lt;code&amp;gt;restore_session_and_responses()&amp;lt;/code&amp;gt; and &amp;lt;code&amp;gt;save_session_and_responses()&amp;lt;/code&amp;gt; also need to know the questiontype specific layout of the &amp;lt;code&amp;gt;$state-&amp;gt;responses array&amp;lt;/code&amp;gt; and restore or save the information, e.g. by converting from or to the data representation.&lt;br /&gt;
&lt;br /&gt;
==Question types==&lt;br /&gt;
{{Questiontype developer docs}}&lt;br /&gt;
The quiz module is itself modular and allows question type plug-ins. For each question type there should be a page, accessible via the menu at the right, which provides at least the details about&lt;br /&gt;
*Database tables&lt;br /&gt;
*Response storage&lt;br /&gt;
*Question options object&lt;br /&gt;
*State options object&lt;br /&gt;
[[Question type code flow]]&lt;br /&gt;
&lt;br /&gt;
It is hoped that Moodlers will contribute a lot of non-core question types in the future. For this it would be good to start a [[How to write a question type plugin]].&lt;br /&gt;
&lt;br /&gt;
==Grades==&lt;br /&gt;
&lt;br /&gt;
The handling of grades is a bit complicated because there are so many different grades around that get rescaled and combined in various ways. This section should summarize how this is done and why.&lt;br /&gt;
&lt;br /&gt;
The following grade fields are being used:&lt;br /&gt;
*$question-&amp;gt;defaultgrade&lt;br /&gt;
::This is the default value for the maximum grade for this question. This is set up when the teacher creates the question and it is stored in an int(10) field in the [[Quiz database structure#quiz_questions|quiz_questions]] table. However when the question is actually used in a particular quiz the teacher can overrule this default and this is stored in:&lt;br /&gt;
*$question-&amp;gt;maxgrade&lt;br /&gt;
::This is the maximum grade that the teacher has assigned to this question in the context of the current quiz. This is by default equal to $questions-&amp;gt;defaultgrade but the teacher can change this when editing the quiz. In the database it is stored in an int(10) field in the [[Quiz database structure#quiz_question_instances|quiz_question_instances table]].&lt;br /&gt;
*$question-&amp;gt;penalty&lt;br /&gt;
&lt;br /&gt;
*$state-&amp;gt;raw_grade&lt;br /&gt;
*$state-&amp;gt;grade&lt;br /&gt;
*$state-&amp;gt;penalty&lt;br /&gt;
*$state-&amp;gt;sumpenalty&lt;br /&gt;
&lt;br /&gt;
*$attempt-&amp;gt;sumgrades&lt;br /&gt;
&lt;br /&gt;
The maximum grades set by the teacher, $question-&amp;gt;defaultgrade and $question-&amp;gt;maxgrade, are integers. All student-obtained grades are in principle floating point numbers. For historical reasons they are stored in the database as varchar(10) fields. Care has to be taken when writing to the database to make sure all grades are correctly rounded and squeezed into a string of no more than 10 characters, otherwise the writing to database will fail, see bug 4220.&lt;br /&gt;
&lt;br /&gt;
The final outcome of the calculation of the grade for a user at a particular quiz is stored in the &#039;grade&#039; field of the [[Quiz database structure#quiz_grades|quiz_grades table]]. This field has type double.&lt;br /&gt;
&lt;br /&gt;
==Penalty mechanism==&lt;br /&gt;
&lt;br /&gt;
===What it is for===&lt;br /&gt;
&lt;br /&gt;
When the quiz is run in adaptive mode the student can interact with a question repeatedly. So in particular the student can try again when he gets a wrong answer. Clearly the final mark for the question must reflect the fact that the student did not get it right originally. Therefore a penalty is subtracted from the final mark.&lt;br /&gt;
&lt;br /&gt;
===How the penalty is determined===&lt;br /&gt;
&lt;br /&gt;
First of all penalties are relevant only if a quiz is run in adaptive mode. Only in this case can a student have a second attempt and therefore only in this mode can there be any occasion to subtract a penalty.&lt;br /&gt;
&lt;br /&gt;
Even in adaptive mode the penalty mechanism is only used when it is selected in the quiz options. If &amp;quot;Apply penalties&amp;quot; is set to &amp;quot;No&amp;quot; then the final mark for the question is the mark for the last graded response.&lt;br /&gt;
&lt;br /&gt;
Each question has a &#039;penalty&#039; field (which should really be called &#039;penaltyfactor&#039;) which is a number between 0 and 1. The penalty for a wrong response is calculated as the product ($quiz-&amp;gt;penalty * $quiz-&amp;gt;grade), i.e., as the product of the penaltyfactor with the maximum achievable grade for the question. This product is stored in $state-&amp;gt;penalty. So $quiz-&amp;gt;penalty is the fraction of the maximum grade that is subtracted as a penalty for each wrong response.&lt;br /&gt;
&lt;br /&gt;
The $quiz-&amp;gt;penalty field has a default value of 0.1, both in the database and in mod/quiz/defaults.php. This default can of course be overwritten by the admin on the quiz configuration page. This admin-selected default is (as usual for admin defaults) stored in $CFG-&amp;gt;quiz_penalty. The teacher can choose a different penalty factor for each individual question when adding or editing a question. (In Moodle 1.8 the default value of 0.1 is actually hardcoded at line 87 of moodle/question/type/edit_question_form.php)&lt;br /&gt;
&lt;br /&gt;
Now if a student makes repeated wrong attempts (or partially correct attempts) the penalties for all these attempts are added up in $state-&amp;gt;sumpenalties. The mark for the question is then calculated as the mark for the last graded response minus the sum of the penalties.&lt;br /&gt;
&lt;br /&gt;
One curious fact about $state-&amp;gt;sumpenalties is that, for efficiency reasons, it is not stored in the quiz_states table but instead in the &#039;sumpenalty&#039; field of the quiz_newest_states table. That way it only has to be stored once per attempt rather than once per response.&lt;br /&gt;
&lt;br /&gt;
===Where it is done in the code===&lt;br /&gt;
&lt;br /&gt;
The function quiz_apply_penalty_and_timelimit() subtracts the penalty in $state-&amp;gt;sumpenalty from the raw grade in $state-&amp;gt;raw_grade to obtain $state-&amp;gt;grade for the response. However it is ensured that the grade of a new attempt at the question never falls below the previously achieved grade. This function also increases $state-&amp;gt;sumpenalty by the amount in $state-&amp;gt;penalty. The assumption is that $state-&amp;gt;penalty has just been set appropriately by the code calling this function, e.g., quiz_process_responses.&lt;br /&gt;
&lt;br /&gt;
==Files belonging to questions==&lt;br /&gt;
&lt;br /&gt;
This talks about the situation in relation to the Moodle 2.0 file API.&lt;br /&gt;
&lt;br /&gt;
===File areas===&lt;br /&gt;
&lt;br /&gt;
There are various file areas associated with each question.&lt;br /&gt;
&lt;br /&gt;
For example there is a file are &#039;questiontext&#039;, belonging to the &#039;question&#039; core component, which stores any images or other embedded files used by the question text. There are also &#039;generalfeedback&#039; and &#039;question_answer&#039; file areas.&lt;br /&gt;
&lt;br /&gt;
There may also be some file areas specific to each question type. For example the &#039;qtype_multichoice&#039; component has a &#039;correctfeedback&#039; file area (among others).&lt;br /&gt;
&lt;br /&gt;
All these file areas belong to the context that is the context of $question-&amp;gt;category.&lt;br /&gt;
&lt;br /&gt;
===Serving files and access checks===&lt;br /&gt;
&lt;br /&gt;
This is a bit complicated because, although the files belong to the question system or a particular question type, then whether the user should be able to see a particular file (for example an image in the general feedback) is influenced by whichever part of Moodle is using the question (for example the quiz module or question preview).&lt;br /&gt;
&lt;br /&gt;
The easiest way to explain is probably to show the call-stack for determining whether a particular image is displayed, then you can go and read the code.&lt;br /&gt;
&lt;br /&gt;
For the request .../pluginfile.php/123/question/questiontext/234/345/image.png for an impage in the questiontext of a question in a quiz attempt.&lt;br /&gt;
&lt;br /&gt;
(here, 123 is the contextid, 234 if the attemptid (corresponding to question_attempts.id) and 345 is the questionid.)&lt;br /&gt;
&lt;br /&gt;
# pluginfile.php&lt;br /&gt;
# question_pluginfile() &#039;&#039;in lib/questionlib.php&#039;&#039;&lt;br /&gt;
# quiz_question_pluginfile() &#039;&#039;in mod/quiz/lib.php&#039;&#039;&lt;br /&gt;
# quiz_attempt-&amp;gt;check_file_access() &#039;&#039;in mod/quiz/attemptlib.php&#039;&#039;&lt;br /&gt;
# question-&amp;gt;check_file_access() &#039;&#039;in lib/questionlib.php&#039;&#039;&lt;br /&gt;
# qtype_&#039;&#039;whatever&#039;&#039;-&amp;gt;check_file_access() &#039;&#039;in question/type/whatever/quetsiontype.php&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
If, instead, the question was appearing in the question preview pop-up window, the call stack would be&lt;br /&gt;
&lt;br /&gt;
# pluginfile.php&lt;br /&gt;
# question_pluginfile() &#039;&#039;in lib/questionlib.php&#039;&#039;&lt;br /&gt;
# &#039;&#039;&#039;question_preview_question_pluginfile()&#039;&#039;&#039; &#039;&#039;in question/previewlib.php&#039;&#039;&lt;br /&gt;
# question-&amp;gt;check_file_access() &#039;&#039;in lib/questionlib.php&#039;&#039;&lt;br /&gt;
# qtype_&#039;&#039;whatever&#039;&#039;-&amp;gt;check_file_access() &#039;&#039;in question/type/whatever/quetsiontype.php&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
(the different bit is highlighted in bold).&lt;br /&gt;
&lt;br /&gt;
If, instead, the image url was .../pluginfile.php/123/qtype_multichoice/correctfeedback/234/345/image.png, the call stack would be&lt;br /&gt;
&lt;br /&gt;
# pluginfile.php&lt;br /&gt;
# &#039;&#039;&#039;qtype_multichoice_pluginfile()&#039;&#039;&#039; &#039;&#039;in question/type/multichoice/lib.php&#039;&#039;&lt;br /&gt;
# question_pluginfile() &#039;&#039;in lib/questionlib.php&#039;&#039;&lt;br /&gt;
# quiz_question_pluginfile() &#039;&#039;in mod/quiz/lib.php&#039;&#039;&lt;br /&gt;
# quiz_attempt-&amp;gt;check_file_access() &#039;&#039;in mod/quiz/attemptlib.php&#039;&#039;&lt;br /&gt;
# question-&amp;gt;check_file_access() &#039;&#039;in lib/questionlib.php&#039;&#039;&lt;br /&gt;
# qtype_multichoice-&amp;gt;check_file_access() &#039;&#039;in question/type/multichoice/quetsiontype.php&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
Roughly speaking, qtype_whatever-&amp;gt;check_file_access() takes the same $question, $state and $options objects as print_question_formulation_and_controls, so, for example, you can do the same permissions check when trying to access a file in the feedback as was done when deciding whether to display the feedback.&lt;br /&gt;
&lt;br /&gt;
The quiz_question_pluginfile or question_preview_question_pluginfile functions are responsible for getting the right $question, $state, $options based on the $attemptid and $questionid in the URL. They also do some basic access checks.&lt;br /&gt;
&lt;br /&gt;
All the other functions are really just about dispatching the request to the right place to be handled.&lt;br /&gt;
&lt;br /&gt;
[[Category:Question engine]]&lt;br /&gt;
[[Category:Quiz]]&lt;/div&gt;</summary>
		<author><name>Ganderson</name></author>
	</entry>
	<entry>
		<id>https://docs.moodle.org/dev/index.php?title=User:Gary_Anderson&amp;diff=20272</id>
		<title>User:Gary Anderson</title>
		<link rel="alternate" type="text/html" href="https://docs.moodle.org/dev/index.php?title=User:Gary_Anderson&amp;diff=20272"/>
		<updated>2010-05-17T12:28:26Z</updated>

		<summary type="html">&lt;p&gt;Ganderson: &lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;[[Image:GaryAndersonLava.jpg|thumb|Picture during South American travels]]&lt;br /&gt;
&lt;br /&gt;
Gary Anderson is a native of Seattle, a graduate of the University of Washington with degrees in Math, Business Economics, and certification in history education.  He has a Master&#039;s degree in Teaching from Seattle University.  Before entering teaching in 1996, he was the General Manager of the largest computer store in the Pacific Northwest which sold a majority of Apple II and Macintosh computers to schools, businesses and individuals around the I-5 corridor.  He was also president of a software company that specialized in network communications.&lt;br /&gt;
&lt;br /&gt;
Teaching is the family business for Gary.  Both of his parents are retired teachers, and his brother is the principal of a middle school and his sister is an elementary school teacher.&lt;br /&gt;
&lt;br /&gt;
His research interest is in the technology of instruction, and in particular the effects on student achievement when they receive rapid feedback on their performance.  He has designed a number of software projects in advancement of this effort.  He is currently working on a Moodle activity based on the theory of [http://en.wikipedia.org/wiki/Spaced_repetition Spaced Repetition] and another activity that customizes Wikimedia software for use in secondary school education.&lt;br /&gt;
&lt;br /&gt;
[[Image:GaryAndersonMoodleMaster.jpg|left|thumb|Moodle Master during Halloween]]&lt;br /&gt;
&lt;br /&gt;
Gary is the head of the Math Department at Seattle Academy and wonderful private, college prep, independent school that among many other things is in the 12th year of a universal laptop program for it&#039;s upper school.  He teaches Advance Algebra, Second Year Calculus, and elective trimesters in Statistics, Math Modeling and Software Development.  These math electives are the most popular electives in the school.&lt;br /&gt;
&lt;br /&gt;
For the past 4 years, Gary has been known as the Moodle Master and has customized the software to make it especially usable in the high school environment (see [[Seattle_Academy]]).  He is now turning over this day-to-day responsibility to has technology department and Curriculum Technology Coordinator Vicki Butler so the he can focus on being more involved in the larger technology community, contributing what he has learned from overseeing the school&#039;s Moodle project and other educational technology initiatives.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
----&lt;br /&gt;
I will use subpages of my talk area to make more detailed observations and analysis of current Moodle issues that may not work well in the tracker, the forums, or other areas of Moodle&#039;s documentation.&lt;br /&gt;
&lt;br /&gt;
# [[User_talk:Gary_Anderson/Extra credit status | Extra credit status]]&lt;br /&gt;
# [[User_talk:Gary_Anderson/Examples of Extra Credit grading | Examples of Extra Credit grading]]&lt;br /&gt;
# [[User:Gary_Anderson/1.9.8-2.0_update]]&lt;br /&gt;
----&lt;/div&gt;</summary>
		<author><name>Ganderson</name></author>
	</entry>
	<entry>
		<id>https://docs.moodle.org/dev/index.php?title=User:Gary_Anderson/1.9.8-2.0_update&amp;diff=22404</id>
		<title>User:Gary Anderson/1.9.8-2.0 update</title>
		<link rel="alternate" type="text/html" href="https://docs.moodle.org/dev/index.php?title=User:Gary_Anderson/1.9.8-2.0_update&amp;diff=22404"/>
		<updated>2010-05-10T04:55:02Z</updated>

		<summary type="html">&lt;p&gt;Ganderson: Steps to upgrade 1.9.9 to 2.0 preview 1&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;Seattle Academy has a very active Moodle 1.9 site with many custom extensions and potential legacy issues with it&#039;s database.  I needed to do the following to update from the latest 1.9.8 to 2.0:&lt;br /&gt;
&lt;br /&gt;
1.  From the 1.9.8 backup, I deleted the wiki module.  There were too many problems during update that prevented it from completing.&lt;br /&gt;
&lt;br /&gt;
2.  In version 2.0 preview 1, commented out line 61 of /mod/assignment/db/upgrade.php that begins $pbar-&amp;gt;update.  We have 750,000 assignment submissions.  This line causes the browser doing updates to run out of memory at about 50,000 assignment submissions.&lt;br /&gt;
&lt;br /&gt;
3.  Comment out line 1936 of /lib/db/upgrade.php.&lt;br /&gt;
 &lt;br /&gt;
 dbman-&amp;gt;change_field_notnull($table, $field);&lt;br /&gt;
&lt;br /&gt;
This was creating a fatal exception with our collection of blocks.&lt;br /&gt;
&lt;br /&gt;
4.  Change line 2612 of /lib/db/upgrade.php from $admins = get_admins(); to $admins = null.  It was throwing an exception as it was not able to get_admins, perhaps since a login was not required (or permitted) to upgrade.&lt;br /&gt;
&lt;br /&gt;
This allowed us to begin testing.&lt;/div&gt;</summary>
		<author><name>Ganderson</name></author>
	</entry>
	<entry>
		<id>https://docs.moodle.org/dev/index.php?title=User_talk:Gary_Anderson&amp;diff=23929</id>
		<title>User talk:Gary Anderson</title>
		<link rel="alternate" type="text/html" href="https://docs.moodle.org/dev/index.php?title=User_talk:Gary_Anderson&amp;diff=23929"/>
		<updated>2009-05-20T12:56:01Z</updated>

		<summary type="html">&lt;p&gt;Ganderson: Comment responded to...&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;== CVS with NetBeans ==&lt;br /&gt;
&lt;br /&gt;
Hi Gary,&lt;br /&gt;
I have started to copy some of the instructions from your &#039;&#039;NetBeans for Moodle Development&#039;&#039; course to Moodle Docs ([[Development:Setting_up_Netbeans#CVS_with_NetBeans]]). Hope that&#039;s okay with you. --[[User:Frank Ralf|Frank Ralf]] 09:47, 20 May 2009 (UTC)&lt;br /&gt;
:No problem.  Glad you are doing it:)--[[User:Gary Anderson|Gary Anderson]] 12:56, 20 May 2009 (UTC)&lt;/div&gt;</summary>
		<author><name>Ganderson</name></author>
	</entry>
	<entry>
		<id>https://docs.moodle.org/dev/index.php?title=Modules_and_plugins_improvements&amp;diff=13513</id>
		<title>Modules and plugins improvements</title>
		<link rel="alternate" type="text/html" href="https://docs.moodle.org/dev/index.php?title=Modules_and_plugins_improvements&amp;diff=13513"/>
		<updated>2009-04-27T22:43:24Z</updated>

		<summary type="html">&lt;p&gt;Ganderson: Added link and instructions to the page comments&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;The Modules and Plugins database provides a convenient way for Moodle System Administrators to search for available plugins, patches, and tools to enhance their installation. While the basic structure has been reasonably helpful, there is much to be desired in order to help those administrators determine things like the quality of the code, the reliability of the code, and the popularity of the code. This page is to help identify the areas needed for improvement and provide an path for implementing those improvements.&lt;br /&gt;
&lt;br /&gt;
For example, I would like for there to be various levels of code. The first level would be verifying that the code has been independently tested by a Moodle developer, Moodle Partner or PHM to verify that the program at least appears to do what it says by someone of some repute. To say that the code is verified means that the code essentially works without any obvious bugs, PHP warning/notices, etc. &lt;br /&gt;
&lt;br /&gt;
A similar indicator would be to have the code be &amp;quot;Moodle certified&amp;quot; which would mean that a Moodle developer or Moodle Partner has not only verified the functionality of the code but also the quality of the code. Certification would mean that the code conforms to Moodle&#039;s coding guidelines. Those wishing to have their code certified, could contact a Moodle Partner similar to how we handle the MCT. Code certified by a Moodle Partner indicates that the code is production ready and that the Moodle Partner would be comfortable having that code running on its servers.&lt;br /&gt;
&lt;br /&gt;
Perhaps we could also develop a Moodle Certified Developer (MCD) which would mean that they have completed the Moodle Developer Course under the tutelage of a Moodle Partner and demonstrated the ability to code well according to Moodle coding guidelines.  &lt;br /&gt;
&lt;br /&gt;
The final code status indicator would be to say that it is hardened or secured. Secured code has been verified, certified, and also given a review by a security specialist (most likely Petr) to ensure that the code is unlikely to have any known security vulnerabilities. Here, I envision a Moodle Partner requesting that Petr review the code. &lt;br /&gt;
&lt;br /&gt;
In addition to the code status indicator which serves as a type of quality assurance, it would be good to have popularity ratings. These should incorporate not only the number of downloads (from http://download.moodle.org/stats.php) but also the ratings that users give them. I would like to see some type of algorithm that would adjust the popularity based not merely on the average rating but also on the number of ratings such that the more popular plugins would outrank the less popular but highly rated ones.&lt;br /&gt;
&lt;br /&gt;
Personally, I would like to receive an email with information about any new M&amp;amp;P entries. I would like to be able to filter the entries by various criteria and be able to do things like send a bulk message to all of those whose code is not on the Moodle CVS server (i.e. the download link does not contain http://download.moodle.org/download.php). As an aside, I am trying to ensure that I start adding the M&amp;amp;P entry URL to the component description to facilitate moving between places.&lt;br /&gt;
&lt;br /&gt;
Please continue to add ideas, hopes, etc. as to how the Modules and Plugins database can become a more useful tool not only for those who maintain it but also for those who make use of it, either here or in the [[Development_talk:Modules_and_plugins_improvements | page comments]]&lt;br /&gt;
&lt;br /&gt;
Part of what makes a plugin reputable is how quickly issues are responded to. I would want to be able to assess someone how actively the code is being maintained. We have a number of possible pieces of data but I do not know how we could calculate things in a meaningful way. The average time difference between when an issue is created and resolved might be helpful. Good code will not have many issues and thus not much activity; however, high activity indicates that it is actively being worked on. The last touch might be a semi-useful piece of information. Any other ideas?&lt;/div&gt;</summary>
		<author><name>Ganderson</name></author>
	</entry>
	<entry>
		<id>https://docs.moodle.org/dev/index.php?title=Talk:Modules_and_plugins_improvements&amp;diff=27921</id>
		<title>Talk:Modules and plugins improvements</title>
		<link rel="alternate" type="text/html" href="https://docs.moodle.org/dev/index.php?title=Talk:Modules_and_plugins_improvements&amp;diff=27921"/>
		<updated>2009-04-26T17:33:19Z</updated>

		<summary type="html">&lt;p&gt;Ganderson: Comments by Gary Anderon on module certification process&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;Anthony:  I agree that this would be very helpful.  Three suggestions:&lt;br /&gt;
*  We should look at how other GNU web applications which have high rates of community contributions work, for example Drupal, MediaWiki, and WordPress.  Perhaps a page (or section) of &amp;quot;Lesson&#039;s learned&amp;quot; from these projects would be useful for this discussion.&lt;br /&gt;
*  I think it would be a good idea to expand the list of possible reviewers so that it does not focus too much only only the employees of Moodle.com (and I suspect that most of them would agree as well). Perhaps a way to do this is to have greater weight be given to those who have either contributed already certified code (that could include partners,HQ staff, or other contributors), or who have given effective reviews of a number of other modules, etc.  To not discourage new-comers in the process, perhaps an review may need three net positive votes, where a new-comer can give one vote, but a pre-certified individual could give two or three votes, etc.&lt;br /&gt;
* Obviously, we need to keep it simple and not make the certification process too difficult.  One way to do that may be to have a Wiki page on each contribution, and people could use the page comments to offer their reviews.  Those wanting their contribution to be certified could solicit review.  Before certification was given, they would need a certain amount of positive feedback, and all concerns raised in the feedback would need to be addressed (either with a fix or with a discussion that attempted to reach a consensus on any issues raised).--[[User:Gary Anderson|Gary Anderson]] 17:33, 26 April 2009 (UTC)&lt;/div&gt;</summary>
		<author><name>Ganderson</name></author>
	</entry>
	<entry>
		<id>https://docs.moodle.org/dev/index.php?title=User:Gary_Anderson&amp;diff=20271</id>
		<title>User:Gary Anderson</title>
		<link rel="alternate" type="text/html" href="https://docs.moodle.org/dev/index.php?title=User:Gary_Anderson&amp;diff=20271"/>
		<updated>2009-03-29T03:39:23Z</updated>

		<summary type="html">&lt;p&gt;Ganderson: Moved subpage links to bottom of page, other rearrangements&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;[[Image:GaryAndersonLava.jpg|thumb|Picture during South American travels]]&lt;br /&gt;
&lt;br /&gt;
Gary Anderson is a native of Seattle, a graduate of the University of Washington with degrees in Math, Business Economics, and certification in history education.  He has a Master&#039;s degree in Teaching from Seattle University.  Before entering teaching in 1996, he was the General Manager of the largest computer store in the Pacific Northwest which sold a majority of Apple II and Macintosh computers to schools, businesses and individuals around the I-5 corridor.  He was also president of a software company that specialized in network communications.&lt;br /&gt;
&lt;br /&gt;
Teaching is the family business for Gary.  Both of his parents are retired teachers, and his brother is the principal of a middle school and his sister is an elementary school teacher.&lt;br /&gt;
&lt;br /&gt;
His research interest is in the technology of instruction, and in particular the effects on student achievement when they receive rapid feedback on their performance.  He has designed a number of software projects in advancement of this effort.  He is currently working on a Moodle activity based on the theory of [http://en.wikipedia.org/wiki/Spaced_repetition Spaced Repetition] and another activity that customizes Wikimedia software for use in secondary school education.&lt;br /&gt;
&lt;br /&gt;
[[Image:GaryAndersonMoodleMaster.jpg|left|thumb|Moodle Master during Halloween]]&lt;br /&gt;
&lt;br /&gt;
Gary is the head of the Math Department at Seattle Academy and wonderful private, college prep, independent school that among many other things is in the 12th year of a universal laptop program for it&#039;s upper school.  He teaches Advance Algebra, Second Year Calculus, and elective trimesters in Statistics, Math Modeling and Software Development.  These math electives are the most popular electives in the school.&lt;br /&gt;
&lt;br /&gt;
For the past 4 years, Gary has been known as the Moodle Master and has customized the software to make it especially usable in the high school environment (see [[Seattle_Academy]]).  He is now turning over this day-to-day responsibility to has technology department and Curriculum Technology Coordinator Vicki Butler so the he can focus on being more involved in the larger technology community, contributing what he has learned from overseeing the school&#039;s Moodle project and other educational technology initiatives.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
----&lt;br /&gt;
I will use subpages of my talk area to make more detailed observations and analysis of current Moodle issues that may not work well in the tracker, the forums, or other areas of Moodle&#039;s documentation.&lt;br /&gt;
&lt;br /&gt;
# [[User_talk:Gary_Anderson/Extra credit status | Extra credit status]]&lt;br /&gt;
# [[User_talk:Gary_Anderson/Examples of Extra Credit grading | Examples of Extra Credit grading]]&lt;br /&gt;
----&lt;/div&gt;</summary>
		<author><name>Ganderson</name></author>
	</entry>
	<entry>
		<id>https://docs.moodle.org/dev/index.php?title=User_talk:Gary_Anderson&amp;diff=23926</id>
		<title>User talk:Gary Anderson</title>
		<link rel="alternate" type="text/html" href="https://docs.moodle.org/dev/index.php?title=User_talk:Gary_Anderson&amp;diff=23926"/>
		<updated>2009-03-29T03:34:48Z</updated>

		<summary type="html">&lt;p&gt;Ganderson: Removed text that is on user page.&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;&lt;/div&gt;</summary>
		<author><name>Ganderson</name></author>
	</entry>
	<entry>
		<id>https://docs.moodle.org/dev/index.php?title=User:Gary_Anderson&amp;diff=20270</id>
		<title>User:Gary Anderson</title>
		<link rel="alternate" type="text/html" href="https://docs.moodle.org/dev/index.php?title=User:Gary_Anderson&amp;diff=20270"/>
		<updated>2009-03-22T18:26:33Z</updated>

		<summary type="html">&lt;p&gt;Ganderson: Copied links from comments&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;&lt;br /&gt;
I will use subpages of my talk area to make more detailed observations and analysis of current Moodle issues that may not work well in the tracker, the forums, or other areas of Moodle&#039;s documentation.&lt;br /&gt;
&lt;br /&gt;
# [[User_talk:Gary_Anderson/Extra credit status | Extra credit status]]&lt;br /&gt;
# [[User_talk:Gary_Anderson/Examples of Extra Credit grading | Examples of Extra Credit grading]]&lt;br /&gt;
----&lt;br /&gt;
[[Image:GaryAndersonLava.jpg]]&lt;br /&gt;
&lt;br /&gt;
Gary Anderson is a native of Seattle, a graduate of the University of Washington with degrees in Math, Business Economics, and certification in history education.  He has a Master&#039;s degree in Teaching from Seattle University.  Before entering teaching in 1996, he was the General Manager of the largest computer store in the Pacific Northwest which sold a majority of Apple II and Macintosh computers to schools, businesses and individuals around the I-5 corridor.  He was also president of a software company that specialized in network communications.&lt;br /&gt;
&lt;br /&gt;
Teaching is the family business for Gary.  Both of his parents are retired teachers, and his brother is the principal of a middle school and his sister is an elementary school teacher.&lt;br /&gt;
&lt;br /&gt;
His research interest is in the technology of instruction, and in particular the effects on student achievement when they receive rapid feedback on their performance.  He has designed a number of software projects in advancement of this effort.  He is currently working on a Moodle activity based on the theory of [http://en.wikipedia.org/wiki/Spaced_repetition Spaced Repetition] and another activity that customizes Wikimedia software for use in secondary school education.&lt;br /&gt;
&lt;br /&gt;
Gary is the head of the Math Department at Seattle Academy and wonderful private, college prep, independent school that among many other things is in the 12th year of a universal laptop program for it&#039;s upper school.  He teaches Advance Algebra, Second Year Calculus, and elective trimesters in Statistics, Math Modeling and Software Development.  These math electives are the most popular electives in the school.&lt;br /&gt;
&lt;br /&gt;
For the past 4 years, Gary has been known as the Moodle Master and has customized the software to make it especially usable in the high school environment (see [[Seattle_Academy]]).  He is now turning over this day-to-day responsibility to has technology department and Curriculum Technology Coordinator Vicki Butler so the he can focus on being more involved in the larger technology community, contributing what he has learned from overseeing the school&#039;s Moodle project and other educational technology initiatives.&lt;br /&gt;
&lt;br /&gt;
[[Image:GaryAndersonMoodleMaster.jpg]]&lt;/div&gt;</summary>
		<author><name>Ganderson</name></author>
	</entry>
	<entry>
		<id>https://docs.moodle.org/dev/index.php?title=User:Gary_Anderson/Extra_credit_status&amp;diff=21269</id>
		<title>User:Gary Anderson/Extra credit status</title>
		<link rel="alternate" type="text/html" href="https://docs.moodle.org/dev/index.php?title=User:Gary_Anderson/Extra_credit_status&amp;diff=21269"/>
		<updated>2009-03-22T18:25:04Z</updated>

		<summary type="html">&lt;p&gt;Ganderson: Copied text to actual page rather than comment page&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;Since the discussion of extra credit appears in several tracker and forum issues, I will keep this personal subpage up-to-date on the current status rather than making a bunch of individual postings.  Feel free to use the page comments tab if you have something constructive to say about this page.  --[[User:Gary Anderson|Gary Anderson]] 19:05, 21 March 2009 (UTC)&lt;br /&gt;
&lt;br /&gt;
Response to [[http://tracker.moodle.org/browse/MDL-12942?focusedCommentId=67172&amp;amp;page=com.atlassian.jira.plugin.system.issuetabpanels%3Acomment-tabpanel#action_67172 | MDL-12942]]&lt;br /&gt;
&lt;br /&gt;
Petr:&lt;br /&gt;
&lt;br /&gt;
I added to the article http://en.wikipedia.org/w/index.php?title=Extra_credit to give reasons for use and methods of computation.  Does that resolve the issue:)?&lt;br /&gt;
&lt;br /&gt;
To consolidate my views on this at this overall issue at this point in time:&lt;br /&gt;
&lt;br /&gt;
1.  I think a global switch in $CFG is the best compromise to the over 100% on a given activity.  The instructions for use will be use in a tutorial that I will write into docs on how to do this type of extra credit.  For institutions where this is desired, it should be an acceptable approach (as opposed to needing it to be an admin block switch).&lt;br /&gt;
&lt;br /&gt;
2.  I think recalculating grades on changing this setting is unneeded and dangerous.  I base this both on my own tests of my latest patch in MDL-12380, the use of a fixed patch at my school for more than 4 trimesters, and the experience reported of the LSU gradebook.  I recognize that recalculation might happen at later times, but a one time disabling of this feature would cause all data to be lost of grades that exceed 100%.&lt;br /&gt;
&lt;br /&gt;
3.  Which brings me to my concern about the existing strategy of rounding to the boundary.  If one accepts the premise that grades can never exceed a maximum value, then the software should reject such a condition and not write to the database -- it should give some type of warning or exception instead.  This is most likely a data entry error or data corruption error and setting it to some bounded value corrupts the data further.&lt;br /&gt;
&lt;br /&gt;
4.  My objection to adding new aggregation types is in the adding of complexity to an already difficult gradeboook.  I don&#039;t mind using those values in the database in the grade_items table, it is just that it should be set or not by a checkbox in the Category and items form, and not by making the user select a different aggregation type.  I am also not sure if that method would allow individual items to be extra credit which is really what is needed.  A better solution would be to add a column to the grade_items table, but that would require changing the scheme within a version.&lt;br /&gt;
&lt;br /&gt;
5.  We do have this second type of extra credit (optional activities) working at our school, but I hacked it by having the title of the activity appended with a **.  This allows an item to be made extra credit without having to go into the gradebook.  Still, we have worked out the computation issues, which just basically increases the numerator but not the denominator.&lt;br /&gt;
&lt;br /&gt;
6.  As for the international acceptance issue, it does seem that some of these features have a US focus (as does the letter grade scales).  But I suspect that other teachers throughout the world give optional work, and at least in some cases, have a way for accounting for that in a student&#039;s assessment.&lt;br /&gt;
&lt;br /&gt;
7.  A selfish part of me is wishing that this issue is not addressed because I already have it fixed for myself and my colleagues.  Any fixes in core will mean I have to go back and undo these things that are working.  But ultimately I don&#039;t think the feature request will go away unless addressed.  So, when the issue comes up in the community, I jump back in.&lt;br /&gt;
&lt;br /&gt;
I do appreciate all your hard work for Moodle which I think is a great even if imperfect tool that can really improve educational possibilities throughout the world.  I find it invaluable in my own classroom.  It is just that my experience as a teacher does not match with your sensibilities as a programmer sometimes, although I remain hopeful that this process may still lead to a more successful product for teachers and students everywhere.&lt;br /&gt;
&lt;br /&gt;
Take care,&lt;br /&gt;
&lt;br /&gt;
--Gary&lt;/div&gt;</summary>
		<author><name>Ganderson</name></author>
	</entry>
	<entry>
		<id>https://docs.moodle.org/dev/index.php?title=User_talk:Gary_Anderson/Extra_credit_status&amp;diff=23947</id>
		<title>User talk:Gary Anderson/Extra credit status</title>
		<link rel="alternate" type="text/html" href="https://docs.moodle.org/dev/index.php?title=User_talk:Gary_Anderson/Extra_credit_status&amp;diff=23947"/>
		<updated>2009-03-21T19:05:51Z</updated>

		<summary type="html">&lt;p&gt;Ganderson: Response to MDL-12942&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;Since the discussion of extra credit appears in several tracker and forum issues, I will keep this personal subpage up-to-date on the current status rather than making a bunch of individual postings.  Feel free to use the page comments tab if you have something constructive to say about this page.  --[[User:Gary Anderson|Gary Anderson]] 19:05, 21 March 2009 (UTC)&lt;br /&gt;
&lt;br /&gt;
Response to [[http://tracker.moodle.org/browse/MDL-12942?focusedCommentId=67172&amp;amp;page=com.atlassian.jira.plugin.system.issuetabpanels%3Acomment-tabpanel#action_67172 | MDL-12942]]&lt;br /&gt;
&lt;br /&gt;
Petr:&lt;br /&gt;
&lt;br /&gt;
I added to the article http://en.wikipedia.org/w/index.php?title=Extra_credit to give reasons for use and methods of computation.  Does that resolve the issue:)?&lt;br /&gt;
&lt;br /&gt;
To consolidate my views on this at this overall issue at this point in time:&lt;br /&gt;
&lt;br /&gt;
1.  I think a global switch in $CFG is the best compromise to the over 100% on a given activity.  The instructions for use will be use in a tutorial that I will write into docs on how to do this type of extra credit.  For institutions where this is desired, it should be an acceptable approach (as opposed to needing it to be an admin block switch).&lt;br /&gt;
&lt;br /&gt;
2.  I think recalculating grades on changing this setting is unneeded and dangerous.  I base this both on my own tests of my latest patch in MDL-12380, the use of a fixed patch at my school for more than 4 trimesters, and the experience reported of the LSU gradebook.  I recognize that recalculation might happen at later times, but a one time disabling of this feature would cause all data to be lost of grades that exceed 100%.&lt;br /&gt;
&lt;br /&gt;
3.  Which brings me to my concern about the existing strategy of rounding to the boundary.  If one accepts the premise that grades can never exceed a maximum value, then the software should reject such a condition and not write to the database -- it should give some type of warning or exception instead.  This is most likely a data entry error or data corruption error and setting it to some bounded value corrupts the data further.&lt;br /&gt;
&lt;br /&gt;
4.  My objection to adding new aggregation types is in the adding of complexity to an already difficult gradeboook.  I don&#039;t mind using those values in the database in the grade_items table, it is just that it should be set or not by a checkbox in the Category and items form, and not by making the user select a different aggregation type.  I am also not sure if that method would allow individual items to be extra credit which is really what is needed.  A better solution would be to add a column to the grade_items table, but that would require changing the scheme within a version.&lt;br /&gt;
&lt;br /&gt;
5.  We do have this second type of extra credit (optional activities) working at our school, but I hacked it by having the title of the activity appended with a **.  This allows an item to be made extra credit without having to go into the gradebook.  Still, we have worked out the computation issues, which just basically increases the numerator but not the denominator.&lt;br /&gt;
&lt;br /&gt;
6.  As for the international acceptance issue, it does seem that some of these features have a US focus (as does the letter grade scales).  But I suspect that other teachers throughout the world give optional work, and at least in some cases, have a way for accounting for that in a student&#039;s assessment.&lt;br /&gt;
&lt;br /&gt;
7.  A selfish part of me is wishing that this issue is not addressed because I already have it fixed for myself and my colleagues.  Any fixes in core will mean I have to go back and undo these things that are working.  But ultimately I don&#039;t think the feature request will go away unless addressed.  So, when the issue comes up in the community, I jump back in.&lt;br /&gt;
&lt;br /&gt;
I do appreciate all your hard work for Moodle which I think is a great even if imperfect tool that can really improve educational possibilities throughout the world.  I find it invaluable in my own classroom.  It is just that my experience as a teacher does not match with your sensibilities as a programmer sometimes, although I remain hopeful that this process may still lead to a more successful product for teachers and students everywhere.&lt;br /&gt;
&lt;br /&gt;
Take care,&lt;br /&gt;
&lt;br /&gt;
--Gary&lt;/div&gt;</summary>
		<author><name>Ganderson</name></author>
	</entry>
	<entry>
		<id>https://docs.moodle.org/dev/index.php?title=User_talk:Gary_Anderson&amp;diff=23925</id>
		<title>User talk:Gary Anderson</title>
		<link rel="alternate" type="text/html" href="https://docs.moodle.org/dev/index.php?title=User_talk:Gary_Anderson&amp;diff=23925"/>
		<updated>2009-03-21T18:53:39Z</updated>

		<summary type="html">&lt;p&gt;Ganderson: &lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;See [[User:Gary_Anderson]] for a detailed description of my background.&lt;br /&gt;
&lt;br /&gt;
----&lt;br /&gt;
&lt;br /&gt;
I will use subpages of my talk area to make more detailed observations and analysis of current Moodle issues that may not work well in the tracker, the forums, or other areas of Moodle&#039;s documentation.&lt;br /&gt;
&lt;br /&gt;
# [[User_talk:Gary_Anderson/Extra credit status | Extra credit status]]&lt;br /&gt;
# [[User_talk:Gary_Anderson/Examples of Extra Credit grading | Examples of Extra Credit grading]]&lt;/div&gt;</summary>
		<author><name>Ganderson</name></author>
	</entry>
	<entry>
		<id>https://docs.moodle.org/dev/index.php?title=User_talk:Gary_Anderson/Examples_of_Extra_Credit_grading&amp;diff=23932</id>
		<title>User talk:Gary Anderson/Examples of Extra Credit grading</title>
		<link rel="alternate" type="text/html" href="https://docs.moodle.org/dev/index.php?title=User_talk:Gary_Anderson/Examples_of_Extra_Credit_grading&amp;diff=23932"/>
		<updated>2009-03-09T02:49:16Z</updated>

		<summary type="html">&lt;p&gt;Ganderson: Extra credit grading strategies described&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;&#039;&#039;&#039;&#039;&#039;by Gary Anderson&#039;&#039;&#039;&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;(Please add any comments using the page comments tab rather than editing this page)&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
The following are examples of course grading descriptions that use Extra Credit.  Each strategy should be possible within Moodle in a way that is intuitive to teachers without special training, and the computations should be natural and obvious.  Ideally they simply enter the extra points to an existing activity or to a special extra credit activity.&lt;br /&gt;
&lt;br /&gt;
Note that I don&#039;t always use Extra Credit in my classes, but when I do, it has these characteristics.&lt;br /&gt;
&lt;br /&gt;
*  Software Development: Spring 2009.  Teacher:  Gary Anderson&lt;br /&gt;
&lt;br /&gt;
Grading:  Grading in this course is very simple.  One Friday of each week you will write a reflection in Moodle on the work you have done, the successes and challenges you have had, and your plan for moving forward.  This assignment is worth 10 points each week.  In addition, you may earn a small number of extra credit points by doing work that clearly goes beyond the requirements of the course and is in addition to all assigned tasks.  Make sure you clearly document and justify this additional effort to qualify for extra credit.&lt;br /&gt;
&lt;br /&gt;
*  Advanced Algebra: Spring 2009.  Teacher:  Gary Anderson&lt;br /&gt;
&lt;br /&gt;
Grading:  60% of your term grade is for daily work which including regular homework assignments, projects, participation, and other activities.  40% of your grade is for quizzes and tests.  You may earn an additional 10 Extra-Credit points each week which will be added to your daily work category by doing the &amp;quot;Problems of the Week&amp;quot; found on saasmath.com.  Occasionally, an optional and more challenging extra-credit problem will also be added to a quiz or test.&lt;br /&gt;
&lt;br /&gt;
*  Advanced Algebra: Spring 2009.  Teacher:  Gary Anderson&lt;br /&gt;
&lt;br /&gt;
Grading:  60% of your term grade is for quizzes, tests, and exams.  40% of your grade is for daily work.  In addition, you may earn up to 5% extra credit by doing the optional problems found at saasmath.com.&lt;/div&gt;</summary>
		<author><name>Ganderson</name></author>
	</entry>
	<entry>
		<id>https://docs.moodle.org/dev/index.php?title=User_talk:Gary_Anderson&amp;diff=23924</id>
		<title>User talk:Gary Anderson</title>
		<link rel="alternate" type="text/html" href="https://docs.moodle.org/dev/index.php?title=User_talk:Gary_Anderson&amp;diff=23924"/>
		<updated>2009-03-09T02:02:13Z</updated>

		<summary type="html">&lt;p&gt;Ganderson: Start of personal essays on Moodle&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;See [[User:Gary_Anderson]] for a detailed description of my background.&lt;br /&gt;
&lt;br /&gt;
----&lt;br /&gt;
&lt;br /&gt;
I will use subpages of my talk area to make more detailed observations and analysis of current Moodle issues that may not work well in the tracker, the forums, or other areas of Moodle&#039;s documentation.&lt;br /&gt;
&lt;br /&gt;
# [[User_talk:Gary_Anderson/The uses of Extra Credit | The benefit of Extra Credit]]&lt;br /&gt;
# [[User_talk:Gary_Anderson/Examples of Extra Credit grading | Examples of Extra Credit grading]]&lt;/div&gt;</summary>
		<author><name>Ganderson</name></author>
	</entry>
	<entry>
		<id>https://docs.moodle.org/dev/index.php?title=User:Gary_Anderson&amp;diff=20269</id>
		<title>User:Gary Anderson</title>
		<link rel="alternate" type="text/html" href="https://docs.moodle.org/dev/index.php?title=User:Gary_Anderson&amp;diff=20269"/>
		<updated>2009-03-09T01:53:08Z</updated>

		<summary type="html">&lt;p&gt;Ganderson: Update to status&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;[[Image:GaryAndersonLava.jpg]]&lt;br /&gt;
&lt;br /&gt;
Gary Anderson is a native of Seattle, a graduate of the University of Washington with degrees in Math, Business Economics, and certification in history education.  He has a Master&#039;s degree in Teaching from Seattle University.  Before entering teaching in 1996, he was the General Manager of the largest computer store in the Pacific Northwest which sold a majority of Apple II and Macintosh computers to schools, businesses and individuals around the I-5 corridor.  He was also president of a software company that specialized in network communications.&lt;br /&gt;
&lt;br /&gt;
Teaching is the family business for Gary.  Both of his parents are retired teachers, and his brother is the principal of a middle school and his sister is an elementary school teacher.&lt;br /&gt;
&lt;br /&gt;
His research interest is in the technology of instruction, and in particular the effects on student achievement when they receive rapid feedback on their performance.  He has designed a number of software projects in advancement of this effort.  He is currently working on a Moodle activity based on the theory of [http://en.wikipedia.org/wiki/Spaced_repetition Spaced Repetition] and another activity that customizes Wikimedia software for use in secondary school education.&lt;br /&gt;
&lt;br /&gt;
Gary is the head of the Math Department at Seattle Academy and wonderful private, college prep, independent school that among many other things is in the 12th year of a universal laptop program for it&#039;s upper school.  He teaches Advance Algebra, Second Year Calculus, and elective trimesters in Statistics, Math Modeling and Software Development.  These math electives are the most popular electives in the school.&lt;br /&gt;
&lt;br /&gt;
For the past 4 years, Gary has been known as the Moodle Master and has customized the software to make it especially usable in the high school environment (see [[Seattle_Academy]]).  He is now turning over this day-to-day responsibility to has technology department and Curriculum Technology Coordinator Vicki Butler so the he can focus on being more involved in the larger technology community, contributing what he has learned from overseeing the school&#039;s Moodle project and other educational technology initiatives.&lt;br /&gt;
&lt;br /&gt;
[[Image:GaryAndersonMoodleMaster.jpg]]&lt;/div&gt;</summary>
		<author><name>Ganderson</name></author>
	</entry>
	<entry>
		<id>https://docs.moodle.org/dev/index.php?title=User_talk:Gary_Anderson&amp;diff=23923</id>
		<title>User talk:Gary Anderson</title>
		<link rel="alternate" type="text/html" href="https://docs.moodle.org/dev/index.php?title=User_talk:Gary_Anderson&amp;diff=23923"/>
		<updated>2009-03-09T01:29:51Z</updated>

		<summary type="html">&lt;p&gt;Ganderson: Personal page start&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;Gary Anderson has been involved in educational technology for most of his professional life, first as the general manager of a large computer store in the Pacific Northwest of the United States, then as a software developer, and for the past dozen years he has joined the rest of his family in a career as a teacher.&lt;br /&gt;
&lt;br /&gt;
His research interest is investigating ways that students, when given quick feedback, can improve the effectiveness of learning.&lt;br /&gt;
&lt;br /&gt;
He is the Math Department Chair of Seattle Academy, a private college-prep school, where he teaches second-year Calculus, Advanced Algebra, and a sequence of math electives including statistics, math modeling, and software development.&lt;br /&gt;
&lt;br /&gt;
He has extensively customized Moodle for the classroom environment with a couple dozen sets of patches (see [[Seattle_Academy]]), a handful of blocks, and 2 activity modules including one based on the theory of spaced repetition.  He is now also customizing Mediawiki to work well in the high school environment.&lt;/div&gt;</summary>
		<author><name>Ganderson</name></author>
	</entry>
	<entry>
		<id>https://docs.moodle.org/dev/index.php?title=Usability_testing_protocol&amp;diff=11198</id>
		<title>Usability testing protocol</title>
		<link rel="alternate" type="text/html" href="https://docs.moodle.org/dev/index.php?title=Usability_testing_protocol&amp;diff=11198"/>
		<updated>2008-09-21T20:55:10Z</updated>

		<summary type="html">&lt;p&gt;Ganderson: Helpful references&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;This page is in early development.&lt;br /&gt;
&lt;br /&gt;
This page describes the recommended end-user testing that new features should undergo before being added to Moodle.  The process is intended identify difficulties or confusion that targeted users might encounter and communicate that information during appropriate parts of the development cycle for the purpose of improving the end-user experience.&lt;br /&gt;
&lt;br /&gt;
=Testing Phases=&lt;br /&gt;
&lt;br /&gt;
==Developer questionnaire==&lt;br /&gt;
This will include items such:&lt;br /&gt;
&lt;br /&gt;
* who the targeted user is (Site administrator, power-user teacher, standard teacher, student, etc.)&lt;br /&gt;
* what end-user testing has the developer already undertaken, if any (and what was learned from this)&lt;br /&gt;
* what level of instruction or training is anticipated to use the feature, or whether the developer feels the feature&#039;s use is self-evident and intuitive&lt;br /&gt;
* what other interface is this feature similar to or was inspired by (either within Moodle or with another application)&lt;br /&gt;
* whether all features are included in the current form for the next anticipated release of the feature&lt;br /&gt;
&lt;br /&gt;
==Task list devised==&lt;br /&gt;
Tasks the developer wants the end user to try to perform should be listed.  There should also be the opportunity for additional tasks to be added by the end-user based on his or her perception of how the feature will be used.&lt;br /&gt;
&lt;br /&gt;
In some cases it may be best to use actual data in performing a task when appropriate to find issues that will happen in practice.  Coordination should be made with the subject being tested to make sure the environment and data are similar to what will be used in practice.&lt;br /&gt;
&lt;br /&gt;
==End-user test subjects identified==&lt;br /&gt;
&lt;br /&gt;
It should be recognized that there are diminishing returns to adding more testers in most cases.  The most significant results will be found with observations made by the first subject who is a typical end-user.  Still, when possible, users in different environments such as schools, distant learning courses, trainers, professors of large university classes, users with limited technical skills, etc. can add additional perspective and should be included if their use may be significantly different.&lt;br /&gt;
&lt;br /&gt;
==Testing transcript==&lt;br /&gt;
&lt;br /&gt;
Ideally the end user will be observed as she/he attempts to perform the items on the task list and notes should be taken of the process and difficulties.  The observer should try not to give assistance during the process, but when help is needed, notice should be made of what assistance was required.&lt;br /&gt;
&lt;br /&gt;
When an observer is not available, the end-user should describe the experience and steps and difficulties encountered in the testing process.&lt;br /&gt;
&lt;br /&gt;
==Summary and suggestions==&lt;br /&gt;
&lt;br /&gt;
Based on what happens during testing, a summary and set of recommendations should be constructed to be communicated to the developer.  It should include a recommendation as to what degree additional refinement and retesting is needed.  These reports need not be lengthy.  If a feature is well designed few if any recommendations are needed.  If it has many usability issues, that should be communicated with a few areas to be addressed first.&lt;br /&gt;
&lt;br /&gt;
==Collation==&lt;br /&gt;
&lt;br /&gt;
If multiple institutions did testing, a coordinator should collate the findings and give a quick summary of what were common themes and differences and give a summary recommendation.&lt;br /&gt;
&lt;br /&gt;
==Refinement and retesting==&lt;br /&gt;
&lt;br /&gt;
Based on the feedback received, the developer should make decisions on refining the feature to improve usability.  He or she should make some sort of response to the feedback and if changes made are significant the feature should be resubmitted for going through the retesting protocol.&lt;br /&gt;
&lt;br /&gt;
=Helpful references=&lt;br /&gt;
&lt;br /&gt;
==Web resources==&lt;br /&gt;
&lt;br /&gt;
* http://en.wikipedia.org/wiki/Usability_testing&lt;br /&gt;
&lt;br /&gt;
* http://fluidproject.org/&lt;br /&gt;
&lt;br /&gt;
* http://www.usability.gov/&lt;br /&gt;
&lt;br /&gt;
* http://www.utexas.edu/learn/usability/&lt;br /&gt;
&lt;br /&gt;
==Conferences==&lt;br /&gt;
&lt;br /&gt;
* http://www.uie.com/events/uiconf/2008/&lt;br /&gt;
&lt;br /&gt;
==Journals==&lt;br /&gt;
&lt;br /&gt;
* http://www.upassoc.org/upa_publications/jus/jus_home.html&lt;br /&gt;
&lt;br /&gt;
==Books==&lt;br /&gt;
&lt;br /&gt;
* Don&#039;t Make Me Think: A Common Sense Approach to Web Usability ISBN 0321344758&lt;br /&gt;
&lt;br /&gt;
* Designing Interfaces: Patterns for Effective Interaction Design ISBN 0596008031&lt;br /&gt;
&lt;br /&gt;
* Handbook of Usability Testing: ISBN 0470185481&lt;br /&gt;
&lt;br /&gt;
* Moderating Usability Tests: ISBN 0123739330&lt;br /&gt;
&lt;br /&gt;
* Measuring the User Experience: ISBN 0123735580&lt;/div&gt;</summary>
		<author><name>Ganderson</name></author>
	</entry>
	<entry>
		<id>https://docs.moodle.org/dev/index.php?title=Usability_testing_protocol&amp;diff=11197</id>
		<title>Usability testing protocol</title>
		<link rel="alternate" type="text/html" href="https://docs.moodle.org/dev/index.php?title=Usability_testing_protocol&amp;diff=11197"/>
		<updated>2008-09-21T14:20:20Z</updated>

		<summary type="html">&lt;p&gt;Ganderson: /* Helpful references */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;This page is in early development.&lt;br /&gt;
&lt;br /&gt;
This page describes the recommended end-user testing that new features should undergo before being added to Moodle.  The process is intended identify difficulties or confusion that targeted users might encounter and communicate that information during appropriate parts of the development cycle for the purpose of improving the end-user experience.&lt;br /&gt;
&lt;br /&gt;
=Testing Phases=&lt;br /&gt;
&lt;br /&gt;
==Developer questionnaire==&lt;br /&gt;
This will include items such:&lt;br /&gt;
&lt;br /&gt;
* who the targeted user is (Site administrator, power-user teacher, standard teacher, student, etc.)&lt;br /&gt;
* what end-user testing has the developer already undertaken, if any (and what was learned from this)&lt;br /&gt;
* what level of instruction or training is anticipated to use the feature, or whether the developer feels the feature&#039;s use is self-evident and intuitive&lt;br /&gt;
* what other interface is this feature similar to or was inspired by (either within Moodle or with another application)&lt;br /&gt;
* whether all features are included in the current form for the next anticipated release of the feature&lt;br /&gt;
&lt;br /&gt;
==Task list devised==&lt;br /&gt;
Tasks the developer wants the end user to try to perform should be listed.  There should also be the opportunity for additional tasks to be added by the end-user based on his or her perception of how the feature will be used.&lt;br /&gt;
&lt;br /&gt;
In some cases it may be best to use actual data in performing a task when appropriate to find issues that will happen in practice.  Coordination should be made with the subject being tested to make sure the environment and data are similar to what will be used in practice.&lt;br /&gt;
&lt;br /&gt;
==End-user test subjects identified==&lt;br /&gt;
&lt;br /&gt;
It should be recognized that there are diminishing returns to adding more testers in most cases.  The most significant results will be found with observations made by the first subject who is a typical end-user.  Still, when possible, users in different environments such as schools, distant learning courses, trainers, professors of large university classes, users with limited technical skills, etc. can add additional perspective and should be included if their use may be significantly different.&lt;br /&gt;
&lt;br /&gt;
==Testing transcript==&lt;br /&gt;
&lt;br /&gt;
Ideally the end user will be observed as she/he attempts to perform the items on the task list and notes should be taken of the process and difficulties.  The observer should try not to give assistance during the process, but when help is needed, notice should be made of what assistance was required.&lt;br /&gt;
&lt;br /&gt;
When an observer is not available, the end-user should describe the experience and steps and difficulties encountered in the testing process.&lt;br /&gt;
&lt;br /&gt;
==Summary and suggestions==&lt;br /&gt;
&lt;br /&gt;
Based on what happens during testing, a summary and set of recommendations should be constructed to be communicated to the developer.  It should include a recommendation as to what degree additional refinement and retesting is needed.  These reports need not be lengthy.  If a feature is well designed few if any recommendations are needed.  If it has many usability issues, that should be communicated with a few areas to be addressed first.&lt;br /&gt;
&lt;br /&gt;
==Collation==&lt;br /&gt;
&lt;br /&gt;
If multiple institutions did testing, a coordinator should collate the findings and give a quick summary of what were common themes and differences and give a summary recommendation.&lt;br /&gt;
&lt;br /&gt;
==Refinement and retesting==&lt;br /&gt;
&lt;br /&gt;
Based on the feedback received, the developer should make decisions on refining the feature to improve usability.  He or she should make some sort of response to the feedback and if changes made are significant the feature should be resubmitted for going through the retesting protocol.&lt;br /&gt;
&lt;br /&gt;
=Helpful references=&lt;br /&gt;
&lt;br /&gt;
* http://en.wikipedia.org/wiki/Usability_testing&lt;br /&gt;
&lt;br /&gt;
* http://fluidproject.org/&lt;br /&gt;
&lt;br /&gt;
* http://www.usability.gov/&lt;br /&gt;
&lt;br /&gt;
* http://www.utexas.edu/learn/usability/&lt;br /&gt;
&lt;br /&gt;
* http://www.uie.com/events/uiconf/2008/&lt;br /&gt;
&lt;br /&gt;
* Don&#039;t Make Me Think: A Common Sense Approach to Web Usability ISBN 0321344758&lt;br /&gt;
&lt;br /&gt;
* Designing Interfaces: Patterns for Effective Interaction Design ISBN 0596008031&lt;br /&gt;
&lt;br /&gt;
* Handbook of Usability Testing: ISBN 0470185481&lt;br /&gt;
&lt;br /&gt;
* Moderating Usability Tests: ISBN 0123739330&lt;br /&gt;
&lt;br /&gt;
* Measuring the User Experience: ISBN 0123735580&lt;/div&gt;</summary>
		<author><name>Ganderson</name></author>
	</entry>
	<entry>
		<id>https://docs.moodle.org/dev/index.php?title=Usability_testing_protocol&amp;diff=11196</id>
		<title>Usability testing protocol</title>
		<link rel="alternate" type="text/html" href="https://docs.moodle.org/dev/index.php?title=Usability_testing_protocol&amp;diff=11196"/>
		<updated>2008-09-21T09:06:40Z</updated>

		<summary type="html">&lt;p&gt;Ganderson: /* Helpful references */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;This page is in early development.&lt;br /&gt;
&lt;br /&gt;
This page describes the recommended end-user testing that new features should undergo before being added to Moodle.  The process is intended identify difficulties or confusion that targeted users might encounter and communicate that information during appropriate parts of the development cycle for the purpose of improving the end-user experience.&lt;br /&gt;
&lt;br /&gt;
=Testing Phases=&lt;br /&gt;
&lt;br /&gt;
==Developer questionnaire==&lt;br /&gt;
This will include items such:&lt;br /&gt;
&lt;br /&gt;
* who the targeted user is (Site administrator, power-user teacher, standard teacher, student, etc.)&lt;br /&gt;
* what end-user testing has the developer already undertaken, if any (and what was learned from this)&lt;br /&gt;
* what level of instruction or training is anticipated to use the feature, or whether the developer feels the feature&#039;s use is self-evident and intuitive&lt;br /&gt;
* what other interface is this feature similar to or was inspired by (either within Moodle or with another application)&lt;br /&gt;
* whether all features are included in the current form for the next anticipated release of the feature&lt;br /&gt;
&lt;br /&gt;
==Task list devised==&lt;br /&gt;
Tasks the developer wants the end user to try to perform should be listed.  There should also be the opportunity for additional tasks to be added by the end-user based on his or her perception of how the feature will be used.&lt;br /&gt;
&lt;br /&gt;
In some cases it may be best to use actual data in performing a task when appropriate to find issues that will happen in practice.  Coordination should be made with the subject being tested to make sure the environment and data are similar to what will be used in practice.&lt;br /&gt;
&lt;br /&gt;
==End-user test subjects identified==&lt;br /&gt;
&lt;br /&gt;
It should be recognized that there are diminishing returns to adding more testers in most cases.  The most significant results will be found with observations made by the first subject who is a typical end-user.  Still, when possible, users in different environments such as schools, distant learning courses, trainers, professors of large university classes, users with limited technical skills, etc. can add additional perspective and should be included if their use may be significantly different.&lt;br /&gt;
&lt;br /&gt;
==Testing transcript==&lt;br /&gt;
&lt;br /&gt;
Ideally the end user will be observed as she/he attempts to perform the items on the task list and notes should be taken of the process and difficulties.  The observer should try not to give assistance during the process, but when help is needed, notice should be made of what assistance was required.&lt;br /&gt;
&lt;br /&gt;
When an observer is not available, the end-user should describe the experience and steps and difficulties encountered in the testing process.&lt;br /&gt;
&lt;br /&gt;
==Summary and suggestions==&lt;br /&gt;
&lt;br /&gt;
Based on what happens during testing, a summary and set of recommendations should be constructed to be communicated to the developer.  It should include a recommendation as to what degree additional refinement and retesting is needed.  These reports need not be lengthy.  If a feature is well designed few if any recommendations are needed.  If it has many usability issues, that should be communicated with a few areas to be addressed first.&lt;br /&gt;
&lt;br /&gt;
==Collation==&lt;br /&gt;
&lt;br /&gt;
If multiple institutions did testing, a coordinator should collate the findings and give a quick summary of what were common themes and differences and give a summary recommendation.&lt;br /&gt;
&lt;br /&gt;
==Refinement and retesting==&lt;br /&gt;
&lt;br /&gt;
Based on the feedback received, the developer should make decisions on refining the feature to improve usability.  He or she should make some sort of response to the feedback and if changes made are significant the feature should be resubmitted for going through the retesting protocol.&lt;br /&gt;
&lt;br /&gt;
=Helpful references=&lt;br /&gt;
&lt;br /&gt;
* http://en.wikipedia.org/wiki/Usability_testing&lt;br /&gt;
&lt;br /&gt;
* http://fluidproject.org/&lt;br /&gt;
&lt;br /&gt;
* http://www.usability.gov/&lt;br /&gt;
&lt;br /&gt;
* Don&#039;t Make Me Think: A Common Sense Approach to Web Usability ISBN 0321344758&lt;br /&gt;
&lt;br /&gt;
* Designing Interfaces: Patterns for Effective Interaction Design ISBN 0596008031&lt;br /&gt;
&lt;br /&gt;
* Handbook of Usability Testing: ISBN 0470185481&lt;br /&gt;
&lt;br /&gt;
* Moderating Usability Tests: ISBN 0123739330&lt;br /&gt;
&lt;br /&gt;
* Measuring the User Experience: ISBN 0123735580&lt;/div&gt;</summary>
		<author><name>Ganderson</name></author>
	</entry>
	<entry>
		<id>https://docs.moodle.org/dev/index.php?title=Usability_testing_protocol&amp;diff=11195</id>
		<title>Usability testing protocol</title>
		<link rel="alternate" type="text/html" href="https://docs.moodle.org/dev/index.php?title=Usability_testing_protocol&amp;diff=11195"/>
		<updated>2008-09-20T16:09:06Z</updated>

		<summary type="html">&lt;p&gt;Ganderson: Helpful references list started&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;This page is in early development.&lt;br /&gt;
&lt;br /&gt;
This page describes the recommended end-user testing that new features should undergo before being added to Moodle.  The process is intended identify difficulties or confusion that targeted users might encounter and communicate that information during appropriate parts of the development cycle for the purpose of improving the end-user experience.&lt;br /&gt;
&lt;br /&gt;
=Testing Phases=&lt;br /&gt;
&lt;br /&gt;
==Developer questionnaire==&lt;br /&gt;
This will include items such:&lt;br /&gt;
&lt;br /&gt;
* who the targeted user is (Site administrator, power-user teacher, standard teacher, student, etc.)&lt;br /&gt;
* what end-user testing has the developer already undertaken, if any (and what was learned from this)&lt;br /&gt;
* what level of instruction or training is anticipated to use the feature, or whether the developer feels the feature&#039;s use is self-evident and intuitive&lt;br /&gt;
* what other interface is this feature similar to or was inspired by (either within Moodle or with another application)&lt;br /&gt;
* whether all features are included in the current form for the next anticipated release of the feature&lt;br /&gt;
&lt;br /&gt;
==Task list devised==&lt;br /&gt;
Tasks the developer wants the end user to try to perform should be listed.  There should also be the opportunity for additional tasks to be added by the end-user based on his or her perception of how the feature will be used.&lt;br /&gt;
&lt;br /&gt;
In some cases it may be best to use actual data in performing a task when appropriate to find issues that will happen in practice.  Coordination should be made with the subject being tested to make sure the environment and data are similar to what will be used in practice.&lt;br /&gt;
&lt;br /&gt;
==End-user test subjects identified==&lt;br /&gt;
&lt;br /&gt;
It should be recognized that there are diminishing returns to adding more testers in most cases.  The most significant results will be found with observations made by the first subject who is a typical end-user.  Still, when possible, users in different environments such as schools, distant learning courses, trainers, professors of large university classes, users with limited technical skills, etc. can add additional perspective and should be included if their use may be significantly different.&lt;br /&gt;
&lt;br /&gt;
==Testing transcript==&lt;br /&gt;
&lt;br /&gt;
Ideally the end user will be observed as she/he attempts to perform the items on the task list and notes should be taken of the process and difficulties.  The observer should try not to give assistance during the process, but when help is needed, notice should be made of what assistance was required.&lt;br /&gt;
&lt;br /&gt;
When an observer is not available, the end-user should describe the experience and steps and difficulties encountered in the testing process.&lt;br /&gt;
&lt;br /&gt;
==Summary and suggestions==&lt;br /&gt;
&lt;br /&gt;
Based on what happens during testing, a summary and set of recommendations should be constructed to be communicated to the developer.  It should include a recommendation as to what degree additional refinement and retesting is needed.  These reports need not be lengthy.  If a feature is well designed few if any recommendations are needed.  If it has many usability issues, that should be communicated with a few areas to be addressed first.&lt;br /&gt;
&lt;br /&gt;
==Collation==&lt;br /&gt;
&lt;br /&gt;
If multiple institutions did testing, a coordinator should collate the findings and give a quick summary of what were common themes and differences and give a summary recommendation.&lt;br /&gt;
&lt;br /&gt;
==Refinement and retesting==&lt;br /&gt;
&lt;br /&gt;
Based on the feedback received, the developer should make decisions on refining the feature to improve usability.  He or she should make some sort of response to the feedback and if changes made are significant the feature should be resubmitted for going through the retesting protocol.&lt;br /&gt;
&lt;br /&gt;
=Helpful references=&lt;br /&gt;
&lt;br /&gt;
* http://en.wikipedia.org/wiki/Usability_testing&lt;br /&gt;
&lt;br /&gt;
* http://fluidproject.org/&lt;br /&gt;
&lt;br /&gt;
* http://www.usability.gov/&lt;br /&gt;
&lt;br /&gt;
* Don&#039;t Make Me Think: A Common Sense Approach to Web Usability ISBN 0321344758&lt;br /&gt;
&lt;br /&gt;
* Designing Interfaces: Patterns for Effective Interaction Design ISBN 0596008031&lt;/div&gt;</summary>
		<author><name>Ganderson</name></author>
	</entry>
	<entry>
		<id>https://docs.moodle.org/dev/index.php?title=Usability_testing_protocol&amp;diff=11194</id>
		<title>Usability testing protocol</title>
		<link rel="alternate" type="text/html" href="https://docs.moodle.org/dev/index.php?title=Usability_testing_protocol&amp;diff=11194"/>
		<updated>2008-09-19T14:02:16Z</updated>

		<summary type="html">&lt;p&gt;Ganderson: Minor edits&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;This page is in early development.&lt;br /&gt;
&lt;br /&gt;
This page describes the recommended end-user testing that new features should undergo before being added to Moodle.  The process is intended identify difficulties or confusion that targeted users might encounter and communicate that information during appropriate parts of the development cycle for the purpose of improving the end-user experience.&lt;br /&gt;
&lt;br /&gt;
=Testing Phases=&lt;br /&gt;
&lt;br /&gt;
==Developer questionnaire==&lt;br /&gt;
This will include items such:&lt;br /&gt;
&lt;br /&gt;
* who the targeted user is (Site administrator, power-user teacher, standard teacher, student, etc.)&lt;br /&gt;
* what end-user testing has the developer already undertaken, if any (and what was learned from this)&lt;br /&gt;
* what level of instruction or training is anticipated to use the feature, or whether the developer feels the feature&#039;s use is self-evident and intuitive&lt;br /&gt;
* what other interface is this feature similar to or was inspired by (either within Moodle or with another application)&lt;br /&gt;
* whether all features are included in the current form for the next anticipated release of the feature&lt;br /&gt;
&lt;br /&gt;
==Task list devised==&lt;br /&gt;
Tasks the developer wants the end user to try to perform should be listed.  There should also be the opportunity for additional tasks to be added by the end-user based on his or her perception of how the feature will be used.&lt;br /&gt;
&lt;br /&gt;
In some cases it may be best to use actual data in performing a task when appropriate to find issues that will happen in practice.  Coordination should be made with the subject being tested to make sure the environment and data are similar to what will be used in practice.&lt;br /&gt;
&lt;br /&gt;
==End-user test subjects identified==&lt;br /&gt;
&lt;br /&gt;
It should be recognized that there are diminishing returns to adding more testers in most cases.  The most significant results will be found with observations made by the first subject who is a typical end-user.  Still, when possible, users in different environments such as schools, distant learning courses, trainers, professors of large university classes, users with limited technical skills, etc. can add additional perspective and should be included if their use may be significantly different.&lt;br /&gt;
&lt;br /&gt;
==Testing transcript==&lt;br /&gt;
&lt;br /&gt;
Ideally the end user will be observed as she/he attempts to perform the items on the task list and notes should be taken of the process and difficulties.  The observer should try not to give assistance during the process, but when help is needed, notice should be made of what assistance was required.&lt;br /&gt;
&lt;br /&gt;
When an observer is not available, the end-user should describe the experience and steps and difficulties encountered in the testing process.&lt;br /&gt;
&lt;br /&gt;
==Summary and suggestions==&lt;br /&gt;
&lt;br /&gt;
Based on what happens during testing, a summary and set of recommendations should be constructed to be communicated to the developer.  It should include a recommendation as to what degree additional refinement and retesting is needed.  These reports need not be lengthy.  If a feature is well designed few if any recommendations are needed.  If it has many usability issues, that should be communicated with a few areas to be addressed first.&lt;br /&gt;
&lt;br /&gt;
==Collation==&lt;br /&gt;
&lt;br /&gt;
If multiple institutions did testing, a coordinator should collate the findings and give a quick summary of what were common themes and differences and give a summary recommendation.&lt;br /&gt;
&lt;br /&gt;
==Refinement and retesting==&lt;br /&gt;
&lt;br /&gt;
Based on the feedback received, the developer should make decisions on refining the feature to improve usability.  He or she should make some sort of response to the feedback and if changes made are significant the feature should be resubmitted for going through the retesting protocol.&lt;/div&gt;</summary>
		<author><name>Ganderson</name></author>
	</entry>
	<entry>
		<id>https://docs.moodle.org/dev/index.php?title=Usability_testing_protocol&amp;diff=11193</id>
		<title>Usability testing protocol</title>
		<link rel="alternate" type="text/html" href="https://docs.moodle.org/dev/index.php?title=Usability_testing_protocol&amp;diff=11193"/>
		<updated>2008-09-19T10:52:43Z</updated>

		<summary type="html">&lt;p&gt;Ganderson: /* Refinement and retesting */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;This page is in early development.&lt;br /&gt;
&lt;br /&gt;
This page describes the recommended end-user testing that new features should undergo before being added to Moodle.  The process is intended identify difficulties or confusion that targeted users might encounter and communicate that information during appropriate parts of the development cycle for the purposes of improving the end-user experience.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
=Testing Phases=&lt;br /&gt;
&lt;br /&gt;
==Developer questionnaire==&lt;br /&gt;
This will include items such:&lt;br /&gt;
&lt;br /&gt;
* who the targeted user is (Site administrator, power-user teacher, standard teacher, student, etc.).&lt;br /&gt;
* what end-user testing has the developer already undertaken, if any (and what was learned from this)&lt;br /&gt;
* what level of instruction or training is anticipated to use the feature, or whether the developer feels the features use is self-evident and intuitive&lt;br /&gt;
* what other interface is this feature similar to or was inspired by (either within Moodle or with another application)&lt;br /&gt;
* whether all features are included in the current form for the next anticipated release of the feature&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
==Task list devised==&lt;br /&gt;
Tasks the developer wants the end user to try to perform.  There should also be the opportunity for additional tasks to be added by the end-user based on his or her perception of how the feature will be used.&lt;br /&gt;
&lt;br /&gt;
In some cases it may be best to use actual data in performing a task when appropriate to find issues that will happen in practice.&lt;br /&gt;
&lt;br /&gt;
==End-user test subjects identified==&lt;br /&gt;
&lt;br /&gt;
It should be recognized that there are diminishing returns to adding more testers in most cases.  The most significant results will be found with observations made by the first subject who is a typical end-user.  Still, when possible, users in different environments such as schools, distant learning courses, trainers, professors of large university classes, users with limited technical skills, etc. can add additional perspective.&lt;br /&gt;
&lt;br /&gt;
==Testing transcript==&lt;br /&gt;
&lt;br /&gt;
Ideally the end user will be observed as she/he attempts to perform the tasks on the task list and notes should be taken of the process and difficulties.  The observer should try not to give assistance during the process, but when it is needed, notice should be made of what assistance is needed.&lt;br /&gt;
&lt;br /&gt;
When an observer is not available, the end-user should describe the experience and steps and difficulties encountered in the testing process.&lt;br /&gt;
&lt;br /&gt;
==Summary and suggestions==&lt;br /&gt;
&lt;br /&gt;
Based on what happens during testing, a summary and set of recommendations should be constructed to be communicated to the developer.  It should include a recommendation of to what degree additional refinement and retesting is needed.  These reports need not be lengthy.  If a feature is well designed few if any recommendations are needed.  If it has many usability issues, that should be communicated with a few areas to be addressed first.&lt;br /&gt;
&lt;br /&gt;
==Collation==&lt;br /&gt;
&lt;br /&gt;
If multiple institutions did testing, a coordinator should collate the findings and give a quick summary of what were common themes and differences and give a summary recommendation.&lt;br /&gt;
&lt;br /&gt;
==Refinement and retesting==&lt;br /&gt;
&lt;br /&gt;
Based on the feedback received, the developer should make decisions on refining the feature to improve usability.  He or she should make some sort of response to the feedback and if changes made are significant the feature should be resubmitted for going through the retesting protocol.&lt;/div&gt;</summary>
		<author><name>Ganderson</name></author>
	</entry>
	<entry>
		<id>https://docs.moodle.org/dev/index.php?title=Usability_testing_protocol&amp;diff=11192</id>
		<title>Usability testing protocol</title>
		<link rel="alternate" type="text/html" href="https://docs.moodle.org/dev/index.php?title=Usability_testing_protocol&amp;diff=11192"/>
		<updated>2008-09-19T10:48:09Z</updated>

		<summary type="html">&lt;p&gt;Ganderson: Testing phases&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;This page is in early development.&lt;br /&gt;
&lt;br /&gt;
This page describes the recommended end-user testing that new features should undergo before being added to Moodle.  The process is intended identify difficulties or confusion that targeted users might encounter and communicate that information during appropriate parts of the development cycle for the purposes of improving the end-user experience.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
=Testing Phases=&lt;br /&gt;
&lt;br /&gt;
==Developer questionnaire==&lt;br /&gt;
This will include items such:&lt;br /&gt;
&lt;br /&gt;
* who the targeted user is (Site administrator, power-user teacher, standard teacher, student, etc.).&lt;br /&gt;
* what end-user testing has the developer already undertaken, if any (and what was learned from this)&lt;br /&gt;
* what level of instruction or training is anticipated to use the feature, or whether the developer feels the features use is self-evident and intuitive&lt;br /&gt;
* what other interface is this feature similar to or was inspired by (either within Moodle or with another application)&lt;br /&gt;
* whether all features are included in the current form for the next anticipated release of the feature&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
==Task list devised==&lt;br /&gt;
Tasks the developer wants the end user to try to perform.  There should also be the opportunity for additional tasks to be added by the end-user based on his or her perception of how the feature will be used.&lt;br /&gt;
&lt;br /&gt;
In some cases it may be best to use actual data in performing a task when appropriate to find issues that will happen in practice.&lt;br /&gt;
&lt;br /&gt;
==End-user test subjects identified==&lt;br /&gt;
&lt;br /&gt;
It should be recognized that there are diminishing returns to adding more testers in most cases.  The most significant results will be found with observations made by the first subject who is a typical end-user.  Still, when possible, users in different environments such as schools, distant learning courses, trainers, professors of large university classes, users with limited technical skills, etc. can add additional perspective.&lt;br /&gt;
&lt;br /&gt;
==Testing transcript==&lt;br /&gt;
&lt;br /&gt;
Ideally the end user will be observed as she/he attempts to perform the tasks on the task list and notes should be taken of the process and difficulties.  The observer should try not to give assistance during the process, but when it is needed, notice should be made of what assistance is needed.&lt;br /&gt;
&lt;br /&gt;
When an observer is not available, the end-user should describe the experience and steps and difficulties encountered in the testing process.&lt;br /&gt;
&lt;br /&gt;
==Summary and suggestions==&lt;br /&gt;
&lt;br /&gt;
Based on what happens during testing, a summary and set of recommendations should be constructed to be communicated to the developer.  It should include a recommendation of to what degree additional refinement and retesting is needed.  These reports need not be lengthy.  If a feature is well designed few if any recommendations are needed.  If it has many usability issues, that should be communicated with a few areas to be addressed first.&lt;br /&gt;
&lt;br /&gt;
==Collation==&lt;br /&gt;
&lt;br /&gt;
If multiple institutions did testing, a coordinator should collate the findings and give a quick summary of what were common themes and differences and give a summary recommendation.&lt;br /&gt;
&lt;br /&gt;
==Refinement and retesting==&lt;br /&gt;
&lt;br /&gt;
Based on the feedback received, the developer should make decisions on refining the feature to improve usability.  He or she should make some sort of response to the feedback and if changes made are significant.&lt;/div&gt;</summary>
		<author><name>Ganderson</name></author>
	</entry>
	<entry>
		<id>https://docs.moodle.org/dev/index.php?title=Usability_testing_protocol&amp;diff=11191</id>
		<title>Usability testing protocol</title>
		<link rel="alternate" type="text/html" href="https://docs.moodle.org/dev/index.php?title=Usability_testing_protocol&amp;diff=11191"/>
		<updated>2008-09-19T10:00:06Z</updated>

		<summary type="html">&lt;p&gt;Ganderson: Start of page&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;This page is in early development.&lt;br /&gt;
&lt;br /&gt;
This page describes the recommended end-user testing that new features should undergo before being added to Moodle.  The process is intended identify difficulties or confusion that targeted users might encounter and communicate that information during appropriate parts of the development cycle for the purposes of improving the end-user experience.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
...&lt;/div&gt;</summary>
		<author><name>Ganderson</name></author>
	</entry>
	<entry>
		<id>https://docs.moodle.org/dev/index.php?title=Patching_forms_tutorial&amp;diff=9535</id>
		<title>Patching forms tutorial</title>
		<link rel="alternate" type="text/html" href="https://docs.moodle.org/dev/index.php?title=Patching_forms_tutorial&amp;diff=9535"/>
		<updated>2008-06-18T18:51:10Z</updated>

		<summary type="html">&lt;p&gt;Ganderson: /* Changing the default course start date and duration */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;by Gary Anderson&lt;br /&gt;
&lt;br /&gt;
One of the easiest local modifications that an institution can make to customize their Moodle site is to make simple changes to the form elements that appear on pages.  This permits one to set different default values when creating new items, allows one to hide unused input elements to simplify the interface, and lets one identify certain more complicated elements as &amp;quot;advanced&amp;quot; so that features are still availale while simplifying the interface for most uses.&lt;br /&gt;
&lt;br /&gt;
This tutorial will demonstrate how to do such modifications.&lt;br /&gt;
&lt;br /&gt;
 &#039;&#039;&#039;Warning&#039;&#039;&#039;&lt;br /&gt;
 Making custom changes to the PHP scripting code in Moodle should be done carefully.&lt;br /&gt;
 You should always test your code before using it on your production site and should backup the  original scripts.&lt;br /&gt;
 You should always comment your code so you know what has been changed.&lt;br /&gt;
 Care should also be taken during upgrades in the code to make sure things are not broken  (like conflicts during a CVS update).&lt;br /&gt;
&lt;br /&gt;
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.&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;Moodle Forms Overview&#039;&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
Rather than placing HTML form elements directly on the page, most well-written Moodle code will use the Forms Library.  This allows a standard way to create user input elements and also centralizes code making it easier to override certain behaviors creating a greater consistency.&lt;br /&gt;
&lt;br /&gt;
An entire form is an &amp;quot;object&amp;quot; with methods and attributes.  In many places in the Moodle code, the instance of the object is identified my the variable $mform, but you can use any variable.&lt;br /&gt;
&lt;br /&gt;
Common methods of the form object look like:&lt;br /&gt;
&lt;br /&gt;
* $mform-&amp;gt;addelement(&amp;lt;elementtype&amp;gt;,&amp;lt;elementidentifier&amp;gt;,&amp;lt;displayname&amp;gt;,&amp;lt;options&amp;gt;);&lt;br /&gt;
&lt;br /&gt;
This creates a new input element on a page.&lt;br /&gt;
&lt;br /&gt;
While forms can be produced in any scripting page which outputs code, you will often find code for printing out forms in a file like mod_form.php or in index.php of the affected component.  The examine the URL of the page being viewed as a starting point for finding the file to be changed.&lt;br /&gt;
&lt;br /&gt;
Always comment your code so you can change or remove it later..  For single line modifications, considering putting in your new code, and then and it with //&amp;lt;yourusername&amp;gt; &amp;lt;date&amp;gt; &amp;lt;the old code&amp;gt;.  This allows for retention of eisting line numbers.&lt;br /&gt;
&lt;br /&gt;
==Changing defaults==&lt;br /&gt;
&lt;br /&gt;
The &#039;&#039;&#039;setDefault&#039;&#039;&#039; method is used to establish the initial value used in the form and allows you to to define the most common setting for use in your institution.&lt;br /&gt;
&lt;br /&gt;
Example:  Change the default number of points for a default assignment from 100 points to 10 points.&lt;br /&gt;
&lt;br /&gt;
Solution:&lt;br /&gt;
&lt;br /&gt;
In the file /mod/assignment/mod_form.php, find&lt;br /&gt;
&lt;br /&gt;
 $mform-&amp;gt;setDefault(&#039;grade&#039;, 100);&lt;br /&gt;
&lt;br /&gt;
Change the default to 10, and comment out the previous code with your initial and dates:&lt;br /&gt;
&lt;br /&gt;
 $mform-&amp;gt;setDefault(&#039;grade&#039;, 10); //GVA 20080608 $mform-&amp;gt;setDefault(&#039;grade&#039;, 100);&lt;br /&gt;
&lt;br /&gt;
==Hiding fields==&lt;br /&gt;
&lt;br /&gt;
Form elements are created for a page using the &#039;&#039;&#039;addElement&#039;&#039;&#039; method.  Various types of element are text, select, date_time_selector, htmleditor, etc.&lt;br /&gt;
&lt;br /&gt;
There is also the type &amp;quot;hidden&amp;quot; that defines the element on a page and allows you to set a default value, stores previous values from a submission etc.  To simplify your forms for you users, simply change the type of the field during when addElement is called to hidden.&lt;br /&gt;
&lt;br /&gt;
Example:  Your site does not want to use meta courses and you want to remove it from the course creation/edit page.  In the file /course/edit_form.php&lt;br /&gt;
&lt;br /&gt;
Change:&lt;br /&gt;
&lt;br /&gt;
 $mform-&amp;gt;addElement(&#039;select&#039;, &#039;metacourse&#039;, get_string(&#039;managemeta&#039;), $meta);&lt;br /&gt;
&lt;br /&gt;
to&lt;br /&gt;
&lt;br /&gt;
 $mform-&amp;gt;addElement(&#039;hidden&#039;, &#039;metacourse&#039;, get_string(&#039;managemeta&#039;), $meta); //GVA 20080610 $mform-&amp;gt;addElement(&#039;select&#039;, &#039;metacourse&#039;, get_string(&#039;managemeta&#039;), $meta);&lt;br /&gt;
&lt;br /&gt;
==Setting fields to &amp;quot;Advanced&amp;quot;==&lt;br /&gt;
&lt;br /&gt;
For elements that are infrequently used in your institution, you can still simplify the interface while making options still available to your &#039;Power Users&#039; by marking elements as &amp;quot;advanced&amp;quot;.&lt;br /&gt;
&lt;br /&gt;
These elements only appear to the user when the click the &amp;quot;Set Advanced&amp;quot; button.&lt;br /&gt;
&lt;br /&gt;
To identify the element as advanced, call the &#039;&#039;&#039;setAdvanced&#039;&#039;&#039; method after the element has been created.&lt;br /&gt;
&lt;br /&gt;
Example:&lt;br /&gt;
&lt;br /&gt;
Your typical user is local and hence it will be rare that they will use a different time zone.  To clean up the interface, set the option to change the user time zone so that it is shown only when the user clicks &amp;quot;Set Advanced&amp;quot;.&lt;br /&gt;
&lt;br /&gt;
Solution:&lt;br /&gt;
&lt;br /&gt;
In the file /user/editlib.php, find:&lt;br /&gt;
&lt;br /&gt;
  $mform-&amp;gt;addElement(&#039;select&#039;, &#039;timezone&#039;, get_string(&#039;timezone&#039;), $choices);&lt;br /&gt;
&lt;br /&gt;
Set the field to advanced using the setAdvanced method&lt;br /&gt;
&lt;br /&gt;
  $mform-&amp;gt;addElement(&#039;select&#039;, &#039;timezone&#039;, get_string(&#039;timezone&#039;), $choices);&lt;br /&gt;
  $mform-&amp;gt;setAdvanced(&#039;timezone&#039;);&lt;br /&gt;
&lt;br /&gt;
==Other Examples==&lt;br /&gt;
Here are some other example of making simple changes to forms&lt;br /&gt;
===Change the maximum allowed grade===&lt;br /&gt;
The maximum grade for a module is set in the standard form to 100.  To change this to a different value (such as 200) in version 1.9, make this change in the file &#039;&#039;&#039;/lib/form/modgrade.php&#039;&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
Find: &lt;br /&gt;
&lt;br /&gt;
 for ($i=100; $i&amp;gt;=1; $i--) {&lt;br /&gt;
&lt;br /&gt;
Change to:&lt;br /&gt;
&lt;br /&gt;
 for ($i=200; $i&amp;gt;=1; $i--) { // GVA 20080616 for ($i=100; $i&amp;gt;=1; $i--) {&lt;br /&gt;
&lt;br /&gt;
===Set a standard start date and number of weeks for courses===&lt;br /&gt;
&lt;br /&gt;
By default, Moodle starts courses on the day following course creation and gives them a duration of 10 weeks.  As many institutions have standard terms, setting the default start date and duration will allow for more uniformity, fewer mistakes, and will ease course creation.&lt;br /&gt;
&lt;br /&gt;
In version 1.9, edit the file &#039;&#039;&#039;/course/edit_form.php&#039;&#039;&#039;.  Insert the following lines after the affected fields are defined (perhaps on lines just before $this-&amp;gt;add_action_buttons();)&lt;br /&gt;
&lt;br /&gt;
 //GVA 20080618 Number of weeks for default course.  Should go through final exam&lt;br /&gt;
 $mform-&amp;gt;setDefault(&#039;numsections&#039;, 13);&lt;br /&gt;
 //GVA 20080618 Set default course start date.  Always start on a Monday to have weeks work right&lt;br /&gt;
 $mform-&amp;gt;setDefault(&#039;startdate&#039;, strtotime(&amp;quot;1 Sep 2008&amp;quot;));&lt;/div&gt;</summary>
		<author><name>Ganderson</name></author>
	</entry>
	<entry>
		<id>https://docs.moodle.org/dev/index.php?title=Patching_forms_tutorial&amp;diff=9534</id>
		<title>Patching forms tutorial</title>
		<link rel="alternate" type="text/html" href="https://docs.moodle.org/dev/index.php?title=Patching_forms_tutorial&amp;diff=9534"/>
		<updated>2008-06-16T21:34:38Z</updated>

		<summary type="html">&lt;p&gt;Ganderson: /* Change the maximum allowed grade  to, for example, 200*/&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;by Gary Anderson&lt;br /&gt;
&lt;br /&gt;
One of the easiest local modifications that an institution can make to customize their Moodle site is to make simple changes to the form elements that appear on pages.  This permits one to set different default values when creating new items, allows one to hide unused input elements to simplify the interface, and lets one identify certain more complicated elements as &amp;quot;advanced&amp;quot; so that features are still availale while simplifying the interface for most uses.&lt;br /&gt;
&lt;br /&gt;
This tutorial will demonstrate how to do such modifications.&lt;br /&gt;
&lt;br /&gt;
 &#039;&#039;&#039;Warning&#039;&#039;&#039;&lt;br /&gt;
 Making custom changes to the PHP scripting code in Moodle should be done carefully.&lt;br /&gt;
 You should always test your code before using it on your production site and should backup the  original scripts.&lt;br /&gt;
 You should always comment your code so you know what has been changed.&lt;br /&gt;
 Care should also be taken during upgrades in the code to make sure things are not broken  (like conflicts during a CVS update).&lt;br /&gt;
&lt;br /&gt;
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.&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;Moodle Forms Overview&#039;&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
Rather than placing HTML form elements directly on the page, most well-written Moodle code will use the Forms Library.  This allows a standard way to create user input elements and also centralizes code making it easier to override certain behaviors creating a greater consistency.&lt;br /&gt;
&lt;br /&gt;
An entire form is an &amp;quot;object&amp;quot; with methods and attributes.  In many places in the Moodle code, the instance of the object is identified my the variable $mform, but you can use any variable.&lt;br /&gt;
&lt;br /&gt;
Common methods of the form object look like:&lt;br /&gt;
&lt;br /&gt;
* $mform-&amp;gt;addelement(&amp;lt;elementtype&amp;gt;,&amp;lt;elementidentifier&amp;gt;,&amp;lt;displayname&amp;gt;,&amp;lt;options&amp;gt;);&lt;br /&gt;
&lt;br /&gt;
This creates a new input element on a page.&lt;br /&gt;
&lt;br /&gt;
While forms can be produced in any scripting page which outputs code, you will often find code for printing out forms in a file like mod_form.php or in index.php of the affected component.  The examine the URL of the page being viewed as a starting point for finding the file to be changed.&lt;br /&gt;
&lt;br /&gt;
Always comment your code so you can change or remove it later..  For single line modifications, considering putting in your new code, and then and it with //&amp;lt;yourusername&amp;gt; &amp;lt;date&amp;gt; &amp;lt;the old code&amp;gt;.  This allows for retention of eisting line numbers.&lt;br /&gt;
&lt;br /&gt;
==Changing defaults==&lt;br /&gt;
&lt;br /&gt;
The &#039;&#039;&#039;setDefault&#039;&#039;&#039; method is used to establish the initial value used in the form and allows you to to define the most common setting for use in your institution.&lt;br /&gt;
&lt;br /&gt;
Example:  Change the default number of points for a default assignment from 100 points to 10 points.&lt;br /&gt;
&lt;br /&gt;
Solution:&lt;br /&gt;
&lt;br /&gt;
In the file /mod/assignment/mod_form.php, find&lt;br /&gt;
&lt;br /&gt;
 $mform-&amp;gt;setDefault(&#039;grade&#039;, 100);&lt;br /&gt;
&lt;br /&gt;
Change the default to 10, and comment out the previous code with your initial and dates:&lt;br /&gt;
&lt;br /&gt;
 $mform-&amp;gt;setDefault(&#039;grade&#039;, 10); //GVA 20080608 $mform-&amp;gt;setDefault(&#039;grade&#039;, 100);&lt;br /&gt;
&lt;br /&gt;
==Hiding fields==&lt;br /&gt;
&lt;br /&gt;
Form elements are created for a page using the &#039;&#039;&#039;addElement&#039;&#039;&#039; method.  Various types of element are text, select, date_time_selector, htmleditor, etc.&lt;br /&gt;
&lt;br /&gt;
There is also the type &amp;quot;hidden&amp;quot; that defines the element on a page and allows you to set a default value, stores previous values from a submission etc.  To simplify your forms for you users, simply change the type of the field during when addElement is called to hidden.&lt;br /&gt;
&lt;br /&gt;
Example:  Your site does not want to use meta courses and you want to remove it from the course creation/edit page.  In the file /course/edit_form.php&lt;br /&gt;
&lt;br /&gt;
Change:&lt;br /&gt;
&lt;br /&gt;
 $mform-&amp;gt;addElement(&#039;select&#039;, &#039;metacourse&#039;, get_string(&#039;managemeta&#039;), $meta);&lt;br /&gt;
&lt;br /&gt;
to&lt;br /&gt;
&lt;br /&gt;
 $mform-&amp;gt;addElement(&#039;hidden&#039;, &#039;metacourse&#039;, get_string(&#039;managemeta&#039;), $meta); //GVA 20080610 $mform-&amp;gt;addElement(&#039;select&#039;, &#039;metacourse&#039;, get_string(&#039;managemeta&#039;), $meta);&lt;br /&gt;
&lt;br /&gt;
==Setting fields to &amp;quot;Advanced&amp;quot;==&lt;br /&gt;
&lt;br /&gt;
For elements that are infrequently used in your institution, you can still simplify the interface while making options still available to your &#039;Power Users&#039; by marking elements as &amp;quot;advanced&amp;quot;.&lt;br /&gt;
&lt;br /&gt;
These elements only appear to the user when the click the &amp;quot;Set Advanced&amp;quot; button.&lt;br /&gt;
&lt;br /&gt;
To identify the element as advanced, call the &#039;&#039;&#039;setAdvanced&#039;&#039;&#039; method after the element has been created.&lt;br /&gt;
&lt;br /&gt;
Example:&lt;br /&gt;
&lt;br /&gt;
Your typical user is local and hence it will be rare that they will use a different time zone.  To clean up the interface, set the option to change the user time zone so that it is shown only when the user clicks &amp;quot;Set Advanced&amp;quot;.&lt;br /&gt;
&lt;br /&gt;
Solution:&lt;br /&gt;
&lt;br /&gt;
In the file /user/editlib.php, find:&lt;br /&gt;
&lt;br /&gt;
  $mform-&amp;gt;addElement(&#039;select&#039;, &#039;timezone&#039;, get_string(&#039;timezone&#039;), $choices);&lt;br /&gt;
&lt;br /&gt;
Set the field to advanced using the setAdvanced method&lt;br /&gt;
&lt;br /&gt;
  $mform-&amp;gt;addElement(&#039;select&#039;, &#039;timezone&#039;, get_string(&#039;timezone&#039;), $choices);&lt;br /&gt;
  $mform-&amp;gt;setAdvanced(&#039;timezone&#039;);&lt;br /&gt;
&lt;br /&gt;
==Other Examples==&lt;br /&gt;
Here are some other example of making simple changes to forms&lt;br /&gt;
===Change the maximum allowed grade===&lt;br /&gt;
The maximum grade for a module is set in the standard form to 100.  To change this to a different value (such as 200) in version 1.9, make this change in the file /lib/form/modgrade.php&lt;br /&gt;
&lt;br /&gt;
Find: &lt;br /&gt;
&lt;br /&gt;
 for ($i=100; $i&amp;gt;=1; $i--) {&lt;br /&gt;
&lt;br /&gt;
Change to:&lt;br /&gt;
&lt;br /&gt;
 for ($i=200; $i&amp;gt;=1; $i--) { // GVA 20080616 for ($i=100; $i&amp;gt;=1; $i--) {&lt;/div&gt;</summary>
		<author><name>Ganderson</name></author>
	</entry>
	<entry>
		<id>https://docs.moodle.org/dev/index.php?title=Patching_forms_tutorial&amp;diff=9533</id>
		<title>Patching forms tutorial</title>
		<link rel="alternate" type="text/html" href="https://docs.moodle.org/dev/index.php?title=Patching_forms_tutorial&amp;diff=9533"/>
		<updated>2008-06-16T21:31:03Z</updated>

		<summary type="html">&lt;p&gt;Ganderson: Change maximum grade&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;by Gary Anderson&lt;br /&gt;
&lt;br /&gt;
One of the easiest local modifications that an institution can make to customize their Moodle site is to make simple changes to the form elements that appear on pages.  This permits one to set different default values when creating new items, allows one to hide unused input elements to simplify the interface, and lets one identify certain more complicated elements as &amp;quot;advanced&amp;quot; so that features are still availale while simplifying the interface for most uses.&lt;br /&gt;
&lt;br /&gt;
This tutorial will demonstrate how to do such modifications.&lt;br /&gt;
&lt;br /&gt;
 &#039;&#039;&#039;Warning&#039;&#039;&#039;&lt;br /&gt;
 Making custom changes to the PHP scripting code in Moodle should be done carefully.&lt;br /&gt;
 You should always test your code before using it on your production site and should backup the  original scripts.&lt;br /&gt;
 You should always comment your code so you know what has been changed.&lt;br /&gt;
 Care should also be taken during upgrades in the code to make sure things are not broken  (like conflicts during a CVS update).&lt;br /&gt;
&lt;br /&gt;
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.&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;Moodle Forms Overview&#039;&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
Rather than placing HTML form elements directly on the page, most well-written Moodle code will use the Forms Library.  This allows a standard way to create user input elements and also centralizes code making it easier to override certain behaviors creating a greater consistency.&lt;br /&gt;
&lt;br /&gt;
An entire form is an &amp;quot;object&amp;quot; with methods and attributes.  In many places in the Moodle code, the instance of the object is identified my the variable $mform, but you can use any variable.&lt;br /&gt;
&lt;br /&gt;
Common methods of the form object look like:&lt;br /&gt;
&lt;br /&gt;
* $mform-&amp;gt;addelement(&amp;lt;elementtype&amp;gt;,&amp;lt;elementidentifier&amp;gt;,&amp;lt;displayname&amp;gt;,&amp;lt;options&amp;gt;);&lt;br /&gt;
&lt;br /&gt;
This creates a new input element on a page.&lt;br /&gt;
&lt;br /&gt;
While forms can be produced in any scripting page which outputs code, you will often find code for printing out forms in a file like mod_form.php or in index.php of the affected component.  The examine the URL of the page being viewed as a starting point for finding the file to be changed.&lt;br /&gt;
&lt;br /&gt;
Always comment your code so you can change or remove it later..  For single line modifications, considering putting in your new code, and then and it with //&amp;lt;yourusername&amp;gt; &amp;lt;date&amp;gt; &amp;lt;the old code&amp;gt;.  This allows for retention of eisting line numbers.&lt;br /&gt;
&lt;br /&gt;
==Changing defaults==&lt;br /&gt;
&lt;br /&gt;
The &#039;&#039;&#039;setDefault&#039;&#039;&#039; method is used to establish the initial value used in the form and allows you to to define the most common setting for use in your institution.&lt;br /&gt;
&lt;br /&gt;
Example:  Change the default number of points for a default assignment from 100 points to 10 points.&lt;br /&gt;
&lt;br /&gt;
Solution:&lt;br /&gt;
&lt;br /&gt;
In the file /mod/assignment/mod_form.php, find&lt;br /&gt;
&lt;br /&gt;
 $mform-&amp;gt;setDefault(&#039;grade&#039;, 100);&lt;br /&gt;
&lt;br /&gt;
Change the default to 10, and comment out the previous code with your initial and dates:&lt;br /&gt;
&lt;br /&gt;
 $mform-&amp;gt;setDefault(&#039;grade&#039;, 10); //GVA 20080608 $mform-&amp;gt;setDefault(&#039;grade&#039;, 100);&lt;br /&gt;
&lt;br /&gt;
==Hiding fields==&lt;br /&gt;
&lt;br /&gt;
Form elements are created for a page using the &#039;&#039;&#039;addElement&#039;&#039;&#039; method.  Various types of element are text, select, date_time_selector, htmleditor, etc.&lt;br /&gt;
&lt;br /&gt;
There is also the type &amp;quot;hidden&amp;quot; that defines the element on a page and allows you to set a default value, stores previous values from a submission etc.  To simplify your forms for you users, simply change the type of the field during when addElement is called to hidden.&lt;br /&gt;
&lt;br /&gt;
Example:  Your site does not want to use meta courses and you want to remove it from the course creation/edit page.  In the file /course/edit_form.php&lt;br /&gt;
&lt;br /&gt;
Change:&lt;br /&gt;
&lt;br /&gt;
 $mform-&amp;gt;addElement(&#039;select&#039;, &#039;metacourse&#039;, get_string(&#039;managemeta&#039;), $meta);&lt;br /&gt;
&lt;br /&gt;
to&lt;br /&gt;
&lt;br /&gt;
 $mform-&amp;gt;addElement(&#039;hidden&#039;, &#039;metacourse&#039;, get_string(&#039;managemeta&#039;), $meta); //GVA 20080610 $mform-&amp;gt;addElement(&#039;select&#039;, &#039;metacourse&#039;, get_string(&#039;managemeta&#039;), $meta);&lt;br /&gt;
&lt;br /&gt;
==Setting fields to &amp;quot;Advanced&amp;quot;==&lt;br /&gt;
&lt;br /&gt;
For elements that are infrequently used in your institution, you can still simplify the interface while making options still available to your &#039;Power Users&#039; by marking elements as &amp;quot;advanced&amp;quot;.&lt;br /&gt;
&lt;br /&gt;
These elements only appear to the user when the click the &amp;quot;Set Advanced&amp;quot; button.&lt;br /&gt;
&lt;br /&gt;
To identify the element as advanced, call the &#039;&#039;&#039;setAdvanced&#039;&#039;&#039; method after the element has been created.&lt;br /&gt;
&lt;br /&gt;
Example:&lt;br /&gt;
&lt;br /&gt;
Your typical user is local and hence it will be rare that they will use a different time zone.  To clean up the interface, set the option to change the user time zone so that it is shown only when the user clicks &amp;quot;Set Advanced&amp;quot;.&lt;br /&gt;
&lt;br /&gt;
Solution:&lt;br /&gt;
&lt;br /&gt;
In the file /user/editlib.php, find:&lt;br /&gt;
&lt;br /&gt;
  $mform-&amp;gt;addElement(&#039;select&#039;, &#039;timezone&#039;, get_string(&#039;timezone&#039;), $choices);&lt;br /&gt;
&lt;br /&gt;
Set the field to advanced using the setAdvanced method&lt;br /&gt;
&lt;br /&gt;
  $mform-&amp;gt;addElement(&#039;select&#039;, &#039;timezone&#039;, get_string(&#039;timezone&#039;), $choices);&lt;br /&gt;
  $mform-&amp;gt;setAdvanced(&#039;timezone&#039;);&lt;br /&gt;
&lt;br /&gt;
==Other Examples==&lt;br /&gt;
Here are some other example of making simple changes to forms&lt;br /&gt;
===Change the maximum allowed grade===&lt;br /&gt;
The maximum grade for a module is set in the standard form to 100.  To change this to a different value, change it in the file /lib/form/modgrade.php&lt;br /&gt;
&lt;br /&gt;
Find: &lt;br /&gt;
&lt;br /&gt;
 for ($i=100; $i&amp;gt;=1; $i--) {&lt;br /&gt;
&lt;br /&gt;
Change to:&lt;br /&gt;
&lt;br /&gt;
 for ($i=100; $i&amp;gt;=1; $i--) { // GVA 20080616 for ($i=100; $i&amp;gt;=1; $i--) {&lt;/div&gt;</summary>
		<author><name>Ganderson</name></author>
	</entry>
	<entry>
		<id>https://docs.moodle.org/dev/index.php?title=Patching_forms_tutorial&amp;diff=9532</id>
		<title>Patching forms tutorial</title>
		<link rel="alternate" type="text/html" href="https://docs.moodle.org/dev/index.php?title=Patching_forms_tutorial&amp;diff=9532"/>
		<updated>2008-06-10T09:06:20Z</updated>

		<summary type="html">&lt;p&gt;Ganderson: /* Setting fields to &amp;quot;Advanced&amp;quot; */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;by Gary Anderson&lt;br /&gt;
&lt;br /&gt;
One of the easiest local modifications that an institution can make to customize their Moodle site is to make simple changes to the form elements that appear on pages.  This permits one to set different default values when creating new items, allows one to hide unused input elements to simplify the interface, and lets one identify certain more complicated elements as &amp;quot;advanced&amp;quot; so that features are still availale while simplifying the interface for most uses.&lt;br /&gt;
&lt;br /&gt;
This tutorial will demonstrate how to do such modifications.&lt;br /&gt;
&lt;br /&gt;
===Warning===&lt;br /&gt;
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.  Care should also be taken during upgrades in the code to make sure things are not broken (like conflicts during a CVS update).&lt;br /&gt;
&lt;br /&gt;
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.&lt;br /&gt;
&lt;br /&gt;
===Moodle Forms Overview===&lt;br /&gt;
&lt;br /&gt;
Rather than placing HTML form elements directly on the page, most well-written Moodle code will use the Forms Library.  This allows a standard way to create user input elements and also centralizes code making it easier to override certain behaviors creating a greater consistency.&lt;br /&gt;
&lt;br /&gt;
An entire form is an &amp;quot;object&amp;quot; with methods and attributes.  In many places in the Moodle code, the instance of the object is identified my the variable $mform, but you can use any variable.&lt;br /&gt;
&lt;br /&gt;
Common methods of the form object look like:&lt;br /&gt;
&lt;br /&gt;
* $mform-&amp;gt;addelement(&amp;lt;elementtype&amp;gt;,&amp;lt;elementidentifier&amp;gt;,&amp;lt;displayname&amp;gt;,&amp;lt;options&amp;gt;);&lt;br /&gt;
&lt;br /&gt;
This creates a new input element on a page.&lt;br /&gt;
&lt;br /&gt;
While forms can be produced in any scripting page which outputs code, you will often find code for printing out forms in a file like mod_form.php or in index.php of the affected component.  The examine the URL of the page being viewed as a starting point for finding the file to be changed.&lt;br /&gt;
&lt;br /&gt;
Always comment your code so you can change or remove it later..  For single line modifications, considering putting in your new code, and then and it with //&amp;lt;yourusername&amp;gt; &amp;lt;date&amp;gt; &amp;lt;the old code&amp;gt;.  This allows for retention of eisting line numbers.&lt;br /&gt;
&lt;br /&gt;
==Changing defaults==&lt;br /&gt;
&lt;br /&gt;
The &#039;&#039;&#039;setDefault&#039;&#039;&#039; method is used to establish the initial value used in the form and allows you to to define the most common setting for use in your institution.&lt;br /&gt;
&lt;br /&gt;
Example:  Change the default number of points for a default assignment from 100 points to 10 points.&lt;br /&gt;
&lt;br /&gt;
Solution:&lt;br /&gt;
&lt;br /&gt;
In the file /mod/assignment/mod_form.php, find&lt;br /&gt;
&lt;br /&gt;
 $mform-&amp;gt;setDefault(&#039;grade&#039;, 100);&lt;br /&gt;
&lt;br /&gt;
Change the default to 10, and comment out the previous code with your initial and dates:&lt;br /&gt;
&lt;br /&gt;
 $mform-&amp;gt;setDefault(&#039;grade&#039;, 10); //GVA 20080608 $mform-&amp;gt;setDefault(&#039;grade&#039;, 100);&lt;br /&gt;
&lt;br /&gt;
==Hiding fields==&lt;br /&gt;
&lt;br /&gt;
Form elements are created for a page using the &#039;&#039;&#039;addElement&#039;&#039;&#039; method.  Various types of element are text, select, date_time_selector, htmleditor, etc.&lt;br /&gt;
&lt;br /&gt;
There is also the type &amp;quot;hidden&amp;quot; that defines the element on a page and allows you to set a default value, stores previous values from a submission etc.  To simplify your forms for you users, simply change the type of the field during when addElement is called to hidden.&lt;br /&gt;
&lt;br /&gt;
Example:  Your site does not want to use meta courses and you want to remove it from the course creation/edit page.  In the file /course/edit_form.php&lt;br /&gt;
&lt;br /&gt;
Change:&lt;br /&gt;
&lt;br /&gt;
 $mform-&amp;gt;addElement(&#039;select&#039;, &#039;metacourse&#039;, get_string(&#039;managemeta&#039;), $meta);&lt;br /&gt;
&lt;br /&gt;
to&lt;br /&gt;
&lt;br /&gt;
 $mform-&amp;gt;addElement(&#039;hidden&#039;, &#039;metacourse&#039;, get_string(&#039;managemeta&#039;), $meta); //GVA 20080610 $mform-&amp;gt;addElement(&#039;select&#039;, &#039;metacourse&#039;, get_string(&#039;managemeta&#039;), $meta);&lt;br /&gt;
&lt;br /&gt;
==Setting fields to &amp;quot;Advanced&amp;quot;==&lt;br /&gt;
&lt;br /&gt;
For elements that are infrequently used in your institution, you can still simplify the interface while making options still available to your &#039;Power Users&#039; by marking elements as &amp;quot;advanced&amp;quot;.&lt;br /&gt;
&lt;br /&gt;
These elements only appear to the user when the click the &amp;quot;Set Advanced&amp;quot; button.&lt;br /&gt;
&lt;br /&gt;
To identify the element as advanced, call the &#039;&#039;&#039;setAdvanced&#039;&#039;&#039; method after the element has been created.&lt;br /&gt;
&lt;br /&gt;
Example:&lt;br /&gt;
&lt;br /&gt;
Your typical user is local and hence it will be rare that they will use a different time zone.  To clean up the interface, set the option to change the user time zone so that it is shown only when the user clicks &amp;quot;Set Advanced&amp;quot;.&lt;br /&gt;
&lt;br /&gt;
Solution:&lt;br /&gt;
&lt;br /&gt;
In the file /user/editlib.php, find:&lt;br /&gt;
&lt;br /&gt;
  $mform-&amp;gt;addElement(&#039;select&#039;, &#039;timezone&#039;, get_string(&#039;timezone&#039;), $choices);&lt;br /&gt;
&lt;br /&gt;
Set the field to advanced using the setAdvanced method&lt;br /&gt;
&lt;br /&gt;
  $mform-&amp;gt;addElement(&#039;select&#039;, &#039;timezone&#039;, get_string(&#039;timezone&#039;), $choices);&lt;br /&gt;
  $mform-&amp;gt;setAdvanced(&#039;timezone&#039;);&lt;/div&gt;</summary>
		<author><name>Ganderson</name></author>
	</entry>
	<entry>
		<id>https://docs.moodle.org/dev/index.php?title=Patching_forms_tutorial&amp;diff=9531</id>
		<title>Patching forms tutorial</title>
		<link rel="alternate" type="text/html" href="https://docs.moodle.org/dev/index.php?title=Patching_forms_tutorial&amp;diff=9531"/>
		<updated>2008-06-10T08:32:36Z</updated>

		<summary type="html">&lt;p&gt;Ganderson: /* Hiding fields */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;by Gary Anderson&lt;br /&gt;
&lt;br /&gt;
One of the easiest local modifications that an institution can make to customize their Moodle site is to make simple changes to the form elements that appear on pages.  This permits one to set different default values when creating new items, allows one to hide unused input elements to simplify the interface, and lets one identify certain more complicated elements as &amp;quot;advanced&amp;quot; so that features are still availale while simplifying the interface for most uses.&lt;br /&gt;
&lt;br /&gt;
This tutorial will demonstrate how to do such modifications.&lt;br /&gt;
&lt;br /&gt;
===Warning===&lt;br /&gt;
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.  Care should also be taken during upgrades in the code to make sure things are not broken (like conflicts during a CVS update).&lt;br /&gt;
&lt;br /&gt;
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.&lt;br /&gt;
&lt;br /&gt;
===Moodle Forms Overview===&lt;br /&gt;
&lt;br /&gt;
Rather than placing HTML form elements directly on the page, most well-written Moodle code will use the Forms Library.  This allows a standard way to create user input elements and also centralizes code making it easier to override certain behaviors creating a greater consistency.&lt;br /&gt;
&lt;br /&gt;
An entire form is an &amp;quot;object&amp;quot; with methods and attributes.  In many places in the Moodle code, the instance of the object is identified my the variable $mform, but you can use any variable.&lt;br /&gt;
&lt;br /&gt;
Common methods of the form object look like:&lt;br /&gt;
&lt;br /&gt;
* $mform-&amp;gt;addelement(&amp;lt;elementtype&amp;gt;,&amp;lt;elementidentifier&amp;gt;,&amp;lt;displayname&amp;gt;,&amp;lt;options&amp;gt;);&lt;br /&gt;
&lt;br /&gt;
This creates a new input element on a page.&lt;br /&gt;
&lt;br /&gt;
While forms can be produced in any scripting page which outputs code, you will often find code for printing out forms in a file like mod_form.php or in index.php of the affected component.  The examine the URL of the page being viewed as a starting point for finding the file to be changed.&lt;br /&gt;
&lt;br /&gt;
Always comment your code so you can change or remove it later..  For single line modifications, considering putting in your new code, and then and it with //&amp;lt;yourusername&amp;gt; &amp;lt;date&amp;gt; &amp;lt;the old code&amp;gt;.  This allows for retention of eisting line numbers.&lt;br /&gt;
&lt;br /&gt;
==Changing defaults==&lt;br /&gt;
&lt;br /&gt;
The &#039;&#039;&#039;setDefault&#039;&#039;&#039; method is used to establish the initial value used in the form and allows you to to define the most common setting for use in your institution.&lt;br /&gt;
&lt;br /&gt;
Example:  Change the default number of points for a default assignment from 100 points to 10 points.&lt;br /&gt;
&lt;br /&gt;
Solution:&lt;br /&gt;
&lt;br /&gt;
In the file /mod/assignment/mod_form.php, find&lt;br /&gt;
&lt;br /&gt;
 $mform-&amp;gt;setDefault(&#039;grade&#039;, 100);&lt;br /&gt;
&lt;br /&gt;
Change the default to 10, and comment out the previous code with your initial and dates:&lt;br /&gt;
&lt;br /&gt;
 $mform-&amp;gt;setDefault(&#039;grade&#039;, 10); //GVA 20080608 $mform-&amp;gt;setDefault(&#039;grade&#039;, 100);&lt;br /&gt;
&lt;br /&gt;
==Hiding fields==&lt;br /&gt;
&lt;br /&gt;
Form elements are created for a page using the &#039;&#039;&#039;addElement&#039;&#039;&#039; method.  Various types of element are text, select, date_time_selector, htmleditor, etc.&lt;br /&gt;
&lt;br /&gt;
There is also the type &amp;quot;hidden&amp;quot; that defines the element on a page and allows you to set a default value, stores previous values from a submission etc.  To simplify your forms for you users, simply change the type of the field during when addElement is called to hidden.&lt;br /&gt;
&lt;br /&gt;
Example:  Your site does not want to use meta courses and you want to remove it from the course creation/edit page.  In the file /course/edit_form.php&lt;br /&gt;
&lt;br /&gt;
Change:&lt;br /&gt;
&lt;br /&gt;
 $mform-&amp;gt;addElement(&#039;select&#039;, &#039;metacourse&#039;, get_string(&#039;managemeta&#039;), $meta);&lt;br /&gt;
&lt;br /&gt;
to&lt;br /&gt;
&lt;br /&gt;
 $mform-&amp;gt;addElement(&#039;hidden&#039;, &#039;metacourse&#039;, get_string(&#039;managemeta&#039;), $meta); //GVA 20080610 $mform-&amp;gt;addElement(&#039;select&#039;, &#039;metacourse&#039;, get_string(&#039;managemeta&#039;), $meta);&lt;br /&gt;
&lt;br /&gt;
==Setting fields to &amp;quot;Advanced&amp;quot;==&lt;/div&gt;</summary>
		<author><name>Ganderson</name></author>
	</entry>
	<entry>
		<id>https://docs.moodle.org/dev/index.php?title=Patching_forms_tutorial&amp;diff=9530</id>
		<title>Patching forms tutorial</title>
		<link rel="alternate" type="text/html" href="https://docs.moodle.org/dev/index.php?title=Patching_forms_tutorial&amp;diff=9530"/>
		<updated>2008-06-10T08:03:43Z</updated>

		<summary type="html">&lt;p&gt;Ganderson: /* Changing defaults */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;by Gary Anderson&lt;br /&gt;
&lt;br /&gt;
One of the easiest local modifications that an institution can make to customize their Moodle site is to make simple changes to the form elements that appear on pages.  This permits one to set different default values when creating new items, allows one to hide unused input elements to simplify the interface, and lets one identify certain more complicated elements as &amp;quot;advanced&amp;quot; so that features are still availale while simplifying the interface for most uses.&lt;br /&gt;
&lt;br /&gt;
This tutorial will demonstrate how to do such modifications.&lt;br /&gt;
&lt;br /&gt;
===Warning===&lt;br /&gt;
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.  Care should also be taken during upgrades in the code to make sure things are not broken (like conflicts during a CVS update).&lt;br /&gt;
&lt;br /&gt;
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.&lt;br /&gt;
&lt;br /&gt;
===Moodle Forms Overview===&lt;br /&gt;
&lt;br /&gt;
Rather than placing HTML form elements directly on the page, most well-written Moodle code will use the Forms Library.  This allows a standard way to create user input elements and also centralizes code making it easier to override certain behaviors creating a greater consistency.&lt;br /&gt;
&lt;br /&gt;
An entire form is an &amp;quot;object&amp;quot; with methods and attributes.  In many places in the Moodle code, the instance of the object is identified my the variable $mform, but you can use any variable.&lt;br /&gt;
&lt;br /&gt;
Common methods of the form object look like:&lt;br /&gt;
&lt;br /&gt;
* $mform-&amp;gt;addelement(&amp;lt;elementtype&amp;gt;,&amp;lt;elementidentifier&amp;gt;,&amp;lt;displayname&amp;gt;,&amp;lt;options&amp;gt;);&lt;br /&gt;
&lt;br /&gt;
This creates a new input element on a page.&lt;br /&gt;
&lt;br /&gt;
While forms can be produced in any scripting page which outputs code, you will often find code for printing out forms in a file like mod_form.php or in index.php of the affected component.  The examine the URL of the page being viewed as a starting point for finding the file to be changed.&lt;br /&gt;
&lt;br /&gt;
Always comment your code so you can change or remove it later..  For single line modifications, considering putting in your new code, and then and it with //&amp;lt;yourusername&amp;gt; &amp;lt;date&amp;gt; &amp;lt;the old code&amp;gt;.  This allows for retention of eisting line numbers.&lt;br /&gt;
&lt;br /&gt;
==Changing defaults==&lt;br /&gt;
&lt;br /&gt;
The &#039;&#039;&#039;setDefault&#039;&#039;&#039; method is used to establish the initial value used in the form and allows you to to define the most common setting for use in your institution.&lt;br /&gt;
&lt;br /&gt;
Example:  Change the default number of points for a default assignment from 100 points to 10 points.&lt;br /&gt;
&lt;br /&gt;
Solution:&lt;br /&gt;
&lt;br /&gt;
In the file /mod/assignment/mod_form.php, find&lt;br /&gt;
&lt;br /&gt;
 $mform-&amp;gt;setDefault(&#039;grade&#039;, 100);&lt;br /&gt;
&lt;br /&gt;
Change the default to 10, and comment out the previous code with your initial and dates:&lt;br /&gt;
&lt;br /&gt;
 $mform-&amp;gt;setDefault(&#039;grade&#039;, 10); //GVA 20080608 $mform-&amp;gt;setDefault(&#039;grade&#039;, 100);&lt;br /&gt;
&lt;br /&gt;
==Hiding fields==&lt;br /&gt;
&lt;br /&gt;
==Setting fields to &amp;quot;Advanced&amp;quot;&amp;quot;&lt;/div&gt;</summary>
		<author><name>Ganderson</name></author>
	</entry>
	<entry>
		<id>https://docs.moodle.org/dev/index.php?title=Patching_forms_tutorial&amp;diff=9529</id>
		<title>Patching forms tutorial</title>
		<link rel="alternate" type="text/html" href="https://docs.moodle.org/dev/index.php?title=Patching_forms_tutorial&amp;diff=9529"/>
		<updated>2008-06-10T07:46:29Z</updated>

		<summary type="html">&lt;p&gt;Ganderson: /* Moodle Forms Overview */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;by Gary Anderson&lt;br /&gt;
&lt;br /&gt;
One of the easiest local modifications that an institution can make to customize their Moodle site is to make simple changes to the form elements that appear on pages.  This permits one to set different default values when creating new items, allows one to hide unused input elements to simplify the interface, and lets one identify certain more complicated elements as &amp;quot;advanced&amp;quot; so that features are still availale while simplifying the interface for most uses.&lt;br /&gt;
&lt;br /&gt;
This tutorial will demonstrate how to do such modifications.&lt;br /&gt;
&lt;br /&gt;
===Warning===&lt;br /&gt;
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.  Care should also be taken during upgrades in the code to make sure things are not broken (like conflicts during a CVS update).&lt;br /&gt;
&lt;br /&gt;
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.&lt;br /&gt;
&lt;br /&gt;
===Moodle Forms Overview===&lt;br /&gt;
&lt;br /&gt;
Rather than placing HTML form elements directly on the page, most well-written Moodle code will use the Forms Library.  This allows a standard way to create user input elements and also centralizes code making it easier to override certain behaviors creating a greater consistency.&lt;br /&gt;
&lt;br /&gt;
An entire form is an &amp;quot;object&amp;quot; with methods and attributes.  In many places in the Moodle code, the instance of the object is identified my the variable $mform, but you can use any variable.&lt;br /&gt;
&lt;br /&gt;
Common methods of the form object look like:&lt;br /&gt;
&lt;br /&gt;
* $mform-&amp;gt;addelement(&amp;lt;elementtype&amp;gt;,&amp;lt;elementidentifier&amp;gt;,&amp;lt;displayname&amp;gt;,&amp;lt;options&amp;gt;);&lt;br /&gt;
&lt;br /&gt;
This creates a new input element on a page.&lt;br /&gt;
&lt;br /&gt;
While forms can be produced in any scripting page which outputs code, you will often find code for printing out forms in a file like mod_form.php or in index.php of the affected component.  The examine the URL of the page being viewed as a starting point for finding the file to be changed.&lt;br /&gt;
&lt;br /&gt;
Always comment your code so you can change or remove it later..  For single line modifications, considering putting in your new code, and then and it with //&amp;lt;yourusername&amp;gt; &amp;lt;date&amp;gt; &amp;lt;the old code&amp;gt;.  This allows for retention of eisting line numbers.&lt;br /&gt;
&lt;br /&gt;
==Changing defaults==&lt;br /&gt;
&lt;br /&gt;
WRITE THIS NEXT&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
==Hiding fields==&lt;br /&gt;
&lt;br /&gt;
==Setting fields to &amp;quot;Advanced&amp;quot;&amp;quot;&lt;/div&gt;</summary>
		<author><name>Ganderson</name></author>
	</entry>
	<entry>
		<id>https://docs.moodle.org/dev/index.php?title=Talk:Repository_API&amp;diff=27278</id>
		<title>Talk:Repository API</title>
		<link rel="alternate" type="text/html" href="https://docs.moodle.org/dev/index.php?title=Talk:Repository_API&amp;diff=27278"/>
		<updated>2008-06-10T07:40:14Z</updated>

		<summary type="html">&lt;p&gt;Ganderson: &amp;quot;local repository name&amp;quot;&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;(Ideas will be deleted from the comments section as they are resolved or merged into the main spec)&lt;br /&gt;
&lt;br /&gt;
===Missing concept of trusted files===&lt;br /&gt;
Files are not created equal, some of them are to be trusted, some can not be trusted at all. Web browsers trust everything received from the server, files from server may access cookie information and thus scripting technologies may allow them to do anything user can do. We do have to trust our teachers because they are supposed to create the learning content, but we definitely can not trust all students.&lt;br /&gt;
&lt;br /&gt;
Imagine if students were allowed to upload arbitrary files to server, like html file loaded with javascript and the server would happily serve them to all Moodle users. Our solution is to use html cleaning filters for submitted texts and force downloads of student uploaded files. To do this we must know if we trust the files or not. Unfortunately the forced downloads of student uploaded files and cleaning of html texts does not solve all problems, because bugs in browsers and especially browser plug-ins may sometimes be used to work around our protections.&lt;br /&gt;
&lt;br /&gt;
The best solution would be to use separate web addresses for trusted and not trusted files (two wwwroots in config.php), not all sites may afford two different addresses but we should be imo prepared for this.  [[User:Skodak|Skodak]] 16:42, 28 February 2008 (CST)&lt;br /&gt;
&lt;br /&gt;
 Great idea, yes.  In fact couldn&#039;t all the files be served via $CFG-&amp;gt;fileroot all the time?  &lt;br /&gt;
 [[User:Martin Dougiamas|Martin Dougiamas]] 07:08, 29 February 2008 (CST)&lt;br /&gt;
&lt;br /&gt;
userid field could be used for this, but separate flag might be better in order to allow teachers to upload untrusted files (teacher uploads assignment submission for the student).&lt;br /&gt;
&lt;br /&gt;
===Relative file links===&lt;br /&gt;
Flash, Java and SCORM require relative links and directory hierarchy in general - we must support it. Some SCORM packages load hundreds of files per page which means the file serving must be very fast with minimum of db access.&lt;br /&gt;
&lt;br /&gt;
Reading the proposal above it seems the API is about serving of isolated files referenced by repository ids. HTML requires to use relative or absolute locators with file names, we can not use repository ids directly in relative links. In case of scorm we have absolute path to base of SCORM package of given activity and SCORM files use relative links inside the package.&lt;br /&gt;
Solution could be to store relative paths directly in filename field ex:directory1/directory2/filename.ext.&lt;br /&gt;
&lt;br /&gt;
 Yes I agree, we definitely need to support (virtual) directories and slasharguments.&lt;br /&gt;
 We could just match the file argument to a path in the db.  Perhaps add the fileid &lt;br /&gt;
 to the argument path as a primary key: fileid/directory1/directory2/filename.ext&lt;br /&gt;
 [[User:Martin Dougiamas|Martin Dougiamas]] 07:08, 29 February 2008 (CST)&lt;br /&gt;
&lt;br /&gt;
===Virtual directories and files===&lt;br /&gt;
Sometimes the content of files is generated on the fly (csv exports, etc.), there are many special files spread through codebase doing nearly the same, it should be imho possible to use the same file API for these.&lt;br /&gt;
&lt;br /&gt;
Another virtual example is assignment submissions and webdav. I would like to see an option to browse the assignment submissions as directory structure, the top directory would be a list of names of users, inside html files with online assignment and uploaded files. This would allow us to implement simple zip&amp;amp;go or webdav based offline grading solutions. The problem here is that the content of this virtual submissions directly needs to be created on the fly based on user references, the proposed repository structure can not be used for this.&lt;br /&gt;
&lt;br /&gt;
 Very interesting idea! [[User:Martin Dougiamas|Martin Dougiamas]] 07:08, 29 February 2008 (CST)&lt;br /&gt;
&lt;br /&gt;
===Backup/restore relinking===&lt;br /&gt;
We are supporting relinking inside courses only. Till now it was easy to guess if absolute link will work after restore on another server.&lt;br /&gt;
There are several types of files:&lt;br /&gt;
*course files - relinked during restore, works on any server if from the same course&lt;br /&gt;
*module files - not relinked, urls are not permanent, link can not be copypasted (assignments, forum attachments, rss files, etc.)&lt;br /&gt;
*user files - not relinked, links work only on original server (blog attachments, personal files, etc.)&lt;br /&gt;
&lt;br /&gt;
 I think all this will be simplified in the proposed system because everything is &lt;br /&gt;
 represented using the same system: a file with an ACL (backup can quickly &lt;br /&gt;
 determine all the files in one course, probably using one SQL query). &lt;br /&gt;
 [[User:Martin Dougiamas|Martin Dougiamas]] 07:08, 29 February 2008 (CST)&lt;br /&gt;
&lt;br /&gt;
If we are backing up/restoring on the same server, will copies of a course restore without file duplication? I use this a lot so that I can archive one year&#039;s course whilst modifying it for next year. [[User:Matt Gibson|Matt Gibson]] 03:12, 29 April 2008 (CDT)&lt;br /&gt;
&lt;br /&gt;
===Access needed for both file and its instances===&lt;br /&gt;
We need two types of access control - first who can create instances (link files), second who can access the instance (download the file).&lt;br /&gt;
&lt;br /&gt;
 For the first don&#039;t we already have those capabilities? (like mod/forum:createattachment,&lt;br /&gt;
 moodle/course:managefiles) but they probably could use rationalising.   We&#039;ll need new &lt;br /&gt;
 ones per repository, too, of course.  &lt;br /&gt;
 [[User:Martin Dougiamas|Martin Dougiamas]] 07:08, 29 February 2008 (CST)&lt;br /&gt;
&lt;br /&gt;
===Cache lifetime===&lt;br /&gt;
There should be a way to specify cache filetime for each instance of file. For example 0 for uploaded assignments, 1 day for resource file. It might be better to allow modules to decide about this, at present it is hardcoded in file.php.&lt;br /&gt;
&lt;br /&gt;
 Great idea.  [[User:Martin Dougiamas|Martin Dougiamas]] 07:08, 29 February 2008 (CST)&lt;br /&gt;
&lt;br /&gt;
== Hierarchy in tables ? ==&lt;br /&gt;
&lt;br /&gt;
It&#039;s possible that I don&#039;t undertand a key piece of the concept, but I wonder why there is no reference to any &amp;quot;parent id&amp;quot; in the file or file_instance table ?&lt;br /&gt;
In other words, how the hierarchical structure is supposed to be &amp;quot;imported&amp;quot; from repository to Moodle ?&lt;br /&gt;
If the hierarchy is reserved to the course context, and not to the repository context, it seems difficult to allow students to access&lt;br /&gt;
to a complete directory, for example.&lt;br /&gt;
&lt;br /&gt;
On the other hand, maybe it&#039;s only a question for the &amp;quot;local&amp;quot; repository type, and not to the &amp;quot;generic&amp;quot; repository API ?&lt;br /&gt;
[[User:Allegre Guillaume|Allegre Guillaume]] 16:43, 5 March 2008 (CST)&lt;br /&gt;
&lt;br /&gt;
[[User:Martin Dougiamas|Martin Dougiamas]] 12:58, 15 March 2008 (CDT): basically I was thinking we just store a full local path for each file instead of hierarchies.  It wasn&#039;t in the db schema though: I&#039;ve just added it.  Thanks!&lt;br /&gt;
&lt;br /&gt;
As for allowing access to a whole directory, that&#039;s something I&#039;ve not thought about - thanks!  I agree we need to support something like that in the interface.  Hmm ..&lt;br /&gt;
&lt;br /&gt;
== Editing Repository Files / Version Control ? ==&lt;br /&gt;
&lt;br /&gt;
How do you imagine to handle the &amp;quot;editing file&amp;quot; problem ? &lt;br /&gt;
I can see several solutions :&lt;br /&gt;
# the simplest way : write access to a file really allows to edit (re-upload) the file, each instance being modified&lt;br /&gt;
# the &amp;quot;cheap copy&amp;quot; way : optionally, the modification is applied only to new file_instances (or those for which the teacher forces to). Here you have to handle two (then maybe more) revisions of this file.&lt;br /&gt;
This triggers the file revisions (or version control) question.&lt;br /&gt;
&lt;br /&gt;
A related question is about versionned files : &lt;br /&gt;
should it depend only upon the repository layer (for example, a plugin could implement a SVN &amp;quot;repository&amp;quot;) ?&lt;br /&gt;
Or should Moodle be aware of the file &amp;quot;revision number&amp;quot; ? &lt;br /&gt;
[[User:Allegre Guillaume|Allegre Guillaume]] 17:00, 5 March 2008 (CST)&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
[[User:Martin Dougiamas|Martin Dougiamas]] 13:08, 15 March 2008 (CDT):  I don&#039;t think we should start getting into such things, version and editing is the job of the dedicated external repository system and people should use that interface.  &lt;br /&gt;
&lt;br /&gt;
What we do have in Moodle is the file-&amp;gt;updates field.  This specifies when to get a fresh copy.  It would be set when the user has specified they want Moodle to use the &amp;quot;latest version&amp;quot; of the file.  And if the user specified a particular version in the repository interface then that is what gets copied (once) and the file-&amp;gt;updates field is left as zero.&lt;br /&gt;
&lt;br /&gt;
One scenario would be if someone wants to use version 1 in one course and version 2 in another, but since the version is in the URL to the original file (and thus a different remote path) they would be treated as two separate files in Moodle anyway.&lt;br /&gt;
&lt;br /&gt;
Might be a small problem if they said &amp;quot;latest version, no update&amp;quot; in course 1 and then later on said &amp;quot;latest version, no update&amp;quot; in a second course.  I guess that would re-download the latest version (which might have changed) and thus course 1 would have an unexpected update.  We could solve this by alerting the user and giving them a choice, I suppose.&lt;br /&gt;
&lt;br /&gt;
== Replacing Moodle&#039;s File System ==&lt;br /&gt;
&lt;br /&gt;
The API as specified still uses the standard Moodle file system, which has its limitations while providing a simple file access method. But, shouldn&#039;t we also be considering completely (or partially) replacing the Moodle file system with the repository system? To that end, the file interface would be the same to users, but where the files are and how they are accessed would be up to which repository was being used. In this system, the standard Moodle file system would just be one of the available repositories. Then the API could support more robust access controls if available, or very few (as Moodle does now). This could allow for per-directory / per-file privilege granting, common file areas so that courses could access the same copy of a file (rather than copying it into the Moodle file area), etc.&lt;br /&gt;
&lt;br /&gt;
The API could also support multiple repositories and allow choosing a file as a link rather than copying it.&lt;br /&gt;
&lt;br /&gt;
Of course, this would also mean allowing write access to the repository area from Moodle, rather than leaving it as read-only. I know the plan was to do this through the [[Portfolio API]], but that really is limited to a user storage function and not a file management function. I think having an API defined to allow for full file management would be a better solution - even if not supported by all repositories.&lt;br /&gt;
[[User:Mike Churchward|Mike Churchward]] 12:54, 6 March 2008 (CST)&lt;br /&gt;
&lt;br /&gt;
[[User:Martin Dougiamas|Martin Dougiamas]] 12:54, 15 March 2008 (CDT) :&lt;br /&gt;
Actually, Mike, the standard file system is NOT being retained at all.  I&#039;ve clarified this slightly in the docs.  The course-centered structure for files is gone.  All files ARE stored on disk but most of the info regarding their location and access is all governed by a table in the database (so the files could just as easily be in a remote database if you wished).  Files used in multiple areas within Moodle will never be stored more than once in Moodle.&lt;br /&gt;
&lt;br /&gt;
The idea of a read/write interface was how we started, but it&#039;s insanely complex once you try to handle backups (ie how do you make a complete backup suitable for giving to someone else?) and access control (how do you decide access depending on Moodle contexts), and we&#039;ll never do it as well as the original repository does it.  Why should we duplicate the Hive interface (to use an example) in Moodle when Hive has a perfectly good one already, one that handles all the extra stuff like Copyright controls, workflow and so on?   &lt;br /&gt;
&lt;br /&gt;
That said, the current Repository plugin idea is very simple, so that if anyone really wanted to embed management into the &amp;quot;file picker&amp;quot; interface they totally could do it in the plugin.&lt;br /&gt;
---&lt;br /&gt;
&lt;br /&gt;
==Windows network drives==&lt;br /&gt;
I&#039;ve added this to the end of the list of repository types to be supported because its possibly the most useful one I can think of. Our school wants to make the transition to moodle, but getting the files on there is the biggest barrier and there is a lot of stuff sitting on our shared and personal folders which is time consuming to transfer. Integration is a big thing that management want to see, particularly the ability to bulk upload files. This may not be a repository as such because it may be that the best way is to copy the file from the shared folder into the repository rather than where it is so it can be moved/deleted accidentally, but easy access is vital in making the process of uploading a file possible. It would also make Moodle a killer app in that it could make our network drives available from home through a secure web interface. &lt;br /&gt;
&lt;br /&gt;
I&#039;ve linked to Guy Thomas&#039; [http://moodle.org/mod/data/view.php?d=13&amp;amp;rid=991 Windows Share Web Client block] as it is a good start, but sadly only works on Linux. [[User:Matt Gibson|Matt Gibson]] 03:43, 29 April 2008 (CDT)&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
 Fantastic idea, let&#039;s call it the SMB plugin  - [[User:Martin Dougiamas|Martin Dougiamas]] 21:25, 8 June 2008 (CDT)&lt;br /&gt;
&lt;br /&gt;
==Bulk operations==&lt;br /&gt;
On a similar note, Don Hinkelman&#039;s new course format provides a great bulk-upload feature whereby a whole folder can be uploaded and added to the course as resources with the names of the files as titles, with just a couple of clicks. I know this is extending the repository idea a little, but to be honest, I think that one of the biggest weaknesses of Moodle&#039;s file handling right now is not being able to add an entire folder of files without manually going through each one and laboriously specifying location and title. To make any repository useful, I think three operations should be possible with one or two clicks:&lt;br /&gt;
* Add a whole folder/group of files to the repository at once&lt;br /&gt;
* The above operation, but additionally, have all of the folder/group added to a course and named automatically, all in one go.&lt;br /&gt;
* Find a group of files which are already in the repository and add them to a course all at once, with automatic naming as above.&lt;br /&gt;
Not sure if this is best put here or in the Developemt: File_API bit, but here seemed slightly better. [[User:Matt Gibson|Matt Gibson]] 03:43, 29 April 2008 (CDT)&lt;br /&gt;
&lt;br /&gt;
  This is probably not related to the file API at all.  I&#039;d see it as being a new item on the resource menu (Add multiple resources ...) with some sort of shift-click scenario.  nice idea though.  Can you file it as a tracker item?    [[User:Martin Dougiamas|Martin Dougiamas]] 21:26, 8 June 2008 (CDT)&lt;br /&gt;
&lt;br /&gt;
== Bulk and a new resource type from repository ==&lt;br /&gt;
&lt;br /&gt;
Our school has several campuses and a distance learning unit with well organized and big course resource trees. The repository module could be enormously useful for us.&lt;br /&gt;
&lt;br /&gt;
I have looked at Moodle&#039;s IMS repository a bit, and like the way it is possible to put multiple resources into one access point. If the new repository could have some of the same possibilities, it would be marvellous. The drawback with the IMS is that it opens a new window with all the multiple resources. Instead, it would be OK to be able to share a whole lot of resources, or a whole &amp;quot;resource tree&amp;quot;.&lt;br /&gt;
&lt;br /&gt;
I also like the bulk function, to be able to parse a folder of say, html-files, and add it to the resource tree.&lt;br /&gt;
&lt;br /&gt;
==Further notes==&lt;br /&gt;
&lt;br /&gt;
* WebDAV --[[User:Helen Foster|Helen Foster]] 17:20, 9 June 2008 (CDT)&lt;br /&gt;
&lt;br /&gt;
== &amp;quot;local repository name&amp;quot; ==&lt;br /&gt;
&lt;br /&gt;
I think users will find the word local to be confusing.  For the developer or administrator, local seems to refer to the Moodle server.  But for the teacher or student, they will think that local refers to their own local files system.  I would suggest just using the domain name for that server (like myMoodleSite.org) and list it as the first entry to avoid this confusion.  [[User:Gary Anderson|Gary Anderson]] 02:40, 10 June 2008 (CDT)&lt;/div&gt;</summary>
		<author><name>Ganderson</name></author>
	</entry>
	<entry>
		<id>https://docs.moodle.org/dev/index.php?title=Patching_forms_tutorial&amp;diff=9528</id>
		<title>Patching forms tutorial</title>
		<link rel="alternate" type="text/html" href="https://docs.moodle.org/dev/index.php?title=Patching_forms_tutorial&amp;diff=9528"/>
		<updated>2008-06-09T14:57:47Z</updated>

		<summary type="html">&lt;p&gt;Ganderson: Continued update of draft&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;by Gary Anderson&lt;br /&gt;
&lt;br /&gt;
One of the easiest local modifications that an institution can make to customize their Moodle site is to make simple changes to the form elements that appear on pages.  This permits one to set different default values when creating new items, allows one to hide unused input elements to simplify the interface, and lets one identify certain more complicated elements as &amp;quot;advanced&amp;quot; so that features are still availale while simplifying the interface for most uses.&lt;br /&gt;
&lt;br /&gt;
This tutorial will demonstrate how to do such modifications.&lt;br /&gt;
&lt;br /&gt;
===Warning===&lt;br /&gt;
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.  Care should also be taken during upgrades in the code to make sure things are not broken (like conflicts during a CVS update).&lt;br /&gt;
&lt;br /&gt;
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.&lt;br /&gt;
&lt;br /&gt;
===Moodle Forms Overview===&lt;br /&gt;
&lt;br /&gt;
Rather than placing HTML form elements directly on the page, most well-written Moodle code will use the Forms Library.  This allows a standard way to create user input elements and also centralizes code making it easier to override certain behaviors creating a greater consistency.&lt;br /&gt;
&lt;br /&gt;
An entire form is an &amp;quot;object&amp;quot; with methods and attributes.  In many places in the Moodle code, the instance of the object is identified my the variable $mform, but you can use any variable.&lt;br /&gt;
&lt;br /&gt;
Common methods of the form object look like:&lt;br /&gt;
&lt;br /&gt;
* $mform-&amp;gt;addelement(&amp;lt;elementtype&amp;gt;,&amp;lt;elementidentifier&amp;gt;,&amp;lt;displayname&amp;gt;,&amp;lt;options&amp;gt;);&lt;br /&gt;
&lt;br /&gt;
This creates a new input element on a page.&lt;br /&gt;
&lt;br /&gt;
While forms can be produced in any scripting page which outputs code, you will often find code for printing out forms in a file like mod_form.php or in index.php of the affected component.&lt;br /&gt;
&lt;br /&gt;
==Changing defaults==&lt;br /&gt;
&lt;br /&gt;
WRITE THIS NEXT&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
==Hiding fields==&lt;br /&gt;
&lt;br /&gt;
==Setting fields to &amp;quot;Advanced&amp;quot;&amp;quot;&lt;/div&gt;</summary>
		<author><name>Ganderson</name></author>
	</entry>
	<entry>
		<id>https://docs.moodle.org/dev/index.php?title=Patching_forms_tutorial&amp;diff=9527</id>
		<title>Patching forms tutorial</title>
		<link rel="alternate" type="text/html" href="https://docs.moodle.org/dev/index.php?title=Patching_forms_tutorial&amp;diff=9527"/>
		<updated>2008-06-08T14:31:18Z</updated>

		<summary type="html">&lt;p&gt;Ganderson: Start of page for patching forms&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;by Gary Anderson&lt;br /&gt;
&lt;br /&gt;
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 &amp;quot;advanced&amp;quot; so that the user sees it only if they click on the &amp;quot;show advanced&amp;quot; button.&lt;br /&gt;
&lt;br /&gt;
==Warning==&lt;br /&gt;
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.&lt;br /&gt;
&lt;br /&gt;
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.&lt;br /&gt;
&lt;br /&gt;
==Moodle Forms Overview==&lt;br /&gt;
&lt;br /&gt;
==Changing defaults==&lt;br /&gt;
&lt;br /&gt;
==Hiding fields==&lt;br /&gt;
&lt;br /&gt;
==Setting fields to &amp;quot;Advanced&amp;quot;&amp;quot;&lt;/div&gt;</summary>
		<author><name>Ganderson</name></author>
	</entry>
	<entry>
		<id>https://docs.moodle.org/dev/index.php?title=Seattle_Academy&amp;diff=7496</id>
		<title>Seattle Academy</title>
		<link rel="alternate" type="text/html" href="https://docs.moodle.org/dev/index.php?title=Seattle_Academy&amp;diff=7496"/>
		<updated>2008-04-15T11:02:21Z</updated>

		<summary type="html">&lt;p&gt;Ganderson: Added Assignment default patch and minor edits&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;=Seattle Academy=&lt;br /&gt;
Seattle Academy is an independent secondary school of approximately 580 students. The upper school has had a laptop program for all students since 1997 and has used Moodle since 2005. The school used and modified version 1.6 until Moodle 1.9 was in Beta, and then made bug fixes and usability recommendations prior to 1.9 going final.  Here we document additional customizations to Moodle 1.9 that are not yet part of the core Moodle code.&lt;br /&gt;
&lt;br /&gt;
These patches and custom blocks are by [https://docs.moodle.org/en/User:Gary_Anderson Gary Anderson], except where noted.  The day-to-day operation of the Moodle server is now handled be the technology department of the school allowing Gary to focus more time both on teaching with Moodle and on sharing his code and expertise with others.&lt;br /&gt;
&lt;br /&gt;
TO DO:  ADD GRAPHICS AND FORMAT BETTER&lt;br /&gt;
&lt;br /&gt;
==Custom Blocks==&lt;br /&gt;
&lt;br /&gt;
* &#039;&#039;&#039;Assignments to grade block&#039;&#039;&#039;:  A block that reports to teachers those assignments that need grading, including those where the due-date has past, where the student has made a submission not yet graded, or where students have made a revision.  It works with the school&#039;s custom due-date code.&lt;br /&gt;
* &#039;&#039;&#039;Problem assignments block&#039;&#039;&#039;  Reports to a student assignments in their classes that have &amp;quot;problems&amp;quot;, such as a due-date that has past without a submission, the case where a teacher makes a comment but no grade, the case where a teacher has given a grade of zero, etc.&lt;br /&gt;
* &#039;&#039;&#039;Advisee problem assignments block&#039;&#039;&#039;  For a list of an adviser&#039;s students, reports the number of &amp;quot;Problem assignments&amp;quot; with a list of issues.&lt;br /&gt;
* &#039;&#039;&#039;Major assignments block&#039;&#039;&#039;  Teachers can categorize an assignment as &amp;quot;major&amp;quot;.  This block lists out by date and graduation year with the student count of the number of students affected all such assignments that are marked as major (like big tests, projects, etc.)  This allows teachers to avoid conflicts.&lt;br /&gt;
*  &#039;&#039;&#039;View Submissions block&#039;&#039;&#039;  This block allows you to select an assignment and it prints a report of all the student&#039;s submissions on one page.  This allows a teacher to assign a reflection on a day&#039;s work and quickly assess student problems, issues they want to talk about, who has done the work, etc.&lt;br /&gt;
*  &#039;&#039;&#039;Customized Attendance block&#039;&#039;&#039;  A custom version of Dmitry Pupinin&#039;s attendance block which ties in with our school&#039;s attendance database so a teacher, when taking attendance on Moodle, will know if the student is listed as having an excused absence, early dismissal, etc.&lt;br /&gt;
*  &#039;&#039;&#039;MoodleHacks Patcher block&#039;&#039;&#039;  This block inserts and removes custom patches that Gary has written.  This allows features to be added and removed much more easily than custom CVS or SVN patches.  It also makes the patches more compatible with CVS updates to core by reducing conflicts:  patches are typically single-line insertions.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
==Custom Patches==&lt;br /&gt;
*  &#039;&#039;&#039;Alternate due dates patch&#039;&#039;&#039;  Allows different due dates to be set, based on the group that the student is in.  This allows the same course to be taught to multiple sections with the correct due date for each student.&lt;br /&gt;
*  &#039;&#039;&#039;Autograding patch&#039;&#039;&#039;  Assignments are marked as full credit if submitted on time, and get prorated credit during a grade interval, and a zero after that interval has past.  The grade is subject to instructor review, and is marked as such.  But it allows for much easier grading for those types of assignments that get full credit if submitted on time.&lt;br /&gt;
*  &#039;&#039;&#039;Course page assignment status for students patch&#039;&#039;&#039;  Marks the status of assignment on the course page with words like &amp;quot;Past due&amp;quot;, &amp;quot;Zero&amp;quot;, &amp;quot;See Comment&amp;quot;, &amp;quot;Graded&amp;quot;, etc.  Assignments marked in red are &amp;quot;Problem assignments&amp;quot; that the student should deal with.&lt;br /&gt;
*  &#039;&#039;&#039;Decimal grading patch&#039;&#039;&#039;  Allows assignments to be graded with decimal rather than just integer grades.  So, an assignment can be given a score of 98.3, etc. Karlene Clapp has modified this to allow such grades to be entered on the assignment submission page and to have an &amp;quot;exempt&amp;quot; checkbox.&lt;br /&gt;
*  &#039;&#039;&#039;Gradebook tabs patch&#039;&#039;&#039;  Brings back the tabs in the 1.9 gradebook so that teachers can quickly go between the grader report, preferences, categories and items, grade report, etc.  This was posted as a patch to the tracker but not implemented.&lt;br /&gt;
*  &#039;&#039;&#039;Course page assignment status for teachers patch&#039;&#039;&#039;  Marks the status of assignments on the course page including the number to be graded in red.  This works with the Alternate due dates patch so it correctly counts only those that are due for a particular group.&lt;br /&gt;
*  &#039;&#039;&#039;Gradebook report patch&#039;&#039;&#039;  Allows teachers in the grader report to click on a student&#039;s name and see just that line (helpful when seeing the gradebook with the student).  Students can also see this line in the grader report.&lt;br /&gt;
*  &#039;&#039;&#039;Quiz results filter patch&#039;&#039;&#039;  Allows teacher to filer out only graded/ungraded attempts in manually graded essay quiz items.&lt;br /&gt;
*  &#039;&#039;&#039;Course defaults patch&#039;&#039;&#039;  Simplifies the course settings and sets defaults (such as start date, groups, etc.) that work best for the school.&lt;br /&gt;
*  &#039;&#039;&#039;Course due dates patch&#039;&#039;&#039;  Prints the due dates of assignments on the course page.  This works with our Alternate due date patch so it prints the correct due date and time for a given group.&lt;br /&gt;
*  &#039;&#039;&#039;Weeks order patch&#039;&#039;&#039;  Allows a user to view a course page so that the current week is the first one and previous weeks are shown in descending order (or they can use the menu to show the classic view).  Preferences are stored per user based on their last view.&lt;br /&gt;
*  &#039;&#039;&#039;Setting grading category patch&#039;&#039;&#039;  While this patch was submitted and implemented in core, this patch still allows the part that was not implemented:  setting the category on the grading page.&lt;br /&gt;
*  &#039;&#039;&#039;Quiz import (Blackboard/Examview) patch&#039;&#039;&#039;  Allows Examview (a test generating package) to import into gradebook using the Blackboard format.  Previously this worked with only text based questions; this patch allows for the import of questions that include graphics, etc.&lt;br /&gt;
*  &#039;&#039;&#039;Gradebook Patch misc patch&#039;&#039;&#039;  A serious of miscellaneous patches that make the gradebook easier for 1.9 in the secondary school setting, including better defaults, more hidden items, etc.  These are essentially what remains that was not implemented from Gary&#039;s suggestions in tracker during the 1.9 beta process.  Karlene Clapp, server administrator, has also added a patch to highlight a row, give alternate highlighting, and print student names on the right hand side.&lt;br /&gt;
*  &#039;&#039;&#039;Assignment type change patch&#039;&#039;&#039;  Allows a teacher to change the type of an assignment after it has been created (like from offline to upload or advanced upload, etc.&lt;br /&gt;
*  &#039;&#039;&#039;Over maximum grade patch&#039;&#039;&#039;  Allows grades to be entered that are over 100%&lt;br /&gt;
*  &#039;&#039;&#039;IMAP bypass&#039;&#039;&#039;  Allows the MD5 hash of the password to be used for comparison in logging in, meaning that the Moodle server is not dependent on the mail server being up to operate.  It also speeds up loggins.&lt;br /&gt;
*  &#039;&#039;&#039;Major assignment selector patch&#039;&#039;&#039;  Allows teachers to mark an assignment as &amp;quot;major&amp;quot; which puts it in bold on the course page and also lists it in the &amp;quot;Major assignments&amp;quot; block.&lt;br /&gt;
*  &#039;&#039;&#039;Gradebook extra credit&#039;&#039;&#039;  Allows an assignment or other grading item to be marked as extra credit so that the gradebook does not include it in the total points possible.&lt;br /&gt;
*  &#039;&#039;&#039;Grade setting patch&#039;&#039;&#039;  Puts a button on the assignment grading page for setting all remaining grades to Max, or to Min grade.  This greatly speeds grading in cases where most assignments receive the same mark (if submitted), or when zero needs to be given to a batch of unsubmitted assignments, etc.&lt;br /&gt;
*  &#039;&#039;&#039;Choice election mode patch&#039;&#039;&#039;  Allows setting the choice module for a particular choice instance so that a course teacher will not see individual students choices.  This is especially nice for providing anonymity during online elections.&lt;br /&gt;
*  &#039;&#039;&#039;Assignment default patch&#039;&#039;&#039;  Changes defaults and simplifies interface for teachers creating assignments so that common settings are given by default and little used features are hidden or treated as &amp;quot;advanced&amp;quot;.&lt;/div&gt;</summary>
		<author><name>Ganderson</name></author>
	</entry>
	<entry>
		<id>https://docs.moodle.org/dev/index.php?title=Seattle_Academy&amp;diff=7495</id>
		<title>Seattle Academy</title>
		<link rel="alternate" type="text/html" href="https://docs.moodle.org/dev/index.php?title=Seattle_Academy&amp;diff=7495"/>
		<updated>2008-04-15T00:44:17Z</updated>

		<summary type="html">&lt;p&gt;Ganderson: Descriptions of customizations to Seattle Academy&amp;#039;s Moodle&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;=Seattle Academy=&lt;br /&gt;
Seattle Academy is an independent secondary school of approximately 580 students. The upper school has had a laptop program for all students since 1997 and has used Moodle since 2005. The school used and modified version 1.6 until Moodle 1.9 was in Beta, and then made bug fixes and usability recommendations prior to 1.9 going final.  Here we document additional customizations to Moodle 1.9 that are not yet part of the core Moodle code.&lt;br /&gt;
&lt;br /&gt;
These patches and custom blocks are by [https://docs.moodle.org/en/User:Gary_Anderson Gary Anderson], except where noted.  The day-to-day operation of the Moodle server is now handled be the technology department of the school allowing Gary to focus more time both on teaching with Moodle and on sharing his code and expertise with others.&lt;br /&gt;
&lt;br /&gt;
TO DO:  ADD GRAPHICS AND FORMAT BETTER&lt;br /&gt;
&lt;br /&gt;
==Custom Blocks==&lt;br /&gt;
&lt;br /&gt;
* &#039;&#039;&#039;Assignments to grade block&#039;&#039;&#039;:  A block that reports to teachers those assignments that need grading, including those where the due-date has past, where the student has made a submission not yet graded, or where students have made a revision.  It works with the school&#039;s custom due-date code.&lt;br /&gt;
* &#039;&#039;&#039;Problem assignments block&#039;&#039;&#039;  Reports to a student assignments in their classes that have &amp;quot;problems&amp;quot;, such as a due-date that has past without a submission, the case where a teacher makes a comment but no grade, the case where a teacher has given a grade of zero, etc.&lt;br /&gt;
* &#039;&#039;&#039;Advisee problem assignments block&#039;&#039;&#039;  For a list of an adviser&#039;s students, reports the number of &amp;quot;Problem assignments&amp;quot; with a list of issues.&lt;br /&gt;
* &#039;&#039;&#039;Major assignments block&#039;&#039;&#039;  Teachers can categorize an assignment as &amp;quot;major&amp;quot;.  This block lists out by date and graduation year with the student count of the number of students affected all such assignments that are marked as major (like big tests, projects, etc.)  This allows teachers to avoid conflicts.&lt;br /&gt;
*  &#039;&#039;&#039;View Submissions block&#039;&#039;&#039;  This block allows you to select an assignment and it prints a report of all the student&#039;s submissions on one page.  This allows a teacher to assign a reflection on a day&#039;s work and quickly assess student problems, issues they want to talk about, who has done the work, etc.&lt;br /&gt;
*  &#039;&#039;&#039;Customized Attendance block&#039;&#039;&#039;  A custom version of Dmitry Pupinin&#039;s attendance block which ties in with our school&#039;s attendance database so a teacher, when taking attendance on Moodle, will know if the student is called listed as having an excused absence, early dismissal, etc.&lt;br /&gt;
*  &#039;&#039;&#039;MoodleHacks Patcher block&#039;&#039;&#039;  This block inserts and removes custom patches that Gary has written.  This allows features to be added and removed much more easily than custom CVS or SVN patches.&lt;br /&gt;
*  &#039;&#039;&#039;Choice election mode patch&#039;&#039;&#039;  Allows setting the choice module for particular choice instance so that teacher can not see the way that individual students chose.  This is especially nice for providing anonymity during online elections.&lt;br /&gt;
&lt;br /&gt;
==Custom Patches==&lt;br /&gt;
*  &#039;&#039;&#039;Alternate due dates patch&#039;&#039;&#039;  Allows different due dates to be set, based on the group that the student is in.  This allows the same course to be taught to multiple sections with the correct due date for each student.&lt;br /&gt;
*  &#039;&#039;&#039;Autograding patch&#039;&#039;&#039;  Assignments are marked as full credit if submitted on time, and get prorated credit during a grade interval, and a zero after that interval has past.  The grade is subject to instructor review, and is marked as such.  But it allows for much easier grading for those types of assignments that get full credit if submitted on time.&lt;br /&gt;
*  &#039;&#039;&#039;Course page assignment status for students patch&#039;&#039;&#039;  Marks the status of assignment on the course page with words like &amp;quot;Past due&amp;quot;, &amp;quot;Zero&amp;quot;, &amp;quot;See Comment&amp;quot;, &amp;quot;Graded&amp;quot;, etc.  Assignments marked in red are &amp;quot;Problem assignments&amp;quot; that the student should deal with.&lt;br /&gt;
*  &#039;&#039;&#039;Decimal grading patch&#039;&#039;&#039;  Allows assignments to be graded with decimal rather than just integer grades.  So, an assignment can be given a score of 98.3, etc. Karlene Clapp has modified this to allow such grades to be entered on the assignment submission page and to have an &amp;quot;exempt&amp;quot; checkbox.&lt;br /&gt;
*  &#039;&#039;&#039;Gradebook tabs patch&#039;&#039;&#039;  Brings back the tabs in the 1.9 gradebook so that teachers can quickly go between the grader report, preferences, categories and items, grade report, etc.  This was posted as a patch to the tracker but not implemented.&lt;br /&gt;
*  &#039;&#039;&#039;Course page assignment status for teachers patch&#039;&#039;&#039;  Marks the status of assignments on the course page including the number to be graded in red.  This works with the Alternate due dates patch so it correctly counts only those that are due for a particular group.&lt;br /&gt;
*  &#039;&#039;&#039;Gradebook report patch&#039;&#039;&#039;  Allows teachers in the grader report to click on a student&#039;s name and see just that line (helpful when seeing the gradebook with the student).  Students can also see this line in the grader report.&lt;br /&gt;
*  &#039;&#039;&#039;Quiz results filter patch&#039;&#039;&#039;  Allows teacher to filer out only graded/ungraded attempts in manually graded essay quiz items.&lt;br /&gt;
*  &#039;&#039;&#039;Course defaults patch&#039;&#039;&#039;  Simplifies the course settings and sets defaults (such as start date, groups, etc.) that work best for the school.&lt;br /&gt;
*  &#039;&#039;&#039;Course due dates patch&#039;&#039;&#039;  Prints the due dates of assignments on the course page.  This works with our Alternate due date patch so it prints the correct due date and time for a given group.&lt;br /&gt;
*  &#039;&#039;&#039;Weeks order patch&#039;&#039;&#039;  Allows a user to view a course page so that the current week is the first one and previous weeks are shown in descending order (or they can use the menu to show the classic view).  Preferences are stored per user based on their last view.&lt;br /&gt;
*  &#039;&#039;&#039;Setting grading category patch&#039;&#039;&#039;  While this patch was submitted and implemented in core, this patch still allows the part that was not implemented:  setting the category on the grading page.&lt;br /&gt;
*  &#039;&#039;&#039;Quiz import (Blackboard/Examview) patch&#039;&#039;&#039;  Allows Examview (a test generating package) to import into gradebook using the Blackboard format.  Previously this worked with only text based questions; this patch allows for the import of questions that include graphics, etc.&lt;br /&gt;
*  &#039;&#039;&#039;Gradebook Patch misc patch&#039;&#039;&#039;  A serious of miscellaneous patches that make the gradebook easier for 1.9 in the secondary school setting, including better defaults, more hidden items, etc.  These are essentially what remains that was not implemented from Gary&#039;s suggestions in tracker during the 1.9 beta process.  Karlene Clapp, server administrator, has also added a patch to highlight a row, give alternate hilighting, and print student names on the right hand side.&lt;br /&gt;
*  &#039;&#039;&#039;Assignment type change patch&#039;&#039;&#039;  Allows a teacher to change the type of an assignment after it has been created (like from offline to upload or advanced upload, etc.&lt;br /&gt;
*  &#039;&#039;&#039;Over maximum grade patch&#039;&#039;&#039;  Allows grades to be entered that are over 100%&lt;br /&gt;
*  &#039;&#039;&#039;IMAP bypass&#039;&#039;&#039;  Allows the MD5 hash of the password to be used for comparision in logging in, meaning that the Moodle server is not dependent on the mail server being up to operate.  It also speeds up loggins.&lt;br /&gt;
*  &#039;&#039;&#039;Major assignment selector patch&#039;&#039;&#039;  Allows teachers to mark an assignment as &amp;quot;major&amp;quot; which puts it in bold on the course page and also lists it in the &amp;quot;Major assignments&amp;quot; block.&lt;br /&gt;
*  &#039;&#039;&#039;Gradebook extra credit&#039;&#039;&#039;  Allows an assignment or other grading item to be marked as extra credit so that the gradebook does not include it in the total points possible.&lt;br /&gt;
*  &#039;&#039;&#039;Grade setting patch&#039;&#039;&#039;  Puts a button on the assignment grading page for setting all remaining grades to Max, or to Min.  This greatly speeds grading in cases where most assignments receive the same mark, or when zero needs to be given to old assignments, etc.&lt;/div&gt;</summary>
		<author><name>Ganderson</name></author>
	</entry>
	<entry>
		<id>https://docs.moodle.org/dev/index.php?title=Roadmap&amp;diff=26219</id>
		<title>Roadmap</title>
		<link rel="alternate" type="text/html" href="https://docs.moodle.org/dev/index.php?title=Roadmap&amp;diff=26219"/>
		<updated>2008-03-29T18:53:40Z</updated>

		<summary type="html">&lt;p&gt;Ganderson: /* Hopefully */ Usability improvments&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;This roadmap collects the best information about upcoming features in Moodle.   It is not 100% certain - features may change according to available funding and developers.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
== Version 2.0 - Expected Late 2008 ==&lt;br /&gt;
&lt;br /&gt;
(This list is fluid, depending on available resources)&lt;br /&gt;
&lt;br /&gt;
===Definitely===&lt;br /&gt;
* Moodle 2.0 will require PHP 5.2 as a minimum, allowing us to clean up the code in some areas.  For more info see: [http://gophp5.org/ gophp5.org].&lt;br /&gt;
* [[Development:Portfolio API|Portfolio API]] - Enovation.ie / Moodle.com&lt;br /&gt;
::Interface Moodle activities and repositories to help produce portfolios for internal assessment AND external publication.  The first Portfolio plugin implemented will be [http://www.mahara.org/ Mahara].&lt;br /&gt;
* [[Development:Repository API|Repository API]] - Moodle.com&lt;br /&gt;
::Abstract all file operations to an API that allows plugins for different external repositories.&lt;br /&gt;
* [[Development:Conditional activities|Conditional activities]] - Moodle.com&lt;br /&gt;
::Allowing dependencies and forced paths through the content.&lt;br /&gt;
* [[Community hub]] interfaces - Moodle.com and others&lt;br /&gt;
::Makes it easy for users to find and navigate other systems and external Moodle repositories, leveraging the Moodle Network in various ways.&lt;br /&gt;
* Old DB install/upgrade system removed&lt;br /&gt;
:: The deprecated system for installing or upgrading database entries used in Moodle &amp;lt; 1.7 will be completely removed, while supporting only the new XML based database scheme introduced in 1.7.&lt;br /&gt;
* [[Feedback module]]&lt;br /&gt;
* [[NWiki roadmap|New Wiki]] module (nwiki) - DFWikiteam-UPC&lt;br /&gt;
* [[Development:Quiz_report_enhancements|Major improvements to the quiz reports]], especially regrading and item analysis. - The Open University&lt;br /&gt;
* Messaging improvements&lt;br /&gt;
* Secure RSS feeds&lt;br /&gt;
&lt;br /&gt;
===Hopefully===&lt;br /&gt;
* [[IMS Learning Design]] - Moodle.com&lt;br /&gt;
::Support for importing/exporting LD, converting Moodle activities and sequences of activities into a standard format for sharing, and importing standard sequences into Moodle courses&lt;br /&gt;
* [[Student Information API]]&lt;br /&gt;
::API for integrating external systems for managing student information&lt;br /&gt;
* [[Development:Voice|Moodle Voice]]&lt;br /&gt;
:: Moodle Voice is a project for embedding VoiceXML support into Moodle Core.&lt;br /&gt;
* [[Learning Design export]]? - Moodle.com and Open University of The Netherlands&lt;br /&gt;
::We plan to have a very simple export for any Moodle course into IMS LD format, as a proof of concept and to help the community start learning about IMS LD.&lt;br /&gt;
* [[Turnitin Integration]] - Dan Marsden with support from Catalyst NZ&lt;br /&gt;
* Improve usability&lt;br /&gt;
:: Usability improvements for new and established users through increased field testing, selective feature availability, and research (such as the GSOC project).&lt;br /&gt;
&lt;br /&gt;
==See also==&lt;br /&gt;
&lt;br /&gt;
* [[Release Notes]]&lt;br /&gt;
&lt;br /&gt;
[[Category:Developer]]&lt;br /&gt;
&lt;br /&gt;
[[es:Planificación]]&lt;br /&gt;
[[fr:Planification]]&lt;/div&gt;</summary>
		<author><name>Ganderson</name></author>
	</entry>
	<entry>
		<id>https://docs.moodle.org/dev/index.php?title=Seattle_Academy&amp;diff=7494</id>
		<title>Seattle Academy</title>
		<link rel="alternate" type="text/html" href="https://docs.moodle.org/dev/index.php?title=Seattle_Academy&amp;diff=7494"/>
		<updated>2008-01-22T05:53:16Z</updated>

		<summary type="html">&lt;p&gt;Ganderson: /* Seattle Academy */ Update for settings to Beta 4&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;=Seattle Academy=&lt;br /&gt;
Seattle Academy is an independent secondary school of approximately 560 students. The upper school has had a laptop program for all students since 1997 and has used Moodle since 2005. Here we document how we have configured and customized Moodle 1.9 to best serve students and faculty in this environment.&lt;br /&gt;
 Note:  These are draft recommendations by Gary Anderson of Seattle Academy.&lt;br /&gt;
 They will be reviewed for final consideration and implementation by our technology&lt;br /&gt;
 staff in consultation with the other teaching faculty.&lt;br /&gt;
==Server Configuration==&lt;br /&gt;
===Default Settings===&lt;br /&gt;
 These settings apply to Moodle 1.9 Beta4 which is still in development.&lt;br /&gt;
 In some cases, the default settings may change and so some of these&lt;br /&gt;
 customizations may not need to be changed and would be for reference only.&lt;br /&gt;
 As we were early users of 1.9 on a school production server, a number of our&lt;br /&gt;
 default suggestions have been applied to Moodle base code as as appropriate.&lt;br /&gt;
====Site Administration Block====&lt;br /&gt;
=====Grade category settings=====&lt;br /&gt;
* Hide forced settings - Yes&lt;br /&gt;
We like to keep the interface simple for teachers, so those settings that cannot be changed are not visible.&lt;br /&gt;
* Aggregation - Simple weighted mean of grades -- not advanced&lt;br /&gt;
This is not designated as advanced because teachers will want to set courses to &amp;quot;Weighted mean of grades&amp;quot; if they assign different weight to grading categories like &amp;quot;Daily Work&amp;quot; and &amp;quot;Exams&amp;quot;.&lt;br /&gt;
Simple weighted mean of grades is probably better called &amp;quot;Average of points&amp;quot;.  It does the common computation of taking the number of points (or marks) earned divided by the number of points possible.  This should not be confused with what is called &amp;quot;Mean of grades&amp;quot; which is probably better called &amp;quot;Average of percents&amp;quot;.  With this computation, grades are normalized to a percentage and then averaged.&lt;br /&gt;
* Aggregate only non-empty grades - Yes -- Advanced&lt;br /&gt;
If an activity is yet to be marked, it is not factored into the students grade.  If the activity shoudl earn no credit, the teacher would give the activity a zero.&lt;br /&gt;
This would be marked No in the less common case that the teacher wanted activities to be given a score of zero until they are marked.&lt;br /&gt;
* Include outcomes in aggregation - No, Force,advanced&lt;br /&gt;
Our school does not use outcomes, so we hide these settings under an advanced setting.  Since outcomes adds elements to the user interface for teachers and make the gradebook more complicated when used, we force it to hide the feature.&lt;br /&gt;
* Aggregate including subcategories - No, advanced&lt;br /&gt;
Having this featured turned on causes Mean of grades not compute grades if grading categories are used (unless every activity is manually given a grade).&lt;br /&gt;
* Keep the highest - none, advanced&lt;br /&gt;
This option is seldom used.&lt;br /&gt;
* Drop lowest - none, advanced&lt;br /&gt;
While this option is more common, we keep it as advanced to simplify the interface for most users.&lt;br /&gt;
=====Grade item settings=====&lt;br /&gt;
*Grade display type: Real&lt;br /&gt;
However, category summaries are normally percentages (including course summaries), so teacher must manually set these up when setting up their gradebooks.&lt;br /&gt;
Advanced grade item options:  We use the defaults excpet for &amp;quot;Grade display type&amp;quot; which is set to not be advanced because teachers must set these for category and course summaries.&lt;br /&gt;
&lt;br /&gt;
=====Scales=====&lt;br /&gt;
* Remove: Separate and Connected Way of Knowing&lt;br /&gt;
This must be here for historical reasons in Moodle&#039;s development.  We don&#039;t know what it is and will not use it.  This must be done before the scale is used in a course.&lt;br /&gt;
* Added:  Not Submitted, Submitted&lt;br /&gt;
Seattle Academy faculty are expected to, at a minimum, let people know the status of a student&#039;s assignment submissions in Moodle.  With this setting, activities can be marked as satisfactorily submitted or not.  Potentially, submitted could be treated as 100% for that assignment and not submitted as 0%, so the percent of submitted assignments could be reported.&lt;br /&gt;
=====Grader report=====&lt;br /&gt;
* We use all the defaults except Column average display type is Percentage&lt;br /&gt;
&lt;br /&gt;
===Custom patches to the code===&lt;br /&gt;
To do:  Add this section.  Seattle Academy has several dozen customizations to the Moodle code for the high school environment, in many cases posting them to Moodle tracker for future versions..&lt;br /&gt;
===Selection of blocks and modules===&lt;br /&gt;
===Custom blocks===&lt;br /&gt;
To do:  Add this.  We have a half-dozen custom blocks for reporting status on assignments, attendance, and other progress indicators to ease the use of Moodle in a high school environment.&lt;/div&gt;</summary>
		<author><name>Ganderson</name></author>
	</entry>
	<entry>
		<id>https://docs.moodle.org/dev/index.php?title=Developer_documentation&amp;diff=565</id>
		<title>Developer documentation</title>
		<link rel="alternate" type="text/html" href="https://docs.moodle.org/dev/index.php?title=Developer_documentation&amp;diff=565"/>
		<updated>2008-01-13T03:40:03Z</updated>

		<summary type="html">&lt;p&gt;Ganderson: /* Resources and tools */ Change cvs reference to new server&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;&amp;lt;p class=&amp;quot;note&amp;quot;&amp;gt;&#039;&#039;&#039;Note:&#039;&#039;&#039; New developer documentation pages should be added to the &#039;&#039;Development namespace&#039;&#039; by typing &amp;lt;code&amp;gt;Development:&amp;lt;/code&amp;gt; before the new page name i.e. &amp;lt;code&amp;gt;&amp;lt;nowiki&amp;gt;[[New page name]]&amp;lt;/nowiki&amp;gt;&amp;lt;/code&amp;gt;.&amp;lt;br /&amp;gt;&amp;lt;br /&amp;gt;If you are a developer, you probably want to change your [[Special:Preferences|preferences]] to include the Development namespace in searches.&amp;lt;br /&amp;gt;&amp;lt;br /&amp;gt;A page may be added to the Developer category by typing &amp;lt;code&amp;gt;&amp;lt;nowiki&amp;gt;[[Category:New page name]]&amp;lt;/nowiki&amp;gt;&amp;lt;/code&amp;gt; at the bottom of the page.&amp;lt;/p&amp;gt;&lt;br /&gt;
&lt;br /&gt;
==How Moodle development works==&lt;br /&gt;
&lt;br /&gt;
This [[Overview|overview of the Moodle development process]] may be handy in understanding how the development of Moodle occurs and how people become Moodle developers.&lt;br /&gt;
&lt;br /&gt;
==Guidelines==&lt;br /&gt;
&lt;br /&gt;
The following guidelines are crucial reading for anyone wanting to contribute to the Moodle code base:&lt;br /&gt;
*[[Coding|Coding guidelines]] have to be followed by all Moodle developers&lt;br /&gt;
*[[Moodle design goals]] spells out the basic design goals behind Moodle&lt;br /&gt;
*[[Interface guidelines]] aim to provide a common feel to the Moodle user interface&lt;br /&gt;
*[[CVS (developer)|Moodle CVS for developers]] explains how to work with the Moodle code in CVS&lt;br /&gt;
*[[Tracker]] explains the Moodle Tracker for keeping track of bugs, issues, feature requests etc&lt;br /&gt;
*[[Working with the Community|Working with the Community]] explains how to engage with the dev community and discuss changes&lt;br /&gt;
*[[Unit tests|Unit tests]] explains how to run the unit tests, and how to write new test cases.&lt;br /&gt;
&lt;br /&gt;
==Documentation for core components==&lt;br /&gt;
&lt;br /&gt;
This section is for documentation of specific components of the existing core Moodle code. Discussion of components that are under discussion or in development can be found in the [[Developer notes]] or on the [[Roadmap]].&lt;br /&gt;
&lt;br /&gt;
The documents below give a general overview. For detailed function-by-function documentation, see the [http://phpdocs.moodle.org/ phpDocumentor] documentation that is automatically generated from the comments in the code. And don&#039;t forget that the most up-to-date and detailed description of how the code works is the code itself, and you can [http://xref.moodle.org/nav.html?index.html browse the code online using phpXRef]. Moodle code should be easy to read and understand. Use the source, Luke!&lt;br /&gt;
&lt;br /&gt;
===Core components that affect everything===&lt;br /&gt;
&lt;br /&gt;
*[[Database schema introduction|The database schema]]&lt;br /&gt;
*lib/moodlelib.php &lt;br /&gt;
*[[lib/weblib.php|lib/weblib.php]] for outputting stuff.&lt;br /&gt;
*[[XMLDB_Documentation|Database abstraction layer]] @ v[[1.7]]&lt;br /&gt;
*[[Roles|Roles and Capabilities system]] @ v[[1.7]] for controlling who can do what.&lt;br /&gt;
*[[lib/formslib.php|Forms library]] @ v[[1.8]] for creating accessible and secure HTML forms that let users edit things.&lt;br /&gt;
&lt;br /&gt;
===Core libraries with a more specific uses===&lt;br /&gt;
&lt;br /&gt;
*[[Authentication API]]&lt;br /&gt;
*[[Cookieless Sessions]]&lt;br /&gt;
*[[Email processing]]&lt;br /&gt;
*[[Environment checking|Environment checking]] before install, check the user&#039;s server to ensure Moodle will work there.&lt;br /&gt;
*[[Groups|Groups system]]&lt;br /&gt;
*[[Grades|Gradebook]]&lt;br /&gt;
*[[Moodle Network|Moodle Network]]&lt;br /&gt;
*[[Question engine]]&lt;br /&gt;
*[[Stats package]]&lt;br /&gt;
*[[UTF-8 migration|Migration to UTF-8]] @ v[[:Category:Moodle 1.6|1.6]]&lt;br /&gt;
*[http://developer.yahoo.com/yui YUI JavaScript library] - YUI was selected as the official AJAX library for Moodle.&lt;br /&gt;
*[[lib/graphlib|lib/graphlib]]&lt;br /&gt;
&lt;br /&gt;
===Modules included in the standard distribution===&lt;br /&gt;
&lt;br /&gt;
*[[Quiz developer docs|Quiz module]]&lt;br /&gt;
*[[SCORM schema|SCORM module 1.5 schema]]&lt;br /&gt;
&lt;br /&gt;
==How you can contribute==&lt;br /&gt;
&lt;br /&gt;
===Make a new plugin===&lt;br /&gt;
&lt;br /&gt;
The M in Moodle stands for modular, and the easiest, most maintainable way to add new functionality to Moodle is by using one of the many plugin APIs. There are many types of plugin you can write:&lt;br /&gt;
*[[Modules|Activity modules]]&lt;br /&gt;
*[[Admin reports|Admin reports]]&lt;br /&gt;
*[[Assignment types|Assignment types]]&lt;br /&gt;
*[[Authentication plugins|Authentication plugins]]&lt;br /&gt;
*[[Blocks|Blocks]]&lt;br /&gt;
*[[Course formats]]&lt;br /&gt;
*[[Course Report Plugins|Course reports]]&lt;br /&gt;
*[[Database fields|Database fields]]&lt;br /&gt;
*[[Database presets|Database presets]]&lt;br /&gt;
*[[Enrolment plugins|Enrolment plugins]]&lt;br /&gt;
*[[Filters|Filters]]&lt;br /&gt;
*[[Gradebook plugins|Gradebook plugins]]&lt;br /&gt;
**[[Gradebook report|Gradebook report]]&lt;br /&gt;
**[[Gradebook export|Gradebook export]]&lt;br /&gt;
**[[Gradebook import|Gradebook import]]&lt;br /&gt;
*[[Question engine|Question engine]]&lt;br /&gt;
*[[Question import/export formats|Question import/export formats]]&lt;br /&gt;
*[[How to write a quiz report plugin|Quiz reports]]&lt;br /&gt;
*[[Resource types|Resource types]]&lt;br /&gt;
*[[SSO plugins|SSO plugins]]&lt;br /&gt;
*[[Search engine adapters|Search engine adapters]]&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
When you have developed a new component please publish it in the [http://moodle.org/mod/data/view.php?id=6009 Moodle modules and plugins database].&lt;br /&gt;
&lt;br /&gt;
===Change core code===&lt;br /&gt;
&lt;br /&gt;
Some types of change can only be made by editing the core Moodle code. Such changes are much harder to maintain than plugins. If you want your core change to be considered for inclusion in the official Moodle release, you need to create an issue in the [[Tracker|tracker]], and attach your change as a [[How_to_create_a_patch|patch]]. It is also a good idea to discuss your ideas in the forums first.&lt;br /&gt;
&lt;br /&gt;
===Ways to contribute that do not involve PHP programming===&lt;br /&gt;
&lt;br /&gt;
*[[Themes|Create Moodle themes]]&lt;br /&gt;
*[[Translation|Translate Moodle into other languages]]&lt;br /&gt;
*[[MoodleDocs:Guidelines for contributors|Help document Moodle]]&lt;br /&gt;
*[[Database schemas|Database schemas]]&lt;br /&gt;
*[[Tests|Join the testing effort]], which involves [[Tracker|participating in the bug tracker]]&lt;br /&gt;
&lt;br /&gt;
==Plans for the future==&lt;br /&gt;
&lt;br /&gt;
Ideas for and details of planned future features of Moodle are initially discussed on the forums in the [http://moodle.org/course/view.php?id=5 Using Moodle] course at moodle.org. That developer discussions are intermixed with user discussions in the same forums may seem strange at first but is one of the reasons for the success of Moodle. It is important that both end-users and developers discuss the future features together.&lt;br /&gt;
&lt;br /&gt;
Once ideas begin to crystallize on the forums they can be summarized in this wiki, either as part of the [[Roadmap]] or in the form of [[Developer notes]]. These pages then form the basis for further discussion in the forums.&lt;br /&gt;
&lt;br /&gt;
*[[Roadmap]]&lt;br /&gt;
*[[Developer notes|Developer notes]]&lt;br /&gt;
*[[Student projects]]&lt;br /&gt;
*[[Developer conferences]]&lt;br /&gt;
&lt;br /&gt;
== Resources and tools ==&lt;br /&gt;
&lt;br /&gt;
*[[Developer FAQ]] - frequently asked questions, especially useful for newcomers to Moodle&lt;br /&gt;
*[[Finding_your_way_into_the_Moodle_code|Finding your way into the Moodle code]] - also aimed at newcomers&lt;br /&gt;
*[http://tracker.moodle.org/ Moodle tracker] - bug reports, feature requests and other tracked issues&lt;br /&gt;
**[[Firefox tracker search]] - How to setup a firefox quicksearch to easily navigate to moodle bugs&lt;br /&gt;
*[[Unmerged files]] - changes on the stable branch in CVS that have not been merged to HEAD&lt;br /&gt;
*Browse the code online:&lt;br /&gt;
**[http://cvs.moodle.org/moodle/ the code with a complete change history from CVS]&lt;br /&gt;
**[http://xref.moodle.org/index.html the code, with links generated by PHPXref]&lt;br /&gt;
*[http://phpdocs.moodle.org/ Moodle PHP doc reference] - compiled from the comment attached to each class and function in the code&lt;br /&gt;
*[[Database Schema|Database Schema]] - for recent releases&lt;br /&gt;
*[http://moodle.org/course/view.php?id=5#4 Development news and discussion] section of Using Moodle course&lt;br /&gt;
**especially the [http://moodle.org/mod/forum/view.php?id=55 General developer forum]&lt;br /&gt;
**[[Filters used on the Moodle.org forums|cool tricks you can use in the moodle.org forums]]&lt;br /&gt;
*Some tools people use when working on Moodle code:&lt;br /&gt;
**[[Setting_up_Eclipse|Setting up Eclipse for Moodle development]] - Eclipse is a great editor to use for php development, if you can work out how to set it up.&lt;br /&gt;
**[[vim|Setting up Vim for Moodle development]]&lt;br /&gt;
**[[ctags|Ctags]] - Using a tags file to navigate code&lt;br /&gt;
**[[W3C_validation|W3C HTML validator]] - Moodle has built in support to make using it easier.&lt;br /&gt;
**Firebug plugin for Firefox.&lt;br /&gt;
&lt;br /&gt;
==See also==&lt;br /&gt;
&lt;br /&gt;
*[http://security.moodle.org/ Moodle Security Centre]&lt;br /&gt;
*[http://moodle.com/partners/ Moodle Partners] - providers of custom Moodle development services&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
[[es:Documentación para Desarrolladores]]&lt;br /&gt;
[[fr:Documentation développeur]]&lt;br /&gt;
[[zh:开发者文档]]&lt;br /&gt;
[[ja:開発者ドキュメント]]&lt;/div&gt;</summary>
		<author><name>Ganderson</name></author>
	</entry>
	<entry>
		<id>https://docs.moodle.org/dev/index.php?title=User:Gary_Anderson&amp;diff=20268</id>
		<title>User:Gary Anderson</title>
		<link rel="alternate" type="text/html" href="https://docs.moodle.org/dev/index.php?title=User:Gary_Anderson&amp;diff=20268"/>
		<updated>2007-11-23T22:30:44Z</updated>

		<summary type="html">&lt;p&gt;Ganderson: Added images and formated page&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;[[Image:GaryAndersonLava.jpg]]&lt;br /&gt;
&lt;br /&gt;
Gary Anderson is a native of Seattle, a graduate of the University of Washington with degrees in Math, Business Economics, and certification in history education.  He has a Master&#039;s degree in Teaching from Seattle University.  Before entering teaching in 1996, he was the General Manager of the largest computer store in the Pacific Northwest which sold a majority of Apple II and Macintosh computers to schools, businesses and individuals around the I-5 corridor.  He was also president of a software company that specialized in network communications.&lt;br /&gt;
&lt;br /&gt;
Teaching is the family business for Gary.  Both of his parents are retired teachers, and his brother is the principal of a middle school and his sister is an elementary school teacher.&lt;br /&gt;
His research interest is in the technology of instruction, and in particular the effects on student achievement when they receive rapid feedback on their performance.  He has designed a number of software projects in advancement of this effort.&lt;br /&gt;
&lt;br /&gt;
Gary is the head of the Math Department at Seattle Academy and incredible private, independent school that among many other things is in the 11th year of a universal laptop program for it&#039;s upper school.  He teaches Advance Algebra, Second Year Calculus, and elective trimesters in Statistics, Math Modeling and Software Development.  These math electives are the most popular electives in the school.&lt;br /&gt;
&lt;br /&gt;
For the past 3 years, Gary has been known as the Moodle Master and has customized the software to make it especially usable in the high school environment.  He is now turning over this responsibility to server administrator Karlene Clapp and Curriculum Technology Coordinator Vicki Butler so the he can focus on being more involved in the larger technology community, both contributing what he has learned from overseeing the school&#039;s Moodle project and to work on investigating best uses with the One Laptop per Child program among other things.&lt;br /&gt;
&lt;br /&gt;
[[Image:GaryAndersonMoodleMaster.jpg]]&lt;/div&gt;</summary>
		<author><name>Ganderson</name></author>
	</entry>
	<entry>
		<id>https://docs.moodle.org/dev/index.php?title=User:Gary_Anderson&amp;diff=20267</id>
		<title>User:Gary Anderson</title>
		<link rel="alternate" type="text/html" href="https://docs.moodle.org/dev/index.php?title=User:Gary_Anderson&amp;diff=20267"/>
		<updated>2007-11-23T22:17:38Z</updated>

		<summary type="html">&lt;p&gt;Ganderson: Gary Anderson Bio&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;Gary Anderson is a native of Seattle, a graduate of the University of Washington with degrees in Math, Business Economics, and certification in history education.  He has a Master&#039;s degree in Teaching from Seattle University.  Before entering teaching in 1996, he was the General Manager of the largest computer store in the Pacific Northwest which sold a majority of Apple II and Macintosh computers to schools, businesses and individuals around the I-5 corridor.  He was also president of a software company that specialized in network communications.&lt;br /&gt;
Teaching is the family business for Gary.  Both of his parents are retired teachers, and his brother is the principal of a middle school and his sister is an elementary school teacher.&lt;br /&gt;
His research interest is in the technology of instruction, and in particular the effects on student achievement when they receive rapid feedback on their performance.  He has designed a number of software projects in advancement of this effort.&lt;br /&gt;
Gary is the head of the Math Department at Seattle Academy and incredible private, independent school that among many other things is in the 11th year of a universal laptop program for it&#039;s upper school.  He teaches Advance Algebra, Second Year Calculus, and elective trimesters in Statistics, Math Modeling and Software Development.  These math electives are the most popular electives in the school.&lt;br /&gt;
For the past 3 years, Gary has been known as the Moodle Master and has customized the software to make it especially usable in the high school environment.  He is now turning over this responsibility to server administrator Karlene Clapp and Curriculum Technology Coordinator Vicki Butler so the he can focus on being more involved in the larger technology community, both contributing what he has learned from overseeing the school&#039;s Moodle project and to work on investigating best uses with the One Laptop per Child program among other things.&lt;/div&gt;</summary>
		<author><name>Ganderson</name></author>
	</entry>
	<entry>
		<id>https://docs.moodle.org/dev/index.php?title=Seattle_Academy&amp;diff=7493</id>
		<title>Seattle Academy</title>
		<link rel="alternate" type="text/html" href="https://docs.moodle.org/dev/index.php?title=Seattle_Academy&amp;diff=7493"/>
		<updated>2007-11-23T18:41:17Z</updated>

		<summary type="html">&lt;p&gt;Ganderson: /* Site Administration Block */ Grader report defaults&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;=Seattle Academy=&lt;br /&gt;
Seattle Academy is an independent secondary school of approximately 560 students. The upper school has had a laptop program for all students since 1997 and has used Moodle since 2005. Here we document how we have configured and customized Moodle 1.9 to best serve students and faculty in this environment.&lt;br /&gt;
 Note:  These are draft recommendations by Gary Anderson of Seattle Academy.&lt;br /&gt;
 They will be reviewed for final approval by our technology people in consultation&lt;br /&gt;
 with the other teaching faculty.&lt;br /&gt;
==Server Configuration==&lt;br /&gt;
===Default Settings===&lt;br /&gt;
 These settings apply to Moodle 1.9 beta2 which is still in development.&lt;br /&gt;
 In some cases, the default settings may change and so some of these&lt;br /&gt;
 customizations may not need to be changed and would be for reference only.&lt;br /&gt;
====Site Administration Block====&lt;br /&gt;
=====Grade category settings=====&lt;br /&gt;
* Hide forced settings - off&lt;br /&gt;
While this may be a useful setting for institutions that have uniformity in grading practices (as it could simplify the choices), our school, like most, give faculty considerable freedom in determining grading standards, hence we do not hide forced settings, using the default settings instead to ease course setup.&lt;br /&gt;
* Aggregation - Simple weighted mean of grades -- not advanced&lt;br /&gt;
Moodle core developers have come up with a new method of calculating grades, and call it mean of grades and have set it for the &#039;out of the box&#039; default.  It essentially converts each activity or graded item to a percentage before determining averages.  Hence a 100 point assignment is worth the same as a 10 point assignment.&lt;br /&gt;
Simple weighted mean of grades does the more common computation for schools of having the average be determined as point earned over points possible, hence it is the mean of points as opposed to the mean of percentages.  We rename these strings accordingly.&lt;br /&gt;
* Aggregate only non-empty grades - yes -- not advanced&lt;br /&gt;
Again, Moodle core developers have set the rather unusual &#039;out of the box&#039; setting of treating all ungraded items as zero, rather than just not factoring these items into the grade.  The means that most students will see a very low average until all items (including those not due yet are graded, typically at course completion.&lt;br /&gt;
The change of the setting to yes means that averages are only calculated on items that have been graded; teachers put in a score of zero when they want that computed into the grade.&lt;br /&gt;
  Note:  We are urging Moodle core reconsider the decisions prior to 1.9 going gold.&lt;br /&gt;
* Include outcomes in aggregation - no, advanced&lt;br /&gt;
Our school does not use outcomes, so we hide these settings under an advanced setting&lt;br /&gt;
* Aggregate including subcategories - yes, advanced&lt;br /&gt;
We typically don&#039;t anticipate the need for subcategories, but if a teacher uses them, they will probably divide things link homework into &amp;quot;first-half&amp;quot; and &amp;quot;second-half&amp;quot;, so including these in the overall average seems appropriate.&lt;br /&gt;
* Keep the highest - none, advanced&lt;br /&gt;
* Drop lowest -none, advanced&lt;br /&gt;
=====Scales=====&lt;br /&gt;
* Remove: Separate and Connected Way of Knowing&lt;br /&gt;
This must be here for historical reasons in Moodle&#039;s development.  We don&#039;t know what it is and will not use it.&lt;br /&gt;
* Added:  Not Submitted, Submitted&lt;br /&gt;
Seattle Academy faculty are expected to, at a minimum, let people know the status of a student&#039;s assignment submissions in Moodle.  With this setting, activities can be marked as satisfactorily submitted or not.  Potentially, submitted could be treated as 100% for that assignment and not submitted as 0%, so the percent of submitted assignments could be reported.&lt;br /&gt;
=====Grader report=====&lt;br /&gt;
* Students per page - 100&lt;br /&gt;
Classes at Seattle Academy or normally under 20, but sometimes multiple sections brings the number higher; our largest is our Chemistry class with about 90 students.  This setting lets a teacher view all grades at once without scrolling, and does not have too serious of an impact on the server.&lt;br /&gt;
* Grades Selected for Column Average -- Non-empty grades&lt;br /&gt;
This is an important setting as otherwise averages for assignments only make sense when all grading is completed, otherwise assignments not yet graded or those coming due later count as zero.  Recommendation: This default for Moodle as it ships should be reconsidered.&lt;br /&gt;
* Show column averages:  Yes.  This is a common enough setting so the teacher can see how the class did on an assignment.&lt;br /&gt;
* Show number of grade in average: yes&lt;br /&gt;
Especially with the above settings, having a count of graded assignments is helpful.&lt;br /&gt;
&lt;br /&gt;
===Custom patches to the code===&lt;br /&gt;
===Selection of blocks and modules===&lt;br /&gt;
===Custom blocks===&lt;/div&gt;</summary>
		<author><name>Ganderson</name></author>
	</entry>
	<entry>
		<id>https://docs.moodle.org/dev/index.php?title=Seattle_Academy&amp;diff=7492</id>
		<title>Seattle Academy</title>
		<link rel="alternate" type="text/html" href="https://docs.moodle.org/dev/index.php?title=Seattle_Academy&amp;diff=7492"/>
		<updated>2007-11-23T18:24:09Z</updated>

		<summary type="html">&lt;p&gt;Ganderson: /* Grade category settings */ Standard scale settings&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;=Seattle Academy=&lt;br /&gt;
Seattle Academy is an independent secondary school of approximately 560 students. The upper school has had a laptop program for all students since 1997 and has used Moodle since 2005. Here we document how we have configured and customized Moodle 1.9 to best serve students and faculty in this environment.&lt;br /&gt;
 Note:  These are draft recommendations by Gary Anderson of Seattle Academy.&lt;br /&gt;
 They will be reviewed for final approval by our technology people in consultation&lt;br /&gt;
 with the other teaching faculty.&lt;br /&gt;
==Server Configuration==&lt;br /&gt;
===Default Settings===&lt;br /&gt;
 These settings apply to Moodle 1.9 beta2 which is still in development.&lt;br /&gt;
 In some cases, the default settings may change and so some of these&lt;br /&gt;
 customizations may not need to be changed and would be for reference only.&lt;br /&gt;
====Site Administration Block====&lt;br /&gt;
=====Grade category settings=====&lt;br /&gt;
* Hide forced settings - off&lt;br /&gt;
While this may be a useful setting for institutions that have uniformity in grading practices (as it could simplify the choices), our school, like most, give faculty considerable freedom in determining grading standards, hence we do not hide forced settings, using the default settings instead to ease course setup.&lt;br /&gt;
* Aggregation - Simple weighted mean of grades -- not advanced&lt;br /&gt;
Moodle core developers have come up with a new method of calculating grades, and call it mean of grades and have set it for the &#039;out of the box&#039; default.  It essentially converts each activity or graded item to a percentage before determining averages.  Hence a 100 point assignment is worth the same as a 10 point assignment.&lt;br /&gt;
Simple weighted mean of grades does the more common computation for schools of having the average be determined as point earned over points possible, hence it is the mean of points as opposed to the mean of percentages.  We rename these strings accordingly.&lt;br /&gt;
* Aggregate only non-empty grades - yes -- not advanced&lt;br /&gt;
Again, Moodle core developers have set the rather unusual &#039;out of the box&#039; setting of treating all ungraded items as zero, rather than just not factoring these items into the grade.  The means that most students will see a very low average until all items (including those not due yet are graded, typically at course completion.&lt;br /&gt;
The change of the setting to yes means that averages are only calculated on items that have been graded; teachers put in a score of zero when they want that computed into the grade.&lt;br /&gt;
  Note:  We are urging Moodle core reconsider the decisions prior to 1.9 going gold.&lt;br /&gt;
* Include outcomes in aggregation - no, advanced&lt;br /&gt;
Our school does not use outcomes, so we hide these settings under an advanced setting&lt;br /&gt;
* Aggregate including subcategories - yes, advanced&lt;br /&gt;
We typically don&#039;t anticipate the need for subcategories, but if a teacher uses them, they will probably divide things link homework into &amp;quot;first-half&amp;quot; and &amp;quot;second-half&amp;quot;, so including these in the overall average seems appropriate.&lt;br /&gt;
* Keep the highest - none, advanced&lt;br /&gt;
* Drop lowest -none, advanced&lt;br /&gt;
=====Scales=====&lt;br /&gt;
* Remove: Separate and Connected Way of Knowing&lt;br /&gt;
This must be here for historical reasons in Moodle&#039;s development.  We don&#039;t know what it is and will not use it.&lt;br /&gt;
* Added:  Not Submitted, Submitted&lt;br /&gt;
Seattle Academy faculty are expected to, at a minimum, let people know the status of a student&#039;s assignment submissions in Moodle.  With this setting, activities can be marked as satisfactorily submitted or not.  Potentially, submitted could be treated as 100% for that assignment and not submitted as 0%, so the percent of submitted assignments could be reported.&lt;br /&gt;
&lt;br /&gt;
===Custom patches to the code===&lt;br /&gt;
===Selection of blocks and modules===&lt;br /&gt;
===Custom blocks===&lt;/div&gt;</summary>
		<author><name>Ganderson</name></author>
	</entry>
	<entry>
		<id>https://docs.moodle.org/dev/index.php?title=Seattle_Academy&amp;diff=7491</id>
		<title>Seattle Academy</title>
		<link rel="alternate" type="text/html" href="https://docs.moodle.org/dev/index.php?title=Seattle_Academy&amp;diff=7491"/>
		<updated>2007-11-23T18:04:32Z</updated>

		<summary type="html">&lt;p&gt;Ganderson: /* Grade category settings */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;=Seattle Academy=&lt;br /&gt;
Seattle Academy is an independent secondary school of approximately 560 students. The upper school has had a laptop program for all students since 1997 and has used Moodle since 2005. Here we document how we have configured and customized Moodle 1.9 to best serve students and faculty in this environment.&lt;br /&gt;
 Note:  These are draft recommendations by Gary Anderson of Seattle Academy.&lt;br /&gt;
 They will be reviewed for final approval by our technology people in consultation&lt;br /&gt;
 with the other teaching faculty.&lt;br /&gt;
==Server Configuration==&lt;br /&gt;
===Default Settings===&lt;br /&gt;
 These settings apply to Moodle 1.9 beta2 which is still in development.&lt;br /&gt;
 In some cases, the default settings may change and so some of these&lt;br /&gt;
 customizations may not need to be changed and would be for reference only.&lt;br /&gt;
====Site Administration Block====&lt;br /&gt;
=====Grade category settings=====&lt;br /&gt;
* Hide forced settings - off&lt;br /&gt;
While this may be a useful setting for institutions that have uniformity in grading practices (as it could simplify the choices), our school, like most, give faculty considerable freedom in determining grading standards, hence we do not hide forced settings, using the default settings instead to ease course setup.&lt;br /&gt;
* Aggregation - Simple weighted mean of grades -- not advanced&lt;br /&gt;
Moodle core developers have come up with a new method of calculating grades, and call it mean of grades and have set it for the &#039;out of the box&#039; default.  It essentially converts each activity or graded item to a percentage before determining averages.  Hence a 100 point assignment is worth the same as a 10 point assignment.&lt;br /&gt;
Simple weighted mean of grades does the more common computation for schools of having the average be determined as point earned over points possible, hence it is the mean of points as opposed to the mean of percentages.  We rename these strings accordingly.&lt;br /&gt;
* Aggregate only non-empty grades - yes -- not advanced&lt;br /&gt;
Again, Moodle core developers have set the rather unusual &#039;out of the box&#039; setting of treating all ungraded items as zero, rather than just not factoring these items into the grade.  The means that most students will see a very low average until all items (including those not due yet are graded, typically at course completion.&lt;br /&gt;
The change of the setting to yes means that averages are only calculated on items that have been graded; teachers put in a score of zero when they want that computed into the grade.&lt;br /&gt;
  Note:  We are urging Moodle core reconsider the decisions prior to 1.9 going gold.&lt;br /&gt;
* Include outcomes in aggregation - no, advanced&lt;br /&gt;
Our school does not use outcomes, so we hide these settings under an advanced setting&lt;br /&gt;
* Aggregate including subcategories - yes, advanced&lt;br /&gt;
We typically don&#039;t anticipate the need for subcategories, but if a teacher uses them, they will probably divide things link homework into &amp;quot;first-half&amp;quot; and &amp;quot;second-half&amp;quot;, so including these in the overall average seems appropriate.&lt;br /&gt;
* Keep the highest - none, advanced&lt;br /&gt;
* Drop lowest -none, advanced&lt;br /&gt;
&lt;br /&gt;
===Custom patches to the code===&lt;br /&gt;
===Selection of blocks and modules===&lt;br /&gt;
===Custom blocks===&lt;/div&gt;</summary>
		<author><name>Ganderson</name></author>
	</entry>
	<entry>
		<id>https://docs.moodle.org/dev/index.php?title=Seattle_Academy&amp;diff=7490</id>
		<title>Seattle Academy</title>
		<link rel="alternate" type="text/html" href="https://docs.moodle.org/dev/index.php?title=Seattle_Academy&amp;diff=7490"/>
		<updated>2007-11-23T18:00:35Z</updated>

		<summary type="html">&lt;p&gt;Ganderson: /* Server Configuration */ Draft notice&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;=Seattle Academy=&lt;br /&gt;
Seattle Academy is an independent secondary school of approximately 560 students. The upper school has had a laptop program for all students since 1997 and has used Moodle since 2005. Here we document how we have configured and customized Moodle 1.9 to best serve students and faculty in this environment.&lt;br /&gt;
 Note:  These are draft recommendations by Gary Anderson of Seattle Academy.&lt;br /&gt;
 They will be reviewed for final approval by our technology people in consultation&lt;br /&gt;
 with the other teaching faculty.&lt;br /&gt;
==Server Configuration==&lt;br /&gt;
===Default Settings===&lt;br /&gt;
 These settings apply to Moodle 1.9 beta2 which is still in development.&lt;br /&gt;
 In some cases, the default settings may change and so some of these&lt;br /&gt;
 customizations may not need to be changed and would be for reference only.&lt;br /&gt;
====Site Administration Block====&lt;br /&gt;
=====Grade category settings=====&lt;br /&gt;
* Hide forced settings - off&lt;br /&gt;
While this may be a useful setting for institutions that have uniformity in grading practices (as it could simplify the choices), our school, like most, give faculty considerable freedom in determining grading standards, hence we do not hide forced settings, using the default settings instead to ease course setup.&lt;br /&gt;
* Aggregation - Simple weighted mean of grades -- not advanced&lt;br /&gt;
Moodle core developers have come up with a new method of calculating grades, and call it mean of grades and have set it for the &#039;out of the box&#039; default.  It essentially converts each activity or graded item to a percentage before determining averages.  Hence a 100 point assignment is worth the same as a 10 point assignment.&lt;br /&gt;
Simple weighted mean of grades does the more common computation for schools of having the average be determined as point earned over points possible, hence it is the mean of points as opposed to the mean of percentages.  We rename these strings accordingly.&lt;br /&gt;
* Aggregate only non-empty grades - yes -- not advanced&lt;br /&gt;
Again, Moodle core developers have set the rather unusual &#039;out of the box&#039; setting of treating all ungraded items as zero, rather than just not factoring these items into the grade.  The means that most students will see a very low average until all items (including those not due yet are graded, typically at course completion.&lt;br /&gt;
The change of the setting to yes means that averages are only calculated on items that have been graded; teachers put in a score of zero when they want that computed into the grade.&lt;br /&gt;
  Note:  We are urging Moodle core reconsider this decision&lt;br /&gt;
* Include outcomes in aggregation - no, advanced&lt;br /&gt;
Our school does not use outcomes, so we hide these settings under an advanced setting&lt;br /&gt;
* Aggregate including subcategories - yes, advanced&lt;br /&gt;
We typically don&#039;t anticipate the need for subcategories, but if a teacher uses them, they will probably divide things link homework into &amp;quot;first-half&amp;quot; and &amp;quot;second-half&amp;quot;, so including these in the overall average seems appropriate.&lt;br /&gt;
* Keep the highest - none, advanced&lt;br /&gt;
* Drop lowest -none, advanced&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
===Custom patches to the code===&lt;br /&gt;
===Selection of blocks and modules===&lt;br /&gt;
===Custom blocks===&lt;/div&gt;</summary>
		<author><name>Ganderson</name></author>
	</entry>
	<entry>
		<id>https://docs.moodle.org/dev/index.php?title=Seattle_Academy&amp;diff=7489</id>
		<title>Seattle Academy</title>
		<link rel="alternate" type="text/html" href="https://docs.moodle.org/dev/index.php?title=Seattle_Academy&amp;diff=7489"/>
		<updated>2007-11-23T17:54:04Z</updated>

		<summary type="html">&lt;p&gt;Ganderson: /* Seattle Academy */ Begin Default Settings discussion&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;=Seattle Academy=&lt;br /&gt;
Seattle Academy is an independent secondary school of approximately 560 students. The upper school has had a laptop program for all students since 1997 and has used Moodle since 2005. Here we document how we have configured and customized Moodle 1.9 to best serve students and faculty in this environment.&lt;br /&gt;
==Server Configuration==&lt;br /&gt;
===Default Settings===&lt;br /&gt;
 These settings apply to Moodle 1.9 beta2 which is still in development.&lt;br /&gt;
 In some cases, the default settings may change and so some of these&lt;br /&gt;
 customizations may not need to be changed and would be for reference only.&lt;br /&gt;
====Site Administration Block====&lt;br /&gt;
=====Grade category settings=====&lt;br /&gt;
* Hide forced settings - off&lt;br /&gt;
While this may be a useful setting for institutions that have uniformity in grading practices (as it could simplify the choices), our school, like most, give faculty considerable freedom in determining grading standards, hence we do not hide forced settings, using the default settings instead to ease course setup.&lt;br /&gt;
* Aggregation - Simple weighted mean of grades -- not advanced&lt;br /&gt;
Moodle core developers have come up with a new method of calculating grades, and call it mean of grades and have set it for the &#039;out of the box&#039; default.  It essentially converts each activity or graded item to a percentage before determining averages.  Hence a 100 point assignment is worth the same as a 10 point assignment.&lt;br /&gt;
Simple weighted mean of grades does the more common computation for schools of having the average be determined as point earned over points possible, hence it is the mean of points as opposed to the mean of percentages.  We rename these strings accordingly.&lt;br /&gt;
* Aggregate only non-empty grades - yes -- not advanced&lt;br /&gt;
Again, Moodle core developers have set the rather unusual &#039;out of the box&#039; setting of treating all ungraded items as zero, rather than just not factoring these items into the grade.  The means that most students will see a very low average until all items (including those not due yet are graded, typically at course completion.&lt;br /&gt;
The change of the setting to yes means that averages are only calculated on items that have been graded; teachers put in a score of zero when they want that computed into the grade.&lt;br /&gt;
  Note:  We are urging Moodle core reconsider this decision&lt;br /&gt;
* Include outcomes in aggregation - no, advanced&lt;br /&gt;
Our school does not use outcomes, so we hide these settings under an advanced setting&lt;br /&gt;
* Aggregate including subcategories - yes, advanced&lt;br /&gt;
We typically don&#039;t anticipate the need for subcategories, but if a teacher uses them, they will probably divide things link homework into &amp;quot;first-half&amp;quot; and &amp;quot;second-half&amp;quot;, so including these in the overall average seems appropriate.&lt;br /&gt;
* Keep the highest - none, advanced&lt;br /&gt;
* Drop lowest -none, advanced&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
===Custom patches to the code===&lt;br /&gt;
===Selection of blocks and modules===&lt;br /&gt;
===Custom blocks===&lt;/div&gt;</summary>
		<author><name>Ganderson</name></author>
	</entry>
	<entry>
		<id>https://docs.moodle.org/dev/index.php?title=Seattle_Academy&amp;diff=7488</id>
		<title>Seattle Academy</title>
		<link rel="alternate" type="text/html" href="https://docs.moodle.org/dev/index.php?title=Seattle_Academy&amp;diff=7488"/>
		<updated>2007-11-23T16:25:33Z</updated>

		<summary type="html">&lt;p&gt;Ganderson: &lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;=Seattle Academy=&lt;br /&gt;
Seattle Academy is an independent secondary school of approximately 560 students. The upper school has had a laptop program for all students since 1997 and has used Moodle since 2005. Here we document how we have configured and customized Moodle 1.9 to best serve students and faculty in this environment.&lt;br /&gt;
==Server Configuration&lt;br /&gt;
===Default Settings&lt;br /&gt;
===Custom patches to the code===&lt;br /&gt;
===Selection of blocks and modules===&lt;br /&gt;
===Custom blocks===&lt;/div&gt;</summary>
		<author><name>Ganderson</name></author>
	</entry>
	<entry>
		<id>https://docs.moodle.org/dev/index.php?title=lib/formslib.php_Form_Definition&amp;diff=5784</id>
		<title>lib/formslib.php Form Definition</title>
		<link rel="alternate" type="text/html" href="https://docs.moodle.org/dev/index.php?title=lib/formslib.php_Form_Definition&amp;diff=5784"/>
		<updated>2007-10-28T11:46:20Z</updated>

		<summary type="html">&lt;p&gt;Ganderson: /* textarea */ intro changed to introduction to not conflict with earlier button&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;{{Formslib}}&lt;br /&gt;
==definition()==&lt;br /&gt;
&lt;br /&gt;
The definition of the elements to be included in the form, their &#039;types&#039; (PARAM_*), helpbuttons included, etc is all included in a function you must define in your class &#039;definition();&#039;&lt;br /&gt;
&lt;br /&gt;
definition() is used to define the elements in the form and &#039;&#039;&#039;this definition will be used for validating data submitted as well as for printing the form.&#039;&#039;&#039; For select and checkbox type elements only data that could have been selected will be allowed. And only data that corresponds to a form element in the defintion will be accepted as submitted data.&lt;br /&gt;
&lt;br /&gt;
The definition() should include all elements that are going to be used on form, some elements may be removed or tweaked later in definition_after_data(). Please do not create conditional elements in definition(), the definition() should not directly depend on the submitted data.&lt;br /&gt;
&lt;br /&gt;
==Use Fieldsets to group Form Elements==&lt;br /&gt;
&lt;br /&gt;
You use code like this to open a fieldset with a legend.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
//-------------------------------------------------------------------------------&lt;br /&gt;
        $mform-&amp;gt;addElement(&#039;header&#039;, &#039;nameforyourheaderelement&#039;, get_string(&#039;titleforlegened&#039;, &#039;modulename&#039;));&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
You can&#039;t yet nest these visible fieldsets unfortunately. But in fact groups of elements are wrapped in invisible fieldsets.&lt;br /&gt;
&lt;br /&gt;
You close a fieldset with moodle_form&#039;s closeHeaderBefore method. You tell closeHeaderBefore the element before you wish to end the fieldset. A fieldset is automatically closed if you open a new one. You need to use this code only if you want to close a fieldset and the subsequent form elements are not to be enclosed by a visible fieldset (they are still enclosed with an invisibe one with no legend) :&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
        $mform-&amp;gt;closeHeaderBefore(&#039;buttonar&#039;);&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
==addElement==&lt;br /&gt;
&lt;br /&gt;
Use the addElement method to add a an element to a form. The first few arguments are always the same. The first param is the type of the element to add. The second is the elementname to use which is normally the html name of the element in the form. The third is often the text for the label for the element.&lt;br /&gt;
&lt;br /&gt;
Some examples are below :&lt;br /&gt;
===button===&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
            $mform-&amp;gt;addElement(&#039;button&#039;, &#039;intro&#039;, get_string(&amp;quot;buttonlabel&amp;quot;));&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
A button element. If you want a submit or cancel button see &#039;submit&#039; element. &lt;br /&gt;
&lt;br /&gt;
===checkbox===&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
        $mform-&amp;gt;addElement(&#039;checkbox&#039;, &#039;ratingtime&#039;, get_string(&#039;ratingtime&#039;, &#039;forum&#039;));&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
This is a simple checkbox. The third param for this element is the label to display on the left side of the form. You can also supply a string as a fourth param to specify a label that will appear on the right of the element. Checkboxes and radio buttons can be grouped and have individual labels on their right.&lt;br /&gt;
&lt;br /&gt;
===choosecoursefile===&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
        $mform-&amp;gt;addElement(&#039;choosecoursefile&#039;, &#039;mediafile&#039;, get_string(&#039;mediafile&#039;, &#039;lesson&#039;), array(&#039;courseid&#039;=&amp;gt;$COURSE-&amp;gt;id));&lt;br /&gt;
&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Choose a file from the course files area. The fourth option is a list of options for the element. &lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
array(&#039;courseid&#039;=&amp;gt;null,\\if it is null (default then use globabl $COURSE&lt;br /&gt;
 &#039;height&#039;=&amp;gt;500,\\ height of the popup window&lt;br /&gt;
 &#039;width&#039;=&amp;gt;750, \\ width of the popup window&lt;br /&gt;
&#039;options&#039;=&amp;gt;&#039;none&#039;);\\options string for the pop up window &lt;br /&gt;
                   \\eg. &#039;menubar=0,location=0,scrollbars,resizable&#039;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
===date_selector===&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
        $mform-&amp;gt;addElement(&#039;date_selector&#039;, &#039;assesstimefinish&#039;, get_string(&#039;to&#039;));&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
This is a date selector. You can select a Day, month and year using a group of select boxes. The fourth param here is an array of options. The defaults for the options are :&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;array(&#039;startyear&#039;=&amp;gt;1970, &#039;stopyear&#039;=&amp;gt;2020,&lt;br /&gt;
                    &#039;timezone&#039;=&amp;gt;99, &#039;applydst&#039;=&amp;gt;true);&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
You can override these defaults by supplying an array as fourth param with one or more keys with a value to override the default. You can supply a fifth param of attributes here as well.&lt;br /&gt;
&lt;br /&gt;
===date_time_selector===&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
        $mform-&amp;gt;addElement(&#039;date_time_selector&#039;, &#039;assesstimestart&#039;, get_string(&#039;from&#039;));&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
This is a group of select boxes to select a date (Day Month and Year)and time (Hour and Minute). When submitted, submitted data is processed and a timestamp is passed to $form-&amp;gt;get_data(); The fourth param here is an array of options. The defaults for the options are :&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;array(&#039;startyear&#039;=&amp;gt;1970, &#039;stopyear&#039;=&amp;gt;2020,&lt;br /&gt;
                    &#039;timezone&#039;=&amp;gt;99, &#039;applydst&#039;=&amp;gt;true, &#039;step&#039;=&amp;gt;5);&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
You can override these defaults by supplying an array as fourth param with one or more keys with a value to override the default. You can supply a fifth param of attributes here as well.&lt;br /&gt;
&lt;br /&gt;
===file===&lt;br /&gt;
&lt;br /&gt;
File upload input box with browse button. In the form definition type&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
            $mform-&amp;gt;addElement(&#039;file&#039;, &#039;attachment&#039;, get_string(&#039;attachment&#039;, &#039;forum&#039;));&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
after form submission and validation use&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
            if ($data = $mform-&amp;gt;get_data()) {&lt;br /&gt;
              ...&lt;br /&gt;
              $mform-&amp;gt;save_files($destination_directory);&lt;br /&gt;
              ...&lt;br /&gt;
            }&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
If you need advanced settings such as required file, different max upload size or name of uploaded file&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
            $this-&amp;gt;set_upload_manager(new upload_manager(&#039;attachment&#039;, true, false, $COURSE, false, 0, true, true, false));&lt;br /&gt;
            $mform-&amp;gt;addElement(&#039;file&#039;, &#039;attachment&#039;, get_string(&#039;attachment&#039;, &#039;forum&#039;));&lt;br /&gt;
            $mform-&amp;gt;addRule(&#039;attachment&#039;, null, &#039;required&#039;);&lt;br /&gt;
&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
            if ($data = $mform-&amp;gt;get_data()) {&lt;br /&gt;
              ...&lt;br /&gt;
              $mform-&amp;gt;save_files($destination_directory);&lt;br /&gt;
              $newfilename = $mform-&amp;gt;get_new_filename();&lt;br /&gt;
              ...&lt;br /&gt;
            }&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
When porting old code it is also possible to use the upload manager directly for processing of uploaded files.&lt;br /&gt;
&lt;br /&gt;
Please note that if using set_upload_manager() it must be before addElement(&#039;file&#039;,..).&lt;br /&gt;
&lt;br /&gt;
===hidden===&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
         $mform-&amp;gt;addElement(&#039;hidden&#039;, &#039;reply&#039;, &#039;yes&#039;);&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
A hidden element. Set the element name (in this case &#039;&#039;&#039;reply&#039;&#039;&#039;) to the stated value (in this case &#039;&#039;&#039;yes&#039;&#039;&#039;).&lt;br /&gt;
&lt;br /&gt;
===htmleditor &amp;amp; format===&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
        $mform-&amp;gt;addElement(&#039;htmleditor&#039;, &#039;text&#039;, get_string(&#039;choicetext&#039;, &#039;choice&#039;));&lt;br /&gt;
        $mform-&amp;gt;setType(&#039;text&#039;, PARAM_RAW);&lt;br /&gt;
	$mform-&amp;gt;addRule(&#039;text&#039;, null, &#039;required&#039;, null, &#039;client&#039;);&lt;br /&gt;
&lt;br /&gt;
        $mform-&amp;gt;addElement(&#039;format&#039;, &#039;format&#039;, get_string(&#039;format&#039;));&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
You can supply a fourth param to htmleditor of an array of options :&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
array(&#039;canUseHtmlEditor&#039;=&amp;gt;&#039;detect&#039;,&#039;rows&#039;=&amp;gt;10, &#039;cols&#039;=&amp;gt;65, &lt;br /&gt;
&#039;width&#039;=&amp;gt;0,&#039;height&#039;=&amp;gt;0, &#039;course&#039;=&amp;gt;0);&lt;br /&gt;
//options same as print_textarea params&lt;br /&gt;
//use rows and cols options to control htmleditor size.&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
===modgrade===&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
        $mform-&amp;gt;addElement(&#039;modgrade&#039;, &#039;scale&#039;, get_string(&#039;grade&#039;), false);&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
This is a custom element for selecting a grade for any activity module. The fourth argument is whether to include an option for no grade which has a value 0. This select box does include scales. The default is true, include no grade option.&lt;br /&gt;
&lt;br /&gt;
A helpbutton is automatically added.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
===password===&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
         $mform-&amp;gt;addElement(&#039;password&#039;, &#039;password&#039;, get_string(&#039;label&#039;), $attributes);&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
A password element. Fourth param is an array or string of attributes.&lt;br /&gt;
&lt;br /&gt;
===passwordunmask===&lt;br /&gt;
{{Moodle 1.9}}&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
         $mform-&amp;gt;addElement(&#039;passwordunmask&#039;, &#039;password&#039;, get_string(&#039;label&#039;), $attributes);&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
A password element with option to show the password in plaintext. Fourth param is an array or string of attributes.&lt;br /&gt;
&lt;br /&gt;
===radio===&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
        $radioarray=array();&lt;br /&gt;
        $radioarray[] = &amp;amp;MoodleQuickForm::createElement(&#039;radio&#039;, &#039;yesno&#039;, &#039;&#039;, get_string(&#039;yes&#039;), 1, $attributes);&lt;br /&gt;
        $radioarray[] = &amp;amp;MoodleQuickForm::createElement(&#039;radio&#039;, &#039;yesno&#039;, &#039;&#039;, get_string(&#039;no&#039;), 0, $attributes);&lt;br /&gt;
        $mform-&amp;gt;addGroup($radioarray, &#039;radioar&#039;, &#039;&#039;, array(&#039; &#039;), false);&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Second param names the radio button and should be the same for each button in the group in order to toggle correctly. Third param would be the label for the form element but is generally ignored as this element will always be in a group which has it&#039;s own label. Fourth param is a string, a label to be displayed on the right of the element. The fifth is the value for this radio button. $attributes can be a string or an array of attributes.&lt;br /&gt;
&lt;br /&gt;
===select===&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
        $mform-&amp;gt;addElement(&#039;select&#039;, &#039;type&#039;, get_string(&#039;forumtype&#039;, &#039;forum&#039;), $FORUM_TYPES, $attributes);&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
The fourth param for this element is an array of options for the select box. The keys are the values for the option and the value of the array is the text for the option. The fifth param $attributes is optional, see text element for description of attributes param.&lt;br /&gt;
&lt;br /&gt;
===selectyesno===&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
        $mform-&amp;gt;addElement(&#039;selectyesno&#039;, &#039;maxbytes&#039;, get_string(&#039;maxattachmentsize&#039;, &#039;forum&#039;));&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
If you want a yes / no select box this one automatically translates itself and has value 1 for yes and 0 for no.&lt;br /&gt;
&lt;br /&gt;
===static===&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
         $mform-&amp;gt;addElement(&#039;static&#039;, &#039;description&#039;, get_string(&#039;description&#039;, &#039;exercise&#039;),&lt;br /&gt;
                  get_string(&#039;descriptionofexercise&#039;, &#039;exercise&#039;, $COURSE-&amp;gt;students));&lt;br /&gt;
&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
This is a static element. It should be used with care it is used to display a static piece of text with a label. The third param is the label and the fourth is the static text itself.&lt;br /&gt;
&lt;br /&gt;
===submit, reset and cancel===&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
        //normally you use add_action_buttons instead of this code&lt;br /&gt;
        $buttonarray=array();&lt;br /&gt;
        $buttonarray[] = &amp;amp;mform-&amp;gt;createElement(&#039;submit&#039;, &#039;submitbutton&#039;, get_string(&#039;savechanges&#039;));&lt;br /&gt;
        $buttonarray[] = &amp;amp;mform-&amp;gt;createElement(&#039;reset&#039;, &#039;resetbutton&#039;, get_string(&#039;revert&#039;));&lt;br /&gt;
        $buttonarray[] = &amp;amp;mform-&amp;gt;createElement(&#039;cancel&#039;);&lt;br /&gt;
        $mform-&amp;gt;addGroup($buttonarray, &#039;buttonar&#039;, &#039;&#039;, array(&#039; &#039;), false);&lt;br /&gt;
        $mform-&amp;gt;closeHeaderBefore(&#039;buttonar&#039;);&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
A &#039;submit&#039; type element is a submit type form element which will submit the form. A Reset will not submit the form it will reset any changes the user has made to form contents. A cancel element cancels form submission. You need to have a branch in your code before you check for get_data() to check if submission has been cancelled with is_cancelled(); See the example on the usage page.&lt;br /&gt;
&lt;br /&gt;
You should name your submit and reset buttons &#039;submitbutton&#039; and &#039;resetbutton&#039; or something similar (not &#039;submit&#039; and &#039;reset&#039;) this avoids problems in javascript of collisions between form element names and names of javascript methods of the form object.&lt;br /&gt;
&lt;br /&gt;
====add_action_buttons($cancel = true, $submitlabel=null);====&lt;br /&gt;
&lt;br /&gt;
You will normally use this helper function which is a method of moodleform to add all the &#039;action&#039; buttons to the end of your form. A boolean parameters allow you to specify whether to include a cancel button and specify the label for your submit button (pass the result of get_string). Default for the submit button label is get_string(&#039;savechanges&#039;).&lt;br /&gt;
&lt;br /&gt;
===text===&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
        $mform-&amp;gt;addElement(&#039;text&#039;, &#039;name&#039;, get_string(&#039;forumname&#039;, &#039;forum&#039;), $attributes);&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
For a simple text element. Your fourth parameter here can be a string or array of attributes for the text element. The following are equivalent :&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
        $attributes=&#039;size=&amp;quot;20&amp;quot;&#039;;&lt;br /&gt;
        $attributes=array(&#039;size&#039;=&amp;gt;&#039;20&#039;);&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
 &lt;br /&gt;
Generally you are encouraged to use css instead of using attributes for styling.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
A format element can be used as a format select box. It will be non selectable if you&#039;re using a html editor.&lt;br /&gt;
&lt;br /&gt;
The third param for this element is $useHtmlEditor and it defaults to null in which case an html editor is used if the browser and user profile support it.&lt;br /&gt;
&lt;br /&gt;
===textarea===&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
            $mform-&amp;gt;addElement(&#039;textarea&#039;, &#039;introduction&#039;, get_string(&amp;quot;introtext&amp;quot;, &amp;quot;survey&amp;quot;), &#039;wrap=&amp;quot;virtual&amp;quot; rows=&amp;quot;20&amp;quot; cols=&amp;quot;50&amp;quot;&#039;);&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
A textarea element. If you want an htmleditor use htmleditor element. Fourth element here is a string or array of attributes.&lt;br /&gt;
&lt;br /&gt;
==addGroup==&lt;br /&gt;
&lt;br /&gt;
A &#039;group&#039; in formslib is just a group of elements that will have a label and will be included on one line. &lt;br /&gt;
&lt;br /&gt;
For example typical code to include a submit and cancel button on the same line : &lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
        $buttonarray=array();&lt;br /&gt;
        $buttonarray[] =&amp;amp; $mform-&amp;gt;createElement(&#039;submit&#039;, &#039;submitbutton&#039;, get_string(&#039;savechanges&#039;));&lt;br /&gt;
        $buttonarray[] =&amp;amp; $mform-&amp;gt;createElement(&#039;submit&#039;, &#039;cancel&#039;, get_string(&#039;cancel&#039;));&lt;br /&gt;
        $mform-&amp;gt;addGroup($buttonarray, &#039;buttonar&#039;, &#039;&#039;, array(&#039; &#039;), false);&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
You use the same arguments for createElement as you do for addElement. Any label for the element in the third argument is normally ignored (but not in the case of the submit buttons above where the third argument is not for a label but is the text for the button).&lt;br /&gt;
&lt;br /&gt;
Here&#039;s an example of putting a date_selector (which is itself a group of elements) and a checkbox on the same line, note that you can disable every element in the group using the group name &#039;availablefromgroup&#039; but it doesn&#039;t disable the controlling element the &#039;availablefromenabled&#039; checkbox:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
        $availablefromgroup=array();&lt;br /&gt;
	$availablefromgroup[] =&amp;amp; $mform-&amp;gt;createElement(&#039;date_selector&#039;, &#039;availablefrom&#039;, &#039;&#039;);&lt;br /&gt;
	$availablefromgroup[] =&amp;amp; $mform-&amp;gt;createElement(&#039;checkbox&#039;, &#039;availablefromenabled&#039;, &#039;&#039;, get_string(&#039;enable&#039;));&lt;br /&gt;
        $mform-&amp;gt;addGroup($availablefromgroup, &#039;availablefromgroup&#039;, get_string(&#039;availablefromdate&#039;, &#039;data&#039;), &#039;&amp;amp;nbsp;&#039;, false);&lt;br /&gt;
        $mform-&amp;gt;disabledIf(&#039;availablefromgroup&#039;, &#039;availablefromenabled&#039;);&lt;br /&gt;
&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
==setHelpButton==&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
            $mform-&amp;gt;setHelpButton(&#039;lessondefault&#039;, array(&#039;lessondefault&#039;, get_string(&#039;lessondefault&#039;, &#039;lesson&#039;), &#039;lesson&#039;));&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
First param is an elementname and the second param is an array of params that are passed to helpbutton in weblib.php. Params are :&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
 * @param string $page  The keyword that defines a help page&lt;br /&gt;
 * @param string $title The title of links, rollover tips, alt tags etc&lt;br /&gt;
 *           &#039;Help with&#039; (or the language equivalent) will be prefixed and &#039;...&#039; will be stripped.&lt;br /&gt;
 * @param string $module Which module is the page defined in&lt;br /&gt;
 * @param mixed $image Use a help image for the link?  (true/false/&amp;quot;both&amp;quot;)&lt;br /&gt;
 * @param boolean $linktext If true, display the title next to the help icon.&lt;br /&gt;
 * @param string $text If defined then this text is used in the page, and&lt;br /&gt;
 *           the $page variable is ignored.&lt;br /&gt;
 * @param boolean $return If true then the output is returned as a string, if false it is printed to the current page.&lt;br /&gt;
 * @param string $imagetext The full text for the helpbutton icon. If empty use default help.gif&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
Make sure you don&#039;t set boolean $return to false. &lt;br /&gt;
&lt;br /&gt;
You need to do use this method after addElement();&lt;br /&gt;
&lt;br /&gt;
==setDefault==&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
        $mform-&amp;gt;addElement(&#039;select&#039;, &#039;grade&#039;, get_string(&#039;gradeforsubmission&#039;, &#039;exercise&#039;), $grades);&lt;br /&gt;
        $mform-&amp;gt;setHelpButton(&#039;grade&#039;, array(&#039;grade&#039;, get_string(&#039;gradeforsubmission&#039;, &#039;exercise&#039;), &#039;exercise&#039;));&lt;br /&gt;
        $mform-&amp;gt;setDefault(&#039;grade&#039;, 100);&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Set the default of the form value with setDefault($elementname, $value); where elementname is the elementname whose default you want to set and $value is the default to set. We set the defaults for the form in definition(). This default is what is used if no data is loaded into the form with set_data(); eg. on display of the form for an &#039;add&#039; rather than &#039;update&#039; function.&lt;br /&gt;
&lt;br /&gt;
==disabledIf==&lt;br /&gt;
&lt;br /&gt;
For any element or groups of element in a form you can conditionally disable the group or individual element depending on conditions.&lt;br /&gt;
&lt;br /&gt;
You can use $mform-&amp;gt;disabledIf($elementName, $dependentOn, $condition = &#039;notchecked&#039;, $value=null)&lt;br /&gt;
&lt;br /&gt;
* elementname can be a group. If you specify a group all elements in the group will be disabled (if dependentOn is in elementname group that is ignored and not disabled). These are the element names you&#039;ve used as the first argument in addElement or addGroup.&lt;br /&gt;
* dependentOn is the actual name of the element as it will appear in html. This can be different to the name used in addGroup particularly but also addElement where you&#039;re adding a complex element like a date_selector. Check the html of your page. You typically make the depedentOn a checkbox or select box.&lt;br /&gt;
* $condition will be notchecked, checked, selected, eq or if it is anything else then we test for neq.&lt;br /&gt;
* If $condition is eq or neq then we check the value of the dependentOn field and check for equality (==) or nonequality (!=) in js&lt;br /&gt;
* If $condition is checked or notchecked then we check to see if a checkbox is checked or not.&lt;br /&gt;
* If $condition is selected then we check to see if a particular option is selected from a dropdown list.&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;Note: I am not sure this section is complete. I just found and added one missing case, but there may be others--[[User:Tim Hunt|Tim Hunt]] 06:04, 15 October 2007 (CDT)&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
==setType==&lt;br /&gt;
&lt;br /&gt;
PARAM_* types are used to specify how a submitted variable should be cleaned. These should be used for get parameters such as id, course etc. which are used to load a page and also with setType(); method. Every form element should have a type specified except select, radio box and checkbox elements, these elements do a good job of cleaning themselves (only specified options are allowed as user input).&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
===Most Commonly Used PARAM_* Types===&lt;br /&gt;
&lt;br /&gt;
These are the most commonly used PARAM_* types and their proper uses. More types can be seen in moodlelib.php starting around line 100.&lt;br /&gt;
&lt;br /&gt;
* PARAM_CLEAN is deprecated and you should try to use a more specific type.&lt;br /&gt;
* PARAM_TEXT should be used for cleaning data that is expected to be plain text. It will strip all html tags. But will still let tags for multilang support through.&lt;br /&gt;
* PARAM_NOTAGS should be used for cleaning data that is expected to be plain text. It will strip *all* html type tags. It will still *not* let tags for multilang support through. This should be used for instance for email addresses where no multilang support is appropriate.&lt;br /&gt;
* PARAM_RAW means no cleaning whatsoever, it is used mostly for data from the html editor. Data from the editor is later cleaned before display using format_text() function. PARAM_RAW can also be used for data that is validated by some other way or printed by p() or s().&lt;br /&gt;
* PARAM_INT should be used for integers.&lt;br /&gt;
* PARAM_ACTION is an alias of PARAM_ALPHA and is used for hidden fields specifying form actions.&lt;br /&gt;
&lt;br /&gt;
[[Category:Formslib]]&lt;/div&gt;</summary>
		<author><name>Ganderson</name></author>
	</entry>
	<entry>
		<id>https://docs.moodle.org/dev/index.php?title=lib/formslib.php_Form_Definition&amp;diff=5783</id>
		<title>lib/formslib.php Form Definition</title>
		<link rel="alternate" type="text/html" href="https://docs.moodle.org/dev/index.php?title=lib/formslib.php_Form_Definition&amp;diff=5783"/>
		<updated>2007-10-28T11:11:18Z</updated>

		<summary type="html">&lt;p&gt;Ganderson: /* radio */ Fixed error in naming radio buttons&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;{{Formslib}}&lt;br /&gt;
==definition()==&lt;br /&gt;
&lt;br /&gt;
The definition of the elements to be included in the form, their &#039;types&#039; (PARAM_*), helpbuttons included, etc is all included in a function you must define in your class &#039;definition();&#039;&lt;br /&gt;
&lt;br /&gt;
definition() is used to define the elements in the form and &#039;&#039;&#039;this definition will be used for validating data submitted as well as for printing the form.&#039;&#039;&#039; For select and checkbox type elements only data that could have been selected will be allowed. And only data that corresponds to a form element in the defintion will be accepted as submitted data.&lt;br /&gt;
&lt;br /&gt;
The definition() should include all elements that are going to be used on form, some elements may be removed or tweaked later in definition_after_data(). Please do not create conditional elements in definition(), the definition() should not directly depend on the submitted data.&lt;br /&gt;
&lt;br /&gt;
==Use Fieldsets to group Form Elements==&lt;br /&gt;
&lt;br /&gt;
You use code like this to open a fieldset with a legend.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
//-------------------------------------------------------------------------------&lt;br /&gt;
        $mform-&amp;gt;addElement(&#039;header&#039;, &#039;nameforyourheaderelement&#039;, get_string(&#039;titleforlegened&#039;, &#039;modulename&#039;));&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
You can&#039;t yet nest these visible fieldsets unfortunately. But in fact groups of elements are wrapped in invisible fieldsets.&lt;br /&gt;
&lt;br /&gt;
You close a fieldset with moodle_form&#039;s closeHeaderBefore method. You tell closeHeaderBefore the element before you wish to end the fieldset. A fieldset is automatically closed if you open a new one. You need to use this code only if you want to close a fieldset and the subsequent form elements are not to be enclosed by a visible fieldset (they are still enclosed with an invisibe one with no legend) :&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
        $mform-&amp;gt;closeHeaderBefore(&#039;buttonar&#039;);&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
==addElement==&lt;br /&gt;
&lt;br /&gt;
Use the addElement method to add a an element to a form. The first few arguments are always the same. The first param is the type of the element to add. The second is the elementname to use which is normally the html name of the element in the form. The third is often the text for the label for the element.&lt;br /&gt;
&lt;br /&gt;
Some examples are below :&lt;br /&gt;
===button===&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
            $mform-&amp;gt;addElement(&#039;button&#039;, &#039;intro&#039;, get_string(&amp;quot;buttonlabel&amp;quot;));&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
A button element. If you want a submit or cancel button see &#039;submit&#039; element. &lt;br /&gt;
&lt;br /&gt;
===checkbox===&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
        $mform-&amp;gt;addElement(&#039;checkbox&#039;, &#039;ratingtime&#039;, get_string(&#039;ratingtime&#039;, &#039;forum&#039;));&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
This is a simple checkbox. The third param for this element is the label to display on the left side of the form. You can also supply a string as a fourth param to specify a label that will appear on the right of the element. Checkboxes and radio buttons can be grouped and have individual labels on their right.&lt;br /&gt;
&lt;br /&gt;
===choosecoursefile===&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
        $mform-&amp;gt;addElement(&#039;choosecoursefile&#039;, &#039;mediafile&#039;, get_string(&#039;mediafile&#039;, &#039;lesson&#039;), array(&#039;courseid&#039;=&amp;gt;$COURSE-&amp;gt;id));&lt;br /&gt;
&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Choose a file from the course files area. The fourth option is a list of options for the element. &lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
array(&#039;courseid&#039;=&amp;gt;null,\\if it is null (default then use globabl $COURSE&lt;br /&gt;
 &#039;height&#039;=&amp;gt;500,\\ height of the popup window&lt;br /&gt;
 &#039;width&#039;=&amp;gt;750, \\ width of the popup window&lt;br /&gt;
&#039;options&#039;=&amp;gt;&#039;none&#039;);\\options string for the pop up window &lt;br /&gt;
                   \\eg. &#039;menubar=0,location=0,scrollbars,resizable&#039;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
===date_selector===&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
        $mform-&amp;gt;addElement(&#039;date_selector&#039;, &#039;assesstimefinish&#039;, get_string(&#039;to&#039;));&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
This is a date selector. You can select a Day, month and year using a group of select boxes. The fourth param here is an array of options. The defaults for the options are :&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;array(&#039;startyear&#039;=&amp;gt;1970, &#039;stopyear&#039;=&amp;gt;2020,&lt;br /&gt;
                    &#039;timezone&#039;=&amp;gt;99, &#039;applydst&#039;=&amp;gt;true);&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
You can override these defaults by supplying an array as fourth param with one or more keys with a value to override the default. You can supply a fifth param of attributes here as well.&lt;br /&gt;
&lt;br /&gt;
===date_time_selector===&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
        $mform-&amp;gt;addElement(&#039;date_time_selector&#039;, &#039;assesstimestart&#039;, get_string(&#039;from&#039;));&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
This is a group of select boxes to select a date (Day Month and Year)and time (Hour and Minute). When submitted, submitted data is processed and a timestamp is passed to $form-&amp;gt;get_data(); The fourth param here is an array of options. The defaults for the options are :&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;array(&#039;startyear&#039;=&amp;gt;1970, &#039;stopyear&#039;=&amp;gt;2020,&lt;br /&gt;
                    &#039;timezone&#039;=&amp;gt;99, &#039;applydst&#039;=&amp;gt;true, &#039;step&#039;=&amp;gt;5);&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
You can override these defaults by supplying an array as fourth param with one or more keys with a value to override the default. You can supply a fifth param of attributes here as well.&lt;br /&gt;
&lt;br /&gt;
===file===&lt;br /&gt;
&lt;br /&gt;
File upload input box with browse button. In the form definition type&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
            $mform-&amp;gt;addElement(&#039;file&#039;, &#039;attachment&#039;, get_string(&#039;attachment&#039;, &#039;forum&#039;));&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
after form submission and validation use&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
            if ($data = $mform-&amp;gt;get_data()) {&lt;br /&gt;
              ...&lt;br /&gt;
              $mform-&amp;gt;save_files($destination_directory);&lt;br /&gt;
              ...&lt;br /&gt;
            }&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
If you need advanced settings such as required file, different max upload size or name of uploaded file&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
            $this-&amp;gt;set_upload_manager(new upload_manager(&#039;attachment&#039;, true, false, $COURSE, false, 0, true, true, false));&lt;br /&gt;
            $mform-&amp;gt;addElement(&#039;file&#039;, &#039;attachment&#039;, get_string(&#039;attachment&#039;, &#039;forum&#039;));&lt;br /&gt;
            $mform-&amp;gt;addRule(&#039;attachment&#039;, null, &#039;required&#039;);&lt;br /&gt;
&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
            if ($data = $mform-&amp;gt;get_data()) {&lt;br /&gt;
              ...&lt;br /&gt;
              $mform-&amp;gt;save_files($destination_directory);&lt;br /&gt;
              $newfilename = $mform-&amp;gt;get_new_filename();&lt;br /&gt;
              ...&lt;br /&gt;
            }&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
When porting old code it is also possible to use the upload manager directly for processing of uploaded files.&lt;br /&gt;
&lt;br /&gt;
Please note that if using set_upload_manager() it must be before addElement(&#039;file&#039;,..).&lt;br /&gt;
&lt;br /&gt;
===hidden===&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
         $mform-&amp;gt;addElement(&#039;hidden&#039;, &#039;reply&#039;, &#039;yes&#039;);&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
A hidden element. Set the element name (in this case &#039;&#039;&#039;reply&#039;&#039;&#039;) to the stated value (in this case &#039;&#039;&#039;yes&#039;&#039;&#039;).&lt;br /&gt;
&lt;br /&gt;
===htmleditor &amp;amp; format===&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
        $mform-&amp;gt;addElement(&#039;htmleditor&#039;, &#039;text&#039;, get_string(&#039;choicetext&#039;, &#039;choice&#039;));&lt;br /&gt;
        $mform-&amp;gt;setType(&#039;text&#039;, PARAM_RAW);&lt;br /&gt;
	$mform-&amp;gt;addRule(&#039;text&#039;, null, &#039;required&#039;, null, &#039;client&#039;);&lt;br /&gt;
&lt;br /&gt;
        $mform-&amp;gt;addElement(&#039;format&#039;, &#039;format&#039;, get_string(&#039;format&#039;));&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
You can supply a fourth param to htmleditor of an array of options :&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
array(&#039;canUseHtmlEditor&#039;=&amp;gt;&#039;detect&#039;,&#039;rows&#039;=&amp;gt;10, &#039;cols&#039;=&amp;gt;65, &lt;br /&gt;
&#039;width&#039;=&amp;gt;0,&#039;height&#039;=&amp;gt;0, &#039;course&#039;=&amp;gt;0);&lt;br /&gt;
//options same as print_textarea params&lt;br /&gt;
//use rows and cols options to control htmleditor size.&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
===modgrade===&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
        $mform-&amp;gt;addElement(&#039;modgrade&#039;, &#039;scale&#039;, get_string(&#039;grade&#039;), false);&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
This is a custom element for selecting a grade for any activity module. The fourth argument is whether to include an option for no grade which has a value 0. This select box does include scales. The default is true, include no grade option.&lt;br /&gt;
&lt;br /&gt;
A helpbutton is automatically added.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
===password===&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
         $mform-&amp;gt;addElement(&#039;password&#039;, &#039;password&#039;, get_string(&#039;label&#039;), $attributes);&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
A password element. Fourth param is an array or string of attributes.&lt;br /&gt;
&lt;br /&gt;
===passwordunmask===&lt;br /&gt;
{{Moodle 1.9}}&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
         $mform-&amp;gt;addElement(&#039;passwordunmask&#039;, &#039;password&#039;, get_string(&#039;label&#039;), $attributes);&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
A password element with option to show the password in plaintext. Fourth param is an array or string of attributes.&lt;br /&gt;
&lt;br /&gt;
===radio===&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
        $radioarray=array();&lt;br /&gt;
        $radioarray[] = &amp;amp;MoodleQuickForm::createElement(&#039;radio&#039;, &#039;yesno&#039;, &#039;&#039;, get_string(&#039;yes&#039;), 1, $attributes);&lt;br /&gt;
        $radioarray[] = &amp;amp;MoodleQuickForm::createElement(&#039;radio&#039;, &#039;yesno&#039;, &#039;&#039;, get_string(&#039;no&#039;), 0, $attributes);&lt;br /&gt;
        $mform-&amp;gt;addGroup($radioarray, &#039;radioar&#039;, &#039;&#039;, array(&#039; &#039;), false);&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Second param names the radio button and should be the same for each button in the group in order to toggle correctly. Third param would be the label for the form element but is generally ignored as this element will always be in a group which has it&#039;s own label. Fourth param is a string, a label to be displayed on the right of the element. The fifth is the value for this radio button. $attributes can be a string or an array of attributes.&lt;br /&gt;
&lt;br /&gt;
===select===&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
        $mform-&amp;gt;addElement(&#039;select&#039;, &#039;type&#039;, get_string(&#039;forumtype&#039;, &#039;forum&#039;), $FORUM_TYPES, $attributes);&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
The fourth param for this element is an array of options for the select box. The keys are the values for the option and the value of the array is the text for the option. The fifth param $attributes is optional, see text element for description of attributes param.&lt;br /&gt;
&lt;br /&gt;
===selectyesno===&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
        $mform-&amp;gt;addElement(&#039;selectyesno&#039;, &#039;maxbytes&#039;, get_string(&#039;maxattachmentsize&#039;, &#039;forum&#039;));&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
If you want a yes / no select box this one automatically translates itself and has value 1 for yes and 0 for no.&lt;br /&gt;
&lt;br /&gt;
===static===&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
         $mform-&amp;gt;addElement(&#039;static&#039;, &#039;description&#039;, get_string(&#039;description&#039;, &#039;exercise&#039;),&lt;br /&gt;
                  get_string(&#039;descriptionofexercise&#039;, &#039;exercise&#039;, $COURSE-&amp;gt;students));&lt;br /&gt;
&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
This is a static element. It should be used with care it is used to display a static piece of text with a label. The third param is the label and the fourth is the static text itself.&lt;br /&gt;
&lt;br /&gt;
===submit, reset and cancel===&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
        //normally you use add_action_buttons instead of this code&lt;br /&gt;
        $buttonarray=array();&lt;br /&gt;
        $buttonarray[] = &amp;amp;mform-&amp;gt;createElement(&#039;submit&#039;, &#039;submitbutton&#039;, get_string(&#039;savechanges&#039;));&lt;br /&gt;
        $buttonarray[] = &amp;amp;mform-&amp;gt;createElement(&#039;reset&#039;, &#039;resetbutton&#039;, get_string(&#039;revert&#039;));&lt;br /&gt;
        $buttonarray[] = &amp;amp;mform-&amp;gt;createElement(&#039;cancel&#039;);&lt;br /&gt;
        $mform-&amp;gt;addGroup($buttonarray, &#039;buttonar&#039;, &#039;&#039;, array(&#039; &#039;), false);&lt;br /&gt;
        $mform-&amp;gt;closeHeaderBefore(&#039;buttonar&#039;);&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
A &#039;submit&#039; type element is a submit type form element which will submit the form. A Reset will not submit the form it will reset any changes the user has made to form contents. A cancel element cancels form submission. You need to have a branch in your code before you check for get_data() to check if submission has been cancelled with is_cancelled(); See the example on the usage page.&lt;br /&gt;
&lt;br /&gt;
You should name your submit and reset buttons &#039;submitbutton&#039; and &#039;resetbutton&#039; or something similar (not &#039;submit&#039; and &#039;reset&#039;) this avoids problems in javascript of collisions between form element names and names of javascript methods of the form object.&lt;br /&gt;
&lt;br /&gt;
====add_action_buttons($cancel = true, $submitlabel=null);====&lt;br /&gt;
&lt;br /&gt;
You will normally use this helper function which is a method of moodleform to add all the &#039;action&#039; buttons to the end of your form. A boolean parameters allow you to specify whether to include a cancel button and specify the label for your submit button (pass the result of get_string). Default for the submit button label is get_string(&#039;savechanges&#039;).&lt;br /&gt;
&lt;br /&gt;
===text===&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
        $mform-&amp;gt;addElement(&#039;text&#039;, &#039;name&#039;, get_string(&#039;forumname&#039;, &#039;forum&#039;), $attributes);&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
For a simple text element. Your fourth parameter here can be a string or array of attributes for the text element. The following are equivalent :&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
        $attributes=&#039;size=&amp;quot;20&amp;quot;&#039;;&lt;br /&gt;
        $attributes=array(&#039;size&#039;=&amp;gt;&#039;20&#039;);&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
 &lt;br /&gt;
Generally you are encouraged to use css instead of using attributes for styling.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
A format element can be used as a format select box. It will be non selectable if you&#039;re using a html editor.&lt;br /&gt;
&lt;br /&gt;
The third param for this element is $useHtmlEditor and it defaults to null in which case an html editor is used if the browser and user profile support it.&lt;br /&gt;
&lt;br /&gt;
===textarea===&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
            $mform-&amp;gt;addElement(&#039;textarea&#039;, &#039;intro&#039;, get_string(&amp;quot;introtext&amp;quot;, &amp;quot;survey&amp;quot;), &#039;wrap=&amp;quot;virtual&amp;quot; rows=&amp;quot;20&amp;quot; cols=&amp;quot;50&amp;quot;&#039;);&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
A textarea element. If you want an htmleditor use htmleditor element. Fourth element here is a string or array of attributes.&lt;br /&gt;
&lt;br /&gt;
==addGroup==&lt;br /&gt;
&lt;br /&gt;
A &#039;group&#039; in formslib is just a group of elements that will have a label and will be included on one line. &lt;br /&gt;
&lt;br /&gt;
For example typical code to include a submit and cancel button on the same line : &lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
        $buttonarray=array();&lt;br /&gt;
        $buttonarray[] =&amp;amp; $mform-&amp;gt;createElement(&#039;submit&#039;, &#039;submitbutton&#039;, get_string(&#039;savechanges&#039;));&lt;br /&gt;
        $buttonarray[] =&amp;amp; $mform-&amp;gt;createElement(&#039;submit&#039;, &#039;cancel&#039;, get_string(&#039;cancel&#039;));&lt;br /&gt;
        $mform-&amp;gt;addGroup($buttonarray, &#039;buttonar&#039;, &#039;&#039;, array(&#039; &#039;), false);&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
You use the same arguments for createElement as you do for addElement. Any label for the element in the third argument is normally ignored (but not in the case of the submit buttons above where the third argument is not for a label but is the text for the button).&lt;br /&gt;
&lt;br /&gt;
Here&#039;s an example of putting a date_selector (which is itself a group of elements) and a checkbox on the same line, note that you can disable every element in the group using the group name &#039;availablefromgroup&#039; but it doesn&#039;t disable the controlling element the &#039;availablefromenabled&#039; checkbox:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
        $availablefromgroup=array();&lt;br /&gt;
	$availablefromgroup[] =&amp;amp; $mform-&amp;gt;createElement(&#039;date_selector&#039;, &#039;availablefrom&#039;, &#039;&#039;);&lt;br /&gt;
	$availablefromgroup[] =&amp;amp; $mform-&amp;gt;createElement(&#039;checkbox&#039;, &#039;availablefromenabled&#039;, &#039;&#039;, get_string(&#039;enable&#039;));&lt;br /&gt;
        $mform-&amp;gt;addGroup($availablefromgroup, &#039;availablefromgroup&#039;, get_string(&#039;availablefromdate&#039;, &#039;data&#039;), &#039;&amp;amp;nbsp;&#039;, false);&lt;br /&gt;
        $mform-&amp;gt;disabledIf(&#039;availablefromgroup&#039;, &#039;availablefromenabled&#039;);&lt;br /&gt;
&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
==setHelpButton==&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
            $mform-&amp;gt;setHelpButton(&#039;lessondefault&#039;, array(&#039;lessondefault&#039;, get_string(&#039;lessondefault&#039;, &#039;lesson&#039;), &#039;lesson&#039;));&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
First param is an elementname and the second param is an array of params that are passed to helpbutton in weblib.php. Params are :&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
 * @param string $page  The keyword that defines a help page&lt;br /&gt;
 * @param string $title The title of links, rollover tips, alt tags etc&lt;br /&gt;
 *           &#039;Help with&#039; (or the language equivalent) will be prefixed and &#039;...&#039; will be stripped.&lt;br /&gt;
 * @param string $module Which module is the page defined in&lt;br /&gt;
 * @param mixed $image Use a help image for the link?  (true/false/&amp;quot;both&amp;quot;)&lt;br /&gt;
 * @param boolean $linktext If true, display the title next to the help icon.&lt;br /&gt;
 * @param string $text If defined then this text is used in the page, and&lt;br /&gt;
 *           the $page variable is ignored.&lt;br /&gt;
 * @param boolean $return If true then the output is returned as a string, if false it is printed to the current page.&lt;br /&gt;
 * @param string $imagetext The full text for the helpbutton icon. If empty use default help.gif&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
Make sure you don&#039;t set boolean $return to false. &lt;br /&gt;
&lt;br /&gt;
You need to do use this method after addElement();&lt;br /&gt;
&lt;br /&gt;
==setDefault==&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
        $mform-&amp;gt;addElement(&#039;select&#039;, &#039;grade&#039;, get_string(&#039;gradeforsubmission&#039;, &#039;exercise&#039;), $grades);&lt;br /&gt;
        $mform-&amp;gt;setHelpButton(&#039;grade&#039;, array(&#039;grade&#039;, get_string(&#039;gradeforsubmission&#039;, &#039;exercise&#039;), &#039;exercise&#039;));&lt;br /&gt;
        $mform-&amp;gt;setDefault(&#039;grade&#039;, 100);&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Set the default of the form value with setDefault($elementname, $value); where elementname is the elementname whose default you want to set and $value is the default to set. We set the defaults for the form in definition(). This default is what is used if no data is loaded into the form with set_data(); eg. on display of the form for an &#039;add&#039; rather than &#039;update&#039; function.&lt;br /&gt;
&lt;br /&gt;
==disabledIf==&lt;br /&gt;
&lt;br /&gt;
For any element or groups of element in a form you can conditionally disable the group or individual element depending on conditions.&lt;br /&gt;
&lt;br /&gt;
You can use $mform-&amp;gt;disabledIf($elementName, $dependentOn, $condition = &#039;notchecked&#039;, $value=null)&lt;br /&gt;
&lt;br /&gt;
* elementname can be a group. If you specify a group all elements in the group will be disabled (if dependentOn is in elementname group that is ignored and not disabled). These are the element names you&#039;ve used as the first argument in addElement or addGroup.&lt;br /&gt;
* dependentOn is the actual name of the element as it will appear in html. This can be different to the name used in addGroup particularly but also addElement where you&#039;re adding a complex element like a date_selector. Check the html of your page. You typically make the depedentOn a checkbox or select box.&lt;br /&gt;
* $condition will be notchecked, checked, selected, eq or if it is anything else then we test for neq.&lt;br /&gt;
* If $condition is eq or neq then we check the value of the dependentOn field and check for equality (==) or nonequality (!=) in js&lt;br /&gt;
* If $condition is checked or notchecked then we check to see if a checkbox is checked or not.&lt;br /&gt;
* If $condition is selected then we check to see if a particular option is selected from a dropdown list.&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;Note: I am not sure this section is complete. I just found and added one missing case, but there may be others--[[User:Tim Hunt|Tim Hunt]] 06:04, 15 October 2007 (CDT)&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
==setType==&lt;br /&gt;
&lt;br /&gt;
PARAM_* types are used to specify how a submitted variable should be cleaned. These should be used for get parameters such as id, course etc. which are used to load a page and also with setType(); method. Every form element should have a type specified except select, radio box and checkbox elements, these elements do a good job of cleaning themselves (only specified options are allowed as user input).&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
===Most Commonly Used PARAM_* Types===&lt;br /&gt;
&lt;br /&gt;
These are the most commonly used PARAM_* types and their proper uses. More types can be seen in moodlelib.php starting around line 100.&lt;br /&gt;
&lt;br /&gt;
* PARAM_CLEAN is deprecated and you should try to use a more specific type.&lt;br /&gt;
* PARAM_TEXT should be used for cleaning data that is expected to be plain text. It will strip all html tags. But will still let tags for multilang support through.&lt;br /&gt;
* PARAM_NOTAGS should be used for cleaning data that is expected to be plain text. It will strip *all* html type tags. It will still *not* let tags for multilang support through. This should be used for instance for email addresses where no multilang support is appropriate.&lt;br /&gt;
* PARAM_RAW means no cleaning whatsoever, it is used mostly for data from the html editor. Data from the editor is later cleaned before display using format_text() function. PARAM_RAW can also be used for data that is validated by some other way or printed by p() or s().&lt;br /&gt;
* PARAM_INT should be used for integers.&lt;br /&gt;
* PARAM_ACTION is an alias of PARAM_ALPHA and is used for hidden fields specifying form actions.&lt;br /&gt;
&lt;br /&gt;
[[Category:Formslib]]&lt;/div&gt;</summary>
		<author><name>Ganderson</name></author>
	</entry>
</feed>