MDL-53483 tool_lp: Normalise the names of capabilities

This commit is contained in:
Serge Gauthier 2016-03-24 10:52:05 -04:00 committed by Frederic Massart
parent a4f1b030f2
commit 44e8cba48e
20 changed files with 202 additions and 170 deletions

View file

@ -36,7 +36,7 @@ $functions = array(
'classpath' => '',
'description' => 'Load the data for the competency report in a course.',
'type' => 'read',
'capabilities' => 'tool/lp:coursecompetencyread',
'capabilities' => 'tool/lp:coursecompetencyview',
'ajax' => true,
)
);

View file

@ -34,7 +34,7 @@ defined('MOODLE_INTERNAL') || die;
* @param stdClass $context The context of the course
*/
function report_competency_extend_navigation_course($navigation, $course, $context) {
if (has_capability('tool/lp:coursecompetencyread', $context)) {
if (has_capability('tool/lp:coursecompetencyview', $context)) {
$url = new moodle_url('/report/competency/index.php', array('id' => $course->id));
$name = get_string('pluginname', 'report_competency');
$navigation->add($name, $url, navigation_node::TYPE_SETTING, null, null, new pix_icon('i/report', ''));