Proyectos de Subversion Moodle

Rev

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

Rev Autor Línea Nro. Línea
1 efrain 1
@mod @mod_quiz
2
Feature: Flag quiz questions
3
  As a student
4
  In order to flag a quiz questions
5
  All review options for immediately after the attempt are ticked
6
 
7
  Background:
8
    Given the following "users" exist:
9
      | username | firstname | lastname | email              |
10
      | student1 | Student   | 1        | student1@email.com |
11
      | teacher1 | Teacher   | 1        | teacher1@email.com |
12
    And the following "courses" exist:
13
      | fullname | shortname |
14
      | Course 1 | C1        |
15
    And the following "course enrolments" exist:
16
      | user     | course | role    |
17
      | student1 | C1     | student |
18
      | teacher1 | C1     | teacher |
19
    And the following "activity" exists:
20
      | activity                    | quiz   |
21
      | name                        | Quiz 1 |
22
      | course                      | C1     |
23
      | attemptimmediately          | 1      |
24
      | correctnessimmediately      | 1      |
25
      | maxmarksimmediately         | 1      |
26
      | marksimmediately            | 1      |
27
      | specificfeedbackimmediately | 1      |
28
      | generalfeedbackimmediately  | 1      |
29
      | rightanswerimmediately      | 1      |
30
      | overallfeedbackimmediately  | 1      |
1441 ariadna 31
      | idnumber                    | quiz1  |
32
    And the following "question categories" exist:
33
      | contextlevel    | reference | name           |
34
      | Activity module | quiz1     | Test questions |
35
    And the following "questions" exist:
36
      | questioncategory | qtype       | name  | questiontext    |
37
      | Test questions   | truefalse   | TF1   | First question  |
38
      | Test questions   | truefalse   | TF2   | Second question |
39
      | Test questions   | truefalse   | TF3   | Third question  |
1 efrain 40
    And quiz "Quiz 1" contains the following questions:
41
      | question | page |
42
      | TF1      | 1    |
43
      | TF2      | 2    |
44
      | TF3      | 3    |
45
 
46
  @javascript
47
  Scenario: Flag a quiz during and after quiz attempt
48
    Given I am on the "Quiz 1" "quiz activity" page logged in as student1
49
    And I press "Attempt quiz"
11 efrain 50
    When I click on "Flag question" "button" in the "First question" "question"
51
    Then I should see "Remove flag" in the "First question" "question"
1 efrain 52
    # Confirm question 1 is flagged in navigation
11 efrain 53
    And "Question 1 This page Flagged" "link" should exist
1 efrain 54
    # Answer questions
55
    And I click on "True" "radio" in the "First question" "question"
56
    And I press "Next page"
57
    And I click on "True" "radio" in the "Second question" "question"
58
    And I press "Next page"
59
    And I click on "True" "radio" in the "Third question" "question"
60
    And I follow "Finish attempt ..."
61
    And I press "Submit all and finish"
62
    And I click on "Submit all and finish" "button" in the "Submit all your answers and finish?" "dialogue"
63
    # Confirm only flagged question is flagged
64
    And I should see "Remove flag" in the "First question" "question"
65
    And I should see "Flag question" in the "Second question" "question"
11 efrain 66
    And I click on "Flagged" "button" in the "Second question" "question"
67
    And I should see "Remove flag" in the "Second question" "question"
1 efrain 68
    And I should see "Flag question" in the "Third question" "question"
69
    And I am on the "Quiz 1" "mod_quiz > Grades report" page logged in as teacher1
70
    And "Flagged" "icon" should exist in the "Student 1" "table_row"
71
    And I am on the "Quiz 1" "mod_quiz > Responses report" page
72
    And "Flagged" "icon" should exist in the "Student 1" "table_row"
11 efrain 73
    And I am on the "Quiz 1 > student1 > Attempt 1" "mod_quiz > Attempt review" page
74
    And I should see "Remove flag" in the "First question" "question"
75
    And I should see "Remove flag" in the "Second question" "question"
76
    And I should see "Flag question" in the "Third question" "question"