Proyectos de Subversion Moodle

Rev

Rev 1 | Mostrar el archivo completo | | | Autoría | Ultima modificación | Ver Log |

Rev 1 Rev 1441
Línea 3... Línea 3...
3
  In order to use social activities block
3
  In order to use social activities block
4
  As a teacher
4
  As a teacher
5
  I need to add and edit activities there
5
  I need to add and edit activities there
Línea 6... Línea 6...
6
 
6
 
7
  Background:
7
  Background:
8
    Given the following "courses" exist:
8
    Given the following "course" exists:
-
 
9
      | fullname    | Course 1 |
9
      | fullname | shortname | format |
10
      | shortname   | C1       |
-
 
11
      | format      | social   |
10
      | Course 1 | C1        | social |
12
      | numsections | 0        |
11
    And the following "users" exist:
13
    And the following "users" exist:
12
      | username | firstname | lastname |
14
      | username | firstname | lastname |
13
      | user1 | User | One |
15
      | teacher1 | Teacher | One |
14
      | student1 | Student | One |
16
      | student1 | Student | One |
15
    And the following "course enrolments" exist:
17
    And the following "course enrolments" exist:
16
      | user | course | role |
18
      | user | course | role |
17
      | user1 | C1 | editingteacher |
19
      | teacher1 | C1 | editingteacher |
Línea 18... Línea 20...
18
      | student1 | C1 | student |
20
      | student1 | C1 | student |
19
 
21
 
20
  @javascript
22
  @javascript
21
  Scenario: Edit name of activity in-place in social activities block
23
  Scenario: Edit name of activity in-place in social activities block
22
    Given the following "activities" exist:
24
    Given the following "activities" exist:
23
      | activity | course | name          |
25
      | activity | course | name          |
24
      | forum    | C1     | My forum name |
26
      | forum    | C1     | My forum name |
25
    And I log in as "user1"
27
    And I log in as "teacher1"
26
    And I am on "Course 1" course homepage with editing mode on
28
    And I am on "Course 1" course homepage with editing mode on
27
    When I set the field "Edit title" in the "My forum name" "block_social_activities > Activity" to "New forum name"
29
    When I set the field "Edit title" in the "My forum name" "activity" to "New forum name"
28
    Then I should not see "My forum name" in the "Social activities" "block"
30
    Then I should not see "My forum name"
29
    And I should see "New forum name"
31
    And I should see "New forum name"
30
    And I follow "New forum name"
32
    And I follow "New forum name"
Línea 36... Línea 38...
36
    Given the following config values are set as admin:
38
    Given the following config values are set as admin:
37
      | allowstealth | 1 |
39
      | allowstealth | 1 |
38
    And the following "blocks" exist:
40
    And the following "blocks" exist:
39
      | blockname       | contextlevel | reference | pagetypepattern | defaultregion |
41
      | blockname       | contextlevel | reference | pagetypepattern | defaultregion |
40
      | recent_activity | Course       | C1        | course-view-*   | side-pre      |
42
      | recent_activity | Course       | C1        | course-view-*   | side-pre      |
-
 
43
    And the following "activity" exists:
-
 
44
      | activity | forum         |
-
 
45
      | course   | C1            |
-
 
46
      | name     | My forum name |
-
 
47
      | section  | 0             |
41
    And I log in as "user1"
48
    And I log in as "teacher1"
42
    And I am on "Course 1" course homepage with editing mode on
49
    And I am on "Course 1" course homepage with editing mode on
43
    And I press "Add an activity or resource"
-
 
44
    And I click on "Add a new Forum" "link" in the "Add an activity or resource" "dialogue"
-
 
45
    And I set the field "Forum name" to "My forum name"
-
 
46
    And I press "Save and return to course"
-
 
47
    When I open "My forum name" actions menu in social activities block
50
    When I open "My forum name" actions menu
