Skip to content

Commit

Permalink
Update the capability to access the automation navigation node.
Browse files Browse the repository at this point in the history
- Fix PLS-696
  • Loading branch information
prasanna-lmsace committed Feb 5, 2024
1 parent 7dd591f commit e3c3988
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 3 deletions.
4 changes: 2 additions & 2 deletions lib.php
Original file line number Diff line number Diff line change
Expand Up @@ -646,14 +646,14 @@ function mod_pulse_inplace_editable($itemtype, $itemid, $newvalue) {
*
* @param navigation_node $navigation
* @param stdClass $course
* @param context_course $context
* @param \context $context
* @return void
*/
function mod_pulse_extend_navigation_course(navigation_node $navigation, stdClass $course, $context) {
global $PAGE;

$addnode = $context->contextlevel === CONTEXT_COURSE;
$addnode = $addnode && has_capability('gradereport/grader:view', $context); // TODO: Custom capability.
$addnode = $addnode && has_capability('mod/pulse:addtemplateinstance', $context);
if ($addnode) {
$id = $context->instanceid;
$url = new moodle_url('/mod/pulse/automation/instances/list.php', [
Expand Down
2 changes: 1 addition & 1 deletion version.php
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,7 @@
defined('MOODLE_INTERNAL') || die();

$plugin->component = 'mod_pulse';
$plugin->version = 2023100702;
$plugin->version = 2023100703;
$plugin->requires = 2020061500; // Requires Moodle 3.90.
$plugin->release = 'v2.0';
$plugin->maturity = MATURITY_RC;
Expand Down

0 comments on commit e3c3988

Please sign in to comment.