Gitlab CSE Unil
Skip to content
GitLab
Menu
Projects
Groups
Snippets
/
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
Menu
Open sidebar
M. Chardon
moodle-assignfeedback_editpdfplus
Commits
f71887af
Commit
f71887af
authored
May 29, 2017
by
Nicolas.Dunand
Browse files
Ajouté patch pour core (plugin standard assignfeedback_editpdf)
parent
f648c181
Changes
1
Hide whitespace changes
Inline
Side-by-side
editpdfplus.patch
0 → 100644
View file @
f71887af
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);
Write
Preview
Supports
Markdown
0%
Try again
or
attach a new file
.
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment