Permalink
Browse files

Merge branch 'MDL-39535_m24' of https://github.com/markn86/moodle int…

…o MOODLE_24_STABLE
  • Loading branch information...
2 parents eb20802 + 7b178ab commit b97e174acf572af28df2bb7aed11c18f50812542 @damyon damyon committed May 10, 2013
Showing with 4 additions and 6 deletions.
  1. +1 −1 grade/export/lib.php
  2. +3 −5 grade/lib.php
View
@@ -427,6 +427,6 @@ public function close() {
function export_verify_grades($courseid) {
$regraderesult = grade_regrade_final_grades($courseid);
if (is_array($regraderesult)) {
- throw new moodle_exception('gradecantregrade', 'error', '', implode(',', $regraderesult));
+ throw new moodle_exception('gradecantregrade', 'error', '', implode(', ', array_unique($regraderesult)));
}
}
View
@@ -22,7 +22,8 @@
* @license http://www.gnu.org/copyleft/gpl.html GNU GPL v3 or later
*/
-require_once $CFG->libdir.'/gradelib.php';
+require_once($CFG->libdir . '/gradelib.php');
+require_once($CFG->dirroot . '/grade/export/lib.php');
/**
* This class iterates over all users that are graded in a course.
@@ -128,10 +129,7 @@ public function init() {
$this->close();
- $regraderesult = grade_regrade_final_grades($this->course->id);
- if (is_array($regraderesult)) {
- throw new moodle_exception('gradecantregrade', 'error', '', implode(',', $regraderesult));
- }
+ export_verify_grades($this->course->id);
$course_item = grade_item::fetch_course_item($this->course->id);
if ($course_item->needsupdate) {
// can not calculate all final grades - sorry

0 comments on commit b97e174

Please sign in to comment.