MDL-79986 output: Add view section action

This commit is contained in:
Sara Arjona
2023-12-01 09:15:48 +01:00
parent abba174fe1
commit d53dc05e9e
4 changed files with 10 additions and 2 deletions
File diff suppressed because one or more lines are too long
@@ -135,7 +135,13 @@ class controlmenu implements named_templatable, renderable {
$baseurl = course_get_url($course, $sectionreturn);
$baseurl->param('sesskey', sesskey());
$controls = [];
$controls['view'] = [
'url' => new moodle_url('/course/section.php', ['id' => $section->id]),
'icon' => 'i/viewsection',
'name' => get_string('view'),
'pixattr' => ['class' => ''],
'attr' => ['class' => 'icon view'],
];
if (!$isstealth && has_capability('moodle/course:update', $coursecontext, $user)) {
if ($section->section > 0
@@ -346,6 +346,7 @@ class icon_system_fontawesome extends icon_system_font {
'core:i/user' => 'fa-user',
'core:i/users' => 'fa-users',
'core:i/valid' => 'fa-check text-success',
'core:i/viewsection' => 'fa-pager',
'core:i/warning' => 'fa-exclamation text-warning',
'core:i/window_close' => 'fa-window-close',
'core:i/withsubcat' => 'fa-plus-square',
+1
View File
@@ -0,0 +1 @@
<svg xmlns="http://www.w3.org/2000/svg" height="1em" viewBox="0 0 512 512"><!--! Font Awesome Free 6.4.2 by @fontawesome - https://fontawesome.com License - https://fontawesome.com/license (Commercial License) Copyright 2023 Fonticons, Inc. --><path d="M0 128C0 92.7 28.7 64 64 64H448c35.3 0 64 28.7 64 64V384c0 35.3-28.7 64-64 64H64c-35.3 0-64-28.7-64-64V128zm64 32v64c0 17.7 14.3 32 32 32H416c17.7 0 32-14.3 32-32V160c0-17.7-14.3-32-32-32H96c-17.7 0-32 14.3-32 32zM80 320c-13.3 0-24 10.7-24 24s10.7 24 24 24h56c13.3 0 24-10.7 24-24s-10.7-24-24-24H80zm136 0c-13.3 0-24 10.7-24 24s10.7 24 24 24h48c13.3 0 24-10.7 24-24s-10.7-24-24-24H216z"/></svg>

After

Width:  |  Height:  |  Size: 648 B