[ Index ] |
PHP Cross Reference of moodle-2.8 |
[Summary view] [Print] [Text view]
1 @enrol @enrol_self 2 Feature: Users can auto-enrol themself in courses where self enrolment is allowed 3 In order to participate in courses 4 As a user 5 I need to auto enrol me in courses 6 7 Background: 8 Given the following "users" exist: 9 | username | firstname | lastname | email | 10 | teacher1 | Teacher | 1 | [email protected] | 11 | student1 | Student | 1 | [email protected] | 12 And the following "courses" exist: 13 | fullname | shortname | format | 14 | Course 1 | C1 | topics | 15 And the following "course enrolments" exist: 16 | user | course | role | 17 | teacher1 | C1 | editingteacher | 18 19 @javascript 20 Scenario: Self-enrolment enabled 21 Given I log in as "teacher1" 22 And I follow "Course 1" 23 When I add "Self enrolment" enrolment method with: 24 | Custom instance name | Test student enrolment | 25 And I log out 26 And I log in as "student1" 27 And I follow "Course 1" 28 And I press "Enrol me" 29 Then I should see "Topic 1" 30 And I should not see "Enrolment options" 31 32 @javascript 33 Scenario: Self-enrolment enabled requiring an enrolment key 34 Given I log in as "teacher1" 35 And I follow "Course 1" 36 When I add "Self enrolment" enrolment method with: 37 | Custom instance name | Test student enrolment | 38 | Enrolment key | moodle_rules | 39 And I log out 40 And I log in as "student1" 41 And I follow "Course 1" 42 And I set the following fields to these values: 43 | Enrolment key | moodle_rules | 44 And I press "Enrol me" 45 Then I should see "Topic 1" 46 And I should not see "Enrolment options" 47 And I should not see "Enrol me in this course" 48 49 @javascript 50 Scenario: Self-enrolment disabled 51 Given I log in as "student1" 52 When I follow "Course 1" 53 Then I should see "You can not enrol yourself in this course" 54 55 @javascript 56 Scenario: Self-enrolment enabled requiring a group enrolment key 57 Given I log in as "teacher1" 58 And I follow "Course 1" 59 When I add "Self enrolment" enrolment method with: 60 | Custom instance name | Test student enrolment | 61 | Enrolment key | moodle_rules | 62 | Use group enrolment keys | Yes | 63 And I follow "Groups" 64 And I press "Create group" 65 And I set the following fields to these values: 66 | Group name | Group 1 | 67 | Enrolment key | Test-groupenrolkey1 | 68 And I press "Save changes" 69 And I log out 70 And I log in as "student1" 71 And I follow "Course 1" 72 And I set the following fields to these values: 73 | Enrolment key | Test-groupenrolkey1 | 74 And I press "Enrol me" 75 Then I should see "Topic 1" 76 And I should not see "Enrolment options" 77 And I should not see "Enrol me in this course"
title
Description
Body
title
Description
Body
title
Description
Body
title
Body
Generated: Fri Nov 28 20:29:05 2014 | Cross-referenced by PHPXref 0.7.1 |