1 |
efrain |
1 |
@format @format_singleactivity
|
|
|
2 |
Feature: Courses can be created in Single Activity mode
|
|
|
3 |
In order to create a single activity course
|
|
|
4 |
As a manager
|
|
|
5 |
I need to create courses and set default values on them
|
|
|
6 |
|
|
|
7 |
Scenario: Create a course as a custom course creator
|
|
|
8 |
Given the following "users" exist:
|
|
|
9 |
| username | firstname | lastname | email |
|
|
|
10 |
| kevin | Kevin | the | kevin@example.com |
|
|
|
11 |
And the following "roles" exist:
|
|
|
12 |
| shortname | name | archetype |
|
|
|
13 |
| creator | Creator | |
|
|
|
14 |
And the following "system role assigns" exist:
|
|
|
15 |
| user | role | contextlevel |
|
|
|
16 |
| kevin | creator | System |
|
|
|
17 |
And the following "role capability" exists:
|
|
|
18 |
| role | creator |
|
|
|
19 |
| moodle/course:create | allow |
|
|
|
20 |
| moodle/course:update | allow |
|
|
|
21 |
| moodle/course:manageactivities | allow |
|
|
|
22 |
| moodle/course:viewparticipants | allow |
|
|
|
23 |
| moodle/role:assign | allow |
|
|
|
24 |
When I log in as "kevin"
|
|
|
25 |
And I am on site homepage
|
|
|
26 |
And I press "Add a new course"
|
|
|
27 |
And I set the following fields to these values:
|
|
|
28 |
| Course full name | My first course |
|
|
|
29 |
| Course short name | myfirstcourse |
|
|
|
30 |
| Format | Single activity |
|
|
|
31 |
And I press "Update format"
|
|
|
32 |
Then I should see "Quiz" in the "Type of activity" "field"
|
11 |
efrain |
33 |
And I should see "Forum" in the "Type of activity" "field"
|
|
|
34 |
And I set the field "Type of activity" to "Quiz"
|
1 |
efrain |
35 |
And I press "Save and display"
|
|
|
36 |
And I should see "New Quiz"
|