Proyectos de Subversion Moodle

Rev

| Ultima modificación | Ver Log |

Rev Autor Línea Nro. Línea
1 efrain 1
@mod @mod_label @core_completion
2
Feature: View activity completion information for the label
3
  In order to have visibility of Label completion requirements
4
  As a student
5
  I need to be able to view my Label completion progress
6
 
7
  Background:
8
    Given the following "users" exist:
9
      | username | firstname  | lastname | email                |
10
      | student1 | Vinnie    | Student1 | student1@example.com |
11
      | teacher1 | Darrell   | Teacher1 | 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
      | student1 | C1     | student        |
18
      | teacher1 | C1     | editingteacher |
19
    And the following "activity" exists:
20
      | activity       | label         |
21
      | course         | C1            |
22
      | idnumber       | mh1           |
23
      | section        | 1             |
24
      | completion     | 1             |
25
 
26
  @javascript
27
  Scenario: The manual completion button will be shown on the course page if the Show activity completion conditions is set to No
28
    Given I am on the "Course 1" course page logged in as teacher1
29
    # Teacher view.
30
    And "Test label 1" should have the "Mark as done" completion condition
31
    And I log out
32
    # Student view.
33
    When I log in as "student1"
34
    And I am on "Course 1" course homepage
35
    Then the manual completion button for "Test label 1" should exist
36
    And the manual completion button of "Test label 1" is displayed as "Mark as done"
37
    And I toggle the manual completion state of "Test label 1"
38
    And the manual completion button of "Test label 1" is displayed as "Done"
39
 
40
  @javascript
41
  Scenario: The manual completion button will be shown on the course page if the Show activity completion conditions is set to Yes
42
    Given I am on the "Course 1" course page logged in as teacher1
43
    And I navigate to "Settings" in current page administration
44
    And I expand all fieldsets
45
    And I set the field "Show activity completion conditions" to "Yes"
46
    And I press "Save and display"
47
    # Teacher view.
48
    And "Test label 1" should have the "Mark as done" completion condition
49
    And I log out
50
    # Student view.
51
    When I log in as "student1"
52
    And I am on "Course 1" course homepage
53
    Then the manual completion button for "Test label 1" should exist
54
    And the manual completion button of "Test label 1" is displayed as "Mark as done"
55
    And I toggle the manual completion state of "Test label 1"
56
    And the manual completion button of "Test label 1" is displayed as "Done"