[ Index ] |
PHP Cross Reference of Unnamed Project |
[Summary view] [Print] [Text view]
1 @block @block_course_list 2 Feature: Enable the course_list block on a course page and view it's contents 3 In order to enable the course list block on an course page 4 As a teacher 5 I can add the course list block to a course page 6 7 Background: 8 Given the following "categories" exist: 9 | name | category | idnumber | 10 | Category 1 | 0 | CAT1 | 11 | Category 2 | 0 | CAT2 | 12 | Category 3 | CAT2 | CAT3 | 13 And the following "courses" exist: 14 | fullname | shortname | category | 15 | Course 1 | C1 | 0 | 16 | Course 2 | C2 | CAT1 | 17 | Course 3 | C3 | CAT2 | 18 | Course 4 | C4 | CAT3 | 19 And the following "users" exist: 20 | username | firstname | lastname | email | 21 | teacher1 | Teacher | First | teacher1@example.com | 22 And the following "course enrolments" exist: 23 | user | course | role | 24 | teacher1 | C1 | editingteacher | 25 | teacher1 | C2 | editingteacher | 26 | teacher1 | C3 | editingteacher | 27 28 Scenario: Add the course list block on course page and navigate to the course listing 29 Given I log in as "teacher1" 30 And I follow "Course 1" 31 And I turn editing mode on 32 When I add the "Courses" block 33 Then I should see "Course 1" in the "My courses" "block" 34 And I should see "Course 2" in the "My courses" "block" 35 And I should see "Course 3" in the "My courses" "block" 36 And I should not see "Course 4" in the "My courses" "block" 37 And I follow "All courses" 38 And I should see "Miscellaneous" 39 40 Scenario: Add the course list block on course page and navigate to another course 41 Given I log in as "teacher1" 42 And I follow "Course 1" 43 And I turn editing mode on 44 When I add the "Courses" block 45 Then I should see "Course 1" in the "My courses" "block" 46 And I should see "Course 2" in the "My courses" "block" 47 And I should see "Course 3" in the "My courses" "block" 48 And I should not see "Course 4" in the "My courses" "block" 49 And I follow "Course 3" 50 And I should see "Course 3" 51 52 Scenario: Add the course list block on course page and view as an admin 53 Given I log in as "admin" 54 And I am on site homepage 55 And I follow "Course 1" 56 And I turn editing mode on 57 When I add the "Courses" block 58 Then I should see "Miscellaneous" in the "Course categories" "block" 59 And I should see "Category 1" in the "Course categories" "block" 60 And I should see "Category 2" in the "Course categories" "block" 61 And I should not see "Category 3" in the "Course categories" "block" 62 And I should not see "Course 1" in the "Course categories" "block" 63 And I should not see "Course 2" in the "Course categories" "block" 64 And I follow "All courses" 65 And I should see "Miscellaneous" 66 67 Scenario: View the course list block on course page with hide all courses link enabled 68 Given the following config values are set as admin: 69 | block_course_list_hideallcourseslink | 1 | 70 And I log in as "teacher1" 71 And I follow "Course 1" 72 And I turn editing mode on 73 When I add the "Courses" block 74 Then I should not see "All courses" in the "My courses" "block" 75 76 Scenario: View the course list block on course page with admin sees own course enabled 77 Given the following config values are set as admin: 78 | block_course_list_adminview | own | 79 And the following "course enrolments" exist: 80 | user | course | role | 81 | admin | C1 | editingteacher | 82 And I log in as "admin" 83 And I am on site homepage 84 And I follow "Course 1" 85 And I turn editing mode on 86 When I add the "Courses" block 87 Then I should not see "Miscellaneous" in the "My courses" "block" 88 And I should not see "Category 1" in the "My courses" "block" 89 And I should not see "Category 2" in the "My courses" "block" 90 And I should not see "Category 3" in the "My courses" "block" 91 And I should see "Course 1" in the "My courses" "block" 92 And I should not see "Course 2" in the "My courses" "block" 93 And I follow "All courses" 94 And I should see "Miscellaneous"
title
Description
Body
title
Description
Body
title
Description
Body
title
Body
Generated: Thu Aug 11 10:00:09 2016 | Cross-referenced by PHPXref 0.7.1 |