Function Module_cms_quiz->get_form_fields
Definitions
cms/pages/modules/cms_quiz.php
- Get Tempcode for a adding/editing form.
- Visibility: public
- Is abstract?: No
- Is static?: No
- Is final?: No
- Return: array
Parameters
Name | Type | Default | Set | Range | Description |
---|---|---|---|---|---|
$id | ?AUTO_LINK | Null | N/A | N/A | The quiz ID (null: new) |
$name | SHORT_TEXT | Blank (empty string) | N/A | N/A | The name of the quiz |
$timeout | ?integer | Null | N/A | N/A | The number of minutes allowed for completion (null: NA) |
$start_text | LONG_TEXT | Blank (empty string) | N/A | N/A | The text shown at the start of the quiz |
$end_text | LONG_TEXT | Blank (empty string) | N/A | N/A | The text shown at the end of the quiz |
$end_text_fail | LONG_TEXT | Blank (empty string) | N/A | N/A | The text shown at the end of the quiz on failure |
$notes | LONG_TEXT | Blank (empty string) | N/A | N/A | Notes |
$percentage | integer | 70 | N/A | N/A | Percentage correctness required for competition |
$open_time | ?TIME | Null | N/A | N/A | The time the quiz is opened (null: now) |
$close_time | ?TIME | Null | N/A | N/A | The time the quiz is closed (null: never) |
$num_winners | integer | 2 | N/A | N/A | The number of winners for this if it is a competition |
$redo_time | ?integer | Null | N/A | N/A | The minimum number of hours between attempts (null: no restriction) |
$type | ID_TEXT | SURVEY | N/A | N/A | The type |
$validated | BINARY | 1 | N/A | N/A | Whether this is validated |
$text | ?string | Null | N/A | N/A | Text for questions (null: default) |
$points_for_passing | integer | 0 | N/A | N/A | The number of points awarded for completing/passing the quiz/test |
$tied_newsletter | ?AUTO_LINK | Null | N/A | N/A | Newsletter for which a member must be on to enter (null: none) |
$reveal_answers | BINARY | 0 | N/A | N/A | Whether to reveal correct answers after the quiz is complete, so that the answerer can learn from the experience |
$shuffle_questions | BINARY | 0 | N/A | N/A | Whether to shuffle questions, to make cheating a bit harder |
$shuffle_answers | BINARY | 0 | N/A | N/A | Whether to shuffle multiple-choice answers, to make cheating a bit harder |
Return
- A pair: The input fields, Hidden fields
- Type: array
- Set: N/A
- Range: N/A