Merge branch 'MDL-73914-master' of https://github.com/lameze/moodle
This commit is contained in:
@@ -4737,14 +4737,13 @@ class settings_navigation extends navigation_node {
|
||||
}
|
||||
|
||||
// Prepare data for course content download functionality if it is enabled.
|
||||
// Will only be included here if the action menu is already in use, otherwise a button will be added to the UI elsewhere.
|
||||
if (\core\content::can_export_context($coursecontext, $USER) && !empty($coursenode->get_children_key_list())) {
|
||||
if (\core\content::can_export_context($coursecontext, $USER)) {
|
||||
$linkattr = \core_course\output\content_export_link::get_attributes($coursecontext);
|
||||
$actionlink = new action_link($linkattr->url, $linkattr->displaystring, null, $linkattr->elementattributes);
|
||||
|
||||
$coursenode->add($linkattr->displaystring, $actionlink, self::TYPE_SETTING, null, 'download',
|
||||
new pix_icon('t/download', ''));
|
||||
$coursenode->get('download')->set_force_into_more_menu();
|
||||
$coursenode->get('download')->set_force_into_more_menu(true);
|
||||
}
|
||||
|
||||
// Return we are done
|
||||
|
||||
Reference in New Issue
Block a user