MDL-20712 using just $capablities for capability definition array, all other files in db/* do not use component names in definition array; old capability array names are of course supported

This commit is contained in:
Petr Skoda 2009-11-04 19:24:12 +00:00
parent e3acc8af7a
commit 0ac940b3bf
64 changed files with 92 additions and 124 deletions

View file

@ -14,7 +14,7 @@
//
// It is important that capability names are unique. The naming convention
// for capabilities that are specific to modules and blocks is as follows:
// [mod/block]/<component_name>:<capabilityname>
// [mod/block]/<plugin_name>:<capabilityname>
//
// component_name should be the same as the directory name of the mod or block.
//
@ -25,13 +25,10 @@
// block/recent_activity:view
// moodle/site:deleteuser
//
// The variable name for the capability definitions array follows the format
// $<componenttype>_<component_name>_capabilities
//
// For the core capabilities, the variable is $moodle_capabilities.
// The variable name for the capability definitions array is $capabilities
$mod_assignment_capabilities = array(
$capabilities = array(
'mod/assignment:view' => array(

View file

@ -14,7 +14,7 @@
//
// It is important that capability names are unique. The naming convention
// for capabilities that are specific to modules and blocks is as follows:
// [mod/block]/<component_name>:<capabilityname>
// [mod/block]/<plugin_name>:<capabilityname>
//
// component_name should be the same as the directory name of the mod or block.
//
@ -25,13 +25,10 @@
// block/recent_activity:view
// moodle/site:deleteuser
//
// The variable name for the capability definitions array follows the format
// $<componenttype>_<component_name>_capabilities
//
// For the core capabilities, the variable is $moodle_capabilities.
// The variable name for the capability definitions array is $capabilities
$mod_chat_capabilities = array(
$capabilities = array(
'mod/chat:chat' => array(

View file

@ -14,7 +14,7 @@
//
// It is important that capability names are unique. The naming convention
// for capabilities that are specific to modules and blocks is as follows:
// [mod/block]/<component_name>:<capabilityname>
// [mod/block]/<plugin_name>:<capabilityname>
//
// component_name should be the same as the directory name of the mod or block.
//
@ -25,13 +25,10 @@
// block/recent_activity:view
// moodle/site:deleteuser
//
// The variable name for the capability definitions array follows the format
// $<componenttype>_<component_name>_capabilities
//
// For the core capabilities, the variable is $moodle_capabilities.
// The variable name for the capability definitions array is $capabilities
$mod_choice_capabilities = array(
$capabilities = array(
'mod/choice:choose' => array(

View file

@ -14,7 +14,7 @@
//
// It is important that capability names are unique. The naming convention
// for capabilities that are specific to modules and blocks is as follows:
// [mod/block]/<component_name>:<capabilityname>
// [mod/block]/<plugin_name>:<capabilityname>
//
// component_name should be the same as the directory name of the mod or block.
//
@ -25,13 +25,10 @@
// block/recent_activity:view
// moodle/site:deleteuser
//
// The variable name for the capability definitions array follows the format
// $<componenttype>_<component_name>_capabilities
//
// For the core capabilities, the variable is $moodle_capabilities.
// The variable name for the capability definitions array is $capabilities
$mod_data_capabilities = array(
$capabilities = array(
'mod/data:viewentry' => array(

View file

@ -14,7 +14,7 @@
//
// It is important that capability names are unique. The naming convention
// for capabilities that are specific to modules and blocks is as follows:
// [mod/block]/<component_name>:<capabilityname>
// [mod/block]/<plugin_name>:<capabilityname>
//
// component_name should be the same as the directory name of the mod or block.
//
@ -25,13 +25,10 @@
// block/recent_activity:view
// moodle/site:deleteuser
//
// The variable name for the capability definitions array follows the format
// $<componenttype>_<component_name>_capabilities
//
// For the core capabilities, the variable is $moodle_capabilities.
// The variable name for the capability definitions array is $capabilities
$mod_feedback_capabilities = array(
$capabilities = array(
'mod/feedback:view' => array(

View file

@ -23,7 +23,7 @@
* @license http://www.gnu.org/copyleft/gpl.html GNU GPL v3 or later
*/
$mod_folder_capabilities = array(
$capabilities = array(
/* TODO: review public portfolio API first!
'mod/folder:portfolioexport' => array(

View file

@ -14,7 +14,7 @@
//
// It is important that capability names are unique. The naming convention
// for capabilities that are specific to modules and blocks is as follows:
// [mod/block]/<component_name>:<capabilityname>
// [mod/block]/<plugin_name>:<capabilityname>
//
// component_name should be the same as the directory name of the mod or block.
//
@ -25,13 +25,10 @@
// block/recent_activity:view
// moodle/site:deleteuser
//
// The variable name for the capability definitions array follows the format
// $<componenttype>_<component_name>_capabilities
//
// For the core capabilities, the variable is $moodle_capabilities.
// The variable name for the capability definitions array is $capabilities
$mod_forum_capabilities = array(
$capabilities = array(
'mod/forum:viewdiscussion' => array(

View file

@ -14,7 +14,7 @@
//
// It is important that capability names are unique. The naming convention
// for capabilities that are specific to modules and blocks is as follows:
// [mod/block]/<component_name>:<capabilityname>
// [mod/block]/<plugin_name>:<capabilityname>
//
// component_name should be the same as the directory name of the mod or block.
//
@ -25,13 +25,10 @@
// block/recent_activity:view
// moodle/site:deleteuser
//
// The variable name for the capability definitions array follows the format
// $<componenttype>_<component_name>_capabilities
//
// For the core capabilities, the variable is $moodle_capabilities.
// The variable name for the capability definitions array is $capabilities
$mod_glossary_capabilities = array(
$capabilities = array(
'mod/glossary:write' => array(

View file

@ -14,7 +14,7 @@
//
// It is important that capability names are unique. The naming convention
// for capabilities that are specific to modules and blocks is as follows:
// [mod/block]/<component_name>:<capabilityname>
// [mod/block]/<plugin_name>:<capabilityname>
//
// component_name should be the same as the directory name of the mod or block.
//
@ -25,13 +25,10 @@
// block/recent_activity:view
// moodle/site:deleteuser
//
// The variable name for the capability definitions array follows the format
// $<componenttype>_<component_name>_capabilities
//
// For the core capabilities, the variable is $moodle_capabilities.
// The variable name for the capability definitions array is $capabilities
$mod_hotpot_capabilities = array(
$capabilities = array(
'mod/hotpot:attempt' => array(

View file

@ -23,7 +23,7 @@
* @license http://www.gnu.org/copyleft/gpl.html GNU GPL v3 or later
*/
$mod_imscp_capabilities = array(
$capabilities = array(
/* TODO: review public portfolio API first!
'mod/imscp:portfolioexport' => array(

View file

@ -4,7 +4,7 @@
*
* For naming conventions, see lib/db/access.php.
*/
$mod_lesson_capabilities = array(
$capabilities = array(
'mod/lesson:edit' => array(

View file

@ -23,7 +23,7 @@
* @license http://www.gnu.org/copyleft/gpl.html GNU GPL v3 or later
*/
$mod_page_capabilities = array(
$capabilities = array(
/* TODO: review public portfolio API first!
'mod/page:portfolioexport' => array(

View file

@ -4,7 +4,7 @@
*
* For naming conventions, see lib/db/access.php.
*/
$mod_quiz_capabilities = array(
$capabilities = array(
// Ability to see that the quiz exists, and the basic information
// about it, for example the start date and time limit.

View file

@ -4,7 +4,7 @@
*
* For naming conventions, see lib/db/access.php.
*/
$quiz_statistics_capabilities = array(
$capabilities = array(
'quizreport/statistics:view' => array(
'captype' => 'read',
'contextlevel' => CONTEXT_MODULE,

View file

@ -23,7 +23,7 @@
* @license http://www.gnu.org/copyleft/gpl.html GNU GPL v3 or later
*/
$mod_resource_capabilities = array(
$capabilities = array(
/* TODO: review public portfolio API first!
'mod/resource:portfolioexport' => array(

View file

@ -14,7 +14,7 @@
//
// It is important that capability names are unique. The naming convention
// for capabilities that are specific to modules and blocks is as follows:
// [mod/block]/<component_name>:<capabilityname>
// [mod/block]/<plugin_name>:<capabilityname>
//
// component_name should be the same as the directory name of the mod or block.
//
@ -25,13 +25,10 @@
// block/recent_activity:view
// moodle/site:deleteuser
//
// The variable name for the capability definitions array follows the format
// $<componenttype>_<component_name>_capabilities
//
// For the core capabilities, the variable is $moodle_capabilities.
// The variable name for the capability definitions array is $capabilities
$mod_scorm_capabilities = array(
$capabilities = array(
'mod/scorm:viewreport' => array(

View file

@ -14,7 +14,7 @@
//
// It is important that capability names are unique. The naming convention
// for capabilities that are specific to modules and blocks is as follows:
// [mod/block]/<component_name>:<capabilityname>
// [mod/block]/<plugin_name>:<capabilityname>
//
// component_name should be the same as the directory name of the mod or block.
//
@ -25,13 +25,10 @@
// block/recent_activity:view
// moodle/site:deleteuser
//
// The variable name for the capability definitions array follows the format
// $<componenttype>_<component_name>_capabilities
//
// For the core capabilities, the variable is $moodle_capabilities.
// The variable name for the capability definitions array is $capabilities
$mod_survey_capabilities = array(
$capabilities = array(
'mod/survey:participate' => array(

View file

@ -23,7 +23,7 @@
* @license http://www.gnu.org/copyleft/gpl.html GNU GPL v3 or later
*/
$mod_url_capabilities = array(
$capabilities = array(
/* TODO: review public portfolio API first!
'mod/url:portfolioexport' => array(

View file

@ -4,7 +4,7 @@
*
* For naming conventions, see lib/db/access.php.
*/
$mod_wiki_capabilities = array(
$capabilities = array(
'mod/wiki:participate' => array(