upgrade
This commit is contained in:
71
main/template/default/admin/career_dashboard.tpl
Normal file
71
main/template/default/admin/career_dashboard.tpl
Normal file
@@ -0,0 +1,71 @@
|
||||
{% extends 'layout/layout_1_col.tpl'|get_template %}
|
||||
|
||||
{% block content %}
|
||||
{{ form_filter }}
|
||||
|
||||
{% for item in data %}
|
||||
<div id="career-{{ item.id }}" class="career panel panel-default">
|
||||
<div class="panel-heading">
|
||||
<h4>
|
||||
{% if _u.is_admin %}
|
||||
<a href="{{ _p.web }}main/admin/careers.php?action=edit&id={{ item.id }}">
|
||||
{{ item.name }}
|
||||
</a>
|
||||
{% else %}
|
||||
{{ item.name }}
|
||||
{% endif %}
|
||||
</h4>
|
||||
</div>
|
||||
<div class="panel-body">
|
||||
{{ item.description }}
|
||||
<table class="table promotions">
|
||||
<thead class="title">
|
||||
<th>{{ 'Promotions' | get_lang }}</th>
|
||||
<th>{{ 'StudyCycle' | get_lang }} </th>
|
||||
<th>{{ 'Courses' | get_lang }} </th>
|
||||
</thead>
|
||||
{% for promotions in item.career %}
|
||||
{% for prom in promotions %}
|
||||
{% set line = prom.sessions|length + 1 %}
|
||||
<tr>
|
||||
<td class="promo" rowspan="{{ line }}">
|
||||
<h4 id="promotion-id-{{ prom.id }}">
|
||||
<a title="{{ prom.name }}" href="{{ _p.web }}main/admin/promotions.php?action=edit&id={{ prom.id }}">
|
||||
{{ prom.name }}
|
||||
</a>
|
||||
</h4>
|
||||
</td>
|
||||
{% if line == 1 %}
|
||||
<td> </td><td> </td>
|
||||
{% endif %}
|
||||
</tr>
|
||||
{% for session in prom.sessions %}
|
||||
{% set sessionid = session.data.id %}
|
||||
<tr>
|
||||
<td class="cycles">
|
||||
<h4 id="session-id-{{ sessionid }}">
|
||||
<a title="{{ session.data.name }}" href="{{ _p.web }}main/session/resume_session.php?id_session={{ sessionid }}">
|
||||
{{ session.data.name }}
|
||||
</a>
|
||||
</h4>
|
||||
</td>
|
||||
<td class="courses">
|
||||
<ul>
|
||||
{% for course in session.courses %}
|
||||
<li>
|
||||
<a href="{{ _p.web }}courses/{{ course.directory }}/index.php?id_session={{ sessionid }}" title="{{ course.title }}">
|
||||
{{ course.title }}
|
||||
</a>
|
||||
</li>
|
||||
{% endfor %}
|
||||
</ul>
|
||||
</td>
|
||||
</tr>
|
||||
{% endfor %}
|
||||
{% endfor %}
|
||||
{% endfor %}
|
||||
</table>
|
||||
</div>
|
||||
</div>
|
||||
{% endfor %}
|
||||
{% endblock %}
|
||||
@@ -0,0 +1,6 @@
|
||||
{% extends 'layout/layout_1_col.tpl'|get_template %}
|
||||
{% block content %}
|
||||
{{ form_filter }}
|
||||
{% import 'default/macro/macro.tpl' as display %}
|
||||
{{ display.careers_panel(data, _u.is_admin) }}
|
||||
{% endblock %}
|
||||
23
main/template/default/admin/email_tester.tpl
Normal file
23
main/template/default/admin/email_tester.tpl
Normal file
@@ -0,0 +1,23 @@
|
||||
<div class="row">
|
||||
{% if errors is empty %}
|
||||
<div class="col-md-12">
|
||||
{{ form }}
|
||||
</div>
|
||||
{% else %}
|
||||
<div class="col-md-6">
|
||||
{{ form }}
|
||||
</div>
|
||||
<div class="col-md-6">
|
||||
<h4 class="page-header">{{ 'Errors'|get_lang }}</h4>
|
||||
<ul>
|
||||
{% for error in errors %}
|
||||
<li>
|
||||
{{ 'Email: %s. %s ago'|format(error.mail, error.time) }}
|
||||
<pre>{{ error.reason|replace({'\n': '<br>'}) }}</pre>
|
||||
</li>
|
||||
{% endfor %}
|
||||
</ul>
|
||||
</div>
|
||||
{% endif %}
|
||||
</div>
|
||||
|
||||
68
main/template/default/admin/gradebook_dependency.tpl
Normal file
68
main/template/default/admin/gradebook_dependency.tpl
Normal file
@@ -0,0 +1,68 @@
|
||||
{% extends 'layout/layout_1_col.tpl'|get_template %}
|
||||
|
||||
{% block content %}
|
||||
<h3>
|
||||
{{ gradebook_category.name }}
|
||||
{% if gradebook_category.courseCode is not empty %}
|
||||
({{ gradebook_category.courseCode }})
|
||||
{% endif %}
|
||||
</h3>
|
||||
{{ 'MinimumGradebookToValidate' | get_lang }} : {{ min_to_validate }}
|
||||
<br />
|
||||
{{ 'MandatoryCourses' | get_lang }}
|
||||
{% for course in mandatory_courses %}
|
||||
<th>
|
||||
{{ course.title }} ({{ course.code }})
|
||||
</th>
|
||||
{% endfor %}
|
||||
<hr>
|
||||
<table class="table">
|
||||
<thead class="title">
|
||||
<tr>
|
||||
<th>{{ 'Users' | get_lang }}</th>
|
||||
{% for course in courses %}
|
||||
<th>
|
||||
{{ course.title }} ({{ course.code }})
|
||||
</th>
|
||||
{% endfor %}
|
||||
<th>{{ 'RestCoursesSubscribedResults' | get_lang }}</th>
|
||||
<th>{{ 'Progress' | get_lang }} Max 20 (Mandatory courses)</th>
|
||||
<th>{{ 'Progress' | get_lang }} Max 80 (Rest of courses)</th>
|
||||
<th>{{ 'Total' | get_lang }}</th>
|
||||
</tr>
|
||||
</thead>
|
||||
{% for user in users %}
|
||||
<tr>
|
||||
<td>{{ user.user_info.complete_name }}</td>
|
||||
|
||||
{% for course in courses %}
|
||||
<td>
|
||||
{% if user.result_dependencies[course.code] %}
|
||||
<img src="{{ 'check-circle.png'|icon(22) }}" />
|
||||
{% endif %}
|
||||
</td>
|
||||
{% endfor %}
|
||||
|
||||
<td>
|
||||
{{ user.course_list_passed_out_dependency }} /
|
||||
{{ user.course_list_passed_out_dependency_count }}
|
||||
</td>
|
||||
|
||||
<td>
|
||||
{{ user.result_mandatory_20 }}
|
||||
</td>
|
||||
<td>
|
||||
{{ user.result_not_mandatory_80 }}
|
||||
</td>
|
||||
|
||||
<td>
|
||||
{% if user.final_result %}
|
||||
<img src="{{ 'check-circle.png'|icon(22) }}" />
|
||||
{% else %}
|
||||
<img src="{{ 'warning.png'|icon(22) }}" />
|
||||
{% endif %}
|
||||
</td>
|
||||
</tr>
|
||||
{% endfor %}
|
||||
</table>
|
||||
{% endblock %}
|
||||
38
main/template/default/admin/gradebook_list.tpl
Normal file
38
main/template/default/admin/gradebook_list.tpl
Normal file
@@ -0,0 +1,38 @@
|
||||
{% extends 'layout/layout_1_col.tpl'|get_template %}
|
||||
|
||||
{% block content %}
|
||||
{{ form }}
|
||||
|
||||
{% if gradebook_list %}
|
||||
<table class="table">
|
||||
<thead class="title">
|
||||
<tr>
|
||||
<th>{{ 'Name' | get_lang }}</th>
|
||||
<th>{{ 'Course' | get_lang }}</th>
|
||||
<th>{{ 'Actions' | get_lang }} </th>
|
||||
</tr>
|
||||
</thead>
|
||||
{% for item in gradebook_list %}
|
||||
<tr>
|
||||
<td>
|
||||
{{ item.name | e }}
|
||||
</td>
|
||||
<td>
|
||||
{{ item.courseCode }}
|
||||
</td>
|
||||
<td>
|
||||
<a href="{{ current_url }}&action=edit&id={{ item.id }}">
|
||||
<img src="{{ 'edit.png'|icon(22) }}" />
|
||||
</a>
|
||||
|
||||
<a href="{{ _p.web_main }}admin/gradebook_dependency.php?id={{ item.id }}">
|
||||
<img src="{{ '2rightarrow.png'|icon(22) }}" />
|
||||
</a>
|
||||
</td>
|
||||
</tr>
|
||||
{% endfor %}
|
||||
</table>
|
||||
|
||||
{{ gradebook_list }}
|
||||
{% endif %}
|
||||
{% endblock %}
|
||||
43
main/template/default/admin/pagination.tpl
Normal file
43
main/template/default/admin/pagination.tpl
Normal file
@@ -0,0 +1,43 @@
|
||||
{% if pageCount > 1 %}
|
||||
<ul class="pagination">
|
||||
{% if first is defined and current != first %}
|
||||
<li class="first">
|
||||
<a href="{{ current_url }}&{{ pageParameterName ~ '=' ~first }}"><<
|
||||
</a>
|
||||
</li>
|
||||
{% endif %}
|
||||
|
||||
{% if previous is defined %}
|
||||
<li class="previous">
|
||||
<a class="hidden-xs" href="{{ current_url }}&{{ pageParameterName ~ '=' ~previous }}">
|
||||
<
|
||||
</a>
|
||||
</li>
|
||||
{% endif %}
|
||||
|
||||
{% for page in pagesInRange %}
|
||||
{% if page != current %}
|
||||
<li class="page">
|
||||
<a href="{{ current_url }}&{{ pageParameterName ~ '=' ~page }}">{{ page }}</a>
|
||||
</li>
|
||||
{% else %}
|
||||
<li class="current active">
|
||||
<a>{{ page }} <span class="sr-only">(current)</span>
|
||||
</a>
|
||||
</li>
|
||||
{% endif %}
|
||||
{% endfor %}
|
||||
|
||||
{% if next is defined %}
|
||||
<li class="next">
|
||||
<a class="hidden-xs" href="{{ current_url }}&{{ pageParameterName ~ '=' ~next }}">></a>
|
||||
</li>
|
||||
{% endif %}
|
||||
|
||||
{% if last is defined and current != last %}
|
||||
<li class="last">
|
||||
<a href="{{ current_url }}&{{ pageParameterName ~ '=' ~last }}">>></a>
|
||||
</li>
|
||||
{% endif %}
|
||||
</ul>
|
||||
{% endif %}
|
||||
25
main/template/default/admin/questions.tpl
Normal file
25
main/template/default/admin/questions.tpl
Normal file
@@ -0,0 +1,25 @@
|
||||
{% extends 'layout/layout_1_col.tpl'|get_template %}
|
||||
{% import 'default/macro/macro.tpl' as display %}
|
||||
|
||||
{% block content %}
|
||||
{{ toolbar }}
|
||||
{{ form }}
|
||||
{# {% for question in pagination %}#}
|
||||
{% for i in start..end %}
|
||||
{% if pagination[i] is defined %}
|
||||
{% set question = pagination[i] %}
|
||||
{{ display.collapse(
|
||||
question.iid,
|
||||
'#' ~ question.courseCode ~'-'~ question.iid ~ ' - ' ~ question.question,
|
||||
question.questionData,
|
||||
false,
|
||||
false
|
||||
)
|
||||
}}
|
||||
{% endif %}
|
||||
{% endfor %}
|
||||
|
||||
{% if question_count > pagination_length %}
|
||||
{{ pagination }}
|
||||
{% endif %}
|
||||
{% endblock %}
|
||||
348
main/template/default/admin/resource_sequence.tpl
Normal file
348
main/template/default/admin/resource_sequence.tpl
Normal file
@@ -0,0 +1,348 @@
|
||||
{% extends 'layout/layout_1_col.tpl'|get_template %}
|
||||
|
||||
{% block content %}
|
||||
{{ tabs }}
|
||||
<script>
|
||||
var url = '{{ _p.web_ajax }}sequence.ajax.php?type={{ sequence_type }}';
|
||||
var parentList = [];
|
||||
var resourceId = 0;
|
||||
var sequenceId = 0;
|
||||
|
||||
function useAsReference(sequenceId, itemId) {
|
||||
var id = itemId || $("#item option:selected").val();
|
||||
sequenceId = $("#sequence_id option:selected").val();
|
||||
|
||||
// Cleaning parent list.
|
||||
parentList = [];
|
||||
|
||||
// Check if data exists and load parents
|
||||
$.ajax({
|
||||
url: url + '&a=load_resource&load_resource_type=parent&id=' + id + '&sequence_id='+sequenceId,
|
||||
success: function (data) {
|
||||
if (data) {
|
||||
var loadingResources = new Array(),
|
||||
listLoaded = data.split(',');
|
||||
|
||||
listLoaded.forEach(function(value) {
|
||||
var loadResource = $.ajax(url, {
|
||||
data: {
|
||||
a: 'get_icon',
|
||||
id: value,
|
||||
sequence_id: sequenceId,
|
||||
show_delete: 1
|
||||
},
|
||||
success: function() {
|
||||
parentList.push(value);
|
||||
}
|
||||
});
|
||||
|
||||
loadingResources.push(loadResource);
|
||||
});
|
||||
|
||||
if (loadingResources.length) {
|
||||
$.when.apply($, loadingResources).done(function() {
|
||||
if (loadingResources.length === 1) {
|
||||
$('#parents').append(arguments[0]);
|
||||
|
||||
return;
|
||||
}
|
||||
|
||||
var i;
|
||||
|
||||
for (i = 0; i < arguments.length; i++) {
|
||||
$('#parents').append(arguments[i][0]);
|
||||
|
||||
if (i !== arguments.length - 1) {
|
||||
$('#parents').append('<em class="fa fa-plus fa-3x sequence-plus-icon"></em>');
|
||||
}
|
||||
}
|
||||
});
|
||||
}
|
||||
}
|
||||
}
|
||||
});
|
||||
|
||||
// Check if data exists and load children
|
||||
$.ajax({
|
||||
url: url + '&a=load_resource&load_resource_type=children&id=' + id + '&sequence_id='+sequenceId,
|
||||
success: function (data) {
|
||||
if (data) {
|
||||
var listLoaded = data.split(',');
|
||||
listLoaded.forEach(function(value) {
|
||||
$.ajax({
|
||||
url: url + '&a=get_icon&id='+ value+'&sequence_id='+sequenceId,
|
||||
success:function(data){
|
||||
$('#children').append(data);
|
||||
}
|
||||
});
|
||||
});
|
||||
}
|
||||
}
|
||||
});
|
||||
|
||||
// Cleaning
|
||||
$('#parents').html('');
|
||||
$('#children').html('');
|
||||
|
||||
$.ajax({
|
||||
url: url + '&a=get_icon&id='+ id+'&sequence_id='+sequenceId,
|
||||
success:function(data){
|
||||
$('#resource').html(data);
|
||||
parentList.push(id);
|
||||
resourceId = id;
|
||||
}
|
||||
});
|
||||
|
||||
$.ajax({
|
||||
url: url + '&a=graph&sequence_id='+sequenceId,
|
||||
success: function (data) {
|
||||
$('#show_graph').html(data);
|
||||
}
|
||||
});
|
||||
}
|
||||
|
||||
$(function() {
|
||||
// By default "set requirement" is set to false
|
||||
sequenceId = $("#sequence_id option:selected" ).val();
|
||||
|
||||
// Load parents
|
||||
$('#parents').on('click', 'a.delete_vertex, a.undo_delete', function(e) {
|
||||
e.preventDefault();
|
||||
|
||||
var self = $(this),
|
||||
parent = self.parent(),
|
||||
vertexId = self.attr('data-id') || 0;
|
||||
|
||||
if (!vertexId) {
|
||||
return;
|
||||
}
|
||||
|
||||
if (self.is('.delete_vertex')) {
|
||||
self.hide();
|
||||
parent.find('.undo_delete').show();
|
||||
|
||||
self.parents('.parent').addClass('parent-deleted');
|
||||
} else if (self.is('.undo_delete')) {
|
||||
self.hide();
|
||||
parent.find('.delete_vertex').show();
|
||||
|
||||
self.parents('.parent').removeClass('parent-deleted');
|
||||
}
|
||||
});
|
||||
|
||||
$('#parents, #resource, #children').on('click', '.parent .sequence-id', function(e) {
|
||||
e.preventDefault();
|
||||
|
||||
var itemId = $(this).parents('.parent').data('id') || 0;
|
||||
|
||||
if (!itemId) {
|
||||
return;
|
||||
}
|
||||
|
||||
$('button[name="set_requirement"]').prop('disabled', false);
|
||||
$('#requirements').prop('disabled', false);
|
||||
$('button[name="save_resource"]').prop('disabled', false);
|
||||
|
||||
useAsReference(sequenceId, itemId);
|
||||
});
|
||||
|
||||
// Button use as reference
|
||||
$('button[name="use_as_reference"]').click(function(e) {
|
||||
e.preventDefault();
|
||||
|
||||
if (!sequenceId) {
|
||||
return;
|
||||
}
|
||||
|
||||
$('#pnl-preview').show();
|
||||
$('button[name="set_requirement"], #requirements, button[name="save_resource"]').prop('disabled', false);
|
||||
$('#requirements').selectpicker('refresh');
|
||||
|
||||
useAsReference(sequenceId);
|
||||
});
|
||||
|
||||
// Button set requirement
|
||||
$('button[name="set_requirement"]').click(function(e) {
|
||||
e.preventDefault();
|
||||
|
||||
var requirementsSelectedEl = $("#requirements option:selected");
|
||||
|
||||
if (0 === requirementsSelectedEl.length || !sequenceId) {
|
||||
return;
|
||||
}
|
||||
|
||||
requirementsSelectedEl.each(function() {
|
||||
var id = $(this).val();
|
||||
if ($.inArray(id, parentList) == -1) {
|
||||
$.ajax({
|
||||
url: url + '&a=get_icon&id=' + id + '&sequence_id='+sequenceId,
|
||||
success: function (data) {
|
||||
$('#parents').append(data);
|
||||
parentList.push(id);
|
||||
}
|
||||
});
|
||||
}
|
||||
});
|
||||
});
|
||||
|
||||
// Button save
|
||||
$('button[name="save_resource"]').click(function(e) {
|
||||
e.preventDefault();
|
||||
|
||||
if (!sequenceId) {
|
||||
return;
|
||||
}
|
||||
|
||||
var self = $(this).prop('disabled', true);
|
||||
|
||||
// parse to integer the parents IDs
|
||||
parentList = parentList.map(function(id) {
|
||||
return parseInt(id);
|
||||
});
|
||||
|
||||
var deletingVertex = new Array();
|
||||
|
||||
// Delete all vertex confirmed to be deleted.
|
||||
$('#parents .parent.parent-deleted').each(function() {
|
||||
var self = $(this),
|
||||
vertexId = self.data('id') || 0,
|
||||
deleteVertex;
|
||||
|
||||
deleteVertex = $.ajax(url, {
|
||||
data: {
|
||||
a: 'delete_vertex',
|
||||
id: resourceId,
|
||||
vertex_id: vertexId,
|
||||
sequence_id: sequenceId
|
||||
},
|
||||
success: function() {
|
||||
parentList.splice($.inArray(vertexId, parentList), 1);
|
||||
}
|
||||
});
|
||||
|
||||
deletingVertex.push(deleteVertex);
|
||||
});
|
||||
|
||||
$.when.apply($, deletingVertex).done(function() {
|
||||
if (resourceId != 0) {
|
||||
var params = decodeURIComponent(parentList);
|
||||
|
||||
var savingResource = $.ajax(url, {
|
||||
data: {
|
||||
a: 'save_resource',
|
||||
id: resourceId,
|
||||
parents: params,
|
||||
sequence_id: sequenceId
|
||||
}
|
||||
});
|
||||
|
||||
$.when(savingResource).done(function(response) {
|
||||
$('#global-modal')
|
||||
.find('.modal-dialog')
|
||||
.removeClass('modal-lg')
|
||||
.addClass('modal-sm');
|
||||
$('#global-modal')
|
||||
.find('.modal-body')
|
||||
.html(response);
|
||||
$('#global-modal').modal('show');
|
||||
|
||||
self.prop('disabled', false);
|
||||
|
||||
useAsReference(sequenceId);
|
||||
});
|
||||
}
|
||||
});
|
||||
});
|
||||
|
||||
$('select#sequence_id').on('change', function() {
|
||||
sequenceId = $(this).val();
|
||||
|
||||
if (sequenceId > 0) {
|
||||
$('#sequence-title').text(
|
||||
$(this).children(':selected').text()
|
||||
);
|
||||
$('#sequence_name').text(
|
||||
$(this).children(':selected').text()
|
||||
);
|
||||
$('#show_graph').html('');
|
||||
$('#pnl-configuration').show();
|
||||
$('#pnl-preview').hide();
|
||||
$('button[name="set_requirement"], #requirements, button[name="save_resource"]').prop('disabled', true);
|
||||
$('#item, button[name="use_as_reference"]').prop('disabled', false);
|
||||
|
||||
return;
|
||||
}
|
||||
|
||||
$('#pnl-configuration').hide();
|
||||
});
|
||||
|
||||
$('form[name="frm_select_delete"]').on('submit', function (e) {
|
||||
var confirmDelete = confirm('{{ 'AreYouSureToDeleteJS'|get_lang }}');
|
||||
|
||||
if (!confirmDelete) {
|
||||
e.preventDefault();
|
||||
}
|
||||
});
|
||||
|
||||
$('select#sequence_id').trigger('change');
|
||||
});
|
||||
</script>
|
||||
<div class="panel panel-default">
|
||||
<div class="panel-body">
|
||||
<div class="section-title-sequence">{{ 'SequenceSelection' | get_lang }}</div>
|
||||
<div class="row">
|
||||
<div class="col-md-6">
|
||||
{{ create_sequence }}
|
||||
</div>
|
||||
<div class="col-md-6">
|
||||
{{ select_sequence }}
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div id="pnl-configuration" class="panel panel-default" style="display: none;">
|
||||
<div class="panel-body">
|
||||
<div class="section-title-sequence">{{ 'SequenceConfiguration' | get_lang }}: <b><span id="sequence_name"></span></b></div>
|
||||
<div class="row">
|
||||
{{ configure_sequence }}
|
||||
</div>
|
||||
|
||||
</div>
|
||||
</div>
|
||||
<div id="pnl-preview" class="panel panel-default" style="display: none;">
|
||||
<div class="panel-body">
|
||||
<div class="section-title-sequence">{{ 'SequencePreview' | get_lang }} —
|
||||
<span id="sequence-title"></span>
|
||||
</div>
|
||||
<div class="row">
|
||||
<div class="col-md-9">
|
||||
<h4 class="title-sequence">
|
||||
{{ 'ItemsTheReferenceDependsOn' | get_lang }}
|
||||
</h4>
|
||||
<div id="parents">
|
||||
</div>
|
||||
<div class="border-sequence">
|
||||
<div class="arrow-sequence"></div>
|
||||
</div>
|
||||
<h4 class="title-sequence">{{ 'Item' | get_lang }}</h4>
|
||||
<div id="resource">
|
||||
</div>
|
||||
<div class="border-sequence">
|
||||
<div class="arrow-sequence"></div>
|
||||
</div>
|
||||
<h4 class="title-sequence">{{ 'Dependencies' | get_lang }}</h4>
|
||||
<div id="children">
|
||||
</div>
|
||||
|
||||
</div>
|
||||
<div class="col-md-3">
|
||||
<h4 class="title-sequence">{{ 'GraphDependencyTree' | get_lang }}</h4>
|
||||
<div id="show_graph"></div>
|
||||
</div>
|
||||
|
||||
</div>
|
||||
{{ save_sequence }}
|
||||
</div>
|
||||
</div>
|
||||
{% endblock %}
|
||||
137
main/template/default/admin/settings_index.tpl
Normal file
137
main/template/default/admin/settings_index.tpl
Normal file
@@ -0,0 +1,137 @@
|
||||
{% set admin_chamilo_announcements_disable = 'admin_chamilo_announcements_disable'|api_get_configuration_value %}
|
||||
|
||||
<script>
|
||||
$(document).ready(function () {
|
||||
|
||||
setTimeout(function(){
|
||||
$.ajax({
|
||||
url: '{{ web_admin_ajax_url }}?a=version',
|
||||
success: function (version) {
|
||||
$(".admin-block-version").html(version);
|
||||
}
|
||||
});
|
||||
}, 3000);
|
||||
|
||||
{% if _u.is_admin %}
|
||||
(function (CKEDITOR) {
|
||||
CKEDITOR.replace('extra_content');
|
||||
|
||||
var extraContentEditor = CKEDITOR.instances.extra_content;
|
||||
|
||||
$('button.admin-edit-block').on('click', function (e) {
|
||||
e.preventDefault();
|
||||
|
||||
var $self = $(this);
|
||||
|
||||
var extraContent = $.ajax('{{ _p.web_ajax }}admin.ajax.php', {
|
||||
type: 'post',
|
||||
data: {
|
||||
a: 'get_extra_content',
|
||||
block: $self.data('id')
|
||||
}
|
||||
});
|
||||
|
||||
$.when(extraContent).done(function (content) {
|
||||
extraContentEditor.setData(content);
|
||||
$('#extra-block').val($self.data('id'));
|
||||
$('#modal-extra-title').text($self.data('label'));
|
||||
|
||||
$('#modal-extra').modal('show');
|
||||
});
|
||||
});
|
||||
})(window.CKEDITOR);
|
||||
|
||||
{% if not admin_chamilo_announcements_disable %}
|
||||
$
|
||||
.ajax('{{ web_admin_ajax_url }}?a=get_latest_news')
|
||||
.then(function (response) {
|
||||
if (!response.length) {
|
||||
return;
|
||||
}
|
||||
|
||||
$('#chamilo-news').show(150);
|
||||
$('#chamilo-news-content').html(response);
|
||||
});
|
||||
{% endif %}
|
||||
{% endif %}
|
||||
});
|
||||
</script>
|
||||
|
||||
<section id="settings" class="row">
|
||||
{% set columns = 2 %}
|
||||
{% for block_item in blocks %}
|
||||
{% if block_item.items %}
|
||||
<div id="tabs-{{ loop.index }}" class="settings-block col-md-6">
|
||||
<div class="panel panel-default {{ block_item.class }}">
|
||||
<div class="panel-heading">
|
||||
{{ block_item.icon }} {{ block_item.label }}
|
||||
{% if block_item.editable and _u.is_admin %}
|
||||
<button type="button" class="btn btn-link btn-sm admin-edit-block pull-right"
|
||||
data-label="{{ block_item.label }}" data-id="{{ block_item.class }}">
|
||||
<img src="{{ "edit.png"|icon(22) }}" width="22" height="22" alt="{{ "Edit"|get_lang }}"
|
||||
title="{{ "Edit"|get_lang }}"/>
|
||||
</button>
|
||||
{% endif %}
|
||||
</div>
|
||||
<div class="panel-body">
|
||||
<div style="display: block;">
|
||||
{{ block_item.search_form }}
|
||||
</div>
|
||||
{% if block_item.items is not null %}
|
||||
<div class="block-items-admin">
|
||||
<ul class="list-items-admin">
|
||||
{% for url in block_item.items %}
|
||||
<li{% if url.class %} class="{{ url.class }}"{% endif %}>
|
||||
<a href="{{ url.url }}">
|
||||
{{ url.label }}
|
||||
</a>
|
||||
</li>
|
||||
{% endfor %}
|
||||
</ul>
|
||||
</div>
|
||||
{% endif %}
|
||||
|
||||
{% if block_item.extra is not null %}
|
||||
<div>
|
||||
{{ block_item.extra }}
|
||||
</div>
|
||||
{% endif %}
|
||||
|
||||
{% if block_item.extraContent %}
|
||||
<div>{{ block_item.extraContent }}</div>
|
||||
{% endif %}
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
{% endif %}
|
||||
{% endfor %}
|
||||
</section>
|
||||
|
||||
{% if not admin_chamilo_announcements_disable %}
|
||||
<section id="chamilo-news" style="display: none;">
|
||||
<div class="alert alert-info">
|
||||
<button type="button" class="close" data-dismiss="alert" aria-label="Close">
|
||||
<span aria-hidden="true">×</span>
|
||||
</button>
|
||||
<div id="chamilo-news-content"></div>
|
||||
</div>
|
||||
</section>
|
||||
{% endif %}
|
||||
|
||||
{% if _u.is_admin %}
|
||||
<div class="modal fade" id="modal-extra">
|
||||
<div class="modal-dialog">
|
||||
<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">×</span>
|
||||
</button>
|
||||
<h4 class="modal-title" id="modal-extra-title">{{ 'Blocks'|get_lang }}</h4>
|
||||
</div>
|
||||
<div class="modal-body">
|
||||
{{ extraDataForm }}
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
{% endif %}
|
||||
47
main/template/default/admin/skill.tpl
Normal file
47
main/template/default/admin/skill.tpl
Normal file
@@ -0,0 +1,47 @@
|
||||
<h3>{{ 'Skills' | get_lang }}</h3>
|
||||
<ul>
|
||||
<li>
|
||||
<a href="{{ _p.web_main }}{{ 'admin/skill_profile.php' }}">
|
||||
{{ 'SkillLevelProfiles' | get_lang }}
|
||||
</a>
|
||||
</li>
|
||||
<li>
|
||||
<a href="{{ _p.web_main }}{{ 'admin/skill_level.php' }}">
|
||||
{{ 'SkillLevels' | get_lang }}
|
||||
</a>
|
||||
</li>
|
||||
</ul>
|
||||
|
||||
{{ form }}
|
||||
<table class="table table-hover table-striped data_table">
|
||||
<tr>
|
||||
<th>
|
||||
{{ 'Name' | get_lang }}
|
||||
</th>
|
||||
<th>
|
||||
{{ 'Profile' | get_lang }}
|
||||
</th>
|
||||
<th>
|
||||
{{ 'Actions' | get_lang }}
|
||||
</th>
|
||||
</tr>
|
||||
{% for item in list %}
|
||||
<tr>
|
||||
<td>
|
||||
{{ item.name }}
|
||||
{% if item.shortCode %}
|
||||
({{ item.shortCode }})
|
||||
{% endif %}
|
||||
</td>
|
||||
<td>
|
||||
{{ item.profile }}
|
||||
</td>
|
||||
<td>
|
||||
<a href="{{ _p.web_main }}admin/skill.php?action=edit&id={{ item.id }}">
|
||||
<img src="{{ 'edit.png'|icon(22) }}">
|
||||
</a>
|
||||
</td>
|
||||
</tr>
|
||||
|
||||
{% endfor %}
|
||||
</table>
|
||||
25
main/template/default/admin/skill_level.tpl
Normal file
25
main/template/default/admin/skill_level.tpl
Normal file
@@ -0,0 +1,25 @@
|
||||
{{ form }}
|
||||
|
||||
<table class="table table-hover table-striped data_table">
|
||||
<tr>
|
||||
<th>{{ 'Name' | get_lang }}</th>
|
||||
<th>{{ 'ShortName' | get_lang }}</th>
|
||||
<th>{{ 'Profile' | get_lang }}</th>
|
||||
<th>{{ 'Actions' | get_lang }}</th>
|
||||
</tr>
|
||||
{% for item in list %}
|
||||
<tr>
|
||||
<td>{{ item.name }}</td>
|
||||
<td>{{ item.shortName }}</td>
|
||||
<td> {{ item.profile }}</td>
|
||||
<td>
|
||||
<a href="{{ _p.web_main }}admin/skill_level.php?action=edit&id={{ item.id }}">
|
||||
<img src="{{ 'edit.png'|icon(22) }}">
|
||||
</a>
|
||||
<a href="{{ _p.web_main }}admin/skill_level.php?action=delete&id={{ item.id }}">
|
||||
<img src="{{ 'delete.png'|icon(22) }}">
|
||||
</a>
|
||||
</td>
|
||||
</tr>
|
||||
{% endfor %}
|
||||
</table>
|
||||
54
main/template/default/admin/skill_profile.tpl
Normal file
54
main/template/default/admin/skill_profile.tpl
Normal file
@@ -0,0 +1,54 @@
|
||||
{{ form }}
|
||||
|
||||
<table class="table table-hover table-striped data_table">
|
||||
<tr>
|
||||
<th>{{ 'Name' | get_lang }}</th>
|
||||
<th>{{ 'SkillLevel' | get_lang }}</th>
|
||||
<th>{{ 'Actions' | get_lang }}</th>
|
||||
</tr>
|
||||
{% for item in list %}
|
||||
<tr>
|
||||
<td>
|
||||
{{ item.name }}
|
||||
</td>
|
||||
<td>
|
||||
<ul>
|
||||
{% for level in item.levels %}
|
||||
<li>
|
||||
{{ level }}
|
||||
|
||||
{% if loop.first %}
|
||||
<img src="{{ 'up_na.png'|icon(22) }}">
|
||||
{% else %}
|
||||
<a href="{{ _p.web_main }}admin/skill_profile.php?action=move_up&level_id={{ level.id }}&id={{ item.id }}">
|
||||
<img src="{{ 'up.png'|icon(22) }}">
|
||||
</a>
|
||||
{% endif %}
|
||||
|
||||
{% if loop.last %}
|
||||
<img src="{{ 'down_na.png'|icon(22) }}">
|
||||
{% else %}
|
||||
<a href="{{ _p.web_main }}admin/skill_profile.php?action=move_down&level_id={{ level.id }}&id={{ item.id }}">
|
||||
<img src="{{ 'down.png'|icon(22) }}">
|
||||
</a>
|
||||
{% endif %}
|
||||
</li>
|
||||
{% endfor %}
|
||||
</ul>
|
||||
</td>
|
||||
<td>
|
||||
<a href="{{ _p.web_main }}admin/skill_profile.php?action=edit&id={{ item.id }}">
|
||||
<img src="{{ 'edit.png'|icon(22) }}" alt="{{ 'Edit' | get_lang }}" title="{{ 'Edit' | get_lang }}"> </a>
|
||||
|
||||
<a href="{{ _p.web_main }}admin/skill_profile.php?action=delete&id={{ item.id }}">
|
||||
<img src="{{ 'delete.png'|icon(22) }}" alt="{{ 'Delete' | get_lang }}" title="{{ 'Delete' | get_lang }}">
|
||||
</a>
|
||||
|
||||
<a href="{{ _p.web_main }}admin/skill_level.php?action=add&profile_id={{ item.id }}">
|
||||
<img src="{{ 'add.png'|icon(22) }}" alt="{{ 'AddLevel' | get_lang }}" title="{{ 'AddLevel' | get_lang }}">
|
||||
</a>
|
||||
</td>
|
||||
</tr>
|
||||
{% endfor %}
|
||||
|
||||
</table>
|
||||
53
main/template/default/admin/teacher_time_report.tpl
Normal file
53
main/template/default/admin/teacher_time_report.tpl
Normal file
@@ -0,0 +1,53 @@
|
||||
<script>
|
||||
$(function () {
|
||||
$('#course').on('change', function () {
|
||||
$('#session').prop('selectedIndex', 0);
|
||||
$('#teacher').prop('selectedIndex', 0);
|
||||
});
|
||||
|
||||
$('#session').on('change', function () {
|
||||
$('#course').prop('selectedIndex', 0);
|
||||
$('#teacher').prop('selectedIndex', 0);
|
||||
});
|
||||
|
||||
$('#teacher').on('change', function () {
|
||||
$('#course').prop('selectedIndex', 0);
|
||||
$('#session').prop('selectedIndex', 0);
|
||||
});
|
||||
|
||||
$('#daterange').on('apply.daterangepicker', function (ev, picker) {
|
||||
$('[name="from"]').val(picker.startDate.format('YYYY-MM-DD'));
|
||||
$('[name="until"]').val(picker.endDate.format('YYYY-MM-DD'));
|
||||
}).on('cancel.daterangepicker', function (ev, picker) {
|
||||
$('#daterange, [name="from"], [name="until"]').val('');
|
||||
});
|
||||
});
|
||||
</script>
|
||||
|
||||
{{ form }}
|
||||
<h3 class="page-header">{{ report_title }} <small>{{ report_sub_title }}</small></h3>
|
||||
|
||||
<table class="table">
|
||||
<thead>
|
||||
<tr>
|
||||
{% if with_filter %}
|
||||
<th>{{ 'Session' | get_lang }}</th>
|
||||
<th>{{ 'Course' | get_lang }}</th>
|
||||
{% endif %}
|
||||
<th>{{ 'Coach' | get_lang }}</th>
|
||||
<th class="text-center">{{ 'TotalTime' | get_lang }}</th>
|
||||
</tr>
|
||||
</thead>
|
||||
<tbody>
|
||||
{% for row in rows %}
|
||||
<tr>
|
||||
{% if with_filter %}
|
||||
<td>{{ row.session ? row.session.name : ' ' }}</td>
|
||||
<td>{{ row.course.name }}</td>
|
||||
{% endif %}
|
||||
<td>{{ row.coach.complete_name }} ({{ row.coach.username}})</td>
|
||||
<td class="text-center">{{ row.total_time }}</td>
|
||||
</tr>
|
||||
{% endfor %}
|
||||
</tbody>
|
||||
</table>
|
||||
@@ -0,0 +1,73 @@
|
||||
{{ form }}
|
||||
|
||||
{% if session %}
|
||||
<h3 class="page-header">{{ session.name }}</h3>
|
||||
<div class="table-responsive">
|
||||
<table class="table table-hover table-striped">
|
||||
<thead>
|
||||
<tr>
|
||||
<th>{{ 'OfficialCode'|get_lang }}</th>
|
||||
<th>{{ 'CoachName'|get_lang }}</th>
|
||||
<th>{{ 'TimeSpentOnThePlatform'|get_lang }}</th>
|
||||
<th>{{ 'FirstLoginInPlatform'|get_lang }}</th>
|
||||
<th>{{ 'LatestLoginInPlatform'|get_lang }}</th>
|
||||
|
||||
{% for course_code in courses %}
|
||||
<th>{{ course_code }}</th>
|
||||
<th>{{ 'NumberOfWorks'|get_lang }}</th>
|
||||
<th>{{ 'LastWork'|get_lang }}</th>
|
||||
<th>{{ 'TimeReportForCourseX'|get_lang|format(course_code) }}</th>
|
||||
{% endfor %}
|
||||
</tr>
|
||||
</thead>
|
||||
<tbody>
|
||||
{% for user in users %}
|
||||
<tr>
|
||||
{% for data in user %}
|
||||
<td>{{ data }}</td>
|
||||
{% endfor %}
|
||||
</tr>
|
||||
{% endfor %}
|
||||
</tbody>
|
||||
</table>
|
||||
</div>
|
||||
|
||||
{% for row in data %}
|
||||
<div class="table-responsive">
|
||||
<table class="table table-hover table-striped">
|
||||
<thead>
|
||||
<tr>
|
||||
<th>{{ 'OfficialCode'|get_lang }}</th>
|
||||
<th>{{ 'Name'|get_lang }}</th>
|
||||
<th>{{ 'TimeSpentOnThePlatform'|get_lang }}</th>
|
||||
<th>{{ 'FirstLoginInPlatform'|get_lang }}</th>
|
||||
<th>{{ 'LatestLoginInPlatform'|get_lang }}</th>
|
||||
|
||||
{% for course in row.courses %}
|
||||
<th>{{ course.code }}</th>
|
||||
<th>{{ 'NumberOfWorks'|get_lang }}</th>
|
||||
<th>{{ 'LastWork'|get_lang }}</th>
|
||||
<th>{{ 'TimeReportForCourseX'|get_lang|format(course_code) }}</th>
|
||||
{% endfor %}
|
||||
</tr>
|
||||
</thead>
|
||||
<tbody>
|
||||
<tr>
|
||||
<td>{{ row.code }}</td>
|
||||
<td>{{ row.complete_name }}</td>
|
||||
<td>{{ row.time_in_platform }}</td>
|
||||
<td>{{ row.first_connection }}</td>
|
||||
<td>{{ row.last_connection }}</td>
|
||||
|
||||
{% for course in row.courses %}
|
||||
<td>{{ course.number_of_students }}</td>
|
||||
<td>{{ course.number_of_works }}</td>
|
||||
<td>{{ course.last_work }}</td>
|
||||
<td>{{ course.time_spent_of_course }}</td>
|
||||
{% endfor %}
|
||||
</tr>
|
||||
</tbody>
|
||||
</table>
|
||||
</div>
|
||||
{% endfor %}
|
||||
{% endif %}
|
||||
29
main/template/default/admin/user_information.tpl
Normal file
29
main/template/default/admin/user_information.tpl
Normal file
@@ -0,0 +1,29 @@
|
||||
{% import 'default/macro/macro.tpl' as display %}
|
||||
|
||||
<div class="details">
|
||||
<div class="row">
|
||||
<div class="col-md-4">
|
||||
{{ display.panel('', display.reporting_user_box(user), '') }}
|
||||
</div>
|
||||
<div class="col-md-8">
|
||||
<div class="list-card">
|
||||
{{ display.card_widget('FirstLoginInPlatform'|get_lang, user.first_connection, 'calendar') }}
|
||||
{{ display.card_widget('LatestLoginInPlatform'|get_lang, user.last_connection, 'calendar') }}
|
||||
{{ display.card_widget('LatestLoginInAnyCourse'|get_lang, user.last_connection_in_course, 'calendar') }}
|
||||
{% if user.legal %}
|
||||
{{ display.card_widget('LegalAccepted'|get_lang, user.legal.datetime, 'gavel', user.legal.icon) }}
|
||||
{% endif %}
|
||||
</div>
|
||||
{% if social_tool %}
|
||||
<div class="list-box-widget">
|
||||
{{ display.box_widget('Friends'|get_lang, user.social.friends, 'users') }}
|
||||
{{ display.box_widget('InvitationSent'|get_lang, user.social.invitation_sent, 'paper-plane') }}
|
||||
{{ display.box_widget('InvitationReceived'|get_lang, user.social.invitation_received, 'smile-o') }}
|
||||
{{ display.box_widget('WallMessagesPosted'|get_lang, user.social.messages_posted, 'comments') }}
|
||||
{{ display.box_widget('MessagesSent'|get_lang, user.social.messages_sent, 'envelope') }}
|
||||
{{ display.box_widget('MessagesReceived'|get_lang, user.social.message_received, 'envelope-open-o') }}
|
||||
</div>
|
||||
{% endif %}
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
Reference in New Issue
Block a user