1 |
efrain |
1 |
@core @core_completion
|
|
|
2 |
Feature: Completion with no calendar capabilites
|
|
|
3 |
In order to allow work effectively
|
|
|
4 |
As a teacher
|
|
|
5 |
I need to be able to create activities with completion enabled without calendar capabilities
|
|
|
6 |
|
|
|
7 |
Background:
|
|
|
8 |
Given the following "courses" exist:
|
|
|
9 |
| fullname | shortname | category | groupmode | enablecompletion |
|
|
|
10 |
| Course 1 | C1 | 0 | 1 | 1 |
|
|
|
11 |
And the following "users" exist:
|
|
|
12 |
| username | firstname | lastname | email |
|
|
|
13 |
| teacher1 | Teacher | 1 | teacher1@example.com |
|
|
|
14 |
And the following "course enrolments" exist:
|
|
|
15 |
| user | course | role |
|
|
|
16 |
| teacher1 | C1 | editingteacher |
|
|
|
17 |
And the following "activity" exists:
|
|
|
18 |
| activity | forum |
|
|
|
19 |
| course | C1 |
|
|
|
20 |
| idnumber | 00001 |
|
|
|
21 |
| name | Test forum name |
|
|
|
22 |
| completion | 2 |
|
|
|
23 |
And I am on the "Test forum name" "forum activity editing" page logged in as admin
|
|
|
24 |
And I set the following fields to these values:
|
|
|
25 |
| id_completionexpected_enabled | 1 |
|
|
|
26 |
| id_completionexpected_day | 1 |
|
|
|
27 |
| id_completionexpected_month | 1 |
|
|
|
28 |
| id_completionexpected_year | 2017 |
|
|
|
29 |
And I press "Save and return to course"
|
|
|
30 |
And I am on the "Course 1" "permissions" page
|
|
|
31 |
And I override the system permissions of "Teacher" role with:
|
|
|
32 |
| capability | permission |
|
|
|
33 |
| moodle/calendar:manageentries | Prohibit |
|
|
|
34 |
|
|
|
35 |
Scenario: Editing completion date
|
|
|
36 |
When I am on the "Test forum name" "forum activity editing" page logged in as teacher1
|
|
|
37 |
And I set the following fields to these values:
|
|
|
38 |
| id_completionexpected_year | 2018 |
|
|
|
39 |
And I press "Save and return to course"
|
|
|
40 |
Then I should see "Test forum name"
|