[ Index ]

PHP Cross Reference of Unnamed Project

title

Body

[close]

/mod/feedback/tests/behat/ -> show_nonrespondents.feature (source)

   1  @mod @mod_feedback
   2  Feature: Show users who have not responded to the feedback survey
   3    In order to harass students about completing the feedback
   4    As a teacher
   5    I need to see which students haven't responded
   6  
   7    Background:
   8      Given the following "users" exist:
   9        | username | firstname | lastname |
  10        | teacher1 | Teacher   | 1        |
  11        | student1 | Student   | 1        |
  12        | student2 | Student   | 2        |
  13        | student3 | Student   | 3        |
  14      And the following "courses" exist:
  15        | fullname | shortname |
  16        | Course 1 | C1        |
  17      And the following "course enrolments" exist:
  18        | user     | course | role           |
  19        | teacher1 | C1     | editingteacher |
  20        | student1 | C1     | student        |
  21        | student2 | C1     | student        |
  22        | student3 | C1     | student        |
  23      And the following "groups" exist:
  24        | course | name | idnumber |
  25        | C1     | G1   | GI1      |
  26      And the following "group members" exist:
  27        | user     | group |
  28        | student1 | GI1   |
  29        | student2 | GI1   |
  30      And the following "groupings" exist:
  31        | name | course | idnumber |
  32        | GX1  | C1     | GXI1     |
  33      And the following "grouping groups" exist:
  34        | grouping | group  |
  35        | GXI1     | GI1    |
  36  
  37    @javascript
  38    Scenario: See users who have not responded
  39      # Set up a feedback.
  40      When I log in as "teacher1"
  41      And I follow "Course 1"
  42      And I turn editing mode on
  43      And I add a "Feedback" to section "1" and I fill the form with:
  44        | Name                | Frogs                                             |
  45        | Description         | x                                                 |
  46        | Record user names   | User's name will be logged and shown with answers |
  47        | Access restrictions | Grouping: GX1                                     |
  48      And I follow "Frogs"
  49      And I follow "Edit questions"
  50      And I set the field "Add question" to "Short text answer"
  51      And I set the following fields to these values:
  52        | Question | Y/N? |
  53      And I press "Save question"
  54      And I log out
  55  
  56      # Go in as student 1 and do the feedback.
  57      And I log in as "student1"
  58      And I follow "Course 1"
  59      And I follow "Frogs"
  60      And I follow "Answer the questions"
  61      And I set the field "Y/N?" to "Y"
  62      And I press "Submit your answers"
  63      And I log out
  64  
  65      # Go in as teacher and check the users who haven't completed it.
  66      And I log in as "teacher1"
  67      And I follow "Course 1"
  68      And I follow "Frogs"
  69      And I follow "Show non-respondents"
  70  
  71      # Should only show student 2; not student 1 (they did it) or 3 (not in grouping).
  72      Then I should see "Student 2"
  73      And I should not see "Student 1"
  74      And I should not see "Student 3"


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