From 20d694efa57bcca9ea2291e02945f3c64f64d3eb Mon Sep 17 00:00:00 2001 From: Mark Johnson Date: Tue, 3 Jun 2025 16:32:49 +0100 Subject: [PATCH] MDL-85200 mod_quiz: Expand behat test to cover shared bank display This extends the existing behat test for adding a question from a shared bank to confirm that the source bank is displayed with the question on the Questions page. The bank name is already passed through format_string() before being passed to the template, so additional encoding by the template is not necessary, hence the template has been changed to use triple braces. --- mod/quiz/templates/question_slot.mustache | 2 +- mod/quiz/tests/behat/editing_add_from_question_bank.feature | 1 + 2 files changed, 2 insertions(+), 1 deletion(-) diff --git a/mod/quiz/templates/question_slot.mustache b/mod/quiz/templates/question_slot.mustache index 9fd2beefb87..a6c4fb680b8 100644 --- a/mod/quiz/templates/question_slot.mustache +++ b/mod/quiz/templates/question_slot.mustache @@ -58,7 +58,7 @@ {{#issharedbank}}
- {{bankname}} + {{{bankname}}}
{{/issharedbank}} diff --git a/mod/quiz/tests/behat/editing_add_from_question_bank.feature b/mod/quiz/tests/behat/editing_add_from_question_bank.feature index 6afd4f58e1c..bbf4fc9ca57 100644 --- a/mod/quiz/tests/behat/editing_add_from_question_bank.feature +++ b/mod/quiz/tests/behat/editing_add_from_question_bank.feature @@ -172,6 +172,7 @@ Feature: Adding questions to a quiz from the question bank And I click on "Select" "checkbox" in the "question 03 name" "table_row" And I click on "Add selected questions to the quiz" "button" And I should see "question 03 name" + And "Qbank 1 & < > " "text" should appear after "question 03 name" "text" @javascript Scenario: Validate the sorting while adding questions from question bank