|
Moodle
2.2.1
http://www.collinsharper.com
|
Static Public Member Functions | |
| static | is_qtype_installed ($qtypename) |
| static | get_qtype ($qtypename, $mustexist=true) |
| static | get_config () |
| static | qtype_enabled ($qtypename) |
| static | qtype_exists ($qtypename) |
| static | get_qtype_name ($qtypename) |
| static | get_all_qtypes () |
| static | sort_qtype_array ($qtypes, $config=null) |
| static | get_creatable_qtypes () |
| static | load_question_definition_classes ($qtypename) |
| static | load_question ($questionid, $allowshuffle=true) |
| static | make_question ($questiondata) |
| static | get_finder () |
| static | start_unit_test () |
| static | end_unit_test () |
| static | load_test_question_data (question_definition $question) |
| static | fraction_options () |
| static | fraction_options_full () |
Data Fields | |
| const | MAX_SUMMARY_LENGTH = 32000 |
Protected Member Functions | |
| ensure_fraction_options_initialised () | |
Static Protected Attributes | |
| static | $questionfinder = null |
This static class provides access to the other question bank.
It provides functions for managing question types and question definitions.
| static end_unit_test | ( | ) | [static] |
Only to be called from unit tests. Allows load_test_data() to be used.
Definition at line 301 of file bank.php.

| ensure_fraction_options_initialised | ( | ) | [protected] |
| static fraction_options | ( | ) | [static] |
Definition at line 391 of file bank.php.


| static fraction_options_full | ( | ) | [static] |
| static get_all_qtypes | ( | ) | [static] |
| static get_config | ( | ) | [static] |
| static get_creatable_qtypes | ( | ) | [static] |
| static get_finder | ( | ) | [static] |
Definition at line 284 of file bank.php.

Get the question type class for a particular question type.
| string | $qtypename | the question type name. For example 'multichoice' or 'shortanswer'. |
| bool | $mustexist | if false, the missing question type is returned when the requested question type is not installed. |
Definition at line 89 of file bank.php.

| static get_qtype_name | ( | $ | qtypename | ) | [static] |
| static is_qtype_installed | ( | $ | qtypename | ) | [static] |
| static load_question | ( | $ | questionid, |
| $ | allowshuffle = true |
||
| ) | [static] |
Load a question definition from the database. The object returned will actually be of an appropriate question_definition subclass.
| int | $questionid | the id of the question to load. |
| bool | $allowshuffle | if false, then any shuffle option on the selected quetsion is disabled. |
Definition at line 251 of file bank.php.


| static load_question_definition_classes | ( | $ | qtypename | ) | [static] |
Load the question definition class(es) belonging to a question type. That is, include_once('/question/type/' . $qtypename . '/question.php'), with a bit of checking.
| string | $qtypename | the question type name. For example 'multichoice' or 'shortanswer'. |
Definition at line 230 of file bank.php.

| static load_test_question_data | ( | question_definition $ | question | ) | [static] |
To be used for unit testing only. Will throw an exception if start_unit_test() has not been called first.
| object | $questiondata | a question data object to put in the test data store. |
Definition at line 319 of file bank.php.

| static make_question | ( | $ | questiondata | ) | [static] |
Convert the question information loaded with get_question_options() to a question_definintion object.
| object | $questiondata | raw data loaded from the database. |
Definition at line 277 of file bank.php.


| static qtype_enabled | ( | $ | qtypename | ) | [static] |
| static qtype_exists | ( | $ | qtypename | ) | [static] |
| static sort_qtype_array | ( | $ | qtypes, |
| $ | config = null |
||
| ) | [static] |
Sort an array of question types according to the order the admin set up, and then alphabetically for the rest.
| array | qtype->name() => qtype->local_name(). |
Definition at line 171 of file bank.php.


| static start_unit_test | ( | ) | [static] |
Only to be called from unit tests. Allows load_test_data() to be used.
Definition at line 294 of file bank.php.

| const MAX_SUMMARY_LENGTH = 32000 |