You are here

class cmoptions in Quiz 6.5

Same name and namespace in other branches
  1. 6.6 includes/moodle/lib/questionlib.php \cmoptions

This holds the options that are set by the course module

Hierarchy

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

Namesort descending Modifiers Type Description Overrides
cmoptions::$attemptonlast 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::$course property The id of the course from withing which the question is currently being used
cmoptions::$decimalpoints property The number of decimals to be shown when scores are printed
cmoptions::$optionflags property Various option flags. The flags are accessed via bitwise operations using the constants defined in the CONSTANTS section above.
cmoptions::$penaltyscheme 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::$shuffleanswers property Whether the answers in a multiple choice question should be randomly shuffled when a new attempt is started.
cmoptions::$timeclose property Timestamp for the closing time. Responses submitted after this time will be saved but no credit will be given for them.
cmoptions::$timelimit 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