Proyectos de Subversion Moodle

Rev

| Ultima modificación | Ver Log |

Rev Autor Línea Nro. Línea
1 efrain 1
@mod @mod_lesson @javascript
2
Feature: Set end of lesson reached as a completion condition for a lesson
3
  In order to ensure students really see all lesson pages
4
  As a teacher
5
  I need to set end of lesson reached to mark the lesson activity as completed
6
 
7
  Scenario: Set end reached as a condition
8
    Given the following "users" exist:
9
      | username | firstname | lastname | email |
10
      | student1 | Student | 1 | student1@example.com |
11
      | teacher1 | Teacher | 1 | teacher1@example.com |
12
    And the following "courses" exist:
13
      | fullname | shortname | category | enablecompletion |
14
      | Course 1 | C1        | 0        | 1                |
15
    And the following "course enrolments" exist:
16
      | user | course | role |
17
      | teacher1 | C1 | editingteacher |
18
      | student1 | C1 | student |
19
    And the following "activity" exist:
20
      | activity | name        | course | idnumber | completion | completionview | completionendreached |
21
      | lesson   | Test lesson | C1     | 0001     | 2          | 0              | 1                    |
22
    And the following "mod_lesson > pages" exist:
23
      | lesson      | qtype   | title            | content              |
24
      | Test lesson | content | First page name  | First page contents  |
25
      | Test lesson | content | Second page name | Second page contents |
26
    And the following "mod_lesson > answers" exist:
27
      | page             | answer        | jumpto        |
28
      | First page name  | Next page     | Next page     |
29
      | Second page name | Previous page | Previous page |
30
      | Second page name | Next page     | Next page     |
31
    When I am on the "Course 1" course page logged in as student1
32
    Then the "Go through the activity to the end" completion condition of "Test lesson" is displayed as "todo"
33
    And I follow "Test lesson"
34
    And I press "Next page"
35
    And I am on "Course 1" course homepage
36
    And the "Go through the activity to the end" completion condition of "Test lesson" is displayed as "todo"
37
    And I am on the "Test lesson" "lesson activity" page
38
    And I should see "You have seen more than one page of this lesson already."
39
    And I should see "Do you want to start at the last page you saw?"
40
    And I click on "No" "link" in the "#page-content" "css_element"
41
    And I press "Next page"
42
    And I press "Next page"
43
    And I am on "Course 1" course homepage
44
    And the "Go through the activity to the end" completion condition of "Test lesson" is displayed as "done"
45
    And I am on the "Course 1" course page logged in as teacher1
46
    And "Student 1" user has completed "Test lesson" activity