/** * Perform the necessary preprocessing for the hint fields. * @param object $question the data being passed to the form. * @return object $question the modified data. */ protected function data_preprocessing_hints($question, $withclearwrong = false, $withshownumpartscorrect = false) { if (empty($question->hints)) { return $question; } parent::data_preprocessing_hints($question, $withclearwrong, $withshownumpartscorrect); $question->hintoptions = array(); foreach ($question->hints as $hint) { $question->hintoptions[] = $hint->options; } return $question; }