2 Feature: Database with no calendar capabilites
3 In order to allow work effectively
5 I need to be able to create databases even when I cannot edit calendar events
8 Given the following "courses" exist:
9 | fullname | shortname | category | groupmode |
10 | Course 1 | C1 | 0 | 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 I log in as "admin"
18 And I am on the "Course 1" "permissions" page
19 And I override the system permissions of "Teacher" role with:
20 | capability | permission |
21 | moodle/calendar:manageentries | Prohibit |
24 Scenario: Editing a database
25 Given I log in as "admin"
26 And the following "activities" exist:
27 | activity | name | intro | course | section | idnumber |
28 | data | Test database name | Test database description | C1 | 1 | data1 |
29 And I am on "Course 1" course homepage
30 And I follow "Test database name"
31 And I navigate to "Settings" in current page administration
32 And I set the following fields to these values:
33 | id_timeavailablefrom_enabled | 1 |
34 | id_timeavailablefrom_day | 1 |
35 | id_timeavailablefrom_month | 1 |
36 | id_timeavailablefrom_year | 2017 |
37 | id_timeavailableto_enabled | 1 |
38 | id_timeavailableto_day | 1 |
39 | id_timeavailableto_month | 4 |
40 | id_timeavailableto_year | 2017 |
41 | id_timeviewfrom_enabled | 1 |
42 | id_timeviewfrom_day | 1 |
43 | id_timeviewfrom_month | 3 |
44 | id_timeviewfrom_year | 2017 |
45 | id_timeviewto_enabled | 1 |
46 | id_timeviewto_day | 1 |
47 | id_timeviewto_month | 4 |
48 | id_timeviewto_year | 2017 |
49 And I press "Save and return to course"
51 When I log in as "teacher1"
52 And I am on "Course 1" course homepage with editing mode on
53 And I follow "Test database name"
54 And I navigate to "Settings" in current page administration
55 And I set the following fields to these values:
56 | id_timeavailablefrom_year | 2018 |
57 | id_timeavailableto_year | 2018 |
58 | id_timeviewfrom_year | 2018 |
59 | id_timeviewto_year | 2018 |
60 And I press "Save and return to course"
61 Then I should see "Test database name"