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: Allow settings to show Max marks and Marks, Max marks only, or hide the grade information completely.
3
  As a teacher
4
  In order to decide how grade review options are displayed on questions in a quiz review page
5
  I need to be able to set the grade review options for a quiz to to show Max and Marks, Max only, or hide the grade information.
6
 
7
  Background:
8
    Given the following "users" exist:
9
      | username  | firstname | lastname | email                |
10
      | student1  | Student   | One      | student1@example.com |
11
      | teacher   | Teacher   | One      | teacher@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
      | teacher  | C1     | editingteacher |
18
      | student1 | C1     | student        |
1441 ariadna 19
    And the following "activities" exist:
20
      | activity | name    | intro              | course | idnumber |
21
      | qbank    | Qbank 1 | Question bank 1    | C1     | qbank1   |
1 efrain 22
    And the following "question categories" exist:
1441 ariadna 23
      | contextlevel    | reference | name           |
24
      | Activity module | qbank1    | Test questions |
1 efrain 25
    And the following "questions" exist:
26
      | questioncategory | qtype     | name | questiontext    |
27
      | Test questions   | truefalse | TF1  | First question  |
28
    And the following "activities" exist:
29
      | activity | name   | intro       | course | idnumber | maxmarksduring | marksduring | maxmarksimmediately | marksimmediately | preferredbehaviour |
30
      | quiz     | Quiz 1 | Quiz 1 test | C1     | quiz1    | 1              | 1           | 1                   | 1                | immediatefeedback  |
31
      | quiz     | Quiz 2 | Quiz 2 test | C1     | quiz2    | 0              | 0           | 1                   | 1                | immediatefeedback  |
32
    And quiz "Quiz 1" contains the following questions:
33
      | question | page | maxmark |
34
      | TF1      | 1    | 2.00    |
35
    And quiz "Quiz 2" contains the following questions:
36
      | question | page | maxmark |
37
      | TF1      | 1    | 2.00    |
38
 
39
  @javascript
40
  Scenario: Show max marks and marks during and immediately after the attempt.
41
    Given I am on the "Quiz 1" "quiz activity" page logged in as "student1"
42
    And I click on "Attempt quiz" "button"
43
    And I should see "Question 1" in the ".info" "css_element"
44
    And I should see "Not complete" in the ".info" "css_element"
45
    And I should see "Marked out of 2.00" in the ".info" "css_element"
46
    And I set the field "True" to "1"
47
    And I press "Finish attempt ..."
48
    And I press "Submit all and finish"
49
    And I click on "Submit all and finish" "button" in the "Submit all your answers and finish?" "dialogue"
50
    Then I should see "Finished" in the "Status" "table_row"
51
    And I should see "Question 1" in the ".info" "css_element"
52
    And I should see "Correct" in the ".info" "css_element"
53
    And I should see "Mark 2.00 out of 2.00" in the ".info" "css_element"
54
 
55
    And I am on the "Quiz 2" "quiz activity" page
56
    And I click on "Attempt quiz" "button"
57
    And I should see "Question 1" in the ".info" "css_element"
58
    And I should see "Not complete" in the ".info" "css_element"
59
    And I should not see "Marked out of 2.00" in the ".info" "css_element"
60
    And I set the field "True" to "1"
61
    And I press "Finish attempt ..."
62
    And I press "Submit all and finish"
63
    And I click on "Submit all and finish" "button" in the "Submit all your answers and finish?" "dialogue"
64
    And I should see "Finished" in the "Status" "table_row"
65
    And I should see "Question 1" in the ".info" "css_element"
66
    And I should see "Correct" in the ".info" "css_element"
67
    And I should see "Mark 2.00 out of 2.00" in the ".info" "css_element"
1441 ariadna 68
 
69
    # Check the page that lists all the quizzes in a course.
70
    And I am on the "C1" "quiz index" page
71
    And I should see "Quiz 1"
72
    And I should see "Quiz 2"