|
| 1 | +@mod @mod_assign |
| 2 | +Feature: Assignment with no calendar capabilites |
| 3 | + In order to allow work effectively |
| 4 | + As a teacher |
| 5 | + I need to be able to create assignments even when I cannot edit calendar events |
| 6 | + |
| 7 | + Background: |
| 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 "Course 1" course homepage |
| 19 | + And I navigate to "Users > Permissions" in current page administration |
| 20 | + And I override the system permissions of "Teacher" role with: |
| 21 | + | capability | permission | |
| 22 | + | moodle/calendar:manageentries | Prohibit | |
| 23 | + And I log out |
| 24 | + |
| 25 | + Scenario: Editing an assignment |
| 26 | + Given I log in as "admin" |
| 27 | + And I am on "Course 1" course homepage with editing mode on |
| 28 | + When I add a "Assignment" to section "1" and I fill the form with: |
| 29 | + | Assignment name | Test assignment name | |
| 30 | + | Description | Test assignment description | |
| 31 | + | id_allowsubmissionsfromdate_enabled | 1 | |
| 32 | + | id_allowsubmissionsfromdate_day | 1 | |
| 33 | + | id_allowsubmissionsfromdate_month | 1 | |
| 34 | + | id_allowsubmissionsfromdate_year | 2017 | |
| 35 | + | id_duedate_enabled | 1 | |
| 36 | + | id_duedate_day | 1 | |
| 37 | + | id_duedate_month | 2 | |
| 38 | + | id_duedate_year | 2017 | |
| 39 | + | id_cutoffdate_enabled | 1 | |
| 40 | + | id_cutoffdate_day | 2 | |
| 41 | + | id_cutoffdate_month | 2 | |
| 42 | + | id_cutoffdate_year | 2017 | |
| 43 | + | id_gradingduedate_enabled | 1 | |
| 44 | + | id_gradingduedate_day | 1 | |
| 45 | + | id_gradingduedate_month | 3 | |
| 46 | + | id_gradingduedate_year | 2017 | |
| 47 | + And I log out |
| 48 | + When I log in as "teacher1" |
| 49 | + And I am on "Course 1" course homepage with editing mode on |
| 50 | + And I follow "Test assignment name" |
| 51 | + And I navigate to "Edit settings" in current page administration |
| 52 | + And I set the following fields to these values: |
| 53 | + | id_allowsubmissionsfromdate_year | 2018 | |
| 54 | + | id_duedate_year | 2018 | |
| 55 | + | id_cutoffdate_year | 2018 | |
| 56 | + | id_gradingduedate_year | 2018 | |
| 57 | + And I press "Save and return to course" |
| 58 | + Then I should see "Test assignment name" |
0 commit comments