[ Index ] |
PHP Cross Reference of Unnamed Project |
[Summary view] [Print] [Text view]
1 @core @core_course @core_tag @javascript 2 Feature: Tagging courses 3 In order to search courses 4 As a teacher 5 I need to be able to tag courses 6 7 Background: 8 Given the following "users" exist: 9 | username | firstname | lastname | email | 10 | teacher1 | Teacher | 1 | teacher1@example.com | 11 | teacher2 | Teacher | 2 | teacher2@example.com | 12 | user1 | User | 1 | user1@example.com | 13 And the following "courses" exist: 14 | fullname | shortname | 15 | Course 1 | c1 | 16 | Course 2 | c2 | 17 And the following "tags" exist: 18 | name | isstandard | 19 | Neverusedtag | 1 | 20 And the following "course enrolments" exist: 21 | user | course | role | 22 | teacher1 | c1 | editingteacher | 23 | teacher2 | c1 | teacher | 24 | teacher1 | c2 | editingteacher | 25 | teacher2 | c2 | teacher | 26 And I log in as "teacher1" 27 And I follow "Course 1" 28 And I click on "Edit settings" "link" in the "Administration" "block" 29 And I set the following fields to these values: 30 | Tags | Mathematics | 31 And I press "Save and display" 32 And I log out 33 34 Scenario: Set course tags using the course edit form 35 When I log in as "teacher1" 36 And I follow "Course 1" 37 And "Course tags" "link" should not exist in the "Administration" "block" 38 And I click on "Edit settings" "link" in the "Administration" "block" 39 And I expand all fieldsets 40 Then I should see "Mathematics" in the ".form-autocomplete-selection" "css_element" 41 And I set the following fields to these values: 42 | Tags | Algebra | 43 And I press "Save and display" 44 And I click on "Dashboard" "link" in the "Navigation" "block" 45 And I follow "Course 2" 46 And I click on "Edit settings" "link" in the "Administration" "block" 47 And I set the following fields to these values: 48 | Tags | Mathematics, Geometry | 49 And I press "Save and display" 50 And I log out 51 And I log in as "user1" 52 And I navigate to "Tags" node in "Site pages" 53 And I follow "Mathematics" 54 Then I should see "Course 1" 55 And I should see "Course 2" 56 And I follow "Tags" 57 And I follow "Algebra" 58 And I should see "Course 1" 59 And I should not see "Course 2" 60 And I follow "Tags" 61 And I follow "Geometry" 62 And I should not see "Course 1" 63 And I should see "Course 2" 64 And I log out 65 66 Scenario: User can set course tags using separate form 67 Given I log in as "admin" 68 And I set the following system permissions of "Non-editing teacher" role: 69 | moodle/course:tag | Allow | 70 And I log out 71 When I log in as "teacher2" 72 And I follow "Course 1" 73 And "Edit settings" "link" should not exist in the "Administration" "block" 74 And I click on "Course tags" "link" in the "Administration" "block" 75 Then I should see "Mathematics" in the ".form-autocomplete-selection" "css_element" 76 And I set the following fields to these values: 77 | Tags | Algebra | 78 And I press "Save changes" 79 And I click on "Dashboard" "link" in the "Navigation" "block" 80 And I follow "Course 2" 81 And I click on "Course tags" "link" in the "Administration" "block" 82 And I set the following fields to these values: 83 | Tags | Mathematics, Geometry | 84 And I press "Save changes" 85 And I log out 86 And I log in as "user1" 87 And I navigate to "Tags" node in "Site pages" 88 And I follow "Mathematics" 89 Then I should see "Course 1" 90 And I should see "Course 2" 91 And I follow "Tags" 92 And I follow "Algebra" 93 And I should see "Course 1" 94 And I should not see "Course 2" 95 And I follow "Tags" 96 And I follow "Geometry" 97 And I should not see "Course 1" 98 And I should see "Course 2" 99 And I log out
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 |