Merge branch '1.10.x' of github.com:chamilo/chamilo-lms into 1.10.x

1.10.x
Yannick Warnier 10 years ago
commit ff3a9b45b2
  1. 53
      app/Resources/public/css/base.css
  2. 15
      app/Resources/public/css/scorm.css
  3. 53
      main/newscorm/learnpath.class.php
  4. 4
      main/newscorm/lp_view.php
  5. 89
      main/template/default/learnpath/view.tpl

@ -3372,15 +3372,8 @@ a.forum_group_link {
/* actions */
.actions_lp {
background:#F8F8F8;
margin: 0px;
padding:9px 0px 9px 0px;
width:100%;
text-align: center;
}
.actions_lp .btn-group {
margin-left: 25px;
}
.actions_lp img {
vertical-align:middle;
@ -3574,51 +3567,6 @@ a.forum_group_link {
box-shadow:none;
}
.announcement {
border: 1px solid #D3D3D3;
color: #555555;
font-weight: normal;
border-spacing: 0;
margin-bottom: 15px;
margin-top: 8px;
text-align: left;
width: 100%;
}
.announcement .title{
background: none repeat scroll 0 0 #F2F2F2;
color:black;
}
.announcement .title a:link,
.announcement .title a:active,
.announcement .title a:visited{
color: #555555;
}
.announcement .icon.attachement{
border:none;
border-radius: 0;
background-color: transparent;
width:16px;
height:16px;
margin:0;
padding:0;
display:inline-block;
background-image: url('../../main/img/attachment.gif');
background-repeat: no-repeat;
background-position:center center;
box-shadow:none;
}
li.annoucement{
min-height: 76px;
}
.announcement .details{
font-style: italic;
text-align: right;
}
.control-text{
padding-top: 5px;
display:inline-block;
@ -5852,6 +5800,7 @@ a.sessionView {
border-radius: 25px;
border-color: #00677C;
}
/* CSS NEW TOP ******************************************************************************/
/* CSS Responsive */
@media (min-width: 1025px) and (max-width: 1200px) {

@ -55,9 +55,22 @@ See https://support.chamilo.org/issues/6976
border-radius: 4px;
-webkit-border-radius: 4px;
-moz-border-radius: 4px;
margin-bottom: 10px;
margin-bottom: 5px;
margin-top: 5px;
}
#learning_path_left_zone #scorm-gamification{
padding: 10px;
border: 1px solid #DDD;
border-radius: 5px;
margin-bottom: 5px;
}
#scorm-gamification .fa-star{
font-size: 20px;
color: #C2C2C2;
}
#scorm-gamification .fa-star.level{
color: #D9534F;
}
#learning_path_left_zone .navegation-bar .buttons{
text-align: center;
padding-top: 5px;

