[ Index ] |
PHP Cross Reference of Unnamed Project |
[Summary view] [Print] [Text view]
1 @mod @mod_lesson 2 Feature: Set end of lesson reached as a completion condition for a lesson 3 In order to ensure students really see all lesson pages 4 As a teacher 5 I need to set end of lesson reached to mark the lesson activity as completed 6 7 Scenario: Set end reached as a condition 8 Given the following "users" exist: 9 | username | firstname | lastname | email | 10 | student1 | Student | 1 | student1@example.com | 11 | teacher1 | Teacher | 1 | teacher1@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 click on "Edit settings" "link" in the "Administration" "block" 23 And I set the following fields to these values: 24 | Enable completion tracking | Yes | 25 And I press "Save and display" 26 And I add a "Lesson" to section "1" and I fill the form with: 27 | Name | Test lesson | 28 | Description | Test lesson description | 29 | Completion tracking | Show activity as complete when conditions are met | 30 | completionendreached | 1 | 31 And I follow "Test lesson" 32 And I follow "Add a content page" 33 And I set the following fields to these values: 34 | Page title | First page name | 35 | Page contents | First page contents | 36 | id_answer_editor_0 | Next page | 37 | id_jumpto_0 | Next page | 38 And I press "Save page" 39 And I select "Add a content page" from the "qtype" singleselect 40 And I set the following fields to these values: 41 | Page title | Second page name | 42 | Page contents | Second page contents | 43 | id_answer_editor_0 | Previous page | 44 | id_jumpto_0 | Previous page | 45 | id_answer_editor_1 | Next page | 46 | id_jumpto_1 | Next page | 47 And I press "Save page" 48 And I log out 49 When I log in as "student1" 50 And I follow "Course 1" 51 Then the "Test lesson" "lesson" activity with "auto" completion should be marked as not complete 52 And I follow "Test lesson" 53 And I press "Next page" 54 And I follow "Course 1" 55 Then the "Test lesson" "lesson" activity with "auto" completion should be marked as not complete 56 And I follow "Course 1" 57 And I follow "Test lesson" 58 And I should see "You have seen more than one page of this lesson already." 59 And I should see "Do you want to start at the last page you saw?" 60 And I follow "No" 61 And I press "Next page" 62 And I press "Next page" 63 And I follow "Course 1" 64 Then the "Test lesson" "lesson" activity with "auto" completion should be marked as complete 65 And I log out 66 And I log in as "teacher1" 67 And I follow "Course 1" 68 And "Student 1" user has completed "Test lesson" activity
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 |