[ 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 1 | 32 | Description | Offline text | 33 | assignsubmission_file_enabled | 0 | 34 And I follow "Course 1" 35 And I add a "Assignment" to section "1" and I fill the form with: 36 | Assignment name | Test assignment 2 | 37 | Description | Offline text | 38 | assignsubmission_file_enabled | 0 | 39 And I follow "Course 1" 40 And I add a "Assignment" to section "1" and I fill the form with: 41 | Assignment name | Test assignment 3 | 42 | Description | Offline text | 43 | assignsubmission_file_enabled | 0 | 44 And I follow "Course 1" 45 And I add a "Page" to section "1" 46 And I set the following fields to these values: 47 | Name | Test page name | 48 | Description | Test page description | 49 | Page content | This is a page | 50 And I press "Save and return to course" 51 And I follow "Course 1" 52 And I should see "Test page name" 53 And I navigate to "Grades" node in "Course administration" 54 And I turn editing mode on 55 And I give the grade "90.00" to the user "Student 1" for the grade item "Test assignment 1" 56 And I give the grade "80.00" to the user "Student 2" for the grade item "Test assignment 1" 57 And I give the grade "70.00" to the user "Student 3" for the grade item "Test assignment 1" 58 And I give the grade "60.00" to the user "Student 4" for the grade item "Test assignment 1" 59 And I give the grade "50.00" to the user "Student 5" for the grade item "Test assignment 1" 60 And I press "Save changes" 61 And I follow "Course 1" 62 63 Scenario: Configure the block on a non-graded activity to show 3 high scores 64 Given I follow "Test page name" 65 And I add the "Activity results" block 66 When I configure the "Activity results" block 67 And I set the following fields to these values: 68 | id_config_activitygradeitemid | Test assignment 1 | 69 | id_config_showbest | 3 | 70 | id_config_showworst | 0 | 71 | id_config_gradeformat | Absolute numbers | 72 | id_config_nameformat | Display full names | 73 And I press "Save changes" 74 Then I should see "Student 1" in the "Activity results" "block" 75 And I should see "90.00" in the "Activity results" "block" 76 And I should see "Student 2" in the "Activity results" "block" 77 And I should see "80.00" in the "Activity results" "block" 78 And I should see "Student 3" in the "Activity results" "block" 79 And I should see "70.00" in the "Activity results" "block" 80 81 Scenario: Block should select current activity by default 82 Given I follow "Test assignment 1" 83 When I add the "Activity results" block 84 And I configure the "Activity results" block 85 Then the field "id_config_activitygradeitemid" matches value "Test assignment 1" 86 And I follow "Course 1" 87 And I follow "Test assignment 2" 88 And I add the "Activity results" block 89 And I configure the "Activity results" block 90 And the field "id_config_activitygradeitemid" matches value "Test assignment 2" 91 And I follow "Course 1" 92 And I follow "Test assignment 3" 93 And I add the "Activity results" block 94 And I configure the "Activity results" block 95 And the field "id_config_activitygradeitemid" matches value "Test assignment 3" 96 And I follow "Course 1" 97 And I follow "Test page name" 98 And I add the "Activity results" block 99 And I configure the "Activity results" block 100 And the field "id_config_activitygradeitemid" does not match value "Test page name"
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 |