| Línea 592... | Línea 592... | 
          
            | 592 |      * Start the attempt at all questions that has been added to this usage.
 | 592 |      * Start the attempt at all questions that has been added to this usage.
 | 
          
            | 593 |      * @param question_variant_selection_strategy how to pick which variant of each question to use.
 | 593 |      * @param question_variant_selection_strategy how to pick which variant of each question to use.
 | 
          
            | 594 |      * @param int $timestamp optional, the timstamp to record for this action. Defaults to now.
 | 594 |      * @param int $timestamp optional, the timstamp to record for this action. Defaults to now.
 | 
          
            | 595 |      * @param int $userid optional, the user to attribute this action to. Defaults to the current user.
 | 595 |      * @param int $userid optional, the user to attribute this action to. Defaults to the current user.
 | 
          
            | 596 |      */
 | 596 |      */
 | 
          
            | 597 |     public function start_all_questions(question_variant_selection_strategy $variantstrategy = null,
 | 597 |     public function start_all_questions(?question_variant_selection_strategy $variantstrategy = null,
 | 
          
            | 598 |             $timestamp = null, $userid = null) {
 | 598 |             $timestamp = null, $userid = null) {
 | 
          
            | 599 |         if (is_null($variantstrategy)) {
 | 599 |         if (is_null($variantstrategy)) {
 | 
          
            | 600 |             $variantstrategy = new question_variant_random_strategy();
 | 600 |             $variantstrategy = new question_variant_random_strategy();
 | 
          
            | 601 |         }
 | 601 |         }
 | 
          
            | Línea 918... | Línea 918... | 
          
            | 918 |      * @param number $newmaxmark (optional) if given, will change the max mark while regrading.
 | 918 |      * @param number $newmaxmark (optional) if given, will change the max mark while regrading.
 | 
          
            | 919 |      * @param question_definition|null $otherversion a different version of the question to use
 | 919 |      * @param question_definition|null $otherversion a different version of the question to use
 | 
          
            | 920 |      *      in the regrade. (By default, the regrode will use exactly the same question version.)
 | 920 |      *      in the regrade. (By default, the regrode will use exactly the same question version.)
 | 
          
            | 921 |      */
 | 921 |      */
 | 
          
            | 922 |     public function regrade_question($slot, $finished = false, $newmaxmark = null,
 | 922 |     public function regrade_question($slot, $finished = false, $newmaxmark = null,
 | 
          
            | 923 |             question_definition $otherversion = null) {
 | 923 |             ?question_definition $otherversion = null) {
 | 
          
            | 924 |         $oldqa = $this->get_question_attempt($slot);
 | 924 |         $oldqa = $this->get_question_attempt($slot);
 | 
          
            | 925 |         if ($otherversion &&
 | 925 |         if ($otherversion &&
 | 
          
            | 926 |                 $otherversion->questionbankentryid !== $oldqa->get_question(false)->questionbankentryid) {
 | 926 |                 $otherversion->questionbankentryid !== $oldqa->get_question(false)->questionbankentryid) {
 | 
          
            | 927 |             throw new coding_exception('You can only regrade using a different version of the same question, ' .
 | 927 |             throw new coding_exception('You can only regrade using a different version of the same question, ' .
 | 
          
            | 928 |                     'not a completely different question.');
 | 928 |                     'not a completely different question.');
 |