1.10.x
Yannick Warnier 10 years ago
commit e5eff0a842
  1. 8
      index.php
  2. 8
      main/admin/access_url_add_courses_to_url.php
  3. 2
      main/admin/add_courses_to_usergroup.php
  4. 2
      main/admin/add_users_to_usergroup.php
  5. 79
      main/admin/configure_homepage.php
  6. 21
      main/admin/configure_inscription.php
  7. 7
      main/admin/course_category.php
  8. 2
      main/admin/course_edit.php
  9. 2
      main/admin/course_import.php
  10. 6
      main/admin/course_request_accepted.php
  11. 6
      main/admin/course_request_edit.php
  12. 6
      main/admin/course_request_rejected.php
  13. 6
      main/admin/course_request_review.php
  14. 2
      main/admin/dashboard_add_users_to_user.php
  15. 71
      main/admin/event_type.php
  16. 2
      main/admin/export_certificates.php
  17. 2
      main/admin/group_add.php
  18. 2
      main/admin/inactive_user_list.php
  19. 2
      main/admin/index.php
  20. 1
      main/admin/languages.php
  21. 14
      main/admin/ldap_users_list.php
  22. 37
      main/admin/session_add.php
  23. 39
      main/admin/session_edit.php
  24. 2
      main/admin/session_user_edit.php
  25. 10
      main/admin/settings.lib.php
  26. 6
      main/admin/settings.php
  27. 22
      main/admin/skill_badge_create.php
  28. 11
      main/admin/skill_badge_list.php
  29. 1
      main/admin/skills_wheel.php
  30. 2
      main/admin/special_exports.php
  31. 7
      main/admin/statistics/index.php
  32. 1
      main/admin/sub_language.php
  33. 2
      main/admin/sub_language_add.php
  34. 6
      main/admin/sub_language_ajax.inc.php
  35. 20
      main/admin/system_announcements.php
  36. 13
      main/admin/teacher_time_report.php
  37. 2
      main/admin/user_add.php
  38. 2
      main/admin/user_edit.php
  39. 10
      main/admin/user_information.php
  40. 2
      main/admin/user_list.php
  41. 35
      main/admin/user_move_stats.php
  42. 1304
      main/announcements/announcements.php
  43. 2
      main/announcements/download.php
  44. 2
      main/announcements/resources/js/main.js
  45. 2
      main/attendance/attendance_controller.php
  46. 6
      main/attendance/attendance_sheet.php
  47. 2
      main/attendance/layout.php
  48. 2
      main/auth/external_login/ldap.inc.php
  49. 3
      main/auth/external_login/login.ldap.php
  50. 3
      main/auth/external_login/login.ws.php
  51. 32
      main/auth/external_login/newUser.ldap.php
  52. 2
      main/auth/external_login/newUser.php
  53. 2
      main/auth/inscription.php
  54. 72
      main/auth/ldap/authldap.php
  55. 18
      main/auth/ldap/ldap_var.inc.php
  56. 2
      main/auth/ldap/login.php
  57. 2
      main/auth/my_progress.php
  58. 6
      main/auth/shibboleth/lib/shibboleth_session.class.php
  59. 57
      main/auth/sso/sso.Drupal.class.php
  60. 36
      main/auth/sso/sso.class.php
  61. 215
      main/blog/blog.php
  62. 36
      main/blog/blog_admin.php
  63. 2
      main/blog/download.php
  64. 2
      main/calendar/agenda.php
  65. 2
      main/calendar/download.php
  66. 3
      main/chat/chat.php
  67. 1
      main/chat/chat_chat.php
  68. 2
      main/chat/chat_hidden.php
  69. 1
      main/chat/chat_message.php
  70. 1
      main/chat/chat_whoisonline.php
  71. 13
      main/course_description/add.php
  72. 34
      main/course_description/ajax_controller.class.php
  73. 56
      main/course_description/controller.class.php
  74. 14
      main/course_description/course_description_controller.php
  75. 10
      main/course_description/course_description_form.class.php
  76. 25
      main/course_description/edit.php
  77. 3
      main/course_description/index.php
  78. 6
      main/course_description/layout.php
  79. 2
      main/course_description/listing.php
  80. 8
      main/course_description/upload_file_form.class.php
  81. 2
      main/course_home/course_home.php
  82. 3
      main/course_info/infocours.php
  83. 2
      main/course_info/start.php
  84. 78
      main/course_progress/index.php
  85. 6
      main/course_progress/layout.php
  86. 2
      main/course_progress/layout_no_header.php
  87. 68
      main/course_progress/thematic.php
  88. 2
      main/course_progress/thematic_advance.php
  89. 79
      main/coursecopy/classes/CourseRestorer.class.php
  90. 7
      main/create_course/add_course.php
  91. 6
      main/cron/fix_online_time.php
  92. 1
      main/cron/import_csv.php
  93. 1
      main/cron/lang/check_parse_lang.php
  94. 302
      main/cron/lang/langstats.class.php
  95. 3
      main/cron/lang/list_undefined_langvars.php
  96. 11
      main/cron/lang/list_unused_langvars.php
  97. 1203
      main/css/font_awesome/css/font-awesome-ie7.css
  98. 384
      main/css/font_awesome/css/font-awesome-ie7.min.css
  99. 1704
      main/css/font_awesome/css/font-awesome.css
  100. 407
      main/css/font_awesome/css/font-awesome.min.css
  101. Some files were not shown because too many files have changed in this diff Show More

