[ Index ]

PHP Cross Reference of Unnamed Project

title

Body

[close]

/mod/assign/tests/behat/ -> quickgrading.feature (source)

   1  @mod @mod_assign @javascript
   2  Feature: In an assignment, teachers grade multiple students on one page
   3    In order to quickly give students grades and feedback
   4    As a teacher
   5    I need to grade multiple students on one page
   6  
   7    Scenario: Saving but not grading a grade should
   8      not indicate the grade is graded.
   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 |
  14        | teacher1 | Teacher | 1 | teacher1@example.com |
  15        | student1 | Student | 1 | student1@example.com |
  16      And the following "course enrolments" exist:
  17        | user | course | role |
  18        | teacher1 | C1 | editingteacher |
  19        | student1 | C1 | student |
  20      When I log in as "admin"
  21      And I am on site homepage
  22      And I follow "Course 1"
  23      And I turn editing mode on
  24      And I add a "Assignment" to section "1" and I fill the form with:
  25        | Assignment name | Test assignment name |
  26        | Description | Submit your online text |
  27        | assignsubmission_onlinetext_enabled | 1 |
  28      And I log out
  29      And I log in as "student1"
  30      And I follow "Course 1"
  31      And I follow "Test assignment name"
  32      And I press "Add submission"
  33      And I set the following fields to these values:
  34        | Online text | I'm the student1 submission |
  35      And I press "Save changes"
  36      And I log out
  37      And I log in as "admin"
  38      And I am on site homepage
  39      And I follow "Course 1"
  40      And I follow "Test assignment name"
  41      And I follow "View all submissions"
  42      And I click on "Grade" "link" in the "Student 1" "table_row"
  43      And I wait until the page is ready
  44      And I press "Save changes"
  45      And I press "Ok"
  46      And I click on "Edit settings" "link"
  47      And I follow "Test assignment name"
  48      Then I should see "1" in the "Needs grading" "table_row"
  49  
  50    Scenario: Grade multiple students on one page
  51      Given the following "courses" exist:
  52        | fullname | shortname | category | groupmode |
  53        | Course 1 | C1 | 0 | 1 |
  54      And the following "users" exist:
  55        | username | firstname | lastname | email |
  56        | teacher1 | Teacher | 1 | teacher1@example.com |
  57        | student1 | Student | 1 | student1@example.com |
  58        | student2 | Student | 2 | student2@example.com |
  59      And the following "course enrolments" exist:
  60        | user | course | role |
  61        | teacher1 | C1 | editingteacher |
  62        | student1 | C1 | student |
  63        | student2 | C1 | student |
  64      And the following config values are set as admin:
  65        | enableoutcomes | 1 |
  66      When I log in as "teacher1"
  67      And I follow "Course 1"
  68      And I follow "Outcomes"
  69      And I follow "Edit outcomes"
  70      And I press "Add a new outcome"
  71      And I follow "Add a new scale"
  72      And I set the following fields to these values:
  73        | Name | 1337dom scale |
  74        | Scale | Noob, Nub, 1337, HaXor |
  75      And I press "Save changes"
  76      And I follow "Course 1"
  77      And I follow "Outcomes"
  78      And I follow "Edit outcomes"
  79      And I press "Add a new outcome"
  80      And I set the following fields to these values:
  81        | Full name | M8d skillZ! |
  82        | Short name | skillZ! |
  83        | Scale | 1337dom scale |
  84      And I press "Save changes"
  85      And I follow "Course 1"
  86      And I turn editing mode on
  87      And I add a "Assignment" to section "1" and I fill the form with:
  88        | Assignment name | Test assignment name |
  89        | Description | Submit your online text |
  90        | assignsubmission_onlinetext_enabled | 1 |
  91        | assignsubmission_file_enabled | 0 |
  92        | M8d skillZ! | 1 |
  93      And I log out
  94      And I log in as "student1"
  95      And I follow "Course 1"
  96      And I follow "Test assignment name"
  97      And I press "Add submission"
  98      And I set the following fields to these values:
  99        | Online text | I'm the student1 submission |
 100      And I press "Save changes"
 101      And I log out
 102      And I log in as "student2"
 103      And I follow "Course 1"
 104      And I follow "Test assignment name"
 105      When I press "Add submission"
 106      And I set the following fields to these values:
 107        | Online text | I'm the student2 submission |
 108      And I press "Save changes"
 109      And I log out
 110      And I log in as "teacher1"
 111      And I follow "Course 1"
 112      And I follow "Test assignment name"
 113      And I follow "View all submissions"
 114      And I click on "Grade" "link" in the "Student 1" "table_row"
 115      And I set the following fields to these values:
 116        | Grade out of 100 | 50.0 |
 117        | M8d skillZ! | 1337 |
 118        | Feedback comments | I'm the teacher first feedback |
 119      And I press "Save changes"
 120      And I press "Ok"
 121      And I click on "Edit settings" "link"
 122      And I follow "Test assignment name"
 123      And I follow "View all submissions"
 124      Then I click on "Quick grading" "checkbox"
 125      And I set the field "User grade" to "60.0"
 126      And I press "Save all quick grading changes"
 127      And I should see "The grade changes were saved"
 128      And I press "Continue"
 129      And I log out
 130      And I log in as "student1"
 131      And I follow "Course 1"
 132      And I follow "Test assignment name"
 133      And I should see "I'm the teacher first feedback"
 134      And I should see "60.0"
 135      And I follow "Grades" in the user menu
 136      And I follow "Course 1"
 137      And I should see "1337"
 138      And I log out
 139      And I log in as "student2"
 140      And I follow "Course 1"
 141      And I follow "Test assignment name"
 142      And I should not see "I'm the teacher first feedback"
 143      And I should not see "60.0"
 144      And I follow "Grades" in the user menu
 145      And I follow "Course 1"
 146      And I should not see "1337"
 147      And I log out
 148      And I log in as "teacher1"
 149      And I follow "Course 1"
 150      And I follow "Test assignment name"
 151      And I follow "View all submissions"
 152      And I click on "Hide User picture" "link"
 153      And I click on "Hide Full name" "link"
 154      And I click on "Hide Email address" "link"
 155      And I click on "Hide Status" "link"
 156      And I click on "Hide Grade" "link"
 157      And I click on "Hide Edit" "link"
 158      And I click on "Hide Last modified (submission)" "link"
 159      And I click on "Hide Online text" "link"
 160      And I click on "Hide Submission comments" "link"
 161      And I click on "Hide Last modified (grade)" "link"
 162      And I click on "Hide Feedback comments" "link"
 163      And I click on "Hide Final grade" "link"
 164      And I click on "Hide Outcomes" "link"
 165      And I press "Save all quick grading changes"
 166      And I should see "The grade changes were saved"
 167      And I press "Continue"
 168      And I log out
 169      And I log in as "student1"
 170      And I follow "Course 1"
 171      And I follow "Test assignment name"
 172      And I should see "I'm the teacher first feedback"
 173      And I should see "60.0"
 174      And I follow "Grades" in the user menu
 175      And I follow "Course 1"
 176      And I should see "1337"
 177      And I log out
 178      And I log in as "student2"
 179      And I follow "Course 1"
 180      And I follow "Test assignment name"
 181      And I should not see "I'm the teacher first feedback"
 182      And I should not see "60.0"
 183      And I follow "Grades" in the user menu
 184      And I follow "Course 1"
 185      And I should not see "1337"


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