Merge branch '1.9.x' of ssh://github.com/chamilo/chamilo-lms into chamilo19

1.9.x
Julio Montoya 11 years ago
commit 3360cc02d4
  1. 21
      main/course_home/course_home.php
  2. 3
      main/course_progress/thematic_advance.php
  3. 160
      main/css/base.css
  4. 88
      main/css/chamilo/default.css
  5. 1
      main/css/chamilo_electric_blue/default.css
  6. 46
      main/css/responsive.css
  7. BIN
      main/css/thematic.png
  8. 338
      main/inc/introductionSection.inc.php
  9. 8
      main/inc/lib/thematic.lib.php
  10. 5
      main/lang/english/trad4all.inc.php
  11. 5
      main/lang/spanish/trad4all.inc.php

@ -48,6 +48,21 @@ require_once dirname(__FILE__).'/../inc/global.inc.php';
//unset($_SESSION['lpobject']);
$htmlHeadXtra[] ='<script>
/* option show/hide thematic-block */
$(document).ready(function(){
$("#thematic-show").click(function(){
$(".btn-hide-thematic").hide();
$(".btn-show-thematic").show(); //show using class
});
$("#thematic-hide").click(function(){
$(".btn-show-thematic").hide(); //show using class
$(".btn-hide-thematic").show();
});
});
$(document).ready(function() {
$(".make_visible_and_invisible").attr("href", "javascript:void(0);");
$(".make_visible_and_invisible > img").click(function () {
@ -102,12 +117,6 @@ $(document).ready(function() {
});
});
/* toogle for post-it in course home */
$(function() {
$(".thematic-postit-head").click(function() {
$(".thematic-postit-center").slideToggle("fast");
});
});
</script>';

@ -70,7 +70,7 @@ if ($action == 'thematic_advance_add' || $action == 'thematic_advance_edit') {
$form->addElement('html', '</div>');
$form->add_textfield('duration_in_hours', get_lang('DurationInHours'), false, array('size'=>'3','id'=>'duration_in_hours_element'));
$form->add_textfield('duration_in_hours', get_lang('DurationInHours'), false, array('size'=>'3','id'=>'duration_in_hours_element', 'autofocus' => 'autofocus'));
$form->add_html_editor('content', get_lang('Content'), false, false, array('ToolbarStartExpanded'=>'false', 'ToolbarSet' => 'TrainingDescription', 'Width' => '80%', 'Height' => '150'));
//$form->addElement('textarea', 'content', get_lang('Content'));
@ -105,6 +105,7 @@ if ($action == 'thematic_advance_add' || $action == 'thematic_advance_edit') {
$default['start_date_type'] = 1;
$default['custom_start_date'] = date('d-F-Y H:i', api_strtotime(api_get_local_time()));
$default['duration_in_hours'] = 1;
if (!empty($thematic_advance_data)) {

@ -44,6 +44,120 @@ header #logo {
header #logo img{
margin-left: 30px;
}
/* START COURSE PROGRESS */
.thematic-postit{
padding-top: 5px;
padding-bottom: px;
}
.thematic-postit .tittle-score{
padding-bottom: 5px;
font-size: 16px;
color: #006699;
}
.thematic-postit .topics{
font-size: 12px;
padding-bottom: 5px;
color: #006699;
}
.items-progress {
border-top: 2px solid #C4DDEB;
padding: 5px;
margin-top: 0px;
background-color: #ECF4F8;
}
.items-progress.current {
border-top: 2px solid #C4DDEB;
padding: 5px;
margin-top: 0px;
background-color: #C4DDEB;
}
.items-progress .date{
color: #666;
font-size: 11px;
display: block;
}
.items-progress .title{
font-size: 14px;
line-height: 18px;
display: block;
}
.items-progress .time{
display: block;
padding-top: 5px;
}
.info-progress{
padding: 10px;
}
.score-thematic .score{
text-align: right;
}
.score-thematic .name-student{
font-weight: bold;
font-size: 16px;
padding-left: 70px;
margin: 0px;
}
.score-thematic{
color: #666;
}
.score-thematic p{
padding: 0px;
margin: 0px;
}
.row-fluid.score-thematic {
padding-top: 5px;
}
.accordion-heading .accordion-toggle {
display: inline;
padding-bottom: 3px;
padding-left: 10px;
padding-right: 10px;
padding-top: 3px;
float: right;
margin-top: 10px;
margin-bottom: 10px;
margin-right: 15px;
}
.accordion-heading .title-accordion{
padding:0px;
background:url(thematic.png) no-repeat left bottom transparent;
}
.name-student h2{
font-size: 18px;
margin: 0;
}
.accordion-heading h3, .accordion-heading h2{
line-height: 17px;
}
.accordion-group{
border: 1px solid #D4E6F0;
}
.name-student h3{
font-size: 13px;
font-weight: normal;
margin: 0;
}
.accordion-heading {
background-color: #E7F1F7;
}
.items-progress p{
margin-bottom: 3px;
}
.accordion-body.collapse {
height: 0;
display: none;
}
.accordion-body.collapse.in {
height: auto;
display: block;
}
/* END COURSE PROGRESS*/
.subnav .brand {
display:none;
}
@ -198,9 +312,10 @@ header {
width: 0%;
}
.breadcrumb li img:nth-child(n) {
.breadcrumb li img:nth-child(n) {
width: auto;
}
margin-top: -4px;
}
/* To fix the increase/decrease buttons */
label, input, button, select, textarea, p {
@ -300,10 +415,6 @@ form .formw input {
[dir=rtl] #top_main_content .span9 {
float: right;
}
#top_main_content .span6 {
width: 460px;
}
/* New changes Chamilo 1.9 */
@ -1295,39 +1406,6 @@ button.next.disabled {
text-shadow: gray 3px 3px 2px;
}
/* THEMATIC ADVANCE */
.thematic-postit {
width:250px;
height:auto;
overflow:hidden;
float:right;
}
.thematic-postit-top {
background-image: url('../img/postit_top.png');
height: 38px;
}
.thematic-postit-top h3 {
margin:20px 5px 10px 20px;
padding-top:40px;
}
.thematic-postit-bottom {
background-image: url('../img/postit_bottom.png');
height:40px;
}
.thematic-postit-center {
background-image: url('../img/postit_center.png');
height:auto;
margin-top: 0px;
margin-bottom:-16px;
padding: 28px 20px 0;
}
#titlethematic{
text-transform: uppercase;
}
/* ATTENDANCE */
div.attendance-calendar-add div.row div.formw,div.attendance-calendar-edit div.row div.formw {
@ -3698,10 +3776,6 @@ a:active{
text-shadow: 1px 1px 2px #000000;
}
#course_tools .row h3 {
margin-top:10px;
}
.td_actions {
width: 250px;
}

@ -35,9 +35,9 @@ a:active {
color: #FFFFFF;
}
.subnav .navbar-inner {
-webkit-border-radius: 8px;
-moz-border-radius: 8px;
border-radius: 8px;
-webkit-border-radius: 2px;
-moz-border-radius: 2px;
border-radius: 2px;
border: 1px solid #178ACC;
background: #4fb2ea; /* Old browsers */
background: -moz-linear-gradient(top, #4fb2ea 0%, #0191c7 100%); /* FF3.6+ */
@ -129,6 +129,7 @@ a.thumbnail:hover{
.breadcrumb a.btn-mini{
line-height: 17px;
text-transform: none;
margin-top: 5px;
}
.breadcrumb a.btn-mini > .btn-success{
color: #FFFFFF;
@ -308,31 +309,6 @@ a.thumbnail:hover{
width: 800px;
}
/* COURSE INTRO CONTENT */
.page-course-intro{
padding: 2em;
border: 1px solid #DDDDDD;
-webkit-border-radius: 10px;
-moz-border-radius: 10px;
border-radius: 10px;
margin-bottom: 2em;
}
.page-course-intro ul{
list-style-image:url(images/vineta.png);
padding-top: 10px;
}
.page-course-intro a{
color: #FD6600;
}
.page-course-intro a:hover{
color: #FD6600;
text-decoration: underline;
}
/* END OF COURSE INTRO*/
.fc-header-title h2{
color: #0191C7;
}
@ -452,22 +428,16 @@ a.thumbnail:hover{
}
.breadcrumb {
margin-bottom: 0;
background: rgb(255,255,255); /* Old browsers */
background: -moz-linear-gradient(top, rgba(255,255,255,1) 0%, rgba(192,219,234,1) 100%); /* FF3.6+ */
background: -webkit-gradient(linear, left top, left bottom, color-stop(0%,rgba(255,255,255,1)), color-stop(100%,rgba(192,219,234,1))); /* Chrome,Safari4+ */
background: -webkit-linear-gradient(top, rgba(255,255,255,1) 0%,rgba(192,219,234,1) 100%); /* Chrome10+,Safari5.1+ */
background: -o-linear-gradient(top, rgba(255,255,255,1) 0%,rgba(192,219,234,1) 100%); /* Opera 11.10+ */
background: -ms-linear-gradient(top, rgba(255,255,255,1) 0%,rgba(192,219,234,1) 100%); /* IE10+ */
background: linear-gradient(to bottom, rgba(255,255,255,1) 0%,rgba(192,219,234,1) 100%); /* W3C */
filter: progid:DXImageTransform.Microsoft.gradient( startColorstr='#ffffff', endColorstr='#c0dbea',GradientType=0 ); /* IE6-9 */
padding-top: 5px;
padding-bottom: 5px;
background-image: none;
background-color: #e7f1f7;
padding-top: 0;
padding-bottom: 0;
margin-top: 5px;
border: 1px solid #B1D6EC;
border: 1px solid #d4e6f0;
box-shadow: none;
}
.breadcrumb a{
padding-top: 0;
line-height: 30px;
text-transform: none;
}
@ -576,14 +546,20 @@ a.thumbnail:hover{
/*CSS PARA CONTENIDO DE CURSO INTRODUCCION*/
.page-course-intro{
padding: 2em;
border: 1px solid #DDDDDD;
-webkit-border-radius: 10px;
padding: 5px;
border: none;
/*-webkit-border-radius: 10px;
-moz-border-radius: 10px;
border-radius: 10px;
margin-bottom: 2em;
border-radius: 10px;*/
margin-bottom: 5px;
}
.thumbnail > img {
display: block;
margin-left: auto;
margin-right: auto;
max-width: 100%;
height: auto;
}
.page-course-intro ul{
list-style-image:url(images/vineta.png);
padding-top: 10px;
@ -822,16 +798,6 @@ footer a:link, footer a:visited {
background: transparent url('images/systemenouvelles.jpg') no-repeat top left;
}
.topa {
background:transparent url('images/logoa4.gif') no-repeat;
}
.topb {
background:transparent url('images/logob4.gif') no-repeat;
}
#bottomhellomindfactory {
background:transparent url('images/textologo.jpg') no-repeat;
}
.user_login_icon{
background: url(images/user_icon.png) no-repeat 5px center;
}
@ -1116,6 +1082,14 @@ RESPONSIVE CSS
#top_main_content .menu-column #user_image_block{
box-shadow: none;
}
.navbar .nav > li > a {
float: none;
line-height: 20px;
padding-bottom: 7px;
padding-right: 10px;
padding-top: 7px;
color: #FFFFFF;
}
}
@media (max-width: 600px) {
@ -1211,6 +1185,8 @@ footer {
#announcements{
display: none;
}
}
/*+++++++++++++++++++++++++++++++++
END RESPONSIVE CSS

@ -21,6 +21,7 @@ a:active {
text-decoration: none;
color : #3757f7;
}
.navbar .nav > li > a {
float: none;
line-height: 20px;

@ -141,9 +141,41 @@ The more frequent ones have been marked with *
display: none;
visibility: hidden;
}
#header_right #notifications {
padding:0;
}
/* THEMATIC COURSE */
.score-thematic .score {
text-align: left;
width: 90px;
float: left;
padding-left: 5px;
}
.score-thematic .name-student {
display: none;
}
.score-thematic .span8 {
width: 320px;
}
.accordion-heading .title-accordion{
background: none;
}
.accordion-heading .accordion-toggle{
margin-right: 0;
}
.accordion-inner .span4 .row-fluid .span4 {
width: 105px;
}
.navbar .nav > li > a {
float: none;
line-height: 20px;
padding-bottom: 7px;
padding-right: 10px;
padding-top: 7px;
color: #FFFFFF;
}
/* END THEMATIC COURSE */
#top_main_content .span6 {
width: 100%;
}
@ -328,13 +360,12 @@ The more frequent ones have been marked with *
.course-tool {
float: left;
height: 150px;
width: 150px;
width: 50%;
}
.course-tool h4 {
font-size: 14px;
}
.subbav .nav > li > a:hover,
.subbav .dropdown-menu a:hover {
background-color: #555;
@ -503,7 +534,7 @@ The more frequent ones have been marked with *
}
.course-tool {
width: 210px;
width: 160px;
}
.course-tool h4 {
font-size: 14px;
@ -662,13 +693,6 @@ The more frequent ones have been marked with *
border:none;
box-shadow: none;
}
.thumbnail > img{
-webkit-border-radius: 10px;
-moz-border-radius: 10px;
border-radius: 10px;
border: 3px solid #FFFFFF;
box-shadow: none;
}
}
@media (max-width: 600px) {
@ -852,7 +876,7 @@ The more frequent ones have been marked with *
float: left;
}
.course-tool {
width: 260px;
width: 160px;
}
.btn-invitations {
margin-left: 120px;

Binary file not shown.

After

Width:  |  Height:  |  Size: 1.4 KiB

@ -2,27 +2,32 @@
/* For licensing terms, see /license.txt */
/**
* The INTRODUCTION MICRO MODULE is used to insert and edit
* an introduction section on a Chamilo Module. It can be inserted on any
* Chamilo Module, provided a connection to a course Database is already active.
* an introduction section on a Chamilo module or on the course homepage.
* It can be inserted on any Chamilo module, provided the corresponding setting
* is enabled in the administration section.
*
* The introduction content are stored on a table called "introduction"
* in the course Database. Each module introduction has an Id stored on
* the table. It is this id that can make correspondance to a specific module.
* The introduction content are stored in a table called "tool_intro"
* in the course Database. Each module introduction has an Id stored in
* the table, which matches a specific module.
*
* 'introduction' table description
* '(c_)tool_intro' table description
* c_id: int
* id : int
* intro_text :text
*
* session_id: int
*
* usage :
*
* $moduleId = XX // specifying the module Id
* include(moduleIntro.inc.php);
* include(introductionSection.inc.php);
*
* This script is also used since Chamilo 1.9 to show course progress (from the
* course_progress module)
*
* @package chamilo.include
* @package chamilo.include
*/
/* Constants and variables */
/* Constants and variables */
$TBL_INTRODUCTION = Database::get_course_table(TABLE_TOOL_INTRO);
$intro_editAllowed = $is_allowed_to_edit;
@ -52,6 +57,7 @@ $height = '300';
// The global variable $fck_attribute has been deprecated. It stays here for supporting old external code.
global $fck_attribute;
if (is_array($fck_attribute)) {
if (isset($fck_attribute['ToolbarSet'])) {
$toolbar_set = $fck_attribute['ToolbarSet'];
@ -81,7 +87,7 @@ if (is_array($editor_config)) {
$form->add_html_editor('intro_content', null, null, false, $editor_config);
$form->addElement('style_submit_button', 'intro_cmdUpdate', get_lang('SaveIntroText'), 'class="save"');
/* INTRODUCTION MICRO MODULE - COMMANDS SECTION (IF ALLOWED) */
/* INTRODUCTION MICRO MODULE - COMMANDS SECTION (IF ALLOWED) */
$course_id = api_get_course_int_id();
if ($intro_editAllowed) {
@ -112,7 +118,7 @@ if ($intro_editAllowed) {
}
/* INTRODUCTION MICRO MODULE - DISPLAY SECTION */
/* INTRODUCTION MICRO MODULE - DISPLAY SECTION */
/* Retrieves the module introduction text, if exist */
/* @todo use a lib to query the $TBL_INTRODUCTION table */
@ -145,88 +151,183 @@ if (!empty($session_id)) {
/* Determines the correct display */
if ($intro_cmdEdit || $intro_cmdAdd) {
$intro_dispDefault = false;
$intro_dispForm = true;
$intro_dispCommand = false;
$intro_dispDefault = false;
$intro_dispForm = true;
$intro_dispCommand = false;
} else {
$intro_dispDefault = true;
$intro_dispForm = false;
if ($intro_editAllowed) {
$intro_dispCommand = true;
} else {
$intro_dispCommand = false;
}
$intro_dispDefault = true;
$intro_dispForm = false;
if ($intro_editAllowed) {
$intro_dispCommand = true;
} else {
$intro_dispCommand = false;
}
}
/* Executes the display */
// display thematic advance inside a postit
if ($intro_dispForm) {
$default['intro_content'] = $intro_content;
$form->setDefaults($default);
$introduction_section .= '<div id="courseintro" style="width: 98%">';
$introduction_section .= $form->return_form();
$introduction_section .= '</div>';
$default['intro_content'] = $intro_content;
$form->setDefaults($default);
$introduction_section .= '<div id="courseintro" style="width: 98%">';
$introduction_section .= $form->return_form();
$introduction_section .= '</div>';
}
$thematic_description_html = '';
if ($tool == TOOL_COURSE_HOMEPAGE && !isset($_GET['intro_cmdEdit'])) {
// Only show this if we're on the course homepage and we're not currently editing
$thematic = new Thematic();
$displayMode = api_get_course_setting('display_info_advance_inside_homecourse');
$class1 = '';
if ($displayMode == '1') {
// Show only the current course progress step
// $information_title = get_lang('InfoAboutLastDoneAdvance');
$last_done_advance = $thematic->get_last_done_thematic_advance();
$thematic_advance_info = $thematic->get_thematic_advance_list($last_done_advance);
$subTitle1 = get_lang('CurrentTopic');
$class1 = ' current';
} else if($displayMode == '2') {
// Show only the two next course progress steps
// $information_title = get_lang('InfoAboutNextAdvanceNotDone');
$last_done_advance = $thematic->get_next_thematic_advance_not_done();
$next_advance_not_done = $thematic->get_next_thematic_advance_not_done(2);
$thematic_advance_info = $thematic->get_thematic_advance_list($last_done_advance);
$thematic_advance_info2 = $thematic->get_thematic_advance_list($next_advance_not_done);
$subTitle1 = $subTitle2 = get_lang('NextTopic');
} else if($displayMode == '3') {
// Show the current and next course progress steps
// $information_title = get_lang('InfoAboutLastDoneAdvanceAndNextAdvanceNotDone');
$last_done_advance = $thematic->get_last_done_thematic_advance();
$next_advance_not_done = $thematic->get_next_thematic_advance_not_done();
$thematic_advance_info = $thematic->get_thematic_advance_list($last_done_advance);
$thematic_advance_info2 = $thematic->get_thematic_advance_list($next_advance_not_done);
$subTitle1 = get_lang('CurrentTopic');
$subTitle2 = get_lang('NextTopic');
$class1 = ' current';
}
$thematic = new Thematic();
if (api_get_course_setting('display_info_advance_inside_homecourse') == '1') {
$information_title = get_lang('InfoAboutLastDoneAdvance');
$last_done_advance = $thematic->get_last_done_thematic_advance();
$thematic_advance_info = $thematic->get_thematic_advance_list($last_done_advance);
} else if(api_get_course_setting('display_info_advance_inside_homecourse') == '2') {
$information_title = get_lang('InfoAboutNextAdvanceNotDone');
$next_advance_not_done = $thematic->get_next_thematic_advance_not_done();
$thematic_advance_info = $thematic->get_thematic_advance_list($next_advance_not_done);
} else if(api_get_course_setting('display_info_advance_inside_homecourse') == '3') {
$information_title = get_lang('InfoAboutLastDoneAdvanceAndNextAdvanceNotDone');
$last_done_advance = $thematic->get_last_done_thematic_advance();
$next_advance_not_done = $thematic->get_next_thematic_advance_not_done();
$thematic_advance_info = $thematic->get_thematic_advance_list($last_done_advance);
$thematic_advance_info2 = $thematic->get_thematic_advance_list($next_advance_not_done);
}
if (!empty($thematic_advance_info)) {
$thematic_advance = get_lang('CourseThematicAdvance').'&nbsp;'.$thematic->get_total_average_of_thematic_advances().'%';
if (api_is_allowed_to_edit(null, true)) {
//$thematic_advance = '<a href="'.api_get_path(WEB_CODE_PATH).'course_progress/index.php?action=thematic_details&'.api_get_cidreq().'">'.get_lang('CourseThematicAdvance').'&nbsp;'.$thematic->get_total_average_of_thematic_advances().'%</a>';
}
$thematic_info = $thematic->get_thematic_list($thematic_advance_info['thematic_id']);
$thematic_advance_info['start_date'] = api_get_local_time($thematic_advance_info['start_date']);
$thematic_advance_info['start_date'] = api_format_date($thematic_advance_info['start_date'], DATE_TIME_FORMAT_LONG);
$thematic_description_html = '<div class="thematic-postit">
<div class="thematic-postit-top"><h3><a class="thematic-postit-head" style="" href="#"> '.$thematic_advance.'</h3></a></div>
<div class="thematic-postit-center" style="display:none">';
$thematic_description_html .= '<div><strong>'.$thematic_info['title'].'</strong></div>';
$thematic_description_html .= '<div style="font-size:8pt;"><strong>'.$thematic_advance_info['start_date'].'</strong></div>';
$thematic_description_html .= '<div>'.$thematic_advance_info['content'].'</div>';
$thematic_description_html .= '<div>'.get_lang('DurationInHours').' : '.$thematic_advance_info['duration'].'</div>';
if (!empty($thematic_advance_info2)){
$thematic_info2 = $thematic->get_thematic_list($thematic_advance_info2['thematic_id']);
$thematic_advance_info2['start_date'] = api_get_local_time($thematic_advance_info2['start_date']);
$thematic_advance_info2['start_date'] = api_format_date($thematic_advance_info2['start_date'], DATE_TIME_FORMAT_LONG);
$thematic_description_html .= '<div><strong>'.$thematic_info2['title'].'</strong></div>';
$thematic_description_html .= '<div style="font-size:8pt;"><strong>'.$thematic_advance_info2['start_date'].'</strong></div>';
$thematic_description_html .= '<div>'.$thematic_advance_info2['content'].'</div>';
$thematic_description_html .= '<div>'.get_lang('DurationInHours').' : '.$thematic_advance_info2['duration'].'</div>';
$thematic_description_html .= '<br />';
}
$thematic_description_html .= '</div>
<div class="thematic-postit-bottom"></div>
</div>';
}
if (!empty($thematic_advance_info)) {
/*$thematic_advance = get_lang('CourseThematicAdvance').'&nbsp;'.
$thematic->get_total_average_of_thematic_advances().'%';*/
$thematic_advance = get_lang('CourseThematicAdvance');
$thematicScore = $thematic->get_total_average_of_thematic_advances() . '%';
$thematicUrl = api_get_path(WEB_CODE_PATH) .
'course_progress/index.php?action=thematic_details&'.api_get_cidreq();
$thematic_info = $thematic->get_thematic_list(
$thematic_advance_info['thematic_id']
);
$thematic_advance_info['start_date'] = api_get_local_time(
$thematic_advance_info['start_date']
);
$thematic_advance_info['start_date'] = api_format_date(
$thematic_advance_info['start_date'],
DATE_TIME_FORMAT_LONG
);
$userInfo = $_SESSION['_user'];
$courseInfo = api_get_course_info();
//die('<pre>'.print_r($courseInfo,1).'</pre>');
$thematic_description_html =
'<div class="thematic-postit">
<div class="row-fluid"><div class="span12">
<div class="accordion" id="progress-bar-course">
<div class="accordion-group">
<div class="accordion-heading">
<div class="title-accordion">
<div class="row-fluid score-thematic">
<div class="span8">';
$thematic_description_html .=
'<div class="span6 name-student">
<h2>' . $userInfo['firstName'] . '</h2>
<h3>' . $userInfo['lastName'] . '</h3>
</div>
<div class="span2 score">
<h1>' . $thematicScore . '</h1>
</div>
<div class="span4">
<h3>' . $thematic_advance . '</h3>
<p>' . $courseInfo['name'] . '</p>
</div>
</div>';
$thematic_description_html .=
'<div class="span4">
<a id="thematic-show" class="btn btn-small btn-primary accordion-toggle btn-hide-thematic" href="#pross" data-toggle="collapse" data-parent="#progress-bar-course">
' . get_lang('SeeDetail') . '
</a>
<a id="thematic-hide" class="btn btn-small accordion-toggle btn-show-thematic" href="#pross" data-toggle="collapse" data-parent="#progress-bar-course" style="display:none;">
' . get_lang('Hide') . '
</a>
</div>
</div>
</div>
</div>';
$thematic_description_html .=
'<div class="accordion-body collapse in" id="pross" style="height: auto;">
<div class="accordion-inner">
<div class="row-fluid">
<div class="span4">
<div class="row-fluid">
<div class="span4">
<div class="thumbnail">
<img src="' . $userInfo['avatar'] . '" class="img-polaroid">
</div>
</div>
<div class="span8">
<div class="info-progress">
<div class="tittle-score">' . $thematic_advance . '&nbsp;' . $thematicScore .'
</div>
<div class="progress progress-striped">
<div class="bar" style="width: ' . $thematicScore . ';"></div>
</div>
<a href="' . $thematicUrl . '" class="btn btn-info">' . get_lang('ShowFullCourseAdvance') . '</a>
</div>
</div>
</div>
</div>';
$thematic_description_html .=
'<div class="span8">
<div class="row-fluid">';
$thematic_description_html .=
'<div class="span6 items-progress'.$class1.'">
<div class="topics">' . $subTitle1 . '</div>
<p class="title_topics">' . $thematic_info['title'] . '</p>
<p class="date">' . $thematic_advance_info['start_date'] . '</p>
<h3 class="title">' . $thematic_advance_info['content'] . '</h3>
<p class="time">' . get_lang('DurationInHours') . ' : ' . $thematic_advance_info['duration'] . ' - <a href="' . $thematicUrl . '">' . get_lang('SeeDetail') . '</a></p>
</div>';
if (!empty($thematic_advance_info2)) {
$thematic_info2 = $thematic->get_thematic_list($thematic_advance_info2['thematic_id']);
$thematic_advance_info2['start_date'] = api_get_local_time($thematic_advance_info2['start_date']);
$thematic_advance_info2['start_date'] = api_format_date($thematic_advance_info2['start_date'], DATE_TIME_FORMAT_LONG);
$thematic_description_html .=
'<div class="span6 items-progress">
<div class="topics">'.$subTitle2.'</div>
<p class="title_topics">'.$thematic_info['title'].'</p>
<p class="date">'.$thematic_advance_info2['start_date'].'</p>
<h3 class="title">'.$thematic_advance_info2['content'].'</h3>
<p class="time">'.get_lang('DurationInHours').' : '.$thematic_advance_info2['duration'].' - <a href="'.$thematicUrl.'">'.get_lang('SeeDetail').'</a></p>
</div>';
}
$thematic_description_html.=
'</div>
</div>
</div>
</div>
</div>
</div>
</div>
</div>
</div>
</div>';
}
}
$introduction_section .= '<div class="row course-tools-intro"><div class="span12">';
@ -234,48 +335,65 @@ $introduction_section .= $thematic_description_html;
$introduction_section .= '</div>';
$introduction_section .= '<div class="home-course-intro span12"><div class="page-course">';
if ($intro_dispDefault) {
$intro_content = $intro_content;
$intro_content = $intro_content;
if (!empty($intro_content)) {
$introduction_section.='<div class="page-course-intro">';
$introduction_section .= $intro_content;
$introduction_section.='</div>';
}
if (!empty($intro_content)) {
$introduction_section.='<div class="page-course-intro">';
$introduction_section .= $intro_content;
$introduction_section.='</div>';
}
}
$introduction_section .= '</div></div>';
if ($intro_dispCommand) {
if (empty($intro_content)) {
// Displays "Add intro" commands
$introduction_section .= '<div id="courseintro_empty">';
if (!empty ($GLOBALS['_cid'])) {
$introduction_section .= "<a href=\"".api_get_self()."?".api_get_cidreq()."&amp;intro_cmdAdd=1\">";
if (empty($intro_content)) {
// Displays "Add intro" commands
$introduction_section .= '<div id="courseintro_empty">';
if (!empty ($GLOBALS['_cid'])) {
$introduction_section .= "<a href=\"".api_get_self()."?".api_get_cidreq()."&amp;intro_cmdAdd=1\">";
$introduction_section .= Display::return_icon('introduction_add.gif', get_lang('AddIntro')).' ';
$introduction_section .= "</a>";
} else {
$introduction_section .= "<a href=\"".api_get_self()."?intro_cmdAdd=1\">\n".get_lang('AddIntro')."</a>";
}
$introduction_section .= "</div>";
} else {
// Displays "edit intro && delete intro" commands
$introduction_section .= '<div id="courseintro_empty">';
if (!empty ($GLOBALS['_cid'])) {
$introduction_section .= "<a href=\"".api_get_self()."?".api_get_cidreq()."&amp;intro_cmdEdit=1\">".Display::return_icon('edit.png',get_lang('Modify'),'',ICON_SIZE_SMALL)."</a>";
$introduction_section .= "<a href=\"".api_get_self()."?".api_get_cidreq()."&amp;intro_cmdDel=1\" onclick=\"javascript:if(!confirm('".addslashes(api_htmlentities(get_lang('ConfirmYourChoice'),ENT_QUOTES,$charset))."')) return false;\">".Display::return_icon('delete.png',get_lang('Delete'),'',ICON_SIZE_SMALL)."</a>";
} else {
$introduction_section .= "<a href=\"".api_get_self()."?intro_cmdEdit=1\">".Display::return_icon('edit.png',get_lang('Modify'),'',ICON_SIZE_SMALL)."</a>";
$introduction_section .= "<a href=\"".api_get_self()."?intro_cmdDel=1\" onclick=\"javascript:if(!confirm('".addslashes(api_htmlentities(get_lang('ConfirmYourChoice'),ENT_QUOTES,$charset))."')) return false;\">".Display::return_icon('delete.png',get_lang('Delete'),'',ICON_SIZE_SMALL)."</a>";
}
$introduction_section .= "</div>";
$introduction_section .= "</a>";
} else {
$introduction_section .= "<a href=\"".api_get_self()."?intro_cmdAdd=1\">\n".get_lang('AddIntro')."</a>";
}
$introduction_section .= "</div>";
} else {
// Displays "edit intro && delete intro" commands
$introduction_section .= '<div id="courseintro_empty">';
if (!empty ($GLOBALS['_cid'])) {
$introduction_section .=
"<a href=\"".api_get_self()."?".api_get_cidreq()."&amp;intro_cmdEdit=1\">".
Display::return_icon('edit.png', get_lang('Modify'), '', ICON_SIZE_SMALL).
"</a>";
$introduction_section .=
"<a href=\"".api_get_self()."?".api_get_cidreq()."&amp;intro_cmdDel=1\" onclick=\"javascript:
if(!confirm('".addslashes(api_htmlentities(get_lang('ConfirmYourChoice'), ENT_QUOTES, $charset)).
"')) return false;\">".
Display::return_icon('delete.png', get_lang('Delete'), '', ICON_SIZE_SMALL).
"</a>";
} else {
$introduction_section .=
"<a href=\"".api_get_self()."?intro_cmdEdit=1\">".
Display::return_icon('edit.png', get_lang('Modify'), '', ICON_SIZE_SMALL).
"</a>";
$introduction_section .=
"<a href=\"".api_get_self()."?intro_cmdDel=1\" onclick=\"javascript:
if(!confirm('".addslashes(api_htmlentities(get_lang('ConfirmYourChoice'), ENT_QUOTES, $charset)).
"')) return false;\">".
Display::return_icon('delete.png', get_lang('Delete'), '', ICON_SIZE_SMALL).
"</a>";
}
$introduction_section .= "</div>";
// Fix for chrome XSS filter for videos in iframes - BT#7930
$browser = api_get_navigator();
if (strpos($introduction_section, '<iframe') !== false && $browser['name'] == 'Chrome') {
header('X-XSS-Protection: 0');
}
}
}
}
$introduction_section .= '</div>';

@ -1002,9 +1002,10 @@ class Thematic
/**
* Get next thematic advance not done from thematic details interface
* @param int Offset (if you want to get an item that is not directly the next)
* @return int next thematic advance not done
*/
public function get_next_thematic_advance_not_done() {
public function get_next_thematic_advance_not_done($offset = 1) {
$thematic_data = $this->get_thematic_list();
$thematic_advance_data = $this->get_thematic_advance_list();
@ -1012,7 +1013,6 @@ class Thematic
$next_advance_not_done = 0;
if (!empty($thematic_data)) {
foreach ($thematic_data as $thematic) {
$thematic_id = $thematic['id'];
if (!empty($thematic_advance_data[$thematic['id']])) {
foreach ($thematic_advance_data[$thematic['id']] as $thematic_advance) {
if ($thematic_advance['done_advance'] == 0) {
@ -1024,7 +1024,9 @@ class Thematic
}
if (!empty($a_thematic_advance_ids)) {
$next_advance_not_done = array_shift($a_thematic_advance_ids);
for ($i = 0; $i < $offset; $i++) {
$next_advance_not_done = array_shift($a_thematic_advance_ids);
}
$next_advance_not_done = intval($next_advance_not_done);
}

@ -2,6 +2,9 @@
/*
for more information: see languages.txt in the lang folder.
*/
$NextTopic = "Next topic";
$CurrentTopic = "Current topic";
$ShowFullCourseAdvance = "Show course planning";
$RedirectToCourseHome = "Redirect to Course home";
$LpReturnLink = "Learning path return link";
$LearningPathList = "Learning path list";
@ -1600,4 +1603,4 @@ $DataTableSearch = "Search";
$HideColumn = "Hide column";
$DisplayColumn = "Show column";
$LegalAgreementAccepted = "Legal agreement accepted";
?>
?>

@ -2,6 +2,9 @@
/*
for more information: see languages.txt in the lang folder.
*/
$NextTopic = "Próximo tema";
$CurrentTopic = "Tema actual";
$ShowFullCourseAdvance = "Ver programación";
$RedirectToCourseHome = "Redirigir al inicio de Curso.";
$LpReturnLink = "Enlace de retorno en las Lecciones";
$LearningPathList = "Lista de lecciones";
@ -1605,4 +1608,4 @@ $DataTableSearch = "Buscar";
$HideColumn = "Ocultar columna";
$DisplayColumn = "Mostrar columna";
$LegalAgreementAccepted = "Condiciones legales aceptadas";
?>
?>

Loading…
Cancel
Save