original_string: public static function make_from_quiz($quiz, $when) {
          $options = new self();
  
          $options->attempt = self::extract($quiz->reviewattempt, $when, true, false);
          $options->correctness = self::extract($quiz->reviewcorrectness, $when);
          $options->marks = self::extract($quiz->reviewmarks, $when,
                  self::MARK_AND_MAX, self::MAX_ONLY);
          $options->feedback = self::extract($quiz->reviewspecificfeedback, $when);
          $options->generalfeedback = self::extract($quiz->reviewgeneralfeedback, $when);
          $options->rightanswer = self::extract($quiz->reviewrightanswer, $when);
          $options->overallfeedback = self::extract($quiz->reviewoverallfeedback, $when);
  
          $options->numpartscorrect = $options->feedback;
          $options->manualcomment = $options->feedback;
  
          if ($quiz->questiondecimalpoints != -1) {
              $options->markdp = $quiz->questiondecimalpoints;
          } else {
              $options->markdp = $quiz->decimalpoints;
          }
  
          return $options;
      }
code: public static function make_from_quiz($quiz, $when) {
          $options = new self();
  
          $options->attempt = self::extract($quiz->reviewattempt, $when, true, false);
          $options->correctness = self::extract($quiz->reviewcorrectness, $when);
          $options->marks = self::extract($quiz->reviewmarks, $when,
                  self::MARK_AND_MAX, self::MAX_ONLY);
          $options->feedback = self::extract($quiz->reviewspecificfeedback, $when);
          $options->generalfeedback = self::extract($quiz->reviewgeneralfeedback, $when);
          $options->rightanswer = self::extract($quiz->reviewrightanswer, $when);
          $options->overallfeedback = self::extract($quiz->reviewoverallfeedback, $when);
  
          $options->numpartscorrect = $options->feedback;
          $options->manualcomment = $options->feedback;
  
          if ($quiz->questiondecimalpoints != -1) {
              $options->markdp = $quiz->questiondecimalpoints;
          } else {
              $options->markdp = $quiz->decimalpoints;
          }
  
          return $options;
      }
code_tokens: public static function make_from_quiz ( $ quiz , $ when ) { $ options = new self ( ) ; $ options -> attempt = self :: extract ( $ quiz -> reviewattempt , $ when , true , false ) ; $ options -> correctness = self :: extract ( $ quiz -> reviewcorrectness , $ when ) ; $ options -> marks = self :: extract ( $ quiz -> reviewmarks , $ when , self :: MARK_AND_MAX , self :: MAX_ONLY ) ; $ options -> feedback = self :: extract ( $ quiz -> reviewspecificfeedback , $ when ) ; $ options -> generalfeedback = self :: extract ( $ quiz -> reviewgeneralfeedback , $ when ) ; $ options -> rightanswer = self :: extract ( $ quiz -> reviewrightanswer , $ when ) ; $ options -> overallfeedback = self :: extract ( $ quiz -> reviewoverallfeedback , $ when ) ; $ options -> numpartscorrect = $ options -> feedback ; $ options -> manualcomment = $ options -> feedback ; if ( $ quiz -> questiondecimalpoints != - 1 ) { $ options -> markdp = $ quiz -> questiondecimalpoints ; } else { $ options -> markdp = $ quiz -> decimalpoints ; } return $ options ; }
docstring: Set up the various options from the quiz settings, and a time constant.
  @param object $quiz the quiz settings.
  @param int $one of the {@link DURING}, {@link IMMEDIATELY_AFTER},
  {@link LATER_WHILE_OPEN} or {@link AFTER_CLOSE} constants.
  @return mod_quiz_display_options set up appropriately.
docstring_tokens: Set up the various options from the quiz settings and a time constant .