[ Index ]

PHP Cross Reference of Unnamed Project

title

Body

[close]

/question/type/randomsamatch/ -> questiontype.php (summary)

Question type class for the randomsamatch question type.

Copyright: 1999 onwards Martin Dougiamas {@link http://moodle.com}
License: http://www.gnu.org/copyleft/gpl.html GNU GPL v3 or later
File Size: 235 lines (9 kb)
Included or required:0 times
Referenced: 0 times
Includes or requires: 0 files

Defines 1 class

qtype_randomsamatch:: (14 methods):
  is_usable_by_random()
  get_question_options()
  save_question_options()
  make_hint()
  delete_question()
  move_files()
  delete_files()
  initialise_question_instance()
  can_analyse_responses()
  get_available_saquestions_from_category()
  get_random_guess_score()
  extra_question_fields()
  import_from_xml()
  export_to_xml()


Class: qtype_randomsamatch  - X-Ref

The randomsamatch question type class.

TODO: Make sure short answer questions chosen by a randomsamatch question
can not also be used by a random question

is_usable_by_random()   X-Ref
No description

get_question_options($question)   X-Ref
No description

save_question_options($question)   X-Ref
No description

make_hint($hint)   X-Ref
No description

delete_question($questionid, $contextid)   X-Ref
No description

move_files($questionid, $oldcontextid, $newcontextid)   X-Ref
No description

delete_files($questionid, $contextid)   X-Ref
No description

initialise_question_instance(question_definition $question, $questiondata)   X-Ref
No description

can_analyse_responses()   X-Ref
No description

get_available_saquestions_from_category($categoryid, $subcategories)   X-Ref
Get all the usable shortanswer questions from a particular question category.

param: integer $categoryid the id of a question category.
param: bool $subcategories whether to include questions from subcategories.
return: array of question records.

get_random_guess_score($question)   X-Ref

param: object $question
return: mixed either a integer score out of 1 that the average random

extra_question_fields()   X-Ref
Defines the table which extends the question table. This allows the base questiontype
to automatically save, backup and restore the extra fields.

return: an array with the table name (first) and then the column names (apart from id and questionid)

import_from_xml($xml, $fromform, qformat_xml $format, $extra=null)   X-Ref
Imports the question from Moodle XML format.

param: array $xml structure containing the XML data
param: object $fromform question object to fill: ignored by this function (assumed to be null)
param: qformat_xml $format format class exporting the question
param: object $extra extra information (not required for importing this question in this format)
return: object question object

export_to_xml($question, qformat_xml $format, $extra=null)   X-Ref
Exports the question to Moodle XML format.

param: object $question question to be exported into XML format
param: qformat_xml $format format class exporting the question
param: object $extra extra information (not required for exporting this question in this format)
return: string containing the question data in XML format



Generated: Thu Aug 11 10:00:09 2016 Cross-referenced by PHPXref 0.7.1