Update get_lang calls using full string.

pull/3016/head
Julio Montoya 6 years ago
parent a87d6e7dce
commit fecbeec39e
  1. 20
      main/inc/ajax/admin.ajax.php
  2. 6
      main/inc/ajax/chat.ajax.php
  3. 2
      main/inc/ajax/course.ajax.php
  4. 22
      main/inc/ajax/course_home.ajax.php
  5. 2
      main/inc/ajax/document.ajax.php
  6. 4
      main/inc/ajax/dropbox.ajax.php
  7. 4
      main/inc/ajax/exercise.ajax.php
  8. 2
      main/inc/ajax/extra_field.ajax.php
  9. 4
      main/inc/ajax/gradebook.ajax.php
  10. 2
      main/inc/ajax/link.ajax.php
  11. 10
      main/inc/ajax/lp.ajax.php
  12. 10
      main/inc/ajax/message.ajax.php
  13. 42
      main/inc/ajax/model.ajax.php
  14. 6
      main/inc/ajax/myspace.ajax.php
  15. 4
      main/inc/ajax/record_audio_rtc.ajax.php
  16. 2
      main/inc/ajax/record_audio_wami.ajax.php
  17. 10
      main/inc/ajax/sequence.ajax.php
  18. 8
      main/inc/ajax/session.ajax.php
  19. 14
      main/inc/ajax/social.ajax.php
  20. 10
      main/inc/ajax/statistics.ajax.php
  21. 4
      main/inc/ajax/thematic.ajax.php
  22. 18
      main/inc/ajax/user_manager.ajax.php
  23. 4
      main/inc/ajax/work.ajax.php
  24. 24
      main/inc/lib/AnnouncementManager.php
  25. 22
      main/inc/lib/Compilatio.php
  26. 4
      main/inc/lib/CourseChatUtils.php
  27. 10
      main/inc/lib/CoursesAndSessionsCatalog.class.php
  28. 10
      main/inc/lib/MailTemplateManager.php
  29. 16
      main/inc/lib/MoodleImport.php
  30. 28
      main/inc/lib/ScheduledAnnouncement.php
  31. 4
      main/inc/lib/TeacherTimeReport.php
  32. 36
      main/inc/lib/TicketManager.php
  33. 2
      main/inc/lib/VideoChat.php
  34. 80
      main/inc/lib/agenda.lib.php
  35. 12
      main/inc/lib/attendance.lib.php
  36. 24
      main/inc/lib/banner.lib.php
  37. 10
      main/inc/lib/career.lib.php
  38. 10
      main/inc/lib/certificate.lib.php
  39. 20
      main/inc/lib/course_category.lib.php
  40. 38
      main/inc/lib/course_description.lib.php
  41. 10
      main/inc/lib/course_home.lib.php
  42. 2
      main/inc/lib/database.lib.php
  43. 106
      main/inc/lib/diagnoser.lib.php
  44. 18
      main/inc/lib/extra_field_option.lib.php
  45. 52
      main/inc/lib/fileUpload.lib.php
  46. 8
      main/inc/lib/formvalidator/Element/DatePicker.php
  47. 14
      main/inc/lib/formvalidator/Element/DateRangePicker.php
  48. 10
      main/inc/lib/formvalidator/Element/DateTimePicker.php
  49. 8
      main/inc/lib/formvalidator/Element/DateTimeRangePicker.php
  50. 34
      main/inc/lib/glossary.lib.php
  51. 28
      main/inc/lib/grade_model.lib.php
  52. 4
      main/inc/lib/gradebook.lib.php
  53. 20
      main/inc/lib/legal.lib.php
  54. 101
      main/inc/lib/link.lib.php
  55. 80
      main/inc/lib/message.lib.php
  56. 14
      main/inc/lib/notebook.lib.php
  57. 2
      main/inc/lib/pdf.lib.php
  58. 2
      main/inc/lib/plugin.lib.php
  59. 16
      main/inc/lib/promotion.lib.php
  60. 20
      main/inc/lib/skill.lib.php
  61. 20
      main/inc/lib/sortable_table.class.php
  62. 62
      main/inc/lib/statistics.lib.php
  63. 30
      main/inc/lib/system_announcements.lib.php
  64. 48
      main/inc/lib/template.lib.php
  65. 34
      main/inc/lib/thematic.lib.php
  66. 38
      main/inc/lib/timeline.lib.php
  67. 194
      main/inc/lib/tracking.lib.php
  68. 82
      main/inc/lib/usergroup.lib.php
  69. 55
      main/inc/lib/usermanager.lib.php
  70. 95
      main/inc/lib/userportal.lib.php

