Proyectos de Subversion Moodle

Rev

| 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 |
18
    And the following "question categories" exist:
19
      | contextlevel | reference | name           |
20
      | Course       | C1        | Test questions |
21
    And the following "questions" exist:
22
      | questioncategory | qtype       | name  | questiontext    |
23
      | Test questions   | truefalse   | TF1   | First question  |
24
 
25
  @javascript
26
  Scenario: Attempt quiz with How questions behave set to Deferred Feedback
27
    Given the following "activity" exists:
28
      | activity                    | quiz             |
29
      | name                        | Quiz 1           |
30
      | course                      | C1               |
31
      | preferredbehaviour          | deferredfeedback |
32
      | attemptimmediately          | 1                |
33
      | correctnessimmediately      | 1                |
34
      | maxmarksimmediately         | 1                |
35
      | marksimmediately            | 1                |
36
      | specificfeedbackimmediately | 1                |
37
      | generalfeedbackimmediately  | 1                |
38
      | rightanswerimmediately      | 1                |
39
      | overallfeedbackimmediately  | 1                |
40
    And quiz "Quiz 1" contains the following questions:
41
      | question | page |
42
      | TF1      | 1    |
43
    And I am on the "Quiz 1" "quiz activity" page logged in as student1
44
    When I press "Attempt quiz"
45
    # Confirm that check button does not exist when attempting quiz
46
    Then "Check Question 1" "button" should not exist
47
    And I set the field "False" to "1"
48
    And I press "Finish attempt ..."
49
    And I should not see "This is the wrong answer."
50
    And I should not see "You should have selected true."
51
    And I should not see "The correct answer is 'True'."
52
    And I press "Submit all and finish"
53
    # Confirm that quiz answer feedback only appears when attempt is submitted
54
    And I click on "Submit all and finish" "button" in the "Submit all your answers and finish?" "dialogue"
55
    And I should see "This is the wrong answer."
56
    And I should see "You should have selected true."
57
    And I should see "The correct answer is 'True'."
58
 
59
  Scenario: Attempt quiz with How questions behave set to Immediate Feedback
60
    Given the following "activity" exists:
61
      | activity                    | quiz             |
62
      | name                        | Quiz 1           |
63
      | course                      | C1               |
64
      | preferredbehaviour          | immediatefeedback |
65
      | correctnessduring           | 1                 |
66
      | marksduring                 | 1                 |
67
      | specificfeedbackduring      | 1                 |
68
      | generalfeedbackduring       | 1                 |
69
      | rightanswerduring           | 1                 |
70
    And quiz "Quiz 1" contains the following questions:
71
      | question | page |
72
      | TF1      | 1    |
73
    And I am on the "Quiz 1" "quiz activity" page logged in as student1
74
    When I press "Attempt quiz"
75
    Then "Check Question 1" "button" should exist
76
    And I set the field "False" to "1"
77
    # Confirm you can check your answer immediately before submitting the attempt
78
    And I press "Check"
79
    And I should see "The correct answer is 'True'."
80
    And the "True" "field" should be disabled
81
    And the "False" "field" should be disabled
82
    And "Check Question 1" "button" should not exist