mirror of
https://github.com/moodle/moodle.git
synced 2025-08-05 17:06:53 +02:00
MDL-55505 mod_assign: Editing previous attempt works correctly.
Editing a previous attempt keeps the current feedback and grades as it should and does not override them.
This commit is contained in:
parent
0344082208
commit
a14cde804e
2 changed files with 4 additions and 3 deletions
|
@ -3165,9 +3165,9 @@ class assign {
|
||||||
if ($attemptnumber < 0 || $create) {
|
if ($attemptnumber < 0 || $create) {
|
||||||
// Make sure this grade matches the latest submission attempt.
|
// Make sure this grade matches the latest submission attempt.
|
||||||
if ($this->get_instance()->teamsubmission) {
|
if ($this->get_instance()->teamsubmission) {
|
||||||
$submission = $this->get_group_submission($userid, 0, true);
|
$submission = $this->get_group_submission($userid, 0, true, $attemptnumber);
|
||||||
} else {
|
} else {
|
||||||
$submission = $this->get_user_submission($userid, true);
|
$submission = $this->get_user_submission($userid, true, $attemptnumber);
|
||||||
}
|
}
|
||||||
if ($submission) {
|
if ($submission) {
|
||||||
$attemptnumber = $submission->attemptnumber;
|
$attemptnumber = $submission->attemptnumber;
|
||||||
|
|
|
@ -73,6 +73,7 @@ Feature: In an assignment, teachers can edit feedback for a students previous su
|
||||||
Then I log in as "student2"
|
Then I log in as "student2"
|
||||||
And I follow "Course 1"
|
And I follow "Course 1"
|
||||||
And I follow "Test assignment name"
|
And I follow "Test assignment name"
|
||||||
And I click on ".mod-assign-history-link" "css_element"
|
|
||||||
And I should see "I'm the teacher second feedback" in the "Feedback comments" "table_row"
|
And I should see "I'm the teacher second feedback" in the "Feedback comments" "table_row"
|
||||||
And I should see "50.00"
|
And I should see "50.00"
|
||||||
|
And I click on ".mod-assign-history-link" "css_element"
|
||||||
|
And I should not see "I'm the teacher second feedback" in the "Feedback comments" "table_row"
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue