MDL-61407 mod_quiz: Determine quiz step for manual comment

This commit is contained in:
Jun Pataleta
2018-05-07 13:35:18 +08:00
parent 6294e3b9ec
commit f304a59b8a
+7 -1
View File
@@ -192,7 +192,13 @@ class provider implements
if ($qa->has_manual_comment()) {
// Note - the export of the step data will ensure that the files are exported.
// No need to do it again here.
list($comment, $commentformat, $step) = $qa->get_manual_comment();
list($comment, $commentformat) = $qa->get_manual_comment();
// Get the step data.
foreach ($qa->get_reverse_step_iterator() as $step) {
if ($step->has_behaviour_var('comment')) {
break;
}
}
$comment = writer::with_context($context)
->rewrite_pluginfile_urls(