2 Feature: Managers can create courses
3 In order to group users and contents
5 I need to create courses and set default values on them
8 Scenario: Courses are created with the default forum and blocks
9 Given the following "users" exist:
10 | username | firstname | lastname | email |
11 | teacher1 | Teacher | 1 | teacher1@example.com |
12 | student1 | Student | 1 | student1@example.com |
13 And I log in as "admin"
14 And I create a course with:
15 | Course full name | Course 1 |
16 | Course short name | C1 |
17 And I enrol "Teacher 1" user as "Teacher"
18 And I enrol "Student 1" user as "Student"
20 When I log in as "teacher1"
21 And I follow "Course 1"
22 Then "Latest news" "block" should exist
23 And I follow "Announcements"
24 And "Add a new topic" "button" should exist
25 And "Forced subscription" "link" should not exist
27 And I log in as "student1"
28 And I follow "Course 1"
29 And I follow "Announcements"
30 And "Add a new topic" "button" should not exist
31 And I should see "Forced subscription" in the "Administration" "block"
33 Scenario: Create a course from the management interface and return to it
34 Given the following "courses" exist:
35 | fullname | shortname | idnumber |
36 | Course 1 | Course 1 | C1 |
37 And I log in as "admin"
38 And I go to the courses management page
39 And I should see the "Categories" management page
40 And I click on category "Miscellaneous" in the management interface
41 And I should see the "Course categories and courses" management page
42 And I click on "Create new course" "link" in the "#course-listing" "css_element"
43 When I set the following fields to these values:
44 | Course full name | Course 2 |
45 | Course short name | Course 2 |
46 | Course summary | Course 2 summary |
47 And I press "Save and return"
48 Then I should see the "Course categories and courses" management page
49 And I should see course listing "Course 1" before "Course 2"