[ Index ]

PHP Cross Reference of moodle-2.8

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 | [email protected] |
  11        | student0 | Student | 0 | [email protected] |
  12        | student1 | Student | 1 | [email protected] |
  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 I log in as "admin"
  22      And I set the following administration settings values:
  23        | Enable outcomes | 1 |
  24      And I expand "Grades" node
  25      And I follow "Scales"
  26      And I press "Add a new scale"
  27      And I set the following fields to these values:
  28        | Name | Test Scale |
  29        | Scale | Disappointing, Excellent, Good, Very good, Excellent |
  30      And I press "Save changes"
  31      And I follow "Outcomes"
  32      And I press "Add a new outcome"
  33      And I set the following fields to these values:
  34        | Full name | Outcome Test |
  35        | Short name | OT |
  36        | Scale | Test Scale |
  37      And I press "Save changes"
  38      And I am on homepage
  39      And I follow "Course 1"
  40      And I follow "Outcomes"
  41      And I set the field "Available standard outcomes" to "Outcome Test"
  42      And I click on "#add" "css_element"
  43      And I log out
  44  
  45    Scenario: Giving an outcome to a student
  46      Given I log in as "teacher1"
  47      And I follow "Course 1"
  48      And I turn editing mode on
  49      And I add a "Assignment" to section "1" and I fill the form with:
  50        | Assignment name | Test assignment name |
  51        | Description | Test assignment description |
  52        | assignsubmission_onlinetext_enabled | 1 |
  53        | Outcome Test | 1 |
  54      And I log out
  55      And I log in as "student1"
  56      And I follow "Course 1"
  57      And I follow "Test assignment name"
  58      And I press "Add submission"
  59      And I set the following fields to these values:
  60        | Online text | My online text |
  61      And I press "Save changes"
  62      And I log out
  63      When I log in as "teacher1"
  64      And I follow "Course 1"
  65      And I follow "Test assignment name"
  66      And I follow "View/grade all submissions"
  67      And I click on "img[alt='Grade Student 0']" "css_element"
  68      And I set the following fields to these values:
  69        | Outcome Test: | Excellent |
  70      And I press "Save changes"
  71      And I press "Continue"
  72      Then I should see "Outcome Test: Excellent" in the "Student 0" "table_row"
  73      And I should not see "Outcome Test: Excellent" in the "Student 1" "table_row"
  74  
  75    Scenario: Giving an outcome to a group submission
  76      Given the following "users" exist:
  77        | username | firstname | lastname | email |
  78        | student2 | Student | 2 | [email protected] |
  79      And the following "course enrolments" exist:
  80        | user | course | role |
  81        | student2 | C1 | student |
  82      And the following "groups" exist:
  83        | name | course | idnumber |
  84        | Group 1 | C1 | G1 |
  85      And I log in as "teacher1"
  86      And I follow "Course 1"
  87      And I expand "Users" node
  88      And I follow "Groups"
  89      And I add "Student 0 ([email protected])" user to "Group 1" group members
  90      And I add "Student 1 ([email protected])" user to "Group 1" group members
  91      And I am on homepage
  92      And I follow "Course 1"
  93      And I turn editing mode on
  94      And I add a "Assignment" to section "1" and I fill the form with:
  95        | Assignment name | Test assignment name |
  96        | Description | Test assignment description |
  97        | assignsubmission_onlinetext_enabled | 1 |
  98        | Students submit in groups | Yes |
  99        | Group mode | No groups |
 100        | Outcome Test | 1 |
 101      And I log out
 102      And I log in as "student1"
 103      And I follow "Course 1"
 104      And I follow "Test assignment name"
 105      And I press "Add submission"
 106      And I set the following fields to these values:
 107        | Online text | My online text |
 108      And I press "Save changes"
 109      And I log out
 110      When I log in as "teacher1"
 111      And I follow "Course 1"
 112      And I follow "Test assignment name"
 113      And I follow "View/grade all submissions"
 114      And I click on "img[alt='Grade Student 0']" "css_element"
 115      And I set the following fields to these values:
 116        | Outcome Test: | Excellent |
 117        | Apply grades and feedback to entire group | Yes |
 118      And I press "Save changes"
 119      And I press "Continue"
 120      Then I should see "Outcome Test: Excellent" in the "Student 0" "table_row"
 121      And I should see "Outcome Test: Excellent" in the "Student 1" "table_row"
 122      And I should not see "Outcome Test: Excellent" in the "Student 2" "table_row"
 123      And I click on "img[alt='Grade Student 1']" "css_element"
 124      And I set the following fields to these values:
 125        | Outcome Test: | Disappointing |
 126        | Apply grades and feedback to entire group | No |
 127      And I press "Save changes"
 128      And I press "Continue"
 129      And I should see "Outcome Test: Excellent" in the "Student 0" "table_row"
 130      And I should see "Outcome Test: Disappointing" in the "Student 1" "table_row"
 131      And I should not see "Outcome Test: Disappointing" in the "Student 0" "table_row"
 132      And I should not see "Outcome Test: Excellent" in the "Student 1" "table_row"
 133      And I should not see "Outcome Test: Disappointing" in the "Student 2" "table_row"
 134      And I should not see "Outcome Test: Excellent" in the "Student 2" "table_row"


Generated: Fri Nov 28 20:29:05 2014 Cross-referenced by PHPXref 0.7.1