Merge branch 'master_MDL-47431' of https://github.com/danmarsden/moodle

This commit is contained in:
Damyon Wiese 2014-10-15 14:52:42 +08:00
commit 87ea3e7e37

View File

@ -2092,7 +2092,7 @@ class global_navigation extends navigation_node {
$featuresfunc = $cm->modname.'_supports';
if (function_exists($featuresfunc) && $featuresfunc(FEATURE_ADVANCED_GRADING)) {
require_once($CFG->dirroot.'/grade/grading/lib.php');
$gradingman = get_grading_manager($cm->context, $cm->modname);
$gradingman = get_grading_manager($cm->context, 'mod_'.$cm->modname);
$gradingman->extend_navigation($this, $activity);
}
@ -3970,7 +3970,7 @@ class settings_navigation extends navigation_node {
$featuresfunc = $this->page->activityname.'_supports';
if (function_exists($featuresfunc) && $featuresfunc(FEATURE_ADVANCED_GRADING) && has_capability('moodle/grade:managegradingforms', $this->page->cm->context)) {
require_once($CFG->dirroot.'/grade/grading/lib.php');
$gradingman = get_grading_manager($this->page->cm->context, $this->page->activityname);
$gradingman = get_grading_manager($this->page->cm->context, 'mod_'.$this->page->activityname);
$gradingman->extend_settings_navigation($this, $modulenode);
}