mirror of
https://github.com/moodle/moodle.git
synced 2025-03-18 06:31:22 +01:00
MDL-58006 assign: Reset blindmarking assignments to hidden
Fix to reset blindmarking assigments to hidden as part of Course reset with behat test
This commit is contained in:
parent
f68150ad05
commit
1a9e8542c5
@ -1130,11 +1130,11 @@ class assign {
|
||||
// Remove all grades from gradebook.
|
||||
require_once($CFG->dirroot.'/mod/assign/lib.php');
|
||||
assign_reset_gradebook($data->courseid);
|
||||
}
|
||||
|
||||
// Reset revealidentities if both submissions and grades have been reset.
|
||||
if ($this->get_instance()->blindmarking && $this->get_instance()->revealidentities) {
|
||||
$DB->set_field('assign', 'revealidentities', 0, array('id' => $this->get_instance()->id));
|
||||
}
|
||||
// Reset revealidentities for assign if blindmarking is enabled.
|
||||
if ($this->get_instance()->blindmarking) {
|
||||
$DB->set_field('assign', 'revealidentities', 0, array('id' => $this->get_instance()->id));
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -108,3 +108,25 @@ Feature: Assign reset
|
||||
And I follow "Test assignment name"
|
||||
And I navigate to "Group overrides" in current page administration
|
||||
Then I should not see "Group 1"
|
||||
|
||||
Scenario: Use course reset to reset blind marking assignment.
|
||||
Given I follow "Test assignment name"
|
||||
And I navigate to "Edit settings" in current page administration
|
||||
And I set the following fields to these values:
|
||||
| blindmarking | 1 |
|
||||
And I press "Save"
|
||||
When I follow "Test assignment name"
|
||||
And I navigate to "View all submissions" in current page administration
|
||||
And I select "Reveal student identities" from the "Grading action" singleselect
|
||||
And I press "Continue"
|
||||
And I should see "Sam1 Student1"
|
||||
And I am on "Course 1" course homepage
|
||||
When I navigate to "Reset" node in "Course administration"
|
||||
And I set the following fields to these values:
|
||||
| Delete all submissions | 1 |
|
||||
And I press "Reset course"
|
||||
And I press "Continue"
|
||||
And I am on "Course 1" course homepage
|
||||
And I follow "Test assignment name"
|
||||
And I navigate to "View all submissions" in current page administration
|
||||
Then I should not see "Sam1 Student1"
|
||||
|
Loading…
x
Reference in New Issue
Block a user