[ Index ]

PHP Cross Reference of Moodle 1.9.3 [Build 15-Oct-2008]

title

Body

[close]

/question/type/ -> edit_question_form.php (summary)

A base class for question editing forms.

Author: T.J.Hunt@open.ac.uk
Copyright: © 2006 The Open University
License: http://www.gnu.org/copyleft/gpl.html GNU Public License
File Size: 273 lines (12 kb)
Included or required:0 times
Referenced: 0 times
Includes or requires: 0 files

Defines 1 class

question_edit_form:: (6 methods):
  question_edit_form()
  definition()
  validation()
  definition_inner()
  set_data()
  qtype()


Class: question_edit_form  - X-Ref

Form definition base class. This defines the common fields that
all question types need. Question types should define their own
class that inherits from this one, and implements the definition_inner()
method.

question_edit_form($submiturl, $question, $category, $contexts, $formeditable = true)   X-Ref
No description

definition()   X-Ref
Build the form definition.

This adds all the form fields that the default question type supports.
If your question type does not support all these fields, then you can
override this method and remove the ones you don't want with $mform->removeElement().

validation($fromform, $files)   X-Ref
No description

definition_inner(&$mform)   X-Ref
Add any question-type specific form fields.

param: object $mform the form being built.

set_data($question)   X-Ref
No description

qtype()   X-Ref
Override this in the subclass to question type name.

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



Generated: Wed Jan 14 11:33:29 2009 Cross-referenced by PHPXref 0.7