1 |
efrain |
1 |
@mod @mod_lesson
|
|
|
2 |
Feature: Display the lesson description in the lesson and optionally in the course
|
|
|
3 |
In order to display the the lesson description description in the course
|
|
|
4 |
As a teacher
|
|
|
5 |
I need to enable the 'Display description on course page' setting.
|
|
|
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 | format |
|
|
|
13 |
| Course 1 | C1 | topics |
|
|
|
14 |
And the following "course enrolments" exist:
|
|
|
15 |
| user | course | role |
|
|
|
16 |
| teacher1 | C1 | editingteacher |
|
|
|
17 |
And the following "activity" exist:
|
|
|
18 |
| activity | name | intro | course | idnumber |
|
|
|
19 |
| lesson | Test lesson name | Test lesson description | C1 | 0001 |
|
|
|
20 |
And the following "mod_lesson > page" exist:
|
|
|
21 |
| lesson | qtype | title | content |
|
|
|
22 |
| Test lesson name | content | Test lesson part 1 | Test lesson part 1 |
|
|
|
23 |
And the following "mod_lesson > answer" exist:
|
|
|
24 |
| page | answer | jumpto |
|
|
|
25 |
| Test lesson part 1 | Next page | Next page |
|
|
|
26 |
|
|
|
27 |
Scenario: Description is displayed in the Lesson
|
|
|
28 |
When I am on the "Test lesson name" "lesson activity" page logged in as teacher1
|
|
|
29 |
Then I should see "Test lesson description"
|
|
|
30 |
|
|
|
31 |
Scenario: Show lesson description in the course homepage
|
|
|
32 |
Given I am on the "Test lesson name" "lesson activity editing" page logged in as teacher1
|
|
|
33 |
And the following fields match these values:
|
|
|
34 |
| Display description on course page | |
|
|
|
35 |
And I set the following fields to these values:
|
|
|
36 |
| Display description on course page | 1 |
|
|
|
37 |
And I press "Save and return to course"
|
|
|
38 |
When I am on "Course 1" course homepage
|
|
|
39 |
Then I should see "Test lesson description"
|
|
|
40 |
|
|
|
41 |
Scenario: Hide lesson description in the course homepage
|
|
|
42 |
Given I am on the "Test lesson name" "lesson activity editing" page logged in as teacher1
|
|
|
43 |
And the following fields match these values:
|
|
|
44 |
| Display description on course page | |
|
|
|
45 |
And I press "Save and return to course"
|
|
|
46 |
When I am on "Course 1" course homepage
|
|
|
47 |
Then I should not see "Test lesson description"
|