-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathinstance_create_requireddescription.feature
32 lines (28 loc) · 1.57 KB
/
instance_create_requireddescription.feature
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
@mod @mod_offlinequiz @adding @description @amc
Feature: Within a moodle instance, an administrator should be able to set the field "Description" of an offlinequiz instance as required via the general adminsetting at "Common activity settings".
In order to have a consistent structure of settings
As an admin
I need to be able to define in the adminsettings whether the activity description is required and also is valid within a offlinequiz instance.
Background:
Given the following "users" exist:
| username | firstname | lastname | email |
| teacher1 | Teacher | 1 | [email protected] |
And the following "courses" exist:
| fullname | shortname | category | groupmode |
| Course 1 | C1 | 0 | 0|
And the following "course enrolments" exist:
| user | course | role |
| teacher1 | C1 | editingteacher |
@javascript
Scenario: Switch as an admin to the adminsetting for the description field and define as required field. Then login as a teacher and try to add an offlinequiz instance without a description.
Given I log in as "admin"
And I navigate to "Plugins > Activity modules > Common activity settings" in site administration
And I set the field "Require activity description" to "Yes"
And I press "Save changes"
And I log out
Given I log in as "teacher1"
And I am on "Course 1" course homepage
And I turn editing mode on
When I add a "Offline Quiz" to section "2" and I fill the form with:
| Offline quiz name | Add an offlinequiz to the current course |
Then I should see "- Required"