Gitlab CSE Unil

Commit f648c181 authored by Nicolas.Dunand's avatar Nicolas.Dunand
Browse files

Fixed : capabilities namespace

parent 8256f616
...@@ -176,7 +176,7 @@ if ($action === 'pollconversions') { ...@@ -176,7 +176,7 @@ if ($action === 'pollconversions') {
} }
if ($refresh) { if ($refresh) {
$teachers = get_users_by_capability($context, 'mod/assignfeedback_editpdf:notify'); $teachers = get_users_by_capability($context, 'mod/assignfeedback_editpdfplus:notify');
$contextb = $assignment->get_context(); $contextb = $assignment->get_context();
$course = $assignment->get_course(); $course = $assignment->get_course();
$coursemodule = $assignment->get_course_module(); $coursemodule = $assignment->get_course_module();
......
...@@ -26,13 +26,13 @@ ...@@ -26,13 +26,13 @@
defined('MOODLE_INTERNAL') || die(); defined('MOODLE_INTERNAL') || die();
$capabilities = array( $capabilities = array(
'mod/assignfeedback_editpdf:use' => array( 'mod/assignfeedback_editpdfplus:use' => array(
'captype' => 'write', 'captype' => 'write',
'contextlevel' => CONTEXT_MODULE, 'contextlevel' => CONTEXT_MODULE,
'archetypes' => array( 'archetypes' => array(
) )
), ),
'mod/assignfeedback_editpdf:notify' => array( 'mod/assignfeedback_editpdfplus:notify' => array(
'captype' => 'read', 'captype' => 'read',
'contextlevel' => CONTEXT_MODULE, 'contextlevel' => CONTEXT_MODULE,
'archetypes' => array( 'archetypes' => array(
......
...@@ -104,4 +104,7 @@ $string['statut_select_ko'] = 'no OK'; ...@@ -104,4 +104,7 @@ $string['statut_select_ko'] = 'no OK';
$string['send_pdf_update'] = 'Send'; $string['send_pdf_update'] = 'Send';
$string['student_statut_nc'] = 'Todo'; $string['student_statut_nc'] = 'Todo';
$string['student_answer_lib'] = 'Answer'; $string['student_answer_lib'] = 'Answer';
$string['assignfeedback_editpdf:use'] = 'Use the plugin'; $string['editpdfplus:use'] = 'Use the plugin';
$string['editpdfplus:notify'] = 'Receive notifications';
...@@ -104,4 +104,7 @@ $string['statut_select_ko'] = 'non OK'; ...@@ -104,4 +104,7 @@ $string['statut_select_ko'] = 'non OK';
$string['send_pdf_update'] = 'Envoyer'; $string['send_pdf_update'] = 'Envoyer';
$string['student_statut_nc'] = 'non traité'; $string['student_statut_nc'] = 'non traité';
$string['student_answer_lib'] = 'Réponse'; $string['student_answer_lib'] = 'Réponse';
$string['assignfeedback_editpdf:use'] = 'Utiliser le plugin'; $string['editpdfplus:use'] = 'Utiliser le plugin';
$string['editpdfplus:notify'] = 'Recevoir les notifications';
...@@ -297,7 +297,7 @@ class assign_feedback_editpdfplus extends assign_feedback_plugin { ...@@ -297,7 +297,7 @@ class assign_feedback_editpdfplus extends assign_feedback_plugin {
if ($this->enabledcache === null) { if ($this->enabledcache === null) {
$testpath = assignfeedback_editpdfplus\pdf::test_gs_path(false); $testpath = assignfeedback_editpdfplus\pdf::test_gs_path(false);
if ($this->assignment->get_context()) { if ($this->assignment->get_context()) {
$this->enabledcache = ($testpath->status == assignfeedback_editpdfplus\pdf::GSPATH_OK) && has_capability('mod/assignfeedback_editpdf:use', $this->assignment->get_context(), null, false); $this->enabledcache = ($testpath->status == assignfeedback_editpdfplus\pdf::GSPATH_OK) && has_capability('mod/assignfeedback_editpdfplus:use', $this->assignment->get_context(), null, false);
} else { } else {
$this->enabledcache = false; $this->enabledcache = false;
} }
......
Supports Markdown
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