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: Enable deferred or immediate feedback for quiz
3
  As a teacher
4
  I should be able to set how questions behave to deferred or immediate feedback
5
 
6
  Background:
7
    Given the following "users" exist:
8
      | username  | firstname | lastname | email                |
9
      | student1  | Student   | 1        | student1@example.com |
10
      | teacher1  | Teacher   | 1        | teacher1@example.com |
11
    And the following "courses" exist:
12
      | fullname | shortname | category |
13
      | Course 1 | C1        | 0        |
14
    And the following "course enrolments" exist:
15
      | user     | course | role           |
16
      | student1 | C1     | student        |
17
      | teacher1 | C1     | editingteacher |
1441 ariadna 18
    And the following "activities" exist:
19
      | activity | name    | course | idnumber |
20
      | qbank    | Qbank 1 | C1     | qbank1   |
1 efrain 21
    And the following "question categories" exist:
1441 ariadna 22
      | contextlevel    | reference | name           |
23
      | Activity module | qbank1    | Test questions |
1 efrain 24
    And the following "questions" exist:
25
      | questioncategory | qtype       | name  | questiontext    |
26
      | Test questions   | truefalse   | TF1   | First question  |
27
 
28
  @javascript
29
  Scenario: Attempt quiz with How questions behave set to Deferred Feedback
30
    Given the following "activity" exists:
31
      | activity                    | quiz             |
32
      | name                        | Quiz 1           |
33
      | course                      | C1               |
34
      | preferredbehaviour          | deferredfeedback |
35
      | attemptimmediately          | 1                |
36
      | correctnessimmediately      | 1                |
37
      | maxmarksimmediately         | 1                |
38
      | marksimmediately            | 1                |
39
      | specificfeedbackimmediately | 1                |
40
      | generalfeedbackimmediately  | 1                |
41
      | rightanswerimmediately      | 1                |
42
      | overallfeedbackimmediately  | 1                |
43
    And quiz "Quiz 1" contains the following questions:
44
      | question | page |
45
      | TF1      | 1    |
46
    And I am on the "Quiz 1" "quiz activity" page logged in as student1
47
    When I press "Attempt quiz"
48
    # Confirm that check button does not exist when attempting quiz
49
    Then "Check Question 1" "button" should not exist
50
    And I set the field "False" to "1"
51
    And I press "Finish attempt ..."
52
    And I should not see "This is the wrong answer."
53
    And I should not see "You should have selected true."
54
    And I should not see "The correct answer is 'True'."
55
    And I press "Submit all and finish"
56
    # Confirm that quiz answer feedback only appears when attempt is submitted
57
    And I click on "Submit all and finish" "button" in the "Submit all your answers and finish?" "dialogue"
58
    And I should see "This is the wrong answer."
59
    And I should see "You should have selected true."
60
    And I should see "The correct answer is 'True'."
61
 
62
  Scenario: Attempt quiz with How questions behave set to Immediate Feedback
63
    Given the following "activity" exists:
64
      | activity                    | quiz             |
65
      | name                        | Quiz 1           |
66
      | course                      | C1               |
67
      | preferredbehaviour          | immediatefeedback |
68
      | correctnessduring           | 1                 |
69
      | marksduring                 | 1                 |
70
      | specificfeedbackduring      | 1                 |
71
      | generalfeedbackduring       | 1                 |
72
      | rightanswerduring           | 1                 |
73
    And quiz "Quiz 1" contains the following questions:
74
      | question | page |
75
      | TF1      | 1    |
76
    And I am on the "Quiz 1" "quiz activity" page logged in as student1
77
    When I press "Attempt quiz"
78
    Then "Check Question 1" "button" should exist
79
    And I set the field "False" to "1"
80
    # Confirm you can check your answer immediately before submitting the attempt
81
    And I press "Check"
82
    And I should see "The correct answer is 'True'."
83
    And the "True" "field" should be disabled
84
    And the "False" "field" should be disabled
85
    And "Check Question 1" "button" should not exist