Update get_lang calls using full string.

pull/3016/head
Julio Montoya 5 years ago
parent 5beab52510
commit cba41fb953
  1. 1
      main/attendance/attendance_calendar.php
  2. 10
      main/auth/courses.php
  3. 28
      main/auth/courses_categories.php
  4. 14
      main/auth/courses_controller.php
  5. 16
      main/auth/gotocourse.php
  6. 2
      main/auth/hrm_courses.php
  7. 142
      main/auth/inscription.php
  8. 22
      main/auth/lostPassword.php
  9. 6
      main/auth/my_progress.php
  10. 86
      main/auth/profile.php
  11. 8
      main/auth/resend_confirmation_mail.php
  12. 16
      main/auth/reset.php
  13. 4
      main/auth/set_temp_password.php
  14. 50
      main/auth/sort_my_courses.php
  15. 6
      main/auth/unsubscribe_account.php
  16. 4
      main/auth/user_mail_confirmation.php
  17. 1
      main/badge/assign.php
  18. 1
      main/blog/blog.php
  19. 10
      main/course_info/delete_course.php
  20. 288
      main/course_info/infocours.php
  21. 6
      main/course_info/legal.php
  22. 38
      main/course_info/maintenance.php
  23. 12
      main/course_info/maintenance_coach.php
  24. 2
      main/course_info/start.php
  25. 28
      main/course_info/tools.php
  26. 30
      main/course_progress/index.php
  27. 50
      main/course_progress/thematic.php
  28. 32
      main/course_progress/thematic_advance.php
  29. 4
      main/course_progress/thematic_controller.php
  30. 12
      main/course_progress/thematic_plan.php
  31. 6
      main/cron/import_csv.php
  32. 6
      main/cron/request_removal_reminder.php
  33. 2
      main/dashboard/block.class.php
  34. 6
      main/dashboard/dashboard_controller.php

@ -5,7 +5,6 @@
* View (MVC patter) for attendance calendar (list, edit, add).
*
* @author Christian Fasanando <christian1827@gmail.com>
*
*/
// protect a course script

