Commit d87ef085 authored by Sam Hemelryk's avatar Sam Hemelryk
Browse files

Merge branch 'MDL-29447' of git://github.com/timhunt/moodle

parents 811cbdcf 8dd9ccf4
......@@ -1269,12 +1269,14 @@ function quiz_reset_userdata($data) {
'error' => false);
// Remove all grades from gradebook
$DB->delete_records_select('quiz_grades',
'quiz IN (SELECT id FROM {quiz} WHERE course = ?)', array($data->courseid));
if (empty($data->reset_gradebook_grades)) {
quiz_reset_gradebook($data->courseid);
}
$status[] = array(
'component' => $componentstr,
'item' => get_string('attemptsdeleted', 'quiz'),
'item' => get_string('gradesdeleted', 'quiz'),
'error' => false);
}
......
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment