1 |
efrain |
1 |
@mod @mod_lesson
|
|
|
2 |
Feature: Practice mode in a lesson activity
|
|
|
3 |
In order to improve my students understanding of a subject
|
|
|
4 |
As a teacher
|
|
|
5 |
I need to be able to set ungraded practice lesson activites
|
|
|
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 the following "activity" exists:
|
|
|
20 |
| activity | lesson |
|
|
|
21 |
| course | C1 |
|
|
|
22 |
| idnumber | 0001 |
|
|
|
23 |
| name | Test lesson name |
|
|
|
24 |
And the following "mod_lesson > page" exist:
|
|
|
25 |
| lesson | qtype | title | content |
|
|
|
26 |
| Test lesson name | truefalse | True or False | Paper is made from trees. |
|
|
|
27 |
And the following "mod_lesson > answers" exist:
|
|
|
28 |
| page | answer | jumpto | score |
|
|
|
29 |
| True or False | True | Next page | 1 |
|
|
|
30 |
| True or False | False | This page | 0 |
|
|
|
31 |
And I am on the "Test lesson name" "lesson activity editing" page logged in as teacher1
|
|
|
32 |
|
|
|
33 |
Scenario: Non-practice lesson records grades in the gradebook
|
|
|
34 |
Given I set the following fields to these values:
|
|
|
35 |
| Name | Non-practice lesson |
|
|
|
36 |
| Description | This lesson will affect your course grade |
|
|
|
37 |
| Practice lesson | No |
|
|
|
38 |
And I press "Save and display"
|
|
|
39 |
When I am on the "Non-practice lesson" "lesson activity" page logged in as student1
|
|
|
40 |
And I set the following fields to these values:
|
|
|
41 |
| True | 1 |
|
|
|
42 |
And I press "Submit"
|
|
|
43 |
Then I should see "View grades"
|
|
|
44 |
And I follow "Grades" in the user menu
|
|
|
45 |
And I am on "Course 1" course homepage
|
|
|
46 |
And I should see "Non-practice lesson"
|
|
|
47 |
|
|
|
48 |
Scenario: Practice lesson doesn't record grades in the gradebook
|
|
|
49 |
Given I set the following fields to these values:
|
|
|
50 |
| Name | Practice lesson |
|
|
|
51 |
| Description | This lesson will NOT affect your course grade |
|
|
|
52 |
| Practice lesson | Yes |
|
|
|
53 |
And I press "Save and display"
|
|
|
54 |
When I am on the "Practice lesson" "lesson activity" page logged in as student1
|
|
|
55 |
And I set the following fields to these values:
|
|
|
56 |
| True | 1 |
|
|
|
57 |
And I press "Submit"
|
|
|
58 |
Then I should not see "View grades"
|
|
|
59 |
And I follow "Grades" in the user menu
|
|
|
60 |
And I click on "Course 1" "link" in the "Course 1" "table_row"
|
|
|
61 |
And I should not see "Practice lesson"
|
|
|
62 |
|
|
|
63 |
Scenario: Practice lesson with scale doesn't record grades in the gradebook
|
|
|
64 |
Given I set the following fields to these values:
|
|
|
65 |
| Name | Practice lesson with scale |
|
|
|
66 |
| Description | This lesson will NOT affect your course grade |
|
|
|
67 |
| Practice lesson | Yes |
|
|
|
68 |
| Type | Scale |
|
|
|
69 |
And I press "Save and display"
|
|
|
70 |
When I am on the "Practice lesson with scale" "lesson activity" page logged in as student1
|
|
|
71 |
And I set the following fields to these values:
|
|
|
72 |
| True | 1 |
|
|
|
73 |
And I press "Submit"
|
|
|
74 |
Then I should not see "View grades"
|
|
|
75 |
And I follow "Grades" in the user menu
|
|
|
76 |
And I click on "Course 1" "link" in the "Course 1" "table_row"
|
|
|
77 |
And I should not see "Practice lesson with scale"
|