AutorÃa | Ultima modificación | Ver Log |
@eWallah @availability @availability_relativedateFeature: availability_relativedate delete relative activitiesIn order to use conditions that are based on other activitiesAs a teacherI need to be able to delete activities that are part of the condition without errorsBackground:Given the following "users" exist:| username || student1 || teacher1 |And the following config values are set as admin:| enableavailability | 1 | |And the following "course" exists:| fullname | Course 1 || shortname | C1 || category | 0 || enablecompletion | 1 || startdate | ## -10 days 17:00 ## || enddate | ## +2 weeks 17:00 ## |And the following "course enrolments" exist:| user | course | role || student1 | C1 | student || teacher1 | C1 | editingteacher |@javascriptScenario Outline: Delete a module that is part of a Relative condition in a sectionGiven the following "activities" exist:| activity | name | course | idnumber | section | completion || <activity> | Act1 | C1 | id1 | 1 | 1 |And I log in as "teacher1"And I am on "Course 1" course homepage with editing mode onAnd I edit the section "1"And I expand all fieldsetsAnd I press "Add restriction..."And I click on "Relative date" "button" in the "Add restriction..." "dialogue"And I set the field "relativenumber" to "1"And I set the field "relativednw" to "1"And I set the field "relativestart" to "7"And I set the field "relativecoursemodule" to "Act1"When I press "Save changes"And I should see "1 hour after completion of activity Act1"And I delete "Act1" activityAnd I should see "1 hour after completion of activity Act1"And I reload the pageAnd I run all adhoc tasksAnd I log outAnd I am on the "C1" "Course" page logged in as "student1"Then I should not see "Act1" in the "region-main" "region"And I should see "1 hour after completion of activity (missing)"Examples:| activity || lesson || page |@javascriptScenario Outline: Relative condition for each moduleGiven the following "activities" exist:| activity | name | course | idnumber | section | completion || <activity> | Act1 | C1 | id1 | 1 | 1 || <activity> | Act2 | C1 | id2 | 1 | 1 |And I log in as "teacher1"And I am on "Course 1" course homepage with editing mode onAnd I open "Act2" actions menuAnd I click on "Edit settings" "link" in the "Act2" activityAnd I expand all fieldsetsAnd I click on "Add restriction..." "button"When I click on "Relative date" "button" in the "Add restriction..." "dialogue"And I set the field "relativenumber" to "1"And I set the field "relativednw" to "1"And I set the field "relativestart" to "7"And I set the field "relativecoursemodule" to "Act1"And I press "Save and return to course"And I should see "1 hour after completion of activity Act1"And I delete "Act1" activityAnd I should see "1 hour after completion of activity Act1"And I reload the pageAnd I run all adhoc tasksAnd I log outAnd I am on the "C1" "Course" page logged in as "student1"Then I should see "Act2" in the "region-main" "region"And I should see "1 hour after completion of activity (missing)"Examples:| activity || book || url |