1 |
efrain |
1 |
@mod @mod_lesson
|
|
|
2 |
Feature: In a lesson activity, students can exit and re-enter the activity when it consists only of cluster pages
|
|
|
3 |
As a student
|
|
|
4 |
I need to exit and re-enter a lesson out and into clusters.
|
|
|
5 |
|
|
|
6 |
Background:
|
|
|
7 |
Given the following "users" exist:
|
|
|
8 |
| username | firstname | lastname | email |
|
|
|
9 |
| teacher1 | Teacher | 1 | teacher1@example.com |
|
|
|
10 |
| student1 | Student | 1 | student1@example.com |
|
|
|
11 |
And the following "courses" exist:
|
|
|
12 |
| fullname | shortname | category |
|
|
|
13 |
| Course 1 | C1 | 0 |
|
|
|
14 |
And the following "course enrolments" exist:
|
|
|
15 |
| user | course | role |
|
|
|
16 |
| teacher1 | C1 | editingteacher |
|
|
|
17 |
| student1 | C1 | student |
|
|
|
18 |
And the following "activities" exist:
|
|
|
19 |
| activity | name | course | idnumber |
|
|
|
20 |
| lesson | Lesson with cluster | C1 | lesson1 |
|
|
|
21 |
And the following "mod_lesson > pages" exist:
|
|
|
22 |
| lesson | qtype | title | content |
|
|
|
23 |
| Lesson with cluster | content | First page name | First page contents |
|
|
|
24 |
| Lesson with cluster | cluster | A Cluster | A Cluster |
|
|
|
25 |
| Lesson with cluster | multichoice | Question 1 A Cluster | Question 1 from A cluster |
|
|
|
26 |
| Lesson with cluster | multichoice | Question 2 A Cluster | Question 2 from A cluster |
|
|
|
27 |
| Lesson with cluster | multichoice | Question 3 A Cluster | Question 3 from A cluster |
|
|
|
28 |
| Lesson with cluster | endofcluster | End of A cluster | End of A cluster |
|
|
|
29 |
| Lesson with cluster | cluster | B Cluster | B Cluster |
|
|
|
30 |
| Lesson with cluster | multichoice | Question 1 B Cluster | Question 1 from B cluster |
|
|
|
31 |
| Lesson with cluster | multichoice | Question 2 B Cluster | Question 2 from B cluster |
|
|
|
32 |
| Lesson with cluster | multichoice | Question 3 B Cluster | Question 3 from B cluster |
|
|
|
33 |
| Lesson with cluster | endofcluster | End of B cluster | End of B cluster |
|
|
|
34 |
| Lesson with cluster | cluster | C Cluster | C Cluster |
|
|
|
35 |
| Lesson with cluster | multichoice | Question 1 C Cluster | Question 1 from C cluster |
|
|
|
36 |
| Lesson with cluster | multichoice | Question 2 C Cluster | Question 2 from C cluster |
|
|
|
37 |
| Lesson with cluster | multichoice | Question 3 C Cluster | Question 3 from C cluster |
|
|
|
38 |
| Lesson with cluster | endofcluster | End of C cluster | End of C cluster |
|
|
|
39 |
And the following "mod_lesson > answers" exist:
|
|
|
40 |
| page | answer | response | jumpto | score |
|
|
|
41 |
| First page name | Next page | | Next page | 0 |
|
|
|
42 |
| A Cluster | | | Unseen question within a cluster | 0 |
|
|
|
43 |
| Question 1 A Cluster | Correct answer | Good | B Cluster | 1 |
|
|
|
44 |
| Question 1 A Cluster | Incorrect answer | Bad | Unseen question within a cluster | 0 |
|
|
|
45 |
| Question 2 A Cluster | Correct answer | Good | B Cluster | 1 |
|
|
|
46 |
| Question 2 A Cluster | Incorrect answer | Bad | Unseen question within a cluster | 0 |
|
|
|
47 |
| Question 3 A Cluster | Correct answer | Good | B Cluster | 1 |
|
|
|
48 |
| Question 3 A Cluster | Incorrect answer | Bad | Unseen question within a cluster | 0 |
|
|
|
49 |
| End of A cluster | | | Next page | 0 |
|
|
|
50 |
| B Cluster | | | Unseen question within a cluster | 0 |
|
|
|
51 |
| Question 1 B Cluster | Correct answer | Good | C Cluster | 1 |
|
|
|
52 |
| Question 1 B Cluster | Incorrect answer | Bad | Unseen question within a cluster | 0 |
|
|
|
53 |
| Question 2 B Cluster | Correct answer | Good | C Cluster | 1 |
|
|
|
54 |
| Question 2 B Cluster | Incorrect answer | Bad | Unseen question within a cluster | 0 |
|
|
|
55 |
| Question 3 B Cluster | Correct answer | Good | C Cluster | 1 |
|
|
|
56 |
| Question 3 B Cluster | Incorrect answer | Bad | Unseen question within a cluster | 0 |
|
|
|
57 |
| End of B cluster | | | Next page | 0 |
|
|
|
58 |
| C Cluster | | | Unseen question within a cluster | 0 |
|
|
|
59 |
| Question 1 C Cluster | Correct answer | Good | End of lesson | 1 |
|
|
|
60 |
| Question 1 C Cluster | Incorrect answer | Bad | Unseen question within a cluster | 0 |
|
|
|
61 |
| Question 2 C Cluster | Correct answer | Good | End of lesson | 1 |
|
|
|
62 |
| Question 2 C Cluster | Incorrect answer | Bad | Unseen question within a cluster | 0 |
|
|
|
63 |
| Question 3 C Cluster | Correct answer | Good | End of lesson | 1 |
|
|
|
64 |
| Question 3 C Cluster | Incorrect answer | Bad | Unseen question within a cluster | 0 |
|
|
|
65 |
| End of C cluster | | | Next page | 0 |
|
|
|
66 |
|
|
|
67 |
Scenario: Accessing as student to a cluster only lesson
|
|
|
68 |
Given I am on the "Lesson with cluster" "lesson activity" page logged in as student1
|
|
|
69 |
And I should see "First page contents"
|
|
|
70 |
And I press "Next page"
|
|
|
71 |
And I should see "Correct answer"
|
|
|
72 |
And I set the following fields to these values:
|
|
|
73 |
| Incorrect answer | 1 |
|
|
|
74 |
And I press "Submit"
|
|
|
75 |
And I should see "Bad"
|
|
|
76 |
And I press "Continue"
|
|
|
77 |
And I set the following fields to these values:
|
|
|
78 |
| Incorrect answer | 1 |
|
|
|
79 |
And I press "Submit"
|
|
|
80 |
And I should see "Bad"
|
|
|
81 |
And I press "Continue"
|
|
|
82 |
And I set the following fields to these values:
|
|
|
83 |
| Correct answer | 1 |
|
|
|
84 |
And I press "Submit"
|
|
|
85 |
And I should see "Good"
|
|
|
86 |
And I press "Continue"
|
|
|
87 |
And I should see "Incorrect answer"
|
|
|
88 |
And I set the following fields to these values:
|
|
|
89 |
| Incorrect answer | 1 |
|
|
|
90 |
And I press "Submit"
|
|
|
91 |
And I am on "Course 1" course homepage
|
|
|
92 |
And I follow "Lesson with cluster"
|
|
|
93 |
And I should see "Do you want to start at the last page you saw?"
|
|
|
94 |
And I click on "No" "link" in the "#page-content" "css_element"
|
|
|
95 |
And I should see "First page contents"
|
|
|
96 |
And I press "Next page"
|
|
|
97 |
And I should see "Correct answer"
|
|
|
98 |
And I set the following fields to these values:
|
|
|
99 |
| Correct answer | 1 |
|
|
|
100 |
And I press "Submit"
|
|
|
101 |
And I should see "Good"
|
|
|
102 |
And I press "Continue"
|
|
|
103 |
Then I should see "Correct answer"
|