[ Index ] |
PHP Cross Reference of moodle-2.8 |
[Summary view] [Print] [Text view]
1 @mod @mod_lesson 2 Feature: A teacher can set available from and deadline dates to access a lesson 3 In order to schedule lesson activities 4 As a teacher 5 I need to set available from and deadline dates 6 7 Background: 8 Given the following "users" exist: 9 | username | firstname | lastname | email | 10 | teacher1 | Teacher | 1 | [email protected] | 11 | student1 | Student | 1 | [email protected] | 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 23 @javascript 24 Scenario: Forbidding lesson accesses until a specified date 25 Given I add a "Lesson" to section "1" 26 And I expand all fieldsets 27 And I click on "id_available_enabled" "checkbox" 28 And I set the following fields to these values: 29 | Name | Test lesson | 30 | Description | Test lesson description | 31 | available[day] | 1 | 32 | available[month] | January | 33 | available[year] | 2020 | 34 | available[hour] | 08 | 35 | available[minute] | 00 | 36 And I press "Save and display" 37 And I follow "Test lesson" 38 And I follow "Add a content page" 39 And I set the following fields to these values: 40 | Page title | First page name | 41 | Page contents | First page contents | 42 | Description | The first one | 43 And I press "Save page" 44 And I log out 45 And I log in as "student1" 46 And I follow "Course 1" 47 When I follow "Test lesson" 48 Then I should see "This lesson will be open on Wednesday, 1 January 2020, 8:00" 49 And I should not see "First page contents" 50 51 @javascript 52 Scenario: Forbidding lesson accesses until a specified date 53 Given I add a "Lesson" to section "1" 54 And I expand all fieldsets 55 And I click on "id_deadline_enabled" "checkbox" 56 And I set the following fields to these values: 57 | Name | Test lesson | 58 | Description | Test lesson description | 59 | deadline[day] | 1 | 60 | deadline[month] | January | 61 | deadline[year] | 2000 | 62 | deadline[hour] | 08 | 63 | deadline[minute] | 00 | 64 And I press "Save and display" 65 And I follow "Test lesson" 66 And I follow "Add a content page" 67 And I set the following fields to these values: 68 | Page title | First page name | 69 | Page contents | First page contents | 70 | Description | The first one | 71 And I press "Save page" 72 And I log out 73 And I log in as "student1" 74 And I follow "Course 1" 75 When I follow "Test lesson" 76 Then I should see "This lesson closed on Saturday, 1 January 2000, 8:00" 77 And I should not 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 |