Proyectos de Subversion Moodle

Rev

| Ultima modificación | Ver Log |

Rev Autor Línea Nro. Línea
1 efrain 1
@mod @mod_lesson
2
Feature: In a lesson activity, students can see questions in random order
3
  In order to create a lesson with clusters
4
  As a teacher
5
  I need to add content pages and questions with clusters and end of clusters pages
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 "activities" exist:
20
      | activity | name                 | course | idnumber |
21
      | lesson   | Lesson with clusters | C1     | lesson1  |
22
    And I log in as "teacher1"
23
 
24
  Scenario: Lesson with two clusters
25
    Given the following "mod_lesson > pages" exist:
26
      | lesson               | qtype        | title            | content                      |
27
      | Lesson with clusters | content      | First page name  | First page contents          |
28
      | Lesson with clusters | content      | Second page name | Second page contents         |
29
      | Lesson with clusters | cluster      | Cluster 1        | Cluster 1                    |
30
      | Lesson with clusters | multichoice  | Question 1       | Question from cluster 1      |
31
      | Lesson with clusters | multichoice  | Question 2       | Question from cluster 1      |
32
      | Lesson with clusters | endofcluster | End of cluster 1 | End of cluster 1             |
33
      | Lesson with clusters | content      | Third page name  | Content page after cluster 1 |
34
      | Lesson with clusters | cluster      | Cluster 2        | Cluster 2                    |
35
      | Lesson with clusters | multichoice  | Question 3       | Question from cluster 2      |
36
      | Lesson with clusters | multichoice  | Question 4       | Question from cluster 2      |
37
      | Lesson with clusters | endofcluster | End of cluster 2 | End of cluster 2             |
38
      | Lesson with clusters | content      | Fourth page name | Content page after cluster 2 |
39
    And the following "mod_lesson > answers" exist:
40
      | page             | answer           | response | jumpto                           | score |
41
      | First page name  | Next page        |          | Next page                        | 0     |
42
      | Second page name | Previous page    |          | Previous page                    | 0     |
43
      | Second page name | Next page        |          | Next page                        | 0     |
44
      | Cluster 1        |                  |          | Unseen question within a cluster | 0     |
45
      | Question 1       | Correct answer   | Good     | Cluster 1                        | 1     |
46
      | Question 1       | Incorrect answer | Bad      | This page                        | 0     |
47
      | Question 2       | Correct answer   | Good     | Cluster 1                        | 1     |
48
      | Question 2       | Incorrect answer | Bad      | This page                        | 0     |
49
      | End of cluster 1 |                  |          | Next page                        | 0     |
50
      | Third page name  | Next page        |          | Next page                        | 0     |
51
      | Cluster 2        |                  |          | Unseen question within a cluster | 0     |
52
      | Question 3       | Correct answer   | Good     | Unseen question within a cluster | 1     |
53
      | Question 3       | Incorrect answer | Bad      | This page                        | 0     |
54
      | Question 4       | Correct answer   | Good     | Unseen question within a cluster | 1     |
55
      | Question 4       | Incorrect answer | Bad      | This page                        | 0     |
56
      | End of cluster 2 |                  |          | Next page                        | 0     |
57
      | Fourth page name | Next page        |          | Next page                        | 0     |
58
    When I am on the "Lesson with clusters" "lesson activity" page logged in as student1
59
    Then I should see "First page contents"
60
    And I press "Next page"
61
    And I should see "Second page contents"
62
    And I press "Next page"
63
    And I should see "Question from cluster 1"
64
    And I set the following fields to these values:
65
      | Correct answer | 1 |
66
    And I press "Submit"
67
    And I should see "Good"
68
    And I press "Continue"
69
    And I should see "Question from cluster 1"
70
    And I set the following fields to these values:
71
      | Correct answer | 1 |
72
    And I press "Submit"
73
    And I should see "Good"
74
    And I press "Continue"
75
    And I should see "Content page after cluster 1"
76
    And I press "Next page"
77
    And I should see "Question from cluster 2"
78
    And I set the following fields to these values:
79
      | Correct answer | 1 |
80
    And I press "Submit"
81
    And I should see "Good"
82
    And I press "Continue"
83
    And I should see "Question from cluster 2"
84
    And I set the following fields to these values:
85
      | Correct answer | 1 |
86
    And I press "Submit"
87
    And I should see "Good"
88
    And I press "Continue"
89
    And I should see "Content page after cluster 2"
90
    And I press "Next page"
91
    And I should see "Congratulations - end of lesson reached"
92
    And I should see "Your score is 4 (out of 4)."