48
    And I choose "Availability > Make available but don't show on course page" in the open action menu
51
    And I choose "Availability > Make available but don't show on course page" in the open action menu
49
    Then I should see "Available but not shown on course page" in the "My forum name" "core_courseformat > Activity visibility"
52
    Then I should see "Available but not shown on course page" in the "My forum name" "core_courseformat > Activity visibility"
50
    # Make sure that "Availability" dropdown in the edit menu has three options.
53
    # Make sure that "Availability" dropdown in the edit menu has three options.
51
    And I open "My forum name" actions menu in social activities block
54
    And I open "My forum name" actions menu
52
    And I click on "Edit settings" "link" in the "My forum name" activity in social activities block
55
    And I choose "Edit settings" in the open action menu
53
    And I expand all fieldsets
56
    And I expand all fieldsets
54
    And the "Availability" select box should contain "Show on course page"
57
    And the "Availability" select box should contain "Show on course page"
55
    And the "Availability" select box should contain "Hide on course page"
58
    And the "Availability" select box should contain "Hide on course page"
56
    And the field "Availability" matches value "Make available but don't show on course page"
59
    And the field "Availability" matches value "Make available but don't show on course page"
57
    And I press "Save and return to course"
60
    And I press "Save and return to course"
58
    And "My forum name" activity in social activities block should be available but hidden from course page
61
    Then I should see "Available but not shown on course page" in the "My forum name" "core_courseformat > Activity visibility"
59
    And I turn editing mode off
62
    And I turn editing mode off
60
    And "My forum name" activity in social activities block should be available but hidden from course page
63
    And I should see "Available but not shown on course page" in the "My forum name" "core_courseformat > Activity visibility"
61
    And I log out
64
    And I log out
62
    # Student will not see the module on the course page but can access it from other reports and blocks:
65
    # Student will not see the module on the course page but can access it from other reports and blocks:
63
    When I am on the "Course 1" course page logged in as student1
66
    When I am on the "Course 1" course page logged in as student1
64
    Then I should not see "My forum name" in the "Social activities" "block"
67
    Then I should not see "My forum name" in the "Social activities" "block"
65
    And I click on "My forum name" "link" in the "Recent activity" "block"
68
    And I click on "My forum name" "link" in the "Recent activity" "block"
66
    And I should see "My forum name" in the ".breadcrumb" "css_element"
69
    And I should see "My forum name" in the ".breadcrumb" "css_element"
-
 
70
 
-
 
71
  @javascript
-
 
72
  Scenario: The move activity modal allow to move activities in the social activities block
-
 
73
    And the following "activities" exist:
-
 
74
      | activity | course | section | name                   |
-
 
75
      | forum    | C1     | 0       | My forum name          |
-
 
76
      | forum    | C1     | 0       | Other forum name       |
-
 
77
      | forum    | C1     | 0       | Yet another forum name |
-
 
78
    And I log in as "teacher1"
-
 
79
    And I am on "Course 1" course homepage with editing mode on
-
 
80
    And I should see "My forum name" in the "Social activities" "block"
-
 
81
    And I should see "Other forum name" in the "Social activities" "block"
-
 
82
    And I should see "Yet another forum name" in the "Social activities" "block"
-
 
83
    And "Other forum name" "activity" should appear after "My forum name" "activity"
-
 
84
    And "Yet another forum name" "activity" should appear after "Other forum name" "activity"
-
 
85
    When I open "My forum name" actions menu
-
 
86
    And I click on "Move" "link" in the "My forum name" activity
-
 
87
    And I should see "My forum name" in the "Move activity" "dialogue"
-
 
88
    And I should see "Other forum name" in the "Move activity" "dialogue"
-
 
89
    And I should see "Yet another forum name" in the "Move activity" "dialogue"
-
 
90
    And I should see "Social activities" in the "Move activity" "dialogue"
-
 
91
    And I click on "Yet another forum name" "link" in the "Move activity" "dialogue"
