From a2ac012486aa147164e965d815fd7a48946c7e12 Mon Sep 17 00:00:00 2001 From: fs959857 <fs959857@ITC18143.win.rz.rwth-aachen.de> Date: Thu, 26 Mar 2020 10:48:14 +0100 Subject: [PATCH] Add riskbitmask to capabilities --- db/access.php | 8 +++++++- version.php | 2 +- 2 files changed, 8 insertions(+), 2 deletions(-) diff --git a/db/access.php b/db/access.php index dd4e0a0..41bfa29 100644 --- a/db/access.php +++ b/db/access.php @@ -58,6 +58,7 @@ $capabilities = array( ), 'mod/pdfannotator:create' => array ( // Create annotation or comment. + 'riskbitmask' => RISK_SPAM, 'captype' => 'write', 'contextlevel' => CONTEXT_MODULE, 'archetypes' => array( @@ -80,6 +81,7 @@ $capabilities = array( ), 'mod/pdfannotator:deleteany' => array ( // Delete all comments or annotations (including comments/annotations by other users). + 'riskbitmask' => RISK_DATALOSS, 'captype' => 'write', 'contextlevel' => CONTEXT_MODULE, 'archetypes' => array( @@ -110,6 +112,7 @@ $capabilities = array( ), 'mod/pdfannotator:edit' => array ( // Update/Edit own annotations or comments. + 'riskbitmask' => RISK_SPAM, 'captype' => 'write', 'contextlevel' => CONTEXT_MODULE, 'archetypes' => array( @@ -132,6 +135,7 @@ $capabilities = array( ), 'mod/pdfannotator:report' => array ( // Report comments. + 'riskbitmask' => RISK_SPAM, 'captype' => 'write', 'contextlevel' => CONTEXT_MODULE, 'archetypes' => array( @@ -186,7 +190,6 @@ $capabilities = array( ), 'mod/pdfannotator:markcorrectanswer' => array( // Mark answers as correct. - 'riskbitmask' => RISK_SPAM, 'captype' => 'write', 'contextlevel' => CONTEXT_MODULE, 'archetypes' => array( @@ -197,6 +200,7 @@ $capabilities = array( ), 'mod/pdfannotator:usetextbox' => array ( // Always use textbox (even if using textbox (for students) is disabled in settings). + 'riskbitmask' => RISK_SPAM, 'captype' => 'write', 'contextlevel' => CONTEXT_MODULE, 'archetypes' => array( @@ -207,6 +211,7 @@ $capabilities = array( ), 'mod/pdfannotator:usedrawing' => array ( // Always use drawing (even if using textbox (for students) is disabled in settings). + 'riskbitmask' => RISK_SPAM, 'captype' => 'write', 'contextlevel' => CONTEXT_MODULE, 'archetypes' => array( @@ -237,6 +242,7 @@ $capabilities = array( ), 'mod/pdfannotator:forwardquestions' => array ( // Forward a question (to an other teacher/manager). + 'riskbitmask' => RISK_SPAM, 'captype' => 'write', 'contextlevel' => CONTEXT_MODULE, 'archetypes' => array( diff --git a/version.php b/version.php index a1a4f18..077b349 100644 --- a/version.php +++ b/version.php @@ -25,6 +25,6 @@ defined('MOODLE_INTERNAL') || die(); $plugin->component = 'mod_pdfannotator'; // Full name of the plugin (used for diagnostics). -$plugin->version = 2020031600; // The current module version (Date: YYYYMMDDXX). +$plugin->version = 2020032600; // The current module version (Date: YYYYMMDDXX). $plugin->release = 'PDF Annotator v1.3 release 2'; $plugin->requires = 2016112900; // Requires this Moodle version. -- GitLab