[ Index ]

PHP Cross Reference of Unnamed Project

title

Body

[close]

/mod/quiz/tests/behat/ -> manually_mark_question.feature (source)

   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 I log in as "student1"
  32      And I follow "Course 1"
  33      And I follow "Quiz 1"
  34      And I press "Attempt quiz now"
  35      And I follow "Finish attempt ..."
  36      And I press "Submit all and finish"
  37      And I click on "Submit all and finish" "button" in the "Confirmation" "dialogue"
  38      And I log out
  39      And I log in as "teacher1"
  40      And I follow "Course 1"
  41      And I follow "Quiz 1"
  42      And I follow "Attempts: 1"
  43      And I follow "Review attempt"
  44  
  45    @javascript @_switch_window @_bug_phantomjs
  46    Scenario: Validating the marking of an essay question attempt.
  47      When 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      # This time is same as time the window is open. So wait for it to close before proceeding.
  59      And I wait "2" seconds


Generated: Thu Aug 11 10:00:09 2016 Cross-referenced by PHPXref 0.7.1