| [ Index ] |
PHP Cross Reference of moodle-2.8 |
[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 @javascript 8 Scenario: Accessing as student to a protected lesson 9 Given the following "users" exist: 10 | username | firstname | lastname | email | 11 | teacher1 | Teacher | 1 | [email protected] | 12 | student1 | Student | 1 | [email protected] | 13 And the following "courses" exist: 14 | fullname | shortname | category | 15 | Course 1 | C1 | 0 | 16 And the following "course enrolments" exist: 17 | user | course | role | 18 | teacher1 | C1 | editingteacher | 19 | student1 | C1 | student | 20 And I log in as "teacher1" 21 And I follow "Course 1" 22 And I turn editing mode on 23 And I add a "Lesson" to section "1" and I fill the form with: 24 | Name | Test lesson | 25 | Description | Test lesson description | 26 | Password protected lesson | Yes | 27 | id_password | moodle_rules | 28 And I follow "Test lesson" 29 And I follow "Add a content page" 30 And I set the following fields to these values: 31 | Page title | First page name | 32 | Page contents | First page contents | 33 | Description | The first one | 34 And I press "Save page" 35 And I log out 36 And I log in as "student1" 37 And I follow "Course 1" 38 When I follow "Test lesson" 39 Then I should see "Test lesson is a password protected lesson" 40 And I should not see "First page contents" 41 And I set the field "userpassword" to "moodle" 42 And I press "Continue" 43 And I should see "Login failed, please try again..." 44 And I should see "Test lesson is a password protected lesson" 45 And I set the field "userpassword" to "moodle_rules" 46 And I press "Continue" 47 And I should see "First page contents"
title
Description
Body
title
Description
Body
title
Description
Body
title
Body
| Generated: Fri Nov 28 20:29:05 2014 | Cross-referenced by PHPXref 0.7.1 |