add_quiz (line 274)
Add a quiz.
AUTO_LINK
add_quiz
(SHORT_TEXT $name, ?integer $timeout, LONG_TEXT $start_text, LONG_TEXT $end_text, LONG_TEXT $end_text_fail, LONG_TEXT $notes, integer $percentage, ?TIME $open_time, ?TIME $close_time, integer $num_winners, integer $redo_time, ID_TEXT $type, BINARY $validated, string $text, [?MEMBER $submitter = NULL], [integer $points_for_passing = 0], [?AUTO_LINK $tied_newsletter = NULL])
-
SHORT_TEXT
$name: The name of the quiz
-
?integer
$timeout: The number of minutes allowed for completion (NULL: NA)
-
LONG_TEXT
$start_text: The text shown at the start of the quiz
-
LONG_TEXT
$end_text: The text shown at the end of the quiz
-
LONG_TEXT
$end_text_fail: The text shown at the end of the quiz on failure
-
LONG_TEXT
$notes: Notes
-
integer
$percentage: Percentage correctness required for competition
-
?TIME
$open_time: The time the quiz is opened (NULL: now)
-
?TIME
$close_time: The time the quiz is closed (NULL: never)
-
integer
$num_winners: The number of winners for this if it is a competition
-
integer
$redo_time: The minimum number of hours between attempts
-
ID_TEXT
$type: The type
-
BINARY
$validated: Whether this is validated
-
string
$text: Text for questions
-
?MEMBER
$submitter: The member adding it (NULL: current member)
-
integer
$points_for_passing: The number of points awarded for completing/passing the quiz/test
-
?AUTO_LINK
$tied_newsletter: Newsletter for which a member must be on to enter (NULL: none)
delete_quiz (line 380)
Delete a quiz.
void
delete_quiz
(AUTO_LINK $id)
edit_quiz (line 333)
Edit a quiz.
void
edit_quiz
(AUTO_LINK $id, SHORT_TEXT $name, ?integer $timeout, LONG_TEXT $start_text, LONG_TEXT $end_text, LONG_TEXT $end_text_fail, LONG_TEXT $notes, integer $percentage, ?TIME $open_time, ?TIME $close_time, integer $num_winners, integer $redo_time, ID_TEXT $type, BINARY $validated, string $text, SHORT_TEXT $meta_keywords, LONG_TEXT $meta_description, [integer $points_for_passing = 0], [?AUTO_LINK $tied_newsletter = NULL])
-
AUTO_LINK
$id: The ID
-
SHORT_TEXT
$name: The name of the quiz
-
?integer
$timeout: The number of minutes allowed for completion (NULL: NA)
-
LONG_TEXT
$start_text: The text shown at the start of the quiz
-
LONG_TEXT
$end_text: The text shown at the end of the quiz
-
LONG_TEXT
$end_text_fail: The text shown at the end of the quiz on failure
-
LONG_TEXT
$notes: Notes
-
integer
$percentage: Percentage correctness required for competition
-
?TIME
$open_time: The time the quiz is opened (NULL: now)
-
?TIME
$close_time: The time the quiz is closed (NULL: never)
-
integer
$num_winners: The number of winners for this if it is a competition
-
integer
$redo_time: The minimum number of hours between attempts
-
ID_TEXT
$type: The type
-
BINARY
$validated: Whether this is validated
-
string
$text: Text for questions
-
SHORT_TEXT
$meta_keywords: Meta keywords
-
LONG_TEXT
$meta_description: Meta description
-
integer
$points_for_passing: The number of points awarded for completing/passing the quiz/test
-
?AUTO_LINK
$tied_newsletter: Newsletter for which a member must be on to enter (NULL: none)
get_quizz_data_for_csv (line 425)
Get quiz data for exporting it as csv
array
get_quizz_data_for_csv
(AUTO_LINK $quiz_id)
-
AUTO_LINK
$quiz_id: Quiz ID
handle_quiz_answers (line 50)
Add the answers for a quiz.
void
handle_quiz_answers
(AUTO_LINK $id, string $text, ID_TEXT $type)
-
AUTO_LINK
$id: The quiz ID
-
string
$text: Text for questions
-
ID_TEXT
$type: The type
render_quiz (line 472)
Get quiz data for exporting it as csv
tempcode
render_quiz
(array $questions)
-
array
$questions: The quiz questions
show_quiz_html (line 28)
Show a quiz box.
tempcode
show_quiz_html
(array $row, [string $zone = '_SEARCH'])
-
array
$row: The database row
-
string
$zone: The zone to show in