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_quiz
2
Feature: Quiz reset
3
  In order to reuse past quizzes
4
  As a teacher
5
  I need to remove all previous data.
6
 
7
  Background:
8
    Given the following "users" exist:
9
      | username | firstname | lastname | email                |
10
      | teacher1 | Terry1    | Teacher1 | teacher1@example.com |
11
      | student1 | Sam1      | Student1 | student1@example.com |
12
    And the following "courses" exist:
13
      | fullname | shortname | category |
14
      | Course 1 | C1        | 0        |
15
    And the following "course enrolments" exist:
16
      | user     | course | role           |
17
      | teacher1 | C1     | editingteacher |
18
      | student1 | C1     | student        |
19
    And the following "groups" exist:
20
      | name    | course | idnumber |
21
      | Group 1 | C1     | G1       |
22
      | Group 2 | C1     | G2       |
1441 ariadna 23
    And the following "activities" exist:
24
      | activity | name           | intro                 | course | idnumber |
25
      | quiz     | Test quiz name | Test quiz description | C1     | quiz1    |
1 efrain 26
    And the following "question categories" exist:
1441 ariadna 27
      | contextlevel    | reference | name           |
28
      | Activity module | quiz1     | Test questions |
1 efrain 29
    And the following "questions" exist:
30
      | questioncategory | qtype     | name | questiontext   |
31
      | Test questions   | truefalse | TF1  | First question |
32
    And quiz "Test quiz name" contains the following questions:
33
      | question | page |
34
      | TF1      | 1    |
35
    And user "student1" has attempted "Test quiz name" with responses:
36
      | slot | response |
37
      |   1  | True     |
38
 
39
  Scenario: Use course reset to clear all attempt data
40
    When I log in as "teacher1"
41
    And I am on the "Course 1" "reset" page
42
    And I set the following fields to these values:
1441 ariadna 43
        | All quiz attempts | 1 |
1 efrain 44
    And I press "Reset course"
45
    And I press "Continue"
46
    And I am on the "Test quiz name" "mod_quiz > Grades report" page
47
    Then I should see "Attempts: 0"
48
 
49
  Scenario: Use course reset to remove user overrides.
50
    Given the following "mod_quiz > user overrides" exist:
51
      | quiz           | user     | attempts |
52
      | Test quiz name | student1 | 2        |
53
    When I log in as "teacher1"
54
    And I am on the "Course 1" "reset" page
1441 ariadna 55
    And I set the field "All user overrides" to "1"
1 efrain 56
    And I press "Reset course"
57
    And I press "Continue"
58
    And I am on the "Test quiz name" "mod_quiz > User overrides" page
59
    Then I should not see "Sam1 Student1"
60
 
61
  Scenario: Use course reset to remove group overrides.
62
    Given the following "mod_quiz > group overrides" exist:
63
      | quiz           | group | attempts |
64
      | Test quiz name | G1    | 2        |
65
    When I log in as "teacher1"
66
    And I am on the "Course 1" "reset" page
67
    And I set the following fields to these values:
1441 ariadna 68
        | All group overrides | 1 |
1 efrain 69
    And I press "Reset course"
70
    And I press "Continue"
71
    And I am on the "Test quiz name" "mod_quiz > Group overrides" page
72
    Then I should not see "Group 1"