mirror of
https://github.com/moodle/moodle.git
synced 2025-08-05 08:56:36 +02:00
MDL-30771: Enable students to view rubric definition prior to submission
Also allow advanced grading plugin to extend course module navigation, it is not necessary only definition previewing Added option to rubric whether to show it to the students before submission and option to view description
This commit is contained in:
parent
baa5cd8240
commit
577c89644f
7 changed files with 152 additions and 12 deletions
|
@ -1854,6 +1854,7 @@ class global_navigation extends navigation_node {
|
|||
$cm = $modinfo->get_cm($cm->id);
|
||||
}
|
||||
|
||||
$activity->nodetype = navigation_node::NODETYPE_LEAF;
|
||||
$activity->make_active();
|
||||
$file = $CFG->dirroot.'/mod/'.$cm->modname.'/lib.php';
|
||||
$function = $cm->modname.'_extend_navigation';
|
||||
|
@ -1863,11 +1864,18 @@ class global_navigation extends navigation_node {
|
|||
if (function_exists($function)) {
|
||||
$activtyrecord = $DB->get_record($cm->modname, array('id' => $cm->instance), '*', MUST_EXIST);
|
||||
$function($activity, $course, $activtyrecord, $cm);
|
||||
return true;
|
||||
}
|
||||
}
|
||||
$activity->nodetype = navigation_node::NODETYPE_LEAF;
|
||||
return false;
|
||||
|
||||
// Allow the active advanced grading method plugin to append module navigation
|
||||
$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->extend_navigation($this, $activity);
|
||||
}
|
||||
|
||||
return $activity->has_children();
|
||||
}
|
||||
/**
|
||||
* Loads user specific information into the navigation in the appropriate place.
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue