1441 |
ariadna |
1 |
@mod @mod_subsection
|
|
|
2 |
Feature: Teachers create and destroy subsections on section page
|
|
|
3 |
In order to use subsections on section page
|
|
|
4 |
As an teacher
|
|
|
5 |
I need to create and destroy subsections
|
|
|
6 |
|
|
|
7 |
Background:
|
|
|
8 |
Given the following "users" exist:
|
|
|
9 |
| username | firstname | lastname | email |
|
|
|
10 |
| teacher1 | Teacher | 1 | teacher1@example.com |
|
|
|
11 |
And the following "courses" exist:
|
|
|
12 |
| fullname | shortname | category | numsections |
|
|
|
13 |
| Course 1 | C1 | 0 | 2 |
|
|
|
14 |
And the following "course enrolments" exist:
|
|
|
15 |
| user | course | role |
|
|
|
16 |
| teacher1 | C1 | editingteacher |
|
|
|
17 |
And I log in as "teacher1"
|
|
|
18 |
|
|
|
19 |
Scenario: Activities can be created in a subsection
|
|
|
20 |
Given the following "activities" exist:
|
|
|
21 |
| activity | name | course | idnumber | section |
|
|
|
22 |
| subsection | Subsection1 | C1 | forum1 | 1 |
|
|
|
23 |
When I add an "assign" activity to course "Course 1" section "3" and I fill the form with:
|
|
|
24 |
| Assignment name | Test assignment name |
|
|
|
25 |
| ID number | Test assignment name |
|
|
|
26 |
| Description | Test assignment description |
|
|
|
27 |
And I am on "Course 1" course homepage
|
|
|
28 |
And I click on "Subsection1" "link" in the "region-main" "region"
|
|
|
29 |
Then I should see "Test assignment name" in the "region-main" "region"
|
|
|
30 |
|
|
|
31 |
@javascript
|
|
|
32 |
Scenario: Teacher can create activities in a subsection page with the activity chooser
|
|
|
33 |
Given the following "activities" exist:
|
|
|
34 |
| activity | name | course | idnumber | section |
|
|
|
35 |
| subsection | Subsection1 | C1 | forum1 | 1 |
|
|
|
36 |
When I am on the "C1 > Subsection1" "course > section" page
|
|
|
37 |
And I turn editing mode on
|
|
|
38 |
And I click on "Add an activity or resource" "button"
|
|
|
39 |
And I click on "Add a new Assignment" "link"
|
|
|
40 |
And I set the following fields to these values:
|
|
|
41 |
| Assignment name | Test assignment name |
|
|
|
42 |
| ID number | Test assignment name |
|
|
|
43 |
| Description | Test assignment description |
|
|
|
44 |
And I press "Save and return to course"
|
|
|
45 |
Then I should see "Test assignment name" in the "region-main" "region"
|