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