Gitlab CSE Unil

Commit 1d973211 authored by M. Chardon's avatar M. Chardon
Browse files

bug configuration menu access

parent dcff1e14
......@@ -80,7 +80,7 @@ function assignfeedback_editpdfplus_pluginfile($course, $cm, context $context, $
* @param context_course $context
*/
function assignfeedback_editpdfplus_extend_navigation_course(navigation_node $navigation, stdClass $course, context_course $context) {
if (has_capability('assignfeedback/editpdfplus:use', $context, null, false) && has_capability('assignfeedback/editpdfplus:managetools', $context)) {
if (has_capability('assignfeedback/editpdfplus:managetools', $context)) {
$url = new moodle_url('/mod/assign/feedback/editpdfplus/view_admin.php', array('id' => $context->id));
$feedbackadminnode = navigation_node::create('Feedback : configuration', $url, navigation_node::TYPE_CUSTOM, 'Bars d\'outils', 'editpdfplusadmin', new pix_icon('i/grades', ""));
$navigation->add_node($feedbackadminnode);
......
......@@ -446,7 +446,7 @@ class assign_feedback_editpdfplus extends assign_feedback_plugin {
public function is_available() {
if ($this->enabledcache === null) {
$testpath = assignfeedback_editpdfplus\pdf::test_gs_path(false);
$this->enabledcache = $testpath->status == assignfeedback_editpdfplus\pdf::GSPATH_OK/* && has_capability('assignfeedback/editpdfplus:use', $this->assignment->get_context(), null, false) */;
$this->enabledcache = $testpath->status == assignfeedback_editpdfplus\pdf::GSPATH_OK;
}
return $this->enabledcache;
}
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment