fix scorm full screem button navegation BT#10818

1.10.x
aragonc 9 years ago
parent 4f59cfa227
commit 55b592ae64
  1. 26
      main/newscorm/learnpath.class.php
  2. 4
      main/newscorm/lp_view.php

@ -1950,23 +1950,31 @@ class learnpath
if(empty($idBar)){
$idBar='control-top';
}
if(empty($display)){
/* if(empty($display)){
$display='display:block';
}
} */
$navbar = null;
$lp_id = $this->lp_id;
$mycurrentitemid = $this->get_current_item_id();
if ($this->mode == 'fullscreen') {
$navbar = '
<div id="'.$idBar.'" class="buttons well" style="'.$display.'">
<a href="lp_controller.php?action=stats&'.api_get_cidreq(true).'&lp_id='.$lp_id.'" onclick="window.parent.API.save_asset();return true;" target="content_name_blank" title="stats" id="stats_link"><img border="0" src="../img/btn_stats.png" title="' . get_lang('Reporting') . '"></a>
<a id="scorm-previous" href="#" onclick="switch_item(' . $mycurrentitemid . ',\'previous\');return false;" title="previous"><img border="0" src="../img/btn_previous.png" title="' . get_lang('ScormPrevious') . '"></a>
<a id="scorm-next" href="#" onclick="switch_item(' . $mycurrentitemid . ',\'next\');return false;" title="next" ><img border="0" src="../img/btn_next.png" title="' . get_lang('ScormNext') . '"></a>.
<a href="lp_controller.php?action=mode&mode=embedded" target="_top" title="embedded mode"><img border="0" src="../img/view_choose.gif" title="'.get_lang('ScormExitFullScreen').'"></a>
</div>';
<span id="'.$idBar.'" class="buttons">
<a class="icon-toolbar" href="lp_controller.php?action=stats&'.api_get_cidreq(true).'&lp_id='.$lp_id.'" onclick="window.parent.API.save_asset();return true;" target="content_name" title="stats" id="stats_link">
<span class="fa fa-info"></span><span class="sr-only">' . get_lang('Reporting') . '</span>
</a>
<a class="icon-toolbar" id="scorm-previous" href="#" onclick="switch_item(' . $mycurrentitemid . ',\'previous\');return false;" title="previous">
<span class="fa fa-chevron-left"></span><span class="sr-only">' . get_lang('ScormPrevious') . '</span>
</a>
<a class="icon-toolbar" id="scorm-next" href="#" onclick="switch_item(' . $mycurrentitemid . ',\'next\');return false;" title="next">
<span class="fa fa-chevron-right"></span><span class="sr-only">' . get_lang('ScormNext') . '</span>
</a>
<a class="icon-toolbar" id="view-embedded" href="lp_controller.php?action=mode&mode=embedded" target="_top" title="embedded mode">
<span class="fa fa-columns"></span><span class="sr-only">' . get_lang('ScormExitFullScreen') . '</span>
</a>
</span>';
} else {
} else {
$navbar = '
<span id="'.$idBar.'" class="buttons text-right">
<a class="icon-toolbar" href="lp_controller.php?action=stats&'.api_get_cidreq(true).'&lp_id='.$lp_id.'" onclick="window.parent.API.save_asset();return true;" target="content_name" title="stats" id="stats_link">

@ -31,7 +31,7 @@ $show_learnpath = true;
api_protect_course_script();
$lp_id = intval($_GET['lp_id']);
$lp_id = !empty($_GET['lp_id'])?intval($_GET['lp_id']):0;
$sessionId = api_get_session_id();
// Check if the learning path is visible for student - (LP requisites)
@ -123,7 +123,7 @@ $htmlHeadXtra[] = '<script src="js/documentapi.js" type="text/javascript" langua
$htmlHeadXtra[] = '<script>
var sv_user = \'' . api_get_user_id() . '\';
var sv_course = chamilo_courseCode;
var sv_sco = \'' . intval($_REQUEST['lp_id']) . '\';
var sv_sco = \'' . $lp_id . '\';
</script>'; // FIXME fetch sco and userid from a more reliable source directly in sotrageapi.js
$htmlHeadXtra[] = '<script type="text/javascript" src="js/storageapi.js"></script>';

Loading…
Cancel
Save