Proyectos de Subversion Moodle

Rev

| Ultima modificación | Ver Log |

Rev Autor Línea Nro. Línea
1 efrain 1
@mod @mod_forum
2
Feature: As a teacher I need to see an accurate list of subscribed users
3
  In order to see who is subscribed to a forum
4
  As a teacher
5
  I need to view the list of subscribed users
6
 
7
  Background:
8
    Given the following "users" exist:
9
      | username | firstname | lastname | email |
10
      | teacher  | Teacher   | Teacher  | teacher@example.com |
11
      | student1 | Student   | 1        | student.1@example.com |
12
      | student2 | Student   | 2        | student.2@example.com |
13
      | student3 | Student   | 3        | student.3@example.com |
14
    And the following "courses" exist:
15
      | fullname | shortname | category |
16
      | Course 1 | C1 | 0 |
17
    And the following "course enrolments" exist:
18
      | user | course | role |
19
      | teacher  | C1 | editingteacher |
20
      | student1 | C1 | student |
21
      | student2 | C1 | student |
22
      | student3 | C1 | student |
23
    And the following "groups" exist:
24
      | name | course | idnumber |
25
      | Group 1 | C1 | G1 |
26
      | Group 2 | C1 | G2 |
27
    And the following "group members" exist:
28
      | user        | group |
29
      | student1    | G1    |
30
      | student2    | G2    |
31
    And the following "groupings" exist:
32
      | name        | course | idnumber |
33
      | Grouping 1  | C1     | GG1      |
34
    And the following "grouping groups" exist:
35
      | grouping | group |
36
      | GG1      | G1    |
37
    And the following "activities" exist:
38
      | activity | course | idnumber | type    | name           | forcesubscribe |
39
      | forum    | C1     | 1        | general | Forced Forum 1 | 1              |
40
      | forum    | C1     | 0001     | general | Forced Forum 2 |                |
41
      | forum    | C1     | 0002     | general | Forced Forum 3 | 2              |
42
    And I log in as "teacher"
43
    And I am on "Course 1" course homepage with editing mode on
44
 
45
  @javascript
46
  Scenario: A forced forum lists all subscribers
47
    When I am on the "Forced Forum 1" "forum activity" page
48
    And I navigate to "Subscriptions" in current page administration
49
    Then I should see "Student 1"
50
    And I should see "Teacher Teacher"
51
    And I should see "Student 2"
52
    And I should see "Student 3"
53
    And I am on the "Forced Forum 1" "forum activity editing" page
54
    And I expand all fieldsets
55
    And I click on "Add restriction..." "button"
56
    And I click on "Grouping" "button" in the "Add restriction..." "dialogue"
57
    And I set the field with xpath "//select[@name='id']" to "Grouping 1"
58
    And I press "Save and display"
59
    And I navigate to "Subscriptions" in current page administration
60
    And I should see "Student 1"
61
    And I should see "Teacher Teacher"
62
    And I should not see "Student 2"
63
    And I should not see "Student 3"
64
 
65
  Scenario: A forced forum does not allow to edit the subscribers
66
    Given I am on the "Forced Forum 2" "forum activity editing" page
67
    And I set the following fields to these values:
68
      | Subscription mode | Forced subscription |
69
      | Availability      | Show on course page |
70
    And I press "Save and return to course"
71
    And I am on the "Forced Forum 2" "forum activity" page
72
    And I navigate to "Subscriptions" in current page administration
73
    Then I should see "Teacher Teacher"
74
    And I should see "Student 1"
75
    And I should see "Student 2"
76
    And I should see "Student 3"
77
 
78
  Scenario: A forced and hidden forum lists only teachers
79
    Given I am on the "Forced Forum 2" "forum activity editing" page
80
    And I set the following fields to these values:
81
      | Subscription mode | Forced subscription |
82
      | Availability      | Hide on course page |
83
    And I press "Save and return to course"
84
    And I am on the "Forced Forum 2" "forum activity" page
85
    And I navigate to "Subscriptions" in current page administration
86
    Then I should see "Teacher Teacher"
87
    And I should not see "Student 1"
88
    And I should not see "Student 2"
89
    And I should not see "Student 3"
90
 
91
  @javascript
92
  Scenario: An automatic forum lists all subscribers
93
    When I am on the "Forced Forum 3" "forum activity" page
94
    And I navigate to "Subscriptions" in current page administration
95
    Then I should see "Student 1"
96
    And I should see "Teacher Teacher"
97
    And I should see "Student 2"
98
    And I should see "Student 3"
99
    And I am on the "Forced Forum 3" "forum activity editing" page
100
    And I expand all fieldsets
101
    And I click on "Add restriction..." "button"
102
    And I click on "Grouping" "button" in the "Add restriction..." "dialogue"
103
    And I set the field with xpath "//select[@name='id']" to "Grouping 1"
104
    And I press "Save and display"
105
    And I navigate to "Subscriptions" in current page administration
106
    And I should see "Student 1"
107
    And I should see "Teacher Teacher"
108
    And I should not see "Student 2"
109
    And I should not see "Student 3"