[ Index ] |
PHP Cross Reference of Unnamed Project |
[Summary view] [Print] [Text view]
1 @mod @mod_lesson 2 Feature: In a lesson activity, teacher can edit a cluster page 3 In order to modify an existing lesson and change navigation 4 As a teacher 5 I need to edit cluster pages in the lesson 6 7 Background: 8 Given the following "users" exist: 9 | username | firstname | lastname | email | 10 | teacher1 | Teacher | 1 | teacher1@example.com | 11 | student1 | Student | 1 | student1@example.com | 12 And the following "courses" exist: 13 | fullname | shortname | category | 14 | Course 1 | C1 | 0 | 15 And the following "course enrolments" exist: 16 | user | course | role | 17 | teacher1 | C1 | editingteacher | 18 | student1 | C1 | student | 19 And I log in as "teacher1" 20 And I follow "Course 1" 21 And I turn editing mode on 22 And I add a "Lesson" to section "1" and I fill the form with: 23 | Name | Lesson with cluster | 24 | Description | Test lesson description | 25 And I follow "Lesson with cluster" 26 And I follow "Add a content page" 27 And I set the following fields to these values: 28 | Page title | First page name | 29 | Page contents | First page contents | 30 | id_answer_editor_0 | Next page | 31 | id_jumpto_0 | Next page | 32 And I press "Save page" 33 And I follow "Expanded" 34 And I click on "Add a cluster" "link" in the "//div[contains(concat(' ', normalize-space(@class), ' '), ' addlinks ')][2]" "xpath_element" 35 And I click on "Add a question page here" "link" in the "//div[contains(concat(' ', normalize-space(@class), ' '), ' addlinks ')][3]" "xpath_element" 36 And I set the field "Select a question type" to "Multichoice" 37 And I press "Add a question page" 38 And I set the following fields to these values: 39 | Page title | question 1 | 40 | Page contents | Question from cluster | 41 | id_answer_editor_0 | Correct answer | 42 | id_response_editor_0 | Good | 43 | id_jumpto_0 | Cluster | 44 | id_score_0 | 1 | 45 | id_answer_editor_1 | Incorrect answer | 46 | id_response_editor_1 | Bad | 47 | id_jumpto_1 | This page | 48 | id_score_1 | 0 | 49 And I press "Save page" 50 And I click on "Add a question page here" "link" in the "//div[contains(concat(' ', normalize-space(@class), ' '), ' addlinks ')][4]" "xpath_element" 51 And I set the field "Select a question type" to "Multichoice" 52 And I press "Add a question page" 53 And I set the following fields to these values: 54 | Page title | question 2 | 55 | Page contents | Question from cluster | 56 | id_answer_editor_0 | Correct answer | 57 | id_response_editor_0 | Good | 58 | id_jumpto_0 | Cluster | 59 | id_score_0 | 1 | 60 | id_answer_editor_1 | Incorrect answer | 61 | id_response_editor_1 | Bad | 62 | id_jumpto_1 | This page | 63 | id_score_1 | 0 | 64 And I press "Save page" 65 And I click on "Add an end of cluster" "link" in the "//div[contains(concat(' ', normalize-space(@class), ' '), ' addlinks ')][5]" "xpath_element" 66 And I click on "Add a content page" "link" in the "//div[contains(concat(' ', normalize-space(@class), ' '), ' addlinks ')][6]" "xpath_element" 67 And I set the following fields to these values: 68 | Page title | Second page name | 69 | Page contents | Content page after cluster | 70 | id_answer_editor_0 | Next page | 71 | id_jumpto_0 | Next page | 72 And I press "Save page" 73 74 Scenario: Edit lesson cluster page 75 Given I click on "//th[normalize-space(.)='Cluster']/descendant::a[2]" "xpath_element" 76 When I set the following fields to these values: 77 | Page title | Modified name | 78 | Page contents | Modified contents | 79 And I press "Save page" 80 Then I should see "Modified name" 81 And I click on "//th[normalize-space(.)='Modified name']/descendant::a[2]" "xpath_element" 82 And I should see "Unseen question within a cluster" 83 And I press "Cancel" 84 And I click on "//th[normalize-space(.)='End of cluster']/descendant::a[2]" "xpath_element" 85 And I set the following fields to these values: 86 | Page title | Modified end | 87 | Page contents | Modified end contents | 88 | id_jumpto_0 | Second page name | 89 And I press "Save page" 90 And I should see "Modified end" 91 And I log out 92 And I log in as "student1" 93 And I follow "Course 1" 94 And I follow "Lesson with cluster" 95 And I should see "First page contents" 96 And I press "Next page" 97 And I should see "Question from cluster" 98 And I set the following fields to these values: 99 | Correct answer | 1 | 100 And I press "Submit" 101 And I should see "Good" 102 And I press "Continue" 103 And I should see "Question from cluster" 104 And I set the following fields to these values: 105 | Correct answer | 1 | 106 And I press "Submit" 107 And I should see "Good" 108 And I press "Continue" 109 And I should see "Content page after cluster" 110 And I press "Next page" 111 And I should see "Congratulations - end of lesson reached" 112 And I should see "Your score is 2 (out of 2)."
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 |