AutorÃa | Ultima modificación | Ver Log |
@block @block_completionstatusFeature: Enable Block Completion in a courseIn order to view the completion block in a courseAs a teacherI can add completion block to a courseBackground:Given the following "users" exist:| username | firstname | lastname | email | idnumber || teacher1 | Teacher | 1 | teacher1@example.com | T1 || student1 | Student | 1 | student1@example.com | S1 |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 |Scenario: Add the block to a the course where completion is disabledGiven I log in as "teacher1"And I am on "Course 1" course homepage with editing mode onAnd I navigate to "Settings" in current page administrationAnd I set the following fields to these values:| Enable completion tracking | No |And I press "Save and display"When I add the "Course completion status" blockThen I should see "Completion is not enabled for this course" in the "Course completion status" "block"Scenario: Add the block to a the course where completion is not setGiven I log in as "teacher1"And I am on "Course 1" course homepage with editing mode onWhen I add the "Course completion status" blockThen I should see "No completion criteria set for this course" in the "Course completion status" "block"Scenario: Add the block to a course with criteria and view as an untracked role.Given the following "activities" exist:| activity | course | idnumber | name | intro || page | C1 | page1 | Test page name | Test page description |And I log in as "teacher1"And I am on "Course 1" course homepage with editing mode onAnd I follow "Test page name"And I navigate to "Settings" in current page administrationAnd I set the following fields to these values:| Add requirements | 1 || View the activity | 1 |And I press "Save and return to course"When I add the "Course completion status" blockAnd I navigate to "Course completion" in current page administrationAnd I expand all fieldsetsAnd I set the following fields to these values:| Test page name | 1 |And I press "Save changes"Then I should see "You are currently not being tracked by completion in this course" in the "Course completion status" "block"