diff --git a/classes/notification/manager.php b/classes/notification/manager.php index b90fd26..0b95507 100644 --- a/classes/notification/manager.php +++ b/classes/notification/manager.php @@ -186,16 +186,12 @@ public static function render_notifications(int $instanceid, ?string $tableid = $rows[] = $row; } - if (static::get_candidate_types($instanceid)) { + if ($canmanage && static::get_candidate_types($instanceid)) { $url = new \moodle_url('/local/openlms/notification/create.php', ['instanceid' => $instanceid, 'component' => $component]); $icon = new \local_openlms\output\dialog_form\icon($url, 'e/insert', get_string('notification_create', 'local_openlms')); $icon = $dialogformoutput->render($icon); $cell = new \html_table_cell($icon); - if ($canmanage) { - $cell->colspan = 4; - } else { - $cell->colspan = 3; - } + $cell->colspan = 4; $rows[] = [$cell]; }