MDL-75301 quiz: Fix failing behat test

I cherry-picked this branch from master (because the current 401
had some conflicts). In master, quiz has been moved to quiz_settings,
so that's why the behat test start failing. Using the proper name
fixes it.
This commit is contained in:
Sara Arjona 2023-04-06 07:14:58 +02:00
parent c9b7b94ed4
commit 60954253d4

View File

@ -1484,7 +1484,7 @@ function quiz_question_preview_button($quiz, $question, $label = false, $variant
if (!question_has_capability_on($question, 'use')) {
return '';
}
$slotinfo = quiz_settings::create($quiz->id)->get_structure()->get_slot_by_number($question->slot);
$slotinfo = quiz::create($quiz->id)->get_structure()->get_slot_by_number($question->slot);
return $PAGE->get_renderer('mod_quiz', 'edit')
->question_preview_icon($quiz, $question, $label, $variant,
$slotinfo->requestedversion ?: \qbank_previewquestion\question_preview_options::ALWAYS_LATEST);