diff --git a/blocks/site_main_menu/block_site_main_menu.php b/blocks/site_main_menu/block_site_main_menu.php index 7f650c46f3848..762bb6416b0b7 100644 --- a/blocks/site_main_menu/block_site_main_menu.php +++ b/blocks/site_main_menu/block_site_main_menu.php @@ -89,6 +89,20 @@ function get_content() { } if (!$ismoving) { $actions = course_get_cm_edit_actions($mod, -1); + + // Add the action move. + $modcontext = context_module::instance($mod->id); + $hasmanageactivities = has_capability('moodle/course:manageactivities', $modcontext); + if ($hasmanageactivities) { + $baseurl = new moodle_url('/course/mod.php', array('sesskey' => sesskey())); + $actions['move'] = new action_menu_link_primary( + new moodle_url($baseurl, array('copy' => $mod->id)), + new pix_icon('t/move', get_string('move'), 'moodle', array('class' => 'iconsmall', 'title' => '')), + null, + array('title' => get_string('move')) + ); + } + $editbuttons = html_writer::tag('div', $courserenderer->course_section_cm_edit_actions($actions, $mod, array('donotenhance' => true)), array('class' => 'buttons')