source: moodle/trunk/fuentes/completion/tests/behat/teacher_manual_completion.feature @ 1331

Last change on this file since 1331 was 1331, checked in by jrpelegrina, 3 years ago

Updated to moodle 3.0.3

File size: 2.1 KB
Line 
1@core @core_completion
2Feature: 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 |
10      | Completion course | CC1       | 0        |
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 config values are set as admin:
20      | enablecompletion | 1 |
21    And I log in as "admin"
22    And I set the following administration settings values:
23      | Enable completion tracking | 1 |
24    And I am on site homepage
25    And I follow "Completion course"
26    And completion tracking is "Enabled" in current course
27    And I follow "Course completion"
28    And I set the field "Teacher" to "1"
29    And I press "Save changes"
30    And I turn editing mode on
31    And I add the "Course completion status" block
32    And I log out
33    And I log in as "student1"
34    And I am on site homepage
35    And I follow "Completion course"
36    And I should see "Status: Not yet started"
37    And I log out
38    When I log in as "teacher1"
39    And I am on site homepage
40    And I follow "Completion course"
41    And I follow "View course report"
42    And I should see "Student First"
43    And I follow "Click to mark user complete"
44    # Running cron just after clicking sometimes fail, as record
45    # should be created before the cron runs.
46    And I wait "1" seconds
47    And I trigger cron
48    And I am on site homepage
49    And I log out
50    Then I log in as "student1"
51    And I am on site homepage
52    And I follow "Completion course"
53    And I should see "Status: Complete"
Note: See TracBrowser for help on using the repository browser.