Proyectos de Subversion Moodle

Rev

Ir a la última revisión | | Ultima modificación | Ver Log |

Rev Autor Línea Nro. Línea
1 efrain 1
@mod @mod_quiz
2
Feature: Teachers can override the grade for any question
3
  As a teacher
4
  In order to correct errors
5
  I must be able to override the grades that Moodle gives.
6
 
7
  Background:
8
    Given the following "users" exist:
9
      | username | firstname | lastname | email                |
10
      | teacher1 | Teacher   | 1        | teacher1@example.com |
11
      | student1 | Student   | 1        | student0@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
      | teacher1 | C1     | editingteacher |
18
      | student1 | C1     | student        |
19
    And the following "question categories" exist:
20
      | contextlevel | reference | name           |
21
      | Course       | C1        | Test questions |
22
    And the following "questions" exist:
23
      | questioncategory | qtype       | name  | questiontext    | defaultmark |
24
      | Test questions   | essay       | TF1   | First question  | 20          |
25
    And the following "activities" exist:
26
      | activity   | name   | intro              | course | idnumber | grade |
27
      | quiz       | Quiz 1 | Quiz 1 description | C1     | quiz1    | 20    |
28
    And quiz "Quiz 1" contains the following questions:
29
      | question | page |
30
      | TF1      | 1    |
31
    And the following "blocks" exist:
32
      | blockname     | contextlevel | reference | pagetypepattern | defaultregion |
33
      | private_files | System       | 1         | my-index        | side-post     |
34
    And the following "user private files" exist:
35
      | user     | filepath                                | filename        |
36
      | teacher1 | mod/quiz/tests/fixtures/moodle_logo.jpg | moodle_logo.jpg |
37
    And I am on the "Quiz 1" "mod_quiz > View" page logged in as "student1"
38
    And I press "Attempt quiz"
39
    And I follow "Finish attempt ..."
40
    And I press "Submit all and finish"
41
    And I click on "Submit all and finish" "button" in the "Submit all your answers and finish?" "dialogue"
42
    And I log out
43
 
44
  @javascript @_switch_window @_bug_phantomjs
45
  Scenario: Validating the marking of an essay question attempt.
46
    When I am on the "Quiz 1 > student1 > Attempt 1" "mod_quiz > Attempt review" page logged in as "teacher1"
47
    And I follow "Make comment or override mark"
48
    And I switch to "commentquestion" window
49
    And I set the field "Mark" to "25"
50
    And I press "Save"
51
    Then I should see "This grade is outside the valid range."
52
    And I set the field "Mark" to "aa"
53
    And I press "Save"
54
    And I should see "That is not a valid number."
55
    And I set the field "Mark" to "10.0"
56
    And I press "Save" and switch to main window
57
    And I should see "Complete" in the "Manually graded 10 with comment: " "table_row"
58
    And I follow "Make comment or override mark"
59
    And I switch to "commentquestion" window
60
    And I should see "Teacher 1" in the "Manually graded 10 with comment: " "table_row"
61
 
62
  @javascript @_switch_window @_file_upload @_bug_phantomjs @editor_tiny
63
  Scenario: Comment on a response to an essay question attempt.
64
    When I log in as "teacher1"
65
    And I am on the "Quiz 1 > student1 > Attempt 1" "mod_quiz > Attempt review" page
66
    And I follow "Make comment or override mark"
67
    And I switch to "commentquestion" window
68
    And I set the field "Comment" to "Administrator's comment"
69
    And I select the "p" element in position "0" of the "Comment" TinyMCE editor
70
    And I click on the "Image" button for the "Comment" TinyMCE editor
71
    And I click on "Browse repositories" "button" in the "Insert image" "dialogue"
72
    And I click on "Private files" "link" in the ".fp-repo-area" "css_element"
73
    And I click on "moodle_logo.jpg" "link"
74
    And I click on "Select this file" "button"
75
    And I set the field "How would you describe this image to someone who can't see it:" to "It's the logo"
76
    And I click on "Save" "button" in the "Image details" "dialogue"
77
    And I press "Save" and switch to main window
78
    And I switch to the main window
79
    Then I should see "Commented: [It's the logo]" in the ".history table" "css_element"
80
    And "//img[contains(@src, 'moodle_logo.jpg')]" "xpath_element" should exist in the ".comment" "css_element"
81
    # This time is same as time the window is open. So wait for it to close before proceeding.
82
    And I wait "2" seconds