Proyectos de Subversion Moodle

Rev

| Ultima modificación | Ver Log |

Rev Autor Línea Nro. Línea
1 efrain 1
@mod @mod_assign
2
Feature: In an assignment, students start a new attempt based on their previous one
3
  In order to improve my submission
4
  As a student
5
  I need to submit my assignment editing an online form, receive feedback, and then improve my submission.
6
 
7
  @javascript
8
  Scenario: Submit a text online and edit the submission
9
    Given the following "courses" exist:
10
      | fullname | shortname | category | groupmode |
11
      | Course 1 | C1 | 0 | 1 |
12
    And the following "activity" exists:
13
      | activity                            | assign                  |
14
      | course                              | C1                      |
15
      | name                                | Test assignment name    |
16
      | intro                               | Submit your online text |
17
      | assignsubmission_onlinetext_enabled | 1                       |
18
      | assignsubmission_file_enabled       | 0                       |
19
      | attemptreopenmethod                 | manual                  |
20
      | hidegrader                          | 1                       |
21
      | submissiondrafts                    | 0                       |
22
    And the following "users" exist:
23
      | username  | firstname  | lastname  | email                 |
24
      | teacher1  | Teacher    | 1         | teacher1@example.com  |
25
      | student1  | Student    | 1         | student1@example.com  |
26
    And the following "course enrolments" exist:
27
      | user      | course  | role            |
28
      | teacher1  | C1      | editingteacher  |
29
      | student1  | C1      | student         |
30
    And the following "mod_assign > submissions" exist:
31
      | assign                | user      | onlinetext                       |
32
      | Test assignment name  | student1  | I'm the student first submission |
33
 
34
    And I am on the "Test assignment name" Activity page logged in as teacher1
35
    And I follow "View all submissions"
36
    And I click on "Grade" "link" in the "Student 1" "table_row"
37
    And I set the following fields to these values:
38
      | Allow another attempt | 1 |
39
    And I press "Save changes"
40
    And I click on "Edit settings" "link"
41
    And I log out
42
 
43
    When I am on the "Test assignment name" Activity page logged in as student1
44
    Then I should not see "Teacher 1"
45
    And I press "Add a new attempt based on previous submission"
46
    And I press "Save changes"
47
    And I log out
48
 
49
    And I am on the "Test assignment name" Activity page logged in as teacher1
50
    And I follow "View all submissions"
51
    And I click on "Grade" "link" in the "Student 1" "table_row"
52
    And I should see "I'm the student first submission"
53
 
54
  @javascript @_alert
55
  Scenario: Allow new attempt does not display incorrect error message on group submission
56
    Given the following "courses" exist:
57
      | fullname | shortname | category | groupmode |
58
      | Course 1 | C1 | 0 | 1 |
59
    And the following "users" exist:
60
      | username | firstname | lastname | email |
61
      | teacher1 | Teacher | 1 | teacher1@example.com |
62
      | student1 | Student | 1 | student1@example.com |
63
      | student2 | Student | 2 | student2@example.com |
64
      | student3 | Student | 3 | student3@example.com |
65
      | student4 | Student | 4 | student4@example.com |
66
    And the following "course enrolments" exist:
67
      | user | course | role |
68
      | teacher1 | C1 | editingteacher |
69
      | student1 | C1 | student |
70
      | student2 | C1 | student |
71
      | student3 | C1 | student |
72
      | student4 | C1 | student |
73
    And the following "groups" exist:
74
      | name | course | idnumber |
75
      | Group 1 | C1 | G1 |
76
      | Group 2 | C1 | G2 |
77
    And the following "group members" exist:
78
      | user | group |
79
      | student1 | G1 |
80
      | student2 | G1 |
81
      | student3 | G2 |
82
      | student4 | G2 |
83
 
84
    And the following "activity" exists:
85
      | activity                             | assign                |
86
      | course                               | C1                    |
87
      | name                                 | Test assignment name  |
88
      | assignsubmission_onlinetext_enabled  | 1                     |
89
      | assignsubmission_file_enabled        | 0                     |
90
      | attemptreopenmethod                  | manual                |
91
      | submissiondrafts                     | 0                     |
92
      | groupmode                            | 1                     |
93
      | teamsubmission                       | 1                     |
94
      | hidegrader                           | 1                     |
95
      | maxattempts                          | 3                     |
96
    And the following "mod_assign > submissions" exist:
97
      | assign                | user      | onlinetext                        |
98
      | Test assignment name  | student1  | I'm the student first submission  |
99
 
100
    And I am on the "Test assignment name" Activity page logged in as teacher1
101
    When I follow "View all submissions"
102
    Then "Student 1" row "Status" column of "generaltable" table should contain "Submitted for grading"
103
    And "Student 2" row "Status" column of "generaltable" table should contain "Submitted for grading"
104
    And "Student 3" row "Status" column of "generaltable" table should contain "No submission"
105
    And "Student 4" row "Status" column of "generaltable" table should contain "No submission"
106
    And I click on "Quick grading" "checkbox"
107
    And I click on "Student 1" "checkbox"
108
    And I set the field "User grade" to "60.0"
109
    And I press "Save all quick grading changes"
110
    And I should see "The grade changes were saved"
111
    And I press "Continue"
112
    And I click on "Student 1" "checkbox"
113
    And I set the following fields to these values:
114
      | operation | Allow another attempt |
115
    And I click on "Go" "button" confirming the dialogue
116
    And I should not see "The grades were not saved because someone has modified one or more records more recently than when you loaded the page."
117
    And I log out
118
    And I am on the "Test assignment name" Activity page logged in as student3
119
    And I should see "This is attempt 1 ( 3 attempts allowed )."
120
    And I press "Add submission"
121
    And I set the following fields to these values:
122
      | Online text | I'm the student's 3 group 2 first attempt |
123
    And I press "Save changes"
124
    And I log out
125
 
126
    And I am on the "Test assignment name" Activity page logged in as teacher1
127
    And I follow "View all submissions"
128
    And "Student 1" row "Status" column of "generaltable" table should contain "Reopened"
129
    And "Student 2" row "Status" column of "generaltable" table should contain "Reopened"
130
    And "Student 3" row "Status" column of "generaltable" table should contain "Submitted for grading"
131
    And "Student 4" row "Status" column of "generaltable" table should contain "Submitted for grading"
132
    And I click on "Grade" "link" in the "Student 3" "table_row"
133
    And I set the following fields to these values:
134
      | Allow another attempt | 1 |
135
    And I press "Save changes"
136
    And I follow "Assignment: Test assignment name"
137
    And I log out
138
 
139
    And I am on the "Test assignment name" Activity page logged in as student4
140
    And I should see "This is attempt 2 ( 3 attempts allowed )."
141
    And I press "Add a new attempt"
142
    And I set the following fields to these values:
143
      | Online text | I'm the student's 4 group 2 second attempt |
144
    And I press "Save changes"
145
    And I log out
146
 
147
    And I am on the "Test assignment name" Activity page logged in as teacher1
148
    And I select "Group 2" from the "group" singleselect
149
    And I click on "Grade" "link" in the ".tertiary-navigation" "css_element"
150
    And I should see "2" in the "#id_attemptsettings" "css_element"