[ Index ]

PHP Cross Reference of Unnamed Project

title

Body

[close]

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

   1  @mod @mod_assign
   2  Feature: Group assignment submissions
   3    In order to allow students to work collaboratively on an assignment
   4    As a teacher
   5    I need to group submissions in groups
   6  
   7    @javascript
   8    Scenario: Switch between group modes
   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        | student0 | Student | 0 | student0@example.com |
  16        | student1 | Student | 1 | student1@example.com |
  17        | student2 | Student | 2 | student2@example.com |
  18        | student3 | Student | 3 | student3@example.com |
  19      And the following "course enrolments" exist:
  20        | user | course | role |
  21        | teacher1 | C1 | editingteacher |
  22        | student0 | C1 | student |
  23        | student1 | C1 | student |
  24        | student2 | C1 | student |
  25        | student3 | C1 | student |
  26      And the following "groups" exist:
  27        | name | course | idnumber |
  28        | Group 1 | C1 | G1 |
  29      And I log in as "teacher1"
  30      And I follow "Course 1"
  31      And I turn editing mode on
  32      And I add a "Assignment" to section "1" and I fill the form with:
  33        | Assignment name | Test assignment name |
  34        | Description | Test assignment description |
  35        | Students submit in groups | Yes |
  36        | Group mode | No groups |
  37      And I follow "Test assignment name"
  38      When I follow "View all submissions"
  39      Then "//tr[contains(., 'Student 0')][contains(., 'Default group')]" "xpath_element" should exist
  40      And "//tr[contains(., 'Student 1')][contains(., 'Default group')]" "xpath_element" should exist
  41      And "//tr[contains(., 'Student 2')][contains(., 'Default group')]" "xpath_element" should exist
  42      And "//tr[contains(., 'Student 3')][contains(., 'Default group')]" "xpath_element" should exist
  43      And I follow "Edit settings"
  44      And I set the following fields to these values:
  45        | Group mode | Separate groups |
  46      And I press "Save and return to course"
  47      And I click on "Edit settings" "link" in the "Administration" "block"
  48      And I set the following fields to these values:
  49        | Group mode | Separate groups |
  50      And I press "Save and display"
  51      And I expand "Users" node
  52      And I follow "Groups"
  53      And I add "Student 0 (student0@example.com)" user to "Group 1" group members
  54      And I add "Student 1 (student1@example.com)" user to "Group 1" group members
  55      And I follow "Course 1"
  56      And I follow "Test assignment name"
  57      And I follow "View all submissions"
  58      And "//tr[contains(., 'Student 0')][contains(., 'Group 1')]" "xpath_element" should exist
  59      And "//tr[contains(., 'Student 1')][contains(., 'Group 1')]" "xpath_element" should exist
  60      And I should not see "Student 2"
  61      And I set the field "Separate groups" to "All participants"
  62      And "//tr[contains(., 'Student 0')][contains(., 'Group 1')]" "xpath_element" should exist
  63      And "//tr[contains(., 'Student 1')][contains(., 'Group 1')]" "xpath_element" should exist
  64      And "//tr[contains(., 'Student 2')][contains(., 'Default group')]" "xpath_element" should exist
  65      And "//tr[contains(., 'Student 3')][contains(., 'Default group')]" "xpath_element" should exist
  66  
  67    @javascript
  68    Scenario: Confirm that the grading status changes for each group member
  69      Given the following "courses" exist:
  70        | fullname | shortname | category | groupmode |
  71        | Course 1 | C1 | 0 | 1 |
  72      And the following "users" exist:
  73        | username | firstname | lastname | email |
  74        | teacher1 | Teacher | 1 | teacher1@example.com |
  75        | student1 | Student | 1 | student1@example.com |
  76        | student2 | Student | 2 | student2@example.com |
  77        | student3 | Student | 3 | student3@example.com |
  78        | student4 | Student | 4 | student4@example.com |
  79      And the following "course enrolments" exist:
  80        | user | course | role |
  81        | teacher1 | C1 | editingteacher |
  82        | student1 | C1 | student |
  83        | student2 | C1 | student |
  84        | student3 | C1 | student |
  85        | student4 | C1 | student |
  86      And the following "groups" exist:
  87        | name | course | idnumber |
  88        | Group 1 | C1 | G1 |
  89      And the following "group members" exist:
  90        | user | group |
  91        | student1 | G1 |
  92        | student2 | G1 |
  93      And I log in as "teacher1"
  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        | assignsubmission_file_enabled | 0 |
 101        | Students submit in groups | Yes |
 102        | Group mode | No groups |
 103        | Require group to make submission | No |
 104      And I log out
 105      And I log in as "student1"
 106      And I follow "Course 1"
 107      And I follow "Test assignment name"
 108      And I press "Add submission"
 109      And I set the following fields to these values:
 110        | Online text | I'm the student's first submission |
 111      And I press "Save changes"
 112      And I log out
 113      And I log in as "teacher1"
 114      And I follow "Course 1"
 115      And I follow "Test assignment name"
 116      When I follow "View all submissions"
 117      Then "Student 1" row "Status" column of "generaltable" table should contain "Submitted for grading"
 118      And "Student 2" row "Status" column of "generaltable" table should contain "Submitted for grading"
 119      And "Student 3" row "Status" column of "generaltable" table should not contain "Submitted for grading"
 120      And "Student 4" row "Status" column of "generaltable" table should not contain "Submitted for grading"
 121      And I log out
 122      And I log in as "student3"
 123      And I follow "Course 1"
 124      And I follow "Test assignment name"
 125      And I press "Add submission"
 126      And I set the following fields to these values:
 127        | Online text | I'm the student's first submission |
 128      And I press "Save changes"
 129      And I log out
 130      And I log in as "teacher1"
 131      And I follow "Course 1"
 132      And I follow "Test assignment name"
 133      And I follow "View all submissions"
 134      And "Student 1" row "Status" column of "generaltable" table should contain "Submitted for grading"
 135      And "Student 2" row "Status" column of "generaltable" table should contain "Submitted for grading"
 136      And "Student 3" row "Status" column of "generaltable" table should contain "Submitted for grading"
 137      And "Student 4" row "Status" column of "generaltable" table should contain "Submitted for grading"


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