Actualización

This commit is contained in:
Xes
2025-04-10 12:49:05 +02:00
parent 4aff98e77b
commit 1cdd00920f
9151 changed files with 1800913 additions and 0 deletions

View File

@@ -0,0 +1,16 @@
<!DOCTYPE html>
<!--[if lt IE 7]> <html lang="{{document_language}}" class="no-js lt-ie9 lt-ie8 lt-ie7"> <![endif]-->
<!--[if IE 7]> <html lang="{{document_language}}" class="no-js lt-ie9 lt-ie8"> <![endif]-->
<!--[if IE 8]> <html lang="{{document_language}}" class="no-js lt-ie9"> <![endif]-->
<!--[if gt IE 8]><!--><html lang="{{document_language}}" class="no-js"> <!--<![endif]-->
<head>
{% include 'layout/head.tpl'|get_template %}
</head>
<body dir="{{text_direction}}" class="{{section_name}}">
<div class="page-blank">
{% block content %}
{{ content }}
{% endblock %}
</div>
</body>
</html>

View File

@@ -0,0 +1,15 @@
<!DOCTYPE html>
<!--[if lt IE 7]> <html lang="{{document_language}}" class="no-js lt-ie9 lt-ie8 lt-ie7"> <![endif]-->
<!--[if IE 7]> <html lang="{{document_language}}" class="no-js lt-ie9 lt-ie8"> <![endif]-->
<!--[if IE 8]> <html lang="{{document_language}}" class="no-js lt-ie9"> <![endif]-->
<!--[if gt IE 8]><!--><html lang="{{document_language}}" class="no-js"> <!--<![endif]-->
<head>
</head>
<body dir="{{text_direction}}" class="{{section_name}}">
<div class="page-blank">
{% block content %}
{{ content }}
{% endblock %}
</div>
</body>
</html>

View File

