diff --git a/lib/gradelib.php b/lib/gradelib.php index 967340a5723..4b1cf8246d8 100644 --- a/lib/gradelib.php +++ b/lib/gradelib.php @@ -1115,8 +1115,9 @@ function grade_recover_history_grades($userid, $courseid) { * @return bool true if ok, array of errors if problems found. Grade item id => error message */ function grade_regrade_final_grades($courseid, $userid=null, $updated_item=null, $progress=null) { - // This may take a very long time. + // This may take a very long time and extra memory. \core_php_time_limit::raise(); + raise_memory_limit(MEMORY_EXTRA); $course_item = grade_item::fetch_course_item($courseid);