Proyectos de Subversion Moodle

Rev

Rev 1 | | Comparar con el anterior | Ultima modificación | Ver Log |

Rev Autor Línea Nro. Línea
1 efrain 1
@mod @mod_assign @javascript
2
Feature: In an assignment, students can comment in their submissions
3
  In order to refine assignment submissions
4
  As a student
5
  I need to add comments about submissions
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
 
22
  Scenario: Student comments an assignment submission
23
    Given the following "activities" exist:
24
      | activity  | course  | name                  | assignsubmission_onlinetext_enabled  |
25
      | assign    | C1      | Test assignment name  | 1                                    |
26
    And I am on the "Test assignment name" Activity page logged in as student1
27
    When I press "Add submission"
28
    And I set the following fields to these values:
29
      | Online text | I'm the student submission |
30
    And I press "Save changes"
31
    And I click on ".comment-link" "css_element"
32
    And I set the field "content" to "First student comment"
33
    And I follow "Save comment"
34
    Then I should see "First student comment"
35
    And the field "content" matches value "Add a comment..."
36
    And I click on "Delete comment posted by Student 1" "link"
37
    # Wait for the animation to finish.
38
    And I wait "2" seconds
39
    And I set the field "content" to "Second student comment"
40
    And I follow "Save comment"
41
    And I should see "Second student comment"
42
    And I should not see "First student comment"
43
    And I am on the "Test assignment name" "assign activity" page
44
    And I click on ".comment-link" "css_element"
45
    And I should see "Second student comment"
46
    And I should not see "First student comment"
47
 
48
  Scenario: Teacher updated the comment box and clicked the save changes to reflect the comment
49
    Given the following "activities" exist:
50
      | activity  | course  | name                  | assignsubmission_onlinetext_enabled  |
51
      | assign    | C1      | Test assignment name  | 1                                    |
52
    And the following "mod_assign > submissions" exist:
53
      | assign                | user      | onlinetext              |
54
      | Test assignment name  | student1  | student one submission  |
55
    And I am on the "Test assignment name" Activity page logged in as teacher1
1441 ariadna 56
    And I go to "Student 1" "Test assignment name" activity advanced grading page
1 efrain 57
    And I click on ".comment-link" "css_element"
58
    When I set the field "content" to "Teacher feedback first comment"
59
    And I press "Save changes"
60
    And I should see "Comments (1)" in the ".comment-link" "css_element"
61
    And I click on ".comment-link" "css_element"
62
    Then I should see "Teacher feedback first comment" in the ".comment-list" "css_element"
63
 
64
  Scenario: Teacher updated the comment box and clicked on save and show next to reflect the comment
65
    Given the following "activities" exist:
66
      | activity  | course  | name                  | assignsubmission_onlinetext_enabled  |
67
      | assign    | C1      | Test assignment name  | 1                                    |
68
    And the following "mod_assign > submissions" exist:
69
      | assign                | user      | onlinetext                  |
70
      | Test assignment name  | student1  | I'm the student submission  |
71
 
72
    And I am on the "Test assignment name" Activity page logged in as teacher1
1441 ariadna 73
    And I go to "Student 1" "Test assignment name" activity advanced grading page
1 efrain 74
    And I click on ".comment-link" "css_element"
75
    When I set the field "content" to "Teacher feedback first comment"
76
    # click the save and show next twice as we have only 2 students
77
    # so the second time you click we reach the same student who made
78
    # the change
79
    And I press "Save and show next"
80
    And I press "Save and show next"
81
    And I click on ".comment-link" "css_element"
82
    Then I should see "Teacher feedback first comment" in the ".comment-list" "css_element"
83
 
84
  Scenario: Teacher can comment on an offline assignment
85
    Given the following "activities" exist:
86
      | activity  | course  | name                  | assignsubmission_onlinetext_enabled  | assignmentsubmission_file_enabled  | assignfeedback_comments_enabled  |
87
      | assign    | C1      | Test assignment name  | 0                                    | 0                                  | 1                                |
88
    And I am on the "Test assignment name" Activity page logged in as teacher1
1441 ariadna 89
    And I go to "Student 1" "Test assignment name" activity advanced grading page
1 efrain 90
    When I set the following fields to these values:
91
      | Grade out of 100   | 50                        |
92
      | Feedback comments  | I'm the teacher feedback  |
93
    And I press "Save changes"
94
    And I follow "View all submissions"
95
    Then I should see "50.00" in the "Student 1" "table_row"
96
    And I should see "I'm the teacher feedback" in the "Student 1" "table_row"
97
 
98
  Scenario: Teacher can comment on assignments with a zero grade
99
    Given the following "activities" exist:
100
      | activity  | course  | name                  | assignsubmission_onlinetext_enabled  | assignmentsubmission_file_enabled  | assignfeedback_comments_enabled  |
101
      | assign    | C1      | Test assignment name  | 0                                    | 0                                  | 1                                |
102
    And I am on the "Test assignment name" Activity page logged in as teacher1
1441 ariadna 103
    And I go to "Student 1" "Test assignment name" activity advanced grading page
1 efrain 104
    And I set the following fields to these values:
105
      | Grade out of 100 | 0 |
106
    And I press "Save changes"
107
    And I should see "The changes to the grade and feedback were saved"
108
    And I set the following fields to these values:
109
      | Feedback comments | I'm the teacher feedback |
110
    And I press "Save changes"
111
    Then I should see "The changes to the grade and feedback were saved"