From dbba863bb665bac4f7b8a1a52b404d5260ce9f50 Mon Sep 17 00:00:00 2001 From: Tim Schroeder <t.schroeder@itc.rwth-aachen.de> Date: Tue, 11 Apr 2023 17:33:50 +0200 Subject: [PATCH] made plugin work again with moodle 3 --- lib.php | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/lib.php b/lib.php index fa904af..c3f16b6 100644 --- a/lib.php +++ b/lib.php @@ -23,6 +23,14 @@ defined('MOODLE_INTERNAL') || die; require_once($CFG->dirroot . '/mod/pdfannotator/locallib.php'); +// Ugly hack to make 3.11 and 4.0 work seamlessly. +if (!defined('FEATURE_MOD_PURPOSE')) { + define('FEATURE_MOD_PURPOSE', 'mod_purpose'); +} +if (!defined('MOD_PURPOSE_COMMUNICATION')) { + define('MOD_PURPOSE_COMMUNICATION', 'communication'); +} + /** * List of features supported in pdfannotator module * @param string $feature FEATURE_xx constant for requested feature -- GitLab