0. In site settings, enable the group members only feature (on 'experimental') and the completion system and conditional availability (on 'advanced features'). 1. Restore the attached backup file (backup-moodle2-course-condition-20120330-1203.mbz) to a new course using all default settings. EXPLANATION: This backup contains all types of conditions on sections (to test new features) and on activities (to check they aren't broken). The activity names contain, in brackets, the activity condition as text. The sections contain that information in their title. Note that within each section, an 'always available' activity is included (to test that its access is restricted by the section restriction). All of the activities are set to 'display greyed out before available' option, but the sections are set to 'hide completely' except for the last. When logged in as admin (or somebody with viewhiddensections, managegroups, etc.) the activities and sections should display as follows: - Test page (always avail) - display as normal. - Test page (future date, completion, grade) - display greyed out and with information about availability. - Test page (grouping) - display as normal but with '(Test grouping)' information. - Sections: Future date, completion, grade, completion (visible but disabled) - display as normal but with information about availability. - Section: Grouping - display as normal but with '(Test grouping)' information. 2. The course does not contain any users. Enrol a test account as a student in the course. 3. Using a separate browser, log in as the test account and look at the cousre. - Test page (always avail) - display as normal (click it; you can see content) - Test page (future date, completion, grade) - display greyed out and not clickable with information - Sections: Not visible except section 6 which has information. 4. Tick the 'Ticky ticky' tickbox. - Test page (completion) should now display as normal (click it; you can see content) - Section 3 'Completion' should now display, and section 6 'Completion (visible but disabled)' should show its title and content. Click both the pages within these sections and verify that they allow access. 5. Right-click and copy the URL of the test page in section 6. Now untick the 'Ticky ticky' tickbox. Paste the URL into a new browser tab. (This simulates a student guessing the URL of an activity that they are not allowed to view because the section is hidden.) - Access should now be prohibited with 'Sorry, this activity is currently hidden' page. 6. Back in main tab, take the quiz (The answer is 42), get it right (this may be a challenge) and submit the answer. Then return to the main page. - Section 4 'Grade' should now display, and the activity in section 1 'Test page(grade)' should become available. - Click both these newly-available Page activities and verify they can be viewed. 7. Now take the quiz again and get it wrong. Return to main page. - The section should disappear again and the activity in top section should be greyed out. 8. In your other browser, go to Users/Groups and add the user to Group A 9. Back in the 'student' browser, reload the page. - In section 1, the activity 'Test page (grouping)' should display. Check it works. - Section 5 'Grouping' should appear. Click the test page in that activity and check it works. 10. In admin browser, turn editing on and edit the 'Future dates' section (2). Change the date so that it is actually in the past (e.g. in 2001) and save changes. 11. Back in 'student' browser, reload the page. - Section 2 'Future dates' should now appear. 12. In 'admin' browser, turn editing on and click edit button for section 5 (grouping). - Edit form should include 'Restrict access' section similar to that for activities with options for grouping (currently set to 'Test grouping'), 'Allow access from' and '...until', 'Grade condition', 'Activity completion condition', and 'Before section can be accessed' options. (Note: Other options in form are not changed.) 13. Turn on all options as follows: turn on 'Allow access from', but set it to a date in 2001; turn on 'Allow access until' but set it to a date in 2020. Under grade, turn on 'The answer is 42' to be LESS THAN 10%. Under completion, set 'Ticky ticky' to not be marked complete. 'Before section can be accessed' should be set to 'Hide section entirely'. Save changes. (Note: This test is about checking the system can cope with multiple conditions, and with the 'opposite' to normal values.) 14. In 'student' browser, reload the page. - There should be no change; Grouping section still available. 15. Tick the 'Ticky ticky' box. - Grouping section 5 should disappear. (Completion sections 3, 6 appear/enable.) 16. Untick the 'Ticky ticky' box. - Grouping section 5 should reappear. (3, 6 disappear/disable.) 17. Do the quiz and get it right. - Grouping section 5 should disappear again. (Grade section 4 appears.) 18. Do the quiz and get it wrong. - Grouping section 5 should reappear (4 disappears.)