From 32b645fd033f42d24fe79acb15424a38fa8c4317 Mon Sep 17 00:00:00 2001 From: Mahmoud Kassaei Date: Tue, 2 Feb 2021 17:34:32 +0000 Subject: [PATCH] MDL-70773 Quiz overrides: User links don't point to user profile page --- mod/quiz/overrides.php | 2 +- mod/quiz/tests/behat/quiz_user_override.feature | 3 +++ 2 files changed, 4 insertions(+), 1 deletion(-) diff --git a/mod/quiz/overrides.php b/mod/quiz/overrides.php index fafcb4fa308..280773111bc 100644 --- a/mod/quiz/overrides.php +++ b/mod/quiz/overrides.php @@ -230,7 +230,7 @@ foreach ($overrides as $override) { } else { $usercell = new html_table_cell(); $usercell->rowspan = count($fields); - $usercell->text = html_writer::link(new moodle_url($groupurl, ['id' => $override->userid]), + $usercell->text = html_writer::link(new moodle_url($userurl, ['id' => $override->userid]), fullname($override) . $extranamebit); $usercells[] = $usercell; diff --git a/mod/quiz/tests/behat/quiz_user_override.feature b/mod/quiz/tests/behat/quiz_user_override.feature index db450d3bf46..95c8bb4529c 100644 --- a/mod/quiz/tests/behat/quiz_user_override.feature +++ b/mod/quiz/tests/behat/quiz_user_override.feature @@ -67,6 +67,9 @@ Feature: Quiz user override And "Edit" "icon" should exist in the "Student One" "table_row" And "copy" "icon" should exist in the "Student One" "table_row" And "Delete" "icon" should exist in the "Student One" "table_row" + And I follow "Student One" + And I should see "Student One" + And I should see "User details" @javascript Scenario: Teacher without 'See full user identity in lists' can see and edit overrides