/** * assAnswerCloze constructor * * The constructor takes possible arguments an creates an instance of the assAnswerCloze object. * * @param string $answertext A string defining the answer text * @param double $points The number of points given for the selected answer * @param integer $order A nonnegative value representing a possible display or sort order * * @return assAnswerCloze * @TODO See if the initialization of the bounds to null can be avoided to have them string/numeric at all times. */ public function __construct($answertext = "", $points = 0.0, $order = 0) { parent::__construct($answertext, $points, $order, -1); $this->lowerBound = NULL; $this->upperBound = NULL; $this->gap_size = 0; }
/** * ASS_AnswerTrueFalse constructor * * The constructor takes possible arguments an creates an instance of the ASS_AnswerTrueFalse object. * * @param string $answertext A string defining the answer text * @param double $points The number of points given for the selected answer * @param boolean $correctness A boolean value indicating the correctness of the answer * @param integer $order A nonnegative value representing a possible display or sort order */ public function ASS_AnswerTrueFalse($answertext = "", $points = 0.0, $order = 0, $correctness = false) { parent::__construct($answertext, $points, $order); // force $this->correctness to be a string // ilDB->quote makes 1 from true and saving it to ENUM('1','0') makes that '0'!!! // (maybe that only happens for certain mysql versions) $this->correctness = $correctness . ""; }
/** * ASS_AnswerOrdering constructor * * The constructor takes possible arguments an creates an instance of the ASS_AnswerOrdering object. * * @param string $answertext A string defining the answer text * @param integer $random_id A random ID * @access public */ function ASS_AnswerOrdering($answertext = "", $random_id = 0, $depth = 0) { parent::__construct($answertext, 0, 0); $this->setRandomID($random_id); $this->setOrderingDepth($depth); }
/** * ASS_AnswerMultipleResponse constructor * * The constructor takes possible arguments an creates an instance of the ASS_AnswerMultipleResponse object. * * @param string $answertext A string defining the answer text * @param double $points The number of points given for the selected answer * @param double $points_unchecked The points when the answer is not checked * @param integer $order A nonnegative value representing a possible display or sort order * @access public */ function __construct($answertext = "", $points_checked = 0.0, $order = 0, $points_unchecked = 0, $id = -1) { parent::__construct($answertext, $points_checked, $order, $id); $this->setPointsUnchecked($points_unchecked); }
/** * ASS_AnswerBinaryState constructor * * The constructor takes possible arguments an creates an instance of the ASS_AnswerBinaryState object. * * @param string $answertext A string defining the answer text * @param double $points The number of points given for the selected answer * @param integer $order A nonnegative value representing a possible display or sort order * @param integer $state A integer value indicating the state of the answer * @param integer $id The database id of the answer * * @return ASS_AnswerBinaryState */ public function __construct($answertext = "", $points = 0.0, $order = 0, $state = 0, $id = -1) { parent::__construct($answertext, $points, $order, $id); $this->state = $state; }