[ Index ]

PHP Cross Reference of Unnamed Project

title

Body

[close]

/mod/assign/tests/behat/ -> edit_previous_feedback.feature (source)

   1  @mod @mod_assign
   2  Feature: In an assignment, teachers can edit feedback for a students previous submission attempt
   3    In order to correct feedback for a previous submission attempt
   4    As a teacher
   5    I need to be able to edit the feedback for a students previous submission attempt.
   6  
   7    @javascript
   8    Scenario: Edit feedback for a students previous attempt.
   9      Given the following "courses" exist:
  10        | fullname | shortname | category | groupmode |
  11        | Course 1 | C1 | 0 | 1 |
  12      And the following "users" exist:
  13        | username | firstname | lastname | email |
  14        | teacher1 | Teacher | 1 | teacher1@example.com |
  15        | student1 | Student | 1 | student1@example.com |
  16        | student2 | Student | 2 | student2@example.com |
  17      And the following "course enrolments" exist:
  18        | user | course | role |
  19        | teacher1 | C1 | editingteacher |
  20        | student1 | C1 | student |
  21        | student2 | C1 | student |
  22      And I log in as "teacher1"
  23      And I follow "Course 1"
  24      And I turn editing mode on
  25      And I add a "Assignment" to section "1" and I fill the form with:
  26        | Assignment name | Test assignment name |
  27        | Description | Submit your online text |
  28        | assignsubmission_onlinetext_enabled | 1 |
  29        | assignfeedback_comments_enabled | 1 |
  30        | Attempts reopened | Manually |
  31      And I log out
  32      And I log in as "student2"
  33      And I follow "Course 1"
  34      And I follow "Test assignment name"
  35      And I press "Add submission"
  36      And I set the following fields to these values:
  37        | Online text | I'm the student first submission |
  38      And I press "Save changes"
  39      And I log out
  40      And I log in as "teacher1"
  41      And I follow "Course 1"
  42      And I follow "Test assignment name"
  43      And I follow "View all submissions"
  44      And I click on "Grade" "link" in the "Student 2" "table_row"
  45      And I set the following fields to these values:
  46        | Grade | 49 |
  47        | Feedback comments | I'm the teacher first feedback |
  48        | Allow another attempt | Yes |
  49      And I press "Save changes"
  50      And I click on "Ok" "button"
  51      And I click on "Edit settings" "link"
  52      And I log out
  53      And I log in as "student2"
  54      And I follow "Course 1"
  55      And I follow "Test assignment name"
  56      And I should see "I'm the teacher first feedback" in the "Feedback comments" "table_row"
  57      And I log out
  58      When I log in as "teacher1"
  59      And I follow "Course 1"
  60      And I follow "Test assignment name"
  61      And I follow "View all submissions"
  62      And I click on "Grade" "link" in the "Student 2" "table_row"
  63      And I click on "View a different attempt" "link"
  64      And I click on "//div[contains(concat(' ', normalize-space(@class), ' '), ' confirmation-dialogue ')]//input[@value='0']" "xpath_element"
  65      And I click on "View" "button"
  66      And I set the following fields to these values:
  67        | Grade | 50 |
  68        | Feedback comments | I'm the teacher second feedback |
  69      And I press "Save changes"
  70      And I click on "Ok" "button"
  71      And I click on "Edit settings" "link"
  72      And I log out
  73      Then I log in as "student2"
  74      And I follow "Course 1"
  75      And I follow "Test assignment name"
  76      And I click on ".mod-assign-history-link" "css_element"
  77      And I should see "I'm the teacher second feedback" in the "Feedback comments" "table_row"
  78      And I should see "50.00"


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