Merge branch '1.10.x' of https://github.com/chamilo/chamilo-lms into toolbars

1.10.x
Angel Fernando Quiroz Campos 10 years ago
commit 4576b29d26
  1. 2
      custompages/registration-dist.php
  2. 8
      index.php
  3. 16
      main/admin/configure_homepage.php
  4. 8
      main/admin/course_request_edit.php
  5. 18
      main/admin/settings.lib.php
  6. 4
      main/admin/specific_fields_add.php
  7. 4
      main/admin/sub_language_add.php
  8. 15
      main/admin/system_announcements.php
  9. 13
      main/admin/user_edit.php
  10. 10
      main/attendance/attendance_calendar.php
  11. 16
      main/auth/courses_controller.php
  12. 2
      main/auth/gotocourse.php
  13. 2
      main/auth/lostPassword.php
  14. 16
      main/auth/profile.php
  15. 2
      main/auth/set_temp_password.php
  16. 32
      main/auth/sso/sso.Drupal.class.php
  17. 4
      main/chat/chat_functions.lib.php
  18. 5
      main/chat/chat_whoisonline.php
  19. 16
      main/course_home/course_home.php
  20. 2
      main/course_info/delete_course.php
  21. 3
      main/course_info/maintenance.php
  22. 4
      main/coursecopy/import_backup.php
  23. 13
      main/css/base.css
  24. 4
      main/document/showinframes.php
  25. 2
      main/exercice/exercise.class.php
  26. 146
      main/exercice/exercise_reminder.php
  27. 2
      main/exercice/export/aiken/aiken_import.inc.php
  28. 13
      main/exercice/global_multiple_answer.class.php
  29. 2
      main/exercice/hotspot.class.php
  30. 6
      main/exercice/qti2.php
  31. 2
      main/exercice/question_create.php
  32. 12
      main/exercice/question_list_admin.inc.php
  33. 12
      main/exercice/question_pool.php
  34. 4
      main/exercice/tests_category.php
  35. 2
      main/exercice/upload_exercise.php
  36. 4
      main/forum/forumfunction.inc.php
  37. 2
      main/forum/forumqualify.php
  38. 7
      main/gradebook/lib/fe/displaygradebook.php
  39. 13
      main/gradebook/lib/fe/evalform.class.php
  40. 4
      main/gradebook/lib/fe/userform.class.php
  41. 6
      main/gradebook/user_info.php
  42. 2
      main/group/group_category.php
  43. 4
      main/group/group_creation.php
  44. 2
      main/group/group_edit.php
  45. 4
      main/group/group_space.php
  46. 2
      main/help/faq.php
  47. 4
      main/help/help.php
  48. 28
      main/inc/ajax/model.ajax.php
  49. 2
      main/inc/ajax/social.ajax.php
  50. 7
      main/inc/course_document.inc.php
  51. 2
      main/inc/introductionSection.inc.php
  52. 2
      main/inc/lib/add_course.lib.inc.php
  53. 40
      main/inc/lib/api.lib.php
  54. 4
      main/inc/lib/blog.lib.php
  55. 16
      main/inc/lib/career.lib.php
  56. 14
      main/inc/lib/certificate.lib.php
  57. 9
      main/inc/lib/course.lib.php
  58. 3
      main/inc/lib/database.lib.php
  59. 33
      main/inc/lib/display.lib.php
  60. 173
      main/inc/lib/document.lib.php
  61. 4
      main/inc/lib/event_email_template.class.php
  62. 68
      main/inc/lib/events.lib.php
  63. 6
      main/inc/lib/extra_field_value.lib.php
  64. 112
      main/inc/lib/formvalidator/FormValidator.class.php
  65. 2
      main/inc/lib/gradebook.lib.php
  66. 83
      main/inc/lib/group_portal_manager.lib.php
  67. 33
      main/inc/lib/hook/HookResubscribe.php
  68. 21
      main/inc/lib/hook/interfaces/HookResubscribeEventInterface.php
  69. 20
      main/inc/lib/hook/interfaces/HookResubscribeObserverInterface.php
  70. 4
      main/inc/lib/message.lib.php
  71. 2
      main/inc/lib/myspace.lib.php
  72. 4
      main/inc/lib/nanogong.lib.php
  73. 19
      main/inc/lib/plugin.class.php
  74. 2
      main/inc/lib/plugin.lib.php
  75. 2
      main/inc/lib/security.lib.php
  76. 24
      main/inc/lib/sessionmanager.lib.php
  77. 64
      main/inc/lib/social.lib.php
  78. 4
      main/inc/lib/statistics.lib.php
  79. 6
      main/inc/lib/sub_language.class.php
  80. 8
      main/inc/lib/svg-edit/extensions/imagelib/users.php
  81. 29
      main/inc/lib/template.lib.php
  82. 10
      main/inc/lib/timeline.lib.php
  83. 111
      main/inc/lib/usermanager.lib.php
  84. 53
      main/install/database.sql
  85. 12
      main/install/migrate-db-1.9.0-1.10.0-pre.sql
  86. 12
      main/install/update-files-1.9.0-1.10.0.inc.php
  87. 4
      main/lang/arabic/install.inc.php
  88. 4
      main/lang/asturian/install.inc.php
  89. 4
      main/lang/basque/install.inc.php
  90. 4
      main/lang/brazilian/install.inc.php
  91. 4
      main/lang/bulgarian/install.inc.php
  92. 4
      main/lang/catalan/install.inc.php
  93. 4
      main/lang/croatian/install.inc.php
  94. 4
      main/lang/dutch/install.inc.php
  95. 5
      main/lang/english/install.inc.php
  96. 16
      main/lang/english/trad4all.inc.php
  97. 2
      main/lang/esperanto/install.inc.php
  98. 12
      main/lang/faroese/trad4all.inc.php
  99. 5
      main/lang/french/install.inc.php
  100. 18
      main/lang/french/trad4all.inc.php
  101. Some files were not shown because too many files have changed in this diff Show More

@ -41,7 +41,7 @@ $form_template = <<<EOT
<div class="clear">
&nbsp;
</div>
<p><a href="#" class="btn" onclick="$('#registration-form').submit()"><span>S'inscrire</span></a></p>
<p><a href="#" class="btn btn-primary" onclick="$('#registration-form').submit()"><span>S'inscrire</span></a></p>
</form>
EOT;

