1 |
efrain |
1 |
@core @core_course
|
|
|
2 |
Feature: Course paged mode information
|
|
|
3 |
In order to split the course in parts
|
|
|
4 |
As a teacher
|
|
|
5 |
I need to display the proper section information in a paged mode course
|
|
|
6 |
|
|
|
7 |
@javascript
|
|
|
8 |
Scenario Outline: Section summary information for teachers and students in paged courses
|
|
|
9 |
Given the following "courses" exist:
|
|
|
10 |
| fullname | shortname | category | format | numsections | coursedisplay | enablecompletion |
|
|
|
11 |
| Course 1 | C1 | 0 | <courseformat> | 3 | 1 | <completion> |
|
|
|
12 |
And the following "activities" exist:
|
|
|
13 |
| activity | course | name | section | completion |
|
|
|
14 |
| assign | C1 | Assignment | 1 | <completion> |
|
|
|
15 |
| data | C1 | Database | 1 | <completion> |
|
|
|
16 |
| forum | C1 | First forum | 1 | <completion> |
|
|
|
17 |
| forum | C1 | Second forum | 2 | <completion> |
|
|
|
18 |
And the following "users" exist:
|
|
|
19 |
| username | firstname | lastname | email |
|
|
|
20 |
| student1 | Student | First | student1@example.com |
|
|
|
21 |
| teacher1 | Teacher | First | teacher1@example.com |
|
|
|
22 |
And the following "course enrolments" exist:
|
|
|
23 |
| user | course | role |
|
|
|
24 |
| student1 | C1 | student |
|
|
|
25 |
| teacher1 | C1 | editingteacher |
|
|
|
26 |
When I am on the "Course 1" "Course" page logged in as "<user>"
|
|
|
27 |
Then I should see "Activities: 3" in the "#section-1" "css_element"
|
|
|
28 |
And I should <show> "Progress:" in the "#section-1" "css_element"
|
|
|
29 |
And I should see "Activities: 1" in the "#section-2" "css_element"
|
|
|
30 |
And I should <show> "Progress:" in the "#section-2" "css_element"
|
|
|
31 |
And I should see "Activities: 0" in the "#section-3" "css_element"
|
|
|
32 |
And I should not see "Progress:" in the "#section-3" "css_element"
|
|
|
33 |
|
|
|
34 |
Examples:
|
|
|
35 |
| user | courseformat | completion | show |
|
|
|
36 |
| student1 | topics | 0 | not see |
|
|
|
37 |
| student1 | weeks | 0 | not see |
|
|
|
38 |
| student1 | topics | 1 | see |
|
|
|
39 |
| student1 | weeks | 1 | see |
|
|
|
40 |
| teacher1 | topics | 0 | not see |
|
|
|
41 |
| teacher1 | weeks | 0 | not see |
|
|
|
42 |
| teacher1 | topics | 1 | see |
|
|
|
43 |
| teacher1 | weeks | 1 | see |
|
|
|
44 |
|
|
|
45 |
@javascript
|
|
|
46 |
Scenario Outline: Section summary information for guest in paged courses
|
|
|
47 |
Given the following "courses" exist:
|
|
|
48 |
| fullname | shortname | category | format | numsections | coursedisplay | enablecompletion |
|
|
|
49 |
| Course 1 | C1 | 0 | <courseformat> | 3 | 1 | <completion> |
|
|
|
50 |
And the following "activities" exist:
|
|
|
51 |
| activity | course | name | section | completion |
|
|
|
52 |
| assign | C1 | Assignment | 1 | <completion> |
|
|
|
53 |
| data | C1 | Database | 1 | <completion> |
|
|
|
54 |
| forum | C1 | First forum | 1 | <completion> |
|
|
|
55 |
| forum | C1 | Second forum | 2 | <completion> |
|
|
|
56 |
And I am on the "Course 1" "enrolment methods" page logged in as admin
|
|
|
57 |
And I click on "Enable" "link" in the "Guest access" "table_row"
|
|
|
58 |
When I am on the "Course 1" "Course" page logged in as "guest"
|
|
|
59 |
Then I should see "Activities: 3" in the "#section-1" "css_element"
|
|
|
60 |
And I should not see "Progress:" in the "#section-1" "css_element"
|
|
|
61 |
And I should see "Activities: 1" in the "#section-2" "css_element"
|
|
|
62 |
And I should not see "Progress:" in the "#section-2" "css_element"
|
|
|
63 |
And I should see "Activities: 0" in the "#section-3" "css_element"
|
|
|
64 |
And I should not see "Progress:" in the "#section-3" "css_element"
|
|
|
65 |
|
|
|
66 |
Examples:
|
|
|
67 |
| courseformat | completion |
|
|
|
68 |
| topics | 0 |
|
|
|
69 |
| weeks | 0 |
|
|
|
70 |
| topics | 1 |
|
|
|
71 |
| weeks | 1 |
|