[ Index ]

PHP Cross Reference of Unnamed Project

title

Body

[close]

/grade/tests/behat/ -> grade_grade_minmax_change.feature (source)

   1  @core @core_grades
   2  Feature: We can change the maximum and minimum number of points for manual items with existing grades
   3    In order to verify existing grades are modified as expected
   4    As an teacher
   5    I need to modify a grade item with exiting grades
   6    I need to ensure existing grades are modified in an expected manner
   7  
   8    Background:
   9      Given the following "courses" exist:
  10        | fullname | shortname | category | groupmode |
  11        | Course 1 | C1 | 0 | 1 |
  12      And the following "users" exist:
  13        | username | firstname | lastname | email | idnumber |
  14        | teacher1 | Teacher | 1 | teacher1@example.com | t1 |
  15        | student1 | Student | 1 | student1@example.com | s1 |
  16        | student2 | Student | 2 | student2@example.com | s2 |
  17      And the following "course enrolments" exist:
  18        | user | course | role |
  19        | teacher1 | C1 | editingteacher |
  20        | student1 | C1 | student |
  21        | student2 | C1 | student |
  22      And I log in as "teacher1"
  23      And I am on site homepage
  24      And I follow "Course 1"
  25      And I navigate to "Grades" node in "Course administration"
  26      And I navigate to "Gradebook setup" node in "Grade administration > Setup"
  27      And I press "Add grade item"
  28      And I set the following fields to these values:
  29        | Item name | Manual item 1 |
  30        | Minimum grade | 0 |
  31        | Maximum grade | 100 |
  32      And I press "Save changes"
  33      And I navigate to "Course grade settings" node in "Grade administration > Setup"
  34      And I set the field "Show weightings" to "Show"
  35      And I set the field "Show contribution to course total" to "Show"
  36      And I press "Save changes"
  37  
  38    Scenario: Change maximum number of points on a graded item.
  39      And I follow "Course 1"
  40      And I navigate to "Grades" node in "Course administration"
  41      And I turn editing mode on
  42      And I give the grade "10.00" to the user "Student 1" for the grade item "Manual item 1"
  43      And I give the grade "8.00" to the user "Student 2" for the grade item "Manual item 1"
  44      And I press "Save changes"
  45      When I navigate to "Gradebook setup" node in "Grade administration > Setup"
  46      And I click on "Edit" "link" in the "Manual item 1" "table_row"
  47      And I click on "Edit settings" "link" in the "Manual item 1" "table_row"
  48      And I set the following fields to these values:
  49        | Maximum grade | 10 |
  50        | Rescale existing grades | No |
  51      And I press "Save changes"
  52      And I follow "User report"
  53      And I select "Student 1" from the "Select all or one user" singleselect
  54      Then the following should exist in the "user-grade" table:
  55        | Grade item    | Calculated weight | Grade  | Contribution to course total |
  56        | Manual item 1 | 100.00 %          | 10.00  | 100.00 %                     |
  57      And I select "Student 2" from the "Select all or one user" singleselect
  58      And the following should exist in the "user-grade" table:
  59        | Grade item    | Calculated weight | Grade  | Contribution to course total |
  60        | Manual item 1 | 100.00 %          | 8.00   | 80.00 %                      |
  61      And I navigate to "Gradebook setup" node in "Grade administration > Setup"
  62      And I click on "Edit" "link" in the "Manual item 1" "table_row"
  63      And I click on "Edit settings" "link" in the "Manual item 1" "table_row"
  64      And I set the following fields to these values:
  65        | Maximum grade | 20 |
  66        | Rescale existing grades | Yes |
  67      And I press "Save changes"
  68      And I follow "User report"
  69      And I select "Student 1" from the "Select all or one user" singleselect
  70      And the following should exist in the "user-grade" table:
  71        | Grade item    | Calculated weight | Grade  | Contribution to course total |
  72        | Manual item 1 | 100.00 %          | 20.00  | 100.00 %                     |
  73      And I select "Student 2" from the "Select all or one user" singleselect
  74      And the following should exist in the "user-grade" table:
  75        | Grade item    | Calculated weight | Grade  | Contribution to course total |
  76        | Manual item 1 | 100.00 %          | 16.00   | 80.00 %                     |


Generated: Thu Aug 11 10:00:09 2016 Cross-referenced by PHPXref 0.7.1