Proyectos de Subversion Moodle

Rev

| Ultima modificación | Ver Log |

Rev Autor Línea Nro. Línea
1 efrain 1
@core @core_completion
2
Feature: Allow admins to edit the default activity completion rules at site level.
3
  In order to set the activity completion defaults for new activities
4
  As an admin
5
  I need to be able to edit the completion rules for a group of activities at site level.
6
 
7
  Background:
8
    Given the following "courses" exist:
9
      | fullname | shortname | category | enablecompletion |
10
      | Course 1 | C1        | 0        | 1                |
11
    And I log in as "admin"
12
 
13
  @javascript
14
  Scenario: Default activity completion rules with no site or course default completion
15
    Given the following "activity" exists:
16
      | activity   | assign               |
17
      | course     | C1                   |
18
      | name       | Test assignment one  |
19
      | completion | 1                    |
20
    When I add a assign activity to course "Course 1" section "0"
21
    And I expand all fieldsets
22
    # Completion tracking 0 = Do not indicate activity completion.
23
    Then the field "None" matches value "1"
24
    # Default values don't affect existing activities.
25
    But I am on the "Test assignment one" "assign activity editing" page
26
    And I navigate to "Settings" in current page administration
27
    And I expand all fieldsets
28
    And the field "Students must manually mark the activity as done" matches value "1"
29
    And the field "None" matches value "0"
30
 
31
  @javascript
32
  Scenario: Default activity completion rules with site default completion but with no course default completion
33
    Given the following "activity" exists:
34
      | activity   | assign               |
35
      | course     | C1                   |
36
      | name       | Test assignment one  |
37
      | completion | 0                    |
38
    And the following "core_completion > Course default" exist:
39
      | course               | module | completion | completionview | completionusegrade | completionsubmit |
40
      | Acceptance test site | assign | 2          | 0              | 1                  | 1                |
41
    When I add a assign activity to course "Course 1" section "0"
42
    And I expand all fieldsets
43
    Then the field "Add requirements" matches value "1"
44
    And the field "completionview" matches value "0"
45
    And the field "completionusegrade" matches value "1"
46
    And the field "completionsubmit" matches value "1"
47
    # Default values don't affect existing activities.
48
    But I am on the "Test assignment one" "assign activity editing" page
49
    And I navigate to "Settings" in current page administration
50
    And I expand all fieldsets
51
    And the field "Add requirements" matches value "0"
52
    And the field "None" matches value "1"
53
 
54
  @javascript
55
  Scenario: Default activity completion rules with site default completion and course default completion
56
    Given the following "activity" exists:
57
      | activity   | assign               |
58
      | course     | C1                   |
59
      | name       | Test assignment one  |
60
      | completion | 0                    |
61
    And the following "core_completion > Course defaults" exist:
62
      | course               | module | completion | completionview | completionusegrade | completionsubmit |
63
      | Acceptance test site | assign | 2          | 0              | 1                  | 1                |
64
      | C1                   | assign | 2          | 1              | 0                  | 1                |
65
    When I add a assign activity to course "Course 1" section "0"
66
    And I expand all fieldsets
67
    Then the field "Add requirements" matches value "1"
68
    And the field "completionview" matches value "1"
69
    And the field "completionusegrade" matches value "0"
70
    And the field "completionsubmit" matches value "1"
71
    # Default values don't affect existing activities.
72
    But I am on the "Test assignment one" "assign activity editing" page
73
    And I navigate to "Settings" in current page administration
74
    And I expand all fieldsets
75
    And the field "Add requirements" matches value "0"
76
    And the field "None" matches value "1"
77
 
78
  Scenario: Navigate to site default activity completion
79
    Given I navigate to "Courses > Default settings > Default activity completion" in site administration
80
    When I should see "Default activity completion"
81
    Then I should see "These are the default completion conditions for activities in all courses."
82
    And the following config values are set as admin:
83
      | enablecompletion  | 0 |
84
    And I navigate to "Courses > Default settings" in site administration
85
    And I should not see "Default activity completion"