Proyectos de Subversion Moodle

Rev

Rev 1 | | Comparar con el anterior | Ultima modificación | Ver Log |

Rev Autor Línea Nro. Línea
1 efrain 1
@mod @mod_scorm @core_completion
2
Feature: Scorm activity default completion
3
  In order to make easier for teachers to set completion conditions
4
  As a teacher or admin
5
  I need to be able to set default condition completion
6
  Background:
7
    Given the following "users" exist:
8
      | username | firstname | lastname | email |
9
      | teacher1 | Teacher | 1 | teacher1@example.com |
10
    And the following "course" exists:
11
      | fullname         | Course 1 |
12
      | shortname        | C1       |
13
      | enablecompletion | 1        |
14
    And the following "course enrolments" exist:
15
      | user     | course | role           |
16
      | teacher1 | C1     | editingteacher |
17
 
18
  @javascript
19
  Scenario: Completion conditions when there is no default set at site or course level.
20
    Given I log in as "teacher1"
21
    And I am on "Course 1" course homepage with editing mode on
1441 ariadna 22
    And I open the activity chooser
1 efrain 23
    When I click on "Add a new SCORM" "link" in the "Add an activity or resource" "dialogue"
24
    And I expand all fieldsets
25
    Then the field "None" matches value "1"
26
    And the field "Add requirements" matches value "0"
27
    And I set the field "Add requirements" to "1"
28
    And the field "completionstatusrequired[4]" matches value "1"
29
    And the field "completionstatusrequired[2]" matches value "0"
30
 
31
  @javascript
32
  Scenario: Completion conditions when default completion is set at site level but not at course level.
33
    Given I log in as "admin"
34
    And I navigate to "Courses > Default settings > Default activity completion" in site administration
35
    And I click on "Expand SCORM" "button"
36
    And I set the following fields to these values:
37
      | id_completion_scorm_2    | 1 |
38
      | completionview_scorm     | 1 |
39
      | completionstatusrequired_scorm[4] | 0 |
40
      | completionstatusrequired_scorm[2]   | 0 |
41
    And I click on "Save changes" "button" in the "[data-region='activitycompletion-scorm']" "css_element"
42
    And I am on "Course 1" course homepage with editing mode on
1441 ariadna 43
    And I open the activity chooser
1 efrain 44
    When I click on "Add a new SCORM" "link" in the "Add an activity or resource" "dialogue"
45
    And I expand all fieldsets
46
    Then the field "None" matches value "0"
47
    And the field "Add requirements" matches value "1"
48
    And the field "completionview" matches value "1"
49
    And the field "completionstatusrequired[4]" matches value "0"
50
    And the field "completionstatusrequired[2]" matches value "0"
51
 
52
  @javascript
53
  Scenario: Completion conditions when default completion is set at course level but not at site level.
54
    Given I am on the "Course 1" course page logged in as teacher1
55
    And I navigate to "Course completion" in current page administration
56
    And I set the field "Course completion tertiary navigation" to "Default activity completion"
57
    And I click on "Expand SCORM" "button"
58
    And I set the following fields to these values:
59
      | id_completion_scorm_2    | 1 |
60
      | completionview_scorm     | 1 |
61
      | completionstatusrequired_scorm[4] | 0 |
62
      | completionstatusrequired_scorm[2]   | 0 |
63
    And I click on "Save changes" "button" in the "[data-region='activitycompletion-scorm']" "css_element"
64
    And I am on "Course 1" course homepage with editing mode on
1441 ariadna 65
    And I open the activity chooser
1 efrain 66
    When I click on "Add a new SCORM" "link" in the "Add an activity or resource" "dialogue"
67
    And I expand all fieldsets
68
    Then the field "None" matches value "0"
69
    And the field "Add requirements" matches value "1"
70
    And the field "completionview" matches value "1"
71
    And the field "completionstatusrequired[4]" matches value "0"
72
    And the field "completionstatusrequired[2]" matches value "0"
73
 
74
  @javascript
75
  Scenario: Completion conditions when default completion is set at site and course level.
76
    Given I log in as "admin"
77
    And I navigate to "Courses > Default settings > Default activity completion" in site administration
78
    And I click on "Expand SCORM" "button"
79
    And I set the following fields to these values:
80
      | id_completion_scorm_2    | 1 |
81
      | completionview_scorm     | 1 |
82
      | completionstatusrequired_scorm[4] | 0 |
83
      | completionstatusrequired_scorm[2]   | 0 |
84
    And I click on "Save changes" "button" in the "[data-region='activitycompletion-scorm']" "css_element"
85
    And the following "core_completion > Course defaults" exist:
86
      | course | module | completion |
87
      | C1    | scorm  | 1          |
88
    And I am on "Course 1" course homepage with editing mode on
1441 ariadna 89
    And I open the activity chooser
1 efrain 90
    When I click on "Add a new SCORM" "link" in the "Add an activity or resource" "dialogue"
91
    And I expand all fieldsets
92
    Then the field "None" matches value "0"
93
    And the field "Students must manually mark the activity as done" matches value "1"
94
    And the field "Add requirements" matches value "0"
95
 
96
  @javascript
97
  Scenario: Completion conditions when 'Passed' is marked as default but 'Completed' is unmarked.
98
    Given I log in as "admin"
99
    And I navigate to "Courses > Default settings > Default activity completion" in site administration
100
    And I click on "Expand SCORM" "button"
101
    And I set the following fields to these values:
102
      | id_completion_scorm_2    | 1 |
103
      | completionview_scorm     | 1 |
104
      | completionstatusrequired_scorm[4] | 0 |
105
      | completionstatusrequired_scorm[2]   | 1 |
106
    And I click on "Save changes" "button" in the "[data-region='activitycompletion-scorm']" "css_element"
107
    And I am on "Course 1" course homepage with editing mode on
1441 ariadna 108
#    When I add a "Teaching Tool 1" to section "1" using the activity chooser
109
    And I open the activity chooser
1 efrain 110
    When I click on "Add a new SCORM" "link" in the "Add an activity or resource" "dialogue"
111
    And I expand all fieldsets
112
    Then the field "None" matches value "0"
113
    And the field "Add requirements" matches value "1"
114
    And the field "completionview" matches value "1"
115
    And the field "completionstatusrequired[4]" matches value "0"
116
    And the field "completionstatusrequired[2]" matches value "1"