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: Edit quiz marks with no attempts
3
  In order to create a quiz that awards marks the way I want
4
  As a teacher
5
  I must be able to set the marks I want on the Edit quiz page.
6
 
7
  Background:
8
    Given the following "users" exist:
9
      | username | firstname | lastname | email                |
10
      | teacher1 | T1        | Teacher1 | 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
      | teacher1 | C1     | editingteacher |
17
    And the following "activities" exist:
18
      | activity   | name   | course | idnumber | grade | decimalpoints | questiondecimalpoints |
19
      | quiz       | Quiz 1 | C1     | quiz1    | 20    | 2             | -1                    |
20
 
21
    And the following "question categories" exist:
22
      | contextlevel | reference | name           |
23
      | Course       | C1        | Test questions |
24
    And the following "questions" exist:
25
      | questioncategory | qtype     | name            | questiontext |
26
      | Test questions   | truefalse | First question  | Answer me    |
27
      | Test questions   | truefalse | Second question | Answer again |
28
    And quiz "Quiz 1" contains the following questions:
29
      | question        | page | maxmark |
30
      | First question  | 1    | 2.0     |
31
      | Second question | 1    | 3.0     |
32
    And I am on the "Quiz 1" "mod_quiz > Edit" page logged in as "teacher1"
33
    And I change window size to "large"
34
 
35
  @javascript
36
  Scenario: Set the max mark for a question.
37
    When I set the max mark for question "First question" to "7.0"
38
    Then I should see "7.00"
39
    And I should see "3.00"
40
    And I should see "Total of marks: 10.00"
41
 
42
    When I follow "Edit maximum mark"
43
    And I press the escape key
44
    Then I should see "7.00"
45
    And I should see "3.00"
46
    And I should see "Total of marks: 10.00"
47
    And "li input[name=maxmark]" "css_element" should not exist
48
 
49
  @javascript
50
  Scenario: Set the overall Maximum grade.
51
    When I set the field "maxgrade" to "10.0"
52
    And I press "savechanges"
53
    Then the field "maxgrade" matches value "10.00"
54
    And I should see "2.00"
55
    And I should see "3.00"
56
    And I should see "Total of marks: 5.00"
57
 
58
  @javascript
59
  Scenario: Verify the number of decimal places shown is what the quiz settings say it should be.
60
    # Then the field "maxgrade" matches value "20.00" -- with exact match on decimal places.
61
    Then "//input[@name = 'maxgrade' and @value = '20.00']" "xpath_element" should exist
62
    And I should see "2.00"
63
    And I should see "3.00"
64
    And I should see "Total of marks: 5.00"
65
    And I should not see "2.000"
66
    And I should not see "3.000"
67
    And I should not see "Total of marks: 5.000"
68
    And I am on the "Quiz 1" "quiz activity editing" page
69
    When I set the following fields to these values:
70
      | Decimal places in grades | 3 |
71
      | Decimal places in marks for questions | 5 |
72
    And I press "Save and display"
73
    When I am on the "Quiz 1" "mod_quiz > Edit" page
74
    # Then the field "maxgrade" matches value "20.000" -- with exact match on decimal places.
75
    Then "//input[@name = 'maxgrade' and @value = '20.000']" "xpath_element" should exist
76
    And I should see "2.00000"
77
    And I should see "3.00000"
78
    And I should see "Total of marks: 5.000"
79
    And I should not see "2.000000"
80
    And I should not see "3.000000"
81
    And I should not see "Total of marks: 5.0000"