@ -105,10 +105,10 @@ function version_check()
// The site has not been registered yet.
$return = '';
if ($row['selected_value'] == 'false') {
$return .= get_lang('VersionCheckExplanation');
$return .= get_lang('In order to enable the automatic version checking you have to register your portal on chamilo.org. The information obtained by clicking this button is only for internal use and only aggregated data will be publicly available (total number of portals, total number of chamilo course, total number of chamilo users, ...) (see <a href="http://www.chamilo.org/stats/">http://www.chamilo.org/stats/</a>. When registering you will also appear on the worldwide list (<a href="http://www.chamilo.org/community.php">http://www.chamilo.org/community.php</a>. If you do not want to appear in this list you have to check the checkbox below. The registration is as easy as it can be: you only have to click this button: <br />');
$return .= '<form class="version-checking" action="'.api_get_path(WEB_CODE_PATH).'admin/index.php" id="VersionCheck" name="VersionCheck" method="post">';
$return .= '<label class="checkbox"><input type="checkbox" name="donotlistcampus" value="1" id="checkbox" />'.get_lang('HideCampusFromPublicPlatformsList');
$return .= '</label><button type="submit" class="btn btn-primary btn-block" name="Register" value="'.get_lang('EnableVersionCheck').'" id="register" >'.get_lang('EnableVersionCheck').'</button>';
$return .= '<label class="checkbox"><input type="checkbox" name="donotlistcampus" value="1" id="checkbox" />'.get_lang('Hide campus from public platforms list');
$return .= '</label><button type="submit" class="btn btn-primary btn-block" name="Register" value="'.get_lang('Enable version check').'" id="register" >'.get_lang('Enable version check').'</button>';
$return .= '</form>';
check_system_version();
} else {
@ -132,7 +132,7 @@ function check_system_version()
{
// Check if curl is available.
if (!in_array('curl', get_loaded_extensions())) {
return '<span style="color:red">'.get_lang('ImpossibleToContactVersionServerPleaseTryAgain').'</span>';
return '<span style="color:red">'.get_lang('Impossible to contact the version server right now. Please try again later.').'</span>';
}
$url = 'https://version.chamilo.org';
@ -223,17 +223,17 @@ function check_system_version()
}
if (version_compare($system_version, $version, '<')) {
$output = '<span style="color:red">'.get_lang('YourVersionNotUpToDate').'<br />
'.get_lang('LatestVersionIs').' <b>Chamilo '.$version.'</b>. <br />
'.get_lang('YourVersionIs').' <b>Chamilo '.$system_version.'</b>. <br />'.str_replace('http://www.chamilo.org', '<a href="http://www.chamilo.org">http://www.chamilo.org</a>', get_lang('PleaseVisitOurWebsite')).'</span>';
$output = '<span style="color:red">'.get_lang('Your version is not up-to-date').'<br />
'.get_lang('The latest version is').' <b>Chamilo '.$version.'</b>. <br />
'.get_lang('Your version is').' <b>Chamilo '.$system_version.'</b>. <br />'.str_replace('http://www.chamilo.org', '<a href="http://www.chamilo.org">http://www.chamilo.org</a>', get_lang('Please visit our website: http://www.chamilo.org')).'</span>';
} else {
$output = '<span style="color:green">'.get_lang('VersionUpToDate').': Chamilo '.$version.'</span>';
$output = '<span style="color:green">'.get_lang('Your version is up-to-date').': Chamilo '.$version.'</span>';
}
return $output;
}
return '<span style="color:red">'.get_lang('ImpossibleToContactVersionServerPleaseTryAgain').'</span>';
return '<span style="color:red">'.get_lang('Impossible to contact the version server right now. Please try again later.').'</span>';
}
/**
@ -260,7 +260,7 @@ function getLatestNews()
);
if ($response->getStatusCode() !== 200) {
throw new Exception(get_lang('DenyEntry'));
throw new Exception(get_lang('Deny access'));
}
return $response->getBody()->getContents();

@ -74,7 +74,7 @@ switch ($action) {
if ($createdRoom === false) {
echo Display::return_message(
get_lang('ChatRoomNotCreated'),
get_lang('Chatroom could not be created'),
'error'
);
break;
@ -85,7 +85,7 @@ switch ($action) {
$videoChatUrl = api_get_path(WEB_LIBRARY_JS_PATH)."chat/video.php?room={$room['id']}";
$videoChatLink = Display::url(
Display::returnFontAwesomeIcon('video-camera').get_lang('StartVideoChat'),
Display::returnFontAwesomeIcon('video-camera').get_lang('Start video call'),
$videoChatUrl
);
@ -126,7 +126,7 @@ switch ($action) {
$chat->send(
$currentUserId,
$toUserId,
get_lang('TheXUserBrowserDoesNotSupportWebRTC')
get_lang('The browser of %s does not support native video transmission. Sorry.')
);
break;
case 'sendchat':

@ -51,7 +51,7 @@ switch ($action) {
echo $courseInfo['title'].'<br />';
}
} else {
echo get_lang('UserHasNoCourse');
echo get_lang('This user is not subscribed to any course');
}
}
break;

@ -140,12 +140,12 @@ switch ($action) {
// Get the name of the database course.
$course_info = api_get_course_info($_GET['code']);
$content = get_lang('NoDescription');
$content = get_lang('No description');
if (!empty($course_info)) {
if (api_get_setting('course_catalog_hide_private') === 'true' &&
$course_info['visibility'] == COURSE_VISIBILITY_REGISTERED
) {
echo get_lang('PrivateAccess');
echo get_lang('Private access');
break;
}
$table = Database::get_course_table(TABLE_COURSE_DESCRIPTION);
@ -231,16 +231,16 @@ switch ($action) {
if (empty($lp_item['modified_on'])) {
$lp_date = api_get_local_time($lp_item['created_on']);
$image = 'new.gif';
$label = get_lang('LearnpathAdded');
$label = get_lang('Course added');
} else {
$lp_date = api_get_local_time($lp_item['modified_on']);
$image = 'moderator_star.png';
$label = get_lang('LearnpathUpdated');
$label = get_lang('Learning path updated');
}
$icons = '';
if (strtotime($last_date) < strtotime($lp_date)) {
$icons = Display::return_icon($image, get_lang('TitleNotification').': '.$label.' - '.$lp_date);
$icons = Display::return_icon($image, get_lang('Since your latest visit').': '.$label.' - '.$lp_date);
}
if (!empty($lp_item['publicated_on'])) {
@ -369,15 +369,15 @@ switch ($action) {
if (empty($lp_item['modified_on'])) {
$lp_date = api_get_local_time($lp_item['created_on']);
$image = 'new.gif';
$label = get_lang('LearnpathAdded');
$label = get_lang('Course added');
} else {
$lp_date = api_get_local_time($lp_item['modified_on']);
$image = 'moderator_star.png';
$label = get_lang('LearnpathUpdated');
$label = get_lang('Learning path updated');
}
if (strtotime($last_date) < strtotime($lp_date)) {
$icons = Display::return_icon($image, get_lang('TitleNotification').': '.$label.' - '.$lp_date);
$icons = Display::return_icon($image, get_lang('Since your latest visit').': '.$label.' - '.$lp_date);
}
if (!empty($lp_item['publicated_on'])) {
@ -508,15 +508,15 @@ switch ($action) {
if (empty($lp_item['modified_on'])) {
$lp_date = api_get_local_time($lp_item['created_on']);
$image = 'new.gif';
$label = get_lang('LearnpathAdded');
$label = get_lang('Course added');
} else {
$lp_date = api_get_local_time($lp_item['modified_on']);
$image = 'moderator_star.png';
$label = get_lang('LearnpathUpdated');
$label = get_lang('Learning path updated');
}
$icons = '';
if (strtotime($last_date) < strtotime($lp_date)) {
$icons = Display::return_icon($image, get_lang('TitleNotification').': '.$label.' - '.$lp_date);
$icons = Display::return_icon($image, get_lang('Since your latest visit').': '.$label.' - '.$lp_date);
}
if (!empty($lp_item['publicated_on'])) {
$date = substr($lp_item['publicated_on'], 0, 10);

@ -130,7 +130,7 @@ switch ($action) {
$json['type'] = '';
$json['result'] = Display::return_icon(
'accept.png',
get_lang('Uploaded')
get_lang('Uploaded.')
);
} else {
$json['name'] = isset($file['name']) ? $file['name'] : get_lang('Unknown');

@ -18,7 +18,7 @@ switch ($action) {
$id = isset($_GET['id']) ? (int) $_GET['id'] : 0;
if (empty($recipients) && empty($id)) {
$resultList[] = ['error' => get_lang('YouMustSelectAtLeastOneDestinee')];
$resultList[] = ['error' => get_lang('You must select at least one destinee')];
echo json_encode(['files' => $resultList]);
exit;
}
@ -63,7 +63,7 @@ switch ($action) {
$json['type'] = api_htmlentities($file['type']);
$json['result'] = Display::return_icon(
'accept.png',
get_lang('Uploaded')
get_lang('Uploaded.')
);
} else {
$json['result'] = Display::return_icon(

@ -316,7 +316,7 @@ switch ($action) {
);
$counter++;
}
echo Display::return_message(get_lang('Saved'), 'confirmation');
echo Display::return_message(get_lang('Saved..'), 'confirmation');
}
break;
case 'update_question_order':
@ -346,7 +346,7 @@ switch ($action) {
;
$counter++;
}
echo Display::return_message(get_lang('Saved'), 'confirmation');
echo Display::return_message(get_lang('Saved..'), 'confirmation');
}
break;
case 'add_question_to_reminder':

@ -155,7 +155,7 @@ switch ($action) {
}
});
alert("'.get_lang('Saved').'");
alert("'.get_lang('Saved.').'");
location.reload();

@ -32,8 +32,8 @@ switch ($action) {
'get',
api_get_path(WEB_CODE_PATH).'gradebook/index.php?'.api_get_cidreq().'&action=generate_custom_report'
);
$form->addText('custom_course_id', get_lang('CourseId'));
$form->addDateRangePicker('range', get_lang('DateRange'));
$form->addText('custom_course_id', get_lang('Course ID'));
$form->addDateRangePicker('range', get_lang('Date range'));
$form->addHidden('action', 'generate_custom_report');
$form->addButtonSearch();
$form->display();

@ -19,7 +19,7 @@ switch ($action) {
if ($result) {
echo Display::return_icon(
'check-circle.png',
get_lang('Ok'),
get_lang('Validate'),
null,
ICON_SIZE_TINY
);

@ -131,7 +131,7 @@ switch ($action) {
]
);
}
echo Display::return_message(get_lang('Saved'), 'confirm');
echo Display::return_message(get_lang('Saved.'), 'confirm');
}
break;
case 'record_audio':
@ -226,7 +226,7 @@ switch ($action) {
if (empty($forum)) {
require_once '../../forum/forumfunction.inc.php';
$forumCategory = getForumCategoryByTitle(
get_lang('LearningPaths'),
get_lang('Learning paths'),
$courseId,
$sessionId
);
@ -235,7 +235,7 @@ switch ($action) {
$forumCategoryId = store_forumcategory(
[
'lp_id' => 0,
'forum_category_title' => get_lang('LearningPaths'),
'forum_category_title' => get_lang('Learning paths'),
'forum_category_comment' => null,
],
[],
@ -284,7 +284,7 @@ switch ($action) {
if ($lp) {
$score = $lp->getCalculateScore($sessionId);
$jsonGamification['stars'] = $lp->getCalculateStars($sessionId);
$jsonGamification['score'] = sprintf(get_lang('XPoints'), $score);
$jsonGamification['score'] = sprintf(get_lang('%s points'), $score);
}
echo json_encode($jsonGamification);
@ -328,7 +328,7 @@ switch ($action) {
if (!empty($lp->error)) {
echo $lp->error;
} else {
echo get_lang('LearnpathPrereqNotCompleted');
echo get_lang('This learning object cannot display because the course prerequisites are not completed. This happens when a course imposes that you follow it step by step or get a minimum score in tests before you reach the next steps.');
}
}
$lp->error = '';

@ -100,7 +100,7 @@ switch ($action) {
$messageContent = isset($_REQUEST['content']) ? trim($_REQUEST['content']) : null;
if (empty($subject) || empty($messageContent)) {
echo Display::return_message(get_lang('ErrorSendingMessage'), 'error');
echo Display::return_message(get_lang('There was an error while trying to send the message.'), 'error');
exit;
}
@ -112,12 +112,12 @@ switch ($action) {
$courseInfo = api_get_course_info_by_id($courseId);
if (!empty($courseInfo)) {
if (empty($sessionId)) {
$courseNotification = sprintf(get_lang('ThisEmailWasSentViaCourseX'), $courseInfo['title']);
$courseNotification = sprintf(get_lang('This e-mail was sent via course %s'), $courseInfo['title']);
} else {
$sessionInfo = api_get_session_info($sessionId);
if (!empty($sessionInfo)) {
$courseNotification = sprintf(
get_lang('ThisEmailWasSentViaCourseXInSessionX'),
get_lang('This e-mail was sent via course %sInSessionX'),
$courseInfo['title'],
$sessionInfo['name']
);
@ -129,9 +129,9 @@ switch ($action) {
$result = MessageManager::send_message($_REQUEST['user_id'], $subject, $messageContent);
if ($result) {
echo Display::return_message(get_lang('MessageHasBeenSent'), 'confirmation');
echo Display::return_message(get_lang('Your message has been sent.'), 'confirmation');
} else {
echo Display::return_message(get_lang('ErrorSendingMessage'), 'confirmation');
echo Display::return_message(get_lang('There was an error while trying to send the message.'), 'confirmation');
}
break;
case 'send_invitation':

@ -979,11 +979,11 @@ switch ($action) {
$column_names = [
get_lang('Company'),
get_lang('TrainingHoursAccumulated'),
get_lang('CountOfSubscriptions'),
get_lang('CountOfUsers'),
get_lang('AverageHoursPerStudent'),
get_lang('CountCertificates'),
get_lang('Hours of accumulated training'),
get_lang('Subscriptions count'),
get_lang('Users count'),
get_lang('Avg hours/student'),
get_lang('Certificates count'),
];
$extra_fields = UserManager::get_extra_fields(
@ -1053,11 +1053,11 @@ switch ($action) {
$column_names = [
get_lang('Course'),
get_lang('User'),
get_lang('Email'),
get_lang('ManHours'),
get_lang('CertificateGenerated'),
get_lang('e-mail'),
get_lang('Man hours'),
get_lang('Generated certificate'),
get_lang('Approved'),
get_lang('CourseAdvance'),
get_lang('Course progress'),
];
$extra_fields = UserManager::get_extra_fields(
@ -1431,11 +1431,11 @@ switch ($action) {
$columns[] = 'only_score';
$columns[] = 'total';
$overwriteColumnHeaderExport['session_access_start_date'] = get_lang('SessionStartDate');
$overwriteColumnHeaderExport['exe_date'] = get_lang('StartDate');
$overwriteColumnHeaderExport['session_access_start_date'] = get_lang('Access start date');
$overwriteColumnHeaderExport['exe_date'] = get_lang('Start Date');
$overwriteColumnHeaderExport['score_percentage'] = get_lang('Score').' - '.get_lang('Percentage');
$overwriteColumnHeaderExport['only_score'] = get_lang('Score').' - '.get_lang('ScoreNote');
$overwriteColumnHeaderExport['total'] = get_lang('Score').' - '.get_lang('ScoreTest');
$overwriteColumnHeaderExport['only_score'] = get_lang('Score').' - '.get_lang('Note');
$overwriteColumnHeaderExport['total'] = get_lang('Score').' - '.get_lang('Test');
}
$categoryList = TestCategory::getListOfCategoriesIDForTest($exerciseId, $courseId);
@ -1450,9 +1450,9 @@ switch ($action) {
$overwriteColumnHeaderExport[$label.'_score_percentage'] = $categoryInfo['title'].
' - '.get_lang('Percentage');
$overwriteColumnHeaderExport[$label.'_only_score'] = $categoryInfo['title'].
' - '.get_lang('ScoreNote');
' - '.get_lang('Note');
$overwriteColumnHeaderExport[$label.'_total'] = $categoryInfo['title'].
' - '.get_lang('ScoreTest');
' - '.get_lang('Test');
} else {
$columns[] = $label;
}
@ -1605,7 +1605,7 @@ switch ($action) {
$detailButtons = [];
$detailButtons[] = Display::url(
Display::return_icon('works.png', get_lang('WorksReport')),
Display::return_icon('works.png', get_lang('Assignments report')),
api_get_path(WEB_CODE_PATH).'mySpace/works_in_session_report.php?session='.$session['id']
);
$detailButtons[] = Display::url(
@ -1893,7 +1893,7 @@ switch ($action) {
$item['name'] = '<font style="color:#AAA">'.$item['name'].'</font>';
}
$item['headline'] = Display::url($item['headline'], api_get_path(WEB_CODE_PATH).'timeline/view.php?id='.$item['id']);
$item['actions'] = Display::url(Display::return_icon('add.png', get_lang('AddItems')), api_get_path(WEB_CODE_PATH).'timeline/?action=add_item&parent_id='.$item['id']);
$item['actions'] = Display::url(Display::return_icon('add.png', get_lang('Add items')), api_get_path(WEB_CODE_PATH).'timeline/?action=add_item&parent_id='.$item['id']);
$item['actions'] .= Display::url(Display::return_icon('edit.png', get_lang('Edit')), api_get_path(WEB_CODE_PATH).'timeline/?action=edit&id='.$item['id']);
$item['actions'] .= Display::url(Display::return_icon('delete.png', get_lang('Delete')), api_get_path(WEB_CODE_PATH).'timeline/?action=delete&id='.$item['id']);
@ -1933,7 +1933,7 @@ switch ($action) {
if (!empty($item['certif_min_score']) && !empty($item['document_id'])) {
$item['certificates'] = Display::return_icon(
'accept.png',
get_lang('WithCertificate'),
get_lang('With Certificate'),
[],
ICON_SIZE_SMALL
);
@ -1941,7 +1941,7 @@ switch ($action) {
} else {
$item['certificates'] = Display::return_icon(
'warning.png',
get_lang('NoCertificate'),
get_lang('No certificate'),
[],
ICON_SIZE_SMALL
);
@ -2114,7 +2114,7 @@ switch ($action) {
break;
case $cntExer:
$columns[] = 'finalScore';
$column_names[] = get_lang('FinalScore');
$column_names[] = get_lang('Final score');
break;
default:
$title = '';
@ -2249,7 +2249,7 @@ switch ($action) {
if ($isAllow) {
if ($obj->allowTeachers() && $group['author_id'] == $currentUserId) {
$group['actions'] .= Display::url(
Display::return_icon('statistics.png', get_lang('Stats')),
Display::return_icon('statistics.png', get_lang('Statistics')),
$urlUserGroup.'&id='.$group['id']
).'&nbsp;';
}

@ -81,15 +81,15 @@ switch ($action) {
$db['graph_result'] = grapher($sql_result, $start_date, $end_date, $type);
} else {
$db['result'] = Display::return_message(
get_lang('NoDataAvailable'),
get_lang('No data available'),
'warning'
);
$db['graph_result'] = Display::return_message(
get_lang('NoDataAvailable'),
get_lang('No data available'),
'warning'
);
$db['stats'] = Display::return_message(
get_lang('NoDataAvailable'),
get_lang('No data available'),
'warning'
);
}

@ -24,7 +24,7 @@ if (!isset($_FILES['audio_blob'], $_REQUEST['audio_dir'])) {
header('Content-Type: application/json');
echo json_encode([
'error' => true,
'message' => Display::return_message(get_lang('UploadError'), 'error'),
'message' => Display::return_message(get_lang('Upload failed, please check maximum file size limits and folder rights.'), 'error'),
]);
Display::cleanFlashMessages();
@ -32,7 +32,7 @@ if (!isset($_FILES['audio_blob'], $_REQUEST['audio_dir'])) {
}
Display::addFlash(
Display::return_message(get_lang('UploadError'), 'error')
Display::return_message(get_lang('Upload failed, please check maximum file size limits and folder rights.'), 'error')
);
exit;
}

@ -126,7 +126,7 @@ switch ($type) {
$lp->set_modified_on();
$lpItem = new learnpathItem($lpItemId);
$lpItem->add_audio_from_documents($newDocId);
echo Display::return_message(get_lang('Updated'), 'info');
echo Display::return_message(get_lang('Update successful'), 'info');
}
}

@ -46,7 +46,7 @@ switch ($action) {
echo Display::img(
$graphImage,
get_lang('GraphDependencyTree'),
get_lang('Dependency tree'),
['class' => 'center-block'],
false
);
@ -57,7 +57,7 @@ switch ($action) {
.' because GraphViz command "dot" could not be executed '
.'- Make sure graphviz is installed.'
);
echo '<p class="text-center"><small>'.get_lang('MissingChartLibraryPleaseCheckLog')
echo '<p class="text-center"><small>'.get_lang('Missing chart library. Please check the error log for details.')
.'</small></p>';
}
}
@ -111,7 +111,7 @@ switch ($action) {
$id,
[
'class' => 'sequence-id',
'title' => get_lang('UseAsReference'),
'title' => get_lang('Use as reference'),
'type' => 'button',
]
);
@ -307,7 +307,7 @@ switch ($action) {
$vertexFromSession = Session::read('sr_vertex');
if ($vertexFromSession) {
Session::erase('sr_vertex');
echo Display::return_message(get_lang('Saved'), 'success');
echo Display::return_message(get_lang('Saved..'), 'success');
break;
}
@ -383,7 +383,7 @@ switch ($action) {
$em->persist($sequenceResource);
$em->flush();
echo Display::return_message(get_lang('Saved'), 'success');
echo Display::return_message(get_lang('Saved..'), 'success');
break;
}
break;

@ -20,7 +20,7 @@ switch ($action) {
echo $session_item['session_name'].'<br />';
}
} else {
echo get_lang('NoSessionsForThisUser');
echo get_lang('This user isn\'t subscribed in a session');
}
unset($list_sessions);
}
@ -169,7 +169,7 @@ switch ($action) {
$sessionInfo = api_get_session_info($_GET['session']);
echo '<h2>'.$sessionInfo['name'].'</h2>';
echo '<div class="home-course-intro"><div class="page-course"><div class="page-course-intro">';
echo $sessionInfo['show_description'] == 1 ? $sessionInfo['description'] : get_lang('None');
echo $sessionInfo['show_description'] == 1 ? $sessionInfo['description'] : get_lang('none');
echo '</div></div></div>';
}
break;
@ -282,7 +282,7 @@ switch ($action) {
0,
$baseWorkDir,
'/basic-course-documents',
get_lang('BasicCourseDocuments'),
get_lang('Basic course documents'),
1
);
@ -358,7 +358,7 @@ switch ($action) {
$table->set_header(1, get_lang('Name'), false);
$table->set_header(2, get_lang('Size'), false, [], ['class' => 'text-right', 'style' => 'width: 80px;']);
$table->set_header(3, get_lang('Date'), false, [], ['class' => 'text-center', 'style' => 'width: 200px;']);
$table->set_header(4, get_lang('Actions'), false, [], ['class' => 'text-center']);
$table->set_header(4, get_lang('Detail'), false, [], ['class' => 'text-center']);
$table->display();
}

@ -30,7 +30,7 @@ switch ($action) {
UserManager::relate_users($my_current_friend, $current_user_id, $relation_type);
SocialManager::invitation_accepted($my_current_friend, $current_user_id);
Display::addFlash(
Display::return_message(get_lang('AddedContactToList'), 'success')
Display::return_message(get_lang('Added contact to list'), 'success')
);
header('Location: '.api_get_path(WEB_CODE_PATH).'social/invitations.php');
@ -49,7 +49,7 @@ switch ($action) {
if (isset($_GET['denied_friend_id'])) {
SocialManager::invitation_denied($_GET['denied_friend_id'], $current_user_id);
Display::addFlash(
Display::return_message(get_lang('InvitationDenied'), 'success')
Display::return_message(get_lang('Invitation denied'), 'success')
);
header('Location: '.api_get_path(WEB_CODE_PATH).'social/invitations.php');
@ -172,20 +172,20 @@ switch ($action) {
$result = Blog::getBlogCommentsFromUser($course_id, $user_id, $course_code);
if (!empty($result)) {
echo '<div style="background:#FAF9F6; padding-left:10px;">';
api_display_tool_title(api_xml_http_response_encode(get_lang('BlogComments')));
api_display_tool_title(api_xml_http_response_encode(get_lang('Blog comments')));
echo api_xml_http_response_encode($result);
echo '</div>';
echo '<br />';
$all_result_data++;
}
if ($all_result_data == 0) {
echo api_xml_http_response_encode(get_lang('NoDataAvailable'));
echo api_xml_http_response_encode(get_lang('No data available'));
}
} else {
echo '<div class="clear"></div><br />';
api_display_tool_title(api_xml_http_response_encode(get_lang('Details')));
echo '<div style="background:#FAF9F6; padding:0px;">';
echo api_xml_http_response_encode(get_lang('UserNonRegisteredAtTheCourse'));
echo api_xml_http_response_encode(get_lang('User not registered in course'));
echo '<div class="clear"></div><br />';
echo '</div>';
echo '<div class="clear"></div><br />';
@ -252,7 +252,7 @@ switch ($action) {
empty($messageInfo['group_id']);
if ($canDelete || api_is_platform_admin()) {
SocialManager::deleteMessage($messageId);
echo Display::return_message(get_lang('MessageDeleted'));
echo Display::return_message(get_lang('The message has been deleted'));
break;
}
}
@ -304,7 +304,7 @@ switch ($action) {
if (!empty($html)) {
$html .= Display::div(
Display::url(
get_lang('SeeMore'),
get_lang('See more'),
api_get_self().'?u='.$userId.'&a=list_wall_message&start='.
($start + SocialManager::DEFAULT_SCROLL_NEW_POST).'&length='.SocialManager::DEFAULT_SCROLL_NEW_POST,
[

@ -31,7 +31,7 @@ switch ($action) {
'URL',
get_lang('Session'),
get_lang('Course'),
get_lang('CountUsers'),
get_lang('Number of users'),
];
}
@ -85,7 +85,7 @@ switch ($action) {
if (!empty($operation)) {
$fileName = !empty($action) ? api_get_setting('siteName').
'_'.get_lang('PortalUserSessionStats').'_'.api_get_local_time() : 'report';
'_'.get_lang('Portal user session stats').'_'.api_get_local_time() : 'report';
switch ($exportFormat) {
case 'xls':
Export::arrayToXls($list, $fileName);
@ -130,7 +130,7 @@ switch ($action) {
$list['datasets'][0]['data'][] = $tock;
}
$list['datasets'][1]['label'] = get_lang('DistinctUsersLogins');
$list['datasets'][1]['label'] = get_lang('Distinct users logins');
$list['datasets'][1]['backgroundColor'] = 'rgba(0,204,0,0.2)';
$list['datasets'][1]['borderColor'] = 'rgba(0,204,0,1)';
$list['datasets'][1]['pointBackgroundColor'] = 'rgba(0,204,0,1)';
@ -179,8 +179,8 @@ switch ($action) {
$statsName = 'NumberOfUsers';
$countInvisible = isset($_GET['count_invisible']) ? (int) $_GET['count_invisible'] : null;
$all = [
get_lang('Teachers') => Statistics::countUsers(COURSEMANAGER, null, $countInvisible),
get_lang('Students') => Statistics::countUsers(STUDENT, null, $countInvisible),
get_lang('Trainers') => Statistics::countUsers(COURSEMANAGER, null, $countInvisible),
get_lang('Learners') => Statistics::countUsers(STUDENT, null, $countInvisible),
];
} elseif ($action == 'users_teachers') {
$statsName = 'Teachers';

@ -109,7 +109,7 @@ switch ($action) {
$attendance_calendar = $attendance->get_attendance_calendar($attendance_id);
$label = get_lang('StartDate');
$label = get_lang('Start Date');
if (!empty($attendance_calendar)) {
$input_select .= '<select id="start_date_select_calendar" name="start_date_by_attendance" size="7" class="form-control">';
foreach ($attendance_calendar as $calendar) {
@ -132,7 +132,7 @@ switch ($action) {
}
$input_select .= '</select>';
} else {
$input_select .= '<em>'.get_lang('ThereAreNoRegisteredDatetimeYet').'</em>';
$input_select .= '<em>'.get_lang('There is no date/time registered yet').'</em>';
}
}
?>

@ -103,7 +103,7 @@ switch ($action) {
<div class="row">
<div class="col-sm-10 col-sm-offset-2">
<a class="btn btn-primary" id="send_message_link">
<em class="fa fa-envelope"></em> '.get_lang('Send').'
<em class="fa fa-envelope"></em> '.get_lang('Send message').'
</a>
</div>
</div>
@ -149,7 +149,7 @@ switch ($action) {
$num = UserManager::update_api_key($user_id, $api_service);
$array_list_key = UserManager::get_api_keys($user_id, $api_service); ?>
<div class="form-group">
<label class="col-sm-2 control-label"><?php echo get_lang('MyApiKey'); ?></label>
<label class="col-sm-2 control-label"><?php echo get_lang('My API key'); ?></label>
<div class="col-sm-8">
<input type="text" name="api_key_generate" id="id_api_key_generate" class="form-control" value="<?php echo $array_list_key[$num]; ?>"/>
</div>
@ -186,7 +186,7 @@ switch ($action) {
PERSON_NAME_EMAIL_ADDRESS
);
$subject = '['.api_get_setting('siteName').'] '.get_lang('YourReg').' '.api_get_setting('siteName');
$subject = '['.api_get_setting('siteName').'] '.get_lang('Your registration on').' '.api_get_setting('siteName');
$emailAdmin = api_get_setting('emailAdministrator');
$sender_name = api_get_person_name(
api_get_setting('administratorName'),
@ -196,22 +196,22 @@ switch ($action) {
);
$body = get_lang('Dear')." ".stripslashes($recipientName).",\n\n";
$body .= sprintf(
get_lang('YourAccountOnXHasJustBeenApprovedByOneOfOurAdministrators'),
get_lang('Your account on %s has just been approved by one of our administrators.'),
api_get_setting('siteName')
)."\n";
$body .= sprintf(
get_lang('YouCanNowLoginAtXUsingTheLoginAndThePasswordYouHaveProvided'),
get_lang('You can now login at %s using the login and the password you have provided.'),
api_get_path(WEB_PATH)
).",\n\n";
$body .= get_lang('HaveFun')."\n\n";
//$body.=get_lang('Problem'). "\n\n". get_lang('SignatureFormula');
$body .= get_lang('Have fun,')."\n\n";
//$body.=get_lang('In case of trouble, contact us.'). "\n\n". get_lang('Sincerely');
$body .= api_get_person_name(
api_get_setting('administratorName'),
api_get_setting('administratorSurname')
)."\n".
get_lang('Manager')." ".
get_lang('Administrator')." ".
api_get_setting('siteName')."\nT. ".api_get_setting('administratorTelephone')."\n".
get_lang('Email')." : ".api_get_setting('emailAdministrator');
get_lang('e-mail')." : ".api_get_setting('emailAdministrator');
$additionalParameters = [
'smsType' => SmsPlugin::ACCOUNT_APPROVED_CONNECT,

@ -116,7 +116,7 @@ switch ($action) {
$json['type'] = api_htmlentities($result['filetype']);
$json['result'] = Display::return_icon(
'accept.png',
get_lang('Uploaded')
get_lang('Uploaded..')
);
} else {
$json['url'] = '';
@ -191,7 +191,7 @@ switch ($action) {
if (isset($result['url'])) {
$json['result'] = Display::return_icon(
'accept.png',
get_lang('Uploaded'),
get_lang('Uploaded..'),
[],
ICON_SIZE_TINY
);

@ -469,7 +469,7 @@ class AnnouncementManager
Display::return_icon($image_visibility.'.png', $alt_visibility, '', ICON_SIZE_SMALL)."</a>";
if (api_is_allowed_to_edit(false, true)) {
$modify_icons .= "<a href=\"".api_get_self()."?".api_get_cidreq()."&action=delete&id=".$id."&sec_token=".$stok."\" onclick=\"javascript:if(!confirm('".addslashes(api_htmlentities(get_lang('ConfirmYourChoice'), ENT_QUOTES, $charset))."')) return false;\">".
$modify_icons .= "<a href=\"".api_get_self()."?".api_get_cidreq()."&action=delete&id=".$id."&sec_token=".$stok."\" onclick=\"javascript:if(!confirm('".addslashes(api_htmlentities(get_lang('Please confirm your choice'), ENT_QUOTES, $charset))."')) return false;\">".
Display::return_icon('delete.png', get_lang('Delete'), '', ICON_SIZE_SMALL).
"</a>";
}
@ -487,7 +487,7 @@ class AnnouncementManager
$html .= "<tr><td>$content</td></tr>";
$html .= "<tr>";
$html .= "<td class=\"announcements_datum\">".get_lang('LastUpdateDate')." : ";
$html .= "<td class=\"announcements_datum\">".get_lang('Latest update')." : ";
$lastEdit = $itemProperty->getLasteditDate();
$html .= Display::dateToStringAgoAndLongDate($lastEdit);
$html .= "</td></tr>";
@ -498,7 +498,7 @@ class AnnouncementManager
$sentToForm = self::sent_to_form($sent_to);
$html .= Display::tag(
'td',
get_lang('SentTo').': '.$sentToForm,
get_lang('Visible to').': '.$sentToForm,
['class' => 'announcements_datum']
);
}
@ -1274,7 +1274,7 @@ class AnnouncementManager
'&nbsp;'.implode(', ', $userToArray);
}
if (empty($sent_to_array['groups']) && empty($sent_to_array['users'])) {
$output[] = "&nbsp;".get_lang('Everybody');
$output[] = "&nbsp;".get_lang('All');
}
}
@ -1398,7 +1398,7 @@ class AnnouncementManager
if (!filter_extension($new_file_name)) {
$return = -1;
echo Display::return_message(get_lang('UplUnableToSaveFileFilteredExtension'), 'error');
echo Display::return_message(get_lang('File upload failed: this file extension or file type is prohibited'), 'error');
} else {
$new_file_name = uniqid('');
$new_path = $updir.'/'.$new_file_name;
@ -1465,7 +1465,7 @@ class AnnouncementManager
if (!filter_extension($new_file_name)) {
$return = -1;
echo Display::return_message(
get_lang('UplUnableToSaveFileFilteredExtension'),
get_lang('File upload failed: this file extension or file type is prohibited'),
'error'
);
} else {
@ -1486,7 +1486,7 @@ class AnnouncementManager
if ($result === false) {
$return = -1;
echo Display::return_message(
get_lang('UplUnableToSaveFile'),
get_lang('The uploaded file could not be saved (perhaps a permission problem?)'),
'error'
);
} else {
@ -1864,7 +1864,7 @@ class AnnouncementManager
$displayed = [];
$results = [];
$actionUrl = api_get_path(WEB_CODE_PATH).'announcements/announcements.php?'.api_get_cidreq();
$emailIcon = '<i class="fa fa-envelope-o" title="'.get_lang('AnnounceSentByEmail').'"></i>';
$emailIcon = '<i class="fa fa-envelope-o" title="'.get_lang('Announcement sent by e-mail').'"></i>';
$attachmentIcon = '<i class="fa fa-paperclip" title="'.get_lang('Attachment').'"></i>';
$editIcon = Display::return_icon(
@ -1955,7 +1955,7 @@ class AnnouncementManager
/* TITLE */
$user_info = api_get_user_info($row['insert_user_id']);
$username = sprintf(get_lang('LoginX'), $user_info['username']);
$username = sprintf(get_lang('Login: %s'), $user_info['username']);
$username_span = Display::tag(
'span',
@ -2001,9 +2001,9 @@ class AnnouncementManager
}
if ($iterator < $bottomAnnouncement) {
$modify_icons .= "<a href=\"".$actionUrl."&action=move&down=".$row["id"]."&sec_token=".$stok."\">".
Display::return_icon('down.gif', get_lang('Down'))."</a>";
Display::return_icon('down.gif', get_lang('down'))."</a>";
} else {
$modify_icons .= Display::return_icon('down_na.gif', get_lang('Down'));
$modify_icons .= Display::return_icon('down_na.gif', get_lang('down'));
}
if (api_is_allowed_to_edit(false, true)) {
if ($disableEdit === true) {
@ -2011,7 +2011,7 @@ class AnnouncementManager
} else {
$modify_icons .= "<a href=\"".$actionUrl."&action=delete&id=".$row['id']."&sec_token=".$stok."\" onclick=\"javascript:if(!confirm('".addslashes(
api_htmlentities(
get_lang('ConfirmYourChoice'),
get_lang('Please confirm your choice'),
ENT_QUOTES,
api_get_system_encoding()
)

@ -561,8 +561,8 @@ class Compilatio
// if the compilatio's hash is not a valide hash md5,
// we return à specific status (cf : IsInCompilatio() )
$status = 'NOT_IN_COMPILATIO';
$actionCompilatio = get_lang('CompilatioDocumentTextNotImage').'<br/>'.
get_lang('CompilatioDocumentNotCorrupt');
$actionCompilatio = get_lang('Verify that it contains text (and not only images)').'<br/>'.
get_lang('and that it is not corrupted');
}
switch ($status) {
@ -574,21 +574,21 @@ class Compilatio
35
)
.Display::url(
get_lang('CompilatioAnalysis'),
get_lang('Analyse'),
$urlRapport,
['class' => 'btn btn-primary btn-xs', 'target' => '_blank']
);
break;
case 'ANALYSE_PROCESSING':
$actionCompilatio .= "<div style='font-weight:bold;text-align:left'>"
.get_lang('CompilatioAnalysisInProgress')
.get_lang('AnalyseInProgress')
."</div>";
$actionCompilatio .= "<div style='font-size:80%;font-style:italic;margin-bottom:5px;'>"
.get_lang('CompilatioAnalysisPercentage')
.get_lang('AnalysePercentage')
."</div>";
$text = [];
$text['analysisinqueue'] = get_lang('CompilatioWaitingAnalysis');
$text['analysisinfinalization'] = get_lang('CompilatioAnalysisEnding');
$text['analysisinqueue'] = get_lang('Pending Analysis');
$text['analysisinfinalization'] = get_lang('AnalyseEnding');
$text['refresh'] = get_lang('Refresh');
$actionCompilatio .= self::getProgressionAnalyseDocv31(
$status,
@ -598,15 +598,15 @@ class Compilatio
break;
case 'ANALYSE_IN_QUEUE':
$loading = Display::returnFontAwesomeIcon('spinner', null, true, 'fa-spin');
$actionCompilatio .= $loading.'&nbsp;'.get_lang('CompilatioAwaitingAnalysis');
$actionCompilatio .= $loading.'&nbsp;'.get_lang('Waiting for analysis');
break;
case 'BAD_FILETYPE':
$actionCompilatio .= get_lang('FileFormatNotSupported')
$actionCompilatio .= get_lang('File format not supported')
.'<br/>'
.get_lang('CompilatioProtectedPdfVerification');
.get_lang('If the file is in pdf format, check that it is not protected by modification.');
break;
case 'BAD_FILESIZE':
$actionCompilatio .= get_lang('UplFileTooBig');
$actionCompilatio .= get_lang('The file is too big to upload.');
break;
}
}

@ -572,7 +572,7 @@ class CourseChatUtils
if (isset($_GET['origin']) && $_GET['origin'] == 'whoisonline') {
//the caller
$content[0] = get_lang('CallSent').'<br />'.$content[0];
$content[0] = get_lang('Chat call has been sent. Waiting for the approval of your partner.').'<br />'.$content[0];
}
$history = '<div id="content-chat">';
@ -585,7 +585,7 @@ class CourseChatUtils
$history .= '
<div id="clear-chat">
<button type="button" id="chat-reset" class="btn btn-danger btn-sm">
'.get_lang('ClearList').'
'.get_lang('Clear the chat').'
</button>
</div>
';

@ -168,7 +168,7 @@ class CoursesAndSessionsCatalog
$categories['ALL'] = [
'id' => 0,
'name' => get_lang('DisplayAll'),
'name' => get_lang('Display all'),
'code' => 'ALL',
'parent_id' => null,
'tree_pos' => 0,
@ -196,7 +196,7 @@ class CoursesAndSessionsCatalog
$countCourses = CourseCategory::countCoursesInCategory();
$categories['NONE'] = [
'id' => 0,
'name' => get_lang('WithoutCategory'),
'name' => get_lang('Without category'),
'code' => 'NONE',
'parent_id' => null,
'tree_pos' => 0,
@ -227,7 +227,7 @@ class CoursesAndSessionsCatalog
$categories = [];
$categories[0][0] = [
'id' => 0,
'name' => get_lang('DisplayAll'),
'name' => get_lang('Display all'),
'code' => 'ALL',
'parent_id' => null,
'tree_pos' => 0,
@ -250,7 +250,7 @@ class CoursesAndSessionsCatalog
$countCourses = CourseCategory::countCoursesInCategory();
$categories[0][count($categories[0]) + 1] = [
'id' => 0,
'name' => get_lang('None'),
'name' => get_lang('none'),
'code' => 'NONE',
'parent_id' => null,
'tree_pos' => $row['tree_pos'] + 1,
@ -431,7 +431,7 @@ class CoursesAndSessionsCatalog
);
if ($row['tutor_name'] == '0') {
$row['tutor_name'] = get_lang('NoManager');
$row['tutor_name'] = get_lang('No administrator');
}
$point_info = CourseManager::get_course_ranking($row['id'], 0);
$courses[] = [

@ -87,7 +87,7 @@ class MailTemplateManager extends Model
// Setting the form elements
$header = get_lang('Add');
if ($action === 'edit') {
$header = get_lang('Modify');
$header = get_lang('Edit');
}
$id = isset($_GET['id']) ? (int) $_GET['id'] : '';
@ -141,9 +141,9 @@ class MailTemplateManager extends Model
$defaults = $this->get($id);
if ($action === 'edit') {
$form->addLabel(get_lang('CreatedAt'), Display::dateToStringAgoAndLongDate($defaults['created_at']));
$form->addLabel(get_lang('UpdatedAt'), Display::dateToStringAgoAndLongDate($defaults['updated_at']));
$form->addButtonSave(get_lang('Modify'), 'submit');
$form->addLabel(get_lang('Created at'), Display::dateToStringAgoAndLongDate($defaults['created_at']));
$form->addLabel(get_lang('Updated at'), Display::dateToStringAgoAndLongDate($defaults['updated_at']));
$form->addButtonSave(get_lang('Edit'), 'submit');
} else {
$form->addButtonCreate(get_lang('Add'), 'submit');
}
@ -155,7 +155,7 @@ class MailTemplateManager extends Model
$form->setDefaults($defaults);
// Setting the rules
$form->addRule('name', get_lang('ThisFieldIsRequired'), 'required');
$form->addRule('name', get_lang('Required field'), 'required');
return $form;
}

@ -23,7 +23,7 @@ class MoodleImport
public function import($uploadedFile)
{
if (UPLOAD_ERR_OK !== $uploadedFile['error']) {
throw new Exception(get_lang('UploadError'));
throw new Exception(get_lang('Upload failed, please check maximum file size limits and folder rights.'));
}
$cachePath = api_get_path(SYS_ARCHIVE_PATH);
@ -33,13 +33,13 @@ class MoodleImport
$name = basename($tempPath).".$extension";
if (!move_uploaded_file($tempPath, api_get_path(SYS_ARCHIVE_PATH).$name)) {
throw new Exception(get_lang('UploadError'));
throw new Exception(get_lang('Upload failed, please check maximum file size limits and folder rights.'));
}
$filePath = $cachePath.$name;
if (!is_readable($filePath)) {
throw new Exception(get_lang('UploadError'));
throw new Exception(get_lang('Upload failed, please check maximum file size limits and folder rights.'));
}
$mimeType = mime_content_type($filePath);
@ -54,11 +54,11 @@ class MoodleImport
$backUpFile = new PharData($filePath);
if (false === $backUpFile->extractTo($destinationDir)) {
throw new Exception(get_lang('ErrorImportingFile'));
throw new Exception(get_lang('Error importing file'));
}
if (!file_exists($destinationDir.'/moodle_backup.xml')) {
throw new Exception(get_lang('FailedToImportThisIsNotAMoodleFile'));
throw new Exception(get_lang('Failed to import: this doesn\'t seem to be a Moodle course backup file (.mbz)'));
}
break;
@ -77,7 +77,7 @@ class MoodleImport
}
if (!$mainFileKey) {
throw new Exception(get_lang('FailedToImportThisIsNotAMoodleFile'));
throw new Exception(get_lang('Failed to import: this doesn\'t seem to be a Moodle course backup file (.mbz)'));
}
$package->extract(PCLZIP_OPT_PATH, $destinationDir);
@ -154,7 +154,7 @@ class MoodleImport
removeDir($destinationDir);
unlink($filePath);
throw new Exception(get_lang('FailedToImportThisIsNotAMoodleFile'));
throw new Exception(get_lang('Failed to import: this doesn\'t seem to be a Moodle course backup file (.mbz)'));
}
$activities = $doc->getElementsByTagName('activity');
foreach ($activities as $activity) {
@ -836,7 +836,7 @@ class MoodleImport
case 'ddmatch':
$questionWeighting = $currentQuestion['defaultmark'];
$questionInstance->updateWeighting($questionWeighting);
$questionInstance->updateDescription(get_lang('ThisQuestionIsNotSupportedYet'));
$questionInstance->updateDescription(get_lang('This question type is not supported yet'));
$questionInstance->save($exercise);
return false;

@ -80,7 +80,7 @@ class ScheduledAnnouncement extends Model
$action .= '<a href="'.api_get_self().'?action=add&session_id='.$sessionId.'">'.
Display::return_icon('add.png', get_lang('Add'), '', ICON_SIZE_MEDIUM).'</a>';
$action .= '<a href="scheduled_announcement.php?action=run&session_id='.$sessionId.'">'.
Display::return_icon('tuning.png', get_lang('SendManuallyPendingAnnouncements'), '', ICON_SIZE_MEDIUM).
Display::return_icon('tuning.png', get_lang('Send pending announcements manually'), '', ICON_SIZE_MEDIUM).
'</a>';
$action .= '</div>';
@ -123,10 +123,10 @@ class ScheduledAnnouncement extends Model
$this->setTagsInForm($form);
$form->addCheckBox('sent', null, get_lang('MessageSent'));
$form->addCheckBox('sent', null, get_lang('Message Sent'));
if ($action == 'edit') {
$form->addButtonUpdate(get_lang('Modify'));
$form->addButtonUpdate(get_lang('Edit'));
}
return $form;
@ -149,7 +149,7 @@ class ScheduledAnnouncement extends Model
$header = get_lang('Add');
if ($action == 'edit') {
$header = get_lang('Modify');
$header = get_lang('Edit');
}
$form = new FormValidator(
@ -162,7 +162,7 @@ class ScheduledAnnouncement extends Model
if ($action == 'add') {
$form->addHtml(
Display::return_message(
nl2br(get_lang('ScheduleAnnouncementDescription')),
nl2br(get_lang('This form allows scheduling announcements to be sent automatically to the students who are taking a course in a session.')),
'normal',
false
)
@ -179,7 +179,7 @@ class ScheduledAnnouncement extends Model
}
$typeOptions = [
'specific_date' => get_lang('SpecificDate'),
'specific_date' => get_lang('Specific dispatch date'),
];
if ($useBaseDate) {
@ -212,13 +212,13 @@ class ScheduledAnnouncement extends Model
$form->addText(
'days',
get_lang('Days'),
get_lang('days'),
false
);
$form->addSelect(
'moment_type',
get_lang('AfterOrBefore'),
get_lang('After or before'),
[
'after' => get_lang('After'),
'before' => get_lang('Before'),
@ -226,14 +226,14 @@ class ScheduledAnnouncement extends Model
);
if (!empty($startDate)) {
$options['start_date'] = get_lang('StartDate').' - '.$startDate;
$options['start_date'] = get_lang('Start Date').' - '.$startDate;
}
if (!empty($endDate)) {
$options['end_date'] = get_lang('EndDate').' - '.$endDate;
$options['end_date'] = get_lang('End Date').' - '.$endDate;
}
if (!empty($options)) {
$form->addSelect('base_date', get_lang('BaseDate'), $options);
$form->addSelect('base_date', get_lang('Dispatch based on the session\'s start/end dates'), $options);
}
$form->addHtml('</div>');
@ -248,7 +248,7 @@ class ScheduledAnnouncement extends Model
$this->setTagsInForm($form);
if ($action == 'edit') {
$form->addButtonUpdate(get_lang('Modify'));
$form->addButtonUpdate(get_lang('Edit'));
} else {
$form->addButtonCreate(get_lang('Add'));
}
@ -415,12 +415,12 @@ class ScheduledAnnouncement extends Model
);
}
$message = get_lang('YouAreReceivingACopyBecauseYouAreACourseCoach').'<br /><br />'.$message;
$message = get_lang('You\'re receiving a copy because, you\'re a course coach').'<br /><br />'.$message;
foreach ($coachList as $courseCoachId) {
MessageManager::send_message_simple(
$courseCoachId,
get_lang('YouAreReceivingACopyBecauseYouAreACourseCoach').'&nbsp;'.$subject,
get_lang('You\'re receiving a copy because, you\'re a course coach').'&nbsp;'.$subject,
$message,
$coachId
);

@ -85,12 +85,12 @@ class TeacherTimeReport
get_lang('Session'),
get_lang('Course'),
get_lang('Coach'),
get_lang('TotalTime'),
get_lang('Total time'),
];
} else {
$dataToExport[] = [
get_lang('Coach'),
get_lang('TotalTime'),
get_lang('Total time'),
];
}

@ -379,7 +379,7 @@ class TicketManager
if ($ticketId) {
$ticket_code = 'A'.str_pad($ticketId, 11, '0', STR_PAD_LEFT);
$titleCreated = sprintf(
get_lang('TicketXCreated'),
get_lang('Ticket %s created'),
$ticket_code
);
@ -481,7 +481,7 @@ class TicketManager
if (empty($category_id)) {
if (api_get_setting('ticket_send_warning_to_all_admins') === 'true') {
$warningSubject = sprintf(
get_lang('TicketXCreatedWithNoCategory'),
get_lang('Ticket %s createdWithNoCategory'),
$ticket_code
);
Display::addFlash(Display::return_message($warningSubject));
@ -501,20 +501,20 @@ class TicketManager
$categoryInfo = self::getCategory($category_id);
$usersInCategory = self::getUsersInCategory($category_id);
$message = '<h2>'.get_lang('TicketInformation').'</h2><br />'.$helpDeskMessage;
$message = '<h2>'.get_lang('Ticket info').'</h2><br />'.$helpDeskMessage;
if (api_get_setting('ticket_warn_admin_no_user_in_category') === 'true') {
$usersInCategory = self::getUsersInCategory($category_id);
if (empty($usersInCategory)) {
$subject = sprintf(
get_lang('WarningCategoryXDoesntHaveUsers'),
get_lang('Warning: No one has been assigned to category %s'),
$categoryInfo['name']
);
if (api_get_setting('ticket_send_warning_to_all_admins') === 'true') {
Display::addFlash(Display::return_message(
sprintf(
get_lang('CategoryWithNoUserNotificationSentToAdmins'),
get_lang('A notification was sent to the administrators to report this category has no user assigned'),
$categoryInfo['name']
),
null,
@ -555,9 +555,9 @@ class TicketManager
if (!empty($personalEmail)) {
api_mail_html(
get_lang('VirtualSupport'),
get_lang('Virtual support'),
$personalEmail,
get_lang('IncidentResentToVirtualSupport'),
get_lang('IncidentResentToVirtual support'),
$helpDeskMessage
);
}
@ -646,7 +646,7 @@ class TicketManager
if ($sendConfirmation) {
$form =
'<form action="ticket_details.php?ticket_id='.$ticketId.'" id="confirmticket" method="POST" >
<p>'.get_lang('TicketWasThisAnswerSatisfying').'</p>
<p>'.get_lang('Was this answer satisfactory?').'</p>
<button class="btn btn-primary responseyes" name="response" id="responseyes" value="1">'.
get_lang('Yes').'</button>
<button class="btn btn-danger responseno" name="response" id="responseno" value="0">'.
@ -728,7 +728,7 @@ class TicketManager
$table_support_message_attachments = Database::get_main_table(TABLE_TICKET_MESSAGE_ATTACHMENTS);
if (!filter_extension($new_file_name)) {
echo Display::return_message(
get_lang('UplUnableToSaveFileFilteredExtension'),
get_lang('File upload failed: this file extension or file type is prohibited'),
'error'
);
} else {
@ -935,13 +935,13 @@ class TicketManager
$hrefResp = $webPath.'main/admin/user_information.php?user_id='.$assignedUserInfo['user_id'];
$row['assigned_last_user'] = "<a href='$hrefResp'> {$assignedUserInfo['complete_name_with_username']} </a>";
} else {
$row['assigned_last_user'] = get_lang('UnknownUser');
$row['assigned_last_user'] = get_lang('Unknown user');
}
} else {
if ($row['status_id'] !== self::STATUS_FORWARDED) {
$row['assigned_last_user'] = '<span style="color:#ff0000;">'.get_lang('ToBeAssigned').'</span>';
$row['assigned_last_user'] = '<span style="color:#ff0000;">'.get_lang('To be assigned').'</span>';
} else {
$row['assigned_last_user'] = '<span style="color:#00ff00;">'.get_lang('MessageResent').'</span>';
$row['assigned_last_user'] = '<span style="color:#00ff00;">'.get_lang('Message resent').'</span>';
}
}
@ -965,7 +965,7 @@ class TicketManager
$icon = Display::return_icon(
$img_source,
get_lang('Info'),
get_lang('Information'),
['style' => 'margin-right: 10px; float: left;']
);
@ -993,7 +993,7 @@ class TicketManager
}
if ($isAdmin) {
$ticket['0'] .= '&nbsp;&nbsp;<a href="javascript:void(0)" onclick="load_history_ticket(\'div_'.$row['ticket_id'].'\','.$row['ticket_id'].')">
<img onclick="load_course_list(\'div_'.$row['ticket_id'].'\','.$row['ticket_id'].')" onmouseover="clear_course_list (\'div_'.$row['ticket_id'].'\')" src="'.Display::returnIconPath('history.gif').'" title="'.get_lang('Historial').'" alt="'.get_lang('Historial').'"/>
<img onclick="load_course_list(\'div_'.$row['ticket_id'].'\','.$row['ticket_id'].')" onmouseover="clear_course_list (\'div_'.$row['ticket_id'].'\')" src="'.Display::returnIconPath('history.gif').'" title="'.get_lang('History').'" alt="'.get_lang('History').'"/>
<div class="blackboard_hide" id="div_'.$row['ticket_id'].'">&nbsp;&nbsp;</div>
</a>&nbsp;&nbsp;';
}
@ -1455,8 +1455,8 @@ class TicketManager
if (Database::affected_rows($result) > 0) {
self::sendNotification(
$ticketId,
get_lang('TicketUpdated'),
get_lang('TicketUpdated')
get_lang('Ticket updated'),
get_lang('Ticket updated')
);
return true;
@ -1539,8 +1539,8 @@ class TicketManager
self::sendNotification(
$ticketId,
get_lang('TicketClosed'),
get_lang('TicketClosed')
get_lang('Ticket closed'),
get_lang('Ticket closed')
);
}

@ -54,7 +54,7 @@ class VideoChat
$toUserInfo = api_get_user_info($toUser);
$chatName = vsprintf(
get_lang('VideoChatBetweenUserXAndUserY'),
get_lang('Video chat between %s and %s'),
[$fromUserInfo['firstname'], $toUserInfo['firstname']]
);

@ -2056,7 +2056,7 @@ class Agenda
// Add username as tooltip for $event['sent_to'] - ref #4226
$username = api_htmlentities(
sprintf(
get_lang('LoginX'),
get_lang('Login: %s'),
$user_info['username']
),
ENT_QUOTES
@ -2352,9 +2352,9 @@ class Agenda
$idAttach = isset($params['id_attach']) ? (int) $params['id_attach'] : null;
$groupId = api_get_group_id();
$form_Title = get_lang('AddCalendarItem');
$form_Title = get_lang('Add event to agenda');
if (!empty($id)) {
$form_Title = get_lang('ModifyCalendarItem');
$form_Title = get_lang('Edit event');
}
$form->addHeader($form_Title);
@ -2384,13 +2384,13 @@ class Agenda
'label',
null,
Display::return_message(
get_lang('EditingThisEventWillRemoveItFromTheSerie'),
get_lang('Editing this event will remove it from the serie of events it is currently part of'),
'warning'
)
);
}
$form->addElement('text', 'title', get_lang('ItemTitle'));
$form->addElement('text', 'title', get_lang('Event name'));
if (isset($groupId) && !empty($groupId)) {
$form->addElement(
@ -2408,18 +2408,18 @@ class Agenda
$form->addDateRangePicker(
'date_range',
get_lang('DateRange'),
get_lang('Date range'),
false,
['id' => 'date_range']
);
$form->addElement('checkbox', 'all_day', null, get_lang('AllDay'));
$form->addElement('checkbox', 'all_day', null, get_lang('All day'));
if ($this->type == 'course') {
$repeat = $form->addElement(
'checkbox',
'repeat',
null,
get_lang('RepeatEvent'),
get_lang('Repeat event'),
['onclick' => 'return plus_repeated_event();']
);
$form->addElement(
@ -2429,13 +2429,13 @@ class Agenda
$form->addElement(
'select',
'repeat_type',
get_lang('RepeatType'),
get_lang('Repeat type'),
self::getRepeatTypes()
);
$form->addElement(
'date_picker',
'repeat_end_day',
get_lang('RepeatEnd'),
get_lang('Repeat end date'),
['id' => 'repeat_end_date_form']
);
@ -2489,7 +2489,7 @@ class Agenda
if ($this->type == 'course') {
$form->addElement('textarea', 'comment', get_lang('Comment'));
$form->addLabel(
get_lang('FilesAttachment'),
get_lang('Files attachments'),
'<div id="filepaths" class="file-upload-event">
<div id="filepath_1">
@ -2506,9 +2506,9 @@ class Agenda
'',
'<span id="link-more-attach">
<a href="javascript://" onclick="return add_image_form()">'.
get_lang('AddOneMoreFile').'</a>
get_lang('Add one more file').'</a>
</span>&nbsp;('.sprintf(
get_lang('MaximunFileSizeX'),
get_lang('Maximun file size: %s'),
format_file_size(
api_get_setting('message_max_upload_filesize')
)
@ -2535,7 +2535,7 @@ class Agenda
$form->addElement(
'textarea',
'file_comment',
get_lang('FileComment')
get_lang('File comment')
);
}
@ -2544,23 +2544,23 @@ class Agenda
'checkbox',
'add_announcement',
null,
get_lang('AddAnnouncement').'&nbsp('.get_lang('SendMail').')'
get_lang('Add an announcement').'&nbsp('.get_lang('Send mail').')'
);
}
if ($id) {
$form->addButtonUpdate(get_lang('ModifyEvent'));
$form->addButtonUpdate(get_lang('Edit event'));
} else {
$form->addButtonSave(get_lang('AgendaAdd'));
$form->addButtonSave(get_lang('Add event'));
}
$form->setDefaults($params);
$form->addRule(
'date_range',
get_lang('ThisFieldIsRequired'),
get_lang('Required field'),
'required'
);
$form->addRule('title', get_lang('ThisFieldIsRequired'), 'required');
$form->addRule('title', get_lang('Required field'), 'required');
return $form;
}
@ -2661,12 +2661,12 @@ class Agenda
public static function getRepeatTypes()
{
return [
'daily' => get_lang('RepeatDaily'),
'weekly' => get_lang('RepeatWeekly'),
'monthlyByDate' => get_lang('RepeatMonthlyByDate'),
//monthlyByDay"> get_lang('RepeatMonthlyByDay');
//monthlyByDayR' => get_lang('RepeatMonthlyByDayR'),
'yearly' => get_lang('RepeatYearly'),
'daily' => get_lang('Daily'),
'weekly' => get_lang('Weekly'),
'monthlyByDate' => get_lang('Monthly, by date'),
//monthlyByDay"> get_lang('Monthly, by day');
//monthlyByDayR' => get_lang('Monthly, by dayR'),
'yearly' => get_lang('Yearly'),
];
}
@ -2775,7 +2775,7 @@ class Agenda
if (!filter_extension($new_file_name)) {
return Display::return_message(
get_lang('UplUnableToSaveFileFilteredExtension'),
get_lang('File upload failed: this file extension or file type is prohibited'),
'error'
);
} else {
@ -2874,7 +2874,7 @@ class Agenda
if (!empty($result)) {
return Display::return_message(
get_lang("AttachmentFileDeleteSuccess"),
get_lang("The attached file has been deleted"),
'confirmation'
);
}
@ -2960,7 +2960,7 @@ class Agenda
$codePath."calendar/agenda_js.php?type={$this->type}&$cidReq"
);
$actionsLeft .= Display::url(
Display::return_icon('week.png', get_lang('AgendaList'), [], ICON_SIZE_MEDIUM),
Display::return_icon('week.png', get_lang('Agenda list'), [], ICON_SIZE_MEDIUM),
$codePath."calendar/agenda_list.php?type={$this->type}&$cidReq"
);
@ -2974,12 +2974,12 @@ class Agenda
)
) {
$actionsLeft .= Display::url(
Display::return_icon('new_event.png', get_lang('AgendaAdd'), [], ICON_SIZE_MEDIUM),
Display::return_icon('new_event.png', get_lang('Add event'), [], ICON_SIZE_MEDIUM),
$codePath."calendar/agenda.php?action=add&type={$this->type}&$cidReq"
);
$actionsLeft .= Display::url(
Display::return_icon('import_calendar.png', get_lang('ICalFileImport'), [], ICON_SIZE_MEDIUM),
Display::return_icon('import_calendar.png', get_lang('Outlook import'), [], ICON_SIZE_MEDIUM),
$codePath."calendar/agenda.php?action=importical&type={$this->type}&$cidReq"
);
@ -3006,7 +3006,7 @@ class Agenda
if ($this->type == 'personal' && !api_is_anonymous()) {
$actionsLeft .= Display::url(
Display::return_icon('1day.png', get_lang('SessionsPlanCalendar'), [], ICON_SIZE_MEDIUM),
Display::return_icon('1day.png', get_lang('Sessions plan calendar'), [], ICON_SIZE_MEDIUM),
$codePath."calendar/planification.php"
);
}
@ -3045,7 +3045,7 @@ class Agenda
}
$form->addHidden('type', 'personal');
$sessions = ['0' => get_lang('SelectAnOption')] + $sessions;
$sessions = ['0' => get_lang('Please select an option')] + $sessions;
$form->addSelect(
'session_id',
@ -3084,11 +3084,11 @@ class Agenda
api_get_self().'?action=importical&type='.$this->type,
['enctype' => 'multipart/form-data']
);
$form->addHeader(get_lang('ICalFileImport'));
$form->addElement('file', 'ical_import', get_lang('ICalFileImport'));
$form->addHeader(get_lang('Outlook import'));
$form->addElement('file', 'ical_import', get_lang('Outlook import'));
$form->addRule(
'ical_import',
get_lang('ThisFieldIsRequired'),
get_lang('Required field'),
'required'
);
$form->addButtonImport(get_lang('Import'), 'ical_submit');
@ -3224,7 +3224,7 @@ class Agenda
if (!empty($messages)) {
$messages = implode('<br /> ', $messages);
} else {
$messages = get_lang('NoAgendaItems');
$messages = get_lang('There are no events');
}
return $messages;
@ -3512,7 +3512,7 @@ class Agenda
// This is the array construction for the WEEK or MONTH view
//Display the Agenda global in the tab agenda (administrator)
$agendaitems[$day] .= "<i>$start_time $end_time</i>&nbsp;-&nbsp;";
$agendaitems[$day] .= "<b>".get_lang('GlobalEvent')."</b>";
$agendaitems[$day] .= "<b>".get_lang('Platform event')."</b>";
$agendaitems[$day] .= "<div>".$item['title']."</div><br>";
} else {
// this is the array construction for the DAY view
@ -3524,7 +3524,7 @@ class Agenda
$content = $agendaitems[$halfhour];
}
$agendaitems[$halfhour] = $content."<div><i>$hour:$minute</i> <b>".get_lang(
'GlobalEvent'
'Platform event'
).": </b>".$item['title']."</div>";
}
}
@ -3803,7 +3803,7 @@ class Agenda
$bg_color = '#D0E7F4';
$icon = Display::return_icon(
'user.png',
get_lang('MyAgenda'),
get_lang('Personal agenda'),
[],
ICON_SIZE_SMALL
);
@ -3812,7 +3812,7 @@ class Agenda
$bg_color = '#FFBC89';
$icon = Display::return_icon(
'view_remove.png',
get_lang('GlobalEvent'),
get_lang('Platform event'),
[],
ICON_SIZE_SMALL
);

@ -250,18 +250,18 @@ class Attendance
$locked = $attendance[4];
if ($locked == 0) {
if (api_is_platform_admin()) {
$message_alert = get_lang('AreYouSureToLockTheAttendance');
$message_alert = get_lang('Are you sure you want to lock the attendance?');
} else {
$message_alert = get_lang('UnlockMessageInformation');
$message_alert = get_lang('The attendance is not locked, which means your teacher is still able to modify it.');
}
$actions .= '&nbsp;<a onclick="javascript:if(!confirm(\''.$message_alert.'\')) return false;" href="index.php?'.api_get_cidreq().'&action=lock_attendance&attendance_id='.$attendance[0].'">'.
Display::return_icon('unlock.png', get_lang('LockAttendance')).'</a>';
Display::return_icon('unlock.png', get_lang('Lock attendance')).'</a>';
} else {
if (api_is_platform_admin()) {
$actions .= '&nbsp;<a onclick="javascript:if(!confirm(\''.get_lang('AreYouSureToUnlockTheAttendance').'\')) return false;" href="index.php?'.api_get_cidreq().'&action=unlock_attendance&attendance_id='.$attendance[0].'">'.
Display::return_icon('locked.png', get_lang('UnlockAttendance')).'</a>';
$actions .= '&nbsp;<a onclick="javascript:if(!confirm(\''.get_lang('Are you sure you want to unlock the attendance?').'\')) return false;" href="index.php?'.api_get_cidreq().'&action=unlock_attendance&attendance_id='.$attendance[0].'">'.
Display::return_icon('locked.png', get_lang('Unlock attendance')).'</a>';
} else {
$actions .= '&nbsp;'.Display::return_icon('locked_na.png', get_lang('LockedAttendance'));
$actions .= '&nbsp;'.Display::return_icon('locked_na.png', get_lang('Locked attendance'));
}
}
}

@ -126,8 +126,8 @@ function returnNotificationMenu()
(api_get_setting('showonline', 'users') == 'true' && $user_id)
) {
$html .= '<li class="user-online"><a href="'.api_get_path(WEB_PATH).'whoisonline.php" target="_self" title="'
.get_lang('UsersOnline').'" >'
.Display::return_icon('user.png', get_lang('UsersOnline'), [], ICON_SIZE_TINY)
.get_lang('Users online').'" >'
.Display::return_icon('user.png', get_lang('Users online'), [], ICON_SIZE_TINY)
.' '.$number.'</a></li>';
}
@ -140,7 +140,7 @@ function returnNotificationMenu()
) {
$html .= '<li class="user-online-course"><a href="'.api_get_path(WEB_PATH).'whoisonline.php?cidReq='.$courseInfo['sysCode']
.'" target="_self">'
.Display::return_icon('course.png', get_lang('UsersOnline').' '.get_lang('InThisCourse'), [], ICON_SIZE_TINY)
.Display::return_icon('course.png', get_lang('Users online').' '.get_lang('in this course'), [], ICON_SIZE_TINY)
.' '.$number_online_in_course.' </a></li>';
}
@ -152,7 +152,7 @@ function returnNotificationMenu()
$numberOnlineInSession = getOnlineUsersInSessionCount($sessionId);
$html .= '<li class="user-online-session">
<a href="'.api_get_path(WEB_PATH).'whoisonlinesession.php" target="_self">'
.Display::return_icon('session.png', get_lang('UsersConnectedToMySessions'), [], ICON_SIZE_TINY)
.Display::return_icon('session.png', get_lang('Online in my sessions'), [], ICON_SIZE_TINY)
.' '.$numberOnlineInSession.'</a></li>';
}
}
@ -263,7 +263,7 @@ function return_navigation_array()
$url = api_get_path(WEB_PLUGIN_PATH).'studentfollowup/my_students.php';
}
$navigation['follow_up']['url'] = $url;
$navigation['follow_up']['title'] = $plugin->get_lang('CareDetailView');
$navigation['follow_up']['title'] = $plugin->get_lang('Student care detail view');
$navigation['follow_up']['key'] = 'homepage';
$navigation['follow_up']['icon'] = 'homepage.png';
}
@ -362,7 +362,7 @@ function return_breadcrumb($interbreadcrumb, $language_file, $nameTools)
case 'get_lang':
$itemTitle = Display::return_icon(
'home.png',
get_lang('CourseHomepageLink'),
get_lang('Course home'),
[],
ICON_SIZE_TINY
);
@ -394,12 +394,12 @@ function return_breadcrumb($interbreadcrumb, $language_file, $nameTools)
if ($daysLeft >= 0) {
$additionalBlocks .= Display::return_message(
sprintf(get_lang('SessionDurationXDaysLeft'), $daysLeft),
sprintf(get_lang('This session has a maximum duration. Only %s days to go.'), $daysLeft),
'information'
);
} else {
$additionalBlocks .= Display::return_message(
get_lang('YourSessionTimeHasExpired'),
get_lang('You are already registered but your allowed access time has expired.'),
'warning'
);
}
@ -409,7 +409,7 @@ function return_breadcrumb($interbreadcrumb, $language_file, $nameTools)
/**
* @todo could be useful adding the My courses in the breadcrumb
* $navigation_item_my_courses['title'] = get_lang('MyCourses');
* $navigation_item_my_courses['title'] = get_lang('My courses');
* $navigation_item_my_courses['url'] = api_get_path(WEB_PATH).'user_portal.php';
* $navigation[] = $navigation_item_my_courses;
*/
@ -437,14 +437,14 @@ function return_breadcrumb($interbreadcrumb, $language_file, $nameTools)
$navigation_item['title'] = $breadcrumb_step['name'];
// titles for shared folders
if ($breadcrumb_step['name'] == 'shared_folder') {
$navigation_item['title'] = get_lang('UserFolders');
$navigation_item['title'] = get_lang('Folders of users');
} elseif (strstr($breadcrumb_step['name'], 'shared_folder_session_')) {
$navigation_item['title'] = get_lang('UserFolders');
$navigation_item['title'] = get_lang('Folders of users');
} elseif (strstr($breadcrumb_step['name'], 'sf_user_')) {
$userinfo = api_get_user_info(substr($breadcrumb_step['name'], 8));
$navigation_item['title'] = $userinfo['complete_name'];
} elseif ($breadcrumb_step['name'] == 'chat_files') {
$navigation_item['title'] = get_lang('ChatFiles');
$navigation_item['title'] = get_lang('Chat conversations history');
} elseif ($breadcrumb_step['name'] == 'images') {
$navigation_item['title'] = get_lang('Images');
} elseif ($breadcrumb_step['name'] == 'video') {

@ -125,7 +125,7 @@ class Career extends Model
// Setting the form elements
$header = get_lang('Add');
if ($action == 'edit') {
$header = get_lang('Modify');
$header = get_lang('Edit');
}
$id = isset($_GET['id']) ? (int) $_GET['id'] : '';
@ -150,9 +150,9 @@ class Career extends Model
$extraField = new ExtraField('career');
$extraField->addElements($form, $id);
$form->addElement('text', 'created_at', get_lang('CreatedAt'));
$form->addElement('text', 'created_at', get_lang('Created at'));
$form->freeze('created_at');
$form->addButtonSave(get_lang('Modify'));
$form->addButtonSave(get_lang('Edit'));
} else {
$form->addButtonCreate(get_lang('Add'));
}
@ -170,7 +170,7 @@ class Career extends Model
$form->setDefaults($defaults);
// Setting the rules
$form->addRule('name', get_lang('ThisFieldIsRequired'), 'required');
$form->addRule('name', get_lang('Required field'), 'required');
return $form;
}
@ -193,7 +193,7 @@ class Career extends Model
case 'updated_at':
break;
case 'name':
$val .= ' '.get_lang('CopyLabelSuffix');
$val .= ' '.get_lang('Copy');
$new[$key] = $val;
break;
case 'created_at':

@ -304,8 +304,8 @@ class Certificate extends Model
);
if ($sendNotification) {
$subject = get_lang('NotificationCertificateSubject');
$message = nl2br(get_lang('NotificationCertificateTemplate'));
$subject = get_lang('Certificate notification');
$message = nl2br(get_lang('((user_first_name)),'));
$score = $this->certificate_data['score_certificate'];
self::sendNotification(
$subject,
@ -572,8 +572,8 @@ class Certificate extends Model
$final_content['gradebook_institution'].' - '.
$final_content['gradebook_sitename'].' - '.
get_lang('Certification').$break_space.
get_lang('Student').': '.$final_content['user_firstname'].' '.$final_content['user_lastname'].$break_space.
get_lang('Teacher').': '.$final_content['teacher_firstname'].' '.$final_content['teacher_lastname'].$break_space.
get_lang('Learner').': '.$final_content['user_firstname'].' '.$final_content['user_lastname'].$break_space.
get_lang('Trainer').': '.$final_content['teacher_firstname'].' '.$final_content['teacher_lastname'].$break_space.
get_lang('Date').': '.$final_content['date_certificate'].$break_space.
get_lang('Score').': '.$final_content['gradebook_grade'].$break_space.
'URL'.': '.$final_content['certificate_link'];
@ -872,7 +872,7 @@ class Certificate extends Model
*/
public static function generateUserSkills($userId)
{
$controller = new IndexManager(get_lang('MyCourses'));
$controller = new IndexManager(get_lang('My courses'));
$courseAndSessions = $controller->returnCoursesAndSessions($userId, true, null, true, false);
if (isset($courseAndSessions['courses']) && !empty($courseAndSessions['courses'])) {

@ -498,9 +498,9 @@ class CourseCategory
$row = 0;
$headers = [
get_lang('Category'),
get_lang('SubCat'),
get_lang('Sub-categories'),
get_lang('Courses'),
get_lang('Actions'),
get_lang('Detail'),
];
foreach ($headers as $header) {
$table->setHeaderContents($row, $column, $header);
@ -511,19 +511,19 @@ class CourseCategory
$editIcon = Display::return_icon(
'edit.png',
get_lang('EditNode'),
get_lang('Edit this category'),
null,
ICON_SIZE_SMALL
);
$deleteIcon = Display::return_icon(
'delete.png',
get_lang('DeleteNode'),
get_lang('Delete this category'),
null,
ICON_SIZE_SMALL
);
$moveIcon = Display::return_icon(
'up.png',
get_lang('UpInSameLevel'),
get_lang('Up in same level'),
null,
ICON_SIZE_SMALL
);
@ -546,7 +546,7 @@ class CourseCategory
$title = Display::url(
Display::return_icon(
'folder_document.gif',
get_lang('OpenNode'),
get_lang('Open this category'),
null,
ICON_SIZE_SMALL
).' '.$category['name'].' ('.$category['code'].')',
@ -568,7 +568,7 @@ class CourseCategory
return $table->toHtml();
} else {
return Display::return_message(get_lang('NoCategories'), 'warning');
return Display::return_message(get_lang('There are no categories here'), 'warning');
}
}
@ -896,7 +896,7 @@ class CourseCategory
*/
public static function getCourseCatalogNameTools($action)
{
$nameTools = get_lang('MyCourses');
$nameTools = get_lang('My courses');
if (empty($action)) {
return $nameTools; //should never happen
}
@ -906,10 +906,10 @@ class CourseCategory
case 'subscribe_user_with_password':
case 'display_random_courses':
case 'display_courses':
$nameTools = get_lang('CourseManagement');
$nameTools = get_lang('Courses catalog');
break;
case 'display_sessions':
$nameTools = get_lang('Sessions');
$nameTools = get_lang('Course sessions');
break;
default:
// Nothing to do

@ -337,12 +337,12 @@ class CourseDescription
public function get_default_description_title()
{
$default_description_titles = [];
$default_description_titles[1] = get_lang('GeneralDescription');
$default_description_titles[1] = get_lang('Description');
$default_description_titles[2] = get_lang('Objectives');
$default_description_titles[3] = get_lang('Topics');
$default_description_titles[4] = get_lang('Methodology');
$default_description_titles[5] = get_lang('CourseMaterial');
$default_description_titles[6] = get_lang('HumanAndTechnicalResources');
$default_description_titles[5] = get_lang('Course material');
$default_description_titles[6] = get_lang('Resources');
$default_description_titles[7] = get_lang('Assessment');
$default_description_titles[8] = get_lang('Other');
@ -397,14 +397,14 @@ class CourseDescription
public function get_default_question()
{
$question = [];
$question[1] = get_lang('GeneralDescriptionQuestions');
$question[2] = get_lang('ObjectivesQuestions');
$question[3] = get_lang('TopicsQuestions');
$question[4] = get_lang('MethodologyQuestions');
$question[5] = get_lang('CourseMaterialQuestions');
$question[6] = get_lang('HumanAndTechnicalResourcesQuestions');
$question[7] = get_lang('AssessmentQuestions');
//$question[8]= get_lang('ThematicAdvanceQuestions');
$question[1] = get_lang('DescriptionQuestions');
$question[2] = get_lang('What should the end results be when the learner has completed the course? What are the activities performed during the course?');
$question[3] = get_lang('How does the course progress? Where should the learner pay special care? Are there identifiable problems in understanding different areas? How much time should one dedicate to the different areas of the course?');
$question[4] = get_lang('What methods and activities help achieve the objectives of the course? What would the schedule be?');
$question[5] = get_lang('Course materialQuestions');
$question[6] = get_lang('ResourcesQuestions');
$question[7] = get_lang('How will learners be assessed? Are there strategies to develop in order to master the topic?');
//$question[8]= get_lang('What is the current progress you have reached with your learners inside your course? How much do you think is remaining in comparison to the complete program?');
return $question;
}
@ -417,14 +417,14 @@ class CourseDescription
public function get_default_information()
{
$information = [];
$information[1] = get_lang('GeneralDescriptionInformation');
$information[2] = get_lang('ObjectivesInformation');
$information[3] = get_lang('TopicsInformation');
$information[4] = get_lang('MethodologyInformation');
$information[5] = get_lang('CourseMaterialInformation');
$information[6] = get_lang('HumanAndTechnicalResourcesInformation');
$information[7] = get_lang('AssessmentInformation');
//$information[8]= get_lang('ThematicAdvanceInformation');
$information[1] = get_lang('DescriptionInformation');
$information[2] = get_lang('What are the objectives of the course (competences, skills, outcomes)?');
$information[3] = get_lang('List of topics included in the training. Importance of each topic. Level of difficulty. Structure and inter-dependence of the different parts.');
$information[4] = get_lang('Presentation of the activities (conference, papers, group research, labs...).');
$information[5] = get_lang('Course materialInformation');
$information[6] = get_lang('ResourcesInformation');
$information[7] = get_lang('Criteria for skills acquisition.');
//$information[8]= get_lang('The thematic advance tool allows you to organize your course through time.');
return $information;
}

@ -695,16 +695,16 @@ class CourseHome
$output = '';
if (!empty($session_category)) {
$output .= '<tr><td>'.get_lang('SessionCategory').': '.'<b>'.$session_category.'</b></td></tr>';
$output .= '<tr><td>'.get_lang('Sessions categories').': '.'<b>'.$session_category.'</b></td></tr>';
}
$dateInfo = SessionManager::parseSessionDates($sessionInfo);
$msgDate = $dateInfo['access'];
$output .= '<tr>
<td style="width:50%">'.get_lang('SessionName').': '.'<b>'.$sessionInfo['name'].'</b></td>
<td>'.get_lang('GeneralCoach').': '.'<b>'.$coachInfo['complete_name'].'</b></td></tr>';
<td style="width:50%">'.get_lang('Session name').': '.'<b>'.$sessionInfo['name'].'</b></td>
<td>'.get_lang('General coach').': '.'<b>'.$coachInfo['complete_name'].'</b></td></tr>';
$output .= '<tr>
<td>'.get_lang('SessionIdentifier').': '.
<td>'.get_lang('Identifier of session').': '.
Display::return_icon('star.png', ' ', ['align' => 'absmiddle']).'
</td>
<td>'.get_lang('Date').': '.'<b>'.$msgDate.'</b>
@ -881,7 +881,7 @@ class CourseHome
$html .= '<div id="'.$styleId.'">';
$html .= Display::url(
Display::return_icon('home.png', get_lang('CourseHomepageLink'), '', ICON_SIZE_MEDIUM),
Display::return_icon('home.png', get_lang('Course home'), '', ICON_SIZE_MEDIUM),
$courseInfo['course_public_url'],
['class' => 'items-icon']
);

@ -311,7 +311,7 @@ class Database
exit;
} else {
error_log($e->getMessage());
api_not_allowed(false, get_lang('GeneralError'));
api_not_allowed(false, get_lang('An error has occured. Please contact your system administrator.'));
exit;
}
}

@ -44,7 +44,7 @@ class Diagnoser
'info' => 'Configuration settings of the database server. To check the database consistency after an upgrade, if you have access to the command line, you can use "php bin/doctrine.php orm:schema-tool:update --dump-sql". This will print a list of database changes that should be applied to your system in order to get the right structure. Index name changes can be ignored. Use "--force" instead of "--dump" to try and execute them in order.',
],
'webserver' => [
'lang' => get_lang('WebServer'),
'lang' => get_lang('Web server'),
'info' => 'Information about your webserver\'s configuration ',
],
'paths' => [
@ -155,12 +155,12 @@ class Diagnoser
$array[] = $this->build_setting(
$status,
'[FILES]',
get_lang('IsWritable').': '.$folder,
get_lang('Is writable').': '.$folder,
'http://be2.php.net/manual/en/function.is-writable.php',
$writable,
1,
'yes_no',
get_lang('DirectoryMustBeWritable')
get_lang('The directory must be writable by the web server')
);
}
@ -169,12 +169,12 @@ class Diagnoser
$array[] = $this->build_setting(
$status,
'[FILES]',
get_lang('DirectoryExists').': /install',
get_lang('The directory exists').': /install',
'http://be2.php.net/file_exists',
$exists,
0,
'yes_no',
get_lang('DirectoryShouldBeRemoved')
get_lang('The directory should be removed (it is no longer necessary)')
);
$app_version = api_get_setting('chamilo_database_version');
@ -197,7 +197,7 @@ class Diagnoser
$message2 = '';
if ($access_url_id === 1) {
if (api_is_windows_os()) {
$message2 .= get_lang('SpaceUsedOnSystemCannotBeMeasuredOnWindows');
$message2 .= get_lang('The space used on disk cannot be measured properly on Windows-based systems.');
} else {
$dir = api_get_path(SYS_PATH);
$du = exec('du -sh '.$dir, $err);
@ -209,7 +209,7 @@ class Diagnoser
$limit = $_configuration[$access_url_id]['hosting_limit_disk_space'];
}
}
$message2 .= sprintf(get_lang('TotalSpaceUsedByPortalXLimitIsYMB'), $size, $limit);
$message2 .= sprintf(get_lang('Total space used by portal %s limit is %s MB'), $size, $limit);
}
}
@ -233,22 +233,22 @@ class Diagnoser
$array[] = $this->build_setting(
self::STATUS_INFORMATION,
'[CONFIG]',
get_lang('VersionFromVersionFile'),
get_lang('Version from the version file'),
'#',
$new_version.' '.$new_version_status,
'-',
null,
get_lang('TheVersionFromTheVersionFileIsUpdatedWithEachVersionIfMainInstallDirectoryIsPresent')
get_lang('The version from the version.php file is updated with each version but only available if the main/install/ directory is present.')
);
$array[] = $this->build_setting(
self::STATUS_INFORMATION,
'[CONFIG]',
get_lang('VersionFromConfigFile'),
get_lang('Version from the config file'),
'#',
api_get_configuration_value('system_version'),
$new_version,
null,
get_lang('TheVersionFromTheConfigurationFileShowsOnTheAdminPageButHasToBeChangedManuallyOnUpgrade')
get_lang('The version from the main configuration file shows on the main administration page, but has to be changed manually on upgrade.')
);
return $array;
@ -275,7 +275,7 @@ class Diagnoser
phpversion(),
'>= '.REQUIRED_PHP_VERSION,
null,
get_lang('PHPVersionInfo')
get_lang('PHP version')
);
$setting = ini_get('output_buffering');
@ -289,7 +289,7 @@ class Diagnoser
$setting,
$req_setting,
'on_off',
get_lang('OutputBufferingInfo')
get_lang('Output buffering setting is "On" for being enabled or "Off" for being disabled. This setting also may be enabled through an integer value (4096 for example) which is the output buffer size.')
);
$setting = ini_get('file_uploads');
@ -303,7 +303,7 @@ class Diagnoser
$setting,
$req_setting,
'on_off',
get_lang('FileUploadsInfo')
get_lang('File uploads indicate whether file uploads are authorized at all')
);
$setting = ini_get('magic_quotes_runtime');
@ -317,7 +317,7 @@ class Diagnoser
$setting,
$req_setting,
'on_off',
get_lang('MagicQuotesRuntimeInfo')
get_lang('This is a highly unrecommended feature which converts values returned by all functions that returned external values to slash-escaped values. This feature should *not* be enabled.')
);
$setting = ini_get('safe_mode');
@ -331,7 +331,7 @@ class Diagnoser
$setting,
$req_setting,
'on_off',
get_lang('SafeModeInfo')
get_lang('Safe mode is a deprecated PHP feature which (badly) limits the access of PHP scripts to other resources. It is recommended to leave it off.')
);
$setting = ini_get('register_globals');
@ -345,7 +345,7 @@ class Diagnoser
$setting,
$req_setting,
'on_off',
get_lang('RegisterGlobalsInfo')
get_lang('Whether to use the register globals feature or not. Using it represents potential security risks with this software.')
);
$setting = ini_get('short_open_tag');
@ -359,7 +359,7 @@ class Diagnoser
$setting,
$req_setting,
'on_off',
get_lang('ShortOpenTagInfo')
get_lang('Whether to allow for short open tags to be used or not. This feature should not be used.')
);
$setting = ini_get('magic_quotes_gpc');
@ -373,7 +373,7 @@ class Diagnoser
$setting,
$req_setting,
'on_off',
get_lang('MagicQuotesGpcInfo')
get_lang('Whether to automatically escape values from GET, POST and COOKIES arrays. A similar feature is provided for the required data inside this software, so using it provokes double slash-escaping of values.')
);
$setting = ini_get('display_errors');
@ -387,7 +387,7 @@ class Diagnoser
$setting,
$req_setting,
'on_off',
get_lang('DisplayErrorsInfo')
get_lang('Show errors on screen. Turn this on on development servers, off on production servers.')
);
$setting = ini_get('default_charset');
@ -404,11 +404,11 @@ class Diagnoser
$setting,
$req_setting,
null,
get_lang('DefaultCharsetInfo')
get_lang('The default character set to be sent when returning pages')
);
$setting = ini_get('max_execution_time');
$req_setting = '300 ('.get_lang('Minimum').')';
$req_setting = '300 ('.get_lang('minimum').')';
$status = $setting >= 300 ? self::STATUS_OK : self::STATUS_WARNING;
$array[] = $this->build_setting(
$status,
@ -418,11 +418,11 @@ class Diagnoser
$setting,
$req_setting,
null,
get_lang('MaxExecutionTimeInfo')
get_lang('Maximum time a script can take to execute. If using more than that, the script is abandoned to avoid slowing down other users.')
);
$setting = ini_get('max_input_time');
$req_setting = '300 ('.get_lang('Minimum').')';
$req_setting = '300 ('.get_lang('minimum').')';
$status = $setting >= 300 ? self::STATUS_OK : self::STATUS_WARNING;
$array[] = $this->build_setting(
$status,
@ -432,7 +432,7 @@ class Diagnoser
$setting,
$req_setting,
null,
get_lang('MaxInputTimeInfo')
get_lang('The maximum time allowed for a form to be processed by the server. If it takes longer, the process is abandonned and a blank page is returned.')
);
$setting = ini_get('memory_limit');
@ -449,7 +449,7 @@ class Diagnoser
$setting,
$req_setting,
null,
get_lang('MemoryLimitInfo')
get_lang('Maximum memory limit for one single script run. If the memory needed is higher, the process will stop to avoid consuming all the server\'s available memory and thus slowing down other users.')
);
$setting = ini_get('post_max_size');
@ -466,7 +466,7 @@ class Diagnoser
$setting,
$req_setting,
null,
get_lang('PostMaxSizeInfo')
get_lang('This is the maximum size of uploads through forms using the POST method (i.e. classical file upload forms)')
);
$setting = ini_get('upload_max_filesize');
@ -483,7 +483,7 @@ class Diagnoser
$setting,
$req_setting,
null,
get_lang('UploadMaxFilesizeInfo')
get_lang('Maximum volume of an uploaded file. This setting should, most of the time, be matched with the post_max_size variable.')
);
$setting = ini_get('upload_tmp_dir');
@ -496,7 +496,7 @@ class Diagnoser
$setting,
'',
null,
get_lang('UploadTmpDirInfo')
get_lang('The temporary upload directory is a space on the server where files are uploaded before being filtered and treated by PHP.')
);
$setting = ini_get('variables_order');
@ -510,7 +510,7 @@ class Diagnoser
$setting,
$req_setting,
null,
get_lang('VariablesOrderInfo')
get_lang('The order of precedence of Environment, GET, POST, COOKIES and SESSION variables')
);
$setting = ini_get('session.gc_maxlifetime');
@ -524,7 +524,7 @@ class Diagnoser
$setting,
$req_setting,
null,
get_lang('SessionGCMaxLifetimeInfo')
get_lang('The session garbage collector maximum lifetime indicates which maximum time is given between two runs of the garbage collector.')
);
if (api_check_browscap()) {
@ -542,7 +542,7 @@ class Diagnoser
$setting,
$req_setting,
'on_off',
get_lang('BrowscapInfo')
get_lang('Browscap loading browscap.ini file that contains a large amount of data on the browser and its capabilities, so it can be used by the function get_browser () PHP')
);
// Extensions
@ -550,52 +550,52 @@ class Diagnoser
'gd' => [
'link' => 'http://www.php.net/gd',
'expected' => 1,
'comment' => get_lang('ExtensionMustBeLoaded'),
'comment' => get_lang('This extension must be loaded.'),
],
'pdo_mysql' => [
'link' => 'http://php.net/manual/en/ref.pdo-mysql.php',
'expected' => 1,
'comment' => get_lang('ExtensionMustBeLoaded'),
'comment' => get_lang('This extension must be loaded.'),
],
'pcre' => [
'link' => 'http://www.php.net/pcre',
'expected' => 1,
'comment' => get_lang('ExtensionMustBeLoaded'),
'comment' => get_lang('This extension must be loaded.'),
],
'session' => [
'link' => 'http://www.php.net/session',
'expected' => 1,
'comment' => get_lang('ExtensionMustBeLoaded'),
'comment' => get_lang('This extension must be loaded.'),
],
'standard' => [
'link' => 'http://www.php.net/spl',
'expected' => 1,
'comment' => get_lang('ExtensionMustBeLoaded'),
'comment' => get_lang('This extension must be loaded.'),
],
'zlib' => [
'link' => 'http://www.php.net/zlib',
'expected' => 1,
'comment' => get_lang('ExtensionMustBeLoaded'),
'comment' => get_lang('This extension must be loaded.'),
],
'xsl' => [
'link' => 'http://be2.php.net/xsl',
'expected' => 2,
'comment' => get_lang('ExtensionShouldBeLoaded'),
'comment' => get_lang('This extension should be loaded.'),
],
'curl' => [
'link' => 'http://www.php.net/curl',
'expected' => 2,
'comment' => get_lang('ExtensionShouldBeLoaded'),
'comment' => get_lang('This extension should be loaded.'),
],
'Zend OPcache' => [
'link' => 'http://www.php.net/opcache',
'expected' => 2,
'comment' => get_lang('ExtensionShouldBeLoaded'),
'comment' => get_lang('This extension should be loaded.'),
],
'apcu' => [
'link' => 'http://www.php.net/apcu',
'expected' => 2,
'comment' => get_lang('ExtensionShouldBeLoaded'),
'comment' => get_lang('This extension should be loaded.'),
],
];
@ -609,7 +609,7 @@ class Diagnoser
$array[] = $this->build_setting(
$status,
'[EXTENSION]',
get_lang('LoadedExtension').': '.$extension,
get_lang('Extension loaded').': '.$extension,
$url,
$loaded,
$expected_value,
@ -655,7 +655,7 @@ class Diagnoser
$host,
null,
null,
get_lang('MysqlHostInfo')
get_lang('MySQL server host')
);
$array[] = $this->build_setting(
@ -700,7 +700,7 @@ class Diagnoser
$_SERVER["SERVER_NAME"],
null,
null,
get_lang('ServerNameInfo')
get_lang('Server name (as used in your request)')
);
$array[] = $this->build_setting(
self::STATUS_INFORMATION,
@ -710,7 +710,7 @@ class Diagnoser
$_SERVER["SERVER_ADDR"],
null,
null,
get_lang('ServerAddessInfo')
get_lang('Server address')
);
$array[] = $this->build_setting(
self::STATUS_INFORMATION,
@ -720,7 +720,7 @@ class Diagnoser
$_SERVER["SERVER_PORT"],
null,
null,
get_lang('ServerPortInfo')
get_lang('Server port')
);
$array[] = $this->build_setting(
self::STATUS_INFORMATION,
@ -730,7 +730,7 @@ class Diagnoser
$_SERVER["SERVER_SOFTWARE"],
null,
null,
get_lang('ServerSoftwareInfo')
get_lang('Software running as a web server')
);
$array[] = $this->build_setting(
self::STATUS_INFORMATION,
@ -740,7 +740,7 @@ class Diagnoser
$_SERVER["REMOTE_ADDR"],
null,
null,
get_lang('ServerRemoteInfo')
get_lang('Remote address (your address as received by the server)')
);
$array[] = $this->build_setting(
self::STATUS_INFORMATION,
@ -750,7 +750,7 @@ class Diagnoser
$_SERVER["HTTP_USER_AGENT"],
null,
null,
get_lang('ServerUserAgentInfo')
get_lang('Your user agent as received by the server')
);
$array[] = $this->build_setting(
self::STATUS_INFORMATION,
@ -760,7 +760,7 @@ class Diagnoser
$_SERVER["SERVER_PROTOCOL"],
null,
null,
get_lang('ServerProtocolInfo')
get_lang('Protocol used by this server')
);
$array[] = $this->build_setting(
self::STATUS_INFORMATION,
@ -770,7 +770,7 @@ class Diagnoser
php_uname(),
null,
null,
get_lang('UnameInfo')
get_lang('Information on the system the current server is running on')
);
$array[] = $this->build_setting(
self::STATUS_INFORMATION,
@ -780,7 +780,7 @@ class Diagnoser
(!empty($_SERVER["HTTP_X_FORWARDED_FOR"]) ? $_SERVER["HTTP_X_FORWARDED_FOR"] : ''),
null,
null,
get_lang('ServerXForwardedForInfo')
get_lang('If the server is behind a proxy or firewall (and only in those cases), it might be using the X_FORWARDED_FOR HTTP header to show the remote user IP (yours, in this case).')
);
return $array;

