Ir a la última revisión | Autoría | Comparar con el anterior | Ultima modificación | Ver Log |
@mod @mod_lessonFeature: Lesson resetIn order to reuse past lessonsAs a teacherI need to remove all previous data.Background:Given the following "users" exist:| username | firstname | lastname | email || teacher1 | Tina | Teacher1 | teacher1@example.com || student1 | Sam1 | Student1 | student1@example.com || student2 | Sam2 | Student2 | student2@example.com |And the following "courses" exist:| fullname | shortname | category || Course 1 | C1 | 0 |And the following "course enrolments" exist:| user | course | role || teacher1 | C1 | editingteacher || student1 | C1 | student || student2 | C1 | student |And the following "groups" exist:| name | course | idnumber || Group 1 | C1 | G1 || Group 2 | C1 | G2 |And the following "activities" exist:| activity | name | course | idnumber || lesson | Test lesson name | C1 | lesson1 |And the following "mod_lesson > page" exist:| lesson | qtype | title | content || Test lesson name | truefalse | True/false question 1 | Cat is an amphibian |And the following "mod_lesson > answers" exist:| page | answer | response | jumpto | score || True/false question 1 | False | Correct | Next page | 1 || True/false question 1 | True | Wrong | This page | 0 |Scenario: Use course reset to clear all attempt dataWhen I am on the "Test lesson name" "lesson activity" page logged in as student1And I should see "Cat is an amphibian"And I set the following fields to these values:| False | 1 |And I press "Submit"And I press "Continue"And I should see "Congratulations - end of lesson reached"And I am on the "Test lesson name" "lesson activity" page logged in as teacher1And I navigate to "Reports" in current page administrationAnd I should see "Sam1 Student1"And I am on the "Course 1" "reset" pageAnd I set the following fields to these values:| Delete all lesson attempts | 1 |And I press "Reset course"And I press "Continue"And I am on the "Test lesson name" "lesson activity" pageAnd I navigate to "Reports" in current page administrationThen I should see "No attempts have been made on this lesson"@javascriptScenario: Use course reset to remove user overrides.When I am on the "Test lesson name" "lesson activity" page logged in as teacher1And I navigate to "Overrides" in current page administrationAnd I follow "Add user override"And I set the following fields to these values:| Override user | Student1 || Re-takes allowed | 1 |And I press "Save"And I should see "Sam1 Student1"And I am on the "Course 1" "reset" pageAnd I set the following fields to these values:| Delete all user overrides | 1 |And I press "Reset course"And I press "Continue"And I am on the "Test lesson name" "lesson activity" pageAnd I navigate to "Overrides" in current page administrationThen I should not see "Sam1 Student1"Scenario: Use course reset to remove group overrides.When I am on the "Test lesson name" "lesson activity" page logged in as teacher1And I navigate to "Overrides" in current page administrationAnd I select "Group overrides" from the "jump" singleselectAnd I follow "Add group override"And I set the following fields to these values:| Override group | Group 1 || Re-takes allowed | 1 |And I press "Save"And I should see "Group 1"And I am on the "Course 1" "reset" pageAnd I set the following fields to these values:| Delete all group overrides | 1 |And I press "Reset course"And I press "Continue"And I am on the "Test lesson name" "lesson activity" pageAnd I navigate to "Overrides" in current page administrationAnd I select "Group overrides" from the "jump" singleselectThen I should not see "Group 1"