From cd79117d49b2dd845d2572dd5d36f2c3b9909b7e Mon Sep 17 00:00:00 2001 From: Benjamin Franzke Date: Thu, 24 Jan 2013 15:59:52 +0100 Subject: Add required capability addinstance --- sqlbox/db/access.php | 12 ++++++++++++ sqlbox/lang/en/sqlbox.php | 1 + sqlbox/version.php | 2 +- 3 files changed, 14 insertions(+), 1 deletion(-) (limited to 'sqlbox') diff --git a/sqlbox/db/access.php b/sqlbox/db/access.php index 5549ae4..12f678c 100644 --- a/sqlbox/db/access.php +++ b/sqlbox/db/access.php @@ -50,6 +50,18 @@ defined('MOODLE_INTERNAL') || die(); $capabilities = array( + 'mod/sqlbox:addinstance' => array( + 'riskbitmask' => RISK_XSS, + + 'captype' => 'write', + 'contextlevel' => CONTEXT_COURSE, + 'archetypes' => array( + 'editingteacher' => CAP_ALLOW, + 'manager' => CAP_ALLOW + ), + 'clonepermissionsfrom' => 'moodle/course:manageactivities' + ), + /***************************** remove these comment marks and modify the code as needed 'mod/sqlbox:view' => array( 'captype' => 'read', diff --git a/sqlbox/lang/en/sqlbox.php b/sqlbox/lang/en/sqlbox.php index da9c7a2..a522198 100644 --- a/sqlbox/lang/en/sqlbox.php +++ b/sqlbox/lang/en/sqlbox.php @@ -37,5 +37,6 @@ $string['sqlboxfieldset'] = 'Custom example fieldset'; $string['sqlboxname'] = 'sqlbox name'; $string['sqlboxname_help'] = 'This is the content of the help tooltip associated with the sqlboxname field. Markdown syntax is supported.'; $string['sqlbox'] = 'sqlbox'; +$string['sqlbox:addinstancce'] = 'Add a new sqlbox'; $string['pluginadministration'] = 'sqlbox administration'; $string['pluginname'] = 'sqlbox'; diff --git a/sqlbox/version.php b/sqlbox/version.php index 304185d..e1a165d 100644 --- a/sqlbox/version.php +++ b/sqlbox/version.php @@ -30,7 +30,7 @@ defined('MOODLE_INTERNAL') || die(); -$module->version = 2013012402; // The current module version (Date: YYYYMMDDXX) +$module->version = 2013012403; // The current module version (Date: YYYYMMDDXX) $module->requires = 2010031900; // Requires this Moodle version $module->cron = 0; // Period for cron to check this module (secs) $module->component = 'mod_sqlbox'; // To check on upgrade, that module sits in correct place -- cgit