Skip to content

Commit

Permalink
OU multiresponse: Update to use MDL-81039 if present #764041
Browse files Browse the repository at this point in the history
  • Loading branch information
timhunt committed Feb 23, 2024
1 parent 8e98d81 commit a0c426f
Showing 1 changed file with 9 additions and 1 deletion.
10 changes: 9 additions & 1 deletion questiontype.php
Original file line number Diff line number Diff line change
Expand Up @@ -405,6 +405,14 @@ public static function load_from_record($row) {

public function adjust_display_options(question_display_options $options) {
parent::adjust_display_options($options);
$options->suppresschoicefeedback = !$this->showchoicefeedback;
if (defined('qtype_multichoice::COMBINED_BUT_NOT_CHOICE_FEEDBACK')) {
// Newer Moodle versions/
if ($options->feedback && !$this->showchoicefeedback) {
$options->feedback = qtype_multichoice::COMBINED_BUT_NOT_CHOICE_FEEDBACK;
}
} else {
// Older Moodle versions.
$options->suppresschoicefeedback = !$this->showchoicefeedback;
}
}
}

0 comments on commit a0c426f

Please sign in to comment.