-
 
92
    Then I should see "My forum name" in the "Social activities" "block"
-
 
93
    And I should see "Other forum name" in the "Social activities" "block"
-
 
94
    And I should see "Yet another forum name" in the "Social activities" "block"
-
 
95
    And "Yet another forum name" "activity" should appear after "Other forum name" "activity"
-
 
96
    And "My forum name" "activity" should appear after "Yet another forum name" "activity"
-
 
97
 
-
 
98
  @javascript
-
 
99
  Scenario: Teacher can delete an activity in the social activities block
-
 
100
    Given the following "activity" exists:
-
 
101
      | activity | forum         |
-
 
102
      | course   | C1            |
-
 
103
      | name     | My forum name |
-
 
104
      | section  | 0             |
-
 
105
    And I log in as "teacher1"
-
 
106
    And I am on "Course 1" course homepage with editing mode on
-
 
107
    When I open "My forum name" actions menu
-
 
108
    And I choose "Delete" in the open action menu
-
 
109
    And I click on "Delete" "button" in the "Delete activity?" "dialogue"
-
 
110
    Then I should not see "My forum name" in the "Social activities" "block"
-
 
111
 
-
 
112
  @javascript
-
 
113
  Scenario: Teacher can duplicate an activity in the social activities block
-
 
114
    Given the following "activity" exists:
-
 
115
      | activity | forum         |
-
 
116
      | course   | C1            |
-
 
117
      | name     | My forum name |
-
 
118
      | section  | 0             |
-
 
119
    And I log in as "teacher1"
-
 
120
    And I am on "Course 1" course homepage with editing mode on
-
 
121
    When I open "My forum name" actions menu
-
 
122
    And I choose "Duplicate" in the open action menu
-
 
123
    Then I should see "My forum name" in the "Social activities" "block"
-
 
124
    And I should see "My forum name (copy)" in the "Social activities" "block"
-
 
125
    And "My forum name (copy)" "activity" should appear after "My forum name" "activity"
-
 
126
 
-
 
127
  @javascript
-
 
128
  Scenario: Teacher can move right and left an activity in the social activities block
-
 
129
    Given I log in as "teacher1"
-
 
130
    And I am on "Course 1" course homepage with editing mode on
-
 
131
    When I open "Social forum" actions menu
-
 
132
    And "Move right" "link" should be visible
-
 
133
    And "Move left" "link" should not be visible
-
 
134
    And I choose "Move right" in the open action menu
-
 
135
    Then I open "Social forum" actions menu
-
 
136
    And "Move right" "link" should not be visible
-
 
137
    And "Move left" "link" should be visible
-
 
138
    And I choose "Move left" in the open action menu
-
 
139
    And I open "Social forum" actions menu
-
 
140
    And "Move right" "link" should be visible
-
 
141
    And "Move left" "link" should not be visible
-
 
142
 
-
 
143
  @javascript
-
 
144
  Scenario: Social activities block can have subsections
-
 
145
    Given the following "activity" exists:
-
 
146
      | activity | assign          |
-
 
147
      | course   | C1              |
-
 
148
      | name     | Assignment name |
-
 
149
      | section  | 0               |
-
 
150
    Given I log in as "teacher1"
-
 
151
    And I am on "Course 1" course homepage with editing mode on
-
 
152
    And I click on "Add content" "button" in the ".block_social_activities .footer" "css_element"
-
 
153
    And I click on "Subsection" "link" in the ".dropdown-menu.show" "css_element"
-
 
154
    Then I should see "New subsection" in the "Social activities" "block"
-
 
155
    And I open "Assignment name" actions menu
-
 
156
    And I click on "Move" "link" in the "Assignment name" activity
-
 
157
    And I click on "New subsection" "link" in the "Move activity" "dialogue"
-
 
158
    Then  I should see "Assignment name" in the "New subsection" "section"