Proyectos de Subversion Moodle

Rev

| Ultima modificación | Ver Log |

Rev Autor Línea Nro. Línea
1 efrain 1
@mod @mod_quiz @core_completion
2
Feature: Ensure saving a quiz does not modify the completion settings.
3
  In order to reliably use completion
4
  As a teacher
5
  I need to be able to update the quiz
6
  without changing the completion settings.
7
 
8
  Background:
9
    Given the following "users" exist:
10
      | username | firstname | lastname | email                |
11
      | student1 | Student   | 1        | student1@example.com |
12
      | teacher1 | Teacher   | 1        | teacher1@example.com |
13
    And the following "courses" exist:
14
      | fullname | shortname | category | enablecompletion |
15
      | Course 1 | C1        | 0        | 1                |
16
    And the following "course enrolments" exist:
17
      | user     | course | role           |
18
      | teacher1 | C1     | editingteacher |
19
      | student1 | C1     | student        |
20
    And the following "question categories" exist:
21
      | contextlevel | reference | name           |
22
      | Course       | C1        | Test questions |
23
    And the following "questions" exist:
24
      | questioncategory | qtype     | name           | questiontext              |
25
      | Test questions   | truefalse | First question | Answer the first question |
26
    And the following "activity" exists:
27
      | activity                     | quiz      |
28
      | course                       | C1        |
29
      | idnumber                     | quiz1     |
30
      | name                         | Test quiz |
31
      | section                      | 1         |
32
      | attempts                     | 2         |
33
      | gradepass                    | 5.00      |
34
      | completion                   | 2         |
35
      | completionview               | 0         |
36
      | completionusegrade           | 1         |
37
      | completionpassgrade          | 1         |
38
      | completionattemptsexhausted  | 1         |
39
    And quiz "Test quiz" contains the following questions:
40
      | question       | page |
41
      | First question | 1    |
42
    And user "student1" has attempted "Test quiz" with responses:
43
      | slot | response |
44
      |   1  | True     |
45
 
46
  Scenario: Ensure saving quiz activty does not change completion settings
47
    Given I am on the "Test quiz" "mod_quiz > View" page logged in as "teacher1"
48
    When I navigate to "Settings" in current page administration
49
    Then the "completionattemptsexhausted" "field" should be disabled
50
    And the field "completionattemptsexhausted" matches value "1"
51
    And I press "Save and display"
52
    And I navigate to "Settings" in current page administration
53
    And the "completionattemptsexhausted" "field" should be disabled
54
    And the field "completionattemptsexhausted" matches value "1"