Merge branch '1.11.x' of github.com:chamilo/chamilo-lms into 1.11.x

pull/4927/head
Yannick Warnier 2 years ago
commit 7e32973a2d
  1. 2
      app/Resources/public/css/base.css
  2. 26
      main/auth/justification.php
  3. 5
      main/inc/ajax/document.ajax.php
  4. 2
      main/wiki/wiki.inc.php
  5. 2
      plugin/justification/lang/english.php
  6. 2
      plugin/justification/lang/french.php
  7. 2
      plugin/justification/lang/spanish.php

@ -9611,7 +9611,7 @@ ul.dropdown-menu.inner > li > a {
.embed-responsive-9by16 {
padding-bottom: 177.77%;
}
.embed-responsive-4by3 {
.embed-responsive-3by4 {
padding-bottom: 133.33%;
}

@ -70,11 +70,37 @@ if ($formValidator->validate() && isset($_FILES)) {
}
$userJustifications = $plugin->getUserJustificationList(api_get_user_id());
if (!empty($userJustifications)) {
if (count($fields) <= count($userJustifications) && $_REQUEST['a'] != 'notification_sent') {
$formValidator->addHtml('<div class="alert alert-warning"><a href="'.api_get_self().'?a=notify_justification" >'.$plugin->get_lang('SendNotificationToAllAdmins').'</a></div>');
}
}
$userJustificationList = '';
$action = isset($_REQUEST['a']) ? $_REQUEST['a'] : '';
$justificationContent = '';
switch ($action) {
case 'notify_justification':
// notification to all admins action
$userInfo = api_get_user_info();
// get_all_administrators
$adminList = UserManager::get_all_administrators();
$link = api_get_path(WEB_PATH) . 'plugin/justification/justification_by_user.php?user_id=' . api_get_user_id();
$emailToAdminSubject = $plugin->get_lang('JustificationsCompleted').': '.$userInfo['complete_name'];
$emailToAdminContent = $emailToAdminSubject . ' <br /><br />' . '<a href="'. $link . '">' . $link . '</a>';
foreach ($adminList as $adminId => $data) {
MessageManager::send_message_simple(
$adminId,
$emailToAdminSubject,
$emailToAdminContent,
api_get_user_id());
}
Display::addFlash(Display::return_message(get_lang('MessageSent')));
header('Location: '.api_get_self().'?a=notification_sent');
exit;
break;
case 'edit_justification':
$justificationId = isset($_REQUEST['justification_id']) ? (int) $_REQUEST['justification_id'] : '';
$userJustification = $plugin->getUserJustification($justificationId);

@ -156,7 +156,10 @@ switch ($action) {
foreach ($fileList as $file) {
if (isset($_REQUEST['chunkAction']) && 'done' === $_REQUEST['chunkAction']) {
// to rename and move the finished file
$chunkedFile = api_get_path(SYS_ARCHIVE_PATH).$file['name'];
$tmpFile = disable_dangerous_file(
api_replace_dangerous_char($file['name'])
);
$chunkedFile = api_get_path(SYS_ARCHIVE_PATH).$tmpFile;
$file['tmp_name'] = $chunkedFile;
$file['size'] = filesize($chunkedFile);
$file['copy_file'] = true;

@ -6133,7 +6133,7 @@ class Wiki
//show editor if edit is allowed <<<<<
if ((!empty($row['id']) && $row['editlock'] != 1)
|| api_is_allowed_to_edit(false, true) != false
&& api_is_platform_admin() != false
|| api_is_platform_admin() != false
) {
// Check tasks
if (!empty($row['startdate_assig']) && time() <

@ -19,3 +19,5 @@ $strings['SubscribeToASession'] = "Subscribe to a session";
$strings['JustificationName'] = "Justification name";
$strings['JustificationDate'] = "Justification date";
$strings['DocumentListForUserX'] = "Document list of user %s";
$strings['JustificationsCompleted'] = "Justifications completed";
$strings['SendNotificationToAllAdmins'] = "Send a notification to the administrator";

@ -19,3 +19,5 @@ $strings['JustificationDate'] = "Date du justificatif";
$strings['SubscribeToASession'] = "S'inscrire à une session d'examen";
$strings['DocumentListForUserX'] = "Liste des documents pour %s";
$strings['JustificationsCompleted'] = "Dossier complété";
$strings['SendNotificationToAllAdmins'] = "Envoyer une notification à l'administrateur";

@ -19,3 +19,5 @@ $strings['JustificationDate'] = "Fecha del justificativo";
$strings['SubscribeToASession'] = "Inscribirse a una sesion de examen";
$strings['DocumentListForUserX'] = "Lista de documentos para %s";
$strings['JustificationsCompleted'] = "justificativos completados";
$strings['SendNotificationToAllAdmins'] = "Enviar una notificación al administrador";

Loading…
Cancel
Save