Moodle  2.2.1
http://www.collinsharper.com
qtype_shortanswer_edit_form Class Reference
Inheritance diagram for qtype_shortanswer_edit_form:
Collaboration diagram for qtype_shortanswer_edit_form:

Public Member Functions

 validation ($data, $files)
 qtype ()

Protected Member Functions

 definition_inner ($mform)
 data_preprocessing ($question)

Detailed Description

Short answer question editing form definition.

Definition at line 36 of file edit_shortanswer_form.php.


Member Function Documentation

data_preprocessing ( question) [protected]

Perform an preprocessing needed on the data passed to set_data() before it is used to initialise the form.

Parameters:
object$questionthe data being passed to the form.
Returns:
object $question the modified data.

Reimplemented from question_edit_form.

Definition at line 57 of file edit_shortanswer_form.php.

Here is the call graph for this function:

definition_inner ( mform) [protected]

Add any question-type specific form fields.

Parameters:
object$mformthe form being built.

Reimplemented from question_edit_form.

Definition at line 38 of file edit_shortanswer_form.php.

Here is the call graph for this function:

qtype ( )

Override this in the subclass to question type name.

Returns:
the question type name, should be the same as the name() method in the question type class.

Reimplemented from question_edit_form.

Definition at line 92 of file edit_shortanswer_form.php.

validation ( data,
files 
)

Dummy stub method - override if you needed to perform some extra validation. If there are errors return array of errors ("fieldname"=>"error message"), otherwise true if ok.

Server side rules do not work for uploaded files, implement serverside rules here if needed.

Parameters:
array$dataarray of ("fieldname"=>value) of submitted data
array$filesarray of uploaded files "element_name"=>tmp_file_path
Returns:
array of "element_name"=>"error_description" if there are errors, or an empty array if everything is OK (true allowed for backwards compatibility too).

Reimplemented from question_edit_form.

Definition at line 65 of file edit_shortanswer_form.php.

Here is the call graph for this function:


The documentation for this class was generated from the following file:
 All Data Structures Namespaces Files Functions Variables Enumerations