Class editquestion_helper for methods related to add/edit/copy.
More...
Class editquestion_helper for methods related to add/edit/copy.
- Copyright
- 2021 Catalyst IT Australia Pty Ltd
- Author
- Safat Shahin safat.nosp@m.shah.nosp@m.in@ca.nosp@m.taly.nosp@m.st-au.nosp@m..net
◆ create_new_question_button()
static qbank_editquestion\editquestion_helper::create_new_question_button |
( |
| $categoryid, |
|
|
| $params, |
|
|
| $canadd, |
|
|
| $tooltip = '', |
|
|
| $disabled = false ) |
|
static |
Print a button for creating a new question.
This will open question/addquestion.php, which in turn goes to question/question.php before getting back to $params['returnurl'] (by default the question bank screen).
- Parameters
-
int | $categoryid | The id of the category that the new question should be added to. |
array | $params | Other paramters to add to the URL. You need either $params['cmid'] or $params['courseid'], and you should probably set $params['returnurl'] |
bool | $canadd | the text to display on the button. |
string | $tooltip | a tooltip to add to the button (optional). |
bool | $disabled | if true, the button will be disabled. |
◆ get_question_status_list()
static qbank_editquestion\editquestion_helper::get_question_status_list |
( |
| ) |
|
|
static |
Get the array of status of the questions.
- Return values
-
◆ get_question_status_string()
static qbank_editquestion\editquestion_helper::get_question_status_string |
( |
| $status | ) |
|
|
static |
Get the string for the status of the question.
- Parameters
-
- Return values
-
◆ print_choose_qtype_to_add_form()
static qbank_editquestion\editquestion_helper::print_choose_qtype_to_add_form |
( |
array | $hiddenparams, |
|
|
array | $allowedqtypes = null, |
|
|
| $enablejs = true ) |
|
static |
Print a form to let the user choose which question type to add.
When the form is submitted, it goes to the question.php script.
- Parameters
-
array | null | $hiddenparams | hidden parameters to add to the form, in addition to the qtype radio buttons. |
array | null | $allowedqtypes | optional list of qtypes that are allowed. If given, only those qtypes will be shown. Example value array('description', 'multichoice'). |
bool | $enablejs | |
- Return values
-
The documentation for this class was generated from the following file:
- question/bank/editquestion/classes/editquestion_helper.php