AutorÃa | Ultima modificación | Ver Log |
@mod @mod_survey @core_completion @javascriptFeature: A teacher can use activity completion to track a student progressIn order to use activity completionAs a teacherI need to set survey activities and enable activity completionBackground:Given the following "users" exist:| username | firstname | lastname | email || teacher1 | Teacher | 1 | teacher1@example.com || student1 | Student | 1 | student1@example.com |And the following "courses" exist:| fullname | shortname | category | enablecompletion || Course 1 | C1 | 0 | 1 |And the following "course enrolments" exist:| user | course | role || teacher1 | C1 | editingteacher || student1 | C1 | student |And I enable "survey" "mod" pluginAnd I log in as "teacher1"Scenario: Require survey viewGiven the following "activities" exist:| activity | name | course | idnumber | template | completion | completionview | completionsubmit || survey | Test survey name | C1 | survey1 | 5 | 2 | 1 | 0 |And I am on the "Test survey name" "survey activity" page# Teacher view.And "Test survey name" should have the "View" completion condition# Student view.When I am on the "Course 1" course page logged in as student1And the "View" completion condition of "Test survey name" is displayed as "todo"And I follow "Test survey name"And I am on "Course 1" course homepageThen the "View" completion condition of "Test survey name" is displayed as "done"Scenario: Require survey submissionGiven the following "activities" exist:| activity | name | course | idnumber | template | completion | completionview | completionsubmit || survey | Test survey name | C1 | survey1 | 5 | 2 | 1 | 1 |And I am on the "Test survey name" "survey activity" page# Teacher view.And "Test survey name" should have the "Submit answers" completion condition# Student view.When I am on the "Course 1" course page logged in as student1And the "Submit answers" completion condition of "Test survey name" is displayed as "todo"And I follow "Test survey name"And the "Submit answers" completion condition of "Test survey name" is displayed as "todo"And I press "Submit"And I am on "Course 1" course homepageAnd the "Submit answers" completion condition of "Test survey name" is displayed as "done"And I follow "Test survey name"And the "Submit answers" completion condition of "Test survey name" is displayed as "done"Scenario: Use manual completionGiven the following "activities" exist:| activity | name | course | idnumber | completion || survey | Test survey name | C1 | survey1 | 1 |And I am on "Course 1" course homepage# Teacher view.And "Test survey name" should have the "Mark as done" completion condition# Student view.When I am on the "survey1" Activity page logged in as student1Then the manual completion button of "Test survey name" is displayed as "Mark as done"And I toggle the manual completion state of "Test survey name"And the manual completion button of "Test survey name" is displayed as "Done"