[ Index ]

PHP Cross Reference of Unnamed Project

title

Body

[close]

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

   1  @mod @mod_assign @core_outcome @javascript
   2  Feature: Outcome grading
   3    In order to give an outcome to my student
   4    As a teacher
   5    I need to grade a submission
   6  
   7    Background:
   8      Given the following "users" exist:
   9        | username | firstname | lastname | email |
  10        | teacher1 | Teacher | 1 | teacher1@example.com |
  11        | student0 | Student | 0 | student0@example.com |
  12        | student1 | Student | 1 | student1@example.com |
  13      And the following "courses" exist:
  14        | fullname | shortname | category | groupmode |
  15        | Course 1 | C1 | 0 | 1 |
  16      And the following "course enrolments" exist:
  17        | user | course | role |
  18        | teacher1 | C1 | editingteacher |
  19        | student0 | C1 | student |
  20        | student1 | C1 | student |
  21      And the following config values are set as admin:
  22        | enableoutcomes | 1 |
  23      And I log in as "admin"
  24      And I navigate to "Scales" node in "Site administration > Grades"
  25      And I press "Add a new scale"
  26      And I set the following fields to these values:
  27        | Name | Test Scale |
  28        | Scale | Disappointing, Excellent, Good, Very good, Excellent |
  29      And I press "Save changes"
  30      And I follow "Outcomes"
  31      And I press "Add a new outcome"
  32      And I set the following fields to these values:
  33        | Full name | Outcome Test |
  34        | Short name | OT |
  35        | Scale | Test Scale |
  36      And I press "Save changes"
  37      And I am on site homepage
  38      And I follow "Course 1"
  39      And I follow "Outcomes"
  40      And I set the field "Available standard outcomes" to "Outcome Test"
  41      And I click on "#add" "css_element"
  42      And I log out
  43  
  44    Scenario: Giving an outcome to a student
  45      Given I log in as "teacher1"
  46      And I follow "Course 1"
  47      And I turn editing mode on
  48      And I add a "Assignment" to section "1" and I fill the form with:
  49        | Assignment name | Test assignment name |
  50        | Description | Test assignment description |
  51        | assignsubmission_onlinetext_enabled | 1 |
  52        | Outcome Test | 1 |
  53      And I log out
  54      And I log in as "student1"
  55      And I follow "Course 1"
  56      And I follow "Test assignment name"
  57      And I press "Add submission"
  58      And I set the following fields to these values:
  59        | Online text | My online text |
  60      And I press "Save changes"
  61      And I log out
  62      When I log in as "teacher1"
  63      And I follow "Course 1"
  64      And I follow "Test assignment name"
  65      And I follow "View all submissions"
  66      And I click on "Grade" "link" in the "Student 0" "table_row"
  67      And I set the following fields to these values:
  68        | Outcome Test: | Excellent |
  69      And I press "Save changes"
  70      And I press "Ok"
  71      And I click on "Edit settings" "link"
  72      And I follow "Test assignment name"
  73      And I follow "View all submissions"
  74      Then I should see "Outcome Test: Excellent" in the "Student 0" "table_row"
  75      And I should not see "Outcome Test: Excellent" in the "Student 1" "table_row"
  76  
  77    Scenario: Giving an outcome to a group submission
  78      Given the following "users" exist:
  79        | username | firstname | lastname | email |
  80        | student2 | Student | 2 | student2@example.com |
  81      And the following "course enrolments" exist:
  82        | user | course | role |
  83        | student2 | C1 | student |
  84      And the following "groups" exist:
  85        | name | course | idnumber |
  86        | Group 1 | C1 | G1 |
  87      And I log in as "teacher1"
  88      And I follow "Course 1"
  89      And I expand "Users" node
  90      And I follow "Groups"
  91      And I add "Student 0 (student0@example.com)" user to "Group 1" group members
  92      And I add "Student 1 (student1@example.com)" user to "Group 1" group members
  93      And I am on site homepage
  94      And I follow "Course 1"
  95      And I turn editing mode on
  96      And I add a "Assignment" to section "1" and I fill the form with:
  97        | Assignment name | Test assignment name |
  98        | Description | Test assignment description |
  99        | assignsubmission_onlinetext_enabled | 1 |
 100        | Students submit in groups | Yes |
 101        | Group mode | No groups |
 102        | Outcome Test | 1 |
 103      And I log out
 104      And I log in as "student1"
 105      And I follow "Course 1"
 106      And I follow "Test assignment name"
 107      And I press "Add submission"
 108      And I set the following fields to these values:
 109        | Online text | My online text |
 110      And I press "Save changes"
 111      And I log out
 112      When I log in as "teacher1"
 113      And I follow "Course 1"
 114      And I follow "Test assignment name"
 115      And I follow "View all submissions"
 116      And I click on "Grade" "link" in the "Student 0" "table_row"
 117      And I set the following fields to these values:
 118        | Outcome Test: | Excellent |
 119        | Apply grades and feedback to entire group | Yes |
 120      And I press "Save changes"
 121      And I press "Ok"
 122      And I click on "Edit settings" "link"
 123      And I follow "Test assignment name"
 124      And I follow "View all submissions"
 125      Then I should see "Outcome Test: Excellent" in the "Student 0" "table_row"
 126      And I should see "Outcome Test: Excellent" in the "Student 1" "table_row"
 127      And I should not see "Outcome Test: Excellent" in the "Student 2" "table_row"
 128      And I click on "Grade" "link" in the "Student 1" "table_row"
 129      And I set the following fields to these values:
 130        | Outcome Test: | Disappointing |
 131        | Apply grades and feedback to entire group | No |
 132      And I press "Save changes"
 133      And I press "Ok"
 134      And I click on "Edit settings" "link"
 135      And I follow "Test assignment name"
 136      And I follow "View all submissions"
 137      And I should see "Outcome Test: Excellent" in the "Student 0" "table_row"
 138      And I should see "Outcome Test: Disappointing" in the "Student 1" "table_row"
 139      And I should not see "Outcome Test: Disappointing" in the "Student 0" "table_row"
 140      And I should not see "Outcome Test: Excellent" in the "Student 1" "table_row"
 141      And I should not see "Outcome Test: Disappointing" in the "Student 2" "table_row"
 142      And I should not see "Outcome Test: Excellent" in the "Student 2" "table_row"


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