[ Index ] |
PHP Cross Reference of Unnamed Project |
[Summary view] [Print] [Text view]
1 @availability @availability_date 2 Feature: availability_date 3 In order to control student access to activities 4 As a teacher 5 I need to set date conditions which prevent student access 6 7 Background: 8 Given the following "courses" exist: 9 | fullname | shortname | format | enablecompletion | 10 | Course 1 | C1 | topics | 1 | 11 And the following "users" exist: 12 | username | 13 | teacher1 | 14 | student1 | 15 And the following "course enrolments" exist: 16 | user | course | role | 17 | teacher1 | C1 | editingteacher | 18 | student1 | C1 | student | 19 20 @javascript 21 Scenario: Test condition 22 # Basic setup. 23 Given I log in as "teacher1" 24 And I am on site homepage 25 And I follow "Course 1" 26 And I turn editing mode on 27 28 # Add a Page with a date condition that does match (from the past). 29 And I add a "Page" to section "1" 30 And I set the following fields to these values: 31 | Name | Page 1 | 32 | Description | Test | 33 | Page content | Test | 34 And I expand all fieldsets 35 And I click on "Add restriction..." "button" 36 And I click on "Date" "button" in the "Add restriction..." "dialogue" 37 And I click on ".availability-item .availability-eye img" "css_element" 38 And I set the field "year" to "2013" 39 And I press "Save and return to course" 40 41 # Add a Page with a date condition that doesn't match (until the past). 42 And I add a "Page" to section "2" 43 And I set the following fields to these values: 44 | Name | Page 2 | 45 | Description | Test | 46 | Page content | Test | 47 And I expand all fieldsets 48 And I click on "Add restriction..." "button" 49 And I click on "Date" "button" in the "Add restriction..." "dialogue" 50 And I click on ".availability-item .availability-eye img" "css_element" 51 And I set the field "Direction" to "until" 52 And I set the field "year" to "2013" 53 And I press "Save and return to course" 54 55 # Log back in as student. 56 When I log out 57 And I log in as "student1" 58 And I am on site homepage 59 And I follow "Course 1" 60 61 # Page 1 should appear, but page 2 does not. 62 Then I should see "Page 1" in the "region-main" "region" 63 And I should not see "Page 2" in the "region-main" "region"
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 |