[ Index ]

PHP Cross Reference of Unnamed Project

title

Body

[close]

/grade/report/singleview/tests/behat/ -> bulk_insert_grades.feature (source)

   1  @core @core_grades @gradereport_singleview @javascript
   2  Feature: We can bulk insert grades for students in a course
   3    As a teacher
   4    In order to quickly grade items
   5    I can bulk insert values for all or empty grades.
   6  
   7    Background:
   8      Given the following "courses" exist:
   9        | fullname | shortname | category |
  10        | Course 1 | C1 | 0 |
  11      And the following "users" exist:
  12        | username | firstname | lastname | email | idnumber | alternatename |
  13        | teacher1 | Teacher | 1 | teacher1@example.com | t1 | fred |
  14        | student1 | Student | 1 | student1@example.com | s1 | james |
  15        | student2 | Student | 2 | student1@example.com | s2 | holly |
  16        | student3 | Student | 3 | student1@example.com | s3 | anna |
  17        | student4 | Student | 4 | student1@example.com | s4 | zac |
  18      And the following "course enrolments" exist:
  19        | user | course | role |
  20        | teacher1 | C1 | editingteacher |
  21        | student1 | C1 | student |
  22        | student2 | C1 | student |
  23        | student3 | C1 | student |
  24        | student4 | C1 | student |
  25      And the following "activities" exist:
  26        | activity | course | idnumber | name | intro |
  27        | assign | C1 | a1 | Test assignment one | Submit something!   |
  28        | assign | C1 | a2 | Test assignment two | Submit something!   |
  29        | assign | C1 | a3 | Test assignment three | Submit something! |
  30        | assign | C1 | a4 | Test assignment four | Submit nothing!    |
  31  
  32    Scenario: I can bulk insert grades and check their override flags for grade view.
  33      Given I log in as "teacher1"
  34      And I follow "Course 1"
  35      And I follow "Test assignment one"
  36      And I follow "View all submissions"
  37      And I click on "Grade" "link" in the "Student 1" "table_row"
  38      And I set the following fields to these values:
  39        | Grade out of 100 | 50 |
  40      And I press "Save changes"
  41      And I press "Ok"
  42      And I follow "Edit settings"
  43      And I follow "View gradebook"
  44      And I follow "Single view for Test assignment one"
  45      Then the field "Grade for james (Student) 1" matches value "50.00"
  46      And the field "Override for james (Student) 1" matches value "0"
  47      And I set the field "Perform bulk insert" to "1"
  48      And I set the field "Insert value" to "1.0"
  49      And I press "Save"
  50      And I press "Continue"
  51      And the field "Grade for james (Student) 1" matches value "50.00"
  52      And the field "Override for james (Student) 1" matches value "0"
  53      And the field "Grade for holly (Student) 2" matches value "1.00"
  54      And the field "Override for holly (Student) 2" matches value "1"
  55      And the field "Grade for anna (Student) 3" matches value "1.00"
  56      And the field "Override for anna (Student) 3" matches value "1"
  57      And the field "Grade for zac (Student) 4" matches value "1.00"
  58      And the field "Override for zac (Student) 4" matches value "1"
  59      And I set the field "For" to "All grades"
  60      And I set the field "Perform bulk insert" to "1"
  61      And I set the field "Insert value" to "2.0"
  62      And I press "Save"
  63      And I press "Continue"
  64      And the field "Grade for james (Student) 1" matches value "2.00"
  65      And the field "Override for james (Student) 1" matches value "1"
  66      And the field "Grade for holly (Student) 2" matches value "2.00"
  67      And the field "Override for holly (Student) 2" matches value "1"
  68      And the field "Grade for anna (Student) 3" matches value "2.00"
  69      And the field "Override for anna (Student) 3" matches value "1"
  70      And the field "Grade for zac (Student) 4" matches value "2.00"
  71      And the field "Override for zac (Student) 4" matches value "1"
  72  
  73    Scenario: I can bulk insert grades and check their override flags for user view.
  74      Given I log in as "teacher1"
  75      And I follow "Course 1"
  76      And I follow "Test assignment two"
  77      And I follow "View all submissions"
  78      And I click on "Grade" "link" in the "Student 1" "table_row"
  79      And I set the following fields to these values:
  80        | Grade out of 100 | 50 |
  81      And I press "Save changes"
  82      And I press "Ok"
  83      And I follow "Edit settings"
  84      And I follow "View gradebook"
  85      And I click on "input[title='Dock Navigation block']" "css_element"
  86      And I click on "input[title='Dock Administration block']" "css_element"
  87      And I follow "Single view for Test assignment two"
  88      And I select "Student 1" from the "Select user..." singleselect
  89      Then the field "Grade for Test assignment two" matches value "50.00"
  90      And the field "Override for Test assignment two" matches value "0"
  91      And I set the field "For" to "Empty grades"
  92      And I set the field "Perform bulk insert" to "1"
  93      And I set the field "Insert value" to "1.0"
  94      And I press "Save"
  95      And I press "Continue"
  96      And the field "Grade for Test assignment two" matches value "50.00"
  97      And the field "Override for Test assignment two" matches value "0"
  98      And the field "Grade for Test assignment one" matches value "1.00"
  99      And the field "Override for Test assignment one" matches value "1"
 100      And the field "Grade for Test assignment three" matches value "1.00"
 101      And the field "Override for Test assignment three" matches value "1"
 102      And the field "Grade for Test assignment four" matches value "1.00"
 103      And the field "Override for Test assignment four" matches value "1"


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