Permalink
Browse files

Merge branch 'MDL-35665' of git://github.com/raymondAntonio/moodle in…

…to MOODLE_23_STABLE
  • Loading branch information...
2 parents 09e49e5 + b865c07 commit 05ab3435c042310171cd01d06c0b7410ab96138e @danpoltawski danpoltawski committed Oct 2, 2012
Showing with 3 additions and 1 deletion.
  1. +3 −1 mod/assign/lib.php
View
4 mod/assign/lib.php
@@ -757,7 +757,9 @@ function assign_get_user_grades($assign, $userid=0) {
global $CFG;
require_once($CFG->dirroot . '/mod/assign/locallib.php');
- $assignment = new assign(null, null, null);
+ $cm = get_coursemodule_from_instance('assign', $assign->id, 0, false, MUST_EXIST);
+ $context = context_module::instance($cm->id);
+ $assignment = new assign($context, null, null);
$assignment->set_instance($assign);
return $assignment->get_user_grades_for_gradebook($userid);
}

0 comments on commit 05ab343

Please sign in to comment.