[ Index ] |
PHP Cross Reference of Unnamed Project |
[Summary view] [Print] [Text view]
1 @block @block_activity_results 2 Feature: The activity results block displays student scores 3 In order to be display student scores 4 As a user 5 I need to see the activity results block 6 7 Background: 8 Given the following "users" exist: 9 | username | firstname | lastname | email | idnumber | 10 | teacher1 | Teacher | 1 | teacher1@example.com | T1 | 11 | student1 | Student | 1 | student1@example.com | S1 | 12 | student2 | Student | 2 | student2@example.com | S2 | 13 | student3 | Student | 3 | student3@example.com | S3 | 14 | student4 | Student | 4 | student4@example.com | S4 | 15 | student5 | Student | 5 | student5@example.com | S5 | 16 And the following "courses" exist: 17 | fullname | shortname | category | 18 | Course 1 | C1 | 0 | 19 And the following "course enrolments" exist: 20 | user | course | role | 21 | teacher1 | C1 | editingteacher | 22 | student1 | C1 | student | 23 | student2 | C1 | student | 24 | student3 | C1 | student | 25 | student4 | C1 | student | 26 | student5 | C1 | student | 27 And I log in as "teacher1" 28 And I follow "Course 1" 29 And I turn editing mode on 30 And I add a "Assignment" to section "1" and I fill the form with: 31 | Assignment name | Test assignment | 32 | Description | Offline text | 33 | assignsubmission_file_enabled | 0 | 34 And I follow "Course 1" 35 And I navigate to "Grades" node in "Course administration" 36 And I turn editing mode on 37 And I give the grade "90.00" to the user "Student 1" for the grade item "Test assignment" 38 And I give the grade "80.00" to the user "Student 2" for the grade item "Test assignment" 39 And I give the grade "70.00" to the user "Student 3" for the grade item "Test assignment" 40 And I give the grade "60.00" to the user "Student 4" for the grade item "Test assignment" 41 And I give the grade "50.00" to the user "Student 5" for the grade item "Test assignment" 42 And I press "Save changes" 43 And I follow "Course 1" 44 45 Scenario: Configure the block on the course page to show 0 high scores 46 Given I add the "Activity results" block 47 When I configure the "Activity results" block 48 And I set the following fields to these values: 49 | id_config_showbest | 0 | 50 | id_config_showworst | 0 | 51 | id_config_gradeformat | Percentages | 52 | id_config_nameformat | Display full names | 53 And I press "Save changes" 54 Then I should see "This block's configuration currently does not allow it to show any results." in the "Activity results" "block" 55 56 Scenario: Configure the block on the course page to show 1 high score 57 Given I add the "Activity results" block 58 When I configure the "Activity results" block 59 And I set the following fields to these values: 60 | id_config_showbest | 1 | 61 | id_config_showworst | 0 | 62 | id_config_gradeformat | Percentages | 63 | id_config_nameformat | Display full names | 64 | id_config_decimalpoints | 0 | 65 And I press "Save changes" 66 Then I should see "Student 1" in the "Activity results" "block" 67 And I should see "90%" in the "Activity results" "block" 68 69 Scenario: Try to configure the block on the course page to show 1 high score as a fraction 70 Given I add the "Activity results" block 71 When I configure the "Activity results" block 72 And I set the following fields to these values: 73 | id_config_showbest | 1 | 74 | id_config_showworst | 0 | 75 | id_config_gradeformat | Fractions | 76 | id_config_nameformat | Display full names | 77 And I press "Save changes" 78 Then I should see "Student 1" in the "Activity results" "block" 79 And I should see "90.00/100.00" in the "Activity results" "block" 80 81 Scenario: Try to configure the block on the course page to show 1 high score as a absolute numbers 82 Given I add the "Activity results" block 83 When I configure the "Activity results" block 84 And I set the following fields to these values: 85 | id_config_showbest | 1 | 86 | id_config_showworst | 0 | 87 | id_config_gradeformat | Absolute numbers | 88 | id_config_nameformat | Display full names | 89 And I press "Save changes" 90 Then I should see "Student 1" in the "Activity results" "block" 91 And I should see "90.00" in the "Activity results" "block" 92 93 Scenario: Try to configure the block on the course page to show multiple high scores as percentages 94 Given I add the "Activity results" block 95 When I configure the "Activity results" block 96 And I set the following fields to these values: 97 | id_config_showbest | 3 | 98 | id_config_showworst | 0 | 99 | id_config_gradeformat | Percentages | 100 | id_config_nameformat | Display full names | 101 | id_config_decimalpoints | 0 | 102 And I press "Save changes" 103 Then I should see "Student 1" in the "Activity results" "block" 104 And I should see "90%" in the "Activity results" "block" 105 And I should see "Student 2" in the "Activity results" "block" 106 And I should see "80%" in the "Activity results" "block" 107 And I should see "Student 3" in the "Activity results" "block" 108 And I should see "70%" in the "Activity results" "block" 109 110 Scenario: Try to configure the block on the course page to show multiple high scores as fractions 111 Given I add the "Activity results" block 112 When I configure the "Activity results" block 113 And I set the following fields to these values: 114 | id_config_showbest | 3 | 115 | id_config_showworst | 0 | 116 | id_config_gradeformat | Fractions | 117 | id_config_nameformat | Display full names | 118 And I press "Save changes" 119 Then I should see "Student 1" in the "Activity results" "block" 120 And I should see "90.00/100.00" in the "Activity results" "block" 121 And I should see "Student 2" in the "Activity results" "block" 122 And I should see "80.00/100.00" in the "Activity results" "block" 123 And I should see "Student 3" in the "Activity results" "block" 124 And I should see "70.00/100.00" in the "Activity results" "block" 125 126 Scenario: Try to configure the block on the course page to show multiple high scores as absolute numbers 127 Given I add the "Activity results" block 128 When I configure the "Activity results" block 129 And I set the following fields to these values: 130 | id_config_showbest | 3 | 131 | id_config_showworst | 0 | 132 | id_config_gradeformat | Absolute numbers | 133 | id_config_nameformat | Display full names | 134 And I press "Save changes" 135 Then I should see "Student 1" in the "Activity results" "block" 136 And I should see "90.00" in the "Activity results" "block" 137 And I should see "Student 2" in the "Activity results" "block" 138 And I should see "80.00" in the "Activity results" "block" 139 And I should see "Student 3" in the "Activity results" "block" 140 And I should see "70.00" in the "Activity results" "block" 141 142 Scenario: Try to configure the block on the course page to show multiple high scores using ID numbers 143 Given I add the "Activity results" block 144 When I configure the "Activity results" block 145 And I set the following fields to these values: 146 | id_config_showbest | 3 | 147 | id_config_showworst | 0 | 148 | id_config_gradeformat | Percentages | 149 | id_config_nameformat | Display only ID numbers | 150 And I press "Save changes" 151 Then I should see "User S1" in the "Activity results" "block" 152 And I should see "90.00%" in the "Activity results" "block" 153 And I should see "User S2" in the "Activity results" "block" 154 And I should see "80.00%" in the "Activity results" "block" 155 And I should see "User S3" in the "Activity results" "block" 156 And I should see "70.00%" in the "Activity results" "block" 157 158 Scenario: Try to configure the block on the course page to show multiple high scores using anonymous names 159 Given I add the "Activity results" block 160 When I configure the "Activity results" block 161 And I set the following fields to these values: 162 | id_config_showbest | 3 | 163 | id_config_showworst | 0 | 164 | id_config_gradeformat | Percentages | 165 | id_config_nameformat | Anonymous results | 166 And I press "Save changes" 167 Then I should see "User" in the "Activity results" "block" 168 And I should see "90.00%" in the "Activity results" "block" 169 And I should see "80.00%" in the "Activity results" "block" 170 And I should see "70.00%" in the "Activity results" "block"
title
Description
Body
title
Description
Body
title
Description
Body
title
Body
Generated: Thu Aug 11 10:00:09 2016 | Cross-referenced by PHPXref 0.7.1 |