[ Index ] |
PHP Cross Reference of moodle-2.8 |
[Summary view] [Print] [Text view]
1 @core @core_cohort 2 Feature: View cohort list 3 In order to operate with cohorts 4 As an admin or manager 5 I need to be able to view the list of cohorts in the system 6 7 Background: 8 Given the following "categories" exist: 9 | name | category | idnumber | 10 | Cat 1 | 0 | CAT1 | 11 | Cat 2 | 0 | CAT2 | 12 | Cat 3 | CAT1 | CAT3 | 13 And the following "cohorts" exist: 14 | name | idnumber | 15 | System cohort | CH0 | 16 And the following "cohorts" exist: 17 | name | idnumber | contextlevel | reference | 18 | Cohort in category 1 | CH1 | Category | CAT1 | 19 | Cohort in category 2 | CH2 | Category | CAT2 | 20 | Cohort in category 3 | CH3 | Category | CAT3 | 21 Given the following "users" exist: 22 | username | firstname | lastname | email | 23 | user1 | First | User | [email protected] | 24 | user2 | Second | User | [email protected] | 25 And the following "role assigns" exist: 26 | user | role | contextlevel | reference | 27 | user1 | manager | System | | 28 | user2 | manager | Category | CAT1 | 29 30 @javascript 31 Scenario: Admin can see system cohorts and all cohorts 32 When I log in as "admin" 33 And I navigate to "Cohorts" node in "Site administration > Users > Accounts" 34 Then I should see "System cohort" 35 And I should not see "Cohort in category" 36 And I follow "All cohorts" 37 And I should see "System cohort" 38 And I should see "Cohort in category 1" 39 And I should see "Cohort in category 2" 40 And I should see "Cohort in category 3" 41 And I log out 42 43 @javascript 44 Scenario: Manager can see system cohorts and all cohorts 45 When I log in as "user1" 46 And I navigate to "Cohorts" node in "Site administration > Users > Accounts" 47 Then I should see "System cohort" 48 And I should not see "Cohort in category" 49 And I follow "All cohorts" 50 And I should see "System cohort" 51 And I should see "Cohort in category 1" 52 And I should see "Cohort in category 2" 53 And I should see "Cohort in category 3" 54 And I log out 55 56 @javascript 57 Scenario: Manager in category can see cohorts in the category 58 When I log in as "user2" 59 And I follow "Courses" 60 And I follow "Cat 1" 61 And I follow "Cohorts" 62 And I should not see "All cohorts" 63 And I should not see "System cohort" 64 And I should see "Cohort in category 1" 65 And I should not see "Cohort in category 2" 66 And I should not see "Cohort in category 3" 67 And I log out
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 |