Proyectos de Subversion Moodle

Rev

| Ultima modificación | Ver Log |

Rev Autor Línea Nro. Línea
1 efrain 1
@mod @mod_survey @core_completion @javascript
2
Feature: A teacher can use activity completion to track a student progress
3
  In order to use activity completion
4
  As a teacher
5
  I need to set survey activities and enable activity completion
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 | 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 I enable "survey" "mod" plugin
20
    And I log in as "teacher1"
21
 
22
  Scenario: Require survey view
23
    Given the following "activities" exist:
24
      | activity   | name                   | course | idnumber    | template | completion | completionview | completionsubmit |
25
      | survey     | Test survey name       | C1     | survey1     |  5       | 2          | 1              | 0                |
26
    And I am on the "Test survey name" "survey activity" page
27
    # Teacher view.
28
    And "Test survey name" should have the "View" completion condition
29
    # Student view.
30
    When I am on the "Course 1" course page logged in as student1
31
    And the "View" completion condition of "Test survey name" is displayed as "todo"
32
    And I follow "Test survey name"
33
    And I am on "Course 1" course homepage
34
    Then the "View" completion condition of "Test survey name" is displayed as "done"
35
 
36
  Scenario: Require survey submission
37
    Given the following "activities" exist:
38
      | activity   | name                   | course | idnumber    | template | completion | completionview | completionsubmit |
39
      | survey     | Test survey name       | C1     | survey1     | 5        | 2          | 1              | 1                |
40
    And I am on the "Test survey name" "survey activity" page
41
    # Teacher view.
42
    And "Test survey name" should have the "Submit answers" completion condition
43
    # Student view.
44
    When I am on the "Course 1" course page logged in as student1
45
    And the "Submit answers" completion condition of "Test survey name" is displayed as "todo"
46
    And I follow "Test survey name"
47
    And the "Submit answers" completion condition of "Test survey name" is displayed as "todo"
48
    And I press "Submit"
49
    And I am on "Course 1" course homepage
50
    And the "Submit answers" completion condition of "Test survey name" is displayed as "done"
51
    And I follow "Test survey name"
52
    And the "Submit answers" completion condition of "Test survey name" is displayed as "done"
53
 
54
  Scenario: Use manual completion
55
    Given the following "activities" exist:
56
      | activity   | name                   | course | idnumber    | completion |
57
      | survey     | Test survey name       | C1     | survey1     | 1          |
58
    And I am on "Course 1" course homepage
59
    # Teacher view.
60
    And "Test survey name" should have the "Mark as done" completion condition
61
    # Student view.
62
    When I am on the "survey1" Activity page logged in as student1
63
    Then the manual completion button of "Test survey name" is displayed as "Mark as done"
64
    And I toggle the manual completion state of "Test survey name"
65
    And the manual completion button of "Test survey name" is displayed as "Done"