@ -710,10 +710,10 @@ class ExtraFieldOption extends Model
public function getPriorityOptions()
{
return [
'' => get_lang('SelectAnOption'),
'' => get_lang('Please select an option'),
1 => get_lang('Success'),
2 => get_lang('Info'),
3 => get_lang('Warning'),
2 => get_lang('Information'),
3 => get_lang('Warning !'),
4 => get_lang('Error'),
];
}
@ -754,7 +754,7 @@ class ExtraFieldOption extends Model
// Setting the form elements
$header = get_lang('Add');
if ($action == 'edit') {
$header = get_lang('Modify');
$header = get_lang('Edit');
}
$form->addElement('header', $header);
@ -769,7 +769,7 @@ class ExtraFieldOption extends Model
'extra_field_option' => $id,
]);
$translateButton = Display::toolbarButton(
get_lang('TranslateThisTerm'),
get_lang('Translate this term'),
$translateUrl,
'language',
'link'
@ -786,7 +786,7 @@ class ExtraFieldOption extends Model
$form->addElement('text', 'option_value', get_lang('Value'));
$form->addElement('text', 'option_order', get_lang('Order'));
$form->addElement('select', 'priority', get_lang('Priority'), $this->getPriorityOptions());
$form->addElement('textarea', 'priority_message', get_lang('PriorityOfMessage'));
$form->addElement('textarea', 'priority_message', get_lang('Message type'));
$defaults = [];
@ -794,7 +794,7 @@ class ExtraFieldOption extends Model
// Setting the defaults
$defaults = $this->get($id, false);
$form->freeze('option_value');
$form->addButtonUpdate(get_lang('Modify'));
$form->addButtonUpdate(get_lang('Edit'));
} else {
$form->addButtonCreate(get_lang('Add'));
}
@ -802,8 +802,8 @@ class ExtraFieldOption extends Model
$form->setDefaults($defaults);
// Setting the rules
$form->addRule('display_text', get_lang('ThisFieldIsRequired'), 'required');
$form->addRule('option_value', get_lang('ThisFieldIsRequired'), 'required');
$form->addRule('display_text', get_lang('Required field'), 'required');
$form->addRule('option_value', get_lang('Required field'), 'required');
return $form;
}

