|
Squiz Matrix
4.12.2
|
Additional Inherited Members | |
Data Fields inherited from Online_Quiz_Question | |
| $_value = NULL | |
| $_position = NULL | |
Protected Member Functions inherited from Asset | |
| _preCreateCheck (Array &$link) | |
| _createAdditional (Array &$link) | |
| _abortCreate ($trigger_level_changed=FALSE, $linkid=0) | |
| _loadVars () | |
| _getName ($short_name=FALSE, $contextid=NULL) | |
| _getKeywordReplacement ($keyword) | |
| _checkPermissionAccess ($perm, $assetids=Array(), $only_workflow=TRUE) | |
| makeAndSaveInitialWebPath ($path, $parent_link=NULL) | |
Definition at line 38 of file online_quiz_question_multichoice.inc.
| _getCorrectOptionKeys | ( | ) |
Returns the option keys of the correct answers
Definition at line 265 of file online_quiz_question_multichoice.inc.
| getAvailablePoints | ( | ) |
Determine how many points are available from this question in total
Definition at line 381 of file online_quiz_question_multichoice.inc.
| getCorrectSummary | ( | ) |
Returns the correct response in a human-readable format
Definition at line 301 of file online_quiz_question_multichoice.inc.
| getCorrectValue | ( | ) |
Returns the correct response
Definition at line 288 of file online_quiz_question_multichoice.inc.
| getPoints | ( | $value = NULL | ) |
Determine how many points the given value (or the question's current value) is worth
| mixed | $value | the value to use determining the number of points scored - if NULL, use the question's value |
Definition at line 326 of file online_quiz_question_multichoice.inc.
| getResponseFormKeywordReplacement | ( | $option_format = '', |
|
$feedback_mode = FALSE |
|||
| ) |
Get the replacement for the "response_form" keyword
To be overridden by the children
| text | $option_format | used by Page_Online_Quiz Interactive Mode, control print format of radio/checkbox options. |
| boolean | $feedback_mode | used by Page_Online_Quiz Interactive Mode, will disable fields and add special classes & tags |
Definition at line 489 of file online_quiz_question_multichoice.inc.
| getResponseSupplement | ( | $selected_option = NULL | ) |
Get the Response Supplement content for the selected option
| string | $selected_option | override the selected option with another key |
Definition at line 628 of file online_quiz_question_multichoice.inc.
| getResults | ( | $flatten = TRUE | ) |
Compiles the results array to be used by the quiz during marking
The results are returned in the following format:
Array( 'assetid' => assetid, 'value' => string, // flattened raw value 'summary' => string, // flattened human-readible value 'points' => int, // earned points 'available_points' => int, // available points )
| boolean | $flatten | whether not to flatten the human-readable 'summary' array into a single string (TRUE by default) |
Definition at line 435 of file online_quiz_question_multichoice.inc.
| getSummary | ( | ) |
Returns the current user response in a human-readable format
NOTE: Arrays of answers will stay in array format, with the exception that each element of the array will be rendered human-readable
Definition at line 237 of file online_quiz_question_multichoice.inc.
| getValidationJS | ( | ) |
Returns the javascript used to validate the question
Definition at line 177 of file online_quiz_question_multichoice.inc.
| Online_Quiz_Question_Multichoice | ( | $assetid = 0 | ) |
Constructor
| string | $assetid | the assetid of the asset to load into this object |
Definition at line 50 of file online_quiz_question_multichoice.inc.
| processResponseForm | ( | ) |
Processes the form using submitted values
NOTE: Returns TRUE if the value is valid, otherwise returns FALSE or an array in the following format:
Array(
'errors' => Array('Sample error string'),
'warnings' => Array('Question #12 has not been answered'),
)
Definition at line 93 of file online_quiz_question_multichoice.inc.
| setAttrValue | ( | $name, | |
| $value | |||
| ) |
Set Attribute Value
| string | $name | name of attribute |
| mixed | $value | value of attribute |
Definition at line 67 of file online_quiz_question_multichoice.inc.
| validateValue | ( | $value = NULL | ) |
Determine whether or not this question currently has a valid value
NOTE: Returns an array in the following format:
Array(
'errors' => Array('Sample error string'),
'warnings' => Array('Question #12 has not been answered'),
)
The 'errors' and 'warnings' keys will always be present, but empty if no errors or warnings need to be returned
| mixed | $value | Custom value to compare with - if left NULL (or unspecified), use the current value of the question |
Definition at line 153 of file online_quiz_question_multichoice.inc.