Skip to content

Commit

Permalink
Fixed the undefined action_menu::set_kebab_trigger() method issue.
Browse files Browse the repository at this point in the history
  • Loading branch information
vasanthlmsace committed Feb 26, 2024
1 parent 5f077ec commit f698c87
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 2 deletions.
7 changes: 6 additions & 1 deletion classes/output/courseformat/content/cm/controlmenu.php
Original file line number Diff line number Diff line change
Expand Up @@ -61,7 +61,12 @@ public function get_action_menu(\renderer_base $output): ?action_menu {

// Convert control array into an action_menu.
$menu = new action_menu();
$menu->set_kebab_trigger(get_string('edit'));
if (method_exists($menu, 'set_kebab_trigger')) {;
$menu->set_kebab_trigger(get_string('edit'));
} else {
$icon = $output->pix_icon('i/menu', get_string('edit'));
$menu->set_menu_trigger($icon, 'btn btn-icon d-flex align-items-center justify-content-center');
}
$menu->attributes['class'] .= ' section-cm-edit-actions commands';

// Prioritise the menu ahead of all other actions.
Expand Down
2 changes: 1 addition & 1 deletion version.php
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,7 @@

defined('MOODLE_INTERNAL') || die();

$plugin->version = 2024022600; // The current plugin version (Date: YYYYMMDDXX).
$plugin->version = 2024022601; // The current plugin version (Date: YYYYMMDDXX).
$plugin->requires = 2020061500; // Requires this Moodle version.
$plugin->component = 'format_designer'; // Full name of the plugin (used for diagnostics).
$plugin->release = 'Version 1.5';
Expand Down

0 comments on commit f698c87

Please sign in to comment.