Scenario: Test condition
# Basic setup.
Given I log in as "teacher1"
+ And I am on site homepage
And I follow "Course 1"
And I turn editing mode on
# Log back in as student.
When I log out
And I log in as "student1"
+ And I am on site homepage
And I follow "Course 1"
# Page 2 should not appear yet.
Scenario: Test condition
# Basic setup.
Given I log in as "teacher1"
+ And I am on site homepage
And I follow "Course 1"
And I turn editing mode on
# Log back in as student.
When I log out
And I log in as "student1"
+ And I am on site homepage
And I follow "Course 1"
# Page 1 should appear, but page 2 does not.
Scenario: Test condition
# Basic setup.
Given I log in as "teacher1"
+ And I am on site homepage
And I follow "Course 1"
And I turn editing mode on
# Log in as student without a grade yet.
When I log out
And I log in as "student1"
+ And I am on site homepage
And I follow "Course 1"
# Do the assignment.
# Log back in as teacher.
When I log out
And I log in as "teacher1"
+ And I am on site homepage
And I follow "Course 1"
# Give the assignment 40%.
# Log back in as student.
And I log out
And I log in as "student1"
+ And I am on site homepage
And I follow "Course 1"
# Check pages are visible.
Scenario: Test condition
# Basic setup.
Given I log in as "teacher1"
+ And I am on site homepage
And I follow "Course 1"
And I turn editing mode on
| G2 | C1 | GI2 |
# This step used to be 'And I follow "C1"', but Chrome thinks the breadcrumb
# is not clickable, so we'll go via the home page instead.
- And I am on homepage
+ And I am on site homepage
And I follow "Course 1"
And I add a "Page" to section "1"
And I expand all fieldsets
# Log back in as student.
When I log out
And I log in as "student1"
+ And I am on site homepage
And I follow "Course 1"
# No pages should appear yet.
| student1 | GI1 |
And I log out
And I log in as "student1"
+ And I am on site homepage
And I follow "Course 1"
# P1 (any groups) and P2 should show but not P3.
Scenario: Test condition
# Basic setup.
Given I log in as "teacher1"
+ And I am on site homepage
And I follow "Course 1"
And I turn editing mode on
# Back to course page but add groups.
# This step used to be 'And I follow "C1"', but Chrome thinks the breadcrumb
# is not clickable, so we'll go via the home page instead.
- And I am on homepage
+ And I am on site homepage
And I follow "Course 1"
And the following "groupings" exist:
| name | course | idnumber |
| grouping | group |
| GXI1 | GI1 |
And I log in as "student1"
+ And I am on site homepage
And I follow "Course 1"
# P1 should show but not B2.
Scenario: Test condition
# Basic setup.
Given I log in as "teacher1"
+ And I am on site homepage
And I follow "Course 1"
And I turn editing mode on
# Log back in as student.
When I log out
And I log in as "student1"
+ And I am on site homepage
And I follow "Course 1"
# I see P1 but not P2.
And I click on "Update profile" "button"
# Set Page activity which has requirement on this field.
- And I am on homepage
+ And I am on site homepage
And I follow "Course 1"
And I turn editing mode on
And I add a "Page" to section "1"
# Log out and back in as student. Should be able to see activity.
And I log out
And I log in as "student1"
+ And I am on site homepage
And I follow "Course 1"
Then I should see "P1" in the "region-main" "region"
Scenario: Activity availability display
# Set up.
Given I log in as "teacher1"
+ And I am on site homepage
And I follow "Course 1"
And I turn editing mode on
# Change to student view.
Given I log out
And I log in as "student1"
+ And I am on site homepage
And I follow "Course 1"
# Page 1 display still there but should be dimmed and not a link.
Scenario: Section availability display
# Set up.
Given I log in as "teacher1"
+ And I am on site homepage
And I follow "Course 1"
And I turn editing mode on
And I press "Save changes"
# This is necessary because otherwise it fails in Chrome, see MDL-44959
- And I am on homepage
+ And I am on site homepage
And I follow "Course 1"
# Add Pages to each section.
# Change to student view.
Given I log out
And I log in as "student1"
+ And I am on site homepage
And I follow "Course 1"
# The contents of both sections should be hidden.
Scenario: Confirm the 'enable availability' option is working
When I log in as "teacher1"
+ And I am on site homepage
And I follow "Course 1"
And I turn editing mode on
And I add a "Page" to section "1"
And the following config values are set as admin:
| enableavailability | 1 |
+ And I am on site homepage
And I follow "Course 1"
And I add a "Page" to section "1"
Then "Restrict access" "fieldset" should exist
Given the following config values are set as admin:
| enableavailability | 1 |
And I log in as "teacher1"
+ And I am on site homepage
And I follow "Course 1"
And I turn editing mode on
Scenario: 'Add group/grouping access restriction' button unavailable
# Button does not exist when conditional access restrictions are turned off.
Given I log in as "admin"
+ And I am on site homepage
And I follow "Course 1"
And I turn editing mode on
And I add a "Forum" to section "1"
| name | course | idnumber |
| GX1 | C1 | GXI1 |
And I log in as "admin"
- And I am on homepage
+ And I am on site homepage
And I follow "Course 1"
And I turn editing mode on
And I add a "Forum" to section "1"