class cmoptions in Quiz 6.5
Same name and namespace in other branches
- 6.6 includes/moodle/lib/questionlib.php \cmoptions
This holds the options that are set by the course module
Hierarchy
- class \cmoptions
Expanded class hierarchy of cmoptions
File
- includes/
moodle/ lib/ questionlib.php, line 195
View source
class cmoptions {
/**
* Whether a new attempt should be based on the previous one. If true
* then a new attempt will start in a state where all responses are set
* to the last responses from the previous attempt.
*/
var $attemptonlast = false;
/**
* Various option flags. The flags are accessed via bitwise operations
* using the constants defined in the CONSTANTS section above.
*/
var $optionflags = QUESTION_ADAPTIVE;
/**
* Determines whether in the calculation of the score for a question
* penalties for earlier wrong responses within the same attempt will
* be subtracted.
*/
var $penaltyscheme = true;
/**
* The maximum time the user is allowed to answer the questions withing
* an attempt. This is measured in minutes so needs to be multiplied by
* 60 before compared to timestamps. If set to 0 no timelimit will be applied
*/
var $timelimit = 0;
/**
* Timestamp for the closing time. Responses submitted after this time will
* be saved but no credit will be given for them.
*/
var $timeclose = 9999999999;
/**
* The id of the course from withing which the question is currently being used
*/
var $course = SITEID;
/**
* Whether the answers in a multiple choice question should be randomly
* shuffled when a new attempt is started.
*/
var $shuffleanswers = true;
/**
* The number of decimals to be shown when scores are printed
*/
var $decimalpoints = 2;
}
Members
Name | Modifiers | Type | Description | Overrides |
---|---|---|---|---|
cmoptions:: |
property | Whether a new attempt should be based on the previous one. If true then a new attempt will start in a state where all responses are set to the last responses from the previous attempt. | ||
cmoptions:: |
property | The id of the course from withing which the question is currently being used | ||
cmoptions:: |
property | The number of decimals to be shown when scores are printed | ||
cmoptions:: |
property | Various option flags. The flags are accessed via bitwise operations using the constants defined in the CONSTANTS section above. | ||
cmoptions:: |
property | Determines whether in the calculation of the score for a question penalties for earlier wrong responses within the same attempt will be subtracted. | ||
cmoptions:: |
property | Whether the answers in a multiple choice question should be randomly shuffled when a new attempt is started. | ||
cmoptions:: |
property | Timestamp for the closing time. Responses submitted after this time will be saved but no credit will be given for them. | ||
cmoptions:: |
property | The maximum time the user is allowed to answer the questions withing an attempt. This is measured in minutes so needs to be multiplied by 60 before compared to timestamps. If set to 0 no timelimit will be applied |