Use configuration template

pull/2487/head
jmontoyaa 9 years ago
parent 38a1525e83
commit 0ce264055e
  1. 4
      main/admin/skill.php
  2. 4
      main/admin/skill_badge.php
  3. 5
      main/admin/skill_badge_create.php
  4. 4
      main/admin/skill_badge_list.php
  5. 4
      main/admin/skill_level.php
  6. 4
      main/admin/skill_list.php
  7. 4
      main/admin/skill_profile.php
  8. 4
      main/admin/skills.php
  9. 5
      main/admin/skills_profile.php
  10. 4
      main/admin/skills_wheel.php
  11. 27
      main/admin/teacher_time_report.php
  12. 8
      main/calendar/agenda_js.php
  13. 7
      main/calendar/agenda_list.php
  14. 3
      main/coursecopy/import_moodle.php
  15. 4
      main/document/recycle.php
  16. 4
      main/exercise/admin.php
  17. 3
      main/exercise/exercise_submit.php
  18. 60
      main/gradebook/certificate_report.php
  19. 5
      main/gradebook/my_certificates.php
  20. 4
      main/gradebook/search.php
  21. 1
      main/inc/lib/javascript/ckeditor/config_js.php
  22. 3
      main/lp/lp_impress.php
  23. 5
      main/lp/lp_list.php
  24. 1
      main/mySpace/index.php
  25. 18
      main/social/my_skills_report.php
  26. 116
      main/template/default/admin/teacher_time_report.tpl
  27. 96
      main/template/default/gradebook/certificate_report.tpl
  28. 1
      main/template/default/javascript/editor/ckeditor/config_js.tpl
  29. 502
      main/template/default/learnpath/view.tpl
  30. 4
      main/template/default/skill/student_boss_report.tpl

@ -88,7 +88,7 @@ switch ($action) {
}
$tpl->assign('list', $list);
$contentTemplate = $tpl->fetch('default/admin/skill.tpl');
$view = $tpl->get_template('admin/skill.tpl');
$contentTemplate = $tpl->fetch($view);
$tpl->assign('content', $contentTemplate);
$tpl->display_one_col_template();

