[ Index ] |
PHP Cross Reference of Unnamed Project |
[Summary view] [Print] [Text view]
1 @mod @mod_lesson 2 Feature: A teacher can password protect a lesson 3 In order to avoid undesired accesses to lesson activities 4 As a teacher 5 I need to set a password to access the lesson 6 7 Scenario: Accessing as student to a protected lesson 8 Given the following "users" exist: 9 | username | firstname | lastname | email | 10 | teacher1 | Teacher | 1 | teacher1@example.com | 11 | student1 | Student | 1 | student1@example.com | 12 And the following "courses" exist: 13 | fullname | shortname | category | 14 | Course 1 | C1 | 0 | 15 And the following "course enrolments" exist: 16 | user | course | role | 17 | teacher1 | C1 | editingteacher | 18 | student1 | C1 | student | 19 And I log in as "teacher1" 20 And I follow "Course 1" 21 And I turn editing mode on 22 And I add a "Lesson" to section "1" and I fill the form with: 23 | Name | Test lesson | 24 | Description | Test lesson description | 25 | Password protected lesson | Yes | 26 | id_password | moodle_rules | 27 And I follow "Test lesson" 28 And I follow "Add a content page" 29 And I set the following fields to these values: 30 | Page title | First page name | 31 | Page contents | First page contents | 32 | Description | The first one | 33 And I press "Save page" 34 And I log out 35 And I log in as "student1" 36 And I follow "Course 1" 37 When I follow "Test lesson" 38 Then I should see "Test lesson is a password protected lesson" 39 And I should not see "First page contents" 40 And I set the field "userpassword" to "moodle" 41 And I press "Continue" 42 And I should see "Login failed, please try again..." 43 And I should see "Test lesson is a password protected lesson" 44 And I set the field "userpassword" to "moodle_rules" 45 And I press "Continue" 46 And I should see "First page contents"
title
Description
Body
title
Description
Body
title
Description
Body
title
Body
Generated: Thu Aug 11 10:00:09 2016 | Cross-referenced by PHPXref 0.7.1 |