[ Index ] |
PHP Cross Reference of Unnamed Project |
[Summary view] [Print] [Text view]
1 @mod @mod_lesson 2 Feature: link to gradebook on the end of lesson page 3 In order to allow students to see their lesson grades 4 As a teacher 5 I need to provide a link to gradebook on the end of lesson page 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 | Test lesson | 24 | Description | Test lesson description | 25 And I follow "Test lesson" 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 select "Add a content page" from the "qtype" singleselect 34 And I set the following fields to these values: 35 | Page title | Second page name | 36 | Page contents | Second page contents | 37 | id_answer_editor_0 | Previous page | 38 | id_jumpto_0 | Previous page | 39 | id_answer_editor_1 | Next page | 40 | id_jumpto_1 | Next page | 41 And I press "Save page" 42 43 Scenario: Link to gradebook for non practice lesson 44 Given I log out 45 When I log in as "student1" 46 And I follow "Course 1" 47 And I follow "Test lesson" 48 And I press "Next page" 49 And I press "Next page" 50 Then I should see "Congratulations - end of lesson reached" 51 And I should see "View grades" 52 And I follow "View grades" 53 And I should see "User report - Student 1" 54 And I should see "Test lesson" 55 56 Scenario: No link to gradebook for non graded lesson 57 Given I follow "Test lesson" 58 And I navigate to "Edit settings" node in "Lesson administration" 59 And I set the following fields to these values: 60 | Type | None | 61 And I press "Save and display" 62 And I log out 63 When I log in as "student1" 64 And I follow "Course 1" 65 And I follow "Test lesson" 66 And I press "Next page" 67 And I press "Next page" 68 Then I should see "Congratulations - end of lesson reached" 69 And I should not see "View grades" 70 71 Scenario: No link to gradebook for practice lesson 72 Given I follow "Test lesson" 73 And I navigate to "Edit settings" node in "Lesson administration" 74 And I set the following fields to these values: 75 | Practice lesson | Yes | 76 And I press "Save and display" 77 And I log out 78 When I log in as "student1" 79 And I follow "Course 1" 80 And I follow "Test lesson" 81 And I press "Next page" 82 And I press "Next page" 83 Then I should see "Congratulations - end of lesson reached" 84 And I should not see "View grades" 85 86 Scenario: No link if Show gradebook to student disabled 87 Given I follow "Course 1" 88 And I click on "Edit settings" "link" in the "Administration" "block" 89 And I set the following fields to these values: 90 | Show gradebook to students | No | 91 And I press "Save and display" 92 And I log out 93 When I log in as "student1" 94 And I follow "Course 1" 95 And I follow "Test lesson" 96 And I press "Next page" 97 And I press "Next page" 98 Then I should see "Congratulations - end of lesson reached" 99 And I should not see "View grades" 100 101 Scenario: No link to gradebook if no gradereport/user:view capability 102 Given I log out 103 And I log in as "admin" 104 And I set the following system permissions of "Student" role: 105 | capability | permission | 106 | gradereport/user:view | Prevent | 107 And I log out 108 When I log in as "student1" 109 And I follow "Course 1" 110 And I follow "Test lesson" 111 And I press "Next page" 112 And I press "Next page" 113 Then I should see "Congratulations - end of lesson reached" 114 And I should not see "View grades"
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 |