[ Index ] |
PHP Cross Reference of Unnamed Project |
[Summary view] [Print] [Text view]
1 @core @core_grades 2 Feature: Student and teacher's view of aggregated grade items is consistent when hidden grade items are present 3 In order to calculate grade totals 4 As an teacher 5 I need to add aggregate columns to the gradebook 6 7 Scenario: Natural aggregation of course categories with hidden items calculates correctly for teacher and student 8 Given the following "courses" exist: 9 | fullname | shortname | category | groupmode | 10 | Course 1 | C1 | 0 | 1 | 11 And the following "users" exist: 12 | username | firstname | lastname | email | idnumber | 13 | teacher1 | Teacher | 1 | teacher1@example.com | t1 | 14 | student1 | Student | 1 | student1@example.com | s1 | 15 And the following "course enrolments" exist: 16 | user | course | role | 17 | teacher1 | C1 | editingteacher | 18 | student1 | C1 | student | 19 And the following "grade categories" exist: 20 | fullname | course | 21 | Sub category 1 | C1 | 22 | Sub category 2 | C1 | 23 And the following "activities" exist: 24 | activity | course | idnumber | name | intro | gradecategory| grade | 25 | assign | C1 | a1 | Test assignment one | Submit something! | Sub category 1 | 100 | 26 | assign | C1 | a2 | Test assignment two | Submit something! | Sub category 1 | 100 | 27 | assign | C1 | a3 | Test assignment three | Submit something! | Sub category 2 | 100 | 28 | assign | C1 | a4 | Test assignment four | Submit something! | Sub category 2 | 100 | 29 And I log in as "admin" 30 And I navigate to "Overview report" node in "Site administration > Grades > Report settings" 31 And I set the field "s__grade_report_overview_showtotalsifcontainhidden" to "Show totals excluding hidden items" 32 And I navigate to "User report" node in "Site administration > Grades > Report settings" 33 And I set the field "s__grade_report_user_showtotalsifcontainhidden" to "Show totals excluding hidden items" 34 And I press "Save changes" 35 When I log out 36 And I log in as "teacher1" 37 And I follow "Course 1" 38 And I navigate to "Grades" node in "Course administration" 39 And I turn editing mode on 40 And I give the grade "50.00" to the user "Student 1" for the grade item "Test assignment one" 41 And I give the grade "50.00" to the user "Student 1" for the grade item "Test assignment three" 42 And I press "Save changes" 43 And I set the following settings for grade item "Test assignment four": 44 | Hidden | 1 | 45 And I press "Save changes" 46 And I follow "Course 1" 47 And I navigate to "Grades" node in "Course administration" 48 And I select "User report" from the "Grade report" singleselect 49 And I select "Student 1" from the "Select all or one user" singleselect 50 Then the following should exist in the "user-grade" table: 51 | Grade item | Calculated weight | Grade | Range | Percentage | Contribution to course total | 52 | Test assignment one | 100.00 % | 50.00 | 0–100 | 50.00 % | 25.00 % | 53 | Test assignment two | 0.00 %( Empty ) | - | 0–100 | - | 0.00 % | 54 | Test assignment three | 100.00 % | 50.00 | 0–100 | 50.00 % | 25.00 % | 55 | Course total | - | 100.00 | 0–200 | 50.00 % | - | 56 When I log out 57 And I log in as "student1" 58 And I follow "Course 1" 59 And I navigate to "Grades" node in "Course administration" 60 And I navigate to "User report" node in "Grade administration" 61 Then the following should exist in the "user-grade" table: 62 | Grade item | Calculated weight | Grade | Range | Percentage | Contribution to course total | 63 | Test assignment one | 100.00 % | 50.00 | 0–100 | 50.00 % | 25.00 % | 64 | Test assignment two | -( Empty ) | - | 0–100 | - | - | 65 | Test assignment three | 100.00 % | 50.00 | 0–100 | 50.00 % | 25.00 % | 66 | Course total | - | 100.00 | 0–200 | 50.00 % | - | 67 And I should not see "Test assignment four"
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 |