@ -96,7 +96,7 @@ function process_uploaded_file($uploaded_file, $show_output = true)
if ($show_output) {
Display::addFlash(
Display::return_message(
get_lang('UplExceedMaxServerUpload').ini_get('upload_max_filesize'),
get_lang('The uploaded file exceeds the maximum filesize allowed by the server:').ini_get('upload_max_filesize'),
'error'
)
);
@ -111,7 +111,7 @@ function process_uploaded_file($uploaded_file, $show_output = true)
if ($show_output) {
Display::addFlash(
Display::return_message(
get_lang('UplExceedMaxPostSize').format_file_size($max_file_size),
get_lang('The file size exceeds the maximum allowed setting:').format_file_size($max_file_size),
'error'
)
);
@ -123,7 +123,7 @@ function process_uploaded_file($uploaded_file, $show_output = true)
if ($show_output) {
Display::addFlash(
Display::return_message(
get_lang('UplPartialUpload').' '.get_lang('PleaseTryAgain'),
get_lang('The uploaded file was only partially uploaded.').' '.get_lang('Please Try Again!'),
'error'
)
);
@ -135,7 +135,7 @@ function process_uploaded_file($uploaded_file, $show_output = true)
if ($show_output) {
Display::addFlash(
Display::return_message(
get_lang('UplNoFileUploaded').' '.get_lang('UplSelectFileFirst'),
get_lang('No file was uploaded.').' '.get_lang('Please select a file before pressing the upload button.'),
'error'
)
);
@ -148,7 +148,7 @@ function process_uploaded_file($uploaded_file, $show_output = true)
if (!file_exists($uploaded_file['tmp_name'])) {
// No file was uploaded.
if ($show_output) {
Display::addFlash(Display::return_message(get_lang('UplUploadFailed'), 'error'));
Display::addFlash(Display::return_message(get_lang('The file upload has failed.'), 'error'));
}
return false;
@ -161,7 +161,7 @@ function process_uploaded_file($uploaded_file, $show_output = true)
if ($show_output) {
Display::addFlash(
Display::return_message(
get_lang('UplUploadFailedSizeIsZero'),
get_lang('The file upload has failed.SizeIsZero'),
'error'
)
);
@ -181,7 +181,7 @@ function process_uploaded_file($uploaded_file, $show_output = true)
if ($show_output) {
Display::addFlash(
Display::return_message(
get_lang('UplNotEnoughSpace'),
get_lang('There is not enough space to upload this file.'),
'error'
)
);
@ -269,7 +269,7 @@ function handle_uploaded_document(
// Check if there is enough space to save the file
if (!DocumentManager::enough_space($uploadedFile['size'], $maxSpace)) {
if ($output) {
Display::addFlash(Display::return_message(get_lang('UplNotEnoughSpace'), 'error'));
Display::addFlash(Display::return_message(get_lang('There is not enough space to upload this file.'), 'error'));
}
return false;
@ -294,7 +294,7 @@ function handle_uploaded_document(
// We can only unzip ZIP files (no gz, tar,...)
if ($output) {
Display::addFlash(
Display::return_message(get_lang('UplNotAZip')." ".get_lang('PleaseTryAgain'), 'error')
Display::return_message(get_lang('The file you selected was not a zip file.')." ".get_lang('Please Try Again!'), 'error')
);
}
@ -310,7 +310,7 @@ function handle_uploaded_document(
if (!filter_extension($cleanName)) {
if ($output) {
Display::addFlash(
Display::return_message(get_lang('UplUnableToSaveFileFilteredExtension'), 'error')
Display::return_message(get_lang('File upload failed: this file extension or file type is prohibited'), 'error')
);
}
@ -397,8 +397,8 @@ function handle_uploaded_document(
if ($document && $output) {
Display::addFlash(
Display::return_message(
get_lang('UplUploadSucceeded').'<br /> '.
$document->getTitle().' '.get_lang('UplFileOverwritten'),
get_lang('File upload succeeded!').'<br /> '.
$document->getTitle().' '.get_lang(' was overwritten.'),
'confirmation',
false
)
@ -428,7 +428,7 @@ function handle_uploaded_document(
if ($document) {
Display::addFlash(
Display::return_message(
get_lang('UplUploadSucceeded').'<br /> '.$documentTitle,
get_lang('File upload succeeded!').'<br /> '.$documentTitle,
'confirmation',
false
)
@ -481,8 +481,8 @@ function handle_uploaded_document(
if ($output && $document) {
Display::addFlash(
Display::return_message(
get_lang('UplUploadSucceeded').'<br />'.
get_lang('UplFileSavedAs').' '.$document->getTitle(),
get_lang('File upload succeeded!').'<br />'.
get_lang('File saved as').' '.$document->getTitle(),
'success',
false
)
@ -496,7 +496,7 @@ function handle_uploaded_document(
if ($output) {
Display::addFlash(
Display::return_message(
$uploadPath.$cleanName.' '.get_lang('UplAlreadyExists'),
$uploadPath.$cleanName.' '.get_lang(' already exists.'),
'warning',
false
)
@ -510,7 +510,7 @@ function handle_uploaded_document(
if ($document) {
if ($output) {
Display::addFlash(
Display::return_message($cleanName.' '.get_lang('UplAlreadyExists'), 'warning', false)
Display::return_message($cleanName.' '.get_lang(' already exists.'), 'warning', false)
);
}
} else {
@ -536,7 +536,7 @@ function handle_uploaded_document(
if ($output) {
Display::addFlash(
Display::return_message(
get_lang('UplUploadSucceeded').'<br /> '.$documentTitle,
get_lang('File upload succeeded!').'<br /> '.$documentTitle,
'confirm',
false
)
@ -548,7 +548,7 @@ function handle_uploaded_document(
if ($output) {
Display::addFlash(
Display::return_message(
get_lang('UplUnableToSaveFile'),
get_lang('The uploaded file could not be saved (perhaps a permission problem?)'),
'error',
false
)
@ -839,7 +839,7 @@ function unzip_uploaded_file($uploaded_file, $upload_path, $base_work_dir, $max_
foreach ($zip_content_array as &$this_content) {
if (preg_match('~.(php.*|phtml)$~i', $this_content['filename'])) {
Display::addFlash(
Display::return_message(get_lang('ZipNoPhp'))
Display::return_message(get_lang('The zip file can not contain .PHP files'))
);
return false;
@ -863,7 +863,7 @@ function unzip_uploaded_file($uploaded_file, $upload_path, $base_work_dir, $max_
if (!$ok_scorm && defined('CHECK_FOR_SCORM') && CHECK_FOR_SCORM) {
Display::addFlash(
Display::return_message(get_lang('NotScormContent'))
Display::return_message(get_lang('This is not a valid SCORM ZIP file !'))
);
return false;
@ -871,7 +871,7 @@ function unzip_uploaded_file($uploaded_file, $upload_path, $base_work_dir, $max_
if (!enough_size($realFileSize, $base_work_dir, $max_filled_space)) {
Display::addFlash(
Display::return_message(get_lang('NoSpace'))
Display::return_message(get_lang('The upload has failed. Either you have exceeded your maximum quota, or there is not enough disk space.'))
);
return false;
@ -980,7 +980,7 @@ function unzip_uploaded_document(
}
if (!DocumentManager::enough_space($realSize, $maxFilledSpace)) {
echo Display::return_message(get_lang('UplNotEnoughSpace'), 'error');
echo Display::return_message(get_lang('There is not enough space to upload this file.'), 'error');
return false;
}
@ -1626,7 +1626,7 @@ function build_missing_files_form($missing_files, $upload_path, $file_name)
$added_slash = ($upload_path == '/') ? '' : '/';
$folder_id = DocumentManager::get_document_id(api_get_course_info(), $upload_path);
// Build the form
$form = "<p><strong>".get_lang('MissingImagesDetected')."</strong></p>"
$form = "<p><strong>".get_lang('Missing images detected')."</strong></p>"
."<form method=\"post\" action=\"".api_get_self()."\" enctype=\"multipart/form-data\">"
// Related_file is the path to the file that has missing images
."<input type=\"hidden\" name=\"related_file\" value=\"".$upload_path.$added_slash.$file_name."\" />"
@ -1644,7 +1644,7 @@ function build_missing_files_form($missing_files, $upload_path, $file_name)
}
$form .= "</table>"
."<button type='submit' name=\"cancel_submit_image\" value=\"".get_lang('Cancel')."\" class=\"cancel\">".get_lang('Cancel')."</button>"
."<button type='submit' name=\"submit_image\" value=\"".get_lang('Ok')."\" class=\"save\">".get_lang('Ok')."</button>"
."<button type='submit' name=\"submit_image\" value=\"".get_lang('Validate')."\" class=\"save\">".get_lang('Validate')."</button>"
."</form>";
return $form;
@ -1754,7 +1754,7 @@ function add_all_documents_in_folder_to_database(
);
Display::addFlash(
Display::return_message(
$folderData['path'].' '.get_lang('UplAlreadyExists'),
$folderData['path'].' '.get_lang(' already exists.'),
'warning'
)
);

@ -51,9 +51,9 @@ class DatePicker extends HTML_QuickForm_text
<input class="form-control" type="hidden" id="'.$id.'_alt" value="'.$value.'">
<span class="input-group-btn">
<button class="btn btn-default" type="button"
title="'.sprintf(get_lang('ResetFieldX'), $this->_label).'">
title="'.sprintf(get_lang('Reset %s'), $this->_label).'">
<span class="fa fa-trash text-danger" aria-hidden="true"></span>
<span class="sr-only">'.sprintf(get_lang('ResetFieldX'), $this->_label).'</span>
<span class="sr-only">'.sprintf(get_lang('Reset %s'), $this->_label).'</span>
</button>
</span>
</div>
@ -150,11 +150,11 @@ class DatePicker extends HTML_QuickForm_text
defaultDate: '".$this->getValue()."',
dateFormat: 'yy-mm-dd',
altField: '#{$id}_alt',
altFormat: \"".get_lang('DateFormatLongNoDayJS')."\",
altFormat: \"".get_lang('MM dd, yy')."\",
showOn: 'both',
buttonImage: '".Display::return_icon('attendance.png', null, [], ICON_SIZE_TINY, true, true)."',
buttonImageOnly: true,
buttonText: '".get_lang('SelectDate')."',
buttonText: '".get_lang('Select date')."',
changeMonth: true,
changeYear: true,
yearRange: 'c-60y:c+5y'

@ -127,7 +127,7 @@ class DateRangePicker extends HTML_QuickForm_text
$validateFormat = $this->getAttribute('validate_format');
if (!$this->validateDates($parsedDates, $validateFormat)) {
$errors[$elementName] = get_lang('CheckDates');
$errors[$elementName] = get_lang('Validate dates');
}
$submitValues[$elementName.'_start'] = $parsedDates['start'];
$submitValues[$elementName.'_end'] = $parsedDates['end'];
@ -195,21 +195,21 @@ class DateRangePicker extends HTML_QuickForm_text
ranges: {
'".addslashes(get_lang('Today'))."': [moment(), moment()],
'".addslashes(get_lang('Yesterday'))."': [moment().subtract(1, 'days'), moment().subtract(1, 'days')],
'".addslashes(get_lang('ThisMonth'))."': [moment().startOf('month'), moment().endOf('month')],
'".addslashes(get_lang('LastMonth'))."': [moment().subtract(1, 'month').startOf('month'), moment().subtract(1, 'month').endOf('month')],
'".addslashes(get_lang('ThisWeek'))."': [moment().weekday(1), moment().weekday(5)],
'".addslashes(get_lang('NextWeek'))."': [moment().weekday(8), moment().weekday(12)]
'".addslashes(get_lang('This month'))."': [moment().startOf('month'), moment().endOf('month')],
'".addslashes(get_lang('Last month'))."': [moment().subtract(1, 'month').startOf('month'), moment().subtract(1, 'month').endOf('month')],
'".addslashes(get_lang('This week'))."': [moment().weekday(1), moment().weekday(5)],
'".addslashes(get_lang('Next Week'))."': [moment().weekday(8), moment().weekday(12)]
},
//showDropdowns : true,
locale: {
separator: ' / ',
format: '$format',
applyLabel: '".addslashes(get_lang('Ok'))."',
applyLabel: '".addslashes(get_lang('Validate'))."',
cancelLabel: '".addslashes(get_lang('Cancel'))."',
fromLabel: '".addslashes(get_lang('From'))."',
toLabel: '".addslashes(get_lang('Until'))."',
customRangeLabel: '".addslashes(get_lang('CustomRange'))."',
customRangeLabel: '".addslashes(get_lang('Custom range'))."',
}
});

@ -47,7 +47,7 @@ class DateTimePicker extends HTML_QuickForm_text
$label = $label[0];
}
$resetFieldX = sprintf(get_lang('ResetFieldX'), $label);
$resetFieldX = sprintf(get_lang('Reset %s'), $label);
return '
<div class="input-group mb-3" id="date_time_wrapper_'.$id.'">
@ -154,14 +154,14 @@ class DateTimePicker extends HTML_QuickForm_text
dateFormat: 'yy-mm-dd',
timeFormat: 'HH:mm',
altField: '#{$id}_alt',
altFormat: \"".get_lang('DateFormatLongNoDayJS')."\",
altTimeFormat: \"".get_lang('TimeFormatNoSecJS')."\",
altSeparator: \" ".get_lang('AtTime')." \",
altFormat: \"".get_lang('MM dd, yy')."\",
altTimeFormat: \"".get_lang('HH:mm')."\",
altSeparator: \" ".get_lang(' at')." \",
altFieldTimeOnly: false,
showOn: 'both',
buttonImage: '".Display::return_icon('attendance.png', null, [], ICON_SIZE_TINY, true, true)."',
buttonImageOnly: true,
buttonText: '".get_lang('SelectDate')."',
buttonText: '".get_lang('Select date')."',
changeMonth: true,
changeYear: true
})

@ -37,9 +37,9 @@ class DateTimeRangePicker extends DateRangePicker
<input class="form-control" type="hidden" id="'.$id.'_alt" value="'.$value.'">
<span class="input-group-btn">
<button class="btn btn-default" type="button"
title="'.sprintf(get_lang('ResetFieldX'), $this->_label).'">
title="'.sprintf(get_lang('Reset %s'), $this->_label).'">
<span class="fa fa-trash text-danger" aria-hidden="true"></span>
<span class="sr-only">'.sprintf(get_lang('ResetFieldX'), $this->_label).'</span>
<span class="sr-only">'.sprintf(get_lang('Reset %s'), $this->_label).'</span>
</button>
</span>
</div>
@ -195,11 +195,11 @@ class DateTimeRangePicker extends DateRangePicker
defaultDate: '".$defaultDate."',
dateFormat: 'yy-mm-dd',
altField: '#{$id}_alt',
altFormat: \"".get_lang('DateFormatLongNoDayJS')."\",
altFormat: \"".get_lang('MM dd, yy')."\",
showOn: 'both',
buttonImage: '".Display::return_icon('attendance.png', null, [], ICON_SIZE_TINY, true, true)."',
buttonImageOnly: true,
buttonText: '".get_lang('SelectDate')."',
buttonText: '".get_lang('Select date')."',
changeMonth: true,
changeYear: true,
yearRange: 'c-60y:c+5y'

@ -126,7 +126,7 @@ class GlossaryManager
// display the feedback message
if ($showMessage) {
Display::addFlash(
Display::return_message(get_lang('GlossaryTermAlreadyExistsYouShouldEditIt'), 'error')
Display::return_message(get_lang('This glossary term already exists. Please change the term name.'), 'error')
);
}
@ -158,7 +158,7 @@ class GlossaryManager
// display the feedback message
if ($showMessage) {
Display::addFlash(
Display::return_message(get_lang('TermAdded'))
Display::return_message(get_lang('Term added'))
);
}
@ -184,7 +184,7 @@ class GlossaryManager
// display the feedback message
if ($showMessage) {
Display::addFlash(
Display::return_message(get_lang('GlossaryTermAlreadyExistsYouShouldEditIt'), 'error')
Display::return_message(get_lang('This glossary term already exists. Please change the term name.'), 'error')
);
}
@ -213,7 +213,7 @@ class GlossaryManager
if ($showMessage) {
// display the feedback message
Display::addFlash(
Display::return_message(get_lang('TermUpdated'))
Display::return_message(get_lang('Term updated'))
);
}
}
@ -360,7 +360,7 @@ class GlossaryManager
if ($showMessage) {
Display::addFlash(
Display::return_message(
get_lang('TermDeleted').': '.Security::remove_XSS($glossaryInfo['name']),
get_lang('Term removed').': '.Security::remove_XSS($glossaryInfo['name']),
'normal',
false
)
@ -404,12 +404,12 @@ class GlossaryManager
$actionsLeft = '';
if (api_is_allowed_to_edit(null, true)) {
$actionsLeft .= '<a href="index.php?'.api_get_cidreq().'&action=addglossary&msg=add?'.api_get_cidreq().'">'.
Display::return_icon('new_glossary_term.png', get_lang('TermAddNew'), '', ICON_SIZE_MEDIUM).'</a>';
Display::return_icon('new_glossary_term.png', get_lang('Add new glossary term'), '', ICON_SIZE_MEDIUM).'</a>';
}
if (api_is_allowed_to_edit(null, true)) {
$actionsLeft .= '<a href="index.php?'.api_get_cidreq().'&action=import">'.
Display::return_icon('import.png', get_lang('ImportGlossary'), '', ICON_SIZE_MEDIUM).'</a>';
Display::return_icon('import.png', get_lang('Import glossary'), '', ICON_SIZE_MEDIUM).'</a>';
}
if (!api_is_anonymous()) {
@ -419,15 +419,15 @@ class GlossaryManager
if ($view === 'table' || !isset($view)) {
$actionsLeft .= '<a href="index.php?'.api_get_cidreq().'&action=changeview&view=list">'.
Display::return_icon('view_detailed.png', get_lang('ListView'), '', ICON_SIZE_MEDIUM).'</a>';
Display::return_icon('view_detailed.png', get_lang('List view'), '', ICON_SIZE_MEDIUM).'</a>';
} else {
$actionsLeft .= '<a href="index.php?'.api_get_cidreq().'&action=changeview&view=table">'.
Display::return_icon('view_text.png', get_lang('TableView'), '', ICON_SIZE_MEDIUM).'</a>';
Display::return_icon('view_text.png', get_lang('Table view'), '', ICON_SIZE_MEDIUM).'</a>';
}
if (api_is_allowed_to_edit(true, true, true)) {
$actionsLeft .= Display::url(
Display::return_icon('export_to_documents.png', get_lang('ExportToDocArea'), [], ICON_SIZE_MEDIUM),
Display::return_icon('export_to_documents.png', get_lang('Export latest version of this page to Documents'), [], ICON_SIZE_MEDIUM),
api_get_self().'?'.api_get_cidreq().'&'.http_build_query(['action' => 'export_documents'])
);
}
@ -479,10 +479,10 @@ class GlossaryManager
['GlossaryManager', 'get_glossary_data'],
0
);
$table->set_header(0, get_lang('TermName'), true);
$table->set_header(1, get_lang('TermDefinition'), true);
$table->set_header(0, get_lang('Term'), true);
$table->set_header(1, get_lang('Term definition'), true);
if (api_is_allowed_to_edit(null, true)) {
$table->set_header(2, get_lang('Actions'), false, 'width=90px', ['class' => 'td_actions']);
$table->set_header(2, get_lang('Detail'), false, 'width=90px', ['class' => 'td_actions']);
$table->set_column_filter(2, ['GlossaryManager', 'actions_filter']);
}
$content .= $table->return_table();
@ -665,7 +665,7 @@ class GlossaryManager
$return .= '<a href="'.api_get_self().'?action=delete_glossary&glossary_id='.$glossary_id.'&'.api_get_cidreq().'" onclick="return confirmation(\''.$glossary_term.'\');">'.
Display::return_icon('delete.png', get_lang('Delete'), '', 22).'</a>';
} else {
$return = get_lang('EditionNotAvailableFromSession');
$return = get_lang('Edition not available from the session, please edit from the basic course.');
}
}
@ -681,7 +681,7 @@ class GlossaryManager
{
return "<script>
function confirmation (name) {
if (confirm(\" ".get_lang("TermConfirmDelete")." \"+ name + \" ?\")) {
if (confirm(\" ".get_lang("Do you really want to delete this term")." \"+ name + \" ?\")) {
return true;
} else {
return false;
@ -756,7 +756,7 @@ class GlossaryManager
Database::query($sql1);
Database::query($sql2);
Display::addFlash(Display::return_message(get_lang('TermMoved')));
Display::addFlash(Display::return_message(get_lang('The term has moved')));
}
/**
@ -820,7 +820,7 @@ class GlossaryManager
return true;
} else {
Display::addFlash(Display::return_message(get_lang('NothingToAdd')));
Display::addFlash(Display::return_message(get_lang('Nothing to add')));
}
return false;

@ -3,8 +3,6 @@
/**
* Class GradeModel.
*
* @package chamilo.library
*/
class GradeModel extends Model
{
@ -82,7 +80,7 @@ class GradeModel extends Model
$header = get_lang('Add');
if ($action == 'edit') {
$header = get_lang('Modify');
$header = get_lang('Edit');
}
$id = isset($_GET['id']) ? intval($_GET['id']) : '';
@ -159,23 +157,23 @@ class GradeModel extends Model
$renderer->setElementTemplate($template_acronym, 'components['.$i.'][acronym]');
if ($i == 0) {
$form->addRule('components['.$i.'][percentage]', get_lang('ThisFieldIsRequired'), 'required');
$form->addRule('components['.$i.'][acronym]', get_lang('ThisFieldIsRequired'), 'required');
$form->addRule('components['.$i.'][title]', get_lang('ThisFieldIsRequired'), 'required');
$form->addRule('components['.$i.'][percentage]', get_lang('Required field'), 'required');
$form->addRule('components['.$i.'][acronym]', get_lang('Required field'), 'required');
$form->addRule('components['.$i.'][title]', get_lang('Required field'), 'required');
}
$form->addRule('components['.$i.'][percentage]', get_lang('OnlyNumbers'), 'numeric');
$form->addRule(['components['.$i.'][percentage]', 'maxvalue'], get_lang('Over100'), 'compare', '<=');
$form->addRule(['components['.$i.'][percentage]', 'minvalue'], get_lang('UnderMin'), 'compare', '>=');
$form->addRule('components['.$i.'][percentage]', get_lang('Only numbers'), 'numeric');
$form->addRule(['components['.$i.'][percentage]', 'maxvalue'], get_lang('Over 100'), 'compare', '<=');
$form->addRule(['components['.$i.'][percentage]', 'minvalue'], get_lang('Under the minimum.'), 'compare', '>=');
$component_array[] = 'components['.$i.'][percentage]';
}
//New rule added in the formvalidator compare_fields that filters a group of fields in order to compare with the wanted value
$form->addRule($component_array, get_lang('AllMustWeight100'), 'compare_fields', '==@100');
$form->addElement('label', '', get_lang('AllMustWeight100'));
$form->addRule($component_array, get_lang('The sum of all values must be 100'), 'compare_fields', '==@100');
$form->addElement('label', '', get_lang('The sum of all values must be 100'));
if ($action == 'edit') {
$form->addButtonUpdate(get_lang('Modify'));
$form->addButtonUpdate(get_lang('Edit'));
} else {
$form->addButtonCreate(get_lang('Add'));
}
@ -192,7 +190,7 @@ class GradeModel extends Model
$form->setDefaults($defaults);
// Setting the rules
$form->addRule('name', get_lang('ThisFieldIsRequired'), 'required');
$form->addRule('name', get_lang('Required field'), 'required');
return $form;
}
@ -278,13 +276,13 @@ class GradeModel extends Model
if (api_get_setting('teachers_can_change_grade_model_settings') === 'true' || api_is_platform_admin()) {
$grade_models = $this->get_all();
$grade_model_options = ['-1' => get_lang('None')];
$grade_model_options = ['-1' => get_lang('none')];
if (!empty($grade_models)) {
foreach ($grade_models as $item) {
$grade_model_options[$item['id']] = $item['name'];
}
}
$form->addElement('select', $name, get_lang('GradeModel'), $grade_model_options);
$form->addElement('select', $name, get_lang('Grading model'), $grade_model_options);
$default_platform_setting = api_get_setting('gradebook_default_grade_model_id');
$default = -1;

@ -2,11 +2,9 @@
/* For licensing terms, see /license.txt */
/**
* Class Gradebook
* Class Gradebook.
* This class provides methods for the notebook management.
* Include/require it in your code to use its features.
*
* @package chamilo.library
*/
class Gradebook extends Model
{

@ -3,8 +3,6 @@
/**
* Class LegalManager.
*
* @package chamilo.legal
*/
class LegalManager
{
@ -211,7 +209,7 @@ class LegalManager
$sessionListToString = '';
$sessionList = SessionManager::get_sessions_by_user(api_get_user_id());
if ($sessionList) {
$sessionListToString = get_lang('SessionList').'<ul>';
$sessionListToString = get_lang('Session list').'<ul>';
foreach ($sessionList as $session) {
$sessionListToString .= '<li>'.$session['session_name'].'</li>';
}
@ -266,7 +264,7 @@ class LegalManager
<div id="legal-terms" class="scrollbar-inner">'.$term_preview['content'].'</div>
</div>';
}
$preview .= get_lang('ByClickingRegisterYouAgreeTermsAndConditions');
$preview .= get_lang('By clicking on \'Register\' below you are agreeing to the Terms and Conditions');
$courseInfo = api_get_course_info();
if (api_get_setting('load_term_conditions_section') === 'course' && empty($courseInfo)) {
$preview = '';
@ -275,12 +273,12 @@ class LegalManager
// Page link
case 1:
$preview = '<fieldset>
<legend>'.get_lang('TermsAndConditions').'</legend>';
<legend>'.get_lang('Terms and Conditions').'</legend>';
$preview .= '<div id="legal-accept-wrapper" class="form-item">
<label class="option" for="legal-accept">
<input id="legal-accept" type="checkbox" value="1" name="legal_accept"/>
'.get_lang('IHaveReadAndAgree').'
<a href="#">'.get_lang('TermsAndConditions').'</a>
'.get_lang('I have read and agree to the').'
<a href="#">'.get_lang('Terms and Conditions').'</a>
</label>
</div>
</fieldset>';
@ -325,9 +323,9 @@ class LegalManager
$legal[2] = substr($legal[2], 0, 2000).' ... ';
}
if ($legal[4] == 0) {
$legal[4] = get_lang('HTMLText');
$legal[4] = get_lang('HTML');
} elseif ($legal[4] == 1) {
$legal[4] = get_lang('PageLink');
$legal[4] = get_lang('Page Link');
}
$legals[] = $legal;
}
@ -380,9 +378,9 @@ class LegalManager
*/
public static function sendLegal($userId)
{
$subject = get_lang('SendTermsSubject');
$subject = get_lang('Your terms and conditions are ready to be signed');
$content = sprintf(
get_lang('SendTermsDescriptionToUrlX'),
get_lang('Hello,<br />Your tutor sent you your terms and conditions. You can sign it following this URL: %s'),
api_get_path(WEB_PATH)
);
MessageManager::send_message_simple($userId, $subject, $content);

@ -202,7 +202,7 @@ class Link extends Model
// If the URL is invalid, an error occurs.
if (!api_valid_url($urllink, true)) {
// A check against an absolute URL
Display::addFlash(Display::return_message(get_lang('GiveURL'), 'error'));
Display::addFlash(Display::return_message(get_lang('Please give the link URL, it should be valid.'), 'error'));
return false;
} else {
@ -321,7 +321,7 @@ class Link extends Model
Database:: query($sql);
}
}
Display::addFlash(Display::return_message(get_lang('LinkAdded')));
Display::addFlash(Display::return_message(get_lang('The link has been added.')));
return $link_id;
}
@ -332,7 +332,7 @@ class Link extends Model
$description = trim($_POST['description']);
if (empty($category_title)) {
echo Display::return_message(get_lang('GiveCategoryName'), 'error');
echo Display::return_message(get_lang('Please give the category name'), 'error');
$ok = false;
} else {
// Looking for the largest order number for this category.
@ -372,7 +372,7 @@ class Link extends Model
api_set_default_visibility($linkId, TOOL_LINK_CATEGORY);
}
Display::addFlash(Display::return_message(get_lang('CategoryAdded')));
Display::addFlash(Display::return_message(get_lang('Category added')));
return $linkId;
}
@ -423,7 +423,7 @@ class Link extends Model
);
self::delete_link_from_search_engine(api_get_course_id(), $id);
Skill::deleteSkillsFromItem($id, ITEM_TYPE_LINK);
Display::addFlash(Display::return_message(get_lang('LinkDeleted')));
Display::addFlash(Display::return_message(get_lang('The link has been deleted')));
$result = true;
break;
case 'category':
@ -444,7 +444,7 @@ class Link extends Model
api_get_user_id()
);
Display::addFlash(Display::return_message(get_lang('CategoryDeleted')));
Display::addFlash(Display::return_message(get_lang('The category has been deleted.')));
$result = true;
break;
}
@ -542,7 +542,7 @@ class Link extends Model
// If the URL is invalid, an error occurs.
if (!api_valid_url($values['url'], true)) {
Display::addFlash(
Display::return_message(get_lang('GiveURL'), 'error')
Display::return_message(get_lang('Please give the link URL, it should be valid.'), 'error')
);
return false;
@ -734,7 +734,7 @@ class Link extends Model
'LinkUpdated',
api_get_user_id()
);
Display::addFlash(Display::return_message(get_lang('LinkModded')));
Display::addFlash(Display::return_message(get_lang('The link has been modified.')));
}
/**
@ -759,7 +759,7 @@ class Link extends Model
$params,
['c_id = ? AND id = ?' => [$course_id, $id]]
);
Display::addFlash(Display::return_message(get_lang('CategoryModded')));
Display::addFlash(Display::return_message(get_lang('The category has been modified.')));
return true;
}
@ -783,7 +783,7 @@ class Link extends Model
$_GET['action'],
$_user['user_id']
);
Display::addFlash(Display::return_message(get_lang('VisibilityChanged')));
Display::addFlash(Display::return_message(get_lang('The visibility has been changed.')));
} elseif ($scope == TOOL_LINK_CATEGORY) {
api_item_property_update(
$_course,
@ -792,7 +792,7 @@ class Link extends Model
$_GET['action'],
$_user['user_id']
);
Display::addFlash(Display::return_message(get_lang('VisibilityChanged')));
Display::addFlash(Display::return_message(get_lang('The visibility has been changed.')));
}
}
@ -1015,7 +1015,7 @@ class Link extends Model
'secondary btn-sm',
[
'onclick' => "check_url('".$linkId."', '".addslashes($myrow['url'])."');",
'title' => get_lang('CheckURL'),
'title' => get_lang('Check link'),
]
);
@ -1049,7 +1049,7 @@ class Link extends Model
switch ($myrow['visibility']) {
case '1':
$urlVisibility .= '&action=invisible';
$title = get_lang('MakeInvisible');
$title = get_lang('Make invisible');
$toolbar .= Display::toolbarButton(
'',
$urlVisibility,
@ -1062,7 +1062,7 @@ class Link extends Model
break;
case '0':
$urlVisibility .= '&action=visible';
$title = get_lang('MakeVisible');
$title = get_lang('Make Visible');
$toolbar .= Display::toolbarButton(
'',
$urlVisibility,
@ -1084,8 +1084,8 @@ class Link extends Model
];
$toolbar .= Display::toolbarButton(
get_lang('MoveUp'),
api_get_self().'?'.api_get_cidreq().'&'.http_build_query($moveLinkParams),
get_lang('Move up'),
api_get_self().'?'.api_get_cidreq().'&'.http_build_query($moveLinksParams),
'level-up-alt',
'secondary',
['class' => 'btn-sm '.($i === 1 ? 'disabled' : '')],
@ -1094,8 +1094,8 @@ class Link extends Model
$moveLinkParams['action'] = 'move_link_down';
$toolbar .= Display::toolbarButton(
get_lang('MoveDown'),
api_get_self().'?'.api_get_cidreq().'&'.http_build_query($moveLinkParams),
get_lang('Move down'),
api_get_self().'?'.api_get_cidreq().'&'.http_build_query($moveLinksParams),
'level-down-alt',
'secondary',
['class' => 'btn-sm '.($i === $numberOfLinks ? 'disabled' : '')],
@ -1103,7 +1103,7 @@ class Link extends Model
);
$url = api_get_self().'?'.api_get_cidreq().'&sec_token='.$token.'&action=deletelink&id='.$linkId.'&category_id='.$categoryId;
$event = "javascript: if(!confirm('".get_lang('LinkDelconfirm')."'))return false;";
$event = "javascript: if(!confirm('".get_lang('Do you want to delete this link?')."'))return false;";
$title = get_lang('Delete');
$toolbar .= Display::toolbarButton(
@ -1182,10 +1182,10 @@ class Link extends Model
{
$categoryId = $category['id'];
$token = null;
$tools = '<a href="'.api_get_self().'?'.api_get_cidreq().'&sec_token='.$token.'&action=editcategory&id='.$categoryId.'&category_id='.$categoryId.'" title='.get_lang('Modify').'">'.
$tools = '<a href="'.api_get_self().'?'.api_get_cidreq().'&sec_token='.$token.'&action=editcategory&id='.$categoryId.'&category_id='.$categoryId.'" title='.get_lang('Edit').'">'.
Display:: return_icon(
'edit.png',
get_lang('Modify'),
get_lang('Edit'),
[],
ICON_SIZE_SMALL
).'</a>';
@ -1213,21 +1213,22 @@ class Link extends Model
$tools .= '<a href="'.api_get_self().'?'.api_get_cidreq().'&sec_token='.$token.'&action=down&down='.$categoryId.'&category_id='.$categoryId.'">'.
Display:: return_icon(
'down.png',
get_lang('Down'),
get_lang('down'),
[],
ICON_SIZE_SMALL
).'</a>';
} else {
$tools .= Display:: return_icon(
'down_na.png',
get_lang('Down'),
get_lang('down'),
[],
ICON_SIZE_SMALL
).'</a>';
}
$tools .= '<a href="'.api_get_self().'?'.api_get_cidreq().'&sec_token='.$token.'&action=deletecategory&id='.$categoryId."&category_id=$categoryId\"
onclick=\"javascript: if(!confirm('".get_lang('CategoryDelconfirm')."')) return false;\">".
onclick=\"javascript: if(!confirm('".get_lang('When deleting a category, all links of this category are also deleted.
Do you really want to delete this category and its links ?')."')) return false;\">".
Display:: return_icon(
'delete.png',
get_lang('Delete'),
@ -1311,7 +1312,7 @@ class Link extends Model
}
}
Display::addFlash(Display::return_message(get_lang('LinkMoved')));
Display::addFlash(Display::return_message(get_lang('LinksMoved')));
}
/**
@ -1467,17 +1468,17 @@ class Link extends Model
if (api_is_allowed_to_edit(null, true)) {
$content .= '<a href="'.api_get_self().'?'.api_get_cidreq(
).'&action=addlink&category_id='.$categoryId.'">'.
Display::return_icon('new_link.png', get_lang('LinkAdd'), '', ICON_SIZE_MEDIUM).'</a>';
Display::return_icon('new_link.png', get_lang('LinksAdd'), '', ICON_SIZE_MEDIUM).'</a>';
$content .= '<a href="'.api_get_self().'?'.api_get_cidreq(
).'&action=addcategory&category_id='.$categoryId.'">'.
Display::return_icon('new_folder.png', get_lang('CategoryAdd'), '', ICON_SIZE_MEDIUM).'</a>';
Display::return_icon('new_folder.png', get_lang('Add a category'), '', ICON_SIZE_MEDIUM).'</a>';
}
if (!empty($countCategories)) {
$content .= '<a href="'.api_get_self().'?'.api_get_cidreq().'&action=list&show=none">';
$content .= Display::return_icon(
'forum_listview.png',
get_lang('FlatView'),
get_lang('List View'),
'',
ICON_SIZE_MEDIUM
).' </a>';
@ -1485,14 +1486,14 @@ class Link extends Model
$content .= '<a href="'.api_get_self().'?'.api_get_cidreq().'&action=list&show=all">';
$content .= Display::return_icon(
'forum_nestedview.png',
get_lang('NestedView'),
get_lang('Nested View'),
'',
ICON_SIZE_MEDIUM
).'</a>';
}
$content .= Display::url(
Display::return_icon('pdf.png', get_lang('ExportToPdf'), '', ICON_SIZE_MEDIUM),
Display::return_icon('pdf.png', get_lang('Export to PDF'), '', ICON_SIZE_MEDIUM),
api_get_self().'?'.api_get_cidreq().'&action=export'
);
$content .= '</div>';
@ -1502,7 +1503,7 @@ class Link extends Model
$content .= $linksPerCategory;
} else {
if (!empty($linksPerCategory)) {
$content .= Display::panel($linksPerCategory, get_lang('NoCategory'));
$content .= Display::panel($linksPerCategory, get_lang('General'));
}
}
@ -1548,7 +1549,7 @@ class Link extends Model
$header .= $strVisibility;
$header .= self::showCategoryAdminTools($myrow, $counter, count($categories));
} else {
$header .= get_lang('EditionNotAvailableFromSession');
$header .= get_lang('Edition not available from the session, please edit from the basic course.');
}
}
}
@ -1596,9 +1597,9 @@ class Link extends Model
);
if ($action == 'addlink') {
$form->addHeader(get_lang('LinkAdd'));
$form->addHeader(get_lang('LinksAdd'));
} else {
$form->addHeader(get_lang('LinkMod'));
$form->addHeader(get_lang('LinksMod'));
}
$target_link = '_blank';
@ -1620,8 +1621,8 @@ class Link extends Model
$form->addHidden('id', $linkId);
$form->addText('url', 'URL');
$form->addRule('url', get_lang('GiveURL'), 'url');
$form->addText('title', get_lang('LinkName'));
$form->addRule('url', get_lang('Please give the link URL, it should be valid.'), 'url');
$form->addText('title', get_lang('LinksName'));
$form->addHtmlEditor('description', get_lang('Description'), true, false, ['ToolbarSet' => 'Profile', 'Width' => '100%', 'Height' => '130']);
$resultcategories = self::getLinkCategories($course_id, $session_id);
@ -1633,20 +1634,20 @@ class Link extends Model
}
$form->addSelect('category_id', get_lang('Category'), $options);
$form->addCheckBox('on_homepage', null, get_lang('OnHomepage'));
$form->addCheckBox('on_homepage', null, get_lang('Show link on course homepage'));
$targets = [
'_self' => get_lang('LinkOpenSelf'),
'_blank' => get_lang('LinkOpenBlank'),
'_parent' => get_lang('LinkOpenParent'),
'_top' => get_lang('LinkOpenTop'),
'_self' => get_lang('LinksOpenSelf'),
'_blank' => get_lang('LinksOpenBlank'),
'_parent' => get_lang('LinksOpenParent'),
'_top' => get_lang('LinksOpenTop'),
];
$form->addSelect(
'target',
[
get_lang('LinkTarget'),
get_lang('AddTargetOfLinkOnHomepage'),
get_lang('LinksTarget'),
get_lang('AddTargetOfLinksShow link on course homepage'),
],
$targets
);
@ -1663,7 +1664,7 @@ class Link extends Model
if (api_get_setting('search_enabled') == 'true') {
require_once api_get_path(LIBRARY_PATH).'specific_fields_manager.lib.php';
$specific_fields = get_specific_field_list();
$form->addCheckBox('index_document', get_lang('SearchFeatureDoIndexLink'), get_lang('Yes'));
$form->addCheckBox('index_document', get_lang('Index link title and description?s'), get_lang('Yes'));
foreach ($specific_fields as $specific_field) {
$default_values = '';
@ -1689,7 +1690,7 @@ class Link extends Model
$skillList = Skill::addSkillsToForm($form, ITEM_TYPE_LINK, $linkId);
$form->addHidden('lp_id', $lpId);
$form->addButtonSave(get_lang('SaveLink'), 'submitLink');
$form->addButtonSave(get_lang('Save links'), 'submitLinks');
$defaults['skills'] = array_keys($skillList);
$form->setDefaults($defaults);
@ -1715,15 +1716,15 @@ class Link extends Model
$defaults = [];
if ($action == 'addcategory') {
$form->addHeader(get_lang('CategoryAdd'));
$my_cat_title = get_lang('CategoryAdd');
$form->addHeader(get_lang('Add a category'));
$my_cat_title = get_lang('Add a category');
} else {
$form->addHeader(get_lang('CategoryMod'));
$my_cat_title = get_lang('CategoryMod');
$form->addHeader(get_lang('Edit Category'));
$my_cat_title = get_lang('Edit Category');
$defaults = self::getCategory($id);
}
$form->addHidden('id', $id);
$form->addText('category_title', get_lang('CategoryName'));
$form->addText('category_title', get_lang('Category name'));
$form->addHtmlEditor('description', get_lang('Description'), true, false, ['ToolbarSet' => 'Profile', 'Width' => '100%', 'Height' => '130']);
$form->addButtonSave($my_cat_title, 'submitCategory');
$form->setDefaults($defaults);

@ -227,18 +227,18 @@ class MessageManager
Display::url(
Display::returnFontAwesomeIcon('reply', 2),
$newMessageLink.'?re_id='.$messageId,
['title' => get_lang('ReplyToMessage')]
['title' => get_lang('Reply to this message')]
);
}
} else {
$message[1] = '<a '.$class.' href="'.$viewUrl.'&id='.$messageId.'">'.$title.'</a><br />';
$message[1] .= get_lang('UnknownUser');
$message[1] .= get_lang('Unknown user');
if (in_array('reply', $actions)) {
$message[3] =
Display::url(
Display::returnFontAwesomeIcon('reply', 2),
'#',
['title' => get_lang('ReplyToMessage')]
['title' => get_lang('Reply to this message')]
);
}
}
@ -253,7 +253,7 @@ class MessageManager
Display::url(
Display::returnFontAwesomeIcon('pencil', 2),
$newMessageLink.'?action=edit&id='.$messageId,
['title' => get_lang('ForwardMessage')]
['title' => get_lang('Forward message')]
);
}
@ -264,15 +264,15 @@ class MessageManager
Display::url(
Display::returnFontAwesomeIcon('share', 2),
$newMessageLink.'?forward_id='.$messageId,
['title' => get_lang('ForwardMessage')]
['title' => get_lang('Forward message')]
);
}
if (in_array('delete', $actions)) {
$message[3] .= '&nbsp;&nbsp;<a title="'.addslashes(
get_lang('DeleteMessage')
get_lang('Delete message')
).'" onclick="javascript:if(!confirm('."'".addslashes(
api_htmlentities(get_lang('ConfirmDeleteMessage'))
api_htmlentities(get_lang('ConfirmDelete message'))
)."'".')) return false;" href="'.$url.'?action=deleteone&id='.$messageId.'">'.
Display::returnFontAwesomeIcon('trash', 2).'</a>';
}
@ -490,7 +490,7 @@ class MessageManager
$user_sender_id = empty($sender_id) ? api_get_user_id() : (int) $sender_id;
if (empty($user_sender_id)) {
Display::addFlash(Display::return_message(get_lang('UserDoesNotExist'), 'warning'));
Display::addFlash(Display::return_message(get_lang('This user doesn\'t exist'), 'warning'));
return false;
}
@ -538,7 +538,7 @@ class MessageManager
if (empty($subject) && empty($group_id)) {
Display::addFlash(
Display::return_message(
get_lang('YouShouldWriteASubject'),
get_lang('You should write a subject'),
'warning'
)
);
@ -546,7 +546,7 @@ class MessageManager
return false;
} elseif ($totalFileSize > intval(api_get_setting('message_max_upload_filesize'))) {
$warning = sprintf(
get_lang('FilesSizeExceedsX'),
get_lang('Files size exceeds'),
format_file_size(api_get_setting('message_max_upload_filesize'))
);
@ -696,7 +696,7 @@ class MessageManager
);
// Adding more sense to the message group
$subject = sprintf(get_lang('ThereIsANewMessageInTheGroupX'), $group_info['name']);
$subject = sprintf(get_lang('There is a new message in group %s'), $group_info['name']);
$new_user_list = [];
foreach ($user_list as $user_data) {
$new_user_list[] = $user_data['id'];
@ -777,7 +777,7 @@ class MessageManager
if (!empty($drhList)) {
foreach ($drhList as $drhInfo) {
$message = sprintf(
get_lang('CopyOfMessageSentToXUser'),
get_lang('Copy of message sent to %s'),
$userInfo['complete_name']
).' <br />'.$message;
@ -946,7 +946,7 @@ class MessageManager
// user's file name
$file_name = $file_attach['name'];
if (!filter_extension($new_file_name)) {
Display::addFlash(Display::return_message(get_lang('UplUnableToSaveFileFilteredExtension'), 'error'));
Display::addFlash(Display::return_message(get_lang('File upload failed: this file extension or file type is prohibited'), 'error'));
} else {
$new_file_name = uniqid('');
if (!empty($receiver_user_id)) {
@ -1285,16 +1285,16 @@ class MessageManager
//date stays the same
$message[3] = api_convert_and_format_date($sendDate, DATE_TIME_FORMAT_LONG);
$message[4] = '&nbsp;&nbsp;<a title="'.addslashes(
get_lang('DeleteMessage')
get_lang('Delete message')
).'" onclick="delete_one_message_outbox('.$messageId.')" href="javascript:void(0)" >'.
Display::returnFontAwesomeIcon('trash', 2).'</a>';
} else {
$message[1] = '<a '.$class.' onclick="show_sent_message('.$messageId.')" href="../messages/view_message.php?id_send='.$messageId.'">'.$title.'</a><br />'.$userInfo['complete_name_with_username'];
$message[2] = api_convert_and_format_date($sendDate, DATE_TIME_FORMAT_LONG);
$message[3] = '<a title="'.addslashes(
get_lang('DeleteMessage')
get_lang('Delete message')
).'" href="outbox.php?action=deleteone&id='.$messageId.'" onclick="javascript:if(!confirm('."'".addslashes(
api_htmlentities(get_lang('ConfirmDeleteMessage'))
api_htmlentities(get_lang('ConfirmDelete message'))
)."'".')) return false;" >'.
Display::returnFontAwesomeIcon('trash', 2).'</a>';
}
@ -1375,7 +1375,7 @@ class MessageManager
$title = Security::remove_XSS($row['title'], STUDENT, true);
$content = Security::remove_XSS($row['content'], STUDENT, true);
$name = get_lang('UnknownUser');
$name = get_lang('Unknown user');
$fromUser = api_get_user_info($user_sender_id);
$userImage = '';
if (!empty($user_sender_id) && !empty($fromUser)) {
@ -1463,17 +1463,17 @@ class MessageManager
switch ($type) {
case self::MESSAGE_TYPE_OUTBOX:
$message_content .= '<a href="outbox.php?'.$social_link.'">'.
Display::return_icon('back.png', get_lang('ReturnToOutbox')).'</a> &nbsp';
Display::return_icon('back.png', get_lang('Return to outbox')).'</a> &nbsp';
$message_content .= '<a href="outbox.php?action=deleteone&id='.$messageId.'&'.$social_link.'" >'.
Display::return_icon('delete.png', get_lang('DeleteMessage')).'</a>&nbsp';
Display::return_icon('delete.png', get_lang('Delete message')).'</a>&nbsp';
break;
case self::MESSAGE_TYPE_INBOX:
$message_content .= '<a href="inbox.php?'.$social_link.'">'.
Display::return_icon('back.png', get_lang('ReturnToInbox')).'</a> &nbsp';
Display::return_icon('back.png', get_lang('Return to inbox')).'</a> &nbsp';
$message_content .= '<a href="new_message.php?re_id='.$messageId.'&'.$social_link.'">'.
Display::return_icon('message_reply.png', get_lang('ReplyToMessage')).'</a> &nbsp';
Display::return_icon('message_reply.png', get_lang('Reply to this message')).'</a> &nbsp';
$message_content .= '<a href="inbox.php?action=deleteone&id='.$messageId.'&'.$social_link.'" >'.
Display::return_icon('delete.png', get_lang('DeleteMessage')).'</a>&nbsp';
Display::return_icon('delete.png', get_lang('Delete message')).'</a>&nbsp';
break;
}
@ -1557,7 +1557,7 @@ class MessageManager
$html .= '<div class="row">';
$items = $topic['count'];
$reply_label = ($items == 1) ? get_lang('GroupReply') : get_lang('GroupReplies');
$reply_label = ($items == 1) ? get_lang('Reply') : get_lang('Replies');
$label = '<i class="fa fa-envelope"></i> '.$items.' '.$reply_label;
$topic['title'] = trim($topic['title']);
@ -2134,7 +2134,7 @@ class MessageManager
$form = new FormValidator('send_invitation');
$form->addTextarea(
'content',
get_lang('AddPersonalMessage'),
get_lang('Add a personal message'),
['id' => 'content_invitation_id', 'rows' => 5]
);
@ -2167,7 +2167,7 @@ class MessageManager
$table->set_header(0, '', false, ['style' => 'width:15px;']);
$table->set_header(1, get_lang('Messages'), false);
$table->set_header(2, get_lang('Date'), true, ['style' => 'width:180px;']);
$table->set_header(3, get_lang('Modify'), false, ['style' => 'width:120px;']);
$table->set_header(3, get_lang('Edit'), false, ['style' => 'width:120px;']);
if (isset($_REQUEST['f']) && $_REQUEST['f'] === 'social') {
$parameters['f'] = 'social';
@ -2175,9 +2175,9 @@ class MessageManager
}
$defaultActions = [
'delete' => get_lang('DeleteSelectedMessages'),
'mark_as_unread' => get_lang('MailMarkSelectedAsUnread'),
'mark_as_read' => get_lang('MailMarkSelectedAsRead'),
'delete' => get_lang('Delete selected messages'),
'mark_as_unread' => get_lang('Mark as unread'),
'mark_as_read' => get_lang('Mark as read'),
];
if (!in_array('delete', $actions)) {
@ -2204,9 +2204,9 @@ class MessageManager
*/
public static function inboxDisplay($keyword = '')
{
$success = get_lang('SelectedMessagesDeleted');
$success_read = get_lang('SelectedMessagesRead');
$success_unread = get_lang('SelectedMessagesUnRead');
$success = get_lang('The selected messages have been deleted');
$success_read = get_lang('Selected messages have been marked as read');
$success_unread = get_lang('Selected messages have been marked as unread');
$currentUserId = api_get_user_id();
if (isset($_REQUEST['action'])) {
@ -2286,7 +2286,7 @@ class MessageManager
$actions = ['delete'];
$currentUserId = api_get_user_id();
$success = get_lang('SelectedMessagesDeleted');
$success = get_lang('The selected messages have been deleted');
if (isset($_REQUEST['action'])) {
switch ($_REQUEST['action']) {
case 'delete':
@ -2327,7 +2327,7 @@ class MessageManager
{
$actions = ['delete'];
$success = get_lang('SelectedMessagesDeleted');
$success = get_lang('The selected messages have been deleted');
$currentUserId = api_get_user_id();
if (isset($_REQUEST['action'])) {
switch ($_REQUEST['action']) {
@ -2369,8 +2369,8 @@ class MessageManager
public static function outbox_display($keyword = '')
{
Session::write('message_sent_search_keyword', $keyword);
$success = get_lang('SelectedMessagesDeleted').'&nbsp</b><br />
<a href="outbox.php">'.get_lang('BackToOutbox').'</a>';
$success = get_lang('The selected messages have been deleted').'&nbsp</b><br />
<a href="outbox.php">'.get_lang('Back to outbox').'</a>';
$html = '';
if (isset($_REQUEST['action'])) {
@ -2411,9 +2411,9 @@ class MessageManager
$table->set_header(0, '', false, ['style' => 'width:15px;']);
$table->set_header(1, get_lang('Messages'), false);
$table->set_header(2, get_lang('Date'), true, ['style' => 'width:180px;']);
$table->set_header(3, get_lang('Modify'), false, ['style' => 'width:70px;']);
$table->set_header(3, get_lang('Edit'), false, ['style' => 'width:70px;']);
$table->set_form_actions(['delete' => get_lang('DeleteSelectedMessages')]);
$table->set_form_actions(['delete' => get_lang('Delete selected messages')]);
$html .= $table->return_table();
return $html;
@ -2589,7 +2589,7 @@ class MessageManager
$layoutContent = $tplMailBody->get_template('mail/new_user_mail_to_admin.tpl');
$emailsubject = '['.get_lang('UserRegistered').'] '.$user->getUsername();
$emailsubject = '['.get_lang('The user has been registered').'] '.$user->getUsername();
$emailbody = $tplMailBody->fetch($layoutContent);
$admins = UserManager::get_all_administrators();
@ -2875,7 +2875,7 @@ class MessageManager
Display::returnFontAwesomeIcon('thumbs-up', '', true)
.PHP_EOL.'<span>'.$countLikes['likes'].'</span>',
[
'title' => get_lang('VoteLike'),
'title' => get_lang('Like'),
'class' => 'btn social-like '.$class,
'data-status' => 'like',
'data-message' => $messageId,
@ -2892,7 +2892,7 @@ class MessageManager
Display::returnFontAwesomeIcon('thumbs-down', '', true)
.PHP_EOL.'<span>'.$countLikes['dislikes'].'</span>',
[
'title' => get_lang('VoteDislike'),
'title' => get_lang('Dislike'),
'class' => 'btn social-like '.$disabled,
'data-status' => 'dislike',
'data-message' => $messageId,

@ -34,7 +34,7 @@ class NotebookManager
return "<script>
function confirmation (name)
{
if (confirm(\" ".get_lang("NoteConfirmDelete")." \"+ name + \" ?\"))
if (confirm(\" ".get_lang("Are you sure you want to delete this note")." \"+ name + \" ?\"))
{return true;}
else
{return false;}
@ -253,16 +253,16 @@ class NotebookManager
if (!api_is_anonymous()) {
if ($sessionId == 0 || api_is_allowed_to_session_edit(false, true)) {
echo '<a href="index.php?'.api_get_cidreq().'&action=addnote">'.
Display::return_icon('new_note.png', get_lang('NoteAddNew'), '', '32').'</a>';
Display::return_icon('new_note.png', get_lang('Add new note in my personal notebook'), '', '32').'</a>';
}
}
echo '<a href="index.php?'.api_get_cidreq().'&action=changeview&view=creation_date&direction='.$link_sort_direction.'">'.
Display::return_icon('notes_order_by_date_new.png', get_lang('OrderByCreationDate'), '', '32').'</a>';
Display::return_icon('notes_order_by_date_new.png', get_lang('Sort by date created'), '', '32').'</a>';
echo '<a href="index.php?'.api_get_cidreq().'&action=changeview&view=update_date&direction='.$link_sort_direction.'">'.
Display::return_icon('notes_order_by_date_mod.png', get_lang('OrderByModificationDate'), '', '32').'</a>';
Display::return_icon('notes_order_by_date_mod.png', get_lang('Sort by date last modified'), '', '32').'</a>';
echo '<a href="index.php?'.api_get_cidreq().'&action=changeview&view=title&direction='.$link_sort_direction.'">'.
Display::return_icon('notes_order_by_title.png', get_lang('OrderByTitle'), '', '32').'</a>';
Display::return_icon('notes_order_by_title.png', get_lang('Sort by title'), '', '32').'</a>';
echo '</div>';
$notebookView = Session::read('notebook_view');
@ -297,7 +297,7 @@ class NotebookManager
$session_img = api_get_session_image($row['session_id'], $_user['status']);
$updateValue = '';
if ($row['update_date'] != $row['creation_date']) {
$updateValue = ', '.get_lang('UpdateDate').': '.Display::dateToStringAgoAndLongDate($row['update_date']);
$updateValue = ', '.get_lang('Updated').': '.Display::dateToStringAgoAndLongDate($row['update_date']);
}
$actions = '<a href="'.api_get_self().'?action=editnote&notebook_id='.$row['notebook_id'].'">'.
@ -308,7 +308,7 @@ class NotebookManager
echo Display::panel(
$row['description'],
$row['title'].$session_img.' <div class="pull-right">'.$actions.'</div>',
get_lang('CreationDate').': '.Display::dateToStringAgoAndLongDate($row['creation_date']).$updateValue
get_lang('Creation date').': '.Display::dateToStringAgoAndLongDate($row['creation_date']).$updateValue
);
}
}

@ -858,7 +858,7 @@ class PDF
$userId
);
Display::addFlash(Display::return_message(get_lang('ItemAdded')));
Display::addFlash(Display::return_message(get_lang('Item added')));
}
/**

@ -651,7 +651,7 @@ class AppPlugin
foreach ($groups as $k => $v) {
$form->addGroup($groups[$k], $k, [$obj->get_lang($k)]);
}
$form->addButtonSave(get_lang('SaveSettings'));
$form->addButtonSave(get_lang('Save settings'));
$form->addHtml('
</div>
</div>

@ -66,7 +66,7 @@ class Promotion extends Model
case 'updated_at':
break;
case 'name':
$val .= ' '.get_lang('CopyLabelSuffix');
$val .= ' '.get_lang('Copy');
$new[$key] = $val;
break;
case 'created_at':
@ -152,8 +152,8 @@ class Promotion extends Model
public function get_status_list()
{
return [
PROMOTION_STATUS_ACTIVE => get_lang('Active'),
PROMOTION_STATUS_INACTIVE => get_lang('Inactive'),
PROMOTION_STATUS_ACTIVE => get_lang('active'),
PROMOTION_STATUS_INACTIVE => get_lang('inactive'),
];
}
@ -184,7 +184,7 @@ class Promotion extends Model
echo '<a href="'.api_get_path(WEB_CODE_PATH).'session/session_add.php">'.
Display::return_icon(
'new_session.png',
get_lang('AddSession'),
get_lang('Add a training session'),
'',
'32'
).'</a>';
@ -224,7 +224,7 @@ class Promotion extends Model
// Setting the form elements
$header = get_lang('Add');
if ($action == 'edit') {
$header = get_lang('Modify');
$header = get_lang('Edit');
}
$id = isset($_GET['id']) ? (int) $_GET['id'] : '';
@ -263,11 +263,11 @@ class Promotion extends Model
$status_list = $this->get_status_list();
$form->addElement('select', 'status', get_lang('Status'), $status_list);
if ($action == 'edit') {
$form->addElement('text', 'created_at', get_lang('CreatedAt'));
$form->addElement('text', 'created_at', get_lang('Created at'));
$form->freeze('created_at');
}
if ($action == 'edit') {
$form->addButtonSave(get_lang('Modify'), 'submit');
$form->addButtonSave(get_lang('Edit'), 'submit');
} else {
$form->addButtonCreate(get_lang('Add'), 'submit');
}
@ -283,7 +283,7 @@ class Promotion extends Model
$form->setDefaults($defaults);
// Setting the rules
$form->addRule('name', get_lang('ThisFieldIsRequired'), 'required');
$form->addRule('name', get_lang('Required field'), 'required');
return $form;
}

@ -1469,7 +1469,7 @@ class Skill extends Model
}
if ($addTitle) {
$tableResult .= '<h3 class="section-title">'.get_lang('AchievedSkills').'</h3>
$tableResult .= '<h3 class="section-title">'.get_lang('Achieved skills').'</h3>
<div class="skills-badges">
';
}
@ -1567,7 +1567,7 @@ class Skill extends Model
$tableResult .= $table;
}
} else {
$tableResult .= get_lang('WithoutAchievedSkills');
$tableResult .= get_lang('WithoutAchieved skills');
}
if ($addTitle) {
@ -1613,7 +1613,7 @@ class Skill extends Model
// Default root node
$skills[1] = [
'id' => '1',
'name' => get_lang('Root'),
'name' => get_lang('root'),
'parent_id' => '0',
'status' => 1,
];
@ -1722,7 +1722,7 @@ class Skill extends Model
}
$skills_tree = [
'name' => get_lang('SkillRootName'),
'name' => get_lang('SkillrootName'),
'id' => 'root',
'children' => $refs['root']['children'],
'data' => [],
@ -2428,13 +2428,13 @@ class Skill extends Model
$translateNameUrl = $translateUrl.http_build_query(['skill' => $skillId, 'action' => 'name']);
$translateCodeUrl = $translateUrl.http_build_query(['skill' => $skillId, 'action' => 'code']);
$translateNameButton = Display::toolbarButton(
get_lang('TranslateThisTerm'),
get_lang('Translate this term'),
$translateNameUrl,
'language',
'link'
);
$translateCodeButton = Display::toolbarButton(
get_lang('TranslateThisTerm'),
get_lang('Translate this term'),
$translateCodeUrl,
'language',
'link'
@ -2442,7 +2442,7 @@ class Skill extends Model
}
$form->addText('name', [get_lang('Name'), $translateNameButton], true, ['id' => 'name']);
$form->addText('short_code', [get_lang('ShortCode'), $translateCodeButton], false, ['id' => 'short_code']);
$form->addText('short_code', [get_lang('Short code'), $translateCodeButton], false, ['id' => 'short_code']);
// Cannot change parent of root
if ($skillId != 1) {
@ -2451,12 +2451,12 @@ class Skill extends Model
$form->addSelect(
'gradebook_id',
[get_lang('Gradebook'), get_lang('WithCertificate')],
[get_lang('Assessments'), get_lang('With Certificate')],
$gradeBookList,
['id' => 'gradebook_id', 'multiple' => 'multiple', 'size' => 10]
);
$form->addTextarea('description', get_lang('Description'), ['id' => 'description', 'rows' => 7]);
$form->addTextarea('criteria', get_lang('CriteriaToEarnTheBadge'), ['id' => 'criteria', 'rows' => 7]);
$form->addTextarea('criteria', get_lang('Criteria to earn the badge'), ['id' => 'criteria', 'rows' => 7]);
// EXTRA FIELDS
$extraField = new ExtraField('skill');
@ -2480,7 +2480,7 @@ class Skill extends Model
$toolbar = Display::url(
Display::return_icon(
'back.png',
get_lang('ManageSkills'),
get_lang('Manage skills'),
null,
ICON_SIZE_MEDIUM
),

@ -291,22 +291,22 @@ class SortableTable extends HTML_Table
$icon_attributes = ['style' => 'vertical-align: middle;'];
$params['prevImg'] = Display:: return_icon(
'action_prev.png',
get_lang('PreviousPage'),
get_lang('Previous page'),
$icon_attributes
);
$params['nextImg'] = Display:: return_icon(
'action_next.png',
get_lang('NextPage'),
get_lang('Next page'),
$icon_attributes
);
$params['firstPageText'] = Display:: return_icon(
'action_first.png',
get_lang('FirstPage'),
get_lang('First page'),
$icon_attributes
);
$params['lastPageText'] = Display:: return_icon(
'action_last.png',
get_lang('LastPage'),
get_lang('Last page'),
$icon_attributes
);
$params['firstPagePre'] = '';
@ -358,7 +358,7 @@ class SortableTable extends HTML_Table
0,
'style="font-style: italic;text-align:center;" colspan='.$cols
);
$message_empty = api_xml_http_response_encode(get_lang('TheListIsEmpty'));
$message_empty = api_xml_http_response_encode(get_lang('Empty'));
$this->setCellContents(1, 0, $message_empty);
$empty_table = true;
}
@ -410,18 +410,18 @@ class SortableTable extends HTML_Table
$html .= '<a
class="btn btn-outline-primary"
href="?'.$params.'&amp;'.$this->param_prefix.'selectall=1"
onclick="javascript: setCheckbox(true, \''.$table_id.'\'); return false;">'.get_lang('SelectAll').'</a>';
onclick="javascript: setCheckbox(true, \''.$table_id.'\'); return false;">'.get_lang('Select all').'</a>';
$html .= '<a
class="btn btn-outline-primary"
href="?'.$params.'"
onclick="javascript: setCheckbox(false, \''.$table_id.'\'); return false;">'.get_lang('UnSelectAll').'</a> ';
onclick="javascript: setCheckbox(false, \''.$table_id.'\'); return false;">'.get_lang('UnSelect all').'</a> ';
$html .= '<div class="btn-group" role="group">
<button
id="'.$table_id.'_actions"
data-toggle="dropdown" aria-haspopup="true" aria-expanded="false"
class="btn btn-outline-primary dropdown-toggle"
onclick="javascript:return false;">'.
get_lang('Actions').'
get_lang('Detail').'
</button>
';
$html .= '<div class="dropdown-menu" aria-labelledby="'.$table_id.'_actions" >';
@ -466,7 +466,7 @@ class SortableTable extends HTML_Table
{
$empty_table = false;
if ($this->get_total_number_of_items() == 0) {
$message_empty = api_xml_http_response_encode(get_lang('TheListIsEmpty'));
$message_empty = api_xml_http_response_encode(get_lang('Empty'));
$this->setCellContents(1, 0, $message_empty);
$empty_table = true;
}
@ -553,7 +553,7 @@ class SortableTable extends HTML_Table
) {
$empty_table = false;
if ($this->get_total_number_of_items() == 0) {
$message_empty = api_xml_http_response_encode(get_lang('TheListIsEmpty'));
$message_empty = api_xml_http_response_encode(get_lang('Empty'));
$this->setCellContents(1, 0, $message_empty);
$empty_table = true;
}

@ -512,7 +512,7 @@ class Statistics
$where_url_last = ' AND login_date > DATE_SUB("'.$now.'",INTERVAL 1 %s)';
}
$period = get_lang('PeriodMonth');
$period = get_lang('Month');
$periodCollection = api_get_months_long();
$sql = "SELECT
DATE_FORMAT( login_date, '%Y-%m' ) AS stat_date ,
@ -524,7 +524,7 @@ class Statistics
switch ($type) {
case 'hour':
$period = get_lang('PeriodHour');
$period = get_lang('Hour');
$sql = "SELECT
DATE_FORMAT( login_date, '%H') AS stat_date,
count( login_id ) AS number_of_logins
@ -540,7 +540,7 @@ class Statistics
break;
case 'day':
$periodCollection = api_get_week_days_long();
$period = get_lang('PeriodDay');
$period = get_lang('Day');
$sql = "SELECT DATE_FORMAT( login_date, '%w' ) AS stat_date ,
count( login_id ) AS number_of_logins
FROM $table $table_url $where_url
@ -562,7 +562,7 @@ class Statistics
$stat_date = ($type === 'day') ? $periodCollection[$obj->stat_date] : $obj->stat_date;
$result_last_x[$stat_date] = $obj->number_of_logins;
}
self::printStats(get_lang('LastLogins').' ('.$period.')', $result_last_x, true);
self::printStats(get_lang('Last logins').' ('.$period.')', $result_last_x, true);
flush(); //flush web request at this point to see something already while the full data set is loading
echo '<br />';
}
@ -582,7 +582,7 @@ class Statistics
}
$result[$stat_date] = $obj->number_of_logins;
}
self::printStats(get_lang('AllLogins').' ('.$period.')', $result, true);
self::printStats(get_lang('All logins').' ('.$period.')', $result, true);
}
/**
@ -626,7 +626,7 @@ class Statistics
$localDate = api_get_local_time($startDate, null, null, false, false);
$localEndDate = api_get_local_time($endDate, null, null, false, false);
$label = sprintf(get_lang('LastXDays'), $day);
$label = sprintf(get_lang('Last %s days'), $day);
if ($day == 1) {
$label = get_lang('Today');
}
@ -652,7 +652,7 @@ class Statistics
$totalLogin[$label] = $obj->number;
}
if ($distinct) {
self::printStats(get_lang('DistinctUsersLogins'), $totalLogin, false);
self::printStats(get_lang('Distinct users logins'), $totalLogin, false);
} else {
self::printStats(get_lang('Logins'), $totalLogin, false);
}
@ -806,7 +806,7 @@ class Statistics
if (empty($result)) {
$result = self::getToolsStats();
}
self::printStats(get_lang('PlatformToolAccess'), $result, true);
self::printStats(get_lang('Tools access'), $result, true);
}
/**
@ -864,7 +864,7 @@ class Statistics
$result[get_lang('No')] = $count1->n - $count2->n;
$result[get_lang('Yes')] = $count2->n; // #users with picture
self::printStats(get_lang('CountUsers').' ('.get_lang('UserPicture').')', $result, true);
self::printStats(get_lang('Number of users').' ('.get_lang('Picture').')', $result, true);
}
/**
@ -872,7 +872,7 @@ class Statistics
*/
public static function printActivitiesStats()
{
echo '<h4>'.get_lang('ImportantActivities').'</h4>';
echo '<h4>'.get_lang('Important activities').'</h4>';
// Create a search-box
$form = new FormValidator(
'search_simple',
@ -909,13 +909,13 @@ class Statistics
}
$table->set_additional_parameters($parameters);
$table->set_header(0, get_lang('EventType'));
$table->set_header(1, get_lang('DataType'));
$table->set_header(0, get_lang('Event type'));
$table->set_header(1, get_lang('Data type'));
$table->set_header(2, get_lang('Value'));
$table->set_header(3, get_lang('Course'));
$table->set_header(4, get_lang('Session'));
$table->set_header(5, get_lang('UserName'));
$table->set_header(6, get_lang('IPAddress'));
$table->set_header(5, get_lang('Username'));
$table->set_header(6, get_lang('IP address'));
$table->set_header(7, get_lang('Date'));
$table->display();
}
@ -942,7 +942,7 @@ class Statistics
}
$form = new FormValidator('courselastvisit', 'get');
$form->addElement('hidden', 'report', 'courselastvisit');
$form->addText('date_diff', get_lang('Days'), true);
$form->addText('date_diff', get_lang('days'), true);
$form->addRule('date_diff', 'InvalidNumber', 'numeric');
$form->addButtonSearch(get_lang('Search'), 'submit');
if (!isset($_GET['date_diff'])) {
@ -973,7 +973,7 @@ class Statistics
$from = ($page_nr - 1) * $per_page;
$sql .= ' LIMIT '.$from.','.$per_page;
echo '<p>'.get_lang('LastAccess').' &gt;= '.$date_diff.' '.get_lang('Days').'</p>';
echo '<p>'.get_lang('Latest access').' &gt;= '.$date_diff.' '.get_lang('days').'</p>';
$res = Database::query($sql);
if (Database::num_rows($res) > 0) {
$courses = [];
@ -987,8 +987,8 @@ class Statistics
}
$parameters['date_diff'] = $date_diff;
$parameters['report'] = 'courselastvisit';
$table_header[] = [get_lang("CourseCode"), true];
$table_header[] = [get_lang("LastAccess"), true];
$table_header[] = [get_lang("Code"), true];
$table_header[] = [get_lang("Latest access"), true];
Display:: display_sortable_table(
$table_header,
$courses,
@ -997,7 +997,7 @@ class Statistics
$parameters
);
} else {
echo get_lang('NoSearchResults');
echo get_lang('No search results');
}
}
@ -1112,23 +1112,23 @@ class Statistics
$where_url = '';
}
$now = api_get_utc_datetime();
$sql[get_lang('ThisDay')] =
$sql[get_lang('This day')] =
"SELECT count(distinct(login_user_id)) AS number ".
" FROM $table $table_url ".
" WHERE DATE_ADD(login_date, INTERVAL 1 DAY) >= '$now' $where_url";
$sql[get_lang('Last7days')] =
$sql[get_lang('In the last 7 days')] =
"SELECT count(distinct(login_user_id)) AS number ".
" FROM $table $table_url ".
" WHERE DATE_ADD(login_date, INTERVAL 7 DAY) >= '$now' $where_url";
$sql[get_lang('Last31days')] =
$sql[get_lang('In the last 31 days')] =
"SELECT count(distinct(login_user_id)) AS number ".
" FROM $table $table_url ".
" WHERE DATE_ADD(login_date, INTERVAL 31 DAY) >= '$now' $where_url";
$sql[sprintf(get_lang('LastXMonths'), 6)] =
$sql[sprintf(get_lang('Last %i months'), 6)] =
"SELECT count(distinct(login_user_id)) AS number ".
" FROM $table $table_url ".
" WHERE DATE_ADD(login_date, INTERVAL 6 MONTH) >= '$now' $where_url";
$sql[get_lang('NeverConnected')] =
$sql[get_lang('Never connected')] =
"SELECT count(distinct(login_user_id)) AS number ".
" FROM $table $table_url WHERE 1=1 $where_url";
foreach ($sql as $index => $query) {
@ -1138,7 +1138,7 @@ class Statistics
$totalLogin[$index] = $r < 0 ? 0 : $r;
}
self::printStats(
get_lang('StatsUsersDidNotLoginInLastPeriods'),
get_lang('Not logged in for some time'),
$totalLogin,
false
);
@ -1224,7 +1224,7 @@ class Statistics
{
if (isset($_GET['export']) && 'xls' === $_GET['export']) {
$result = self::getLoginsByDate($_GET['start'], $_GET['end']);
$data = [[get_lang('Username'), get_lang('FirstName'), get_lang('LastName'), get_lang('TotalTime')]];
$data = [[get_lang('Username'), get_lang('First name'), get_lang('Last name'), get_lang('Total time')]];
foreach ($result as $i => $item) {
$data[] = [
@ -1240,7 +1240,7 @@ class Statistics
exit;
}
echo Display::page_header(get_lang('LoginsByDate'));
echo Display::page_header(get_lang('Logins by date'));
$actions = '';
$content = '';
@ -1248,7 +1248,7 @@ class Statistics
$form = new FormValidator('frm_logins_by_date', 'get');
$form->addDateRangePicker(
'daterange',
get_lang('DateRange'),
get_lang('Date range'),
true,
['format' => 'YYYY-MM-DD', 'timePicker' => 'false', 'validate_format' => 'Y-m-d']
);
@ -1276,9 +1276,9 @@ class Statistics
$table = new HTML_Table(['class' => 'data_table']);
$table->setHeaderContents(0, 0, get_lang('Username'));
$table->setHeaderContents(0, 1, get_lang('FirstName'));
$table->setHeaderContents(0, 2, get_lang('LastName'));
$table->setHeaderContents(0, 3, get_lang('TotalTime'));
$table->setHeaderContents(0, 1, get_lang('First name'));
$table->setHeaderContents(0, 2, get_lang('Last name'));
$table->setHeaderContents(0, 3, get_lang('Total time'));
foreach ($result as $i => $item) {
$table->setCellContents($i + 1, 0, $item['username']);

@ -19,13 +19,13 @@ class SystemAnnouncementManager
public static function getVisibilityList(): array
{
$visibleToUsers = [
self::VISIBLE_TEACHER => get_lang('Teacher'),
self::VISIBLE_STUDENT => get_lang('Student'),
self::VISIBLE_TEACHER => get_lang('Trainer'),
self::VISIBLE_STUDENT => get_lang('Learner'),
self::VISIBLE_GUEST => get_lang('Guest'),
];
$visibleToUsers[self::VISIBLE_DRH] = get_lang('DRH');
$visibleToUsers[self::VISIBLE_SESSION_ADMIN] = get_lang('SessionAdministrator');
$visibleToUsers[self::VISIBLE_STUDENT_BOSS] = get_lang('StudentBoss');
$visibleToUsers[self::VISIBLE_DRH] = get_lang('Human Resources Manager');
$visibleToUsers[self::VISIBLE_SESSION_ADMIN] = get_lang('Session administrator');
$visibleToUsers[self::VISIBLE_STUDENT_BOSS] = get_lang('LearnerBoss');
return $visibleToUsers;
}
@ -98,7 +98,7 @@ class SystemAnnouncementManager
$query_string = ereg_replace('&$', '', $query_string);
$url = api_get_self();
echo '<div class="system_announcements">';
echo '<h3>'.get_lang('SystemAnnouncements').'</h3>';
echo '<h3>'.get_lang('Portal news').'</h3>';
echo '<div style="margin:10px;text-align:right;"><a href="news_list.php">'.get_lang('More').'</a></div>';
while ($announcement = Database::fetch_object($announcements)) {
@ -191,7 +191,7 @@ class SystemAnnouncementManager
$content = '';
if (Database::num_rows($announcements) > 0) {
$content .= '<div class="system_announcements">';
$content .= '<h3>'.get_lang('SystemAnnouncements').'</h3>';
$content .= '<h3>'.get_lang('Portal news').'</h3>';
$content .= '<table align="center">';
$content .= '<tr>';
$content .= '<td>';
@ -243,12 +243,12 @@ class SystemAnnouncementManager
$content = '';
if (!isset($_GET['start']) || $_GET['start'] == 0) {
if ($nb_announcement > 20) {
$content .= '<a href="news_list.php?start='.$next.'">'.get_lang('NextBis').' >> </a>';
$content .= '<a href="news_list.php?start='.$next.'">'.get_lang('Next').' >> </a>';
}
} else {
echo '<a href="news_list.php?start='.$prev.'"> << '.get_lang('Prev').'</a>';
if ($nb_announcement > 20) {
$content .= '<a href="news_list.php?start='.$next.'">'.get_lang('NextBis').' >> </a>';
$content .= '<a href="news_list.php?start='.$next.'">'.get_lang('Next').' >> </a>';
}
}
@ -409,7 +409,7 @@ class SystemAnnouncementManager
if (!checkdate($date_start_to_compare[1], $date_start_to_compare[2], $date_start_to_compare[0])) {
Display::addFlash(
Display::return_message(get_lang('InvalidStartDate'), 'warning')
Display::return_message(get_lang('Invalid start date was given.'), 'warning')
);
return false;
@ -421,7 +421,7 @@ class SystemAnnouncementManager
!checkdate($date_end_to_compare[1], $date_end_to_compare[2], $date_end_to_compare[0])
) {
Display::addFlash(
Display::return_message(get_lang('InvalidEndDate'), 'warning')
Display::return_message(get_lang('Invalid end date was given.'), 'warning')
);
return false;
@ -429,7 +429,7 @@ class SystemAnnouncementManager
if (strlen(trim($title)) == 0) {
Display::addFlash(
Display::return_message(get_lang('InvalidTitle'), 'warning')
Display::return_message(get_lang('Please enter a title'), 'warning')
);
return false;
@ -618,7 +618,7 @@ class SystemAnnouncementManager
$lang = is_null($lang) ? '' : $lang;
if (!checkdate($date_start_to_compare[1], $date_start_to_compare[2], $date_start_to_compare[0])) {
echo Display::return_message(get_lang('InvalidStartDate'));
echo Display::return_message(get_lang('Invalid start date was given.'));
return false;
}
@ -628,13 +628,13 @@ class SystemAnnouncementManager
$date_end_to_compare[0]) &&
!checkdate($date_end_to_compare[1], $date_end_to_compare[2], $date_end_to_compare[0])
) {
echo Display::return_message(get_lang('InvalidEndDate'));
echo Display::return_message(get_lang('Invalid end date was given.'));
return false;
}
if (strlen(trim($title)) == 0) {
echo Display::return_message(get_lang('InvalidTitle'));
echo Display::return_message(get_lang('Please enter a title'));
return false;
}

@ -884,48 +884,48 @@ class Template
*/
public function handleLoginFailed()
{
$message = get_lang('InvalidId');
$message = get_lang('Login failed - incorrect login or password.');
if (!isset($_GET['error'])) {
if (api_is_self_registration_allowed()) {
$message = get_lang('InvalidForSelfRegistration');
$message = get_lang('Login failed - if you are not registered, you can do so using the <a href=claroline/auth/inscription.php>registration form</a>');
}
} else {
switch ($_GET['error']) {
case '':
if (api_is_self_registration_allowed()) {
$message = get_lang('InvalidForSelfRegistration');
$message = get_lang('Login failed - if you are not registered, you can do so using the <a href=claroline/auth/inscription.php>registration form</a>');
}
break;
case 'account_expired':
$message = get_lang('AccountExpired');
$message = get_lang('Account expired');
break;
case 'account_inactive':
$message = get_lang('AccountInactive');
$message = get_lang('Account inactive');
if (api_get_setting('allow_registration') === 'confirmation') {
$message = get_lang('AccountNotConfirmed').PHP_EOL;
$message = get_lang('Your account is inactive because you have not confirmed it yet. Check your email and follow the instructions or click the following link to resend the email').PHP_EOL;
$message .= Display::url(
get_lang('ReSendConfirmationMail'),
get_lang('Send confirmation mail again'),
api_get_path(WEB_PATH).'main/auth/resend_confirmation_mail.php',
['class' => 'alert-link']
);
}
break;
case 'user_password_incorrect':
$message = get_lang('InvalidId');
$message = get_lang('Login failed - incorrect login or password.');
break;
case 'access_url_inactive':
$message = get_lang('AccountURLInactive');
$message = get_lang('Account inactive for this URL');
break;
case 'wrong_captcha':
$message = get_lang('TheTextYouEnteredDoesNotMatchThePicture');
$message = get_lang('The text you entered doesn\'t match the picture.');
break;
case 'blocked_by_captcha':
$message = get_lang('AccountBlockedByCaptcha');
$message = get_lang('Account blocked by captcha.');
break;
case 'multiple_connection_not_allowed':
$message = get_lang('MultipleConnectionsAreNotAllow');
$message = get_lang('This user is already logged in');
break;
}
}
@ -950,7 +950,7 @@ class Template
'id' => '_username',
'autofocus' => 'autofocus',
'icon' => 'user fa-fw',
'placeholder' => get_lang('UserName'),
'placeholder' => get_lang('Username'),
];
$browserAutoCapitalize = false;
// Avoid showing the autocapitalize option if the browser doesn't
@ -961,7 +961,7 @@ class Template
}
$form->addText(
'_username',
get_lang('UserName'),
get_lang('Username'),
true,
$params
);
@ -1007,23 +1007,23 @@ class Template
// Minimum options using all defaults (including defaults for Image_Text):
//$options = array('callback' => 'qfcaptcha_image.php');
$captcha_question = $form->addElement('CAPTCHA_Image', 'captcha_question', '', $options);
$form->addHtml(get_lang('ClickOnTheImageForANewOne'));
$form->addHtml(get_lang('Click on the image to load a new one.'));
$form->addElement(
'text',
'captcha',
get_lang('EnterTheLettersYouSee')
get_lang('Enter the letters you see.')
);
$form->addRule(
'captcha',
get_lang('EnterTheCharactersYouReadInTheImage'),
get_lang('Enter the characters you see on the image'),
'required',
null,
'client'
);
$form->addRule(
'captcha',
get_lang('TheTextYouEnteredDoesNotMatchThePicture'),
get_lang('The text you entered doesn\'t match the picture.'),
'CAPTCHA',
$captcha_question
);
@ -1032,7 +1032,7 @@ class Template
$form->addButton(
'submitAuth',
get_lang('LoginEnter'),
get_lang('Login'),
null,
'primary',
null,
@ -1133,7 +1133,7 @@ class Template
$rightFloatMenu = '';
$iconBug = Display::return_icon(
'bug.png',
get_lang('ReportABug'),
get_lang('Report a bug'),
[],
ICON_SIZE_LARGE
);
@ -1382,7 +1382,7 @@ class Template
if ($allow === false) {
$certificateUrl = api_get_path(WEB_CODE_PATH).'gradebook/my_certificates.php';
$certificateLink = Display::url(
get_lang('MyCertificates'),
get_lang('My certificates'),
$certificateUrl
);
$this->assign('certificate_link', $certificateLink);
@ -1596,9 +1596,9 @@ class Template
if (api_get_setting('accessibility_font_resize') == 'true') {
$resize .= '<div class="resize_font">';
$resize .= '<div class="btn-group">';
$resize .= '<a title="'.get_lang('DecreaseFontSize').'" href="#" class="decrease_font btn btn-default"><em class="fa fa-font"></em></a>';
$resize .= '<a title="'.get_lang('ResetFontSize').'" href="#" class="reset_font btn btn-default"><em class="fa fa-font"></em></a>';
$resize .= '<a title="'.get_lang('IncreaseFontSize').'" href="#" class="increase_font btn btn-default"><em class="fa fa-font"></em></a>';
$resize .= '<a title="'.get_lang('Decrease the font size').'" href="#" class="decrease_font btn btn-default"><em class="fa fa-font"></em></a>';
$resize .= '<a title="'.get_lang('Reset the font size').'" href="#" class="reset_font btn btn-default"><em class="fa fa-font"></em></a>';
$resize .= '<a title="'.get_lang('Increase the font size').'" href="#" class="increase_font btn btn-default"><em class="fa fa-font"></em></a>';
$resize .= '</div>';
$resize .= '</div>';
}

@ -109,24 +109,24 @@ class Thematic
if (api_get_session_id()) {
if (api_get_session_id() == $thematic[3]) {
$actions .= '<a href="index.php?'.api_get_cidreq().'&action=thematic_plan_list&thematic_id='.$thematic[0].'">'.
Display::return_icon('lesson_plan.png', get_lang('ThematicPlan'), '', ICON_SIZE_SMALL).'</a>&nbsp;';
Display::return_icon('lesson_plan.png', get_lang('Thematic plan'), '', ICON_SIZE_SMALL).'</a>&nbsp;';
$actions .= '<a href="index.php?'.api_get_cidreq().'&action=thematic_advance_list&thematic_id='.$thematic[0].'">'.
Display::return_icon('lesson_plan_calendar.png', get_lang('ThematicAdvance'), '', ICON_SIZE_SMALL).'</a>&nbsp;';
Display::return_icon('lesson_plan_calendar.png', get_lang('Thematic advance'), '', ICON_SIZE_SMALL).'</a>&nbsp;';
$actions .= '<a href="index.php?'.api_get_cidreq().'&action=thematic_edit&thematic_id='.$thematic[0].'">'.
Display::return_icon('edit.png', get_lang('Edit'), '', ICON_SIZE_SMALL).'</a>';
$actions .= '<a onclick="javascript:if(!confirm(\''.get_lang('AreYouSureToDelete').'\')) return false;" href="index.php?'.api_get_cidreq().'&action=thematic_delete&thematic_id='.$thematic[0].'">'.
$actions .= '<a onclick="javascript:if(!confirm(\''.get_lang('Are you sure you want to delete').'\')) return false;" href="index.php?'.api_get_cidreq().'&action=thematic_delete&thematic_id='.$thematic[0].'">'.
Display::return_icon('delete.png', get_lang('Delete'), '', ICON_SIZE_SMALL).'</a>';
} else {
$actions .= Display::return_icon(
'lesson_plan_na.png',
get_lang('ThematicPlan'),
get_lang('Thematic plan'),
'',
ICON_SIZE_SMALL
).'&nbsp;';
$actions .= Display::return_icon(
'lesson_plan_calendar_na.png',
get_lang('ThematicAdvance'),
get_lang('Thematic advance'),
'',
ICON_SIZE_SMALL
).'&nbsp;';
@ -144,9 +144,9 @@ class Thematic
}
} else {
$actions .= '<a href="index.php?'.api_get_cidreq().'&action=thematic_plan_list&thematic_id='.$thematic[0].'">'.
Display::return_icon('lesson_plan.png', get_lang('ThematicPlan'), '', ICON_SIZE_SMALL).'</a>&nbsp;';
Display::return_icon('lesson_plan.png', get_lang('Thematic plan'), '', ICON_SIZE_SMALL).'</a>&nbsp;';
$actions .= '<a href="index.php?'.api_get_cidreq().'&action=thematic_advance_list&thematic_id='.$thematic[0].'">'.
Display::return_icon('lesson_plan_calendar.png', get_lang('ThematicAdvance'), '', ICON_SIZE_SMALL).'</a>&nbsp;';
Display::return_icon('lesson_plan_calendar.png', get_lang('Thematic advance'), '', ICON_SIZE_SMALL).'</a>&nbsp;';
if ($thematic[2] > 1) {
$actions .= '<a href="'.api_get_self().'?action=moveup&'.api_get_cidreq().'&thematic_id='.$thematic[0].'">'.
@ -156,13 +156,13 @@ class Thematic
}
if ($thematic[2] < self::get_max_thematic_item()) {
$actions .= '<a href="'.api_get_self().'?action=movedown&a'.api_get_cidreq().'&thematic_id='.$thematic[0].'">'.
Display::return_icon('down.png', get_lang('Down'), '', ICON_SIZE_SMALL).'</a>';
Display::return_icon('down.png', get_lang('down'), '', ICON_SIZE_SMALL).'</a>';
} else {
$actions .= Display::return_icon('down_na.png', '&nbsp;', '', ICON_SIZE_SMALL);
}
$actions .= '<a href="index.php?'.api_get_cidreq().'&action=thematic_edit&thematic_id='.$thematic[0].'">'.
Display::return_icon('edit.png', get_lang('Edit'), '', ICON_SIZE_SMALL).'</a>';
$actions .= '<a onclick="javascript:if(!confirm(\''.get_lang('AreYouSureToDelete').'\')) return false;" href="index.php?'.api_get_cidreq().'&action=thematic_delete&thematic_id='.$thematic[0].'">'.
$actions .= '<a onclick="javascript:if(!confirm(\''.get_lang('Are you sure you want to delete').'\')) return false;" href="index.php?'.api_get_cidreq().'&action=thematic_delete&thematic_id='.$thematic[0].'">'.
Display::return_icon('delete.png', get_lang('Delete'), '', ICON_SIZE_SMALL).'</a>';
}
$thematics[] = [$thematic[0], $thematic[1], $actions];
@ -563,7 +563,7 @@ class Thematic
$actions = '';
$actions .= '<a href="index.php?'.api_get_cidreq().'&action=thematic_advance_edit&thematic_id='.$thematic_id.'&thematic_advance_id='.$thematic_advance[0].'">'.
Display::return_icon('edit.png', get_lang('Edit'), '', 22).'</a>';
$actions .= '<a onclick="javascript:if(!confirm(\''.get_lang('AreYouSureToDelete').'\')) return false;" href="index.php?'.api_get_cidreq().'&action=thematic_advance_delete&thematic_id='.$thematic_id.'&thematic_advance_id='.$thematic_advance[0].'">'.
$actions .= '<a onclick="javascript:if(!confirm(\''.get_lang('Are you sure you want to delete').'\')) return false;" href="index.php?'.api_get_cidreq().'&action=thematic_advance_delete&thematic_id='.$thematic_id.'&thematic_advance_id='.$thematic_advance[0].'">'.
Display::return_icon('delete.png', get_lang('Delete'), '', 22).'</a></center>';
$data[] = [$i, $thematic_advance[1], $thematic_advance[2], $thematic_advance[3], $actions];
$i++;
@ -638,7 +638,7 @@ class Thematic
$thematic_advance_item = '<div><strong>'.
api_convert_and_format_date($thematic_advance['start_date'], DATE_TIME_FORMAT_LONG).
$session_star.'</strong></div>';
$thematic_advance_item .= '<div>'.$thematic_advance['duration'].' '.get_lang('HourShort').'</div>';
$thematic_advance_item .= '<div>'.$thematic_advance['duration'].' '.get_lang('h').'</div>';
$thematic_advance_item .= '<div>'.Security::remove_XSS($thematic_advance['content'], STUDENT).'</div>';
$return_array[$thematic_id][$thematic_advance['id']] = $thematic_advance_item;
}
@ -1524,7 +1524,7 @@ class Thematic
{
$default_thematic_plan_titles = [];
$default_thematic_plan_titles[1] = get_lang('Objectives');
$default_thematic_plan_titles[2] = get_lang('SkillToAcquire');
$default_thematic_plan_titles[2] = get_lang('Skills to acquire');
$default_thematic_plan_titles[3] = get_lang('Methodology');
$default_thematic_plan_titles[4] = get_lang('Infrastructure');
$default_thematic_plan_titles[5] = get_lang('Assessment');
@ -1559,11 +1559,11 @@ class Thematic
public function get_default_question()
{
$question = [];
$question[1] = get_lang('ObjectivesQuestions');
$question[2] = get_lang('SkillToAcquireQuestions');
$question[3] = get_lang('MethodologyQuestions');
$question[4] = get_lang('InfrastructureQuestions');
$question[5] = get_lang('AssessmentQuestions');
$question[1] = get_lang('What should the end results be when the learner has completed the course? What are the activities performed during the course?');
$question[2] = get_lang('Skills to acquireQuestions');
$question[3] = get_lang('What methods and activities help achieve the objectives of the course? What would the schedule be?');
$question[4] = get_lang('What infrastructure is necessary to achieve the goals of this topic normally?');
$question[5] = get_lang('How will learners be assessed? Are there strategies to develop in order to master the topic?');
return $question;
}

@ -94,8 +94,8 @@ class Timeline extends Model
public function get_status_list()
{
return [
TIMELINE_STATUS_ACTIVE => get_lang('Active'),
TIMELINE_STATUS_INACTIVE => get_lang('Inactive'),
TIMELINE_STATUS_ACTIVE => get_lang('active'),
TIMELINE_STATUS_INACTIVE => get_lang('inactive'),
];
}
@ -115,7 +115,7 @@ class Timeline extends Model
// Setting the form elements
$header = get_lang('Add');
if ($action == 'edit') {
$header = get_lang('Modify');
$header = get_lang('Edit');
}
$form->addElement('header', $header);
$id = isset($_GET['id']) ? intval($_GET['id']) : '';
@ -125,16 +125,16 @@ class Timeline extends Model
$status_list = $this->get_status_list();
$form->addElement('select', 'status', get_lang('Status'), $status_list);
if ($action == 'edit') {
//$form->addElement('text', 'created_at', get_lang('CreatedAt'));
//$form->addElement('text', 'created_at', get_lang('Created at'));
//$form->freeze('created_at');
}
if ($action == 'edit') {
$form->addButtonSave(get_lang('Modify'), 'submit');
$form->addButtonSave(get_lang('Edit'), 'submit');
} else {
$form->addButtonCreate(get_lang('Add'), 'submit');
}
$form->addRule('headline', get_lang('ThisFieldIsRequired'), 'required');
$form->addRule('headline', get_lang('Required field'), 'required');
// Setting the defaults
$defaults = $this->get($id);
@ -148,7 +148,7 @@ class Timeline extends Model
$form->setDefaults($defaults);
// Setting the rules
$form->addRule('headline', get_lang('ThisFieldIsRequired'), 'required');
$form->addRule('headline', get_lang('Required field'), 'required');
return $form;
}
@ -165,7 +165,7 @@ class Timeline extends Model
// Setting the form elements
$header = get_lang('Add');
if ($action == 'edit') {
$header = get_lang('Modify');
$header = get_lang('Edit');
}
$form->addElement('header', $header);
$id = isset($_GET['id']) ? intval($_GET['id']) : '';
@ -175,28 +175,28 @@ class Timeline extends Model
$form->addElement('text', 'headline', get_lang('Name'));
//@todo fix this
$form->addElement('text', 'start_date', get_lang('StartDate'), ['size' => '70']);
$form->addElement('text', 'end_date', get_lang('EndDate'), ['size' => '70']);
$form->addElement('textarea', 'text', get_lang('TimelineItemText'));
$form->addElement('text', 'media', get_lang('TimelineItemMedia'), ['size' => '70']);
$form->addElement('text', 'media_caption', get_lang('TimelineItemMediaCaption'), ['size' => '70']);
$form->addElement('text', 'media_credit', get_lang('TimelineItemMediaCredit'), ['size' => '70']);
$form->addElement('text', 'title_slide', get_lang('TimelineItemTitleSlide'), ['size' => '70']);
$form->addElement('text', 'start_date', get_lang('Start Date'), ['size' => '70']);
$form->addElement('text', 'end_date', get_lang('End Date'), ['size' => '70']);
$form->addElement('textarea', 'text', get_lang('Text'));
$form->addElement('text', 'media', get_lang('Media'), ['size' => '70']);
$form->addElement('text', 'media_caption', get_lang('MediaCaption'), ['size' => '70']);
$form->addElement('text', 'media_credit', get_lang('MediaCredit'), ['size' => '70']);
$form->addElement('text', 'title_slide', get_lang('Slider title'), ['size' => '70']);
$form->addRule('headline', get_lang('ThisFieldIsRequired'), 'required');
$form->addRule('start_date', get_lang('ThisFieldIsRequired'), 'required');
$form->addRule('headline', get_lang('Required field'), 'required');
$form->addRule('start_date', get_lang('Required field'), 'required');
if ($action == 'edit') {
// Setting the defaults
$defaults = $this->get($id);
$form->addButtonSave(get_lang('Modify'), 'submit');
$form->addButtonSave(get_lang('Edit'), 'submit');
} else {
$form->addButtonCreate(get_lang('Add'), 'submit');
}
$form->setDefaults($defaults);
// Setting the rules
$form->addRule('headline', get_lang('ThisFieldIsRequired'), 'required');
$form->addRule('headline', get_lang('Required field'), 'required');
return $form;
}

@ -194,29 +194,29 @@ class Tracking
$extend_all = 0;
if (!empty($extendedAll)) {
$extend_all_link = Display::url(
Display::return_icon('view_less_stats.gif', get_lang('HideAllAttempts')),
Display::return_icon('view_less_stats.gif', get_lang('Hide all attempts')),
api_get_self().'?action=stats'.$url_suffix
);
$extend_all = 1;
} else {
$extend_all_link = Display::url(
Display::return_icon('view_more_stats.gif', get_lang('ShowAllAttempts')),
Display::return_icon('view_more_stats.gif', get_lang('Show all attempts')),
api_get_self().'?action=stats&extend_all=1'.$url_suffix
);
}
if ($origin != 'tracking') {
$output .= '<div class="section-status">';
$output .= Display::page_header(get_lang('ScormMystatus'));
$output .= Display::page_header(get_lang('My progress'));
$output .= '</div>';
}
$actionColumn = null;
if ($type === 'classic') {
$actionColumn = ' <th>'.get_lang('Actions').'</th>';
$actionColumn = ' <th>'.get_lang('Detail').'</th>';
}
$timeHeader = '<th class="lp_time" colspan="2">'.get_lang('ScormTime').'</th>';
$timeHeader = '<th class="lp_time" colspan="2">'.get_lang('Time').'</th>';
if ($hideTime) {
$timeHeader = '';
}
@ -226,13 +226,13 @@ class Tracking
<tr class="table-header">
<th width="16">'.($allowExtend == true ? $extend_all_link : '&nbsp;').'</th>
<th colspan="4">
'.get_lang('ScormLessonTitle').'
'.get_lang('Learning object name').'
</th>
<th colspan="2">
'.get_lang('ScormStatus').'
'.get_lang('Status').'
</th>
<th colspan="2">
'.get_lang('ScormScore').'
'.get_lang('Score').'
</th>
'.$timeHeader.'
'.$actionColumn.'
@ -272,13 +272,13 @@ class Tracking
if (!empty($export_csv)) {
$csvHeaders = [
get_lang('ScormLessonTitle'),
get_lang('ScormStatus'),
get_lang('ScormScore'),
get_lang('Learning object name'),
get_lang('Status'),
get_lang('Score'),
];
if ($hideTime === false) {
$csvHeaders[] = get_lang('ScormTime');
$csvHeaders[] = get_lang('Time');
}
$csv_content[] = $csvHeaders;
@ -386,7 +386,7 @@ class Tracking
$extend_link = Display::url(
Display::return_icon(
'visible.png',
get_lang('HideAttemptView')
get_lang('Hide attempt view')
),
api_get_self().'?action=stats&fold_id='.$my_item_id.$url_suffix
);
@ -457,13 +457,13 @@ class Tracking
// The extend button for this attempt has been clicked.
$extend_this_attempt = 1;
$extend_attempt_link = Display::url(
Display::return_icon('visible.png', get_lang('HideAttemptView')),
Display::return_icon('visible.png', get_lang('Hide attempt view')),
api_get_self().'?action=stats&extend_id='.$my_item_id.'&fold_attempt_id='.$row['iv_id'].$url_suffix
);
if ($accessToPdfExport) {
$extend_attempt_link .= '&nbsp;'.
Display::url(
Display::return_icon('pdf.png', get_lang('ExportToPdf')),
Display::return_icon('pdf.png', get_lang('Export to PDF')),
api_get_self(
).'?action=export_stats&extend_id='.$my_item_id.'&extend_attempt_id='.$row['iv_id'].$url_suffix
);
@ -471,13 +471,13 @@ class Tracking
} else { // Same case if fold_attempt_id is set, so not implemented explicitly.
// The extend button for this attempt has not been clicked.
$extend_attempt_link = Display::url(
Display::return_icon('invisible.png', get_lang('ExtendAttemptView')),
Display::return_icon('invisible.png', get_lang('Extend attempt view')),
api_get_self().'?action=stats&extend_id='.$my_item_id.'&extend_attempt_id='.$row['iv_id'].$url_suffix
);
if ($accessToPdfExport) {
$extend_attempt_link .= '&nbsp;'.
Display::url(
Display::return_icon('pdf.png', get_lang('ExportToPdf')),
Display::return_icon('pdf.png', get_lang('Export to PDF')),
api_get_self(
).'?action=export_stats&extend_id='.$my_item_id.'&extend_attempt_id='.$row['iv_id'].$url_suffix
);
@ -534,7 +534,7 @@ class Tracking
if (!$is_allowed_to_edit && $result_disabled_ext_all) {
$view_score = Display::return_icon(
'invisible.png',
get_lang('ResultsHiddenByExerciseSetting')
get_lang('Results hidden by the exercise setting')
);
} else {
switch ($row['item_type']) {
@ -695,14 +695,14 @@ class Tracking
// The extend button for this attempt has been clicked.
$extend_this_attempt = 1;
$extend_attempt_link = Display::url(
Display::return_icon('visible.png', get_lang('HideAttemptView')),
Display::return_icon('visible.png', get_lang('Hide attempt view')),
api_get_self().'?action=stats&extend_id='.$my_item_id.'&fold_attempt_id='.$row['iv_id'].$url_suffix
);
} else {
// Same case if fold_attempt_id is set, so not implemented explicitly.
// The extend button for this attempt has not been clicked.
$extend_attempt_link = Display::url(
Display::return_icon('invisible.png', get_lang('ExtendAttemptView')),
Display::return_icon('invisible.png', get_lang('Extend attempt view')),
api_get_self().'?action=stats&extend_id='.$my_item_id.'&extend_attempt_id='.$row['iv_id'].$url_suffix
);
}
@ -716,7 +716,7 @@ class Tracking
$extend_link = '';
if ($inter_num > 1) {
$extend_link = Display::url(
Display::return_icon('invisible.png', get_lang('ExtendAttemptView')),
Display::return_icon('invisible.png', get_lang('Extend attempt view')),
api_get_self().'?action=stats&extend_id='.$my_item_id.'&extend_attempt_id='.$row['iv_id'].$url_suffix
);
}
@ -899,7 +899,7 @@ class Tracking
$correct_test_link = Display::url(
Display::return_icon(
'view_less_stats.gif',
get_lang('HideAllAttempts')
get_lang('Hide all attempts')
),
api_get_self().'?action=stats'.$my_url_suffix.'&session_id='.$session_id.'&lp_item_id='.$my_id.'#'.$linkId,
['id' => $linkId]
@ -909,7 +909,7 @@ class Tracking
Display::return_icon(
'view_more_stats.gif',
get_lang(
'ShowAllAttemptsByExercise'
'Show all attemptsByExercise'
)
),
api_get_self().'?action=stats&extend_attempt=1'.$my_url_suffix.'&session_id='.$session_id.'&lp_item_id='.$my_id.'#'.$linkId,
@ -947,7 +947,7 @@ class Tracking
if (!$is_allowed_to_edit && $result_disabled_ext_all) {
$scoreItem .= Display::return_icon(
'invisible.png',
get_lang('ResultsHiddenByExerciseSetting')
get_lang('Results hidden by the exercise setting')
);
} else {
$scoreItem .= ExerciseLib::show_score($score, $maxscore, false);
@ -1096,7 +1096,7 @@ class Tracking
$view_score = Display::return_icon(
'invisible.png',
get_lang(
'ResultsHiddenByExerciseSetting'
'Results hidden by the exercise setting'
)
);
} else {
@ -1142,22 +1142,22 @@ class Tracking
if ($origin != 'tracking') {
if (!$is_allowed_to_edit && $result_disabled_ext_all) {
$output .= '<td>
<img src="'.Display::returnIconPath('quiz_na.gif').'" alt="'.get_lang('ShowAttempt').'" title="'.get_lang('ShowAttempt').'">
<img src="'.Display::returnIconPath('quiz_na.gif').'" alt="'.get_lang('Show attempt').'" title="'.get_lang('Show attempt').'">
</td>';
} else {
$output .= '<td>
<a href="../exercise/exercise_show.php?origin='.$origin.'&id='.$my_exe_id.'&cidReq='.$courseCode.'" target="_parent">
<img src="'.Display::returnIconPath('quiz.png').'" alt="'.get_lang('ShowAttempt').'" title="'.get_lang('ShowAttempt').'">
<img src="'.Display::returnIconPath('quiz.png').'" alt="'.get_lang('Show attempt').'" title="'.get_lang('Show attempt').'">
</a></td>';
}
} else {
if (!$is_allowed_to_edit && $result_disabled_ext_all) {
$output .= '<td>
<img src="'.Display::returnIconPath('quiz_na.gif').'" alt="'.get_lang('ShowAndQualifyAttempt').'" title="'.get_lang('ShowAndQualifyAttempt').'"></td>';
<img src="'.Display::returnIconPath('quiz_na.gif').'" alt="'.get_lang('Show and grade attempt').'" title="'.get_lang('Show and grade attempt').'"></td>';
} else {
$output .= '<td>
<a href="../exercise/exercise_show.php?cidReq='.$courseCode.'&origin=correct_exercise_in_lp&id='.$my_exe_id.'" target="_parent">
<img src="'.Display::returnIconPath('quiz.gif').'" alt="'.get_lang('ShowAndQualifyAttempt').'" title="'.get_lang('ShowAndQualifyAttempt').'"></a></td>';
<img src="'.Display::returnIconPath('quiz.gif').'" alt="'.get_lang('Show and grade attempt').'" title="'.get_lang('Show and grade attempt').'"></a></td>';
}
}
}
@ -1219,8 +1219,8 @@ class Tracking
$total_time = str_replace('NaN', '00'.$h.'00\'00"', $total_time);
if (!$is_allowed_to_edit && $result_disabled_ext_all) {
$final_score = Display::return_icon('invisible.png', get_lang('ResultsHiddenByExerciseSetting'));
$finalScoreToCsv = get_lang('ResultsHiddenByExerciseSetting');
$final_score = Display::return_icon('invisible.png', get_lang('Results hidden by the exercise setting'));
$finalScoreToCsv = get_lang('Results hidden by the exercise setting');
} else {
if (is_numeric($total_score)) {
$final_score = $total_score.'%';
@ -1249,7 +1249,7 @@ class Tracking
$output .= '<tr class="'.$oddclass.'">
<td></td>
<td colspan="4">
<i>'.get_lang('AccomplishedStepsTotal').'</i>
<i>'.get_lang('Total of completed learning objects').'</i>
</td>
<td colspan="2">'.$progress.'%</td>
<td colspan="2">'.$final_score.'</td>
@ -1272,7 +1272,7 @@ class Tracking
];
$csv_content[] = $temp;
$temp = [
get_lang('AccomplishedStepsTotal'),
get_lang('Total of completed learning objects'),
'',
$finalScoreToCsv,
];
@ -2018,7 +2018,7 @@ class Tracking
if (api_is_allowed_to_edit()) {
$url = api_get_path(WEB_CODE_PATH).
'announcements/announcements.php?action=add&remind_inactive='.$student_id.'&cidReq='.$courseInfo['code'];
$icon = '<a href="'.$url.'" title="'.get_lang('RemindInactiveUser').'">
$icon = '<a href="'.$url.'" title="'.get_lang('Remind inactive user').'">
'.Display::return_icon('messagebox_warning.gif').'
</a>';
}
@ -3671,18 +3671,18 @@ class Tracking
if (!empty($sessions)) {
foreach ($sessions as &$session) {
if (empty($session['access_start_date'])) {
$session['status'] = get_lang('SessionActive');
$session['status'] = get_lang('active');
} else {
$time_start = api_strtotime($session['access_start_date'], 'UTC');
$time_end = api_strtotime($session['access_end_date'], 'UTC');
if ($time_start < time() && time() < $time_end) {
$session['status'] = get_lang('SessionActive');
$session['status'] = get_lang('active');
} else {
if (time() < $time_start) {
$session['status'] = get_lang('SessionFuture');
$session['status'] = get_lang('Not yet begun');
} else {
if (time() > $time_end) {
$session['status'] = get_lang('SessionPast');
$session['status'] = get_lang('Past');
}
}
}
@ -4658,19 +4658,19 @@ class Tracking
$html .= Display::page_subheader(
Display::return_icon(
'course.png',
get_lang('MyCourses'),
get_lang('My courses'),
[],
ICON_SIZE_SMALL
).' '.get_lang('MyCourses')
).' '.get_lang('My courses')
);
$columns = [
'course_title' => get_lang('Course'),
'time_spent' => get_lang('TimeSpentInTheCourse'),
'time_spent' => get_lang('Time spent in the course'),
'progress' => get_lang('Progress'),
'best_score_in_lp' => get_lang('BestScoreInLearningPath'),
'best_score_not_in_lp' => get_lang('BestScoreNotInLearningPath'),
'latest_login' => get_lang('LastConnexion'),
'best_score_in_lp' => get_lang('Best score in learning path'),
'best_score_not_in_lp' => get_lang('Best score not in learning path'),
'latest_login' => get_lang('Latest login'),
'details' => get_lang('Details'),
];
$availableColumns = [];
@ -4920,14 +4920,14 @@ class Tracking
$sessionIcon = Display::return_icon(
'session.png',
get_lang('Sessions'),
get_lang('Course sessions'),
[],
ICON_SIZE_SMALL
);
$anchor = Display::url('', '', ['name' => 'course_session_header']);
$html .= $anchor.Display::page_subheader(
$sessionIcon.' '.get_lang('Sessions')
$sessionIcon.' '.get_lang('Course sessions')
);
$html .= '<div class="table-responsive">';
@ -4935,9 +4935,9 @@ class Tracking
$html .= '<thead>';
$html .= '<tr>
'.Display::tag('th', get_lang('Session'), ['width' => '300px']).'
'.Display::tag('th', get_lang('PublishedExercises'), ['width' => '300px']).'
'.Display::tag('th', get_lang('NewExercises')).'
'.Display::tag('th', get_lang('AverageExerciseResult')).'
'.Display::tag('th', get_lang('Tests available'), ['width' => '300px']).'
'.Display::tag('th', get_lang('New exercises')).'
'.Display::tag('th', get_lang('Average exercise result')).'
'.Display::tag('th', get_lang('Details')).'
</tr>';
$html .= '</thead>';
@ -5050,7 +5050,7 @@ class Tracking
$course_list = $session_data['course_list'];
$html .= '<a name= "course_session_list"></a>';
$html .= Display::tag('h3', $session_data['name'].' - '.get_lang('CourseList'));
$html .= Display::tag('h3', $session_data['name'].' - '.get_lang('Course list'));
$html .= '<div class="table-responsive">';
$html .= '<table class="table table-hover table-striped">';
@ -5061,36 +5061,36 @@ class Tracking
['width' => '300px'],
],
'published_exercises' => [
get_lang('PublishedExercises'),
get_lang('Tests available'),
],
'new_exercises' => [
get_lang('NewExercises'),
get_lang('New exercises'),
],
'my_average' => [
get_lang('MyAverage'),
get_lang('My average'),
],
'average_exercise_result' => [
get_lang('AverageExerciseResult'),
get_lang('Average exercise result'),
],
'time_spent' => [
get_lang('TimeSpentInTheCourse'),
get_lang('Time spent in the course'),
],
'lp_progress' => [
get_lang('LPProgress'),
get_lang('Learning path progress'),
],
'score' => [
get_lang('Score').
Display::return_icon(
'info3.gif',
get_lang('ScormAndLPTestTotalAverage'),
get_lang('Average of tests in Learning Paths'),
['align' => 'absmiddle', 'hspace' => '3px']
),
],
'best_score' => [
get_lang('BestScore'),
get_lang('Best score'),
],
'last_connection' => [
get_lang('LastConnexion'),
get_lang('Latest login'),
],
'details' => [
get_lang('Details'),
@ -5323,12 +5323,12 @@ class Tracking
$html .= '
<thead>
<tr>
<th>'.get_lang('Exercises').'</th>
<th>'.get_lang('Tests').'</th>
<th>'.get_lang('Attempts').'</th>
<th>'.get_lang('BestAttempt').'</th>
<th>'.get_lang('Best attempt').'</th>
<th>'.get_lang('Ranking').'</th>
<th>'.get_lang('BestResultInCourse').'</th>
<th>'.get_lang('Statistics').' '.Display::return_icon('info3.gif', get_lang('OnlyBestResultsPerStudent'), ['align' => 'absmiddle', 'hspace' => '3px']).'</th>
<th>'.get_lang('Best result in course').'</th>
<th>'.get_lang('Statistics').' '.Display::return_icon('info3.gif', get_lang('In case of multiple attempts, only shows the best result of each learner'), ['align' => 'absmiddle', 'hspace' => '3px']).'</th>
</tr>
</thead>
<tbody>';
@ -5388,7 +5388,7 @@ class Tracking
['target' => SESSION_LINK_TARGET]
);
} elseif ($exercices['active'] == -1) {
$exercices['title'] = sprintf(get_lang('XParenthesisDeleted'), $exercices['title']);
$exercices['title'] = sprintf(get_lang('%s (deleted)'), $exercices['title']);
}
$html .= Display::tag('td', $exercices['title']);
@ -5507,17 +5507,17 @@ class Tracking
$html .= '</tr>';
}
} else {
$html .= '<tr><td colspan="5">'.get_lang('NoEx').'</td></tr>';
$html .= '<tr><td colspan="5">'.get_lang('There is no test for the moment').'</td></tr>';
}
$html .= '</tbody></table></div>';
$columnHeaders = [
'lp' => get_lang('LearningPath'),
'time' => get_lang('LatencyTimeSpent'),
'lp' => get_lang('Learning paths'),
'time' => get_lang('Time spent'),
'progress' => get_lang('Progress'),
'score' => get_lang('Score'),
'best_score' => get_lang('BestScore'),
'last_connection' => get_lang('LastConnexion'),
'best_score' => get_lang('Best score'),
'last_connection' => get_lang('Latest login'),
];
$headers = '';
@ -5672,7 +5672,7 @@ class Tracking
} else {
$html .= '<tr>
<td colspan="4" align="center">
'.get_lang('NoLearnpath').'
'.get_lang('No learning path').'
</td>
</tr>';
}
@ -5702,13 +5702,13 @@ class Tracking
labels:".json_encode($names).",
datasets: [
{
label: '".get_lang('MyResults')."',
label: '".get_lang('My results')."',
backgroundColor: 'rgb(255, 99, 132)',
stack: 'Stack1',
data: ".json_encode($my_results).",
},
{
label: '".get_lang('AverageScore')."',
label: '".get_lang('Average score')."',
backgroundColor: 'rgb(75, 192, 192)',
stack: 'Stack2',
data: ".json_encode($average).",
@ -5722,7 +5722,7 @@ class Tracking
options: {
title: {
display: true,
text: '".get_lang('ExercisesInTimeProgressChart')."'
text: '".get_lang('TestsInTimeProgressChart')."'
},
tooltips: {
mode: 'index',
@ -6014,7 +6014,7 @@ class Tracking
$dataSet->addPoints($x_axis, 'Serie3');
$dataSet->setSerieDescription('Serie1', get_lang('Score'));
$dataSet->setSerieDescription('Serie2', get_lang('MyResults'));
$dataSet->setSerieDescription('Serie2', get_lang('My results'));
$dataSet->setAbscissa('Serie3');
$dataSet->setXAxisName(get_lang('Score'));
@ -6132,13 +6132,13 @@ class Tracking
'select',
'active',
get_lang('Status'),
[1 => get_lang('Active'), 0 => get_lang('Inactive')]
[1 => get_lang('active'), 0 => get_lang('inactive')]
);
$form->addElement(
'select',
'sleeping_days',
get_lang('InactiveDays'),
get_lang('inactiveDays'),
[
'',
1 => 1,
@ -6223,7 +6223,7 @@ class Tracking
}
// Now we have two arrays of courses and sessions with enough data to proceed
// If no course could be found, we shouldn't return anything.
// Sessions can be empty (then we only return the pure-course-context results)
// Course sessions can be empty (then we only return the pure-course-context results)
if (count($courses) < 1) {
return [];
}
@ -6653,7 +6653,7 @@ class Tracking
$ip = Display::url(
(empty($body_replace) ? $row_ip[1] : $body_replace),
'http://www.whatsmyip.org/ip-geo-location/?ip='.$row_ip[1],
['title' => get_lang('TraceIP'), 'target' => '_blank']
['title' => get_lang('Trace IP'), 'target' => '_blank']
);
} else {
$ip = $row_ip[1];
@ -6679,8 +6679,8 @@ class Tracking
$courseToolInformation = '';
$headerTool = [
[get_lang('Title')],
[get_lang('CreatedAt')],
[get_lang('UpdatedAt')],
[get_lang('Created at')],
[get_lang('Updated at')],
];
$headerListForCSV = [];
@ -6719,7 +6719,7 @@ class Tracking
if (!empty($courseWorkInformationArray)) {
$csvContent[] = null;
$csvContent[] = [get_lang('Works')];
$csvContent[] = [get_lang('Assignments')];
$csvContent[] = $headerListForCSV;
foreach ($courseWorkInformationArray as $row) {
@ -6728,7 +6728,7 @@ class Tracking
$csvContent[] = null;
$courseToolInformation .= Display::page_subheader2(
get_lang('Works')
get_lang('Assignments')
);
$courseToolInformation .= Display::return_sortable_table(
$headerTool,
@ -7170,7 +7170,7 @@ class TrackingCourseLog
// the select field with the additional user profile fields (= this is where we select the field of which we want to see
// the information the users have entered or selected.
$return .= '<select class="chzn-select" name="additional_profile_field[]" multiple>';
$return .= '<option value="-">'.get_lang('SelectFieldToAdd').'</option>';
$return .= '<option value="-">'.get_lang('Select user profile field to add').'</option>';
$extra_fields_to_show = 0;
foreach ($extra_fields as $key => $field) {
// show only extra fields that are visible + and can be filtered, added by J.Montoya
@ -7193,7 +7193,7 @@ class TrackingCourseLog
}
}
// the submit button
$return .= '<button class="save" type="submit">'.get_lang('AddAdditionalProfileField').'</button>';
$return .= '<button class="save" type="submit">'.get_lang('Add user profile field').'</button>';
$return .= '</form>';
if ($extra_fields_to_show > 0) {
return $return;
@ -7723,7 +7723,7 @@ class TrackingCourseLog
$user['total_lp_time'] = $totalLpTime;
$warning = '';
if ($totalLpTime > $totalCourseTime) {
$warning = '&nbsp;'.Display::label(get_lang('TimeDifference'), 'danger');
$warning = '&nbsp;'.Display::label(get_lang('Time difference'), 'danger');
}
$user['total_lp_time'] = api_time_to_hms($totalLpTime).$warning;
@ -7775,32 +7775,32 @@ class TrackingCourseLog
public static function actionsLeft($current, $sessionId = 0)
{
$usersLink = Display::url(
Display::return_icon('user.png', get_lang('StudentsTracking'), [], ICON_SIZE_MEDIUM),
Display::return_icon('user.png', get_lang('Report on learners'), [], ICON_SIZE_MEDIUM),
'courseLog.php?'.api_get_cidreq(true, false)
);
$groupsLink = Display::url(
Display::return_icon('group.png', get_lang('GroupReporting'), [], ICON_SIZE_MEDIUM),
Display::return_icon('group.png', get_lang('Group reporting'), [], ICON_SIZE_MEDIUM),
'course_log_groups.php?'.api_get_cidreq()
);
$resourcesLink = Display::url(
Display::return_icon('tools.png', get_lang('ResourcesTracking'), [], ICON_SIZE_MEDIUM),
Display::return_icon('tools.png', get_lang('Report on resource'), [], ICON_SIZE_MEDIUM),
'course_log_resources.php?'.api_get_cidreq(true, false)
);
$courseLink = Display::url(
Display::return_icon('course.png', get_lang('CourseTracking'), [], ICON_SIZE_MEDIUM),
Display::return_icon('course.png', get_lang('Course report'), [], ICON_SIZE_MEDIUM),
'course_log_tools.php?'.api_get_cidreq(true, false)
);
$examLink = Display::url(
Display::return_icon('quiz.png', get_lang('ExamTracking'), [], ICON_SIZE_MEDIUM),
Display::return_icon('quiz.png', get_lang('Exam tracking'), [], ICON_SIZE_MEDIUM),
api_get_path(WEB_CODE_PATH).'tracking/exams.php?'.api_get_cidreq()
);
$eventsLink = Display::url(
Display::return_icon('security.png', get_lang('EventsReport'), [], ICON_SIZE_MEDIUM),
Display::return_icon('security.png', get_lang('Audit report'), [], ICON_SIZE_MEDIUM),
api_get_path(WEB_CODE_PATH).'tracking/course_log_events.php?'.api_get_cidreq()
);
@ -7817,7 +7817,7 @@ class TrackingCourseLog
$usersLink = Display::url(
Display::return_icon(
'user_na.png',
get_lang('StudentsTracking'),
get_lang('Report on learners'),
[],
ICON_SIZE_MEDIUM
),
@ -7826,13 +7826,13 @@ class TrackingCourseLog
break;
case 'groups':
$groupsLink = Display::url(
Display::return_icon('group_na.png', get_lang('GroupReporting'), [], ICON_SIZE_MEDIUM),
Display::return_icon('group_na.png', get_lang('Group reporting'), [], ICON_SIZE_MEDIUM),
'#'
);
break;
case 'courses':
$courseLink = Display::url(
Display::return_icon('course_na.png', get_lang('CourseTracking'), [], ICON_SIZE_MEDIUM),
Display::return_icon('course_na.png', get_lang('Course report'), [], ICON_SIZE_MEDIUM),
'#'
);
break;
@ -7840,7 +7840,7 @@ class TrackingCourseLog
$resourcesLink = Display::url(
Display::return_icon(
'tools_na.png',
get_lang('ResourcesTracking'),
get_lang('Report on resource'),
[],
ICON_SIZE_MEDIUM
),
@ -7849,13 +7849,13 @@ class TrackingCourseLog
break;
case 'exams':
$examLink = Display::url(
Display::return_icon('quiz_na.png', get_lang('ExamTracking'), [], ICON_SIZE_MEDIUM),
Display::return_icon('quiz_na.png', get_lang('Exam tracking'), [], ICON_SIZE_MEDIUM),
'#'
);
break;
case 'logs':
$eventsLink = Display::url(
Display::return_icon('security_na.png', get_lang('EventsReport'), [], ICON_SIZE_MEDIUM),
Display::return_icon('security_na.png', get_lang('Audit report'), [], ICON_SIZE_MEDIUM),
'#'
);
break;

@ -262,7 +262,7 @@ class UserGroup extends Model
$html .= '<a href="../admin/index.php">'.
Display::return_icon(
'back.png',
get_lang('BackTo').' '.get_lang('PlatformAdmin'),
get_lang('Back to').' '.get_lang('Administration'),
'',
ICON_SIZE_MEDIUM
).
@ -270,7 +270,7 @@ class UserGroup extends Model
}
$html .= '<a href="'.api_get_self().'?action=add">'.
Display::return_icon('new_class.png', get_lang('AddClasses'), '', ICON_SIZE_MEDIUM).
Display::return_icon('new_class.png', get_lang('Add classes'), '', ICON_SIZE_MEDIUM).
'</a>';
$html .= Display::url(
Display::return_icon('import_csv.png', get_lang('Import'), [], ICON_SIZE_MEDIUM),
@ -296,11 +296,11 @@ class UserGroup extends Model
$courseInfo = api_get_course_info();
if (empty($courseInfo)) {
echo '<a href="../admin/usergroups.php">'.
Display::return_icon('back.png', get_lang('BackTo').' '.get_lang('PlatformAdmin'), '', '32').
Display::return_icon('back.png', get_lang('Back to').' '.get_lang('Administration'), '', '32').
'</a>';
} else {
echo Display::url(
Display::return_icon('back.png', get_lang('BackTo').' '.get_lang('PlatformAdmin'), '', '32'),
Display::return_icon('back.png', get_lang('Back to').' '.get_lang('Administration'), '', '32'),
api_get_path(WEB_CODE_PATH).'user/class.php?'.api_get_cidreq()
);
}
@ -384,7 +384,7 @@ class UserGroup extends Model
$select = 'count(u.id) as count';
}
if ($this->getUseMultipleUrl()) {
if ($this->getUseMultipleURL()) {
$sql = "SELECT $select
FROM {$this->usergroup_rel_course_table} usergroup
INNER JOIN {$this->table} u
@ -1593,7 +1593,7 @@ class UserGroup extends Model
$form->addElement('text', 'name', get_lang('Name'), ['maxlength' => 255]);
$form->applyFilter('name', 'trim');
$form->addRule('name', get_lang('ThisFieldIsRequired'), 'required');
$form->addRule('name', get_lang('Required field'), 'required');
$form->addRule('name', '', 'maxlength', 255);
// Description
@ -1613,12 +1613,12 @@ class UserGroup extends Model
'checkbox',
'group_type',
null,
get_lang('SocialGroup')
get_lang('Social group')
);
}
// url
$form->addElement('text', 'url', get_lang('Url'));
$form->addElement('text', 'url', get_lang('URL'));
$form->applyFilter('url', 'trim');
// Picture
@ -1627,7 +1627,7 @@ class UserGroup extends Model
// Picture
$form->addFile(
'picture',
get_lang('AddPicture'),
get_lang('Add a picture'),
['id' => 'picture', 'class' => 'picture-form', 'crop_image' => true, 'crop_ratio' => '1 / 1']
);
@ -1635,12 +1635,12 @@ class UserGroup extends Model
$picture = $this->get_picture_group($data['id'], $data['picture'], 80);
$img = '<img src="'.$picture.'" />';
$form->addElement('label', null, $img);
$form->addElement('checkbox', 'delete_picture', '', get_lang('DelImage'));
$form->addElement('checkbox', 'delete_picture', '', get_lang('Remove picture'));
}
$form->addElement('select', 'visibility', get_lang('GroupPermissions'), $this->getGroupStatusList());
$form->setRequiredNote('<span class="form_required">*</span> <small>'.get_lang('ThisFieldIsRequired').'</small>');
$form->addElement('checkbox', 'allow_members_leave_group', '', get_lang('AllowMemberLeaveGroup'));
$form->addElement('select', 'visibility', get_lang('Group Permissions'), $this->getGroupStatusList());
$form->setRequiredNote('<span class="form_required">*</span> <small>'.get_lang('Required field').'</small>');
$form->addElement('checkbox', 'allow_members_leave_group', '', get_lang('Allow members to leave group'));
// Setting the form elements
if ($type === 'add') {
@ -1928,13 +1928,13 @@ class UserGroup extends Model
$roleToString = get_lang('Reader');
break;
case GROUP_USER_PERMISSION_PENDING_INVITATION:
$roleToString = get_lang('PendingInvitation');
$roleToString = get_lang('Pending invitation');
break;
case GROUP_USER_PERMISSION_MODERATOR:
$roleToString = get_lang('Moderator');
break;
case GROUP_USER_PERMISSION_HRM:
$roleToString = get_lang('Drh');
$roleToString = get_lang('Human Resources Manager');
break;
}
@ -2406,64 +2406,64 @@ class UserGroup extends Model
switch ($my_group_role) {
case GROUP_USER_PERMISSION_READER:
// I'm just a reader
$relation_group_title = get_lang('IAmAReader');
$relation_group_title = get_lang('I am a reader');
$links .= '<li class="'.($show == 'invite_friends' ? 'active' : '').'"><a href="group_invitation.php?id='.$group_id.'">'.
Display::return_icon('invitation_friend.png', get_lang('InviteFriends')).get_lang('InviteFriends').'</a></li>';
Display::return_icon('invitation_friend.png', get_lang('Invite friends')).get_lang('Invite friends').'</a></li>';
if (self::canLeave($group_info)) {
$links .= '<li><a href="group_view.php?id='.$group_id.'&action=leave&u='.api_get_user_id().'">'.
Display::return_icon('group_leave.png', get_lang('LeaveGroup')).get_lang('LeaveGroup').'</a></li>';
Display::return_icon('group_leave.png', get_lang('Leave group')).get_lang('Leave group').'</a></li>';
}
break;
case GROUP_USER_PERMISSION_ADMIN:
$relation_group_title = get_lang('IAmAnAdmin');
$relation_group_title = get_lang('I am an admin');
$links .= '<li class="'.($show == 'group_edit' ? 'active' : '').'"><a href="group_edit.php?id='.$group_id.'">'.
Display::return_icon('group_edit.png', get_lang('EditGroup')).get_lang('EditGroup').'</a></li>';
Display::return_icon('group_edit.png', get_lang('Edit this group')).get_lang('Edit this group').'</a></li>';
$links .= '<li class="'.($show == 'member_list' ? 'active' : '').'"><a href="group_waiting_list.php?id='.$group_id.'">'.
Display::return_icon('waiting_list.png', get_lang('WaitingList')).get_lang('WaitingList').'</a></li>';
Display::return_icon('waiting_list.png', get_lang('Waiting list')).get_lang('Waiting list').'</a></li>';
$links .= '<li class="'.($show == 'invite_friends' ? 'active' : '').'"><a href="group_invitation.php?id='.$group_id.'">'.
Display::return_icon('invitation_friend.png', get_lang('InviteFriends')).get_lang('InviteFriends').'</a></li>';
Display::return_icon('invitation_friend.png', get_lang('Invite friends')).get_lang('Invite friends').'</a></li>';
if (self::canLeave($group_info)) {
$links .= '<li><a href="group_view.php?id='.$group_id.'&action=leave&u='.api_get_user_id().'">'.
Display::return_icon('group_leave.png', get_lang('LeaveGroup')).get_lang('LeaveGroup').'</a></li>';
Display::return_icon('group_leave.png', get_lang('Leave group')).get_lang('Leave group').'</a></li>';
}
break;
case GROUP_USER_PERMISSION_PENDING_INVITATION:
// $links .= '<li><a href="groups.php?id='.$group_id.'&action=join&u='.api_get_user_id().'">'.Display::return_icon('addd.gif', get_lang('YouHaveBeenInvitedJoinNow'), array('hspace'=>'6')).'<span class="social-menu-text4" >'.get_lang('YouHaveBeenInvitedJoinNow').'</span></a></li>';
// $links .= '<li><a href="groups.php?id='.$group_id.'&action=join&u='.api_get_user_id().'">'.Display::return_icon('addd.gif', get_lang('You have been invited to join now'), array('hspace'=>'6')).'<span class="social-menu-text4" >'.get_lang('You have been invited to join now').'</span></a></li>';
break;
case GROUP_USER_PERMISSION_PENDING_INVITATION_SENT_BY_USER:
$relation_group_title = get_lang('WaitingForAdminResponse');
$relation_group_title = get_lang('Waiting for admin response');
break;
case GROUP_USER_PERMISSION_MODERATOR:
$relation_group_title = get_lang('IAmAModerator');
//$links .= '<li><a href="'.api_get_path(WEB_CODE_PATH).'social/message_for_group_form.inc.php?view_panel=1&height=400&width=610&&user_friend='.api_get_user_id().'&group_id='.$group_id.'&action=add_message_group" class="thickbox" title="'.get_lang('ComposeMessage').'">'.Display::return_icon('compose_message.png', get_lang('NewTopic'), array('hspace'=>'6')).'<span class="social-menu-text4" >'.get_lang('NewTopic').'</span></a></li>';
//$links .= '<li><a href="groups.php?id='.$group_id.'">'. Display::return_icon('message_list.png', get_lang('MessageList'), array('hspace'=>'6')).'<span class="'.($show=='messages_list'?'social-menu-text-active':'social-menu-text4').'" >'.get_lang('MessageList').'</span></a></li>';
//$links .= '<li><a href="group_members.php?id='.$group_id.'">'. Display::return_icon('member_list.png', get_lang('MemberList'), array('hspace'=>'6')).'<span class="'.($show=='member_list'?'social-menu-text-active':'social-menu-text4').'" >'.get_lang('MemberList').'</span></a></li>';
$relation_group_title = get_lang('I am a moderator');
//$links .= '<li><a href="'.api_get_path(WEB_CODE_PATH).'social/message_for_group_form.inc.php?view_panel=1&height=400&width=610&&user_friend='.api_get_user_id().'&group_id='.$group_id.'&action=add_message_group" class="thickbox" title="'.get_lang('Compose message').'">'.Display::return_icon('compose_message.png', get_lang('Create thread'), array('hspace'=>'6')).'<span class="social-menu-text4" >'.get_lang('Create thread').'</span></a></li>';
//$links .= '<li><a href="groups.php?id='.$group_id.'">'. Display::return_icon('message_list.png', get_lang('Messages list'), array('hspace'=>'6')).'<span class="'.($show=='messages_list'?'social-menu-text-active':'social-menu-text4').'" >'.get_lang('Messages list').'</span></a></li>';
//$links .= '<li><a href="group_members.php?id='.$group_id.'">'. Display::return_icon('member_list.png', get_lang('Members list'), array('hspace'=>'6')).'<span class="'.($show=='member_list'?'social-menu-text-active':'social-menu-text4').'" >'.get_lang('Members list').'</span></a></li>';
if ($group_info['visibility'] == GROUP_PERMISSION_CLOSED) {
$links .= '<li><a href="group_waiting_list.php?id='.$group_id.'">'.
Display::return_icon('waiting_list.png', get_lang('WaitingList')).get_lang('WaitingList').'</a></li>';
Display::return_icon('waiting_list.png', get_lang('Waiting list')).get_lang('Waiting list').'</a></li>';
}
$links .= '<li><a href="group_invitation.php?id='.$group_id.'">'.
Display::return_icon('invitation_friend.png', get_lang('InviteFriends')).get_lang('InviteFriends').'</a></li>';
Display::return_icon('invitation_friend.png', get_lang('Invite friends')).get_lang('Invite friends').'</a></li>';
if (self::canLeave($group_info)) {
$links .= '<li><a href="group_view.php?id='.$group_id.'&action=leave&u='.api_get_user_id().'">'.
Display::return_icon('group_leave.png', get_lang('LeaveGroup')).get_lang('LeaveGroup').'</a></li>';
Display::return_icon('group_leave.png', get_lang('Leave group')).get_lang('Leave group').'</a></li>';
}
break;
case GROUP_USER_PERMISSION_HRM:
$relation_group_title = get_lang('IAmAHRM');
$links .= '<li><a href="'.api_get_path(WEB_CODE_PATH).'social/message_for_group_form.inc.php?view_panel=1&height=400&width=610&&user_friend='.api_get_user_id().'&group_id='.$group_id.'&action=add_message_group" class="ajax" title="'.get_lang('ComposeMessage').'" data-size="lg" data-title="'.get_lang('ComposeMessage').'">'.
Display::return_icon('new-message.png', get_lang('NewTopic')).get_lang('NewTopic').'</a></li>';
$relation_group_title = get_lang('I am a human resources manager');
$links .= '<li><a href="'.api_get_path(WEB_CODE_PATH).'social/message_for_group_form.inc.php?view_panel=1&height=400&width=610&&user_friend='.api_get_user_id().'&group_id='.$group_id.'&action=add_message_group" class="ajax" title="'.get_lang('Compose message').'" data-size="lg" data-title="'.get_lang('Compose message').'">'.
Display::return_icon('new-message.png', get_lang('Create thread')).get_lang('Create thread').'</a></li>';
$links .= '<li><a href="group_view.php?id='.$group_id.'">'.
Display::return_icon('message_list.png', get_lang('MessageList')).get_lang('MessageList').'</a></li>';
Display::return_icon('message_list.png', get_lang('Messages list')).get_lang('Messages list').'</a></li>';
$links .= '<li><a href="group_invitation.php?id='.$group_id.'">'.
Display::return_icon('invitation_friend.png', get_lang('InviteFriends')).get_lang('InviteFriends').'</a></li>';
Display::return_icon('invitation_friend.png', get_lang('Invite friends')).get_lang('Invite friends').'</a></li>';
$links .= '<li><a href="group_members.php?id='.$group_id.'">'.
Display::return_icon('member_list.png', get_lang('MemberList')).get_lang('MemberList').'</a></li>';
Display::return_icon('member_list.png', get_lang('Members list')).get_lang('Members list').'</a></li>';
$links .= '<li><a href="group_view.php?id='.$group_id.'&action=leave&u='.api_get_user_id().'">'.
Display::return_icon('delete_data.gif', get_lang('LeaveGroup')).get_lang('LeaveGroup').'</a></li>';
Display::return_icon('delete_data.gif', get_lang('Leave group')).get_lang('Leave group').'</a></li>';
break;
default:
//$links .= '<li><a href="groups.php?id='.$group_id.'&action=join&u='.api_get_user_id().'">'.Display::return_icon('addd.gif', get_lang('JoinGroup'), array('hspace'=>'6')).'<span class="social-menu-text4" >'.get_lang('JoinGroup').'</a></span></li>';
//$links .= '<li><a href="groups.php?id='.$group_id.'&action=join&u='.api_get_user_id().'">'.Display::return_icon('addd.gif', get_lang('Join group'), array('hspace'=>'6')).'<span class="social-menu-text4" >'.get_lang('Join group').'</a></span></li>';
break;
}
if (!empty($links)) {
@ -2471,7 +2471,7 @@ class UserGroup extends Model
$list .= $links;
$list .= '</ul>';
$html .= Display::panelCollapse(
get_lang('SocialGroups'),
get_lang('Social groups'),
$list,
'sm-groups',
[],

@ -169,7 +169,7 @@ class UserManager
$language = '',
$phone = '',
$picture_uri = '',
$authSource = PLATFORM_AUTH_SOURCE,
$authSource = null,
$expirationDate = null,
$active = 1,
$hr_dept_id = 0,
@ -184,6 +184,7 @@ class UserManager
$emailTemplate = [],
$redirectToURLAfterLogin = ''
) {
$authSource = !empty($authSource) ? $authSource : PLATFORM_AUTH_SOURCE;
$creatorId = empty($creatorId) ? api_get_user_id() : 0;
$creatorInfo = api_get_user_info($creatorId);
$creatorEmail = isset($creatorInfo['email']) ? $creatorInfo['email'] : '';
@ -196,7 +197,7 @@ class UserManager
// First check wether the login already exists
if (!self::is_username_available($loginName)) {
Display::addFlash(
Display::return_message(get_lang('LoginAlreadyTaken'))
Display::return_message(get_lang('This login is already taken !'))
);
return false;
@ -228,7 +229,7 @@ class UserManager
api_warn_hosting_contact('hosting_limit_users');
Display::addFlash(
Display::return_message(
get_lang('PortalUsersLimitReached'),
get_lang('Sorry, this installation has a users limit, which has now been reached. To increase the number of users allowed on this Chamilo installation, please contact your hosting provider or, if available, upgrade to a superior hosting plan.'),
'warning'
)
);
@ -247,7 +248,7 @@ class UserManager
if ($num >= $_configuration[$access_url_id]['hosting_limit_teachers']) {
Display::addFlash(
Display::return_message(
get_lang('PortalTeachersLimitReached'),
get_lang('Sorry, this installation has a teachers limit, which has now been reached. To increase the number of teachers allowed on this Chamilo installation, please contact your hosting provider or, if available, upgrade to a superior hosting plan.'),
'warning'
)
);
@ -261,7 +262,7 @@ class UserManager
if ($authSource === PLATFORM_AUTH_SOURCE) {
Display::addFlash(
Display::return_message(
get_lang('ThisFieldIsRequired').': '.get_lang(
get_lang('Required field').': '.get_lang(
'Password'
),
'warning'
@ -578,7 +579,7 @@ class UserManager
$notification = api_get_configuration_value('send_notification_when_user_added');
if (!empty($notification) && isset($notification['admins']) && is_array($notification['admins'])) {
foreach ($notification['admins'] as $adminId) {
$emailSubjectToAdmin = get_lang('UserAdded').': '.api_get_person_name($firstName, $lastName);
$emailSubjectToAdmin = get_lang('The user has been added').': '.api_get_person_name($firstName, $lastName);
MessageManager::send_message_simple($adminId, $emailSubjectToAdmin, $emailBody, $userId);
}
}
@ -622,7 +623,7 @@ class UserManager
);
}
$subject = get_lang('UserAdded');
$subject = get_lang('The user has been added');
foreach ($adminList as $adminId => $data) {
MessageManager::send_message_simple(
@ -646,7 +647,7 @@ class UserManager
Event::addEvent(LOG_USER_CREATE, LOG_USER_ID, $userId, null, $creatorId);
} else {
Display::addFlash(
Display::return_message(get_lang('ErrorContactPlatformAdmin'))
Display::return_message(get_lang('There happened an unknown error. Please contact the platform administrator.'))
);
return false;
@ -1212,7 +1213,7 @@ class UserManager
if (!empty($email) && $send_email) {
$recipient_name = api_get_person_name($firstname, $lastname, null, PERSON_NAME_EMAIL_ADDRESS);
$emailsubject = '['.api_get_setting('siteName').'] '.get_lang('YourReg').' '.api_get_setting('siteName');
$emailsubject = '['.api_get_setting('siteName').'] '.get_lang('Your registration on').' '.api_get_setting('siteName');
$sender_name = api_get_person_name(
api_get_setting('administratorName'),
api_get_setting('administratorSurname'),
@ -4422,12 +4423,12 @@ class UserManager
$query = Security::remove_XSS($query);
if (!empty($query)) {
$form->addHeader(get_lang('Results').' "'.$query.'"');
$form->addHeader(get_lang('Results and feedback').' "'.$query.'"');
}
$form->addText(
'q',
get_lang('UsersGroups'),
get_lang('Users, Groups'),
false,
[
'id' => 'q',
@ -4497,7 +4498,7 @@ class UserManager
{
echo '<div class="actions">';
echo '<a href="/main/auth/profile.php">'.
Display::return_icon('profile.png').' '.get_lang('PersonalData').'</a>';
Display::return_icon('profile.png').' '.get_lang('Profile').'</a>';
echo '<a href="/main/messages/inbox.php">'.
Display::return_icon('inbox.png').' '.get_lang('Inbox').'</a>';
echo '<a href="/main/messages/outbox.php">'.
@ -5471,8 +5472,8 @@ class UserManager
$name = $studentInfo['complete_name'];
$url = api_get_path(WEB_CODE_PATH).'mySpace/myStudents.php?student='.$studentId;
$url = Display::url($url, $url);
$subject = sprintf(get_lang('UserXHasBeenAssignedToBoss'), $name);
$message = sprintf(get_lang('UserXHasBeenAssignedToBossWithUrlX'), $name, $url);
$subject = sprintf(get_lang('You have been assigned the learner %s'), $name);
$message = sprintf(get_lang('You have been assigned the learner %sWithUrlX'), $name, $url);
MessageManager::send_message_simple(
$bossId,
$subject,
@ -5776,19 +5777,19 @@ SQL;
$headers = [
[
'url' => $userPath.'user.php?'.api_get_cidreq().'&type='.STUDENT,
'content' => get_lang('Students'),
'content' => get_lang('Learners'),
],
[
'url' => $userPath.'user.php?'.api_get_cidreq().'&type='.COURSEMANAGER,
'content' => get_lang('Teachers'),
'content' => get_lang('Trainers'),
],
/*[
'url' => $userPath.'subscribe_user.php?'.api_get_cidreq(),
'content' => get_lang('Students'),
'content' => get_lang('Learners'),
],
[
'url' => $userPath.'subscribe_user.php?type=teacher&'.api_get_cidreq(),
'content' => get_lang('Teachers'),
'content' => get_lang('Trainers'),
],*/
[
'url' => api_get_path(WEB_CODE_PATH).'group/group.php?'.api_get_cidreq(),
@ -6000,8 +6001,8 @@ SQL;
if (!empty($sessionToRedirect)) {
$url .= '&s='.$sessionToRedirect;
}
$mailSubject = get_lang('RegistrationConfirmation');
$mailBody = get_lang('RegistrationConfirmationEmailMessage')
$mailSubject = get_lang('Registration confirmation');
$mailBody = get_lang('Registration confirmationEmailMessage')
.PHP_EOL
.Display::url($url, $url);
@ -6011,7 +6012,7 @@ SQL;
$mailSubject,
$mailBody
);
Display::addFlash(Display::return_message(get_lang('CheckYourEmailAndFollowInstructions')));
Display::addFlash(Display::return_message(get_lang('Check your e-mail and follow the instructions.')));
}
/**
@ -6156,18 +6157,18 @@ SQL;
self::anonymize($userId)
) {
$message = Display::return_message(
sprintf(get_lang('UserXAnonymized'), $userToUpdateInfo['complete_name_with_username']),
sprintf(get_lang('User %s information anonymized.'), $userToUpdateInfo['complete_name_with_username']),
'confirmation'
);
} else {
$message = Display::return_message(
sprintf(get_lang('CannotAnonymizeUserX'), $userToUpdateInfo['complete_name_with_username']),
sprintf(get_lang('We could not anonymize user %s information. Please try again or check the logs.'), $userToUpdateInfo['complete_name_with_username']),
'error'
);
}
} else {
$message = Display::return_message(
sprintf(get_lang('NoPermissionToAnonymizeUserX'), $userToUpdateInfo['complete_name_with_username']),
sprintf(get_lang('You don\'t have permissions to anonymize user %s. You need the same permissions as to delete users.'), $userToUpdateInfo['complete_name_with_username']),
'error'
);
}
@ -6186,7 +6187,7 @@ SQL;
public static function deleteUserWithVerification($userId)
{
$allowDelete = api_get_configuration_value('allow_delete_user_for_session_admin');
$message = Display::return_message(get_lang('CannotDeleteUser'), 'error');
$message = Display::return_message(get_lang('You cannot delete this user'), 'error');
$userToUpdateInfo = api_get_user_info($userId);
// User must exist.
@ -6207,11 +6208,11 @@ SQL;
if (api_global_admin_can_edit_admin($userId, null, $allowDelete)) {
if (self::delete_user($userId)) {
$message = Display::return_message(
get_lang('UserDeleted').': '.$userToUpdateInfo['complete_name_with_username'],
get_lang('The user has been deleted').': '.$userToUpdateInfo['complete_name_with_username'],
'confirmation'
);
} else {
$message = Display::return_message(get_lang('CannotDeleteUserBecauseOwnsCourse'), 'error');
$message = Display::return_message(get_lang('You cannot delete this userBecauseOwnsCourse'), 'error');
}
}
}

@ -143,6 +143,7 @@ class IndexManager
*/
public function return_home_page($getIncludedFile = false)
{
return '';
$userId = api_get_user_id();
// Including the page for the news
$html = '';
@ -184,7 +185,7 @@ class IndexManager
}
if (trim($home_top_temp) == '' && api_is_platform_admin()) {
$home_top_temp = get_lang('PortalHomepageDefaultIntroduction');
//$home_top_temp = get_lang('<h2>Congratulations! You have successfully installed your e-learning portal!</h2> <p>You can now complete the installation by following three easy steps:<br /> <ol> <li>Configure you portal by going to the administration section, and select the Portal -> <a href="main/admin/settings.php">Configuration settings</a> entry.</li> <li>Add some life to your portal by creating users and/or training. You can do that by inviting new people to create their accounts or creating them yourself through the <a href="main/admin/">administration</a>\'s Users and Training sections.</li> <li>Edit this page through the <a href="main/admin/configure_homepage.php">Edit portal homepage</a> entry in the administration section.</li> </ol> <p>You can always find more information about this software on our website: <a href="http://www.chamilo.org">http://www.chamilo.org</a>.</p> <p>Have fun, and don't hesitate to join the community and give us feedback through <a href="http://www.chamilo.org/forum">our forum</a>.</p>');
} else {
$home_top_temp;
}
@ -249,9 +250,9 @@ class IndexManager
api_get_setting('certificate.hide_my_certificate_link') === 'false'
) {
$items[] = [
'icon' => Display::return_icon('graduation.png', get_lang('MyCertificates')),
'icon' => Display::return_icon('graduation.png', get_lang('My certificates')),
'link' => api_get_path(WEB_CODE_PATH).'gradebook/my_certificates.php',
'title' => get_lang('MyCertificates'),
'title' => get_lang('My certificates'),
];
}
if (api_get_setting('allow_public_certificates') == 'true') {
@ -271,27 +272,27 @@ class IndexManager
$items[] = [
'icon' => Display::return_icon(
'skill-badges.png',
get_lang('MyGeneralCertificate'),
get_lang('My global certificate'),
null,
ICON_SIZE_SMALL
),
'link' => api_get_path(WEB_CODE_PATH).'social/my_skills_report.php?a=generate_custom_skill',
'title' => get_lang('MyGeneralCertificate'),
'title' => get_lang('My global certificate'),
];
}
if (Skill::isAllowed(api_get_user_id(), false)) {
$items[] = [
'icon' => Display::return_icon('skill-badges.png', get_lang('MySkills')),
'icon' => Display::return_icon('skill-badges.png', get_lang('My skills')),
'link' => api_get_path(WEB_CODE_PATH).'social/my_skills_report.php',
'title' => get_lang('MySkills'),
'title' => get_lang('My skills'),
];
$allowSkillsManagement = api_get_setting('allow_hr_skills_management') == 'true';
if (($allowSkillsManagement && api_is_drh()) || api_is_platform_admin()) {
$items[] = [
'icon' => Display::return_icon('edit-skill.png', get_lang('MySkills')),
'icon' => Display::return_icon('edit-skill.png', get_lang('My skills')),
'link' => api_get_path(WEB_CODE_PATH).'admin/skills_wheel.php',
'title' => get_lang('ManageSkills'),
'title' => get_lang('Manage skills'),
];
}
}
@ -423,7 +424,7 @@ class IndexManager
$htmlTitre = '';
$htmlListCat = '';
if (Database::num_rows($resCats) > 0) {
$htmlListCat = Display::page_header(get_lang('CatList'));
$htmlListCat = Display::page_header(get_lang('Categories'));
$htmlListCat .= '<ul>';
while ($catLine = Database::fetch_array($resCats)) {
$category_has_open_courses = self::category_has_open_courses($catLine['code']);
@ -455,7 +456,7 @@ class IndexManager
if (empty($htmlTitre)) {
$htmlTitre = '<p>';
if (api_get_setting('show_back_link_on_top_of_tree') == 'true') {
$htmlTitre .= '<a href="'.api_get_self().'">&lt;&lt; '.get_lang('BackToHomePage').'</a>';
$htmlTitre .= '<a href="'.api_get_self().'">&lt;&lt; '.get_lang('Categories Overview').'</a>';
}
$htmlTitre .= "</p>";
}
@ -473,7 +474,7 @@ class IndexManager
$courses_list_string = '';
$courses_shown = 0;
if ($numRows > 0) {
$courses_list_string .= Display::page_header(get_lang('CourseList'));
$courses_list_string .= Display::page_header(get_lang('Course list'));
$courses_list_string .= "<ul>";
if (api_get_user_id()) {
$courses_of_user = self::get_courses_of_user(api_get_user_id());
@ -564,7 +565,7 @@ class IndexManager
$_GET['category']
).'">'.get_lang('Subscribe').'</a><br />';
} else {
$courses_list_string .= '<br />'.get_lang('SubscribingNotAllowed');
$courses_list_string .= '<br />'.get_lang('Subscribing not allowed');
}
}
$courses_list_string .= "</li>";
@ -579,8 +580,8 @@ class IndexManager
}
if ($category != '') {
$result .= '<p><a href="'.api_get_self().'">'
.Display:: return_icon('back.png', get_lang('BackToHomePage'))
.get_lang('BackToHomePage').'</a></p>';
.Display:: return_icon('back.png', get_lang('Categories Overview'))
.get_lang('Categories Overview').'</a></p>';
}
return $result;
@ -719,13 +720,13 @@ class IndexManager
if (api_is_platform_admin()) {
$items[] = [
'link' => api_get_path(WEB_CODE_PATH).'admin/usergroups.php?action=add',
'title' => get_lang('AddClasses'),
'title' => get_lang('Add classes'),
];
} else {
if (api_is_teacher() && $usergroup->allowTeachers()) {
$items[] = [
'link' => api_get_path(WEB_CODE_PATH).'admin/usergroups.php',
'title' => get_lang('ClassList'),
'title' => get_lang('Class list'),
];
}
}
@ -765,7 +766,7 @@ class IndexManager
<img class="img-circle" src="'.$userPicture.'"></a>';
} else {
$content .= '<a style="text-align:center" href="'.api_get_path(WEB_CODE_PATH).'auth/profile.php">
<img class="img-circle" title="'.get_lang('EditProfile').'" src="'.$userPicture.'"></a>';
<img class="img-circle" title="'.get_lang('Edit profile').'" src="'.$userPicture.'"></a>';
}
$html = $this->showRightBlock(
@ -829,18 +830,18 @@ class IndexManager
$total_invitations = Display::badge($total_invitations);
$items[] = [
'class' => 'invitations-social',
'icon' => Display::return_icon('invitations.png', get_lang('PendingInvitations')),
'icon' => Display::return_icon('invitations.png', get_lang('Pending invitations')),
'link' => api_get_path(WEB_CODE_PATH).'social/invitations.php',
'title' => get_lang('PendingInvitations').$total_invitations,
'title' => get_lang('Pending invitations').$total_invitations,
];
}
}
$items[] = [
'class' => 'personal-data',
'icon' => Display::return_icon('database.png', get_lang('PersonalDataReport')),
'icon' => Display::return_icon('database.png', get_lang('Personal data')),
'link' => api_get_path(WEB_CODE_PATH).'social/personal_data.php',
'title' => get_lang('PersonalDataReport'),
'title' => get_lang('Personal data'),
];
if (api_get_configuration_value('allow_my_files_link_in_homepage')) {
@ -849,22 +850,22 @@ class IndexManager
'class' => 'myfiles-social',
'icon' => Display::return_icon('sn-files.png', get_lang('Files')),
'link' => api_get_path(WEB_CODE_PATH).'social/myfiles.php',
'title' => get_lang('MyFiles'),
'title' => get_lang('My files'),
];
}
}
$items[] = [
'class' => 'profile-social',
'icon' => Display::return_icon('edit-profile.png', get_lang('EditProfile')),
'icon' => Display::return_icon('edit-profile.png', get_lang('Edit profile')),
'link' => Display::getProfileEditionLink($userId),
'title' => get_lang('EditProfile'),
'title' => get_lang('Edit profile'),
];
if (api_get_configuration_value('show_link_request_hrm_user') &&
api_is_drh()
) {
$label = get_lang('RequestLinkingToUser');
$label = get_lang('Request linking to student');
$items[] = [
'icon' => Display::return_icon('new_group.png', $label),
'link' => api_get_path(WEB_CODE_PATH).'social/require_user_linking.php',
@ -879,10 +880,10 @@ class IndexManager
'class' => 'video-conference',
'icon' => Display::return_icon(
'bbb.png',
get_lang('VideoConference')
get_lang('Videoconference')
),
'link' => $url,
'title' => get_lang('VideoConference'),
'title' => get_lang('Videoconference'),
];
}
@ -957,25 +958,25 @@ class IndexManager
if (api_get_setting('course_validation') == 'true' && !api_is_platform_admin()) {
$items[] = [
'class' => 'add-course',
'icon' => Display::return_icon('new-course.png', get_lang('CreateCourseRequest')),
'icon' => Display::return_icon('new-course.png', get_lang('Create a course request')),
'link' => api_get_path(WEB_CODE_PATH).'create_course/add_course.php',
'title' => get_lang('CreateCourseRequest'),
'title' => get_lang('Create a course request'),
];
} else {
$items[] = [
'class' => 'add-course',
'icon' => Display::return_icon('new-course.png', get_lang('CourseCreate')),
'icon' => Display::return_icon('new-course.png', get_lang('Create a course')),
'link' => api_get_path(WEB_CODE_PATH).'create_course/add_course.php',
'title' => get_lang('CourseCreate'),
'title' => get_lang('Create a course'),
];
}
if (SessionManager::allowToManageSessions()) {
$items[] = [
'class' => 'add-session',
'icon' => Display::return_icon('session.png', get_lang('AddSession')),
'icon' => Display::return_icon('session.png', get_lang('Add a training session')),
'link' => api_get_path(WEB_CODE_PATH).'session/session_add.php',
'title' => get_lang('AddSession'),
'title' => get_lang('Add a training session'),
];
}
}
@ -984,9 +985,9 @@ class IndexManager
if (api_get_configuration_value('view_grid_courses') != true) {
$items[] = [
'class' => 'order-course',
'icon' => Display::return_icon('order-course.png', get_lang('SortMyCourses')),
'icon' => Display::return_icon('order-course.png', get_lang('Sort courses')),
'link' => api_get_path(WEB_CODE_PATH).'auth/sort_my_courses.php',
'title' => get_lang('SortMyCourses'),
'title' => get_lang('Sort courses'),
];
}
@ -994,23 +995,23 @@ class IndexManager
if (isset($_GET['history']) && intval($_GET['history']) == 1) {
$items[] = [
'class' => 'history-course',
'icon' => Display::return_icon('history-course.png', get_lang('DisplayTrainingList')),
'icon' => Display::return_icon('history-course.png', get_lang('Display courses list')),
'link' => api_get_path(WEB_PATH).'user_portal.php',
'title' => get_lang('DisplayTrainingList'),
'title' => get_lang('Display courses list'),
];
} else {
$items[] = [
'class' => 'history-course',
'icon' => Display::return_icon('history-course.png', get_lang('HistoryTrainingSessions')),
'icon' => Display::return_icon('history-course.png', get_lang('Courses history')),
'link' => api_get_path(WEB_PATH).'user_portal.php?history=1',
'title' => get_lang('HistoryTrainingSessions'),
'title' => get_lang('Courses history'),
];
}
if ($isHrm) {
$items[] = [
'link' => api_get_path(WEB_CODE_PATH).'auth/hrm_courses.php',
'title' => get_lang('HrmAssignedUsersCourseList'),
'title' => get_lang('HrmAssignedUsersCourse list'),
];
}
@ -1019,9 +1020,9 @@ class IndexManager
if (!api_is_drh()) {
$items[] = [
'class' => 'list-course',
'icon' => Display::return_icon('catalog-course.png', get_lang('CourseCatalog')),
'icon' => Display::return_icon('catalog-course.png', get_lang('Course catalog')),
'link' => api_get_path(WEB_CODE_PATH).'auth/courses.php',
'title' => get_lang('CourseCatalog'),
'title' => get_lang('Course catalog'),
];
} else {
$items[] = [
@ -1733,7 +1734,7 @@ class IndexManager
!empty($session_category_end_date)
) {
$categoryParams['subtitle'] = sprintf(
get_lang('FromDateXToDateY'),
get_lang('From %s to %s'),
$session_category_start_date,
$session_category_end_date
);
@ -1803,8 +1804,8 @@ class IndexManager
$this->tpl->assign('course_catalog_url', $course_catalog_url);
$this->tpl->assign('course_list_url', $course_list_url);
$this->tpl->assign('course_catalog_link', Display::url(get_lang('Here'), $course_catalog_url));
$this->tpl->assign('course_list_link', Display::url(get_lang('Here'), $course_list_url));
$this->tpl->assign('course_catalog_link', Display::url(get_lang('here'), $course_catalog_url));
$this->tpl->assign('course_list_link', Display::url(get_lang('here'), $course_list_url));
$this->tpl->assign('count_courses', $count_courses);
}
@ -2377,7 +2378,7 @@ class IndexManager
$html .= "<span class='$class1 session-view-session'>$icon$title</span>";
$html .= '<div class="'.$class2.' session-view-session-go-to-course-in-session">
<a class="" href="'.$courseLink.'">'.get_lang('GoToCourseInsideSession').'</a></div>';
<a class="" href="'.$courseLink.'">'.get_lang('Go to course within session').'</a></div>';
return '<div>'.$html.'</div>';
}

Loading…
Cancel
Save