Proyectos de Subversion Moodle

Rev

| Ultima modificación | Ver Log |

Rev Autor Línea Nro. Línea
1 efrain 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 the following "activity" exists:
29
      | activity                            | assign                |
30
      | course                              | C1                    |
31
      | name                                | Test assignment name  |
32
      | assignsubmission_file_enabled       | 1                     |
33
      | assignsubmission_file_maxfiles      | 1                     |
34
      | assignsubmission_file_maxsizebytes  | 1024                  |
35
      | assignfeedback_comments_enabled     | 1                     |
36
      | assignfeedback_file_enabled         | 1                     |
37
      | maxfilessubmission                  | 2                     |
38
      | teamsubmission                      | 1                     |
39
      | submissiondrafts                    | 0                     |
40
    And the following "mod_assign > submission" exists:
41
      | assign  | Test assignment name                                    |
42
      | user    | student1                                                |
43
      | file    | mod/assign/feedback/file/tests/fixtures/submission.txt  |
44
 
45
    And I am on the "Test assignment name" Activity page logged in as teacher1
46
    And I click on "Grade" "link" in the ".tertiary-navigation" "css_element"
47
    And I upload "mod/assign/feedback/file/tests/fixtures/feedback.txt" file to "Feedback files" filemanager
48
 
49
  @javascript
50
  Scenario: A teacher can provide a feedback file when grading an assignment.
51
    Given I set the field "applytoall" to "0"
52
    And I press "Save changes"
53
    And I click on "Course 1" "link" in the "[data-region=assignment-info]" "css_element"
54
    And I log out
55
    And I am on the "Test assignment name" Activity page logged in as student1
56
    And I should see "feedback.txt"
57
    And I log out
58
    And I am on the "Test assignment name" Activity page logged in as student2
59
    Then I should not see "feedback.txt"
60
 
61
  @javascript
62
  Scenario: A teacher can provide a feedback file when grading an assignment and all students in the group will receive the file.
63
    Given I press "Save changes"
64
    And I click on "Course 1" "link" in the "[data-region=assignment-info]" "css_element"
65
    And I log out
66
    And I am on the "Test assignment name" Activity page logged in as student1
67
    And I should see "feedback.txt"
68
    And I log out
69
    When I am on the "Test assignment name" Activity page logged in as student2
70
    Then I should see "feedback.txt"