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 their progress viewing a progress bar.
3
  In order to create a lesson with conditional paths
4
  As a teacher
5
  I need to add pages and questions with links between them
6
 
7
  Scenario: Student navigation with progress bar
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     | Test lesson name | C1     | lesson1   |
22
    And the following "mod_lesson > pages" exist:
23
      | lesson           | qtype   | title                 | content              |
24
      | Test lesson name | content | First page name       | First page contents  |
25
      | Test lesson name | content | Second page name      | Second page contents |
26
      | Test lesson name | numeric | Hardest question ever | 1 + 1?               |
27
    And the following "mod_lesson > answers" exist:
28
      | page                  | answer        | response         | jumpto          | score |
29
      | First page name       | Next page     |                  | Next page       | 0     |
30
      | Second page name      | Previous page |                  | Previous page   | 0     |
31
      | Second page name      | Next page     |                  | Next page       | 0     |
32
      | Hardest question ever | 2             | Correct answer   | End of lesson   | 1     |
33
      | Hardest question ever | 1             | Incorrect answer | First page name | 0     |
34
    And I am on the "Test lesson name" "lesson activity editing" page logged in as teacher1
35
    And I set the following fields to these values:
36
      | Progress bar | Yes |
37
    And I press "Save and display"
38
    When I am on the "Test lesson name" "lesson activity" page logged in as student1
39
    Then I should see "First page contents"
40
    And I should see "You have completed 0% of the lesson"
41
    And I press "Next page"
42
    And I should see "Second page contents"
43
    And I should see "You have completed 33% of the lesson"
44
    And I press "Previous page"
45
    And I should see "First page contents"
46
    And I should see "You have completed 67% of the lesson"
47
    And I press "Next page"
48
    And I should see "Second page contents"
49
    And I should see "You have completed 67% of the lesson"
50
    And I press "Next page"
51
    And I should see "1 + 1?"
52
    And I should see "You have completed 67% of the lesson"
53
    And I set the following fields to these values:
54
      | Your answer | 2 |
55
    And I press "Submit"
56
    And I should see "Correct answer"
57
    And I press "Continue"
58
    And I should see "Congratulations - end of lesson reached"
59
    And I should see "You have completed 100% of the lesson"