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 and a single question drawn from a branch
3
  In order to create a lesson with a cluster and a subcluster
4
  As a teacher
5
  I need to add content pages and questions with cluster, branchtable and end of branchtable  and end of cluster 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 subcluster | C1     | lesson1  |
22
    And I log in as "teacher1"
23
 
24
  Scenario: Lesson with subcluster
25
    Given the following "mod_lesson > pages" exist:
26
      | lesson                 | qtype        | title            | content                                                     |
27
      | Lesson with subcluster | content      | First page name  | First page contents                                         |
28
      | Lesson with subcluster | cluster      | Cluster          | Cluster                                                     |
29
      | Lesson with subcluster | multichoice  | Question 1       | Question from cluster                                       |
30
      | Lesson with subcluster | multichoice  | Question 2       | Question from cluster                                       |
31
      | Lesson with subcluster | content      | Second page name | Beginning of the subcluster, should not be seen by students |
32
      | Lesson with subcluster | multichoice  | Question 3       | Question from cluster                                       |
33
      | Lesson with subcluster | multichoice  | Question 4       | Question from cluster                                       |
34
      | Lesson with subcluster | multichoice  | Question 5       | Question from cluster                                       |
35
      | Lesson with subcluster | endofbranch  | End of branch    | End of branch                                               |
36
      | Lesson with subcluster | multichoice  | Question 6       | Question from cluster                                       |
37
      | Lesson with subcluster | endofcluster | End of cluster   | End of cluster                                              |
38
      | Lesson with subcluster | content      | Third page name  | Content page after 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
      | Cluster          |                  |          | Unseen question within a cluster | 0     |
43
      | Question 1       | Correct answer   | Good     | Cluster                          | 1     |
44
      | Question 1       | Incorrect answer | Bad      | This page                        | 0     |
45
      | Question 2       | Correct answer   | Good     | Cluster                          | 1     |
46
      | Question 2       | Incorrect answer | Bad      | This page                        | 0     |
47
      | Second page name | Next page        |          | Next page                        | 0     |
48
      | Question 3       | Correct answer   | Good     | Cluster                          | 1     |
49
      | Question 3       | Incorrect answer | Bad      | This page                        | 0     |
50
      | Question 4       | Correct answer   | Good     | Cluster                          | 1     |
51
      | Question 4       | Incorrect answer | Bad      | This page                        | 0     |
52
      | Question 5       | Correct answer   | Good     | Cluster                          | 1     |
53
      | Question 5       | Incorrect answer | Bad      | This page                        | 0     |
54
      | End of branch    |                  |          | Second page name                 | 0     |
55
      | Question 6       | Correct answer   | Good     | Cluster                          | 1     |
56
      | Question 6       | Incorrect answer | Bad      | This page                        | 0     |
57
      | End of cluster   |                  |          | Next page                        | 0     |
58
      | Third page name  | Next page        |          | Next page                        | 0     |
59
    When I am on the "Lesson with subcluster" "lesson activity" page logged in as student1
60
    Then I should see "First page contents"
61
    And I press "Next page"
62
    And I should see "Question from cluster"
63
    And I set the following fields to these values:
64
      | Correct answer | 1 |
65
    And I press "Submit"
66
    And I should see "Good"
67
    And I press "Continue"
68
    And I should see "Question from cluster"
69
    And I set the following fields to these values:
70
      | Correct answer | 1 |
71
    And I press "Submit"
72
    And I should see "Good"
73
    And I press "Continue"
74
    And I should see "Question from cluster"
75
    And I set the following fields to these values:
76
      | Correct answer | 1 |
77
    And I press "Submit"
78
    And I should see "Good"
79
    And I press "Continue"
80
    And I should see "Question from cluster"
81
    And I set the following fields to these values:
82
      | Correct answer | 1 |
83
    And I press "Submit"
84
    And I should see "Good"
85
    And I press "Continue"
86
    And I should see "Content page after cluster"
87
    And I press "Next page"
88
    And I should see "Congratulations - end of lesson reached"
89
    And I should see "Your score is 4 (out of 4)."