mirror of
https://github.com/moodle/moodle.git
synced 2025-08-05 17:06:53 +02:00
MDL-53483 tool_lp: Normalise the names of capabilities
This commit is contained in:
parent
a4f1b030f2
commit
44e8cba48e
20 changed files with 202 additions and 170 deletions
|
@ -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,
|
||||
)
|
||||
);
|
||||
|
|
|
@ -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', ''));
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue