[ Index ] |
PHP Cross Reference of moodle-2.8 |
[Summary view] [Print] [Text view]
1 @core @core_question 2 Feature: A teacher can put questions in categories in the question bank 3 In order to organize their questions 4 As a teacher 5 I need to put questions in categories 6 7 Background: 8 Given the following "users" exist: 9 | username | firstname | lastname | email | 10 | teacher1 | Teacher | 1 | [email protected] | 11 And the following "courses" exist: 12 | fullname | shortname | format | 13 | Course 1 | C1 | weeks | 14 And the following "course enrolments" exist: 15 | user | course | role | 16 | teacher1 | C1 | editingteacher | 17 And I log in as "teacher1" 18 And I follow "Course 1" 19 # Add 2 test categories. 20 And I follow "Question bank" 21 And I follow "Categories" 22 And I set the following fields to these values: 23 | Name | New Category 1 | 24 | Parent category | Top | 25 And I press "id_submitbutton" 26 And I set the following fields to these values: 27 | Name | New Category 2 | 28 | Parent category | Top | 29 And I press "id_submitbutton" 30 # Add test question. 31 And I add a "Essay" question filling the form with: 32 | Question name | my test question | 33 | Question text | my test question | 34 | Category | New Category 1 | 35 36 @javascript 37 Scenario: Move a question between categories via the question page 38 When I set the field "Select a category" to "New Category 1 (1)" 39 And I click on "my test question" "checkbox" in the "my test question" "table_row" 40 And I set the field "Question category" to "New Category 2" 41 And I press "Move to >>" 42 Then I should see "my test question" 43 And the "Select a category" select box should contain "New Category 2 (1)" 44 And the "Select a category" select box should contain "New Category 1" 45 And the "Select a category" select box should not contain "New Category 1 (1)" 46 47 @javascript 48 Scenario: Move a question between categories via the question settings page 49 When I click on "Edit" "link" in the "my test question" "table_row" 50 And I click on "Use this category" "checkbox" 51 And I set the field "Save in category" to "New Category 2" 52 And I press "id_submitbutton" 53 Then I should see "my test question" 54 And the "Select a category" select box should contain "New Category 2 (1)" 55 And the "Select a category" select box should not contain "New Category 1 (1)" 56 57 @javascript 58 Scenario: Delete a question category 59 When I follow "Categories" 60 And I click on "Delete" "link" in the "//a[text()='New Category 1']/parent::b/parent::li" "xpath_element" 61 Then I should see "The category 'New Category 1' contains 1 questions" 62 And I press "Save in category" 63 And I should not see "New Category 1"
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 |