@@ -0,0 +1,8 @@
{# Course navigation icons - these are two optional features that have to be enabled through admin settings #}
{% if show_header == true %}
{% if show_course_navigation_menu is not null %}
<div class="nav-tools">
{{ show_course_navigation_menu }}
</div>
{% endif %}
{% endif %}

View File

@@ -0,0 +1,30 @@
<meta charset="{{ system_charset }}" />
<link href="https://chamilo.org/chamilo-lms/" rel="help" />
<link href="https://chamilo.org/the-association/" rel="author" />
<link href="https://www.gnu.org/licenses/gpl-3.0.en.html" rel="license" />
<!-- Force latest IE rendering engine or ChromeFrame if installed -->
<!--[if IE]>
<meta http-equiv="X-UA-Compatible" content="IE=edge,chrome=1">
<![endif]-->
{{ prefetch }}
{{ favico }}
<link rel="apple-touch-icon" href="{{ _p.web }}apple-touch-icon.png" />
<meta name="apple-mobile-web-app-capable" content="yes" />
<meta name="generator" content="{{ _s.software_name }} {{ _s.system_version|slice(0,1) }}" />
{# Use the latest engine in ie8/ie9 or use google chrome engine if available #}
{# Improve usability in portal devices #}
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<title>{{ title_string }}</title>
{{ social_meta }}
{{ css_static_file_to_string }}
{{ js_file_to_string }}
{{ extra_headers }}
{% if _s.language_interface %}
<script src="{{ _p.web }}web/build/main.{{ _s.language_interface }}.js"></script>
{% else %}{# language_interface *should* always be defined, so we should never come here #}
<script src="{{ _p.web }}web/build/main.js"></script>
{% endif %}
{{ css_custom_file_to_string }}
{{ css_style_print }}

View File

@@ -0,0 +1,56 @@
{% for item in hot_courses %}
{% if item.title %}
<div class="col-xs-12 col-sm-6 col-md-4">
<div class="items items-hotcourse">
<div class="image">
{% set title %}
<a title="{{ item.title}}" href="{{ _p.web }}course/{{ item.real_id }}/about">
<img src="{{ item.course_image_large }}" class="img-responsive" alt="{{ item.title }}">
</a>
{% endset %}
{{ title | remove_xss }}
{% if item.categoryName != '' %}
<span class="category">{{ item.categoryName }}</span>
<div class="cribbon"></div>
{% endif %}
<div class="user-actions">{{ item.description_button }}</div>
</div>
<div class="description">
<div class="block-title">
{% set title %}
<h5 class="title">
{% if item.is_course_student or item.is_course_teacher %}
<a alt="{{ item.title }}" title="{{ item.title }}" href="{{ _p.web }}courses/{{ item.directory }}/">
{{ item.title_cut}}
</a>
{% else %}
<a alt="{{ item.title }}" title="{{ item.title }}" href="{{ _p.web }}course/{{ item.real_id }}/about">
{{ item.title_cut}}
</a>
{% endif %}
</h5>
{% endset %}
{{ title | remove_xss }}
</div>
<div class="ranking">
{{ item.rating_html }}
</div>
<div class="toolbar row">
<div class="col-sm-4">
{% if item.price %}
{{ item.price }}
{% endif %}
</div>
<div class="col-sm-8">
<div class="btn-group" role="group">
{{ item.register_button }}
{{ item.unsubscribe_button }}
</div>
</div>
</div>
</div>
</div>
</div>
{% endif %}
{% endfor %}

View File

@@ -0,0 +1,23 @@
{% for hot_course in hot_courses %}
{% if hot_course.extra_info.title %}
<div class="row">
<div class="col-sm-3">
<div class="thumbnail">
<img src="{{ hot_course.extra_info.course_image }}" alt="{{ hot_course.extra_info.title }}" />
</div>
</div>
<div class="col-sm-9">
<div class="categories-course-description">
<h3>{{ hot_course.extra_info.title }}</h3>
<h5>{{ hot_course.extra_info.teachers }}</h5>
{# hot_course.extra_info.rating_html #}
</div>
<p>
{{ hot_course.extra_info.description_button }}
{{ hot_course.extra_info.go_to_course_button }}
{{ hot_course.extra_info.register_button }}
</p>
</div>
</div>
{% endif %}
{% endfor %}

View File

@@ -0,0 +1,23 @@
{% if hot_courses is not null and hot_courses is not empty %}
<section class="hot-courses">
<div class="page-header">
<h4>
{{ "HottestCourses"|get_lang}}
{% if _u.is_admin %}
<span class="pull-right">
<a title="{{ "Hide"|get_lang }}"
alt="{{ "Hide"|get_lang }}"
href="{{ _p.web_main }}admin/settings.php?search_field=show_hot_courses&submit_button=&_qf__search_settings=&category=search_setting">
<i class="fa fa-eye" aria-hidden="true"></i>
</a>
</span>
{% endif %}
</h4>
</div>
<div id="list-hot-courses" class="grid-courses">
<div class="row">
{% include 'layout/hot_course_item.tpl'|get_template %}
</div>
</div>
</section>
{% endif %}

View File

@@ -0,0 +1,47 @@
{% extends 'layout/page.tpl'|get_template %}
{% block body %}
{% if plugin_main_top %}
<div class="row">
<div id="plugin_main_top" class="col-md-12">
{{ plugin_main_top }}
</div>
</div>
{% endif %}
{% if plugin_content_top %}
<div class="row">
<div id="plugin_content_top" class="col-md-12">
{{ plugin_content_top }}
</div>
</div>
{% endif %}
<div class="row">
<div class="col-xs-12 col-md-12">
{% include 'layout/page_body.tpl'|get_template %}
{% block content %}
{% if content is not null %}
<section id="main_content">
{{ content }}
</section>
{% endif %}
{% endblock %}
</div>
</div>
{% if plugin_content_bottom %}
<div class="row">
<div id="plugin_content_bottom" class="col-md-12">
{{ plugin_content_bottom }}
</div>
</div>
{% endif %}
{% if plugin_main_bottom %}
<div class="row">
<div id="plugin_main_bottom" class="col-md-12">
{{ plugin_main_bottom }}
</div>
</div>
{% endif %}
{% endblock %}

View File

@@ -0,0 +1,173 @@
{% extends 'layout/page.tpl'|get_template %}
{% import 'default/macro/macro.tpl' as display %}
{% set sidebar_hide = 'sidebar_hide'|api_get_configuration_value %}
{% block body %}
{% if plugin_main_top %}
{{ display.pluginPanel('main-top', plugin_main_top) }}
{% endif %}
<div class="row">
<div class="col-md-9 col-md-push-3">
<div class="page-content">
{% if plugin_content_top %}
<div class="page-content-top">
{{ plugin_content_top }}
</div>
{% endif %}
{{ sniff_notification }}
{% block page_body %}
{% include 'layout/page_body.tpl'|get_template %}
{% endblock %}
{% if home_welcome %}
<article id="home-welcome">
{{ home_welcome }}
</article>
{% endif %}
{% if home_include %}
<article id="home-include">
{{ home_include }}
</article>
{% endif %}
{% if welcome_to_course_block %}
<article id="homepage-course">
{{ welcome_to_course_block }}
</article>
{% endif %}
{% block content %}
{% if content is not null %}
<section id="page" class="{{ course_history_page }}">
{{ content }}
</section>
{% endif %}
{% endblock %}
{% if announcements_block %}
<article id="homepage-announcements">
{{ announcements_block }}
</article>
{% endif %}
{% if course_category_block %}
<article id="homepage-course-category">
{{ course_category_block }}
</article>
{% endif %}
{% include 'layout/hot_courses.tpl'|get_template %}
{% include 'session/sessions_current.tpl'|get_template %}
{% if plugin_content_bottom %}
<div id="plugin_content_bottom">
{{ plugin_content_bottom }}
</div>
{% endif %}
</div>
</div>
<div class="col-md-3 col-md-pull-9">
<div class="sidebar">
{% if plugin_menu_top %}
{{ display.pluginSidebar('sidebar-top', plugin_menu_top) }}
{% endif %}
{% include 'layout/login_form.tpl'|get_template %}
{% if not sidebar_hide %}
{% if _u.logged == 1 %}
{{ user_image_block }}
{% endif %}
<!-- BLOCK PROFILE -->
{% if profile_block %}
{{ display.collapseMenu('profile', 'Profile'|get_lang, profile_block) }}
{% endif %}
<!-- BLOCK COURSE -->
{% if course_block %}
{{ display.collapseMenu('courses', 'Courses'|get_lang, course_block) }}
{% endif %}
<!-- BLOCK SKILLS -->
{% if skills_block %}
{{ display.collapseMenu('skills', 'Skills'|get_lang, skills_block) }}
{% endif %}
<!-- BLOCK WORK -->
{% if student_publication_block %}
{{ display.collapseMenu('student_publications', 'StudentPublications'|get_lang, student_publication_block) }}
{% endif %}
{% if grade_book_sidebar %}
<div class="panel-group" id="skill" role="tablist" aria-multiselectable="true">
<div class="panel panel-default" id="gradebook_block">
<div class="panel-heading" role="tab">
<h4 class="panel-title">
<a role="button" data-toggle="collapse"
data-parent="#skill"
href="#skillCollapse"
aria-expanded="true"
aria-controls="skillCollapse">
{{ 'Gradebook' | get_lang }}
</a>
</h4>
</div>
<div style="" aria-expanded="true" id="skillCollapse" class="panel-collapse collapse in" role="tabpanel">
<div class="panel-body">
<ul class="list-group">
<li class="list-group-item {{ item.class }}">
{{ 'Progress' | get_lang }} : {{ grade_book_progress }} %
<br />
{% for badge in grade_book_badge_list %}
<div class="badge_sidebar">
{% for skill in badge.skills %}
{% if badge.finished %}
<img class="badge_sidebar_image " src ="{{ skill.icon_big }}" />
{% else %}
<img class="badge_sidebar_image badge_sidebar_image_transparency"
src = "{{ skill.icon_big }}" />
{% endif %}
<div class="badge_sidebar_title">
{{ skill.name }}
</div>
{% endfor %}
</div>
{% endfor %}
</li>
</ul>
</div>
</div>
</div>
</div>
{% endif %}
{{ certificates_search_block }}
<!-- BLOCK NOTICE -->
{% if notice_block %}
{{ display.collapse('notice', 'Notice'|get_lang, notice_block) }}
{% endif %}
<!-- BLOCK HELP -->
{% if help_block %}
{{ display.collapse('help', 'MenuGeneral'|get_lang, help_block, true) }}
{% endif %}
<!-- BLOCK LINKS NAVIGATION -->
{% if navigation_links %}
{{ display.collapseFor('navigation_sidebar', 'MainNavigation'|get_lang, navigation_links) }}
{% endif %}
{{ search_block }}
{{ classes_block }}
{% if plugin_menu_bottom %}
{{ display.pluginSidebar('sidebar-bottom', plugin_menu_bottom) }}
{% endif %}
{% endif %}
</div>
</div>
</div>
{% if plugin_main_bottom %}
{{ display.pluginPanel('main-bottom', plugin_main_bottom) }}
{% endif %}
{% endblock %}

View File

@@ -0,0 +1,21 @@
{% extends 'layout/page.tpl'|get_template %}
{% block body %}
<div id="maincontent" class="maincontent">
{{ plugin_courses_block }}
{{ home_page_block }}
{{ message }}
{{ content }}
{{ announcements_block }}
</div>
<div id="menu-wrapper">
{{ login_block }}
{{ profile_block }}
{{ account_block }}
{{ teacher_block }}
{{ notice_block }}
{{ navigation_course_links }}
{{ plugin_courses_right_block }}
{{ search_block }}
{{ classes_block }}
</div>
{% endblock %}

View File

@@ -0,0 +1,42 @@
{% if _u.logged == 0 %}
{% if login_form %}
<div id="login-block" class="panel panel-default">
<div class="panel-body">
{{ login_language_form }}
{% if plugin_login_top is not null %}
<div id="plugin_login_top">
{{ plugin_login_top }}
</div>
{% endif %}
{{ login_failed }}
{{ login_form }}
{% if "allow_lostpassword" | api_get_setting == 'true' or "allow_registration" | api_get_setting == 'true' %}
<ul class="nav nav-pills nav-stacked">
{% if "allow_registration" | api_get_setting != 'false' %}
<li><a href="{{ _p.web_main }}auth/inscription.php"> {{ 'SignUp' | get_lang }} </a></li>
{% endif %}
{% if "allow_lostpassword" | api_get_setting == 'true' %}
{% set pass_reminder_link = 'pass_reminder_custom_link'|api_get_configuration_value %}
{% set lost_password_link = _p.web_main ~ 'auth/lostPassword.php' %}
{% if not pass_reminder_link is empty %}
{% set lost_password_link = pass_reminder_link %}
{% endif %}
<li><a href="{{ lost_password_link }}"> {{ 'LostPassword' | get_lang }} </a></li>
{% endif %}
</ul>
{% endif %}
{% if plugin_login_bottom is not null %}
<div id="plugin_login_bottom">
{{ plugin_login_bottom }}
</div>
{% endif %}
</div>
</div>
{% endif %}
{% endif %}

View File

@@ -0,0 +1,930 @@
var ajax_url = _p.web_ajax + 'chat.ajax.php';
var online_button = '<img src="' + _p.web_img + 'statusonline.png">';
var offline_button = '<img src="' + _p.web_img + 'statusoffline.png">';
var connect_lang = '{{ "ChatConnected"|get_lang | escape('js')}}';
var disconnect_lang = '{{ "ChatDisconnected"|get_lang | escape('js')}}';
var chatLang = '{{ "GlobalChat"|get_lang | escape('js')}}';
var sessionRemainingSeconds = 0;
var sessionCounterInterval;
var sessionClosing = false;
{% if 'hide_chat_video'|api_get_configuration_value %}
var hide_chat_video = true;
{% else %}
var hide_chat_video = false;
{% endif %}
$(function() {
addMainEvent(window, 'unload', courseLogout ,false);
$("#open-view-list").click(function(){
$("#student-list-work").fadeIn(300);
});
$("#closed-view-list").click(function(){
$("#student-list-work").fadeOut(300);
});
checkBrand();
var id;
$(window).resize(function() {
clearTimeout(id);
id = setTimeout(doneResizing, 200);
});
// Removes the yellow input in Chrome
if (navigator.userAgent.toLowerCase().indexOf("chrome") >= 0) {
$(window).on("load", function () {
$('input:-webkit-autofill').each(function(){
var text = $(this).val();
var name = $(this).attr('name');
$(this).after(this.outerHTML).remove();
$('input[name=' + name + ']').val(text);
});
});
}
$(".accordion_jquery").accordion({
autoHeight: false,
active: false, // all items closed by default
collapsible: true,
header: ".accordion-heading"
});
// Start modals
// class='ajax' loads a page in a modal
$('body').on('click', 'a.ajax', function(e) {
e.preventDefault();
var globalModal = $('#global-modal');
if ($(this).hasClass('no-close-button')) {
globalModal.find('.close').hide();
}
if ($(this).hasClass('no-header')) {
globalModal.find('.modal-header').hide();
}
var blockDiv = $(this).attr('data-block-closing');
if (blockDiv != '') {
globalModal.attr('data-backdrop', 'static');
globalModal.attr('data-keyboard', 'false');
}
var contentUrl = this.href;
var self = $(this);
if (contentUrl == 'javascript:void(0);') {
var
modalSize = self.data('size'),
modalWidth = self.data('width'),
modalTitle = self.data('title');
modalContent = self.data('content');
globalModal.find('.modal-title').text(modalTitle);
globalModal.find('.modal-body').html(modalContent);
globalModal.modal('show');
return true;
}
if (contentUrl) {
var loadModalContent = $.get(contentUrl);
$.when(loadModalContent).done(function (modalContent) {
var modalDialog = globalModal.find('.modal-dialog'),
modalSize = self.data('size') || get_url_params(contentUrl, 'modal_size'),
modalWidth = self.data('width') || get_url_params(contentUrl, 'width'),
modalTitle = self.data('title') || ' ';
modalDialog.removeClass('modal-lg modal-sm').css('width', '');
if (modalSize && modalSize.length != 0) {
switch (modalSize) {
case 'lg':
modalDialog.addClass('modal-lg');
break;
case 'sm':
modalDialog.addClass('modal-sm');
break;
}
} else if (modalWidth) {
modalDialog.css('width', modalWidth + 'px');
}
globalModal.find('.modal-title').text(modalTitle);
globalModal.find('.modal-body').html(modalContent);
globalModal.modal('show');
});
}
});
// Expands an image modal
$('a.expand-image').on('click', function(e) {
e.preventDefault();
var title = $(this).attr('title');
var image = new Image();
image.onload = function() {
if (title) {
$('#expand-image-modal').find('.modal-title').text(title);
} else {
$('#expand-image-modal').find('.modal-title').html('&nbsp;');
}
$('#expand-image-modal').find('.modal-body').html(image);
$('#expand-image-modal').modal({
show: true
});
};
image.src = this.href;
});
// Delete modal
$('#confirm-delete').on('show.bs.modal', function(e) {
$(this).find('.btn-ok').attr('href', $(e.relatedTarget).data('href'));
var message = '{{ 'AreYouSureToDeleteJS' | get_lang | escape('js')}} <strong>' + $(e.relatedTarget).data('item-title') + '</strong>';
if ($(e.relatedTarget).data('item-question')) {
message = $(e.relatedTarget).data('item-question');
}
$('.debug-url').html(message);
});
// End modals
// old jquery.menu.js
$('#navigation a').stop().animate({
'marginLeft':'50px'
},1000);
$('#navigation div').hover(
function () {
$('a',$(this)).stop().animate({
'marginLeft':'1px'
},200);
},
function () {
$('a',$(this)).stop().animate({
'marginLeft':'50px'
},200);
}
);
/* Make responsive image maps */
$('map').imageMapResize();
jQuery.fn.filterByText = function(textbox) {
return this.each(function() {
var select = this;
var options = [];
$(select).find('option').each(function() {
options.push({value: $(this).val(), text: $(this).text()});
});
$(select).data('options', options);
$(textbox).bind('change keyup', function() {
var options = $(select).empty().data('options');
var search = $.trim($(this).val());
var regex = new RegExp(search,"gi");
$.each(options, function(i) {
var option = options[i];
if(option.text.match(regex) !== null) {
$(select).append(
$('<option>').text(option.text).val(option.value)
);
}
});
});
});
};
$("[data-toggle=popover]").each(function(i, obj) {
$(this).popover({
html: true,
content: function() {
var id = $(this).attr('id')
return $('#popover-content-' + id).html();
}
});
});
$('.scrollbar-inner').scrollbar();
// Date time settings.
moment.locale('{{ locale }}');
$.datepicker.setDefaults($.datepicker.regional["{{ locale }}"]);
$.datepicker.regional["local"] = $.datepicker.regional["{{ locale }}"];
// Fix old calls of "inc/lib/mediaplayer/player.swf" and convert to <audio> tag, then rendered by media element js
// see BT#13405
$('embed').each( function () {
var flashVars = $(this).attr('flashvars');
if (flashVars && flashVars.indexOf("file") == -1) {
var audioId = Math.floor( Math.random()*99999 );
flashVars = flashVars.replace('&autostart=false', '');
flashVars = flashVars.replace('&autostart=true', '');
var audioDiv = '<audio id="'+audioId+'" controls="controls" style="width:400px;" width:"400px;" src="'+flashVars+'" ><source src="'+flashVars+'" type="audio/mp3" ></source></audio>';
$(this).hide();
$(this).after(audioDiv);
}
});
// Chosen select
$(".chzn-select").chosen({
disable_search_threshold: 10,
no_results_text: '{{ 'SearchNoResultsFound' | get_lang | escape('js') }}',
placeholder_text_multiple: '{{ 'SelectSomeOptions' | get_lang | escape('js') }}',
placeholder_text_single: '{{ 'SelectAnOption' | get_lang | escape('js') }}',
width: "100%"
});
// Bootstrap tabs.
$('.tab-wrapper a').click(function (e) {
e.preventDefault();
$(this).tab('show');
//$('#tabs a:first').tab('show') // Select first tab
});
// Fixes bug when loading links inside a tab.
$('.tab-wrapper .tab-pane a').unbind();
/**
* Advanced options
* Usage
* <a id="link" href="url">Advanced</a>
* <div id="link_options">
* hidden content :)
* </div>
* */
$(".advanced_options").on("click", function (event) {
event.preventDefault();
var id = $(this).attr('id') + '_options';
var button = $(this);
$("#" + id).toggle();
});
/**
* <a class="advanced_options_open" href="http://" rel="div_id">Open</a>
* <a class="advanced_options_close" href="http://" rel="div_id">Close</a>
* <div id="div_id">Div content</div>
* */
$(".advanced_options_open").on("click", function (event) {
event.preventDefault();
var id = $(this).attr('rel');
$("#" + id).show();
});
$(".advanced_options_close").on("click", function (event) {
event.preventDefault();
var id = $(this).attr('rel');
$("#" + id).hide();
});
// Adv multi-select search input.
$('.select_class_filter').each( function () {
var inputId = $(this).attr('id');
inputId = inputId.replace('-filter', '');
$("#" + inputId).filterByText($("#" + inputId + "-filter"));
});
{% set video_context_menu_hidden = 'video_context_menu_hidden'|api_get_configuration_value %}
// Mediaelement
if ( {{ show_media_element }} == 1) {
$('video:not(.skip), audio:not(.skip)').mediaelementplayer({
pluginPath: _p.web_lib + 'javascript/mediaelement/',
//renderers: ['html5', 'flash_video', 'native_flv'],
features: ['{{ video_features }}'],
success: function(mediaElement, originalNode, instance) {
{% if video_context_menu_hidden %}
$('.mejs__container').on('contextmenu', function(e) {
e.preventDefault();
});
{% endif %}
{{ quiz_markers_rolls_js }}
}
{% if is_vrview_enabled %}
, vrPath: _p.web + 'web/assets/vrview/build/vrview.js'
{% endif %}
});
}
{% if video_context_menu_hidden %}
$('video').on('contextmenu', function(e) {
e.preventDefault();
});
{% endif %}
// Table highlight.
$("form .data_table input:checkbox").click(function () {
if ($(this).is(":checked")) {
$(this).parentsUntil("tr").parent().addClass("row_selected");
} else {
$(this).parentsUntil("tr").parent().removeClass("row_selected");
}
});
/* For non HTML5 browsers */
if ($("#formLogin".length > 1)) {
$("input[name=login]").focus();
}
// Tool tip (in exercises)
var tip_options = {
placement: 'right'
};
$('.boot-tooltip').tooltip(tip_options);
var more = '{{ 'SeeMore' | get_lang | escape('js') }}';
var close = '{{ 'Close' | get_lang | escape('js') }}';
$('.list-teachers').readmore({
speed: 75,
moreLink: '<a href="#">' + more + '</a>',
lessLink: '<a href="#">' + close + '</a>',
collapsedHeight: 35,
blockCSS: 'display: block; width: 100%;'
});
$('.star-rating li a').on('click', function(event) {
var id = $(this).parents('ul').attr('id');
$('#vote_label2_' + id).html("{{'Loading'|get_lang| escape('js')}}");
$.ajax({
url: $(this).attr('data-link'),
success: function(data) {
$("#rating_wrapper_"+id).html(data);
if (data == 'added') {
//$('#vote_label2_' + id).html("{{'Saved'|get_lang | escape('js')}}");
}
if (data == 'updated') {
//$('#vote_label2_' + id).html("{{'Saved'|get_lang| escape('js')}}");
}
}
});
});
$("#notifications").load(_p.web_ajax + "online.ajax.php?a=get_users_online");
$('video:not(.skip)').attr('preload', 'metadata');
function socialLikes() {
{% if 'social_enable_messages_feedback'|api_get_configuration_value %}
$('body').on('click', '.social-like', function (e) {
e.preventDefault();
var $self = $(this),
status = $self.data('status') || '',
group = $self.data('group') || 0,
message = $self.data('message') || 0;
$.getJSON(
'{{ _p.web_ajax }}social.ajax.php',
{'a': 'like_message', 'group': group, 'id': message, 'status': status}
).then(function (response) {
if (!response) {
return;
}
var $count = $self.children('span'),
currentCount = parseInt($count.text()) || 0;
if ('like' === status) {
var $dislike = $self.next(),
$dislikeCount = $dislike.children('span'),
dislikeCount = parseInt($dislikeCount.text()) || 0;
$count.text(++currentCount);
if ($dislike.is('.btn-danger')) {
$dislikeCount.text(dislikeCount <= 0 ? 0 : --dislikeCount);
$dislike.removeClass('btn-danger');
}
$self.addClass('btn-primary');
} else if ('dislike' === status) {
var $like = $self.prev(),
$likeCount = $like.children('span'),
likeCount = parseInt($likeCount.text()) || 0;
$count.text(++currentCount);
if ($like.is('.btn-primary')) {
$likeCount.text(likeCount <= 0 ? 0 : --likeCount);
$like.removeClass('btn-primary');
}
$self.addClass('btn-danger');
}
});
});
{% endif %}
}
socialLikes();
{% if 'enable_message_tags'|api_get_configuration_value %}
// Used in MessageManager::addTagsFormToInbox
$('#frm_inbox_tags').on('submit', function (e) {
e.preventDefault();
var $submit = $(this).find(':submit');
var selectedData = $('#form_message_inbox_id input[name="id[]"]').serialize();
if (selectedData.length <= 0) {
return;
}
selectedData += '&'
+ $('#extra_tags').select2('data').map(function (obj) {
return encodeURI('tags[]=' + obj.id)
}).join('&');
$submit.prop('disabled', true);
$.post(_p.web_ajax + 'message.ajax.php?a=add_tags', selectedData, function () {
window.location.reload();
});
});
{% endif %}
if (window.self === window.top) {
checkSessionTime();
}
});
$(window).resize(function() {
checkBrand();
});
$(document).scroll(function() {
var valor = $('body').outerHeight() - 700;
if ($(this).scrollTop() > 100) {
$('.bottom_actions').addClass('bottom_actions_fixed');
} else {
$('.bottom_actions').removeClass('bottom_actions_fixed');
}
if ($(this).scrollTop() > valor) {
$('.bottom_actions').removeClass('bottom_actions_fixed');
} else {
$('.bottom_actions').addClass('bottom_actions_fixed');
}
// Exercise warning fixed at the top
var fixed = $("#exercise_clock_warning");
if (fixed.length) {
if (!fixed.attr('data-top')) {
// If already fixed, then do nothing
if (fixed.hasClass('subnav-fixed')) return;
// Remember top position
var offset = fixed.offset();
fixed.attr('data-top', offset.top);
fixed.css('width', '100%');
}
if (fixed.attr('data-top') - fixed.outerHeight() <= $(this).scrollTop()) {
fixed.addClass('navbar-fixed-top');
fixed.css('width', '100%');
} else {
fixed.removeClass('navbar-fixed-top');
fixed.css('width', '100%');
}
}
// Admin -> Settings toolbar.
if ($('body').width() > 959) {
if ($('.new_actions').length) {
if (!$('.new_actions').attr('data-top')) {
// If already fixed, then do nothing
if ($('.new_actions').hasClass('new_actions-fixed')) return;
// Remember top position
var offset = $('.new_actions').offset();
var more_top = 0;
if ($('.subnav').hasClass('new_actions-fixed')) {
more_top = 50;
}
$('.new_actions').attr('data-top', offset.top + more_top);
}
// Check if the height is enough before fixing the icons menu (or otherwise removing it)
// Added a 30px offset otherwise sometimes the menu plays ping-pong when scrolling to
// the bottom of the page on short pages.
if ($('.new_actions').attr('data-top') - $('.new_actions').outerHeight() <= $(this).scrollTop() + 30) {
$('.new_actions').addClass('new_actions-fixed');
} else {
$('.new_actions').removeClass('new_actions-fixed');
}
}
}
});
function get_url_params(q, attribute) {
var hash;
if (q != undefined) {
q = q.split('&');
for(var i = 0; i < q.length; i++){
hash = q[i].split('=');
if (hash[0] == attribute) {
return hash[1];
}
}
}
}
function checkBrand() {
if ($('.subnav').length) {
if ($(window).width() >= 969) {
$('.subnav .brand').hide();
} else {
$('.subnav .brand').show();
}
}
}
function setCheckbox(value, table_id) {
checkboxes = $("#"+table_id+" input:checkbox");
$.each(checkboxes, function(index, checkbox) {
checkbox.checked = value;
if (value) {
$(checkbox).parentsUntil("tr").parent().addClass("row_selected");
} else {
$(checkbox).parentsUntil("tr").parent().removeClass("row_selected");
}
});
return false;
}
function action_click(element, table_id) {
var d = $("#"+table_id);
if (!confirm('{{ "ConfirmYourChoice"|get_lang | escape('js')}}')) {
return false;
} else {
var action =$(element).attr("data-action");
$('#'+table_id+' input[name="action"] ').attr("value", action);
d.submit();
return false;
}
}
/**
* Generic function to replace the deprecated jQuery toggle function
* @param inId : id of block to hide / unhide
* @param inIdTxt : id of the button
* @param inTxtHide : text one of the button
* @param inTxtUnhide : text two of the button
* @todo : allow to detect if text is from a button or from a <a>
*/
function hideUnhide(inId, inIdTxt, inTxtHide, inTxtUnhide) {
if ($('#'+inId).css("display") == "none") {
$('#'+inId).show(400);
$('#'+inIdTxt).attr("value", inTxtUnhide);
} else {
$('#'+inId).hide(400);
$('#'+inIdTxt).attr("value", inTxtHide);
}
}
function expandColumnToogle(buttonSelector, col1Info, col2Info) {
$(buttonSelector).on('click', function (e) {
e.preventDefault();
col1Info = $.extend({
selector: '',
width: 4
}, col1Info);
col2Info = $.extend({
selector: '',
width: 8
}, col2Info);
if (!col1Info.selector || !col2Info.selector) {
return;
}
var col1 = $(col1Info.selector),
col2 = $(col2Info.selector);
$('#expand').toggleClass('hide');
$('#contract').toggleClass('hide');
if (col2.is('.col-md-' + col2Info.width)) {
col2.removeClass('col-md-' + col2Info.width).addClass('col-md-12');
col1.removeClass('col-md-' + col1Info.width).addClass('hide');
return;
}
col2.removeClass('col-md-12').addClass('col-md-' + col2Info.width);
col1.removeClass('hide').addClass('col-md-' + col1Info.width);
});
}
// Load ckeditor plugins
if (typeof CKEDITOR !== 'undefined') {
// External plugins not part of the default Ckeditor package.
var plugins = [
'asciimath',
'asciisvg',
'audio',
'blockimagepaste',
'ckeditor_wiris',
'dialogui',
'glossary',
'leaflet',
'mapping',
'maximize',
'mathjax',
'oembed',
'toolbar',
'toolbarswitch',
'video',
'wikilink',
'wordcount',
'youtube',
'flash',
'inserthtml',
'qmarkersrolls',
'ckeditor_vimeo_embed',
'image2_chamilo'
];
plugins.forEach(function (plugin) {
CKEDITOR.plugins.addExternal(
plugin,
_p.web_lib + '{{ 'javascript/ckeditor/plugins/' }}' + plugin + '/'
);
});
/**
* Function use to load templates in a div
**/
var showTemplates = function (ckeditorName) {
var editorName = 'content';
if (ckeditorName && ckeditorName.length > 0) {
editorName = ckeditorName;
}
CKEDITOR.editorConfig(CKEDITOR.config);
CKEDITOR.loadTemplates(CKEDITOR.config.templates_files, function (a) {
var templatesConfig = CKEDITOR.getTemplates("default");
var $templatesUL = $("<ul>");
if (templatesConfig) {
$.each(templatesConfig.templates, function () {
var template = this;
var $templateLi = $("<li>");
var templateHTML = "<img src=\"" + templatesConfig.imagesPath + template.image + "\" ><div>";
templateHTML += "<b>" + template.title + "</b>";
if (template.description) {
templateHTML += "<div class=description>" + template.description + "</div>";
}
templateHTML += "</div>";
$("<a>", {
href: "#",
html: templateHTML,
click: function (e) {
e.preventDefault();
if (CKEDITOR.instances[editorName]) {
CKEDITOR.instances[editorName].setData(template.html, function () {
this.checkDirty();
});
}
}
}).appendTo($templateLi);
$templatesUL.append($templateLi);
});
}
$templatesUL.appendTo("#frmModel");
});
};
}
function doneResizing() {
var widthWindow = $(window).width();
if ((widthWindow>=1024) && (widthWindow>=768)) {
$("#profileCollapse").addClass("in");
$("#courseCollapse").addClass("in");
$("#skillsCollapse").addClass("in");
$("#sn-sidebar-collapse").addClass("in");
$("#user_image_block").removeClass("text-muted");
} else {
$("#profileCollapse").removeClass("in");
$("#courseCollapse").removeClass("in");
$("#skillsCollapse").removeClass("in");
$("#sn-avatar-one").removeClass("in");
$("#user_image_block").addClass("text-muted");
}
}
function addMainEvent(elm, evType, fn, useCapture) {
if (elm.addEventListener) {
elm.addEventListener(evType, fn, useCapture);
return true;
} else if (elm.attachEvent) {
elm.attachEvent('on' + evType, fn);
} else {
elm['on'+evType] = fn;
}
}
function copyTextToClipBoard(elementId)
{
/* Get the text field */
var copyText = document.getElementById(elementId);
/* Select the text field */
copyText.select();
/* Copy the text inside the text field */
document.execCommand("copy");
}
function checkSessionTime()
{
fetch('/main/inc/ajax/session_clock.ajax.php?action=time')
.then(response => {
if (!response.ok) {
throw new Error('Server error: ' + response.statusText);
}
return response.json();
})
.then(data => {
if (data.sessionTimeLeft <= 0) {
if (!document.getElementById('session-checker-overlay')) {
clearInterval(sessionCounterInterval);
var counterOverlay = document.getElementById('session-count-overlay');
if (counterOverlay) {
counterOverlay.remove();
}
var now = new Date();
var day = String(now.getDate()).padStart(2, '0');
var month = String(now.getMonth() + 1).padStart(2, '0');
var year = now.getFullYear();
var hour = String(now.getHours()).padStart(2, '0');
var minutes = String(now.getMinutes()).padStart(2, '0');
var dateTimeSessionExpired = day + '/' + month + '/' + year + ' ' + hour + ':' + minutes;
document.body.insertAdjacentHTML('afterbegin', '<div id="session-checker-overlay" style="position:fixed;top:0;left:0;width:100%;height:100%;background:rgba(0,0,0,1);display:flex;justify-content:center;align-items:center;z-index:1000;"><div id="session-checker-modal" style="background:white;padding:20px;border-radius:5px;box-shadow:0010pxrgba(0,0,0,0.5);width:35%;text-align:center;"><p style="margin-bottom:20px;">{{ 'SessionExpiredAt' | get_lang | escape('js')}} ' + dateTimeSessionExpired + '.</p><button class="btn btn-primary" onclick="window.location.pathname = \'/\';">OK</button></div></div>');
}
} else if (data.sessionTimeLeft <= 110) {
sessionRemainingSeconds = data.sessionTimeLeft - 5;
if (sessionRemainingSeconds < 0) {
sessionRemainingSeconds = 0;
}
if (!document.getElementById('session-count-overlay')) {
document.body.insertAdjacentHTML('afterbegin', '<div id="session-count-overlay" style="position:fixed;top:0;left:0;width:100%;height:100%;background:rgba(0,0,0,0.5);display:flex;justify-content:center;align-items:center;z-index:1000;"><div id="session-checker-modal" style="background:white;padding:20px;border-radius:5px;box-shadow:0010pxrgba(0,0,0,0.5);width:35%;text-align:center;"><p id="session-counter" style="margin-bottom:20px;">{{ 'DueToInactivityTheSessionIsGoingToClose' | get_lang | escape('js')}} ' + sessionRemainingSeconds + ' {{ 'Seconds' | get_lang | escape('js')}}</p><button class="btn btn-primary" id="btn-session-extend" onclick="extendSession();">{{ 'KeepGoing' | get_lang | escape('js')}}</button></div></div>');
sessionCounterInterval = setInterval(updateSessionTimeCounter, 1000);
}
setTimeout(checkSessionTime, 60000);
} else {
clearInterval(sessionCounterInterval);
var counterOverlay = document.getElementById('session-count-overlay');
if (counterOverlay) {
counterOverlay.remove();
}
setTimeout(checkSessionTime, 60000);
}
})
.catch(error => console.error('Error:', error));
}
function extendSession() {
fetch('/main/inc/ajax/online.ajax.php')
.then(response => {
if (!response.ok) {
throw new Error('Server error: ' + response.statusText);
}
return response;
})
.then(data => {
console.log('Session extended');
clearInterval(sessionCounterInterval);
var counterOverlay = document.getElementById('session-count-overlay');
if (counterOverlay) {
counterOverlay.remove();
}
})
.catch(error => console.error('Error:', error));
}
function updateSessionTimeCounter() {
var sessionCounter = document.getElementById('session-counter');
if (sessionRemainingSeconds > 3) {
sessionCounter.innerHTML = '{{ 'DueToInactivityTheSessionIsGoingToClose' | get_lang | escape('js')}} ' + sessionRemainingSeconds + ' {{ 'Seconds' | get_lang | escape('js')}}';
sessionRemainingSeconds--;
} else if (sessionRemainingSeconds <= 3 && sessionRemainingSeconds > 1) {
var currentUrl = window.location.href;
if (currentUrl.includes('lp_controller.php') && currentUrl.includes('lp_id=') && currentUrl.includes('action=view')) {
if (!sessionClosing) {
var btnSessionExtend = document.getElementById('btn-session-extend');
if (btnSessionExtend) {
btnSessionExtend.remove();
}
document.getElementById('session-counter').innerHTML = '{{ 'SessionIsClosing' | get_lang | escape('js')}}';
setTimeout(function() {
fetch('/main/inc/ajax/session_clock.ajax.php?action=logout')
.then(response => response.json())
.then(data => {
if (!document.getElementById('session-checker-overlay')) {
clearInterval(sessionCounterInterval);
var counterOverlay = document.getElementById('session-count-overlay');
if (counterOverlay) {
counterOverlay.remove();
}
var now = new Date();
var day = String(now.getDate()).padStart(2, '0');
var month = String(now.getMonth() + 1).padStart(2, '0');
var year = now.getFullYear();
var hour = String(now.getHours()).padStart(2, '0');
var minutes = String(now.getMinutes()).padStart(2, '0');
var dateTimeSessionExpired = day + '/' + month + '/' + year + ' ' + hour + ':' + minutes;
document.body.insertAdjacentHTML('afterbegin', '<div id="session-checker-overlay" style="position:fixed;top:0;left:0;width:100%;height:100%;background:rgba(0,0,0,1);display:flex;justify-content:center;align-items:center;z-index:1000;"><div id="session-checker-modal" style="background:white;padding:20px;border-radius:5px;box-shadow:0010pxrgba(0,0,0,0.5);width:35%;text-align:center;"><p style="margin-bottom:20px;">{{ 'SessionExpiredAt' | get_lang | escape('js')}} ' + dateTimeSessionExpired + '.</p><button class="btn btn-primary" onclick="window.location.pathname = \'/\';">OK</button></div></div>');
}
})
.catch((error) => {
console.error('Error:', error);
});
}, 1000);
lastCall();
}
sessionClosing = true;
}
else {
if (!sessionClosing) {
var btnSessionExtend = document.getElementById('btn-session-extend');
if (btnSessionExtend) {
btnSessionExtend.remove();
}
document.getElementById('session-counter').innerHTML = '{{ 'SessionIsClosing' | get_lang | escape('js')}}';
setTimeout(function() {
fetch('/main/inc/ajax/session_clock.ajax.php?action=logout')
.then(response => response.json())
.then(data => {
if (!document.getElementById('session-checker-overlay')) {
clearInterval(sessionCounterInterval);
var counterOverlay = document.getElementById('session-count-overlay');
if (counterOverlay) {
counterOverlay.remove();
}
var now = new Date();
var day = String(now.getDate()).padStart(2, '0');
var month = String(now.getMonth() + 1).padStart(2, '0');
var year = now.getFullYear();
var hour = String(now.getHours()).padStart(2, '0');
var minutes = String(now.getMinutes()).padStart(2, '0');
var dateTimeSessionExpired = day + '/' + month + '/' + year + ' ' + hour + ':' + minutes;
document.body.insertAdjacentHTML('afterbegin', '<div id="session-checker-overlay" style="position:fixed;top:0;left:0;width:100%;height:100%;background:rgba(0,0,0,1);display:flex;justify-content:center;align-items:center;z-index:1000;"><div id="session-checker-modal" style="background:white;padding:20px;border-radius:5px;box-shadow:0010pxrgba(0,0,0,0.5);width:35%;text-align:center;"><p style="margin-bottom:20px;">{{ 'SessionExpiredAt' | get_lang | escape('js')}} ' + dateTimeSessionExpired + '.</p><button class="btn btn-primary" onclick="window.location.pathname = \'/\';">OK</button></div></div>');
}
})
.catch((error) => {
console.error('Error:', error);
});
}, 1000);
}
sessionClosing = true;
}
}
else {
clearInterval(sessionCounterInterval);
var counterOverlay = document.getElementById('session-count-overlay');
if (counterOverlay) {
counterOverlay.remove();
}
var now = new Date();
var day = String(now.getDate()).padStart(2, '0');
var month = String(now.getMonth() + 1).padStart(2, '0');
var year = now.getFullYear();
var hour = String(now.getHours()).padStart(2, '0');
var minutes = String(now.getMinutes()).padStart(2, '0');
var dateTimeSessionExpired = day + '/' + month + '/' + year + ' ' + hour + ':' + minutes;
document.body.insertAdjacentHTML('afterbegin', '<div id="session-checker-overlay" style="position:fixed;top:0;left:0;width:100%;height:100%;background:rgba(0,0,0,1);display:flex;justify-content:center;align-items:center;z-index:1000;"><div id="session-checker-modal" style="background:white;padding:20px;border-radius:5px;box-shadow:0010pxrgba(0,0,0,0.5);width:35%;text-align:center;"><p style="margin-bottom:20px;">{{ 'SessionExpiredAt' | get_lang | escape('js')}} ' + dateTimeSessionExpired + '.</p><button class="btn btn-primary" onclick="window.location.pathname = \'/\';">OK</button></div></div>');
}
}

View File

@@ -0,0 +1,206 @@
<!-- Fixed navbar -->
{% if _u.logged == 1 and not user_in_anon_survey %}
<script>
$(function () {
$.get('{{ _p.web_main }}inc/ajax/message.ajax.php?a=get_count_message', function(data) {
var countNotifications = (data.ms_friends + data.ms_groups + data.ms_inbox);
if (countNotifications === 0 || isNaN(countNotifications)) {
$("#count_message_li").addClass('hidden');
} else {
$("#count_message_li").removeClass('hidden');
$("#count_message").append(countNotifications);
}
});
});
</script>
{% endif %}
<nav class="navbar navbar-default">
<div class="container">
<div class="navbar-header">
<button type="button" class="pull-right navbar-toggle collapsed" data-toggle="collapse" data-target="#navbar" aria-expanded="false" aria-controls="navbar">
<span class="sr-only">Toggle navigation</span>
<span class="icon-bar"></span>
<span class="icon-bar"></span>
<span class="icon-bar"></span>
</button>
{% if _u.logged == 1 and notification_event == 1 %}
<button id="user-dropdown" type="button" class="menu-dropdown pull-right navbar-toggle collapsed"
data-toggle="collapse" data-target="#user-dropdown-menu" aria-expanded="false" aria-controls="navbar">
<img class="img-circle" src="{{ _u.avatar_small }}" alt="{{ _u.complete_name }}"/>
<span class="caret"></span>
<ul id="user-dropdown-menu" class="dropdown-menu" role="menu" aria-labelledby="user-dropdown">
<li class="user-header">
<div class="text-center">
<a href="{{ profile_url }}">
<img class="img-circle" src="{{ _u.avatar_medium }}" alt="{{ _u.complete_name }}"/>
<p class="name">{{ _u.complete_name }}</p>
</a>
<p><em class="fa fa-envelope-o" aria-hidden="true"></em> {{ _u.email }}</p>
</div>
</li>
<li role="separator" class="divider"></li>
{% if message_url %}
<li class="user-body">
<a title="{{ "Inbox"|get_lang }}" href="{{ message_url }}">
<em class="fa fa-envelope" aria-hidden="true"></em> {{ "Inbox"|get_lang }}
</a>
</li>
{% endif %}
{% if pending_survey_url %}
<li class="user-body">
<a href="{{ pending_survey_url }}">
<em class="fa fa-pie-chart"></em> {{ 'PendingSurveys'|get_lang }}
</a>
</li>
{% endif %}
{% if certificate_url %}
<li class="user-body">
<a title="{{ "MyCertificates"|get_lang }}" href="{{ certificate_url }}">
<em class="fa fa-graduation-cap"
aria-hidden="true"></em> {{ "MyCertificates"|get_lang }}
</a>
</li>
{% endif %}
<li class="user-body">
<a id="logout_button" title="{{ "Logout"|get_lang }}" href="{{ logout_link }}">
<em class="fa fa-sign-out"></em> {{ "Logout"|get_lang }}
</a>
</li>
</ul>
</button>
{% if _u.logged == 1 %}
<button id="notifications-dropdown" type="button" class="pull-right menu-dropdown navbar-toggle collapsed"
data-toggle="collapse" data-target="#notification-menu" aria-expanded="false" aria-controls="navbar">
<em id="notificationsIcon" class="fa fa-bell-o " aria-hidden="true"></em>
{# hide red button loading #}
<span id="notificationsBadge" class="label label-danger">
<em class="fa fa-spinner fa-pulse fa-fw" aria-hidden="true"></em>
</span>
<div id="notification-menu"
class="dropdown-menu notification-dropdown-menu" aria-labelledby="notifications-dropdown">
<h5 class="dropdown-header">
<em class="fa fa-bell-o" aria-hidden="true"></em> <span class="fw-600 c-grey-900">
{{ 'Notifications' | get_lang }}
</span>
</h5>
<a id="notificationsLoader" class="dropdown-item dropdown-notification" href="#">
<p class="notification-solo text-center">
<em id="notificationsIcon" class="fa fa-spinner fa-pulse fa-fw" aria-hidden="true"></em>
{{ 'Loading' | get_lang }}
</p>
</a>
<ul id="notificationsContainer" class="notifications-container"></ul>
<a id="notificationEmpty" class="dropdown-item dropdown-notification" href="#">
<p class="notification-solo text-center"> {{ 'NoNewNotification' | get_lang }}</p>
</a>
</div>
</button>
<button id="count_message_li" type="button" class="pull-right navbar-toggle collapsed menu-dropdown" aria-expanded="true">
<a href="{{ message_url }}">
<span id="count_message" class="badge badge-warning"></span>
</a>
</button>
{% endif %}
{% endif %}
<a class="navbar-brand" href="{{ _p.web }}"> <em class="fa fa-home"></em> </a>
</div>
<div id="navbar" class="collapse navbar-collapse">
<ul class="nav navbar-nav">
{% for item in menu %}
{% set show_item = true %}
{% if user_in_anon_survey and item.key != 'homepage' %}
{% set show_item = false %}
{% endif %}
{% if show_item %}
<li class="{{ item.key }} {{ item.current }}">
<a href="{{ item.url }}" {{ item.target ? 'target="' ~ item.target ~ '"' : '' }} title="{{ item.title }}">
{{ item.title }}
</a>
</li>
{% endif %}
{% endfor %}
</ul>
{% if _u.logged == 1 and not user_in_anon_survey %}
<ul class="nav navbar-nav navbar-right">
{% if language_form %}
<li class="dropdown language">
{{ language_form }}
</li>
{% endif %}
{% if notification_event == 0 %}
{% if _u.status != 6 %}
<li id="count_message_li" class="pull-left " style="float: left !important;" aria-expanded="true">
<a href="{{ message_url }}">
<span id="count_message" class="badge badge-warning"></span>
</a>
</li>
<li class="dropdown avatar-user" style="float:right">
<a href="#" class="dropdown-toggle" data-toggle="dropdown" role="button"
aria-expanded="false">
<img class="img-circle" src="{{ _u.avatar_small }}" alt="{{ _u.complete_name }}"/>
<span class="username-movil">{{ _u.complete_name }}</span>
<span class="caret"></span>
</a>
<ul class="dropdown-menu" role="menu">
<li class="user-header">
<div class="text-center">
<a href="{{ profile_url }}">
<img class="img-circle" src="{{ _u.avatar_medium }}" alt="{{ _u.complete_name }}"/>
<p class="name">{{ _u.complete_name }}</p>
</a>
<p><em class="fa fa-envelope-o" aria-hidden="true"></em> {{ _u.email }}</p>
</div>
</li>
<li role="separator" class="divider"></li>
{% if message_url %}
<li class="user-body">
<a title="{{ "Inbox"|get_lang }}" href="{{ message_url }}">
<em class="fa fa-envelope" aria-hidden="true"></em> {{ "Inbox"|get_lang }}
</a>
</li>
{% endif %}
{% if pending_survey_url %}
<li class="user-body">
<a href="{{ pending_survey_url }}">
<em class="fa fa-pie-chart"></em> {{ 'PendingSurveys'|get_lang }}
</a>
</li>
{% endif %}
{% if certificate_url %}
<li class="user-body">
<a title="{{ "MyCertificates"|get_lang }}" href="{{ certificate_url }}">
<em class="fa fa-graduation-cap"
aria-hidden="true"></em> {{ "MyCertificates"|get_lang }}
</a>
</li>
{% endif %}
<li class="user-body">
<a id="logout_button" title="{{ "Logout"|get_lang }}" href="{{ logout_link }}">
<em class="fa fa-sign-out"></em> {{ "Logout"|get_lang }}
</a>
</li>
</ul>
</li>
{% endif %}
{% endif %}
{% if notification_event == 1 %}
{% include 'default/layout/notification.tpl' %}
{% endif %}
</ul>
{% endif %}
</div><!--/.nav-collapse -->
</div>
</nav>

View File

@@ -0,0 +1,50 @@
{# Global modal, load content by AJAX call to href attribute on anchor tag with 'ajax' class #}
<div class="modal fade" id="global-modal" tabindex="-1" role="dialog" aria-labelledby="global-modal-title" aria-hidden="true">
<div class="modal-dialog modal-lg">
<div class="modal-content">
<div class="modal-header">
<button type="button" class="close" data-dismiss="modal" aria-label="{{ "Close" | get_lang }}">
<span aria-hidden="true">&times;</span>
</button>
<h4 class="modal-title" id="global-modal-title">&nbsp;</h4>
</div>
<div class="modal-body" id="global-modal-body">
</div>
</div>
</div>
</div>
{# Expands an image modal #}
<div class="modal fade" id="expand-image-modal" tabindex="-1" role="dialog" aria-labelledby="expand-image-modal-title" aria-hidden="true">
<div class="modal-dialog modal-lg">
<div class="modal-content">
<div class="modal-header">
<button type="button" class="close" data-dismiss="modal" aria-label="{{ "Close" | get_lang }}"><span aria-hidden="true">&times;</span></button>
<h4 class="modal-title" id="expand-image-modal-title">&nbsp;</h4>
</div>
<div class="modal-body">
</div>
</div>
</div>
</div>
{# Delete modal #}
<div class="modal fade" id="confirm-delete" tabindex="-1" role="dialog" aria-labelledby="confirm-delete-title" aria-hidden="true">
<div class="modal-dialog">
<div class="modal-content">
<div class="modal-header">
<button type="button" class="close" data-dismiss="modal" aria-hidden="true">&times;</button>
<h4 class="modal-title" id="confirm-delete-title">{{ 'Delete' | get_lang }}</h4>
</div>
<div class="modal-body">
<p class="debug-url"></p>
</div>
<div class="modal-footer">
<button type="button" class="btn btn-default" data-dismiss="modal">{{ 'Cancel' | get_lang }}</button>
<a id="delete_item" class="btn btn-danger btn-ok">{{ 'Delete' | get_lang }}</a>
</div>
</div>
</div>
</div>

View File

@@ -0,0 +1,16 @@
<!DOCTYPE html>
<!--[if lt IE 7]> <html lang="{{document_language}}" class="no-js lt-ie9 lt-ie8 lt-ie7"> <![endif]-->
<!--[if IE 7]> <html lang="{{document_language}}" class="no-js lt-ie9 lt-ie8"> <![endif]-->
<!--[if IE 8]> <html lang="{{document_language}}" class="no-js lt-ie9"> <![endif]-->
<!--[if gt IE 8]><!--><html lang="{{document_language}}" class="no-js"> <!--<![endif]-->
<head>
{% include 'layout/head.tpl'|get_template %}
</head>
<body dir="{{text_direction}}" class="{{section_name}}">
<section id="content-scorm">
{% block body %}
{{ content }}
{% endblock %}
</section>
</body>
</html>

View File

@@ -0,0 +1,231 @@
{% if _u.logged == 1 %}
<script>
$(function () {
var count = 0;
var lastCount = 0;
var notifications = new Array();
var intervalTime = 180000; // 3 minutes
var intervalTime = 30000; // 30 seconds
$.getJSON('{{ _p.web_main }}inc/ajax/message.ajax.php?a=get_notifications', function(data) {
$.each(data, function( key, value ) {
notifications.push(value);
count++;
});
appNotifications.init();
});
function makeBadge(texte) {
return "<span class=\"badge badge-default\">" + texte + "</span>";
}
appNotifications = {
init: function () {
$("#notificationsBadge").hide();
$("#notificationEmpty").hide();
$("#notifications-dropdown").on('click', function () {
var open = $("#notifications-dropdown").attr("aria-expanded");
if (open === "false") {
appNotifications.loadAll();
}
});
appNotifications.loadAll();
setInterval(function () {
appNotifications.loadNumber();
}, intervalTime);
$('.notification-read-desktop').on('click', function (event) {
appNotifications.markAsReadDesktop(event, $(this));
});
},
loadAll: function () {
//console.log('loadAll');
//console.log('count : ' + count);
if (count !== lastCount || count === 0) {
appNotifications.load();
}
appNotifications.loadNumber();
},
badgeLoadingMask: function (show) {
if (show === true) {
$("#notificationsBadge").html(appNotifications.badgeSpinner);
$("#notificationsBadge").show();
$("#notificationsBadgeMobile").html(count);
$("#notificationsBadgeMobile").show();
} else {
$("#notificationsBadge").html(count);
if (count > 0) {
$("#notificationsIcon").removeClass("fa-bell-o");
$("#notificationsIcon").addClass("fa-bell");
$("#notificationsBadge").show();
$("#notificationsIconMobile").removeClass("fa-bell-o");
$("#notificationsIconMobile").addClass("fa-bell");
$("#notificationsBadgeMobile").show();
} else {
$("#notificationsIcon").addClass("fa-bell-o");
$("#notificationsBadge").hide();
// Mobile
$("#notificationsIconMobile").addClass("fa-bell-o");
$("#notificationsBadgeMobile").hide();
}
}
},
loadingMask: function (show) {
if (show === true) {
$("#notificationEmpty").hide();
$("#notificationsLoader").show();
} else {
$("#notificationsLoader").hide();
if (count > 0) {
$("#notificationEmpty").hide();
} else {
$("#notificationEmpty").show();
}
}
},
loadNumber: function () {
//console.log('loadNumber');
$.get('{{ _p.web_main }}inc/ajax/message.ajax.php?a=get_count_notifications', function(data) {
count = data;
//console.log(count);
$("#notificationsBadge").html(count);
appNotifications.badgeLoadingMask(false);
});
},
loadNotificationArray: function () {
$('#notificationsContainer').html("");
var closeLink = '<div class="notification-read"><i class="fa fa-times" aria-hidden="true"></i></div>';
for (i = 0; i < count; i++) {
if (notifications[i]) {
var template = $('#notificationTemplate').html();
template = template.replace("{id}", notifications[i].id);
template = template.replace("{link}", notifications[i].link);
template = template.replace("{title}", notifications[i].title);
template = template.replace("{content}", notifications[i].content);
template = template.replace("{event_text}", notifications[i].event_text);
if (notifications[i].persistent == 1) {
template = template.replace("{close_link}", '');
} else {
template = template.replace("{close_link}", closeLink);
}
$('#notificationsContainer').append(template);
if (!notifications[i].event_text) {
$('#notificationsContainer li[id="' + notifications[i].id + '"] .notification-event-text').remove();
}
}
}
$('.notification-read').on('click', function (event) {
appNotifications.markAsRead(event, $(this));
});
appNotifications.loadingMask(false);
$("#notifications-dropdown").prop("disabled", false);
},
load: function () {
appNotifications.loadingMask(true);
$('#notificationsContainer').html("");
lastCount = count;
//console.log('load');
//console.log(count);
$.getJSON('{{ _p.web_main }}inc/ajax/message.ajax.php?a=get_notifications', function(data) {
$.each(data, function(key, value) {
var add = true;
$.each(notifications, function(notificationKey, notificationValue) {
if (value.id == notificationValue.id) {
add = false;
return;
}
});
if (add == true) {
notifications.push(value);
count++;
}
});
});
setTimeout(function () {
appNotifications.loadNotificationArray();
}, 1000);
},
markAsRead: function (event, elem) {
event.preventDefault();
event.stopPropagation();
if (document.activeElement) {
document.activeElement.blur();
}
var notificationId = elem.parent().parent().attr('id');
//console.log('markAsRead id : ' + notificationId);
$.ajax({
url: '{{ _p.web_main }}inc/ajax/message.ajax.php?a=mark_notification_as_read&id='+notificationId,
success: function (data) {
//console.log(notifications);
notifications = $.grep(notifications, function(value) {
if (notificationId == value.id) {
return false;
}
return true;
});
//console.log(notifications);
count--;
//console.log('count : ' + count);
appNotifications.loadNotificationArray();
}
});
},
markAsReadDesktop: function (event, elem) {
event.preventDefault();
event.stopPropagation();
elem.parent('.dropdown-notification').removeClass("notification-unread");
elem.remove();
if (document.activeElement) {
document.activeElement.blur();
}
count--;
appNotifications.loadAll();
},
add: function () {
lastCount = count;
count++;
},
badgeSpinner: '<i class="fa fa-spinner fa-pulse fa-fw" aria-hidden="true"></i>'
};
//appNotifications.init();
});
</script>
<!-- template -->
<script id="notificationTemplate" type="text/html">
<li class="dropdown-notification" id="{id}">
<a href="{link}" class="link">
<div class="notifications-body">
<div class="notification-title">
<i class="fa fa-sticky-note-o" aria-hidden="true"></i>
{title}
</div>
<div class="notification-content">{content}</div>
<div class="notification-event-text">
<i class="fa fa-calendar-o" aria-hidden="true"></i>
{event_text}
</div>
</div>
{close_link}
</a>
</li>
</script>
{% endif %}

View File

@@ -0,0 +1,68 @@
<!DOCTYPE html>
<!--[if lt IE 7]> <html lang="{{ document_language }}" class="no-js lt-ie9 lt-ie8 lt-ie7"> <![endif]-->
<!--[if IE 7]> <html lang="{{ document_language }}" class="no-js lt-ie9 lt-ie8"> <![endif]-->
<!--[if IE 8]> <html lang="{{ document_language }}" class="no-js lt-ie9"> <![endif]-->
<!--[if gt IE 8]><!-->
<html lang="{{ document_language }}" class="no-js"> <!--<![endif]-->
<head>
{% block head %}
{% include 'layout/head.tpl'|get_template %}
{% endblock %}
</head>
<body class="{{ 'page_origin' ? ('page_origin_' ~ page_origin) : '' }}">
<!-- START MAIN -->
<main id="main" dir="{{ text_direction }}" class="{{ section_name }} {{ login_class }}">
<noscript>{{ "NoJavascript"|get_lang }}</noscript>
{% if frmDisplayCookieUsageWarning %}
<!-- START DISPLAY COOKIES VALIDATION -->
<div class="toolbar-cookie alert-warning">
{{ frmDisplayCookieUsageWarning }}
</div>
<!-- END DISPLAY COOKIES VALIDATION -->
{% endif %}
{% if show_header == true %}
<!-- START HEADER -->
<header id="cm-header">
{% include 'layout/page_header.tpl'|get_template %}
</header>
{% endif %}
<!-- START CONTENT -->
<section id="cm-content"{{ html_content_extra_class }}>
<div class="container">
{% if show_course_shortcut is not null %}
<!-- TOOLS SHOW COURSE -->
<div id="cm-tools" class="nav-tools">
{{ show_course_shortcut }}
</div>
<!-- END TOOLS SHOW COURSE -->
{% endif %}
{% block breadcrumb %}
{{ breadcrumb }}
{% endblock %}
{% block body %}
{{ content }}
{% endblock %}
</div>
</section>
<!-- END CONTENT -->
{% if show_footer == true %}
<!-- START FOOTER -->
<footer class="footer">
{% include 'layout/page_footer.tpl'|get_template %}
</footer>
<!-- END FOOTER -->
{% endif %}
</main>
<!-- END MAIN -->
{% include 'layout/modals.tpl'|get_template %}
</body>
</html>

View File

@@ -0,0 +1,32 @@
{% if introduction != '' %}
{{ introduction }}
{% endif %}
{% if actions != '' %}
{{ actions }}
{% endif %}
{{ flash_messages }}
{% if header != '' %}
<div class="section-page">
<div class="page-header">
<h3>{{ header }}</h3>
</div>
</div>
{% endif %}
{% if category != '' %}
<div class="section-category">
<div class="page-header">
<h3>{{ category.name }}</h3>
</div>
<div class="description">
{{ category.description }}
</div>
</div>
{% endif %}
{% if message != '' %}
<section id="messages">
{{ message}}
</section>
{% endif %}

View File

@@ -0,0 +1,59 @@
<div class="container">
{% if plugin_pre_footer is not null %}
<div id="plugin_pre_footer">
{{ plugin_pre_footer }}
</div>
{% endif %}
<section class="sub-footer">
<div class="row">
<div class="col-xs-12 col-md-4">
{% if session_teachers is not null %}
<div class="session-teachers">
{{ session_teachers }}
</div>
{% endif %}
{% if teachers is not null %}
<div class="teachers">
{{ teachers }}
</div>
{% endif %}
{% if plugin_footer_left is not null %}
<div id="plugin_footer_left">
{{ plugin_footer_left }}
</div>
{% endif %}
</div>
<div class="col-xs-12 col-md-4">
{% if plugin_footer_center is not null %}
<div id="plugin_footer_center">
{{ plugin_footer_center }}
</div>
{% endif %}
</div>
<div class="col-xs-12 col-md-4 text-right">
{% if administrator_name is not null %}
<div class="administrator-name">
{{ administrator_name }}
</div>
{% endif %}
{% if _s.software_name is not empty %}
<div class="software-name">
<a href="{{_p.web}}" target="_blank">
{{ "PoweredByX" |get_lang | format(_s.software_name) }}
</a>&copy; {{ "now"|date("Y") }}
</div>
{% endif %}
{% if plugin_footer_right is not null %}
<div id="plugin_footer_right">
{{ plugin_footer_right }}
</div>
{% endif %}
</div>
</div>
{% if footer_extra_content %}
{{ footer_extra_content }}
{% endif %}
</section>
</div>
{{ execution_stats }}

View File

@@ -0,0 +1,80 @@
<div id="navigation" class="notification-panel">
{{ help_content }}
{{ bug_notification }}
</div>
{% block topbar %}
{% include 'layout/topbar.tpl'|get_template %}
{% endblock %}
{% if header_extra_content is not null %}
{{ header_extra_content }}
{% endif %}
<div class="container">
<div class="row">
{% if plugin_header_left_logo is not null %}
<div class="col-xs-2 col-md-1">
<div id="plugin_header_left_logo" class="">
{{ plugin_header_left_logo }}
</div>
</div>
{% endif %}
<div class="col-xs-10 col-md-3">
{% if _u.logged != 1 %}
<div class="key-login">
<a href="#login-block" id="btn-login" class="btn btn-default">
<img src="{{ 'key.png'|icon(22) }}" alt="key"> {{ 'LoginAsThisUser'|get_lang }}
</a>
</div>
{% endif %}
<div class="logo">
{{ logo }}
</div>
</div>
<div class="col-xs-12 col-md-8">
<div class="row">
<div class="col-sm-4">
{% if plugin_header_left is not null %}
<div id="plugin_header_left">
{{ plugin_header_left }}
</div>
{% endif %}
</div>
<div class="col-sm-3">
{% if plugin_header_center is not null %}
<div id="plugin_header_center">
{{ plugin_header_center }}
</div>
{% endif %}
</div>
<div class="col-sm-5">
<ol class="header-ol">
{% if plugin_header_right is not null %}
<li>
<div id="plugin_header_right">
{{ plugin_header_right }}
</div>
</li>
{% endif %}
<li>
<div class="section-notifications">
{% if _u.logged == 1 and not user_in_anon_survey %}
<ul id="notifications" class="nav nav-pills pull-right">
</ul>
{% endif %}
</div>
</li>
<li>
{{ accessibility }}
</li>
</ol>
</div>
</div>
</div>
</div>
</div>
{% block menu %}
{% include 'layout/menu.tpl'|get_template %}
{% endblock %}
{% include 'layout/course_navigation.tpl'|get_template %}

View File

@@ -0,0 +1,18 @@
</div>
</section>
<!-- END CONTENT -->
{% if show_footer == true %}
<!-- START FOOTER -->
<footer class="footer">
{% include 'layout/page_footer.tpl'|get_template %}
</footer>
<!-- END FOOTER -->
{% endif %}
</main>
<!-- END MAIN -->
{% include 'layout/modals.tpl'|get_template %}
</body>
</html>

View File

@@ -0,0 +1,49 @@
<!DOCTYPE html>
<!--[if lt IE 7]> <html lang="{{ document_language }}" class="no-js lt-ie9 lt-ie8 lt-ie7"> <![endif]-->
<!--[if IE 7]> <html lang="{{ document_language }}" class="no-js lt-ie9 lt-ie8"> <![endif]-->
<!--[if IE 8]> <html lang="{{ document_language }}" class="no-js lt-ie9"> <![endif]-->
<!--[if gt IE 8]><!-->
<html lang="{{ document_language }}" class="no-js"> <!--<![endif]-->
<head>
{% block head %}
{% include 'layout/head.tpl'|get_template %}
{% endblock %}
</head>
<body class="{{ 'page_origin' ? ('page_origin_' ~ page_origin) : '' }}">
<!-- START MAIN -->
<main id="main" dir="{{ text_direction }}" class="{{ section_name }} {{ login_class }}">
<noscript>{{ "NoJavascript"|get_lang }}</noscript>
{% if frmDisplayCookieUsageWarning %}
<!-- START DISPLAY COOKIES VALIDATION -->
<div class="toolbar-cookie alert-warning">
{{ frmDisplayCookieUsageWarning }}
</div>
<!-- END DISPLAY COOKIES VALIDATION -->
{% endif %}
{% if show_header == true %}
<!-- START HEADER -->
<header id="cm-header">
{% include 'layout/page_header.tpl'|get_template %}
</header>
<!-- END HEADER -->
{% endif %}
<!-- START CONTENT -->
<section id="cm-content"{{ html_content_extra_class }}>
<div class="container">
{% if show_header == true %}
{% if show_course_shortcut is not null %}
<!-- TOOLS SHOW COURSE -->
<div id="cm-tools" class="nav-tools">
{{ show_course_shortcut }}
</div>
<!-- END TOOLS SHOW COURSE -->
{% endif %}
{% block breadcrumb %}
{{ breadcrumb }}
{% endblock %}
{% endif %}
{{ flash_messages }}

View File

@@ -0,0 +1,72 @@
<!-- Topbar -->
{% if show_toolbar == 1 %}
<nav id="toolbar-admin" class="navbar navbar-inverse">
<div class="container-fluid">
<div class="navbar-header">
<button type="button" class="navbar-toggle collapsed" data-toggle="collapse" data-target="#bs-example-navbar-collapse-1" aria-expanded="false">
<span class="sr-only">Toggle navigation</span>
<span class="icon-bar"></span>
<span class="icon-bar"></span>
<span class="icon-bar"></span>
</button>
<a class="navbar-brand" href="{{ _p.web }}">
<img src="{{ "icon-chamilo.png"|icon(22) }}" title="{{ "siteName" | api_get_setting }}">
</a>
</div>
<div class="collapse navbar-collapse" id="bs-example-navbar-collapse-1">
<ul class="nav navbar-nav">
<li class="active"><a href="{{ _p.web }}user_portal.php"> {{ "MyCourses"|get_lang }}</a></li>
<li class="dropdown">
<a class="dropdown-toggle" data-toggle="dropdown" href="#">{{'Tracking'|get_lang }}<b class="caret"></b></a>
<ul class="dropdown-menu">
<li><a href="{{ _p.web_main }}mySpace/">{{ "CoursesReporting"|get_lang }}</a></li>
<li><a href="{{ _p.web_main }}mySpace/index.php?view=admin">{{ "AdminReports"|get_lang }}</a></li>
<li><a href="{{ _p.web_main }}tracking/exams.php">{{ "ExamsReporting"|get_lang }}</a></li>
<li class="divider"></li>
<li><a href="{{ _p.web_main }}dashboard/">{{ "Dashboard"|get_lang }}</a></li>
</ul>
</li>
{% if _u.logged %}
{% if _u.is_admin == 1 %}
<li class="dropdown">
<a class="dropdown-toggle" data-toggle="dropdown" href="#">{{'Administration'|get_lang }}<b class="caret"></b></a>
<ul class="dropdown-menu">
<li><a href="{{ _p.web_main }}admin/">{{ "Home"|get_lang }}</a></li>
<li><a href="{{ _p.web_main }}admin/user_list.php">{{ "UserList"|get_lang }}</a></li>
<li><a href="{{ _p.web_main }}admin/course_list.php">{{ "CourseList"|get_lang }}</a></li>
<li><a href="{{ _p.web_main }}session/session_list.php">{{ "SessionList"|get_lang }}</a></li>
<li class="divider"></li>
<li><a href="{{ _p.web_main }}admin/settings.php">{{ "Settings"|get_lang }}</a></li>
<li class="divider"></li>
<li><a href="{{ _p.web_main }}admin/settings.php?category=Plugins">{{ "Plugins"|get_lang }}</a></li>
<li><a href="{{ _p.web_main }}admin/settings.php?category=Regions">{{ "Regions"|get_lang }}</a></li>
</ul>
</li>
<li class="dropdown">
<a class="dropdown-toggle" data-toggle="dropdown" href="#">{{ 'Add'|get_lang }}<b class="caret"></b></a>
<ul class="dropdown-menu">
<li><a href="{{ _p.web_main }}admin/user_add.php">{{ "User"|get_lang }}</a></li>
<li><a href="{{ _p.web_main }}admin/course_add.php">{{ "Course"|get_lang }}</a></li>
<li><a href="{{ _p.web_main }}session/session_add.php">{{ "Session"|get_lang }}</a></li>
</ul>
</li>
{% endif %}
</ul>
{% if _u.is_admin == 1 %}
<form class="navbar-form navbar-left" role="search" action="{{ _p.web_main }}admin/user_list.php" method="get">
<input type="text" class="form-control" placeholder="{{'SearchUsers'|get_lang }}" name="keyword">
<button type="submit" class="btn btn-primary">{{'Search'|get_lang }}</button>
</form>
{% endif %}
<ul class="nav navbar-nav navbar-right">
<li><a href="{{ _p.web }}index.php?logout=logout&uid={{_u.user_id}}">{{ "Logout"|get_lang }}</a></li>
</ul>
{% endif %}
</div><!-- /.navbar-collapse -->
</div><!-- /.container-fluid -->
</nav>
{% endif %}

View File

@@ -0,0 +1,18 @@
<div class="normal-message">
{{ "HelloXAsYouCanSeeYourCourseListIsEmpty"|get_lang | format(_u.complete_name) }}
{% if count_courses == 0 %}
{{ "PleaseAllowUsALittleTimeToSubscribeYouToOneOfOurCourses"|get_lang }}
{% else %}
{% if not 'hide_course_catalog_welcome'|api_get_configuration_value %}
{% if "allow_students_to_browse_courses"|api_get_setting == 'true' %}
{{ "GoAheadAndBrowseOurCourseCatalogXOnceRegisteredYouWillSeeTheCourseHereX"|get_lang|format(course_catalog_link, course_list_link) }}
<a class="btn btn-primary btn-large" href="{{ course_catalog_url }}">
{{ "CourseCatalog"|get_lang }}
</a>
{% else %}
{{ "PleaseAllowUsALittleTimeToSubscribeYouToOneOfOurCourses"|get_lang }}
{% endif %}
{% endif %}
{% endif %}
</div>