[ Index ]

PHP Cross Reference of moodle-2.8

title

Body

[close]

/mod/lesson/tests/behat/ -> teacher_grade_essays.feature (source)

   1  @mod @mod_lesson
   2  Feature: In a lesson activity, a non editing teacher can grade essay questions
   3    As a non editing teacher
   4    I need to grade student answers to essay questions in lesson
   5  
   6    @javascript
   7    Scenario: non editing teacher grade essay questions
   8      Given the following "users" exist:
   9        | username | firstname | lastname | email |
  10        | teacher1 | Teacher | 1 | [email protected] |
  11        | teacher2 | Teacher | 2 | [email protected] |
  12        | student1 | Student | 1 | [email protected] |
  13      And the following "courses" exist:
  14        | fullname | shortname | category |
  15        | Course 1 | C1 | 0 |
  16      And the following "course enrolments" exist:
  17        | user | course | role |
  18        | teacher1 | C1 | editingteacher |
  19        | teacher2 | C1 | teacher |
  20        | student1 | C1 | student |
  21      And I log in as "teacher1"
  22      And I am on homepage
  23      And I follow "Course 1"
  24      And I turn editing mode on
  25      And I add a "Lesson" to section "1" and I fill the form with:
  26        | Name | Test lesson name |
  27        | Description | Test lesson description |
  28      And I follow "Test lesson name"
  29      And I follow "Add a question page"
  30      And I set the field "Select a question type" to "Essay"
  31      And I press "Add a question page"
  32      And I set the following fields to these values:
  33        | Page title | Essay question |
  34        | Page contents | <p>Please write a story about a frog.</p> |
  35      And I press "Save page"
  36      And I log out
  37      And I log in as "student1"
  38      And I follow "Course 1"
  39      And I follow "Test lesson name"
  40      And I set the field "Your answer" to "<p>Once upon a time there was a little green frog."
  41      And I press "Submit"
  42      And I log out
  43      When I log in as "teacher2"
  44      And I follow "Course 1"
  45      And I follow "Test lesson name"
  46      Then I should see "Grade essays"
  47      And I follow "Grade essays"
  48      And I should see "Student 1"
  49      And I should see "Essay question"
  50      And I follow "Essay question"
  51      And I should see "Student 1's response"
  52      And I should see "Once upon a time there was a little green frog."
  53      And I set the following fields to these values:
  54        | Your comments | Well done. |
  55        | Essay score | 1 |
  56      And I press "Save changes"
  57      And I should see "Changes saved"


Generated: Fri Nov 28 20:29:05 2014 Cross-referenced by PHPXref 0.7.1