@ -50,7 +50,13 @@ $_setting['display_courses_to_anonymous_users'] = 'true';
*/
if (isset($_GET['submitAuth']) && $_GET['submitAuth'] == 1) {
$i = api_get_anonymous_id();
Event::addEvent(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();

@ -323,7 +323,13 @@ if (!empty($action)) {
fputs($fp, "<b>$notice_title</b><br />\n$notice_text");
fclose($fp);
}
Event::addEvent(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
@ -365,7 +371,13 @@ if (!empty($action)) {
}
}
}
Event::addEvent(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':

@ -97,15 +97,15 @@ if ($course_validation_feature) {
$form->addElement('checkbox', 'exemplary_content', get_lang('FillWithExemplaryContent'));
// Submit buttons.
$submit_buttons[] = $form->createElement('style_submit_button', 'save_button', get_lang('Save'), array('class' => 'save'));
$submit_buttons[] = $form->addButtonSave(get_lang('Save'), 'save_button', true);
if ($course_request_info['status'] != COURSE_REQUEST_ACCEPTED) {
$submit_buttons[] = $form->createElement('style_submit_button', 'accept_button', get_lang('Accept'), array('class' => 'save', 'style' => 'background-image: url('.api_get_path(WEB_IMG_PATH).'icons/16/accept.png);'));
$submit_buttons[] = $form->addButtonSave(get_lang('Accept'), 'accept_button', true);
}
if ($course_request_info['status'] != COURSE_REQUEST_ACCEPTED && $course_request_info['status'] != COURSE_REQUEST_REJECTED) {
$submit_buttons[] = $form->createElement('style_submit_button', 'reject_button', get_lang('Reject'), array('class' => 'save', 'style' => 'background-image: url('.api_get_path(WEB_IMG_PATH).'icons/16/error.png);'));
$submit_buttons[] = $form->addButtonCancel(get_lang('Reject'), 'reject_button', true);
}
if ($course_request_info['status'] != COURSE_REQUEST_ACCEPTED && intval($course_request_info['info']) <= 0) {
$submit_buttons[] = $form->createElement('style_submit_button', 'ask_info_button', get_lang('AskAdditionalInfo'), array('class' => 'save', 'style' => 'background-image: url('.api_get_path(WEB_IMG_PATH).'request_info.gif);'));
$submit_buttons[] = $form->addButtonPreview(get_lang('AskAdditionalInfo'), 'ask_info_button', true);
}
$form->addGroup($submit_buttons);

@ -765,7 +765,13 @@ function handle_templates() {
// Add event to the system log.
$user_id = api_get_user_id();
$category = $_GET['category'];
Event::addEvent(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']);
@ -773,7 +779,13 @@ function handle_templates() {
// Add event to the system log
$user_id = api_get_user_id();
$category = $_GET['category'];
Event::addEvent(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();
}
@ -943,7 +955,7 @@ function add_edit_template() {
$form->setDefaults($defaults);
}
// Setting the form elements: the submit button.
$form->addElement('style_submit_button' , 'submit', get_lang('Ok') ,'class="save"');
$form->addButtonSave(get_lang('Ok'), 'submit');
// Setting the rules: the required fields.
$form->addRule('title', get_lang('ThisFieldIsRequired'), 'required');

@ -53,14 +53,14 @@ if (is_numeric($_REQUEST['field_id'])) {
}
$form->setDefaults($defaults);
// Submit button
$form->addElement('style_submit_button', 'submit', get_lang('Add'),'class="add"');
$form->addButtonCreate(get_lang('Add'), 'submit');
// Validate form
if ($form->validate()) {
$field = $form->exportValues();
$field_name = $field['field_name'];
if (is_numeric($field['field_id']) && $field['field_id']<>0 && !empty($field['field_id'])) {
edit_specific_field($field['field_id'],$field['field_name']);
edit_specific_field($field['field_id'], $field['field_name']);
$message = get_lang('FieldEdited');
} else {
$field_id = add_specific_field($field_name);

@ -271,7 +271,7 @@ if (isset($_GET['action']) && $_GET['action']=='definenewsublanguage') {
$form->addRule('isocode', get_lang('ThisFieldIsRequired'), 'required');
$form->addElement('static', null, '&nbsp;', '<i>en, es, fr</i>');
$form->addElement('checkbox', 'sub_language_is_visible', '', get_lang('Visibility'));
$form->addElement('style_submit_button', 'SubmitAddNewLanguage', get_lang('CreateSubLanguage'), 'class="'.$class.'"');
$form->addButtonCreate(get_lang('CreateSubLanguage'), 'SubmitAddNewLanguage');
//$values['original_name'] = $language_details['original_name'].'...'; -> cannot be used because of quickform filtering (freeze)
$values['english_name'] = $language_details['english_name'].'2';
$values['isocode'] = $language_details['isocode'];
@ -286,7 +286,7 @@ if (isset($_GET['action']) && $_GET['action']=='definenewsublanguage') {
$form->addElement('static', '', get_lang('OriginalName'),$original_name);
$form->addElement('static', '', get_lang('EnglishName'),$english_name);
$form->addElement('static', '', get_lang('PlatformCharsetTitle'),$isocode);
$form->addElement('style_submit_button', 'SubmitAddDeleteLanguage', get_lang('DeleteSubLanguage'), 'class="'.$class.'"');
$form->addButtonCreate(get_lang('DeleteSubLanguage'), 'SubmitAddDeleteLanguage');
$form->display();
}
if (isset($_GET['action']) && $_GET['action']=='definenewsublanguage') {

@ -19,6 +19,7 @@ $this_section = SECTION_PLATFORM_ADMIN;
$_SESSION['this_section']=$this_section;
$action = isset($_GET['action']) ? $_GET['action'] : null;
$action_todo = false;
// Access restrictions
api_protect_admin_script(true);
@ -176,18 +177,18 @@ if ($action_todo) {
$form->addElement('hidden', 'action', 'edit');
}
$form->addElement('checkbox', 'send_email_test', null, get_lang('SendOnlyAnEmailToMySelfToTest'));
$form->addElement('style_submit_button', 'submit', $text, 'class="'.$class.'"');
$form->addButtonSend($text, 'submit');
$form->setDefaults($values);
if ($form->validate()) {
$values = $form->exportValues();
if ( !isset($values['visible_teacher'])) {
if (!isset($values['visible_teacher'])) {
$values['visible_teacher'] = false;
}
if ( !isset($values['visible_student'])) {
if (!isset($values['visible_student'])) {
$values['visible_student'] = false;
}
if ( !isset($values['visible_guest'])) {
if (!isset($values['visible_guest'])) {
$values['visible_guest'] = false;
}
if ($values['lang'] == 'all') {
@ -208,11 +209,11 @@ if ($action_todo) {
$values['visible_guest'],
$values['lang'],
$sendMail,
$values['add_to_calendar'],
$values['send_email_test']
empty($values['add_to_calendar'])?false:true,
empty($values['send_email_test'])?false:true
);
if ($announcement_id !== false) {
if ($announcement_id !== false) {
SystemAnnouncementManager::announcement_for_groups($announcement_id, array($values['group']));
Display :: display_confirmation_message(get_lang('AnnouncementAdded'));
} else {

@ -442,6 +442,8 @@ if ($error_drh) {
$message = Display::return_message($err_msg, 'error');
}
$gravatarEnabled = api_get_configuration_value('gravatar_enabled');
// USER PICTURE
$image_path = UserManager::get_user_picture_path_by_id($user_id,'web');
$image_dir = $image_path['dir'];
@ -449,7 +451,11 @@ $image = $image_path['file'];
$image_file = ($image != '' ? $image_dir.$image : api_get_path(WEB_CODE_PATH).'img/unknown.jpg');
$image_size = api_getimagesize($image_file);
$img_attributes = 'src="'.$image_file.'?rand='.time().'" '
if (!$gravatarEnabled) {
$image_file .= '?rand='.time();
}
$img_attributes = 'src="'.$image_file.'" '
.'alt="'.api_get_person_name($user_data['firstname'], $user_data['lastname']).'" '
.'style="float:'.($text_dir == 'rtl' ? 'left' : 'right').'; padding:5px;" ';
@ -462,7 +468,10 @@ $big_image = $image_dir.'big_'.$image;
$big_image_size = api_getimagesize($big_image);
$big_image_width = $big_image_size['width'];
$big_image_height = $big_image_size['height'];
$url_big_image = $big_image.'?rnd='.time();
$url_big_image = $image_file;
if (!$gravatarEnabled) {
$url_big_image = $big_image.'?rnd='.time();
}
$content = null;
if ($image == '') {

@ -131,16 +131,16 @@ if (isset($action) && $action == 'calendar_add') {
$form->addElement('date_time_picker', 'date_time', '', array('form_name'=>'attendance_calendar_edit'), 5);
$defaults['date_time'] = $calendar['date_time'];
$form->addElement('style_submit_button', null, get_lang('Save'), 'class="save"');
$form->addElement('style_submit_button', 'cancel', get_lang('Cancel'), 'class="cancel"');
$form->addButtonSave(get_lang('Save'));
$form->addButtonCancel(get_lang('Cancel'), 'cancel');
$form->setDefaults($defaults);
$form->display();
echo '</div>';
} else {
echo Display::return_icon(
'lp_calendar_event.png',
get_lang('DateTime')
).' '.substr($calendar['date_time'], 0, strlen($calendar['date_time'])- 3) .'&nbsp;';
'lp_calendar_event.png',
get_lang('DateTime')
).' '.substr($calendar['date_time'], 0, strlen($calendar['date_time'])- 3) .'&nbsp;';
if (isset($calendar['groups']) && !empty($calendar['groups'])) {
foreach ($calendar['groups'] as $group) {

@ -495,9 +495,23 @@ class CoursesController
api_get_path(WEB_CODE_PATH)."inc/email_editor.php?action=subscribe_me_to_session&session=".
Security::remove_XSS($sessionData);
return Display::url(get_lang('Subscribe'), $url, array(
$result = Display::url(get_lang('Subscribe'), $url, array(
'class' => 'btn btn-large btn-primary',
));
$hook = HookResubscribe::create();
if (!empty($hook)) {
$hook->setEventData(array(
'session_id' => intval($sessionData)
));
try {
$hook->notifyResubscribe(HOOK_EVENT_TYPE_PRE);
} catch (Exception $exception) {
$result = $exception->getMessage();
}
}
return $result;
}
/**

@ -27,7 +27,7 @@ if (isset($_GET['firstpage'])) {
$form = new FormValidator('formLogin', 'post', $action, null, array('class'=>'form-stacked'));
$form->addElement('text', 'login', null, array('placeholder' => get_lang('UserName'), 'class' => 'span3 autocapitalize_off')); //new
$form->addElement('password', 'password', null, array('placeholder' => get_lang('Password'), 'class' => 'span3')); //new
$form->addElement('style_submit_button', 'submitAuth', get_lang('LoginEnter'), array('class' => 'btn span3'));
$form->addButtonNext(get_lang('LoginEnter'), 'submitAuth');
// see same text in main_api.lib.php function api_not_allowed
if (api_is_cas_activated()) {
$msg .= Display::return_message(sprintf(get_lang('YouHaveAnInstitutionalAccount'), api_get_setting("Institution")), '', false);

@ -75,7 +75,7 @@ if (api_get_setting('allow_lostpassword') == 'false') {
if (isset($_GET['reset']) && isset($_GET['id'])) {
$message = Display::return_message(Login::reset_password($_GET["reset"], $_GET["id"], true), 'normal', false);
$message .= '<a href="'.api_get_path(WEB_CODE_PATH).'auth/lostPassword.php" class="btn" >'.get_lang('Back').'</a>';
$message .= '<a href="'.api_get_path(WEB_CODE_PATH).'auth/lostPassword.php" class="btn btn-back" >'.get_lang('Back').'</a>';
echo $message;
} else {
$form = new FormValidator('lost_password');

@ -323,8 +323,7 @@ function is_profile_editable() {
* @return The filename of the new production or FALSE if the upload has failed
*/
function upload_user_production($user_id) {
$image_path = UserManager::get_user_picture_path_by_id($user_id, 'system');
$production_repository = $image_path['dir'];
$production_repository = UserManager::getUserPathById($user_id, 'system');
if (!file_exists($production_repository)) {
@mkdir($production_repository, api_get_permissions_for_new_directories(), true);
@ -692,6 +691,8 @@ if (!empty($msg_is_not_password)){
Display::addFlash(Display :: return_message($warning_msg, 'warning', false));
}
$gravatarEnabled = api_get_configuration_value('gravatar_enabled');
// User picture size is calculated from SYSTEM path
$image_syspath = UserManager::get_user_picture_path_by_id(api_get_user_id(), 'system', false, true);
$image_syspath['dir'].$image_syspath['file'];
@ -701,7 +702,10 @@ $image_path = UserManager::get_user_picture_path_by_id(api_get_user_id(), 'web',
$image_dir = $image_path['dir'];
$image = $image_path['file'];
$image_file = $image_dir.$image;
$img_attributes = 'src="'.$image_file.'?rand='.time().'" '
if (!$gravatarEnabled) {
$image_file .= '?rand='.time();
}
$img_attributes = 'src="'.$image_file.'" '
.'alt="'.api_get_person_name($user_data['firstname'], $user_data['lastname']).'" '
.'style="float:'.($text_dir == 'rtl' ? 'left' : 'right').'; margin-top:0px;padding:5px;" ';
@ -711,8 +715,10 @@ $big_image = $image_dir.'big_'.$image;
$big_image_size = api_getimagesize($big_image);
$big_image_width = $big_image_size['width'];
$big_image_height = $big_image_size['height'];
$url_big_image = $big_image.'?rnd='.time();
$url_big_image = $image_file;
if (!$gravatarEnabled) {
$url_big_image = $big_image.'?rnd='.time();
}
$show_delete_account_button = api_get_setting('platform_unsubscribe_allowed') == 'true' ? true : false;
$tpl = new Template(get_lang('ModifyProfile'));

@ -36,7 +36,7 @@ $form->addElement('header', get_lang('CourseRequiresPassword'));
$form->addElement('hidden', 'course_id', $course_id);
$form->addElement('hidden', 'session_id', $session_id);
$form->addElement('password', 'course_password', null, get_lang('Password'));
$form->addElement('style_submit_button', null, get_lang('Accept'), 'class="save"');
$form->addButtonSave(get_lang('Accept'));
if ($form->validate()) {
$form_values = $form->exportValues();

@ -20,7 +20,8 @@ use \ChamiloSession as Session;
/**
* The SSO class allows for management of remote Single Sign On resources
*/
class ssoDrupal {
class ssoDrupal
{
public $protocol; // 'http://',
public $domain; // 'localhost/project/drupal',
public $auth_uri; // '/?q=user',
@ -30,16 +31,17 @@ class ssoDrupal {
/**
* Instanciates the object, initializing all relevant URL strings
*/
public function __construct() {
public function __construct()
{
$this->protocol = api_get_setting('sso_authentication_protocol');
// There can be multiple domains, so make sure to take only the first
// This might be later extended with a decision process
$domains = split(',',api_get_setting('sso_authentication_domain'));
$domains = preg_split('/,/', api_get_setting('sso_authentication_domain'));
$this->domain = trim($domains[0]);
$this->auth_uri = api_get_setting('sso_authentication_auth_uri');
$this->deauth_uri = api_get_setting('sso_authentication_unauth_uri');
//cut the string to avoid recursive URL construction in case of failure
$this->referer = $this->protocol.$_SERVER['HTTP_HOST'].substr($_SERVER['REQUEST_URI'],0,strpos($_SERVER['REQUEST_URI'],'sso'));
$this->referer = $this->protocol.$_SERVER['HTTP_HOST'].substr($_SERVER['REQUEST_URI'], 0, strpos($_SERVER['REQUEST_URI'], 'sso'));
$this->deauth_url = $this->protocol.$this->domain.$this->deauth_uri;
$this->master_url = $this->protocol.$this->domain.$this->auth_uri;
$this->target = api_get_path(WEB_PATH);
@ -48,7 +50,8 @@ class ssoDrupal {
/**
* Unlogs the user from the remote server
*/
public function logout() {
public function logout()
{
header('Location: '.$this->deauth_url);
exit;
}
@ -56,7 +59,8 @@ class ssoDrupal {
/**
* Sends the user to the master URL for a check of active connection
*/
public function ask_master() {
public function ask_master()
{
// Generate a single usage token that must be encoded by the master
$_SESSION['sso_challenge'] = api_generate_password(48);
// Redirect browser to the master URL
@ -74,7 +78,8 @@ class ssoDrupal {
* Validates the received active connection data with the database
* @return bool Return the loginFailed variable value to local.inc.php
*/
public function check_user() {
public function check_user()
{
global $_user;
$loginFailed = false;
@ -85,8 +90,8 @@ class ssoDrupal {
//from session since it can only be used once
$sso_challenge = '';
if (isset($_SESSION['sso_challenge'])) {
$sso_challenge = $_SESSION['sso_challenge'];
unset($_SESSION['sso_challenge']);
$sso_challenge = $_SESSION['sso_challenge'];
unset($_SESSION['sso_challenge']);
}
//lookup the user in the main database
@ -124,7 +129,7 @@ class ssoDrupal {
$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 (is_array($my_url_list) && count($my_url_list) > 0) {
if (in_array($current_access_url_id, $my_url_list)) {
// the user has permission to enter at this site
$_user['user_id'] = $uData['user_id'];
@ -132,7 +137,7 @@ class ssoDrupal {
Session::write('_user', $_user);
Event::event_login();
// Redirect to homepage
$sso_target = isset($sso['target']) ? $sso['target'] : api_get_path(WEB_PATH) .'.index.php';
$sso_target = isset($sso['target']) ? $sso['target'] : api_get_path(WEB_PATH) . 'index.php';
header('Location: '. $sso_target);
exit;
} else {
@ -168,7 +173,7 @@ class ssoDrupal {
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);
Session::write('_user', $_user);
Event::event_login();
} else {
$loginFailed = true;
@ -222,7 +227,8 @@ class ssoDrupal {
* @param string Encoded cookie
* @return array Parsed and unencoded cookie
*/
private function decode_cookie($cookie) {
private function decode_cookie($cookie)
{
return unserialize(base64_decode($cookie));
}

@ -222,6 +222,10 @@ function saveMessage($message, $userId, $_course, $session_id, $group_id, $previ
$userPhoto = $userImage['dir'].$userImage['file'];
}
if (api_get_configuration_value('gravatar_enabled')) {
$userPhoto = $userImage['file'];
}
$filePhoto = '<img class="chat-image" src="'.$userPhoto.'"/>';
if ($isMaster) {

@ -122,6 +122,11 @@ if (!empty($course)) {
} else {
$fileUrl = $userImage['dir'].$userImage['file'];
}
if (api_get_configuration_value('gravatar_enabled')) {
$fileUrl = $userImage['file'];
}
$email = $user['email'];
$url_user_profile=api_get_path(WEB_CODE_PATH).'social/profile.php?u='.$user['user_id'].'&';
?>

@ -154,13 +154,15 @@ if (api_is_invitee()) {
Session::erase('toolgroup');
Session::erase('_gid');
$is_speacialcourse = CourseManager::is_special_course($course_code);
if ($is_speacialcourse) {
$autoreg = Security::remove_XSS($_GET['autoreg']);
if ($autoreg == 1) {
if (CourseManager::subscribe_user($user_id, $course_code, $status = STUDENT)) {
Session::write('is_allowed_in_course', true);
$isSpecialCourse = CourseManager::is_special_course($course_code);
if ($isSpecialCourse) {
if (isset($_GET['autoreg'])) {
$autoRegistration = Security::remove_XSS($_GET['autoreg']);
if ($autoRegistration == 1) {
if (CourseManager::subscribe_user($user_id, $course_code, $status = STUDENT)) {
Session::write('is_allowed_in_course', true);
}
}
}
}

@ -44,7 +44,7 @@ if (isset($_GET['delete']) && $_GET['delete'] == 'yes') {
$message = '<h3>'.get_lang('Course').' : '.$current_course_name.' ('.$current_course_code.') </h3>';
$message .= '<p>'.get_lang('ByDel').'</p>';
$message .= '<p><a class="btn btn-primary" href="'.api_get_path(WEB_CODE_PATH).'course_info/maintenance.php?'.api_get_cidreq().'">'.
get_lang('No').'</a>&nbsp;<a class="btn" href="'.api_get_self().'?delete=yes&'.api_get_cidreq().'">'.
get_lang('No').'</a>&nbsp;<a class="btn btn-danger" href="'.api_get_self().'?delete=yes&'.api_get_cidreq().'">'.
get_lang('Yes').'</a></p>';
$interbreadcrumb[] = array('url' => 'maintenance.php', 'name' => get_lang('Maintenance'));
}

@ -35,9 +35,6 @@ echo Display::page_header($nameTools);
<div class="sectiontitle"><?php Display::display_icon('copy.gif', get_lang('CopyCourse')); ?>&nbsp;&nbsp;<a href="../coursecopy/copy_course.php?<?php echo api_get_cidreq(); ?>"><?php echo get_lang('CopyCourse'); ?></a></div>
<div class="sectioncomment"><?php echo get_lang('DescriptionCopyCourse'); ?></div>
<div class="sectiontitle"><?php Display::display_icon('copy.gif', get_lang('CopySurvey')); ?>&nbsp;&nbsp;<a href="../survey/copy_survey.php?<?php echo api_get_cidreq(); ?>"><?php echo get_lang('CopySurvey'); ?></a></div>
<div class="sectioncomment"><?php echo get_lang('DescriptionCopySurvey'); ?></div>
<div class="sectiontitle"><?php Display::display_icon('tool_delete.gif', get_lang('recycle_course')); ?>&nbsp;&nbsp;<a href="../coursecopy/recycle_course.php?<?php echo api_get_cidreq(); ?>"><?php echo get_lang('recycle_course'); ?></a></div>
<div class="sectioncomment"><?php echo get_lang('DescriptionRecycleCourse'); ?></div>

@ -137,10 +137,10 @@ if (Security::check_token('post') && (
CourseSelectForm::display_form($course, $hiddenFields);
} elseif ($filename === false) {
Display::display_error_message(get_lang('ArchivesDirectoryNotWriteableContactAdmin'));
echo '<a class="btn" href="import_backup.php?' . api_get_cidreq() . '">' . get_lang('TryAgain') . '</a>';
echo '<a class="btn btn-default" href="import_backup.php?' . api_get_cidreq() . '">' . get_lang('TryAgain') . '</a>';
} else {
Display::display_warning_message(get_lang('NoResourcesInBackupFile'));
echo '<a class="btn" href="import_backup.php?' . api_get_cidreq() . '">' . get_lang('TryAgain') . '</a>';
echo '<a class="btn btn-default" href="import_backup.php?' . api_get_cidreq() . '">' . get_lang('TryAgain') . '</a>';
}
} else {
$user = api_get_user_info();

@ -2672,6 +2672,7 @@ div.admin_section h4 {
float:left;
line-height: 16px;
padding-top: 5px;
margin: 0;
}
.ribbon .rib-total {
@ -3774,7 +3775,7 @@ a:active{
height: 20px;
width: 20px;
position:absolute;
background: url("offline.png") no-repeat scroll right center transparent;
background: url("../img/offline.png") no-repeat scroll right center transparent;
}
.online_user {
@ -3793,21 +3794,21 @@ a:active{
margin-right: 4px;
}
.send_msg_in_text {
background: url("send_msg.png") no-repeat scroll right center transparent;
background: url("../img/mail_send.png") no-repeat scroll right center transparent;
height: 16px;
width: 17px;
display: inline-block;
margin-right: 4px;
}
.send_inv_in_text {
background: url("send_inv.png") no-repeat scroll right center transparent;
background: url("../img/invitation.png") no-repeat scroll right center transparent;
height: 16px;
width: 17px;
display: inline-block;
margin-right: 4px;
}
.teacher_online {
background: url("teacher.png") no-repeat scroll right center transparent;
background: url("../img/icons/16/teacher.png") no-repeat scroll right center transparent;
height: 16px;
width: 17px;
display: inline-block;
@ -3815,7 +3816,7 @@ a:active{
}
.student_online {
background: url("student.png") no-repeat scroll right center transparent;
background: url("../img/icons/16/user.png") no-repeat scroll right center transparent;
height: 16px;
width: 17px;
display: inline-block;
@ -3827,7 +3828,7 @@ a:active{
}
.offline_user_in_text {
background: url("offline.png") no-repeat scroll right center transparent;
background: url("../img/offline.png") no-repeat scroll right center transparent;
height: 16px;
width: 17px;
display: inline-block;

@ -329,7 +329,7 @@ $file_url_web = $file_url.'?'.api_get_cidreq();
if (!$is_nanogong_available) {
if (in_array(strtolower($pathinfo['extension']) , array('html', "htm"))) {
echo '<a class="btn" href="'.$file_url_web.'" target="_blank">'.get_lang('CutPasteLink').'</a>';
echo '<a class="btn btn-default" href="'.$file_url_web.'" target="_blank">'.get_lang('CutPasteLink').'</a>';
}
}
@ -426,7 +426,7 @@ if ($is_freemind_available) {
if ($is_nanogong_available) {
$file_url_web = DocumentManager::generateAudioTempFolder($file_url_sys);
echo '<div align="center">';
echo '<a class="btn" href="'.$file_url_web.'" target="_blank">'.get_lang('Download').'</a>';
echo '<a class="btn btn-default" href="'.$file_url_web.'" target="_blank"><i class="fa fa-download"></i> '.get_lang('Download').'</a>';
echo '<br/>';
echo '<br/>';
echo DocumentManager::readNanogongFile($to_url);

@ -1621,7 +1621,7 @@ class Exercise
$this->id,
null,
null,
api_get_course_id(),
api_get_course_int_id(),
$session_id
);

@ -1,75 +1,113 @@
<?php
/* For licensing terms, see /license.txt */
/**
* Exercise reminder overview
* Then it shows the results on the screen.
* @package chamilo.exercise
* @author Julio Montoya Armas switchable fill in blank option added
* Exercise reminder overview
* Then it shows the results on the screen.
* @package chamilo.exercise
* @author Julio Montoya Armas switchable fill in blank option added
*/
require_once '../inc/global.inc.php';
$this_section = SECTION_COURSES;
/* ACCESS RIGHTS */
/* ACCESS RIGHTS */
// notice for unauthorized people.
api_protect_course_script(true);
if($debug>0){error_log('Entered exercise_result.php: '.print_r($_POST,1));}
if ($debug>0) {
error_log('Entered exercise_result.php: '.print_r($_POST, 1));
}
// general parameters passed via POST/GET
if ( empty ( $origin ) ) { $origin = Security::remove_XSS($_REQUEST['origin']);}
if ( empty ( $learnpath_id ) ) { $learnpath_id = intval($_REQUEST['learnpath_id']);}
if ( empty ( $learnpath_item_id ) ) { $learnpath_item_id = intval($_REQUEST['learnpath_item_id']);}
if ( empty ( $learnpath_item_view_id ) ) { $learnpath_item_view_id = intval($_REQUEST['learnpath_item_view_id']);}
if (empty ($origin)) {
if (!empty($_REQUEST['origin'])) {
$origin = Security::remove_XSS($_REQUEST['origin']);
} else {
$origin = '';
}
}
if (empty($learnpath_id)) {
if (!empty($_REQUEST['learnpath_id'])) {
$learnpath_id = intval($_REQUEST['learnpath_id']);
} else {
$learnpath_id = 0;
}
}
if (empty($learnpath_item_id)) {
if (!empty($_REQUEST['learnpath_item_id'])) {
$learnpath_item_id = intval($_REQUEST['learnpath_item_id']);
} else {
$learnpath_item_id = 0;
}
}
if (empty($learnpath_item_view_id)) {
if (!empty($_REQUEST['learnpath_item_view_id'])) {
$learnpath_item_view_id = intval($_REQUEST['learnpath_item_view_id']);
} else {
$learnpath_item_view_id = 0;
}
}
if ( empty ($exerciseId)) { $exerciseId = intval($_REQUEST['exerciseId']);}
if (empty($exerciseId)) {
if (!empty($_REQUEST['exerciseId'])) {
$exerciseId = intval($_REQUEST['exerciseId']);
} else {
$exerciseId = 0;
}
}
if ( empty ($objExercise)) { $objExercise = $_SESSION['objExercise'];}
if (empty($objExercise)) {
if (!empty($_SESSION['objExercise'])) {
$objExercise = $_SESSION['objExercise'];
} else {
$objExercise = null;
}
}
if (!$objExercise) {
//Redirect to the exercise overview
//Check if the exe_id exists
header("Location: overview.php?exerciseId=".$exerciseId);
exit;
//Redirect to the exercise overview
//Check if the exe_id exists
header("Location: overview.php?exerciseId=".$exerciseId);
exit;
}
$time_control = false;
$clock_expired_time = ExerciseLib::get_session_time_control_key($objExercise->id, $learnpath_id, $learnpath_item_id);
if ($objExercise->expired_time != 0 && !empty($clock_expired_time)) {
$time_control = true;
$time_control = true;
}
if ($time_control) {
// Get time left for exipiring time
$time_left = api_strtotime($clock_expired_time,'UTC') - time();
$htmlHeadXtra[] = api_get_css(api_get_path(WEB_LIBRARY_PATH).'javascript/epiclock/stylesheet/jquery.epiclock.css');
$time_left = api_strtotime($clock_expired_time, 'UTC') - time();
$htmlHeadXtra[] = api_get_css(api_get_path(WEB_LIBRARY_PATH).'javascript/epiclock/stylesheet/jquery.epiclock.css');
$htmlHeadXtra[] = api_get_css(api_get_path(WEB_LIBRARY_PATH).'javascript/epiclock/renderers/minute/epiclock.minute.css');
$htmlHeadXtra[] = api_get_js('epiclock/javascript/jquery.dateformat.min.js');
$htmlHeadXtra[] = api_get_js('epiclock/javascript/jquery.epiclock.min.js');
$htmlHeadXtra[] = api_get_js('epiclock/renderers/minute/epiclock.minute.js');
$htmlHeadXtra[] = $objExercise->show_time_control_js($time_left);
$htmlHeadXtra[] = $objExercise->show_time_control_js($time_left);
}
if (isset($_SESSION['exe_id'])) {
$exe_id = intval($_SESSION['exe_id']);
$exe_id = intval($_SESSION['exe_id']);
}
$exercise_stat_info = $objExercise->get_stat_track_exercise_info_by_exe_id($exe_id);
if (!empty($exercise_stat_info['data_tracking'])) {
$question_list = explode(',', $exercise_stat_info['data_tracking']);
$question_list = explode(',', $exercise_stat_info['data_tracking']);
}
if (empty($exercise_stat_info) || empty($question_list)) {
api_not_allowed();
api_not_allowed();
}
$nameTools = get_lang('Exercice');
$interbreadcrumb[] = array("url" => "exercice.php?".api_get_cidreq(), "name" => get_lang('Exercices'));
if ($origin != 'learnpath') {
//so we are not in learnpath tool
Display::display_header($nameTools,get_lang('Exercise'));
//so we are not in learnpath tool
Display::display_header($nameTools, get_lang('Exercise'));
} else {
Display::display_reduced_header();
}
@ -78,10 +116,10 @@ if ($origin != 'learnpath') {
// I'm in a preview mode as course admin. Display the action menu.
if (api_is_course_admin() && $origin != 'learnpath') {
echo '<div class="actions">';
echo '<a href="admin.php?'.api_get_cidreq().'&exerciseId='.$objExercise->id.'">'.Display::return_icon('back.png', get_lang('GoBackToQuestionList'), array(), 32).'</a>';
echo '<a href="exercise_admin.php?'.api_get_cidreq().'&modifyExercise=yes&exerciseId='.$objExercise->id.'">'.Display::return_icon('edit.png', get_lang('ModifyExercise'), array(), 32).'</a>';
echo '</div>';
echo '<div class="actions">';
echo '<a href="admin.php?'.api_get_cidreq().'&exerciseId='.$objExercise->id.'">'.Display::return_icon('back.png', get_lang('GoBackToQuestionList'), array(), 32).'</a>';
echo '<a href="exercise_admin.php?'.api_get_cidreq().'&modifyExercise=yes&exerciseId='.$objExercise->id.'">'.Display::return_icon('edit.png', get_lang('ModifyExercise'), array(), 32).'</a>';
echo '</div>';
}
echo Display::page_header(get_lang('QuestionsToReview'));
@ -163,39 +201,39 @@ $counter = 0;
foreach ($question_list as $questionId) {
// destruction of the Question object
unset($objQuestionTmp);
unset($objQuestionTmp);
// creates a temporary Question object
$objQuestionTmp = Question :: read($questionId);
// creates a temporary Question object
$objQuestionTmp = Question :: read($questionId);
$quesId = $objQuestionTmp->selectId();
$check_id = 'remind_list['.$questionId.']';
$attributes = array('id'=>$check_id, 'onclick'=>"save_remind_item(this, '$questionId');");
$quesId = $objQuestionTmp->selectId();
$check_id = 'remind_list['.$questionId.']';
$attributes = array('id'=>$check_id, 'onclick'=>"save_remind_item(this, '$questionId');");
if (in_array($questionId, $remind_list)) {
$attributes['checked'] = 1;
}
$label_attributes = array();
$label_attributes['class'] = 'checkbox';
$label_attributes['for'] = $check_id;
if (in_array($questionId, $remind_list)) {
$attributes['checked'] = 1;
}
$label_attributes = array();
$label_attributes['class'] = 'checkbox';
$label_attributes['for'] = $check_id;
$label_attributes['class'] = "checkbox";
$checkbox = Display::input('checkbox', 'remind_list['.$questionId.']', '', $attributes);
$url = 'exercise_submit.php?exerciseId='.$objExercise->id.'&num='.$counter.'&reminder=1';
$checkbox = Display::input('checkbox', 'remind_list['.$questionId.']', '', $attributes);
$url = 'exercise_submit.php?exerciseId='.$objExercise->id.'&num='.$counter.'&reminder=1';
$counter++;
if ($objExercise->type == ONE_PER_PAGE) {
$question_title = Display::url($counter.'. '.cut($objQuestionTmp->selectTitle(), 40), $url);
$question_title = $counter.'. '.cut($objQuestionTmp->selectTitle(), 40);
} else {
$question_title = $counter.'. '.cut($objQuestionTmp->selectTitle(), 40);
}
$counter++;
if ($objExercise->type == ONE_PER_PAGE) {
$question_title = Display::url($counter.'. '.cut($objQuestionTmp->selectTitle(), 40), $url);
$question_title = $counter.'. '.cut($objQuestionTmp->selectTitle(), 40);
} else {
$question_title = $counter.'. '.cut($objQuestionTmp->selectTitle(), 40);
}
//Check if the question doesn't have an answer
if (!in_array($questionId, $exercise_result)) {
$question_title = Display::label($question_title, 'warning');
}
$question_title = Display::tag('label', $checkbox.$question_title, $label_attributes);
$table .= Display::div($question_title, array('class'=>'exercise_reminder_item'));
$question_title = Display::tag('label', $checkbox.$question_title, $label_attributes);
$table .= Display::div($question_title, array('class'=>'exercise_reminder_item'));
} // end foreach() block that loops over all questions
echo Display::div($table, array('class'=>'span10'));
@ -207,6 +245,6 @@ echo Display::div('', array('class'=>'clear'));
echo Display::div($exercise_actions, array('class'=>'form-actions'));
if ($origin != 'learnpath') {
// We are not in learnpath tool
Display::display_footer();
// We are not in learnpath tool
Display::display_footer();
}

@ -45,7 +45,7 @@ function aiken_display_form($msg = '') {
$form_validator->addElement('header', $name_tools);
$form_validator->addElement('text', 'total_weight', get_lang('TotalWeight'));
$form_validator->addElement('file', 'userFile', get_lang('DownloadFile'));
$form_validator->addElement('style_submit_button', 'submit', get_lang('Send'), 'class="upload"');
$form_validator->addButtonUpload(get_lang('Send'), 'submit');
$form .= $form_validator->return_form();
$form .= '<blockquote>'.get_lang('ImportAikenQuizExplanation').'<br /><pre>'.get_lang('ImportAikenQuizExplanationExample').'</pre></blockquote>';
echo $form;

@ -141,13 +141,14 @@ class GlobalMultipleAnswer extends Question
//ie6 fix
if ($obj_ex->edit_exercise_in_lp == true) {
if ($navigator_info['name'] == 'Internet Explorer' && $navigator_info['version'] == '6') {
$form->addElement('submit', 'lessAnswers', get_lang('LessAnswer'), 'class="minus"');
$form->addElement('submit', 'moreAnswers', get_lang('PlusAnswer'), 'class="plus"');
$form->addElement('submit', 'submitQuestion', $text, 'class="' . $class . '"');
$form = new FormValidator();
$form->addButtonDelete(get_lang('LessAnswer'), 'lessAnswers');
$form->addButtonCreate(get_lang('PlusAnswer'), 'moreAnswers');
$form->addButtonSave($text, 'submitQuestion');
} else {
$form->addElement('style_submit_button', 'lessAnswers', get_lang('LessAnswer'), 'class="minus"');
$form->addElement('style_submit_button', 'moreAnswers', get_lang('PlusAnswer'), 'class="plus"');
$form->addElement('style_submit_button', 'submitQuestion', $text, 'class="' . $class . '"');
$form->addButtonDelete(get_lang('LessAnswer'), 'lessAnswers');
$form->addButtonCreate(get_lang('PlusAnswer'), 'moreAnswers');
$form->addButtonSave($text, 'submitQuestion');
// setting the save button here and not in the question class.php
}
}

@ -35,7 +35,7 @@ class HotSpot extends Question
// setting the save button here and not in the question class.php
// Saving a question
$form->addElement('style_submit_button','submitQuestion',get_lang('GoToQuestion'), 'class="'.$class.'"');
$form->addButtonSave(get_lang('GoToQuestion'), 'submitQuestion');
//$form->addButtonSave(get_lang('GoToQuestion'), 'submitQuestion');
$form->addRule('imageUpload', get_lang('OnlyImagesAllowed'), 'filetype', array ('jpg', 'jpeg', 'png', 'gif'));
$form->addRule('imageUpload', get_lang('NoImage'), 'uploadedfile');

@ -35,7 +35,7 @@ function ch_qti2_display_form()
$name_tools = get_lang('ImportQtiQuiz');
$form = '<div class="actions">';
$form .= '<a href="'.api_get_path(WEB_CODE_PATH).'exercice/exercice.php?show=test&'.api_get_cidreq().'">'.
Display :: return_icon('back.png', get_lang('BackToExercisesList'),'',ICON_SIZE_MEDIUM).'</a>';
Display :: return_icon('back.png', get_lang('BackToExercisesList'), '', ICON_SIZE_MEDIUM).'</a>';
$form .= '</div>';
$formValidator = new FormValidator(
'qti_upload',
@ -46,8 +46,8 @@ function ch_qti2_display_form()
);
$formValidator->addElement('header', $name_tools);
$formValidator->addElement('file', 'userFile', get_lang('DownloadFile'));
$formValidator->addElement('style_submit_button', 'submit', get_lang('Send'), 'class="upload"');
$form .= $formValidator->return_form();
$formValidator->addButtonImport(get_lang('Upload'));
$form .= $formValidator->returnForm();
echo $form;
}

@ -50,7 +50,7 @@ $form->addElement('select', 'exercice', get_lang('Exercice'), $exercises);
$form->addElement('checkbox', 'is_content', null, get_lang('DefaultContent'), array('checked' => true));
// the submit button
$form->addElement('style_submit_button', 'SubmitCreateQuestion', get_lang('CreateQuestion'), 'class="add"');
$form->addButtonCreate(get_lang('CreateQuestion'), 'SubmitCreateQuestion');
// setting the rules
$form->addRule('exercice', get_lang('ThisFieldIsRequired'), 'required');

@ -141,11 +141,11 @@ if (!$inATest) {
echo "<div class='table-responsive'>";
echo "<table class='table table-condensed'>";
echo "<tr>";
echo "<th>" .get_lang('Questions'). "</th>";
echo "<th>" .get_lang('Type'). "</th>";
echo "<th>" .get_lang('Category'). "</th>";
echo "<th>" .get_lang('Difficulty'). "</th>";
echo "<th>" .get_lang('Score'). "</th>";
echo "<th style=\"width: 50%;\">" .get_lang('Questions'). "</th>";
echo "<th style=\"width: 6%;\">" .get_lang('Type'). "</th>";
echo "<th style=\"width: 22%; text-align:center;\">" .get_lang('Category'). "</th>";
echo "<th style=\"width: 6%;\">" .get_lang('Difficulty'). "</th>";
echo "<th style=\"width: 16%; float:left;\">" .get_lang('Score'). "</th>";
echo "</tr>";
echo "</table>";
echo "</div>";
@ -156,7 +156,7 @@ if (!$inATest) {
$questionList = $objExercise->selectQuestionList(true);
// Style for columns
$styleQuestion = "width:50%; float:left;";
$styleQuestion = "width:50%; float:left; margin-left: 25px;";
$styleType = "width:4%; float:left; text-align:center;";
$styleCat = "width:22%; float:left; text-align:center;";
$styleLevel = "width:6%; float:left; text-align:center;";

@ -19,7 +19,7 @@ require_once '../inc/global.inc.php';
$this_section = SECTION_COURSES;
$is_allowedToEdit = api_is_allowed_to_edit(null,true);
$is_allowedToEdit = api_is_allowed_to_edit(null, true);
$delete = isset($_GET['delete']) ? intval($_GET['delete']) : null;
$recup = isset($_GET['recup']) ? intval($_GET['recup']) : null;
@ -29,7 +29,7 @@ $courseCategoryId = isset($_REQUEST['courseCategoryId']) ? intval($_REQUEST['cou
$exerciseLevel = isset($_REQUEST['exerciseLevel']) ? intval($_REQUEST['exerciseLevel']) : -1;
$answerType = isset($_REQUEST['answerType']) ? intval($_REQUEST['answerType']) : null;
$page = isset($_REQUEST['page']) ? intval($_REQUEST['page']) : 0;
$copy_question = isset($_REQUEST['copy_question']) ? intval($_REQUEST['copy_question']) : 0;
$question_copy = isset($_REQUEST['question_copy']) ? intval($_REQUEST['question_copy']) : 0;
$session_id = isset($_REQUEST['session_id']) ? intval($_REQUEST['session_id']) : null;
$selected_course = isset($_GET['selected_course']) ? intval($_GET['selected_course']) : null;
// save the id of the previous course selected by user to reset menu if we detect that user change course hub 13-10-2011
@ -39,7 +39,7 @@ $exercice_id_changed = isset($_GET['exercice_id_changed']) ? intval($_GET['exerc
// by default when we go to the page for the first time, we select the current course
if (!isset($_GET['selected_course']) && !isset($_GET['exerciseId'])) {
$selected_course = api_get_course_int_id();
$selected_course = api_get_course_int_id();
}
$_course = api_get_course_info();
@ -60,11 +60,11 @@ if (!empty($objExercise)) {
$displayMessage = "";
if ($is_allowedToEdit) {
// Duplicating a Question
if (!isset($_POST['recup']) && $copy_question != 0 && isset($fromExercise)) {
if (!isset($_POST['recup']) && $question_copy != 0 && isset($fromExercise)) {
$origin_course_id = intval($_GET['course_id']);
$origin_course_info = api_get_course_info_by_id($origin_course_id);
$current_course = api_get_course_info();
$old_question_id = $copy_question;
$old_question_id = $question_copy;
// Reading the source question
$old_question_obj = Question::read($old_question_id, $origin_course_id);
@ -910,7 +910,7 @@ function get_action_icon_for_question(
unset($myObjEx);
break;
case "clone":
$url = api_get_self()."?".api_get_cidreq().$getParams."&amp;copy_question=$in_questionid&amp;course_id=$in_selected_course&amp;fromExercise=$from_exercice";
$url = api_get_self()."?".api_get_cidreq().$getParams."&amp;question_copy=$in_questionid&amp;course_id=$in_selected_course&amp;fromExercise=$from_exercice";
$res = Display::url(
Display::return_icon('cd.gif', get_lang('ReUseACopyInCurrentTest')),
$url

@ -72,7 +72,7 @@ function edit_category_form($in_action) {
$form->addElement('hidden', 'category_id');
$form->addElement('text', 'category_name', get_lang('CategoryName'), array('size' => '95'));
$form->addHtmlEditor('category_description', get_lang('CategoryDescription'), false, false, array('ToolbarSet' => 'test_category', 'Width' => '90%', 'Height' => '200'));
$form->addElement('style_submit_button', 'SubmitNote', get_lang('ModifyCategory'), 'class="add"');
$form->addButtonSave(get_lang('ModifyCategory'), 'SubmitNote');
// setting the defaults
$defaults = array();
@ -140,7 +140,7 @@ function add_category_form($in_action) {
$form->addElement('header', get_lang('AddACategory'));
$form->addElement('text', 'category_name', get_lang('CategoryName'), array('size' => '95'));
$form->addHtmlEditor('category_description', get_lang('CategoryDescription'), false, false, array('ToolbarSet' => 'test_category', 'Width' => '90%', 'Height' => '200'));
$form->addElement('style_submit_button', 'SubmitNote', get_lang('AddTestCategory'), 'class="add"');
$form->addButtonCreate(get_lang('AddTestCategory'), 'SubmitNote');
// setting the rules
$form->addRule('category_name', get_lang('ThisFieldIsRequired'), 'required');
// The validation or display

@ -90,7 +90,7 @@ function lp_upload_quiz_main() {
$form->addRule('user_upload_quiz', get_lang('ThisFieldIsRequired'), 'required');
$form->add_progress_bar();
$form->addElement('style_submit_button', 'submit_upload_quiz', get_lang('Send'), 'class="upload"');
$form->addButtonUpload(get_lang('Send'), 'submit_upload_quiz');
// Display the upload field
$form->display();

@ -3535,7 +3535,7 @@ function move_thread_form()
$form->addElement('html', $htmlcontent);
// The OK button
$form->addElement('style_submit_button', 'SubmitForum', get_lang('MoveThread'), 'class="save"');
$form->addButtonSave(get_lang('MoveThread'), 'SubmitForum');
// Validation or display
if ($form->validate()) {
@ -3577,7 +3577,7 @@ function move_post_form()
$form->applyFilter('thread', 'html_filter');
// The OK button
$form->addElement('style_submit_button', 'submit', get_lang('MovePost'), 'class="save"');
$form->addButtonSave(get_lang('MovePost'), 'submit');
// Setting the rules
$form->addRule('thread', get_lang('ThisFieldIsRequired'), 'required');

@ -228,7 +228,7 @@ if ($allowed_to_edit) {
}
echo '<h4>'.get_lang('QualificationChangesHistory').'</h4>';
if ($_GET['type'] == 'false') {
$buttons = '<a class="btn" href="forumqualify.php?'.api_get_cidreq().'&amp;forum='.Security::remove_XSS($_GET['forum']).'&amp;origin='.$origin.'&amp;thread='.$threadid.'&amp;user='.Security::remove_XSS($_GET['user']).'&amp;user_id='.Security::remove_XSS($_GET['user_id']).'&amp;type=true&amp;idtextqualify='.$act_qualify.$view_gradebook.'#history">'.
$buttons = '<a class="btn btn-default" href="forumqualify.php?'.api_get_cidreq().'&amp;forum='.Security::remove_XSS($_GET['forum']).'&amp;origin='.$origin.'&amp;thread='.$threadid.'&amp;user='.Security::remove_XSS($_GET['user']).'&amp;user_id='.Security::remove_XSS($_GET['user_id']).'&amp;type=true&amp;idtextqualify='.$act_qualify.$view_gradebook.'#history">'.
get_lang('MoreRecent').'</a> <a class="btn disabled" >'.get_lang('Older').'</a>';
} else {
$buttons = '<a class="btn disabled">'.get_lang('MoreRecent').'</a>

@ -720,7 +720,12 @@ class DisplayGradebook
//Web path
$image_path = UserManager::get_user_picture_path_by_id($userid, 'web', false, true);
$image_file = $image_path['dir'] . $image_path['file'];
$img_attributes = 'src="' . $image_file . '?rand=' . time() . '" ' . 'alt="' . $user['complete_name'] . '" ';
if (!api_get_configuration_value('gravatar_enabled')) {
$image_file .= '?rand='.time();
}
$img_attributes = 'src="' . $image_file . '" ' . 'alt="' . $user['complete_name'] . '" ';
if ($image_size[0] > 200) {
//limit display width to 200px
$img_attributes .= 'width="200" ';

@ -203,7 +203,7 @@ class EvalForm extends FormValidator
$renderer->setElementTemplate($template, 'score[' . $result->get_id() . ']');
}
$this->setDefaults($defaults);
$this->addElement('style_submit_button', 'submit', get_lang('EditResult'), 'class="save"');
$this->addButtonSave(get_lang('EditResult'), 'submit');
$renderer->setElementTemplate($template_submit, 'submit');
}
@ -218,6 +218,7 @@ class EvalForm extends FormValidator
$this->addElement('static', null, null, '"' . $this->evaluation_object->get_name() . '" ');
$this->addElement('static', null, null, get_lang('MoveTo') . ' : ');
$select = $this->addElement('select', 'move_cat', null, null);
$line = '';
foreach ($this->evaluation_object->get_target_categories() as $cat) {
for ($i = 0; $i < $cat[2]; $i++) {
$line .= '&mdash;';
@ -225,7 +226,7 @@ class EvalForm extends FormValidator
$select->addoption($line . ' ' . $cat[1], $cat[0]);
$line = '';
}
$this->addElement('style_submit_button', 'submit', get_lang('Ok'), 'class="save"');
$this->addButtonSave(get_lang('Ok'), 'submit');
}
/**
@ -309,7 +310,7 @@ class EvalForm extends FormValidator
}
$this->addElement('hidden', 'nr_users', $nr_users);
$this->addElement('hidden', 'evaluation_id', $this->result_object->get_evaluation_id());
$this->addElement('style_submit_button', 'submit', get_lang('AddResult'), 'class="save"');
$this->addButtonSave(get_lang('AddResult'), 'submit');
$template_submit = '<tr>
<td colspan="4" ></td>
@ -347,7 +348,7 @@ class EvalForm extends FormValidator
'disabled' => 'disabled'
)); */
$this->addElement('style_submit_button', 'submit', get_lang('Edit'), 'class="save"');
$this->addButtonSave(get_lang('Edit'), 'submit');
$this->addElement('hidden', 'minvalue', 0);
$this->addElement('hidden', 'hid_user_id', $this->result_object->get_user_id());
$this->addElement('hidden', 'maxvalue', $this->evaluation_object->get_max());
@ -376,7 +377,7 @@ class EvalForm extends FormValidator
} else {
$this->addElement('checkbox', 'addresult', null, get_lang('AddResult'));
}
$this->addElement('style_submit_button', 'submit', get_lang('AddAssessment'), 'class="add"');
$this->addButtonCreate(get_lang('AddAssessment'), 'submit');
}
/**
@ -409,7 +410,7 @@ class EvalForm extends FormValidator
$id_current = isset($this->id) ? $this->id : null;
$this->addElement('hidden', 'hid_id', $id_current);
$this->build_basic_form(1);
$this->addElement('style_submit_button', 'submit', get_lang('ModifyEvaluation'), 'class="save"');
$this->addButtonSave(get_lang('ModifyEvaluation'), 'submit');
}
/**

@ -48,7 +48,7 @@ class UserForm extends FormValidator
$renderer =& $this->defaultRenderer();
$renderer->setCustomElementTemplate('<span>{element}</span> ');
$this->addElement('text','keyword','');
$this->addElement('style_submit_button','submit',get_lang('Search'),'class="search"');
$this->addButtonSearch(get_lang('Search'), 'submit');
}
protected function build_user_info_form()
@ -64,7 +64,7 @@ class UserForm extends FormValidator
$this->addElement('static', 'email', get_lang('Email'), '<a href="mailto:' . $this->user_info['email'] . '">' . $this->user_info['email'] . '</a>');
$this->addElement('static', 'ofcode', get_lang('OfficialCode'), $this->user_info['official_code']);
$this->addElement('static', 'phone', get_lang('Phone'), $this->user_info['phone']);
$this->addElement('style_submit_button', 'submit', get_lang('Back'),'class="save"');
$this->addButtonSave(get_lang('Back'), 'submit');
}
function display()

@ -48,7 +48,11 @@ $image_size = getimagesize($image_syspath['dir'].$image_syspath['file']);
$image_path = UserManager::get_user_picture_path_by_id($user_id,'web',false,true);
$image_file = $image_path['dir'].$image_path['file'];
$img_attributes = 'src="'.$image_file.'?rand='.time().'" '
if (!api_get_configuration_value('gravatar_enabled')) {
$image_file .= '?rand='.time();
}
$img_attributes = 'src="'.$image_file.'" '
.'alt="'.api_get_person_name($user_data['firstname'], $user_data['lastname']).'" '
.'style="float:left; padding:5px;" ';

@ -216,7 +216,7 @@ $form->addElement('html', '</div>');
$form->addElement('html', '<div class="span12">');
// Submit
$form->addElement('style_submit_button', 'submit', get_lang('PropModify'), 'class="save"');
$form->addButtonSave(get_lang('PropModify'), 'submit');
// If form validates -> save data
if ($form->validate()) {

@ -202,7 +202,7 @@ EOT;
$defaults['action'] = 'create_groups';
$defaults['number_of_groups'] = intval($_POST['number_of_groups']);
$form->setDefaults($defaults);
$form->addElement('style_submit_button', 'submit', get_lang('CreateGroup'), 'class="save"');
$form->addButtonCreate(get_lang('CreateGroup'), 'submit');
$form->display();
}
} else {
@ -215,7 +215,7 @@ EOT;
$create_groups_form->addElement('header', $nameTools);
$group_el = array ();
$group_el[] = $create_groups_form->createElement('text', 'number_of_groups', array(get_lang('Create'), '1'));
$group_el[] = $create_groups_form->createElement('style_submit_button', 'submit', get_lang('ProceedToCreateGroup'), 'class="save"');
$group_el[] = $create_groups_form->addButtonCreate(get_lang('ProceedToCreateGroup'), 'submit', true);
$create_groups_form->addGroup($group_el, 'create_groups', get_lang('NumberOfGroupsToCreate'), ' ', false);
$defaults = array();
$defaults['number_of_groups'] = 1;

@ -239,7 +239,7 @@ $group = array(
$form->addGroup($group, '', Display::return_icon('chat.png', get_lang('Chat'), array(), ICON_SIZE_SMALL).' '.get_lang('Chat'), '', false);
// submit button
$form->addElement('style_submit_button', 'submit', get_lang('SaveSettings'), 'class="save"');
$form->addButtonSave(get_lang('SaveSettings'), 'submit');
if ($form->validate()) {
$values = $form->exportValues();

@ -103,7 +103,7 @@ echo '<a href="group.php">'.
*/
$subscribe_group = '';
if (GroupManager :: is_self_registration_allowed($user_id, $current_group['id'])) {
$subscribe_group = '<a class="btn" href="'.api_get_self().'?selfReg=1&group_id='.$current_group['id'].'" onclick="javascript: if(!confirm('."'".addslashes(api_htmlentities(get_lang("ConfirmYourChoice"), ENT_QUOTES))."'".')) return false;">'.
$subscribe_group = '<a class="btn btn-default" href="'.api_get_self().'?selfReg=1&group_id='.$current_group['id'].'" onclick="javascript: if(!confirm('."'".addslashes(api_htmlentities(get_lang("ConfirmYourChoice"), ENT_QUOTES))."'".')) return false;">'.
get_lang("RegIntoGroup").'</a>';
}
@ -112,7 +112,7 @@ if (GroupManager :: is_self_registration_allowed($user_id, $current_group['id'])
*/
$unsubscribe_group = '';
if (GroupManager :: is_self_unregistration_allowed($user_id, $current_group['id'])) {
$unsubscribe_group = '<a class="btn" href="'.api_get_self().'?selfUnReg=1" onclick="javascript: if(!confirm('."'".addslashes(api_htmlentities(get_lang("ConfirmYourChoice"),ENT_QUOTES))."'".')) return false;">'.
$unsubscribe_group = '<a class="btn btn-default" href="'.api_get_self().'?selfUnReg=1" onclick="javascript: if(!confirm('."'".addslashes(api_htmlentities(get_lang("ConfirmYourChoice"),ENT_QUOTES))."'".')) return false;">'.
get_lang("StudentUnsubscribe").'</a>';
}
echo '&nbsp;</div>';

@ -24,7 +24,7 @@ $faq_file = 'faq.html';
if (!empty($_GET['edit']) && $_GET['edit'] == 'true' && api_is_platform_admin()) {
$form = new FormValidator('set_faq', 'post', 'faq.php?edit=true');
$form->addHtmlEditor('faq_content', null, false, false, array('ToolbarSet' => 'FAQ', 'Width' => '100%', 'Height' => '300'));
$form->addElement('style_submit_button', 'faq_submit', get_lang('Ok'));
$form->addButtonSave(get_lang('Ok'), 'faq_submit');
$faq_content = @(string)file_get_contents(api_get_path(SYS_PATH).'home/faq.html');
$faq_content = api_to_system_encoding($faq_content, api_detect_encoding(strip_tags($faq_content)));
$form->setDefaults(array('faq_content' => $faq_content));

@ -16,7 +16,7 @@ if (empty($help_name)) {
}
?>
<a class="btn" href="<?php echo api_get_path(WEB_CODE_PATH); ?>help/faq.php">
<a class="btn btn-default" href="<?php echo api_get_path(WEB_CODE_PATH); ?>help/faq.php">
<?php echo get_lang('AccessToFaq'); ?>
</a>
<div class="page-header">
@ -24,6 +24,6 @@ if (empty($help_name)) {
</div>
<?php echo get_lang($help_name.'Content'); ?>
<hr>
<a class="btn" href="<?php echo api_get_path(WEB_CODE_PATH); ?>help/faq.php">
<a class="btn btn-default" href="<?php echo api_get_path(WEB_CODE_PATH); ?>help/faq.php">
<?php echo get_lang('AccessToFaq'); ?>
</a>

@ -213,8 +213,21 @@ switch ($action) {
if ($searchByGroups) {
$groups = GroupPortalManager::get_groups_by_user(api_get_user_id(), GROUP_USER_PERMISSION_ADMIN);
$groupsId = array_keys($groups);
$subgroupsId = [];
if (is_array($groupsId)) {
foreach ($groupsId as $groupId) {
$subgroupsId = array_merge(
$subgroupsId,
GroupPortalManager::getGroupsByDepthLevel($groupId)
);
}
$groupsId = array_merge(
$groupsId,
$subgroupsId
);
foreach ($groupsId as $groupId) {
$groupUsers = GroupPortalManager::get_users_by_group($groupId);
@ -263,6 +276,11 @@ switch ($action) {
$sessionIdList = array_unique($sessionIdList);
}
if (api_is_student_boss() && empty($userIdList)) {
$count = 0;
break;
}
if ($action == 'get_user_course_report') {
$count = CourseManager::get_count_user_list_from_course_code(
false,
@ -567,6 +585,11 @@ switch ($action) {
//$sidx = 'training_hours';
}
if (api_is_student_boss() && empty($userIdList)) {
$result = [];
break;
}
$result = CourseManager::get_user_list_from_course_code(
null,
null,
@ -621,6 +644,11 @@ switch ($action) {
$sidx = 'title';
}
if (api_is_student_boss() && empty($userIdList)) {
$result = [];
break;
}
$result = CourseManager::get_user_list_from_course_code(
null,
null,

@ -93,7 +93,7 @@ switch ($action) {
$friend_html.='<img src="'.$friends_profile['file'].'" id="imgfriend_'.$friend['friend_user_id'].'" title="'.$user_name.'" />';
$friend_html.='<div class="caption">';
$friend_html.='<a href="profile.php?u='.$friend['friend_user_id'].'"><h5>'.$user_name.'</h5></a>';
$friend_html.='<p><button class="btn" onclick="delete_friend(this)" id=img_'.$friend['friend_user_id'].'>'.get_lang('Delete').'</button></p>';
$friend_html.='<p><button class="btn btn-danger" onclick="delete_friend(this)" id=img_'.$friend['friend_user_id'].'>'.get_lang('Delete').'</button></p>';
$friend_html.='</div>';
$friend_html.='</div>';

@ -64,10 +64,9 @@ if (api_is_in_course()) {
$http_www = $_configuration['root_web'].'home/default_platform_document/';
} else {
// 4. The user is outside courses.
$my_path = UserManager::get_user_picture_path_by_id(api_get_user_id(),'system');
$base_work_dir = $my_path['dir'].'my_files/';
$my_path = UserManager::get_user_picture_path_by_id(api_get_user_id(),'web');
$http_www = $my_path['dir'].'my_files/';
$userId = api_get_user_id();
$base_work_dir = UserManager::getUserPathById($userId, 'system').'my_files/';
$http_www = UserManager::getUserPathById($userId, 'web').'my_files/';
}
}

@ -59,7 +59,7 @@ $height = '300';
$editor_config = array('ToolbarSet' => $toolbar_set, 'Width' => $width, 'Height' => $height);
$form->addHtmlEditor('intro_content', null, null, false, $editor_config);
$form->addElement('style_submit_button', 'intro_cmdUpdate', get_lang('SaveIntroText'), 'class="save"');
$form->addButtonSave(get_lang('SaveIntroText'), 'intro_cmdUpdate');
/* INTRODUCTION MICRO MODULE - COMMANDS SECTION (IF ALLOWED) */
$course_id = api_get_course_int_id();

@ -1468,7 +1468,7 @@ class AddCourse
$code,
api_get_utc_datetime(),
$user_id,
$code
$course_id
);
$send_mail_to_admin = api_get_setting(

@ -1417,26 +1417,24 @@ function _api_format_user($user, $add_password = false)
}
$image_sys_path = api_get_path(SYS_CODE_PATH).$dir.$picture_filename;
if ($picture_filename) {
if (file_exists($image_sys_path)) {
$result['avatar'] = api_get_path(WEB_CODE_PATH).$dir.$picture_filename;
$result['avatar_small'] = api_get_path(WEB_CODE_PATH).$dir.'small_'.$picture_filename;
$result['avatar_sys_path'] = api_get_path(SYS_CODE_PATH).$dir.$picture_filename;
} else if (api_get_configuration_value('gravatar_enabled')) {
$userEmail = isset($user['email']) ? $user['email'] : '';
$gravatarType = api_get_configuration_value('gravatar_type');
$avatarPaths = array(
'avatar' => $result['avatar'],
'avatar_small' => $result['avatar_small'],
'avatar_sys_path' => $result['avatar_sys_path']
);
foreach ($avatarPaths as $key => $value) {
$avatarSize = api_getimagesize($value);
$avatarSize = $avatarSize['width'] > $avatarSize['height'] ?
$avatarSize['width'] :
$avatarSize['height'];
$result[$key] = UserManager::getGravatar($userEmail, $avatarSize, $gravatarType);
}
if ($picture_filename && file_exists($image_sys_path)) {
$result['avatar'] = api_get_path(WEB_CODE_PATH).$dir.$picture_filename;
$result['avatar_small'] = api_get_path(WEB_CODE_PATH).$dir.'small_'.$picture_filename;
$result['avatar_sys_path'] = api_get_path(SYS_CODE_PATH).$dir.$picture_filename;
} else if (api_get_configuration_value('gravatar_enabled')) {
$userEmail = isset($user['email']) ? $user['email'] : '';
$gravatarType = api_get_configuration_value('gravatar_type');
$avatarPaths = array(
'avatar' => $result['avatar'],
'avatar_small' => $result['avatar_small'],
'avatar_sys_path' => $result['avatar_sys_path']
);
foreach ($avatarPaths as $key => $value) {
$avatarSize = api_getimagesize($value);
$avatarSize = $avatarSize['width'] > $avatarSize['height'] ?
$avatarSize['width'] :
$avatarSize['height'];
$result[$key] = UserManager::getGravatar($userEmail, $avatarSize, $gravatarType);
}
}
@ -3387,7 +3385,7 @@ function api_not_allowed($print_headers = false, $message = null)
$form = new FormValidator('formLogin', 'post', $action, null, array('class'=>'form-stacked'));
$form->addElement('text', 'login', null, array('placeholder' => get_lang('UserName'), 'class' => 'col-md-3 autocapitalize_off')); //new
$form->addElement('password', 'password', null, array('placeholder' => get_lang('Password'), 'class' => 'col-md-3')); //new
$form->addElement('style_submit_button', 'submitAuth', get_lang('LoginEnter'), array('class' => 'btn col-md-3'));
$form->addButtonNext(get_lang('LoginEnter'), 'submitAuth');
// see same text in auth/gotocourse.php and main_api.lib.php function api_not_allowed (bellow)
$msg = Display::return_message(get_lang('NotAllowed'), 'error', false);

@ -2425,7 +2425,7 @@ class Blog
$form->addElement('textarea', 'blog_subtitle', get_lang('SubTitle'));
$form->addElement('hidden', 'new_blog_submit', 'true');
$form->addElement('style_submit_button', null, get_lang('SaveProject'));
$form->addButtonSave(get_lang('SaveProject'));
$defaults = array(
'blog_name' => isset($_POST['blog_name']) ? Security::remove_XSS($_POST['blog_name']) : null,
@ -2462,7 +2462,7 @@ class Blog
$form->addElement('hidden', 'edit_blog_submit', 'true');
$form->addElement('hidden', 'blog_id', $blog['blog_id']);
$form->addElement('style_submit_button', null, get_lang('Save'));
$form->addButtonSave(get_lang('Save'));
$defaults = array();
$defaults['blog_name'] = $blog['blog_name'];

@ -213,7 +213,13 @@ class Career extends Model
{
$id = parent::save($params);
if (!empty($id)) {
Event::addEvent(LOG_CAREER_CREATE, LOG_CAREER_ID, $id, api_get_utc_datetime(), api_get_user_id());
Event::addEvent(
LOG_CAREER_CREATE,
LOG_CAREER_ID,
$id,
api_get_utc_datetime(),
api_get_user_id()
);
}
return $id;
@ -226,6 +232,12 @@ class Career extends Model
public function delete($id)
{
parent::delete($id);
Event::addEvent(LOG_CAREER_DELETE, LOG_CAREER_ID, $id, api_get_utc_datetime(), api_get_user_id());
Event::addEvent(
LOG_CAREER_DELETE,
LOG_CAREER_ID,
$id,
api_get_utc_datetime(),
api_get_user_id()
);
}
}

@ -89,15 +89,15 @@ class Certificate extends Model
$this->certification_user_path = null;
//Setting certification path
$path_info = UserManager::get_user_picture_path_by_id($this->user_id, 'system');
$web_path_info = UserManager::get_user_picture_path_by_id($this->user_id, 'web');
$path_info = UserManager::getUserPathById($this->user_id, 'system');
$web_path_info = UserManager::getUserPathById($this->user_id, 'web');
if (!empty($path_info) && isset($path_info['dir'])) {
$this->certification_user_path = $path_info['dir'].'certificate/';
$this->certification_web_user_path = $web_path_info['dir'].'certificate/';
if (!empty($path_info) && isset($path_info)) {
$this->certification_user_path = $path_info.'certificate/';
$this->certification_web_user_path = $web_path_info.'certificate/';
if (!is_dir($path_info['dir'])) {
mkdir($path_info['dir'], 0777, true);
if (!is_dir($path_info)) {
mkdir($path_info, 0777, true);
}
if (!is_dir($this->certification_user_path)) {
mkdir($this->certification_user_path, 0777);

@ -2201,8 +2201,11 @@ class CourseManager
Database::query($sql);
$sql = "DELETE FROM $table_stats_online WHERE c_id = $courseId";
Database::query($sql);
$sql = "DELETE FROM $table_stats_default WHERE c_id = $courseId";
Database::query($sql);
// Do not delete rows from track_e_default as these include course
// creation and other important things that do not take much space
// but give information on the course history
//$sql = "DELETE FROM $table_stats_default WHERE c_id = $courseId";
//Database::query($sql);
$sql = "DELETE FROM $table_stats_downloads WHERE c_id = $courseId";
Database::query($sql);
$sql = "DELETE FROM $table_stats_links WHERE c_id = $courseId";
@ -2258,7 +2261,7 @@ class CourseManager
$code,
api_get_utc_datetime(),
$user_id,
$code
$courseId
);
}
}

@ -563,9 +563,10 @@ class Database
$class = isset($owner['class']) ? $owner['class'] : null;
$server_type = api_get_setting('server_type');
if (!empty($line) && !empty($server_type) && $server_type != 'production') {
$errMsg = self::error($connection);
$info = '<pre>' .
'<strong>DATABASE ERROR #'.self::errno($connection).':</strong><br /> ' .
self::remove_XSS(self::error($connection)) . '<br />' .
self::remove_XSS($errMsg) . '<br />' .
'<strong>QUERY :</strong><br /> ' .
self::remove_XSS($query) . '<br />' .
'<strong>FILE :</strong><br /> ' .

@ -745,19 +745,20 @@ class Display
$size = ICON_SIZE_SMALL,
$show_text = true,
$return_only_path = false
) {
)
{
$code_path = api_get_path(SYS_CODE_PATH);
$code_path = api_get_path(SYS_CODE_PATH);
$w_code_path = api_get_path(WEB_CODE_PATH);
$image = trim($image);
$theme = 'css/'.api_get_visual_theme().'/icons/';
$theme = 'css/' . api_get_visual_theme() . '/icons/';
$icon = '';
$size_extra = '';
if (isset($size)) {
$size = intval($size);
$size_extra = $size.'/';
$size_extra = $size . '/';
} else {
$size = ICON_SIZE_SMALL;
}
@ -770,8 +771,30 @@ class Display
$icon = $w_code_path.'img/icons/'.$size_extra.$image;
} else {
//Checking the img/ folder
$icon = $w_code_path.'img/'.$image;
$icon = $w_code_path . 'img/' . $image;
}
// Special code to enable SVG - refs #7359 - Needs more work
// The code below does something else to "test out" SVG: for each icon,
// it checks if there is an SVG version. If so, it uses it.
// When moving this to production, the return_icon() calls should
// ask for the SVG version directly
if (Chamilo::is_test_server()) {
$svgImage = substr($image, 0, -3) . 'svg';
if (is_file($code_path . $theme . 'svg/' . $svgImage)) {
$icon = $w_code_path . $theme . 'svg/' . $svgImage;
} elseif (is_file($code_path . 'img/icons/svg/' . $svgImage)) {
$icon = $w_code_path . 'img/icons/svg/' . $svgImage;
}
if (empty($additional_attributes['height'])) {
$additional_attributes['height'] = $size;
}
if (empty($additional_attributes['width'])) {
$additional_attributes['width'] = $size;
}
}
$icon = api_get_cdn_path($icon);
if ($return_only_path) {
return $icon;

@ -260,9 +260,8 @@ class DocumentManager
//$filename will be an array if a . was found
if (is_array($extension)) {
$extension = strtolower($extension[sizeof($extension) - 1]);
}
//file without extension
else {
} else {
//file without extension
$extension = 'empty';
}
@ -1081,7 +1080,7 @@ class DocumentManager
public static function delete_document(
$_course,
$path = null,
$base_work_dir,
$base_work_dir = null,
$sessionId = null,
$documentId = null,
$groupId = null
@ -1454,6 +1453,7 @@ class DocumentManager
* @param int $document_id_for_template the document id
* @param string $course_code
* @param int $user_id
* @return bool
*/
public static function set_document_as_template($title, $description, $document_id_for_template, $course_code, $user_id, $image)
{
@ -1516,6 +1516,7 @@ class DocumentManager
* @param array $course the _course array info of the document's course
* @param int
* @param string
* @return bool
*/
public static function is_visible($doc_path, $course, $session_id = 0, $file_type = 'file')
{
@ -1622,11 +1623,7 @@ class DocumentManager
//3. Checking if user exist in course/session
if ($session_id == 0) {
if (CourseManager::is_user_subscribed_in_course(
$user_id,
$course_info['code']
) ||
api_is_platform_admin()
if (CourseManager::is_user_subscribed_in_course($user_id, $course_info['code']) || api_is_platform_admin()
) {
$user_in_course = true;
}
@ -1691,8 +1688,9 @@ class DocumentManager
// True for admins if document exists
if (isset($item_info['visibility'])) {
if ($admins_can_see_everything && api_is_platform_admin())
if ($admins_can_see_everything && api_is_platform_admin()) {
return true;
}
}
if (isset($item_info_in_session['visibility'])) {
@ -2044,15 +2042,15 @@ class DocumentManager
$info = pathinfo($abs_path);
$ext = $info['extension'];
switch (strtolower($ext)) {
case 'html' :
case 'htm' :
case 'html':
case 'htm':
case 'shtml':
case 'css' :
case 'css':
$file_content = file_get_contents($abs_path);
//get an array of attributes from the HTML source
$attributes = self::parse_HTML_attributes($file_content, $wanted_attributes, $explode_attributes);
break;
default :
default:
break;
}
} else {
@ -2063,7 +2061,7 @@ class DocumentManager
$files_list = array();
switch ($type) {
case TOOL_DOCUMENT :
case TOOL_DOCUMENT:
case TOOL_QUIZ:
case 'sco':
foreach ($wanted_attributes as $attr) {
@ -2072,14 +2070,18 @@ class DocumentManager
$sources = $attributes[$attr];
foreach ($sources as $source) {
//skip what is obviously not a resource
if (strpos($source, '+this.'))
if (strpos($source, '+this.')) {
continue; //javascript code - will still work unaltered
if (strpos($source, '.') === false)
}
if (strpos($source, '.') === false) {
continue; //no dot, should not be an external file anyway
if (strpos($source, 'mailto:'))
}
if (strpos($source, 'mailto:')) {
continue; //mailto link
if (strpos($source, ';') && !strpos($source, '&amp;'))
}
if (strpos($source, ';') && !strpos($source, '&amp;')) {
continue; //avoid code - that should help
}
if ($attr == 'value') {
if (strpos($source, 'mp3file')) {
@ -2945,7 +2947,7 @@ class DocumentManager
FROM $TABLE_ITEMPROPERTY AS props
INNER JOIN $TABLE_DOCUMENT AS docs
ON (docs.id = props.ref AND props.c_id = docs.c_id)
WHERE
WHERE
props.c_id = $course_id AND
docs.c_id = $course_id AND
props.tool = '" . TOOL_DOCUMENT . "' AND
@ -3091,7 +3093,7 @@ class DocumentManager
if ($type == 'advanced') {
$extra_controls = ' <li><a href="javascript:;" class="jp-stop" tabindex="1">stop</a></li>
<li><a href="#" class="jp-mute" tabindex="1">mute</a></li>
<li><a href="#" class="jp-unmute" tabindex="1">unmute</a></li>';
<li><a href="#" class="jp-unmute" tabindex="1">unmute</a></li>';
$progress = '<div class="jp-progress">
<div class="jp-seek-bar">
<div class="jp-play-bar"></div>
@ -3125,51 +3127,51 @@ class DocumentManager
{
$html = '
<div id="jp_container_1" class="jp-video">
<div class="jp-type-single">
<div id="jquery_jplayer_1" class="jp-jplayer"></div>
<div class="jp-gui">
<div class="jp-video-play">
<a href="javascript:;" class="jp-video-play-icon" tabindex="1">play</a>
</div>
<div class="jp-interface">
<div class="jp-progress">
<div class="jp-seek-bar">
<div class="jp-play-bar"></div>
</div>
</div>
<div class="jp-current-time"></div>
<div class="jp-controls-holder">
<ul class="jp-controls">
<li><a href="javascript:;" class="jp-play" tabindex="1">play</a></li>
<li><a href="javascript:;" class="jp-pause" tabindex="1">pause</a></li>
<li><a href="javascript:;" class="jp-stop" tabindex="1">stop</a></li>
<li><a href="javascript:;" class="jp-mute" tabindex="1" title="mute">mute</a></li>
<li><a href="javascript:;" class="jp-unmute" tabindex="1" title="unmute">unmute</a></li>
<li><a href="javascript:;" class="jp-volume-max" tabindex="1" title="max volume">max volume</a></li>
</ul>
<div class="jp-volume-bar">
<div class="jp-volume-bar-value"></div>
</div>
<ul class="jp-toggles">
<li><a href="javascript:;" class="jp-full-screen" tabindex="1" title="full screen">full screen</a></li>
<li><a href="javascript:;" class="jp-restore-screen" tabindex="1" title="restore screen">restore screen</a></li>
<li><a href="javascript:;" class="jp-repeat" tabindex="1" title="repeat">repeat</a></li>
<li><a href="javascript:;" class="jp-repeat-off" tabindex="1" title="repeat off">repeat off</a></li>
</ul>
</div>
<div class="jp-title">
<ul>
<li>' . $document_data['title'] . '</li>
</ul>
</div>
</div>
</div>
<div class="jp-no-solution">
<span>' . get_lang('UpdateRequire') . '</span>
<div class="jp-type-single">
<div id="jquery_jplayer_1" class="jp-jplayer"></div>
<div class="jp-gui">
<div class="jp-video-play">
<a href="javascript:;" class="jp-video-play-icon" tabindex="1">play</a>
</div>
<div class="jp-interface">
<div class="jp-progress">
<div class="jp-seek-bar">
<div class="jp-play-bar"></div>
</div>
</div>
<div class="jp-current-time"></div>
<div class="jp-controls-holder">
<ul class="jp-controls">
<li><a href="javascript:;" class="jp-play" tabindex="1">play</a></li>
<li><a href="javascript:;" class="jp-pause" tabindex="1">pause</a></li>
<li><a href="javascript:;" class="jp-stop" tabindex="1">stop</a></li>
<li><a href="javascript:;" class="jp-mute" tabindex="1" title="mute">mute</a></li>
<li><a href="javascript:;" class="jp-unmute" tabindex="1" title="unmute">unmute</a></li>
<li><a href="javascript:;" class="jp-volume-max" tabindex="1" title="max volume">max volume</a></li>
</ul>
<div class="jp-volume-bar">
<div class="jp-volume-bar-value"></div>
</div>
<ul class="jp-toggles">
<li><a href="javascript:;" class="jp-full-screen" tabindex="1" title="full screen">full screen</a></li>
<li><a href="javascript:;" class="jp-restore-screen" tabindex="1" title="restore screen">restore screen</a></li>
<li><a href="javascript:;" class="jp-repeat" tabindex="1" title="repeat">repeat</a></li>
<li><a href="javascript:;" class="jp-repeat-off" tabindex="1" title="repeat off">repeat off</a></li>
</ul>
</div>
<div class="jp-title">
<ul>
<li>' . $document_data['title'] . '</li>
</ul>
</div>
</div>
</div>
<div class="jp-no-solution">
<span>' . get_lang('UpdateRequire') . '</span>
' . get_lang("ToPlayTheMediaYouWillNeedToUpdateYourBrowserToARecentVersionYouCanAlsoDownloadTheFile") . '
</div>
</div>
</div>';
</div>
</div>
</div>';
return $html;
}
@ -3184,7 +3186,6 @@ class DocumentManager
* @param bool $showInvisibleFiles
* @param bool $showOnlyFolders
* @param int $folderId
*
* @return string
*/
public static function get_document_preview(
@ -3197,7 +3198,7 @@ class DocumentManager
$overwrite_url = null,
$showInvisibleFiles = false,
$showOnlyFolders = false,
$folderId = false
$folderId = 0
) {
if (empty($course_info['real_id']) || empty($course_info['code']) || !is_array($course_info)) {
return '';
@ -3270,7 +3271,7 @@ class DocumentManager
}
}
if ($folderId !== false) {
if ($folderId !== 0) {
$parentData = self::get_document_data_by_id($folderId, $course_info['code']);
if (!empty($parentData)) {
$cleanedPath = $parentData['path'];
@ -3422,22 +3423,22 @@ class DocumentManager
$url = api_get_path(WEB_AJAX_PATH).'lp.ajax.php?a=get_documents&lp_id='.$lp_id.'&'.api_get_cidreq();
$return .= "<script>
function testResources(id, img) {
var numericId = id.split('_')[1];
var parentId = 'doc_id_'+numericId;
var tempId = 'temp_'+numericId;
var image = $('#'+img);
function testResources(id, img) {
var numericId = id.split('_')[1];
var parentId = 'doc_id_'+numericId;
var tempId = 'temp_'+numericId;
var image = $('#'+img);
if (image.hasClass('open')) {
image.removeClass('open');
image.attr('src', '" . $img_path . "nolines_plus.gif');
if (image.hasClass('open')) {
image.removeClass('open');
image.attr('src', '" . $img_path . "nolines_plus.gif');
$('#'+id).show();
$('#'+tempId).hide();
} else {
$('#'+tempId).hide();
} else {
image.addClass('open');
image.attr('src', '" . $img_path . "nolines_minus.gif');
$('#'+id).hide();
$('#'+tempId).show();
$('#'+tempId).show();
var tempDiv = $('#'+parentId).find('#'+tempId);
if (tempDiv.length == 0) {
@ -3451,9 +3452,9 @@ class DocumentManager
}
});
}
}
}
}
</script>";
</script>";
}
if (!$user_in_course) {
@ -5627,7 +5628,7 @@ class DocumentManager
*/
public static function build_move_to_selector($folders, $curdirpath, $move_file, $group_dir = '')
{
$form = new FormValidator('move_to', 'post', api_get_self());
$form = new FormValidator('move_to', 'post', api_get_self().'?'.api_get_cidreq());
// Form title
$form->addElement('hidden', 'move_file', $move_file);
@ -5711,8 +5712,8 @@ class DocumentManager
}
}
$form->addElement('select', 'move_to', get_lang('MoveTo'), $options);
$form->addElement('button', 'move_file_submit', get_lang('MoveElement'));
return $form->return_form();
$form->addButtonNext(get_lang('MoveElement'), 'move_file_submit');
return $form->returnForm();
}
/**
@ -5783,8 +5784,8 @@ class DocumentManager
$form->addElement('hidden', 'id', intval($dirId));
$form->addElement('header', '', get_lang('CreateDir'));
$form->addElement('text', 'dirname', get_lang('NewDir'), array('autofocus' => 'autofocus'));
$form->addElement('style_submit_button', 'submit','<i class="fa fa-folder-open"></i> '. get_lang('CreateFolder'), 'class="btn-primary"');
$new_folder_text = $form->return_form();
$form->addButtonCreate(get_lang('CreateFolder'), 'submit');
$new_folder_text = $form->returnForm();
return $new_folder_text;
}

@ -78,9 +78,9 @@ class EventEmailTemplate extends Model {
}
if ($action == 'edit') {
$form->addElement('style_submit_button', 'submit', get_lang('Modify'), 'class="save"');
$form->addButtonSave(get_lang('Modify'), 'submit');
} else {
$form->addElement('style_submit_button', 'submit', get_lang('Add'), 'class="save"');
$form->addButtonCreate(get_lang('Add'), 'submit');
}
// Setting the defaults

@ -629,12 +629,14 @@ class Event
/**
* Records information for common (or admin) events (in the track_e_default table)
* @author Yannick Warnier <yannick.warnier@beeznest.com>
* @param string Type of event
* @param string Type of value
* @param string Value
* @param string Timestamp (defaults to null)
* @param integer User ID (defaults to null)
* @param string Course code (defaults to null)
* @param string $event_type Type of event
* @param string $event_value_type Type of value
* @param string $event_value Value
* @param string $datetime Datetime (UTC) (defaults to null)
* @param int $user_id User ID (defaults to null)
* @param int $course_id Course ID (defaults to null)
* @param int $sessionId Session ID
* @return bool
* @assert ('','','') === false
*/
public static function addEvent(
@ -643,7 +645,7 @@ class Event
$event_value,
$datetime = null,
$user_id = null,
$course_code = null,
$course_id = null,
$sessionId = 0
) {
$TABLETRACK_DEFAULT = Database::get_main_table(TABLE_STATISTIC_TRACK_E_DEFAULT);
@ -653,6 +655,16 @@ class Event
}
$event_type = Database::escape_string($event_type);
$event_value_type = Database::escape_string($event_value_type);
if (!empty($course_id)) {
$course_id = intval($course_id);
} else {
$course_id = api_get_course_int_id();
}
if (!empty($sessionId)) {
$sessionId = intval($sessionId);
} else {
$sessionId = api_get_session_id();
}
//Clean the user_info
if ($event_value_type == LOG_USER_OBJECT) {
@ -673,16 +685,8 @@ class Event
}
$event_value = Database::escape_string($event_value);
$course_info = api_get_course_info($course_code);
$sessionId = empty($sessionId) ? api_get_session_id() : intval($sessionId);
if (!empty($course_info)) {
$course_id = $course_info['real_id'];
} else {
$course_id = null;
$course_code = null;
}
if (!isset($datetime)) {
$datetime = api_get_utc_datetime();
}
@ -1060,22 +1064,16 @@ class Event
}
if (!empty($exe_list) && is_array($exe_list) && count($exe_list) > 0) {
$sql = "DELETE FROM $track_e_exercises WHERE exe_id IN (" . implode(
',',
$exe_list
) . ")";
$sql = "DELETE FROM $track_e_exercises
WHERE exe_id IN (" . implode(',', $exe_list) . ")";
Database::query($sql);
$sql = "DELETE FROM $track_attempts WHERE exe_id IN (" . implode(
',',
$exe_list
) . ")";
$sql = "DELETE FROM $track_attempts
WHERE exe_id IN (" . implode(',', $exe_list) . ")";
Database::query($sql);
$sql = "DELETE FROM $recording_table WHERE exe_id IN (" . implode(
',',
$exe_list
) . ")";
$sql = "DELETE FROM $recording_table
WHERE exe_id IN (" . implode(',', $exe_list) . ")";
Database::query($sql);
}
@ -1085,7 +1083,7 @@ class Event
$lp_id,
null,
null,
$course['code'],
$course_id,
$session_id
);
}
@ -1120,7 +1118,7 @@ class Event
$exercise_id . '-' . $user_id,
null,
null,
$course_code,
$course_id,
$session_id
);
}
@ -1684,7 +1682,7 @@ class Event
$exe_id . '-' . $question_id,
null,
null,
$courseInfo['code'],
$courseId,
$session_id
);
}
@ -1694,8 +1692,9 @@ class Event
* @param $user_id
* @param int $courseId
* @param $question_id
* @param int $sessionId
*/
public static function delete_attempt_hotspot($exe_id, $user_id, $courseId, $question_id)
public static function delete_attempt_hotspot($exe_id, $user_id, $courseId, $question_id, $sessionId = null)
{
$table_track_attempt = Database::get_main_table(TABLE_STATISTIC_TRACK_E_HOTSPOT);
@ -1703,6 +1702,9 @@ class Event
$user_id = intval($user_id);
$courseId = intval($courseId);
$question_id = intval($question_id);
if (!isset($sessionId)) {
$sessionId = api_get_session_id();
}
$sql = "DELETE FROM $table_track_attempt
WHERE hotspot_exe_id = $exe_id AND
@ -1716,8 +1718,8 @@ class Event
$exe_id . '-' . $question_id,
null,
null,
$course_code,
$session_id
$courseId,
$sessionId
);
}

@ -173,8 +173,7 @@ class ExtraFieldValue extends Model
$fileDir = "upload/sessions/";
break;
case 'user':
$userPath = UserManager::get_user_picture_path_by_id($this->handler_id);
$fileDir = $userPath['dir'];
$fileDir = UserManager::getUserPathById($this->handler_id);
break;
}
@ -213,8 +212,7 @@ class ExtraFieldValue extends Model
$fileDir = "upload/sessions/";
break;
case 'user':
$userPath = UserManager::get_user_picture_path_by_id($this->handler_id);
$fileDir = $userPath['dir'];
$fileDir = UserManager::getUserPathById($this->handler_id);
break;
}

@ -293,10 +293,10 @@ EOT;
}
/**
* @param string $label
* @param string $name
* @param bool $createElement
*
* Returns a button with the primary color and a check mark
* @param string $label Text appearing on the button
* @param string $name Element name (for form treatment purposes)
* @param bool $createElement Whether to use the create or add method
* @return HTML_QuickForm_button
*/
public function addButtonSave($label, $name = 'submit', $createElement = false)
@ -314,10 +314,10 @@ EOT;
}
/**
* @param string $label
* @param string $name
* @param bool $createElement
*
* Returns a button with the primary color and a "plus" icon
* @param string $label Text appearing on the button
* @param string $name Element name (for form treatment purposes)
* @param bool $createElement Whether to use the create or add method
* @return HTML_QuickForm_button
*/
public function addButtonCreate($label, $name = 'submit', $createElement = false)
@ -335,10 +335,10 @@ EOT;
}
/**
* @param string $label
* @param string $name
* @param bool $createElement
*
* Returns a button with the primary color and a pencil icon
* @param string $label Text appearing on the button
* @param string $name Element name (for form treatment purposes)
* @param bool $createElement Whether to use the create or add method
* @return HTML_QuickForm_button
*/
public function addButtonUpdate($label, $name = 'submit', $createElement = false)
@ -356,8 +356,11 @@ EOT;
}
/**
* Shortcut to delete button
* @param string $label
* Returns a button with the danger color and a trash icon
* @param string $label Text appearing on the button
* @param string $name Element name (for form treatment purposes)
* @param bool $createElement Whether to use the create or add method
* @return HTML_QuickForm_button
*/
public function addButtonDelete($label, $name = 'submit', $createElement = false)
{
@ -374,10 +377,10 @@ EOT;
}
/**
* @param string $label
* @param string $name
* @param bool $createElement
*
* Returns a button with the primary color and a paper-plane icon
* @param string $label Text appearing on the button
* @param string $name Element name (for form treatment purposes)
* @param bool $createElement Whether to use the create or add method
* @return HTML_QuickForm_button
*/
public function addButtonSend($label, $name = 'submit', $createElement = false)
@ -395,20 +398,22 @@ EOT;
}
/**
* Shortcut to search button
* @param string $label
* Returns a button with the default (grey?) color and a magnifier icon
* @param string $label Text appearing on the button
* @return HTML_QuickForm_button
*/
public function addButtonSearch($label = null)
{
if (empty($label)) {
if (empty($label)) {
$label = get_lang('Search');
}
return $this->addButton('submit', $label, 'search', 'default');
}
/**
* Shortcut to update button
* @param string $label
* Returns a button with the primary color and a right-pointing arrow icon
* @param string $label Text appearing on the button
* @return HTML_QuickForm_button
*/
public function addButtonNext($label)
{
@ -416,8 +421,11 @@ EOT;
}
/**
* Shortcut to import button
* @param string $label
* Returns a button with the primary color and a check mark icon
* @param string $label Text appearing on the button
* @param string $name Element name (for form treatment purposes)
* @param bool $createElement Whether to use the create or add method
* @return HTML_QuickForm_button
*/
public function addButtonImport($label, $name = 'submit', $createElement = false)
{
@ -434,8 +442,11 @@ EOT;
}
/**
* Shortcut to export button
* @param string $label
* Returns a button with the primary color and a check-mark icon
* @param string $label Text appearing on the button
* @param string $name Element name (for form treatment purposes)
* @param bool $createElement Whether to use the create or add method
* @return HTML_QuickForm_button
*/
public function addButtonExport($label, $name = 'submit', $createElement = false)
{
@ -453,7 +464,10 @@ EOT;
/**
* Shortcut to filter button
* @param string $label
* @param string $label Text appearing on the button
* @param string $name Element name (for form treatment purposes)
* @param bool $createElement Whether to use the create or add method
* @return HTML_QuickForm_button
*/
public function addButtonFilter($label, $name = 'submit', $createElement = false)
{
@ -470,8 +484,11 @@ EOT;
}
/**
* Shortcut to upload button
* @param string $label
* Returns a button with the primary color and an upload icon
* @param string $label Text appearing on the button
* @param string $name Element name (for form treatment purposes)
* @param bool $createElement Whether to use the create or add method
* @return HTML_QuickForm_button
*/
public function addButtonUpload($label, $name = 'submit', $createElement = false)
{
@ -488,8 +505,11 @@ EOT;
}
/**
* Shortcut to upload button
* @param string $label
* Returns a button with the primary color and a download icon
* @param string $label Text appearing on the button
* @param string $name Element name (for form treatment purposes)
* @param bool $createElement Whether to use the create or add method
* @return HTML_QuickForm_button
*/
public function addButtonDownload($label, $name = 'submit', $createElement = false)
{
@ -506,8 +526,11 @@ EOT;
}
/**
* Shortcut to preview button
* @param string $label
* Returns a button with the primary color and a magnifier icon
* @param string $label Text appearing on the button
* @param string $name Element name (for form treatment purposes)
* @param bool $createElement Whether to use the create or add method
* @return HTML_QuickForm_button
*/
public function addButtonPreview($label, $name = 'submit', $createElement = false)
{
@ -523,6 +546,27 @@ EOT;
);
}
/**
* Returns a button with the primary color and a copy (double sheet) icon
* @param string $label Text appearing on the button
* @param string $name Element name (for form treatment purposes)
* @param bool $createElement Whether to use the create or add method
* @return HTML_QuickForm_button
*/
public function addButtonCopy($label, $name = 'submit', $createElement = false)
{
return $this->addButton(
$name,
$label,
'copy',
'primary',
null,
null,
array(),
$createElement
);
}
/**
* @param string $name
* @param string $label

@ -191,7 +191,7 @@ class Gradebook extends Model
}
}
$form->addElement('style_submit_button', 'submit', get_lang('Add'), 'class="save"');
$form->addButtonCreate(get_lang('Add'), 'submit');
$form->setDefaults(array('skill'=>$clean_selected_skills));

@ -217,6 +217,55 @@ class GroupPortalManager
}
}
/**
* Get the subgroups ID from a group.
* The default $levels value is 10 considering it as a extensive level of depth
* @param int $groupId The parent group ID
* @param int $levels The depth levels
* @return array The list of ID
*/
public static function getGroupsByDepthLevel($groupId, $levels = 10)
{
$groups = array();
$groupId = intval($groupId);
$groupTable = Database::get_main_table(TABLE_MAIN_GROUP);
$groupRelGroupTable = Database :: get_main_table(TABLE_MAIN_GROUP_REL_GROUP);
$select = "SELECT ";
$from = "FROM $groupTable g1 ";
for ($i = 1; $i <= $levels; $i++) {
$tableIndexNumber = $i;
$tableIndexJoinNumber = $i - 1;
$select .= "g$i.id as id_$i ";
$select .= ($i != $levels ? ", " : null);
if ($i == 1) {
$from .= "INNER JOIN $groupRelGroupTable gg0 ON g1.id = gg0.subgroup_id and gg0.group_id = $groupId ";
} else {
$from .= "LEFT JOIN $groupRelGroupTable gg$tableIndexJoinNumber ";
$from .= " ON g$tableIndexJoinNumber.id = gg$tableIndexJoinNumber.group_id ";
$from .= "LEFT JOIN $groupTable g$tableIndexNumber ";
$from .= " ON gg$tableIndexJoinNumber.subgroup_id = g$tableIndexNumber.id ";
}
}
$result = Database::query("$select $from");
while ($item = Database::fetch_assoc($result)) {
foreach ($item as $groupId) {
if (!empty($groupId)) {
$groups[] = $groupId;
}
}
}
return array_map('intval', $groups);
}
/**
* @param int $root
* @param int $level
@ -234,7 +283,7 @@ class GroupPortalManager
if ($i == $level) {
$select_part .= "g$i.id as id_$i, g$i.name as name_$i ";
} else {
$select_part .="g$i.id as id_$i, g$i.name name_$i, ";
$select_part .= "g$i.id as id_$i, g$i.name name_$i, ";
}
if ($i == 1) {
$cond_part .= "FROM $t_group g1 JOIN $t_rel_group rg0 on g1.id = rg0.subgroup_id and rg0.group_id = $root ";
@ -245,24 +294,24 @@ class GroupPortalManager
}
$sql = $select_part.' '.$cond_part;
$res = Database::query($sql);
$toreturn = array();
$toReturn = array();
while ($item = Database::fetch_assoc($res)) {
foreach ($item as $key => $value) {
if ($key == 'id_1') {
$toreturn[$value]['name'] = $item['name_1'];
$toReturn[$value]['name'] = $item['name_1'];
} else {
$temp = explode('_', $key);
$index_key = $temp[1];
$string_key = $temp[0];
$previous_key = $string_key.'_'.$index_key - 1;
if ($string_key == 'id' && isset($item[$key])) {
$toreturn[$item[$previous_key]]['hrms'][$index_key]['name'] = $item['name_'.$index_id];
$indexKey = $temp[1];
$stringKey = $temp[0];
$previousKey = $stringKey.'_'.$indexKey - 1;
if ($stringKey == 'id' && isset($item[$key])) {
$toReturn[$item[$previousKey]]['hrms'][$indexKey]['name'] = $item['name_'.$indexKey];
}
}
}
}
return $toreturn;
return $toReturn;
}
/**
@ -292,16 +341,16 @@ class GroupPortalManager
$sql = $select_part.' '.$cond_part."WHERE rg0.subgroup_id='$group_id'";
$res = Database::query($sql);
$temp_arr = Database::fetch_array($res, 'NUM');
$toreturn = array();
$toReturn = array();
if (is_array($temp_arr)) {
foreach ($temp_arr as $elt) {
if (isset($elt)) {
$toreturn[] = $elt;
$toReturn[] = $elt;
}
}
}
return $toreturn;
return $toReturn;
}
/**
@ -912,8 +961,10 @@ class GroupPortalManager
$base = '';
}
$noPicturePath = array('dir' => $base.'img/', 'file' => 'unknown.jpg');
if (empty($id) || empty($type)) {
return $anonymous ? array('dir' => $base.'img/', 'file' => 'unknown.jpg') : array('dir' => '', 'file' => '');
return $anonymous ? $noPicturePath : array('dir' => '', 'file' => '');
}
$id = intval($id);
@ -923,7 +974,7 @@ class GroupPortalManager
$res = Database::query($sql);
if (!Database::num_rows($res)) {
return $anonymous ? array('dir' => $base.'img/', 'file' => 'unknown.jpg') : array('dir' => '', 'file' => '');
return $anonymous ? $noPicturePath : array('dir' => '', 'file' => '');
}
$user = Database::fetch_array($res);
@ -940,9 +991,11 @@ class GroupPortalManager
} else {
$dir = $base.'upload/users/groups/'.$id.'/';
}
if (empty($picture_filename) && $anonymous) {
return array('dir' => $base.'img/', 'file' => 'unknown.jpg');
return $noPicturePath;
}
return array('dir' => $dir, 'file' => $picture_filename);
}

@ -0,0 +1,33 @@
<?php
/* For licensing terms, see /license.txt */
/**
* Class HookResubscribe
* @var \SplObjectStorage $observers
*/
class HookResubscribe extends HookEvent implements HookResubscribeEventInterface
{
/**
* Constructor
*/
protected function __construct()
{
parent::__construct('HookResubscribe');
}
/**
* Update all the observers
* @param int $type
*
* @return int
*/
public function notifyResubscribe($type)
{
/** @var \HookResubscribeObserverInterface $observer */
$this->eventData['type'] = $type;
foreach ($this->observers as $observer) {
$observer->hookResubscribe($this);
}
return 1;
}
}

@ -0,0 +1,21 @@
<?php
/* For licensing terms, see /license.txt */
/**
* This file contains all Hook interfaces and their relation.
* They are used for Hook classes
* @package chamilo.library.hook
*/
/**
* Interface HookResubscribeEventInterface
*/
interface HookResubscribeEventInterface extends HookEventInterface
{
/**
* Update all the observers
* @param int $type
*
* @return int
*/
public function notifyResubscribe($type);
}

@ -0,0 +1,20 @@
<?php
/* For licensing terms, see /license.txt */
/**
* This file contains all Hook interfaces and their relation.
* They are used for Hook classes
* @package chamilo.library.hook
*/
/**
* Interface ResubscribeHookInterface
*/
interface HookResubscribeObserverInterface extends HookObserverInterface
{
/**
* @param HookResubscribeObserverInterface $hook
*
* @return int
*/
public function hookResubscribe(HookResubscribeEventInterface $hook);
}

@ -502,7 +502,7 @@ class MessageManager
if (!empty($group_id)) {
$path_user_info = GroupPortalManager::get_group_picture_path_by_id($group_id, 'system', true);
} else {
$path_user_info = UserManager::get_user_picture_path_by_id($message_user_id, 'system', true);
$path_user_info['dir'] = UserManager::getUserPathById($message_user_id, 'system');
}
$path_message_attach = $path_user_info['dir'].'message_attachments/';
@ -548,7 +548,7 @@ class MessageManager
if (!empty($group_id)) {
$path_user_info = GroupPortalManager::get_group_picture_path_by_id($group_id, 'system', true);
} else {
$path_user_info = UserManager::get_user_picture_path_by_id($message_uid, 'system', true);
$path_user_info['dir'] = UserManager::getUserPathById($message_uid, 'system');
}
$path_message_attach = $path_user_info['dir'].'message_attachments/';

@ -1069,7 +1069,7 @@ class MySpace
foreach ($extrafields as $key => $extra) {
$form->addElement('checkbox', 'extra_export_field'.$extra[0], '', $extra[3]);
}
$form->addElement('style_submit_button','submit', get_lang('Ok'),'class="save"' );
$form->addButtonSave(get_lang('Ok'), 'submit');
// setting the default values for the form that contains all the extra fields
if (is_array($_SESSION['additional_export_fields'])) {

@ -604,7 +604,7 @@ class Nanogong
$html .= '<form name="form_nanogong_advanced">';
$html .= '<input type="hidden" name="is_nano" value="1">';
$html .= '<a href="#" class="btn" onclick="send_voice()" />'.get_lang('SendRecord').'</a>';
$html .= '<a href="#" class="btn btn-default" onclick="send_voice()" />'.get_lang('SendRecord').'</a>';
$html .= '</form></div>';
@ -614,7 +614,7 @@ class Nanogong
//$html .= Display::return_message(get_lang('BrowserNotSupportNanogongSend'), 'warning');
$html .= '<form id="form_nanogong_simple" class="form-search" action="'.$url.'" name="form_nanogong" method="POST" enctype="multipart/form-data">';
$html .= '<input type="file" name="file">';
$html .= '<a href="#" class="btn" onclick="upload_file()" />'.get_lang('UploadFile').'</a>';
$html .= '<a href="#" class="btn btn-default" onclick="upload_file()" /><i class="fa fa-upload"></i> '.get_lang('UploadFile').'</a>';
$html .= '</form>';
$html .= '</div>';
$html .= '</center>';

@ -180,6 +180,11 @@ class Plugin
}
foreach ($this->fields as $name => $type) {
$options = null;
if (is_array($type) && isset($type['type']) && $type['type'] === "select") {
$options = $type['options'];
$type = $type['type'];
}
$value = $this->get($name);
@ -230,6 +235,14 @@ class Plugin
$element->_attributes['value'] = 'true';
$checkboxGroup[] = $element;
break;
case 'select':
$result->addElement(
$type,
$name,
array($this->get_lang($name), $help),
$options
);
break;
}
}
@ -237,7 +250,7 @@ class Plugin
$result->addGroup($checkboxGroup, null, array($this->get_lang('sms_types'), $help));
}
$result->setDefaults($defaults);
$result->addElement('style_submit_button', 'submit_button', $this->get_lang('Save'));
$result->addButtonSave($this->get_lang('Save'), 'submit_button');
return $result;
}
@ -311,6 +324,7 @@ class Plugin
//1. Loading english if exists
$english_path = $root.$plugin_name."/lang/english.php";
if (is_readable($english_path)) {
$strings = array();
include $english_path;
$this->strings = $strings;
}
@ -607,8 +621,9 @@ class Plugin
*/
public function deleteTab($key)
{
$t = Database::get_main_table(TABLE_MAIN_SETTINGS_CURRENT);
$sql = "SELECT *
FROM settings_current
FROM $t
WHERE variable = 'show_tabs'
AND subkey <> '$key'
AND subkey like 'custom_tab_%'

@ -534,7 +534,7 @@ class AppPlugin
foreach ($groups as $k => $v) {
$form->addGroup($groups[$k], $k, array($obj->get_lang($k)));
}
$form->addElement('style_submit_button', null, get_lang('SaveSettings'), 'class="save"');
$form->addButtonSave(get_lang('SaveSettings'));
$form->addElement('html', '</div></div>');
}
}

@ -446,7 +446,7 @@ class Security
*/
public static function filter_img_path($image_path)
{
static $allowed_extensions = array('png', 'gif', 'jpg', 'jpeg');
static $allowed_extensions = array('png', 'gif', 'jpg', 'jpeg', 'svg', 'webp');
$image_path = htmlspecialchars(trim($image_path)); // No html code is allowed.
// We allow static images only, query strings are forbidden.
if (strpos($image_path, '?') !== false) {

@ -228,7 +228,13 @@ class SessionManager
// add event to system log
$user_id = api_get_user_id();
Event::addEvent(LOG_SESSION_CREATE, LOG_SESSION_ID, $session_id, api_get_utc_datetime(), $user_id);
Event::addEvent(
LOG_SESSION_CREATE,
LOG_SESSION_ID,
$session_id,
api_get_utc_datetime(),
$user_id
);
}
return $session_id;
}
@ -1499,7 +1505,13 @@ class SessionManager
Database::query($sql_delete_sfv);
// Add event to system log
Event::addEvent(LOG_SESSION_DELETE, LOG_SESSION_ID, $id_checked, api_get_utc_datetime(), $userId);
Event::addEvent(
LOG_SESSION_DELETE,
LOG_SESSION_ID,
$id_checked,
api_get_utc_datetime(),
$userId
);
}
/**
@ -2336,7 +2348,13 @@ class SessionManager
$id_session = Database::insert_id();
// Add event to system log
$user_id = api_get_user_id();
Event::addEvent(LOG_SESSION_CATEGORY_CREATE, LOG_SESSION_CATEGORY_ID, $id_session, api_get_utc_datetime(), $user_id);
Event::addEvent(
LOG_SESSION_CATEGORY_CREATE,
LOG_SESSION_CATEGORY_ID,
$id_session,
api_get_utc_datetime(),
$user_id
);
return $id_session;
}

@ -643,8 +643,12 @@ class SocialManager extends UserManager
$img_array = UserManager::get_user_picture_path_by_id($user_id, 'web', true, true);
$big_image = UserManager::get_picture_user($user_id, $img_array['file'], '', USER_IMAGE_SIZE_BIG);
$big_image = $big_image['file'].'?'.uniqid();
$normal_image = $img_array['dir'].$img_array['file'].'?'.uniqid();
$big_image = $big_image['file'];
$normal_image = $img_array['dir'].$img_array['file'];
if (!api_get_configuration_value('gravatar_enabled')) {
$big_image .= '?'.uniqid();
$normal_image .= '?'.uniqid();
}
//--- User image
if ($img_array['file'] != 'unknown.jpg') {
@ -953,13 +957,14 @@ class SocialManager extends UserManager
$status_icon = Display::span('', array('class' => 'online_user_in_text'));
$user_status = $user_info['status'] == 1 ? Display::span('', array('class' => 'teacher_online')) : Display::span('', array('class' => 'student_online'));
if ($image_array['file'] == 'unknown.jpg' || !file_exists($image_array['dir'].$image_array['file'])) {
$friends_profile = UserManager::get_picture_user($uid, $image_array['file'], 80, USER_IMAGE_SIZE_ORIGINAL);
if (($image_array['file'] == 'unknown.jpg'
|| !file_exists($image_array['dir'].$image_array['file'])) &&
!api_get_configuration_value('gravatar_enabled')) {
$friends_profile['file'] = api_get_path(WEB_CODE_PATH).'img/unknown_180_100.jpg';
$img = '<img title = "'.$name.'" alt="'.$name.'" src="'.$friends_profile['file'].'">';
} else {
$friends_profile = UserManager::get_picture_user($uid, $image_array['file'], 80, USER_IMAGE_SIZE_ORIGINAL);
$img = '<img title = "'.$name.'" alt="'.$name.'" src="'.$friends_profile['file'].'">';
}
$img = '<img title = "'.$name.'" alt="'.$name.'" src="'.$friends_profile['file'].'">';
$name = '<a href="'.$url.'">'.$status_icon.$user_status.$name.'</a><br>';
$html .= '<li class="col-md-'.($column_size / 3).' thumbnail">'.$img.'<div class="caption">'.$name.'</div></li>';
}
@ -997,12 +1002,16 @@ class SocialManager extends UserManager
$interbreadcrumb[] = array('url' => 'whoisonline.php', 'name' => get_lang('UsersOnLineList'));
$html .= '<div class ="thumbnail">';
$sysdir_array = UserManager::get_user_picture_path_by_id($safe_user_id, 'system');
$sysdir = $sysdir_array['dir'];
$webdir_array = UserManager::get_user_picture_path_by_id($safe_user_id, 'web');
if (strlen(trim($user_object->picture_uri)) > 0) {
$sysdir_array = UserManager::get_user_picture_path_by_id($safe_user_id, 'system');
$sysdir = $sysdir_array['dir'];
$webdir_array = UserManager::get_user_picture_path_by_id($safe_user_id, 'web');
$webdir = $webdir_array['dir'];
$fullurl = $webdir.$user_object->picture_uri;
$fullurl = $webdir;
$fullurl .= api_get_configuration_value('gravatar_enabled') ?
$webdir_array['file'] :
$user_object->picture_uri;
$system_image_path = $sysdir.$user_object->picture_uri;
list($width, $height, $type, $attr) = @getimagesize($system_image_path);
$height += 30;
@ -1016,7 +1025,9 @@ class SocialManager extends UserManager
//echo '<a href="javascript:void()" onclick="javascript: return show_image(\''.$url_big_image.'\',\''.$big_image_width.'\',\''.$big_image_height.'\');" >';
$html .= '<img src="'.$fullurl.'" alt="'.$alt.'" />';
} else {
$html .= Display::return_icon('unknown.jpg', get_lang('Unknown'));
$html .= api_get_configuration_value('gravatar_enabled') ?
'<img src="'.$webdir_array['file'].'" alt="'.$alt.'" />' :
Display::return_icon('unknown.jpg', get_lang('Unknown'));
}
if (!empty($status)) {
$html .= '<div class="caption">'.$status.'</div>';
@ -1059,10 +1070,9 @@ class SocialManager extends UserManager
*/
public static function display_productions($user_id)
{
$sysdir_array = UserManager::get_user_picture_path_by_id($user_id, 'system', true);
$sysdir = $sysdir_array['dir'];
$webdir_array = UserManager::get_user_picture_path_by_id($user_id, 'web', true);
$webdir = $webdir_array['dir'];
$sysdir = UserManager::getUserPathById($user_id, 'system');
$webdir = UserManager::getUserPathById($user_id, 'web');
if (!is_dir($sysdir)) {
mkdir($sysdir, api_get_permissions_for_new_directories(), true);
@ -1190,9 +1200,8 @@ class SocialManager extends UserManager
$tbl_message_attach = Database::get_main_table(TABLE_MESSAGE_ATTACHMENT);
// create directory
$pathUserInfo = UserManager::get_user_picture_path_by_id($userId, 'system', true);
$social = '/social/';
$pathMessageAttach = $pathUserInfo['dir'] . 'message_attachments'. $social;
$pathMessageAttach = UserManager::getUserPathById($userId, 'system').'message_attachments'.$social;
$safeFileComment = Database::escape_string($fileComment);
$safeFileName = Database::escape_string($fileAttach['name']);
@ -1246,6 +1255,7 @@ class SocialManager extends UserManager
if (empty($start)) {
$start = '0000-00-00';
}
$tblMessage = Database::get_main_table(TABLE_MESSAGE);
$tblMessageAttachement = Database::get_main_table(TABLE_MESSAGE_ATTACHMENT);
@ -1254,10 +1264,10 @@ class SocialManager extends UserManager
$limit = intval($limit);
$sql = "SELECT id, user_sender_id,user_receiver_id, send_date, content, parent_id,
(SELECT ma.path FROM $tblMessageAttachement ma WHERE ma.message_id = tm.id ) as path,
(SELECT ma.filename FROM $tblMessageAttachement ma WHERE ma.message_id = tm.id ) as filename
FROM $tblMessage tm
WHERE user_receiver_id = $userId
(SELECT ma.path FROM $tblMessageAttachement ma WHERE ma.message_id = tm.id ) as path,
(SELECT ma.filename FROM $tblMessageAttachement ma WHERE ma.message_id = tm.id ) as filename
FROM $tblMessage tm
WHERE user_receiver_id = $userId
AND send_date > '$start' ";
$sql .= (empty($messageStatus) || is_null($messageStatus)) ? '' : " AND msg_status = '$messageStatus' ";
$sql .= (empty($parentId) || is_null($parentId)) ? '' : " AND parent_id = '$parentId' ";
@ -1426,9 +1436,13 @@ class SocialManager extends UserManager
$wallImage = '';
if (!empty($message['path'])) {
$pathUserInfo = UserManager::get_user_picture_path_by_id($authorId, 'web', true);
$pathImg = $pathUserInfo['dir'] . 'message_attachments';
$imageBig = $pathImg .self::getImagePath($message['path'], IMAGE_WALL_BIG);
$imageSmall = $pathImg. self::getImagePath($message['path'], IMAGE_WALL_SMALL);
$imageBig = $pathUserInfo['file'];
$imageSmall = $pathUserInfo['file'];
if (!api_get_configuration_value('gravatar_enabled')) {
$pathImg = UserManager::getUserPathById($authorId, 'web').'message_attachments';
$imageBig = $pathImg .self::getImagePath($message['path'], IMAGE_WALL_BIG);
$imageSmall = $pathImg. self::getImagePath($message['path'], IMAGE_WALL_SMALL);
}
$wallImage = '<a class="thumbnail ajax" href="'.$imageBig.'"><img src="'.$imageSmall.'"></a>';
}
@ -1633,7 +1647,7 @@ class SocialManager extends UserManager
$friendHtml.='</ul>';
} else {
$friendHtml.= '<div class="">'.get_lang('NoFriendsInYourContactList').'<br />'
.'<a class="btn" href="'.api_get_path(WEB_PATH).'whoisonline.php">'. get_lang('TryAndFindSomeFriends').'</a></div>';
.'<a class="btn btn-primary" href="'.api_get_path(WEB_PATH).'whoisonline.php"><i class="fa fa-search"></i> '. get_lang('TryAndFindSomeFriends').'</a></div>';
}
return $friendHtml;

@ -589,7 +589,7 @@ class Statistics
$form->addElement('hidden', 'activities_direction', 'DESC');
$form->addElement('hidden', 'activities_column', '4');
$form->addElement('text', 'keyword', get_lang('Keyword'));
$form->addElement('style_submit_button', 'submit', get_lang('Search'), 'class="search"');
$form->addButtonSearch(get_lang('Search'), 'submit');
echo '<div class="actions">';
$form->display();
echo '</div>';
@ -645,7 +645,7 @@ class Statistics
$form->addElement('hidden', 'report', 'courselastvisit');
$form->addText('date_diff', get_lang('Days'), true);
$form->addRule('date_diff', 'InvalidNumber', 'numeric');
$form->addElement('style_submit_button', 'submit', get_lang('Search'), 'class="search"');
$form->addButtonSearch(get_lang('Search'), 'submit');
if (!isset($_GET['date_diff'])) {
$defaults['date_diff'] = 60;
} else {

@ -355,7 +355,11 @@ class SubLanguageManager
$lang = Database::fetch_array($result);
$sql_update_2 = "UPDATE " . $tbl_settings_current . " SET selected_value='" . $lang['english_name'] . "' WHERE variable='platformLanguage'";
$result_2 = Database::query($sql_update_2);
Event::addEvent(LOG_PLATFORM_LANGUAGE_CHANGE, LOG_PLATFORM_LANGUAGE, $lang['english_name']);
Event::addEvent(
LOG_PLATFORM_LANGUAGE_CHANGE,
LOG_PLATFORM_LANGUAGE,
$lang['english_name']
);
return $result_2 !== false;
}

@ -10,11 +10,9 @@ require_once '../../../../../inc/global.inc.php';
api_protect_course_script();
api_block_anonymous_users();
$my_path = UserManager::get_user_picture_path_by_id(api_get_user_id(), 'system');
$user_disk_path = $my_path['dir'].'my_files/';
$my_path = UserManager::get_user_picture_path_by_id(api_get_user_id(),'web');
$user_web_path = $my_path['dir'].'my_files/';
$userId = api_get_user_id();
$user_disk_path = UserManager::getUserPathById($userId, 'system').'my_files/';
$user_web_path = UserManager::getUserPathById($userId, 'web').'my_files/';
//get all files and folders
$scan_files = scandir($user_disk_path);

@ -885,6 +885,35 @@ class Template
'X-Powered-By: '.$_configuration['software_name'].' '.substr($_configuration['system_version'], 0, 1)
);
//}
$socialMeta = '';
$metaTitle = api_get_setting('meta_title');
if (!empty($metaTitle)) {
$socialMeta .= '<meta name="twitter:card" content="summary" />' . "\n";
$socialMeta .= '<meta property="og:title" content="' . $metaTitle . '" />' . "\n";
$socialMeta .= '<meta property="og:url" content="' . api_get_path(WEB_PATH) . '" />' . "\n";
$metaDescription = api_get_setting('meta_description');
if (!empty($metaDescription)) {
$socialMeta .= '<meta property="og:description" content="' . $metaDescription . '" />' . "\n";
}
$metaSite = api_get_setting('meta_twitter_site');
if (!empty($metaSite)) {
$socialMeta .= '<meta name="twitter:site" content="' . $metaSite . '" />' . "\n";
$metaCreator = api_get_setting('meta_twitter_creator');
if (!empty($metaCreator)) {
$socialMeta .= '<meta name="twitter:creator" content="' . $metaCreator . '" />' . "\n";
}
}
$metaImage = api_get_setting('meta_image_path');
if (!empty($metaImage)) {
if (is_file(api_get_path(SYS_PATH) . $metaImage)) {
$path = api_get_path(WEB_PATH) . $metaImage;
$socialMeta .= '<meta property="og:image" content="' . $path . '" />' . "\n";
}
}
}
$this->assign('social_meta', $socialMeta);
}
/**

@ -96,9 +96,9 @@ class Timeline extends Model
//$form->freeze('created_at');
}
if ($action == 'edit') {
$form->addElement('style_submit_button', 'submit', get_lang('Modify'), 'class="save"');
$form->addButtonSave(get_lang('Modify'), 'submit');
} else {
$form->addElement('style_submit_button', 'submit', get_lang('Add'), 'class="save"');
$form->addButtonCreate(get_lang('Add'), 'submit');
}
$form->addRule('headline', get_lang('ThisFieldIsRequired'), 'required');
@ -116,7 +116,7 @@ class Timeline extends Model
// Setting the rules
$form->addRule('headline', get_lang('ThisFieldIsRequired'), 'required');
return $form;
return $form;
}
/**
@ -158,9 +158,9 @@ class Timeline extends Model
if ($action == 'edit') {
// Setting the defaults
$defaults = $this->get($id);
$form->addElement('style_submit_button', 'submit', get_lang('Modify'), 'class="save"');
$form->addButtonSave(get_lang('Modify'), 'submit');
} else {
$form->addElement('style_submit_button', 'submit', get_lang('Add'), 'class="save"');
$form->addButtonCreate(get_lang('Add'), 'submit');
}
/*if (!empty($defaults['created_at'])) {

@ -465,8 +465,20 @@ class UserManager
// Add event to system log
$user_id_manager = api_get_user_id();
Event::addEvent(LOG_USER_DELETE, LOG_USER_ID, $user_id, api_get_utc_datetime(), $user_id_manager, null, $user_info);
Event::addEvent(LOG_USER_DELETE, LOG_USER_OBJECT, $user_info, api_get_utc_datetime(), $user_id_manager, null, $user_info);
Event::addEvent(
LOG_USER_DELETE,
LOG_USER_ID,
$user_id,
api_get_utc_datetime(),
$user_id_manager
);
Event::addEvent(
LOG_USER_DELETE,
LOG_USER_OBJECT,
$user_info,
api_get_utc_datetime(),
$user_id_manager
);
return true;
}
@ -521,7 +533,7 @@ class UserManager
$sql = "UPDATE $table_user SET active = 0 WHERE user_id IN ($ids)";
$r = Database::query($sql);
if ($r !== false) {
Event::addEvent(LOG_USER_DISABLE,LOG_USER_ID,$ids);
Event::addEvent(LOG_USER_DISABLE, LOG_USER_ID, $ids);
}
return $r;
}
@ -781,7 +793,7 @@ class UserManager
$ev = LOG_USER_ENABLE;
}
if ($r !== false) {
Event::addEvent($ev,LOG_USER_ID,$user_id);
Event::addEvent($ev, LOG_USER_ID, $user_id);
}
return $r;
}
@ -789,6 +801,7 @@ class UserManager
/**
* Disables a user
* @param int User id
* @return bool
* @uses UserManager::change_active_state() to actually disable the user
* @assert (0) === false
*/
@ -798,11 +811,13 @@ class UserManager
return false;
}
self::change_active_state($user_id, 0);
return true;
}
/**
* Enable a user
* @param int User id
* @return bool
* @uses UserManager::change_active_state() to actually disable the user
* @assert (0) === false
*/
@ -812,6 +827,7 @@ class UserManager
return false;
}
self::change_active_state($user_id, 1);
return true;
}
/**
@ -1234,10 +1250,10 @@ class UserManager
default: // Base: empty, the result path below will be relative.
$base = '';
}
$gravatarEnabled = api_get_configuration_value('gravatar_enabled');
$noPicturePath = array('dir' => $base.'img/', 'file' => 'unknown.jpg');
if (empty($id) || empty($type)) {
if ((empty($id) || empty($type)) && !$gravatarEnabled) {
return $anonymous ? $noPicturePath : array('dir' => '', 'file' => '');
}
@ -1247,7 +1263,7 @@ class UserManager
$sql = "SELECT email, picture_uri FROM $user_table WHERE user_id=".$user_id;
$res = Database::query($sql);
if (!Database::num_rows($res)) {
if (!Database::num_rows($res) && !$gravatarEnabled) {
return $anonymous ? $noPicturePath : array('dir' => '', 'file' => '');
}
@ -1265,27 +1281,23 @@ class UserManager
$dir = $base.$userPath;
}
if (empty($picture_filename) ||
(!empty($picture_filename) && !file_exists($systemImagePath.$picture_filename))
) {
if ($anonymous) {
return $noPicturePath;
}
if ($gravatarEnabled) {
$avatarSize = api_getimagesize($noPicturePath['dir'].$noPicturePath['file']);
$avatarSize = $avatarSize['width'] > $avatarSize['height'] ?
$avatarSize['width'] :
$avatarSize['height'];
return array(
'dir' => '',
'file' => self::getGravatar(
$user['email'],
$avatarSize,
api_get_configuration_value('gravatar_type')
)
);
}
if (api_get_configuration_value('gravatar_enabled')) {
$avatarSize = api_getimagesize($noPicturePath['dir'].$noPicturePath['file']);
$avatarSize = $avatarSize['width'] > $avatarSize['height'] ?
$avatarSize['width'] :
$avatarSize['height'];
return array(
'dir' => '',
'file' => self::getGravatar(
$user['email'],
$avatarSize,
api_get_configuration_value('gravatar_type')
)
);
}
if (empty($picture_filename) && $anonymous) {
return $noPicturePath;
}
return array('dir' => $dir, 'file' => $picture_filename);
@ -2004,7 +2016,11 @@ class UserManager
if ($result) {
//echo "id returned";
$return = Database::insert_id();
Event::addEvent(LOG_USER_FIELD_CREATE, LOG_USER_FIELD_VARIABLE, Database::escape_string($fieldvarname));
Event::addEvent(
LOG_USER_FIELD_CREATE,
LOG_USER_FIELD_VARIABLE,
$fieldvarname
);
} else {
//echo "false - failed" ;
return false;
@ -3247,6 +3263,7 @@ class UserManager
*/
public static function get_picture_user($user_id, $picture_file, $height, $size_picture = USER_IMAGE_SIZE_MEDIUM, $style = '')
{
$gravatarEnabled = api_get_configuration_value('gravatar_enabled');
$picture = array();
$picture['style'] = $style;
if ($picture_file == 'unknown.jpg') {
@ -3261,7 +3278,9 @@ class UserManager
break;
}
$picture['file'] = api_get_path(WEB_CODE_PATH).'img/'.$picture_file;
return $picture;
if (!$gravatarEnabled) {
return $picture;
}
}
switch ($size_picture) {
@ -3319,6 +3338,9 @@ class UserManager
}
}
}
if ($gravatarEnabled) {
$picture['file'] = $image_array['file'];
}
return $picture;
}
@ -5285,4 +5307,35 @@ EOF;
}
return $url;
}
/**
* Get user path from user ID (returns an array).
* The return format is a complete path to a folder ending with "/"
* @param integer User ID
* @param string Optional. Type of path to return (can be 'system', 'rel', 'web')
* @return string User folder path (i.e. /var/www/chamilo/main/upload/users/1/1/)
*/
public static function getUserPathById($id, $type = null)
{
$user_id = intval($id);
if (!$user_id) {
return null;
}
$userPath = "upload/users/$user_id/";
if (api_get_setting('split_users_upload_directory') === 'true') {
$userPath = 'upload/users/'.substr((string) $user_id, 0, 1).'/'.$user_id.'/';
}
switch ($type) {
case 'system': // Base: absolute system path.
$userPath = api_get_path(SYS_CODE_PATH).$userPath;
break;
case 'rel': // Base: semi-absolute web path (no server base).
$userPath = api_get_path(REL_CODE_PATH).$userPath;
break;
case 'web': // Base: absolute web path.
$userPath = api_get_path(WEB_CODE_PATH).$userPath;
break;
}
return $userPath;
}
}

@ -377,59 +377,63 @@ LOCK TABLES language WRITE;
INSERT INTO language (original_name, english_name, isocode, dokeos_folder, available) VALUES
('&#1575;&#1604;&#1593;&#1585;&#1576;&#1610;&#1577;','arabic','ar','arabic',0),
('Asturianu','asturian','ast','asturian',0),
('Euskara','basque','eu','basque',1),
('&#2476;&#2494;&#2434;&#2482;&#2494;','bengali','bn','bengali',0),
('&#1041;&#1098;&#1083;&#1075;&#1072;&#1088;&#1089;&#1082;&#1080;','bulgarian','bg','bulgarian',1),
('Bosanski','bosnian','bs','bosnian',1),
('Portugu&ecirc;s do Brasil','brazilian','pt-BR','brazilian',1),
('&#1041;&#1098;&#1083;&#1075;&#1072;&#1088;&#1089;&#1082;&#1080;','bulgarian','bg','bulgarian',1),
('Catal&agrave;','catalan','ca','catalan',0),
('&#20013;&#25991;&#65288;&#31616;&#20307;&#65289;','simpl_chinese','zh','simpl_chinese',0),
('&#32321;&#39636;&#20013;&#25991;','trad_chinese','zh-TW','trad_chinese',0),
('Hrvatski','croatian','hr','croatian',0),
('&#268;esky','czech','cs','czech',0),
('Dansk','danish','da','danish',0),
('&#1583;&#1585;&#1740;','dari','prs','dari',0),
('Deutsch','german','de','german',1),
('&Epsilon;&lambda;&lambda;&eta;&nu;&iota;&kappa;&#940;','greek','el','greek',0),
('Nederlands','dutch','nl','dutch',1),
('English','english','en','english',1),
('Espa&ntilde;ol','spanish','es','spanish',1),
('Esperanto','esperanto','eo','esperanto',0),
('Euskara','basque','eu','basque',0),
('&#1601;&#1575;&#1585;&#1587;&#1740;','persian','fa','persian',0),
('Føroyskt', 'faroese', 'fo', 'faroese', 0),
('Suomi','finnish','fi','finnish',0),
('Fran&ccedil;ais','french','fr','french',1),
('Furlan','friulian','fur','friulian',0),
('Galego','galician','gl','galician',0),
('Galego','galician','gl','galician',1),
('&#4325;&#4304;&#4320;&#4311;&#4323;&#4314;&#4312;','georgian','ka','georgian',0),
('Hrvatski','croatian','hr','croatian',0),
('Deutsch','german','de','german',1),
('&Epsilon;&lambda;&lambda;&eta;&nu;&iota;&kappa;&#940;','greek','el','greek',1),
('&#1506;&#1489;&#1512;&#1497;&#1514;','hebrew','he','hebrew',0),
('&#2361;&#2367;&#2344;&#2381;&#2342;&#2368;','hindi','hi','hindi',0),
('Magyar','hungarian','hu','hungarian',1),
('Bahasa Indonesia','indonesian','id','indonesian',1),
('Italiano','italian','it','italian',1),
('&#26085;&#26412;&#35486;','japanese','ja','japanese',0),
('&#54620;&#44397;&#50612;','korean','ko','korean',0),
('Latvie&scaron;u','latvian','lv','latvian',0),
('Latvie&scaron;u','latvian','lv','latvian',1),
('Lietuvi&#371;','lithuanian','lt','lithuanian',0),
('&#1052;&#1072;&#1082;&#1077;&#1076;&#1086;&#1085;&#1089;&#1082;&#1080;','macedonian','mk','macedonian',0),
('Magyar','hungarian','hu','hungarian',1),
('Bahasa Melayu','malay','ms','malay',0),
('Nederlands','dutch','nl','dutch',1),
('&#26085;&#26412;&#35486;','japanese','ja','japanese',0),
('Norsk','norwegian','no','norwegian',0),
('Occitan','occitan','oc','occitan',0),
('&#1662;&#1690;&#1578;&#1608;','pashto','ps','pashto',0),
('Polski','polish','pl','polish',0),
('&#1601;&#1575;&#1585;&#1587;&#1740;','persian','fa','persian',0),
('Polski','polish','pl','polish',1),
('Portugu&ecirc;s europeu','portuguese','pt','portuguese',1),
('Portugu&ecirc;s do Brasil','brazilian','pt-BR','brazilian',1),
('Rom&acirc;n&#259;','romanian','ro','romanian',0),
('Runasimi','quechua_cusco','qu','quechua_cusco',0),
('Rom&acirc;n&#259;','romanian','ro','romanian',0),
('&#1056;&#1091;&#1089;&#1089;&#1082;&#1080;&#1081;','russian','ru','russian',0),
('Sloven&#269;ina','slovak','sk','slovak',0),
('Srpski','serbian','sr','serbian',0),
('&#20013;&#25991;&#65288;&#31616;&#20307;&#65289;','simpl_chinese','zh','simpl_chinese',0),
('Sloven&#269;ina','slovak','sk','slovak',1),
('Sloven&scaron;&#269;ina','slovenian','sl','slovenian',1),
('&#1575;&#1604;&#1589;&#1608;&#1605;&#1575;&#1604;&#1610;&#1577;','somali','so','somali',0),
('Srpski','serbian','sr','serbian',0),
('Suomi','finnish','fi','finnish',0),
('Espa&ntilde;ol','spanish','es','spanish',1),
('Kiswahili','swahili','sw','swahili',0),
('Svenska','swedish','sv','swedish',0),
('Tagalog', 'tagalog', 'tl', 'tagalog',1),
('&#3652;&#3607;&#3618;','thai','th','thai',0),
('Tibetan', 'tibetan', 'bo', 'tibetan', 0),
('&#32321;&#39636;&#20013;&#25991;','trad_chinese','zh-TW','trad_chinese',0),
('T&uuml;rk&ccedil;e','turkish','tr','turkish',0),
('&#1059;&#1082;&#1088;&#1072;&#1111;&#1085;&#1089;&#1100;&#1082;&#1072;','ukrainian','uk','ukrainian',0),
('Ti&#7871;ng Vi&#7879;t','vietnamese','vi','vietnamese',0),
('Kiswahili','swahili','sw','swahili',0),
('isiXhosa', 'xhosa', 'xh', 'xhosa', 0),
('Yor&ugrave;b&aacute;','yoruba','yo','yoruba',0);
-- The chosen during the installation platform language should be enabled.
@ -887,6 +891,11 @@ VALUES
('prevent_session_admins_to_manage_all_users', NULL, 'radio', 'Session', 'false', 'PreventSessionAdminsToManageAllUsersTitle', 'PreventSessionAdminsToManageAllUsersComment', NULL, NULL, 1),
('documents_default_visibility_defined_in_course', NULL,'radio','Tools','false','DocumentsDefaultVisibilityDefinedInCourseTitle','DocumentsDefaultVisibilityDefinedInCourseComment',NULL, NULL, 1),
('enabled_mathjax', NULL, 'radio', 'Editor', 'false', 'EnableMathJaxTitle', 'EnableMathJaxComment', NULL, NULL, 0),
('meta_twitter_site', NULL, 'textfield', 'Tracking', '', 'MetaTwitterSiteTitle', 'MetaTwitterSiteComment', NULL, NULL, 1),
('meta_twitter_creator', NULL, 'textfield', 'Tracking', '', 'MetaTwitterCreatorTitle', 'MetaTwitterCreatorComment', NULL, NULL, 1),
('meta_title', NULL, 'textfield', 'Tracking', '', 'MetaTitleTitle', 'MetaTitleComment', NULL, NULL, 1),
('meta_description', NULL, 'textfield', 'Tracking', '', 'MetaDescriptionTitle', 'MetaDescriptionComment', NULL, NULL, 1),
('meta_image_path', NULL, 'textfield', 'Tracking', '', 'MetaImagePathTitle', 'MetaImagePathComment', NULL, NULL, 1),
('chamilo_database_version', NULL, 'textfield',NULL, '0', 'DatabaseVersion','', NULL, NULL, 0);
UNLOCK TABLES;
/*!40000 ALTER TABLE settings_current ENABLE KEYS */;
@ -4619,5 +4628,5 @@ CREATE TABLE c_attendance_calendar_rel_group (
-- Version
LOCK TABLES settings_current WRITE;
UPDATE settings_current SET selected_value = '1.10.0.33' WHERE variable = 'chamilo_database_version';
UPDATE settings_current SET selected_value = '1.10.0.35' WHERE variable = 'chamilo_database_version';
UNLOCK TABLES;

@ -104,6 +104,16 @@ ALTER TABLE session MODIFY COLUMN name char(100) NOT NULL DEFAULT '';
ALTER TABLE track_e_default MODIFY COLUMN c_id int default NULL;
UPDATE course_field SET field_type = 1 WHERE field_variable = 'special_course';
-- v1.10.0.34
INSERT INTO settings_current (variable, subkey, type, category, selected_value, title, comment, scope, subkeytext, access_url_changeable) VALUES ('meta_twitter_site', NULL, 'textfield', 'Tracking', '', 'MetaTwitterSiteTitle', 'MetaTwitterSiteComment', NULL, NULL, 1);
INSERT INTO settings_current (variable, subkey, type, category, selected_value, title, comment, scope, subkeytext, access_url_changeable) VALUES ('meta_twitter_creator', NULL, 'textfield', 'Tracking', '', 'MetaTwitterCreatorTitle', 'MetaTwitterCreatorComment', NULL, NULL, 1);
INSERT INTO settings_current (variable, subkey, type, category, selected_value, title, comment, scope, subkeytext, access_url_changeable) VALUES ('meta_title', NULL, 'textfield', 'Tracking', '', 'MetaTitleTitle', 'MetaTitleComment', NULL, NULL, 1);
INSERT INTO settings_current (variable, subkey, type, category, selected_value, title, comment, scope, subkeytext, access_url_changeable) VALUES ('meta_description', NULL, 'textfield', 'Tracking', '', 'MetaDescriptionTitle', 'MetaDescriptionComment', NULL, NULL, 1);
INSERT INTO settings_current (variable, subkey, type, category, selected_value, title, comment, scope, subkeytext, access_url_changeable) VALUES ('meta_image_path', NULL, 'textfield', 'Tracking', '', 'MetaImagePathTitle', 'MetaImagePathComment', NULL, NULL, 1);
-- v1.10.0.35
INSERT INTO language (original_name, english_name, isocode, dokeos_folder, available) VALUES ('Føroyskt', 'faroese', 'fo', 'faroese', 0), ('Tagalog', 'tagalog', 'tl', 'tagalog',1), ('Tibetan', 'tibetan', 'bo', 'tibetan', 0), ('isiXhosa', 'xhosa', 'xh', 'xhosa', 0);
-- Course DB changes (c_*)
ALTER TABLE c_survey ADD COLUMN visible_results INT UNSIGNED DEFAULT 0;
@ -123,4 +133,4 @@ CREATE TABLE IF NOT EXISTS c_attendance_calendar_rel_group (id int NOT NULL auto
-- Do not move this query
UPDATE settings_current SET selected_value = '1.10.0.33' WHERE variable = 'chamilo_database_version';
UPDATE settings_current SET selected_value = '1.10.0.35' WHERE variable = 'chamilo_database_version';

@ -137,10 +137,11 @@ if (defined('SYSTEM_INSTALLATION')) {
);
$list = scandir($langPath);
foreach ($list as $entry) {
if (is_dir($langPath.$entry) && in_array($entry, $officialLanguages)) {
if (is_dir($langPath . $entry) && in_array($entry, $officialLanguages)
) {
foreach ($filesToDelete as $file) {
if (is_file($langPath.$entry.'/'.$file.'.inc.php')) {
unlink($langPath.$entry.'/'.$file.'.inc.php');
if (is_file($langPath . $entry . '/' . $file . '.inc.php')) {
unlink($langPath . $entry . '/' . $file . '.inc.php');
}
}
}
@ -148,6 +149,11 @@ if (defined('SYSTEM_INSTALLATION')) {
// Remove the "main/conference/" directory that wasn't used since years long
// past - see rrmdir function declared below
@rrmdir(api_get_path(SYS_CODE_PATH).'conference');
// Other files that we renamed
// events.lib.inc.php has been renamed to events.lib.php
if (is_file(api_get_path(LIBRARY_PATH).'events.lib.inc.php')) {
@unlink(api_get_path(LIBRARY_PATH).'events.lib.inc.php');
}
} else {
echo 'You are not allowed here !'. __FILE__;

@ -44,7 +44,6 @@ $Recommended = "(recommended)";
$ScormDB = "Scorm DB";
$AdminLastName = "Administrator last name";
$AdminPhone = "Administrator telephone";
$OK = "OK";
$AdminFirstName = "Administrator first name";
$InstituteURL = "URL of this organisation";
$UserDB = "User DB";
@ -59,7 +58,6 @@ $CheckDatabaseConnection = "Check database connection";
$PrintOverview = "Show Overview";
$Installing = "Install";
$of = "of";
$Step = "Step";
$MoreDetails = "For more details";
$ServerRequirements = "Server requirements";
$ServerRequirementsInfo = "Libraries and features the server must provide to use Chamilo to its full extent";
@ -93,8 +91,6 @@ $ReadWarningBelow = "read warning below";
$SecurityAdvice = "Security advice";
$YouHaveMoreThanXCourses = "You have more than %d courses on your Chamilo platform ! Only %d courses have been updated. To update the other courses, %sclick here %s";
$ToProtectYourSiteMakeXAndYReadOnly = "To protect your site, make %s and %s read-only (CHMOD 444).";
$Error = "Error";
$Back = "Back";
$HasNotBeenFound = "has not been found";
$PleaseGoBackToStep1 = "Please go back to Step 1";
$HasNotBeenFoundInThatDir = "has not been found in that directory";

@ -44,7 +44,6 @@ $Recommended = "Recomendao";
$ScormDB = "Base de datos SCROM";
$AdminLastName = "Apellíos del alministrador";
$AdminPhone = "Teléfonu del alministrador";
$OK = "Bien";
$AdminFirstName = "Nome del alministrador";
$InstituteURL = "URL de la organización";
$UserDB = "Base de datos d'usuarios";
@ -59,7 +58,6 @@ $CheckDatabaseConnection = "Comprobar la conesión cola base de datos";
$PrintOverview = "Resume de la instalación";
$Installing = "Instalar";
$of = "de";
$Step = "Pasu";
$MoreDetails = "Pa más detalles";
$ServerRequirements = "Necesidaes del servidor";
$ServerRequirementsInfo = "Biblioteques y funciones que'l servidor tien de tener pa poder usar Chamilo con toles sos posibilidaes.";
@ -93,8 +91,6 @@ $ReadWarningBelow = "llea l'alvertencia d'embaxo";
$SecurityAdvice = "Avisu de seguridá";
$YouHaveMoreThanXCourses = "¡ Tien más de %d cursos na so plataforma Chamilo ! Namás s'actualizaren los cursos de %d. Pa actualizar los otros cursos, %s calque equí %s";
$ToProtectYourSiteMakeXAndYReadOnly = "Pa protexer el so sitiu, configure %s y %s como archivos únicamente de llectura (CHMOD 444)";
$Error = "Erru";
$Back = "P'atrás";
$HasNotBeenFound = "nun s'atopó";
$PleaseGoBackToStep1 = "Por favor, torne al Pasu 1";
$HasNotBeenFoundInThatDir = "nun s'atopó nesti direutoriu";

@ -44,7 +44,6 @@ $Recommended = "(gomendatua)";
$ScormDB = "SCORM datu basea";
$AdminLastName = "Kudeatzailearen deiturak";
$AdminPhone = "Kudeatzailearen telefonoa";
$OK = "Balidatu";
$AdminFirstName = "Kudeatzailearen izena";
$InstituteURL = "Erakunde honen URL";
$UserDB = "Erabiltzailearen datu basea";
@ -60,7 +59,6 @@ $CheckDatabaseConnection = "Egiaztatu datu basearekiko konexioa";
$PrintOverview = "Erakutsi instalazioaren sumarioa";
$Installing = "Instalatu";
$of = "honakoarena";
$Step = "Urratsa";
$MoreDetails = "Xehetasun gehiago ikusteko";
$ServerRequirements = "Zerbitzariaren eskakizunak";
$ServerRequirementsInfo = "Chamiloren gaitasun guztiak erabili ahal izateko, zure zerbitzariak hurrengo liburutegiak eta eginkizunak eman behar ditu. Hizki laranjaz azalduta falta diren liburutegiak aukerakoak dira, baina, hauek ez instalatzekotan, Chamiloren gaitasun batzuk desgaituko dira. Geroago artean instalatu ahal izango dituzu liburutegiak, falta diren gaitasunak erabiltzeko.";
@ -94,8 +92,6 @@ $ReadWarningBelow = "irakur ezazu beheko abisua";
$SecurityAdvice = "Segurtasun abisua";
$YouHaveMoreThanXCourses = "%d ikastaro baino gehiago dituzu zure Chamilo plataforman. %d ikastaro bakarrik eguneratu dira. Gainontzeko ikastaroak ere eguneratzeko, %s klikatu hemen %s";
$ToProtectYourSiteMakeXAndYReadOnly = "Zure webgunea babesteko, konfiguratu itzazu %%s eta %s (baina ez beren direktorioak) soilik irakurtzeko fitxategi gisa (CHMOD 444).";
$Error = "Errorea";
$Back = "Atzera";
$HasNotBeenFound = "ez da aurkitu";
$PleaseGoBackToStep1 = "Mesedez, itzuli 1. urratsera";
$HasNotBeenFoundInThatDir = "ez da direktorio honetan aurkitu";

@ -46,7 +46,6 @@ $Recommended = "(recomendado)";
$ScormDB = "BD Scorm";
$AdminLastName = "Sobrenome do Administrador";
$AdminPhone = "Telefone do Administrador";
$OK = "OK";
$AdminFirstName = "Nome do Administrador";
$InstituteURL = "URL dessa organização";
$UserDB = "Banco de dados de usuários";
@ -61,7 +60,6 @@ $CheckDatabaseConnection = "Testar conexão com Banco de Dados";
$PrintOverview = "Mostrar visão geral";
$Installing = "Instalar";
$of = "de";
$Step = "Passo";
$MoreDetails = "Para maiores detalhes";
$ServerRequirements = "Requisitos do servidor";
$ServerRequirementsInfo = "Bibliotecas e funcionalidades que o servidor deve possuir para poder usar Chamilo com todas as suas extensões";
@ -95,8 +93,6 @@ $ReadWarningBelow = "leia a mensagem abaixo";
$SecurityAdvice = "Informação de segurança";
$YouHaveMoreThanXCourses = "Tem mais de %d cursos na sua plataforma Chamilo! Somente %d cursos foram atualizados. Para atualizar os outros cursos, %s clique aqui %s";
$ToProtectYourSiteMakeXAndYReadOnly = "Para proteger o seu site, altere %s e %s para somente leitura (CHMOD 444).";
$Error = "Erro";
$Back = "Voltar";
$HasNotBeenFound = "não foi encontrado";
$PleaseGoBackToStep1 = "Volte, por favor, à 1ª Etapa";
$HasNotBeenFoundInThatDir = "não foi encontrado nesse diretório";

@ -44,7 +44,6 @@ $Recommended = "(препоръчва се)";
$ScormDB = "SCORM база данни";
$AdminLastName = "Фамилия на администратора";
$AdminPhone = "Телефон на администратора";
$OK = "Добре (OK)";
$AdminFirstName = "Име на администратора";
$InstituteURL = "Интернет-адрес на организацията";
$UserDB = "База данни на потребителите";
@ -59,7 +58,6 @@ $CheckDatabaseConnection = "Проверка на връзката към сър
$PrintOverview = "Пояснения";
$Installing = "Инсталиране";
$of = "от";
$Step = "Стъпка";
$MoreDetails = "За повече информация,";
$ServerRequirements = "Изисквания към сървъра";
$ServerRequirementsInfo = "Библиотеки и модули, които трябва да са инсталирани на сървъра, за да се използват напълно възможностите на системата Chamilo.";
@ -93,8 +91,6 @@ $ReadWarningBelow = "прочетете предупреждението по-д
$SecurityAdvice = "Препоръка:";
$YouHaveMoreThanXCourses = "Имате повече от %d курса във вашата система. Само %d курса са обновени. За да обновите останалите курсове, %sщракнете тук %s";
$ToProtectYourSiteMakeXAndYReadOnly = "За да защитите системата, направете достъпни само за четене (CHMOD 444) файловете %s и %s.";
$Error = "Грешка!";
$Back = "Назад";
$HasNotBeenFound = "не е намерена";
$PleaseGoBackToStep1 = "Моля, върнете се в стъпка 1";
$HasNotBeenFoundInThatDir = "не е намерена в указаната директория";

@ -45,7 +45,6 @@ $Recommended = "(recomanat)";
$ScormDB = "Base de dades SCORM";
$AdminLastName = "Cognoms de l'administrador";
$AdminPhone = "Telèfon de l'administrador";
$OK = "D'acord";
$AdminFirstName = "Nom de l'administrador";
$InstituteURL = "URL de l'organització";
$UserDB = "Base de dades d'usuaris";
@ -61,7 +60,6 @@ $CheckDatabaseConnection = "Comproveu la connexió amb la base de dades";
$PrintOverview = "Resum de la instal·lació";
$Installing = "Instal·la";
$of = "de";
$Step = "Pas";
$MoreDetails = "Per a més detalls";
$ServerRequirements = "Requeriments del servidor";
$ServerRequirementsInfo = "Llibreries i funcionalitats que el servidor ha de proporcionar per poder utilitzar Chamilo amb totes les seves possibilitats. Les llibreries perdudes que es mostren de color taronja són opcionals, però algunes característiques de Chamilo poden ser deshabilitades si aquestes no s'instal·len. Més endavant encara podreu instal·lar aquestes llibreres per poder habilitar les característiques perdudes.";
@ -95,8 +93,6 @@ $ReadWarningBelow = "Llegiu el següent advertiment";
$SecurityAdvice = "Avís de seguretat";
$YouHaveMoreThanXCourses = "Té més de %d cursos a la seva plataforma Chamilo ! Només d'han actualitzat els cursos de %d. Per actualitzar els altres cursos, %s faci clic aquí %s";
$ToProtectYourSiteMakeXAndYReadOnly = "Per protegir el seu lloc, configureu %s i %s com arxius de només lectura (CHMOD 444).";
$Error = "Error";
$Back = "Torna";
$HasNotBeenFound = "No s'ha trobat";
$PleaseGoBackToStep1 = "Torneu al Pas 1";
$HasNotBeenFoundInThatDir = "No s'ha trobat en aquest directori";

@ -44,7 +44,6 @@ $Recommended = "(preporučeno)";
$ScormDB = "baza podataka Scorm";
$AdminLastName = "Prezime nadzornika";
$AdminPhone = "Broj telefona nadzornika";
$OK = "OK";
$AdminFirstName = "Ime nadzornika";
$InstituteURL = "URL ustanove";
$UserDB = "Korisnikova baza podataka";
@ -59,7 +58,6 @@ $CheckDatabaseConnection = "Provjeri povezanost prema bazi podataka";
$PrintOverview = "Prikaži cjelokupni pregled";
$Installing = "Instaliraj";
$of = "od";
$Step = "Korak";
$MoreDetails = "Za više pojedinosti";
$ServerRequirements = "Karakteristike poslužitelja";
$ServerRequirementsInfo = "Programske knjižnice i značajke koje poslužitelj mora sadržavati da bi se Chamilo sustav mogao upotrijebiti u potpunosti";
@ -93,8 +91,6 @@ $ReadWarningBelow = "pročitajte upozorenje ispod";
$SecurityAdvice = "Sigurnosni savjet";
$YouHaveMoreThanXCourses = "Imate više od %d kolegija na vašoj Chamilo platformi ! Samo %d kolegija je ažurirano. Za ažuriranje ostalih kolegija, %skliknite ovdje %s";
$ToProtectYourSiteMakeXAndYReadOnly = "Da zaštitite vaš portal, postavite %s i %s (ali ne i njihove mape) u samo-čitaj opciju (CHMOD 444).";
$Error = "Greška";
$Back = "Nazad";
$HasNotBeenFound = "nije pronađen";
$PleaseGoBackToStep1 = "Molim vratite se na korak 1";
$HasNotBeenFoundInThatDir = "nije pronađen u toj mapi";

@ -44,7 +44,6 @@ $Recommended = "(aanbevolen)";
$ScormDB = "Scormdatabank";
$AdminLastName = "Naam administrator";
$AdminPhone = "Telefoonnummer administrator";
$OK = "Oké";
$AdminFirstName = "Voornaam administrator";
$InstituteURL = "URL van de organisatie";
$UserDB = "Gebruikersdatabank";
@ -59,7 +58,6 @@ $CheckDatabaseConnection = "Controleer databankverbinding";
$PrintOverview = "Overzicht weergeven";
$Installing = "Installeer";
$of = "van";
$Step = "Stap";
$MoreDetails = "Voor meer details";
$ServerRequirements = "Server vereisten";
$ServerRequirementsInfo = "Functiebibliotheken en functionaliteiten die de server moet voorzien om Chamilo ten volle te kunnen benutten";
@ -93,8 +91,6 @@ $ReadWarningBelow = "lees onderstaande waarschuwing";
$SecurityAdvice = "Beveiligingsadvies";
$YouHaveMoreThanXCourses = "U heeft %d cursussen op het Chamilo platform. Er zijn %d cursussen geüpdated. Om de overige cursussen te updaten, %sklik hier %s";
$ToProtectYourSiteMakeXAndYReadOnly = "Om uw site te beveiligen, maak %s en %s enkel leesbaar (CHMOD 444).";
$Error = "Fout";
$Back = "Terug";
$HasNotBeenFound = "is niet gevonden";
$PleaseGoBackToStep1 = "Gelieve terug te gaan naar stap 1";
$HasNotBeenFoundInThatDir = "is niet gevonden in die folder";

@ -46,7 +46,7 @@ $Recommended = "(recommended)";
$ScormDB = "Scorm DB";
$AdminLastName = "Administrator last name";
$AdminPhone = "Administrator telephone";
$OK = "Validate";
$UpgradeFromLMS19x = "Upgrade from LMS v1.9.*";
$AdminFirstName = "Administrator first name";
$InstituteURL = "URL of this company";
$UserDB = "User DB";
@ -61,7 +61,6 @@ $CheckDatabaseConnection = "Check database connection";
$PrintOverview = "Show Overview";
$Installing = "Install";
$of = "of";
$Step = "Step";
$MoreDetails = "For more details";
$ServerRequirements = "Server requirements";
$ServerRequirementsInfo = "Your server must provide the following libraries to enable all features of Chamilo. The missing libraries shown in orange letters are optional, but some features of Chamilo might be disabled if they are not installed. You can still install those libraries later on to enable the missing features.";
@ -95,8 +94,6 @@ $ReadWarningBelow = "read warning below";
$SecurityAdvice = "Security advice";
$YouHaveMoreThanXCourses = "You have more than %d courses on your Chamilo platform ! Only %d courses have been updated. To update the other courses, %sclick here %s";
$ToProtectYourSiteMakeXAndYReadOnly = "To protect your site, make %s and %s (but not their directories) read-only (CHMOD 444).";
$Error = "Error";
$Back = "Back";
$HasNotBeenFound = "has not been found";
$PleaseGoBackToStep1 = "Please go back to Step 1";
$HasNotBeenFoundInThatDir = "has not been found in that directory";

@ -1302,6 +1302,7 @@ $DeleteSelectedClasses = "Delete selected classes";
$DeleteSelectedGroups = "Delete selected groups";
$Administrator = "Administrator";
$ChangePicture = "Change picture";
$myCoursesSessionView = "Session view";
$AddUsers = "Add a user";
$AddGroups = "Add groups";
$AddClasses = "Add classes";
@ -1365,6 +1366,7 @@ $NoCategories = "There are no categories here";
$AllowCoursesInCategory = "Allow adding courses in this category?";
$GoToForum = "Go to the forum";
$CategoryCode = "Category code";
$MetaTwitterCreatorComment = "The Twitter Creator is a Twitter account (e.g. @ywarnier) that represents the *person* that created the site. This field is optional.";
$EditNode = "Edit this category";
$OpenNode = "Open this category";
$DeleteNode = "Delete this category";
@ -1375,6 +1377,7 @@ $TreeRecountedIn = "Tree recounted in";
$RebuildTree = "Rebuild the tree";
$RefreshNbChildren = "Refresh number of children";
$ShowTree = "Show tree";
$MetaImagePathTitle = "Meta image path";
$LogDeleteCat = "Category deleted";
$RecountChildren = "Recount children";
$UpInSameLevel = "Up in same level";
@ -1431,6 +1434,7 @@ $CourseCreationSucceeded = "The course was successfully created.";
$OnTheHardDisk = "on the hard disk";
$IsVirtualCourse = "Virtual course?";
$AnnouncementUpdated = "Announcement has been updated";
$MetaImagePathComment = "This Meta Image path is the path to a file inside your Chamilo directory (e.g. home/image.png) that should show in a Twitter card or a OpenGraph card when showing a link to your LMS. Twitter recommends an image of 120 x 120 pixels, which might sometimes be cropped to 120x90.";
$PermissionsForNewFiles = "Permissions for new files";
$PermissionsForNewFilesComment = "The ability to define the permissions settings to assign to every newly created file lets you improve security against attacks by hackers uploading dangerous content to your portal. The default setting (0550) should be enough to give your server a reasonable protection level. The given format uses the UNIX terminology of Owner-Group-Others with Read-Write-Execute permissions.If you use Oogie, take care that the user who launch OpenOffice can write files in the course folder.";
$Guest = "Guest";
@ -1508,6 +1512,7 @@ $EditNews = "Edit News";
$EditCategories = "Edit training categories";
$EditHomePage = "Edit Homepage central area";
$AllowUserHeadingsComment = "Can a teacher define learner profile fields to retrieve additional information?";
$MetaTwitterSiteTitle = "Twitter Site account";
$Languages = "Languages";
$NoticeTitle = "Title of Notice";
$NoticeText = "Text of Notice";
@ -1529,6 +1534,8 @@ $Exercises = "Tests";
$AllowPersonalAgendaTitle = "Personal Agenda";
$AllowPersonalAgendaComment = "Can the learner add personal events to the Agenda?";
$CurrentValue = "current value";
$AlreadyRegisteredToSession = "Already registered to session";
$myCoursesDefaultView = "Default view";
$UserPassword = "Password";
$SubscriptionAllowed = "Registr. allowed";
$UnsubscriptionAllowed = "Unreg. allowed";
@ -1599,6 +1606,7 @@ $ShowOnlineUsers = "Display number of users online all pages (visible for the pe
$ShowOnlineCourse = "Display number of users online in this course";
$ShowIconsInNavigationsMenuTitle = "Show icons in navigation menu?";
$SeeAllRightsAllRolesForSpecificLocation = "Focus on location";
$MetaTwitterCreatorTitle = "Twitter Creator account";
$ClassesSubscribed = "The selected classes were subscribed to the selected training";
$RoleId = "Role ID";
$RoleName = "Role name";
@ -1676,6 +1684,7 @@ $EnableToolIntroductionTitle = "Enable tool introduction";
$EnableToolIntroductionComment = "Enable introductions on each tool's homepage";
$BreadCrumbsCourseHomepageTitle = "Course homepage breadcrumb";
$BreadCrumbsCourseHomepageComment = "The breadcrumb is the horizontal links navigation system usually in the top left of your page. This option selects what you want to appear in the breadcrumb on courses' homepages";
$MetaTwitterSiteComment = "The Twitter site is a Twitter account (e.g. @chamilo_news) that is related to your site. It is usually a more temporary account than the Twitter creator account, or represents an entity (instead of a person). This field is required if you want the Twitter card meta fields to show.";
$LoginPageMainArea = "Login page main area";
$LoginPageMenu = "Login page menu";
$CampusHomepageMainArea = "Portal homepage main area";
@ -1954,6 +1963,10 @@ $IsNotWritable = "is not writeable";
$FieldMovedDown = "The field is successfully moved down";
$CannotMoveField = "Cannot move the field.";
$FieldMovedUp = "The field is successfully moved up.";
$MetaTitleTitle = "OpenGraph meta title";
$MetaDescriptionComment = "This will show an OpenGraph Description meta (og:description) in your site's headers";
$MetaDescriptionTitle = "Meta description";
$MetaTitleComment = "This will show an OpenGraph Title meta (og:title) in your site's headers";
$FieldDeleted = "The field has been deleted";
$CannotDeleteField = "Cannot delete the field";
$AddUsersByCoachTitle = "Register users by Coach";
@ -5884,6 +5897,7 @@ $LPWasReset = "Learning path was reset for the learner";
$AnnouncementVisible = "Announcement visible";
$AnnouncementInvisible = "Announcement invisible";
$GlossaryDeleted = "Glossary deleted";
$CalendarYear = "Calendar year";
$SessionReadOnly = "Read only";
$SessionAccessible = "Accessible";
$SessionNotAccessible = "Not accessible";
@ -6528,7 +6542,7 @@ $ArchiveDirCleanup = "Archive directory cleanup";
$ArchiveDirCleanupDescr = "Chamilo keeps a copy of most of the temporary files it generates (for backups, exports, copies, etc) into its archive/ directory. After a while, this can add up to a very large amount of disk space being used for nothing. Click the button below to clean your archive directory up. This operation should be automated by a cron process, but if this is not possible, you can come to this page regularly to remove all temporary files from the directory.";
$ArchiveDirCleanupProceedButton = "Proceed with cleanup";
$ArchiveDirCleanupSucceeded = "The archive/ directory cleanup has been executed successfully.";
$ArchiveDirCleanupFailed = "For some reason, the archive/ directory could not be cleaned up. Please clean it up by manually connecting to the server and deleting the contents of the chamilo/archive/ directory, except the .htaccess file.";
$ArchiveDirCleanupFailed = "For some reason, the archive/ directory could not be cleaned up. Please clean it up by manually connecting to the server and delete all files and symbolic links under the chamilo/archive/ directory, except the .htaccess file. On Linux: # find archive/ \( -type f -or -type l \) -not -name .htaccess -exec echo rm -v \{} \;";
$EnableStartTime = "Enable start time";
$EnableEndTime = "Enable end time";
$LocalTimeUsingPortalTimezoneXIsY = "The local time in the portal timezone (%s) is %s";

@ -44,7 +44,6 @@ $Recommended = "(rekomendata)";
$ScormDB = "Scorm DB";
$AdminLastName = "Administranta nomo";
$AdminPhone = "Administratora telefonnumero";
$OK = "En ordo";
$AdminFirstName = "Administratora antaŭnomo";
$InstituteURL = "URL de la organizaĵo";
$UserDB = "Uzula datumbazo";
@ -56,7 +55,6 @@ $CheckDatabaseConnection = "Kontroli datumbankan konekton";
$PrintOverview = "Montri supervidon";
$Installing = "Instali";
$of = "de";
$Step = "Paŝo";
$MoreDetails = "Por pliaj detaloj";
$ServerRequirements = "Servilaj bezonoj";
$ServerRequirementsInfo = "Funkciaj bibliotekoj kaj funkciaroj provizendaj de la servilo por igi Chamilo-on plene uzebla";

@ -2,6 +2,9 @@
/*
for more information: see languages.txt in the lang folder.
*/
$MobilePhoneNumberWrong = "Fartelefonnummarið væntar tøl ella nýtir stavir";
$FieldTypeMobilePhoneNumber = "Fartelefonnummar";
$Username = "Brúkaranavn";
$Month = "Máni";
$Week = "Vika";
$MessageEmptyMessageOrSubject = "Evnis regla og boð mugu bæði vera nýtt";
@ -16,6 +19,8 @@ $Learnpaths = "Skeið";
$Scormtool = "Skeið";
$CreateCourse = "Stovna eitt skeið";
$EditDocument = "Broyt";
$MailMarkSelectedAsUnread = "Marka sum ólisin boð";
$MailMarkSelectedAsRead = "Marka sum lisin boð";
$Administrator = "Umsitari";
$AdminUsers = "Brúkarar";
$AdminCourses = "Skeið";
@ -88,6 +93,7 @@ $JulyLong = "Juli";
$OctoberLong = "Oktober";
$DecemberLong = "Desember";
$Agenda = "Kalendari";
$Average = "Miðal";
$Learnpath = "Skeið";
$Chat = "Prát";
$Tracking = "Frásagnir";
@ -156,7 +162,6 @@ $MailNotifyInvitation = "Send teldupost um inbjóðingar";
$MailNotifyMessage = "Send teldupost um persónlig boð";
$MailNotifyGroupMessage = "Send teldupost um boð í bólkum";
$ToolSearch = "Leita";
$Average = "Miðal";
$Me = "Eg";
$Vote = "Atkvøða";
$Votes = "Atkvøður";
@ -169,9 +174,4 @@ $CourseCatalog = "Yvirlit yvir skeið";
$MarkAll = "Vel alt";
$UnmarkAll = "Frável alt";
$DataTableSearch = "Leita";
$MailMarkSelectedAsRead = "Marka sum lisin boð";
$MailMarkSelectedAsUnread = "Marka sum ólisin boð";
$Username = "Brúkaranavn";
$FieldTypeMobilePhoneNumber = "Fartelefonnummar";
$MobilePhoneNumberWrong = "Fartelefonnummarið væntar tøl ella nýtir stavir";
?>

@ -46,7 +46,7 @@ $Recommended = "(recommandé)";
$ScormDB = "BdD Scorm";
$AdminLastName = "Nom de l'administrateur";
$AdminPhone = "Téléphone de l'administrateur";
$OK = "OK";
$UpgradeFromLMS19x = "Mette à jour depuis le LMS v1.9.*";
$AdminFirstName = "Prénom de l'administrateur";
$InstituteURL = "URL de l'organisme/l'entreprise";
$UserDB = "Base de données Utilisateur";
@ -61,7 +61,6 @@ $CheckDatabaseConnection = "Vérification de la connexion à la base de données
$PrintOverview = "Récapitulatif";
$Installing = "Installation";
$of = "sur";
$Step = "Étape";
$MoreDetails = "Pour plus d'info";
$ServerRequirements = "Pré-requis serveur";
$ServerRequirementsInfo = "Librairies et fonctionnalités que le serveur doit être en mesure de fournir pour utiliser Chamilo à son plein potentiel";
@ -95,8 +94,6 @@ $ReadWarningBelow = "lire l'avertissement ci-dessous";
$SecurityAdvice = "Conseil de sécurité";
$YouHaveMoreThanXCourses = "Vous avez plus de %d cours sur votre campus Chamilo ! %d cours seulement ont été mis à jour. Pour mettre les autres à jour, %s cliquez ici %s";
$ToProtectYourSiteMakeXAndYReadOnly = "Pour protéger votre site, mettez %s et %s (pas leur répertoires) en lecture seule (CHMOD 444).";
$Error = "Erreur";
$Back = "Retour";
$HasNotBeenFound = "n'a pas été trouvé";
$PleaseGoBackToStep1 = "Veuillez retourner à l'étape 1";
$HasNotBeenFoundInThatDir = "n'a pas été trouvé dans ce répertoire";

@ -1295,6 +1295,7 @@ $DeleteSelectedClasses = "Supprimer les classes sélectionnées";
$DeleteSelectedGroups = "Supprimer les groupes sélectionnés";
$Administrator = "Administrateur";
$ChangePicture = "Changer la photo";
$myCoursesSessionView = "Vue par session";
$AddUsers = "Ajouter des utilisateurs";
$AddGroups = "Ajouter des groupes";
$AddClasses = "Ajouter des classes";
@ -1358,6 +1359,7 @@ $NoCategories = "Il n'y a aucune catégorie ici";
$AllowCoursesInCategory = "Permettre l'ajout de cours dans cette catégorie ?";
$GoToForum = "Aller sur le forum";
$CategoryCode = "Code de la catégorie";
$MetaTwitterCreatorComment = "Le Twitter Creator est un compte Twitter (ex. @ywarnier) qui représente par exemple la personne qui a créé le site. Ce champ est optionnel.";
$EditNode = "Modifier cette catégorie";
$OpenNode = "Ouvrir cette catégorie";
$DeleteNode = "Supprimer cette catégorie";
@ -1368,6 +1370,7 @@ $TreeRecountedIn = "Arborescence recomptée en";
$RebuildTree = "Reconstruire l'arborescence";
$RefreshNbChildren = "Raffraichir le nombre de fils";
$ShowTree = "Voir l'arborescence";
$MetaImagePathTitle = "Chemin d'image méta";
$LogDeleteCat = "Catégorie supprimée";
$RecountChildren = "Recompter les fils";
$UpInSameLevel = "Monter au même niveau";
@ -1424,6 +1427,7 @@ $CourseCreationSucceeded = "Le cours a été créé avec succès.";
$OnTheHardDisk = "sur le disque dur";
$IsVirtualCourse = "est un cours virtuel";
$AnnouncementUpdated = "L'annonce a été mise à jour";
$MetaImagePathComment = "Ce chemin vers une image au sein de votre répertoire Chamilo (ex: home/image.png) permet l'affichage d'une image qui accompagne les Twitter Cards ou les encarts OpenGraph qui représentent votre plateforme sur d'autres sites où elle est référencée. Twitter recommande l'utilisation d'images de 120x120 pixels, qui sont parfois recoupées vers du 120x90.";
$PermissionsForNewFiles = "Permissions des nouveaux fichiers";
$PermissionsForNewFilesComment = "La possibilité de définir les permissions allouées aux nouveaux fichiers vous permet d'augmenter la sécurité contre les attaques de pirates envoyant des contenus dangereux sur votre serveur. La valeur par défaut (0550) devrait être suffisante pour garantir un bon niveau de protection. Le format donné utilise la terminologie UNIX de Propriétaire-Groupe-Autres et de leurs permissions en Lecture-Écriture-Exécution.Attention, si vous utilisez Oogie, veillez à ce que l'utilisateur qui lance OpenOffice ait les droits en écriture sur les dossiers du cours.";
$Guest = "Invité";
@ -1501,6 +1505,7 @@ $EditNews = "Éditer les nouvelles";
$EditCategories = "Éditer les catégories";
$EditHomePage = "Éditer la page d'accueil";
$AllowUserHeadingsComment = "Est-ce qu'un administrateur peut définir des en-têtes pour obtenir des informations supplémentaires relatives aux utilisateurs?";
$MetaTwitterSiteTitle = "Compte Twitter Site";
$Languages = "Langue";
$NoticeTitle = "Titre de l'avis";
$NoticeText = "Texte de l'avis";
@ -1522,6 +1527,8 @@ $Exercises = "Exercices";
$AllowPersonalAgendaTitle = "Agenda perso";
$AllowPersonalAgendaComment = "L'utilisateur peut-il ajouter des éléments d'agenda personnels sur la page 'Mon agenda'?";
$CurrentValue = "Valeur actuelle";
$AlreadyRegisteredToSession = "Vous êtes déjà inscrit à la session";
$myCoursesDefaultView = "Vue par défaut";
$UserPassword = "Mot de passe";
$SubscriptionAllowed = "Inscription autorisée";
$UnsubscriptionAllowed = "Désinscription autorisée";
@ -1592,6 +1599,7 @@ $ShowOnlineUsers = "Montrez le nombre d'utilisateurs en ligne toutes les pages (
$ShowOnlineCourse = "Afficher le nombre d'utilisateurs connectés à ce cours";
$ShowIconsInNavigationsMenuTitle = "Afficher les images dans le menu de navigation";
$SeeAllRightsAllRolesForSpecificLocation = "Endroit :";
$MetaTwitterCreatorTitle = "Compte Twitter Creator";
$ClassesSubscribed = "Les classes choisies ont été souscrites aux cours choisis";
$RoleId = "Rôle ID";
$RoleName = "Nom du rôle";
@ -1669,6 +1677,7 @@ $EnableToolIntroductionTitle = "Activer les introductions d'outils";
$EnableToolIntroductionComment = "Activer les introductions sur la page d'accueil de chaque outil";
$BreadCrumbsCourseHomepageTitle = "Breadcrumb de la page d'accueil de cours";
$BreadCrumbsCourseHomepageComment = "Le breadcrumb est la navigation horizontale par liens qui s'affiche généralement en haut à gauche de la page. Cette option vous permet de choisir ce que ce lien affichera.";
$MetaTwitterSiteComment = "Le Twitter Site est un compte Twitter (ex: @chamilo_news) qui est lié à votre site. Il s'agit généralement d'un compte plus temporaire que celui de Twitter Creator, ou il représente une organisation (plutôt qu'une personne). Ce champ est nécessaire pour activer le fonctionnement des champs méta des Twitter Cards.";
$LoginPageMainArea = "Zone principale page login";
$LoginPageMenu = "Menu page de login";
$CampusHomepageMainArea = "Zone principale page portail";
@ -1947,6 +1956,10 @@ $IsNotWritable = "n'est pas inscriptible";
$FieldMovedDown = "Le champ a bien été déplacé vers le bas";
$CannotMoveField = "Impossible de déplacer le champ.";
$FieldMovedUp = "Le champ a bien été déplacé vers le haut.";
$MetaTitleTitle = "Titre méta OpenGraph";
$MetaDescriptionComment = "Ce champ fera apparaître un tag de description méta d'OpenGraph (og:description) dans l'en-tête du site.";
$MetaDescriptionTitle = "Description méta";
$MetaTitleComment = "Ce champ montrera un tag meta de titre pour OpenGraph (og:title) dans les en-têtes du site.";
$FieldDeleted = "Le champ a été supprimé";
$CannotDeleteField = "Impossible de supprimer le champ";
$AddUsersByCoachTitle = "Permettre l'enregistrement d'utilisateurs par les coaches";
@ -5869,6 +5882,7 @@ $webserver = "serveur web";
$mysql = "MySQL";
$NotInserted = "Non inséré";
$Multipleresponse = "Réponse multiple";
$EnableMathJaxComment = "Activer l'éditeur mathématique MathJax";
$YouCanNowLoginAtXUsingTheLoginAndThePasswordYouHaveProvided = "Vous pouvez vous connecter sur %s en utilisant l'identifiant et le mot de passe qui vous ont été fournis.";
$HaveFun = "amusez-vous,";
$AreYouSureToEditTheUserStatus = "Voulez-vous vraiment modifier le statut de l'utilisateur ?";
@ -5878,6 +5892,7 @@ $LPWasReset = "Le parcours d'apprentissage a été réinitialisé pour l'étudia
$AnnouncementVisible = "Annonce visible";
$AnnouncementInvisible = "Annonce invisible";
$GlossaryDeleted = "Glossaire supprimé";
$CalendarYear = "Année calendrier";
$SessionReadOnly = "Lecture seule";
$SessionAccessible = "Accessible";
$SessionNotAccessible = "Non accessible";
@ -6110,6 +6125,7 @@ $MultipleAnswerCombinationTrueFalse = "C. exacte vrai/faux/ne-sais-pas";
$DontKnow = "Ne sais pas";
$ExamNotAvailableAtThisTime = "Examen non disponible pour l'instant";
$LoginOrEmailAddress = "Nom d'utilisateur ou adresse e-mail";
$EnableMathJaxTitle = "Activer MathJax";
$Activate = "Activer";
$Deactivate = "Désactiver";
$ConfigLearnpath = "Configuration des parcours";
@ -6515,7 +6531,7 @@ $ArchiveDirCleanup = "Vidange du répertoire archive";
$ArchiveDirCleanupDescr = "Chamilo garde une copie de la plupart des fichiers temporaires qu'il génère (pour les exports, copies et backups divers) dans son répertoire archive/. Après un certain temps, ces fichiers peuvent s'accumuler et représenter un usage de l'espace disque assez important et sans intérêt particulier. Cliquez sur le bouton ci-dessous pour vider ce répertoire immédiatement. Cette opération devrait en fait être exécutée automatiquement depuis un processus cron, mais si cela représente une difficulté importante dans votre contexte, vous pouvez visiter cette page de temps en temps pour éliminer tous les fichiers temporaires du répertoire.";
$ArchiveDirCleanupProceedButton = "Vidanger";
$ArchiveDirCleanupSucceeded = "Le répertoire archive/ a été vidangé.";
$ArchiveDirCleanupFailed = "Le répertoire archive/ n'a pas pu être vidé entièrement. Veuillez le vider manuellement en vous connectant au serveur et en supprimant tou les fichiers dans le répertoire chamilo/archive/, à l'exception du fichier caché .htaccess.";
$ArchiveDirCleanupFailed = "Le répertoire archive/ n'a pas pu être vidé entièrement. Veuillez le vider manuellement en vous connectant au serveur et en supprimant et liens symboliques du répertoire chamilo/archive, excepté le fichier .htaccess. Sous Linux: # find archive/ \( -type f -or -type l \) -not -name .htaccess -exec echo rm -v \{} \;";
$EnableStartTime = "Activer date de début";
$EnableEndTime = "Utiliser date de fin";
$LocalTimeUsingPortalTimezoneXIsY = "L'heure locale selon la zone horaire du portail (%s) est %s";

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

Loading…
Cancel
Save