@ -63,7 +63,7 @@ $searchTerm = isset($_REQUEST['search_term']) ? Security::remove_XSS($_REQUEST['
$nameTools = CourseCategory::getCourseCatalogNameTools($action);
if (empty($nameTools)) {
$nameTools = get_lang('CourseManagement');
$nameTools = get_lang('Courses catalog');
} else {
if (!in_array(
$action,
@ -71,7 +71,7 @@ if (empty($nameTools)) {
)) {
$interbreadcrumb[] = [
'url' => api_get_path(WEB_CODE_PATH).'auth/courses.php',
'name' => get_lang('CourseManagement'),
'name' => get_lang('Courses catalog'),
];
}
$interbreadcrumb[] = ['url' => '#', 'name' => $nameTools];
@ -133,7 +133,7 @@ switch ($action) {
header('Location: '.api_get_self());
exit;
}
$message = get_lang('CourseRequiresPassword').' ';
$message = get_lang('This course requires a password').' ';
$message .= $courseInfo['title'].' ('.$courseInfo['visual_code'].') ';
$action = api_get_self().
@ -147,7 +147,7 @@ switch ($action) {
$form->addElement('hidden', 'sec_token', Security::getTokenFromSession());
$form->addElement('hidden', 'subscribe_user_with_password', $courseInfo['code']);
$form->addElement('text', 'course_registration_code');
$form->addButtonSave(get_lang('SubmitRegistrationCode'));
$form->addButtonSave(get_lang('Submit registration code'));
$content = $form->returnForm();
if ($form->validate()) {
@ -156,7 +156,7 @@ switch ($action) {
header('Location: '.api_get_self());
exit;
} else {
Display::addFlash(Display::return_message(get_lang('CourseRegistrationCodeIncorrect')), 'warning');
Display::addFlash(Display::return_message(get_lang('The course password is incorrect')), 'warning');
header('Location: '.$action);
exit;
}

@ -71,7 +71,7 @@ $code = isset($code) ? $code : null;
echo '<div class="row">
<div class="col-md-12">
<h2 class="title-courses">'.get_lang('CourseManagement').'</h2>
<h2 class="title-courses">'.get_lang('Courses catalog').'</h2>
<div class="search-courses">
<div class="row">';
@ -107,7 +107,7 @@ if ($showCourses) {
$form .= '<input type="hidden" name="pageCurrent" value="'.$pageCurrent.'">';
$form .= '<input type="hidden" name="pageLength" value="'.$pageLength.'">';
$form .= '<div class="form-group">';
$form .= '<label>'.get_lang('CourseCategories').'</label>';
$form .= '<label>'.get_lang('Courses categories').'</label>';
$form .= $categoriesSelect;
$form .= '</div>';
$form .= '</form>';
@ -121,7 +121,7 @@ if ($showSessions) {
<div class="return-catalog">
<a class="btn btn-default btn-lg btn-block"
href="'.$url.'">
<em class="fa fa-arrow-right"></em>'.get_lang('SessionList').'
<em class="fa fa-arrow-right"></em>'.get_lang('Session list').'
</a>
</div>
</div>
@ -143,7 +143,7 @@ if ($showCourses && $action != 'display_sessions') {
}
if (!empty($searchTerm)) {
echo "<p><strong>".get_lang('SearchResultsFor')." ".$searchTerm."</strong><br />";
echo "<p><strong>".get_lang('Search results for:')." ".$searchTerm."</strong><br />";
}
$showTeacher = api_get_setting('display_teacher_in_courselist') === 'true';
@ -263,7 +263,7 @@ if ($showCourses && $action != 'display_sessions') {
!isset($_REQUEST['subscribe_course'])
) {
echo Display::return_message(
get_lang('ThereAreNoCoursesInThisCategory'),
get_lang('No course at this category level'),
'warning'
);
}
@ -370,7 +370,7 @@ function return_teacher($courseInfo)
tabindex="0" role="button"
class="btn btn-default panel_popover"
data-toggle="popover"
title="'.addslashes(get_lang('CourseTeachers')).'"
title="'.addslashes(get_lang('Trainers')).'"
data-html="true"
>
<i class="fa fa-graduation-cap" aria-hidden="true"></i>
@ -380,7 +380,7 @@ function return_teacher($courseInfo)
$name = $value['firstname'].' '.$value['lastname'];
$html .= '<div class="popover-teacher">';
$html .= '<a href="'.$value['url'].'" class="ajax" data-title="'.$name.'" title="'.$name.'">
<img src="'.$value['avatar'].'" title="'.$name.'" alt="'.get_lang('UserPicture').'"/></a>';
<img src="'.$value['avatar'].'" title="'.$name.'" alt="'.get_lang('Picture').'"/></a>';
$html .= '<div class="teachers-details"><h5>
<a href="'.$value['url'].'" class="ajax" data-title="'.$name.'" title="'.$name.'">'
.$name.'</a></h5></div>';
@ -392,13 +392,13 @@ function return_teacher($courseInfo)
$name = $value['firstname'].' '.$value['lastname'];
if ($length > 2) {
$html .= '<a href="'.$value['url'].'" class="ajax" data-title="'.$name.'" title="'.$name.'">
<img src="'.$value['avatar'].'" title="'.$name.'" alt="'.get_lang('UserPicture').'"/></a>';
<img src="'.$value['avatar'].'" title="'.$name.'" alt="'.get_lang('Picture').'"/></a>';
} else {
$html .= '<a href="'.$value['url'].'" class="ajax" data-title="'.$name.'" title="'.$name.'">
<img src="'.$value['avatar'].'" title="'.$name.'" alt="'.get_lang('UserPicture').'"/></a>';
<img src="'.$value['avatar'].'" title="'.$name.'" alt="'.get_lang('Picture').'"/></a>';
$html .= '<div class="teachers-details"><h5>
<a href="'.$value['url'].'" class="ajax" data-title="'.$name.'">'
.$name.'</a></h5><p>'.get_lang('Teacher').'</p></div>';
.$name.'</a></h5><p>'.get_lang('Trainer').'</p></div>';
}
}
}
@ -445,7 +445,7 @@ function return_title($course, $registeredUser)
*/
function return_goto_button($course)
{
$title = get_lang('GoToCourse');
$title = get_lang('Go to the course');
$html = Display::url(
Display::returnFontAwesomeIcon('share'),
api_get_course_url($course['code']),
@ -469,10 +469,10 @@ function return_goto_button($course)
function return_already_registered_label($in_status)
{
$icon = '<em class="fa fa-check"></em>';
$title = get_lang("YouAreATeacherOfThisCourse");
$title = get_lang("YouAreATrainerOfThisCourse");
if ($in_status == 'student') {
$icon = '<em class="fa fa-check"></em>';
$title = get_lang("AlreadySubscribed");
$title = get_lang("Already subscribed");
}
$html = Display::tag(
@ -529,7 +529,7 @@ function return_register_button($course, $stok, $code, $search_term)
*/
function return_unregister_button($course, $stok, $search_term, $code)
{
$title = get_lang('Unsubscription');
$title = get_lang('Unsubscribe');
$html = Display::url(
Display::returnFontAwesomeIcon('sign-in').' '.$title,
api_get_self().'?action=unsubscribe&sec_token='.$stok

@ -188,7 +188,7 @@ class CoursesController
if ($result) {
Display::addFlash(
Display::return_message(get_lang('YouAreNowUnsubscribed'))
Display::return_message(get_lang('You have been unsubscribed from this course'))
);
}
@ -239,15 +239,15 @@ class CoursesController
]);
return Display::toolbarButton(
get_lang('CheckRequirements'),
get_lang('Check requirements'),
$url,
'shield',
'info',
[
'class' => $btnBing.' ajax',
'data-title' => get_lang('CheckRequirements'),
'data-title' => get_lang('Check requirements'),
'data-size' => 'md',
'title' => get_lang('CheckRequirements'),
'title' => get_lang('Check requirements'),
],
$includeText
);
@ -274,7 +274,7 @@ class CoursesController
'primary',
[
'class' => $btnBing.' ajax',
'data-title' => get_lang('AreYouSureToSubscribe'),
'data-title' => get_lang('Are you sure to subscribe?'),
'data-size' => 'md',
'title' => get_lang('Subscribe'),
],
@ -288,7 +288,7 @@ class CoursesController
]);
$result = Display::toolbarButton(
get_lang('SubscribeToSessionRequest'),
get_lang('Request subscription'),
$url,
'pencil',
'primary',
@ -325,7 +325,7 @@ class CoursesController
$icon,
[
'class' => 'btn btn-default btn-sm registered',
'title' => get_lang("AlreadyRegisteredToSession"),
'title' => get_lang("Already registered to session"),
]
);
}

@ -25,7 +25,7 @@ if (isset($_GET['firstpage'])) {
$action = str_replace('&amp;', '&', $action);
$form = new FormValidator('formLogin', 'post', $action, null, ['class' => 'form-stacked']);
$params = [
'placeholder' => get_lang('UserName'),
'placeholder' => get_lang('Username'),
];
// Avoid showing the autocapitalize option if the browser doesn't
// support it: this attribute is against the HTML5 standard
@ -50,13 +50,13 @@ if (isset($_GET['firstpage'])) {
null,
$params
);
$form->addButtonNext(get_lang('LoginEnter'), 'submitAuth');
$form->addButtonNext(get_lang('Login'), 'submitAuth');
// see same text in main_api.lib.php function api_not_allowed
if (api_is_cas_activated()) {
$msg .= Display::return_message(sprintf(get_lang('YouHaveAnInstitutionalAccount'), api_get_setting("Institution")), '', false);
$msg .= Display::div("<br/><a href='".get_cas_direct_URL(api_get_course_id())."'>".getCASLogoHTML()." ".sprintf(get_lang('LoginWithYourAccount'), api_get_setting("Institution"))."</a><br/><br/>", ['align' => 'center']);
$msg .= Display::return_message(get_lang('YouDontHaveAnInstitutionAccount'));
$msg .= "<p style='text-align:center'><a href='#' onclick='$(this).parent().next().toggle()'>".get_lang('LoginWithExternalAccount')."</a></p>";
$msg .= Display::return_message(sprintf(get_lang('You already have an institutional account'), api_get_setting("Institution")), '', false);
$msg .= Display::div("<br/><a href='".get_cas_direct_URL(api_get_course_id())."'>".getCASLogoHTML()." ".sprintf(get_lang('Login with your account'), api_get_setting("Institution"))."</a><br/><br/>", ['align' => 'center']);
$msg .= Display::return_message(get_lang('You don\'t have an institutional account'));
$msg .= "<p style='text-align:center'><a href='#' onclick='$(this).parent().next().toggle()'>".get_lang('Login without an institutional account')."</a></p>";
$msg .= "<div style='display:none;'>";
}
@ -66,9 +66,9 @@ if (isset($_GET['firstpage'])) {
if (api_is_cas_activated()) {
$msg .= "</div>";
}
$msg .= '<hr/><p style="text-align:center"><a href="'.api_get_path(WEB_PATH).'">'.get_lang('ReturnToCourseHomepage').'</a></p>';
$msg .= '<hr/><p style="text-align:center"><a href="'.api_get_path(WEB_PATH).'">'.get_lang('Return to Course Homepage').'</a></p>';
$tpl->assign('content', '<h4>'.get_lang('LoginToGoToThisCourse').'</h4>'.$msg);
$tpl->assign('content', '<h4>'.get_lang('Please login to go to this course').'</h4>'.$msg);
$tpl->display_one_col_template();
} else {
api_delete_firstpage_parameter();

@ -34,7 +34,7 @@ foreach ($assignedUsers as $assignedUserId => $assignedUserInfo) {
$users[$assignedUser->getId()] = $userInfo;
}
$toolName = get_lang('HrmAssignedUsersCourseList');
$toolName = get_lang('Human Resources Manager assigned users course list');
$view = new Template($toolName);
$view->assign('users', $users);

@ -40,7 +40,7 @@ $isNotAllowedHere = api_get_setting('allow_terms_conditions') === 'false' &&
api_get_setting('allow_registration') === 'false';
if ($isNotAllowedHere) {
api_not_allowed(true, get_lang('RegistrationDisabled'));
api_not_allowed(true, get_lang('Sorry, you are trying to access the registration page for this portal, but registration is currently disabled. Please contact the administrator (see contact information in the footer). If you already have an account on this site.'));
}
if (!empty($_SESSION['user_language_choice'])) {
@ -112,60 +112,60 @@ if ($user_already_registered_show_terms === false &&
if (in_array('status', $allowedFields)) {
$form->addRadio(
'status',
get_lang('RegistrationRoleWhatDoYouWantToDo'),
get_lang('What do you want to do?'),
[
STUDENT => '<p class="caption">'.get_lang('RegistrationRoleFollowCourses').'</p>',
COURSEMANAGER => '<p class="caption">'.get_lang('RegistrationRoleTeachCourses').'</p>',
STUDENT => '<p class="caption">'.get_lang('Follow courses').'</p>',
COURSEMANAGER => '<p class="caption">'.get_lang('Teach courses').'</p>',
],
['class' => 'register-profile']
);
$form->addRule('status', get_lang('ThisFieldIsRequired'), 'required');
$form->addRule('status', get_lang('Required field'), 'required');
}
}
if (api_is_western_name_order()) {
// FIRST NAME and LAST NAME
$form->addElement('text', 'firstname', get_lang('FirstName'), ['size' => 40]);
$form->addElement('text', 'lastname', get_lang('LastName'), ['size' => 40]);
$form->addElement('text', 'firstname', get_lang('First name'), ['size' => 40]);
$form->addElement('text', 'lastname', get_lang('Last name'), ['size' => 40]);
} else {
// LAST NAME and FIRST NAME
$form->addElement('text', 'lastname', get_lang('LastName'), ['size' => 40]);
$form->addElement('text', 'firstname', get_lang('FirstName'), ['size' => 40]);
$form->addElement('text', 'lastname', get_lang('Last name'), ['size' => 40]);
$form->addElement('text', 'firstname', get_lang('First name'), ['size' => 40]);
}
$form->applyFilter(['lastname', 'firstname'], 'trim');
$form->addRule('lastname', get_lang('ThisFieldIsRequired'), 'required');
$form->addRule('firstname', get_lang('ThisFieldIsRequired'), 'required');
$form->addRule('lastname', get_lang('Required field'), 'required');
$form->addRule('firstname', get_lang('Required field'), 'required');
// EMAIL
$form->addElement('text', 'email', get_lang('Email'), ['size' => 40]);
$form->addElement('text', 'email', get_lang('e-mail'), ['size' => 40]);
if (api_get_setting('registration', 'email') === 'true') {
$form->addRule('email', get_lang('ThisFieldIsRequired'), 'required');
$form->addRule('email', get_lang('Required field'), 'required');
}
if (api_get_setting('login_is_email') === 'true') {
$form->applyFilter('email', 'trim');
if (api_get_setting('registration', 'email') != 'true') {
$form->addRule('email', get_lang('ThisFieldIsRequired'), 'required');
$form->addRule('email', get_lang('Required field'), 'required');
}
$form->addRule(
'email',
sprintf(
get_lang('UsernameMaxXCharacters'),
get_lang('The login needs to be maximum %s characters long'),
(string) USERNAME_MAX_LENGTH
),
'maxlength',
USERNAME_MAX_LENGTH
);
$form->addRule('email', get_lang('UserTaken'), 'username_available');
$form->addRule('email', get_lang('This login is already in use'), 'username_available');
}
$form->addRule('email', get_lang('EmailWrong'), 'email');
$form->addRule('email', get_lang('e-mailWrong'), 'email');
// USERNAME
if (api_get_setting('login_is_email') != 'true') {
$form->addText(
'username',
get_lang('UserName'),
get_lang('Username'),
true,
[
'id' => 'username',
@ -174,18 +174,18 @@ if ($user_already_registered_show_terms === false &&
]
);
$form->applyFilter('username', 'trim');
$form->addRule('username', get_lang('ThisFieldIsRequired'), 'required');
$form->addRule('username', get_lang('Required field'), 'required');
$form->addRule(
'username',
sprintf(
get_lang('UsernameMaxXCharacters'),
get_lang('The login needs to be maximum %s characters long'),
(string) USERNAME_MAX_LENGTH
),
'maxlength',
USERNAME_MAX_LENGTH
);
$form->addRule('username', get_lang('UsernameWrong'), 'username');
$form->addRule('username', get_lang('UserTaken'), 'username_available');
$form->addRule('username', get_lang('Your login can only contain letters, numbers and _.-'), 'username');
$form->addRule('username', get_lang('This login is already in use'), 'username_available');
}
// PASSWORD
@ -199,12 +199,12 @@ if ($user_already_registered_show_terms === false &&
$form->addElement(
'password',
'pass2',
get_lang('Confirmation'),
get_lang('Confirm password'),
['id' => 'pass2', 'size' => 20, 'autocomplete' => 'off']
);
$form->addRule('pass1', get_lang('ThisFieldIsRequired'), 'required');
$form->addRule('pass2', get_lang('ThisFieldIsRequired'), 'required');
$form->addRule(['pass1', 'pass2'], get_lang('PassTwo'), 'compare');
$form->addRule('pass1', get_lang('Required field'), 'required');
$form->addRule('pass2', get_lang('Required field'), 'required');
$form->addRule(['pass1', 'pass2'], get_lang('You have typed two different passwords'), 'compare');
$form->addPasswordRule('pass1');
// PHONE
@ -218,7 +218,7 @@ if ($user_already_registered_show_terms === false &&
if (api_get_setting('registration', 'phone') == 'true') {
$form->addRule(
'phone',
get_lang('ThisFieldIsRequired'),
get_lang('Required field'),
'required'
);
}
@ -238,13 +238,13 @@ if ($user_already_registered_show_terms === false &&
$form->addElement(
'text',
'official_code',
get_lang('OfficialCode'),
get_lang('Code'),
['size' => 40]
);
if (api_get_setting('registration', 'officialcode') == 'true') {
$form->addRule(
'official_code',
get_lang('ThisFieldIsRequired'),
get_lang('Required field'),
'required'
);
}
@ -256,7 +256,7 @@ if ($user_already_registered_show_terms === false &&
) {
$form->addHtmlEditor(
'competences',
get_lang('MyCompetences'),
get_lang('My competences'),
false,
false,
['ToolbarSet' => 'register', 'Width' => '100%', 'Height' => '130']
@ -268,7 +268,7 @@ if ($user_already_registered_show_terms === false &&
) {
$form->addHtmlEditor(
'diplomas',
get_lang('MyDiplomas'),
get_lang('My diplomas'),
false,
false,
['ToolbarSet' => 'register', 'Width' => '100%', 'Height' => '130']
@ -280,7 +280,7 @@ if ($user_already_registered_show_terms === false &&
) {
$form->addHtmlEditor(
'teach',
get_lang('MyTeach'),
get_lang('What I am able to teach'),
false,
false,
['ToolbarSet' => 'register', 'Width' => '100%', 'Height' => '130']
@ -292,7 +292,7 @@ if ($user_already_registered_show_terms === false &&
) {
$form->addHtmlEditor(
'openarea',
get_lang('MyPersonalOpenArea'),
get_lang('My personal open area'),
false,
false,
['ToolbarSet' => 'register', 'Width' => '100%', 'Height' => '130']
@ -303,22 +303,22 @@ if ($user_already_registered_show_terms === false &&
if (api_get_setting('extendedprofile_registration', 'mycomptetences') === 'true' &&
api_get_setting('extendedprofile_registrationrequired', 'mycomptetences') === 'true'
) {
$form->addRule('competences', get_lang('ThisFieldIsRequired'), 'required');
$form->addRule('competences', get_lang('Required field'), 'required');
}
if (api_get_setting('extendedprofile_registration', 'mydiplomas') === 'true' &&
api_get_setting('extendedprofile_registrationrequired', 'mydiplomas') === 'true'
) {
$form->addRule('diplomas', get_lang('ThisFieldIsRequired'), 'required');
$form->addRule('diplomas', get_lang('Required field'), 'required');
}
if (api_get_setting('extendedprofile_registration', 'myteach') === 'true' &&
api_get_setting('extendedprofile_registrationrequired', 'myteach') === 'true'
) {
$form->addRule('teach', get_lang('ThisFieldIsRequired'), 'required');
$form->addRule('teach', get_lang('Required field'), 'required');
}
if (api_get_setting('extendedprofile_registration', 'mypersonalopenarea') === 'true' &&
api_get_setting('extendedprofile_registrationrequired', 'mypersonalopenarea') === 'true'
) {
$form->addRule('openarea', get_lang('ThisFieldIsRequired'), 'required');
$form->addRule('openarea', get_lang('Required field'), 'required');
}
}
@ -382,24 +382,24 @@ if ($user_already_registered_show_terms === false &&
'',
$options
);
$form->addElement('static', null, null, get_lang('ClickOnTheImageForANewOne'));
$form->addElement('static', null, null, 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.'),
['size' => 40]
);
$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
);
@ -448,7 +448,7 @@ if (!CustomPages::enabled()) {
$language = api_get_language_id($language);
$term_preview = LegalManager::get_last_condition($language);
}
Display::display_header(get_lang('TermsAndConditions'));
Display::display_header(get_lang('Terms and Conditions'));
if (!empty($term_preview['content'])) {
echo $term_preview['content'];
@ -458,7 +458,7 @@ if (!CustomPages::enabled()) {
echo '<h3>'.$value['display_text'].'</h3><br />'.$value['value'].'<br />';
}
} else {
echo get_lang('ComingSoon');
echo get_lang('Coming soon...');
}
Display::display_footer();
exit;
@ -467,7 +467,7 @@ if (!CustomPages::enabled()) {
}
if (api_get_setting('allow_terms_conditions') === 'true' && $user_already_registered_show_terms) {
$tool_name = get_lang('TermsAndConditions');
$tool_name = get_lang('Terms and Conditions');
}
}
@ -496,11 +496,11 @@ if (file_exists($home.'register_top_'.$user_selected_language.'.html')) {
// Forbidden to self-register
if ($isNotAllowedHere) {
api_not_allowed(true, get_lang('RegistrationDisabled'));
api_not_allowed(true, get_lang('Sorry, you are trying to access the registration page for this portal, but registration is currently disabled. Please contact the administrator (see contact information in the footer). If you already have an account on this site.'));
}
if (api_get_setting('allow_registration') === 'approval') {
$content .= Display::return_message(get_lang('YourAccountHasToBeApproved'));
$content .= Display::return_message(get_lang('Your account has to be approved'));
}
$showTerms = false;
@ -555,11 +555,11 @@ if (api_get_setting('allow_terms_conditions') === 'true' && $user_already_regist
'checkbox',
'legal_accept',
null,
get_lang('IHaveReadAndAgree').'&nbsp;<a href="inscription.php?legal" target="_blank">'.get_lang(
'TermsAndConditions'
get_lang('I have read and agree to the').'&nbsp;<a href="inscription.php?legal" target="_blank">'.get_lang(
'Terms and Conditions'
).'</a>'
);
$form->addRule('legal_accept', get_lang('WeNeedYouToAcceptOurTreatmentOfYourData'), 'required');
$form->addRule('legal_accept', get_lang('We need you to accept our treatment of your data in order to provide you with this service. If you want to register an account, please accept the terms and click Submit. If you don\'t accept, no personal data will be treated by us about you.'), 'required');
} else {
$preview = LegalManager::show_last_condition($term_preview);
$form->addElement('label', null, $preview);
@ -583,7 +583,7 @@ if ($allowDoubleValidation && $showTerms == false) {
$form->addLabel(
null,
Display::url(
get_lang('Ok'),
get_lang('Validate'),
'javascript:void',
['class' => 'btn btn-default', 'id' => 'pre_validation']
)
@ -591,9 +591,9 @@ if ($allowDoubleValidation && $showTerms == false) {
$form->addHtml('<div id="final_button" style="display: none">');
$form->addLabel(
null,
Display::return_message(get_lang('DoubleValidationMessage'), 'info', false)
Display::return_message(get_lang('You confirm that you really want to subscribe to this plateform.'), 'info', false)
);
$form->addButton('submit', get_lang('RegisterUser'), '', 'primary');
$form->addButton('submit', get_lang('Register'), '', 'primary');
$form->addHtml('</div>');
$formContainsSendButton = true;
} else {
@ -607,7 +607,7 @@ if ($allowDoubleValidation && $showTerms == false) {
$user_already_registered_show_terms ||
$showTerms
) {
$form->addButtonNext(get_lang('RegisterUser'));
$form->addButtonNext(get_lang('Register'));
$formContainsSendButton = true;
}
}
@ -820,18 +820,18 @@ if ($form->validate()) {
sent a mail to the platform admin and exit the page.*/
if (api_get_setting('allow_registration') === 'approval') {
// 1. Send mail to all platform admin
$emailsubject = get_lang('ApprovalForNewAccount').': '.$values['username'];
$emailbody = get_lang('ApprovalForNewAccount')."\n";
$emailbody .= get_lang('UserName').': '.$values['username']."\n";
$emailsubject = get_lang('Approval for new account').': '.$values['username'];
$emailbody = get_lang('Approval for new account')."\n";
$emailbody .= get_lang('Username').': '.$values['username']."\n";
if (api_is_western_name_order()) {
$emailbody .= get_lang('FirstName').': '.$values['firstname']."\n";
$emailbody .= get_lang('LastName').': '.$values['lastname']."\n";
$emailbody .= get_lang('First name').': '.$values['firstname']."\n";
$emailbody .= get_lang('Last name').': '.$values['lastname']."\n";
} else {
$emailbody .= get_lang('LastName').': '.$values['lastname']."\n";
$emailbody .= get_lang('FirstName').': '.$values['firstname']."\n";
$emailbody .= get_lang('Last name').': '.$values['lastname']."\n";
$emailbody .= get_lang('First name').': '.$values['firstname']."\n";
}
$emailbody .= get_lang('Email').': '.$values['email']."\n";
$emailbody .= get_lang('e-mail').': '.$values['email']."\n";
$emailbody .= get_lang('Status').': '.$values['status']."\n\n";
$url_edit = Display::url(
@ -839,7 +839,7 @@ if ($form->validate()) {
api_get_path(WEB_CODE_PATH).'admin/user_edit.php?user_id='.$user_id
);
$emailbody .= get_lang('ManageUser').": $url_edit";
$emailbody .= get_lang('Manage user').": $url_edit";
if (api_get_configuration_value('send_inscription_notification_to_general_admin_only')) {
$email = api_get_setting('emailAdministrator');
@ -889,7 +889,7 @@ if ($form->validate()) {
Display::addFlash(
Display::return_message(
get_lang('YouNeedConfirmYourAccountViaEmailToAccessThePlatform'),
get_lang('YouNeedConfirmYourAccountViae-mailToAccessThePlatform'),
'warning'
)
);
@ -929,11 +929,11 @@ if ($form->validate()) {
$currentUserInfo = api_get_user_info($user_id);
foreach ($bossList as $bossId) {
$subjectEmail = sprintf(
get_lang('UserXSignedTheAgreement'),
get_lang('User %s signed the agreement.'),
$currentUserInfo['complete_name']
);
$contentEmail = sprintf(
get_lang('UserXSignedTheAgreementTheY'),
get_lang('User %s signed the agreement.TheY'),
$currentUserInfo['complete_name'],
api_get_local_time($time)
);
@ -976,7 +976,7 @@ if ($form->validate()) {
'<p>'.
get_lang('Dear').' '.
stripslashes(Security::remove_XSS($recipient_name)).',<br /><br />'.
get_lang('PersonalSettings').".</p>";
get_lang('Your personal settings have been registered').".</p>";
$form_data = [
'button' => Display::button(
@ -1005,25 +1005,25 @@ if ($form->validate()) {
}
} else {
if (!empty($values['email'])) {
$text_after_registration .= '<p>'.get_lang('MailHasBeenSent').'.</p>';
$text_after_registration .= '<p>'.get_lang('An e-mail has been sent to remind you of your login and password').'.</p>';
}
if ($is_allowedCreateCourse) {
if ($usersCanCreateCourse) {
$form_data['message'] = '<p>'.get_lang('NowGoCreateYourCourse').'</p>';
$form_data['message'] = '<p>'.get_lang('You can now create your course').'</p>';
}
$form_data['action'] = api_get_path(WEB_CODE_PATH).'create_course/add_course.php';
if (api_get_setting('course_validation') === 'true') {
$form_data['button'] = Display::button(
'next',
get_lang('CreateCourseRequest'),
get_lang('Create a course request'),
['class' => 'btn btn-primary btn-large']
);
} else {
$form_data['button'] = Display::button(
'next',
get_lang('CourseCreate'),
get_lang('Create a course'),
['class' => 'btn btn-primary btn-large']
);
$form_data['go_button'] = '&nbsp;&nbsp;<a href="'.api_get_path(WEB_PATH).'index.php'.'">'.
@ -1035,7 +1035,7 @@ if ($form->validate()) {
} else {
if (api_get_setting('allow_students_to_browse_courses') == 'true') {
$form_data['action'] = 'courses.php?action=subscribe';
$form_data['message'] = '<p>'.get_lang('NowGoChooseYourCourses').".</p>";
$form_data['message'] = '<p>'.get_lang('You can now select, in the list, the course you want access to').".</p>";
} else {
$form_data['action'] = api_get_path(WEB_PATH).'user_portal.php';
}

@ -31,7 +31,7 @@ $userId = Request::get('id');
$this_section = SECTION_CAMPUS;
$tool_name = get_lang('LostPassword');
$tool_name = get_lang('I lost my password');
if ($reset && $userId) {
$messageText = Login::reset_password($reset, $userId, true);
@ -56,8 +56,8 @@ $form->addHeader($tool_name);
$form->addText(
'user',
[
get_lang('LoginOrEmailAddress'),
get_lang('EnterEmailUserAndWellSendYouPassword'),
get_lang('Username or e-mail address'),
get_lang('Enter the username or the e-mail address with which you registered and we will send your password.'),
],
true
);
@ -86,22 +86,22 @@ if ($allowCaptcha) {
'',
$options
);
$form->addElement('static', null, null, get_lang('ClickOnTheImageForANewOne'));
$form->addElement('static', null, null, get_lang('Click on the image to load a new one.'));
$form->addElement('text', 'captcha', get_lang('EnterTheLettersYouSee'), ['size' => 40]);
$form->addRule('captcha', get_lang('EnterTheCharactersYouReadInTheImage'), 'required', null, 'client');
$form->addElement('text', 'captcha', get_lang('Enter the letters you see.'), ['size' => 40]);
$form->addRule('captcha', get_lang('Enter the characters you see on the image'), 'required', null, 'client');
$form->addRule('captcha', get_lang('TheTextYouEnteredDoesNotMatchThePicture'), 'CAPTCHA', $captcha_question);
$form->addRule('captcha', get_lang('The text you entered doesn\'t match the picture.'), 'CAPTCHA', $captcha_question);
}
$form->addButtonSend(get_lang('Send'));
$form->addButtonSend(get_lang('Send message'));
if ($form->validate()) {
$values = $form->exportValues();
$user = Login::get_user_accounts_by_username($values['user']);
if (!$user) {
$messageText = get_lang('NoUserAccountWithThisEmailAddress');
$messageText = get_lang('There is no account with this user and/or e-mail address');
if (CustomPages::enabled() && CustomPages::exists(CustomPages::LOST_PASSWORD)) {
CustomPages::display(
@ -140,7 +140,7 @@ if ($form->validate()) {
if ($user['auth_source'] == 'extldap') {
Display::addFlash(
Display::return_message(get_lang('CouldNotResetPasswordBecauseLDAP'), 'info', false)
Display::return_message(get_lang('Could not reset password, contact your helpdesk.'), 'info', false)
);
header('Location: '.api_get_path(WEB_PATH));
exit;
@ -155,7 +155,7 @@ if ($form->validate()) {
if (CustomPages::enabled() && CustomPages::exists(CustomPages::INDEX_UNLOGGED)) {
CustomPages::display(
CustomPages::INDEX_UNLOGGED,
['info' => get_lang('CheckYourEmailAndFollowInstructions')]
['info' => get_lang('Check your e-mail and follow the instructions.')]
);
exit;
}

@ -16,7 +16,7 @@ if (api_get_configuration_value('block_my_progress_page')) {
}
$this_section = SECTION_TRACKING;
$nameTools = get_lang('MyProgress');
$nameTools = get_lang('Progress');
$htmlHeadXtra[] = api_get_js('jquery.timelinr-0.9.54.js');
$htmlHeadXtra[] = "<script>
@ -69,7 +69,7 @@ if (!empty($courseUserList)) {
$issues .= '<div class="text-course">';
$issues .= '<p>'.sprintf(
get_lang('YouHaveEnteredTheCourseXInY'),
get_lang('You have entered the course <b>%s</b> in <b>%s</b>'),
'" '.$courseInfo['name'].' "',
api_convert_and_format_date($login, DATE_TIME_FORMAT_LONG)
).'</p>';
@ -110,7 +110,7 @@ if (api_get_configuration_value('private_messages_about_user_visible_to_user') =
$message = null;
if (empty($content)) {
$message = Display::return_message(get_lang('NoDataAvailable'), 'warning');
$message = Display::return_message(get_lang('No data available'), 'warning');
}
$show = api_get_configuration_value('allow_career_users');

@ -11,8 +11,6 @@ use ChamiloSession as Session;
* optionally it allows users to modify their profile as well.
*
* See inc/conf/profile.conf.php to modify settings
*
* @package chamilo.auth
*/
$cidReset = true;
require_once __DIR__.'/../inc/global.inc.php';
@ -85,7 +83,7 @@ if (api_get_setting('allow_message_tool') === 'true') {
EOF;
}
$tool_name = api_get_setting('profile.is_editable') === 'true' ? get_lang('ModifProfile') : get_lang('ViewProfile');
$tool_name = api_get_setting('profile.is_editable') === 'true' ? get_lang('Edit Profile') : get_lang('View my e-portfolio');
$table_user = Database::get_main_table(TABLE_MAIN_USER);
/*
@ -121,12 +119,12 @@ $form = new FormValidator('profile');
if (api_is_western_name_order()) {
// FIRST NAME and LAST NAME
$form->addElement('text', 'firstname', get_lang('FirstName'), ['size' => 40]);
$form->addElement('text', 'lastname', get_lang('LastName'), ['size' => 40]);
$form->addElement('text', 'firstname', get_lang('First name'), ['size' => 40]);
$form->addElement('text', 'lastname', get_lang('Last name'), ['size' => 40]);
} else {
// LAST NAME and FIRST NAME
$form->addElement('text', 'lastname', get_lang('LastName'), ['size' => 40]);
$form->addElement('text', 'firstname', get_lang('FirstName'), ['size' => 40]);
$form->addElement('text', 'lastname', get_lang('Last name'), ['size' => 40]);
$form->addElement('text', 'firstname', get_lang('First name'), ['size' => 40]);
}
if (!in_array('name', $profileList)) {
$form->freeze(['lastname', 'firstname']);
@ -134,14 +132,14 @@ if (!in_array('name', $profileList)) {
$form->applyFilter(['lastname', 'firstname'], 'stripslashes');
$form->applyFilter(['lastname', 'firstname'], 'trim');
$form->applyFilter(['lastname', 'firstname'], 'html_filter');
$form->addRule('lastname', get_lang('ThisFieldIsRequired'), 'required');
$form->addRule('firstname', get_lang('ThisFieldIsRequired'), 'required');
$form->addRule('lastname', get_lang('Required field'), 'required');
$form->addRule('firstname', get_lang('Required field'), 'required');
// USERNAME
$form->addElement(
'text',
'username',
get_lang('UserName'),
get_lang('Username'),
[
'id' => 'username',
'maxlength' => USERNAME_MAX_LENGTH,
@ -153,11 +151,11 @@ if (!in_array('login', $profileList) || api_get_setting('login_is_email') == 'tr
}
$form->applyFilter('username', 'stripslashes');
$form->applyFilter('username', 'trim');
$form->addRule('username', get_lang('ThisFieldIsRequired'), 'required');
$form->addRule('username', get_lang('UsernameWrong'), 'username');
$form->addRule('username', get_lang('UserTaken'), 'username_available', $user_data['username']);
$form->addRule('username', get_lang('Required field'), 'required');
$form->addRule('username', get_lang('Your login can only contain letters, numbers and _.-'), 'username');
$form->addRule('username', get_lang('This login is already in use'), 'username_available', $user_data['username']);
$form->addElement('text', 'official_code', get_lang('OfficialCode'), ['size' => 40]);
$form->addElement('text', 'official_code', get_lang('Code'), ['size' => 40]);
if (!in_array('officialcode', $profileList)) {
$form->freeze('official_code');
}
@ -167,11 +165,11 @@ $form->applyFilter('official_code', 'html_filter');
if (api_get_setting('registration', 'officialcode') === 'true' &&
in_array('officialcode', $profileList)
) {
$form->addRule('official_code', get_lang('ThisFieldIsRequired'), 'required');
$form->addRule('official_code', get_lang('Required field'), 'required');
}
// EMAIL
$form->addElement('email', 'email', get_lang('Email'), ['size' => 40]);
$form->addElement('email', 'email', get_lang('e-mail'), ['size' => 40]);
if (!in_array('email', $profileList)) {
$form->freeze('email');
}
@ -180,8 +178,8 @@ if (api_get_setting('registration', 'email') == 'true' && in_array('email', $pro
) {
$form->applyFilter('email', 'stripslashes');
$form->applyFilter('email', 'trim');
$form->addRule('email', get_lang('ThisFieldIsRequired'), 'required');
$form->addRule('email', get_lang('EmailWrong'), 'email');
$form->addRule('email', get_lang('Required field'), 'required');
$form->addRule('email', get_lang('e-mailWrong'), 'email');
}
// PHONE
@ -198,8 +196,8 @@ if (api_get_setting('profile.is_editable') === 'true' && in_array('picture', $pr
$form->addFile(
'picture',
[
$user_data['picture_uri'] != '' ? get_lang('UpdateImage') : get_lang('AddImage'),
get_lang('OnlyImagesAllowed'),
$user_data['picture_uri'] != '' ? get_lang('Update Image') : get_lang('Add image'),
get_lang('Only PNG, JPG or GIF images allowed'),
],
[
'id' => 'picture',
@ -212,12 +210,12 @@ if (api_get_setting('profile.is_editable') === 'true' && in_array('picture', $pr
$form->addProgress();
if (!empty($user_data['picture_uri'])) {
$form->addElement('checkbox', 'remove_picture', null, get_lang('DelImage'));
$form->addElement('checkbox', 'remove_picture', null, get_lang('Remove picture'));
}
$allowed_picture_types = api_get_supported_image_extensions(false);
$form->addRule(
'picture',
get_lang('OnlyImagesAllowed').' ('.implode(', ', $allowed_picture_types).')',
get_lang('Only PNG, JPG or GIF images allowed').' ('.implode(', ', $allowed_picture_types).')',
'filetype',
$allowed_picture_types
);
@ -231,7 +229,7 @@ if (!in_array('language', $profileList)) {
// THEME
if (api_get_setting('profile.is_editable') === 'true' && api_get_setting('user_selected_theme') === 'true') {
$form->addElement('SelectTheme', 'theme', get_lang('Theme'));
$form->addElement('SelectTheme', 'theme', get_lang('Graphical theme'));
if (!in_array('theme', $profileList)) {
$form->freeze('theme');
}
@ -244,7 +242,7 @@ if (api_get_setting('extended_profile') === 'true') {
// MY COMPETENCES
$form->addHtmlEditor(
'competences',
get_lang('MyCompetences'),
get_lang('My competences'),
false,
false,
[
@ -256,7 +254,7 @@ if (api_get_setting('extended_profile') === 'true') {
// MY DIPLOMAS
$form->addHtmlEditor(
'diplomas',
get_lang('MyDiplomas'),
get_lang('My diplomas'),
false,
false,
[
@ -268,7 +266,7 @@ if (api_get_setting('extended_profile') === 'true') {
// WHAT I AM ABLE TO TEACH
$form->addHtmlEditor(
'teach',
get_lang('MyTeach'),
get_lang('What I am able to teach'),
false,
false,
[
@ -279,14 +277,14 @@ if (api_get_setting('extended_profile') === 'true') {
);
// MY PRODUCTIONS
$form->addElement('file', 'production', get_lang('MyProductions'));
$form->addElement('file', 'production', get_lang('My productions'));
if ($production_list = UserManager::build_production_list(api_get_user_id(), '', true)) {
$form->addElement('static', 'productions_list', null, $production_list);
}
// MY PERSONAL OPEN AREA
$form->addHtmlEditor(
'openarea',
get_lang('MyPersonalOpenArea'),
get_lang('My personal open area'),
false,
false,
[
@ -306,11 +304,11 @@ if ($user_data['auth_source'] == PLATFORM_AUTH_SOURCE &&
in_array('password', $profileList)
) {
$form->addElement('password', 'password0', [get_lang('Pass'), get_lang('Enter2passToChange')], ['size' => 40]);
$form->addElement('password', 'password1', get_lang('NewPass'), ['id' => 'password1', 'size' => 40]);
$form->addElement('password', 'password1', get_lang('New password'), ['id' => 'password1', 'size' => 40]);
$form->addElement('password', 'password2', get_lang('Confirmation'), ['size' => 40]);
$form->addElement('password', 'password2', get_lang('Confirm password'), ['size' => 40]);
// user must enter identical password twice so we can prevent some user errors
$form->addRule(['password1', 'password2'], get_lang('PassTwo'), 'compare');
$form->addRule(['password1', 'password2'], get_lang('You have typed two different passwords'), 'compare');
$form->addPasswordRule('password1');
}
@ -335,13 +333,13 @@ if (in_array('apikeys', $profileList)) {
$form->addElement(
'text',
'api_key_generate',
get_lang('MyApiKey'),
get_lang('My API key'),
['size' => 40, 'id' => 'id_api_key_generate']
);
$form->addElement('html', '</div>');
$form->addButton(
'generate_api_key',
get_lang('GenerateApiKey'),
get_lang('Generate API key'),
'cogs',
'default',
'default',
@ -407,7 +405,7 @@ if ($form->validate()) {
} else {
Display::addFlash(
Display:: return_message(
get_lang('CurrentPasswordEmptyOrIncorrect'),
get_lang('The current password is incorrect'),
'warning',
false
)
@ -438,7 +436,7 @@ if ($form->validate()) {
if (!empty($userFromEmail) && empty($user_data['password0'])) {
Display::addFlash(
Display:: return_message(
get_lang('ToChangeYourEmailMustTypeYourPassword'),
get_lang('ToChangeYoure-mailMustTypeYourPassword'),
'error',
false
)
@ -461,7 +459,7 @@ if ($form->validate()) {
Display::addFlash(
Display:: return_message(
get_lang('PictureUploaded'),
get_lang('Your picture has been uploaded'),
'normal',
false
)
@ -488,7 +486,7 @@ if ($form->validate()) {
}
$form->removeElement('productions_list');
Display::addFlash(
Display:: return_message(get_lang('FileDeleted'), 'normal', false)
Display:: return_message(get_lang('File deleted'), 'normal', false)
);
}
@ -502,7 +500,7 @@ if ($form->validate()) {
} else {
Display::addFlash(
Display:: return_message(
get_lang('ProductionUploaded'),
get_lang('Your production file has been uploaded'),
'normal',
false
)
@ -628,12 +626,12 @@ if ($form->validate()) {
if ($passwordWasChecked == false) {
Display::addFlash(
Display:: return_message(get_lang('ProfileReg'), 'normal', false)
Display:: return_message(get_lang('Your new profile has been saved'), 'normal', false)
);
} else {
if ($validPassword) {
Display::addFlash(
Display:: return_message(get_lang('ProfileReg'), 'normal', false)
Display:: return_message(get_lang('Your new profile has been saved'), 'normal', false)
);
}
}
@ -671,7 +669,7 @@ if ($allowSocialTool) {
if (api_get_setting('extended_profile') === 'true') {
if (api_get_setting('allow_message_tool') === 'true') {
$actions .= '<a href="'.api_get_path(WEB_PATH).'main/social/profile.php">'.
Display::return_icon('shared_profile.png', get_lang('ViewSharedProfile')).'</a>';
Display::return_icon('shared_profile.png', get_lang('View shared profile')).'</a>';
$actions .= '<a href="'.api_get_path(WEB_PATH).'main/messages/inbox.php">'.
Display::return_icon('inbox.png', get_lang('Messages')).'</a>';
}
@ -679,17 +677,17 @@ if ($allowSocialTool) {
if (isset($_GET['type']) && $_GET['type'] === 'extended') {
$actions .= '<a href="profile.php?type=reduced'.$show.'">'.
Display::return_icon('edit.png', get_lang('EditNormalProfile'), '', 16).'</a>';
Display::return_icon('edit.png', get_lang('Edit normal profile'), '', 16).'</a>';
} else {
$actions .= '<a href="profile.php?type=extended'.$show.'">'.
Display::return_icon('edit.png', get_lang('EditExtendProfile'), '', 16).'</a>';
Display::return_icon('edit.png', get_lang('Edit extended profile'), '', 16).'</a>';
}
}
}
$show_delete_account_button = api_get_setting('platform_unsubscribe_allowed') === 'true' ? true : false;
$tpl = new Template(get_lang('ModifyProfile'));
$tpl = new Template(get_lang('Profile'));
if ($actions) {
$tpl->assign(

@ -5,9 +5,9 @@ require_once __DIR__.'/../inc/global.inc.php';
// Build the form
$form = new FormValidator('resend');
$form->addHeader(get_lang('ReSendConfirmationMail'));
$form->addText('user', get_lang('UserName'), true);
$form->addButtonSend(get_lang('Send'));
$form->addHeader(get_lang('Send message confirmation mail again'));
$form->addText('user', get_lang('Username'), true);
$form->addButtonSend(get_lang('Send message'));
if ($form->validate()) {
$values = $form->exportValues();
@ -15,7 +15,7 @@ if ($form->validate()) {
if ($user) {
UserManager::sendUserConfirmationMail($user);
} else {
Display::addFlash(Display::return_message(get_lang('UserDoesNotExist')));
Display::addFlash(Display::return_message(get_lang('This user doesn\'t exist')));
}
header('Location: '.api_get_path(WEB_PATH));

@ -11,18 +11,18 @@ if (!ctype_alnum($token)) {
// Build the form
$form = new FormValidator('reset', 'POST', api_get_self().'?token='.$token);
$form->addElement('header', get_lang('ResetPassword'));
$form->addElement('header', get_lang('Reset password'));
$form->addHidden('token', $token);
$form->addElement('password', 'pass1', get_lang('Password'));
$form->addElement(
'password',
'pass2',
get_lang('Confirmation'),
get_lang('Confirm password'),
['id' => 'pass2', 'size' => 20, 'autocomplete' => 'off']
);
$form->addRule('pass1', get_lang('ThisFieldIsRequired'), 'required');
$form->addRule('pass2', get_lang('ThisFieldIsRequired'), 'required');
$form->addRule(['pass1', 'pass2'], get_lang('PassTwo'), 'compare');
$form->addRule('pass1', get_lang('Required field'), 'required');
$form->addRule('pass2', get_lang('Required field'), 'required');
$form->addRule(['pass1', 'pass2'], get_lang('You have typed two different passwords'), 'compare');
$form->addButtonSave(get_lang('Update'));
$ttl = api_get_setting('user_reset_password_token_limit');
@ -39,7 +39,7 @@ if ($form->validate()) {
$user = UserManager::getManager()->findUserByConfirmationToken($token);
if ($user) {
if (!$user->isPasswordRequestNonExpired($ttl)) {
Display::addFlash(Display::return_message(get_lang('LinkExpired')), 'warning');
Display::addFlash(Display::return_message(get_lang('Link expired, please try again.')), 'warning');
header('Location: '.api_get_path(WEB_CODE_PATH).'auth/lostPassword.php');
exit;
}
@ -54,12 +54,12 @@ if ($form->validate()) {
Database::getManager()->persist($user);
Database::getManager()->flush();
Display::addFlash(Display::return_message(get_lang('Updated')));
Display::addFlash(Display::return_message(get_lang('Update successful')));
header('Location: '.api_get_path(WEB_PATH));
exit;
} else {
Display::addFlash(
Display::return_message(get_lang('LinkExpired'))
Display::return_message(get_lang('Link expired, please try again.'))
);
}
}

@ -30,7 +30,7 @@ $form = new FormValidator(
'POST',
api_get_self().'?course_id='.$courseId.'&session_id='.$sessionId
);
$form->addElement('header', get_lang('CourseRequiresPassword'));
$form->addElement('header', get_lang('This course requires a password'));
$form->addElement('hidden', 'course_id', $courseId);
$form->addElement('hidden', 'session_id', $sessionId);
$form->addElement('password', 'course_password', get_lang('Password'));
@ -45,7 +45,7 @@ if ($form->validate()) {
exit;
} else {
Display::addFlash(
Display::return_message(get_lang('CourseRegistrationCodeIncorrect'), 'error')
Display::return_message(get_lang('The course password is incorrect'), 'error')
);
}
}

@ -16,7 +16,7 @@ $currentUrl = api_get_self();
$interbreadcrumb[] = [
'url' => api_get_self(),
'name' => get_lang('SortMyCourses'),
'name' => get_lang('Sort courses'),
];
// We are moving the course of the user to a different user defined course category (=Sort My Courses).
@ -24,7 +24,7 @@ if (isset($_POST['submit_change_course_category'])) {
$result = $auth->updateCourseCategory($_POST['course_2_edit_category'], $_POST['course_categories']);
if ($result) {
Display::addFlash(
Display::return_message(get_lang('EditCourseCategorySucces'))
Display::return_message(get_lang('The course has been added to the category'))
);
}
header('Location: '.api_get_self());
@ -38,7 +38,7 @@ if (isset($_POST['submit_edit_course_category']) &&
$result = $auth->store_edit_course_category($_POST['title_course_category'], $_POST['category_id']);
if ($result) {
Display::addFlash(
Display::return_message(get_lang('CourseCategoryEditStored'))
Display::return_message(get_lang('Category updated'))
);
}
@ -54,12 +54,12 @@ if (isset($_POST['create_course_category']) &&
$result = $auth->store_course_category($_POST['title_course_category']);
if ($result) {
Display::addFlash(
Display::return_message(get_lang('CourseCategoryStored'))
Display::return_message(get_lang('Course category is created'))
);
} else {
Display::addFlash(
Display::return_message(
get_lang('ACourseCategoryWithThisNameAlreadyExists'),
get_lang('A course category with the same name already exists.'),
'error'
)
);
@ -74,7 +74,7 @@ if (isset($_GET['move'])) {
$result = $auth->move_course($_GET['move'], $_GET['course'], $_GET['category']);
if ($result) {
Display::addFlash(
Display::return_message(get_lang('CourseSortingDone'))
Display::return_message(get_lang('Courses sorted'))
);
}
}
@ -82,7 +82,7 @@ if (isset($_GET['move'])) {
$result = $auth->move_category($_GET['move'], $_GET['category']);
if ($result) {
Display::addFlash(
Display::return_message(get_lang('CategorySortingDone'))
Display::return_message(get_lang('Category sorting done'))
);
}
}
@ -136,7 +136,7 @@ switch ($action) {
'course_categories',
get_lang('Categories'),
$options,
['disable_js' => true, 'placeholder' => get_lang('SelectAnOption')]
['disable_js' => true, 'placeholder' => get_lang('Please select an option')]
);
$form->addHidden('course_2_edit_category', $edit_course);
@ -154,7 +154,7 @@ switch ($action) {
$result = $auth->delete_course_category($_GET['id']);
if ($result) {
Display::addFlash(
Display::return_message(get_lang('CourseCategoryDeleted'))
Display::return_message(get_lang('The category was deleted'))
);
}
}
@ -169,7 +169,7 @@ switch ($action) {
$currentUrl.'?action=createcoursecategory'
);
$form->addText('title_course_category', get_lang('Name'));
$form->addButtonSave(get_lang('AddCategory'), 'create_course_category');
$form->addButtonSave(get_lang('Add category'), 'create_course_category');
$form->display();
exit;
break;
@ -192,7 +192,7 @@ switch ($action) {
SET collapsed = $option
WHERE user_id = $userId AND id = $categoryId";
Database::query($sql);
Display::addFlash(Display::return_message(get_lang('Updated')));
Display::addFlash(Display::return_message(get_lang('Update successful')));
if ($redirect === 'home') {
$url = api_get_path(WEB_PATH).'user_portal.php';
@ -213,7 +213,7 @@ $courses_without_category = isset($courses_in_category[0]) ? $courses_in_categor
echo '<div id="actions" class="actions">';
if ($action != 'createcoursecategory') {
echo '<a class="ajax" href="'.$currentUrl.'?action=createcoursecategory">';
echo Display::return_icon('new_folder.png', get_lang('CreateCourseCategory'), '', '32');
echo Display::return_icon('new_folder.png', get_lang('Create a personal courses category'), '', '32');
echo '</a>';
}
echo '</div>';
@ -223,7 +223,7 @@ if (!empty($message)) {
}
$allowCollapsable = api_get_configuration_value('allow_user_course_category_collapsable');
$teachersIcon = Display::return_icon('teacher.png', get_lang('Teachers'), null, ICON_SIZE_TINY);
$teachersIcon = Display::return_icon('teacher.png', get_lang('Trainers'), null, ICON_SIZE_TINY);
// COURSES WITH CATEGORIES
if (!empty($user_course_categories)) {
@ -263,11 +263,11 @@ if (!empty($user_course_categories)) {
}
if ($row['id'] != $last['id']) {
echo Display::url(
Display::return_icon('down.png', get_lang('Down'), '', 22),
Display::return_icon('down.png', get_lang('down'), '', 22),
$currentUrl.'?move=down&category='.$row['id'].'&sec_token='.$stok
);
} else {
echo Display::return_icon('down_na.png', get_lang('Down'), '', 22);
echo Display::return_icon('down_na.png', get_lang('down'), '', 22);
}
echo Display::url(
@ -277,7 +277,7 @@ if (!empty($user_course_categories)) {
[
'onclick' => "javascript: if (!confirm('".addslashes(
api_htmlentities(
get_lang('CourseCategoryAbout2bedeleted'),
get_lang('Are you sure you want to delete this courses category? Courses inside this category will be moved outside the categories'),
ENT_QUOTES,
api_get_system_encoding()
)
@ -313,7 +313,7 @@ if (!empty($user_course_categories)) {
<div style="float:left;width:110px;">
<?php
if (api_get_setting('show_courses_descriptions_in_catalog') == 'true') {
$icon_title = get_lang('CourseDetails').' - '.$course['title']; ?>
$icon_title = get_lang('Course description').' - '.$course['title']; ?>
<a href="<?php echo api_get_path(WEB_CODE_PATH); ?>inc/ajax/course_home.ajax.php?a=show_course_information&code=<?php echo $course['code']; ?>" data-title="<?php echo $icon_title; ?>" title="<?php echo $icon_title; ?>" class="ajax">
<?php
echo Display::return_icon('info.png', $icon_title, '', '22');
@ -338,11 +338,11 @@ if (!empty($user_course_categories)) {
if ($key < $number_of_courses - 1) {
?>
<a href="<?php echo $currentUrl; ?>?action=<?php echo $action; ?>&amp;move=down&amp;course=<?php echo $course['code']; ?>&amp;category=<?php echo $course['user_course_cat']; ?>&amp;sec_token=<?php echo $stok; ?>">
<?php echo Display::return_icon('down.png', get_lang('Down'), '', 22); ?>
<?php echo Display::return_icon('down.png', get_lang('down'), '', 22); ?>
</a>
<?php
} else {
echo Display::return_icon('down_na.png', get_lang('Down'), '', 22);
echo Display::return_icon('down_na.png', get_lang('down'), '', 22);
} ?>
</div>
<div style="float:left; margin-right:10px;">
@ -351,7 +351,7 @@ if (!empty($user_course_categories)) {
if ($course['unsubscr'] == 1) {
?>
<form action="<?php echo api_get_self(); ?>" method="post" onsubmit="javascript: if (!confirm('<?php echo addslashes(api_htmlentities(get_lang("ConfirmUnsubscribeFromCourse"), ENT_QUOTES, api_get_system_encoding())); ?>')) return false">
<form action="<?php echo api_get_self(); ?>" method="post" onsubmit="javascript: if (!confirm('<?php echo addslashes(api_htmlentities(get_lang("Are you sure you want to unsubscribe?"), ENT_QUOTES, api_get_system_encoding())); ?>')) return false">
<input type="hidden" name="sec_token" value="<?php echo $stok; ?>">
<input type="hidden" name="unsubscribe" value="<?php echo $course['code']; ?>" />
<button class="btn btn-default" value="<?php echo get_lang('Unsubscribe'); ?>" name="unsub">
@ -369,7 +369,7 @@ if (!empty($user_course_categories)) {
}
}
echo Display::page_subheader(get_lang('NoCourseCategory'));
echo Display::page_subheader(get_lang('No courses category'));
echo '<table class="data_table">';
// COURSES WITHOUT CATEGORY
if (!empty($courses_without_category)) {
@ -393,7 +393,7 @@ if (!empty($courses_without_category)) {
<div style="float:left; width:110px">
<?php
if (api_get_setting('show_courses_descriptions_in_catalog') == 'true') {
$icon_title = get_lang('CourseDetails').' - '.$course['title']; ?>
$icon_title = get_lang('Course description').' - '.$course['title']; ?>
<a href="<?php echo api_get_path(WEB_CODE_PATH); ?>inc/ajax/course_home.ajax.php?a=show_course_information&code=<?php echo $course['code']; ?>" data-title="<?php echo $icon_title; ?>" title="<?php echo $icon_title; ?>" class="ajax">
<?php echo Display::return_icon('info.png', $icon_title, '', '22'); ?>
</a>
@ -421,11 +421,11 @@ if (!empty($courses_without_category)) {
if ($key < $number_of_courses - 1) {
?>
<a href="<?php echo $currentUrl; ?>?action=<?php echo $action; ?>&amp;move=down&amp;course=<?php echo $course['code']; ?>&amp;category=<?php echo $course['user_course_cat']; ?>&amp;sec_token=<?php echo $stok; ?>">
<?php echo Display::display_icon('down.png', get_lang('Down'), '', 22); ?>
<?php echo Display::display_icon('down.png', get_lang('down'), '', 22); ?>
</a>
<?php
} else {
echo Display::return_icon('down_na.png', get_lang('Down'), '', 22);
echo Display::return_icon('down_na.png', get_lang('down'), '', 22);
} ?>
</div>
<div style="float:left; margin-right:10px;">
@ -434,7 +434,7 @@ if (!empty($courses_without_category)) {
if ($course['unsubscr'] == 1) {
?>
<!-- changed link to submit to avoid action by the search tool indexer -->
<form action="<?php echo api_get_self(); ?>" method="post" onsubmit="javascript: if (!confirm('<?php echo addslashes(api_htmlentities(get_lang("ConfirmUnsubscribeFromCourse"), ENT_QUOTES, api_get_system_encoding())); ?>')) return false;">
<form action="<?php echo api_get_self(); ?>" method="post" onsubmit="javascript: if (!confirm('<?php echo addslashes(api_htmlentities(get_lang("Are you sure you want to unsubscribe?"), ENT_QUOTES, api_get_system_encoding())); ?>')) return false;">
<input type="hidden" name="sec_token" value="<?php echo $stok; ?>">
<input type="hidden" name="unsubscribe" value="<?php echo $course['code']; ?>" />
<button class="btn btn-default" value="<?php echo get_lang('Unsubscribe'); ?>" name="unsub">

@ -9,7 +9,7 @@ if (api_get_setting('platform_unsubscribe_allowed') != 'true') {
$tool_name = get_lang('Unsubscribe');
$message = Display::return_message(get_lang('UnsubscribeFromPlatform'), 'warning');
$message = Display::return_message(get_lang('If you want to unsubscribe completely from this campus and have all your information removed from our database, please click the button below and confirm.'), 'warning');
$form = new FormValidator('user_add');
$form->addElement(
@ -17,7 +17,7 @@ $form->addElement(
'submit',
get_lang('Unsubscribe'),
[
'onclick' => "javascript:if(!confirm('".addslashes(api_htmlentities(get_lang("UnsubscribeFromPlatformConfirm")))."')) return false;",
'onclick' => "javascript:if(!confirm('".addslashes(api_htmlentities(get_lang("If you want to unsubscribe completely from this campus and have all your information removed from our database, please click the button below and confirm.Confirm")))."')) return false;",
]
);
$content = $form->returnForm();
@ -28,7 +28,7 @@ if ($form->validate()) {
if ($result) {
$message = Display::return_message(
sprintf(
get_lang('UnsubscribeFromPlatformSuccess'),
get_lang('If you want to unsubscribe completely from this campus and have all your information removed from our database, please click the button below and confirm.Success'),
$user_info['username']
)
);

@ -43,13 +43,13 @@ if ($user) {
);
Display::addFlash(
Display::return_message(get_lang('UserConfirmedNowYouCanLogInThePlatform'), 'success')
Display::return_message(get_lang('User confirmed. Now you can login the platform.'), 'success')
);
header('Location: '.$url);
exit;
} else {
Display::addFlash(
Display::return_message(get_lang('LinkExpired'))
Display::return_message(get_lang('Link expired, please try again.'))
);
header('Location: '.api_get_path(WEB_PATH));
exit;

@ -8,7 +8,6 @@ use Skill as SkillManager;
* Page for assign skills to a user.
*
* @author: Jose Loguercio <jose.loguercio@beeznest.com>
*
*/
require_once __DIR__.'/../inc/global.inc.php';

@ -4,7 +4,6 @@
/**
* BLOG HOMEPAGE
* This file takes care of all blog navigation and displaying.
*
*/
require_once __DIR__.'/../inc/global.inc.php';

@ -24,7 +24,7 @@ if (!api_is_allowed_to_edit()) {
api_not_allowed(true);
}
$tool_name = get_lang('DelCourse');
$tool_name = get_lang('Completely delete this course');
if (isset($_GET['delete']) && $_GET['delete'] === 'yes') {
CourseManager::delete_course($_course['sysCode']);
@ -33,18 +33,18 @@ if (isset($_GET['delete']) && $_GET['delete'] === 'yes') {
Session::erase('_cid');
Session::erase('_real_cid');
$message = '<h2>'.get_lang('Course').' : '.$current_course_name.' ('.$current_course_code.') </h2>';
$message .= get_lang('HasDel');
$message .= '<br /><br /><a href="../../index.php">'.get_lang('BackHome').'</a>';
$message .= get_lang('has been deleted');
$message .= '<br /><br /><a href="../../index.php">'.get_lang('Back to Home Page.').'</a>';
} else {
$message = '<h3>'.get_lang('Course').' : '.$current_course_name.' ('.$current_course_code.') </h3>';
$message .= '<p>'.get_lang('ByDel').'</p>';
$message .= '<p>'.get_lang('Deleting this area will permanently delete all the content (documents, links...) it contains and unregister all its members (not remove them from other courses). <p>Do you really want to delete the course?').'</p>';
$message .= '<p><a class="btn btn-primary"
href="'.api_get_path(WEB_CODE_PATH).'course_info/maintenance.php?'.api_get_cidreq().'">'.
get_lang('No').'</a>&nbsp;<a class="btn btn-danger" href="'.api_get_self().'?delete=yes&'.api_get_cidreq().'">'.
get_lang('Yes').'</a></p>';
$interbreadcrumb[] = [
'url' => 'maintenance.php',
'name' => get_lang('Maintenance'),
'name' => get_lang('Backup'),
];
}

@ -14,13 +14,11 @@ use Chamilo\CoreBundle\Framework\Container;
* @author Patrick Cool <patrick.cool@UGent.be>
* @author Roan Embrechts, refactoring and improved course visibility|subscribe|unsubscribe options
* @author Julio Montoya <gugli100@gmail.com> Jquery support + lots of fixes
*
* @package chamilo.course_info
*/
require_once __DIR__.'/../inc/global.inc.php';
$current_course_tool = TOOL_COURSE_SETTING;
$this_section = SECTION_COURSES;
$nameTools = get_lang('ModifInfo');
$nameTools = get_lang('Settings');
api_protect_course_script(true);
api_block_anonymous_users();
$_course = api_get_course_info();
@ -82,7 +80,7 @@ function card_settings_close()
return $html;
}
$form->addHtml(card_settings_open('course_settings', get_lang('CourseSettings'), true, 'settings.png', 'accordionSettings'));
$form->addHtml(card_settings_open('course_settings', get_lang('Course settings'), true, 'settings.png', 'accordionSettings'));
$image = '';
// Display course picture
@ -101,13 +99,13 @@ $form->applyFilter('title', 'trim');
$form->addElement(
'select',
'category_code',
get_lang('Fac'),
get_lang('Category'),
$categories,
['style' => 'width:350px', 'id' => 'category_code']
);
$form->addSelectLanguage(
'course_language',
[get_lang('Ln'), get_lang('TipLang')]
[get_lang('Language'), get_lang('This language will be valid for every visitor of your courses portal')]
);
$group = [
@ -115,13 +113,13 @@ $group = [
$form->createElement('radio', 'show_course_in_user_language', null, get_lang('No'), 2),
];
$form->addGroup($group, '', [get_lang('ShowCourseInUserLanguage')]);
$form->addGroup($group, '', [get_lang('Show course in user\'s language')]);
$form->addText('department_name', get_lang('Department'), false);
$form->applyFilter('department_name', 'html_filter');
$form->applyFilter('department_name', 'trim');
$form->addText('department_url', get_lang('DepartmentUrl'), false);
$form->addText('department_url', get_lang('Department URL'), false);
$form->applyFilter('department_url', 'html_filter');
// Extra fields
@ -150,7 +148,7 @@ $(function() {
// Picture
$form->addFile(
'picture',
get_lang('AddPicture'),
get_lang('Add a picture'),
['id' => 'picture', 'class' => 'picture-form', 'crop_image' => true]
);
@ -160,18 +158,18 @@ $form->addHtml($image);
$form->addRule(
'picture',
get_lang('OnlyImagesAllowed').' ('.implode(',', $allowed_picture_types).')',
get_lang('Only PNG, JPG or GIF images allowed').' ('.implode(',', $allowed_picture_types).')',
'filetype',
$allowed_picture_types
);
$form->addElement('checkbox', 'delete_picture', null, get_lang('DeletePicture'));
$form->addElement('checkbox', 'delete_picture', null, get_lang('Delete picture'));
if (api_get_setting('pdf_export_watermark_by_course') == 'true') {
$url = PDF::get_watermark($course_code);
$form->addText('pdf_export_watermark_text', get_lang('PDFExportWatermarkTextTitle'), false, ['size' => '60']);
$form->addElement('file', 'pdf_export_watermark_path', get_lang('AddWaterMark'));
$form->addText('pdf_export_watermark_text', get_lang('PDF watermark text'), false, ['size' => '60']);
$form->addElement('file', 'pdf_export_watermark_path', get_lang('Upload a watermark image'));
if ($url != false) {
$delete_url = '<a href="?delete_watermark">'.Display::return_icon('delete.png', get_lang('DelImage')).'</a>';
$delete_url = '<a href="?delete_watermark">'.Display::return_icon('delete.png', get_lang('Remove picture')).'</a>';
$form->addElement(
'html',
'<div class="row"><div class="form"><a href="'.$url.'">'.$url.' '.$delete_url.'</a></div></div>'
@ -179,7 +177,7 @@ if (api_get_setting('pdf_export_watermark_by_course') == 'true') {
}
$form->addRule(
'pdf_export_watermark_path',
get_lang('OnlyImagesAllowed').' ('.implode(',', $allowed_picture_types).')',
get_lang('Only PNG, JPG or GIF images allowed').' ('.implode(',', $allowed_picture_types).')',
'filetype',
$allowed_picture_types
);
@ -193,21 +191,21 @@ if (api_get_setting('allow_course_theme') == 'true') {
null,
['id' => 'course_theme_id']
);
$form->addGroup($group, '', [get_lang('Stylesheets')]);
$form->addGroup($group, '', [get_lang('Style sheets')]);
}
$form->addElement('label', get_lang('DocumentQuota'), format_file_size(DocumentManager::get_course_quota()));
$form->addElement('label', get_lang('Space Available'), format_file_size(DocumentManager::get_course_quota()));
$scoreModels = ExerciseLib::getScoreModels();
if (!empty($scoreModels)) {
$options = ['' => get_lang('None')];
$options = ['' => get_lang('none')];
foreach ($scoreModels['models'] as $item) {
$options[$item['id']] = get_lang($item['name']);
}
$form->addSelect('score_model_id', get_lang('ScoreModel'), $options);
$form->addSelect('score_model_id', get_lang('Score model'), $options);
}
$form->addButtonSave(get_lang('SaveSettings'), 'submit_save');
$form->addButtonSave(get_lang('Save settings'), 'submit_save');
$form->addHtml(card_settings_close());
@ -215,23 +213,23 @@ $group = [];
$group[] = $form->createElement(
'radio',
'visibility',
get_lang('CourseAccess'),
get_lang('OpenToTheWorld'),
get_lang('Course access'),
get_lang('Public - access allowed for the whole world'),
COURSE_VISIBILITY_OPEN_WORLD
);
$group[] = $form->createElement(
'radio',
'visibility',
null,
get_lang('OpenToThePlatform'),
get_lang(' Open - access allowed for users registered on the platform'),
COURSE_VISIBILITY_OPEN_PLATFORM
);
$group[] = $form->createElement('radio', 'visibility', null, get_lang('Private'), COURSE_VISIBILITY_REGISTERED);
$group[] = $form->createElement('radio', 'visibility', null, get_lang('Private access (access authorized to group members only)'), COURSE_VISIBILITY_REGISTERED);
$group[] = $form->createElement(
'radio',
'visibility',
null,
get_lang('CourseVisibilityClosed'),
get_lang('Closed - the course is only accessible to the teachers'),
COURSE_VISIBILITY_CLOSED
);
@ -241,7 +239,7 @@ if (api_is_platform_admin()) {
'radio',
'visibility',
null,
get_lang('CourseVisibilityHidden'),
get_lang('Hidden - Completely hidden to all users except the administrators'),
COURSE_VISIBILITY_HIDDEN
);
}
@ -249,7 +247,7 @@ if (api_is_platform_admin()) {
$groupElement = $form->addGroup(
$group,
'',
[get_lang('CourseAccess'), get_lang('CourseAccessConfigTip')],
[get_lang('Course access'), get_lang('Course accessConfigTip')],
null,
null,
true
@ -257,27 +255,27 @@ $groupElement = $form->addGroup(
$url = api_get_path(WEB_CODE_PATH)."auth/inscription.php?c=$course_code&e=1";
$url = Display::url($url, $url);
$label = $form->addLabel(get_lang('DirectLink'), sprintf(get_lang('CourseSettingsRegisterDirectLink'), $url), true);
$label = $form->addLabel(get_lang('Direct link'), sprintf(get_lang('Course settingsRegisterDirect link'), $url), true);
$group2 = [];
$group2[] = $form->createElement('radio', 'subscribe', get_lang('Subscription'), get_lang('Allowed'), 1);
$group2[] = $form->createElement('radio', 'subscribe', null, get_lang('Denied'), 0);
$group2[] = $form->createElement('radio', 'subscribe', null, get_lang('This function is only available to trainers'), 0);
$myButton = $form->addButtonSave(get_lang('SaveSettings'), 'submit_save', true);
$myButton = $form->addButtonSave(get_lang('Save settings'), 'submit_save', true);
$group3[] = $form->createElement(
'radio',
'unsubscribe',
get_lang('Unsubscription'),
get_lang('AllowedToUnsubscribe'),
get_lang('Unsubscribe'),
get_lang('Users are allowed to unsubscribe from this course'),
1
);
$group3[] = $form->createElement('radio', 'unsubscribe', null, get_lang('NotAllowedToUnsubscribe'), 0);
$group3[] = $form->createElement('radio', 'unsubscribe', null, get_lang('NotUsers are allowed to unsubscribe from this course'), 0);
$text = $form->createElement(
'text',
'course_registration_password',
get_lang('CourseRegistrationPassword'),
get_lang('Course registration password'),
false,
['size' => '60']
);
@ -285,16 +283,16 @@ $text = $form->createElement(
$checkBoxActiveLegal = $form->createElement(
'checkbox',
'activate_legal',
[null, get_lang('ShowALegalNoticeWhenEnteringTheCourse')],
get_lang('ActivateLegal')
[null, get_lang('Show a legal notice when entering the course')],
get_lang('Enable legal terms')
);
$textAreaLegal = $form->createElement('textarea', 'legal', get_lang('CourseLegalAgreement'), ['rows' => 8]);
$textAreaLegal = $form->createElement('textarea', 'legal', get_lang('Legal agreement for this course'), ['rows' => 8]);
$elements = [
$groupElement,
$label,
get_lang('Subscription') => $group2,
get_lang('Unsubscription') => $group3,
get_lang('Unsubscribe') => $group3,
$text,
$checkBoxActiveLegal,
$textAreaLegal,
@ -303,7 +301,7 @@ $elements = [
$form->addPanelOption(
'course_access',
get_lang('CourseAccess'),
get_lang('Course access'),
$elements,
'course.png',
false,
@ -315,9 +313,9 @@ $globalGroup = [];
if (api_get_setting('documents_default_visibility_defined_in_course') == 'true') {
$group = [
$form->createElement('radio', 'documents_default_visibility', null, get_lang('Visible'), 'visible'),
$form->createElement('radio', 'documents_default_visibility', null, get_lang('Invisible'), 'invisible'),
$form->createElement('radio', 'documents_default_visibility', null, get_lang('invisible'), 'invisible'),
];
$globalGroup[get_lang('DocumentsDefaultVisibility')] = $group;
$globalGroup[get_lang('Default visibility of new documents')] = $group;
}
$group = [
@ -325,20 +323,20 @@ $group = [
$form->createElement('radio', 'show_system_folders', null, get_lang('No'), 2),
];
$globalGroup[get_lang('ShowSystemFolders')] = $group;
$globalGroup[get_lang('Show system folders.')] = $group;
$myButton = $form->addButtonSave(get_lang('SaveSettings'), 'submit_save', true);
$myButton = $form->addButtonSave(get_lang('Save settings'), 'submit_save', true);
$group = [];
$group[] = $form->createElement(
'radio',
'enable_document_auto_launch',
get_lang('DocumentAutoLaunch'),
get_lang('RedirectToTheDocumentList'),
get_lang('Auto-launch for documents'),
get_lang('Redirect to the document list'),
1
);
$group[] = $form->createElement('radio', 'enable_document_auto_launch', null, get_lang('Deactivate'), 0);
$globalGroup[get_lang('DocumentAutoLaunch')] = $group;
$globalGroup[get_lang('Auto-launch for documents')] = $group;
$globalGroup[] = $myButton;
@ -356,99 +354,99 @@ $group = [];
$group[] = $form->createElement(
'radio',
'email_alert_to_teacher_on_new_user_in_course',
get_lang('NewUserEmailAlert'),
get_lang('NewUserEmailAlertEnable'),
get_lang('E-mail teacher when a new user auto-subscribes'),
get_lang('E-mail teacher when a new user auto-subscribesEnable'),
1
);
$group[] = $form->createElement(
'radio',
'email_alert_to_teacher_on_new_user_in_course',
null,
get_lang('NewUserEmailAlertToTeacharAndTutor'),
get_lang('E-mail teacher when a new user auto-subscribesToTeacharAndTutor'),
2
);
$group[] = $form->createElement(
'radio',
'email_alert_to_teacher_on_new_user_in_course',
null,
get_lang('NewUserEmailAlertDisable'),
get_lang('E-mail teacher when a new user auto-subscribesDisable'),
0
);
$globalGroup[get_lang('NewUserEmailAlert')] = $group;
$globalGroup[get_lang('E-mail teacher when a new user auto-subscribes')] = $group;
$group = [];
$group[] = $form->createElement(
'radio',
'email_alert_students_on_new_homework',
get_lang('NewHomeworkEmailAlert'),
get_lang('NewHomeworkEmailAlertEnable'),
get_lang('E-mail students on assignment creation'),
get_lang('E-mail students on assignment creationEnable'),
1
);
$group[] = $form->createElement(
'radio',
'email_alert_students_on_new_homework',
null,
get_lang('NewHomeworkEmailAlertToHrmEnable'),
get_lang('E-mail students on assignment creationToHrmEnable'),
2
);
$group[] = $form->createElement(
'radio',
'email_alert_students_on_new_homework',
null,
get_lang('NewHomeworkEmailAlertDisable'),
get_lang('E-mail students on assignment creationDisable'),
0
);
$globalGroup[get_lang('NewHomeworkEmailAlert')] = $group;
$globalGroup[get_lang('E-mail students on assignment creation')] = $group;
$group = [];
$group[] = $form->createElement(
'radio',
'email_alert_manager_on_new_doc',
get_lang('WorkEmailAlert'),
get_lang('WorkEmailAlertActivate'),
get_lang('E-mail on assignments submission by students'),
get_lang('E-mail on assignments submission by studentsActivate'),
1
);
$group[] = $form->createElement(
'radio',
'email_alert_manager_on_new_doc',
null,
get_lang('WorkEmailAlertActivateOnlyForTeachers'),
get_lang('E-mail on assignments submission by studentsActivateOnlyForTeachers'),
3
);
$group[] = $form->createElement(
'radio',
'email_alert_manager_on_new_doc',
null,
get_lang('WorkEmailAlertActivateOnlyForStudents'),
get_lang('E-mail on assignments submission by studentsActivateOnlyForStudents'),
2
);
$group[] = $form->createElement(
'radio',
'email_alert_manager_on_new_doc',
null,
get_lang('WorkEmailAlertDeactivate'),
get_lang('E-mail on assignments submission by studentsDeactivate'),
0
);
$globalGroup[get_lang('WorkEmailAlert')] = $group;
$globalGroup[get_lang('E-mail on assignments submission by students')] = $group;
$group = [];
$group[] = $form->createElement(
'radio',
'email_alert_on_new_doc_dropbox',
get_lang('DropboxEmailAlert'),
get_lang('DropboxEmailAlertActivate'),
get_lang('E-mail users on dropbox file reception'),
get_lang('E-mail users on dropbox file receptionActivate'),
1
);
$group[] = $form->createElement(
'radio',
'email_alert_on_new_doc_dropbox',
null,
get_lang('DropboxEmailAlertDeactivate'),
get_lang('E-mail users on dropbox file receptionDeactivate'),
0
);
$globalGroup[get_lang('DropboxEmailAlert')] = $group;
$globalGroup[get_lang('E-mail users on dropbox file reception')] = $group;
// Exercises notifications
$emailAlerts = ExerciseLib::getNotificationSettings();
@ -463,13 +461,13 @@ foreach ($emailAlerts as $itemId => $label) {
);
}
$globalGroup[get_lang('Exercises')] = $group;
$globalGroup[get_lang('Tests')] = $group;
$group = [];
$group[] = $form->createElement(
'radio',
'email_to_teachers_on_new_work_feedback',
get_lang('EmailToTeachersWhenNewWorkFeedback'),
get_lang('E-mail to teachers on new user\'s student publication feedback.'),
get_lang('Yes'),
1
);
@ -481,14 +479,14 @@ $group[] = $form->createElement(
2
);
$globalGroup[get_lang('EmailToTeachersWhenNewWorkFeedback')] = $group;
$globalGroup[get_lang('E-mail to teachers on new user\'s student publication feedback.')] = $group;
$myButton = $form->addButtonSave(get_lang('SaveSettings'), 'submit_save', true);
$myButton = $form->addButtonSave(get_lang('Save settings'), 'submit_save', true);
$globalGroup[] = $myButton;
$form->addPanelOption(
'email-notifications',
get_lang('EmailNotifications'),
get_lang('E-mail notifications'),
$globalGroup,
'mail.png',
false,
@ -499,25 +497,25 @@ $group = [];
$group[] = $form->createElement(
'radio',
'allow_user_edit_agenda',
get_lang('AllowUserEditAgenda'),
get_lang('AllowUserEditAgendaActivate'),
get_lang('Allow learners to edit the agenda'),
get_lang('Allow learners to edit the agendaActivate'),
1
);
$group[] = $form->createElement('radio', 'allow_user_edit_agenda', null, get_lang('AllowUserEditAgendaDeactivate'), 0);
$group[] = $form->createElement('radio', 'allow_user_edit_agenda', null, get_lang('Allow learners to edit the agendaDeactivate'), 0);
$group2 = [];
$group2[] = $form->createElement(
'radio',
'allow_user_edit_announcement',
get_lang('AllowUserEditAnnouncement'),
get_lang('AllowUserEditAnnouncementActivate'),
get_lang('Allow learners to edit announcements'),
get_lang('Allow learners to edit announcementsActivate'),
1
);
$group2[] = $form->createElement(
'radio',
'allow_user_edit_announcement',
null,
get_lang('AllowUserEditAnnouncementDeactivate'),
get_lang('Allow learners to edit announcementsDeactivate'),
0
);
@ -525,40 +523,40 @@ $group3 = [];
$group3[] = $form->createElement(
'radio',
'allow_user_image_forum',
get_lang('AllowUserImageForum'),
get_lang('AllowUserImageForumActivate'),
get_lang('User picture in forum'),
get_lang('User picture in forumActivate'),
1
);
$group3[] = $form->createElement('radio', 'allow_user_image_forum', null, get_lang('AllowUserImageForumDeactivate'), 0);
$group3[] = $form->createElement('radio', 'allow_user_image_forum', null, get_lang('User picture in forumDeactivate'), 0);
$group4 = [];
$group4[] = $form->createElement(
'radio',
'allow_user_view_user_list',
get_lang('AllowUserViewUserList'),
get_lang('AllowUserViewUserListActivate'),
get_lang('Allow user view user list'),
get_lang('Allow user view user listActivate'),
1
);
$group4[] = $form->createElement(
'radio',
'allow_user_view_user_list',
null,
get_lang('AllowUserViewUserListDeactivate'),
get_lang('Allow user view user listDeactivate'),
0
);
$myButton = $form->addButtonSave(get_lang('SaveSettings'), 'submit_save', true);
$myButton = $form->addButtonSave(get_lang('Save settings'), 'submit_save', true);
$globalGroup = [
get_lang('AllowUserEditAgenda') => $group,
get_lang('AllowUserEditAnnouncement') => $group2,
get_lang('AllowUserImageForum') => $group3,
get_lang('AllowUserViewUserList') => $group4,
get_lang('Allow learners to edit the agenda') => $group,
get_lang('Allow learners to edit announcements') => $group2,
get_lang('User picture in forum') => $group3,
get_lang('Allow user view user list') => $group4,
'' => $myButton,
];
$form->addPanelOption(
'users',
get_lang('UserRights'),
get_lang('User rights'),
$globalGroup,
'user.png',
false,
@ -570,21 +568,21 @@ $group = [];
$group[] = $form->createElement(
'radio',
'allow_open_chat_window',
get_lang('AllowOpenchatWindow'),
get_lang('AllowOpenChatWindowActivate'),
get_lang('Open chat in a new Window'),
get_lang('Activate open the chat in a new window'),
1
);
$group[] = $form->createElement('radio', 'allow_open_chat_window', null, get_lang('AllowOpenChatWindowDeactivate'), 0);
$myButton = $form->addButtonSave(get_lang('SaveSettings'), 'submit_save', true);
$group[] = $form->createElement('radio', 'allow_open_chat_window', null, get_lang('Deactivate open the chat in a new window'), 0);
$myButton = $form->addButtonSave(get_lang('Save settings'), 'submit_save', true);
$globalGroup = [
get_lang('AllowOpenchatWindow') => $group,
get_lang('Open chat in a new Window') => $group,
'' => $myButton,
];
$form->addPanelOption(
'chat',
get_lang('ConfigChat'),
get_lang('Chat settings'),
$globalGroup,
'chat.png',
false,
@ -596,20 +594,20 @@ $group = [];
$group[] = $form->createElement(
'radio',
'enable_lp_auto_launch',
get_lang('LPAutoLaunch'),
get_lang('RedirectToALearningPath'),
get_lang('Enable learning path auto-launch'),
get_lang('Redirect to a selected learning path'),
1
);
$group[] = $form->createElement(
'radio',
'enable_lp_auto_launch',
get_lang('LPAutoLaunch'),
get_lang('RedirectToTheLearningPathList'),
get_lang('Enable learning path auto-launch'),
get_lang('Redirect to the learning paths list'),
2
);
$group[] = $form->createElement('radio', 'enable_lp_auto_launch', null, get_lang('Deactivate'), 0);
$globalGroup[get_lang('LPAutoLaunch')] = $group;
$globalGroup[get_lang('Enable learning path auto-launch')] = $group;
if (api_get_setting('allow_course_theme') == 'true') {
// Allow theme into Learning path
@ -617,19 +615,19 @@ if (api_get_setting('allow_course_theme') == 'true') {
$group[] = $form->createElement(
'radio',
'allow_learning_path_theme',
get_lang('AllowLearningPathTheme'),
get_lang('AllowLearningPathThemeAllow'),
get_lang('Enable course themes'),
get_lang('Enable course themesAllow'),
1
);
$group[] = $form->createElement(
'radio',
'allow_learning_path_theme',
null,
get_lang('AllowLearningPathThemeDisallow'),
get_lang('Enable course themesDisallow'),
0
);
$globalGroup[get_lang("AllowLearningPathTheme")] = $group;
$globalGroup[get_lang("Enable course themes")] = $group;
}
$allowLPReturnLink = api_get_setting('allow_lp_return_link');
@ -638,26 +636,26 @@ if ($allowLPReturnLink === 'true') {
$form->createElement(
'radio',
'lp_return_link',
get_lang('LpReturnLink'),
get_lang('RedirectToTheLearningPathList'),
get_lang('Learning path return link'),
get_lang('Redirect to the learning paths list'),
1
),
$form->createElement(
'radio',
'lp_return_link',
null,
get_lang('RedirectToCourseHome'),
get_lang('Redirect to Course home'),
0
),
$form->createElement(
'radio',
'lp_return_link',
null,
get_lang('MyCourses'),
get_lang('My courses'),
2
),
];
$globalGroup[get_lang("LpReturnLink")] = $group;
$globalGroup[get_lang("Learning path return link")] = $group;
}
$exerciseInvisible = api_get_setting('exercise_invisible_in_session');
@ -670,7 +668,7 @@ if ($exerciseInvisible === 'true' &&
$form->createElement(
'radio',
'exercise_invisible_in_session',
get_lang('ExerciseInvisibleInSession'),
get_lang('TestinvisibleInSession'),
get_lang('Yes'),
1
),
@ -683,11 +681,11 @@ if ($exerciseInvisible === 'true' &&
),
];
$globalGroup[get_lang("ExerciseInvisibleInSession")] = $group;
$globalGroup[get_lang("TestinvisibleInSession")] = $group;
}
if ($isEditable) {
$myButton = $form->addButtonSave(get_lang('SaveSettings'), 'submit_save', true);
$myButton = $form->addButtonSave(get_lang('Save settings'), 'submit_save', true);
$globalGroup[] = $myButton;
} else {
// Is it allowed to edit the course settings?
@ -699,7 +697,7 @@ if ($isEditable) {
$form->addPanelOption(
'config_lp',
get_lang('ConfigLearnpath'),
get_lang('Learning path settings'),
$globalGroup,
'scorms.png',
false,
@ -714,23 +712,23 @@ if (api_get_configuration_value('allow_exercise_auto_launch')) {
$group[] = $form->createElement(
'radio',
'enable_exercise_auto_launch',
get_lang('ExerciseAutoLaunch'),
get_lang('RedirectToExercise'),
get_lang('Auto-launch for exercises'),
get_lang('Redirect to the selected exercise'),
1
);
$group[] = $form->createElement(
'radio',
'enable_exercise_auto_launch',
get_lang('ExerciseAutoLaunch'),
get_lang('RedirectToTheExerciseList'),
get_lang('Auto-launch for exercises'),
get_lang('Redirect to the exercises list'),
2
);
$group[] = $form->createElement('radio', 'enable_exercise_auto_launch', null, get_lang('Deactivate'), 0);
$globalGroup[get_lang("ExerciseAutoLaunch")] = $group;
$globalGroup[get_lang("Auto-launch for exercises")] = $group;
if ($isEditable) {
$myButton = $form->addButtonSave(get_lang('SaveSettings'), 'submit_save', true);
$myButton = $form->addButtonSave(get_lang('Save settings'), 'submit_save', true);
$globalGroup[] = $myButton;
} else {
// Is it allowed to edit the course settings?
@ -742,7 +740,7 @@ if (api_get_configuration_value('allow_exercise_auto_launch')) {
$form->addPanelOption(
'config_exercise',
get_lang('Exercise'),
get_lang('Test'),
$globalGroup,
'quiz.png',
false,
@ -755,41 +753,41 @@ $group = [];
$group[] = $form->createElement(
'radio',
'display_info_advance_inside_homecourse',
get_lang('InfoAboutAdvanceInsideHomeCourse'),
get_lang('DisplayAboutLastDoneAdvance'),
get_lang('Information on thematic advance on course homepage'),
get_lang('Display information about the last completed topic'),
1
);
$group[] = $form->createElement(
'radio',
'display_info_advance_inside_homecourse',
null,
get_lang('DisplayAboutNextAdvanceNotDone'),
get_lang('Display information about the next uncompleted topic'),
2
);
$group[] = $form->createElement(
'radio',
'display_info_advance_inside_homecourse',
null,
get_lang('DisplayAboutNextAdvanceNotDoneAndLastDoneAdvance'),
get_lang('Display information about the next uncompleted topicAndLastDoneAdvance'),
3
);
$group[] = $form->createElement(
'radio',
'display_info_advance_inside_homecourse',
null,
get_lang('DoNotDisplayAnyAdvance'),
get_lang('Do not display progress'),
0
);
$myButton = $form->addButtonSave(get_lang('SaveSettings'), 'submit_save', true);
$myButton = $form->addButtonSave(get_lang('Save settings'), 'submit_save', true);
$globalGroup = [
get_lang('InfoAboutAdvanceInsideHomeCourse') => $group,
get_lang('Information on thematic advance on course homepage') => $group,
'' => $myButton,
];
$form->addPanelOption(
'thematic',
get_lang('ThematicAdvanceConfiguration'),
get_lang('Thematic advance configuration'),
$globalGroup,
'course_progress.png',
false,
@ -801,15 +799,15 @@ if (api_get_setting('allow_public_certificates') === 'true') {
$group[] = $form->createElement(
'radio',
'allow_public_certificates',
get_lang('AllowPublicCertificates'),
get_lang('Learner certificates are public'),
get_lang('Yes'),
1
);
$group[] = $form->createElement('radio', 'allow_public_certificates', null, get_lang('No'), 0);
$myButton = $form->addButtonSave(get_lang('SaveSettings'), 'submit_save', true);
$myButton = $form->addButtonSave(get_lang('Save settings'), 'submit_save', true);
$globalGroup = [
get_lang('AllowPublicCertificates') => $group,
get_lang('Learner certificates are public') => $group,
'' => $myButton,
];
@ -825,10 +823,10 @@ if (api_get_setting('allow_public_certificates') === 'true') {
// Forum settings
$group = [
$form->createElement('radio', 'enable_forum_auto_launch', null, get_lang('RedirectToForumList'), 1),
$form->createElement('radio', 'enable_forum_auto_launch', null, get_lang('Redirect to forums list'), 1),
$form->createElement('radio', 'enable_forum_auto_launch', null, get_lang('Disabled'), 2),
];
$myButton = $form->addButtonSave(get_lang('SaveSettings'), 'submit_save', true);
$myButton = $form->addButtonSave(get_lang('Save settings'), 'submit_save', true);
// Forum settings
$groupNotification = [
@ -842,9 +840,9 @@ $addUsers = [
];
$globalGroup = [
get_lang('EnableForumAutoLaunch') => $group,
get_lang('HideForumNotifications') => $groupNotification,
get_lang('SubscribeUsersToAllForumNotifications') => $addUsers,
get_lang('Enable forum auto-launch') => $group,
get_lang('Hide forum notifications') => $groupNotification,
get_lang('Subscribe automatically all users to all forum notifications') => $addUsers,
'' => $myButton,
];
@ -859,24 +857,24 @@ $form->addPanelOption(
// Student publication
$group = [
$form->createElement('radio', 'show_score', null, get_lang('NewVisible'), 0),
$form->createElement('radio', 'show_score', null, get_lang('NewUnvisible'), 1),
$form->createElement('radio', 'show_score', null, get_lang('New documents are visible for all users'), 0),
$form->createElement('radio', 'show_score', null, get_lang('New documents are only visible for the teacher(s)'), 1),
];
$group2 = [
$form->createElement('radio', 'student_delete_own_publication', null, get_lang('Yes'), 1),
$form->createElement('radio', 'student_delete_own_publication', null, get_lang('No'), 0),
];
$myButton = $form->addButtonSave(get_lang('SaveSettings'), 'submit_save', true);
$myButton = $form->addButtonSave(get_lang('Save settings'), 'submit_save', true);
$globalGroup = [
get_lang('DefaultUpload') => $group,
get_lang('StudentAllowedToDeleteOwnPublication') => $group2,
get_lang('Default setting for the visibility of newly posted files') => $group,
get_lang('Allow learners to delete their own publications') => $group2,
'' => $myButton,
];
$form->addPanelOption(
'student-publication',
get_lang('StudentPublications'),
get_lang('Assignments'),
$globalGroup,
'work.png',
false,
@ -979,7 +977,7 @@ if ($form->validate() && $isEditable) {
api_warn_hosting_contact('hosting_limit_active_courses');
Display::addFlash(
Display::return_message(get_lang('PortalActiveCoursesLimitReached'))
Display::return_message(get_lang('Sorry, this installation has an active courses limit, which has now been reached. You can still create new courses, but only if you hide/disable at least one existing active course. To do this, edit a course from the administration courses list, and change the visibility to \'hidden\', then try creating this course again. To increase the maximum number of active courses allowed on this Chamilo installation, please contact your hosting provider or, if available, upgrade to a superior hosting plan.'))
);
$url = api_get_path(WEB_CODE_PATH).'course_info/infocours.php?'.api_get_cidreq();
@ -1039,7 +1037,7 @@ if ($form->validate() && $isEditable) {
$courseParams = api_get_cidreq();
$cidReset = true;
$cidReq = $course_code;
Display::addFlash(Display::return_message(get_lang('Updated')));
Display::addFlash(Display::return_message(get_lang('Update successful')));
$url = api_get_path(WEB_CODE_PATH).'course_info/infocours.php?'.$courseParams;
header("Location: $url");
@ -1048,7 +1046,7 @@ if ($form->validate() && $isEditable) {
if ($show_delete_watermark_text_message) {
Display::addFlash(
Display::return_message(get_lang('FileDeleted'), 'normal')
Display::return_message(get_lang('File deleted'), 'normal')
);
}

@ -57,20 +57,20 @@ if ($pluginLegal && isset($userData) && !empty($userData)) {
if ($userData['web_agreement'] == 1) {
if (empty($userData['mail_agreement'])) {
$pluginMessage = Display::return_message(
$plugin->get_lang('YouNeedToConfirmYourAgreementCheckYourEmail')
$plugin->get_lang('You need to confirm your agreement to our terms first. Please check your e-mail.')
);
$hideForm = true;
}
}
}
$form->addElement('header', get_lang('CourseLegalAgreement'));
$form->addElement('header', get_lang('Legal agreement for this course'));
$form->addElement('label', null, $course_legal);
if ($pluginLegal && !empty($plugin)) {
$form->addElement('label', null, $plugin->getCurrentFile($course_info['real_id'], $session_id));
}
$form->addElement('hidden', 'course_code', $course_code);
$form->addElement('hidden', 'session_id', $session_id);
$form->addElement('checkbox', 'accept_legal', null, get_lang('AcceptLegal'));
$form->addElement('checkbox', 'accept_legal', null, get_lang('Accept legal agreement'));
$form->addButtonSave(get_lang('Accept'));
$variable = 'accept_legal_'.$user_id.'_'.$course_info['real_id'].'_'.$session_id;

@ -9,7 +9,7 @@ require_once __DIR__.'/../inc/global.inc.php';
$current_course_tool = TOOL_COURSE_MAINTENANCE;
$this_section = SECTION_COURSES;
$nameTools = get_lang('Maintenance');
$nameTools = get_lang('Backup and import and import');
api_protect_course_script(true);
api_block_anonymous_users();
@ -24,54 +24,54 @@ echo Display::page_header($nameTools);
?>
<div class="sectiontitle">
<?php Display::display_icon('save_import.gif', get_lang('Backup')); ?>&nbsp;&nbsp;
<?php echo get_lang('Backup'); ?>
<?php Display::display_icon('save_import.gif', get_lang('Backup and import and import')); ?>&nbsp;&nbsp;
<?php echo get_lang('Backup and import and import'); ?>
</div>
<div class="sectioncomment">
<ul>
<li>
<a href="../coursecopy/create_backup.php?<?php echo api_get_cidreq(); ?>">
<?php echo get_lang('CreateBackup'); ?>
<?php echo get_lang('Create a backup and import and import'); ?>
</a><br/>
<?php echo get_lang('CreateBackupInfo'); ?>
<?php echo get_lang('Create a backup and import and importInfo'); ?>
</li>
<li>
<a href="../coursecopy/import_backup.php?<?php echo api_get_cidreq(); ?>">
<?php echo get_lang('ImportBackup'); ?>
<?php echo get_lang('Import backup and import and import'); ?>
</a><br/>
<?php echo get_lang('ImportBackupInfo'); ?>
<?php echo get_lang('Import backup and import and importInfo'); ?>
</li>
<li>
<a href="../coursecopy/import_moodle.php?<?php echo api_get_cidreq(); ?>">
<?php echo get_lang('ImportFromMoodle'); ?>
<?php echo get_lang('Import from Moodle'); ?>
</a><br/>
<?php echo get_lang('ImportFromMoodleInfo'); ?>
<?php echo get_lang('Import from MoodleInfo'); ?>
</li>
</ul>
</div>
<div class="sectiontitle">
<?php Display::display_icon('copy.gif', get_lang('CopyCourse')); ?>&nbsp;&nbsp;
<?php Display::display_icon('copy.gif', get_lang('Copy course')); ?>&nbsp;&nbsp;
<a href="../coursecopy/copy_course.php?<?php echo api_get_cidreq(); ?>">
<?php echo get_lang('CopyCourse'); ?></a>
<?php echo get_lang('Copy course'); ?></a>
</div>
<div class="sectioncomment"><?php echo get_lang('DescriptionCopyCourse'); ?>
<div class="sectioncomment"><?php echo get_lang('DescriptionCopy course'); ?>
</div>
<div class="sectiontitle">
<?php Display::display_icon('tool_delete.gif', get_lang('recycle_course')); ?>&nbsp;&nbsp;
<a href="../coursecopy/recycle_course.php?<?php echo api_get_cidreq(); ?>">
<?php echo get_lang('recycle_course'); ?>
<?php Display::display_icon('tool_delete.gif', get_lang('Empty this course')); ?>&nbsp;&nbsp;
<a href="../coursecopy/Empty this course.php?<?php echo api_get_cidreq(); ?>">
<?php echo get_lang('Empty this course'); ?>
</a>
</div>
<div class="sectioncomment"><?php echo get_lang('DescriptionRecycleCourse'); ?></div>
<div class="sectioncomment"><?php echo get_lang('This tool empties the course. It removes documents, forums, links. And allows you to select what parts you want to remove or decide to remove the whole.'); ?></div>
<div class="sectiontitle">
<?php Display::display_icon('delete.gif', get_lang('DelCourse')); ?>&nbsp;&nbsp;
<a href="../course_info/delete_course.php?<?php echo api_get_cidreq(); ?>"><?php echo get_lang('DelCourse'); ?>
<?php Display::display_icon('delete.gif', get_lang('Completely delete this course')); ?>&nbsp;&nbsp;
<a href="../course_info/delete_course.php?<?php echo api_get_cidreq(); ?>"><?php echo get_lang('Completely delete this course'); ?>
</a>
</div>
<div class="sectioncomment"><?php echo get_lang('DescriptionDeleteCourse'); ?></div>
<div class="sectioncomment"><?php echo get_lang('Click on this link for a full removal of the course from the server.<br /><br />Be carefull, there\'s no way back!'); ?></div>
<?php

@ -1,7 +1,7 @@
<?php
/* For licensing terms, see /license.txt */
/**
* Maintenance for session coach.
* Backup and import and import for session coach.
*
* @author Julio Montoya <julio.montoya@beeznest.com>
* @author Angel Fernando Quiroz Campos <angel.quiroz@beeznest.com>
@ -13,7 +13,7 @@ require_once __DIR__.'/../inc/global.inc.php';
$current_course_tool = TOOL_COURSE_MAINTENANCE;
$this_section = SECTION_COURSES;
$nameTools = get_lang('Maintenance');
$nameTools = get_lang('Backup and import and import');
api_protect_course_script(true);
api_block_anonymous_users();
@ -28,19 +28,19 @@ Display::display_header($nameTools);
echo Display::page_subheader(
Display::return_icon(
'save_import.gif',
get_lang('Backup')
).'&nbsp;&nbsp;'.get_lang('Backup')
get_lang('Backup and import and import')
).'&nbsp;&nbsp;'.get_lang('Backup and import and import')
);
$url = api_get_path(WEB_CODE_PATH).'coursecopy/copy_course_session_selected.php?'.api_get_cidreq();
$link = Display::url(get_lang('CopyCourse'), $url);
$link = Display::url(get_lang('Copy course'), $url);
?>
<div class="sectioncomment">
<ul>
<li>
<?php echo $link; ?><br/>
<?php echo get_lang('DescriptionCopyCourse'); ?>
<?php echo get_lang('DescriptionCopy course'); ?>
</li>
</ul>
</div>

@ -18,7 +18,7 @@ $title = $course_info['title'];
// Preparing a confirmation message.
$link = api_get_path(WEB_COURSE_PATH).$directory.'/';
$tpl = new Template(get_lang('ThingsToDo'));
$tpl = new Template(get_lang('Suggested steps to take next'));
$tpl->assign('course_url', $link);
$tpl->assign('course_title', $title);

@ -21,7 +21,7 @@ if (!api_is_allowed_to_edit()) {
$action = isset($_GET['action']) ? $_GET['action'] : '';
$id = isset($_GET['id']) ? (int) $_GET['id'] : '';
$toolName = get_lang('CustomizeIcons');
$toolName = get_lang('Customize icons');
switch ($action) {
case 'delete_icon':
@ -31,7 +31,7 @@ switch ($action) {
}
$currentUrl = api_get_self().'?'.api_get_cidreq();
Display::addFlash(Display::return_message(get_lang('Updated')));
Display::addFlash(Display::return_message(get_lang('Update successful')));
CourseHome::deleteIcon($id);
header('Location: '.$currentUrl);
exit;
@ -45,37 +45,37 @@ switch ($action) {
$interbreadcrumb[] = [
'url' => api_get_self().'?'.api_get_cidreq(),
'name' => get_lang('CustomizeIcons'),
'name' => get_lang('Customize icons'),
];
$toolName = Security::remove_XSS(stripslashes($tool['name']));
$currentUrl = api_get_self().'?action=edit_icon&id='.$id.'&'.api_get_cidreq();
$form = new FormValidator('icon_edit', 'post', $currentUrl);
$form->addHeader(get_lang('EditIcon'));
$form->addHeader(get_lang('Edit icon'));
$form->addHtml('<div class="col-md-7">');
$form->addText('name', get_lang('Name'));
$form->addText('link', get_lang('Links'));
$allowedPictureTypes = ['jpg', 'jpeg', 'png'];
$form->addFile('icon', get_lang('CustomIcon'));
$form->addFile('icon', get_lang('Custom icon'));
$form->addRule(
'icon',
get_lang('OnlyImagesAllowed').' ('.implode(',', $allowedPictureTypes).')',
get_lang('Only PNG, JPG or GIF images allowed').' ('.implode(',', $allowedPictureTypes).')',
'filetype',
$allowedPictureTypes
);
$form->addSelect(
'target',
get_lang('LinkTarget'),
get_lang('Link\'s target'),
[
'_self' => get_lang('LinkOpenSelf'),
'_blank' => get_lang('LinkOpenBlank'),
'_self' => get_lang('Open self'),
'_blank' => get_lang('Open blank'),
]
);
$form->addSelect(
'visibility',
get_lang('Visibility'),
[1 => get_lang('Visible'), 0 => get_lang('Invisible')]
[1 => get_lang('Visible'), 0 => get_lang('invisible')]
);
$form->addTextarea(
'description',
@ -87,13 +87,13 @@ switch ($action) {
$form->addHtml('<div class="col-md-5">');
if (isset($tool['custom_icon']) && !empty($tool['custom_icon'])) {
$form->addLabel(
get_lang('CurrentIcon'),
get_lang('Current icon'),
Display::img(
CourseHome::getCustomWebIconPath().$tool['custom_icon']
)
);
$form->addCheckBox('delete_icon', null, get_lang('DeletePicture'));
$form->addCheckBox('delete_icon', null, get_lang('Delete picture'));
}
$form->addHtml('</div>');
$form->setDefaults($tool);
@ -102,7 +102,7 @@ switch ($action) {
if ($form->validate()) {
$data = $form->getSubmitValues();
CourseHome::updateTool($id, $data);
Display::addFlash(Display::return_message(get_lang('Updated')));
Display::addFlash(Display::return_message(get_lang('Update successful')));
if (isset($data['delete_icon'])) {
CourseHome::deleteIcon($id);
}
@ -147,7 +147,7 @@ switch ($action) {
$tmp['visibility'] = $tool['visibility'];
$delete = (!empty($tool['custom_icon'])) ? "<a class=\"btn btn-default\" onclick=\"javascript:
if(!confirm('".addslashes(api_htmlentities(get_lang('ConfirmYourChoice'), ENT_QUOTES, $charset)).
if(!confirm('".addslashes(api_htmlentities(get_lang('Please confirm your choice'), ENT_QUOTES, $charset)).
"')) return false;\" href=\"".api_get_self().'?action=delete_icon&id='.$tool['iid'].'&'.api_get_cidreq()."\">
<i class=\"fas fa-trash-alt\"></i></a>" : "";
$edit = '<a class="btn btn-outline-secondary btn-sm" href="'.api_get_self().'?action=edit_icon&id='.$tool['iid'].'&'.api_get_cidreq().'"><i class="fas fa-pencil-alt"></i></a>';

@ -182,64 +182,64 @@ function check_per_custom_date(obj) {
$thematicControl = Session::read('thematic_control');
if ($action == 'thematic_list') {
$interbreadcrumb[] = ['url' => '#', 'name' => get_lang('ThematicControl')];
$interbreadcrumb[] = ['url' => '#', 'name' => get_lang('Thematic control')];
}
if ($action == 'thematic_add') {
$interbreadcrumb[] = [
'url' => 'index.php?'.api_get_cidreq().'&action='.$thematicControl,
'name' => get_lang('ThematicControl'),
'name' => get_lang('Thematic control'),
];
$interbreadcrumb[] = ['url' => '#', 'name' => get_lang('NewThematicSection')];
$interbreadcrumb[] = ['url' => '#', 'name' => get_lang('New thematic section')];
}
if ($action == 'thematic_edit') {
$interbreadcrumb[] = [
'url' => 'index.php?'.api_get_cidreq().'&action='.$thematicControl,
'name' => get_lang('ThematicControl'),
'name' => get_lang('Thematic control'),
];
$interbreadcrumb[] = ['url' => '#', 'name' => get_lang('EditThematicSection')];
$interbreadcrumb[] = ['url' => '#', 'name' => get_lang('Edit thematic section')];
}
if ($action == 'thematic_details') {
$interbreadcrumb[] = ['url' => '#', 'name' => get_lang('ThematicControl')];
$interbreadcrumb[] = ['url' => '#', 'name' => get_lang('Thematic control')];
}
if ($action == 'thematic_plan_list' || $action == 'thematic_plan_delete') {
$interbreadcrumb[] = [
'url' => 'index.php?'.api_get_cidreq().'&action='.$thematicControl,
'name' => get_lang('ThematicControl'),
'name' => get_lang('Thematic control'),
];
if (!empty($thematic_data)) {
$interbreadcrumb[] = [
'url' => '#',
'name' => get_lang('ThematicPlan').' ('.$cleanThematicTitle.') ',
'name' => get_lang('Thematic plan').' ('.$cleanThematicTitle.') ',
];
}
}
if ($action == 'thematic_plan_add' || $action == 'thematic_plan_edit') {
$interbreadcrumb[] = [
'url' => 'index.php?'.api_get_cidreq().'&action='.$thematicControl,
'name' => get_lang('ThematicControl'),
'name' => get_lang('Thematic control'),
];
$interbreadcrumb[] = [
'url' => 'index.php?'.api_get_cidreq().'&action=thematic_plan_list&thematic_id='.$thematic_id,
'name' => get_lang('ThematicPlan').' ('.$cleanThematicTitle.')',
'name' => get_lang('Thematic plan').' ('.$cleanThematicTitle.')',
];
}
if ($action == 'thematic_advance_list' || $action == 'thematic_advance_delete') {
$interbreadcrumb[] = [
'url' => 'index.php?'.api_get_cidreq().'&action='.$thematicControl,
'name' => get_lang('ThematicControl'),
'name' => get_lang('Thematic control'),
];
$interbreadcrumb[] = ['url' => '#', 'name' => get_lang('ThematicAdvance').' ('.$cleanThematicTitle.')'];
$interbreadcrumb[] = ['url' => '#', 'name' => get_lang('Thematic advance').' ('.$cleanThematicTitle.')'];
}
if ($action == 'thematic_advance_add' || $action == 'thematic_advance_edit') {
$interbreadcrumb[] = [
'url' => 'index.php?'.api_get_cidreq().'&action='.$thematicControl,
'name' => get_lang('ThematicControl'),
'name' => get_lang('Thematic control'),
];
$interbreadcrumb[] = [
'url' => 'index.php?'.api_get_cidreq().'&action=thematic_advance_list&thematic_id='.$thematic_id,
'name' => get_lang('ThematicAdvance').' ('.$cleanThematicTitle.')',
'name' => get_lang('Thematic advance').' ('.$cleanThematicTitle.')',
];
$interbreadcrumb[] = ['url' => '#', 'name' => get_lang('NewThematicAdvance')];
$interbreadcrumb[] = ['url' => '#', 'name' => get_lang('NewThematic advance')];
}
if ($action == 'thematic_plan_list') {

@ -18,7 +18,7 @@ $url_token = "&sec_token=".$token;
$user_info = api_get_user_info();
$params = '&'.api_get_cidreq();
$tpl = new Template(get_lang('ThematicControl'));
$tpl = new Template(get_lang('Thematic control'));
$isTeacher = api_is_allowed_to_edit(null, true);
$tpl->assign('token', $url_token);
@ -32,7 +32,7 @@ if ($isTeacher) {
$actionLeft = '<a href="index.php?'.api_get_cidreq().'">';
$actionLeft .= Display::return_icon(
'back.png',
get_lang('BackTo').' '.get_lang('ThematicDetails'),
get_lang('Back to').' '.get_lang('Thematic view with details'),
'',
ICON_SIZE_MEDIUM
);
@ -40,19 +40,19 @@ if ($isTeacher) {
break;
case 'thematic_list':
$actionLeft = '<a href="index.php?'.api_get_cidreq().'&action=thematic_add'.$url_token.'">'.
Display::return_icon('new_course_progress.png', get_lang('NewThematicSection'), '', ICON_SIZE_MEDIUM).'</a>';
Display::return_icon('new_course_progress.png', get_lang('New thematic section'), '', ICON_SIZE_MEDIUM).'</a>';
break;
case 'thematic_details':
$actionLeft = '<a href="index.php?'.api_get_cidreq().'&action=thematic_add'.$url_token.'">'.
Display::return_icon('new_course_progress.png', get_lang('NewThematicSection'), '', ICON_SIZE_MEDIUM).'</a>';
Display::return_icon('new_course_progress.png', get_lang('New thematic section'), '', ICON_SIZE_MEDIUM).'</a>';
$actionLeft .= '<a href="index.php?'.api_get_cidreq().'&action=thematic_import_select'.$url_token.'">'.
Display::return_icon('import_csv.png', get_lang('ImportThematic'), '', ICON_SIZE_MEDIUM).'</a>';
Display::return_icon('import_csv.png', get_lang('Import course progress'), '', ICON_SIZE_MEDIUM).'</a>';
$actionLeft .= '<a href="index.php?'.api_get_cidreq().'&action=thematic_export'.$url_token.'">'.
Display::return_icon('export_csv.png', get_lang('ExportThematic'), '', ICON_SIZE_MEDIUM).'</a>';
Display::return_icon('export_csv.png', get_lang('Export course progress'), '', ICON_SIZE_MEDIUM).'</a>';
$actionLeft .= '<a href="index.php?'.api_get_cidreq().'&action=thematic_export_pdf'.$url_token.'">'.
Display::return_icon('pdf.png', get_lang('ExportToPDF'), '', ICON_SIZE_MEDIUM).'</a>';
Display::return_icon('pdf.png', get_lang('Export to PDF'), '', ICON_SIZE_MEDIUM).'</a>';
$actionLeft .= 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']).$url_token
);
break;
@ -60,7 +60,7 @@ if ($isTeacher) {
$actionLeft = '<a href="index.php?'.api_get_cidreq().'&action=thematic_add'.$url_token.'">'.
Display::return_icon(
'new_course_progress.png',
get_lang('NewThematicSection'),
get_lang('New thematic section'),
'',
ICON_SIZE_MEDIUM
).'</a>';
@ -83,11 +83,11 @@ if ($action == 'thematic_list') {
if (api_is_allowed_to_edit(null, true)) {
$table->set_header(
2,
get_lang('Actions'),
get_lang('Detail'),
false,
['style' => 'text-align:center;width:40%;']
);
$table->set_form_actions(['thematic_delete_select' => get_lang('DeleteAllThematics')]);
$table->set_form_actions(['thematic_delete_select' => get_lang('Delete all thematics')]);
}
$table->display();
} elseif ($action == 'thematic_details') {
@ -96,7 +96,7 @@ if ($action == 'thematic_list') {
) {
Display::addFlash(
Display::return_message(
get_lang('ThematicSectionHasBeenCreatedSuccessfull'),
get_lang('Thematic section has been created successfully'),
'confirmation',
false
)
@ -105,11 +105,11 @@ if ($action == 'thematic_list') {
if (isset($last_id) && $last_id) {
$link_to_thematic_plan = '<a href="index.php?'.api_get_cidreq().'&action=thematic_plan_list&thematic_id='.$last_id.'">'.
Display::return_icon('lesson_plan.png', get_lang('ThematicPlan'), ['style' => 'vertical-align:middle;float:none;'], ICON_SIZE_SMALL).'</a>';
Display::return_icon('lesson_plan.png', get_lang('Thematic plan'), ['style' => 'vertical-align:middle;float:none;'], ICON_SIZE_SMALL).'</a>';
$link_to_thematic_advance = '<a href="index.php?'.api_get_cidreq().'&action=thematic_advance_list&thematic_id='.$last_id.'">'.
Display::return_icon('lesson_plan_calendar.png', get_lang('ThematicAdvance'), ['style' => 'vertical-align:middle;float:none;'], ICON_SIZE_SMALL).'</a>';
Display::return_icon('lesson_plan_calendar.png', get_lang('Thematic advance'), ['style' => 'vertical-align:middle;float:none;'], ICON_SIZE_SMALL).'</a>';
Display::addFlash(Display::return_message(
get_lang('ThematicSectionHasBeenCreatedSuccessfull').'<br />'.sprintf(get_lang('NowYouShouldAddThematicPlanXAndThematicAdvanceX'), $link_to_thematic_plan, $link_to_thematic_advance),
get_lang('Thematic section has been created successfully').'<br />'.sprintf(get_lang('NowYouShouldAddThematic planXAndThematic advanceX'), $link_to_thematic_plan, $link_to_thematic_advance),
'confirmation',
false
));
@ -117,7 +117,7 @@ if ($action == 'thematic_list') {
if (empty($thematic_id)) {
// display information
$text = '<strong>'.get_lang('Information').': </strong>';
$text .= get_lang('ThematicDetailsDescription');
$text .= get_lang('Thematic view with detailsDescription');
$message = Display::return_message($text, 'info', false);
}
$list = [];
@ -168,7 +168,7 @@ if ($action == 'thematic_list') {
}
if (isset($thematic['max_thematic_item']) && $thematic['display_order'] < $thematic['max_thematic_item']) {
$toolbarThematic .= ' <a class="btn btn-default" href="'.api_get_self().'?action=movedown&a'.api_get_cidreq().'&thematic_id='.$my_thematic_id.$params.$url_token.'">'.
Display::return_icon('down.png', get_lang('Down'), '', ICON_SIZE_TINY).'</a>';
Display::return_icon('down.png', get_lang('down'), '', ICON_SIZE_TINY).'</a>';
} else {
$toolbarThematic .= '<div class="btn btn-default">'.
Display::return_icon('down_na.png', '&nbsp;', '', ICON_SIZE_TINY).'</div>';
@ -176,7 +176,7 @@ if ($action == 'thematic_list') {
}
if (api_get_session_id() == $thematic['session_id']) {
$toolbarThematic .= Display::url(
Display::return_icon('pdf.png', get_lang('ExportToPDF'), null, ICON_SIZE_TINY),
Display::return_icon('pdf.png', get_lang('Export to PDF'), null, ICON_SIZE_TINY),
api_get_self().'?'.api_get_cidreq()."$url_token&".http_build_query([
'action' => 'export_single_thematic',
'thematic_id' => $my_thematic_id,
@ -186,7 +186,7 @@ if ($action == 'thematic_list') {
$toolbarThematic .= Display::url(
Display::return_icon(
'export_to_documents.png',
get_lang('ExportToDocArea'),
get_lang('Export latest version of this page to Documents'),
[],
ICON_SIZE_TINY
),
@ -199,7 +199,7 @@ if ($action == 'thematic_list') {
.$my_thematic_id.$params.$url_token.'">'
.Display::return_icon('edit.png', get_lang('Edit'), '', ICON_SIZE_TINY).'</a>';
$toolbarThematic .= '<a class="btn btn-default" onclick="javascript:if(!confirm(\''
.get_lang('AreYouSureToDelete')
.get_lang('Are you sure you want to delete')
.'\')) return false;" href="index.php?'.api_get_cidreq().'&action=thematic_delete&thematic_id='
.$my_thematic_id.$params.$url_token.'">'
.Display::return_icon('delete.png', get_lang('Delete'), '', ICON_SIZE_TINY).'</a>';
@ -227,7 +227,7 @@ if ($action == 'thematic_list') {
// Display form
$form = new FormValidator('thematic_add', 'POST', 'index.php?action=thematic_add&'.api_get_cidreq());
if ($action == 'thematic_edit') {
$form->addElement('header', '', get_lang('EditThematicSection'));
$form->addElement('header', '', get_lang('Edit thematic section'));
}
$form->addElement('hidden', 'sec_token', $token);
@ -263,7 +263,7 @@ if ($action == 'thematic_list') {
if (api_get_session_id()) {
if ($thematic_data['session_id'] != api_get_session_id()) {
$show_form = false;
echo Display::return_message(get_lang('NotAllowedClickBack'), 'error', false);
echo Display::return_message(get_lang('Sorry, you are not allowed to access this page, or maybe your connection has expired. Please click your browser\'s "Back" button or follow the link below to return to the previous page.'), 'error', false);
}
}
// set default values
@ -274,7 +274,7 @@ if ($action == 'thematic_list') {
// error messages
if (isset($error)) {
echo Display::return_message(get_lang('FormHasErrorsPleaseComplete'), 'error', false);
echo Display::return_message(get_lang('The form contains incorrect or incomplete data. Please check your input.'), 'error', false);
}
if ($show_form) {
$html = $form->returnForm();
@ -286,9 +286,9 @@ if ($action == 'thematic_list') {
'POST',
'index.php?action=thematic_import&'.api_get_cidreq().$url_token
);
$form->addElement('header', get_lang('ImportThematic'));
$form->addElement('header', get_lang('Import course progress'));
$form->addElement('file', 'file');
$form->addElement('checkbox', 'replace', null, get_lang('DeleteAllThematic'));
$form->addElement('checkbox', 'replace', null, get_lang('Delete all course progress'));
$form->addButtonImport(get_lang('Import'), 'SubmitImport');
$html = $form->returnForm();
}

@ -12,14 +12,14 @@
// protect a course script
api_protect_course_script(true);
$tpl = new Template(get_lang('ThematicControl'));
$tpl = new Template(get_lang('Thematic control'));
$toolbar = null;
$formLayout = null;
if ($action === 'thematic_advance_add' || $action === 'thematic_advance_edit') {
$header_form = get_lang('NewThematicAdvance');
$header_form = get_lang('New thematic advance');
if ($action === 'thematic_advance_edit') {
$header_form = get_lang('EditThematicAdvance');
$header_form = get_lang('Edit thematic advance');
}
// display form
@ -44,7 +44,7 @@ if ($action === 'thematic_advance_add' || $action === 'thematic_advance_edit') {
'radio',
'start_date_type',
null,
get_lang('StartDateFromAnAttendance'),
get_lang('Start date taken from an attendance date'),
'1',
[
'onclick' => 'check_per_attendance(this)',
@ -55,14 +55,14 @@ if ($action === 'thematic_advance_add' || $action === 'thematic_advance_edit') {
'radio',
'start_date_type',
null,
get_lang('StartDateCustom'),
get_lang('Custom start date'),
'2',
[
'onclick' => 'check_per_custom_date(this)',
'id' => 'custom_date',
]
);
$form->addGroup($radios, null, get_lang('StartDateOptions'));
$form->addGroup($radios, null, get_lang('Start date options'));
if (isset($thematic_advance_data['attendance_id']) &&
$thematic_advance_data['attendance_id'] == 0) {
@ -71,7 +71,7 @@ if ($action === 'thematic_advance_add' || $action === 'thematic_advance_edit') {
$form->addElement('html', '<div id="div_custom_datetime" style="display:none">');
}
$form->addElement('DateTimePicker', 'custom_start_date', get_lang('StartDate'));
$form->addElement('DateTimePicker', 'custom_start_date', get_lang('Start Date'));
$form->addElement('html', '</div>');
if (isset($thematic_advance_data['attendance_id']) &&
@ -94,7 +94,7 @@ if ($action === 'thematic_advance_add' || $action === 'thematic_advance_edit') {
$form->addElement(
'label',
get_lang('Attendances'),
'<strong><em>'.get_lang('ThereAreNoAttendancesInsideCourse').'</em></strong>'
'<strong><em>'.get_lang('There is no attendance sheet in this course').'</em></strong>'
);
}
@ -103,7 +103,7 @@ if ($action === 'thematic_advance_add' || $action === 'thematic_advance_edit') {
$form->addElement(
'select',
'start_date_by_attendance',
get_lang('StartDate'),
get_lang('Start Date'),
$calendar_select,
['id' => 'start_date_select_calendar']
);
@ -113,7 +113,7 @@ if ($action === 'thematic_advance_add' || $action === 'thematic_advance_edit') {
$form->addText(
'duration_in_hours',
get_lang('DurationInHours'),
get_lang('Duration in hours'),
false,
[
'size' => '3',
@ -222,7 +222,7 @@ if ($action === 'thematic_advance_add' || $action === 'thematic_advance_edit') {
'thematic_id' => $values['thematic_id'],
]);
Display::addFlash(Display::return_message(get_lang('Updated')));
Display::addFlash(Display::return_message(get_lang('Update successful')));
header('Location: '.api_get_path(WEB_CODE_PATH).$redirectUrlParams);
exit;
@ -233,10 +233,10 @@ if ($action === 'thematic_advance_add' || $action === 'thematic_advance_edit') {
// thematic advance list
echo '<div class="actions">';
echo '<a href="'.api_get_self().'?'.api_get_cidreq().'&action=thematic_details">'.
Display::return_icon('back.png', get_lang("BackTo"), '', ICON_SIZE_MEDIUM).'</a>';
Display::return_icon('back.png', get_lang("Back to"), '', ICON_SIZE_MEDIUM).'</a>';
if (api_is_allowed_to_edit(false, true)) {
echo '<a href="'.api_get_self().'?'.api_get_cidreq().'&action=thematic_advance_add&thematic_id='.$thematic_id.'"> '.
Display::return_icon('add.png', get_lang('NewThematicAdvance'), '', ICON_SIZE_MEDIUM).'</a>';
Display::return_icon('add.png', get_lang('New thematic advance'), '', ICON_SIZE_MEDIUM).'</a>';
}
echo '</div>';
$table = new SortableTable(
@ -246,14 +246,14 @@ if ($action === 'thematic_advance_add' || $action === 'thematic_advance_edit') {
);
//$table->set_additional_parameters($parameters);
$table->set_header(0, '', false, ['style' => 'width:20px;']);
$table->set_header(1, get_lang('StartDate'), false);
$table->set_header(2, get_lang('DurationInHours'), false, ['style' => 'width:80px;']);
$table->set_header(1, get_lang('Start Date'), false);
$table->set_header(2, get_lang('Duration in hours'), false, ['style' => 'width:80px;']);
$table->set_header(3, get_lang('Content'), false);
if (api_is_allowed_to_edit(null, true)) {
$table->set_header(
4,
get_lang('Actions'),
get_lang('Detail'),
false,
['style' => 'text-align:center']
);

@ -69,7 +69,7 @@ class ThematicController
$action = 'thematic_details';
$thematic_id = null;
}
Display::addFlash(Display::return_message(get_lang('Updated')));
Display::addFlash(Display::return_message(get_lang('Update successful')));
}
} else {
$error = true;
@ -527,7 +527,7 @@ class ThematicController
// get data for attendance input select
$attendance_list = $attendance->get_attendances_list();
$attendance_select = [];
$attendance_select[0] = get_lang('SelectAnAttendance');
$attendance_select[0] = get_lang('Select an attendance');
foreach ($attendance_list as $attendance_id => $attendance_data) {
$attendance_select[$attendance_id] = $attendance_data['name'];
}

@ -10,7 +10,7 @@ use ChamiloSession as Session;
*
* @package chamilo.course_progress
*/
$tpl = new Template(get_lang('ThematicControl'));
$tpl = new Template(get_lang('Thematic control'));
$toolbar = null;
$formLayout = null;
@ -34,7 +34,7 @@ if (!empty($thematic_simple_list)) {
}
if (isset($message) && $message == 'ok') {
echo Display::return_message(get_lang('ThematicSectionHasBeenCreatedSuccessfull'), 'normal');
echo Display::return_message(get_lang('Thematic section has been created successfully'), 'normal');
}
if ($action === 'thematic_plan_list') {
@ -90,7 +90,7 @@ if ($action === 'thematic_plan_list') {
$form->addGroup([
$form->addButton(
'add_item',
get_lang('SaveAndAddNewItem'),
get_lang('Save and add new item'),
'plus',
'info',
'default',
@ -103,7 +103,7 @@ if ($action === 'thematic_plan_list') {
$formLayout = $form->returnForm();
} elseif ($action == 'thematic_plan_add' || $action == 'thematic_plan_edit') {
if ($description_type >= ADD_THEMATIC_PLAN) {
$header_form = get_lang('NewBloc');
$header_form = get_lang('Other');
} else {
$header_form = $default_thematic_plan_title[$description_type];
}
@ -156,7 +156,7 @@ if ($action === 'thematic_plan_list') {
$form->setDefaults($default);
if (isset($default_thematic_plan_question[$description_type])) {
$message = '<strong>'.get_lang('QuestionPlan').'</strong><br />';
$message = '<strong>'.get_lang('Help').'</strong><br />';
$message .= $default_thematic_plan_question[$description_type];
Display::addFlash(Display::return_message($message, 'normal', false));
}
@ -165,7 +165,7 @@ if ($action === 'thematic_plan_list') {
if ($error) {
Display::addFlash(
Display::return_message(
get_lang('FormHasErrorsPleaseComplete'),
get_lang('The form contains incorrect or incomplete data. Please check your input.'),
'error',
false
)

@ -1468,7 +1468,7 @@ class ImportCsv
$careerName = substr($careerName, 0, -2);
$subject = sprintf(
get_lang('WelcomeToPortalXInCourseSessionX'),
get_lang('Welcome to portal %s Course session: %s'),
api_get_setting('Institution'),
$courseInfo['title']
);
@ -2089,7 +2089,7 @@ class ImportCsv
if (!in_array('SessionName', $tag_names) ||
!in_array('DateStart', $tag_names) || !in_array('DateEnd', $tag_names)
) {
$error_message = get_lang('NoNeededData');
$error_message = get_lang('The specified file doesn\'t contain all needed data !');
break;
}
}
@ -2573,7 +2573,7 @@ class ImportCsv
$extraFieldInfo = $extraField->get_handler_field_info_by_field_variable($extraFieldName);
if (empty($extraFieldInfo)) {
$this->logger->addInfo("Extra field doesn't exists: $extraFieldName");
$this->logger->addInfo("Extra field doesn\'t exists: $extraFieldName");
return false;
}

@ -55,7 +55,7 @@ foreach ($urlList as $url) {
$url = api_get_path(WEB_CODE_PATH).'admin/user_list_consent.php';
$link = Display::url($url, $url);
$subject = get_lang('UserRequestWaitingForAction');
$subject = get_lang('A user is waiting for an action about his/her personal data request');
$email = api_get_configuration_value('data_protection_officer_email');
@ -67,7 +67,9 @@ foreach ($urlList as $url) {
$userInfo = api_get_user_info($userId);
if ($userInfo) {
$content = sprintf(
get_lang('TheUserXIsWaitingForAnActionGoHereX'),
get_lang('The user %s is waiting for an action about it\'s personal data request.
To manage personal data requests you can follow this link : %s'),
$userInfo['complete_name'],
$link
);

@ -29,7 +29,7 @@ class Block
global $charset;
$closeLink = '<a class="btn btn-danger btn-xs" onclick="javascript:if(!confirm(\''.addslashes(
api_htmlentities(
get_lang('ConfirmYourChoice'),
get_lang('Please confirm your choice'),
ENT_QUOTES,
$charset
)

@ -71,10 +71,10 @@ class DashboardController
$link_blocks_view = $link_list_view = null;
if ($view == 'list') {
$link_blocks_view = '<a href="'.api_get_self().'?view=blocks">'.
Display::return_icon('blocks.png', get_lang('DashboardBlocks'), '', ICON_SIZE_MEDIUM).'</a>';
Display::return_icon('blocks.png', get_lang('Dashboard blocks'), '', ICON_SIZE_MEDIUM).'</a>';
} else {
$link_list_view = '<a href="'.api_get_self().'?view=list">'.
Display::return_icon('edit.png', get_lang('EditBlocks'), '', ICON_SIZE_MEDIUM).'</a>';
Display::return_icon('edit.png', get_lang('Edit blocks'), '', ICON_SIZE_MEDIUM).'</a>';
}
$configuration_link = null;
@ -82,7 +82,7 @@ class DashboardController
$configuration_link = '<a href="'.api_get_path(WEB_CODE_PATH).'admin/settings.php?category=Plugins">'
.Display::return_icon(
'settings.png',
get_lang('ConfigureDashboardPlugin'),
get_lang('Configure Dashboard Plugin'),
'',
ICON_SIZE_MEDIUM
).'</a>';

Loading…
Cancel
Save