Permalink
Browse files

MDL-31731 gradeing form: Fix hardcoded module name

  • Loading branch information...
danpoltawski committed May 4, 2012
1 parent 0c053c5 commit 9fdbd69e22f4c7806f950e32e04b14289dd2a6aa
Showing with 2 additions and 2 deletions.
  1. +2 −2 grade/grading/form/guide/lib.php
@@ -338,7 +338,7 @@ protected function load_definition() {
$dbman = $DB->get_manager();
$modulename = substr($modulename, 4);
if ($dbman->table_exists($modulename)) {
$cm = get_coursemodule_from_id('assignment', $context->instanceid);
$cm = get_coursemodule_from_id('', $context->instanceid);
$this->moduleinstance = $DB->get_record($modulename, array("id"=>$cm->instance));
}
}
@@ -877,4 +877,4 @@ public function render_grading_element($page, $gradingformelement) {
$gradingformelement->getName(), $value, $this->validationerrors);
return $html;
}
}
}

0 comments on commit 9fdbd69

Please sign in to comment.