Línea 4... |
Línea 4... |
4 |
As a teacher
|
4 |
As a teacher
|
5 |
I need to quickly change the visibility of an activity
|
5 |
I need to quickly change the visibility of an activity
|
Línea 6... |
Línea 6... |
6 |
|
6 |
|
7 |
Background:
|
7 |
Background:
|
8 |
Given the following "users" exist:
|
8 |
Given the following "users" exist:
|
9 |
| username | firstname | lastname | email |
|
9 |
| username | firstname | lastname | email |
|
- |
|
10 |
| teacher1 | Teacher | 1 | teacher1@example.com |
|
10 |
| teacher1 | Teacher | 1 | teacher1@example.com |
|
11 |
| noneditingteacher1 | Non-Editing Teacher | 1 | noneditingteacher1@example.com |
|
11 |
| student1 | Student | 1 | student1@example.com |
|
12 |
| student1 | Student | 1 | student1@example.com |
|
12 |
And the following "courses" exist:
|
13 |
And the following "courses" exist:
|
13 |
| fullname | shortname | format | numsections |
|
14 |
| fullname | shortname | format | numsections |
|
14 |
| Course 1 | C1 | topics | 2 |
|
15 |
| Course 1 | C1 | topics | 2 |
|
15 |
And the following "course enrolments" exist:
|
16 |
And the following "course enrolments" exist:
|
16 |
| user | course | role |
|
17 |
| user | course | role |
|
- |
|
18 |
| teacher1 | C1 | editingteacher |
|
17 |
| teacher1 | C1 | editingteacher |
|
19 |
| noneditingteacher1 | C1 | teacher |
|
18 |
| student1 | C1 | student |
|
20 |
| student1 | C1 | student |
|
19 |
And the following "activities" exist:
|
21 |
And the following "activities" exist:
|
20 |
| activity | course | section | idnumber | name | intro | id_visible |
|
22 |
| activity | course | section | idnumber | name | intro | id_visible |
|
21 |
| assign | C1 | 1 | 1 | Test assignment name | Test assignment description | 1 |
|
23 |
| assign | C1 | 1 | 1 | Test assignment name | Test assignment description | 1 |
|
22 |
And the following "blocks" exist:
|
24 |
And the following "blocks" exist:
|
Línea 51... |
Línea 53... |
51 |
And the "Availability" select box should contain "Show on course page"
|
53 |
And the "Availability" select box should contain "Show on course page"
|
52 |
And the "Availability" select box should not contain "Make available but don't show on course page"
|
54 |
And the "Availability" select box should not contain "Make available but don't show on course page"
|
53 |
And the field "Availability" matches value "Hide on course page"
|
55 |
And the field "Availability" matches value "Hide on course page"
|
54 |
And I press "Save and return to course"
|
56 |
And I press "Save and return to course"
|
55 |
And "Test forum name" activity should be hidden
|
57 |
And "Test forum name" activity should be hidden
|
- |
|
58 |
# Non-editing teacher should see this activity.
|
- |
|
59 |
And I am on the "Course 1" course page logged in as noneditingteacher1
|
- |
|
60 |
And I should see "Test forum name" in the "region-main" "region"
|
56 |
# Student should not see this activity.
|
61 |
# Student should not see this activity.
|
57 |
And I am on the "Course 1" course page logged in as student1
|
62 |
And I am on the "Course 1" course page logged in as student1
|
58 |
And I should not see "Test forum name"
|
63 |
And I should not see "Test forum name"
|
Línea 59... |
Línea 64... |
59 |
|
64 |
|
Línea 113... |
Línea 118... |
113 |
And the field "Availability" matches value "Make available but don't show on course page"
|
118 |
And the field "Availability" matches value "Make available but don't show on course page"
|
114 |
And I press "Save and return to course"
|
119 |
And I press "Save and return to course"
|
115 |
And "Test assignment name" activity should be available but hidden from course page
|
120 |
And "Test assignment name" activity should be available but hidden from course page
|
116 |
And I turn editing mode off
|
121 |
And I turn editing mode off
|
117 |
And "Test assignment name" activity should be available but hidden from course page
|
122 |
And "Test assignment name" activity should be available but hidden from course page
|
118 |
And I log out
|
123 |
# Non-editing teacher will see the module on the course page:
|
- |
|
124 |
And I am on the "Course 1" course page logged in as noneditingteacher1
|
- |
|
125 |
And I should see "Test assignment name" in the "region-main" "region"
|
119 |
# Student will not see the module on the course page but can access it from other reports and blocks:
|
126 |
# Student will not see the module on the course page but can access it from other reports and blocks:
|
120 |
And I log in as "student1"
|
- |
|
121 |
And I am on "Course 1" course homepage
|
127 |
And I am on the "Course 1" course page logged in as student1
|
122 |
And "Test assignment name" activity should be hidden
|
128 |
And "Test assignment name" activity should be hidden
|
123 |
And I click on "Test assignment name" "link" in the "Recent activity" "block"
|
129 |
And I click on "Test assignment name" "link" in the "Recent activity" "block"
|
124 |
And I should see "Test assignment name"
|
130 |
And I should see "Test assignment name"
|
125 |
And I should see "Submission status"
|
131 |
And I should see "Submission status"
|
126 |
And I log out
|
- |
|