Permalink
Browse files

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

…o MOODLE_23_STABLE
  • Loading branch information...
damyon committed May 10, 2013
2 parents f6735ae + 955a081 commit 4a727367e729f65d449abe7f23a7c5560a14c05c
Showing with 4 additions and 6 deletions.
  1. +1 −1 grade/export/lib.php
  2. +3 −5 grade/lib.php
View
@@ -413,6 +413,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.
@@ -123,10 +124,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 4a72736

Please sign in to comment.