diff --git a/blocks/activity_results/tests/behat/highscoreswithoutgroups.feature b/blocks/activity_results/tests/behat/highscoreswithoutgroups.feature index eb750a05aa0..9a18affe494 100644 --- a/blocks/activity_results/tests/behat/highscoreswithoutgroups.feature +++ b/blocks/activity_results/tests/behat/highscoreswithoutgroups.feature @@ -139,7 +139,9 @@ Feature: The activity results block displays student high scores And I should see "70.00" in the "Activity results" "block" Scenario: Try to configure the block on the course page to show multiple high scores using ID numbers - Given I add the "Activity results" block + Given the following config values are set as admin: + | showuseridentity | idnumber,email | + And I add the "Activity results" block When I configure the "Activity results" block And I set the following fields to these values: | id_config_showbest | 3 | diff --git a/blocks/activity_results/tests/behat/highscoreswithscales.feature b/blocks/activity_results/tests/behat/highscoreswithscales.feature index 2a8bcf99fd0..76d5b2ac88d 100644 --- a/blocks/activity_results/tests/behat/highscoreswithscales.feature +++ b/blocks/activity_results/tests/behat/highscoreswithscales.feature @@ -78,7 +78,9 @@ Feature: The activity results block displays students high scores in group as sc And I should see "Good" in the "Activity results" "block" Scenario: Try to configure the block on the course page to show multiple high scores using ID numbers - Given I add the "Activity results" block + Given the following config values are set as admin: + | showuseridentity | idnumber,email | + And I add the "Activity results" block When I configure the "Activity results" block And I set the following fields to these values: | id_config_showbest | 3 | diff --git a/blocks/activity_results/tests/behat/highscoreswithscalesandgroups.feature b/blocks/activity_results/tests/behat/highscoreswithscalesandgroups.feature index 95008623b02..bb9cb706e06 100644 --- a/blocks/activity_results/tests/behat/highscoreswithscalesandgroups.feature +++ b/blocks/activity_results/tests/behat/highscoreswithscalesandgroups.feature @@ -110,7 +110,9 @@ Feature: The activity results block displays student in group high scores as sca And I should see "Good" in the "Activity results" "block" Scenario: Try to configure the block on the course page to show multiple high scores using ID numbers - Given I add the "Activity results" block + Given the following config values are set as admin: + | showuseridentity | idnumber,email | + And I add the "Activity results" block When I configure the "Activity results" block And I set the following fields to these values: | id_config_showbest | 3 | @@ -123,11 +125,13 @@ Feature: The activity results block displays student in group high scores as sca And I should see "Very good" in the "Activity results" "block" And I should see "Good" in the "Activity results" "block" And I log out + # Students cannot see user identity fields. And I log in as "student1" And I am on "Course 1" course homepage - And I should see "User S1" in the "Activity results" "block" + And I should see "User" in the "Activity results" "block" + And I should not see "User S1" in the "Activity results" "block" And I should see "Excellent!" in the "Activity results" "block" - And I should see "User S2" in the "Activity results" "block" + And I should not see "User S2" in the "Activity results" "block" And I should see "Very good" in the "Activity results" "block" Scenario: Try to configure the block on the course page to show multiple high scores using anonymous names diff --git a/blocks/activity_results/tests/behat/highscoreswithseperategroups.feature b/blocks/activity_results/tests/behat/highscoreswithseperategroups.feature index ccc223db26d..754a6140ecd 100644 --- a/blocks/activity_results/tests/behat/highscoreswithseperategroups.feature +++ b/blocks/activity_results/tests/behat/highscoreswithseperategroups.feature @@ -184,7 +184,9 @@ Feature: The activity results block displays student in separate groups scores And I should see "90.00" in the "Activity results" "block" Scenario: Try to configure the block on the course page to show multiple high scores using ID numbers - Given I add the "Activity results" block + Given the following config values are set as admin: + | showuseridentity | idnumber,email | + And I add the "Activity results" block When I configure the "Activity results" block And I set the following fields to these values: | id_config_showbest | 3 | @@ -198,11 +200,13 @@ Feature: The activity results block displays student in separate groups scores And I should see "85.00%" in the "Activity results" "block" And I should see "75.00%" in the "Activity results" "block" And I log out + # Students cannot see user identity fields. And I log in as "student1" And I am on "Course 1" course homepage - And I should see "User S1" in the "Activity results" "block" + And I should see "User" in the "Activity results" "block" + And I should not see "User S1" in the "Activity results" "block" And I should see "100.00%" in the "Activity results" "block" - And I should see "User S2" in the "Activity results" "block" + And I should not see "User S2" in the "Activity results" "block" And I should see "90.00%" in the "Activity results" "block" Scenario: Try to configure the block on the course page to show multiple high scores using anonymous names diff --git a/blocks/activity_results/tests/behat/highscoreswithvisiblegroups.feature b/blocks/activity_results/tests/behat/highscoreswithvisiblegroups.feature index 11ee5a579a4..3eca15e95e6 100644 --- a/blocks/activity_results/tests/behat/highscoreswithvisiblegroups.feature +++ b/blocks/activity_results/tests/behat/highscoreswithvisiblegroups.feature @@ -168,7 +168,9 @@ Feature: The activity results block displays student in visible groups scores And I should see "75.00" in the "Activity results" "block" Scenario: Try to configure the block on the course page to show multiple high scores using ID numbers - Given I add the "Activity results" block + Given the following config values are set as admin: + | showuseridentity | idnumber,email | + And I add the "Activity results" block When I configure the "Activity results" block And I set the following fields to these values: | id_config_showbest | 3 | diff --git a/blocks/activity_results/tests/behat/lowscoreswithoutgroups.feature b/blocks/activity_results/tests/behat/lowscoreswithoutgroups.feature index f632d95e1db..6c24497b142 100644 --- a/blocks/activity_results/tests/behat/lowscoreswithoutgroups.feature +++ b/blocks/activity_results/tests/behat/lowscoreswithoutgroups.feature @@ -128,7 +128,9 @@ Feature: The activity results block displays student low scores And I should see "70.00" in the "Activity results" "block" Scenario: Try to configure the block on the course page to show multiple low scores using ID numbers - Given I add the "Activity results" block + Given the following config values are set as admin: + | showuseridentity | idnumber,email | + And I add the "Activity results" block When I configure the "Activity results" block And I set the following fields to these values: | id_config_showbest | 0 | diff --git a/blocks/activity_results/tests/behat/lowscoreswithscales.feature b/blocks/activity_results/tests/behat/lowscoreswithscales.feature index 8885d70202d..e4880575f3b 100644 --- a/blocks/activity_results/tests/behat/lowscoreswithscales.feature +++ b/blocks/activity_results/tests/behat/lowscoreswithscales.feature @@ -79,7 +79,9 @@ Feature: The activity results block displays student low scores as scales And I should see "Good" in the "Activity results" "block" Scenario: Try to configure the block on the course page to show multiple low scores using ID numbers - Given I add the "Activity results" block + Given the following config values are set as admin: + | showuseridentity | idnumber,email | + And I add the "Activity results" block When I configure the "Activity results" block And I set the following fields to these values: | id_config_showbest | 0 | diff --git a/blocks/activity_results/tests/behat/lowscoreswithscalesandgroups.feature b/blocks/activity_results/tests/behat/lowscoreswithscalesandgroups.feature index a8967146169..a1e378a85dd 100644 --- a/blocks/activity_results/tests/behat/lowscoreswithscalesandgroups.feature +++ b/blocks/activity_results/tests/behat/lowscoreswithscalesandgroups.feature @@ -108,7 +108,9 @@ Feature: The activity results block displays students in groups low scores as sc And I should see "Good" in the "Activity results" "block" Scenario: Try to configure the block on the course page to show multiple high scores using ID numbers - Given I add the "Activity results" block + Given the following config values are set as admin: + | showuseridentity | idnumber,email | + And I add the "Activity results" block When I configure the "Activity results" block And I set the following fields to these values: | id_config_showbest | 0 | @@ -120,11 +122,13 @@ Feature: The activity results block displays students in groups low scores as sc And I should see "Very good" in the "Activity results" "block" And I should see "Good" in the "Activity results" "block" And I log out + # Students cannot see user identity fields. And I log in as "student5" And I am on "Course 1" course homepage - And I should see "User S5" in the "Activity results" "block" + And I should see "User" in the "Activity results" "block" + And I should not see "User S5" in the "Activity results" "block" And I should see "Good" in the "Activity results" "block" - And I should see "User S6" in the "Activity results" "block" + And I should not see "User S6" in the "Activity results" "block" And I should see "Average" in the "Activity results" "block" Scenario: Try to configure the block on the course page to show multiple high scores using anonymous names diff --git a/blocks/activity_results/tests/behat/lowscoreswithseperategroups.feature b/blocks/activity_results/tests/behat/lowscoreswithseperategroups.feature index 264eb8fa3f0..5575855345c 100644 --- a/blocks/activity_results/tests/behat/lowscoreswithseperategroups.feature +++ b/blocks/activity_results/tests/behat/lowscoreswithseperategroups.feature @@ -178,7 +178,9 @@ Feature: The activity results block displays students in separate groups scores And I should see "70.00" in the "Activity results" "block" Scenario: Try to configure the block on the course page to show multiple low scores using ID numbers - Given I add the "Activity results" block + Given the following config values are set as admin: + | showuseridentity | idnumber,email | + And I add the "Activity results" block When I configure the "Activity results" block And I set the following fields to these values: | id_config_showbest | 0 | @@ -191,11 +193,13 @@ Feature: The activity results block displays students in separate groups scores And I should see "85.00%" in the "Activity results" "block" And I should see "75.00%" in the "Activity results" "block" And I log out + # Students cannot see user identity fields. And I log in as "student1" And I am on "Course 1" course homepage - And I should see "User S1" in the "Activity results" "block" + And I should see "User" in the "Activity results" "block" + And I should not see "User S1" in the "Activity results" "block" And I should see "100.00%" in the "Activity results" "block" - And I should see "User S2" in the "Activity results" "block" + And I should not see "User S2" in the "Activity results" "block" And I should see "90.00%" in the "Activity results" "block" Scenario: Try to configure the block on the course page to show multiple low scores using anonymous names diff --git a/blocks/activity_results/tests/behat/lowscoreswithvisiblegroups.feature b/blocks/activity_results/tests/behat/lowscoreswithvisiblegroups.feature index 46525007998..ee5cb5e22d1 100644 --- a/blocks/activity_results/tests/behat/lowscoreswithvisiblegroups.feature +++ b/blocks/activity_results/tests/behat/lowscoreswithvisiblegroups.feature @@ -166,7 +166,9 @@ Feature: The activity results block displays student in visible groups low score And I should see "75.00" in the "Activity results" "block" Scenario: Try to configure the block on the course page to show multiple low scores using ID numbers - Given I add the "Activity results" block + Given the following config values are set as admin: + | showuseridentity | idnumber,email | + And I add the "Activity results" block When I configure the "Activity results" block And I set the following fields to these values: | id_config_showbest | 0 |