Skip to content

Commit

Permalink
MDL-35665: Cherry-pick MDL-35389 : Fix an error when changing locked …
Browse files Browse the repository at this point in the history
…state of a assignment is changed
  • Loading branch information
Raymond Wijaya committed Sep 28, 2012
1 parent 9273bd1 commit b865c07
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion mod/assign/lib.php
Expand Up @@ -757,7 +757,9 @@ function assign_get_user_grades($assign, $userid=0) {
global $CFG; global $CFG;
require_once($CFG->dirroot . '/mod/assign/locallib.php'); 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); $assignment->set_instance($assign);
return $assignment->get_user_grades_for_gradebook($userid); return $assignment->get_user_grades_for_gradebook($userid);
} }
Expand Down

0 comments on commit b865c07

Please sign in to comment.