Proyectos de Subversion Moodle

Rev

Rev 1 | | Comparar con el anterior | Ultima modificación | Ver Log |

Rev Autor Línea Nro. Línea
1 efrain 1
@block @block_social_activities @format_social
2
Feature: Edit activities in social activities block
3
  In order to use social activities block
4
  As a teacher
5
  I need to add and edit activities there
6
 
7
  Background:
1441 ariadna 8
    Given the following "course" exists:
9
      | fullname    | Course 1 |
10
      | shortname   | C1       |
11
      | format      | social   |
12
      | numsections | 0        |
1 efrain 13
    And the following "users" exist:
14
      | username | firstname | lastname |
1441 ariadna 15
      | teacher1 | Teacher | One |
1 efrain 16
      | student1 | Student | One |
17
    And the following "course enrolments" exist:
18
      | user | course | role |
1441 ariadna 19
      | teacher1 | C1 | editingteacher |
1 efrain 20
      | student1 | C1 | student |
21
 
22
  @javascript
23
  Scenario: Edit name of activity in-place in social activities block
24
    Given the following "activities" exist:
25
      | activity | course | name          |
26
      | forum    | C1     | My forum name |
1441 ariadna 27
    And I log in as "teacher1"
1 efrain 28
    And I am on "Course 1" course homepage with editing mode on
1441 ariadna 29
    When I set the field "Edit title" in the "My forum name" "activity" to "New forum name"
30
    Then I should not see "My forum name"
1 efrain 31
    And I should see "New forum name"
32
    And I follow "New forum name"
33
    And I should not see "My forum name"
34
    And I should see "New forum name"
35
 
36
  @javascript
37
  Scenario: Activities in social activities block can be made available but not visible on a course page
38
    Given the following config values are set as admin:
39
      | allowstealth | 1 |
40
    And the following "blocks" exist:
41
      | blockname       | contextlevel | reference | pagetypepattern | defaultregion |
42
      | recent_activity | Course       | C1        | course-view-*   | side-pre      |
1441 ariadna 43
    And the following "activity" exists:
44
      | activity | forum         |
45
      | course   | C1            |
46
      | name     | My forum name |
47
      | section  | 0             |
48
    And I log in as "teacher1"
1 efrain 49
    And I am on "Course 1" course homepage with editing mode on
1441 ariadna 50
    When I open "My forum name" actions menu
1 efrain 51
    And I choose "Availability > Make available but don't show on course page" in the open action menu
52
    Then I should see "Available but not shown on course page" in the "My forum name" "core_courseformat > Activity visibility"
53
    # Make sure that "Availability" dropdown in the edit menu has three options.
1441 ariadna 54
    And I open "My forum name" actions menu
55
    And I choose "Edit settings" in the open action menu
1 efrain 56
    And I expand all fieldsets
57
    And the "Availability" select box should contain "Show on course page"
58
    And the "Availability" select box should contain "Hide on course page"
59
    And the field "Availability" matches value "Make available but don't show on course page"
60
    And I press "Save and return to course"
1441 ariadna 61
    Then I should see "Available but not shown on course page" in the "My forum name" "core_courseformat > Activity visibility"
1 efrain 62
    And I turn editing mode off
1441 ariadna 63
    And I should see "Available but not shown on course page" in the "My forum name" "core_courseformat > Activity visibility"
1 efrain 64
    And I log out
65
    # Student will not see the module on the course page but can access it from other reports and blocks:
66
    When I am on the "Course 1" course page logged in as student1
67
    Then I should not see "My forum name" in the "Social activities" "block"
68
    And I click on "My forum name" "link" in the "Recent activity" "block"
69
    And I should see "My forum name" in the ".breadcrumb" "css_element"
1441 ariadna 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"