@ -66,7 +66,7 @@ $_setting['display_courses_to_anonymous_users'] = 'true';
*/
if (isset($_GET['submitAuth']) && $_GET['submitAuth'] == 1) {
$i = api_get_anonymous_id();
event_system(LOG_ATTEMPTED_FORCED_LOGIN, 'tried_hacking_get', $_SERVER['REMOTE_ADDR'].(empty($_POST['login'])?'':'/'.$_POST['login']),null,$i);
Event::addEvent(LOG_ATTEMPTED_FORCED_LOGIN, 'tried_hacking_get', $_SERVER['REMOTE_ADDR'].(empty($_POST['login'])?'':'/'.$_POST['login']),null,$i);
echo 'Attempted breakin - sysadmins notified.';
session_destroy();
die();
@ -95,7 +95,7 @@ if (!api_get_user_id() && CustomPages::enabled()) {
if (!empty($_POST['submitAuth'])) {
// The user has been already authenticated, we are now to find the last login of the user.
if (isset ($_user['user_id'])) {
$track_login_table = Database :: get_statistic_table(TABLE_STATISTIC_TRACK_E_LOGIN);
$track_login_table = Database :: get_main_table(TABLE_STATISTIC_TRACK_E_LOGIN);
$sql_last_login = "SELECT UNIX_TIMESTAMP(login_date)
FROM $track_login_table
WHERE login_user_id = '".$_user['user_id']."'
@ -110,7 +110,7 @@ if (!empty($_POST['submitAuth'])) {
}
Database::free_result($result_last_login);
//event_login();
//Event::event_login();
if (api_is_platform_admin()) {
// decode all open event informations and fill the track_c_* tables
include api_get_path(LIBRARY_PATH).'stats.lib.inc.php';
@ -120,7 +120,7 @@ if (!empty($_POST['submitAuth'])) {
// End login -- if ($_POST['submitAuth'])
} else {
// Only if login form was not sent because if the form is sent the user was already on the page.
event_open();
Event::event_open();
}
if (api_get_setting('display_categories_on_homepage') == 'true') {

@ -28,10 +28,10 @@ $courses = array ();
$url_list = array();
$users = array();
$tbl_access_url_rel_course = Database :: get_main_table(TABLE_MAIN_ACCESS_URL_REL_COURSE);
$tbl_access_url = Database :: get_main_table(TABLE_MAIN_ACCESS_URL);
$tbl_user = Database :: get_main_table(TABLE_MAIN_USER);
$tbl_course = Database :: get_main_table(TABLE_MAIN_COURSE);
$tbl_access_url_rel_course = Database:: get_main_table(TABLE_MAIN_ACCESS_URL_REL_COURSE);
$tbl_access_url = Database:: get_main_table(TABLE_MAIN_ACCESS_URL);
$tbl_user = Database:: get_main_table(TABLE_MAIN_USER);
$tbl_course = Database:: get_main_table(TABLE_MAIN_COURSE);
/* Header */
$tool_name = get_lang('AddCoursesToURL');

@ -100,7 +100,7 @@ $filters = array(
);
$searchForm = new FormValidator('search', 'get', api_get_self().'?id='.$id);
$searchForm->add_header(get_lang('AdvancedSearch'));
$searchForm->addHeader(get_lang('AdvancedSearch'));
$renderer =& $searchForm->defaultRenderer();
$searchForm->addElement('hidden', 'id', $id);
foreach ($filters as $param) {

@ -184,7 +184,7 @@ $filters = array(
);
$searchForm = new FormValidator('search', 'get', api_get_self().'?id='.$id);
$searchForm->add_header(get_lang('AdvancedSearch'));
$searchForm->addHeader(get_lang('AdvancedSearch'));
$renderer =& $searchForm->defaultRenderer();
$searchForm->addElement('hidden', 'id', $id);

@ -46,7 +46,7 @@ function home_tabs($file_logged_in)
}
}
$language_file = array('index', 'admin', 'accessibility');
$language_file = array('index', 'admin');
$cidReset = true;
require_once '../inc/global.inc.php';
@ -200,9 +200,6 @@ if (api_is_multiple_url_enabled()) {
// Check WCAG settings and prepare edition using WCAG
$errorMsg = '';
if (api_get_setting('wcag_anysurfer_public_pages') == 'true') {
$errorMsg = WCAG_Rendering::request_validation();
}
// Filter link param
$link = '';
@ -224,12 +221,7 @@ if (!empty($action)) {
switch ($action) {
case 'edit_top':
// Filter
$home_top = '';
if (api_get_setting('wcag_anysurfer_public_pages') == 'true') {
$home_top = WCAG_Rendering::prepareXHTML();
} else {
$home_top = trim(stripslashes($_POST['home_top']));
}
$home_top = trim(stripslashes($_POST['home_top']));
// Write
if (is_writable($homep)) {
@ -272,7 +264,7 @@ if (!empty($action)) {
if (EventsMail::check_if_using_class('portal_homepage_edited')) {
EventsDispatcher::events('portal_homepage_edited',array('about_user' => api_get_user_id()));
}
event_system(
Event::addEvent(
LOG_HOMEPAGE_CHANGED,
'edit_top',
cut(strip_tags($home_top), 254),
@ -330,16 +322,12 @@ if (!empty($action)) {
fputs($fp, "<b>$notice_title</b><br />\n$notice_text");
fclose($fp);
}
event_system(LOG_HOMEPAGE_CHANGED, 'edit_notice', cut(strip_tags($notice_title), 254), api_get_utc_datetime(), api_get_user_id());
Event::addEvent(LOG_HOMEPAGE_CHANGED, 'edit_notice', cut(strip_tags($notice_title), 254), api_get_utc_datetime(), api_get_user_id());
break;
case 'edit_news':
//Filter
//$s_languages_news=$_POST["news_languages"]; // TODO: Why this line has been disabled?
if (api_get_setting('wcag_anysurfer_public_pages') == 'true') {
$home_news = WCAG_rendering::prepareXHTML();
} else {
$home_news = trim(stripslashes($_POST['home_news']));
}
$home_news = trim(stripslashes($_POST['home_news']));
//Write
if ($s_languages_news != 'all') {
if (file_exists($homep.$newsf.'_'.$s_languages_news.$ext)) {
@ -376,7 +364,7 @@ if (!empty($action)) {
}
}
}
event_system(LOG_HOMEPAGE_CHANGED, 'edit_news', strip_tags(cut($home_news, 254)), api_get_utc_datetime(), api_get_user_id());
Event::addEvent(LOG_HOMEPAGE_CHANGED, 'edit_news', strip_tags(cut($home_news, 254)), api_get_utc_datetime(), api_get_user_id());
break;
case 'insert_tabs':
case 'edit_tabs':
@ -387,14 +375,7 @@ if (!empty($action)) {
$link_name = trim(stripslashes($_POST['link_name']));
$link_url = trim(stripslashes($_POST['link_url']));
$add_in_tab = intval($_POST['add_in_tab']);
// WCAG
if (api_get_setting('wcag_anysurfer_public_pages') == 'true') {
$link_html = WCAG_Rendering::prepareXHTML();
} else {
$link_html = trim(stripslashes($_POST['link_html']));
}
$link_html = trim(stripslashes($_POST['link_html']));
$filename = trim(stripslashes($_POST['filename']));
$target_blank = $_POST['target_blank'] ? true : false;
@ -541,13 +522,13 @@ if (!empty($action)) {
}
}
}
event_system(
LOG_HOMEPAGE_CHANGED,
$action,
cut($link_name . ':' . $link_url, 254),
api_get_utc_datetime(),
api_get_user_id()
);
Event::addEvent(
LOG_HOMEPAGE_CHANGED,
$action,
cut($link_name . ':' . $link_url, 254),
api_get_utc_datetime(),
api_get_user_id()
);
break;
} //end of switch($action)
@ -882,22 +863,13 @@ switch ($action) {
if (!empty($target_blank)) { $target_blank_checkbox->setChecked(true); }
if ($action == 'edit_link' && (empty($link_url) || $link_url == 'http://' || $link_url == 'https://')) {
if (api_get_setting('wcag_anysurfer_public_pages')=='true') {
$form->addElement('html', WCAG_Rendering::create_xhtml(isset($_POST['link_html'])?$_POST['link_html']:$link_html));
} else {
$default['link_html'] = isset($_POST['link_html']) ? $_POST['link_html'] : $link_html;
$form->add_html_editor('link_html', get_lang('Content'), false, false, array('ToolbarSet' => 'PortalHomePage', 'Width' => '100%', 'Height' => '400'));
}
$default['link_html'] = isset($_POST['link_html']) ? $_POST['link_html'] : $link_html;
$form->add_html_editor('link_html', get_lang('Content'), false, false, array('ToolbarSet' => 'PortalHomePage', 'Width' => '100%', 'Height' => '400'));
$form->addElement('style_submit_button', null, get_lang('Save'), 'class="save"');
} else {
if (in_array($action, array('edit_tabs','insert_tabs'))) {
if (api_get_setting('wcag_anysurfer_public_pages')=='true') {
$form->addElement('html', get_lang('Content').' ('.get_lang('Optional').')');
$form->addElement('html', WCAG_Rendering::create_xhtml(isset($_POST['link_html'])?$_POST['link_html']:(!empty($link_html) ? $link_html : '')));
} else {
$default['link_html'] = isset($_POST['link_html']) ? $_POST['link_html'] : (!empty($link_html) ? $link_html : '');
$form->add_html_editor('link_html', get_lang('Content'), false, false, array('ToolbarSet' => 'PortalHomePage', 'Width' => '100%', 'Height' => '400'));
}
$default['link_html'] = isset($_POST['link_html']) ? $_POST['link_html'] : (!empty($link_html) ? $link_html : '');
$form->add_html_editor('link_html', get_lang('Content'), false, false, array('ToolbarSet' => 'PortalHomePage', 'Width' => '100%', 'Height' => '400'));
}
$form->addElement('checkbox', 'all_langs', null, get_lang('ApplyAllLanguages'), array('id' => 'all_langs'));
$form->addElement('html','<table id="table_langs" style="margin-left:159px;"><tr>');
@ -968,17 +940,8 @@ switch ($action) {
$form->addElement('html', $html);
}
if (api_get_setting('wcag_anysurfer_public_pages') == 'true') {
//TODO: review these lines
// Print WCAG-specific HTML editor
$html = '<tr><td>';
$html .= WCAG_Rendering::create_xhtml($open);
$html .= '</td></tr>';
$form->addElement('html', $html);
} else {
$default[$name] = str_replace('{rel_path}', api_get_path(REL_PATH), $open);
$form->add_html_editor($name, '', true, false, array('ToolbarSet' => 'PortalHomePage', 'Width' => '100%', 'Height' => '400'));
}
$default[$name] = str_replace('{rel_path}', api_get_path(REL_PATH), $open);
$form->add_html_editor($name, '', true, false, array('ToolbarSet' => 'PortalHomePage', 'Width' => '100%', 'Height' => '400'));
$form->addElement('checkbox', 'all_langs', null, get_lang('ApplyAllLanguages'),array('id' => 'all_langs'));
$form->addElement('html','<table id="table_langs" style="margin-left:5px;"><tr>');

@ -115,14 +115,8 @@ if (!empty($action)) {
switch ($action) {
case 'edit_top':
// Filter
$home_top = '';
if (api_get_setting('wcag_anysurfer_public_pages') == 'true') {
$home_top = WCAG_Rendering::prepareXHTML();
} else {
$home_top = trim(stripslashes($_POST['register_top']));
}
$home_top = trim(stripslashes($_POST['register_top']));
// Write
if (file_exists($homep.$topf.'_'.$lang.$ext)) {
if (is_writable($homep.$topf.'_'.$lang.$ext)) {
$fp = fopen($homep.$topf.'_'.$lang.$ext, 'w');
@ -361,17 +355,8 @@ switch ($action){
$renderer->setElementTemplate('<tr><td>{element}</td></tr>');
$renderer->setRequiredNoteTemplate('');
$form->addElement('hidden', 'formSent', '1');
if (api_get_setting('wcag_anysurfer_public_pages') == 'true') {
//TODO: review these lines
// Print WCAG-specific HTML editor
$html = '<tr><td>';
$html .= WCAG_Rendering::create_xhtml($open);
$html .= '</td></tr>';
$form->addElement('html', $html);
} else {
$default[$name] = str_replace('{rel_path}', api_get_path(REL_PATH), $open);
$form->add_html_editor($name, '', true, false, array('ToolbarSet' => 'PortalHomePage', 'Width' => '100%', 'Height' => '400'));
}
$default[$name] = str_replace('{rel_path}', api_get_path(REL_PATH), $open);
$form->add_html_editor($name, '', true, false, array('ToolbarSet' => 'PortalHomePage', 'Width' => '100%', 'Height' => '400'));
$form->addElement('style_submit_button', null, get_lang('Save'), 'class="save"');
$form->setDefaults($default);
$form->display();

@ -3,9 +3,7 @@
/**
* @package chamilo.admin
*/
/**
* Code
*/
// name of the language file that needs to be included
$language_file = 'admin';
$cidReset = true;
@ -82,10 +80,11 @@ if ($action == 'add' || $action == 'edit') {
if (!empty($category)) {
$form_title .= ' ' . get_lang('Into') . ' ' . Security::remove_XSS($category);
}
$url = api_get_self().'?action='.Security::remove_XSS($action).'&category='.Security::remove_XSS($category).'&id='.$categoryId;
$url = api_get_self().'?action='.Security::remove_XSS($action).'&category='.Security::remove_XSS($category).'&id='.$category;
$form = new FormValidator('course_category', 'post', $url);
$form->addElement('header', '', $form_title);
$form->addElement('hidden', 'formSent', 1);
$form->addElement('text', 'code', get_lang("CategoryCode"));
$form->addElement('text', 'name', get_lang("CategoryName"));
$form->addRule('name', get_lang('PleaseEnterCategoryInfo'), 'required');

@ -298,7 +298,7 @@ if ($form->validate()) {
$course_code = $course['code'];
$visual_code = $course['visual_code'];
$visual_code = generate_course_code($visual_code);
$visual_code = CourseManager::generate_course_code($visual_code);
// Check if the visual code is already used by *another* course
$visual_code_is_used = false;

@ -210,7 +210,7 @@ if (isset($errors) && count($errors) != 0) {
}
$form = new FormValidator('import', 'post', api_get_self(), null, array('enctype' => 'multipart/form-data'));
$form->add_header($tool_name);
$form->addHeader($tool_name);
$form->addElement('file', 'import_file', get_lang('ImportCSVFileLocation'));
$form->addElement('checkbox', 'add_me_as_teacher', null, get_lang('AddMeAsTeacherInCourses'));
$form->addElement('button', 'save', get_lang('Import'));

@ -22,12 +22,6 @@ $this_section = SECTION_PLATFORM_ADMIN;
api_protect_admin_script();
require_once api_get_path(LIBRARY_PATH).'add_course.lib.inc.php';
require_once api_get_path(CONFIGURATION_PATH).'course_info.conf.php';
// Including a configuration file.
require api_get_path(CONFIGURATION_PATH).'add_course.conf.php';
// A check whether the course validation feature is enabled.
$course_validation_feature = api_get_setting('course_validation') == 'true';

@ -17,12 +17,6 @@ $tool_name = get_lang('CourseRequestEdit');
api_protect_admin_script();
require_once api_get_path(LIBRARY_PATH).'add_course.lib.inc.php';
require_once api_get_path(CONFIGURATION_PATH).'course_info.conf.php';
// Including a configuration file.
require_once api_get_path(CONFIGURATION_PATH).'add_course.conf.php';
// A check whether the course validation feature is enabled.
$course_validation_feature = api_get_setting('course_validation') == 'true';

@ -22,12 +22,6 @@ $this_section = SECTION_PLATFORM_ADMIN;
api_protect_admin_script();
require_once api_get_path(LIBRARY_PATH).'add_course.lib.inc.php';
require_once api_get_path(CONFIGURATION_PATH).'course_info.conf.php';
// Including a configuration file.
require api_get_path(CONFIGURATION_PATH).'add_course.conf.php';
// A check whether the course validation feature is enabled.
$course_validation_feature = api_get_setting('course_validation') == 'true';

@ -19,12 +19,6 @@ $this_section = SECTION_PLATFORM_ADMIN;
api_protect_admin_script();
require_once api_get_path(LIBRARY_PATH).'add_course.lib.inc.php';
require_once api_get_path(CONFIGURATION_PATH).'course_info.conf.php';
// Including a configuration file.
require_once api_get_path(CONFIGURATION_PATH).'add_course.conf.php';
// The delete action should be deactivated in this page.
// Better reject the target request, after that you can delete it.
// see DELETE_ACTION_ENABLED constant in main_api.lib.php

@ -259,7 +259,7 @@ $filters = array(
);
$searchForm = new FormValidator('search', 'get', api_get_self().'?user='.$user_id);
$searchForm->add_header(get_lang('AdvancedSearch'));
$searchForm->addHeader(get_lang('AdvancedSearch'));
$renderer =& $searchForm->defaultRenderer();
$searchForm->addElement('hidden', 'user', $user_id);

@ -12,7 +12,6 @@ $language_file = array('admin');
$cidReset = true;
require_once '../inc/global.inc.php';
require_once '../inc/conf/events.conf.php';
$this_section = SECTION_PLATFORM_ADMIN;
api_protect_admin_script();
@ -35,16 +34,16 @@ if ($action == 'modEventType') {
$users = explode(';', $eventUsers);
} else {
$users = array();
}
}
if (!empty($event_name)) {
$eventName = $event_name;
}
save_event_type_message($eventName, $users, $eventMessage, $eventSubject, $eventMessageLanguage, $activated);
}
Event::save_event_type_message($eventName, $users, $eventMessage, $eventSubject, $eventMessageLanguage, $activated);
header('location: event_controller.php');
exit;
}
$ets = get_all_event_types();
$ets = Event::get_all_event_types();
$languages = api_get_languages();
@ -64,7 +63,7 @@ foreach ($users as $user) {
/**
* Header definition
*/
*/
$interbreadcrumb[] = array('url' => 'index.php', 'name' => get_lang('PlatformAdmin'));
$interbreadcrumb[] = array('url' => 'event_controller.php', 'name' => get_lang('Events'));
$tool_name = get_lang('EventMessageManagement');
@ -84,16 +83,16 @@ echo Display::actions($action_array);
var eventsConfig = <?php echo json_encode($event_config) ?>;
var currentLanguage = <?php echo json_encode(api_get_interface_language()) ?>;
var flagContentHasChanged = false;
var key_lang = "<?php echo $key_lang ?>";
var key_lang = "<?php echo $key_lang ?>";
var event_type_name = "<?php echo $event_name ?>";
$(document).ready(function() {
$(document).ready(function() {
confirmMessage("eventList");
if (event_type_name != 0) {
$("#event_list_group").hide();
}
});
function ajax(params,func) {
$.ajax({
url: "<?php echo $ajaxPath ?>",
@ -103,27 +102,27 @@ echo Display::actions($action_array);
});
}
function refreshUsersList() {
function refreshUsersList() {
removeAllOption($('#usersList'));
$.each(usersList, function(ind,item) {
$.each(usersList, function(ind,item) {
addOption($('#usersList'), item.user_id, item.firstname + ' '+item.lastname);
});
});
}
function getCurrentEventTypeName() {
var name = false;
if (event_type_name != 0) {
return event_type_name;
} else {
return $('#eventList option:selected').first().attr('value');
}
}
function self_sent_lock(self_sent) {
if (self_sent == true) {
$(".registration_case").show();
$(".registration_case").show();
$("#usersList").attr('disabled', 'true');
$("#usersSubList").attr('disabled', 'true');
removeAllOption($('#usersSubList'));
@ -135,17 +134,17 @@ echo Display::actions($action_array);
}
function showEventType() {
cleanInput();
cleanInput();
currentEventName = getCurrentEventTypeName();
$("span#activated_checkbox").css("display", "inline"); // make checkbox visible
$('input[name=activated]').attr('checked', false);
var self_sent = false;
var self_sent = false;
if (typeof(eventsConfig[currentEventName])!='undefined') {
// if registration, only sent to self_user
if (eventsConfig[currentEventName].self_sent == true) {
if (eventsConfig[currentEventName].self_sent == true) {
self_sent = true;
}
}
@ -180,9 +179,9 @@ echo Display::actions($action_array);
$('#keys').append('<li>'+key+'</li>');
});
}
if (self_sent == false ) {
$.ajax({
url: '<?php echo $ajaxPath ?>?action=get_event_users&eventName=' +currentEventName,
dataType: 'json',
@ -190,8 +189,8 @@ echo Display::actions($action_array);
removeAllOption($('#usersSubList'));
refreshUsersList();
usersIds = new Array();
var json = jQuery.parseJSON(data);
$.each(json, function(ind,item) {
var json = jQuery.parseJSON(data);
$.each(json, function(ind,item) {
addOption($('#usersSubList'),item.user_id, item.firstname + ' '+item.lastname);
usersIds[ind] = item.value;
removeOption($('#usersList'),item.user_id);
@ -224,7 +223,7 @@ echo Display::actions($action_array);
select.find('option[value='+value+']').remove();
}
function removeAllOption(select) {
function removeAllOption(select) {
select.find('option').remove();
}
@ -267,8 +266,8 @@ echo Display::actions($action_array);
/**
* Asks if user want to abandon the changes he's done
*/
function confirmMessage(sender) {
function confirmMessage(sender) {
if (flagContentHasChanged == true) {
if (confirm(key_lang)) {
flagContentHasChanged = false;
@ -308,23 +307,23 @@ echo Display::actions($action_array);
<form method="POST" onSubmit="return submitForm(); ">
<div class="row">
<div class="span12" id="event_list_group">
<h4><?php echo get_lang('Events'); ?></h4>
<h4><?php echo get_lang('Events'); ?></h4>
<select class="span6" multiple="1" id="eventList" onchange="confirmMessage(this.name); return false;" name="eventList">
<?php
foreach ($event_config as $key => $config) {
echo '<option value="' . $key . '">' . $config['name_lang_var'] . '</option>';
}
?>
</select>
</select>
</div>
<div class="span4">
<h4><?php echo get_lang('Users'); ?></h4>
<select multiple="1" id="usersList" class="span3 registration_case"></select>
</div>
<div class="span4">
<div class="span4">
<div class="registration_case">
<button class="arrowr" onclick='moveUsers($("#usersList"),$("#usersSubList")); return false;'></button>
<br />
@ -336,13 +335,13 @@ echo Display::actions($action_array);
<h4><?php echo get_lang('ToBeWarnedUserList'); ?></h4>
<select class="span3" multiple="1" id="usersSubList" class="registration_case"></select>
</div>
</div>
</div>
<br />
<h2 id="eventNameTitle"></h2>
<span id="activated_checkbox">
<input type="checkbox" name="activated" value="1" />
<label for="activated" style="display:inline;"><?php echo get_lang('ActivateEvent'); ?></label>
<label for="activated" style="display:inline;"><?php echo get_lang('ActivateEvent'); ?></label>
</span>
<br />
<select id="languages" name="languages" style="margin-top:20px;" onclick='confirmMessage(this.name); return false;'>

@ -23,7 +23,7 @@ foreach ($courses as $course) {
}
$form->addElement('select', 'course', get_lang('Course'), $options);
$form->addElement('file', 'file', get_lang('File'));
$form->add_button('submit', get_lang('Submit'));
$form->addButton('submit', get_lang('Submit'));
$form->display();
if ($form->validate()) {

@ -141,7 +141,7 @@ if( $form->validate()) {
else {
$emailbody = get_lang('Dear')." ".stripslashes(api_get_person_name($firstname, $lastname)).",\n\n".get_lang('YouAreReg')." ".api_get_setting('siteName') ." ".get_lang('WithTheFollowingSettings')."\n\n".get_lang('Username')." : ". $username ."\n". get_lang('Pass')." : ".stripslashes($password)."\n\n" .get_lang('Address') ." ". api_get_setting('siteName') ." ". get_lang('Is') ." : ". $_configuration['root_web'] ."\n\n". get_lang('Problem'). "\n\n". get_lang('SignatureFormula').",\n\n".api_get_person_name(api_get_setting('administratorName'), api_get_setting('administratorSurname'))."\n". get_lang('Manager'). " ".api_get_setting('siteName')."\nT. ".api_get_setting('administratorTelephone')."\n" .get_lang('Email') ." : ".api_get_setting('emailAdministrator');
}
@api_mail($recipient_name, $email, $emailsubject, $emailbody, $sender_name, $email_admin);
@api_mail_html($recipient_name, $email, $emailsubject, $emailbody, $sender_name, $email_admin);
}*/
Security::clear_token();

@ -14,7 +14,7 @@ $language_file = array ('registration','admin');
$cidReset = true;
require_once '../inc/global.inc.php';
$tbl_stats_access = Database :: get_statistic_table(TABLE_STATISTIC_TRACK_E_ACCESS);
$tbl_stats_access = Database :: get_main_table(TABLE_STATISTIC_TRACK_E_ACCESS);
$this_section = SECTION_PLATFORM_ADMIN;
api_protect_admin_script(true);

@ -120,7 +120,7 @@ if (api_is_platform_admin()) {
$items[] = array('url'=>'group_add.php', 'label' => get_lang('AddGroups'));
$items[] = array('url'=>'group_list.php', 'label' => get_lang('GroupList'));
}
if (isset($extAuthSource) && isset($extAuthSource['ldap']) && count($extAuthSource['ldap']) > 0) {
if (isset($extAuthSource) && isset($extAuthSource['extldap']) && count($extAuthSource['extldap']) > 0) {
$items[] = array('url'=>'ldap_users_list.php', 'label' => get_lang('ImportLDAPUsersIntoPlatform'));
}
$items[] = array('url'=>'user_fields.php', 'label' => get_lang('ManageUserFields'));

@ -24,7 +24,6 @@ $cidReset = true;
// include global script
require_once '../inc/global.inc.php';
require_once 'sub_language.class.php';
$this_section = SECTION_PLATFORM_ADMIN;
api_protect_admin_script();

@ -17,11 +17,11 @@ $this_section = SECTION_PLATFORM_ADMIN;
api_protect_admin_script();
$action = $_GET["action"];
$login_as_user_id = $_GET["user_id"];
$action = @$_GET["action"] ?: null;
$login_as_user_id = @$_GET["user_id"] ?: null;
// Login as ...
if ($_GET['action'] == "login_as" && isset ($login_as_user_id))
if ($action == "login_as" && !empty ($login_as_user_id))
{
login_user($login_as_user_id);
}
@ -200,10 +200,10 @@ $form->display();
$parameters['keyword_username'] = $_GET['keyword_username'];
$parameters['keyword_firstname'] = $_GET['keyword_firstname'];
$parameters['keyword_lastname'] = $_GET['keyword_lastname'];
$parameters['keyword_email'] = $_GET['keyword_email'];
$parameters['keyword_username'] = @$_GET['keyword_username'] ?: null;
$parameters['keyword_firstname'] = @$_GET['keyword_firstname'] ?: null;
$parameters['keyword_lastname'] = @$_GET['keyword_lastname'] ?: null;
$parameters['keyword_email'] = @$_GET['keyword_email'] ?: null;
if (isset($_GET['id_session']))
$parameters['id_session'] = $_GET['id_session'];
// Create a sortable table with user-data

@ -258,7 +258,7 @@ if (intval($countUsers) < 50) {
$form->addElement('select', 'coach_username', get_lang('CoachName'), $coachesOptions, array(
'id' => 'coach_username',
'class' => 'chzn-select',
'style' => 'width:350px;'
'style' => 'width:370px;'
));
$form->addElement('advanced_settings', Display::return_icon('synthese_view.gif') . ' ' . get_lang('ActivityCoach'));
} else {
@ -276,7 +276,7 @@ $form->add_html('<div id="ajax_list_coachs"></div>');
$form->add_select('session_category', get_lang('SessionCategory'), $categoriesOptions, array(
'id' => 'session_category',
'class' => 'chzn-select',
'style' => 'width:350px;'
'style' => 'width:370px;'
));
$form->addElement('advanced_settings','<a class="btn-show" id="advanced_parameters" href="javascript://">'.get_lang('DefineSessionOptions').'</a>');
@ -327,6 +327,18 @@ $form->addGroup($visibilityGroup, 'visibility_group', null, null, false);
$form->addElement('html','</div>');
$form->addElement(
'textarea',
'description',
get_lang('Description'),
array(
'class' => 'span4',
'rows' => 3
)
);
$form->addElement('checkbox', 'show_description', null, get_lang('ShowDescription'));
$form->addElement(
'text',
'duration',
@ -385,6 +397,8 @@ if ($form->validate()) {
$end_limit = isset($params['end_limit']) ? true : false;
$start_limit = isset($params['start_limit']) ? true : false;
$duration = isset($params['duration']) ? $params['duration'] : null;
$description = $params['description'];
$showDescription = isset($params['show_description']) ? 1: 0;
if (empty($end_limit) && empty($start_limit)) {
$nolimit = 1;
@ -401,9 +415,22 @@ if ($form->validate()) {
}
$return = SessionManager::create_session(
$name, $startDate, $endDate, $nb_days_acess_before,
$nb_days_acess_after, $nolimit, $coach_username, $id_session_category, $id_visibility, $start_limit,
$end_limit, false, $duration, $extraFields
$name,
$startDate,
$endDate,
$nb_days_acess_before,
$nb_days_acess_after,
$nolimit,
$coach_username,
$id_session_category,
$id_visibility,
$start_limit,
$end_limit,
false,
$duration,
$description,
$showDescription,
$extraFields
);
if ($return == strval(intval($return))) {

@ -37,17 +37,6 @@ $interbreadcrumb[] = array('url' => "resume_session.php?id_session=".$id,"name"
list($year_start, $month_start, $day_start) = explode('-', $infos['date_start']);
list($year_end, $month_end, $day_end) = explode('-', $infos['date_end']);
// Default value
$showDescriptionChecked = 'checked';
if (isset($infos['show_description'])) {
if (!empty($infos['show_description'])) {
$showDescriptionChecked = 'checked';
} else {
$showDescriptionChecked = null;
}
}
$end_year_disabled = $end_month_disabled = $end_day_disabled = '';
if (isset($_POST['formSent']) && $_POST['formSent']) {
@ -219,18 +208,24 @@ $form->addGroup($visibilityGroup, 'visibility_group', null, null, false);
$form->addElement('html','</div>');
if (array_key_exists('show_description', $infos)) {
$form->addElement('textarea', 'description', get_lang('Description'));
$chkDescriptionAttributes = array();
$form->addElement(
'textarea',
'description',
get_lang('Description'),
array(
'class' => 'span4',
'rows' => 3
)
);
if (!empty($showDescriptionChecked)) {
$chkDescriptionAttributes['checked'] = '';
}
$chkDescriptionAttributes = array();
$form->addElement('checkbox', 'show_description', null, get_lang('ShowDescription'), $chkDescriptionAttributes);
if (!empty($infos['show_description'])) {
$chkDescriptionAttributes['checked'] = '';
}
$form->addElement('checkbox', 'show_description', null, get_lang('ShowDescription'), $chkDescriptionAttributes);
$duration = empty($infos['duration']) ? null : $infos['duration'];
$form->addElement(
@ -268,7 +263,7 @@ $formDefaults = array(
'date_start' => $infos['date_start'],
'date_end' => $infos['date_end'],
'session_visibility' => $infos['visibility'],
'description' => array_key_exists('show_description', $infos) ? $infos['description'] : ''
'description' => $infos['description']
);
if ($formSent) {
@ -277,7 +272,7 @@ if ($formSent) {
$formDefaults['nb_days_access_after'] = api_htmlentities($nb_days_access_after,ENT_QUOTES,$charset);
$formDefaults['duration'] = Security::remove_XSS($duration);
} else {
$formDefaults['name'] = api_htmlentities($infos['name'],ENT_QUOTES,$charset);
$formDefaults['name'] = Security::remove_XSS($infos['name']);
$formDefaults['nb_days_access_before'] = api_htmlentities($infos['nb_days_access_before_beginning'],ENT_QUOTES,$charset);
$formDefaults['nb_days_access_after'] = api_htmlentities($infos['nb_days_access_after_end'],ENT_QUOTES,$charset);
$formDefaults['duration'] = $duration;
@ -297,7 +292,7 @@ if ($form->validate()) {
$id_session_category = $params['session_category'];
$id_visibility = $params['session_visibility'];
$duration = isset($params['duration']) ? $params['duration'] : null;
$description = isset($params['description']) ? $params['description'] : null;
$description = $params['description'];
$showDescription = isset($params['show_description']) ? 1: 0;
$end_limit = $params['end_limit'];

@ -33,7 +33,7 @@ $interbreadcrumb[] = array('url' => 'session_list.php','name' => get_lang('Sessi
$interbreadcrumb[] = array('url' => "resume_session.php?id_session=".$sessionId, "name" => get_lang('SessionOverview'));
$form = new FormValidator('edit', 'post', api_get_self().'?session_id='.$sessionId.'&user_id='.$userId);
$form->add_header(get_lang('EditUserSessionDuration'));
$form->addHeader(get_lang('EditUserSessionDuration'));
$data = SessionManager::getUserSession($userId, $sessionId);
$userInfo = api_get_user_info($userId);

@ -22,7 +22,7 @@ function handle_regions()
// Add event to the system log.
$user_id = api_get_user_id();
$category = $_GET['category'];
event_system(
Event::addEvent(
LOG_CONFIGURATION_SETTINGS_CHANGE,
LOG_CONFIGURATION_SETTINGS_CATEGORY,
$category,
@ -116,7 +116,7 @@ function handle_plugins()
// Add event to the system log.
$user_id = api_get_user_id();
$category = $_GET['category'];
event_system(
Event::addEvent(
LOG_CONFIGURATION_SETTINGS_CHANGE,
LOG_CONFIGURATION_SETTINGS_CATEGORY,
$category,
@ -255,7 +255,7 @@ function handle_stylesheets()
// Add event to the system log.
$user_id = api_get_user_id();
$category = $_GET['category'];
event_system(
Event::addEvent(
LOG_CONFIGURATION_SETTINGS_CHANGE,
LOG_CONFIGURATION_SETTINGS_CATEGORY,
$category,
@ -755,7 +755,7 @@ function handle_templates() {
// Add event to the system log.
$user_id = api_get_user_id();
$category = $_GET['category'];
event_system(LOG_CONFIGURATION_SETTINGS_CHANGE, LOG_CONFIGURATION_SETTINGS_CATEGORY, $category, api_get_utc_datetime(), $user_id);
Event::addEvent(LOG_CONFIGURATION_SETTINGS_CHANGE, LOG_CONFIGURATION_SETTINGS_CATEGORY, $category, api_get_utc_datetime(), $user_id);
} else {
if ($action == 'delete' && is_numeric($_GET['id'])) {
delete_template($_GET['id']);
@ -763,7 +763,7 @@ function handle_templates() {
// Add event to the system log
$user_id = api_get_user_id();
$category = $_GET['category'];
event_system(LOG_CONFIGURATION_SETTINGS_CHANGE, LOG_CONFIGURATION_SETTINGS_CATEGORY, $category, api_get_utc_datetime(), $user_id);
Event::addEvent(LOG_CONFIGURATION_SETTINGS_CHANGE, LOG_CONFIGURATION_SETTINGS_CATEGORY, $category, api_get_utc_datetime(), $user_id);
}
display_templates();
}

@ -330,7 +330,7 @@ if (!empty($_GET['category']) &&
// Add event configuration settings category to the system log.
$user_id = api_get_user_id();
$category = $_GET['category'];
event_system(
Event::addEvent(
LOG_CONFIGURATION_SETTINGS_CHANGE,
LOG_CONFIGURATION_SETTINGS_CATEGORY,
$category,
@ -342,7 +342,7 @@ if (!empty($_GET['category']) &&
if (is_array($keys) && count($keys) > 0) {
foreach ($keys as $variable) {
if (in_array($key, $settings_to_avoid)) { continue; }
event_system(
Event::addEvent(
LOG_CONFIGURATION_SETTINGS_CHANGE,
LOG_CONFIGURATION_SETTINGS_VARIABLE,
$variable,
@ -482,7 +482,7 @@ if (!empty($_GET['category'])) {
// add event to system log
$user_id = api_get_user_id();
$category = $_GET['category'];
event_system(
Event::addEvent(
LOG_CONFIGURATION_SETTINGS_CHANGE,
LOG_CONFIGURATION_SETTINGS_CATEGORY,
$category,

@ -5,6 +5,10 @@
* @author Angel Fernando Quiroz Campos <angel.quiroz@beeznest.com>
* @package chamilo.admin.openbadges
*/
use \ChamiloSession as Session;
$language_file = array('document');
$cidReset = true;
require_once '../inc/global.inc.php';
@ -40,7 +44,7 @@ if ($_SERVER['REQUEST_METHOD'] === 'POST') {
}
$fileDir = "badges/";
$fileName = sha1($_POST['name']) . ".png";
$fileName = sha1($_POST['name']);
$existsBadgesDirectory = is_dir($sysDataPath . 'badges/');
@ -58,10 +62,20 @@ if ($_SERVER['REQUEST_METHOD'] === 'POST') {
}
}
$imageExtraField = new Image($_FILES['image']['tmp_name']);
$imageExtraField->send_image($sysDataPath . $fileDir . $fileName, -1, 'png');
$skillImagePath = sprintf("%s%s%s.png", $sysDataPath, $fileDir, $fileName);
$skillImage = new Image($_FILES['image']['tmp_name']);
$skillImage->send_image($skillImagePath, -1, 'png');
$skillThumbPath = sprintf("%s%s%s-small.png", $sysDataPath, $fileDir, $fileName);
$skillImageThumb = new Image($skillImagePath);
$skillImageThumb->resize(ICON_SIZE_SMALL, ICON_SIZE_SMALL);
$skillImageThumb->send_image($skillThumbPath);
$params['icon'] = $fileDir . $fileName;
$params['icon'] = sprintf("%s%s.png", $fileDir, $fileName);
} else {
Session::write('errorMessage', get_lang('UplUnableToSaveFile'));
}
}

@ -5,6 +5,8 @@
* @author Angel Fernando Quiroz Campos <angel.quiroz@beeznest.com>
* @package chamilo.admin.openbadges
*/
use \ChamiloSession as Session;
$cidReset = true;
require_once '../inc/global.inc.php';
@ -15,6 +17,12 @@ if (!api_is_platform_admin() || api_get_setting('allow_skills_tool') !== 'true')
$this_section = SECTION_PLATFORM_ADMIN;
$errorMessage = null;
if (Session::has('errorMessage')) {
$errorMessage = Session::read('errorMessage');
}
$objSkill = new Skill();
$skills = $objSkill->get_all();
@ -30,9 +38,12 @@ $interbreadcrumb = array(
);
$tpl = new Template(get_lang('Skills'));
$tpl->assign('errorMessage', $errorMessage);
$tpl->assign('platformAdminEmail', get_setting('emailAdministrator'));
$tpl->assign('skills', $skills);
$contentTemplate = $tpl->get_template('skill/badge_list.tpl');
$tpl->display($contentTemplate);
Session::erase('errorMessage');

@ -46,6 +46,7 @@ $tpl->assign('wheel_url', $url);
$url = api_get_path(WEB_AJAX_PATH).'skill.ajax.php?1=1';
$tpl->assign('url', $url);
$tpl->assign('isAdministration', true);
$content = $tpl->fetch('default/skill/skill_wheel.tpl');
$tpl->assign('content', $content);

@ -190,7 +190,7 @@ function create_zip(){
}
function rename_zip($FileZip) {
event_download(($FileZip['PATH'] == '/')?'full_export_'.date('Ymd').'.zip (folder)': basename($FileZip['PATH']).'.zip (folder)');
Event::event_download(($FileZip['PATH'] == '/')?'full_export_'.date('Ymd').'.zip (folder)': basename($FileZip['PATH']).'.zip (folder)');
$name = ($FileZip['PATH']=='/')? 'full_export_'.date('Ymd').'.zip':basename($FileZip['PATH']).'.zip';
if(file_exists($FileZip['PATH_TEMP_ARCHIVE'].'/'.$name)){ unlink($FileZip['PATH_TEMP_ARCHIVE'].'/'.$name); }
if(file_exists($FileZip['TEMP_FILE_ZIP'])) {

@ -1,6 +1,6 @@
<?php
/* For licensing terms, see /license.txt */
/**
* This tool show global Statistics on general platform events
* @package chamilo.Statistics
@ -91,10 +91,11 @@ switch ($_REQUEST['report']) {
)
);
$teachers = $students = array();
$countInvisible = isset($_GET['count_invisible_courses']) ? $_GET['count_invisible_courses'] : null;
foreach ($course_categories as $code => $name) {
$name = str_replace(get_lang('Department'), "", $name);
$teachers[$name] = Statistics::count_users(1, $code, $_GET['count_invisible_courses']);
$students[$name] = Statistics::count_users(5, $code, $_GET['count_invisible_courses']);
$teachers[$name] = Statistics::count_users(1, $code, $countInvisible);
$students[$name] = Statistics::count_users(5, $code, $countInvisible);
}
// docents for each course category
Statistics::print_stats(get_lang('Teachers'), $teachers);

@ -10,7 +10,6 @@ $language_file = 'admin';
$cidReset = true;
$this_script = 'sub_language';
require_once '../inc/global.inc.php';
require_once 'sub_language.class.php';
$this_section = SECTION_PLATFORM_ADMIN;
api_protect_admin_script();

@ -10,7 +10,7 @@
$language_file = 'admin';
$cidReset = true;
require_once '../inc/global.inc.php';
require_once 'sub_language.class.php';
$this_section = SECTION_PLATFORM_ADMIN;
api_protect_admin_script();

@ -4,13 +4,9 @@
* Sub language AJAX script to update variables
* @package chamilo.admin.sub_language
*/
/**
* Init
*/
$language_file = 'admin';
$this_script = 'sub_language';
require_once '../inc/global.inc.php';
require_once 'sub_language.class.php';
api_protect_admin_script();
@ -53,6 +49,6 @@ if (isset($new_language) && isset($language_variable) && isset($file_id)) {
echo $path_folder.' '.get_lang('IsNotWritable').'<br /> '.api_ucwords(get_lang('ErrorsFound')).': <br />'.$variables_with_problems;
} else {
echo get_lang('Saved');
}
}
}

@ -142,11 +142,7 @@ if ($action_todo) {
}
$form->addElement('select', 'lang',get_lang('Language'), $language_list_with_keys);
if (api_get_setting('wcag_anysurfer_public_pages')=='true') {
$form->addElement('textarea', 'content', get_lang('Content'));
} else {
$form->add_html_editor('content', get_lang('Content'), true, false, array('ToolbarSet' => 'PortalNews', 'Width' => '100%', 'Height' => '300'));
}
$form->add_html_editor('content', get_lang('Content'), true, false, array('ToolbarSet' => 'PortalNews', 'Width' => '100%', 'Height' => '300'));
$form->addDateRangePicker('range', get_lang('StartTimeWindow'), true, array('id' => 'date_range'));
$group = array();
@ -182,13 +178,8 @@ if ($action_todo) {
$class='save';
$form->addElement('hidden', 'action', 'edit');
}
$form->addElement('checkbox', 'send_email_test', null, get_lang('SendOnlyAnEmailToMySelfToTest'));
$form->addElement('style_submit_button', 'submit', $text, 'class="'.$class.'"');
if (api_get_setting('wcag_anysurfer_public_pages') == 'true') {
$values['content'] = WCAG_Rendering::HTML_to_text($values['content']);
}
$form->setDefaults($values);
if ($form->validate()) {
@ -205,9 +196,6 @@ if ($action_todo) {
if ($values['lang'] == 'all') {
$values['lang'] = null;
}
if (api_get_setting('wcag_anysurfer_public_pages') == 'true') {
//$values['content'] = WCAG_Rendering::text_to_HTML($values['content']);
}
$sendMail = isset($values['send_mail']) ? $values['send_mail'] : null;
@ -262,13 +250,7 @@ if ($action_todo) {
}
$show_announcement_list = true;
} else {
if (api_get_setting('wcag_anysurfer_public_pages') == 'true') {
echo '<div class="WCAG-form">';
}
$form->display();
if (api_get_setting('wcag_anysurfer_public_pages') == 'true') {
echo '</div>';
}
$show_announcement_list = false;
}
}

@ -65,17 +65,14 @@ $timeReport = new TeacherTimeReport();
if (!empty($selectedCourse)) {
$withFilter = true;
$course = api_get_course_info($selectedCourse);
$reportTitle = sprintf(get_lang('TimeReportForCourseX'), $course['title']);
$teachers = CourseManager::get_teacher_list_from_course_code($selectedCourse);
foreach ($teachers as $teacher) {
$totalTime = UserManager::getExpendedTimeInCourses(
$teacher['user_id'],
$selectedCourse,
$course['real_id'],
0,
$selectedFrom,
$selectedUntil
@ -108,7 +105,7 @@ if (!empty($selectedCourse)) {
foreach ($coaches as $coach) {
$totalTime = UserManager::getExpendedTimeInCourses(
$coach['user_id'],
$selectedCourse,
$course['real_id'],
$session['id'],
$selectedFrom,
$selectedUntil
@ -163,7 +160,7 @@ if (!empty($selectedSession)) {
foreach ($coaches as $coach) {
$totalTime = UserManager::getExpendedTimeInCourses(
$coach['user_id'],
$course['code'],
$course['id'],
$selectedSession,
$selectedFrom,
$selectedUntil
@ -210,7 +207,7 @@ if (!empty($selectedTeacher)) {
$totalTime = UserManager::getExpendedTimeInCourses(
$selectedTeacher,
$course['code'],
$course['real_id'],
0,
$selectedFrom,
$selectedUntil
@ -242,7 +239,7 @@ if (!empty($selectedTeacher)) {
$totalTime = UserManager::getExpendedTimeInCourses(
$selectedTeacher,
$course['course_code'],
$course['real_id'],
$session['id'],
$selectedFrom,
$selectedUntil

@ -235,7 +235,7 @@ $form->addGroup($group, 'mail', get_lang('SendMailToNewUser'), '&nbsp;');
$form->addElement('radio', 'radio_expiration_date', get_lang('ExpirationDate'), get_lang('NeverExpires'), 0);
$group = array ();
$group[] = $form->createElement('radio', 'radio_expiration_date', null, get_lang('On'), 1);
$group[] = $form->createElement('datepicker', 'expiration_date', null, array('form_name' => $form->getAttribute('name'), 'onchange' => 'javascript: enable_expiration_date();'));
$group[] = $form->createElement('DatePicker', 'expiration_date', null, array('form_name' => $form->getAttribute('name'), 'onchange' => 'javascript: enable_expiration_date();'));
$form->addGroup($group, 'max_member_group', null, '', false);
// Active account or inactive account
$form->addElement('radio', 'active', get_lang('ActiveAccount'), get_lang('Active'), 1);

@ -263,7 +263,7 @@ if (!$user_data['platform_admin']) {
$form->addElement('radio', 'radio_expiration_date', get_lang('ExpirationDate'), get_lang('NeverExpires'), 0);
$group = array ();
$group[] = $form->createElement('radio', 'radio_expiration_date', null, get_lang('On'), 1);
$group[] = $form->createElement('datepicker', 'expiration_date', null, array('form_name' => $form->getAttribute('name'), 'onchange' => 'javascript: enable_expiration_date();'));
$group[] = $form->createElement('DatePickerDate', 'expiration_date', null, array('form_name' => $form->getAttribute('name'), 'onchange' => 'javascript: enable_expiration_date();'));
$form->addGroup($group, 'max_member_group', null, '', false);
// Active account or inactive account

@ -188,7 +188,7 @@ if (count($sessions) > 0) {
$timeSpent = api_time_to_hms(
Tracking :: get_time_spent_on_the_course(
$user['user_id'],
$courseInfo['code'],
$courseInfo['real_id'],
$id_session
)
);
@ -286,19 +286,21 @@ if (Database::num_rows($res) > 0) {
$data = array();
$courseToolInformationTotal = null;
while ($course = Database::fetch_object($res)) {
$courseInfo = api_get_course_info($course->code);
$courseToolInformation = null;
$tools = '<a href="course_information.php?code='.$course->code.'">'.Display::return_icon('synthese_view.gif', get_lang('Overview')).'</a>'.
'<a href="'.api_get_path(WEB_COURSE_PATH).$course->directory.'">'.Display::return_icon('course_home.gif', get_lang('CourseHomepage')).'</a>' .
'<a href="course_edit.php?course_code='.$course->code.'">'.Display::return_icon('edit.gif', get_lang('Edit')).'</a>';
if ($course->status == STUDENT) {
$tools .= '<a href="user_information.php?action=unsubscribe&course_code='.$course->code.'&user_id='.$user['user_id'].'">'.Display::return_icon('delete.png', get_lang('Delete')).'</a>';
$tools .= '<a href="user_information.php?action=unsubscribe&course_code='.$course->code.'&user_id='.$user['user_id'].'">'.
Display::return_icon('delete.png', get_lang('Delete')).'</a>';
}
$timeSpent = api_time_to_hms(
Tracking :: get_time_spent_on_the_course(
$user['user_id'],
$course->code,
$courseInfo['real_id'],
0
)
);
@ -308,7 +310,7 @@ if (Database::num_rows($res) > 0) {
$course->id,
0
);
$courseInfo = api_get_course_info($course->code);
$row = array(
Display::url($course->code, $courseInfo['course_public_url']),
$course->title,

@ -324,7 +324,7 @@ function login_user($user_id) {
$main_user_table = Database::get_main_table(TABLE_MAIN_USER);
$main_admin_table = Database::get_main_table(TABLE_MAIN_ADMIN);
$track_e_login_table = Database::get_statistic_table(TABLE_STATISTIC_TRACK_E_LOGIN);
$track_e_login_table = Database::get_main_table(TABLE_STATISTIC_TRACK_E_LOGIN);
unset($_user['user_id']); // uid not in session ? prevent any hacking

@ -116,10 +116,10 @@ if (isset($_REQUEST['load_ajax'])) {
$course_info = api_get_course_info($origin_course_code);
$course_id = $course_info['real_id'];
$TABLETRACK_EXERCICES = Database::get_statistic_table(TABLE_STATISTIC_TRACK_E_EXERCICES);
$TBL_TRACK_ATTEMPT = Database::get_statistic_table(TABLE_STATISTIC_TRACK_E_ATTEMPT);
$TBL_TRACK_E_COURSE_ACCESS = Database::get_statistic_table(TABLE_STATISTIC_TRACK_E_COURSE_ACCESS);
$TBL_TRACK_E_LAST_ACCESS = Database::get_statistic_table(TABLE_STATISTIC_TRACK_E_LASTACCESS);
$TABLETRACK_EXERCICES = Database::get_main_table(TABLE_STATISTIC_TRACK_E_EXERCICES);
$TBL_TRACK_ATTEMPT = Database::get_main_table(TABLE_STATISTIC_TRACK_E_ATTEMPT);
$TBL_TRACK_E_COURSE_ACCESS = Database::get_main_table(TABLE_STATISTIC_TRACK_E_COURSE_ACCESS);
$TBL_TRACK_E_LAST_ACCESS = Database::get_main_table(TABLE_STATISTIC_TRACK_E_LASTACCESS);
$TBL_LP_VIEW = Database::get_course_table(TABLE_LP_VIEW);
$TBL_NOTEBOOK = Database::get_course_table(TABLE_NOTEBOOK);
@ -127,9 +127,9 @@ if (isset($_REQUEST['load_ajax'])) {
$TBL_STUDENT_PUBLICATION_ASSIGNMENT = Database::get_course_table(TABLE_STUDENT_PUBLICATION_ASSIGNMENT);
$TBL_ITEM_PROPERTY = Database::get_course_table(TABLE_ITEM_PROPERTY);
$TBL_DROPBOX_FILE = Database::get_course_table(TABLE_DROPBOX_FILE);
$TBL_DROPBOX_POST = Database::get_course_table(TABLE_DROPBOX_POST);
$TBL_AGENDA = Database::get_course_table(TABLE_AGENDA);
$TBL_DROPBOX_FILE = Database::get_course_table(TABLE_DROPBOX_FILE);
$TBL_DROPBOX_POST = Database::get_course_table(TABLE_DROPBOX_POST);
$TBL_AGENDA = Database::get_course_table(TABLE_AGENDA);
//1. track_e_exercises
//ORIGINAL COURSE
@ -161,7 +161,8 @@ if (isset($_REQUEST['load_ajax'])) {
if (!$update_database) {
$sql = "SELECT * FROM $TABLETRACK_EXERCICES WHERE exe_cours_id = '$origin_course_code' AND session_id = $new_session_id AND exe_user_id = $user_id ";
$sql = "SELECT * FROM $TABLETRACK_EXERCICES
WHERE exe_cours_id = '$origin_course_code' AND session_id = $new_session_id AND exe_user_id = $user_id ";
$res = Database::query($sql);
$list = array();
while($row = Database::fetch_array($res,'ASSOC')) {
@ -188,8 +189,8 @@ if (isset($_REQUEST['load_ajax'])) {
//Nothing to do because there are not relationship with a session
//3. track_e_course_access
$sql = "SELECT * FROM $TBL_TRACK_E_COURSE_ACCESS WHERE course_code = '$origin_course_code' AND session_id = $origin_session_id AND user_id = $user_id ";
$sql = "SELECT * FROM $TBL_TRACK_E_COURSE_ACCESS
WHERE c_id = '$course_id' AND session_id = $origin_session_id AND user_id = $user_id ";
$res = Database::query($sql);
$list = array();
while($row = Database::fetch_array($res,'ASSOC')) {
@ -204,14 +205,12 @@ if (isset($_REQUEST['load_ajax'])) {
$res = Database::query($sql);
if ($debug) var_dump($res);
$result_message[$TBL_TRACK_E_COURSE_ACCESS]++;
} else {
//$result_message[$TBL_TRACK_E_COURSE_ACCESS][$id] = $data;
}
}
//4. track_e_lastaccess
$sql = "SELECT access_id FROM $TBL_TRACK_E_LAST_ACCESS WHERE access_cours_code = '$origin_course_code' AND access_session_id = $origin_session_id AND access_user_id = $user_id ";
$sql = "SELECT access_id FROM $TBL_TRACK_E_LAST_ACCESS
WHERE c_id = '$course_id' AND access_session_id = $origin_session_id AND access_user_id = $user_id ";
$res = Database::query($sql);
$list = array();
while($row = Database::fetch_array($res,'ASSOC')) {
@ -231,7 +230,8 @@ if (isset($_REQUEST['load_ajax'])) {
//5. lp_item_view
//CHECK ORIGIN
$sql = "SELECT * FROM $TBL_LP_VIEW WHERE user_id = $user_id AND session_id = $origin_session_id AND c_id = $course_id ";
$sql = "SELECT * FROM $TBL_LP_VIEW
WHERE user_id = $user_id AND session_id = $origin_session_id AND c_id = $course_id ";
$res = Database::query($sql);
//Getting the list of LPs in the new session
@ -581,10 +581,11 @@ $htmlHeadXtra[] = '<script type="text/javascript">
</script>';
function get_courses_list_by_user_id_based_in_exercises($user_id) {
$TABLETRACK_EXERCICES = Database::get_statistic_table(TABLE_STATISTIC_TRACK_E_EXERCICES);
$TABLETRACK_EXERCICES = Database::get_main_table(TABLE_STATISTIC_TRACK_E_EXERCICES);
$user_id = intval($user_id);
//$sql = "SELECT DISTINCT exe_user_id, exe_cours_id as code, session_id as id_session FROM $TABLETRACK_EXERCICES WHERE exe_user_id = $user_id GROUP BY exe_user_id, exe_cours_id ORDER by exe_user_id, exe_cours_id ASC";
$sql = "SELECT DISTINCT exe_user_id, exe_cours_id as code, session_id as id_session FROM $TABLETRACK_EXERCICES WHERE exe_user_id = $user_id ORDER by exe_user_id, exe_cours_id ASC";
$sql = "SELECT DISTINCT exe_user_id, exe_cours_id as code, session_id as id_session
FROM $TABLETRACK_EXERCICES WHERE exe_user_id = $user_id ORDER by exe_user_id, exe_cours_id ASC";
$res = Database::query($sql);
$course_list = array();

File diff suppressed because it is too large Load Diff

@ -53,7 +53,7 @@ if (is_dir($full_file_name)) {
$tbl_announcement_attachment = Database::get_course_table(TABLE_ANNOUNCEMENT_ATTACHMENT);
// launch event
event_download($doc_url);
Event::event_download($doc_url);
$course_id = api_get_course_int_id();

@ -34,8 +34,6 @@ $(function() {
}
}
});
});
});

@ -565,7 +565,7 @@ class AttendanceController
) . '&action=calendar_logins'
);
$form->addDateRangePicker('range', get_lang('Range'));
$form->add_button('submit', get_lang('submit'));
$form->addButton('submit', get_lang('submit'));
if ($form->validate()) {
$values = $form->getSubmitValues();

@ -345,7 +345,11 @@ if (api_is_allowed_to_edit(null, true) ||
echo '</td>';
}
} else {
echo '<td class="checkboxes_col_'.$calendar['id'].'">';
$calendarClass = null;
if (isset($calendar)) {
$calendarClass = "checkboxes_col_".$calendar['id'];
}
echo '<td class="'.$calendarClass.'">';
echo '<div style="height:20px">';
echo '<center>&nbsp;</center>
</div>

@ -18,7 +18,7 @@ Display :: display_header('');
Display::display_introduction_section($tool);
// Tracking
event_access_tool($tool);
Event::event_access_tool($tool);
// Display
echo $content;

@ -48,7 +48,7 @@ function extldap_connect()
$ds = ldap_connect($host);
}
if (!$ds) {
$port = isset($extldap_config['port']) ? $ldap_config['port'] : 389;
$port = isset($extldap_config['port']) ? $extldap_config['port'] : 389;
error_log('EXTLDAP ERROR : cannot connect to '.$extldap_config['host'].':'.$port);
} else {
break;

@ -65,8 +65,7 @@ if ($ldap_user !== false) {
Session::write('_user', $_user);
$uidReset = true;
$logging_in = true;
event_login();
error_log("Calling event_login");
Event::event_login();
} else {
error_log('extldap_authenticate error');
$loginFailed = true;

@ -27,8 +27,7 @@ if ($isValid === 1) {
Session::write('_user', $_user);
$uidReset = true;
$logging_in = true;
event_login();
//error_log('Calling event_login');
Event::event_login();
} else {
//error_log('WS authentication error - user not approved by external WS');
$loginFailed = true;

@ -2,38 +2,38 @@
// External login module : LDAP
/**
* This file is included by main/inc/local.inc.php when extldap is activated, a user try to login
* This file is included by main/inc/local.inc.php when extldap is activated, a user try to login
* and chamilo does not find his user
* Variables that can be used :
* Variables that can be used :
* - $login : string containing the username posted by the user
* - $password : string containing the password posted by the user
*
* Please configure the exldap module in main/auth/external_login/ldap.conf.php
*
* If login succeeds, we have to add the user in the chamilo database and then
* we have 2 choices :
* 1. - set $loginFailed to false,
* - set $_SESSION['_user']['user_id'] with the dokeos user_id
*
* If login succeeds, we have to add the user in the chamilo database and then
* we have 2 choices :
* 1. - set $loginFailed to false,
* - set $_SESSION['_user']['user_id'] with the dokeos user_id
* - set $uidReset to true
* - let the script local.inc.php continue
*
* 2. - set $_SESSION['_user']['user_id'] with the dokeos user_id
* 2. - set $_SESSION['_user']['user_id'] with the dokeos user_id
* - set $_SESSION['_user']['uidReset'] to true
* - upgrade user info in dokeos database if needeed
* - redirect to any page and let local.inc.php do the magic
*
*
* If login fails we have also 2 choices :
* 1. - unset $_user['user_id']
* - set $loginFailed=true
* 1. - unset $_user['user_id']
* - set $loginFailed=true
* - set $uidReset = false
* User wil then have the user password incorrect message
*
* 2. We redirect the user to index.php with appropriate message :
* Possible messages are :
* 2. We redirect the user to index.php with appropriate message :
* Possible messages are :
* - index.php?loginFailed=1&error=access_url_inactive
* - index.php?loginFailed=1&error=account_expired
* - index.php?loginFailed=1&error=account_inactive
* - index.php?loginFailed=1&error=user_password_incorrect
* - index.php?loginFailed=1&error=user_password_incorrect
* - index.php?loginFailed=1&error=unrecognize_sso_origin');
* */
@ -55,13 +55,13 @@ if ($ldap_user !== false) {
$_user['uidReset'] = true;
Session::write('_user', $_user);
$uidReset = true;
// Is user admin?
// Is user admin?
if ($chamilo_user['admin'] === true) {
$is_platformAdmin = true;
Database::query("INSERT INTO admin values ('$chamilo_uid')");
}
}
event_login();
Event::event_login();
} else {
$loginFailed = true;
$uidReset = false;

@ -46,7 +46,7 @@ if ($user !== false && ($chamilo_uid = external_add_user($user)) !== false) {
// Can user create course
$is_allowedCreateCourse = (bool) (($user['status'] == COURSEMANAGER) or (api_get_setting('drhCourseManagerRights') and $user['status'] == SESSIONADMIN));
event_login();
Event::event_login();
} else {
$loginFailed = true;
unset($_user['user_id']);

@ -601,7 +601,7 @@ if ($form->validate()) {
Session::write('is_allowedCreateCourse', $is_allowedCreateCourse);
// Stats
event_login();
Event::event_login();
// last user login date is now
$user_last_login_datetime = 0; // used as a unix timestamp it will correspond to : 1 1 1970

@ -62,6 +62,7 @@ use \ChamiloSession as Session;
/**
* Code
*/
require_once api_get_path(SYS_CODE_PATH).'auth/external_login/ldap.inc.php';
require 'ldap_var.inc.php';
/**
* Check login and password with LDAP
@ -325,7 +326,9 @@ function ldap_set_version(&$resource) {
*/
function ldap_handle_bind(&$ldap_handler,&$ldap_bind) {
//error_log('Entering ldap_handle_bind(&$ldap_handler,&$ldap_bind)',0);
global $ldap_rdn,$ldap_pass;
global $ldap_rdn,$ldap_pass, $extldap_config;
$ldap_rdn = $extldap_config['admin_dn'];
$ldap_pass = $extldap_config['admin_password'];
if (!empty($ldap_rdn) and !empty($ldap_pass)) {
//error_log('Trying authenticated login :'.$ldap_rdn.'/'.$ldap_pass,0);
$ldap_bind = ldap_bind($ldap_handler,$ldap_rdn,$ldap_pass);
@ -352,21 +355,23 @@ function ldap_handle_bind(&$ldap_handler,&$ldap_bind) {
*/
function ldap_get_users() {
global $ldap_basedn, $ldap_host, $ldap_port, $ldap_rdn, $ldap_pass;
global $ldap_basedn, $ldap_host, $ldap_port, $ldap_rdn, $ldap_pass, $ldap_search_dn, $extldap_user_correspondance;
$keyword_firstname = trim(Database::escape_string($_GET['keyword_firstname']));
$keyword_lastname = trim(Database::escape_string($_GET['keyword_lastname']));
$keyword_username = trim(Database::escape_string($_GET['keyword_username']));
$keyword_type = Database::escape_string($_GET['keyword_type']);
$keyword_firstname = isset($_GET['keyword_firstname']) ? trim(Database::escape_string($_GET['keyword_firstname'])): '';
$keyword_lastname = isset($_GET['keyword_lastname']) ? trim(Database::escape_string($_GET['keyword_lastname'])) : '';
$keyword_username = isset($_GET['keyword_username']) ? trim(Database::escape_string($_GET['keyword_username'])) : '';
$keyword_type = isset($_GET['keyword_type']) ? Database::escape_string($_GET['keyword_type']) : '';
$ldap_query=array();
if ($keyword_username != "") {
$ldap_query[]="(uid=".$keyword_username."*)";
} else if ($keyword_lastname!=""){
$ldap_query[]="(sn=".$keyword_lastname."*)";
$ldap_query[] = str_replace('%username%', $keyword_username, $ldap_search_dn);
} else {
if ($keyword_lastname!=""){
$ldap_query[]="(".$extldap_user_correspondance['lastname']."=".$keyword_lastname."*)";
}
if ($keyword_firstname!="") {
$ldap_query[]="(givenName=".$keyword_firstname."*)";
$ldap_query[]="(".$extldap_user_correspondance['firstname']."=".$keyword_firstname."*)";
}
}
if ($keyword_type !="" && $keyword_type !="all") {
@ -380,7 +385,7 @@ function ldap_get_users() {
}
$str_query.=" )";
} else {
$str_query=$ldap_query[0];
$str_query= count($ldap_query) > 0 ? $ldap_query[0] : null;
}
$ds = ldap_connect($ldap_host, $ldap_port);
@ -421,6 +426,9 @@ function ldap_get_number_of_users() {
* @author Mustapha Alouani
*/
function ldap_get_user_data($from, $number_of_items, $column, $direction) {
global $extldap_user_correspondance;
$users = array();
$is_western_name_order = api_is_western_name_order();
if (isset($_GET['submit'])) {
@ -434,17 +442,17 @@ function ldap_get_user_data($from, $number_of_items, $column, $direction) {
//$dn_array=ldap_explode_dn($info[$key]["dn"],1);
//$user[] = $dn_array[0]; // uid is first key
//$user[] = $dn_array[0]; // uid is first key
$user[] = $info[$key]['uid'][0];
$user[] = $info[$key]['uid'][0];
$user[] = $info[$key][$extldap_user_correspondance['username']][0];
$user[] = $info[$key][$extldap_user_correspondance['username']][0];
if ($is_western_name_order) {
$user[] = api_convert_encoding($info[$key]['cn'][0], api_get_system_encoding(), 'UTF-8');
$user[] = api_convert_encoding($info[$key]['sn'][0], api_get_system_encoding(), 'UTF-8');
$user[] = api_convert_encoding($info[$key][$extldap_user_correspondance['firstname']][0], api_get_system_encoding(), 'UTF-8');
$user[] = api_convert_encoding($info[$key][$extldap_user_correspondance['lastname']][0], api_get_system_encoding(), 'UTF-8');
} else {
$user[] = api_convert_encoding($info[$key]['sn'][0], api_get_system_encoding(), 'UTF-8');
$user[] = api_convert_encoding($info[$key]['cn'][0], api_get_system_encoding(), 'UTF-8');
$user[] = api_convert_encoding($info[$key][$extldap_user_correspondance['firstname']][0], api_get_system_encoding(), 'UTF-8');
$user[] = api_convert_encoding($info[$key][$extldap_user_correspondance['lastname']][0], api_get_system_encoding(), 'UTF-8');
}
$user[] = $info[$key]['mail'][0];
$outab[] = $info[$key]['eduPersonPrimaryAffiliation'][0]; // Ici "student"
$user[] = $info[$key][$extldap_user_correspondance['username']][0];
$users[] = $user;
}
} else {
@ -462,9 +470,12 @@ function ldap_get_user_data($from, $number_of_items, $column, $direction) {
* @author Mustapha Alouani
*/
function modify_filter($user_id,$url_params, $row) {
$url_params_id="id[]=".$row[0];
$query_string="id[]=".$row[0];
if (!empty($_GET['id_session'])){
$query_string .= '&amp;id_session='.Security::remove_XSS($_GET['id_session']);
}
//$url_params_id="id=".$row[0];
$result .= '<a href="ldap_users_list.php?action=add_user&amp;user_id='.$user_id.'&amp;id_session='.Security::remove_XSS($_GET['id_session']).'&amp;'.$url_params_id.'&amp;sec_token='.$_SESSION['sec_token'].'" onclick="javascript:if(!confirm('."'".addslashes(api_htmlentities(get_lang("ConfirmYourChoice"), ENT_QUOTES, api_get_system_encoding()))."'".')) return false;">'.Display::return_icon('add_user.gif', get_lang('AddUsers')).'</a>';
$result = '<a href="ldap_users_list.php?action=add_user&amp;user_id='.$user_id.'&amp;'.$query_string.'&amp;sec_token='.$_SESSION['sec_token'].'" onclick="javascript:if(!confirm('."'".addslashes(api_htmlentities(get_lang("ConfirmYourChoice"), ENT_QUOTES, api_get_system_encoding()))."'".')) return false;">'.Display::return_icon('add_user.gif', get_lang('AddUsers')).'</a>';
return $result;
}
@ -474,26 +485,9 @@ function modify_filter($user_id,$url_params, $row) {
* @author Mustapha Alouani
*/
function ldap_add_user($login) {
global $ldap_basedn, $ldap_host, $ldap_port, $ldap_rdn, $ldap_pass;
$ds = ldap_connect($ldap_host, $ldap_port);
ldap_set_version($ds);
$user_id = 0;
if ($ds) {
$str_query="(uid=".$login.")";
$r = false;
$res = ldap_handle_bind($ds, $r);
$sr = ldap_search($ds, $ldap_basedn, $str_query);
//echo "Number of results is : ".ldap_count_entries($ds,$sr)."<p>";
$info = ldap_get_entries($ds, $sr);
for ($key = 0; $key < $info['count']; $key ++) {
$user_id = ldap_add_user_by_array($info[$key]);
}
} else {
Display :: display_error_message(get_lang('LDAPConnectionError'));
if ($ldap_user = extldap_authenticate($login, 'nopass', true)) {
return extldap_add_user_by_array($ldap_user);
}
return $user_id;
}
function ldap_add_user_by_array($data, $update_if_exists = true) {

@ -23,24 +23,24 @@
* Configuration settings
*/
// your ldap server
$ldap_host = api_get_setting('ldap_main_server_address');
$ldap_host = $extldap_config['host'][0];
// your ldap server's port number
$ldap_port = api_get_setting('ldap_main_server_port');
$ldap_port = @$extldap_config['port'] ?: null;
//domain
$ldap_basedn = api_get_setting('ldap_domain');
$ldap_basedn = $extldap_config['base_dn'];
//search term for students
$ldap_search_dn = api_get_setting('ldap_search_string');
$ldap_search_dn = $extldap_config['user_search'];
//additional server params for use of replica in case of problems
$ldap_host2 = api_get_setting('ldap_replicate_server_address');
$ldap_port2 = api_get_setting('ldap_replicate_server_port');
$ldap_host2 = count($extldap_config['host']) > 1 ? $extldap_config['host'][1] : null;
$ldap_port2 = $extldap_config['port'];
//protocol version - set to 3 for LDAP 3
$ldap_version = api_get_setting('ldap_version');
$ldap_version = $extldap_config['protocol_version'];
//non-anonymous LDAP mode
$ldap_rdn = api_get_setting('ldap_authentication_login');
$ldap_pass = api_get_setting('ldap_authentication_password');
$ldap_rdn = $extldap_config['admin_dn'];
$ldap_pass = $extldap_config['admin_password'];
$ldap_pass_placeholder = "PLACEHOLDER";

@ -34,7 +34,7 @@ if ($loginLdapSucces)
$_user['user_id'] = $uData['user_id'];
Session::write('_uid',$_uid);
// Jand: copied from event_login in events.lib.php to enable login statistics:
event_login();
Event::event_login();
}
else
{

@ -65,7 +65,7 @@ if (!empty($course_user_list)) {
if ($count == $last_item) {
$last = '<a href="#'.$login.'">'.get_lang('Last').'</a>';
}
$course_info = api_get_course_info($result['course_code']);
$course_info = api_get_course_info_by_id($result['c_id']);
$course_image = '<img src="'.$course_info['course_image'].'">';
$dates .= '<li><a href="#'.$login.'">'.api_get_utc_datetime($login).'</a></li>';
$issues .= '<li id ="'.$login.'">

@ -80,14 +80,14 @@ class ShibbolethSession
$_SESSION['noredirection'] = true;
//must be called before 'init_local.inc.php'
event_login();
Event::event_login();
//used in 'init_local.inc.php' this is BAD but and should be changed
$loginFailed = false;
$uidReset = true;
$gidReset = true;
$cidReset = false; //FALSE !!
$cidReset = false; //FALSE !!
$mainDbName = Database :: get_main_database();
$includePath = api_get_path(INCLUDE_PATH);
@ -98,4 +98,4 @@ class ShibbolethSession
return $_user;
}
}
}

@ -4,7 +4,7 @@ use \ChamiloSession as Session;
/* For licensing terms, see /license.txt */
/**
* This file contains the necessary elements to implement a Single Sign On
* This file contains the necessary elements to implement a Single Sign On
* mechanism with an external Drupal application (on which the Chamilo module
* 7.x-1.0-alpha3 or above must be implemented)
*
@ -16,7 +16,7 @@ use \ChamiloSession as Session;
*
* @package chamilo.auth.sso
*/
/**
* The SSO class allows for management of remote Single Sign On resources
*/
@ -44,9 +44,9 @@ class ssoDrupal {
$this->master_url = $this->protocol.$this->domain.$this->auth_uri;
$this->target = api_get_path(WEB_PATH);
}
/**
* Unlogs the user from the remote server
* Unlogs the user from the remote server
*/
public function logout() {
header('Location: '.$this->deauth_url);
@ -69,7 +69,7 @@ class ssoDrupal {
header('Location: '.$this->master_url.$params);
exit;
}
/**
* Validates the received active connection data with the database
* @return bool Return the loginFailed variable value to local.inc.php
@ -100,29 +100,29 @@ class ssoDrupal {
//Check the user's password
if ($uData['auth_source'] == PLATFORM_AUTH_SOURCE) {
if ($sso['secret'] === sha1($uData['username'].$sso_challenge.api_get_security_key())
if ($sso['secret'] === sha1($uData['username'].$sso_challenge.api_get_security_key())
&& ($sso['username'] == $uData['username'])) {
//Check if the account is active (not locked)
if ($uData['active']=='1') {
// check if the expiration date has not been reached
if ($uData['expiration_date'] > date('Y-m-d H:i:s') OR $uData['expiration_date']=='0000-00-00 00:00:00') {
if ($uData['expiration_date'] > date('Y-m-d H:i:s') OR $uData['expiration_date']=='0000-00-00 00:00:00') {
//If Multiple URL is enabled
if (api_get_multiple_access_url()) {
//Check the access_url configuration setting if the user is registered in the access_url_rel_user table
//Getting the current access_url_id of the platform
$current_access_url_id = api_get_current_access_url_id();
// my user is subscribed in these
// my user is subscribed in these
//sites: $my_url_list
$my_url_list = api_get_access_url_from_user($uData['user_id']);
} else {
$current_access_url_id = 1;
$my_url_list = array(1);
}
$my_user_is_admin = UserManager::is_admin($uData['user_id']);
if ($my_user_is_admin === false) {
if (is_array($my_url_list) && count($my_url_list) > 0 ) {
if (in_array($current_access_url_id, $my_url_list)) {
@ -130,7 +130,7 @@ class ssoDrupal {
$_user['user_id'] = $uData['user_id'];
$_user = api_get_user_info($_user['user_id']);
Session::write('_user', $_user);
event_login();
Event::event_login();
// Redirect to homepage
$sso_target = isset($sso['target']) ? $sso['target'] : api_get_path(WEB_PATH) .'.index.php';
header('Location: '. $sso_target);
@ -143,7 +143,7 @@ class ssoDrupal {
exit;
}
} else {
// there is no URL in the multiple
// there is no URL in the multiple
// urls list for this user
$loginFailed = true;
Session::erase('_uid');
@ -153,23 +153,23 @@ class ssoDrupal {
} else {
//Only admins of the "main" (first) Chamilo
// portal can login wherever they want
if (in_array(1, $my_url_list)) {
//Check if this admin is admin on the
if (in_array(1, $my_url_list)) {
//Check if this admin is admin on the
// principal portal
$_user['user_id'] = $uData['user_id'];
$_user = api_get_user_info($_user['user_id']);
$is_platformAdmin = $uData['status'] == COURSEMANAGER;
Session::write('is_platformAdmin', $is_platformAdmin);
Session::write('_user', $_user);
event_login();
Event::event_login();
} else {
//Secondary URL admin wants to login
//Secondary URL admin wants to login
// so we check as a normal user
if (in_array($current_access_url_id, $my_url_list)) {
$_user['user_id'] = $uData['user_id'];
$_user = api_get_user_info($_user['user_id']);
Session::write('_user',$_user);
event_login();
Event::event_login();
} else {
$loginFailed = true;
Session::erase('_uid');
@ -177,7 +177,7 @@ class ssoDrupal {
exit;
}
}
}
}
} else {
// user account expired
$loginFailed = true;
@ -215,7 +215,7 @@ class ssoDrupal {
}
return $loginFailed;
}
/**
* Decode the cookie (this function may vary depending on the
* Single Sign On implementation
@ -230,7 +230,7 @@ class ssoDrupal {
* Generate the URL for profile editing for a any user or the current user
* @param int $userId Optional. The user id
* @param boolean $asAdmin Optional. Whether get the URL for the platform admin
* @return string If the URL is obtained return the drupal_user_id. Otherwise return false
* @return string If the URL is obtained return the drupal_user_id. Otherwise return false
*/
public function generateProfileEditingURL($userId = 0, $asAdmin = false)
{
@ -243,18 +243,19 @@ class ssoDrupal {
$userExtraFieldValue = new ExtraFieldValue('user');
$drupalUserIdData = $userExtraFieldValue->get_values_by_handler_and_field_variable($userId, 'drupal_user_id');
// If this is an administrator, allow him to make some changes in
// the Chamilo profile
if ($asAdmin && api_is_platform_admin(true)) {
return api_get_path(WEB_CODE_PATH) . "admin/user_edit.php?user_id=$userId";
}
// If the user doesn't match a Drupal user, give the normal profile
// link
if ($drupalUserIdData === false) {
if ($asAdmin && api_is_platform_admin(true)) {
return api_get_path(WEB_CODE_PATH) . "admin/user_edit.php?user_id=$userId";
}
return api_get_path(WEB_CODE_PATH) . 'auth/profile.php';
}
// In all other cases, generate a link to the Drupal profile edition
$drupalUserId = $drupalUserIdData['field_value'];
$url = "{$this->protocol}{$this->domain}/user/{$drupalUserId}/edit";
return $url;
}

@ -4,11 +4,11 @@ use \ChamiloSession as Session;
/* For licensing terms, see /license.txt */
/**
* This file contains the necessary elements to implement a Single Sign On
* mechanism with an arbitrary external web application (given some light
* This file contains the necessary elements to implement a Single Sign On
* mechanism with an arbitrary external web application (given some light
* development there) and is based on the Drupal-Chamilo module implementation.
* To develop a new authentication mechanism, please extend this class and
* overwrite its method, then modify the corresponding calling code in
* overwrite its method, then modify the corresponding calling code in
* main/inc/local.inc.php
* @package chamilo.auth.sso
*/
@ -40,16 +40,16 @@ class sso {
$this->master_url = $this->protocol.$this->domain.$this->auth_uri;
$this->target = api_get_path(WEB_PATH);
}
/**
* Unlogs the user from the remote server
* Unlogs the user from the remote server
*/
public function logout()
{
header('Location: '.$this->deauth_url);
exit;
}
/**
* Sends the user to the master URL for a check of active connection
*/
@ -68,7 +68,7 @@ class sso {
header('Location: '.$this->master_url.$params);
exit;
}
/**
* Validates the received active connection data with the database
* @return bool Return the loginFailed variable value to local.inc.php
@ -79,10 +79,10 @@ class sso {
$loginFailed = false;
//change the way we recover the cookie depending on how it is formed
$sso = $this->decode_cookie($_GET['sso_cookie']);
//error_log('check_user');
//error_log('sso decode cookie: '.print_r($sso,1));
//lookup the user in the main database
$user_table = Database::get_main_table(TABLE_MAIN_USER);
$sql = "SELECT user_id, username, password, auth_source, active, expiration_date, status
@ -97,7 +97,7 @@ class sso {
//This user's authentification is managed by Chamilo itself
// check the user's password
// password hash comes already parsed in sha1, md5 or none
/*
error_log($sso['secret']);
error_log($uData['password']);
@ -125,7 +125,7 @@ class sso {
// check if the expiration date has not been reached
if ($uData['expiration_date'] > date('Y-m-d H:i:s')
or $uData['expiration_date']=='0000-00-00 00:00:00') {
//If Multiple URL is enabled
if (api_get_multiple_access_url()) {
//Check the access_url configuration setting if
@ -139,9 +139,9 @@ class sso {
$current_access_url_id = 1;
$my_url_list = array(1);
}
$my_user_is_admin = UserManager::is_admin($uData['user_id']);
if ($my_user_is_admin === false) {
if (is_array($my_url_list) && count($my_url_list) > 0) {
if (in_array($current_access_url_id, $my_url_list)) {
@ -149,7 +149,7 @@ class sso {
$_user['user_id'] = $uData['user_id'];
$_user = api_get_user_info($_user['user_id']);
Session::write('_user', $_user);
event_login();
Event::event_login();
// Redirect to homepage
$sso_target = isset($sso['target']) ? $sso['target'] : api_get_path(WEB_PATH) .'.index.php';
header('Location: '. $sso_target);
@ -180,7 +180,7 @@ class sso {
$is_platformAdmin = $uData['status'] == COURSEMANAGER;
Session::write('is_platformAdmin', $is_platformAdmin);
Session::write('_user', $_user);
event_login();
Event::event_login();
} else {
//Secondary URL admin wants to login
// so we check as a normal user
@ -188,7 +188,7 @@ class sso {
$_user['user_id'] = $uData['user_id'];
$_user = api_get_user_info($_user['user_id']);
Session::write('_user', $_user);
event_login();
Event::event_login();
} else {
$loginFailed = true;
Session::erase('_uid');
@ -243,7 +243,7 @@ class sso {
}
return $loginFailed;
}
/**
* Decode the cookie (this function may vary depending on the
* Single Sign On implementation
@ -259,7 +259,7 @@ class sso {
* Generate the URL for profile editing for a any user or the current user
* @param int $userId Optional. The user id
* @param boolean $asAdmin Optional. Whether get the URL for the platform admin
* @return string The SSO URL
* @return string The SSO URL
*/
public function generateProfileEditingURL($userId = 0, $asAdmin = false)
{

@ -6,9 +6,6 @@
* @package chamilo.blogs
*/
/**
* INIT
*/
// name of the language file that needs to be included
$language_file = "blog";
require_once '../inc/global.inc.php';
@ -22,18 +19,11 @@ if (empty($blog_id)) {
$this_section = SECTION_COURSES;
$current_course_tool = TOOL_BLOGS;
/* ACCESS RIGHTS */
// notice for unauthorized people.
api_protect_course_script(true);
//session
if(isset($_GET['id_session'])) {
$_SESSION['id_session'] = intval($_GET['id_session']);
}
$lib_path = api_get_path(LIBRARY_PATH);
$blog_table_attachment = Database::get_course_table(TABLE_BLOGS_ATTACHMENT);
$nameTools = get_lang('Blogs');
@ -41,95 +31,146 @@ $DaysShort = api_get_week_days_short();
$DaysLong = api_get_week_days_long();
$MonthsLong = api_get_months_long();
$current_page = $_GET['action'];
$action = isset($_GET['action']) ? $_GET['action'] : null;
/*
PROCESSING
*/
$safe_post_title = Security::remove_XSS($_POST['post_title']);
$safe_post_file_comment = Security::remove_XSS($_POST['post_file_comment']);
$safe_post_full_text = Security::remove_XSS(stripslashes(api_html_entity_decode($_POST['post_full_text'])), COURSEMANAGERLOWSECURITY);
$safe_comment_text = Security::remove_XSS(stripslashes(api_html_entity_decode($_POST['comment_text'])), COURSEMANAGERLOWSECURITY);
$safe_comment_title = Security::remove_XSS($_POST['comment_title']);
$safe_task_name = Security::remove_XSS($_POST['task_name']);
$safe_task_description = Security::remove_XSS($_POST['task_description']);
if (!empty($_POST['new_post_submit']) AND !empty($_POST['post_title'])) {
Blog :: create_post($safe_post_title, $safe_post_full_text, $safe_post_file_comment,$blog_id);
$safe_post_file_comment = isset($_GET['post_file_comment']) ? Security::remove_XSS($_POST['post_file_comment']) : null;
$safe_comment_text = isset($_GET['comment_text']) ? Security::remove_XSS(stripslashes(api_html_entity_decode($_POST['comment_text'])), COURSEMANAGERLOWSECURITY) : null;
$safe_comment_title = isset($_GET['comment_title']) ? Security::remove_XSS($_POST['comment_title']) : null;
$safe_task_name = isset($_GET['task_name']) ? Security::remove_XSS($_POST['task_name']) : null;
$safe_task_description = isset($_GET['task_description']) ? Security::remove_XSS($_POST['task_description']) : null;
if (!empty($_POST['new_post_submit'])) {
Blog:: create_post(
$_POST['title'],
$_POST['full_text'],
$_POST['post_file_comment'],
$blog_id
);
$return_message = array('type' => 'confirmation', 'message' => get_lang('BlogAdded'));
}
if (!empty($_POST['edit_post_submit']))
{
$safe_post_title = Security::remove_XSS($_POST['post_title']);
Blog :: edit_post($_POST['post_id'], $safe_post_title, $safe_post_full_text, $blog_id);
if (!empty($_POST['edit_post_submit'])) {
Blog:: edit_post(
$_POST['post_id'],
$_POST['title'],
$_POST['full_text'],
$blog_id
);
$return_message = array('type' => 'confirmation', 'message' => get_lang('BlogEdited'));
}
if (!empty($_POST['new_comment_submit']))
{
Blog :: create_comment($safe_comment_title, $safe_comment_text, $safe_post_file_comment,$blog_id, (int)$_GET['post_id'], $_POST['comment_parent_id']);
if (!empty($_POST['new_comment_submit'])) {
Blog:: create_comment(
$_POST['title'],
$_POST['comment'],
$_POST['post_file_comment'],
$blog_id,
$_GET['post_id'],
$_POST['comment_parent_id']
);
$return_message = array('type' => 'confirmation', 'message' => get_lang('CommentAdded'));
}
if (!empty($_POST['new_task_submit']))
{
Blog :: create_task($blog_id, $safe_task_name, $safe_task_description, $_POST['chkArticleDelete'], $_POST['chkArticleEdit'], $_POST['chkCommentsDelete'], $_POST['task_color']);
if (!empty($_POST['new_task_submit'])) {
Blog:: create_task(
$blog_id,
$safe_task_name,
$safe_task_description,
$_POST['chkArticleDelete'],
$_POST['chkArticleEdit'],
$_POST['chkCommentsDelete'],
$_POST['task_color']
);
$return_message = array('type' => 'confirmation', 'message' => get_lang('TaskCreated'));
}
if (isset($_POST['edit_task_submit']))
{
Blog :: edit_task($_POST['blog_id'], $_POST['task_id'], $safe_task_name, $safe_task_description, $_POST['chkArticleDelete'], $_POST['chkArticleEdit'],$_POST['chkCommentsDelete'], $_POST['task_color']);
$return_message = array('type' => 'confirmation', 'message' => get_lang('TaskEdited'));
if (isset($_POST['edit_task_submit'])) {
Blog:: edit_task(
$_POST['blog_id'],
$_POST['task_id'],
$safe_task_name,
$safe_task_description,
$_POST['chkArticleDelete'],
$_POST['chkArticleEdit'],
$_POST['chkCommentsDelete'],
$_POST['task_color']
);
$return_message = array(
'type' => 'confirmation',
'message' => get_lang('TaskEdited')
);
}
if (!empty($_POST['assign_task_submit']))
{
Blog :: assign_task($blog_id, $_POST['task_user_id'], $_POST['task_task_id'], $_POST['task_year']."-".$_POST['task_month']."-".$_POST['task_day']);
$return_message = array('type' => 'confirmation', 'message' => get_lang('TaskAssigned'));
if (!empty($_POST['assign_task_submit'])) {
Blog:: assign_task(
$blog_id,
$_POST['task_user_id'],
$_POST['task_task_id'],
$_POST['task_year'] . "-" . $_POST['task_month'] . "-" . $_POST['task_day']
);
$return_message = array(
'type' => 'confirmation',
'message' => get_lang('TaskAssigned')
);
}
if (isset($_POST['assign_task_edit_submit']))
{
Blog :: edit_assigned_task($blog_id, $_POST['task_user_id'], $_POST['task_task_id'], $_POST['task_year']."-".$_POST['task_month']."-".$_POST['task_day'], $_POST['old_user_id'], $_POST['old_task_id'], $_POST['old_target_date']);
$return_message = array('type' => 'confirmation', 'message' => get_lang('AssignedTaskEdited'));
if (isset($_POST['assign_task_edit_submit'])) {
Blog:: edit_assigned_task(
$blog_id,
$_POST['task_user_id'],
$_POST['task_task_id'],
$_POST['task_year'] . "-" . $_POST['task_month'] . "-" . $_POST['task_day'],
$_POST['old_user_id'],
$_POST['old_task_id'],
$_POST['old_target_date']
);
$return_message = array(
'type' => 'confirmation',
'message' => get_lang('AssignedTaskEdited')
);
}
if (!empty($_POST['new_task_execution_submit']))
{
Blog :: create_comment($safe_comment_title, $safe_comment_text, $blog_id, (int)$_GET['post_id'], $_POST['comment_parent_id'], $_POST['task_id']);
$return_message = array('type' => 'confirmation', 'message' => get_lang('CommentCreated'));
if (!empty($_POST['new_task_execution_submit'])) {
Blog:: create_comment(
$safe_comment_title,
$safe_comment_text,
$blog_id,
(int)$_GET['post_id'],
$_POST['comment_parent_id'],
$_POST['task_id']
);
$return_message = array(
'type' => 'confirmation',
'message' => get_lang('CommentCreated')
);
}
if (!empty($_POST['register']))
{
if (!empty($_POST['register'])) {
if (is_array($_POST['user'])) {
foreach ($_POST['user'] as $index => $user_id)
{
foreach ($_POST['user'] as $index => $user_id) {
Blog :: set_user_subscribed((int)$_GET['blog_id'], $user_id);
}
}
}
if (!empty($_POST['unregister']))
{
if (!empty($_POST['unregister'])) {
if (is_array($_POST['user'])) {
foreach ($_POST['user'] as $index => $user_id)
{
foreach ($_POST['user'] as $index => $user_id) {
Blog :: set_user_unsubscribed((int)$_GET['blog_id'], $user_id);
}
}
}
if (!empty($_GET['register']))
{
if (!empty($_GET['register'])) {
Blog :: set_user_subscribed((int)$_GET['blog_id'], (int)$_GET['user_id']);
$return_message = array('type' => 'confirmation', 'message' => get_lang('UserRegistered'));
$flag = 1;
}
if (!empty($_GET['unregister']))
{
if (!empty($_GET['unregister'])) {
Blog :: set_user_unsubscribed((int)$_GET['blog_id'], (int)$_GET['user_id']);
}
if (isset($_GET['action']) && $_GET['action'] == 'manage_tasks') {
if (isset($_GET['do']) && $_GET['do'] == 'delete')
{
if (isset($_GET['do']) && $_GET['do'] == 'delete') {
Blog :: delete_task($blog_id, (int)$_GET['task_id']);
$return_message = array('type' => 'confirmation', 'message' => get_lang('TaskDeleted'));
}
@ -138,54 +179,40 @@ if (isset($_GET['action']) && $_GET['action'] == 'manage_tasks') {
Blog :: delete_assigned_task($blog_id, intval($_GET['task_id']), intval($_GET['user_id']));
$return_message = array('type' => 'confirmation', 'message' => get_lang('TaskAssignmentDeleted'));
}
}
if (isset($_GET['action']) && $_GET['action'] == 'view_post') {
$task_id = (isset ($_GET['task_id']) && is_numeric($_GET['task_id'])) ? $_GET['task_id'] : 0;
if (isset($_GET['do']) && $_GET['do'] == 'delete_comment')
{
if (api_is_allowed('BLOG_'.$blog_id, 'article_comments_delete', $task_id))
{
if (isset($_GET['do']) && $_GET['do'] == 'delete_comment') {
if (api_is_allowed('BLOG_'.$blog_id, 'article_comments_delete', $task_id)) {
Blog :: delete_comment($blog_id, (int)$_GET['post_id'],(int)$_GET['comment_id']);
$return_message = array('type' => 'confirmation', 'message' => get_lang('CommentDeleted'));
}
else
{
} else {
$error = true;
$message = get_lang('ActionNotAllowed');
}
}
if (isset($_GET['do']) && $_GET['do'] == 'delete_article')
{
if (api_is_allowed('BLOG_'.$blog_id, 'article_delete', $task_id))
{
if (isset($_GET['do']) && $_GET['do'] == 'delete_article') {
if (api_is_allowed('BLOG_'.$blog_id, 'article_delete', $task_id)) {
Blog :: delete_post($blog_id, (int)$_GET['article_id']);
$current_page = ''; // Article is gone, go to blog home
$action = ''; // Article is gone, go to blog home
$return_message = array('type' => 'confirmation', 'message' => get_lang('BlogDeleted'));
}
else
{
} else {
$error = true;
$message = get_lang('ActionNotAllowed');
}
}
if (isset($_GET['do']) && $_GET['do'] == 'rate')
{
if (isset($_GET['type']) && $_GET['type'] == 'post')
{
if (api_is_allowed('BLOG_'.$blog_id, 'article_rate'))
{
if (isset($_GET['do']) && $_GET['do'] == 'rate') {
if (isset($_GET['type']) && $_GET['type'] == 'post') {
if (api_is_allowed('BLOG_'.$blog_id, 'article_rate')) {
Blog :: add_rating('post', $blog_id, (int)$_GET['post_id'], (int)$_GET['rating']);
$return_message = array('type' => 'confirmation', 'message' => get_lang('RatingAdded'));
}
}
if (isset($_GET['type']) && $_GET['type'] == 'comment')
{
if (api_is_allowed('BLOG_'.$blog_id, 'article_comments_add'))
{
if (isset($_GET['type']) && $_GET['type'] == 'comment') {
if (api_is_allowed('BLOG_'.$blog_id, 'article_comments_add')) {
Blog :: add_rating('comment', $blog_id, (int)$_GET['comment_id'], (int)$_GET['rating']);
$return_message = array('type' => 'confirmation', 'message' => get_lang('RatingAdded'));
}
@ -198,7 +225,7 @@ if (isset($_GET['action']) && $_GET['action'] == 'view_post') {
$htmlHeadXtra[] = '<script src="tbl_change.js" type="text/javascript"></script>';
// Set bredcrumb
switch ($current_page) {
switch ($action) {
case 'new_post' :
$nameTools = get_lang('NewPost');
$interbreadcrumb[] = array ('url' => "blog.php?blog_id=$blog_id", "name" => Blog :: get_blog_title($blog_id));
@ -244,7 +271,6 @@ if (!empty($return_message)) {
}
}
// actions
echo '<div class=actions>';
?>
@ -256,9 +282,8 @@ echo '<div class=actions>';
echo '</div>';
// Tool introduction
Display::display_introduction_section(TOOL_BLOG);
Display::display_introduction_section(TOOL_BLOGS);
//Display::display_header($nameTools,'Blogs');
?>
<div class="sectiontitle"><?php echo Blog::get_blog_title($blog_id); ?></div>
<div class="sectioncomment"><?php echo Blog::get_blog_subtitle($blog_id); ?></div>
@ -309,7 +334,7 @@ if (isset($error)) {
}
if (isset($flag) && $flag == '1') {
$current_page = "manage_tasks";
$action = "manage_tasks";
Blog :: display_assign_task_form($blog_id);
}
@ -338,13 +363,13 @@ if (isset ($_GET['task_id']) && is_numeric($_GET['task_id'])) {
$user_task = true;
}
switch ($current_page) {
case 'new_post' :
switch ($action) {
case 'new_post':
if (api_is_allowed('BLOG_'.$blog_id, 'article_add', $user_task ? $task_id : 0)) {
// we show the form if
// 1. no post data
// 2. there is post data and the required field is empty
if (!$_POST OR (!empty($_POST) AND empty($_POST['post_title']))) {
if (!$_POST OR (!empty($_POST) AND empty($_POST['title']))) {
// if there is post data there is certainly an error in the form
if ($_POST) {
Display::display_error_message(get_lang('FormHasErrorsPleaseComplete'));

@ -1,13 +1,12 @@
<?php
/* For licensing terms, see /license.txt */
/**
* BLOG HOMEPAGE
* This file takes care of all blog navigation and displaying.
* @package chamilo.blogs
*/
/**
* Code
*/
// name of the language file that needs to be included
$language_file = 'blog';
@ -23,7 +22,7 @@ $blog_table_attachment = Database::get_course_table(TABLE_BLOGS_ATTACHMENT);
api_protect_course_script(true);
// ONLY USERS REGISTERED IN THE COURSE
if((!$is_allowed_in_course || !$is_courseMember) && !api_is_allowed_to_edit()) {
if ((!$is_allowed_in_course || !$is_courseMember) && !api_is_allowed_to_edit()) {
api_not_allowed(true);//print headers/footers
}
@ -43,33 +42,26 @@ if (api_is_allowed_to_edit()) {
$current_section=get_lang('EditBlog');
$my_url='action=edit&amp;blog_id='.Security::remove_XSS($_GET['blog_id']);
}
$interbreadcrumb[]= array (
'url' => 'blog_admin.php?'.$my_url,
'name' => $current_section
);
/*$interbreadcrumb[] = array(
'url' => 'blog_admin.php?' . $my_url,
'name' => $current_section
);*/
Display::display_header('');
} else {
}
echo '<div class="actions">';
echo "<a href='".api_get_self()."?".api_get_cidreq()."&action=add'>",Display::return_icon('new_blog.png',get_lang('AddBlog'),'',ICON_SIZE_MEDIUM)."</a>";
echo "<a href='".api_get_self()."?".api_get_cidreq()."&action=add'>",
Display::return_icon('new_blog.png',get_lang('AddBlog'),'',ICON_SIZE_MEDIUM)."</a>";
echo '</div>';
/*
PROCESSING..
*/
$get_blog_name = Security::remove_XSS($_POST['blog_name']);
$get_blog_subtitle = Security::remove_XSS($_POST['blog_subtitle']);
$get_blog_id = Security::remove_XSS($_POST['blog_id']);
if (!empty($_POST['new_blog_submit']) AND !empty($_POST['blog_name'])) {
if (strlen(trim($_POST['blog_name']))>0) {
Blog::create_blog($get_blog_name,$get_blog_subtitle);
if (isset($_POST['blog_name'])) {
Blog::create_blog($_POST['blog_name'], $_POST['blog_subtitle']);
Display::display_confirmation_message(get_lang('BlogStored'));
}
}
if (!empty($_POST['edit_blog_submit']) AND !empty($_POST['blog_name'])) {
if (strlen(trim($_POST['blog_name']))>0) {
Blog::edit_blog($get_blog_id,$get_blog_name,$get_blog_subtitle);
Blog::edit_blog($_POST['blog_id'], $_POST['blog_name'], $_POST['blog_subtitle']);
Display::display_confirmation_message(get_lang('BlogEdited'));
}
}
@ -96,11 +88,11 @@ if (api_is_allowed_to_edit()) {
/*if ($_POST){
Display::display_error_message(get_lang('FormHasErrorsPleaseComplete'));
}*/
if (strlen($_POST['blog_name'])==0) {
/*if (strlen($_POST['blog_name'])==0) {
if (count($_POST)>0) {
Display::display_error_message(get_lang('FormHasErrorsPleaseComplete'));
}
}
}*/
Blog::display_new_blog_form();
}
}

@ -51,7 +51,7 @@ $tbl_blogs_attachment = Database::get_course_table(TABLE_BLOGS_ATTACHMENT);
$course_id = api_get_course_int_id();
// launch event
event_download($doc_url);
Event::event_download($doc_url);
$sql = 'SELECT filename FROM '.$tbl_blogs_attachment.'
WHERE c_id = '.$course_id.' AND path LIKE BINARY "'.Database::escape_string($doc_url).'"';

@ -63,7 +63,7 @@ function plus_repeated_event() {
// setting the name of the tool
$nameTools = get_lang('Agenda');
event_access_tool(TOOL_CALENDAR_EVENT);
Event::event_access_tool(TOOL_CALENDAR_EVENT);
// permission stuff - also used by loading from global in agenda.inc.php
$is_allowed_to_edit = api_is_allowed_to_edit(false, true) OR (api_get_course_setting('allow_user_edit_agenda') && !api_is_anonymous());

@ -67,7 +67,7 @@ if (is_dir($full_file_name)) {
$tbl_agenda_attachment = Database::get_course_table(TABLE_AGENDA_ATTACHMENT);
// launch event
event_download($doc_url);
Event::event_download($doc_url);
$sql='SELECT filename FROM '.$tbl_agenda_attachment.'
WHERE c_id = '.$course_id.' AND path LIKE BINARY "'.Database::escape_string($doc_url).'"';

@ -6,7 +6,6 @@
* @package chamilo.chat
*/
$language_file = array('chat');
require_once '../inc/global.inc.php';
$current_course_tool = TOOL_CHAT;
$this_section = SECTION_COURSES;
@ -26,7 +25,7 @@ if ($origin != 'whoisonline') {
/* TRACKING */
event_access_tool(TOOL_CHAT);
Event::event_access_tool(TOOL_CHAT);
header('Content-Type: text/html; charset='.api_get_system_encoding());
/*

@ -10,7 +10,6 @@
define('FRAME', 'chat');
$language_file = array('chat');
require_once '../inc/global.inc.php';
$course = $_GET['cidReq'];

@ -10,8 +10,6 @@
define('FRAME', 'hidden');
$language_file = array('chat');
require_once '../inc/global.inc.php';
require_once 'chat_functions.lib.php';

@ -10,7 +10,6 @@
*/
define('FRAME', 'message');
$language_file = array('chat');
require_once '../inc/global.inc.php';
require_once api_get_path(SYS_CODE_PATH).'chat/chat_functions.lib.php';

@ -8,7 +8,6 @@
*/
define('FRAME', 'online');
$language_file = array('chat');
require_once '../inc/global.inc.php';

@ -54,12 +54,7 @@ $form->addElement('hidden', 'description_type',$description_type);
$form->addElement('hidden', 'sec_token',$token);
$form->add_textfield('title', get_lang('Title'), true, array('size'=>'width: 350px;'));
$form->applyFilter('title','html_filter');
if (api_get_setting('wcag_anysurfer_public_pages')=='true') {
WCAG_rendering::prepare_admin_form($description_content, $form);
} else {
$form->add_html_editor('contentDescription', get_lang('Content'), true, false, array('ToolbarSet' => 'TrainingDescription', 'Width' => '100%', 'Height' => '200'));
}
$form->add_html_editor('contentDescription', get_lang('Content'), true, false, array('ToolbarSet' => 'TrainingDescription', 'Width' => '100%', 'Height' => '200'));
$form->addElement('style_submit_button', null, get_lang('Save'), 'class="save"');
// display default questions
@ -68,10 +63,4 @@ if (isset ($question[$description_type])) {
$message .= $question[$description_type];
Display::display_normal_message($message, false);
}
if (api_get_setting('wcag_anysurfer_public_pages')=='true') {
echo (WCAG_Rendering::editor_header());
}
$form->display();
if (api_get_setting('wcag_anysurfer_public_pages')=='true') {
echo (WCAG_Rendering::editor_footer());
}

@ -19,14 +19,14 @@ use Header;
/**
* Ajax controller. Dispatch request and perform required action.
*
* - delete category/link
*
*
* - delete category/link
*
* Usage:
*
*
* $controller = AjaxController::instance();
* $controller->run();
*
*
* @author Laurent Opprecht <laurent@opprecht.info> for the Univesity of Genevas
* @license /license.txt
*/
@ -38,7 +38,7 @@ class AjaxController extends \Controller
/**
* Return the instance of the controller.
*
*
* @return \CourseDescription\AjaxController
*/
public static function instance()
@ -52,15 +52,15 @@ class AjaxController extends \Controller
protected function __construct()
{
}
/**
* Prepare the environment. Set up breadcrumps and raise tracking event.
* Prepare the environment. Set up breadcrumps and raise tracking event.
*/
protected function prolog()
{
event_access_tool(TOOL_COURSE_DESCRIPTION);
Event::event_access_tool(TOOL_COURSE_DESCRIPTION);
}
public function is_allowed_to_edit()
@ -79,7 +79,7 @@ class AjaxController extends \Controller
}
return true;
}
public function authorize()
{
$authorize = api_protect_course_script();
@ -102,7 +102,7 @@ class AjaxController extends \Controller
}
/**
*
*
*/
public function delete()
{
@ -120,7 +120,7 @@ class AjaxController extends \Controller
$this->response($success);
}
/**
*
*
*/
public function delete_by_course()
{
@ -128,11 +128,11 @@ class AjaxController extends \Controller
$this->forbidden();
return;
}
$course = (object) array();
$course->c_id = Request::get_c_id();
$course->session_id = Request::get_session_id();
$success = CourseDescription::repository()->remove_by_course($course);
$this->response($success);
@ -149,7 +149,7 @@ class AjaxController extends \Controller
}
/**
* Action exists but implementation is missing.
* Action exists but implementation is missing.
*/
public function missing()
{
@ -158,9 +158,9 @@ class AjaxController extends \Controller
/**
* Display a standard json responce.
*
*
* @param bool $success
* @param string $message
* @param string $message
* @param object $data
*/
public function response($success = false, $message = '', $data = null)

@ -13,18 +13,18 @@ use Javascript;
/**
* Controller for course description. Dispatch request and peform required action.
*
*
* - list course description for course
* - add a new course description to a course/session
* - edit a course session
* - delete a course session
*
*
* Usage:
*
*
* $controller = CourseDescriptionController::instance();
* $controller->run();
*
* @package chamilo.course_description
*
* @package chamilo.course_description
* @author Christian Fasanando <christian1827@gmail.com>
* @author Laurent Opprecht <laurent@opprecht.info> for the Univesity of Genevas
* @license see /license.txt
@ -42,8 +42,8 @@ class Controller extends \Controller
/**
* Return the instance of the controller.
*
* @return CourseDescriptionController
*
* @return CourseDescriptionController
*/
public static function instance()
{
@ -56,13 +56,13 @@ class Controller extends \Controller
protected function __construct()
{
}
/**
* Action to perform.
* Action to perform.
* Returns the request parameter.
*
*
* @return string
*/
public function get_action()
@ -95,8 +95,8 @@ class Controller extends \Controller
/**
* Whether the call is authorized or not.
*
* @return boolean
*
* @return boolean
*/
public function authorize()
{
@ -114,7 +114,7 @@ class Controller extends \Controller
}
/**
* Prepare the environment. Set up breadcrumps and raise tracking event.
* Prepare the environment. Set up breadcrumps and raise tracking event.
*/
protected function prolog()
{
@ -135,12 +135,12 @@ class Controller extends \Controller
$current_course_tool = TOOL_COURSE_DESCRIPTION;
// Tracking
event_access_tool(TOOL_COURSE_DESCRIPTION);
Event::event_access_tool(TOOL_COURSE_DESCRIPTION);
}
/**
* Javascript used by the controller
*
*
* @return string
*/
public function javascript()
@ -156,10 +156,10 @@ class Controller extends \Controller
/**
* Returns a url for an action that the controller can process
*
*
* @param string $action
* @param array $params
* @return string
* @return string
*/
public function url($action = '', $params = array())
{
@ -185,8 +185,8 @@ class Controller extends \Controller
/**
* List course descriptions.
*
* @param array messages
*
* @param array messages
*/
public function listing()
{
@ -203,7 +203,7 @@ class Controller extends \Controller
}
/**
* Performs the edit action.
* Performs the edit action.
*/
public function edit()
{
@ -211,7 +211,7 @@ class Controller extends \Controller
$this->forbidden();
return;
}
$id = Request::get_id();
$c_id = Request::get_c_id();
@ -223,13 +223,13 @@ class Controller extends \Controller
if ($form->validate()) {
$success = $repo->save($description);
$message = $success ? get_lang('DescriptionUpdated') : get_lang('Error');
$message = $success ? get_lang('CourseDescriptionUpdated') : get_lang('Error');
$home = $this->url(self::ACTION_DEFAULT);
Redirect::go($home);
}
$data = (object) array();
$data->form = $form;
$this->render('edit', $data);
@ -285,7 +285,7 @@ class Controller extends \Controller
/**
* Performs the delete action.
*
*
* @todo: could be worth to require a security token in the url and check it. Currently confirmation is done through javascript confirmation only.
*/
public function delete()
@ -344,7 +344,7 @@ class Controller extends \Controller
$path = $file->tmp_name;
$reader = new CsvReader($path);
$descriptions = $reader->get_items();
$c_id = Request::get_c_id();
$session_id = Request::get_session_id();
$course = (object) array();
@ -364,10 +364,10 @@ class Controller extends \Controller
/**
* Render a template using data. Adds a few common parameters to the data array.
*
*
* @see /main/template/default/course_description/
* @param string $template
* @param array $data
* @param array $data
*/
protected function render($template, $data)
{

@ -45,7 +45,7 @@ class CourseDescriptionController
$data['descriptions'] = array($data['descriptions']);
}
foreach ($data['descriptions'] as $description) {
if (strpos($description, '<iframe') !== false && $browser['name'] == 'Chrome') {
if (strpos($description['content'], '<iframe') !== false && $browser['name'] == 'Chrome') {
header("X-XSS-Protection: 0");
}
}
@ -74,11 +74,7 @@ class CourseDescriptionController
$check = Security::check_token();
if ($check) {
$title = $_POST['title'];
if (api_get_setting('wcag_anysurfer_public_pages') == 'true') {
$content = WCAG_Rendering::prepareXHTML();
} else {
$content = $_POST['contentDescription'];
}
$content = $_POST['contentDescription'];
$description_type = $_POST['description_type'];
$id = $_POST['id'];
$progress = $_POST['progress'];
@ -166,11 +162,7 @@ class CourseDescriptionController
$check = Security::check_token();
if ($check) {
$title = $_POST['title'];
if (api_get_setting('wcag_anysurfer_public_pages')=='true') {
$content = WCAG_Rendering::prepareXHTML();
} else {
$content = $_POST['contentDescription'];
}
$content = $_POST['contentDescription'];
$description_type = $_POST['description_type'];
if ($description_type >= ADD_BLOCK) {
$course_description->set_description_type($description_type);

@ -70,14 +70,14 @@ class CourseDescriptionForm extends \FormValidator
$defaults['title'] = $description->title;
$defaults['content'] = $description->content;
$this->add_header($description->get_title());
$this->add_hidden('description_type', $description->get_description_type());
$this->add_hidden('c_id', $description->c_id);
$this->add_hidden('id', $description->id);
$this->addHeader($description->get_title());
$this->addHidden('description_type', $description->get_description_type());
$this->addHidden('c_id', $description->c_id);
$this->addHidden('id', $description->id);
$this->add_textfield('title', get_lang('Title'), true, array('size' => 'width: 350px;'));
$this->applyFilter('title', 'html_filter');
$this->add_html_editor('content', get_lang('Content'), true, false, array('ToolbarSet' => 'TrainingDescription', 'Width' => '100%', 'Height' => '200'));
$this->add_button('save', get_lang('Save'), 'class="save"');
$this->addButton('save', get_lang('Save'), 'class="save"');
$this->setDefaults($defaults);
}

@ -11,7 +11,7 @@
api_protect_course_script(true);
$original_id = $id;
if (!$error) {
if (empty($error)) {
$token = Security::get_token();
}
// display categories
@ -58,17 +58,16 @@ $form->addElement('hidden', 'description_type',$description_type);
$form->addElement('hidden', 'sec_token',$token);
$form->add_textfield('title', get_lang('Title'), true, array('size'=>'50'));
$form->applyFilter('title','html_filter');
if (api_get_setting('wcag_anysurfer_public_pages')=='true') {
WCAG_rendering::prepare_admin_form($description_content, $form);
} else {
$form->add_html_editor('contentDescription', get_lang('Content'), true, false, array('ToolbarSet' => 'TrainingDescription', 'Width' => '100%', 'Height' => '200'));
}
$form->add_html_editor('contentDescription', get_lang('Content'), true, false, array('ToolbarSet' => 'TrainingDescription', 'Width' => '100%', 'Height' => '200'));
$form->addElement('style_submit_button', null, get_lang('Save'), 'class="save"');
// Set some default values
$default['title'] = Security::remove_XSS($description_title);
$default['contentDescription'] = Security::remove_XSS($description_content,COURSEMANAGERLOWSECURITY);
if (!empty($description_title)) {
$default['title'] = Security::remove_XSS($description_title);
}
if (!empty($description_content)) {
$default['contentDescription'] = Security::remove_XSS($description_content,COURSEMANAGERLOWSECURITY);
}
$default['description_type'] = $description_type;
$form->setDefaults($default);
@ -78,12 +77,4 @@ if (isset ($question[$description_type])) {
$message .= $question[$description_type];
Display::display_normal_message($message, false);
}
if (api_get_setting('wcag_anysurfer_public_pages')=='true') {
echo (WCAG_Rendering::editor_header());
}
$form->display();
if (api_get_setting('wcag_anysurfer_public_pages')=='true') {
echo (WCAG_Rendering::editor_footer());
}

@ -7,9 +7,6 @@
* @package chamilo.course_description
*/
// name of the language file that needs to be included
$language_file = array ('course_description', 'accessibility');
// including files
require_once '../inc/global.inc.php';
$current_course_tool = TOOL_COURSE_DESCRIPTION;

@ -2,7 +2,7 @@
/* For licensing terms, see /license.txt */
/**
* Layout (principal view) used for structuring other views
* Layout (principal view) used for structuring other views
* @author Christian Fasanando <christian1827@gmail.com>
* @package chamilo.course_description
*/
@ -17,10 +17,10 @@ Display :: display_header('');
Display::display_introduction_section(TOOL_COURSE_DESCRIPTION);
// Tracking
event_access_tool(TOOL_COURSE_DESCRIPTION);
Event::event_access_tool(TOOL_COURSE_DESCRIPTION);
// Display
echo $content;
// Footer
Display :: display_footer();
Display :: display_footer();

@ -60,7 +60,7 @@ if (isset($descriptions) && count($descriptions) > 0) {
$description['title'] = $description['title'].' '.api_get_session_image(api_get_session_id(), $user_info['status']);
//delete
echo '<a href="'.api_get_self().'?id='.$description['id'].'&cidReq='.api_get_course_id().'&id_session='.$description['session_id'].'&action=delete&description_type='.$description['description_type'].'" onclick="javascript:if(!confirm(\''.addslashes(api_htmlentities(get_lang('ConfirmYourChoice'),ENT_QUOTES,$charset)).'\')) return false;">';
echo '<a href="'.api_get_self().'?id='.$description['id'].'&cidReq='.api_get_course_id().'&id_session='.$description['session_id'].'&action=delete&description_type='.$description['description_type'].'" onclick="javascript:if(!confirm(\''.addslashes(api_htmlentities(get_lang('ConfirmYourChoice'),ENT_QUOTES,api_get_system_encoding())).'\')) return false;">';
echo Display::return_icon('delete.png', get_lang('Delete'), array('style' => 'vertical-align:middle;float:right;'),ICON_SIZE_SMALL);
echo '</a> ';

@ -14,7 +14,7 @@ use Chamilo;
/**
* Form to upload a file.
*
*
* @license /licence.txt
* @author Laurent Opprecht <laurent@opprecht.info>
*/
@ -28,19 +28,19 @@ class UploadFileForm extends \FormValidator
/**
*
*
*
*/
function init()
{
$form_name = get_lang('UploadFile');
$this->add_header($form_name);
$this->addHeader($form_name);
$label = get_lang('File');
$this->add_file('file', $label);
$this->addRule('file', get_lang('ThisFieldIsRequired'), 'required');
//$this->add_checkbox('replace', '', get_lang('ReplaceExistingEntries'));
$this->add_button('save', get_lang('Save'), array('class' => 'btn save'));
$this->addButton('save', get_lang('Save'), array('class' => 'btn save'));
// $label = get_lang('CSVMustLookLike');
// $label = "<h4>$label</h4>";

@ -183,7 +183,7 @@ api_protect_course_script(true);
/* STATISTICS */
if (!isset($coursesAlreadyVisited[$course_code])) {
event_access_course();
Event::accessCourse();
$coursesAlreadyVisited[$course_code] = 1;
Session::write('coursesAlreadyVisited', $coursesAlreadyVisited);
}

@ -22,9 +22,6 @@ $this_section = SECTION_COURSES;
$nameTools = get_lang('ModifInfo');
/* Libraries */
require_once api_get_path(INCLUDE_PATH).'conf/course_info.conf.php';
api_protect_course_script(true);
api_block_anonymous_users();
$_course = api_get_course_info();

@ -3,7 +3,7 @@
use \ChamiloSession as Session;
$language_file = array('create_course', 'registration','admin','exercice', 'course_description', 'course_info');
$language_file = array('create_course', 'registration','admin','exercice', 'course_info');
require_once '../inc/global.inc.php';

@ -8,7 +8,7 @@
*/
// name of the language file that needs to be included
$language_file = array('course_description', 'userInfo', 'admin');
$language_file = array('userInfo', 'admin');
// including files
require_once '../inc/global.inc.php';
@ -94,72 +94,7 @@ $default_thematic_plan_title = $thematic->get_default_thematic_plan_title();
$htmlHeadXtra[] = '<script type="text/javascript">
$(document).ready(function() {
//Second col
/*
$("#thematic_plan_add").live("submit", function() {
var serialize_form_content = $(this).serialize();
//Getting FCK content
var oEditor = FCKeditorAPI.GetInstance("description[1]");
content_1= oEditor.GetXHTML(true) ;
var oEditor = FCKeditorAPI.GetInstance("description[2]");
content_2= oEditor.GetXHTML(true) ;
var oEditor = FCKeditorAPI.GetInstance("description[3]");
content_3= oEditor.GetXHTML(true) ;
var oEditor = FCKeditorAPI.GetInstance("description[4]");
content_4= oEditor.GetXHTML(true) ;
var oEditor = FCKeditorAPI.GetInstance("description[5]");
content_5= oEditor.GetXHTML(true) ;
var oEditor = FCKeditorAPI.GetInstance("description[6]");
content_6= oEditor.GetXHTML(true) ;
$.ajax({
type: "POST",
url: "'.api_get_path(WEB_AJAX_PATH).'thematic.ajax.php?a=save_thematic_plan",
data: "desc[1]="+content_1+"&"+"desc[2]="+content_2+"&"+"desc[3]="+content_3+"&"+"desc[4]="+content_4+"&"+"desc[5]="+content_5+"&"+"desc[6]="+content_6+"&"+serialize_form_content,
success: function(data) {
var thematic_id = $("input[name=\"thematic_id\"]").val();
$("#thematic_plan_"+thematic_id).html(data);
$("#thematic_plan_add").html("<div class=\"confirmation-message\">'.addslashes(get_lang('Saved')).'</div>");
//location.reload(true);
}
});
//prevent the browser to follow the link
return false;
});*/
// Third col
/*
$("#thematic_advance").live("submit", function() {
var url = this.href;
var my_id = this.id;
var serialize_form_content = $(this).serialize();
//Getting FCK content
var oEditor = FCKeditorAPI.GetInstance("content");
content = oEditor.GetXHTML(true) ;
$.ajax({
type: "POST",
url: "'.api_get_path(WEB_AJAX_PATH).'thematic.ajax.php?a=save_thematic_advance",
data: "real_content=" + content + "&" +serialize_form_content,
success: function(data) {
var thematic_advance_id = $("input[name=\"thematic_advance_id\"]").val();
$("#thematic_advance_"+thematic_advance_id).html(data);
$("#thematic_advance").html("<div class=\"confirmation-message\">'.addslashes(get_lang('Saved')).'</div>");
//Only refresh if the parent is to add
if (my_id == "add_button") {
//location.reload(true);
}
}
});
//prevent the browser to follow the link
return false;
});*/
$(".thematic_advance_actions, .thematic_tools ").hide();
$(".thematic_content").mouseover(function() {
var id = parseInt(this.id.split("_")[3]);
$("#thematic_id_content_"+id ).show();
@ -179,17 +114,6 @@ $(document).ready(function() {
var id = parseInt(this.id.split("_")[4]);
$("#thematic_advance_tools_"+id ).hide();
});
/*
$("#custom_date").live("click", function() {
$("#div_custom_datetime").css("display", "none");
$("#div_datetime_by_attendance").hide();
});
$("#from_attendance").live("click", function() {
$("#div_custom_datetime").css("display", "block");
$("#div_custom_datetime").show();
$("#div_datetime_by_attendance").show();
});*/
});
</script>';

@ -2,7 +2,7 @@
/* For licensing terms, see /license.txt */
/**
* Layout (principal view) used for structuring other views
* Layout (principal view) used for structuring other views
* @author Christian Fasanando <christian1827@gmail.com>
* @package chamilo.course_progress
*/
@ -18,10 +18,10 @@ Display :: display_header('');
Display::display_introduction_section($tool);
// Tracking
event_access_tool($tool);
Event::event_access_tool($tool);
// Display
echo $content;
// Footer
Display :: display_footer();
Display :: display_footer();

@ -7,7 +7,7 @@ api_protect_course_script(true);
Display :: display_reduced_header();
// Tracking
event_access_tool($tool);
Event::event_access_tool($tool);
// Display

@ -13,6 +13,8 @@ api_protect_course_script(true);
$token = Security::get_token();
$url_token = "&sec_token=".$token;
$user_info = api_get_user_info();
$param_gradebook = '&'.api_get_cidreq();
if (api_is_allowed_to_edit(null, true)) {
echo '<div class="actions">';
@ -20,27 +22,37 @@ if (api_is_allowed_to_edit(null, true)) {
switch ($action) {
case 'thematic_add' :
case 'thematic_import_select' :
echo '<a href="index.php?'.api_get_cidreq().'">'.Display::return_icon('back.png',get_lang('BackTo').' '.get_lang('ThematicDetails'),'',ICON_SIZE_MEDIUM).'</a>';
echo '<a href="index.php?'.api_get_cidreq().'">'.
Display::return_icon('back.png',get_lang('BackTo').' '.get_lang('ThematicDetails'),'',ICON_SIZE_MEDIUM).'</a>';
break;
case 'thematic_list' :
echo '<a href="index.php?'.api_get_cidreq().'&action=thematic_add'.$url_token.'">'.Display::return_icon('new_course_progress.png',get_lang('NewThematicSection'),'',ICON_SIZE_MEDIUM).'</a>';
echo '<a href="index.php?'.api_get_cidreq().'&action=thematic_add'.$url_token.'">'.
Display::return_icon('new_course_progress.png',get_lang('NewThematicSection'),'',ICON_SIZE_MEDIUM).'</a>';
break;
case 'thematic_details' :
echo '<a href="index.php?'.api_get_cidreq().'&action=thematic_add'.$url_token.'">'.Display::return_icon('new_course_progress.png',get_lang('NewThematicSection'),'',ICON_SIZE_MEDIUM).'</a>';
echo '<a href="index.php?'.api_get_cidreq().'&action=thematic_import_select'.$url_token.'">'.Display::return_icon('import_csv.png',get_lang('ImportThematic'),'',ICON_SIZE_MEDIUM).'</a>';
echo '<a href="index.php?'.api_get_cidreq().'&action=thematic_export'.$url_token.'">'.Display::return_icon('export_csv.png',get_lang('ExportThematic'),'', ICON_SIZE_MEDIUM).'</a>';
echo '<a href="index.php?'.api_get_cidreq().'&action=thematic_export_pdf'.$url_token.'">'.Display::return_icon('pdf.png',get_lang('ExportToPDF'),'', ICON_SIZE_MEDIUM).'</a>';
echo '<a href="index.php?'.api_get_cidreq().'&action=thematic_add'.$url_token.'">'.
Display::return_icon('new_course_progress.png',get_lang('NewThematicSection'),'',ICON_SIZE_MEDIUM).'</a>';
echo '<a href="index.php?'.api_get_cidreq().'&action=thematic_import_select'.$url_token.'">'.
Display::return_icon('import_csv.png',get_lang('ImportThematic'),'',ICON_SIZE_MEDIUM).'</a>';
echo '<a href="index.php?'.api_get_cidreq().'&action=thematic_export'.$url_token.'">'.
Display::return_icon('export_csv.png',get_lang('ExportThematic'),'', ICON_SIZE_MEDIUM).'</a>';
echo '<a href="index.php?'.api_get_cidreq().'&action=thematic_export_pdf'.$url_token.'">'.
Display::return_icon('pdf.png',get_lang('ExportToPDF'),'', ICON_SIZE_MEDIUM).'</a>';
break;
default :
echo '<a href="index.php?'.api_get_cidreq().'&action=thematic_add'.$url_token.'">'.Display::return_icon('new_course_progress.png',get_lang('NewThematicSection'),'',ICON_SIZE_MEDIUM).'</a>';
echo '<a href="index.php?'.api_get_cidreq().'&action=thematic_add'.$url_token.'">'.
Display::return_icon('new_course_progress.png',get_lang('NewThematicSection'),'',ICON_SIZE_MEDIUM).'</a>';
}
echo '</div>';
}
if ($action == 'thematic_list') {
$table = new SortableTable('thematic_list', array('Thematic', 'get_number_of_thematics'), array('Thematic', 'get_thematic_data'));
$table = new SortableTable(
'thematic_list',
array('Thematic', 'get_number_of_thematics'),
array('Thematic', 'get_thematic_data')
);
$parameters['action'] = $action;
$table->set_additional_parameters($parameters);
@ -59,9 +71,14 @@ if ($action == 'thematic_list') {
}
if (isset($last_id) && $last_id) {
$link_to_thematic_plan = '<a href="index.php?'.api_get_cidreq().'&action=thematic_plan_list&thematic_id='.$last_id.'">'.Display::return_icon('lesson_plan.png', get_lang('ThematicPlan'), array('style'=>'vertical-align:middle;float:none;'),ICON_SIZE_SMALL).'</a>';
$link_to_thematic_advance = '<a href="index.php?'.api_get_cidreq().'&action=thematic_advance_list&thematic_id='.$last_id.'">'.Display::return_icon('lesson_plan_calendar.png', get_lang('ThematicAdvance'), array('style'=>'vertical-align:middle;float:none;'),ICON_SIZE_SMALL).'</a>';
Display::display_confirmation_message(get_lang('ThematicSectionHasBeenCreatedSuccessfull').'<br />'.sprintf(get_lang('NowYouShouldAddThematicPlanXAndThematicAdvanceX'),$link_to_thematic_plan, $link_to_thematic_advance), false);
$link_to_thematic_plan = '<a href="index.php?'.api_get_cidreq().'&action=thematic_plan_list&thematic_id='.$last_id.'">'.
Display::return_icon('lesson_plan.png', get_lang('ThematicPlan'), array('style'=>'vertical-align:middle;float:none;'),ICON_SIZE_SMALL).'</a>';
$link_to_thematic_advance = '<a href="index.php?'.api_get_cidreq().'&action=thematic_advance_list&thematic_id='.$last_id.'">'.
Display::return_icon('lesson_plan_calendar.png', get_lang('ThematicAdvance'), array('style'=>'vertical-align:middle;float:none;'),ICON_SIZE_SMALL).'</a>';
Display::display_confirmation_message(
get_lang('ThematicSectionHasBeenCreatedSuccessfull').'<br />'.sprintf(get_lang('NowYouShouldAddThematicPlanXAndThematicAdvanceX'),$link_to_thematic_plan, $link_to_thematic_advance),
false
);
}
// display title
@ -74,13 +91,11 @@ if ($action == 'thematic_list') {
echo '<br />';
}
// display thematic data
// Display thematic data
if (!empty($thematic_data)) {
// display progress
echo '<div style="text-align:right;"><h2>'.get_lang('Progress').': <span id="div_result">'.$total_average_of_advances.'</span> %</h2></div>';
echo '<table width="100%" class="data_table">';
echo '<tr><th width="33%">'.get_lang('Thematic').'</th><th>'.get_lang('ThematicPlan').'</th><th width="33%">'.get_lang('ThematicAdvance').'</th></tr>';
foreach ($thematic_data as $thematic) {
@ -94,17 +109,14 @@ if ($action == 'thematic_list') {
}
//@todo add a validation in order to load or not course thematics in the session thematic
/*
if (api_get_session_id() == $thematic['session_id']) {
$session_star = api_get_session_image(api_get_session_id(), $user_info['status']);
} else {
continue;
} */
echo '<tr>';
$actions_first_col = '';
if (api_is_allowed_to_edit(null, true)) {
// Thematic title
$actions_first_col = Display::url(Display::return_icon('cd.gif', get_lang('Copy')), 'index.php?'.api_get_cidreq().'&action=thematic_copy&thematic_id='.$my_thematic_id.$param_gradebook.$url_token);
$actions_first_col = Display::url(
Display::return_icon('cd.gif', get_lang('Copy')),
'index.php?'.api_get_cidreq().'&action=thematic_copy&thematic_id='.$my_thematic_id.$param_gradebook.$url_token
);
if (api_get_session_id() == 0 ) {
if ($thematic['display_order'] > 1) {
@ -112,7 +124,7 @@ if ($action == 'thematic_list') {
} else {
$actions_first_col .= ' '.Display::return_icon('up_na.png','&nbsp;','',ICON_SIZE_SMALL);
}
if ($thematic['display_order'] < $thematic['max_thematic_item']) {
if (isset($thematic['max_thematic_item']) && $thematic['display_order'] < $thematic['max_thematic_item']) {
$actions_first_col .= ' <a href="'.api_get_self().'?action=movedown&a'.api_get_cidreq().'&thematic_id='.$my_thematic_id.$param_gradebook.$url_token.'">'.Display::return_icon('down.png',get_lang('Down'),'',ICON_SIZE_SMALL).'</a>';
} else {
$actions_first_col .= ' '.Display::return_icon('down_na.png','&nbsp;','',ICON_SIZE_SMALL);
@ -152,7 +164,8 @@ if ($action == 'thematic_list') {
//if (api_is_allowed_to_edit(null, true) && api_get_session_id() == $thematic['session_id']) {
if (api_is_allowed_to_edit(null, true)) {
echo '<div style="text-align:right"><a href="index.php?'.api_get_cidreq().'&action=thematic_advance_add&thematic_id='.$thematic['id'].'">'.Display::return_icon('add.png',get_lang('NewThematicAdvance'),'',ICON_SIZE_MEDIUM).'</a></div>';
echo '<div style="text-align:right"><a href="index.php?'.api_get_cidreq().'&action=thematic_advance_add&thematic_id='.$thematic['id'].'">'.
Display::return_icon('add.png',get_lang('NewThematicAdvance'),'',ICON_SIZE_MEDIUM).'</a></div>';
}
//if (api_is_allowed_to_edit(null, true) && api_get_session_id() == $thematic['session_id']) {
@ -172,7 +185,10 @@ if ($action == 'thematic_list') {
Display::return_icon('delete.png',get_lang('Delete'),'',ICON_SIZE_SMALL).'</a></center>';
//Links
$edit_link = Display::div(Display::div($edit_link , array('id'=>'thematic_advance_tools_'.$thematic_advance['id'], 'class'=>'thematic_advance_actions')), array('style'=>'height:20px;'));
$edit_link = Display::div(
Display::div($edit_link , array('id'=>'thematic_advance_tools_'.$thematic_advance['id'], 'class'=>'thematic_advance_actions')),
array('style'=>'height:20px;')
);
}
$thematic_advance_item = isset($thematic_advance_div[$thematic['id']][$thematic_advance['id']]) ? $thematic_advance_div[$thematic['id']][$thematic_advance['id']] : null;
@ -256,7 +272,7 @@ if ($action == 'thematic_list') {
}
// error messages
if ($error) {
if (isset($error)) {
Display::display_error_message(get_lang('FormHasErrorsPleaseComplete'),false);
}
if ($show_form)

@ -47,7 +47,7 @@ if ($action == 'thematic_advance_add' || $action == 'thematic_advance_edit') {
$form->addElement('html', '<div id="div_custom_datetime" style="display:none">');
}
$form->addElement('datepicker', 'custom_start_date', get_lang('StartDate'), array('form_name'=>'thematic_advance'));
$form->addElement('DatePicker', 'custom_start_date', get_lang('StartDate'), array('form_name'=>'thematic_advance'));
$form->addElement('html', '</div>');
if (isset($thematic_advance_data['attendance_id']) && $thematic_advance_data['attendance_id'] == 0) {

@ -1132,7 +1132,13 @@ class CourseRestorer
$resources = $this->course->resources;
foreach ($resources[RESOURCE_EVENT] as $id => $event) {
// check resources inside html from fckeditor tool and copy correct urls into recipient course
$event->content = DocumentManager::replace_urls_inside_content_html_from_copy_course($event->content, $this->course->code, $this->course->destination_path, $this->course->backup_path, $this->course->info['path']);
$event->content = DocumentManager::replace_urls_inside_content_html_from_copy_course(
$event->content,
$this->course->code,
$this->course->destination_path,
$this->course->backup_path,
$this->course->info['path']
);
$sql = "INSERT INTO ".$table." SET
c_id = ".$this->destination_course_id." ,
@ -1203,7 +1209,13 @@ class CourseRestorer
}
// check resources inside html from fckeditor tool and copy correct urls into recipient course
$description_content = DocumentManager::replace_urls_inside_content_html_from_copy_course($cd->content, $this->course->code, $this->course->destination_path, $this->course->backup_path, $this->course->info['path']);
$description_content = DocumentManager::replace_urls_inside_content_html_from_copy_course(
$cd->content,
$this->course->code,
$this->course->destination_path,
$this->course->backup_path,
$this->course->info['path']
);
$condition_session = "";
if (!empty($session_id)) {
@ -1229,7 +1241,13 @@ class CourseRestorer
foreach ($resources[RESOURCE_ANNOUNCEMENT] as $id => $announcement) {
// check resources inside html from fckeditor tool and copy correct urls into recipient course
$announcement->content = DocumentManager::replace_urls_inside_content_html_from_copy_course($announcement->content, $this->course->code, $this->course->destination_path, $this->course->backup_path, $this->course->info['path']);
$announcement->content = DocumentManager::replace_urls_inside_content_html_from_copy_course(
$announcement->content,
$this->course->code,
$this->course->destination_path,
$this->course->backup_path,
$this->course->info['path']
);
$sql = "INSERT INTO ".$table." " ."SET
c_id = ".$this->destination_course_id." ,
@ -2359,7 +2377,13 @@ class CourseRestorer
}
// check resources inside html from fckeditor tool and copy correct urls into recipient course
$glossary->description = DocumentManager::replace_urls_inside_content_html_from_copy_course($glossary->description, $this->course->code, $this->course->destination_path, $this->course->backup_path, $this->course->info['path']);
$glossary->description = DocumentManager::replace_urls_inside_content_html_from_copy_course(
$glossary->description,
$this->course->code,
$this->course->destination_path,
$this->course->backup_path,
$this->course->info['path']
);
$sql = "INSERT INTO " . $table_glossary . " SET
c_id = " . $this->destination_course_id . " ,
@ -2403,24 +2427,29 @@ class CourseRestorer
$resources = $this->course->resources;
foreach ($resources[RESOURCE_WIKI] as $id => $wiki) {
//$wiki = new Wiki($obj->page_id, $obj->reflink, $obj->title, $obj->content, $obj->user_id, $obj->group_id, $obj->dtime);
// the sql statement to insert the groups from the old course to the new course
// check resources inside html from fckeditor tool and copy correct urls into recipient course
$wiki->content = DocumentManager::replace_urls_inside_content_html_from_copy_course($wiki->content, $this->course->code, $this->course->destination_path, $this->course->backup_path, $this->course->info['path']);
$wiki->content = DocumentManager::replace_urls_inside_content_html_from_copy_course(
$wiki->content,
$this->course->code,
$this->course->destination_path,
$this->course->backup_path,
$this->course->info['path']
);
$sql = "INSERT INTO $table_wiki (c_id, page_id, reflink, title, content, user_id, group_id, dtime, progress, version, session_id) VALUES (
".$this->destination_course_id." ,
'".self::DBUTF8escapestring($wiki->page_id)."',
'".self::DBUTF8escapestring($wiki->reflink)."',
'".self::DBUTF8escapestring($wiki->title)."',
'".self::DBUTF8escapestring($wiki->content)."',
'".intval($wiki->user_id)."',
'".intval($wiki->group_id)."',
'".self::DBUTF8escapestring($wiki->dtime)."',
'".self::DBUTF8escapestring($wiki->progress)."',
'".intval($wiki->version)."',
'".(!empty($session_id)?intval($session_id):0)."')";
".$this->destination_course_id." ,
'".self::DBUTF8escapestring($wiki->page_id)."',
'".self::DBUTF8escapestring($wiki->reflink)."',
'".self::DBUTF8escapestring($wiki->title)."',
'".self::DBUTF8escapestring($wiki->content)."',
'".intval($wiki->user_id)."',
'".intval($wiki->group_id)."',
'".self::DBUTF8escapestring($wiki->dtime)."',
'".self::DBUTF8escapestring($wiki->progress)."',
'".intval($wiki->version)."',
'".(!empty($session_id)?intval($session_id):0)."')";
Database::query($sql);
$new_id = Database::insert_id();
$this->course->resources[RESOURCE_WIKI][$id]->destination_id = $new_id;
@ -2450,7 +2479,13 @@ class CourseRestorer
foreach ($resources[RESOURCE_THEMATIC] as $id => $thematic) {
// check resources inside html from fckeditor tool and copy correct urls into recipient course
$thematic->content = DocumentManager::replace_urls_inside_content_html_from_copy_course($thematic->content, $this->course->code, $this->course->destination_path, $this->course->backup_path, $this->course->info['path']);
$thematic->content = DocumentManager::replace_urls_inside_content_html_from_copy_course(
$thematic->content,
$this->course->code,
$this->course->destination_path,
$this->course->backup_path,
$this->course->info['path']
);
$thematic->params['c_id'] = $this->destination_course_id;
$thematic->params['id'] = null;
$last_id = Database::insert($table_thematic, $thematic->params, false);
@ -2499,7 +2534,13 @@ class CourseRestorer
foreach ($resources[RESOURCE_ATTENDANCE] as $id => $obj) {
// check resources inside html from fckeditor tool and copy correct urls into recipient course
$obj->params['description'] = DocumentManager::replace_urls_inside_content_html_from_copy_course($obj->params['description'], $this->course->code, $this->course->destination_path, $this->course->backup_path, $this->course->info['path']);
$obj->params['description'] = DocumentManager::replace_urls_inside_content_html_from_copy_course(
$obj->params['description'],
$this->course->code,
$this->course->destination_path,
$this->course->backup_path,
$this->course->info['path']
);
$obj->params['id'] = null;
$obj->params['c_id'] = $this->destination_course_id;

@ -14,7 +14,7 @@
use \ChamiloSession as Session;
// Name of the language file that needs to be included.
$language_file = array('create_course', 'registration','admin','exercice', 'course_description', 'course_info');
$language_file = array('create_course', 'registration','admin','exercice', 'course_info');
// Flag forcing the "current course" reset.
$cidReset = true;
@ -33,9 +33,6 @@ if (api_get_setting('course_validation') == 'true' && !api_is_platform_admin())
$course_validation_feature = true;
}
// Require additional libraries.
require_once api_get_path(CONFIGURATION_PATH).'course_info.conf.php';
$htmlHeadXtra[] = '<script type="text/javascript">
function setFocus(){
$("#title").focus();
@ -192,7 +189,7 @@ if ($form->validate()) {
}
if ($wanted_code == '') {
$wanted_code = generate_course_code(api_substr($title, 0, CourseManager::MAX_COURSE_LENGTH_CODE));
$wanted_code = CourseManager::generate_course_code(api_substr($title, 0, CourseManager::MAX_COURSE_LENGTH_CODE));
}
// Check whether the requested course code has already been occupied.

@ -20,7 +20,7 @@ function getTeachersInCourseIds()
'login_user_id', $table . $joinStatement,
array(
'where' => array(
'course IS NOT NULL AND status = ?' => array(
'c_id IS NOT NULL AND status = ?' => array(
COURSEMANAGER
)
)
@ -87,7 +87,7 @@ function updateTeachersInCourseIdleForTimeLimit($teachersInCourseIds)
*/
$userId = intval($value);
$updateOnLineSql = "UPDATE $onLineTrackTable SET "
. "COURSE = NULL "
. "c_id = NULL "
. "WHERE login_user_id = $userId";
Database::query($updateOnLineSql);
}
@ -102,4 +102,4 @@ if (php_sapi_name() != 'cli') {
$teachersInCourseIds = getTeachersInCourseIds();
if (!empty($teachersInCourseIds)) {
updateTeachersInCourseIdleForTimeLimit($teachersInCourseIds);
}
}

@ -10,7 +10,6 @@ if (file_exists('multiple_url_fix.php')) {
}
require_once __DIR__.'/../inc/global.inc.php';
require_once api_get_path(LIBRARY_PATH).'log.class.php';
ini_set('memory_limit', -1);
ini_set('max_execution_time', 0);

@ -8,7 +8,6 @@
*/
//die();
require_once '../../inc/global.inc.php';
require_once api_get_path(SYS_CODE_PATH).'admin/sub_language.class.php';
$path = api_get_path(SYS_LANG_PATH).'english';
ini_set('memory_limit','128M');
/**

@ -1,11 +1,13 @@
<?php
<?php
/* For licensing terms, see /license.txt */
/**
* This class takes the creation and querying of an SQLite DB in charge. The
* goal of this DB is to get stats on the usage of language vars for a common
* user.
* @package chamilo.cron.lang
*/
/**
* This class takes the creation and querying of an SQLite DB in charge. The
* goal of this DB is to get stats on the usage of language vars for a common
@ -13,146 +15,180 @@
* check for the availability of sqlite_open() should be made before calling
* the constructor (preferrably)
*/
class langstats {
class langstats
{
public $db; //database connector
public $error; //errores almacenados
public $db_type = 'sqlite';
public $db; //database connector
public $error; //errores almacenados
public $db_type = 'sqlite';
public function __construct($file='') {
switch ($this->db_type) {
case 'sqlite':
if (!class_exists('SQLite3')) {
$this->error = 'SQLiteNotAvailable';
return false; //cannot use if sqlite not installed
public function __construct($file = '')
{
switch ($this->db_type) {
case 'sqlite':
if (!class_exists('SQLite3')) {
$this->error = 'SQLiteNotAvailable';
return false; //cannot use if sqlite not installed
}
if (empty($file)) {
$file = api_get_path(SYS_ARCHIVE_PATH) . '/langstasdb';
}
if (is_file($file) && is_writeable($file)) {
$this->db = new SQLite3($file, SQLITE3_OPEN_READWRITE);
} else {
try {
$this->db = new SQLite3($file);
} catch (Exception $e) {
$this->error = 'DatabaseCreateError';
error_log('Exception: ' . $e->getMessage());
return false;
}
$err = $this->db->exec(
'CREATE TABLE lang_freq ('
. ' id integer PRIMARY KEY AUTOINCREMENT, '
. ' term_name text, term_file text, term_count integer default 0)'
);
if ($err === false) {
$this->error = 'CouldNotCreateTable';
return false;
}
$err = $this->db->exec(
'CREATE INDEX lang_freq_terms_idx ON lang_freq(term_name, term_file)'
);
if ($err === false) {
$this->error = 'CouldNotCreateIndex';
return false;
}
// Table and index created, move on.
}
break;
case 'mysql': //implementation not finished
if (!function_exists('mysql_connect')) {
$this->error = 'SQLiteNotAvailable';
return false; //cannot use if sqlite not installed
}
$err = Database::query('SELECT * FROM lang_freq');
if ($err === false) { //the database probably does not exist, create it
$err = Database::query(
'CREATE TABLE lang_freq ('
. ' id int PRIMARY KEY AUTO_INCREMENT, '
. ' term_name text, term_file text default \'\', term_count int default 0)'
);
if ($err === false) {
$this->error = 'CouldNotCreateTable';
return false;
}
} // if no error, we assume the table exists
break;
}
if (empty($file)) {
$file = api_get_path(SYS_ARCHIVE_PATH).'/langstasdb';
}
if (is_file($file) && is_writeable($file)) {
$this->db = new SQLite3($file,SQLITE3_OPEN_READWRITE);
} else {
try {
$this->db = new SQLite3($file);
} catch (Exception $e) {
$this->error = 'DatabaseCreateError';
error_log('Exception: '. $e->getMessage());
return $this->db;
}
/**
* Add a count for a specific term
* @param string The language term used
* @param string The file from which the language term came from
* @return boolean true
*/
public function add_use($term, $term_file = '')
{
$term = $this->db->escapeString($term);
$term_file = $this->db->escapeString($term_file);
$sql = "SELECT id, term_name, term_file, term_count FROM lang_freq WHERE term_name='$term' and term_file='$term_file'";
$ress = $this->db->query($sql);
if ($ress === false) {
$this->error = 'CouldNotQueryTermFromTable';
return false;
}
$err = $this->db->exec('CREATE TABLE lang_freq ('
.' id integer PRIMARY KEY AUTOINCREMENT, '
.' term_name text, term_file text, term_count integer default 0)');
if ($err === false) { $this->error = 'CouldNotCreateTable'; return false;}
$err = $this->db->exec('CREATE INDEX lang_freq_terms_idx ON lang_freq(term_name, term_file)');
if ($err === false) { $this->error = 'CouldNotCreateIndex'; return false; }
// Table and index created, move on.
}
break;
case 'mysql': //implementation not finished
if (!function_exists('mysql_connect')) {
$this->error = 'SQLiteNotAvailable';
return false; //cannot use if sqlite not installed
$i = 0;
while ($row = $ress->fetchArray(SQLITE3_BOTH)) {
$num = $row[3];
$num++;
$res = $this->db->query(
'UPDATE lang_freq SET term_count = ' . $num . ' WHERE id = ' . $row[0]
);
if ($res === false) {
$this->error = 'CouldNotUpdateTerm';
return false;
} else {
return $row[0];
}
$i++;
}
if ($i == 0) {
//No term found in the table, register as new term
$resi = $this->db->query(
"INSERT INTO lang_freq(term_name, term_file, term_count) VALUES ('$term', '$term_file', 1)"
);
if ($resi === false) {
$this->error = 'CouldNotInsertRow';
return false;
} else {
return $this->db->lastInsertRowID();
}
}
$err = Database::query('SELECT * FROM lang_freq');
if ($err === false) { //the database probably does not exist, create it
$err = Database::query('CREATE TABLE lang_freq ('
.' id int PRIMARY KEY AUTO_INCREMENT, '
.' term_name text, term_file text default \'\', term_count int default 0)');
if ($err === false) { $this->error = 'CouldNotCreateTable'; return false;}
} // if no error, we assume the table exists
break;
}
return $this->db;
}
/**
* Add a count for a specific term
* @param string The language term used
* @param string The file from which the language term came from
* @return boolean true
*/
public function add_use($term, $term_file='') {
$term = $this->db->escapeString($term);
$term_file = $this->db->escapeString($term_file);
$sql = "SELECT id, term_name, term_file, term_count FROM lang_freq WHERE term_name='$term' and term_file='$term_file'";
$ress = $this->db->query($sql);
if ($ress === false) {
$this->error = 'CouldNotQueryTermFromTable';
return false;
}
$i = 0;
while ($row = $ress->fetchArray(SQLITE3_BOTH)) {
$num = $row[3];
$num++;
$res = $this->db->query('UPDATE lang_freq SET term_count = '.$num.' WHERE id = '.$row[0]);
if ($res === false) {
$this->error = 'CouldNotUpdateTerm';
return false;
} else {
return $row[0];
}
$i++;
/**
* Function to get a list of the X most-requested terms
* @param integer Limit of terms to show
* @return array List of most requested terms
*/
public function get_popular_terms($num = 1000)
{
$res = $this->db->query(
'SELECT * FROM lang_freq ORDER BY term_count DESC LIMIT ' . $num
);
$list = array();
while ($row = $res->fetchArray()) {
$list[] = $row;
}
return $list;
}
if ($i == 0) {
//No term found in the table, register as new term
$resi = $this->db->query("INSERT INTO lang_freq(term_name, term_file, term_count) VALUES ('$term', '$term_file', 1)");
if ($resi === false) {
$this->error = 'CouldNotInsertRow';
return false;
} else {
return $this->db->lastInsertRowID();
}
}
}
/**
* Function to get a list of the X most-requested terms
* @param integer Limit of terms to show
* @return array List of most requested terms
*/
public function get_popular_terms($num=1000) {
$res = $this->db->query('SELECT * FROM lang_freq ORDER BY term_count DESC LIMIT '.$num);
$list = array();
while ($row = $res->fetchArray()) {
$list[] = $row;
}
return $list;
}
/**
* Clear all records in lang_freq
* @return boolean true
*/
public function clear_all() {
$res = sqlite_query($this->db, 'DELETE FROM lang_freq WHERE 1=1');
return $list;
}
/**
* Returns an array of all the language variables with their corresponding
* file of origin. This function tolerates a certain rate of error due to
* the duplication of variables in language files.
* @return array variable => origin file
*/
public function get_variables_origin() {
require_once '../../admin/sub_language.class.php';
$path = api_get_path(SYS_LANG_PATH).'english/';
$vars = array();
$priority = array('trad4all', 'notification', 'accessibility');
foreach ($priority as $file) {
$list = SubLanguageManager::get_all_language_variable_in_file($path.$file.'.inc.php', true);
foreach ($list as $var => $trad) {
$vars[$var] = $file.'.inc.php';
}
/**
* Clear all records in lang_freq
* @return boolean true
*/
public function clear_all()
{
$res = sqlite_query($this->db, 'DELETE FROM lang_freq WHERE 1=1');
return $list;
}
$files = scandir($path);
foreach ($files as $file) {
if (substr($file,0,1) == '.' or in_array($file,$priority)) {
continue;
}
$list = SubLanguageManager::get_all_language_variable_in_file($path.$file, true);
foreach ($list as $var => $trad) {
$vars[$var] = $file;
}
/**
* Returns an array of all the language variables with their corresponding
* file of origin. This function tolerates a certain rate of error due to
* the duplication of variables in language files.
* @return array variable => origin file
*/
public function get_variables_origin()
{
$path = api_get_path(SYS_LANG_PATH) . 'english/';
$vars = array();
$priority = array('trad4all', 'notification', 'accessibility');
foreach ($priority as $file) {
$list = SubLanguageManager::get_all_language_variable_in_file(
$path . $file . '.inc.php',
true
);
foreach ($list as $var => $trad) {
$vars[$var] = $file . '.inc.php';
}
}
$files = scandir($path);
foreach ($files as $file) {
if (substr($file, 0, 1) == '.' or in_array($file, $priority)) {
continue;
}
$list = SubLanguageManager::get_all_language_variable_in_file(
$path . $file,
true
);
foreach ($list as $var => $trad) {
$vars[$var] = $file;
}
}
return $vars;
}
return $vars;
}
}
}

@ -8,7 +8,6 @@
*/
die();
require_once '../../inc/global.inc.php';
require_once api_get_path(SYS_CODE_PATH).'admin/sub_language.class.php';
$path = api_get_path(SYS_LANG_PATH).'english';
ini_set('memory_limit','128M');
/**
@ -85,7 +84,7 @@ function get_all_php_files($base_path) {
if ($sub == '.php' or $sub == '.tpl') {
$files[] = $base_path.$item;
}
}
}
}
$list = null;
return $files;

@ -8,7 +8,6 @@
*/
die();
require_once '../../inc/global.inc.php';
require_once api_get_path(SYS_CODE_PATH).'admin/sub_language.class.php';
$path = api_get_path(SYS_LANG_PATH).'english';
ini_set('memory_limit','128M');
/**
@ -27,7 +26,7 @@ $defined_terms = array_flip(array_keys($terms));
$terms = null;
echo count($defined_terms)." terms were found in language files<br />";
// now get all terms found in all PHP files of Chamilo (this takes some
// now get all terms found in all PHP files of Chamilo (this takes some
// time and memory)
$used_terms = array();
$l = strlen(api_get_path(SYS_PATH));
@ -64,10 +63,10 @@ foreach ($files as $file) {
// Compare defined terms VS used terms. Used terms should be smaller than
// defined terms, and this should prove the concept that there are much
// more variables than what we really use
if (count($used_terms)<1) {
die("No used terms<br />\n");
if (count($used_terms)<1) {
die("No used terms<br />\n");
} else {
echo "The following terms were defined but never used: <br />\n<table>";
echo "The following terms were defined but never used: <br />\n<table>";
}
$i = 1;
foreach ($defined_terms as $term => $file) {
@ -96,7 +95,7 @@ function get_all_php_files($base_path) {
if ($sub == '.php' or $sub == '.tpl') {
$files[] = $base_path.$item;
}
}
}
}
$list = null;
return $files;

File diff suppressed because it is too large Load Diff

@ -1,384 +0,0 @@
.icon-large{font-size:1.3333333333333333em;margin-top:-4px;padding-top:3px;margin-bottom:-4px;padding-bottom:3px;vertical-align:middle;}
.nav [class^="icon-"],.nav [class*=" icon-"]{vertical-align:inherit;margin-top:-4px;padding-top:3px;margin-bottom:-4px;padding-bottom:3px;}.nav [class^="icon-"].icon-large,.nav [class*=" icon-"].icon-large{vertical-align:-25%;}
.nav-pills [class^="icon-"].icon-large,.nav-tabs [class^="icon-"].icon-large,.nav-pills [class*=" icon-"].icon-large,.nav-tabs [class*=" icon-"].icon-large{line-height:.75em;margin-top:-7px;padding-top:5px;margin-bottom:-5px;padding-bottom:4px;}
.btn [class^="icon-"].pull-left,.btn [class*=" icon-"].pull-left,.btn [class^="icon-"].pull-right,.btn [class*=" icon-"].pull-right{vertical-align:inherit;}
.btn [class^="icon-"].icon-large,.btn [class*=" icon-"].icon-large{margin-top:-0.5em;}
a [class^="icon-"],a [class*=" icon-"]{cursor:pointer;}
.icon-glass{*zoom:expression( this.runtimeStyle['zoom'] = '1', this.innerHTML = '&#xf000;');}
.icon-music{*zoom:expression( this.runtimeStyle['zoom'] = '1', this.innerHTML = '&#xf001;');}
.icon-search{*zoom:expression( this.runtimeStyle['zoom'] = '1', this.innerHTML = '&#xf002;');}
.icon-envelope-alt{*zoom:expression( this.runtimeStyle['zoom'] = '1', this.innerHTML = '&#xf003;');}
.icon-heart{*zoom:expression( this.runtimeStyle['zoom'] = '1', this.innerHTML = '&#xf004;');}
.icon-star{*zoom:expression( this.runtimeStyle['zoom'] = '1', this.innerHTML = '&#xf005;');}
.icon-star-empty{*zoom:expression( this.runtimeStyle['zoom'] = '1', this.innerHTML = '&#xf006;');}
.icon-user{*zoom:expression( this.runtimeStyle['zoom'] = '1', this.innerHTML = '&#xf007;');}
.icon-film{*zoom:expression( this.runtimeStyle['zoom'] = '1', this.innerHTML = '&#xf008;');}
.icon-th-large{*zoom:expression( this.runtimeStyle['zoom'] = '1', this.innerHTML = '&#xf009;');}
.icon-th{*zoom:expression( this.runtimeStyle['zoom'] = '1', this.innerHTML = '&#xf00a;');}
.icon-th-list{*zoom:expression( this.runtimeStyle['zoom'] = '1', this.innerHTML = '&#xf00b;');}
.icon-ok{*zoom:expression( this.runtimeStyle['zoom'] = '1', this.innerHTML = '&#xf00c;');}
.icon-remove{*zoom:expression( this.runtimeStyle['zoom'] = '1', this.innerHTML = '&#xf00d;');}
.icon-zoom-in{*zoom:expression( this.runtimeStyle['zoom'] = '1', this.innerHTML = '&#xf00e;');}
.icon-zoom-out{*zoom:expression( this.runtimeStyle['zoom'] = '1', this.innerHTML = '&#xf010;');}
.icon-off{*zoom:expression( this.runtimeStyle['zoom'] = '1', this.innerHTML = '&#xf011;');}
.icon-power-off{*zoom:expression( this.runtimeStyle['zoom'] = '1', this.innerHTML = '&#xf011;');}
.icon-signal{*zoom:expression( this.runtimeStyle['zoom'] = '1', this.innerHTML = '&#xf012;');}
.icon-cog{*zoom:expression( this.runtimeStyle['zoom'] = '1', this.innerHTML = '&#xf013;');}
.icon-gear{*zoom:expression( this.runtimeStyle['zoom'] = '1', this.innerHTML = '&#xf013;');}
.icon-trash{*zoom:expression( this.runtimeStyle['zoom'] = '1', this.innerHTML = '&#xf014;');}
.icon-home{*zoom:expression( this.runtimeStyle['zoom'] = '1', this.innerHTML = '&#xf015;');}
.icon-file-alt{*zoom:expression( this.runtimeStyle['zoom'] = '1', this.innerHTML = '&#xf016;');}
.icon-time{*zoom:expression( this.runtimeStyle['zoom'] = '1', this.innerHTML = '&#xf017;');}
.icon-road{*zoom:expression( this.runtimeStyle['zoom'] = '1', this.innerHTML = '&#xf018;');}
.icon-download-alt{*zoom:expression( this.runtimeStyle['zoom'] = '1', this.innerHTML = '&#xf019;');}
.icon-download{*zoom:expression( this.runtimeStyle['zoom'] = '1', this.innerHTML = '&#xf01a;');}
.icon-upload{*zoom:expression( this.runtimeStyle['zoom'] = '1', this.innerHTML = '&#xf01b;');}
.icon-inbox{*zoom:expression( this.runtimeStyle['zoom'] = '1', this.innerHTML = '&#xf01c;');}
.icon-play-circle{*zoom:expression( this.runtimeStyle['zoom'] = '1', this.innerHTML = '&#xf01d;');}
.icon-repeat{*zoom:expression( this.runtimeStyle['zoom'] = '1', this.innerHTML = '&#xf01e;');}
.icon-rotate-right{*zoom:expression( this.runtimeStyle['zoom'] = '1', this.innerHTML = '&#xf01e;');}
.icon-refresh{*zoom:expression( this.runtimeStyle['zoom'] = '1', this.innerHTML = '&#xf021;');}
.icon-list-alt{*zoom:expression( this.runtimeStyle['zoom'] = '1', this.innerHTML = '&#xf022;');}
.icon-lock{*zoom:expression( this.runtimeStyle['zoom'] = '1', this.innerHTML = '&#xf023;');}
.icon-flag{*zoom:expression( this.runtimeStyle['zoom'] = '1', this.innerHTML = '&#xf024;');}
.icon-headphones{*zoom:expression( this.runtimeStyle['zoom'] = '1', this.innerHTML = '&#xf025;');}
.icon-volume-off{*zoom:expression( this.runtimeStyle['zoom'] = '1', this.innerHTML = '&#xf026;');}
.icon-volume-down{*zoom:expression( this.runtimeStyle['zoom'] = '1', this.innerHTML = '&#xf027;');}
.icon-volume-up{*zoom:expression( this.runtimeStyle['zoom'] = '1', this.innerHTML = '&#xf028;');}
.icon-qrcode{*zoom:expression( this.runtimeStyle['zoom'] = '1', this.innerHTML = '&#xf029;');}
.icon-barcode{*zoom:expression( this.runtimeStyle['zoom'] = '1', this.innerHTML = '&#xf02a;');}
.icon-tag{*zoom:expression( this.runtimeStyle['zoom'] = '1', this.innerHTML = '&#xf02b;');}
.icon-tags{*zoom:expression( this.runtimeStyle['zoom'] = '1', this.innerHTML = '&#xf02c;');}
.icon-book{*zoom:expression( this.runtimeStyle['zoom'] = '1', this.innerHTML = '&#xf02d;');}
.icon-bookmark{*zoom:expression( this.runtimeStyle['zoom'] = '1', this.innerHTML = '&#xf02e;');}
.icon-print{*zoom:expression( this.runtimeStyle['zoom'] = '1', this.innerHTML = '&#xf02f;');}
.icon-camera{*zoom:expression( this.runtimeStyle['zoom'] = '1', this.innerHTML = '&#xf030;');}
.icon-font{*zoom:expression( this.runtimeStyle['zoom'] = '1', this.innerHTML = '&#xf031;');}
.icon-bold{*zoom:expression( this.runtimeStyle['zoom'] = '1', this.innerHTML = '&#xf032;');}
.icon-italic{*zoom:expression( this.runtimeStyle['zoom'] = '1', this.innerHTML = '&#xf033;');}
.icon-text-height{*zoom:expression( this.runtimeStyle['zoom'] = '1', this.innerHTML = '&#xf034;');}
.icon-text-width{*zoom:expression( this.runtimeStyle['zoom'] = '1', this.innerHTML = '&#xf035;');}
.icon-align-left{*zoom:expression( this.runtimeStyle['zoom'] = '1', this.innerHTML = '&#xf036;');}
.icon-align-center{*zoom:expression( this.runtimeStyle['zoom'] = '1', this.innerHTML = '&#xf037;');}
.icon-align-right{*zoom:expression( this.runtimeStyle['zoom'] = '1', this.innerHTML = '&#xf038;');}
.icon-align-justify{*zoom:expression( this.runtimeStyle['zoom'] = '1', this.innerHTML = '&#xf039;');}
.icon-list{*zoom:expression( this.runtimeStyle['zoom'] = '1', this.innerHTML = '&#xf03a;');}
.icon-indent-left{*zoom:expression( this.runtimeStyle['zoom'] = '1', this.innerHTML = '&#xf03b;');}
.icon-indent-right{*zoom:expression( this.runtimeStyle['zoom'] = '1', this.innerHTML = '&#xf03c;');}
.icon-facetime-video{*zoom:expression( this.runtimeStyle['zoom'] = '1', this.innerHTML = '&#xf03d;');}
.icon-picture{*zoom:expression( this.runtimeStyle['zoom'] = '1', this.innerHTML = '&#xf03e;');}
.icon-pencil{*zoom:expression( this.runtimeStyle['zoom'] = '1', this.innerHTML = '&#xf040;');}
.icon-map-marker{*zoom:expression( this.runtimeStyle['zoom'] = '1', this.innerHTML = '&#xf041;');}
.icon-adjust{*zoom:expression( this.runtimeStyle['zoom'] = '1', this.innerHTML = '&#xf042;');}
.icon-tint{*zoom:expression( this.runtimeStyle['zoom'] = '1', this.innerHTML = '&#xf043;');}
.icon-edit{*zoom:expression( this.runtimeStyle['zoom'] = '1', this.innerHTML = '&#xf044;');}
.icon-share{*zoom:expression( this.runtimeStyle['zoom'] = '1', this.innerHTML = '&#xf045;');}
.icon-check{*zoom:expression( this.runtimeStyle['zoom'] = '1', this.innerHTML = '&#xf046;');}
.icon-move{*zoom:expression( this.runtimeStyle['zoom'] = '1', this.innerHTML = '&#xf047;');}
.icon-step-backward{*zoom:expression( this.runtimeStyle['zoom'] = '1', this.innerHTML = '&#xf048;');}
.icon-fast-backward{*zoom:expression( this.runtimeStyle['zoom'] = '1', this.innerHTML = '&#xf049;');}
.icon-backward{*zoom:expression( this.runtimeStyle['zoom'] = '1', this.innerHTML = '&#xf04a;');}
.icon-play{*zoom:expression( this.runtimeStyle['zoom'] = '1', this.innerHTML = '&#xf04b;');}
.icon-pause{*zoom:expression( this.runtimeStyle['zoom'] = '1', this.innerHTML = '&#xf04c;');}
.icon-stop{*zoom:expression( this.runtimeStyle['zoom'] = '1', this.innerHTML = '&#xf04d;');}
.icon-forward{*zoom:expression( this.runtimeStyle['zoom'] = '1', this.innerHTML = '&#xf04e;');}
.icon-fast-forward{*zoom:expression( this.runtimeStyle['zoom'] = '1', this.innerHTML = '&#xf050;');}
.icon-step-forward{*zoom:expression( this.runtimeStyle['zoom'] = '1', this.innerHTML = '&#xf051;');}
.icon-eject{*zoom:expression( this.runtimeStyle['zoom'] = '1', this.innerHTML = '&#xf052;');}
.icon-chevron-left{*zoom:expression( this.runtimeStyle['zoom'] = '1', this.innerHTML = '&#xf053;');}
.icon-chevron-right{*zoom:expression( this.runtimeStyle['zoom'] = '1', this.innerHTML = '&#xf054;');}
.icon-plus-sign{*zoom:expression( this.runtimeStyle['zoom'] = '1', this.innerHTML = '&#xf055;');}
.icon-minus-sign{*zoom:expression( this.runtimeStyle['zoom'] = '1', this.innerHTML = '&#xf056;');}
.icon-remove-sign{*zoom:expression( this.runtimeStyle['zoom'] = '1', this.innerHTML = '&#xf057;');}
.icon-ok-sign{*zoom:expression( this.runtimeStyle['zoom'] = '1', this.innerHTML = '&#xf058;');}
.icon-question-sign{*zoom:expression( this.runtimeStyle['zoom'] = '1', this.innerHTML = '&#xf059;');}
.icon-info-sign{*zoom:expression( this.runtimeStyle['zoom'] = '1', this.innerHTML = '&#xf05a;');}
.icon-screenshot{*zoom:expression( this.runtimeStyle['zoom'] = '1', this.innerHTML = '&#xf05b;');}
.icon-remove-circle{*zoom:expression( this.runtimeStyle['zoom'] = '1', this.innerHTML = '&#xf05c;');}
.icon-ok-circle{*zoom:expression( this.runtimeStyle['zoom'] = '1', this.innerHTML = '&#xf05d;');}
.icon-ban-circle{*zoom:expression( this.runtimeStyle['zoom'] = '1', this.innerHTML = '&#xf05e;');}
.icon-arrow-left{*zoom:expression( this.runtimeStyle['zoom'] = '1', this.innerHTML = '&#xf060;');}
.icon-arrow-right{*zoom:expression( this.runtimeStyle['zoom'] = '1', this.innerHTML = '&#xf061;');}
.icon-arrow-up{*zoom:expression( this.runtimeStyle['zoom'] = '1', this.innerHTML = '&#xf062;');}
.icon-arrow-down{*zoom:expression( this.runtimeStyle['zoom'] = '1', this.innerHTML = '&#xf063;');}
.icon-share-alt{*zoom:expression( this.runtimeStyle['zoom'] = '1', this.innerHTML = '&#xf064;');}
.icon-mail-forward{*zoom:expression( this.runtimeStyle['zoom'] = '1', this.innerHTML = '&#xf064;');}
.icon-resize-full{*zoom:expression( this.runtimeStyle['zoom'] = '1', this.innerHTML = '&#xf065;');}
.icon-resize-small{*zoom:expression( this.runtimeStyle['zoom'] = '1', this.innerHTML = '&#xf066;');}
.icon-plus{*zoom:expression( this.runtimeStyle['zoom'] = '1', this.innerHTML = '&#xf067;');}
.icon-minus{*zoom:expression( this.runtimeStyle['zoom'] = '1', this.innerHTML = '&#xf068;');}
.icon-asterisk{*zoom:expression( this.runtimeStyle['zoom'] = '1', this.innerHTML = '&#xf069;');}
.icon-exclamation-sign{*zoom:expression( this.runtimeStyle['zoom'] = '1', this.innerHTML = '&#xf06a;');}
.icon-gift{*zoom:expression( this.runtimeStyle['zoom'] = '1', this.innerHTML = '&#xf06b;');}
.icon-leaf{*zoom:expression( this.runtimeStyle['zoom'] = '1', this.innerHTML = '&#xf06c;');}
.icon-fire{*zoom:expression( this.runtimeStyle['zoom'] = '1', this.innerHTML = '&#xf06d;');}
.icon-eye-open{*zoom:expression( this.runtimeStyle['zoom'] = '1', this.innerHTML = '&#xf06e;');}
.icon-eye-close{*zoom:expression( this.runtimeStyle['zoom'] = '1', this.innerHTML = '&#xf070;');}
.icon-warning-sign{*zoom:expression( this.runtimeStyle['zoom'] = '1', this.innerHTML = '&#xf071;');}
.icon-plane{*zoom:expression( this.runtimeStyle['zoom'] = '1', this.innerHTML = '&#xf072;');}
.icon-calendar{*zoom:expression( this.runtimeStyle['zoom'] = '1', this.innerHTML = '&#xf073;');}
.icon-random{*zoom:expression( this.runtimeStyle['zoom'] = '1', this.innerHTML = '&#xf074;');}
.icon-comment{*zoom:expression( this.runtimeStyle['zoom'] = '1', this.innerHTML = '&#xf075;');}
.icon-magnet{*zoom:expression( this.runtimeStyle['zoom'] = '1', this.innerHTML = '&#xf076;');}
.icon-chevron-up{*zoom:expression( this.runtimeStyle['zoom'] = '1', this.innerHTML = '&#xf077;');}
.icon-chevron-down{*zoom:expression( this.runtimeStyle['zoom'] = '1', this.innerHTML = '&#xf078;');}
.icon-retweet{*zoom:expression( this.runtimeStyle['zoom'] = '1', this.innerHTML = '&#xf079;');}
.icon-shopping-cart{*zoom:expression( this.runtimeStyle['zoom'] = '1', this.innerHTML = '&#xf07a;');}
.icon-folder-close{*zoom:expression( this.runtimeStyle['zoom'] = '1', this.innerHTML = '&#xf07b;');}
.icon-folder-open{*zoom:expression( this.runtimeStyle['zoom'] = '1', this.innerHTML = '&#xf07c;');}
.icon-resize-vertical{*zoom:expression( this.runtimeStyle['zoom'] = '1', this.innerHTML = '&#xf07d;');}
.icon-resize-horizontal{*zoom:expression( this.runtimeStyle['zoom'] = '1', this.innerHTML = '&#xf07e;');}
.icon-bar-chart{*zoom:expression( this.runtimeStyle['zoom'] = '1', this.innerHTML = '&#xf080;');}
.icon-twitter-sign{*zoom:expression( this.runtimeStyle['zoom'] = '1', this.innerHTML = '&#xf081;');}
.icon-facebook-sign{*zoom:expression( this.runtimeStyle['zoom'] = '1', this.innerHTML = '&#xf082;');}
.icon-camera-retro{*zoom:expression( this.runtimeStyle['zoom'] = '1', this.innerHTML = '&#xf083;');}
.icon-key{*zoom:expression( this.runtimeStyle['zoom'] = '1', this.innerHTML = '&#xf084;');}
.icon-cogs{*zoom:expression( this.runtimeStyle['zoom'] = '1', this.innerHTML = '&#xf085;');}
.icon-gears{*zoom:expression( this.runtimeStyle['zoom'] = '1', this.innerHTML = '&#xf085;');}
.icon-comments{*zoom:expression( this.runtimeStyle['zoom'] = '1', this.innerHTML = '&#xf086;');}
.icon-thumbs-up-alt{*zoom:expression( this.runtimeStyle['zoom'] = '1', this.innerHTML = '&#xf087;');}
.icon-thumbs-down-alt{*zoom:expression( this.runtimeStyle['zoom'] = '1', this.innerHTML = '&#xf088;');}
.icon-star-half{*zoom:expression( this.runtimeStyle['zoom'] = '1', this.innerHTML = '&#xf089;');}
.icon-heart-empty{*zoom:expression( this.runtimeStyle['zoom'] = '1', this.innerHTML = '&#xf08a;');}
.icon-signout{*zoom:expression( this.runtimeStyle['zoom'] = '1', this.innerHTML = '&#xf08b;');}
.icon-linkedin-sign{*zoom:expression( this.runtimeStyle['zoom'] = '1', this.innerHTML = '&#xf08c;');}
.icon-pushpin{*zoom:expression( this.runtimeStyle['zoom'] = '1', this.innerHTML = '&#xf08d;');}
.icon-external-link{*zoom:expression( this.runtimeStyle['zoom'] = '1', this.innerHTML = '&#xf08e;');}
.icon-signin{*zoom:expression( this.runtimeStyle['zoom'] = '1', this.innerHTML = '&#xf090;');}
.icon-trophy{*zoom:expression( this.runtimeStyle['zoom'] = '1', this.innerHTML = '&#xf091;');}
.icon-github-sign{*zoom:expression( this.runtimeStyle['zoom'] = '1', this.innerHTML = '&#xf092;');}
.icon-upload-alt{*zoom:expression( this.runtimeStyle['zoom'] = '1', this.innerHTML = '&#xf093;');}
.icon-lemon{*zoom:expression( this.runtimeStyle['zoom'] = '1', this.innerHTML = '&#xf094;');}
.icon-phone{*zoom:expression( this.runtimeStyle['zoom'] = '1', this.innerHTML = '&#xf095;');}
.icon-check-empty{*zoom:expression( this.runtimeStyle['zoom'] = '1', this.innerHTML = '&#xf096;');}
.icon-unchecked{*zoom:expression( this.runtimeStyle['zoom'] = '1', this.innerHTML = '&#xf096;');}
.icon-bookmark-empty{*zoom:expression( this.runtimeStyle['zoom'] = '1', this.innerHTML = '&#xf097;');}
.icon-phone-sign{*zoom:expression( this.runtimeStyle['zoom'] = '1', this.innerHTML = '&#xf098;');}
.icon-twitter{*zoom:expression( this.runtimeStyle['zoom'] = '1', this.innerHTML = '&#xf099;');}
.icon-facebook{*zoom:expression( this.runtimeStyle['zoom'] = '1', this.innerHTML = '&#xf09a;');}
.icon-github{*zoom:expression( this.runtimeStyle['zoom'] = '1', this.innerHTML = '&#xf09b;');}
.icon-unlock{*zoom:expression( this.runtimeStyle['zoom'] = '1', this.innerHTML = '&#xf09c;');}
.icon-credit-card{*zoom:expression( this.runtimeStyle['zoom'] = '1', this.innerHTML = '&#xf09d;');}
.icon-rss{*zoom:expression( this.runtimeStyle['zoom'] = '1', this.innerHTML = '&#xf09e;');}
.icon-hdd{*zoom:expression( this.runtimeStyle['zoom'] = '1', this.innerHTML = '&#xf0a0;');}
.icon-bullhorn{*zoom:expression( this.runtimeStyle['zoom'] = '1', this.innerHTML = '&#xf0a1;');}
.icon-bell{*zoom:expression( this.runtimeStyle['zoom'] = '1', this.innerHTML = '&#xf0a2;');}
.icon-certificate{*zoom:expression( this.runtimeStyle['zoom'] = '1', this.innerHTML = '&#xf0a3;');}
.icon-hand-right{*zoom:expression( this.runtimeStyle['zoom'] = '1', this.innerHTML = '&#xf0a4;');}
.icon-hand-left{*zoom:expression( this.runtimeStyle['zoom'] = '1', this.innerHTML = '&#xf0a5;');}
.icon-hand-up{*zoom:expression( this.runtimeStyle['zoom'] = '1', this.innerHTML = '&#xf0a6;');}
.icon-hand-down{*zoom:expression( this.runtimeStyle['zoom'] = '1', this.innerHTML = '&#xf0a7;');}
.icon-circle-arrow-left{*zoom:expression( this.runtimeStyle['zoom'] = '1', this.innerHTML = '&#xf0a8;');}
.icon-circle-arrow-right{*zoom:expression( this.runtimeStyle['zoom'] = '1', this.innerHTML = '&#xf0a9;');}
.icon-circle-arrow-up{*zoom:expression( this.runtimeStyle['zoom'] = '1', this.innerHTML = '&#xf0aa;');}
.icon-circle-arrow-down{*zoom:expression( this.runtimeStyle['zoom'] = '1', this.innerHTML = '&#xf0ab;');}
.icon-globe{*zoom:expression( this.runtimeStyle['zoom'] = '1', this.innerHTML = '&#xf0ac;');}
.icon-wrench{*zoom:expression( this.runtimeStyle['zoom'] = '1', this.innerHTML = '&#xf0ad;');}
.icon-tasks{*zoom:expression( this.runtimeStyle['zoom'] = '1', this.innerHTML = '&#xf0ae;');}
.icon-filter{*zoom:expression( this.runtimeStyle['zoom'] = '1', this.innerHTML = '&#xf0b0;');}
.icon-briefcase{*zoom:expression( this.runtimeStyle['zoom'] = '1', this.innerHTML = '&#xf0b1;');}
.icon-fullscreen{*zoom:expression( this.runtimeStyle['zoom'] = '1', this.innerHTML = '&#xf0b2;');}
.icon-group{*zoom:expression( this.runtimeStyle['zoom'] = '1', this.innerHTML = '&#xf0c0;');}
.icon-link{*zoom:expression( this.runtimeStyle['zoom'] = '1', this.innerHTML = '&#xf0c1;');}
.icon-cloud{*zoom:expression( this.runtimeStyle['zoom'] = '1', this.innerHTML = '&#xf0c2;');}
.icon-beaker{*zoom:expression( this.runtimeStyle['zoom'] = '1', this.innerHTML = '&#xf0c3;');}
.icon-cut{*zoom:expression( this.runtimeStyle['zoom'] = '1', this.innerHTML = '&#xf0c4;');}
.icon-copy{*zoom:expression( this.runtimeStyle['zoom'] = '1', this.innerHTML = '&#xf0c5;');}
.icon-paper-clip{*zoom:expression( this.runtimeStyle['zoom'] = '1', this.innerHTML = '&#xf0c6;');}
.icon-paperclip{*zoom:expression( this.runtimeStyle['zoom'] = '1', this.innerHTML = '&#xf0c6;');}
.icon-save{*zoom:expression( this.runtimeStyle['zoom'] = '1', this.innerHTML = '&#xf0c7;');}
.icon-sign-blank{*zoom:expression( this.runtimeStyle['zoom'] = '1', this.innerHTML = '&#xf0c8;');}
.icon-reorder{*zoom:expression( this.runtimeStyle['zoom'] = '1', this.innerHTML = '&#xf0c9;');}
.icon-list-ul{*zoom:expression( this.runtimeStyle['zoom'] = '1', this.innerHTML = '&#xf0ca;');}
.icon-list-ol{*zoom:expression( this.runtimeStyle['zoom'] = '1', this.innerHTML = '&#xf0cb;');}
.icon-strikethrough{*zoom:expression( this.runtimeStyle['zoom'] = '1', this.innerHTML = '&#xf0cc;');}
.icon-underline{*zoom:expression( this.runtimeStyle['zoom'] = '1', this.innerHTML = '&#xf0cd;');}
.icon-table{*zoom:expression( this.runtimeStyle['zoom'] = '1', this.innerHTML = '&#xf0ce;');}
.icon-magic{*zoom:expression( this.runtimeStyle['zoom'] = '1', this.innerHTML = '&#xf0d0;');}
.icon-truck{*zoom:expression( this.runtimeStyle['zoom'] = '1', this.innerHTML = '&#xf0d1;');}
.icon-pinterest{*zoom:expression( this.runtimeStyle['zoom'] = '1', this.innerHTML = '&#xf0d2;');}
.icon-pinterest-sign{*zoom:expression( this.runtimeStyle['zoom'] = '1', this.innerHTML = '&#xf0d3;');}
.icon-google-plus-sign{*zoom:expression( this.runtimeStyle['zoom'] = '1', this.innerHTML = '&#xf0d4;');}
.icon-google-plus{*zoom:expression( this.runtimeStyle['zoom'] = '1', this.innerHTML = '&#xf0d5;');}
.icon-money{*zoom:expression( this.runtimeStyle['zoom'] = '1', this.innerHTML = '&#xf0d6;');}
.icon-caret-down{*zoom:expression( this.runtimeStyle['zoom'] = '1', this.innerHTML = '&#xf0d7;');}
.icon-caret-up{*zoom:expression( this.runtimeStyle['zoom'] = '1', this.innerHTML = '&#xf0d8;');}
.icon-caret-left{*zoom:expression( this.runtimeStyle['zoom'] = '1', this.innerHTML = '&#xf0d9;');}
.icon-caret-right{*zoom:expression( this.runtimeStyle['zoom'] = '1', this.innerHTML = '&#xf0da;');}
.icon-columns{*zoom:expression( this.runtimeStyle['zoom'] = '1', this.innerHTML = '&#xf0db;');}
.icon-sort{*zoom:expression( this.runtimeStyle['zoom'] = '1', this.innerHTML = '&#xf0dc;');}
.icon-sort-down{*zoom:expression( this.runtimeStyle['zoom'] = '1', this.innerHTML = '&#xf0dd;');}
.icon-sort-up{*zoom:expression( this.runtimeStyle['zoom'] = '1', this.innerHTML = '&#xf0de;');}
.icon-envelope{*zoom:expression( this.runtimeStyle['zoom'] = '1', this.innerHTML = '&#xf0e0;');}
.icon-linkedin{*zoom:expression( this.runtimeStyle['zoom'] = '1', this.innerHTML = '&#xf0e1;');}
.icon-undo{*zoom:expression( this.runtimeStyle['zoom'] = '1', this.innerHTML = '&#xf0e2;');}
.icon-rotate-left{*zoom:expression( this.runtimeStyle['zoom'] = '1', this.innerHTML = '&#xf0e2;');}
.icon-legal{*zoom:expression( this.runtimeStyle['zoom'] = '1', this.innerHTML = '&#xf0e3;');}
.icon-dashboard{*zoom:expression( this.runtimeStyle['zoom'] = '1', this.innerHTML = '&#xf0e4;');}
.icon-comment-alt{*zoom:expression( this.runtimeStyle['zoom'] = '1', this.innerHTML = '&#xf0e5;');}
.icon-comments-alt{*zoom:expression( this.runtimeStyle['zoom'] = '1', this.innerHTML = '&#xf0e6;');}
.icon-bolt{*zoom:expression( this.runtimeStyle['zoom'] = '1', this.innerHTML = '&#xf0e7;');}
.icon-sitemap{*zoom:expression( this.runtimeStyle['zoom'] = '1', this.innerHTML = '&#xf0e8;');}
.icon-umbrella{*zoom:expression( this.runtimeStyle['zoom'] = '1', this.innerHTML = '&#xf0e9;');}
.icon-paste{*zoom:expression( this.runtimeStyle['zoom'] = '1', this.innerHTML = '&#xf0ea;');}
.icon-lightbulb{*zoom:expression( this.runtimeStyle['zoom'] = '1', this.innerHTML = '&#xf0eb;');}
.icon-exchange{*zoom:expression( this.runtimeStyle['zoom'] = '1', this.innerHTML = '&#xf0ec;');}
.icon-cloud-download{*zoom:expression( this.runtimeStyle['zoom'] = '1', this.innerHTML = '&#xf0ed;');}
.icon-cloud-upload{*zoom:expression( this.runtimeStyle['zoom'] = '1', this.innerHTML = '&#xf0ee;');}
.icon-user-md{*zoom:expression( this.runtimeStyle['zoom'] = '1', this.innerHTML = '&#xf0f0;');}
.icon-stethoscope{*zoom:expression( this.runtimeStyle['zoom'] = '1', this.innerHTML = '&#xf0f1;');}
.icon-suitcase{*zoom:expression( this.runtimeStyle['zoom'] = '1', this.innerHTML = '&#xf0f2;');}
.icon-bell-alt{*zoom:expression( this.runtimeStyle['zoom'] = '1', this.innerHTML = '&#xf0f3;');}
.icon-coffee{*zoom:expression( this.runtimeStyle['zoom'] = '1', this.innerHTML = '&#xf0f4;');}
.icon-food{*zoom:expression( this.runtimeStyle['zoom'] = '1', this.innerHTML = '&#xf0f5;');}
.icon-file-text-alt{*zoom:expression( this.runtimeStyle['zoom'] = '1', this.innerHTML = '&#xf0f6;');}
.icon-building{*zoom:expression( this.runtimeStyle['zoom'] = '1', this.innerHTML = '&#xf0f7;');}
.icon-hospital{*zoom:expression( this.runtimeStyle['zoom'] = '1', this.innerHTML = '&#xf0f8;');}
.icon-ambulance{*zoom:expression( this.runtimeStyle['zoom'] = '1', this.innerHTML = '&#xf0f9;');}
.icon-medkit{*zoom:expression( this.runtimeStyle['zoom'] = '1', this.innerHTML = '&#xf0fa;');}
.icon-fighter-jet{*zoom:expression( this.runtimeStyle['zoom'] = '1', this.innerHTML = '&#xf0fb;');}
.icon-beer{*zoom:expression( this.runtimeStyle['zoom'] = '1', this.innerHTML = '&#xf0fc;');}
.icon-h-sign{*zoom:expression( this.runtimeStyle['zoom'] = '1', this.innerHTML = '&#xf0fd;');}
.icon-plus-sign-alt{*zoom:expression( this.runtimeStyle['zoom'] = '1', this.innerHTML = '&#xf0fe;');}
.icon-double-angle-left{*zoom:expression( this.runtimeStyle['zoom'] = '1', this.innerHTML = '&#xf100;');}
.icon-double-angle-right{*zoom:expression( this.runtimeStyle['zoom'] = '1', this.innerHTML = '&#xf101;');}
.icon-double-angle-up{*zoom:expression( this.runtimeStyle['zoom'] = '1', this.innerHTML = '&#xf102;');}
.icon-double-angle-down{*zoom:expression( this.runtimeStyle['zoom'] = '1', this.innerHTML = '&#xf103;');}
.icon-angle-left{*zoom:expression( this.runtimeStyle['zoom'] = '1', this.innerHTML = '&#xf104;');}
.icon-angle-right{*zoom:expression( this.runtimeStyle['zoom'] = '1', this.innerHTML = '&#xf105;');}
.icon-angle-up{*zoom:expression( this.runtimeStyle['zoom'] = '1', this.innerHTML = '&#xf106;');}
.icon-angle-down{*zoom:expression( this.runtimeStyle['zoom'] = '1', this.innerHTML = '&#xf107;');}
.icon-desktop{*zoom:expression( this.runtimeStyle['zoom'] = '1', this.innerHTML = '&#xf108;');}
.icon-laptop{*zoom:expression( this.runtimeStyle['zoom'] = '1', this.innerHTML = '&#xf109;');}
.icon-tablet{*zoom:expression( this.runtimeStyle['zoom'] = '1', this.innerHTML = '&#xf10a;');}
.icon-mobile-phone{*zoom:expression( this.runtimeStyle['zoom'] = '1', this.innerHTML = '&#xf10b;');}
.icon-circle-blank{*zoom:expression( this.runtimeStyle['zoom'] = '1', this.innerHTML = '&#xf10c;');}
.icon-quote-left{*zoom:expression( this.runtimeStyle['zoom'] = '1', this.innerHTML = '&#xf10d;');}
.icon-quote-right{*zoom:expression( this.runtimeStyle['zoom'] = '1', this.innerHTML = '&#xf10e;');}
.icon-spinner{*zoom:expression( this.runtimeStyle['zoom'] = '1', this.innerHTML = '&#xf110;');}
.icon-circle{*zoom:expression( this.runtimeStyle['zoom'] = '1', this.innerHTML = '&#xf111;');}
.icon-reply{*zoom:expression( this.runtimeStyle['zoom'] = '1', this.innerHTML = '&#xf112;');}
.icon-mail-reply{*zoom:expression( this.runtimeStyle['zoom'] = '1', this.innerHTML = '&#xf112;');}
.icon-github-alt{*zoom:expression( this.runtimeStyle['zoom'] = '1', this.innerHTML = '&#xf113;');}
.icon-folder-close-alt{*zoom:expression( this.runtimeStyle['zoom'] = '1', this.innerHTML = '&#xf114;');}
.icon-folder-open-alt{*zoom:expression( this.runtimeStyle['zoom'] = '1', this.innerHTML = '&#xf115;');}
.icon-expand-alt{*zoom:expression( this.runtimeStyle['zoom'] = '1', this.innerHTML = '&#xf116;');}
.icon-collapse-alt{*zoom:expression( this.runtimeStyle['zoom'] = '1', this.innerHTML = '&#xf117;');}
.icon-smile{*zoom:expression( this.runtimeStyle['zoom'] = '1', this.innerHTML = '&#xf118;');}
.icon-frown{*zoom:expression( this.runtimeStyle['zoom'] = '1', this.innerHTML = '&#xf119;');}
.icon-meh{*zoom:expression( this.runtimeStyle['zoom'] = '1', this.innerHTML = '&#xf11a;');}
.icon-gamepad{*zoom:expression( this.runtimeStyle['zoom'] = '1', this.innerHTML = '&#xf11b;');}
.icon-keyboard{*zoom:expression( this.runtimeStyle['zoom'] = '1', this.innerHTML = '&#xf11c;');}
.icon-flag-alt{*zoom:expression( this.runtimeStyle['zoom'] = '1', this.innerHTML = '&#xf11d;');}
.icon-flag-checkered{*zoom:expression( this.runtimeStyle['zoom'] = '1', this.innerHTML = '&#xf11e;');}
.icon-terminal{*zoom:expression( this.runtimeStyle['zoom'] = '1', this.innerHTML = '&#xf120;');}
.icon-code{*zoom:expression( this.runtimeStyle['zoom'] = '1', this.innerHTML = '&#xf121;');}
.icon-reply-all{*zoom:expression( this.runtimeStyle['zoom'] = '1', this.innerHTML = '&#xf122;');}
.icon-mail-reply-all{*zoom:expression( this.runtimeStyle['zoom'] = '1', this.innerHTML = '&#xf122;');}
.icon-star-half-empty{*zoom:expression( this.runtimeStyle['zoom'] = '1', this.innerHTML = '&#xf123;');}
.icon-star-half-full{*zoom:expression( this.runtimeStyle['zoom'] = '1', this.innerHTML = '&#xf123;');}
.icon-location-arrow{*zoom:expression( this.runtimeStyle['zoom'] = '1', this.innerHTML = '&#xf124;');}
.icon-crop{*zoom:expression( this.runtimeStyle['zoom'] = '1', this.innerHTML = '&#xf125;');}
.icon-code-fork{*zoom:expression( this.runtimeStyle['zoom'] = '1', this.innerHTML = '&#xf126;');}
.icon-unlink{*zoom:expression( this.runtimeStyle['zoom'] = '1', this.innerHTML = '&#xf127;');}
.icon-question{*zoom:expression( this.runtimeStyle['zoom'] = '1', this.innerHTML = '&#xf128;');}
.icon-info{*zoom:expression( this.runtimeStyle['zoom'] = '1', this.innerHTML = '&#xf129;');}
.icon-exclamation{*zoom:expression( this.runtimeStyle['zoom'] = '1', this.innerHTML = '&#xf12a;');}
.icon-superscript{*zoom:expression( this.runtimeStyle['zoom'] = '1', this.innerHTML = '&#xf12b;');}
.icon-subscript{*zoom:expression( this.runtimeStyle['zoom'] = '1', this.innerHTML = '&#xf12c;');}
.icon-eraser{*zoom:expression( this.runtimeStyle['zoom'] = '1', this.innerHTML = '&#xf12d;');}
.icon-puzzle-piece{*zoom:expression( this.runtimeStyle['zoom'] = '1', this.innerHTML = '&#xf12e;');}
.icon-microphone{*zoom:expression( this.runtimeStyle['zoom'] = '1', this.innerHTML = '&#xf130;');}
.icon-microphone-off{*zoom:expression( this.runtimeStyle['zoom'] = '1', this.innerHTML = '&#xf131;');}
.icon-shield{*zoom:expression( this.runtimeStyle['zoom'] = '1', this.innerHTML = '&#xf132;');}
.icon-calendar-empty{*zoom:expression( this.runtimeStyle['zoom'] = '1', this.innerHTML = '&#xf133;');}
.icon-fire-extinguisher{*zoom:expression( this.runtimeStyle['zoom'] = '1', this.innerHTML = '&#xf134;');}
.icon-rocket{*zoom:expression( this.runtimeStyle['zoom'] = '1', this.innerHTML = '&#xf135;');}
.icon-maxcdn{*zoom:expression( this.runtimeStyle['zoom'] = '1', this.innerHTML = '&#xf136;');}
.icon-chevron-sign-left{*zoom:expression( this.runtimeStyle['zoom'] = '1', this.innerHTML = '&#xf137;');}
.icon-chevron-sign-right{*zoom:expression( this.runtimeStyle['zoom'] = '1', this.innerHTML = '&#xf138;');}
.icon-chevron-sign-up{*zoom:expression( this.runtimeStyle['zoom'] = '1', this.innerHTML = '&#xf139;');}
.icon-chevron-sign-down{*zoom:expression( this.runtimeStyle['zoom'] = '1', this.innerHTML = '&#xf13a;');}
.icon-html5{*zoom:expression( this.runtimeStyle['zoom'] = '1', this.innerHTML = '&#xf13b;');}
.icon-css3{*zoom:expression( this.runtimeStyle['zoom'] = '1', this.innerHTML = '&#xf13c;');}
.icon-anchor{*zoom:expression( this.runtimeStyle['zoom'] = '1', this.innerHTML = '&#xf13d;');}
.icon-unlock-alt{*zoom:expression( this.runtimeStyle['zoom'] = '1', this.innerHTML = '&#xf13e;');}
.icon-bullseye{*zoom:expression( this.runtimeStyle['zoom'] = '1', this.innerHTML = '&#xf140;');}
.icon-ellipsis-horizontal{*zoom:expression( this.runtimeStyle['zoom'] = '1', this.innerHTML = '&#xf141;');}
.icon-ellipsis-vertical{*zoom:expression( this.runtimeStyle['zoom'] = '1', this.innerHTML = '&#xf142;');}
.icon-rss-sign{*zoom:expression( this.runtimeStyle['zoom'] = '1', this.innerHTML = '&#xf143;');}
.icon-play-sign{*zoom:expression( this.runtimeStyle['zoom'] = '1', this.innerHTML = '&#xf144;');}
.icon-ticket{*zoom:expression( this.runtimeStyle['zoom'] = '1', this.innerHTML = '&#xf145;');}
.icon-minus-sign-alt{*zoom:expression( this.runtimeStyle['zoom'] = '1', this.innerHTML = '&#xf146;');}
.icon-check-minus{*zoom:expression( this.runtimeStyle['zoom'] = '1', this.innerHTML = '&#xf147;');}
.icon-level-up{*zoom:expression( this.runtimeStyle['zoom'] = '1', this.innerHTML = '&#xf148;');}
.icon-level-down{*zoom:expression( this.runtimeStyle['zoom'] = '1', this.innerHTML = '&#xf149;');}
.icon-check-sign{*zoom:expression( this.runtimeStyle['zoom'] = '1', this.innerHTML = '&#xf14a;');}
.icon-edit-sign{*zoom:expression( this.runtimeStyle['zoom'] = '1', this.innerHTML = '&#xf14b;');}
.icon-external-link-sign{*zoom:expression( this.runtimeStyle['zoom'] = '1', this.innerHTML = '&#xf14c;');}
.icon-share-sign{*zoom:expression( this.runtimeStyle['zoom'] = '1', this.innerHTML = '&#xf14d;');}
.icon-compass{*zoom:expression( this.runtimeStyle['zoom'] = '1', this.innerHTML = '&#xf14e;');}
.icon-collapse{*zoom:expression( this.runtimeStyle['zoom'] = '1', this.innerHTML = '&#xf150;');}
.icon-collapse-top{*zoom:expression( this.runtimeStyle['zoom'] = '1', this.innerHTML = '&#xf151;');}
.icon-expand{*zoom:expression( this.runtimeStyle['zoom'] = '1', this.innerHTML = '&#xf152;');}
.icon-eur{*zoom:expression( this.runtimeStyle['zoom'] = '1', this.innerHTML = '&#xf153;');}
.icon-euro{*zoom:expression( this.runtimeStyle['zoom'] = '1', this.innerHTML = '&#xf153;');}
.icon-gbp{*zoom:expression( this.runtimeStyle['zoom'] = '1', this.innerHTML = '&#xf154;');}
.icon-usd{*zoom:expression( this.runtimeStyle['zoom'] = '1', this.innerHTML = '&#xf155;');}
.icon-dollar{*zoom:expression( this.runtimeStyle['zoom'] = '1', this.innerHTML = '&#xf155;');}
.icon-inr{*zoom:expression( this.runtimeStyle['zoom'] = '1', this.innerHTML = '&#xf156;');}
.icon-rupee{*zoom:expression( this.runtimeStyle['zoom'] = '1', this.innerHTML = '&#xf156;');}
.icon-jpy{*zoom:expression( this.runtimeStyle['zoom'] = '1', this.innerHTML = '&#xf157;');}
.icon-yen{*zoom:expression( this.runtimeStyle['zoom'] = '1', this.innerHTML = '&#xf157;');}
.icon-cny{*zoom:expression( this.runtimeStyle['zoom'] = '1', this.innerHTML = '&#xf158;');}
.icon-renminbi{*zoom:expression( this.runtimeStyle['zoom'] = '1', this.innerHTML = '&#xf158;');}
.icon-krw{*zoom:expression( this.runtimeStyle['zoom'] = '1', this.innerHTML = '&#xf159;');}
.icon-won{*zoom:expression( this.runtimeStyle['zoom'] = '1', this.innerHTML = '&#xf159;');}
.icon-btc{*zoom:expression( this.runtimeStyle['zoom'] = '1', this.innerHTML = '&#xf15a;');}
.icon-bitcoin{*zoom:expression( this.runtimeStyle['zoom'] = '1', this.innerHTML = '&#xf15a;');}
.icon-file{*zoom:expression( this.runtimeStyle['zoom'] = '1', this.innerHTML = '&#xf15b;');}
.icon-file-text{*zoom:expression( this.runtimeStyle['zoom'] = '1', this.innerHTML = '&#xf15c;');}
.icon-sort-by-alphabet{*zoom:expression( this.runtimeStyle['zoom'] = '1', this.innerHTML = '&#xf15d;');}
.icon-sort-by-alphabet-alt{*zoom:expression( this.runtimeStyle['zoom'] = '1', this.innerHTML = '&#xf15e;');}
.icon-sort-by-attributes{*zoom:expression( this.runtimeStyle['zoom'] = '1', this.innerHTML = '&#xf160;');}
.icon-sort-by-attributes-alt{*zoom:expression( this.runtimeStyle['zoom'] = '1', this.innerHTML = '&#xf161;');}
.icon-sort-by-order{*zoom:expression( this.runtimeStyle['zoom'] = '1', this.innerHTML = '&#xf162;');}
.icon-sort-by-order-alt{*zoom:expression( this.runtimeStyle['zoom'] = '1', this.innerHTML = '&#xf163;');}
.icon-thumbs-up{*zoom:expression( this.runtimeStyle['zoom'] = '1', this.innerHTML = '&#xf164;');}
.icon-thumbs-down{*zoom:expression( this.runtimeStyle['zoom'] = '1', this.innerHTML = '&#xf165;');}
.icon-youtube-sign{*zoom:expression( this.runtimeStyle['zoom'] = '1', this.innerHTML = '&#xf166;');}
.icon-youtube{*zoom:expression( this.runtimeStyle['zoom'] = '1', this.innerHTML = '&#xf167;');}
.icon-xing{*zoom:expression( this.runtimeStyle['zoom'] = '1', this.innerHTML = '&#xf168;');}
.icon-xing-sign{*zoom:expression( this.runtimeStyle['zoom'] = '1', this.innerHTML = '&#xf169;');}
.icon-youtube-play{*zoom:expression( this.runtimeStyle['zoom'] = '1', this.innerHTML = '&#xf16a;');}
.icon-dropbox{*zoom:expression( this.runtimeStyle['zoom'] = '1', this.innerHTML = '&#xf16b;');}
.icon-stackexchange{*zoom:expression( this.runtimeStyle['zoom'] = '1', this.innerHTML = '&#xf16c;');}
.icon-instagram{*zoom:expression( this.runtimeStyle['zoom'] = '1', this.innerHTML = '&#xf16d;');}
.icon-flickr{*zoom:expression( this.runtimeStyle['zoom'] = '1', this.innerHTML = '&#xf16e;');}
.icon-adn{*zoom:expression( this.runtimeStyle['zoom'] = '1', this.innerHTML = '&#xf170;');}
.icon-bitbucket{*zoom:expression( this.runtimeStyle['zoom'] = '1', this.innerHTML = '&#xf171;');}
.icon-bitbucket-sign{*zoom:expression( this.runtimeStyle['zoom'] = '1', this.innerHTML = '&#xf172;');}
.icon-tumblr{*zoom:expression( this.runtimeStyle['zoom'] = '1', this.innerHTML = '&#xf173;');}
.icon-tumblr-sign{*zoom:expression( this.runtimeStyle['zoom'] = '1', this.innerHTML = '&#xf174;');}
.icon-long-arrow-down{*zoom:expression( this.runtimeStyle['zoom'] = '1', this.innerHTML = '&#xf175;');}
.icon-long-arrow-up{*zoom:expression( this.runtimeStyle['zoom'] = '1', this.innerHTML = '&#xf176;');}
.icon-long-arrow-left{*zoom:expression( this.runtimeStyle['zoom'] = '1', this.innerHTML = '&#xf177;');}
.icon-long-arrow-right{*zoom:expression( this.runtimeStyle['zoom'] = '1', this.innerHTML = '&#xf178;');}
.icon-apple{*zoom:expression( this.runtimeStyle['zoom'] = '1', this.innerHTML = '&#xf179;');}
.icon-windows{*zoom:expression( this.runtimeStyle['zoom'] = '1', this.innerHTML = '&#xf17a;');}
.icon-android{*zoom:expression( this.runtimeStyle['zoom'] = '1', this.innerHTML = '&#xf17b;');}
.icon-linux{*zoom:expression( this.runtimeStyle['zoom'] = '1', this.innerHTML = '&#xf17c;');}
.icon-dribbble{*zoom:expression( this.runtimeStyle['zoom'] = '1', this.innerHTML = '&#xf17d;');}
.icon-skype{*zoom:expression( this.runtimeStyle['zoom'] = '1', this.innerHTML = '&#xf17e;');}
.icon-foursquare{*zoom:expression( this.runtimeStyle['zoom'] = '1', this.innerHTML = '&#xf180;');}
.icon-trello{*zoom:expression( this.runtimeStyle['zoom'] = '1', this.innerHTML = '&#xf181;');}
.icon-female{*zoom:expression( this.runtimeStyle['zoom'] = '1', this.innerHTML = '&#xf182;');}
.icon-male{*zoom:expression( this.runtimeStyle['zoom'] = '1', this.innerHTML = '&#xf183;');}
.icon-gittip{*zoom:expression( this.runtimeStyle['zoom'] = '1', this.innerHTML = '&#xf184;');}
.icon-sun{*zoom:expression( this.runtimeStyle['zoom'] = '1', this.innerHTML = '&#xf185;');}
.icon-moon{*zoom:expression( this.runtimeStyle['zoom'] = '1', this.innerHTML = '&#xf186;');}
.icon-archive{*zoom:expression( this.runtimeStyle['zoom'] = '1', this.innerHTML = '&#xf187;');}
.icon-bug{*zoom:expression( this.runtimeStyle['zoom'] = '1', this.innerHTML = '&#xf188;');}
.icon-vk{*zoom:expression( this.runtimeStyle['zoom'] = '1', this.innerHTML = '&#xf189;');}
.icon-weibo{*zoom:expression( this.runtimeStyle['zoom'] = '1', this.innerHTML = '&#xf18a;');}
.icon-renren{*zoom:expression( this.runtimeStyle['zoom'] = '1', this.innerHTML = '&#xf18b;');}

File diff suppressed because it is too large Load Diff

File diff suppressed because one or more lines are too long

Some files were not shown because too many files have changed in this diff Show More

Loading…
Cancel
Save