Gitlab CSE Unil

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

Ajouté patch pour core (plugin standard assignfeedback_editpdf)

parent f648c181
diff --git a/mod/assign/feedback/editpdf/locallib.php b/mod/assign/feedback/editpdf/locallib.php
index a9a74e5..b87f347 100644
--- a/mod/assign/feedback/editpdf/locallib.php
+++ b/mod/assign/feedback/editpdf/locallib.php
@@ -344,6 +344,15 @@ class assign_feedback_editpdf extends assign_feedback_plugin {
* @return bool
*/
public function is_enabled() {
+ // HACK : account for existence of mod_assignfeedback_editpdfplus BEGIN
+ global $CFG;
+ if (file_exists($CFG->dirroot . '/mod/assign/feedback/editpdfplus/version.php')) {
+ if ($this->assignment->get_context()) {
+ return !has_capability('mod/assignfeedback_editpdfplus:use', $this->assignment->get_context(), null, false);
+ }
+ return false;
+ }
+ // HACK : account for existence of mod_assignfeedback_editpdfplus END
if ($this->enabledcache === null) {
$testpath = assignfeedback_editpdf\pdf::test_gs_path(false);
$this->enabledcache = ($testpath->status == assignfeedback_editpdf\pdf::GSPATH_OK);
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