Skip to content
Permalink
Browse files

Add option to setting to hide lp navigation with arrows see BT#14938

New option in setting added "hide_lp_arrow_navigation":

$_configuration['lp_view_settings'] = [
    'display' => [
        'show_reporting_icon' => true,
        'hide_lp_arrow_navigation' => false,
    ],
];
  • Loading branch information...
jmontoyaa committed Oct 29, 2018
1 parent a16f361 commit 744479d6df2adc944016d31b74ff846c4ceca4c8
Showing with 28 additions and 12 deletions.
  1. +6 −1 main/install/configuration.dist.php
  2. +22 −11 main/lp/learnpath.class.php
@@ -817,7 +817,12 @@
//$_configuration['send_two_inscription_confirmation_mail'] = false;
// LP view custom settings
// $_configuration['lp_view_settings'] = ['display' => ['show_reporting_icon' => true]];
/*$_configuration['lp_view_settings'] = [
'display' => [
'show_reporting_icon' => true,
'hide_lp_arrow_navigation' => false,
],
];*/
// Force to hide the invisible course documents in sessions
//$_configuration['hide_invisible_course_documents_in_sessions'] = false;
@@ -2022,26 +2022,37 @@ public function get_navigation_bar($idBar = null, $display = null)
<span class="fa fa-info"></span><span class="sr-only">'.$reportingText.'</span>
</a>';
if (!empty($display)) {
$showReporting = isset($display['show_reporting_icon']) ? $display['show_reporting_icon'] : true;
if ($showReporting == false) {
$reportingIcon = '';
}
}
$previousIcon = '
<a class="icon-toolbar" id="scorm-previous" href="#"
onclick="switch_item('.$mycurrentitemid.',\'previous\');return false;" title="'.$previousText.'">
<span class="fa fa-chevron-left"></span><span class="sr-only">'.$previousText.'</span>
</a>';
$hideArrows = false;
if (isset($settings['display']) && isset($settings['display']['hide_lp_arrow_navigation'])) {
$hideArrows = $settings['display']['hide_lp_arrow_navigation'];
}
$nextIcon = '
<a class="icon-toolbar" id="scorm-next" href="#"
onclick="switch_item('.$mycurrentitemid.',\'next\');return false;" title="'.$nextText.'">
<span class="fa fa-chevron-right"></span><span class="sr-only">'.$nextText.'</span>
</a>';
$previousIcon = '';
$nextIcon = '';
if ($hideArrows === false) {
$previousIcon = '
<a class="icon-toolbar" id="scorm-previous" href="#"
onclick="switch_item('.$mycurrentitemid.',\'previous\');return false;" title="'.$previousText.'">
<span class="fa fa-chevron-left"></span><span class="sr-only">'.$previousText.'</span>
</a>';
$nextIcon = '
<a class="icon-toolbar" id="scorm-next" href="#"
onclick="switch_item('.$mycurrentitemid.',\'next\');return false;" title="'.$nextText.'">
<span class="fa fa-chevron-right"></span><span class="sr-only">'.$nextText.'</span>
</a>';
}
if ($this->mode == 'fullscreen') {
if ($this->mode === 'fullscreen') {
$navbar = '
<span id="'.$idBar.'" class="buttons">
'.$reportingIcon.'

0 comments on commit 744479d

Please sign in to comment.
You can’t perform that action at this time.