AutorÃa | Ultima modificación | Ver Log |
@coreFeature: Context freezing apply to child contextsIn order to preserve contentAs a managerI can disbale writes at different areasBackground:Given the following config values are set as admin:| contextlocking | 1 |And the following "users" exist:| username | firstname | lastname | email || teacher | Ateacher | Teacher | teacher@example.com || student1 | Astudent | Astudent | student1@example.com |And the following "categories" exist:| name | category | idnumber || cata | 0 | cata || cataa | cata | cataa || catb | 0 | catb |And the following "courses" exist:| fullname | shortname | category || courseaa1 | courseaa1 | cataa || courseaa2 | courseaa2 | cataa || courseb | courseb | catb |And the following "activities" exist:| activity | name | course | idnumber || forum | faa1 | courseaa1 | faa1 || forum | faa1b | courseaa1 | faa1b || forum | faa2 | courseaa2 | faa2 || forum | fb | courseb | fb |And the following "course enrolments" exist:| user | course | role || teacher | courseaa1 | editingteacher || student1 | courseaa1 | student || teacher | courseaa2 | editingteacher || student1 | courseaa2 | student || teacher | courseb | editingteacher || student1 | courseb | student |Scenario: Freeze course module module should freeze just that moduleGiven I am on the "courseaa1" "Course" page logged in as "admin"And I follow "faa1"And "Add discussion topic" "link" should existWhen I follow "Freeze this context"And I click on "Continue" "button"Then "Add discussion topic" "link" should not existWhen I am on "courseaa1" course homepageThen edit mode should be available on the current pageWhen I follow "faa1b"Then "Add discussion topic" "link" should existWhen I am on "courseaa2" course homepageThen edit mode should be available on the current pageWhen I follow "faa2"Then "Add discussion topic" "link" should existWhen I am on "courseb" course homepageThen edit mode should be available on the current pageWhen I follow "fb"Then "Add discussion topic" "link" should existAnd I log outWhen I am on the "courseaa1" "Course" page logged in as "teacher"And I follow "faa1"Then "Add a new discussion topic" "link" should not existWhen I am on "courseaa1" course homepageThen edit mode should be available on the current pageWhen I follow "faa1b"Then "Add discussion topic" "link" should existWhen I am on "courseaa2" course homepageThen edit mode should be available on the current pageWhen I follow "faa2"Then "Add discussion topic" "link" should existWhen I am on "courseb" course homepageThen edit mode should be available on the current pageWhen I follow "fb"And "Add discussion topic" "link" should existAnd I log outWhen I am on the "courseaa1" "Course" page logged in as "student1"And I follow "faa1"Then "Add a new discussion topic" "link" should not existWhen I am on "courseaa1" course homepageWhen I follow "faa1b"Then "Add discussion topic" "link" should existWhen I am on "courseaa2" course homepageWhen I follow "faa2"Then "Add discussion topic" "link" should existWhen I am on "courseb" course homepageWhen I follow "fb"Then "Add discussion topic" "link" should existScenario: Freeze course should freeze all childrenGiven I am on the "courseaa1" "Course" page logged in as "admin"Then edit mode should be available on the current pageWhen I follow "Freeze this context"And I click on "Continue" "button"Then edit mode should not be available on the current pageThen "Add a new discussion topic" "link" should not existWhen I am on "courseaa1" course homepageThen edit mode should not be available on the current pageAnd "Unfreeze this context" "link" should exist in current page administrationWhen I follow "faa1b"Then "Add a new discussion topic" "link" should not existAnd "Unfreeze this context" "link" should not exist in current page administrationWhen I am on "courseaa2" course homepageThen edit mode should be available on the current pageWhen I follow "faa2"Then "Add discussion topic" "link" should existWhen I am on "courseb" course homepageThen edit mode should be available on the current pageWhen I follow "fb"Then "Add discussion topic" "link" should existAnd I log outWhen I am on the "courseaa1" "Course" page logged in as "teacher"And I follow "faa1"Then "Add a new discussion topic" "link" should not existWhen I am on "courseaa1" course homepageThen edit mode should not be available on the current pageWhen I follow "faa1b"Then "Add a new discussion topic" "link" should not existWhen I am on "courseaa2" course homepageThen edit mode should be available on the current pageWhen I follow "faa2"Then "Add discussion topic" "link" should existWhen I am on "courseb" course homepageThen edit mode should be available on the current pageWhen I follow "fb"Then "Add discussion topic" "link" should existAnd I log outWhen I am on the "courseaa1" "Course" page logged in as "student1"And I follow "faa1"Then "Add a new discussion topic" "link" should not existWhen I am on "courseaa1" course homepageWhen I follow "faa1b"Then "Add a new discussion topic" "link" should not existWhen I am on "courseaa2" course homepageWhen I follow "faa2"Then "Add discussion topic" "link" should existWhen I am on "courseb" course homepageWhen I follow "fb"Then "Add discussion topic" "link" should existScenario: Freeze course category should freeze all childrenGiven I log in as "admin"And I go to the courses management pageAnd I click on "managecontextlock" action for "cata" in management category listingAnd I click on "Continue" "button"And I am on "courseaa1" course homepageThen edit mode should not be available on the current pageThen "Add a new discussion topic" "link" should not existWhen I am on "courseaa1" course homepageThen edit mode should not be available on the current pageAnd "Unfreeze this context" "link" should not exist in current page administrationWhen I follow "faa1b"Then "Add a new discussion topic" "link" should not existAnd "Unfreeze this context" "link" should not exist in current page administrationWhen I am on "courseaa2" course homepageThen edit mode should not be available on the current pageWhen I follow "faa2"Then "Add a new discussion topic" "link" should not existAnd "Unfreeze this context" "link" should not exist in current page administrationWhen I am on "courseb" course homepageThen edit mode should be available on the current pageWhen I follow "fb"Then "Add discussion topic" "link" should existAnd I log outWhen I am on the "courseaa1" "Course" page logged in as "teacher"Then edit mode should not be available on the current pageAnd I follow "faa1"Then "Add a new discussion topic" "link" should not existWhen I am on "courseaa1" course homepageThen edit mode should not be available on the current pageWhen I follow "faa1b"Then "Add a new discussion topic" "link" should not existWhen I am on "courseaa2" course homepageThen edit mode should not be available on the current pageWhen I follow "faa2"Then "Add a new discussion topic" "link" should not existWhen I am on "courseb" course homepageThen edit mode should be available on the current pageWhen I follow "fb"Then "Add discussion topic" "link" should existAnd I log outWhen I am on the "courseaa1" "Course" page logged in as "student1"And I follow "faa1"Then "Add a new discussion topic" "link" should not existWhen I am on "courseaa1" course homepageWhen I follow "faa1b"Then "Add a new discussion topic" "link" should not existWhen I am on "courseaa2" course homepageWhen I follow "faa2"Then "Add a new discussion topic" "link" should not existWhen I am on "courseb" course homepageWhen I follow "fb"Then "Add discussion topic" "link" should exist