1 |
efrain |
1 |
@core @core_completion
|
|
|
2 |
Feature: Allow teachers to manually mark users as complete when configured
|
|
|
3 |
In order for teachers to mark students as complete
|
|
|
4 |
As a teacher
|
|
|
5 |
I need to be able to use the completion report mark complete functionality
|
|
|
6 |
|
|
|
7 |
Scenario: Mark a student as complete using the completion report
|
|
|
8 |
Given the following "courses" exist:
|
|
|
9 |
| fullname | shortname | category | enablecompletion |
|
|
|
10 |
| Completion course | CC1 | 0 | 1 |
|
|
|
11 |
And the following "users" exist:
|
|
|
12 |
| username | firstname | lastname | email |
|
|
|
13 |
| student1 | Student | First | student1@example.com |
|
|
|
14 |
| teacher1 | Teacher | First | teacher1@example.com |
|
|
|
15 |
And the following "course enrolments" exist:
|
|
|
16 |
| user | course | role |
|
|
|
17 |
| student1 | CC1 | student |
|
|
|
18 |
| teacher1 | CC1 | editingteacher |
|
|
|
19 |
And the following "blocks" exist:
|
|
|
20 |
| blockname | contextlevel | reference | pagetypepattern | defaultregion |
|
|
|
21 |
| completionstatus | Course | CC1 | course-view-* | side-pre |
|
|
|
22 |
And I am on the "Completion course" course page logged in as admin
|
|
|
23 |
And I navigate to "Course completion" in current page administration
|
|
|
24 |
And I set the field "Teacher" to "1"
|
|
|
25 |
And I press "Save changes"
|
|
|
26 |
And I am on the "Completion course" course page logged in as student1
|
|
|
27 |
And I should see "Status: Not yet started"
|
|
|
28 |
When I am on the "Completion course" course page logged in as teacher1
|
|
|
29 |
And I follow "View course report"
|
|
|
30 |
And I should see "Student First"
|
|
|
31 |
And I follow "Click to mark user complete"
|
|
|
32 |
# Running completion task just after clicking sometimes fail, as record
|
|
|
33 |
# should be created before the task runs.
|
|
|
34 |
And I wait "1" seconds
|
|
|
35 |
And I run the scheduled task "core\task\completion_regular_task"
|
|
|
36 |
And I am on site homepage
|
|
|
37 |
Then I am on the "Completion course" course page logged in as student1
|
|
|
38 |
And I should see "Status: Complete"
|