[ Index ] |
PHP Cross Reference of Unnamed Project |
[Summary view] [Print] [Text view]
1 @mod @mod_lesson 2 Feature: In a lesson activity, students can see their progress viewing a progress bar. 3 In order to create a lesson with conditional paths 4 As a teacher 5 I need to add pages and questions with links between them 6 7 Scenario: Student navigation with progress bar 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 | Test lesson name | 24 | Description | Test lesson description | 25 | Progress bar | Yes | 26 And I follow "Test lesson name" 27 And I follow "Add a content page" 28 And I set the following fields to these values: 29 | Page title | First page name | 30 | Page contents | First page contents | 31 | id_answer_editor_0 | Next page | 32 | id_jumpto_0 | Next page | 33 And I press "Save page" 34 And I select "Add a content page" from the "qtype" singleselect 35 And I set the following fields to these values: 36 | Page title | Second page name | 37 | Page contents | Second page contents | 38 | id_answer_editor_0 | Previous page | 39 | id_jumpto_0 | Previous page | 40 | id_answer_editor_1 | Next page | 41 | id_jumpto_1 | Next page | 42 And I press "Save page" 43 And I follow "Expanded" 44 And I click on "Add a question page here" "link" in the "//div[contains(concat(' ', normalize-space(@class), ' '), ' addlinks ')][3]" "xpath_element" 45 And I set the field "Select a question type" to "Numerical" 46 And I press "Add a question page" 47 And I set the following fields to these values: 48 | Page title | Hardest question ever | 49 | Page contents | 1 + 1? | 50 | id_answer_editor_0 | 2 | 51 | id_response_editor_0 | Correct answer | 52 | id_jumpto_0 | End of lesson | 53 | id_score_0 | 1 | 54 | id_answer_editor_1 | 1 | 55 | id_response_editor_1 | Incorrect answer | 56 | id_jumpto_1 | Second page name | 57 | id_score_1 | 0 | 58 And I press "Save page" 59 And I log out 60 And I log in as "student1" 61 And I follow "Course 1" 62 When I follow "Test lesson name" 63 Then I should see "First page contents" 64 And I should see "You have completed 0% of the lesson" 65 And I press "Next page" 66 And I should see "Second page contents" 67 And I should see "You have completed 33% of the lesson" 68 And I press "Previous page" 69 And I should see "First page contents" 70 And I should see "You have completed 67% of the lesson" 71 And I press "Next page" 72 And I should see "Second page contents" 73 And I should see "You have completed 67% of the lesson" 74 And I press "Next page" 75 And I should see "1 + 1?" 76 And I should see "You have completed 67% of the lesson" 77 And I set the following fields to these values: 78 | Your answer | 2 | 79 And I press "Submit" 80 And I should see "Correct answer" 81 And I press "Continue" 82 And I should see "Congratulations - end of lesson reached" 83 And I should see "You have completed 100% of the lesson"
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 |