[ Index ]

PHP Cross Reference of Unnamed Project

title

Body

[close]

/report/participation/tests/behat/ -> message_participants.feature (source)

   1  @report @report_participation @javascript
   2  Feature: Use the particiaption report to message groups of students
   3    In order to engage with students based on participation
   4    As a teacher
   5    I need to be able to message students who have not participated in an activity
   6  
   7    Background:
   8      Given the following "courses" exist:
   9        | fullname | shortname | category | groupmode |
  10        | Course 1 | C1 | 0 | 1 |
  11      And the following "users" exist:
  12        | username | firstname | lastname | email |
  13        | teacher1 | Teacher | 1 | teacher1@example.com |
  14        | student1 | Student | 1 | student1@example.com |
  15        | student2 | Student | 2 | student2@example.com |
  16        | student3 | Student | 3 | student3@example.com |
  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 I log in as "teacher1"
  24      And I follow "Course 1"
  25      And I turn editing mode on
  26      And I add a "Book" to section "1" and I fill the form with:
  27        | Name | Test book name |
  28        | Description | Test book |
  29      And I follow "Test book name"
  30      And I set the following fields to these values:
  31        | Chapter title | Test chapter |
  32        | Content | Test chapter content |
  33      And I log out
  34      And I log in as "student1"
  35      And I follow "Course 1"
  36      And I follow "Test book name"
  37      And I log out
  38  
  39    Scenario: Message students who have not participated in book
  40      Given I log in as "teacher1"
  41      And I follow "Course 1"
  42      And I navigate to "Course participation" node in "Course administration > Reports"
  43      And I set the field "instanceid" to "Test book name"
  44      And I set the field "roleid" to "Student"
  45      And I press "Go"
  46      And I should see "Yes (1)" in the "Student 1" "table_row"
  47      And I should see "No" in the "Student 2" "table_row"
  48      And I should see "No" in the "Student 3" "table_row"
  49      When I press "Select all 'No'"
  50      And I set the field "With selected users..." to "Send a message"
  51      And I press "OK"
  52      Then I should see "Added 2 new recipients"
  53      And I should see "Student 2" in the "Currently selected users" "table"
  54      And I should see "Student 3" in the "Currently selected users" "table"
  55      And I should not see "Student 1" in the "Currently selected users" "table"
  56  
  57    Scenario: Ensure no message options when messaging is disabled
  58      Given I log in as "admin"
  59      And I set the following administration settings values:
  60        | messaging | 0 |
  61      And I log out
  62      And I log in as "teacher1"
  63      And I follow "Course 1"
  64      And I navigate to "Course participation" node in "Course administration > Reports"
  65      When I set the field "instanceid" to "Test book name"
  66      And I set the field "roleid" to "Student"
  67      And I press "Go"
  68      Then I should not see "With selected users..."
  69      And I should not see "Select all"


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