[ Index ]

PHP Cross Reference of Unnamed Project

title

Body

[close]

/mod/assign/feedback/file/tests/behat/ -> feedback_file.feature (source)

   1  @mod @mod_assign @assignfeedback @assignfeedback_file @_file_upload
   2  Feature: In an assignment, teacher can submit feedback files during grading
   3    In order to provide a feedback file
   4    As a teacher
   5    I need to submit a feedback file.
   6  
   7    Background:
   8      Given the following "courses" exist:
   9        | fullname | shortname | category | groupmode |
  10        | Course 1 | C1 | 0 | 1 |
  11      And the following "users" exist:
  12        | username | firstname | lastname | email |
  13        | teacher1 | Teacher | 1 | teacher1@example.com |
  14        | student1 | Student | 1 | student1@example.com |
  15        | student2 | Student | 2 | student2@example.com |
  16      And the following "course enrolments" exist:
  17        | user | course | role |
  18        | teacher1 | C1 | editingteacher |
  19        | student1 | C1 | student |
  20        | student2 | C1 | student |
  21      And the following "groups" exist:
  22        | name     | course | idnumber |
  23        | G1       | C1     | G1       |
  24      And the following "group members" exist:
  25        | user     | group |
  26        | student1 | G1    |
  27        | student2 | G1    |
  28      And I log in as "teacher1"
  29      And I follow "Course 1"
  30      And I turn editing mode on
  31      And I add a "Assignment" to section "1" and I fill the form with:
  32        | Assignment name                  | Test assignment name |
  33        | Description                      | Submit your PDF file |
  34        | Maximum number of uploaded files | 2                    |
  35        | Students submit in groups        | Yes                  |
  36      And I follow "Test assignment name"
  37      And I follow "Edit settings"
  38      And I follow "Expand all"
  39      And I set the field "assignfeedback_file_enabled" to "1"
  40      And I press "Save and display"
  41      And I log out
  42      And I log in as "student1"
  43      And I follow "Course 1"
  44      And I follow "Test assignment name"
  45      And I press "Add submission"
  46      And I upload "mod/assign/feedback/file/tests/fixtures/submission.txt" file to "File submissions" filemanager
  47      And I press "Save changes"
  48      And I should see "Submitted for grading"
  49      And I should see "submission.txt"
  50      And I should see "Not graded"
  51      And I log out
  52      And I log in as "teacher1"
  53      And I follow "Course 1"
  54      And I follow "Test assignment name"
  55      And I click on "Grade" "link" in the ".submissionlinks" "css_element"
  56      And I upload "mod/assign/feedback/file/tests/fixtures/feedback.txt" file to "Feedback files" filemanager
  57  
  58    @javascript
  59    Scenario: A teacher can provide a feedback file when grading an assignment.
  60      Given I set the field "applytoall" to "0"
  61      And I press "Save changes"
  62      And I click on "Ok" "button"
  63      And I follow "Course 1"
  64      And I log out
  65      And I log in as "student1"
  66      And I follow "Course 1"
  67      And I follow "Test assignment name"
  68      And I should see "feedback.txt"
  69      And I log out
  70      When I log in as "student2"
  71      And I follow "Course 1"
  72      And I follow "Test assignment name"
  73      Then I should not see "feedback.txt"
  74  
  75    @javascript
  76    Scenario: A teacher can provide a feedback file when grading an assignment and all students in the group will receive the file.
  77      Given I press "Save changes"
  78      And I click on "Ok" "button"
  79      And I follow "Course 1"
  80      And I log out
  81      And I log in as "student1"
  82      And I follow "Course 1"
  83      And I follow "Test assignment name"
  84      And I should see "feedback.txt"
  85      And I log out
  86      When I log in as "student2"
  87      And I follow "Course 1"
  88      And I follow "Test assignment name"
  89      Then I should see "feedback.txt"


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