MDL-86366 quiz: Description shouldn't show each secure page, but title.

This commit is contained in:
Luca Bösch
2025-08-31 17:29:42 +02:00
parent 3ca7c6bf32
commit 57f15efcdb
2 changed files with 9 additions and 2 deletions
+6 -1
View File
@@ -140,7 +140,12 @@ $headtags = $attemptobj->get_html_head_contributions($page);
$PAGE->set_title($attemptobj->attempt_page_title($page));
$PAGE->add_body_class('limitedwidth');
$PAGE->set_heading($attemptobj->get_course()->fullname);
if ($PAGE->pagelayout !== 'secure') {
if ($PAGE->pagelayout === 'secure') {
// Show the activity header (but only the name) in the secure layout on quiz pages.
$PAGE->activityheader->set_attrs([
'description' => '',
]);
} else {
$PAGE->activityheader->disable();
}
if ($attemptobj->is_last_page($page)) {
@@ -38,7 +38,9 @@ Feature: Attempt a quiz in secure layout
Scenario: A quiz page on the secure layout shows both the course name and the quiz name
Given I am on the "Quiz 1" "mod_quiz > View" page logged in as "student"
And I should see "Quiz 1"
And I should see "Quiz 1 description"
When I press "Attempt quiz"
Then I should see "Course 1"
And I should see "Quiz 1"
And I should see "Quiz 1 description"
But I should not see "Quiz 1 description"