diff --git a/blocks/activity_modules/db/access.php b/blocks/activity_modules/db/access.php new file mode 100644 index 00000000000..9041f65faef --- /dev/null +++ b/blocks/activity_modules/db/access.php @@ -0,0 +1,47 @@ +. + +/** + * Activity modules block caps. + * + * @package block_activity_modules + * @copyright Mark Nelson + * @license http://www.gnu.org/copyleft/gpl.html GNU GPL v3 or later + */ + +defined('MOODLE_INTERNAL') || die(); + +$capabilities = array( + + 'block/activity_modules:myaddinstance' => array( + 'captype' => 'write', + 'contextlevel' => CONTEXT_SYSTEM, + 'archetypes' => array( + 'user' => CAP_ALLOW + ) + ), + + 'block/activity_modules:addinstance' => array( + 'riskbitmask' => RISK_SPAM | RISK_XSS, + + 'captype' => 'write', + 'contextlevel' => CONTEXT_BLOCK, + 'archetypes' => array( + 'editingteacher' => CAP_ALLOW, + 'manager' => CAP_ALLOW + ) + ), +); diff --git a/blocks/activity_modules/lang/en/block_activity_modules.php b/blocks/activity_modules/lang/en/block_activity_modules.php index e7fd6e4317e..b4d4cfe88f7 100644 --- a/blocks/activity_modules/lang/en/block_activity_modules.php +++ b/blocks/activity_modules/lang/en/block_activity_modules.php @@ -23,4 +23,6 @@ * @license http://www.gnu.org/copyleft/gpl.html GNU GPL v3 or later */ +$string['activity_modules:addinstance'] = 'Add a new activities block'; +$string['activity_modules:myaddinstance'] = 'Add a new activities block to the My Moodle page'; $string['pluginname'] = 'Activities'; diff --git a/blocks/activity_modules/version.php b/blocks/activity_modules/version.php index 8758d2ceecf..320921935fc 100644 --- a/blocks/activity_modules/version.php +++ b/blocks/activity_modules/version.php @@ -25,6 +25,6 @@ defined('MOODLE_INTERNAL') || die(); -$plugin->version = 2012061700; // The current plugin version (Date: YYYYMMDDXX) +$plugin->version = 2012091600; // The current plugin version (Date: YYYYMMDDXX) $plugin->requires = 2012061700; // Requires this Moodle version $plugin->component = 'block_activity_modules'; // Full name of the plugin (used for diagnostics) diff --git a/blocks/admin_bookmarks/db/access.php b/blocks/admin_bookmarks/db/access.php new file mode 100644 index 00000000000..7ff3e92e409 --- /dev/null +++ b/blocks/admin_bookmarks/db/access.php @@ -0,0 +1,47 @@ +. + +/** + * Admin bookmarks block caps. + * + * @package block_admin_bookmarks + * @copyright Mark Nelson + * @license http://www.gnu.org/copyleft/gpl.html GNU GPL v3 or later + */ + +defined('MOODLE_INTERNAL') || die(); + +$capabilities = array( + + 'block/admin_bookmarks:myaddinstance' => array( + 'captype' => 'write', + 'contextlevel' => CONTEXT_SYSTEM, + 'archetypes' => array( + 'user' => CAP_ALLOW + ) + ), + + 'block/admin_bookmarks:addinstance' => array( + 'riskbitmask' => RISK_SPAM | RISK_XSS, + + 'captype' => 'write', + 'contextlevel' => CONTEXT_BLOCK, + 'archetypes' => array( + 'editingteacher' => CAP_ALLOW, + 'manager' => CAP_ALLOW + ) + ), +); diff --git a/blocks/admin_bookmarks/lang/en/block_admin_bookmarks.php b/blocks/admin_bookmarks/lang/en/block_admin_bookmarks.php index 8fbd9b380e4..6f78c0d09bb 100644 --- a/blocks/admin_bookmarks/lang/en/block_admin_bookmarks.php +++ b/blocks/admin_bookmarks/lang/en/block_admin_bookmarks.php @@ -23,5 +23,6 @@ * @license http://www.gnu.org/copyleft/gpl.html GNU GPL v3 or later */ +$string['admin_bookmarks:addinstance'] = 'Add a new admin bookmarks block'; +$string['admin_bookmarks:myaddinstance'] = 'Add a new admin bookmarks block to the My Moodle page'; $string['pluginname'] = 'Admin bookmarks'; - diff --git a/blocks/admin_bookmarks/version.php b/blocks/admin_bookmarks/version.php index 87f6ff93b07..691286c9633 100644 --- a/blocks/admin_bookmarks/version.php +++ b/blocks/admin_bookmarks/version.php @@ -25,6 +25,6 @@ defined('MOODLE_INTERNAL') || die(); -$plugin->version = 2012061700; // The current plugin version (Date: YYYYMMDDXX) +$plugin->version = 2012091600; // The current plugin version (Date: YYYYMMDDXX) $plugin->requires = 2012061700; // Requires this Moodle version $plugin->component = 'block_admin_bookmarks'; // Full name of the plugin (used for diagnostics) diff --git a/blocks/blog_menu/db/access.php b/blocks/blog_menu/db/access.php new file mode 100644 index 00000000000..205127e7904 --- /dev/null +++ b/blocks/blog_menu/db/access.php @@ -0,0 +1,47 @@ +. + +/** + * Blog menu block caps. + * + * @package block_blog_menu + * @copyright Mark Nelson + * @license http://www.gnu.org/copyleft/gpl.html GNU GPL v3 or later + */ + +defined('MOODLE_INTERNAL') || die(); + +$capabilities = array( + + 'block/blog_menu:myaddinstance' => array( + 'captype' => 'write', + 'contextlevel' => CONTEXT_SYSTEM, + 'archetypes' => array( + 'user' => CAP_ALLOW + ) + ), + + 'block/blog_menu:addinstance' => array( + 'riskbitmask' => RISK_SPAM | RISK_XSS, + + 'captype' => 'write', + 'contextlevel' => CONTEXT_BLOCK, + 'archetypes' => array( + 'editingteacher' => CAP_ALLOW, + 'manager' => CAP_ALLOW + ) + ), +); diff --git a/blocks/blog_menu/lang/en/block_blog_menu.php b/blocks/blog_menu/lang/en/block_blog_menu.php index 9a715dc9f0a..60f08a2a47a 100644 --- a/blocks/blog_menu/lang/en/block_blog_menu.php +++ b/blocks/blog_menu/lang/en/block_blog_menu.php @@ -23,5 +23,6 @@ * @license http://www.gnu.org/copyleft/gpl.html GNU GPL v3 or later */ +$string['blog_menu:addinstance'] = 'Add a new blog menu block'; +$string['blog_menu:myaddinstance'] = 'Add a new blog menu block to the My Moodle page'; $string['pluginname'] = 'Blog menu'; - diff --git a/blocks/blog_menu/version.php b/blocks/blog_menu/version.php index 3ce19886b21..0b58ac8abd5 100644 --- a/blocks/blog_menu/version.php +++ b/blocks/blog_menu/version.php @@ -25,6 +25,6 @@ defined('MOODLE_INTERNAL') || die(); -$plugin->version = 2012061700; // The current plugin version (Date: YYYYMMDDXX) +$plugin->version = 2012091600; // The current plugin version (Date: YYYYMMDDXX) $plugin->requires = 2012061700; // Requires this Moodle version $plugin->component = 'block_blog_menu'; // Full name of the plugin (used for diagnostics) diff --git a/blocks/blog_recent/db/access.php b/blocks/blog_recent/db/access.php new file mode 100644 index 00000000000..bcd56e9b8d0 --- /dev/null +++ b/blocks/blog_recent/db/access.php @@ -0,0 +1,47 @@ +. + +/** + * Blog recent block caps. + * + * @package block_blog_recent + * @copyright Mark Nelson + * @license http://www.gnu.org/copyleft/gpl.html GNU GPL v3 or later + */ + +defined('MOODLE_INTERNAL') || die(); + +$capabilities = array( + + 'block/blog_recent:myaddinstance' => array( + 'captype' => 'write', + 'contextlevel' => CONTEXT_SYSTEM, + 'archetypes' => array( + 'user' => CAP_ALLOW + ) + ), + + 'block/blog_recent:addinstance' => array( + 'riskbitmask' => RISK_SPAM | RISK_XSS, + + 'captype' => 'write', + 'contextlevel' => CONTEXT_BLOCK, + 'archetypes' => array( + 'editingteacher' => CAP_ALLOW, + 'manager' => CAP_ALLOW + ) + ), +); diff --git a/blocks/blog_recent/lang/en/block_blog_recent.php b/blocks/blog_recent/lang/en/block_blog_recent.php index 2315c56e350..fa1c8b8adf5 100644 --- a/blocks/blog_recent/lang/en/block_blog_recent.php +++ b/blocks/blog_recent/lang/en/block_blog_recent.php @@ -23,6 +23,8 @@ * @license http://www.gnu.org/copyleft/gpl.html GNU GPL v3 or later */ +$string['blog_recent:addinstance'] = 'Add a new recent blog entries block'; +$string['blog_recent:myaddinstance'] = 'Add a new recent blog entries block to the My Moodle page'; $string['norecentblogentries'] = 'No recent entries'; $string['numentriestodisplay'] = 'Number of recent entries to display'; $string['pluginname'] = 'Recent blog entries'; diff --git a/blocks/blog_recent/version.php b/blocks/blog_recent/version.php index dde30e032c5..9758711d2c4 100644 --- a/blocks/blog_recent/version.php +++ b/blocks/blog_recent/version.php @@ -25,6 +25,6 @@ defined('MOODLE_INTERNAL') || die(); -$plugin->version = 2012061700; // The current plugin version (Date: YYYYMMDDXX) +$plugin->version = 2012091600; // The current plugin version (Date: YYYYMMDDXX) $plugin->requires = 2012061700; // Requires this Moodle version $plugin->component = 'block_blog_recent'; // Full name of the plugin (used for diagnostics) diff --git a/blocks/blog_tags/db/access.php b/blocks/blog_tags/db/access.php new file mode 100644 index 00000000000..d1cd45b58f5 --- /dev/null +++ b/blocks/blog_tags/db/access.php @@ -0,0 +1,47 @@ +. + +/** + * Blog tags block caps. + * + * @package block_blog_tags + * @copyright Mark Nelson + * @license http://www.gnu.org/copyleft/gpl.html GNU GPL v3 or later + */ + +defined('MOODLE_INTERNAL') || die(); + +$capabilities = array( + + 'block/blog_tags:myaddinstance' => array( + 'captype' => 'write', + 'contextlevel' => CONTEXT_SYSTEM, + 'archetypes' => array( + 'user' => CAP_ALLOW + ) + ), + + 'block/blog_tags:addinstance' => array( + 'riskbitmask' => RISK_SPAM | RISK_XSS, + + 'captype' => 'write', + 'contextlevel' => CONTEXT_BLOCK, + 'archetypes' => array( + 'editingteacher' => CAP_ALLOW, + 'manager' => CAP_ALLOW + ) + ), +); diff --git a/blocks/blog_tags/lang/en/block_blog_tags.php b/blocks/blog_tags/lang/en/block_blog_tags.php index f271d372d2e..cc3c25e6f84 100644 --- a/blocks/blog_tags/lang/en/block_blog_tags.php +++ b/blocks/blog_tags/lang/en/block_blog_tags.php @@ -23,4 +23,6 @@ * @license http://www.gnu.org/copyleft/gpl.html GNU GPL v3 or later */ +$string['blog_tags:addinstance'] = 'Add a new blog tags block'; +$string['blog_tags:myaddinstance'] = 'Add a new blog tags block to the My Moodle page'; $string['pluginname'] = 'Blog tags'; diff --git a/blocks/blog_tags/version.php b/blocks/blog_tags/version.php index 2152f9d970b..237dd3e9acd 100644 --- a/blocks/blog_tags/version.php +++ b/blocks/blog_tags/version.php @@ -25,6 +25,6 @@ defined('MOODLE_INTERNAL') || die(); -$plugin->version = 2012061700; // The current plugin version (Date: YYYYMMDDXX) +$plugin->version = 2012091600; // The current plugin version (Date: YYYYMMDDXX) $plugin->requires = 2012061700; // Requires this Moodle version $plugin->component = 'block_blog_tags'; // Full name of the plugin (used for diagnostics) diff --git a/blocks/calendar_month/db/access.php b/blocks/calendar_month/db/access.php new file mode 100644 index 00000000000..0daa0231914 --- /dev/null +++ b/blocks/calendar_month/db/access.php @@ -0,0 +1,47 @@ +. + +/** + * Calendar month block caps. + * + * @package block_calendar_month + * @copyright Mark Nelson + * @license http://www.gnu.org/copyleft/gpl.html GNU GPL v3 or later + */ + +defined('MOODLE_INTERNAL') || die(); + +$capabilities = array( + + 'block/calendar_month:myaddinstance' => array( + 'captype' => 'write', + 'contextlevel' => CONTEXT_SYSTEM, + 'archetypes' => array( + 'user' => CAP_ALLOW + ) + ), + + 'block/calendar_month:addinstance' => array( + 'riskbitmask' => RISK_SPAM | RISK_XSS, + + 'captype' => 'write', + 'contextlevel' => CONTEXT_BLOCK, + 'archetypes' => array( + 'editingteacher' => CAP_ALLOW, + 'manager' => CAP_ALLOW + ) + ), +); diff --git a/blocks/calendar_month/lang/en/block_calendar_month.php b/blocks/calendar_month/lang/en/block_calendar_month.php index 8187b3c407d..887a1ef8378 100644 --- a/blocks/calendar_month/lang/en/block_calendar_month.php +++ b/blocks/calendar_month/lang/en/block_calendar_month.php @@ -23,4 +23,6 @@ * @license http://www.gnu.org/copyleft/gpl.html GNU GPL v3 or later */ +$string['calendar_month:addinstance'] = 'Add a new calendar block'; +$string['calendar_month:myaddinstance'] = 'Add a new calendar block to the My Moodle page'; $string['pluginname'] = 'Calendar'; diff --git a/blocks/calendar_month/version.php b/blocks/calendar_month/version.php index 449f0889ca6..72db71102da 100644 --- a/blocks/calendar_month/version.php +++ b/blocks/calendar_month/version.php @@ -25,6 +25,6 @@ defined('MOODLE_INTERNAL') || die(); -$plugin->version = 2012061700; // The current plugin version (Date: YYYYMMDDXX) +$plugin->version = 2012091600; // The current plugin version (Date: YYYYMMDDXX) $plugin->requires = 2012061700; // Requires this Moodle version $plugin->component = 'block_calendar_month'; // Full name of the plugin (used for diagnostics) diff --git a/blocks/calendar_upcoming/db/access.php b/blocks/calendar_upcoming/db/access.php new file mode 100644 index 00000000000..f323a0bd0e0 --- /dev/null +++ b/blocks/calendar_upcoming/db/access.php @@ -0,0 +1,47 @@ +. + +/** + * Calendar upcoming block caps. + * + * @package block_calendar_upcoming + * @copyright Mark Nelson + * @license http://www.gnu.org/copyleft/gpl.html GNU GPL v3 or later + */ + +defined('MOODLE_INTERNAL') || die(); + +$capabilities = array( + + 'block/calendar_upcoming:myaddinstance' => array( + 'captype' => 'write', + 'contextlevel' => CONTEXT_SYSTEM, + 'archetypes' => array( + 'user' => CAP_ALLOW + ) + ), + + 'block/calendar_upcoming:addinstance' => array( + 'riskbitmask' => RISK_SPAM | RISK_XSS, + + 'captype' => 'write', + 'contextlevel' => CONTEXT_BLOCK, + 'archetypes' => array( + 'editingteacher' => CAP_ALLOW, + 'manager' => CAP_ALLOW + ) + ), +); diff --git a/blocks/calendar_upcoming/lang/en/block_calendar_upcoming.php b/blocks/calendar_upcoming/lang/en/block_calendar_upcoming.php index 4d33bd945e5..130b716fac4 100644 --- a/blocks/calendar_upcoming/lang/en/block_calendar_upcoming.php +++ b/blocks/calendar_upcoming/lang/en/block_calendar_upcoming.php @@ -23,4 +23,6 @@ * @license http://www.gnu.org/copyleft/gpl.html GNU GPL v3 or later */ +$string['calendar_upcoming:addinstance'] = 'Add a new upcoming events block'; +$string['calendar_upcoming:myaddinstance'] = 'Add a new upcoming events block to the My Moodle page'; $string['pluginname'] = 'Upcoming events'; diff --git a/blocks/calendar_upcoming/version.php b/blocks/calendar_upcoming/version.php index 86d947bc1b8..e25aba65441 100644 --- a/blocks/calendar_upcoming/version.php +++ b/blocks/calendar_upcoming/version.php @@ -25,6 +25,6 @@ defined('MOODLE_INTERNAL') || die(); -$plugin->version = 2012061700; // The current plugin version (Date: YYYYMMDDXX) +$plugin->version = 2012091600; // The current plugin version (Date: YYYYMMDDXX) $plugin->requires = 2012061700; // Requires this Moodle version $plugin->component = 'block_calendar_upcoming'; // Full name of the plugin (used for diagnostics) diff --git a/blocks/comments/db/access.php b/blocks/comments/db/access.php new file mode 100644 index 00000000000..b3b10d36c02 --- /dev/null +++ b/blocks/comments/db/access.php @@ -0,0 +1,47 @@ +. + +/** + * Comments block caps. + * + * @package block_comments + * @copyright Mark Nelson + * @license http://www.gnu.org/copyleft/gpl.html GNU GPL v3 or later + */ + +defined('MOODLE_INTERNAL') || die(); + +$capabilities = array( + + 'block/comments:myaddinstance' => array( + 'captype' => 'write', + 'contextlevel' => CONTEXT_SYSTEM, + 'archetypes' => array( + 'user' => CAP_ALLOW + ) + ), + + 'block/comments:addinstance' => array( + 'riskbitmask' => RISK_SPAM | RISK_XSS, + + 'captype' => 'write', + 'contextlevel' => CONTEXT_BLOCK, + 'archetypes' => array( + 'editingteacher' => CAP_ALLOW, + 'manager' => CAP_ALLOW + ) + ), +); diff --git a/blocks/comments/lang/en/block_comments.php b/blocks/comments/lang/en/block_comments.php index ead57dbaf52..01c919adbaf 100644 --- a/blocks/comments/lang/en/block_comments.php +++ b/blocks/comments/lang/en/block_comments.php @@ -23,4 +23,6 @@ * @license http://www.gnu.org/copyleft/gpl.html GNU GPL v3 or later */ +$string['comments:myaddinstance'] = 'Add a new comments block to the My Moodle page'; +$string['comments:addinstance'] = 'Add a new comments block'; $string['pluginname'] = 'Comments'; diff --git a/blocks/comments/version.php b/blocks/comments/version.php index db0ee48d933..e1b711837d9 100644 --- a/blocks/comments/version.php +++ b/blocks/comments/version.php @@ -25,6 +25,6 @@ defined('MOODLE_INTERNAL') || die(); -$plugin->version = 2012061700; // The current plugin version (Date: YYYYMMDDXX) +$plugin->version = 2012091600; // The current plugin version (Date: YYYYMMDDXX) $plugin->requires = 2012061700; // Requires this Moodle version $plugin->component = 'block_comments'; // Full name of the plugin (used for diagnostics) diff --git a/blocks/community/db/access.php b/blocks/community/db/access.php new file mode 100644 index 00000000000..4242ee569a7 --- /dev/null +++ b/blocks/community/db/access.php @@ -0,0 +1,47 @@ +. + +/** + * Community block caps. + * + * @package block_community + * @copyright Mark Nelson + * @license http://www.gnu.org/copyleft/gpl.html GNU GPL v3 or later + */ + +defined('MOODLE_INTERNAL') || die(); + +$capabilities = array( + + 'block/community:myaddinstance' => array( + 'captype' => 'write', + 'contextlevel' => CONTEXT_SYSTEM, + 'archetypes' => array( + 'user' => CAP_ALLOW + ) + ), + + 'block/community:addinstance' => array( + 'riskbitmask' => RISK_SPAM | RISK_XSS, + + 'captype' => 'write', + 'contextlevel' => CONTEXT_BLOCK, + 'archetypes' => array( + 'editingteacher' => CAP_ALLOW, + 'manager' => CAP_ALLOW + ) + ), +); diff --git a/blocks/community/lang/en/block_community.php b/blocks/community/lang/en/block_community.php index ec78b5ad2c2..ef509e31501 100644 --- a/blocks/community/lang/en/block_community.php +++ b/blocks/community/lang/en/block_community.php @@ -19,7 +19,7 @@ * Strings for component 'block_community', language 'en', branch 'MOODLE_20_STABLE' * * @package block_community - * @author Jerome Mouneyrac + * @author Jerome Mouneyrac * @copyright 1999 onwards Martin Dougiamas {@link http://moodle.com} * @license http://www.gnu.org/copyleft/gpl.html GNU GPL v3 or later */ @@ -37,6 +37,8 @@ $string['audience_help'] = 'What kind of course are you looking for? As well as $string['blocks'] = 'Blocks'; $string['cannotselecttopsubject'] = 'Cannot select a top subject level'; $string['comments'] = 'Comments ({$a})'; +$string['community:addinstance'] = 'Add a new community finder block'; +$string['community:myaddinstance'] = 'Add a new community finder block to the My Moodle page'; $string['contentinfo'] = 'Subject: {$a->subject} - Audience: {$a->audience} - Educational level: {$a->educationallevel}'; $string['continue'] = 'Continue'; $string['contributors'] = ' - Contributors: {$a}'; diff --git a/blocks/community/version.php b/blocks/community/version.php index 18ca3c43fdc..77cf6081ca2 100644 --- a/blocks/community/version.php +++ b/blocks/community/version.php @@ -25,6 +25,6 @@ defined('MOODLE_INTERNAL') || die(); -$plugin->version = 2012061700; // The current plugin version (Date: YYYYMMDDXX) +$plugin->version = 2012091600; // The current plugin version (Date: YYYYMMDDXX) $plugin->requires = 2012061700; // Requires this Moodle version $plugin->component = 'block_community'; // Full name of the plugin (used for diagnostics) diff --git a/blocks/completionstatus/db/access.php b/blocks/completionstatus/db/access.php new file mode 100644 index 00000000000..91213c397eb --- /dev/null +++ b/blocks/completionstatus/db/access.php @@ -0,0 +1,47 @@ +. + +/** + * Completion status block caps. + * + * @package block_completionstatus + * @copyright Mark Nelson + * @license http://www.gnu.org/copyleft/gpl.html GNU GPL v3 or later + */ + +defined('MOODLE_INTERNAL') || die(); + +$capabilities = array( + + 'block/completionstatus:myaddinstance' => array( + 'captype' => 'write', + 'contextlevel' => CONTEXT_SYSTEM, + 'archetypes' => array( + 'user' => CAP_ALLOW + ) + ), + + 'block/completionstatus:addinstance' => array( + 'riskbitmask' => RISK_SPAM | RISK_XSS, + + 'captype' => 'write', + 'contextlevel' => CONTEXT_BLOCK, + 'archetypes' => array( + 'editingteacher' => CAP_ALLOW, + 'manager' => CAP_ALLOW + ) + ), +); diff --git a/blocks/completionstatus/lang/en/block_completionstatus.php b/blocks/completionstatus/lang/en/block_completionstatus.php index 6658c17dff4..3c90759f70b 100644 --- a/blocks/completionstatus/lang/en/block_completionstatus.php +++ b/blocks/completionstatus/lang/en/block_completionstatus.php @@ -1,6 +1,31 @@ . + +/** + * Strings for component 'block_completionstatus', language 'en', branch 'MOODLE_20_STABLE' + * + * @package block_completionstatus + * @copyright 1999 onwards Martin Dougiamas {@link http://moodle.com} + * @license http://www.gnu.org/copyleft/gpl.html GNU GPL v3 or later + */ + $string['completionprogressdetails'] = 'Completion progress details'; +$string['completionstatus:addinstance'] = 'Add a new course completion status block'; +$string['completionstatus:myaddinstance'] = 'Add a new course completion status block to the My Moodle page'; $string['criteriagroup'] = 'Criteria group'; $string['firstofsecond'] = '{$a->first} of {$a->second}'; $string['pluginname'] = 'Course completion status'; diff --git a/blocks/completionstatus/version.php b/blocks/completionstatus/version.php index f47016c9c35..c9fc3df83b9 100644 --- a/blocks/completionstatus/version.php +++ b/blocks/completionstatus/version.php @@ -26,7 +26,7 @@ defined('MOODLE_INTERNAL') || die(); -$plugin->version = 2012061700; // The current plugin version (Date: YYYYMMDDXX) +$plugin->version = 2012091600; // The current plugin version (Date: YYYYMMDDXX) $plugin->requires = 2012061700; // Requires this Moodle version $plugin->component = 'block_completionstatus'; $plugin->dependencies = array('report_completion' => 2012061700); \ No newline at end of file diff --git a/blocks/course_list/db/access.php b/blocks/course_list/db/access.php new file mode 100644 index 00000000000..8dfbfa686b5 --- /dev/null +++ b/blocks/course_list/db/access.php @@ -0,0 +1,47 @@ +. + +/** + * Course list block caps. + * + * @package block_course_list + * @copyright Mark Nelson + * @license http://www.gnu.org/copyleft/gpl.html GNU GPL v3 or later + */ + +defined('MOODLE_INTERNAL') || die(); + +$capabilities = array( + + 'block/course_list:myaddinstance' => array( + 'captype' => 'write', + 'contextlevel' => CONTEXT_SYSTEM, + 'archetypes' => array( + 'user' => CAP_ALLOW + ) + ), + + 'block/course_list:addinstance' => array( + 'riskbitmask' => RISK_SPAM | RISK_XSS, + + 'captype' => 'write', + 'contextlevel' => CONTEXT_BLOCK, + 'archetypes' => array( + 'editingteacher' => CAP_ALLOW, + 'manager' => CAP_ALLOW + ) + ), +); diff --git a/blocks/course_list/lang/en/block_course_list.php b/blocks/course_list/lang/en/block_course_list.php index 4e79fc13a4b..4265f45527c 100644 --- a/blocks/course_list/lang/en/block_course_list.php +++ b/blocks/course_list/lang/en/block_course_list.php @@ -27,6 +27,8 @@ $string['adminview'] = 'Admin view'; $string['allcourses'] = 'Admin user sees all courses'; $string['configadminview'] = 'What should the admin see in the course list block?'; $string['confighideallcourseslink'] = 'Hide "All courses" link at the bottom of the block. Link hiding does not affects Admin\'s view'; +$string['course_list:addinstance'] = 'Add a new courses block'; +$string['course_list:myaddinstance'] = 'Add a new courses block to the My Moodle page'; $string['hideallcourseslink'] = 'Hide All courses link'; $string['owncourses'] = 'Admin user sees own courses'; $string['pluginname'] = 'Courses'; diff --git a/blocks/course_list/version.php b/blocks/course_list/version.php index 79ab1afa496..d30f69b5e8d 100644 --- a/blocks/course_list/version.php +++ b/blocks/course_list/version.php @@ -25,6 +25,6 @@ defined('MOODLE_INTERNAL') || die(); -$plugin->version = 2012061700; // The current plugin version (Date: YYYYMMDDXX) +$plugin->version = 2012091600; // The current plugin version (Date: YYYYMMDDXX) $plugin->requires = 2012061700; // Requires this Moodle version $plugin->component = 'block_course_list'; // Full name of the plugin (used for diagnostics) diff --git a/blocks/course_overview/db/access.php b/blocks/course_overview/db/access.php new file mode 100644 index 00000000000..15ecf2c6487 --- /dev/null +++ b/blocks/course_overview/db/access.php @@ -0,0 +1,47 @@ +. + +/** + * Course overview block caps. + * + * @package block_course_overview + * @copyright Mark Nelson + * @license http://www.gnu.org/copyleft/gpl.html GNU GPL v3 or later + */ + +defined('MOODLE_INTERNAL') || die(); + +$capabilities = array( + + 'block/course_overview:myaddinstance' => array( + 'captype' => 'write', + 'contextlevel' => CONTEXT_SYSTEM, + 'archetypes' => array( + 'user' => CAP_ALLOW + ) + ), + + 'block/course_overview:addinstance' => array( + 'riskbitmask' => RISK_SPAM | RISK_XSS, + + 'captype' => 'write', + 'contextlevel' => CONTEXT_BLOCK, + 'archetypes' => array( + 'editingteacher' => CAP_ALLOW, + 'manager' => CAP_ALLOW + ) + ), +); diff --git a/blocks/course_overview/lang/en/block_course_overview.php b/blocks/course_overview/lang/en/block_course_overview.php index 0419efcf9e2..d7be8555e25 100644 --- a/blocks/course_overview/lang/en/block_course_overview.php +++ b/blocks/course_overview/lang/en/block_course_overview.php @@ -21,12 +21,14 @@ * @copyright 2012 Adam Olley * @license http://www.gnu.org/copyleft/gpl.html GNU GPL v3 or later */ -$string['pluginname'] = 'Course overview'; + $string['activityoverview'] = 'You have {$a}s that need attention'; $string['alwaysshowall'] = 'Always Show All'; $string['collapseall'] = 'Collapse All Course Lists'; $string['configotherexpanded'] = 'If enabled, Other Courses will be expanded by default unless overriden by user preferences.'; $string['configpreservestates'] = 'If enabled, the collapsed/expanded states set by the user are stored and used on each load.'; +$string['course_overview:addinstance'] = 'Add a new course overview block'; +$string['course_overview:myaddinstance'] = 'Add a new course overview block to the My Moodle page'; $string['defaultmaxcourses'] = 'Default maximum courses'; $string['defaultmaxcoursesdesc'] = 'Maximum courses which should be displayed on course overview block, 0 will show all courses'; $string['expandall'] = 'Expand All Course Lists'; @@ -39,6 +41,7 @@ $string['messages'] = 'messages'; $string['movecoursehere'] = 'Move course here'; $string['numtodisplay'] = 'Number of courses to display: '; $string['otherexpanded'] = 'Other Courses Expanded'; +$string['pluginname'] = 'Course overview'; $string['preservestates'] = 'Preserve Expanded States'; $string['shortnameprefix'] = 'Includes {$a}'; $string['shortnamesufixsingular'] = ' (and {$a} other)'; @@ -50,4 +53,4 @@ $string['showwelcomeareadesc'] = 'Show the welcome area above the course list?'; $string['view_edit_profile'] = '(View and edit your profile.)'; $string['welcome'] = 'Welcome {$a}'; $string['youhavemessages'] = 'You have {$a} unread '; -$string['youhavenomessages'] = 'You have no unread '; \ No newline at end of file +$string['youhavenomessages'] = 'You have no unread '; diff --git a/blocks/course_overview/version.php b/blocks/course_overview/version.php index 4208588dab7..787f52b8a9d 100644 --- a/blocks/course_overview/version.php +++ b/blocks/course_overview/version.php @@ -24,6 +24,6 @@ defined('MOODLE_INTERNAL') || die(); -$plugin->version = 2012062800; // The current plugin version (Date: YYYYMMDDXX) +$plugin->version = 2012091600; // The current plugin version (Date: YYYYMMDDXX) $plugin->requires = 2012061700; // Requires this Moodle version $plugin->component = 'block_course_overview'; // Full name of the plugin (used for diagnostics) \ No newline at end of file diff --git a/blocks/course_summary/db/access.php b/blocks/course_summary/db/access.php new file mode 100644 index 00000000000..b34a101d850 --- /dev/null +++ b/blocks/course_summary/db/access.php @@ -0,0 +1,47 @@ +. + +/** + * Course summary block caps. + * + * @package block_course_summary + * @copyright Mark Nelson + * @license http://www.gnu.org/copyleft/gpl.html GNU GPL v3 or later + */ + +defined('MOODLE_INTERNAL') || die(); + +$capabilities = array( + + 'block/course_summary:myaddinstance' => array( + 'captype' => 'write', + 'contextlevel' => CONTEXT_SYSTEM, + 'archetypes' => array( + 'user' => CAP_ALLOW + ) + ), + + 'block/course_summary:addinstance' => array( + 'riskbitmask' => RISK_SPAM | RISK_XSS, + + 'captype' => 'write', + 'contextlevel' => CONTEXT_BLOCK, + 'archetypes' => array( + 'editingteacher' => CAP_ALLOW, + 'manager' => CAP_ALLOW + ) + ), +); diff --git a/blocks/course_summary/lang/en/block_course_summary.php b/blocks/course_summary/lang/en/block_course_summary.php index ca2b53b92c2..836cbfc9a4f 100644 --- a/blocks/course_summary/lang/en/block_course_summary.php +++ b/blocks/course_summary/lang/en/block_course_summary.php @@ -24,4 +24,6 @@ */ $string['coursesummary'] = 'Course summary'; +$string['course_summary:addinstance'] = 'Add a new course/site description block'; +$string['course_summary:myaddinstance'] = 'Add a new course/site description block to the My Moodle page'; $string['pluginname'] = 'Course/Site description'; diff --git a/blocks/course_summary/version.php b/blocks/course_summary/version.php index 482a4cb40c8..5e9801f6cf5 100644 --- a/blocks/course_summary/version.php +++ b/blocks/course_summary/version.php @@ -25,6 +25,6 @@ defined('MOODLE_INTERNAL') || die(); -$plugin->version = 2012061700; // The current plugin version (Date: YYYYMMDDXX) +$plugin->version = 2012091600; // The current plugin version (Date: YYYYMMDDXX) $plugin->requires = 2012061700; // Requires this Moodle version $plugin->component = 'block_course_summary'; // Full name of the plugin (used for diagnostics) diff --git a/blocks/feedback/db/access.php b/blocks/feedback/db/access.php new file mode 100644 index 00000000000..79829ec7de4 --- /dev/null +++ b/blocks/feedback/db/access.php @@ -0,0 +1,47 @@ +. + +/** + * Feedback block caps. + * + * @package block_feedback + * @copyright Mark Nelson + * @license http://www.gnu.org/copyleft/gpl.html GNU GPL v3 or later + */ + +defined('MOODLE_INTERNAL') || die(); + +$capabilities = array( + + 'block/feedback:myaddinstance' => array( + 'captype' => 'write', + 'contextlevel' => CONTEXT_SYSTEM, + 'archetypes' => array( + 'user' => CAP_ALLOW + ) + ), + + 'block/feedback:addinstance' => array( + 'riskbitmask' => RISK_SPAM | RISK_XSS, + + 'captype' => 'write', + 'contextlevel' => CONTEXT_BLOCK, + 'archetypes' => array( + 'editingteacher' => CAP_ALLOW, + 'manager' => CAP_ALLOW + ) + ), +); diff --git a/blocks/feedback/lang/en/block_feedback.php b/blocks/feedback/lang/en/block_feedback.php index 8d1bca4e6fe..ab696135c32 100644 --- a/blocks/feedback/lang/en/block_feedback.php +++ b/blocks/feedback/lang/en/block_feedback.php @@ -1,5 +1,30 @@ . + +/** + * Strings for component 'block_feedback', language 'en', branch 'MOODLE_20_STABLE' + * + * @package block_feedback + * @copyright 1999 onwards Martin Dougiamas {@link http://moodle.com} + * @license http://www.gnu.org/copyleft/gpl.html GNU GPL v3 or later + */ + $string['feedback'] = 'Feedback'; +$string['feedback:addinstance'] = 'Add a new feedback block'; +$string['feedback:myaddinstance'] = 'Add a new feedback block to the My Moodle page'; $string['missing_feedback_module'] = 'This blocks relies on the Feedback activity module, but that module is not present!'; +$string['pluginname'] = 'Feedback'; diff --git a/blocks/feedback/version.php b/blocks/feedback/version.php index cd36d5f401e..dee24211210 100644 --- a/blocks/feedback/version.php +++ b/blocks/feedback/version.php @@ -25,6 +25,6 @@ defined('MOODLE_INTERNAL') || die(); -$plugin->version = 2012061700; // The current plugin version (Date: YYYYMMDDXX) +$plugin->version = 2012091600; // The current plugin version (Date: YYYYMMDDXX) $plugin->requires = 2012061700; // Requires this Moodle version $plugin->component = 'block_feedback'; // Full name of the plugin (used for diagnostics) diff --git a/blocks/glossary_random/db/access.php b/blocks/glossary_random/db/access.php new file mode 100644 index 00000000000..f4c9bfeadf1 --- /dev/null +++ b/blocks/glossary_random/db/access.php @@ -0,0 +1,47 @@ +. + +/** + * Glossary random block caps. + * + * @package block_glossary_random + * @copyright Mark Nelson + * @license http://www.gnu.org/copyleft/gpl.html GNU GPL v3 or later + */ + +defined('MOODLE_INTERNAL') || die(); + +$capabilities = array( + + 'block/glossary_random:myaddinstance' => array( + 'captype' => 'write', + 'contextlevel' => CONTEXT_SYSTEM, + 'archetypes' => array( + 'user' => CAP_ALLOW + ) + ), + + 'block/glossary_random:addinstance' => array( + 'riskbitmask' => RISK_SPAM | RISK_XSS, + + 'captype' => 'write', + 'contextlevel' => CONTEXT_BLOCK, + 'archetypes' => array( + 'editingteacher' => CAP_ALLOW, + 'manager' => CAP_ALLOW + ) + ), +); diff --git a/blocks/glossary_random/lang/en/block_glossary_random.php b/blocks/glossary_random/lang/en/block_glossary_random.php index efcb980200f..ddb483d0c73 100644 --- a/blocks/glossary_random/lang/en/block_glossary_random.php +++ b/blocks/glossary_random/lang/en/block_glossary_random.php @@ -27,6 +27,8 @@ $string['addentry'] = 'Add your own favorite quotes!'; $string['askaddentry'] = 'When users can add entries to the glossary, show a link with this text'; $string['askinvisible'] = 'When users cannot edit or view the glossary, show this text (without link)'; $string['askviewglossary'] = 'When users can view the glossary but not add entries, show a link with this text'; +$string['glossary_random:addinstance'] = 'Add a new random glossary entry block'; +$string['glossary_random:myaddinstance'] = 'Add a new random glossary entry block to the My Moodle page'; $string['intro'] = 'Make sure you have at least one glossary with at least one entry added to this course. Then you can adjust the following settings'; $string['invisible'] = '(to be continued)'; $string['lastmodified'] = 'Last modified entry'; diff --git a/blocks/glossary_random/version.php b/blocks/glossary_random/version.php index 7a4ef6e0884..1d70116888d 100644 --- a/blocks/glossary_random/version.php +++ b/blocks/glossary_random/version.php @@ -25,6 +25,6 @@ defined('MOODLE_INTERNAL') || die(); -$plugin->version = 2012061700; // The current plugin version (Date: YYYYMMDDXX) +$plugin->version = 2012091600; // The current plugin version (Date: YYYYMMDDXX) $plugin->requires = 2012061700; // Requires this Moodle version $plugin->component = 'block_glossary_random'; // Full name of the plugin (used for diagnostics) diff --git a/blocks/html/db/access.php b/blocks/html/db/access.php new file mode 100644 index 00000000000..e0e9e07f014 --- /dev/null +++ b/blocks/html/db/access.php @@ -0,0 +1,47 @@ +. + +/** + * HTML block caps. + * + * @package block_html + * @copyright Mark Nelson + * @license http://www.gnu.org/copyleft/gpl.html GNU GPL v3 or later + */ + +defined('MOODLE_INTERNAL') || die(); + +$capabilities = array( + + 'block/html:myaddinstance' => array( + 'captype' => 'write', + 'contextlevel' => CONTEXT_SYSTEM, + 'archetypes' => array( + 'user' => CAP_ALLOW + ) + ), + + 'block/html:addinstance' => array( + 'riskbitmask' => RISK_SPAM | RISK_XSS, + + 'captype' => 'write', + 'contextlevel' => CONTEXT_BLOCK, + 'archetypes' => array( + 'editingteacher' => CAP_ALLOW, + 'manager' => CAP_ALLOW + ) + ), +); diff --git a/blocks/html/lang/en/block_html.php b/blocks/html/lang/en/block_html.php index d331059e3f7..47ebe4ab32b 100644 --- a/blocks/html/lang/en/block_html.php +++ b/blocks/html/lang/en/block_html.php @@ -29,6 +29,8 @@ $string['configclasses'] = 'Additional CSS classes'; $string['configclasses_help'] = 'The purpose of this configuration is to aid with theming by helping distinguish HTML blocks from each other. Any CSS classes entered here (space delimited) will be appended to the block\'s default classes.'; $string['configcontent'] = 'Content'; $string['configtitle'] = 'Block title'; +$string['html:addinstance'] = 'Add a new HTML block'; +$string['html:myaddinstance'] = 'Add a new HTML block to the My Moodle page'; $string['leaveblanktohide'] = 'leave blank to hide the title'; $string['newhtmlblock'] = '(new HTML block)'; $string['pluginname'] = 'HTML'; diff --git a/blocks/html/version.php b/blocks/html/version.php index 8ebbc49e20c..94b1efdd23e 100644 --- a/blocks/html/version.php +++ b/blocks/html/version.php @@ -25,6 +25,6 @@ defined('MOODLE_INTERNAL') || die(); -$plugin->version = 2012061700; // The current plugin version (Date: YYYYMMDDXX) +$plugin->version = 2012091600; // The current plugin version (Date: YYYYMMDDXX) $plugin->requires = 2012061700; // Requires this Moodle version $plugin->component = 'block_html'; // Full name of the plugin (used for diagnostics) diff --git a/blocks/login/db/access.php b/blocks/login/db/access.php new file mode 100644 index 00000000000..42776ca6882 --- /dev/null +++ b/blocks/login/db/access.php @@ -0,0 +1,47 @@ +. + +/** + * Login block caps. + * + * @package block_login + * @copyright Mark Nelson + * @license http://www.gnu.org/copyleft/gpl.html GNU GPL v3 or later + */ + +defined('MOODLE_INTERNAL') || die(); + +$capabilities = array( + + 'block/login:myaddinstance' => array( + 'captype' => 'write', + 'contextlevel' => CONTEXT_SYSTEM, + 'archetypes' => array( + 'user' => CAP_ALLOW + ) + ), + + 'block/login:addinstance' => array( + 'riskbitmask' => RISK_SPAM | RISK_XSS, + + 'captype' => 'write', + 'contextlevel' => CONTEXT_BLOCK, + 'archetypes' => array( + 'editingteacher' => CAP_ALLOW, + 'manager' => CAP_ALLOW + ) + ), +); diff --git a/blocks/login/lang/en/block_login.php b/blocks/login/lang/en/block_login.php index 1d5f117ffe4..83dd8dca3f0 100644 --- a/blocks/login/lang/en/block_login.php +++ b/blocks/login/lang/en/block_login.php @@ -23,4 +23,6 @@ * @license http://www.gnu.org/copyleft/gpl.html GNU GPL v3 or later */ +$string['login:addinstance'] = 'Add a new login block'; +$string['login:myaddinstance'] = 'Add a new login block to the My Moodle page'; $string['pluginname'] = 'Login'; diff --git a/blocks/login/version.php b/blocks/login/version.php index 60fead7fcb9..78f4d670bac 100644 --- a/blocks/login/version.php +++ b/blocks/login/version.php @@ -25,6 +25,6 @@ defined('MOODLE_INTERNAL') || die(); -$plugin->version = 2012061700; // The current plugin version (Date: YYYYMMDDXX) +$plugin->version = 2012091600; // The current plugin version (Date: YYYYMMDDXX) $plugin->requires = 2012061700; // Requires this Moodle version $plugin->component = 'block_login'; // Full name of the plugin (used for diagnostics) diff --git a/blocks/mentees/db/access.php b/blocks/mentees/db/access.php new file mode 100644 index 00000000000..cae7a4661bf --- /dev/null +++ b/blocks/mentees/db/access.php @@ -0,0 +1,47 @@ +. + +/** + * Mentees block caps. + * + * @package block_mentees + * @copyright Mark Nelson + * @license http://www.gnu.org/copyleft/gpl.html GNU GPL v3 or later + */ + +defined('MOODLE_INTERNAL') || die(); + +$capabilities = array( + + 'block/mentees:myaddinstance' => array( + 'captype' => 'write', + 'contextlevel' => CONTEXT_SYSTEM, + 'archetypes' => array( + 'user' => CAP_ALLOW + ) + ), + + 'block/mentees:addinstance' => array( + 'riskbitmask' => RISK_SPAM | RISK_XSS, + + 'captype' => 'write', + 'contextlevel' => CONTEXT_BLOCK, + 'archetypes' => array( + 'editingteacher' => CAP_ALLOW, + 'manager' => CAP_ALLOW + ) + ), +); diff --git a/blocks/mentees/lang/en/block_mentees.php b/blocks/mentees/lang/en/block_mentees.php index 7b443bbbc52..3a220578139 100644 --- a/blocks/mentees/lang/en/block_mentees.php +++ b/blocks/mentees/lang/en/block_mentees.php @@ -26,5 +26,7 @@ $string['configtitle'] = 'Block title'; $string['configtitleblankhides'] = 'Block title (no title if blank)'; $string['leaveblanktohide'] = 'leave blank to hide the title'; +$string['mentees:addinstance'] = 'Add a new mentees block'; +$string['mentees:myaddinstance'] = 'Add a new mentees block to the My Moodle page'; $string['newmenteesblock'] = '(new Mentees block)'; $string['pluginname'] = 'Mentees'; diff --git a/blocks/mentees/version.php b/blocks/mentees/version.php index 1642f311e8f..66f51a7de96 100644 --- a/blocks/mentees/version.php +++ b/blocks/mentees/version.php @@ -25,6 +25,6 @@ defined('MOODLE_INTERNAL') || die(); -$plugin->version = 2012061700; // The current plugin version (Date: YYYYMMDDXX) +$plugin->version = 2012091600; // The current plugin version (Date: YYYYMMDDXX) $plugin->requires = 2012061700; // Requires this Moodle version $plugin->component = 'block_mentees'; // Full name of the plugin (used for diagnostics) diff --git a/blocks/messages/db/access.php b/blocks/messages/db/access.php new file mode 100644 index 00000000000..9a8e7a1a13d --- /dev/null +++ b/blocks/messages/db/access.php @@ -0,0 +1,47 @@ +. + +/** + * Messages block caps. + * + * @package block_messages + * @copyright Mark Nelson + * @license http://www.gnu.org/copyleft/gpl.html GNU GPL v3 or later + */ + +defined('MOODLE_INTERNAL') || die(); + +$capabilities = array( + + 'block/messages:myaddinstance' => array( + 'captype' => 'write', + 'contextlevel' => CONTEXT_SYSTEM, + 'archetypes' => array( + 'user' => CAP_ALLOW + ) + ), + + 'block/messages:addinstance' => array( + 'riskbitmask' => RISK_SPAM | RISK_XSS, + + 'captype' => 'write', + 'contextlevel' => CONTEXT_BLOCK, + 'archetypes' => array( + 'editingteacher' => CAP_ALLOW, + 'manager' => CAP_ALLOW + ) + ), +); diff --git a/blocks/messages/lang/en/block_messages.php b/blocks/messages/lang/en/block_messages.php index 6f91fa3e503..b542a7a4774 100644 --- a/blocks/messages/lang/en/block_messages.php +++ b/blocks/messages/lang/en/block_messages.php @@ -23,4 +23,6 @@ * @license http://www.gnu.org/copyleft/gpl.html GNU GPL v3 or later */ +$string['messages:addinstance'] = 'Add a new messages block'; +$string['messages:myaddinstance'] = 'Add a new messages block to the My Moodle page'; $string['pluginname'] = 'Messages'; diff --git a/blocks/messages/version.php b/blocks/messages/version.php index 93c6a914018..8482826e0ea 100644 --- a/blocks/messages/version.php +++ b/blocks/messages/version.php @@ -25,6 +25,6 @@ defined('MOODLE_INTERNAL') || die(); -$plugin->version = 2012061700; // The current plugin version (Date: YYYYMMDDXX) +$plugin->version = 2012091600; // The current plugin version (Date: YYYYMMDDXX) $plugin->requires = 2012061700; // Requires this Moodle version $plugin->component = 'block_messages'; // Full name of the plugin (used for diagnostics) diff --git a/blocks/mnet_hosts/db/access.php b/blocks/mnet_hosts/db/access.php new file mode 100644 index 00000000000..2800a3df838 --- /dev/null +++ b/blocks/mnet_hosts/db/access.php @@ -0,0 +1,47 @@ +. + +/** + * Mnet hosts block caps. + * + * @package block_mnet_hosts + * @copyright Mark Nelson + * @license http://www.gnu.org/copyleft/gpl.html GNU GPL v3 or later + */ + +defined('MOODLE_INTERNAL') || die(); + +$capabilities = array( + + 'block/mnet_hosts:myaddinstance' => array( + 'captype' => 'write', + 'contextlevel' => CONTEXT_SYSTEM, + 'archetypes' => array( + 'user' => CAP_ALLOW + ) + ), + + 'block/mnet_hosts:addinstance' => array( + 'riskbitmask' => RISK_SPAM | RISK_XSS, + + 'captype' => 'write', + 'contextlevel' => CONTEXT_BLOCK, + 'archetypes' => array( + 'editingteacher' => CAP_ALLOW, + 'manager' => CAP_ALLOW + ) + ), +); diff --git a/blocks/mnet_hosts/lang/en/block_mnet_hosts.php b/blocks/mnet_hosts/lang/en/block_mnet_hosts.php index c8e273e9609..1da1a2adb2d 100644 --- a/blocks/mnet_hosts/lang/en/block_mnet_hosts.php +++ b/blocks/mnet_hosts/lang/en/block_mnet_hosts.php @@ -26,5 +26,7 @@ $string['error_authmnetneeded'] = 'MNet authentication plugin must be enabled to see the list of MNet network servers'; $string['error_localusersonly'] = 'Remote users can not jump to other MNet network servers from this host'; $string['error_roamcapabilityneeded'] = 'Users need the capability \'Roam to a remote application via MNet\' to see the list of MNet network servers'; +$string['mnet_hosts:addinstance'] = 'Add a new network servers block'; +$string['mnet_hosts:myaddinstance'] = 'Add a new network servers block to the My Moodle page'; $string['pluginname'] = 'Network servers'; $string['server'] = 'Server'; diff --git a/blocks/mnet_hosts/version.php b/blocks/mnet_hosts/version.php index 2548a40bfec..8f936c5bc74 100644 --- a/blocks/mnet_hosts/version.php +++ b/blocks/mnet_hosts/version.php @@ -25,6 +25,6 @@ defined('MOODLE_INTERNAL') || die(); -$plugin->version = 2012061700; // The current plugin version (Date: YYYYMMDDXX) +$plugin->version = 2012091600; // The current plugin version (Date: YYYYMMDDXX) $plugin->requires = 2012061700; // Requires this Moodle version $plugin->component = 'block_mnet_hosts'; // Full name of the plugin (used for diagnostics) diff --git a/blocks/moodleblock.class.php b/blocks/moodleblock.class.php index d5a20a254ac..c7ef9376c95 100644 --- a/blocks/moodleblock.class.php +++ b/blocks/moodleblock.class.php @@ -558,20 +558,48 @@ class block_base { function user_can_addto($page) { global $USER; - if (has_capability('moodle/block:edit', $page->context)) { + $capability = 'block/' . $this->name() . ':addinstance'; + if ($this->has_add_block_capability($page, $capability) + && has_capability('moodle/block:edit', $page->context)) { return true; } // The blocks in My Moodle are a special case and use a different capability. if (!empty($USER->id) - && $page->context->contextlevel == CONTEXT_USER // Page belongs to a user - && $page->context->instanceid == $USER->id) { // Page belongs to this user - return has_capability('moodle/my:manageblocks', $page->context); + && $page->context->contextlevel == CONTEXT_USER // Page belongs to a user + && $page->context->instanceid == $USER->id) { // Page belongs to this user + $capability = 'block/' . $this->name() . ':myaddinstance'; + return $this->has_add_block_capability($page, $capability) + && has_capability('moodle/my:manageblocks', $page->context); } return false; } + /** + * Returns true if the user can add a block to a page. + * + * @param moodle_page $page + * @param string $capability the capability to check + * @return boolean true if user can add a block, false otherwise. + */ + private function has_add_block_capability($page, $capability) { + // Check if the capability exists. + if (!get_capability_info($capability)) { + // Debug warning that the capability does not exist, but no more than once per page. + static $warned = array(); + if (!isset($warned[$this->name()])) { + debugging('The block ' .$this->name() . ' does not define the standard capability ' . + $capability , DEBUG_DEVELOPER); + $warned[$this->name()] = 1; + } + // If the capability does not exist, the block can always be added. + return true; + } else { + return has_capability($capability, $page->context); + } + } + static function get_extra_capabilities() { return array('moodle/block:view', 'moodle/block:edit'); } diff --git a/blocks/myprofile/db/access.php b/blocks/myprofile/db/access.php new file mode 100644 index 00000000000..413ab165cc0 --- /dev/null +++ b/blocks/myprofile/db/access.php @@ -0,0 +1,47 @@ +. + +/** + * My profile block caps. + * + * @package block_myprofile + * @copyright Mark Nelson + * @license http://www.gnu.org/copyleft/gpl.html GNU GPL v3 or later + */ + +defined('MOODLE_INTERNAL') || die(); + +$capabilities = array( + + 'block/myprofile:myaddinstance' => array( + 'captype' => 'write', + 'contextlevel' => CONTEXT_SYSTEM, + 'archetypes' => array( + 'user' => CAP_ALLOW + ) + ), + + 'block/myprofile:addinstance' => array( + 'riskbitmask' => RISK_SPAM | RISK_XSS, + + 'captype' => 'write', + 'contextlevel' => CONTEXT_BLOCK, + 'archetypes' => array( + 'editingteacher' => CAP_ALLOW, + 'manager' => CAP_ALLOW + ) + ), +); diff --git a/blocks/myprofile/lang/en/block_myprofile.php b/blocks/myprofile/lang/en/block_myprofile.php index 74dea912362..450b640cd55 100644 --- a/blocks/myprofile/lang/en/block_myprofile.php +++ b/blocks/myprofile/lang/en/block_myprofile.php @@ -24,8 +24,6 @@ * @license http://www.gnu.org/copyleft/gpl.html GNU GPL v3 or later */ -$string['pluginname'] = 'Logged in user'; -$string['myprofile_settings'] = 'Visible user information'; $string['contentsettings'] = 'Display settings for content region'; $string['display_picture'] = 'Display picture'; $string['display_country'] = 'Display country'; @@ -45,3 +43,7 @@ $string['display_firstaccess'] = 'Display first access'; $string['display_lastaccess'] = 'Display last access'; $string['display_currentlogin'] = 'Display current login'; $string['display_lastip'] = 'Display last IP'; +$string['myprofile:addinstance'] = 'Add a new logged in user block'; +$string['myprofile:myaddinstance'] = 'Add a new logged in user block to the My Moodle page'; +$string['myprofile_settings'] = 'Visible user information'; +$string['pluginname'] = 'Logged in user'; diff --git a/blocks/myprofile/version.php b/blocks/myprofile/version.php index 9e8f652af62..a2bbdcb2f7d 100644 --- a/blocks/myprofile/version.php +++ b/blocks/myprofile/version.php @@ -26,6 +26,6 @@ defined('MOODLE_INTERNAL') || die(); -$plugin->version = 2012061700; // The current plugin version (Date: YYYYMMDDXX) +$plugin->version = 2012091600; // The current plugin version (Date: YYYYMMDDXX) $plugin->requires = 2012061700; // Requires this Moodle version $plugin->component = 'block_myprofile'; // Full name of the plugin (used for diagnostics) diff --git a/blocks/navigation/db/access.php b/blocks/navigation/db/access.php new file mode 100644 index 00000000000..bdc6b8a395a --- /dev/null +++ b/blocks/navigation/db/access.php @@ -0,0 +1,47 @@ +. + +/** + * Navigation block caps. + * + * @package block_navigation + * @copyright Mark Nelson + * @license http://www.gnu.org/copyleft/gpl.html GNU GPL v3 or later + */ + +defined('MOODLE_INTERNAL') || die(); + +$capabilities = array( + + 'block/navigation:myaddinstance' => array( + 'captype' => 'write', + 'contextlevel' => CONTEXT_SYSTEM, + 'archetypes' => array( + 'user' => CAP_ALLOW + ) + ), + + 'block/navigation:addinstance' => array( + 'riskbitmask' => RISK_SPAM | RISK_XSS, + + 'captype' => 'write', + 'contextlevel' => CONTEXT_BLOCK, + 'archetypes' => array( + 'editingteacher' => CAP_ALLOW, + 'manager' => CAP_ALLOW + ) + ), +); diff --git a/blocks/navigation/lang/en/block_navigation.php b/blocks/navigation/lang/en/block_navigation.php index 1fb2aa3f191..c00d802f199 100644 --- a/blocks/navigation/lang/en/block_navigation.php +++ b/blocks/navigation/lang/en/block_navigation.php @@ -31,6 +31,8 @@ $string['courseactivities'] = 'Categories, courses, and course Activities'; $string['enabledockdesc'] = 'Allow the user to dock this block'; $string['expansionlimit'] = 'Generate navigation for the following'; $string['linkcategoriesdesc'] = 'Display categories as links'; +$string['navigation:addinstance'] = 'Add a new navigation block'; +$string['navigation:myaddinstance'] = 'Add a new navigation block to the My Moodle page'; $string['pluginname'] = 'Navigation'; $string['trimmode'] = 'Trim mode'; $string['trimmoderight'] = 'Trim characters from the right'; diff --git a/blocks/navigation/version.php b/blocks/navigation/version.php index b6454c733ed..8fa942a5fc3 100644 --- a/blocks/navigation/version.php +++ b/blocks/navigation/version.php @@ -24,6 +24,6 @@ defined('MOODLE_INTERNAL') || die(); -$plugin->version = 2012061700; // The current plugin version (Date: YYYYMMDDXX) +$plugin->version = 2012091600; // The current plugin version (Date: YYYYMMDDXX) $plugin->requires = 2012061700; // Requires this Moodle version $plugin->component = 'block_navigation'; // Full name of the plugin (used for diagnostics) diff --git a/blocks/news_items/db/access.php b/blocks/news_items/db/access.php new file mode 100644 index 00000000000..72b1aa689aa --- /dev/null +++ b/blocks/news_items/db/access.php @@ -0,0 +1,47 @@ +. + +/** + * News items block caps. + * + * @package block_news_items + * @copyright Mark Nelson + * @license http://www.gnu.org/copyleft/gpl.html GNU GPL v3 or later + */ + +defined('MOODLE_INTERNAL') || die(); + +$capabilities = array( + + 'block/news_items:myaddinstance' => array( + 'captype' => 'write', + 'contextlevel' => CONTEXT_SYSTEM, + 'archetypes' => array( + 'user' => CAP_ALLOW + ) + ), + + 'block/news_items:addinstance' => array( + 'riskbitmask' => RISK_SPAM | RISK_XSS, + + 'captype' => 'write', + 'contextlevel' => CONTEXT_BLOCK, + 'archetypes' => array( + 'editingteacher' => CAP_ALLOW, + 'manager' => CAP_ALLOW + ) + ), +); diff --git a/blocks/news_items/lang/en/block_news_items.php b/blocks/news_items/lang/en/block_news_items.php index d13568af953..d1ab3d86cbb 100644 --- a/blocks/news_items/lang/en/block_news_items.php +++ b/blocks/news_items/lang/en/block_news_items.php @@ -23,4 +23,6 @@ * @license http://www.gnu.org/copyleft/gpl.html GNU GPL v3 or later */ +$string['news_items:addinstance'] = 'Add a new latest news block'; +$string['news_items:myaddinstance'] = 'Add a new navigation block to the My Moodle page'; $string['pluginname'] = 'Latest news'; diff --git a/blocks/news_items/version.php b/blocks/news_items/version.php index 19f981432d5..1c9e875298c 100644 --- a/blocks/news_items/version.php +++ b/blocks/news_items/version.php @@ -25,6 +25,6 @@ defined('MOODLE_INTERNAL') || die(); -$plugin->version = 2012061700; // The current plugin version (Date: YYYYMMDDXX) +$plugin->version = 2012091600; // The current plugin version (Date: YYYYMMDDXX) $plugin->requires = 2012061700; // Requires this Moodle version $plugin->component = 'block_news_items'; // Full name of the plugin (used for diagnostics) diff --git a/blocks/online_users/db/access.php b/blocks/online_users/db/access.php index ff00c60bb00..bcfcfe60ee8 100644 --- a/blocks/online_users/db/access.php +++ b/blocks/online_users/db/access.php @@ -26,6 +26,25 @@ defined('MOODLE_INTERNAL') || die(); $capabilities = array( + 'block/online_users:myaddinstance' => array( + 'captype' => 'write', + 'contextlevel' => CONTEXT_SYSTEM, + 'archetypes' => array( + 'user' => CAP_ALLOW + ) + ), + + 'block/online_users:addinstance' => array( + 'riskbitmask' => RISK_SPAM | RISK_XSS, + + 'captype' => 'write', + 'contextlevel' => CONTEXT_BLOCK, + 'archetypes' => array( + 'editingteacher' => CAP_ALLOW, + 'manager' => CAP_ALLOW + ) + ), + 'block/online_users:viewlist' => array( 'captype' => 'read', @@ -40,5 +59,3 @@ $capabilities = array( ) ) ); - - diff --git a/blocks/online_users/lang/en/block_online_users.php b/blocks/online_users/lang/en/block_online_users.php index 360ef48fa38..034fce5fc5a 100644 --- a/blocks/online_users/lang/en/block_online_users.php +++ b/blocks/online_users/lang/en/block_online_users.php @@ -24,6 +24,8 @@ */ $string['configtimetosee'] = 'Number of minutes determining the period of inactivity after which a user is no longer considered to be online.'; +$string['online_users:addinstance'] = 'Add a new online users block'; +$string['online_users:myaddinstance'] = 'Add a new online users block to the My Moodle page'; $string['online_users:viewlist'] = 'View list of online users'; $string['periodnminutes'] = 'last {$a} minutes'; $string['pluginname'] = 'Online users'; diff --git a/blocks/online_users/version.php b/blocks/online_users/version.php index 34e50b512f1..5afa7ebd43f 100644 --- a/blocks/online_users/version.php +++ b/blocks/online_users/version.php @@ -25,6 +25,6 @@ defined('MOODLE_INTERNAL') || die(); -$plugin->version = 2012061700; // The current plugin version (Date: YYYYMMDDXX) +$plugin->version = 2012091600; // The current plugin version (Date: YYYYMMDDXX) $plugin->requires = 2012061700; // Requires this Moodle version $plugin->component = 'block_online_users'; // Full name of the plugin (used for diagnostics) diff --git a/blocks/participants/db/access.php b/blocks/participants/db/access.php new file mode 100644 index 00000000000..fcf3812fdac --- /dev/null +++ b/blocks/participants/db/access.php @@ -0,0 +1,47 @@ +. + +/** + * Participants block caps. + * + * @package block_participants + * @copyright Mark Nelson + * @license http://www.gnu.org/copyleft/gpl.html GNU GPL v3 or later + */ + +defined('MOODLE_INTERNAL') || die(); + +$capabilities = array( + + 'block/participants:myaddinstance' => array( + 'captype' => 'write', + 'contextlevel' => CONTEXT_SYSTEM, + 'archetypes' => array( + 'user' => CAP_ALLOW + ) + ), + + 'block/participants:addinstance' => array( + 'riskbitmask' => RISK_SPAM | RISK_XSS, + + 'captype' => 'write', + 'contextlevel' => CONTEXT_BLOCK, + 'archetypes' => array( + 'editingteacher' => CAP_ALLOW, + 'manager' => CAP_ALLOW + ) + ), +); diff --git a/blocks/participants/lang/en/block_participants.php b/blocks/participants/lang/en/block_participants.php index 134399646b1..fc2ec8b5011 100644 --- a/blocks/participants/lang/en/block_participants.php +++ b/blocks/participants/lang/en/block_participants.php @@ -23,4 +23,6 @@ * @license http://www.gnu.org/copyleft/gpl.html GNU GPL v3 or later */ +$string['participants:addinstance'] = 'Add a new people block'; +$string['participants:myaddinstance'] = 'Add a new people block to the My Moodle page'; $string['pluginname'] = 'People'; diff --git a/blocks/participants/version.php b/blocks/participants/version.php index ca8564f7835..eaa18599b5c 100644 --- a/blocks/participants/version.php +++ b/blocks/participants/version.php @@ -25,6 +25,6 @@ defined('MOODLE_INTERNAL') || die(); -$plugin->version = 2012061700; // The current plugin version (Date: YYYYMMDDXX) +$plugin->version = 2012091600; // The current plugin version (Date: YYYYMMDDXX) $plugin->requires = 2012061700; // Requires this Moodle version $plugin->component = 'block_participants'; // Full name of the plugin (used for diagnostics) diff --git a/blocks/private_files/db/access.php b/blocks/private_files/db/access.php new file mode 100644 index 00000000000..f2d059e6876 --- /dev/null +++ b/blocks/private_files/db/access.php @@ -0,0 +1,47 @@ +. + +/** + * Private files block caps. + * + * @package block_private_files + * @copyright Mark Nelson + * @license http://www.gnu.org/copyleft/gpl.html GNU GPL v3 or later + */ + +defined('MOODLE_INTERNAL') || die(); + +$capabilities = array( + + 'block/private_files:myaddinstance' => array( + 'captype' => 'write', + 'contextlevel' => CONTEXT_SYSTEM, + 'archetypes' => array( + 'user' => CAP_ALLOW + ) + ), + + 'block/private_files:addinstance' => array( + 'riskbitmask' => RISK_SPAM | RISK_XSS, + + 'captype' => 'write', + 'contextlevel' => CONTEXT_BLOCK, + 'archetypes' => array( + 'editingteacher' => CAP_ALLOW, + 'manager' => CAP_ALLOW + ) + ), +); diff --git a/blocks/private_files/lang/en/block_private_files.php b/blocks/private_files/lang/en/block_private_files.php index e3970e6fa3b..b672ddeb92a 100644 --- a/blocks/private_files/lang/en/block_private_files.php +++ b/blocks/private_files/lang/en/block_private_files.php @@ -26,3 +26,6 @@ $string['managemyfiles'] = 'Manage my files'; $string['pluginname'] = 'My private files'; $string['privatefiles'] = 'Private files'; +$string['private_files:addinstance'] = 'Add a new private files block'; +$string['private_files:myaddinstance'] = 'Add a new private files block to the My Moodle page'; + diff --git a/blocks/private_files/version.php b/blocks/private_files/version.php index d2737bf6335..3f5ec71ac5f 100644 --- a/blocks/private_files/version.php +++ b/blocks/private_files/version.php @@ -25,6 +25,6 @@ defined('MOODLE_INTERNAL') || die(); -$plugin->version = 2012061700; // The current plugin version (Date: YYYYMMDDXX) +$plugin->version = 2012091600; // The current plugin version (Date: YYYYMMDDXX) $plugin->requires = 2012061700; // Requires this Moodle version $plugin->component = 'block_private_files'; // Full name of the plugin (used for diagnostics) diff --git a/blocks/quiz_results/db/access.php b/blocks/quiz_results/db/access.php new file mode 100644 index 00000000000..e410cff8f78 --- /dev/null +++ b/blocks/quiz_results/db/access.php @@ -0,0 +1,47 @@ +. + +/** + * Quiz results block caps. + * + * @package block_quiz_results + * @copyright Mark Nelson + * @license http://www.gnu.org/copyleft/gpl.html GNU GPL v3 or later + */ + +defined('MOODLE_INTERNAL') || die(); + +$capabilities = array( + + 'block/quiz_results:myaddinstance' => array( + 'captype' => 'write', + 'contextlevel' => CONTEXT_SYSTEM, + 'archetypes' => array( + 'user' => CAP_ALLOW + ) + ), + + 'block/quiz_results:addinstance' => array( + 'riskbitmask' => RISK_SPAM | RISK_XSS, + + 'captype' => 'write', + 'contextlevel' => CONTEXT_BLOCK, + 'archetypes' => array( + 'editingteacher' => CAP_ALLOW, + 'manager' => CAP_ALLOW + ) + ), +); diff --git a/blocks/quiz_results/lang/en/block_quiz_results.php b/blocks/quiz_results/lang/en/block_quiz_results.php index b3bda7ff4f0..a035cbc4126 100644 --- a/blocks/quiz_results/lang/en/block_quiz_results.php +++ b/blocks/quiz_results/lang/en/block_quiz_results.php @@ -46,6 +46,8 @@ $string['error_emptyquizid'] = 'There is an error right now with this block: you $string['error_emptyquizrecord'] = 'There is an error right now with this block: the selected quiz does not seem to exist in the database.'; $string['error_nogroupsexist'] = 'There is an error right now with this block: it is set to display grades in group mode, but the course has no defined groups.'; $string['pluginname'] = 'Quiz results'; +$string['quiz_results:addinstance'] = 'Add a new quiz results block'; +$string['quiz_results:myaddinstance'] = 'Add a new quiz results block to the My Moodle page'; $string['worstgrade'] = 'The lowest grade:'; $string['worstgrades'] = 'The {$a} lowest grades:'; $string['worstgroupgrade'] = 'The group with the lowest average:'; diff --git a/blocks/quiz_results/version.php b/blocks/quiz_results/version.php index eb8a929873c..22eeac757f8 100644 --- a/blocks/quiz_results/version.php +++ b/blocks/quiz_results/version.php @@ -25,6 +25,6 @@ defined('MOODLE_INTERNAL') || die(); -$plugin->version = 2012061700; // The current plugin version (Date: YYYYMMDDXX) +$plugin->version = 2012091600; // The current plugin version (Date: YYYYMMDDXX) $plugin->requires = 2012061700; // Requires this Moodle version $plugin->component = 'block_quiz_results'; // Full name of the plugin (used for diagnostics) diff --git a/blocks/recent_activity/db/access.php b/blocks/recent_activity/db/access.php new file mode 100644 index 00000000000..249b35e5f6b --- /dev/null +++ b/blocks/recent_activity/db/access.php @@ -0,0 +1,47 @@ +. + +/** + * Recent activity block caps. + * + * @package block_recent_activity + * @copyright Mark Nelson + * @license http://www.gnu.org/copyleft/gpl.html GNU GPL v3 or later + */ + +defined('MOODLE_INTERNAL') || die(); + +$capabilities = array( + + 'block/recent_activity:myaddinstance' => array( + 'captype' => 'write', + 'contextlevel' => CONTEXT_SYSTEM, + 'archetypes' => array( + 'user' => CAP_ALLOW + ) + ), + + 'block/recent_activity:addinstance' => array( + 'riskbitmask' => RISK_SPAM | RISK_XSS, + + 'captype' => 'write', + 'contextlevel' => CONTEXT_BLOCK, + 'archetypes' => array( + 'editingteacher' => CAP_ALLOW, + 'manager' => CAP_ALLOW + ) + ), +); diff --git a/blocks/recent_activity/lang/en/block_recent_activity.php b/blocks/recent_activity/lang/en/block_recent_activity.php index 9284efd5297..6d47dce4331 100644 --- a/blocks/recent_activity/lang/en/block_recent_activity.php +++ b/blocks/recent_activity/lang/en/block_recent_activity.php @@ -24,3 +24,5 @@ */ $string['pluginname'] = 'Recent activity'; +$string['recent_activity:addinstance'] = 'Add a new recent activity block'; +$string['recent_activity:myaddinstance'] = 'Add a new recent activity block to the My Moodle page'; diff --git a/blocks/recent_activity/version.php b/blocks/recent_activity/version.php index 006ae718d51..9eefc82ca7f 100644 --- a/blocks/recent_activity/version.php +++ b/blocks/recent_activity/version.php @@ -25,6 +25,6 @@ defined('MOODLE_INTERNAL') || die(); -$plugin->version = 2012061700; // The current plugin version (Date: YYYYMMDDXX) +$plugin->version = 2012091600; // The current plugin version (Date: YYYYMMDDXX) $plugin->requires = 2012061700; // Requires this Moodle version $plugin->component = 'block_recent_activity'; // Full name of the plugin (used for diagnostics) diff --git a/blocks/rss_client/db/access.php b/blocks/rss_client/db/access.php index 6eeb8629d9b..0f9c77bf3df 100644 --- a/blocks/rss_client/db/access.php +++ b/blocks/rss_client/db/access.php @@ -26,6 +26,25 @@ defined('MOODLE_INTERNAL') || die(); $capabilities = array( + 'block/rss_client:myaddinstance' => array( + 'captype' => 'write', + 'contextlevel' => CONTEXT_SYSTEM, + 'archetypes' => array( + 'user' => CAP_ALLOW + ) + ), + + 'block/rss_client:addinstance' => array( + 'riskbitmask' => RISK_SPAM | RISK_XSS, + + 'captype' => 'write', + 'contextlevel' => CONTEXT_BLOCK, + 'archetypes' => array( + 'editingteacher' => CAP_ALLOW, + 'manager' => CAP_ALLOW + ) + ), + 'block/rss_client:manageownfeeds' => array( 'captype' => 'write', diff --git a/blocks/rss_client/lang/en/block_rss_client.php b/blocks/rss_client/lang/en/block_rss_client.php index 33ca8175a12..77e161c30b4 100644 --- a/blocks/rss_client/lang/en/block_rss_client.php +++ b/blocks/rss_client/lang/en/block_rss_client.php @@ -62,10 +62,12 @@ $string['numentries'] = 'Entries per feed'; $string['pickfeed'] = 'Pick a news feed'; $string['pluginname'] = 'Remote RSS feeds'; $string['remotenewsfeed'] = 'Remote news feed'; +$string['rss_client:addinstance'] = 'Add a new remote RSS feeds block'; $string['rss_client:createprivatefeeds'] = 'Create private RSS feeds'; $string['rss_client:createsharedfeeds'] = 'Create shared RSS feeds'; $string['rss_client:manageanyfeeds'] = 'Manage any RSS feeds'; $string['rss_client:manageownfeeds'] = 'Manage own RSS feeds'; +$string['rss_client:myaddinstance'] = 'Add a new remote RSS feeds block to the My Moodle page'; $string['seeallfeeds'] = 'See all feeds'; $string['sharedfeed'] = 'Shared feed'; $string['shownumentrieslabel'] = 'Max number entries to show per block.'; diff --git a/blocks/rss_client/version.php b/blocks/rss_client/version.php index 266a8bc25ee..c19bcfff43d 100644 --- a/blocks/rss_client/version.php +++ b/blocks/rss_client/version.php @@ -25,7 +25,7 @@ defined('MOODLE_INTERNAL') || die(); -$plugin->version = 2012061700; // The current plugin version (Date: YYYYMMDDXX) +$plugin->version = 2012091600; // The current plugin version (Date: YYYYMMDDXX) $plugin->requires = 2012061700; // Requires this Moodle version $plugin->component = 'block_rss_client'; // Full name of the plugin (used for diagnostics) $plugin->cron = 300; // Set min time between cron executions to 300 secs (5 mins) diff --git a/blocks/search_forums/db/access.php b/blocks/search_forums/db/access.php new file mode 100644 index 00000000000..1034313eaba --- /dev/null +++ b/blocks/search_forums/db/access.php @@ -0,0 +1,47 @@ +. + +/** + * Search forums block caps. + * + * @package block_search_forums + * @copyright Mark Nelson + * @license http://www.gnu.org/copyleft/gpl.html GNU GPL v3 or later + */ + +defined('MOODLE_INTERNAL') || die(); + +$capabilities = array( + + 'block/search_forums:myaddinstance' => array( + 'captype' => 'write', + 'contextlevel' => CONTEXT_SYSTEM, + 'archetypes' => array( + 'user' => CAP_ALLOW + ) + ), + + 'block/search_forums:addinstance' => array( + 'riskbitmask' => RISK_SPAM | RISK_XSS, + + 'captype' => 'write', + 'contextlevel' => CONTEXT_BLOCK, + 'archetypes' => array( + 'editingteacher' => CAP_ALLOW, + 'manager' => CAP_ALLOW + ) + ), +); diff --git a/blocks/search_forums/lang/en/block_search_forums.php b/blocks/search_forums/lang/en/block_search_forums.php index d71a51076e4..3b998ba3df3 100644 --- a/blocks/search_forums/lang/en/block_search_forums.php +++ b/blocks/search_forums/lang/en/block_search_forums.php @@ -25,3 +25,5 @@ $string['advancedsearch'] = 'Advanced search'; $string['pluginname'] = 'Search forums'; +$string['search_forums:addinstance'] = 'Add a new search forums block'; +$string['search_forums:myaddinstance'] = 'Add a new search forums block for the My Moodle page'; diff --git a/blocks/search_forums/version.php b/blocks/search_forums/version.php index 02039837907..8a77b0587bd 100644 --- a/blocks/search_forums/version.php +++ b/blocks/search_forums/version.php @@ -25,6 +25,6 @@ defined('MOODLE_INTERNAL') || die(); -$plugin->version = 2012061700; // The current plugin version (Date: YYYYMMDDXX) +$plugin->version = 2012091600; // The current plugin version (Date: YYYYMMDDXX) $plugin->requires = 2012061700; // Requires this Moodle version $plugin->component = 'block_search_forums'; // Full name of the plugin (used for diagnostics) diff --git a/blocks/section_links/db/access.php b/blocks/section_links/db/access.php new file mode 100644 index 00000000000..3b2288c81a7 --- /dev/null +++ b/blocks/section_links/db/access.php @@ -0,0 +1,47 @@ +. + +/** + * Section links block caps. + * + * @package block_section_links + * @copyright Mark Nelson + * @license http://www.gnu.org/copyleft/gpl.html GNU GPL v3 or later + */ + +defined('MOODLE_INTERNAL') || die(); + +$capabilities = array( + + 'block/section_links:myaddinstance' => array( + 'captype' => 'write', + 'contextlevel' => CONTEXT_SYSTEM, + 'archetypes' => array( + 'user' => CAP_ALLOW + ) + ), + + 'block/section_links:addinstance' => array( + 'riskbitmask' => RISK_SPAM | RISK_XSS, + + 'captype' => 'write', + 'contextlevel' => CONTEXT_BLOCK, + 'archetypes' => array( + 'editingteacher' => CAP_ALLOW, + 'manager' => CAP_ALLOW + ) + ), +); diff --git a/blocks/section_links/lang/en/block_section_links.php b/blocks/section_links/lang/en/block_section_links.php index 57e8c12d1c9..c267cd17654 100644 --- a/blocks/section_links/lang/en/block_section_links.php +++ b/blocks/section_links/lang/en/block_section_links.php @@ -34,5 +34,7 @@ $string['numsectionsdesc2'] = 'Once the number of sections in the course reaches $string['numsections1'] = 'Number of sections'; $string['numsections2'] = 'Alternative number of sections'; $string['pluginname'] = 'Section links'; +$string['section_links:addinstance'] = 'Add a new section links block'; +$string['section_links:myaddinstance'] = 'Add a new section links block to the My Moodle page'; $string['topics'] = 'Topics'; $string['weeks'] = 'Weeks'; diff --git a/blocks/section_links/version.php b/blocks/section_links/version.php index 1bfd4f0ea2c..9b24bfecbe4 100644 --- a/blocks/section_links/version.php +++ b/blocks/section_links/version.php @@ -25,6 +25,6 @@ defined('MOODLE_INTERNAL') || die(); -$plugin->version = 2012061700; // The current plugin version (Date: YYYYMMDDXX) +$plugin->version = 2012091600; // The current plugin version (Date: YYYYMMDDXX) $plugin->requires = 2012061700; // Requires this Moodle version $plugin->component = 'block_section_links'; // Full name of the plugin (used for diagnostics) diff --git a/blocks/selfcompletion/db/access.php b/blocks/selfcompletion/db/access.php new file mode 100644 index 00000000000..ae0b0749fe0 --- /dev/null +++ b/blocks/selfcompletion/db/access.php @@ -0,0 +1,47 @@ +. + +/** + * Self completion block caps. + * + * @package block_selfcompletion + * @copyright Mark Nelson + * @license http://www.gnu.org/copyleft/gpl.html GNU GPL v3 or later + */ + +defined('MOODLE_INTERNAL') || die(); + +$capabilities = array( + + 'block/selfcompletion:myaddinstance' => array( + 'captype' => 'write', + 'contextlevel' => CONTEXT_SYSTEM, + 'archetypes' => array( + 'user' => CAP_ALLOW + ) + ), + + 'block/selfcompletion:addinstance' => array( + 'riskbitmask' => RISK_SPAM | RISK_XSS, + + 'captype' => 'write', + 'contextlevel' => CONTEXT_BLOCK, + 'archetypes' => array( + 'editingteacher' => CAP_ALLOW, + 'manager' => CAP_ALLOW + ) + ), +); diff --git a/blocks/selfcompletion/lang/en/block_selfcompletion.php b/blocks/selfcompletion/lang/en/block_selfcompletion.php index 403d0b2f2a7..e7c89d32ae3 100644 --- a/blocks/selfcompletion/lang/en/block_selfcompletion.php +++ b/blocks/selfcompletion/lang/en/block_selfcompletion.php @@ -27,3 +27,5 @@ $string['alreadyselfcompleted'] = 'You have already marked yourself as complete $string['completecourse'] = 'Complete course'; $string['pluginname'] = 'Self completion'; $string['selfcompletionnotenabled'] = 'The self completion criteria has not been enabled for this course'; +$string['selfcompletion:addinstance'] = 'Add a new self completion block'; +$string['selfcompletion:myaddinstance'] = 'Add a new self completion block to the My Moodle page'; diff --git a/blocks/selfcompletion/version.php b/blocks/selfcompletion/version.php index 92a5a56073f..9fc46d672ca 100644 --- a/blocks/selfcompletion/version.php +++ b/blocks/selfcompletion/version.php @@ -25,6 +25,6 @@ defined('MOODLE_INTERNAL') || die(); -$plugin->version = 2012061700; // The current plugin version (Date: YYYYMMDDXX) +$plugin->version = 2012091600; // The current plugin version (Date: YYYYMMDDXX) $plugin->requires = 2012061700; // Requires this Moodle version $plugin->component = 'block_selfcompletion'; // Full name of the plugin (used for diagnostics) diff --git a/blocks/settings/db/access.php b/blocks/settings/db/access.php new file mode 100644 index 00000000000..257f46e18b7 --- /dev/null +++ b/blocks/settings/db/access.php @@ -0,0 +1,47 @@ +. + +/** + * Settings block caps. + * + * @package block_settings + * @copyright Mark Nelson + * @license http://www.gnu.org/copyleft/gpl.html GNU GPL v3 or later + */ + +defined('MOODLE_INTERNAL') || die(); + +$capabilities = array( + + 'block/settings:myaddinstance' => array( + 'captype' => 'write', + 'contextlevel' => CONTEXT_SYSTEM, + 'archetypes' => array( + 'user' => CAP_ALLOW + ) + ), + + 'block/settings:addinstance' => array( + 'riskbitmask' => RISK_SPAM | RISK_XSS, + + 'captype' => 'write', + 'contextlevel' => CONTEXT_BLOCK, + 'archetypes' => array( + 'editingteacher' => CAP_ALLOW, + 'manager' => CAP_ALLOW + ) + ), +); diff --git a/blocks/settings/lang/en/block_settings.php b/blocks/settings/lang/en/block_settings.php index 51a7d50e8aa..356384306ef 100644 --- a/blocks/settings/lang/en/block_settings.php +++ b/blocks/settings/lang/en/block_settings.php @@ -26,3 +26,5 @@ $string['enabledock'] = 'Allow the user to dock this block'; $string['pluginname'] = 'Settings'; +$string['settings:addinstance'] = 'Add a new settings block'; +$string['settings:myaddinstance'] = 'Add a new settings block to the My Moodle page'; diff --git a/blocks/settings/version.php b/blocks/settings/version.php index 686672b70e4..9740627c6f9 100644 --- a/blocks/settings/version.php +++ b/blocks/settings/version.php @@ -25,6 +25,6 @@ defined('MOODLE_INTERNAL') || die(); -$plugin->version = 2012061700; // The current plugin version (Date: YYYYMMDDXX) +$plugin->version = 2012091600; // The current plugin version (Date: YYYYMMDDXX) $plugin->requires = 2012061700; // Requires this Moodle version $plugin->component = 'block_settings'; // Full name of the plugin (used for diagnostics) diff --git a/blocks/site_main_menu/db/access.php b/blocks/site_main_menu/db/access.php new file mode 100644 index 00000000000..4f5d0fdbe28 --- /dev/null +++ b/blocks/site_main_menu/db/access.php @@ -0,0 +1,47 @@ +. + +/** + * Site main menu block caps. + * + * @package block_site_main_menu + * @copyright Mark Nelson + * @license http://www.gnu.org/copyleft/gpl.html GNU GPL v3 or later + */ + +defined('MOODLE_INTERNAL') || die(); + +$capabilities = array( + + 'block/site_main_menu:myaddinstance' => array( + 'captype' => 'write', + 'contextlevel' => CONTEXT_SYSTEM, + 'archetypes' => array( + 'user' => CAP_ALLOW + ) + ), + + 'block/site_main_menu:addinstance' => array( + 'riskbitmask' => RISK_SPAM | RISK_XSS, + + 'captype' => 'write', + 'contextlevel' => CONTEXT_BLOCK, + 'archetypes' => array( + 'editingteacher' => CAP_ALLOW, + 'manager' => CAP_ALLOW + ) + ), +); diff --git a/blocks/site_main_menu/lang/en/block_site_main_menu.php b/blocks/site_main_menu/lang/en/block_site_main_menu.php index f4c92fc9e1e..0a2f4785e9e 100644 --- a/blocks/site_main_menu/lang/en/block_site_main_menu.php +++ b/blocks/site_main_menu/lang/en/block_site_main_menu.php @@ -24,4 +24,5 @@ */ $string['pluginname'] = 'Main menu'; - +$string['site_main_menu:addinstance'] = 'Add a new main menu block'; +$string['site_main_menu:myaddinstance'] = 'Add a new main menu block to the My Moodle page'; diff --git a/blocks/site_main_menu/version.php b/blocks/site_main_menu/version.php index 0930f06faaa..931c4339659 100644 --- a/blocks/site_main_menu/version.php +++ b/blocks/site_main_menu/version.php @@ -25,6 +25,6 @@ defined('MOODLE_INTERNAL') || die(); -$plugin->version = 2012061700; // The current plugin version (Date: YYYYMMDDXX) +$plugin->version = 2012091600; // The current plugin version (Date: YYYYMMDDXX) $plugin->requires = 2012061700; // Requires this Moodle version $plugin->component = 'block_site_main_menu'; // Full name of the plugin (used for diagnostics) diff --git a/blocks/social_activities/db/access.php b/blocks/social_activities/db/access.php new file mode 100644 index 00000000000..e33ec2cbac5 --- /dev/null +++ b/blocks/social_activities/db/access.php @@ -0,0 +1,47 @@ +. + +/** + * Social activities block caps. + * + * @package block_social_activities + * @copyright Mark Nelson + * @license http://www.gnu.org/copyleft/gpl.html GNU GPL v3 or later + */ + +defined('MOODLE_INTERNAL') || die(); + +$capabilities = array( + + 'block/social_activities:myaddinstance' => array( + 'captype' => 'write', + 'contextlevel' => CONTEXT_SYSTEM, + 'archetypes' => array( + 'user' => CAP_ALLOW + ) + ), + + 'block/social_activities:addinstance' => array( + 'riskbitmask' => RISK_SPAM | RISK_XSS, + + 'captype' => 'write', + 'contextlevel' => CONTEXT_BLOCK, + 'archetypes' => array( + 'editingteacher' => CAP_ALLOW, + 'manager' => CAP_ALLOW + ) + ), +); diff --git a/blocks/social_activities/lang/en/block_social_activities.php b/blocks/social_activities/lang/en/block_social_activities.php index 16d91eeecbd..abb566667bb 100644 --- a/blocks/social_activities/lang/en/block_social_activities.php +++ b/blocks/social_activities/lang/en/block_social_activities.php @@ -24,3 +24,5 @@ */ $string['pluginname'] = 'Social activities'; +$string['social_activities:addinstance'] = 'Add a new social activities block'; +$string['social_activities:myaddinstance'] = 'Add a new social activities block to the My Moodle page'; diff --git a/blocks/social_activities/version.php b/blocks/social_activities/version.php index 26002a0cedd..beb85635ded 100644 --- a/blocks/social_activities/version.php +++ b/blocks/social_activities/version.php @@ -25,6 +25,6 @@ defined('MOODLE_INTERNAL') || die(); -$plugin->version = 2012061700; // The current plugin version (Date: YYYYMMDDXX) +$plugin->version = 2012091600; // The current plugin version (Date: YYYYMMDDXX) $plugin->requires = 2012061700; // Requires this Moodle version $plugin->component = 'block_social_activities'; // Full name of the plugin (used for diagnostics) diff --git a/blocks/tag_flickr/db/access.php b/blocks/tag_flickr/db/access.php new file mode 100644 index 00000000000..bf88cdf879a --- /dev/null +++ b/blocks/tag_flickr/db/access.php @@ -0,0 +1,47 @@ +. + +/** + * Tag flickr block caps. + * + * @package block_tag_flickr + * @copyright Mark Nelson + * @license http://www.gnu.org/copyleft/gpl.html GNU GPL v3 or later + */ + +defined('MOODLE_INTERNAL') || die(); + +$capabilities = array( + + 'block/tag_flickr:myaddinstance' => array( + 'captype' => 'write', + 'contextlevel' => CONTEXT_SYSTEM, + 'archetypes' => array( + 'user' => CAP_ALLOW + ) + ), + + 'block/tag_flickr:addinstance' => array( + 'riskbitmask' => RISK_SPAM | RISK_XSS, + + 'captype' => 'write', + 'contextlevel' => CONTEXT_BLOCK, + 'archetypes' => array( + 'editingteacher' => CAP_ALLOW, + 'manager' => CAP_ALLOW + ) + ), +); diff --git a/blocks/tag_flickr/lang/en/block_tag_flickr.php b/blocks/tag_flickr/lang/en/block_tag_flickr.php index 76f8e8a5eb3..6dc31725ef6 100644 --- a/blocks/tag_flickr/lang/en/block_tag_flickr.php +++ b/blocks/tag_flickr/lang/en/block_tag_flickr.php @@ -37,3 +37,5 @@ $string['numberofphotos'] = 'Number of photos'; $string['pluginname'] = 'Flickr'; $string['relevance'] = 'Relevance'; $string['sortby'] = 'Sort by'; +$string['tag_flickr:addinstance'] = 'Add a new flickr block'; +$string['tag_flickr:myaddinstance'] = 'Add a new flickr block to the My Moodle page'; diff --git a/blocks/tag_flickr/version.php b/blocks/tag_flickr/version.php index 32889146359..89a4226e29e 100644 --- a/blocks/tag_flickr/version.php +++ b/blocks/tag_flickr/version.php @@ -25,6 +25,6 @@ defined('MOODLE_INTERNAL') || die(); -$plugin->version = 2012061700; // The current plugin version (Date: YYYYMMDDXX) +$plugin->version = 2012091600; // The current plugin version (Date: YYYYMMDDXX) $plugin->requires = 2012061700; // Requires this Moodle version $plugin->component = 'block_tag_flickr'; // Full name of the plugin (used for diagnostics) diff --git a/blocks/tag_youtube/db/access.php b/blocks/tag_youtube/db/access.php new file mode 100644 index 00000000000..6000d12a635 --- /dev/null +++ b/blocks/tag_youtube/db/access.php @@ -0,0 +1,47 @@ +. + +/** + * Tag youtube block caps. + * + * @package block_tag_youtube + * @copyright Mark Nelson + * @license http://www.gnu.org/copyleft/gpl.html GNU GPL v3 or later + */ + +defined('MOODLE_INTERNAL') || die(); + +$capabilities = array( + + 'block/tag_youtube:myaddinstance' => array( + 'captype' => 'write', + 'contextlevel' => CONTEXT_SYSTEM, + 'archetypes' => array( + 'user' => CAP_ALLOW + ) + ), + + 'block/tag_youtube:addinstance' => array( + 'riskbitmask' => RISK_SPAM | RISK_XSS, + + 'captype' => 'write', + 'contextlevel' => CONTEXT_BLOCK, + 'archetypes' => array( + 'editingteacher' => CAP_ALLOW, + 'manager' => CAP_ALLOW + ) + ), +); diff --git a/blocks/tag_youtube/lang/en/block_tag_youtube.php b/blocks/tag_youtube/lang/en/block_tag_youtube.php index cb1180a3acd..0e3dc8f9347 100644 --- a/blocks/tag_youtube/lang/en/block_tag_youtube.php +++ b/blocks/tag_youtube/lang/en/block_tag_youtube.php @@ -42,4 +42,6 @@ $string['petsanimals'] = 'Pets & Animals'; $string['pluginname'] = 'Youtube'; $string['scienceandtech'] = 'Science & Tech'; $string['sports'] = 'Sports'; +$string['tag_youtube:addinstance'] = 'Add a new youtube block'; +$string['tag_youtube:myaddinstance'] = 'Add a new youtube block to the My Moodle page'; $string['travel'] = 'Travel & Places'; diff --git a/blocks/tag_youtube/version.php b/blocks/tag_youtube/version.php index 91bb65603a9..7dbf882b0d8 100644 --- a/blocks/tag_youtube/version.php +++ b/blocks/tag_youtube/version.php @@ -25,6 +25,6 @@ defined('MOODLE_INTERNAL') || die(); -$plugin->version = 2012061700; // The current plugin version (Date: YYYYMMDDXX) +$plugin->version = 2012091600; // The current plugin version (Date: YYYYMMDDXX) $plugin->requires = 2012061700; // Requires this Moodle version $plugin->component = 'block_tag_youtube'; // Full name of the plugin (used for diagnostics) diff --git a/blocks/tags/db/access.php b/blocks/tags/db/access.php new file mode 100644 index 00000000000..04504a2a284 --- /dev/null +++ b/blocks/tags/db/access.php @@ -0,0 +1,47 @@ +. + +/** + * Tags block caps. + * + * @package block_tags + * @copyright Mark Nelson + * @license http://www.gnu.org/copyleft/gpl.html GNU GPL v3 or later + */ + +defined('MOODLE_INTERNAL') || die(); + +$capabilities = array( + + 'block/tags:myaddinstance' => array( + 'captype' => 'write', + 'contextlevel' => CONTEXT_SYSTEM, + 'archetypes' => array( + 'user' => CAP_ALLOW + ) + ), + + 'block/tags:addinstance' => array( + 'riskbitmask' => RISK_SPAM | RISK_XSS, + + 'captype' => 'write', + 'contextlevel' => CONTEXT_BLOCK, + 'archetypes' => array( + 'editingteacher' => CAP_ALLOW, + 'manager' => CAP_ALLOW + ) + ), +); diff --git a/blocks/tags/lang/en/block_tags.php b/blocks/tags/lang/en/block_tags.php index ddd340ed836..7f2d59fc827 100644 --- a/blocks/tags/lang/en/block_tags.php +++ b/blocks/tags/lang/en/block_tags.php @@ -70,5 +70,7 @@ $string['showcoursetags'] = 'Show course tags'; $string['showcoursetagsdef'] = 'Display the course tagging features in the tags block, allowing students to tag courses.'; $string['suggestedtagthisunit'] = 'Suggested tag to this course:'; $string['tags'] = 'tags'; +$string['tags:addinstance'] = 'Add a new tags block'; +$string['tags:myaddinstance'] = 'Add a new tags block to the My Moodle page'; $string['tagthisunit'] = 'Tag this course:'; $string['tagunits'] = 'to tag your favourite courses'; diff --git a/blocks/tags/version.php b/blocks/tags/version.php index d4b93d125a5..2c02165a2c0 100644 --- a/blocks/tags/version.php +++ b/blocks/tags/version.php @@ -25,6 +25,6 @@ defined('MOODLE_INTERNAL') || die(); -$plugin->version = 2012082800; // The current plugin version (Date: YYYYMMDDXX) +$plugin->version = 2012091600; // The current plugin version (Date: YYYYMMDDXX) $plugin->requires = 2012061700; // Requires this Moodle version $plugin->component = 'block_tags'; // Full name of the plugin (used for diagnostics)