@ -38,7 +38,9 @@ $toolbar = Display::toolbarButton(
$tpl = new Template(get_lang('Badges'));
$tpl->assign('backpack', $backpack);
$contentTemplate = $tpl->fetch('default/skill/badge.tpl');
$templateName = $tpl->get_template('skill/badge.tpl');
$contentTemplate = $tpl->fetch($templateName);
$tpl->assign('actions', $toolbar);
$tpl->assign('content', $contentTemplate);

@ -120,9 +120,8 @@ $tpl = new Template(get_lang('CreateBadge'));
$tpl->assign('platformAdminEmail', api_get_setting('emailAdministrator'));
$tpl->assign('skill', $skill);
$tpl->assign('badge_studio', $badgeStudio);
$contentTemplate = $tpl->fetch('default/skill/badge_create.tpl');
$templateName = $tpl->get_template('skill/badge_create.tpl');
$contentTemplate = $tpl->fetch($templateName);
$tpl->assign('actions', $toolbar);
$tpl->assign('content', $contentTemplate);
$tpl->display_one_col_template();

@ -50,8 +50,8 @@ $toolbar = Display::toolbarButton(
$tpl = new Template(get_lang('Skills'));
$tpl->assign('errorMessage', $errorMessage);
$tpl->assign('skills', $skills);
$contentTemplate = $tpl->fetch('default/skill/badge_list.tpl');
$templateName = $tpl->get_template('skill/badge_list.tpl');
$contentTemplate = $tpl->fetch($templateName);
$tpl->assign('actions', $toolbar);
$tpl->assign('content', $contentTemplate);

@ -106,7 +106,7 @@ switch ($action) {
}
$tpl->assign('list', $list);
$contentTemplate = $tpl->fetch('default/admin/skill_level.tpl');
$templateName = $tpl->get_template('admin/skill_level.tpl');
$contentTemplate = $tpl->fetch($templateName);
$tpl->assign('content', $contentTemplate);
$tpl->display_one_col_template();

@ -176,8 +176,8 @@ switch ($action) {
$tpl->assign('skills', $skillList);
$tpl->assign('current_tag_id', $extraFieldSearchTagId);
$tpl->assign('tags', $tags);
$content = $tpl->fetch('default/skill/list.tpl');
$templateName = $tpl->get_template('skill/list.tpl');
$content = $tpl->fetch($templateName);
$tpl->assign('actions', $toolbar);
$tpl->assign('content', $content);

@ -116,7 +116,7 @@ switch ($action) {
}
$tpl->assign('list', $list);
$contentTemplate = $tpl->fetch('default/admin/skill_profile.tpl');
$templateName = $tpl->get_template('admin/skill_profile.tpl');
$contentTemplate = $tpl->fetch($templateName);
$tpl->assign('content', $contentTemplate);
$tpl->display_one_col_template();

@ -35,7 +35,7 @@ $tpl->assign('url', $url);
$tpl->assign('html', $html);
$tpl->assign('skill_visualizer', $skill_visualizer);
$tpl->assign('js', $skill_visualizer->return_js());
$content = $tpl->fetch('default/skill/skill_tree.tpl');
$templateName = $tpl->get_template('skill/skill_tree.tpl');
$content = $tpl->fetch($templateName);
$tpl->assign('content', $content);
$tpl->display_no_layout_template();

@ -143,9 +143,10 @@ foreach ($total_skills_to_search as $skill_info) {
$tpl->assign('skill_list', $skill_list);
$tpl->assign('search_skill_list', $skills);
$form_to_html = $form->return_form();
$form_to_html = $form->returnForm();
$tpl->assign('form', $form_to_html);
$tpl->assign('url', $url);
$content = $tpl->fetch('default/skill/profile.tpl');
$templateName = $tpl->get_template('skill/profile.tpl');
$content = $tpl->fetch($templateName);
$tpl->assign('content', $content);
$tpl->display_one_col_template();

@ -70,7 +70,7 @@ $saveProfileForm->addHidden('profile_id', null);
$saveProfileForm->addText('name', get_lang('Name'), true, ['id' => 'name_profile']);
$saveProfileForm->addTextarea('description', get_lang('Description'), ['id' => 'description_profile', 'rows' => 6]);
$tpl->assign('saveProfileForm', $saveProfileForm->returnForm());
$content = $tpl->fetch('default/skill/skill_wheel.tpl');
$templateName = $tpl->get_template('skill/skill_wheel.tpl');
$content = $tpl->fetch($templateName);
$tpl->assign('content', $content);
$tpl->display_no_layout_template();

@ -368,25 +368,22 @@ $form->setDefaults([
]);
$tpl = new Template($toolName);
$tpl->assign('reportTitle', $reportTitle);
$tpl->assign('reportSubTitle', $reportSubTitle);
$tpl->assign('selectedCourse', $selectedCourse);
$tpl->assign('selectedSession', $selectedSession);
$tpl->assign('selectedTeacher', $selectedTeacher);
$tpl->assign('selectedFrom', $selectedFrom);
$tpl->assign('selectedUntil', $selectedUntil);
$tpl->assign('withFilter', $withFilter);
$tpl->assign('report_title', $reportTitle);
$tpl->assign('report_sub_title', $reportSubTitle);
$tpl->assign('selected_course', $selectedCourse);
$tpl->assign('selected_session', $selectedSession);
$tpl->assign('selected_teacher', $selectedTeacher);
$tpl->assign('selected_from', $selectedFrom);
$tpl->assign('selected_until', $selectedUntil);
$tpl->assign('with_filter', $withFilter);
$tpl->assign('courses', $courseList);
$tpl->assign('sessions', $sessionsList);
$tpl->assign('courseCoaches', $teacherList);
//$tpl->assign('courseCoaches', $teacherList);
$tpl->assign('form', $form->returnForm());
$tpl->assign('rows', $timeReport->data);
$contentTemplate = $tpl->fetch('default/admin/teacher_time_report.tpl');
$templateName = $tpl->get_template('admin/teacher_time_report.tpl');
$contentTemplate = $tpl->fetch($templateName);
$tpl->assign('content', $contentTemplate);
$tpl->display_one_col_template();

@ -246,11 +246,7 @@ if ($agenda->type === 'course') {
}
$tpl->assign('form_add', $form->returnForm());
// Loading Agenda template.
$content = $tpl->fetch('default/agenda/month.tpl');
$templateName = $tpl->get_template('agenda/month.tpl');
$content = $tpl->fetch($templateName);
$tpl->assign('content', $content);
// Loading main Chamilo 1 col template
$tpl->display_one_col_template();

@ -79,10 +79,7 @@ if (api_is_allowed_to_edit()) {
}
}
// Loading Agenda template
$content = $tpl->fetch('default/agenda/event_list.tpl');
$templateName = $tpl->get_template('agenda/event_list.tpl');
$content = $tpl->fetch($templateName);
$tpl->assign('content', $content);
// Loading main Chamilo 1 col template
$tpl->display_one_col_template();

@ -59,7 +59,8 @@ $template = new Template($templateName);
$infoMsg = Display::return_message(get_lang('ImportFromMoodleInstructions'), 'normal', false);
$template->assign('info_msg', $infoMsg);
$template->assign('form', $form->returnForm());
$content = $template->fetch('default/coursecopy/import_moodle.tpl');
$templateName = $template->get_template('coursecopy/import_moodle.tpl');
$content = $template->fetch($templateName);
$template->assign('header', $templateName);
$template->assign('content', $content);

@ -58,8 +58,8 @@ $template = new Template(get_lang('DeletedDocuments'));
$template->assign('files', $files);
$template->assign('actions', $actions);
$template->assign('web_cid_query', api_get_cidreq());
$content = $template->fetch('default/document/recycle.tpl');
$templateName = $template->get_template('document/recycle.tpl');
$content = $template->fetch($templateName);
$template->assign('content', $content);
$template->display_one_col_template();

@ -340,8 +340,8 @@ $htmlHeadXtra[] = api_get_js('jqueryui-touch-punch/jquery.ui.touch-punch.min.js'
$htmlHeadXtra[] = api_get_js('jquery.jsPlumb.all.js');
$template = new Template();
$htmlHeadXtra[] = $template->fetch('default/exercise/submit.js.tpl');
$templateName = $template->get_template('exercise/submit.js.tpl');
$htmlHeadXtra[] = $template->fetch($templateName);
$htmlHeadXtra[] = api_get_js('d3/jquery.xcolor.js');
$htmlHeadXtra[] = '<link rel="stylesheet" href="' . api_get_path(WEB_LIBRARY_JS_PATH) . 'hotspot/css/hotspot.css">';

@ -156,7 +156,8 @@ if ($objExercise->review_answers) {
}
$template->assign('shuffle_answers', $objExercise->random_answers);
$htmlHeadXtra[] = $template->fetch('default/exercise/submit.js.tpl');
$templateName = $template->get_template('exercise/submit.js.tpl');
$htmlHeadXtra[] = $template->fetch($templateName);
$current_timestamp = time();
$my_remind_list = array();

@ -30,7 +30,7 @@ $selectedStudent = isset($_POST['student']) && !empty($_POST['student']) ? intva
$userId = api_get_user_id();
$sessions = $courses = $months = $students = [0 => get_lang('Select')];
$userList = [];
if (api_is_student_boss()) {
$userGroup = new UserGroup();
$userList = $userGroup->getGroupUsersByUser($userId);
@ -45,7 +45,7 @@ foreach ($sessionsList as $session) {
if ($selectedSession > 0) {
if (!SessionManager::isValidId($selectedSession)) {
Session::write('reportErrorMessage', get_lang('NoSession'));
Display::addFlash(Display::return_message(get_lang('NoSession')));
header("Location: $selfUrl");
exit;
@ -88,7 +88,6 @@ for ($key = 1; $key <= 12; $key++) {
$exportAllLink = null;
$certificateStudents = array();
$searchSessionAndCourse = $selectedSession > 0 && $selectedCourse > 0;
$searchCourseOnly = $selectedSession <= 0 && $selectedCourse > 0;
$searchStudentOnly = $selectedStudent > 0;
@ -97,7 +96,7 @@ if ($searchSessionAndCourse || $searchCourseOnly) {
$selectedCourseInfo = api_get_course_info_by_id($selectedCourse);
if (empty($selectedCourseInfo)) {
Session::write('reportErrorMessage', get_lang('NoCourse'));
Display::addFlash(Display::return_message(get_lang('NoCourse')));
header("Location: $selfUrl");
exit;
@ -186,7 +185,7 @@ if ($searchSessionAndCourse || $searchCourseOnly) {
$selectedStudentInfo = api_get_user_info($selectedStudent);
if (empty($selectedStudentInfo)) {
Session::write('reportErrorMessage', get_lang('NoUser'));
Display::addFlash(Display::return_message(get_lang('NoUser')));
header('Location: '.$selfUrl);
exit;
@ -244,32 +243,34 @@ if ($searchSessionAndCourse || $searchCourseOnly) {
/* View */
$template = new Template(get_lang('GradebookListOfStudentsCertificates'));
if (Session::has('reportErrorMessage')) {
$template->assign('errorMessage', Session::read('reportErrorMessage'));
}
$searchBySessionCourseDateForm = new FormValidator(
$form = new FormValidator(
'certificate_report_form',
'post',
api_get_path(WEB_CODE_PATH) . 'gradebook/certificate_report.php'
);
$searchBySessionCourseDateForm->addSelect('session', get_lang('Sessions'), $sessions, ['id' => 'session']);
$searchBySessionCourseDateForm->addSelect('course', get_lang('Courses'), $courses, ['id' => 'course']);
$searchBySessionCourseDateForm->addGroup(
$form->addSelect('session', get_lang('Sessions'), $sessions, ['id' => 'session']);
$form->addSelect('course', get_lang('Courses'), $courses, ['id' => 'course']);
$form->addGroup(
[
$searchBySessionCourseDateForm->createElement('select', 'month', null, $months, ['id' => 'month']),
$searchBySessionCourseDateForm->createElement(
$form->createElement(
'select',
'month',
null,
$months,
['id' => 'month']
),
$form->createElement(
'text',
'year',
null,
['id' => 'year', 'placeholder' => get_lang('Year')]
)
),
],
null,
get_lang('Date')
);
$searchBySessionCourseDateForm->addButtonSearch();
$searchBySessionCourseDateForm->setDefaults([
$form->addButtonSearch();
$form->setDefaults([
'session' => $selectedSession,
'course' => $selectedCourse,
'month' => $selectedMonth,
@ -281,30 +282,27 @@ if (api_is_student_boss()) {
$students[$studentId] = api_get_user_info($studentId)['complete_name_with_username'];
}
$searchByStudentForm = new FormValidator(
$searchForm = new FormValidator(
'certificate_report_form',
'post',
api_get_path(WEB_CODE_PATH) . 'gradebook/certificate_report.php'
);
$searchByStudentForm->addSelect('student', get_lang('Students'), $students, ['id' => 'student']);
$searchByStudentForm->addButtonSearch();
$searchByStudentForm->setDefaults([
$searchForm->addSelect('student', get_lang('Students'), $students, ['id' => 'student']);
$searchForm->addButtonSearch();
$searchForm->setDefaults([
'student' => $selectedStudent
]);
$template->assign('searchByStudentForm', $searchByStudentForm->returnForm());
$template->assign('search_form', $searchForm->returnForm());
}
$template->assign('searchBySessionCourseDateForm', $searchBySessionCourseDateForm->returnForm());
$template->assign('search_by_session_form', $form->returnForm());
$template->assign('sessions', $sessions);
$template->assign('courses', $courses);
$template->assign('months', $months);
$template->assign('exportAllLink', $exportAllLink);
$template->assign('certificateStudents', $certificateStudents);
$content = $template->fetch("default/gradebook/certificate_report.tpl");
$template->assign('export_all_link', $exportAllLink);
$template->assign('certificate_students', $certificateStudents);
$templateName = $template->get_template('gradebook/certificate_report.tpl');
$content = $template->fetch($templateName);
$template->assign('content', $content);
$template->display_one_col_template();
Session::erase('reportErrorMessage');

@ -29,9 +29,10 @@ $template = new Template(get_lang('MyCertificates'));
$template->assign('course_list', $courseList);
$template->assign('session_list', $sessionList);
$content = $template->fetch('default/gradebook/my_certificates.tpl');
$templateName = $template->get_template('gradebook/my_certificates.tpl');
$content = $template->fetch($templateName);
if (api_get_setting('allow_public_certificates') == 'true') {
if (api_get_setting('allow_public_certificates') === 'true') {
$template->assign(
'actions',
Display::toolbarButton(

@ -76,8 +76,8 @@ $template->assign('user_list', $userList);
$template->assign('user_info', $userInfo);
$template->assign('course_list', $courseList);
$template->assign('session_list', $sessionList);
$content = $template->fetch('default/gradebook/search.tpl');
$templateName = $template->get_template('gradebook/search.tpl');
$content = $template->fetch($templateName);
$template->assign('header', get_lang('SearchCertificates'));
$template->assign('content', $content);

@ -11,7 +11,6 @@ if (api_get_setting('more_buttons_maximized_mode') === 'true') {
$template = new Template();
$template->assign('moreButtonsInMaximizedMode', $moreButtonsInMaximizedMode);
$template->assign('course_condition', api_get_cidreq());
header('Content-type: application/x-javascript');

@ -95,6 +95,7 @@ foreach ($list as $toc) {
$tool_name = get_lang('ViewModeImpress');
$tpl = new Template($tool_name, false, false, true);
$tpl->assign('html', $html);
$content = $tpl->fetch('default/learnpath/impress.tpl');
$templateName = $tpl->get_template('learnpath/impress.tpl');
$content = $tpl->fetch($templateName);
$tpl->assign('content', $content);
$tpl->display_one_col_template();

@ -816,9 +816,8 @@ $template->assign('message', $message);
$template->assign('introduction_section', $introductionSection);
$template->assign('data', $data);
$template->assign('lp_is_shown', $lpIsShown);
$content = $template->fetch('default/learnpath/list.tpl');
$templateName = $template->get_template('learnpath/list.tpl');
$content = $template->fetch($templateName);
$template->assign('content', $content);
$template->display_one_col_template();

@ -429,7 +429,6 @@ if ($export_csv) {
</div>';
}
// Send the csv file if asked
if ($export_csv) {
ob_end_clean();

@ -148,7 +148,18 @@ if ($isStudent) {
$skill = $objSkill->get($selectedSkill);
$reportTitle = sprintf(get_lang('StudentsWhoAchievedTheSkillX'), $skill['name']);
$students = UserManager::getUsersFollowedByUser(
$userId, STUDENT, false, false, false, null, null, null, null, null, null, DRH
$userId,
STUDENT,
false,
false,
false,
null,
null,
null,
null,
null,
null,
DRH
);
$coursesFilter = array();
@ -192,8 +203,7 @@ if ($isStudent) {
}
$tpl->assign('rows', $tableRows);
$contentTemplate = $tpl->fetch("default/" . $tplPath);
$templateName = $tpl->get_template($tplPath);
$contentTemplate = $tpl->fetch($templateName);
$tpl->assign('content', $contentTemplate);
$tpl->display_one_col_template();

@ -1,68 +1,70 @@
<script>
$(document).on('ready', function () {
$('#course').on('change', function () {
$('#session').prop('selectedIndex', 0);
$('#teacher').prop('selectedIndex', 0);
});
$(document).on('ready', 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);
});
$('#session').on('change', function () {
$('#course').prop('selectedIndex', 0);
$('#teacher').prop('selectedIndex', 0);
});
$('#teacher').on('change', function () {
$('#course').prop('selectedIndex', 0);
$('#session').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('');
});
$('#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>
<div class="col-md-12">
<div class="actions">
<a href="{{ _p.web_main }}admin/teachers_time_by_session_report.php">
{{ 'session.png'|img(32, 'Sessions'|get_lang) }}
});
</script>
<div class="col-md-12">
<div class="actions">
<a href="{{ _p.web_main }}admin/teachers_time_by_session_report.php">
{{ 'session.png'|img(32, 'Sessions'|get_lang) }}
</a>
<div class="pull-right">
<a href="{{ _p.web_self ~ '?' ~ {'export':'pdf','from':selected_from,'until':selected_until,'course':selected_course,'session':selected_session,'teacher':selected_teacher } | url_encode }}">
{{ 'pdf.png' | img(32, 'ExportToPDF'|get_lang ) }}
</a>
<a href="{{ _p.web_self ~ '?' ~ {'export':'xls','from':selected_from,'until':selected_until,'course':selected_course,'session':selected_session,'teacher':selected_teacher } | url_encode }}">
{{ 'export_excel.png' | img(32, 'ExportExcel'|get_lang ) }}
</a>
<div class="pull-right">
<a href="{{ _p.web_self ~ '?' ~ {'export':'pdf','from':selectedFrom,'until':selectedUntil,'course':selectedCourse,'session':selectedSession,'teacher':selectedTeacher}|url_encode }}">
{{ 'pdf.png' | img(32, 'ExportToPDF'|get_lang ) }}
</a>
<a href="{{ _p.web_self ~ '?' ~ {'export':'xls','from':selectedFrom,'until':selectedUntil,'course':selectedCourse,'session':selectedSession,'teacher':selectedTeacher}|url_encode }}">
{{ 'export_excel.png' | img(32, 'ExportExcel'|get_lang ) }}
</a>
</div>
</div>
</div>
<h1 class="page-header">{{ 'TeacherTimeReport' | get_lang }}</h1>
{{ form }}
<h2 class="page-header">{{ reportTitle }} <small>{{ reportSubTitle }}</small></h2>
<table class="table">
<thead>
</div>
<h1 class="page-header">{{ 'TeacherTimeReport' | get_lang }}</h1>
{{ form }}
<h2 class="page-header">{{ report_title }} <small>{{ report_sub_title }}</small></h2>
<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>{{ 'TotalTime' | get_lang }}</th>
</tr>
</thead>
<tbody>
{% for row in rows %}
<tr>
{% if withFilter %}
<th>{{ 'Session' | get_lang }}</th>
<th>{{ 'Course' | get_lang }}</th>
{% if with_filter %}
<td>{{ row.session ? row.session.name : '&nbsp' }}</td>
<td>{{ row.course.name }}</td>
{% endif %}
<th>{{ 'Coach' | get_lang }}</th>
<th>{{ 'TotalTime' | get_lang }}</th>
<td>{{ row.coach.completeName }} ({{ row.coach.username}})</td>
<td>{{ row.totalTime }}</td>
</tr>
</thead>
<tbody>
{% for row in rows %}
<tr>
{% if withFilter %}
<td>{{ row.session ? row.session.name : '&nbsp' }}</td>
<td>{{ row.course.name }}</td>
{% endif %}
<td>{{ row.coach.completeName }} ({{ row.coach.username}})</td>
<td>{{ row.totalTime }}</td>
</tr>
{% endfor %}
</tbody>
</table>
</div>
{% endfor %}
</tbody>
</table>

@ -1,48 +1,44 @@
<script>
$(document).on('ready', function () {
$('select#session').on('change', function () {
var sessionId = parseInt(this.value, 10),
$selectCourse = $('select#course');
$(document).on('ready', function () {
$('select#session').on('change', function () {
var sessionId = parseInt(this.value, 10),
$selectCourse = $('select#course');
$selectCourse.empty();
$selectCourse.empty();
$.get('{{ _p.web_main }}inc/ajax/course.ajax.php', {
a: 'display_sessions_courses',
session: sessionId
}, function (courseList) {
$('<option>', {
value: 0,
text: "{{ 'Select' | get_lang }}"
}).appendTo($selectCourse);
$.get('{{ _p.web_main }}inc/ajax/course.ajax.php', {
a: 'display_sessions_courses',
session: sessionId
}, function (courseList) {
$('<option>', {
value: 0,
text: "{{ 'Select' | get_lang }}"
}).appendTo($selectCourse);
if (courseList.length > 0) {
$.each(courseList, function (index, course) {
$('<option>', {
value: course.id,
text: course.name
}).appendTo($selectCourse);
});
}
}, 'json');
});
if (courseList.length > 0) {
$.each(courseList, function (index, course) {
$('<option>', {
value: course.id,
text: course.name
}).appendTo($selectCourse);
});
}
}, 'json');
});
});
</script>
{{ searchBySessionCourseDateForm }}
{{ search_by_session_form }}
<hr>
{{ searchByStudentForm }}
{{ search_form }}
{% if errorMessage is defined %}
<div class="alert alert-error">{{ errorMessage }}</div>
{% endif %}
{% if not certificateStudents is empty %}
{% if not certificate_students is empty %}
<h2 class="page-header">{{ "GradebookListOfStudentsCertificates" | get_lang }}</h2>
{% if not exportAllLink is null %}
{% if not export_all_link is null %}
<div class="actions">
<a href="{{ exportAllLink }}" class="btn btn-info">
<a href="{{ export_all_link }}" class="btn btn-info">
<em class="fa fa-check"></em> {{ 'ExportAllCertificatesToPDF' | get_lang }}
</a>
</div>
@ -68,23 +64,25 @@
</tr>
</tfoot>
<tbody>
{% for student in certificateStudents %}
<tr>
<td>{{ student.fullName }}</td>
<td>{{ student.sessionName }}</td>
<td>{{ student.courseName }}</td>
<td>
{% for certificate in student.certificates %}
<p>{{ certificate.createdAt }}</p>
{% endfor %}
</td>
<td>
{% for certificate in student.certificates %}
<a href="{{ _p.web }}certificates/index.php?id={{ certificate.id }}" class="btn btn-default"><em class="fa fa-floppy-o"></em> {{ 'Certificate' | get_lang }}</a>
{% endfor %}
</td>
</tr>
{% endfor %}
{% for student in certificate_students %}
<tr>
<td>{{ student.fullName }}</td>
<td>{{ student.sessionName }}</td>
<td>{{ student.courseName }}</td>
<td>
{% for certificate in student.certificates %}
<p>{{ certificate.createdAt }}</p>
{% endfor %}
</td>
<td>
{% for certificate in student.certificates %}
<a href="{{ _p.web }}certificates/index.php?id={{ certificate.id }}" class="btn btn-default">
<em class="fa fa-floppy-o"></em> {{ 'Certificate' | get_lang }}
</a>
{% endfor %}
</td>
</tr>
{% endfor %}
</tbody>
</table>
{% else %}

@ -109,6 +109,5 @@ CKEDITOR.editorConfig = function (config) {
// Allows to use "class" attribute inside divs and spans.
config.allowedContent = true;
config.contentsCss = '{{ cssEditor }}';
config.customConfig = '{{ _p.web_main ~ 'inc/lib/javascript/ckeditor/config_js.php'}}';
};

@ -4,301 +4,299 @@
{{ breadcrumb }}
</div>
{% endif %}
<div id="learning_path_left_zone" class="sidebar-scorm">
<div class="lp-view-zone-container">
<div id="scorm-info">
<div id="panel-scorm" class="panel-body">
<div class="image-avatar">
{% if lp_author == '' %}
<div class="text-center">
{{ lp_preview_image }}
</div>
{% else %}
<div class="media">
<div class="media-left">
{{ lp_preview_image }}
</div>
<div class="media-body">
<div class="description-autor"> {{ lp_author }} </div>
</div>
</div>
{% endif %}
<div id="learning_path_left_zone" class="sidebar-scorm">
<div class="lp-view-zone-container">
<div id="scorm-info">
<div id="panel-scorm" class="panel-body">
<div class="image-avatar">
{% if lp_author == '' %}
<div class="text-center">
{{ lp_preview_image }}
</div>
{% if show_audio_player %}
<div id="lp_media_file" class="audio-scorm">
{{ media_player }}
{% else %}
<div class="media">
<div class="media-left">
{{ lp_preview_image }}
</div>
<div class="media-body">
<div class="description-autor"> {{ lp_author }} </div>
</div>
{% endif %}
{% if gamification_mode == 1 %}
<!--- gamification -->
<div id="scorm-gamification">
<div class="row">
<div class="col-xs-6">
{% if gamification_stars > 0 %}
{% for i in 1..gamification_stars %}
<em class="fa fa-star level"></em>
{% endfor %}
{% endif %}
</div>
{% endif %}
</div>
{% if gamification_stars < 4 %}
{% for i in 1..4 - gamification_stars %}
<em class="fa fa-star"></em>
{% endfor %}
{% endif %}
</div>
<div class="col-xs-6 text-right">
{{ "XPoints"|get_lang|format(gamification_points) }}
</div>
</div>
<div class="row">
<div class="col-xs-12 navegation-bar">
<div id="progress_bar">
{{ progress_bar }}
</div>
</div>
</div>
{% if show_audio_player %}
<div id="lp_media_file" class="audio-scorm">
{{ media_player }}
</div>
{% endif %}
{% if gamification_mode == 1 %}
<!--- gamification -->
<div id="scorm-gamification">
<div class="row">
<div class="col-xs-6">
{% if gamification_stars > 0 %}
{% for i in 1..gamification_stars %}
<em class="fa fa-star level"></em>
{% endfor %}
{% endif %}
{% if gamification_stars < 4 %}
{% for i in 1..4 - gamification_stars %}
<em class="fa fa-star"></em>
{% endfor %}
{% endif %}
</div>
<!--- end gamification -->
{% else %}
<div id="progress_bar">
{{ progress_bar }}
<div class="col-xs-6 text-right">
{{ "XPoints"|get_lang|format(gamification_points) }}
</div>
</div>
<div class="row">
<div class="col-xs-12 navegation-bar">
<div id="progress_bar">
{{ progress_bar }}
</div>
</div>
{% endif %}
<div class="visible-xs-block movil-toolbar">
<ul class="btn-movil">
<li>
<a href="{{ button_home_url }}" class="icon-toolbar" target="_self" onclick="javascript: window.parent.API.save_asset();">
<em class="fa fa-home"></em> <span class="hidden-xs hidden-sm"></span>
</a>
</li>
<li>
<button type="button" id="lp-view-expand-button" class="icon-toolbar expand visible-xs-block">
<span class="fa fa-expand" aria-hidden="true"></span>
</button>
</li>
</ul>
</div>
{{ teacher_toc_buttons }}
</div>
<!--- end gamification -->
{% else %}
<div id="progress_bar">
{{ progress_bar }}
</div>
{% endif %}
<div class="visible-xs-block movil-toolbar">
<ul class="btn-movil">
<li>
<a href="{{ button_home_url }}" class="icon-toolbar" target="_self" onclick="javascript: window.parent.API.save_asset();">
<em class="fa fa-home"></em> <span class="hidden-xs hidden-sm"></span>
</a>
</li>
<li>
<button type="button" id="lp-view-expand-button" class="icon-toolbar expand visible-xs-block">
<span class="fa fa-expand" aria-hidden="true"></span>
</button>
</li>
</ul>
</div>
</div>
{# TOC layout #}
<div id="toc_id" class="scorm-body" name="toc_name">
<div id="learning_path_toc" class="scorm-list">
<h1 class="scorm-title">{{ lp_title_scorm }}</h1>
{{ lp_html_toc }}
{{ teacher_toc_buttons }}
</div>
</div>
{# end TOC layout #}
{# TOC layout #}
<div id="toc_id" class="scorm-body" name="toc_name">
<div id="learning_path_toc" class="scorm-list">
<h1 class="scorm-title">{{ lp_title_scorm }}</h1>
{{ lp_html_toc }}
</div>
</div>
{# end left zone #}
{# end TOC layout #}
</div>
</div>
{# end left zone #}
{# <div id="hide_bar" class="scorm-toggle" style="display:inline-block; width: 25px; height: 1000px;"></div> #}
{# <div id="hide_bar" class="scorm-toggle" style="display:inline-block; width: 25px; height: 1000px;"></div> #}
{# right zone #}
<div id="learning_path_right_zone" class="content-scorm">
<div class="lp-view-zone-container">
<div id="lp_navigation_elem" class="navegation-bar pull-right text-right">
<a href="#" id="lp-view-expand-toggle" class="icon-toolbar expand" role="button">
{% if lp_mode == 'embedframe' %}
<span class="fa fa-compress" aria-hidden="true"></span>
<span class="sr-only">{{ 'Expand'|get_lang }}</span>
{% else %}
<span class="fa fa-expand" aria-hidden="true"></span>
<span class="sr-only">{{ 'Expand'|get_lang }}</span>
{% endif %}
</a>
<a id="home-course" href="{{ button_home_url }}" class="icon-toolbar" target="_self" onclick="javascript: window.parent.API.save_asset();">
<em class="fa fa-home"></em> <span class="hidden-xs hidden-sm"></span>
</a>
{{ navigation_bar }}
</div>
{# right zone #}
<div id="learning_path_right_zone" class="content-scorm">
<div class="lp-view-zone-container">
<div id="lp_navigation_elem" class="navegation-bar pull-right text-right">
<a href="#" id="lp-view-expand-toggle" class="icon-toolbar expand" role="button">
{% if lp_mode == 'embedframe' %}
<span class="fa fa-compress" aria-hidden="true"></span>
<span class="sr-only">{{ 'Expand'|get_lang }}</span>
<div class="lp-view-tabs">
<ul id="navTabs" class="nav nav-tabs" role="tablist">
<li role="presentation" class="active">
<a href="#lp-view-content" aria-controls="lp-view-content" role="tab" data-toggle="tab">
<span class="fa fa-book fa-2x fa-fw" aria-hidden="true"></span><span class="sr-only">{{ 'Lesson'|get_lang }}</span>
</a>
</li>
<li role="presentation">
<a href="#lp-view-forum" aria-controls="lp-view-forum" role="tab" data-toggle="tab">
<span class="fa fa-commenting-o fa-2x fa-fw" aria-hidden="true"></span><span class="sr-only">{{ 'Forum'|get_lang }}</span>
</a>
</li>
</ul>
<div class="tab-content">
<div role="tabpanel" class="tab-pane active" id="lp-view-content">
<div id="wrapper-iframe" style="width:100%; height:100%">
{% if lp_mode == 'fullscreen' %}
<iframe id="content_id_blank" name="content_name_blank" src="blank.php" style="width:100%; height:100%" border="0" frameborder="0" allowfullscreen="true" webkitallowfullscreen="true" mozallowfullscreen="true"></iframe>
{% else %}
<span class="fa fa-expand" aria-hidden="true"></span>
<span class="sr-only">{{ 'Expand'|get_lang }}</span>
<iframe id="content_id" name="content_name" src="{{ iframe_src }}" style="width:100%; height:100%" border="0" frameborder="0" allowfullscreen="true" webkitallowfullscreen="true" mozallowfullscreen="true"></iframe>
{% endif %}
</a>
<a id="home-course" href="{{ button_home_url }}" class="icon-toolbar" target="_self" onclick="javascript: window.parent.API.save_asset();">
<em class="fa fa-home"></em> <span class="hidden-xs hidden-sm"></span>
</a>
{{ navigation_bar }}
</div>
<div class="lp-view-tabs">
<ul id="navTabs" class="nav nav-tabs" role="tablist">
<li role="presentation" class="active">
<a href="#lp-view-content" aria-controls="lp-view-content" role="tab" data-toggle="tab">
<span class="fa fa-book fa-2x fa-fw" aria-hidden="true"></span><span class="sr-only">{{ 'Lesson'|get_lang }}</span>
</a>
</li>
<li role="presentation">
<a href="#lp-view-forum" aria-controls="lp-view-forum" role="tab" data-toggle="tab">
<span class="fa fa-commenting-o fa-2x fa-fw" aria-hidden="true"></span><span class="sr-only">{{ 'Forum'|get_lang }}</span>
</a>
</li>
</ul>
<div class="tab-content">
<div role="tabpanel" class="tab-pane active" id="lp-view-content">
<div id="wrapper-iframe" style="width:100%; height:100%">
{% if lp_mode == 'fullscreen' %}
<iframe id="content_id_blank" name="content_name_blank" src="blank.php" style="width:100%; height:100%" border="0" frameborder="0" allowfullscreen="true" webkitallowfullscreen="true" mozallowfullscreen="true"></iframe>
{% else %}
<iframe id="content_id" name="content_name" src="{{ iframe_src }}" style="width:100%; height:100%" border="0" frameborder="0" allowfullscreen="true" webkitallowfullscreen="true" mozallowfullscreen="true"></iframe>
{% endif %}
</div>
</div>
<div role="tabpanel" class="tab-pane" id="lp-view-forum">
</div>
</div>
<div role="tabpanel" class="tab-pane" id="lp-view-forum">
</div>
</div>
</div>
</div>
{# end right Zone #}
</div>
{# end right Zone #}
</div>
<script>
(function () {
var LPViewUtils = {
setHeightLPToc: function () {
var scormInfoHeight = $('#scorm-info').outerHeight(true);
(function () {
var LPViewUtils = {
setHeightLPToc: function () {
var scormInfoHeight = $('#scorm-info').outerHeight(true);
$('#learning_path_toc').css({
top: scormInfoHeight
});
}
};
$('#learning_path_toc').css({
top: scormInfoHeight
});
}
};
$(document).on('ready', function () {
if (/iPhone|iPod|iPad/.test(navigator.userAgent)) {
$('#wrapper-iframe').css({
'overflow' : 'auto',
'position' : 'relative',
'-webkit-overflow-scrolling': 'touch'
});
}
$(document).on('ready', function () {
if (/iPhone|iPod|iPad/.test(navigator.userAgent)) {
$('#wrapper-iframe').css({
'overflow' : 'auto',
'position' : 'relative',
'-webkit-overflow-scrolling': 'touch'
});
}
{% if lp_mode == 'embedframe' %}
//$('#learning_path_main').addClass('lp-view-collapsed');
$('#lp-view-expand-button, #lp-view-expand-toggle').on('click', function (e) {
e.preventDefault();
{% if lp_mode == 'embedframe' %}
//$('#learning_path_main').addClass('lp-view-collapsed');
$('#lp-view-expand-button, #lp-view-expand-toggle').on('click', function (e) {
e.preventDefault();
$('#learning_path_main').toggleClass('lp-view-collapsed');
$('#learning_path_main').toggleClass('lp-view-collapsed');
$('#lp-view-expand-toggle span.fa').toggleClass('fa-compress');
$('#lp-view-expand-toggle span.fa').toggleClass('fa-expand');
});
{% else %}
$('#lp-view-expand-button, #lp-view-expand-toggle').on('click', function (e) {
e.preventDefault();
$('#lp-view-expand-toggle span.fa').toggleClass('fa-compress');
$('#lp-view-expand-toggle span.fa').toggleClass('fa-expand');
});
{% else %}
$('#lp-view-expand-button, #lp-view-expand-toggle').on('click', function (e) {
e.preventDefault();
$('#learning_path_main').toggleClass('lp-view-collapsed');
$('#learning_path_main').toggleClass('lp-view-collapsed');
$('#lp-view-expand-toggle span.fa').toggleClass('fa-expand');
$('#lp-view-expand-toggle span.fa').toggleClass('fa-compress');
});
{% endif %}
$('#lp-view-expand-toggle span.fa').toggleClass('fa-expand');
$('#lp-view-expand-toggle span.fa').toggleClass('fa-compress');
});
$('.lp-view-tabs').on('click', '.disabled', function (e) {
e.preventDefault();
});
{% endif %}
$('a#ui-option').on('click', function (e) {
e.preventDefault();
$('.lp-view-tabs').on('click', '.disabled', function (e) {
e.preventDefault();
});
var icon = $(this).children('.fa');
$('a#ui-option').on('click', function (e) {
e.preventDefault();
if (icon.is('.fa-chevron-up')) {
icon.removeClass('fa-chevron-up').addClass('fa-chevron-down');
var icon = $(this).children('.fa');
return;
}
if (icon.is('.fa-chevron-up')) {
icon.removeClass('fa-chevron-up').addClass('fa-chevron-down');
icon.removeClass('fa-chevron-down').addClass('fa-chevron-up');
});
return;
}
LPViewUtils.setHeightLPToc();
icon.removeClass('fa-chevron-down').addClass('fa-chevron-up');
});
$('.scorm_item_normal a, #scorm-previous, #scorm-next').on('click', function () {
$('.lp-view-tabs').animate({opacity: 0}, 500);
});
LPViewUtils.setHeightLPToc();
$('#learning_path_right_zone #lp-view-content iframe').on('load', function () {
$('.lp-view-tabs a[href="#lp-view-content"]').tab('show');
$('.scorm_item_normal a, #scorm-previous, #scorm-next').on('click', function () {
$('.lp-view-tabs').animate({opacity: 0}, 500);
});
$('.lp-view-tabs').animate({opacity: 1}, 500);
});
$('#learning_path_right_zone #lp-view-content iframe').on('load', function () {
$('.lp-view-tabs a[href="#lp-view-content"]').tab('show');
$('.lp-view-tabs').animate({opacity: 1}, 500);
});
loadForumThread({{ lp_id }}, {{ lp_current_item_id }});
checkCurrentItemPosition({{ lp_current_item_id }});
loadForumThread({{ lp_id }}, {{ lp_current_item_id }});
checkCurrentItemPosition({{ lp_current_item_id }});
{% if glossary_extra_tools in glossary_tool_availables %}
// Loads the glossary library.
(function () {
{% if show_glossary_in_documents == 'ismanual' %}
$.frameReady(
function(){
// $("<div>I am a div courses</div>").prependTo("body");
},
"top.content_name",
{
load: [
{ type:"script", id:"_fr1", src:"{{ jquery_web_path }}"},
{ type:"script", id:"_fr4", src:"{{ jquery_ui_js_web_path }}"},
{ type:"stylesheet", id:"_fr5", src:"{{ jquery_ui_css_web_path }}"},
{ type:"script", id:"_fr2", src:"{{ _p.web_lib }}javascript/jquery.highlight.js"},
{{ fix_link }}
]
}
);
{% elseif show_glossary_in_documents == 'isautomatic' %}
$.frameReady(
function(){
// $("<div>I am a div courses</div>").prependTo("body");
},
"top.content_name",
{
load: [
{ type:"script", id:"_fr1", src:"{{ jquery_web_path }}"},
{ type:"script", id:"_fr4", src:"{{ jquery_ui_js_web_path }}"},
{ type:"stylesheet", id:"_fr5", src:"{{ jquery_ui_css_web_path }}"},
{ type:"script", id:"_fr2", src:"{{ _p.web_lib }}javascript/jquery.highlight.js"},
{{ fix_link }}
]
}
);
{% elseif fix_link != '' %}
$.frameReady(
function(){
// $("<div>I am a div courses</div>").prependTo("body");
},
"top.content_name",
{
load: [
{ type:"script", id:"_fr1", src:"{{ jquery_web_path }}"},
{ type:"script", id:"_fr4", src:"{{ jquery_ui_js_web_path }}"},
{ type:"stylesheet", id:"_fr5", src:"{{ jquery_ui_css_web_path }}"},
{{ fix_link }}
]
}
);
{% endif %}
})();
{% endif %}
{% if glossary_extra_tools in glossary_tool_availables %}
// Loads the glossary library.
(function () {
{% if show_glossary_in_documents == 'ismanual' %}
$.frameReady(
function(){
// $("<div>I am a div courses</div>").prependTo("body");
},
"top.content_name",
{
load: [
{ type:"script", id:"_fr1", src:"{{ jquery_web_path }}"},
{ type:"script", id:"_fr4", src:"{{ jquery_ui_js_web_path }}"},
{ type:"stylesheet", id:"_fr5", src:"{{ jquery_ui_css_web_path }}"},
{ type:"script", id:"_fr2", src:"{{ _p.web_lib }}javascript/jquery.highlight.js"},
{{ fix_link }}
]
}
);
{% elseif show_glossary_in_documents == 'isautomatic' %}
$.frameReady(
function(){
// $("<div>I am a div courses</div>").prependTo("body");
},
"top.content_name",
{
load: [
{ type:"script", id:"_fr1", src:"{{ jquery_web_path }}"},
{ type:"script", id:"_fr4", src:"{{ jquery_ui_js_web_path }}"},
{ type:"stylesheet", id:"_fr5", src:"{{ jquery_ui_css_web_path }}"},
{ type:"script", id:"_fr2", src:"{{ _p.web_lib }}javascript/jquery.highlight.js"},
{{ fix_link }}
]
}
);
{% elseif fix_link != '' %}
$.frameReady(
function(){
// $("<div>I am a div courses</div>").prependTo("body");
},
"top.content_name",
{
load: [
{ type:"script", id:"_fr1", src:"{{ jquery_web_path }}"},
{ type:"script", id:"_fr4", src:"{{ jquery_ui_js_web_path }}"},
{ type:"stylesheet", id:"_fr5", src:"{{ jquery_ui_css_web_path }}"},
{{ fix_link }}
]
}
);
{% endif %}
})();
{% endif %}
$('iframe#content_id')
.on('load', function () {
$.frameReady(function () {
}, 'top.content_name', {
load: [
{type: 'script', id: '_fr1', src: '{{ _p.web }}web/assets/jquery/dist/jquery.min.js'},
{type: 'script', id: '_fr7', src: '{{ _p.web }}web/assets/MathJax/MathJax.js?config=AM_HTMLorMML'},
{type: 'script', id: '_fr4', src: '{{ _p.web }}web/assets/jquery-ui/jquery-ui.min.js'},
{type: 'stylesheet', id: '_fr5', src: '{{ _p.web }}web/assets/jquery-ui/themes/smoothness/jquery-ui.min.css'},
{type: 'stylesheet', id: '_fr6', src: '{{ _p.web }}web/assets/jquery-ui/themes/smoothness/theme.css'},
{type: 'script', id: '_fr2', src: '{{ _p.web_lib }}javascript/jquery.highlight.js'},
{type: 'script', id: '_fr3', src: '{{ _p.web_main }}glossary/glossary.js.php'}
]
});
$('iframe#content_id')
.on('load', function () {
$.frameReady(function () {
}, 'top.content_name', {
load: [
{type: 'script', id: '_fr1', src: '{{ _p.web }}web/assets/jquery/dist/jquery.min.js'},
{type: 'script', id: '_fr7', src: '{{ _p.web }}web/assets/MathJax/MathJax.js?config=AM_HTMLorMML'},
{type: 'script', id: '_fr4', src: '{{ _p.web }}web/assets/jquery-ui/jquery-ui.min.js'},
{type: 'stylesheet', id: '_fr5', src: '{{ _p.web }}web/assets/jquery-ui/themes/smoothness/jquery-ui.min.css'},
{type: 'stylesheet', id: '_fr6', src: '{{ _p.web }}web/assets/jquery-ui/themes/smoothness/theme.css'},
{type: 'script', id: '_fr2', src: '{{ _p.web_lib }}javascript/jquery.highlight.js'},
{type: 'script', id: '_fr3', src: '{{ _p.web_main }}glossary/glossary.js.php'}
]
});
});
});
});
$(window).on('resize', function () {
LPViewUtils.setHeightLPToc();
});
})();
$(window).on('resize', function () {
LPViewUtils.setHeightLPToc();
});
})();
</script>

@ -1,6 +1,8 @@
{% if allowSkillsTool %}
<div class="btn-group">
<a class="btn btn-default" href="{{ _p.web_main }}social/skills_wheel.php">{{ 'SkillsWheel' | get_lang }}</a>
<a class="btn btn-default" href="{{ _p.web_main }}social/skills_wheel.php">
{{ 'SkillsWheel' | get_lang }}
</a>
</div>
{% endif %}

Loading…
Cancel
Save