[ Index ] |
PHP Cross Reference of Unnamed Project |
[Summary view] [Print] [Text view]
1 @mod @mod_lesson 2 Feature: In Dashboard, teacher can see the number of student attempts to lessons 3 In order to know the number of student attempts to a lesson 4 As a teacher 5 I need to see it in Dashboard 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 | student2 | Student | 2 | student2@example.com | 13 And the following "courses" exist: 14 | fullname | shortname | category | 15 | Course 1 | C1 | 0 | 16 And the following "course enrolments" exist: 17 | user | course | role | 18 | teacher1 | C1 | editingteacher | 19 | student1 | C1 | student | 20 | student2 | C1 | student | 21 And I log in as "teacher1" 22 And I follow "Course 1" 23 And I turn editing mode on 24 25 Scenario: number of student attempts 26 Given I add a "Lesson" to section "1" 27 And I expand all fieldsets 28 And I set the following fields to these values: 29 | Name | Test lesson name | 30 | Description | Test lesson description | 31 | id_deadline_enabled | 1 | 32 | deadline[day] | 1 | 33 | deadline[month] | January | 34 | deadline[year] | 2030 | 35 | deadline[hour] | 08 | 36 | deadline[minute] | 00 | 37 | Re-takes allowed | Yes | 38 And I press "Save and return to course" 39 And I follow "Test lesson name" 40 And I follow "Add a question page" 41 And I set the field "Select a question type" to "True/false" 42 And I press "Add a question page" 43 And I set the following fields to these values: 44 | Page title | True/false question 1 | 45 | Page contents | Cat is an amphibian | 46 | id_answer_editor_0 | False | 47 | id_response_editor_0 | Correct | 48 | id_jumpto_0 | Next page | 49 | id_answer_editor_1 | True | 50 | id_response_editor_1 | Wrong | 51 | id_jumpto_1 | This page | 52 And I press "Save page" 53 And I select "Question" from the "qtype" singleselect 54 And I set the field "Select a question type" to "True/false" 55 And I press "Add a question page" 56 And I set the following fields to these values: 57 | Page title | True/false question 2 | 58 | Page contents | Paper is made from trees. | 59 | id_answer_editor_0 | True | 60 | id_response_editor_0 | Correct | 61 | id_jumpto_0 | Next page | 62 | id_answer_editor_1 | False | 63 | id_response_editor_1 | Wrong | 64 | id_jumpto_1 | This page | 65 And I press "Save page" 66 And I follow "Expanded" 67 And I click on "Add a question page here" "link" in the "//div[contains(concat(' ', normalize-space(@class), ' '), ' addlinks ')][3]" "xpath_element" 68 And I set the field "Select a question type" to "True/false" 69 And I press "Add a question page" 70 And I set the following fields to these values: 71 | Page title | True/false question 3 | 72 | Page contents | 1+1=2 | 73 | id_answer_editor_0 | True | 74 | id_response_editor_0 | Correct | 75 | id_jumpto_0 | Next page | 76 | id_answer_editor_1 | False | 77 | id_response_editor_1 | Wrong | 78 | id_jumpto_1 | This page | 79 And I press "Save page" 80 And I log out 81 And I log in as "student1" 82 And I follow "Course 1" 83 And I follow "Test lesson name" 84 And I should see "Cat is an amphibian" 85 And I set the following fields to these values: 86 | False | 1 | 87 And I press "Submit" 88 And I press "Continue" 89 And I should see "Paper is made from trees." 90 And I set the following fields to these values: 91 | False | 1 | 92 And I press "Submit" 93 And I press "Continue" 94 And I should see "1+1=2" 95 And I set the following fields to these values: 96 | False | 1 | 97 And I press "Submit" 98 And I press "Continue" 99 And I should see "Congratulations - end of lesson reached" 100 And I should see "Your score is 1 (out of 3)." 101 And I follow "Return to Course 1" 102 And I follow "Test lesson name" 103 And I should see "Cat is an amphibian" 104 And I set the following fields to these values: 105 | False | 1 | 106 And I press "Submit" 107 And I press "Continue" 108 And I should see "Paper is made from trees." 109 And I set the following fields to these values: 110 | True | 1 | 111 And I press "Submit" 112 And I press "Continue" 113 And I should see "1+1=2" 114 And I set the following fields to these values: 115 | True | 1 | 116 And I press "Submit" 117 And I press "Continue" 118 And I should see "Congratulations - end of lesson reached" 119 And I should see "Your score is 3 (out of 3)." 120 And I log out 121 And I log in as "student2" 122 And I follow "Course 1" 123 And I follow "Test lesson name" 124 And I should see "Cat is an amphibian" 125 And I set the following fields to these values: 126 | True | 1 | 127 And I press "Submit" 128 And I press "Continue" 129 And I should see "Paper is made from trees." 130 And I set the following fields to these values: 131 | True | 1 | 132 And I press "Submit" 133 And I press "Continue" 134 And I should see "1+1=2" 135 And I set the following fields to these values: 136 | True | 1 | 137 And I press "Submit" 138 And I press "Continue" 139 And I should see "Congratulations - end of lesson reached" 140 And I should see "Your score is 2 (out of 3)." 141 And I log out 142 And I log in as "teacher1" 143 When I click on "Dashboard" "link" in the "Navigation" "block" 144 Then I should see "You have lessons that are due" 145 And I should see "3 attempts"
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 |