@ -2402,7 +2402,7 @@ class learnpath
{
$text = $percentage . $text_add;
$output = '<div class="progress">
<div id="progress_bar_value" class="progress-bar" role="progressbar" aria-valuenow="' .$percentage. '" aria-valuemin="0" aria-valuemax="100" style="width: '.$text.';">
<div id="progress_bar_value" class="progress-bar progress-bar-warning" role="progressbar" aria-valuenow="' .$percentage. '" aria-valuemin="0" aria-valuemax="100" style="width: '.$text.';">
'. $text .'
</div>
</div>';
@ -3115,25 +3115,9 @@ class learnpath
}
//$html = '<div id="scorm_title" class="scorm-heading">'.Security::remove_XSS($this->get_name()) . '</div>';
$html = '<div class="scorm-body">';
$hide_teacher_icons_lp = api_get_configuration_value('hide_teacher_icons_lp');
if ($is_allowed_to_edit && $hide_teacher_icons_lp == false) {
$gradebook = '';
if (!empty($_GET['gradebook'])) {
$gradebook = Security:: remove_XSS($_GET['gradebook']);
}
if ($this->get_lp_session_id() == api_get_session_id()) {
$html .= '<div id="actions_lp" class="actions_lp">';
$html .= '<div class="btn-group">';
$html .= "<a class='btn btn-default' href='lp_controller.php?" . api_get_cidreq()."&gradebook=$gradebook&action=build&lp_id=" . $this->lp_id . "' target='_parent'>" . get_lang('Overview') . "</a>";
$html .= "<a class='btn btn-default' href='lp_controller.php?" . api_get_cidreq()."&action=add_item&type=step&lp_id=" . $this->lp_id . "' target='_parent'>" . get_lang('Edit') . "</a>";
$html .= '<a class="btn btn-default" href="lp_controller.php?'.api_get_cidreq()."&gradebook=$gradebook&action=edit&lp_id=" . $this->lp_id.'">'.get_lang('Settings').'</a>';
$html .= '</div>';
$html .= '</div>';
}
}
$html .= '<div id="inner_lp_toc" class="inner_lp_toc">';
$html .= '<div id="inner_lp_toc" class="inner_lp_toc scrollbar-light">';
require_once 'resourcelinker.inc.php';
// Temporary variables.
@ -3228,7 +3212,36 @@ class learnpath
$html .= "</div>";
return $html;
}
/**
* Returns an HTML-formatted string ready to display with teacher buttons
* in LP view menu
* @return string HTML TOC ready to display
*/
public function get_teacher_toc_buttons()
{
$is_allowed_to_edit = api_is_allowed_to_edit(null, true, false, false);
$hide_teacher_icons_lp = api_get_configuration_value('hide_teacher_icons_lp');
$html = '';
if ($is_allowed_to_edit && $hide_teacher_icons_lp == false) {
$gradebook = '';
if (!empty($_GET['gradebook'])) {
$gradebook = Security:: remove_XSS($_GET['gradebook']);
}
if ($this->get_lp_session_id() == api_get_session_id()) {
$html .= '<div id="actions_lp" class="actions_lp">';
$html .= '<div class="btn-group">';
$html .= "<a class='btn btn-sm btn-default' href='lp_controller.php?" . api_get_cidreq()."&gradebook=$gradebook&action=build&lp_id=" . $this->lp_id . "' target='_parent'>" . Display::returnFontAswesomeIcon('street-view') . get_lang('Overview') . "</a>";
$html .= "<a class='btn btn-sm btn-default' href='lp_controller.php?" . api_get_cidreq()."&action=add_item&type=step&lp_id=" . $this->lp_id . "' target='_parent'>" . Display::returnFontAswesomeIcon('pencil') . get_lang('Edit') . "</a>";
$html .= '<a class="btn btn-sm btn-default" href="lp_controller.php?'.api_get_cidreq()."&gradebook=$gradebook&action=edit&lp_id=" . $this->lp_id.'">' . Display::returnFontAswesomeIcon('cog') . get_lang('Settings').'</a>';
$html .= '</div>';
$html .= '</div>';
}
}
return $html;
}
/**
* Gets the learnpath maker name - generally the editor's name
* @return string Learnpath maker name

@ -140,6 +140,8 @@ if ($debug) {
}
$get_toc_list = $_SESSION['oLP']->get_toc();
$get_teacher_buttons = $_SESSION['oLP']->get_teacher_toc_buttons();
$type_quiz = false;
foreach ($get_toc_list as $toc) {
if ($toc['id'] == $lp_item_id && $toc['type'] == 'quiz') {
@ -483,6 +485,8 @@ $template->assign('progress_bar', $progress_bar);
$template->assign('show_audio_player', $show_audioplayer);
$template->assign('media_player', $mediaplayer);
$template->assign('toc_list', $get_toc_list);
$template->assign('teacher_toc_buttons', $get_teacher_buttons);
$template->assign('iframe_src', $src);
$template->assign('navigation_bar_bottom', $navigation_bar_bottom);

@ -10,40 +10,6 @@
<div class="container-fluid">
<div class="row">
<div id="learning_path_left_zone" class="sidebar-scorm">
{% if gamification_mode == 1 %}
<div id="scorm-gamification">
<div class="panel panel-default">
<div class="panel-body">
<div class="row">
<div class="col-xs-8">
{% if gamification_stars > 0 %}
{% for i in 1..gamification_stars %}
<i class="fa fa-star fa-2x"></i>
{% endfor %}
{% endif %}
{% if gamification_stars < 4 %}
{% for i in 1..4 - gamification_stars %}
<i class="fa fa-star-o fa-2x"></i>
{% endfor %}
{% endif %}
</div>
<div class="col-xs-4 text-right">
{{ "XPoints"|get_lang|format(gamification_points) }}
</div>
</div>
<div class="row">
<div class="col-xs-12 navegation-bar" id="lp_navigation_elem">
<div id="progress_bar">
{{ progress_bar }}
</div>
</div>
</div>
</div>
</div>
</div>
{% else %}
<div id="scorm-info" class="panel panel-default">
<div class="panel-heading">
<a id="ui-option">
@ -73,20 +39,54 @@
</div>
</div>
<div id="progress_bar">
{{ progress_bar }}
</div>
<div id="lp_navigation_elem" class="navegation-bar">
{{ navigation_bar }}
</div>
{% if gamification_mode == 1 %}
<!--- gamification -->
<div id="scorm-gamification">
<div class="row">
<div class="col-xs-8">
{% if gamification_stars > 0 %}
{% for i in 1..gamification_stars %}
<i class="fa fa-star level"></i>
{% endfor %}
{% endif %}
{% if gamification_stars < 4 %}
{% for i in 1..4 - gamification_stars %}
<i class="fa fa-star"></i>
{% endfor %}
{% endif %}
</div>
<div class="col-xs-4 text-right">
{{ "XPoints"|get_lang|format(gamification_points) }}
</div>
</div>
<div class="row">
<div class="col-xs-12 navegation-bar" id="lp_navigation_elem">
<div id="progress_bar">
{{ progress_bar }}
</div>
</div>
</div>
</div>
<!--- end gamification -->
{% else %}
<div id="progress_bar">
{{ progress_bar }}
</div>
{% endif %}
{% if show_audio_player %}
<div id="lp_media_file">
{{ media_player }}
</div>
{% endif %}
{{ teacher_toc_buttons }}
</div>
</div>
{% endif %}
{# TOC layout #}
<div id="toc_id" class="scorm-body" name="toc_name">
@ -119,6 +119,7 @@
<script>
// Resize right and left pane to full height (HUB 20-05-2010).
var updateContentHeight = function () {
document.body.style.overflow = 'hidden';
var IE = window.navigator.appName.match(/microsoft/i);
@ -130,20 +131,22 @@
var heightScormInfo = $('#scorm-info').height();
var heightTop = heightScormInfo + 100;
jQuery('.scrollbar-light').scrollbar();
//heightTop = (heightTop > 300)? heightTop : 300;
var innerHeight = $(window).height();
if (innerHeight <= 640) {
$('#inner_lp_toc').css('height', innerHeight - heightTop + "px");
$('.scrollbar-light').css('height', innerHeight - heightTop + "px");
$('#content_id').css('height', innerHeight - heightControl + "px");
} else {
$('#inner_lp_toc').css('height', innerHeight - heightBreadcrumb - heightTop + "px");
$('.scrollbar-light').css('height', innerHeight - heightBreadcrumb - heightTop + "px");
$('#content_id').css('height', innerHeight - heightControl + "px");
}
//var innerHeight = (IE) ? document.body.clientHeight : window.innerHeight ;
//var innerHeight = (IE) ? document.body.clientHeight : window.innerHeight ;
// Loads the glossary library.
{% if glossary_extra_tools in glossary_tool_availables %}

Loading…
Cancel
Save