Update get_lang calls using full string.

pull/3016/head
Julio Montoya 6 years ago
parent e19bfc3219
commit 04d5931905
  1. 28
      main/coursecopy/copy_course.php
  2. 50
      main/coursecopy/copy_course_session.php
  3. 30
      main/coursecopy/copy_course_session_selected.php
  4. 16
      main/coursecopy/create_backup.php
  5. 54
      main/coursecopy/import_backup.php
  6. 12
      main/coursecopy/import_moodle.php
  7. 18
      main/coursecopy/recycle_course.php
  8. 52
      main/create_course/add_course.php
  9. 34
      main/document/add_link.php
  10. 18
      main/document/create_audio.php
  11. 36
      main/document/create_document.php
  12. 6
      main/document/create_draw.php
  13. 10
      main/document/create_paint.php
  14. 130
      main/document/document.php
  15. 10
      main/document/document_quota.php
  16. 2
      main/document/download.php
  17. 4
      main/document/download_scorm.php
  18. 62
      main/document/edit_document.php
  19. 10
      main/document/edit_draw.php
  20. 2
      main/document/edit_odf.php
  21. 8
      main/document/edit_paint.php
  22. 2
      main/document/exit_pixlr.php
  23. 6
      main/document/record_audio.php
  24. 6
      main/document/recycle.php
  25. 6
      main/document/save_pixlr.php
  26. 6
      main/document/showinframes.php
  27. 26
      main/document/slideshow.php
  28. 16
      main/document/slideshowoptions.php
  29. 32
      main/document/upload.php
  30. 8
      main/document/webcam_clip.php
  31. 2
      main/document/webcam_receiver.php
  32. 30
      main/inc/introductionSection.inc.php
  33. 2
      main/inc/lib/formvalidator/Element/SelectAjax.php
  34. 78
      main/inc/lib/formvalidator/FormValidator.class.php
  35. 4
      main/inc/lib/javascript/chat/video.php
  36. 6
      main/inc/lib/javascript/svgedit/extensions/imagelib/groups.php
  37. 4
      main/inc/lib/javascript/svgedit/extensions/imagelib/index.php
  38. 6
      main/inc/lib/javascript/svgedit/extensions/imagelib/users.php
  39. 6
      main/inc/lib/javascript/svgedit/extensions/savefile_config.php
  40. 2
      main/inc/lib/pear/HTML/QuickForm/advanced_settings.php
  41. 2
      main/inc/lib/pear/HTML/QuickForm/file.php
  42. 6
      main/inc/lib/svg-edit/extensions/imagelib/groups.php
  43. 4
      main/inc/lib/svg-edit/extensions/imagelib/index.php
  44. 6
      main/inc/lib/svg-edit/extensions/imagelib/users.php
  45. 8
      main/inc/lib/svg-edit/extensions/savefile_config.php
  46. 14
      main/inc/lib/webservices/Rest.php
  47. 28
      main/inc/lib/zombie/zombie_report.class.php
  48. 10
      main/lp/blank.php
  49. 2
      main/lp/content_makers.inc.php
  50. 2
      main/lp/download.php
  51. 6
      main/messages/inbox.php
  52. 54
      main/messages/new_message.php
  53. 4
      main/messages/outbox.php
  54. 2
      main/messages/record_audio.php
  55. 4
      main/messages/view_message.php
  56. 4
      main/portfolio/add_category.php
  57. 4
      main/portfolio/add_item.php
  58. 4
      main/portfolio/edit_category.php
  59. 4
      main/portfolio/edit_item.php
  60. 8
      main/portfolio/index.php
  61. 2
      main/portfolio/list.php
  62. 8
      main/ticket/assign_tickets.php
  63. 12
      main/ticket/categories.php
  64. 4
      main/ticket/categories_add_user.php
  65. 30
      main/ticket/new_ticket.php
  66. 10
      main/ticket/priorities.php
  67. 10
      main/ticket/projects.php
  68. 2
      main/ticket/settings.php
  69. 10
      main/ticket/status.php
  70. 5
      main/ticket/ticket_assign_log.php
  71. 45
      main/ticket/ticket_details.php
  72. 44
      main/ticket/tickets.php
  73. 2
      main/ticket/tutor_report.lib.php
  74. 2
      main/upload/form.document.php
  75. 18
      main/upload/form.scorm.php
  76. 26
      main/upload/upload.document.php
  77. 29
      main/upload/upload_ppt.php
  78. 28
      main/upload/upload_word.php
  79. 10
      main/webservices/cm_webservice.php
  80. 4
      main/webservices/cm_webservice_announcements.php
  81. 4
      main/webservices/cm_webservice_courses.php
  82. 16
      main/webservices/cm_webservice_forum.php
  83. 10
      main/webservices/cm_webservice_inbox.php
  84. 14
      main/webservices/cm_webservice_user.php
  85. 8
      main/webservices/registration.soap.php

@ -25,15 +25,15 @@ api_set_more_memory_and_time_limits();
// Breadcrumbs
$interbreadcrumb[] = [
'url' => api_get_path(WEB_CODE_PATH).'course_info/maintenance.php?'.api_get_cidreq(),
'name' => get_lang('Maintenance'),
'name' => get_lang('Backup'),
];
// The section (for the tabs)
$this_section = SECTION_COURSES;
// Display the header
Display::display_header(get_lang('CopyCourse'));
echo Display::page_header(get_lang('CopyCourse'));
Display::display_header(get_lang('Copy course'));
echo Display::page_header(get_lang('Copy course'));
$action = isset($_POST['action']) ? $_POST['action'] : '';
@ -55,7 +55,7 @@ if (Security::check_token('post') && (
$cr->set_file_option($_POST['same_file_name_option']);
$cr->restore($_POST['destination_course']);
echo Display::return_message(
get_lang('CopyFinished').': <a href="'.api_get_course_url($_POST['destination_course']).'">'.
get_lang('Copying is finished').': <a href="'.api_get_course_url($_POST['destination_course']).'">'.
Security::remove_XSS($_POST['destination_course']).
'</a>',
'normal',
@ -92,7 +92,7 @@ if (Security::check_token('post') && (
);
if (empty($courseList)) {
echo Display::return_message(get_lang('NoDestinationCoursesAvailable'), 'normal');
echo Display::return_message(get_lang('No destination course available'), 'normal');
} else {
$options = [];
foreach ($courseList as $courseItem) {
@ -105,38 +105,38 @@ if (Security::check_token('post') && (
'post',
api_get_path(WEB_CODE_PATH).'coursecopy/copy_course.php?'.api_get_cidreq()
);
$form->addElement('select', 'destination_course', get_lang('SelectDestinationCourse'), $options);
$form->addElement('select', 'destination_course', get_lang('Select target course'), $options);
$group = [];
$group[] = $form->createElement('radio', 'copy_option', null, get_lang('FullCopy'), 'full_copy');
$group[] = $form->createElement('radio', 'copy_option', null, get_lang('LetMeSelectItems'), 'select_items');
$form->addGroup($group, '', get_lang('SelectOptionForBackup'));
$group[] = $form->createElement('radio', 'copy_option', null, get_lang('Full copy'), 'full_copy');
$group[] = $form->createElement('radio', 'copy_option', null, get_lang('Let me select learning objects'), 'select_items');
$form->addGroup($group, '', get_lang('Please select a backup option'));
$group = [];
$group[] = $form->createElement(
'radio',
'same_file_name_option',
null,
get_lang('SameFilenameSkip'),
get_lang('Skip same file name'),
FILE_SKIP
);
$group[] = $form->createElement(
'radio',
'same_file_name_option',
null,
get_lang('SameFilenameRename'),
get_lang('Rename file (eg file.pdf becomes file_1.pdf)'),
FILE_RENAME
);
$group[] = $form->createElement(
'radio',
'same_file_name_option',
null,
get_lang('SameFilenameOverwrite'),
get_lang('Overwrite file'),
FILE_OVERWRITE
);
$form->addGroup($group, '', get_lang('SameFilename'));
$form->addGroup($group, '', get_lang('What should be done with imported files with the same file name as existing files?'));
$form->addProgress();
$form->addButtonSave(get_lang('CopyCourse'));
$form->addButtonSave(get_lang('Copy course'));
$form->setDefaults(['copy_option' => 'select_items', 'same_file_name_option' => FILE_OVERWRITE]);
// Add Security token

@ -32,10 +32,10 @@ if (!api_is_allowed_to_edit() && !api_is_session_admin()) {
$action = isset($_POST['action']) ? $_POST['action'] : '';
$this_section = SECTION_PLATFORM_ADMIN;
$nameTools = get_lang('CopyCourse');
$nameTools = get_lang('Copy course');
$interbreadcrumb[] = [
'url' => api_get_path(WEB_CODE_PATH).'admin/index.php',
'name' => get_lang('PlatformAdmin'),
'name' => get_lang('Administration'),
];
// Database Table Definitions
@ -63,9 +63,9 @@ function make_select_session_list($name, $sessions, $attr = [])
$output = '<select id="session" class="form-control" name="'.$name.'" '.$attributes.'>';
if (count($sessions) == 0) {
$output .= '<option value = "0">'.get_lang('ThereIsNotStillASession').'</option>';
$output .= '<option value = "0">'.get_lang('There are no sessions available').'</option>';
} else {
$output .= '<option value = "0">'.get_lang('SelectASession').'</option>';
$output .= '<option value = "0">'.get_lang('Select a session').'</option>';
}
if (is_array($sessions)) {
@ -95,18 +95,18 @@ function display_form()
// Link back to the documents overview
$actionsLeft = '<a href="../admin/index.php">'.
Display::return_icon('back.png', get_lang('BackTo').' '.get_lang('PlatformAdmin'), '', ICON_SIZE_MEDIUM).
Display::return_icon('back.png', get_lang('Back to').' '.get_lang('Administration'), '', ICON_SIZE_MEDIUM).
'</a>';
$html .= Display::toolbarAction('toolbar-copysession', [$actionsLeft]);
$html .= Display::return_message(get_lang('CopyCourseFromSessionToSessionExplanation'), 'warning');
$html .= Display::return_message(get_lang('Copy courseFromSessionToSessionExplanation'), 'warning');
$html .= '<form class="form-horizontal" name="formulaire" method="post" action="'.api_get_self().'" >';
$html .= '<div class="form-group">';
// origin
$html .= '<label class="col-sm-2 control-label">'.get_lang('OriginCoursesFromSession').': </label>';
$html .= '<label class="col-sm-2 control-label">'.get_lang('Courses from the original session').': </label>';
$html .= '<div class="col-sm-5">';
$html .= make_select_session_list(
'sessions_list_origin',
@ -120,26 +120,26 @@ function display_form()
//destination
$html .= '<div class="form-group">';
$html .= '<label class="col-sm-2 control-label">'.get_lang('DestinationCoursesFromSession').': </label>';
$html .= '<label class="col-sm-2 control-label">'.get_lang('Courses from the destination session').': </label>';
$html .= '<div class="col-sm-5" id="ajax_sessions_list_destination">';
$html .= '<select class="form-control" name="sessions_list_destination" onchange="javascript: xajax_search_courses(this.value,\'destination\');">';
$html .= '<option value = "0">'.get_lang('ThereIsNotStillASession').'</option></select ></div>';
$html .= '<option value = "0">'.get_lang('There are no sessions available').'</option></select ></div>';
$html .= '<div class="col-sm-5" id="ajax_list_courses_destination">';
$html .= '<select id="destination" class="form-control" name="SessionCoursesListDestination[]" ></select>';
$html .= '</div></div>';
$options = '<div class="radio"><label><input type="radio" id="copy_option_1" name="copy_option" value="full_copy" checked="checked"/>';
$options .= get_lang('FullCopy').'</label></div>';
$options .= get_lang('Full copy').'</label></div>';
$options .= '<div class="radio"><label><input type="radio" id="copy_option_2" name="copy_option" value="select_items" disabled="disabled"/>';
$options .= ' '.get_lang('LetMeSelectItems').'</label></div>';
$options .= ' '.get_lang('Let me select learning objects').'</label></div>';
$options .= '<div class="checkbox"><label><input type="checkbox" id="copy_base_content_id" name="copy_only_session_items" />'.get_lang('CopyOnlySessionItems').'</label></div>';
$options .= '<div class="checkbox"><label><input type="checkbox" id="copy_base_content_id" name="copy_only_session_items" />'.get_lang('Copy only session items').'</label></div>';
$html .= Display::panel($options, get_lang('TypeOfCopy'));
$html .= Display::panel($options, get_lang('Type of copy'));
$html .= '<div class="form-group"><div class="col-sm-12">';
$html .= '<button class="btn btn-success" type="submit" onclick="javascript:if(!confirm('."'".addslashes(api_htmlentities(get_lang('ConfirmYourChoice'), ENT_QUOTES))."'".')) return false;"><em class="fa fa-files-o"></em> '.get_lang('CopyCourse').'</button>';
$html .= '<button class="btn btn-success" type="submit" onclick="javascript:if(!confirm('."'".addslashes(api_htmlentities(get_lang('Please confirm your choice'), ENT_QUOTES))."'".')) return false;"><em class="fa fa-files-o"></em> '.get_lang('Copy course').'</button>';
// Add Security token
$html .= '<input type="hidden" value="'.Security::get_token().'" name="sec_token">';
@ -182,7 +182,7 @@ function search_courses($id_session, $type)
if (!empty($id_session)) {
$sessions = SessionManager::get_sessions_list([], ['name', 'ASC']);
$select_destination .= '<select name="sessions_list_destination" class="form-control" onchange = "javascript: xajax_search_courses(this.value,\'destination\');">';
$select_destination .= '<option value = "0">-- '.get_lang('SelectASession').' --</option>';
$select_destination .= '<option value = "0">-- '.get_lang('Select a session').' --</option>';
foreach ($sessions as $session) {
if ($id_session == $session['id']) {
continue;
@ -196,7 +196,7 @@ function search_courses($id_session, $type)
$xajax_response->addAssign('ajax_sessions_list_destination', 'innerHTML', api_utf8_encode($select_destination));
} else {
$select_destination .= '<select name="sessions_list_destination" class="form-control" onchange = "javascript: xajax_search_courses(this.value,\'destination\');">';
$select_destination .= '<option value = "0">'.get_lang('ThereIsNotStillASession').'</option>';
$select_destination .= '<option value = "0">'.get_lang('There are no sessions available').'</option>';
$select_destination .= '</select>';
$xajax_response->addAssign('ajax_sessions_list_destination', 'innerHTML', api_utf8_encode($select_destination));
}
@ -304,10 +304,10 @@ if (Security::check_token('post') && (
$cr = new CourseRestorer($course);
//$cr->set_file_option($_POST['same_file_name_option']);
$cr->restore($destination_course, $destination_session);
echo Display::return_message(get_lang('CopyFinished'), 'confirmation');
echo Display::return_message(get_lang('Copying is finished'), 'confirmation');
display_form();
} else {
echo Display::return_message(get_lang('PleaseSelectACourse'), 'confirm');
echo Display::return_message(get_lang('Please select a course'), 'confirm');
display_form();
}
} else {
@ -332,7 +332,7 @@ if (Security::check_token('post') && (
if ((is_array($arr_course_origin) && count($arr_course_origin) > 0) && !empty($destination_session)) {
//We need only one value
if (count($arr_course_origin) > 1 || count($arr_course_destination) > 1) {
echo Display::return_message(get_lang('YouMustSelectACourseFromOriginalSession'), 'error');
echo Display::return_message(get_lang('You must select a course from original session'), 'error');
} else {
//first element of the array
$course_code = $arr_course_origin[0];
@ -345,15 +345,15 @@ if (Security::check_token('post') && (
$cr = new CourseRestorer($course);
$cr->restore($course_destinatination, $destination_session);
echo Display::return_message(get_lang('CopyFinished'), 'confirm');
echo Display::return_message(get_lang('Copying is finished'), 'confirm');
display_form();
} else {
echo Display::return_message(get_lang('PleaseSelectACourse'), 'confirm');
echo Display::return_message(get_lang('Please select a course'), 'confirm');
display_form();
}
}
} else {
echo Display::return_message(get_lang('YouMustSelectACourseFromOriginalSession'), 'error');
echo Display::return_message(get_lang('You must select a course from original session'), 'error');
display_form();
}
}
@ -367,7 +367,7 @@ if (Security::check_token('post') && (
// Else, if a CourseSelectForm is requested, show it
if (api_get_setting('show_glossary_in_documents') != 'none') {
echo Display::return_message(get_lang('ToExportDocumentsWithGlossaryYouHaveToSelectGlossary'), 'normal');
echo Display::return_message(get_lang('To export a document that has glossary terms with its references to the glossary, you have to make sure you include the glossary tool in the export'), 'normal');
}
$arr_course_origin = [];
@ -389,7 +389,7 @@ if (Security::check_token('post') && (
}
if ((is_array($arr_course_origin) && count($arr_course_origin) > 0) && !empty($destination_session)) {
echo Display::return_message(get_lang('ToExportLearnpathWithQuizYouHaveToSelectQuiz'), 'normal');
echo Display::return_message(get_lang('If you want to export a course containing a test, you have to make sure the corresponding tests are included in the export, so you have to select them in the list of tests.'), 'normal');
$course_origin = api_get_course_info($arr_course_origin[0]);
$cb = new CourseBuilder('', $course_origin);
$course = $cb->build($origin_session, $arr_course_origin[0], $with_base_content);
@ -403,7 +403,7 @@ if (Security::check_token('post') && (
echo '<div style="float:right"><a href="javascript:window.history.go(-1);">'.
Display::return_icon(
'back.png',
get_lang('Back').' '.get_lang('To').' '.get_lang('PlatformAdmin'),
get_lang('Back').' '.get_lang('To').' '.get_lang('Administration'),
['style' => 'vertical-align:middle']
).
get_lang('Back').'</a></div>';

@ -45,11 +45,11 @@ if (empty($courseCode) || empty($sessionId)) {
}
$this_section = SECTION_COURSES;
$nameTools = get_lang('CopyCourse');
$nameTools = get_lang('Copy course');
$returnLink = api_get_path(WEB_CODE_PATH).'course_info/maintenance_coach.php?'.api_get_cidreq();
$interbreadcrumb[] = [
'url' => $returnLink,
'name' => get_lang('Maintenance'),
'name' => get_lang('Backup'),
];
// Database Table Definitions
@ -118,14 +118,14 @@ function displayForm()
// Link back to the documents overview
$html .= '<a href="'.$returnLink.'">'.Display::return_icon(
'back.png',
get_lang('BackTo').' '.get_lang('Maintenance'),
get_lang('Back to').' '.get_lang('Backup'),
'',
ICON_SIZE_MEDIUM
).'</a>';
$html .= '</div>';
$html .= Display::return_message(
get_lang('CopyCourseFromSessionToSessionExplanation')
get_lang('Copy courseFromSessionToSessionExplanation')
);
$html .= '<form name="formulaire" method="post" action="'.api_get_self().'?'.api_get_cidreq().'" >';
@ -176,17 +176,17 @@ function displayForm()
$html .= '</tr></table>';
$html .= "<fieldset>";
$html .= '<legend>'.get_lang('TypeOfCopy').' <small>('.get_lang('CopyOnlySessionItems').')</small></legend>';
$html .= '<legend>'.get_lang('Type of copy').' <small>('.get_lang('Copy only session items').')</small></legend>';
$html .= '<label class="radio"><input type="radio" id="copy_option_1" name="copy_option" value="full_copy" checked="checked"/>';
$html .= get_lang('FullCopy').'</label>';
$html .= get_lang('Full copy').'</label>';
$html .= '<label class="radio"><input type="radio" id="copy_option_2" name="copy_option" value="select_items"/>';
$html .= ' '.get_lang('LetMeSelectItems').'</label><br/>';
$html .= ' '.get_lang('Let me select learning objects').'</label><br/>';
$html .= "</fieldset>";
$html .= '<button class="save" type="submit" onclick="javascript:if(!confirm('."'".addslashes(
api_htmlentities(get_lang('ConfirmYourChoice'), ENT_QUOTES)
)."'".')) return false;">'.get_lang('CopyCourse').'</button>';
api_htmlentities(get_lang('Please confirm your choice'), ENT_QUOTES)
)."'".')) return false;">'.get_lang('Copy course').'</button>';
$html .= '</form>';
echo $html;
}
@ -298,7 +298,7 @@ if (($action === 'course_select_form') ||
$cr = new CourseRestorer($course);
$cr->restore($destinationCourse, $destinationSession);
echo Display::return_message(get_lang('CopyFinished'), 'confirmation');
echo Display::return_message(get_lang('Copying is finished'), 'confirmation');
displayForm();
} else {
@ -325,7 +325,7 @@ if (($action === 'course_select_form') ||
//We need only one value
if (count($arrCourseOrigin) > 1 || count($arrCourseDestination) > 1) {
echo Display::return_message(
get_lang('YouMustSelectACourseFromOriginalSession'),
get_lang('You must select a course from original session'),
'error'
);
} else {
@ -338,13 +338,13 @@ if (($action === 'course_select_form') ||
);
$cr = new CourseRestorer($course);
$cr->restore($courseDestination, $destinationSession);
echo Display::return_message(get_lang('CopyFinished'), 'confirmation');
echo Display::return_message(get_lang('Copying is finished'), 'confirmation');
}
displayForm();
} else {
echo Display::return_message(
get_lang('YouMustSelectACourseFromOriginalSession'),
get_lang('You must select a course from original session'),
'error'
);
displayForm();
@ -354,7 +354,7 @@ if (($action === 'course_select_form') ||
// Else, if a CourseSelectForm is requested, show it
if (api_get_setting('show_glossary_in_documents') != 'none') {
echo Display::return_message(
get_lang('ToExportDocumentsWithGlossaryYouHaveToSelectGlossary'),
get_lang('To export a document that has glossary terms with its references to the glossary, you have to make sure you include the glossary tool in the export'),
'normal'
);
}
@ -371,7 +371,7 @@ if (($action === 'course_select_form') ||
if (!empty($destinationSession)) {
echo Display::return_message(
get_lang('ToExportLearnpathWithQuizYouHaveToSelectQuiz'),
get_lang('If you want to export a course containing a test, you have to make sure the corresponding tests are included in the export, so you have to select them in the list of tests.'),
'normal'
);

@ -31,11 +31,11 @@ $this_section = SECTION_COURSES;
// Breadcrumbs
$interbreadcrumb[] = [
'url' => api_get_path(WEB_CODE_PATH).'course_info/maintenance.php',
'name' => get_lang('Maintenance'),
'name' => get_lang('Backup'),
];
// Displaying the header
$nameTools = get_lang('CreateBackup');
$nameTools = get_lang('Create a backup');
Display::display_header($nameTools);
// Display the tool title
@ -58,7 +58,7 @@ if (Security::check_token('post') &&
$course = $cb->build();
}
$zipFile = CourseArchiver::createBackup($course);
echo Display::return_message(get_lang('BackupCreated'), 'confirm');
echo Display::return_message(get_lang('The backup has been created. The download of this file will start in a few moments. If your download does not start, click the following link'), 'confirm');
echo '<br />';
echo Display::url(
get_lang('Download'),
@ -75,7 +75,7 @@ if (Security::check_token('post') &&
$hiddenFields['sec_token'] = Security::get_token();
CourseSelectForm::display_form($course, $hiddenFields, false, true);
} else {
echo Display::return_message(get_lang('NoResourcesToBackup'), 'warning');
echo Display::return_message(get_lang('There are no resources to backup'), 'warning');
}
} else {
$form = new FormValidator(
@ -83,10 +83,10 @@ if (Security::check_token('post') &&
'post',
api_get_self().'?'.api_get_cidreq()
);
$form->addElement('header', get_lang('SelectOptionForBackup'));
$form->addElement('radio', 'backup_option', '', get_lang('CreateFullBackup'), 'full_backup');
$form->addElement('radio', 'backup_option', '', get_lang('LetMeSelectItems'), 'select_items');
$form->addButtonSave(get_lang('CreateBackup'));
$form->addElement('header', get_lang('Please select a backup option'));
$form->addElement('radio', 'backup_option', '', get_lang('Create a complete backup of this course'), 'full_backup');
$form->addElement('radio', 'backup_option', '', get_lang('Let me select learning objects'), 'select_items');
$form->addButtonSave(get_lang('Create a backup'));
$form->addProgress();
// When progress bar appears we have to hide the title "Please select a backup-option".
$form->updateAttributes(

@ -32,11 +32,11 @@ $this_section = SECTION_COURSES;
// Breadcrumbs
$interbreadcrumb[] = [
'url' => '../course_info/maintenance.php',
'name' => get_lang('Maintenance'),
'name' => get_lang('Backup'),
];
// Displaying the header
$nameTools = get_lang('ImportBackup');
$nameTools = get_lang('Import backup');
Display::display_header($nameTools);
// Display the tool title
@ -85,23 +85,23 @@ if (Security::check_token('post') && ($action === 'course_select_form' || $impor
$cr = new CourseRestorer($course);
$cr->set_file_option($_POST['same_file_name_option']);
$cr->restore();
echo Display::return_message(get_lang('ImportFinished'));
echo Display::return_message(get_lang('Import finished'));
echo '<a class="btn btn-default" href="'.api_get_path(WEB_COURSE_PATH).api_get_course_path().'/index.php">'.
get_lang('CourseHomepage').'</a>';
get_lang('Course home').'</a>';
} else {
if (!$error) {
echo Display::return_message(get_lang('NoResourcesInBackupFile'), 'warning');
echo '<a class="btn btn-default" href="import_backup.php?'.api_get_cidreq().'">'.get_lang('TryAgain').'</a>';
echo Display::return_message(get_lang('There are no resources in backup file'), 'warning');
echo '<a class="btn btn-default" href="import_backup.php?'.api_get_cidreq().'">'.get_lang('Try again').'</a>';
} elseif ($filename === false) {
echo Display::return_message(get_lang('ArchivesDirectoryNotWriteableContactAdmin'), 'error');
echo '<a class="btn btn-default" href="import_backup.php?'.api_get_cidreq().'">'.get_lang('TryAgain').'</a>';
echo Display::return_message(get_lang('The app/cache/ directory, used by this tool, is not writeable. Please contact your platform administrator.'), 'error');
echo '<a class="btn btn-default" href="import_backup.php?'.api_get_cidreq().'">'.get_lang('Try again').'</a>';
} else {
if ($filename == '') {
echo Display::return_message(get_lang('SelectBackupFile'), 'error');
echo '<a class="btn btn-default" href="import_backup.php?'.api_get_cidreq().'">'.get_lang('TryAgain').'</a>';
echo Display::return_message(get_lang('Select a backup file'), 'error');
echo '<a class="btn btn-default" href="import_backup.php?'.api_get_cidreq().'">'.get_lang('Try again').'</a>';
} else {
echo Display::return_message(get_lang('UploadError'), 'error');
echo '<a class="btn btn-default" href="import_backup.php?'.api_get_cidreq().'">'.get_lang('TryAgain').'</a>';
echo Display::return_message(get_lang('Upload failed, please check maximum file size limits and folder rights.'), 'error');
echo '<a class="btn btn-default" href="import_backup.php?'.api_get_cidreq().'">'.get_lang('Try again').'</a>';
}
}
}
@ -126,11 +126,11 @@ if (Security::check_token('post') && ($action === 'course_select_form' || $impor
$hiddenFields['sec_token'] = Security::get_token();
CourseSelectForm::display_form($course, $hiddenFields);
} elseif ($filename === false) {
echo Display::return_message(get_lang('ArchivesDirectoryNotWriteableContactAdmin'), 'error');
echo '<a class="btn btn-default" href="import_backup.php?'.api_get_cidreq().'">'.get_lang('TryAgain').'</a>';
echo Display::return_message(get_lang('The app/cache/ directory, used by this tool, is not writeable. Please contact your platform administrator.'), 'error');
echo '<a class="btn btn-default" href="import_backup.php?'.api_get_cidreq().'">'.get_lang('Try again').'</a>';
} else {
echo Display::return_message(get_lang('NoResourcesInBackupFile'), 'warning');
echo '<a class="btn btn-default" href="import_backup.php?'.api_get_cidreq().'">'.get_lang('TryAgain').'</a>';
echo Display::return_message(get_lang('There are no resources in backup file'), 'warning');
echo '<a class="btn btn-default" href="import_backup.php?'.api_get_cidreq().'">'.get_lang('Try again').'</a>';
}
} else {
$user = api_get_user_info();
@ -144,7 +144,7 @@ if (Security::check_token('post') && ($action === 'course_select_form' || $impor
'',
['enctype' => 'multipart/form-data']
);
$form->addElement('header', get_lang('SelectBackupFile'));
$form->addElement('header', get_lang('Select a backup file'));
$renderer = $form->defaultRenderer();
$renderer->setCustomElementTemplate('<div>{element}</div> ');
@ -154,7 +154,7 @@ if (Security::check_token('post') && ($action === 'course_select_form' || $impor
'radio',
'backup_type',
'',
get_lang('LocalFile'),
get_lang('local file'),
'local',
'id="bt_local" class="checkbox" onclick="javascript: document.import_backup_form.backup_server.disabled=true;document.import_backup_form.backup.disabled=false;"'
);
@ -166,7 +166,7 @@ if (Security::check_token('post') && ($action === 'course_select_form' || $impor
'radio',
'backup_type',
'',
get_lang('ServerFile'),
get_lang('server file'),
'server',
'id="bt_server" class="checkbox" onclick="javascript: document.import_backup_form.backup_server.disabled=false;document.import_backup_form.backup.disabled=true;"'
);
@ -190,7 +190,7 @@ if (Security::check_token('post') && ($action === 'course_select_form' || $impor
'radio',
'',
'',
'<i>'.get_lang('NoBackupsAvailable').'</i>',
'<i>'.get_lang('No backup is available').'</i>',
'',
'disabled="true"'
);
@ -202,7 +202,7 @@ if (Security::check_token('post') && ($action === 'course_select_form' || $impor
'radio',
'import_option',
'',
get_lang('ImportFullBackup'),
get_lang('Import full backup'),
'full_backup',
'id="import_option_1" class="checkbox"'
);
@ -210,20 +210,20 @@ if (Security::check_token('post') && ($action === 'course_select_form' || $impor
'radio',
'import_option',
'',
get_lang('LetMeSelectItems'),
get_lang('Let me select learning objects'),
'select_items',
'id="import_option_2" class="checkbox"'
);
$form->addElement('html', '<br /><br />');
$form->addElement('html', get_lang('SameFilename'));
$form->addElement('html', get_lang('What should be done with imported files with the same file name as existing files?'));
$form->addElement('html', '<br /><br />');
$form->addElement(
'radio',
'same_file_name_option',
'',
get_lang('SameFilenameSkip'),
get_lang('What should be done with imported files with the same file name as existing files?Skip'),
FILE_SKIP,
'id="same_file_name_option_1" class="checkbox"'
);
@ -231,7 +231,7 @@ if (Security::check_token('post') && ($action === 'course_select_form' || $impor
'radio',
'same_file_name_option',
'',
get_lang('SameFilenameRename'),
get_lang('What should be done with imported files with the same file name as existing files?Rename'),
FILE_RENAME,
'id="same_file_name_option_2" class="checkbox"'
);
@ -239,13 +239,13 @@ if (Security::check_token('post') && ($action === 'course_select_form' || $impor
'radio',
'same_file_name_option',
'',
get_lang('SameFilenameOverwrite'),
get_lang('What should be done with imported files with the same file name as existing files?Overwrite'),
FILE_OVERWRITE,
'id="same_file_name_option_3" class="checkbox"'
);
$form->addElement('html', '<br />');
$form->addButtonImport(get_lang('ImportBackup'));
$form->addButtonImport(get_lang('Import backup'));
$values['backup_type'] = 'local';
$values['import_option'] = 'full_backup';
$values['same_file_name_option'] = FILE_OVERWRITE;

@ -26,11 +26,11 @@ $this_section = SECTION_COURSES;
// Breadcrumbs
$interbreadcrumb[] = [
'url' => api_get_path(WEB_CODE_PATH).'course_info/maintenance.php?'.api_get_cidreq(),
'name' => get_lang('Maintenance'),
'name' => get_lang('Backup'),
];
$form = new FormValidator('import_moodle', 'post', api_get_self().'?'.api_get_cidreq());
$form->addFile('moodle_file', get_lang('MoodleFile'));
$form->addFile('moodle_file', get_lang('Moodle course file'));
$form->addButtonImport(get_lang('Import'));
if ($form->validate()) {
@ -43,7 +43,7 @@ if ($form->validate()) {
Display::addFlash(
Display::return_message(
get_lang('MoodleFileImportedSuccessfully'),
get_lang('Moodle course fileImportedSuccessfully'),
'success'
)
);
@ -54,14 +54,14 @@ if ($form->validate()) {
}
}
$template = new Template(get_lang('ImportFromMoodle'));
$infoMsg = Display::return_message(get_lang('ImportFromMoodleInstructions'), 'normal', false);
$template = new Template(get_lang('Import from Moodle'));
$infoMsg = Display::return_message(get_lang('Import from MoodleInstructions'), 'normal', false);
$template->assign('info_msg', $infoMsg);
$template->assign('form', $form->returnForm());
$templateName = $template->get_template('coursecopy/import_moodle.tpl');
$content = $template->fetch($templateName);
$template->assign('header', get_lang('ImportFromMoodle'));
$template->assign('header', get_lang('Import from Moodle'));
$template->assign('content', $content);
$template->display_one_col_template();

@ -27,11 +27,11 @@ $this_section = SECTION_COURSES;
// Breadcrumbs
$interbreadcrumb[] = [
'url' => api_get_path(WEB_CODE_PATH).'course_info/maintenance.php',
'name' => get_lang('Maintenance'),
'name' => get_lang('Backup'),
];
// Displaying the header
$nameTools = get_lang('RecycleCourse');
$nameTools = get_lang('Empty this course');
Display::display_header($nameTools);
// Display the tool title
@ -62,7 +62,7 @@ if (Security::check_token('post') && (
}
$cr = new CourseRecycler($course);
$cr->recycle($recycle_type);
echo Display::return_message(get_lang('RecycleFinished'), 'confirm');
echo Display::return_message(get_lang('Recycle is finished'), 'confirm');
} elseif (Security::check_token('post') && (
isset($_POST['recycle_option']) &&
$_POST['recycle_option'] === 'select_items'
@ -80,14 +80,14 @@ if (Security::check_token('post') && (
$cb = new CourseBuilder();
$course = $cb->build();
if (!$course->has_resources()) {
echo get_lang('NoResourcesToRecycle');
echo get_lang('No resource to recycle');
} else {
echo Display::return_message(get_lang('RecycleWarning'), 'warning', false);
echo Display::return_message(get_lang('Warning: using this tool, you will delete learning objects in your course. There is no UNDO possible. We advise you to create a <a href="create_backup.php">backup</a> before.'), 'warning', false);
$form = new FormValidator('recycle_course', 'post', api_get_self().'?'.api_get_cidreq());
$form->addElement('header', get_lang('SelectOptionForBackup'));
$form->addElement('radio', 'recycle_option', null, get_lang('FullRecycle'), 'full_backup');
$form->addElement('radio', 'recycle_option', null, get_lang('LetMeSelectItems'), 'select_items');
$form->addButtonSave(get_lang('RecycleCourse'));
$form->addElement('header', get_lang('Please select a backup option'));
$form->addElement('radio', 'recycle_option', null, get_lang('Delete everything'), 'full_backup');
$form->addElement('radio', 'recycle_option', null, get_lang('Let me select learning objects'), 'select_items');
$form->addButtonSave(get_lang('Empty this course'));
$form->setDefaults(['recycle_option' => 'select_items']);
// Add Security token
$token = Security::get_token();

@ -59,11 +59,11 @@ $htmlHeadXtra[] = '<script>
$interbreadcrumb[] = [
'url' => api_get_path(WEB_PATH).'user_portal.php',
'name' => get_lang('MyCourses'),
'name' => get_lang('My courses'),
];
// Displaying the header.
$tool_name = $course_validation_feature ? get_lang('CreateCourseRequest') : get_lang('CreateSite');
$tool_name = $course_validation_feature ? get_lang('Create a course request') : get_lang('Add a new course');
$tpl = new Template($tool_name);
@ -93,7 +93,7 @@ $form->addElement(
$form->addFile(
'picture',
[
get_lang('AddPicture'),
get_lang('Add a picture'),
],
[
'id' => 'picture',
@ -106,7 +106,7 @@ $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
);
@ -122,7 +122,7 @@ if ($countCategories >= 100) {
$form->addElement(
'select_ajax',
'category_code',
get_lang('CourseFaculty'),
get_lang('Category'),
null,
['url' => $url]
);
@ -131,7 +131,7 @@ if ($countCategories >= 100) {
$accessUrlId,
api_get_configuration_value('allow_base_course_category')
);
$categoriesOptions = [null => get_lang('None')];
$categoriesOptions = [null => get_lang('none')];
/** @var CourseCategory $category */
foreach ($categories as $category) {
@ -140,7 +140,7 @@ if ($countCategories >= 100) {
$form->addSelect(
'category_code',
get_lang('CourseFaculty'),
get_lang('Category'),
$categoriesOptions
);
}
@ -149,20 +149,20 @@ if ($countCategories >= 100) {
$form->addText(
'wanted_code',
[
get_lang('Code'),
get_lang('OnlyLettersAndNumbers'),
get_lang('Course code'),
get_lang('Only letters (a-z) and numbers (0-9)'),
],
'',
[
'maxlength' => CourseManager::MAX_COURSE_LENGTH_CODE,
'pattern' => '[a-zA-Z0-9]+',
'title' => get_lang('OnlyLettersAndNumbers'),
'title' => get_lang('Only letters (a-z) and numbers (0-9)'),
]
);
$form->applyFilter('wanted_code', 'html_filter');
$form->addRule(
'wanted_code',
get_lang('Max'),
get_lang('max. 20 characters, e.g. <i>INNOV21</i>'),
'maxlength',
CourseManager::MAX_COURSE_LENGTH_CODE
);
@ -190,7 +190,7 @@ if ($course_validation_feature) {
$form->addElement(
'textarea',
'target_audience',
get_lang('TargetAudience'),
get_lang('Target audience'),
['rows' => '3']
);
}
@ -203,7 +203,7 @@ if (count($languages) === 1) {
} else {
$form->addSelectLanguage(
'course_language',
get_lang('Ln'),
get_lang('Language'),
[],
['style' => 'width:150px']
);
@ -214,7 +214,7 @@ $form->addElement(
'checkbox',
'exemplary_content',
null,
get_lang('FillWithExemplaryContent')
get_lang('Fill with demo content')
);
if ($course_validation_feature) {
@ -239,13 +239,13 @@ if ($course_validation_feature) {
'checkbox',
'legal',
null,
get_lang('IAcceptTermsAndConditions'),
get_lang('I have read and I accept the Terms and Conditions'),
1
);
$form->addRule(
'legal',
get_lang('YouHaveToAcceptTermsAndConditions'),
get_lang('You have to accept our Terms and Conditions to proceed.'),
'required'
);
// Link to terms and conditions.
@ -257,7 +257,7 @@ if ($course_validation_feature) {
</script>
';
$link_terms_and_conditions .= Display::url(
get_lang('ReadTermsAndConditions'),
get_lang('Read the Terms and Conditions'),
'#',
['onclick' => "javascript:MM_openBrWindow('$terms_and_conditions_url', 'Conditions', 'scrollbars=yes, width=800');"]
);
@ -273,8 +273,8 @@ if (api_get_setting('teacher_can_select_course_template') === 'true') {
'select_ajax',
'course_template',
[
get_lang('CourseTemplate'),
get_lang('PickACourseAsATemplateForThisNewCourse'),
get_lang('Course template'),
get_lang('Pick a course as template for this new course'),
],
null,
['url' => api_get_path(WEB_AJAX_PATH).'course.ajax.php?a=search_course']
@ -284,7 +284,7 @@ if (api_get_setting('teacher_can_select_course_template') === 'true') {
$form->addElement('html', '</div>');
// Submit button.
$form->addButtonCreate($course_validation_feature ? get_lang('CreateThisCourseRequest') : get_lang('CreateCourseArea'));
$form->addButtonCreate($course_validation_feature ? get_lang('Create this course request') : get_lang('Create this course'));
// The progress bar of this form.
$form->addProgress();
@ -388,7 +388,7 @@ if ($form->validate()) {
}
} else {
$message = Display::return_message(
get_lang('CourseCreationFailed'),
get_lang('The course has not been created due to an internal error.'),
'error',
false
);
@ -411,7 +411,7 @@ if ($form->validate()) {
if ($request_id) {
$course_request_info = CourseRequestManager::get_course_request_info($request_id);
$message = (is_array($course_request_info) ? '<strong>'.$course_request_info['code'].'</strong> : ' : '').get_lang('CourseRequestCreated');
$message = (is_array($course_request_info) ? '<strong>'.$course_request_info['code'].'</strong> : ' : '').get_lang('Your request for a new course has been sent successfully. You may receive a reply soon, within one or two days.');
$message = Display::return_message(
$message,
'confirmation',
@ -420,7 +420,7 @@ if ($form->validate()) {
$message .= Display::tag(
'div',
Display::url(
get_lang('Enter'),
get_lang('Back to courses list'),
api_get_path(WEB_PATH).'user_portal.php',
['class' => 'btn btn-primary']
),
@ -428,7 +428,7 @@ if ($form->validate()) {
);
} else {
$message = Display::return_message(
get_lang('CourseRequestCreationFailed'),
get_lang('The course request has not been created due to an internal error.'),
'error',
false
);
@ -438,7 +438,7 @@ if ($form->validate()) {
}
} else {
$message = Display::return_message(
get_lang('CourseCodeAlreadyExists'),
get_lang('CourseCourse codeAlreadyExists'),
'error',
false
);
@ -447,7 +447,7 @@ if ($form->validate()) {
}
} else {
if (!$course_validation_feature) {
$message = Display::return_message(get_lang('Explanation'));
$message = Display::return_message(get_lang('Once you click on "Create a course", a course is created with a section for Tests, Project based learning, Assessments, Courses, Dropbox, Agenda and much more. Logging in as teacher provides you with editing privileges for this course.'));
}
// Display the form.
$formContent = $form->returnForm();

@ -53,7 +53,7 @@ if (api_get_group_id()) {
$groupIid = $group_properties['iid'];
$interbreadcrumb[] = [
'url' => '../group/group_space.php?'.api_get_cidreq(),
'name' => get_lang('GroupSpace'),
'name' => get_lang('Group area'),
];
} else {
api_not_allowed(true);
@ -95,7 +95,7 @@ if (empty($document_data['parents'])) {
$this_section = SECTION_COURSES;
$nameTools = get_lang('LinkAdd');
$nameTools = get_lang('Add a link');
$action = api_get_self().'?'.api_get_cidreq().'&id='.$document_id;
// URLs in whitelist
@ -109,8 +109,8 @@ $urlWLHTML = "<ul><li>".implode("</li><li>", $urlWL)."</li></ul>";
$form = new FormValidator('upload', 'POST', $action, '', ['enctype' => 'multipart/form-data']);
$form->addHidden('linkid', $document_id);
$form->addHidden('curdirpath', $path);
$form->addElement('text', 'name', get_lang('LinkName'), ['id' => 'name_link']);
$form->addElement('text', 'url', get_lang('Url'), ['id' => 'url_link']);
$form->addElement('text', 'name', get_lang('Link name'), ['id' => 'name_link']);
$form->addElement('text', 'url', get_lang('URL'), ['id' => 'url_link']);
$form->addElement(
'static',
'info',
@ -119,29 +119,29 @@ $form->addElement(
'ValidDomainList'
).' <span class="glyphicon glyphicon-question-sign"></span></span>'
);
$form->addButtonSend(get_lang('AddCloudLink'), 'submitDocument');
$form->addButtonSend(get_lang('Add link to Cloud file'), 'submitDocument');
$form->addRule('name', get_lang('PleaseEnterCloudLinkName'), 'required', null, 'client');
$form->addRule('name', get_lang('PleaseEnterCloudLinkName'), 'required', null, 'server');
$form->addRule('url', get_lang('PleaseEnterURL'), 'required', null, 'client');
$form->addRule('url', get_lang('PleaseEnterURL'), 'required', null, 'server');
$form->addRule('name', get_lang('PleaseEnterCloudLink name'), 'required', null, 'client');
$form->addRule('name', get_lang('PleaseEnterCloudLink name'), 'required', null, 'server');
$form->addRule('url', get_lang('Please enter the URL'), 'required', null, 'client');
$form->addRule('url', get_lang('Please enter the URL'), 'required', null, 'server');
// Well formed url pattern (must have the protocol)
$urlRegEx = DocumentManager::getWellFormedUrlRegex();
$form->addRule('url', get_lang('NotValidURL'), 'regex', $urlRegEx, 'client');
$form->addRule('url', get_lang('NotValidURL'), 'regex', $urlRegEx, 'server');
$form->addRule('url', get_lang('NotValidDomain').$urlWLText, 'regex', $urlWLRegEx, 'client');
$form->addRule('url', get_lang('NotValidDomain').$urlWLHTML, 'regex', $urlWLRegEx, 'server');
$form->addRule('url', get_lang('URL field format invalid. Example of expected format: http://dropbox.com/sh/loremipsum/loremipsum?dl=0'), 'regex', $urlRegEx, 'client');
$form->addRule('url', get_lang('URL field format invalid. Example of expected format: http://dropbox.com/sh/loremipsum/loremipsum?dl=0'), 'regex', $urlRegEx, 'server');
$form->addRule('url', get_lang('The domain is not valid. It must be one of the following:').$urlWLText, 'regex', $urlWLRegEx, 'client');
$form->addRule('url', get_lang('The domain is not valid. It must be one of the following:').$urlWLHTML, 'regex', $urlWLRegEx, 'server');
if ($form->validate()) {
if (isset($_REQUEST['linkid'])) {
$doc_id = DocumentManager::addCloudLink($courseInfo, $path, $_REQUEST['url'], $_REQUEST['name']);
if ($doc_id) {
Display::addFlash(Display::return_message(get_lang('CloudLinkAdded'), 'success', false));
Display::addFlash(Display::return_message(get_lang('CloudAdd a linked'), 'success', false));
} else {
if (DocumentManager::cloudLinkExists($courseInfo, $path, $_REQUEST['url'])) {
Display::addFlash(Display::return_message(get_lang('UrlAlreadyExists'), 'warning', false));
Display::addFlash(Display::return_message(get_lang('URLAlreadyExists'), 'warning', false));
} else {
Display::addFlash(Display::return_message(get_lang('ErrorAddCloudLink'), 'warning', false));
Display::addFlash(Display::return_message(get_lang('ErrorAdd link to Cloud file'), 'warning', false));
}
}
header('Location: document.php?'.api_get_cidreq());
@ -156,7 +156,7 @@ Display::display_header($nameTools, 'Doc');
echo '<div class="actions">';
// Link back to the documents overview
echo '<a href="document.php?id='.$document_id.'&'.api_get_cidreq().'">'.
Display::return_icon('back.png', get_lang('BackTo').' '.get_lang('DocumentsOverview'), '', ICON_SIZE_MEDIUM).
Display::return_icon('back.png', get_lang('Back to').' '.get_lang('Documents overview'), '', ICON_SIZE_MEDIUM).
'</a>';
echo '</div>';

@ -16,7 +16,7 @@ use ChamiloSession as Session;
require_once __DIR__.'/../inc/global.inc.php';
$this_section = SECTION_COURSES;
$nameTools = get_lang('CreateAudio');
$nameTools = get_lang('Create audio');
api_protect_course_script();
api_block_anonymous_users();
@ -87,7 +87,7 @@ if (!is_dir($filepath)) {
if (!empty($groupId)) {
$interbreadcrumb[] = [
"url" => "../group/group_space.php?".api_get_cidreq(),
"name" => get_lang('GroupSpace'),
"name" => get_lang('Group area'),
];
$group = GroupManager:: get_group_properties($groupId);
$path = explode('/', $dir);
@ -150,14 +150,14 @@ echo '<div class="actions">';
echo '<a href="document.php?id='.$document_id.'">';
echo Display::return_icon(
'back.png',
get_lang('BackTo').' '.get_lang('DocumentsOverview'),
get_lang('Back to').' '.get_lang('Documents overview'),
'',
ICON_SIZE_MEDIUM
);
echo '</a>';
echo '<a href="create_audio.php?'.api_get_cidreq().'&id='.$document_id.'&service=google">'.
Display::return_icon('google.png', get_lang('GoogleAudio'), '', ICON_SIZE_MEDIUM).'</a>';
Display::return_icon('google.png', get_lang('Use Google audio services'), '', ICON_SIZE_MEDIUM).'</a>';
echo '</div>';
?>
<!-- javascript and styles for textareaCounter-->
@ -225,13 +225,13 @@ while ($row = Database::fetch_array($result_select)) {
if ($service == 'google') {
$selected_language = api_get_language_isocode(); //lang default is the course language
$form = new FormValidator('form1', 'post', api_get_self().'?'.api_get_cidreq(), '', ['id' => 'form1']);
$form->addHeader(get_lang('HelpText2Audio'));
$form->addHeader(get_lang('Convert your text to speech'));
$form->addElement('hidden', 'text2voice_mode', 'google');
$form->addElement('hidden', 'id', $document_id);
$form->addElement('text', 'title', get_lang('Title'));
$form->addElement('select', 'lang', get_lang('Language'), $options);
$form->addElement('textarea', 'text', get_lang('InsertText2Audio'), ['id' => 'textarea_google']);
$form->addButtonSave(get_lang('SaveMP3'));
$form->addElement('textarea', 'text', get_lang('Enter the text you want to convert to an audio file'), ['id' => 'textarea_google']);
$form->addButtonSave(get_lang('Save mp3'));
$defaults = [];
$defaults['lang'] = $selected_language;
$form->setDefaults($defaults);
@ -301,7 +301,7 @@ function downloadAudioGoogle($dir)
}
if (empty($content)) {
Display::addFlash(Display::return_message(get_lang('GoogleTranslateApiReturnedEmptyAnswer'), 'error'));
Display::addFlash(Display::return_message(get_lang('The Google Translate API used by this feature returned and empty answer. Please check or ask your translate_app_google_key setting is set correctly, or kindly ask an administrator to do so.'), 'error'));
return;
}
@ -323,6 +323,6 @@ function downloadAudioGoogle($dir)
true,
$content
);
echo Display::return_message(get_lang('DocumentCreated'), 'confirm');
echo Display::return_message(get_lang('Documented created'), 'confirm');
echo '<script>window.location.href="'.$location.'"</script>';
}

@ -63,9 +63,9 @@ if (isset($_REQUEST['certificate']) && $_REQUEST['certificate'] == 'true') {
$is_certificate_mode = true;
}
$nameTools = get_lang('CreateDocument');
$nameTools = get_lang('Create a rich media page / activity');
if ($is_certificate_mode) {
$nameTools = get_lang('CreateCertificate');
$nameTools = get_lang('Create certificate');
}
/* Constants and variables */
@ -200,7 +200,7 @@ if (!$is_certificate_mode) {
if (api_is_in_group()) {
$interbreadcrumb[] = [
"url" => "../group/group_space.php?".api_get_cidreq(),
"name" => get_lang('GroupSpace'),
"name" => get_lang('Group area'),
];
$path = explode('/', $dir);
if ('/'.$path[1] != $group_properties['directory']) {
@ -214,7 +214,7 @@ if (!$is_certificate_mode) {
} else {
$interbreadcrumb[] = [
'url' => Category::getUrl(),
'name' => get_lang('Gradebook'),
'name' => get_lang('Assessments'),
];
}
@ -297,7 +297,7 @@ function document_exists($filename)
if ($is_certificate_mode) {
$form->addText(
'title',
get_lang('CertificateName'),
get_lang('Certificate name'),
true,
['cols-size' => [2, 10, 0], 'autofocus']
);
@ -316,11 +316,11 @@ if (!empty($groupId)) {
'checkbox',
'readonly',
'',
get_lang('ReadOnly')
get_lang('Read only')
);
}
$form->addRule('title', get_lang('ThisFieldIsRequired'), 'required');
$form->addRule('title', get_lang('FileExists'), 'callback', 'document_exists');
$form->addRule('title', get_lang('Required field'), 'required');
$form->addRule('title', get_lang('The operation is impossible, a file with this name already exists.'), 'callback', 'document_exists');
$current_session_id = api_get_session_id();
$form->addHtmlEditor(
@ -352,7 +352,7 @@ if (!$is_certificate_mode &&
$parent_select = $form->addSelect(
'curdirpath',
get_lang('DestinationDirectory'),
get_lang('Destination folder'),
null,
['cols-size' => [2, 10, 0]]
);
@ -397,7 +397,7 @@ if (!$is_certificate_mode &&
}
if (empty($group_dir)) {
$parent_select->addOption(get_lang('HomeDirectory'), '/');
$parent_select->addOption(get_lang('Home'), '/');
if (is_array($folders)) {
foreach ($folders as &$folder) {
//Hide some folders
@ -451,7 +451,7 @@ if (!$is_certificate_mode &&
$selected = (substr($dir, 0, -1) == $folder) ? ' selected="selected"' : '';
$label = $folder_titles[$folder];
if ($folder == $group_dir) {
$label = '/ ('.get_lang('HomeDirectory').')';
$label = '/ ('.get_lang('Home').')';
} else {
$path_parts = explode('/', str_replace($group_dir, '', $folder));
$label = cut($label, 80);
@ -469,9 +469,9 @@ if (!$is_certificate_mode &&
$form->addHidden('dirValue', '');
if ($is_certificate_mode) {
$form->addButtonCreate(get_lang('CreateCertificate'));
$form->addButtonCreate(get_lang('Create certificate'));
} else {
$form->addButtonCreate(get_lang('CreateDoc'));
$form->addButtonCreate(get_lang('Create a rich media page / activity'));
}
$form->setDefaults($defaults);
@ -542,11 +542,11 @@ if ($form->validate()) {
}
$certificate_condition = '&certificate=true&curdirpath=/certificates';
}
Display::addFlash(Display::return_message(get_lang('ItemAdded')));
Display::addFlash(Display::return_message(get_lang('Item added')));
header('Location: document.php?'.api_get_cidreq().'&id='.$folder_id.$certificate_condition);
exit();
} else {
Display::addFlash(Display::return_message(get_lang('Impossible'), 'error'));
Display::addFlash(Display::return_message(get_lang('Operation impossible'), 'error'));
header('Location: document.php?'.api_get_cidreq().'&id='.$folder_id);
exit();
}
@ -577,12 +577,12 @@ if ($form->validate()) {
// link back to the documents overview
if ($is_certificate_mode) {
$actionsLeft = '<a href="document.php?certificate=true&id='.$folder_id.'&selectcat='.Security::remove_XSS($_GET['selectcat']).'">'.
Display::return_icon('back.png', get_lang('Back').' '.get_lang('To').' '.get_lang('CertificateOverview'), '', ICON_SIZE_MEDIUM).'</a>';
Display::return_icon('back.png', get_lang('Back').' '.get_lang('To').' '.get_lang('Certificate overview'), '', ICON_SIZE_MEDIUM).'</a>';
$actionsLeft .= '<a id="hide_bar_template" href="#" role="button">'.
Display::return_icon('expand.png', get_lang('Back'), ['id' => 'expand'], ICON_SIZE_MEDIUM).Display::return_icon('contract.png', get_lang('Back'), ['id' => 'contract', 'class' => 'hide'], ICON_SIZE_MEDIUM).'</a>';
} else {
$actionsLeft = '<a href="document.php?curdirpath='.Security::remove_XSS($dir).'">'.
Display::return_icon('back.png', get_lang('Back').' '.get_lang('To').' '.get_lang('DocumentsOverview'), '', ICON_SIZE_MEDIUM).'</a>';
Display::return_icon('back.png', get_lang('Back').' '.get_lang('To').' '.get_lang('Documents overview'), '', ICON_SIZE_MEDIUM).'</a>';
$actionsLeft .= '<a id="hide_bar_template" href="#" role="button">'.
Display::return_icon('expand.png', get_lang('Expand'), ['id' => 'expand'], ICON_SIZE_MEDIUM).
Display::return_icon('contract.png', get_lang('Collapse'), ['id' => 'contract', 'class' => 'hide'], ICON_SIZE_MEDIUM).'</a>';
@ -600,7 +600,7 @@ if ($form->validate()) {
foreach ($all_information_by_create_certificate[0] as $info_value) {
$str_info .= $info_value.'<br/>';
}
$create_certificate = get_lang('CreateCertificateWithTags');
$create_certificate = get_lang('Create certificateWithTags');
echo Display::return_message($create_certificate.': <br /><br/>'.$str_info, 'normal', false);
}

@ -82,7 +82,7 @@ $groupId = api_get_group_id();
if (!empty($groupId)) {
$interbreadcrumb[] = [
"url" => "../group/group_space.php?".api_get_cidreq(),
"name" => get_lang('GroupSpace'),
"name" => get_lang('Group area'),
];
$group = GroupManager :: get_group_properties($groupId);
$path = explode('/', $dir);
@ -139,7 +139,7 @@ Display :: display_header($nameTools, 'Doc');
echo '<div class="actions">';
echo '<a href="document.php?id='.$document_id.'">'.
Display::return_icon('back.png', get_lang('BackTo').' '.get_lang('DocumentsOverview'), '', ICON_SIZE_MEDIUM).'</a>';
Display::return_icon('back.png', get_lang('Back to').' '.get_lang('Documents overview'), '', ICON_SIZE_MEDIUM).'</a>';
echo '</div>';
if (api_browser_support('svg')) {
@ -167,7 +167,7 @@ if (api_browser_support('svg')) {
echo '<iframe style="height: 550px; width: 100%;" scrolling="no" frameborder="0" src="'.$svg_url.'"><noframes><p>Sorry, your browser does not handle frames</p></noframes></iframe>';
echo '</noscript>';
} else {
echo Display::return_message(get_lang('BrowserDontSupportsSVG'), 'error');
echo Display::return_message(get_lang('Your browser does not support SVG files. To use the drawing tool you must have an advanced browser such as Firefox or Chrome'), 'error');
}
Display :: display_footer();

@ -21,7 +21,7 @@ if (api_get_setting('enabled_support_paint') === 'false') {
}
$this_section = SECTION_COURSES;
$nameTools = get_lang('PhotoRetouching');
$nameTools = get_lang('Photo retouching');
$groupRights = Session::read('group_member_with_upload_rights');
api_protect_course_script();
@ -47,7 +47,7 @@ if (empty($paintDir)) {
}
Session::write('paint_dir', $paintDir);
Session::write('paint_file', get_lang('NewImage'));
Session::write('paint_file', get_lang('New image'));
// Please, do not modify this dirname formatting
if (strstr($dir, '..')) {
@ -78,7 +78,7 @@ $groupId = api_get_group_id();
if (!empty($groupId)) {
$interbreadcrumb[] = [
"url" => api_get_path(WEB_CODE_PATH)."group/group_space.php?".api_get_cidreq(),
"name" => get_lang('GroupSpace'),
"name" => get_lang('Group area'),
];
$group = GroupManager::get_group_properties($groupId);
$path = explode('/', $dir);
@ -129,7 +129,7 @@ echo '<div class="actions">';
echo '<a href="document.php?id='.$document_id.'">'.
Display::return_icon(
'back.png',
get_lang('BackTo').' '.get_lang('DocumentsOverview'),
get_lang('Back to').' '.get_lang('Documents overview'),
'',
ICON_SIZE_MEDIUM
).
@ -138,7 +138,7 @@ echo '</div>';
// pixlr
// max size 1 Mb ??
$title = urlencode(utf8_encode(get_lang('NewImage'))); //TODO:check
$title = urlencode(utf8_encode(get_lang('New image'))); //TODO:check
$image = Display::returnIconPath('canvas1024x768.png');
$exit_path = api_get_path(WEB_CODE_PATH).'document/exit_pixlr.php';
Session::write('exit_pixlr', $document_data['path']);

@ -47,7 +47,7 @@ $charset = 'utf-8';
if ($allowDownloadDocumentsByApiKey) {
try {
if ($action !== 'download') {
throw new Exception(get_lang('SelectAnAction'));
throw new Exception(get_lang('Select an action'));
}
$username = isset($_GET['username']) ? Security::remove_XSS($_GET['username']) : null;
@ -186,7 +186,7 @@ if (!empty($groupId)) {
];
$interbreadcrumb[] = [
'url' => api_get_path(WEB_CODE_PATH).'group/group_space.php?'.api_get_cidreq(),
'name' => get_lang('GroupSpace').' '.$group_properties['name'],
'name' => get_lang('Group area').' '.$group_properties['name'],
];
//they are allowed to upload
$groupMemberWithUploadRights = true;
@ -201,7 +201,7 @@ if (!empty($groupId)) {
];
$interbreadcrumb[] = [
'url' => api_get_path(WEB_CODE_PATH).'group/group_space.php?'.api_get_cidreq(),
'name' => get_lang('GroupSpace').' '.$group_properties['name'],
'name' => get_lang('Group area').' '.$group_properties['name'],
];
// Allowed to upload?
@ -223,7 +223,7 @@ if (!empty($groupId)) {
Session::write('group_member_with_upload_rights', false);
}
// Actions.
// Detail.
$document_id = isset($_REQUEST['id']) ? (int) $_REQUEST['id'] : null;
$currentUrl = api_get_self().'?'.api_get_cidreq().'&id='.$document_id;
$curdirpath = isset($_GET['curdirpath']) ? Security::remove_XSS($_GET['curdirpath']) : null;
@ -289,30 +289,30 @@ switch ($action) {
);
Display::addFlash(
Display::return_message(
get_lang('DocDeleted').': '.$documentInfo['title'],
get_lang('Document deleted').': '.$documentInfo['title'],
'success'
)
);
} else {
Display::addFlash(Display::return_message(get_lang('DocDeleteError'), 'warning'));
Display::addFlash(Display::return_message(get_lang('Error during the delete of document'), 'warning'));
}
} else {
// Cloud Links
$deleteDocument = DocumentManager::deleteCloudLink($courseInfo, $_GET['deleteid']);
if ($deleteDocument) {
Display::addFlash(Display::return_message(
get_lang('CloudLinkDeleted').': '.$documentInfo['title'],
get_lang('Cloud link deleted').': '.$documentInfo['title'],
'success'
));
} else {
Display::addFlash(Display::return_message(
get_lang('CloudLinkDeleteError').': '.$documentInfo['title'],
get_lang('Error deleting the cloud link.').': '.$documentInfo['title'],
'error'
));
}
}
} else {
Display::addFlash(Display::return_message(get_lang('FileNotFound'), 'warning'));
Display::addFlash(Display::return_message(get_lang('The file was not found'), 'warning'));
}
header("Location: $currentUrl");
exit;
@ -475,7 +475,7 @@ switch ($action) {
$parent_id = 0;
}
$file_link = Display::url(
get_lang('SeeFile'),
get_lang('See file'),
api_get_path(WEB_CODE_PATH).'social/myfiles.php?'
.api_get_cidreq_params($cidReq, $id_session, $gidReq).
'&parent_id='.$parent_id
@ -486,7 +486,7 @@ switch ($action) {
}
if (file_exists($copyfile)) {
$message = get_lang('CopyAlreadyDone').'</p><p>';
$message = get_lang('There are a file with the same name in your private user file area. Do you want replace it?').'</p><p>';
$message .= '<a class = "btn btn-default" '
.'href="'.api_get_self().'?'.api_get_cidreq().'&amp;id='
.$parent_id.'">'
@ -504,10 +504,10 @@ switch ($action) {
}
if (isset($_GET['copy']) && $_GET['copy'] === 'yes') {
if (!copy($file, $copyfile)) {
Display::addFlash(Display::return_message(get_lang('CopyFailed'), 'error'));
Display::addFlash(Display::return_message(get_lang('Copy failed'), 'error'));
} else {
Display::addFlash(Display::return_message(
get_lang('OverwritenFile').' '.$file_link,
get_lang('File replaced').' '.$file_link,
'confirmation',
false
));
@ -515,10 +515,10 @@ switch ($action) {
}
} else {
if (!copy($file, $copyfile)) {
Display::addFlash(Display::return_message(get_lang('CopyFailed'), 'error'));
Display::addFlash(Display::return_message(get_lang('Copy failed'), 'error'));
} else {
Display::addFlash(
Display::return_message(get_lang('CopyMade').' '.$file_link, 'confirmation', false)
Display::return_message(get_lang('The copy has been made').' '.$file_link, 'confirmation', false)
);
}
}
@ -543,7 +543,7 @@ switch ($action) {
$fileInfo = pathinfo($file);
if ($fileInfo['extension'] == $formatTarget) {
Display::addFlash(Display::return_message(
get_lang('ConversionToSameFileFormat'),
get_lang('Conversion to same file format. Please choose another.'),
'warning'
));
} elseif (
@ -551,7 +551,7 @@ switch ($action) {
!(in_array($formatTarget, DocumentManager::getJodconverterExtensionList('to', $formatType)))
) {
Display::addFlash(Display::return_message(
get_lang('FileFormatNotSupported'),
get_lang('File format not supported'),
'warning'
));
} else {
@ -562,7 +562,7 @@ switch ($action) {
$obj = new OpenofficePresentation(true);
if (file_exists($convertedFile)) {
Display::addFlash(Display::return_message(
get_lang('FileExists'),
get_lang('The operation is impossible, a file with this name already exists.'),
'error'
));
} else {
@ -573,7 +573,7 @@ switch ($action) {
);
if (empty($result)) {
Display::addFlash(Display::return_message(
get_lang('CopyFailed'),
get_lang('Copy failed'),
'error'
));
} else {
@ -581,14 +581,14 @@ switch ($action) {
$id_session = api_get_session_id();
$gidReq = Security::remove_XSS($_GET['gidReq']);
$file_link = Display::url(
get_lang('SeeFile'),
get_lang('See file'),
api_get_path(WEB_CODE_PATH)
.'document/showinframes.php?'
.api_get_cidreq_params($cidReq, $id_session, $gidReq)
.'&id='.current($result)
);
Display::addFlash(Display::return_message(
get_lang('CopyMade').' '.$file_link,
get_lang('The copy has been made').' '.$file_link,
'confirmation',
false
));
@ -787,7 +787,7 @@ if (isset($_GET['curdirpath']) && $_GET['curdirpath'] == '/certificates' &&
$htmlHeadXtra[] = '<script>
function confirmation (name) {
if (confirm(" '.addslashes(get_lang('AreYouSureToDeleteJS')).' "+ name + " ?")) {
if (confirm(" '.addslashes(get_lang('Are you sure to delete')).' "+ name + " ?")) {
return true;
} else {
return false;
@ -843,7 +843,7 @@ DocumentManager::createUserSharedFolder(api_get_user_id(), $courseInfo, $session
if ($is_certificate_mode) {
$interbreadcrumb[] = [
'url' => '../gradebook/index.php?'.api_get_cidreq(),
'name' => get_lang('Gradebook'),
'name' => get_lang('Assessments'),
];
} else {
if ((isset($_GET['id']) && $_GET['id'] != 0) || isset($_GET['curdirpath']) || isset($_GET['createdir'])) {
@ -897,7 +897,7 @@ if (empty($document_data['parents'])) {
}
if (isset($_GET['createdir'])) {
$interbreadcrumb[] = ['url' => '#', 'name' => get_lang('CreateDir')];
$interbreadcrumb[] = ['url' => '#', 'name' => get_lang('Create folder')];
}
$documentAndFolders = DocumentManager::getAllDocumentData(
@ -1098,14 +1098,14 @@ if ($isAllowedToEdit || $groupMemberWithUploadRights ||
Display::addFlash(
Display::return_message(
get_lang('CloudLinkMoved'),
get_lang('Cloud link moved'),
'success'
)
);
} else {
Display::addFlash(
Display::return_message(
get_lang('UrlAlreadyExists'),
get_lang('This URL already exists'),
'error'
)
);
@ -1141,11 +1141,11 @@ if ($isAllowedToEdit || $groupMemberWithUploadRights ||
$em->persist($document);
$em->flush();
Display::addFlash(Display::return_message(get_lang('DirMv'), 'confirmation'));
Display::addFlash(Display::return_message(get_lang('Element moved'), 'confirmation'));
}
}
} else {
Display::addFlash(Display::return_message(get_lang('Impossible'), 'error'));
Display::addFlash(Display::return_message(get_lang('Operation impossible'), 'error'));
}
}
}
@ -1192,7 +1192,7 @@ if ($isAllowedToEdit ||
case 'set_visible':
$repo->updateVisibility($document, $defaultVisibility);
$messages .= Display::return_message(
get_lang('VisibilityChanged').': '.$data['title'],
get_lang('The visibility has been changed.').': '.$data['title'],
'confirmation'
);
break;
@ -1212,7 +1212,7 @@ if ($isAllowedToEdit ||
$sessionId
)) {
$messages .= Display::return_message(
get_lang('CantDeleteReadonlyFiles'),
get_lang('Cannot delete files that are configured in read-only mode.'),
'error'
);
break 2;
@ -1233,7 +1233,7 @@ if ($isAllowedToEdit ||
);
if (!empty($deleteDocument)) {
$messages .= Display::return_message(
get_lang('DocDeleted').': '.$data['title'],
get_lang('Document deleted').': '.$data['title'],
'confirmation'
);
}
@ -1241,12 +1241,12 @@ if ($isAllowedToEdit ||
// Cloud Links
if (DocumentManager::deleteCloudLink($_course, $documentId)) {
$messages .= Display::return_message(
get_lang('CloudLinkDeleted'),
get_lang('Cloud link deleted'),
'confirmation'
);
} else {
$messages .= Display::return_message(
get_lang('CloudLinkDeleteError'),
get_lang('Error deleting the cloud link.'),
'error'
);
}
@ -1274,7 +1274,7 @@ if ($isAllowedToEdit ||
// Needed for directory creation
$post_dir_name = $_POST['dirname'];
if ($post_dir_name == '../' || $post_dir_name == '.' || $post_dir_name == '..') {
$message = Display::return_message(get_lang('CannotCreateDir'), 'error');
$message = Display::return_message(get_lang('CannotCreate folder'), 'error');
} else {
// dir_id is the parent folder id.
if (!empty($_POST['dir_id'])) {
@ -1321,12 +1321,12 @@ if ($isAllowedToEdit ||
if (!empty($newFolderData)) {
$message = Display::return_message(
get_lang('DirCr').' '.$newFolderData->getTitle(),
get_lang('Folder created').' '.$newFolderData->getTitle(),
'confirmation'
);
} else {
$message = Display::return_message(
get_lang('CannotCreateDir'),
get_lang('CannotCreate folder'),
'error'
);
}
@ -1373,7 +1373,7 @@ if ($isAllowedToEdit) {
/** @var CDocument $document */
$document = $repo->find($update_id);
$repo->updateVisibility($document, $defaultVisibility);
Display::addFlash(Display::return_message(get_lang('VisibilityChanged'), 'confirmation'));
Display::addFlash(Display::return_message(get_lang('The visibility has been changed.'), 'confirmation'));
header('Location: '.$currentUrl);
exit;
@ -1394,15 +1394,15 @@ if ($isAllowedToEdit ||
<form name="set_document_as_new_template" class="form-horizontal" enctype="multipart/form-data"
action="'.api_get_self().'?add_as_template='.$document_id_for_template.'" method="post">
<fieldset>
<legend>'.get_lang('AddAsTemplate').'</legend>
<legend>'.get_lang('Add as a template').'</legend>
<div class="form-group">
<label for="template_title" class="col-sm-2 control-label">'.get_lang('TemplateName').'</label>
<label for="template_title" class="col-sm-2 control-label">'.get_lang('Template name').'</label>
<div class="col-sm-10">
<input type="text" class="form-control" id="template_title" name="template_title">
</div>
</div>
<div class="form-group">
<label for="template_image" class="col-sm-2 control-label">'.get_lang('TemplateImage').'</label>
<label for="template_image" class="col-sm-2 control-label">'.get_lang("Template's icon").'</label>
<div class="col-sm-10">
<input type="file" name="template_image" id="template_image">
</div>
@ -1410,7 +1410,7 @@ if ($isAllowedToEdit ||
<div class="form-group">
<div class="col-sm-offset-2 col-sm-10">
<button type="submit" name="create_template" class="btn btn-primary">'
.get_lang('CreateTemplate').'
.get_lang('Create template').'
</button>
</div>
</div>
@ -1467,7 +1467,7 @@ if ($isAllowedToEdit ||
$new_file_name
);
Display::addFlash(
Display::return_message(get_lang('DocumentSetAsTemplate'), 'confirmation')
Display::return_message(get_lang('Document set as a new template'), 'confirmation')
);
}
@ -1480,7 +1480,7 @@ if ($isAllowedToEdit ||
);
Display::addFlash(
Display::return_message(get_lang('DocumentUnsetAsTemplate'), 'confirmation')
Display::return_message(get_lang('Document unset as template'), 'confirmation')
);
}
}
@ -1497,7 +1497,7 @@ if (isset($_GET['curdirpath']) &&
$document_id = Security::remove_XSS($_GET['set_certificate']); // document id
$courseInfoTemp = api_get_course_info($course_id);
DocumentManager::attach_gradebook_certificate($courseInfoTemp['real_id'], $document_id);
$message = Display::return_message(get_lang('IsDefaultCertificate'), 'normal');
$message = Display::return_message(get_lang('Certificate set to default'), 'normal');
Display::addFlash(
$message
);
@ -1585,7 +1585,7 @@ if ($isAllowedToEdit ||
$actionsLeft .= Display::url(
Display::return_icon(
'new_document.png',
get_lang('CreateDoc'),
get_lang('Create a rich media page / activity'),
'',
ICON_SIZE_MEDIUM
),
@ -1603,7 +1603,7 @@ if ($isAllowedToEdit ||
} else {
$actionsLeft .= Display::return_icon(
'new_draw_na.png',
get_lang('BrowserDontSupportsSVG'),
get_lang('Your browser does not support SVG files. To use the drawing tool you must have an advanced browser such as Firefox or Chrome'),
'',
ICON_SIZE_MEDIUM
);
@ -1615,7 +1615,7 @@ if ($isAllowedToEdit ||
$actionsLeft .= Display::url(
Display::return_icon(
'new_paint.png',
get_lang('PhotoRetouching'),
get_lang('Photo retouching'),
'',
ICON_SIZE_MEDIUM
),
@ -1627,7 +1627,7 @@ if ($isAllowedToEdit ||
// Record an image clip from my webcam
if (api_get_setting('enable_webcam_clip') == 'true') {
$actionsLeft .= Display::url(
Display::return_icon('webcam.png', get_lang('WebCamClip'), '', ICON_SIZE_MEDIUM),
Display::return_icon('webcam.png', get_lang('Webcam Clip'), '', ICON_SIZE_MEDIUM),
api_get_path(WEB_CODE_PATH).'document/webcam_clip.php?'.api_get_cidreq().'&id='.$document_id
);
}
@ -1635,7 +1635,7 @@ if ($isAllowedToEdit ||
// Record audio (nanogong)
if (api_get_setting('enable_record_audio') === 'true') {
$actionsLeft .= Display::url(
Display::return_icon('new_recording.png', get_lang('RecordMyVoice'), '', ICON_SIZE_MEDIUM),
Display::return_icon('new_recording.png', get_lang('Record my voice'), '', ICON_SIZE_MEDIUM),
api_get_path(WEB_CODE_PATH).'document/record_audio.php?'.api_get_cidreq().'&id='.$document_id
);
}
@ -1643,7 +1643,7 @@ if ($isAllowedToEdit ||
// Create new audio from text
if (api_get_setting('enabled_text2audio') == 'true') {
$actionsLeft .= Display::url(
Display::return_icon('new_sound.png', get_lang('CreateAudio'), '', ICON_SIZE_MEDIUM),
Display::return_icon('new_sound.png', get_lang('Create audio'), '', ICON_SIZE_MEDIUM),
api_get_path(WEB_CODE_PATH).'document/create_audio.php?'.api_get_cidreq().'&id='.$document_id
);
}
@ -1654,7 +1654,7 @@ if ($isAllowedToEdit ||
$actionsLeft .= Display::url(
Display::return_icon(
'new_certificate.png',
get_lang('CreateCertificate'),
get_lang('Create certificate'),
'',
ICON_SIZE_MEDIUM
),
@ -1666,13 +1666,13 @@ if ($isAllowedToEdit ||
// File upload link
if ($is_certificate_mode) {
$actionsLeft .= Display::url(
Display::return_icon('upload_certificate.png', get_lang('UploadCertificate'), '', ICON_SIZE_MEDIUM),
Display::return_icon('upload_certificate.png', get_lang('Upload certificate'), '', ICON_SIZE_MEDIUM),
api_get_path(WEB_CODE_PATH).'document/upload.php?'.api_get_cidreq()
.'&id='.$current_folder_id.'&certificate=true'
);
} else {
$actionsLeft .= Display::url(
Display::return_icon('upload_file.png', get_lang('UplUploadDocument'), '', ICON_SIZE_MEDIUM),
Display::return_icon('upload_file.png', get_lang('Upload documents'), '', ICON_SIZE_MEDIUM),
api_get_path(WEB_CODE_PATH).'document/upload.php?'.api_get_cidreq().'&id='.$current_folder_id
);
}
@ -1680,7 +1680,7 @@ if ($isAllowedToEdit ||
if ($capturePluginInstalled && !$is_certificate_mode) {
$actionsLeft .= '<span id="appletplace"></span>';
$actionsLeft .= Display::url(
Display::return_icon('capture.png', get_lang('CatchScreenCasts'), '', ICON_SIZE_MEDIUM),
Display::return_icon('capture.png', get_lang('Capture screenshot/screencast'), '', ICON_SIZE_MEDIUM),
'#',
['id' => 'jcapture']
);
@ -1689,7 +1689,7 @@ if ($isAllowedToEdit ||
// Create directory
if (!$is_certificate_mode) {
$actionsLeft .= Display::url(
Display::return_icon('new_folder.png', get_lang('CreateDir'), '', ICON_SIZE_MEDIUM),
Display::return_icon('new_folder.png', get_lang('Create folder'), '', ICON_SIZE_MEDIUM),
api_get_path(WEB_CODE_PATH).'document/document.php?'.api_get_cidreq().'&id='.$document_id.'&createdir=1'
);
}
@ -1698,21 +1698,21 @@ if ($isAllowedToEdit ||
$fileLinkEnabled = api_get_configuration_value('enable_add_file_link');
if ($fileLinkEnabled && !$is_certificate_mode) {
$actionsLeft .= Display::url(
Display::return_icon('clouddoc_new.png', get_lang('AddCloudLink'), '', ICON_SIZE_MEDIUM),
Display::return_icon('clouddoc_new.png', get_lang('Add link to Cloud file'), '', ICON_SIZE_MEDIUM),
api_get_path(WEB_CODE_PATH).'document/add_link.php?'.api_get_cidreq().'&id='.$document_id
);
}
}
if (!isset($_GET['keyword']) && !$is_certificate_mode) {
$actionsLeft .= Display::url(
Display::return_icon('slideshow.png', get_lang('ViewSlideshow'), '', ICON_SIZE_MEDIUM),
Display::return_icon('slideshow.png', get_lang('View Slideshow'), '', ICON_SIZE_MEDIUM),
api_get_path(WEB_CODE_PATH).'document/slideshow.php?'.api_get_cidreq().'&curdirpath='.$curdirpathurl
);
}
if ($isAllowedToEdit && !$is_certificate_mode) {
$actionsLeft .= Display::url(
Display::return_icon('percentage.png', get_lang('DocumentQuota'), '', ICON_SIZE_MEDIUM),
Display::return_icon('percentage.png', get_lang('Space Available'), '', ICON_SIZE_MEDIUM),
api_get_path(WEB_CODE_PATH).'document/document_quota.php?'.api_get_cidreq()
);
}
@ -1778,7 +1778,7 @@ if (!empty($documentAndFolders)) {
if (api_is_platform_admin() && api_get_configuration_value('document_manage_deleted_files')) {
$actionsLeft .= Display::url(
get_lang('Recycle'),
get_lang('Recycle course'),
api_get_path(WEB_CODE_PATH).'document/recycle.php?'.api_get_cidreq(),
['class' => 'btn btn-default']
);
@ -1878,17 +1878,17 @@ if (!empty($documentAndFolders)) {
$groupMemberWithUploadRights ||
DocumentManager::is_my_shared_folder(api_get_user_id(), $curdirpath, $sessionId)
) {
$table->set_header($column++, get_lang('Actions'), false, ['class' => 'td_actions']);
$table->set_header($column++, get_lang('Detail'), false, ['class' => 'td_actions']);
}
// Actions on multiple selected documents
// Detail on multiple selected documents
// TODO: Currently only delete action -> take only DELETE permission into account
if (count($documentAndFolders) > 1) {
if ($isAllowedToEdit || $groupMemberWithEditRights) {
$form_actions = [];
$form_action['set_invisible'] = get_lang('SetInvisible');
$form_action['set_visible'] = get_lang('SetVisible');
$form_action['set_invisible'] = get_lang('Set invisible');
$form_action['set_visible'] = get_lang('Set visible');
$form_action['delete'] = get_lang('Delete');
$table->set_form_actions($form_action, 'ids');
}
@ -1945,7 +1945,7 @@ if (count($documentAndFolders) > 1) {
}
if (empty($documentAndFolders)) {
echo Display::return_message(get_lang('NoDocsInFolder'), 'warning');
echo Display::return_message(get_lang('There are no documents to be displayed.'), 'warning');
}
echo '
<div id="convertModal" class="modal fade" tabindex="-1" role="dialog" aria-hidden="true">
@ -1960,7 +1960,7 @@ echo '
<div class="modal-body">
<form action="#" class="form-horizontal">
<div class="form-group">
<label class="col-sm-4 control-label" for="convertSelect">'.get_lang('ConvertFormats').'</label>
<label class="col-sm-4 control-label" for="convertSelect">'.get_lang('Convert format').'</label>
<div class="col-sm-8">
<select id="convertSelect">
<option value="">'.get_lang('Select').'</option>

@ -19,7 +19,7 @@ if (!api_is_allowed_to_edit(null, true)) {
$current_course_tool = TOOL_DOCUMENT;
$this_section = SECTION_COURSES;
$tool_name = get_lang('DocumentQuota');
$tool_name = get_lang('Space Available');
$interbreadcrumb[] = ['url' => 'document.php', 'name' => get_lang('Documents')];
@ -99,7 +99,7 @@ if (!empty($document_list)) {
}
$session[] = [
addslashes(get_lang('Teacher').': '.$user_name).' ('.format_file_size($quota_bytes).')',
addslashes(get_lang('Trainer').': '.$user_name).' ('.format_file_size($quota_bytes).')',
$quotaPercentage,
];
//if a sesson is active
@ -116,13 +116,13 @@ if (!empty($document_list)) {
$quotaPercentage = round($quota_bytes / $total_quota_bytes, 2) * 100;
}
}
$session[] = [addslashes(sprintf(get_lang('TeacherXInSession'), $user_name)), $quotaPercentage];
$session[] = [addslashes(sprintf(get_lang('TrainerXInSession'), $user_name)), $quotaPercentage];
}
}
$quotaPercentage = round(($total_quota_bytes - $used_quota_bytes) / $total_quota_bytes, 2) * 100;
$session[] = [
addslashes(get_lang('ShowCourseQuotaUse')).' ('.format_file_size(
addslashes(get_lang('Space Available')).' ('.format_file_size(
$total_quota_bytes - $used_quota_bytes
).') ',
$quotaPercentage,
@ -148,6 +148,6 @@ $(function() {
</script>";
$tpl = new Template($tool_name);
$content = Display::page_subheader(get_lang('ShowCourseQuotaUse')).'<div id="chart1"></div>';
$content = Display::page_subheader(get_lang('Space Available')).'<div id="chart1"></div>';
$tpl->assign('content', $content);
$tpl->display_one_col_template();

@ -108,7 +108,7 @@ if (Security::check_abs_path($sys_course_path.$doc_url, $sys_course_path.'/')) {
}
if (!api_is_allowed_to_edit() && !$is_visible) {
echo Display::return_message(get_lang('ProtectedDocument'), 'error'); //api_not_allowed backbutton won't work.
echo Display::return_message(get_lang('Protected Document'), 'error'); //api_not_allowed backbutton won't work.
exit; // You shouldn't be here anyway.
}
// Launch event

@ -58,8 +58,8 @@ if (Security::check_abs_path($sys_course_path.$doc_url, $sys_course_path.'/')) {
$fixLinks = api_get_configuration_value('lp_replace_http_to_https');
$result = DocumentManager::file_send_for_download($full_file_name, false, '', $fixLinks);
if ($result === false) {
api_not_allowed(true, get_lang('FileNotFound'), 404);
api_not_allowed(true, get_lang('The file was not found'), 404);
}
} else {
api_not_allowed(true, get_lang('FileNotFound'), 404);
api_not_allowed(true, get_lang('The file was not found'), 404);
}

@ -154,7 +154,7 @@ $course_id = api_get_course_int_id();
if (!empty($group_id)) {
$interbreadcrumb[] = [
'url' => api_get_path(WEB_CODE_PATH).'group/group_space.php?'.api_get_cidreq(),
'name' => get_lang('GroupSpace'),
'name' => get_lang('Group area'),
];
$group_document = true;
}
@ -167,7 +167,7 @@ if (!$is_certificate_mode) {
} else {
$interbreadcrumb[] = [
'url' => Category::getUrl(),
'name' => get_lang('Gradebook'),
'name' => get_lang('Assessments'),
];
}
@ -217,7 +217,7 @@ if (!empty($sessionId)) {
if (api_is_in_group()) {
$group_properties = GroupManager::get_group_properties($group_id);
GroupManager::allowUploadEditDocument(
GroupManager::allowUploadEdit(
api_get_user_id(),
api_get_course_int_id(),
$group_properties,
@ -257,12 +257,12 @@ if (isset($_POST['comment'])) {
$em->flush();
if ($file_type != 'link') {
Display::addFlash(Display::return_message(get_lang('Updated')));
Display::addFlash(Display::return_message(get_lang('Update successful')));
} else {
Display::addFlash(Display::return_message(get_lang('CloudLinkModified')));
Display::addFlash(Display::return_message(get_lang('Cloud file link updated.')));
}
} else {
Display::addFlash(Display::return_message(get_lang('UrlAlreadyExists'), 'warning'));
Display::addFlash(Display::return_message(get_lang('This URL already exists'), 'warning'));
}
}
}
@ -310,7 +310,7 @@ if (in_array($extension, ['html', 'htm'])) {
}
// Display the header
$nameTools = get_lang('EditDocument').': '.Security::remove_XSS($document_data['title']);
$nameTools = get_lang('Edit').': '.Security::remove_XSS($document_data['title']);
Display::display_header($nameTools, 'Doc');
$owner_id = $node->getCreator()->getId();
@ -368,12 +368,12 @@ if ($owner_id == api_get_user_id() ||
}
if (!empty($createdDate)) {
$form->addLabel(get_lang('CreatedOn'), Display::dateToStringAgoAndLongDate($createdDate));
$form->addLabel(get_lang('Created on'), Display::dateToStringAgoAndLongDate($createdDate));
}
if ($file_type != 'link') {
if (!$group_document && !DocumentManager::is_my_shared_folder(api_get_user_id(), $currentDirPath, $sessionId)) {
$form->addLabel(get_lang('UpdatedOn'), Display::dateToStringAgoAndLongDate($last_edit_date));
$form->addLabel(get_lang('Update successfulOn'), Display::dateToStringAgoAndLongDate($last_edit_date));
}
if (!empty($document_info['insert_user_id'])) {
@ -392,7 +392,7 @@ if ($owner_id == api_get_user_id() ||
$urlWLRegEx = '/(\/\/|\.)('.implode('|', $urlWL).')/i';
$urlWLText = "\n\t* ".implode("\n\t* ", $urlWL);
$urlWLHTML = "<ul><li>".implode("</li><li>", $urlWL)."</li></ul>";
$form->addText('comment', get_lang('Url'));
$form->addText('comment', get_lang('URL'));
$form->addElement(
'static',
'info',
@ -407,7 +407,7 @@ if ($owner_id == api_get_user_id() ||
if ($file_type != 'link') {
if ($owner_id == api_get_user_id() || api_is_platform_admin()) {
$checked = &$form->addElement('checkbox', 'readonly', null, get_lang('ReadOnly'));
$checked = &$form->addElement('checkbox', 'readonly', null, get_lang('Read only'));
if ($readonly == 1) {
$checked->setChecked(true);
}
@ -415,22 +415,22 @@ if ($owner_id == api_get_user_id() ||
}
if ($file_type == 'link') {
$form->addRule('title', get_lang('PleaseEnterCloudLinkName'), 'required');
$form->addRule('comment', get_lang('PleaseEnterURL'), 'required');
$form->addRule('title', get_lang('Please enter a name for this Cloud link'), 'required');
$form->addRule('comment', get_lang('Please enter the URL'), 'required');
// Well formed url pattern (must have the protocol)
$urlRegEx = DocumentManager::getWellFormedUrlRegex();
$form->addRule('comment', get_lang('NotValidURL'), 'regex', $urlRegEx, 'client');
$form->addRule('comment', get_lang('NotValidURL'), 'regex', $urlRegEx, 'server');
$form->addRule('comment', get_lang('NotValidDomain').$urlWLText, 'regex', $urlWLRegEx, 'client');
$form->addRule('comment', get_lang('NotValidDomain').$urlWLHTML, 'regex', $urlWLRegEx, 'server');
$form->addRule('comment', get_lang('URL field format invalid. Example of expected format: http://dropbox.com/sh/loremipsum/loremipsum?dl=0'), 'regex', $urlRegEx, 'client');
$form->addRule('comment', get_lang('URL field format invalid. Example of expected format: http://dropbox.com/sh/loremipsum/loremipsum?dl=0'), 'regex', $urlRegEx, 'server');
$form->addRule('comment', get_lang('The domain is not valid. It must be one of the following:').$urlWLText, 'regex', $urlWLRegEx, 'client');
$form->addRule('comment', get_lang('The domain is not valid. It must be one of the following:').$urlWLHTML, 'regex', $urlWLRegEx, 'server');
}
if ($is_certificate_mode) {
$form->addButtonUpdate(get_lang('SaveCertificate'));
$form->addButtonUpdate(get_lang('Save certificate'));
} elseif ($file_type == 'link') {
$form->addButtonUpdate(get_lang('SaveLink'));
$form->addButtonUpdate(get_lang('Save link'));
} else {
$form->addButtonUpdate(get_lang('SaveDocument'));
$form->addButtonUpdate(get_lang('Save document'));
}
$form->addHidden('formSent', 1);
$form->addHidden('filename', $filename);
@ -462,7 +462,7 @@ if ($owner_id == api_get_user_id() ||
foreach ($all_information_by_create_certificate[0] as $info_value) {
$str_info .= $info_value.'<br/>';
}
$create_certificate = get_lang('CreateCertificateWithTags');
$create_certificate = get_lang('Create your certificate copy-pasting the following tags. They will be replaced in the document by their student-specific value:');
echo Display::return_message(
$create_certificate.': <br /><br />'.$str_info,
'normal',
@ -473,7 +473,7 @@ if ($owner_id == api_get_user_id() ||
if ($extension == 'svg' && !api_browser_support('svg') &&
api_get_setting('enabled_support_svg') == 'true'
) {
echo Display::return_message(get_lang('BrowserDontSupportsSVG'), 'warning');
echo Display::return_message(get_lang('Your browser does not support SVG files. To use the drawing tool you must have an advanced browser such as Firefox or Chrome'), 'warning');
}
if ($file_type != 'link') {
// HTML-editor
@ -521,27 +521,27 @@ function show_return($document_id, $path, $call_from_tool = '', $slide_id = 0, $
if ($is_certificate_mode) {
$selectedCategory = (isset($_GET['curdirpath']) ? Security::remove_XSS($_GET['curdirpath']) : '');
$actionsLeft .= '<a href="document.php?curdirpath='.$selectedCategory.'&selectcat='.$selectedCategory.'">'.
Display::return_icon('back.png', get_lang('Back').' '.get_lang('To').' '.get_lang('CertificateOverview'), '', ICON_SIZE_MEDIUM).'</a>';
Display::return_icon('back.png', get_lang('Back').' '.get_lang('To').' '.get_lang('Certificate overview'), '', ICON_SIZE_MEDIUM).'</a>';
$actionsLeft .= '<a id="hide_bar_template" href="#" role="button">'.Display::return_icon('expand.png', get_lang('Expand'), ['id' => 'expand'], ICON_SIZE_MEDIUM).Display::return_icon('contract.png', get_lang('Collapse'), ['id' => 'contract', 'class' => 'hide'], ICON_SIZE_MEDIUM).'</a>';
} elseif ($call_from_tool == 'slideshow') {
$actionsLeft .= '<a href="'.api_get_path(WEB_PATH).'main/document/slideshow.php?slide_id='.$slide_id.'&curdirpath='.Security::remove_XSS(urlencode($_GET['curdirpath'])).'">'.
Display::return_icon('slideshow.png', get_lang('BackTo').' '.get_lang('ViewSlideshow'), '', ICON_SIZE_MEDIUM).'</a>';
Display::return_icon('slideshow.png', get_lang('Back to').' '.get_lang('View Slideshow'), '', ICON_SIZE_MEDIUM).'</a>';
} elseif ($call_from_tool == 'editdraw') {
$actionsLeft .= '<a href="'.$url.'">'.
Display::return_icon('back.png', get_lang('BackTo').' '.get_lang('DocumentsOverview'), '', ICON_SIZE_MEDIUM).'</a>';
$actionsLeft .= '<a href="javascript:history.back(1)">'.Display::return_icon('draw.png', get_lang('BackTo').' '.get_lang('Draw'), [], 32).'</a>';
Display::return_icon('back.png', get_lang('Back to').' '.get_lang('Documents overview'), '', ICON_SIZE_MEDIUM).'</a>';
$actionsLeft .= '<a href="javascript:history.back(1)">'.Display::return_icon('draw.png', get_lang('Back to').' '.get_lang('Draw'), [], 32).'</a>';
} elseif ($call_from_tool == 'editodf') {
$actionsLeft .= '<a href="'.$url.'">'.
Display::return_icon('back.png', get_lang('BackTo').' '.get_lang('DocumentsOverview'), '', ICON_SIZE_MEDIUM).'</a>';
$actionsLeft .= '<a href="javascript:history.back(1)">'.Display::return_icon('draw.png', get_lang('BackTo').' '.get_lang('Write'), [], 32).'</a>';
Display::return_icon('back.png', get_lang('Back to').' '.get_lang('Documents overview'), '', ICON_SIZE_MEDIUM).'</a>';
$actionsLeft .= '<a href="javascript:history.back(1)">'.Display::return_icon('draw.png', get_lang('Back to').' '.get_lang('Write'), [], 32).'</a>';
$actionsLeft .= '<a id="hide_bar_template" href="#" role="button">'.Display::return_icon('expand.png', get_lang('Expand'), ['id' => 'expand'], ICON_SIZE_MEDIUM).Display::return_icon('contract.png', get_lang('Collapse'), ['id' => 'contract', 'class' => 'hide'], ICON_SIZE_MEDIUM).'</a>';
} elseif ($call_from_tool == 'editpaint' && api_get_setting('enabled_support_pixlr') === 'true') {
$actionsLeft .= '<a href="'.$url.'">'.
Display::return_icon('back.png', get_lang('BackTo').' '.get_lang('DocumentsOverview'), [], ICON_SIZE_MEDIUM).'</a>';
$actionsLeft .= '<a href="javascript:history.back(1)">'.Display::return_icon('paint.png', get_lang('BackTo').' '.get_lang('Paint'), [], 32).'</a>';
Display::return_icon('back.png', get_lang('Back to').' '.get_lang('Documents overview'), [], ICON_SIZE_MEDIUM).'</a>';
$actionsLeft .= '<a href="javascript:history.back(1)">'.Display::return_icon('paint.png', get_lang('Back to').' '.get_lang('Paint'), [], 32).'</a>';
} else {
$actionsLeft .= '<a href="'.$url.'">'.
Display::return_icon('back.png', get_lang('BackTo').' '.get_lang('DocumentsOverview'), '', ICON_SIZE_MEDIUM).'</a>';
Display::return_icon('back.png', get_lang('Back to').' '.get_lang('Documents overview'), '', ICON_SIZE_MEDIUM).'</a>';
$actionsLeft .= '<a id="hide_bar_template" href="#" role="button">'.Display::return_icon('expand.png', get_lang('Expand'), ['id' => 'expand'], ICON_SIZE_MEDIUM).Display::return_icon('contract.png', get_lang('Collapse'), ['id' => 'contract', 'class' => 'hide'], ICON_SIZE_MEDIUM).'</a>';
}

@ -53,7 +53,7 @@ $get_file = Security::remove_XSS($file_path);
$file = basename($get_file);
$temp_file = explode(".", $file);
$filename = $temp_file[0];
$nameTools = get_lang('EditDocument').': '.$filename;
$nameTools = get_lang('Edit').': '.$filename;
$courseDir = $_course['path'].'/document';
$is_allowed_to_edit = api_is_allowed_to_edit(null, true);
@ -88,7 +88,7 @@ if (!is_dir($filepath)) {
if (!empty($group_id)) {
$interbreadcrumb[] = [
'url' => api_get_path(WEB_CODE_PATH).'group/group_space.php?'.api_get_cidreq(),
'name' => get_lang('GroupSpace'),
'name' => get_lang('Group area'),
];
$group_document = true;
}
@ -103,7 +103,7 @@ if (!$is_certificate_mode) {
} else {
$interbreadcrumb[] = [
'url' => Category::getUrl(),
'name' => get_lang('Gradebook'),
'name' => get_lang('Assessments'),
];
}
@ -133,7 +133,7 @@ Event::event_access_tool(TOOL_DOCUMENT);
Display :: display_header($nameTools, 'Doc');
echo '<div class="actions">';
echo '<a href="document.php?id='.$parent_id.'">'.
Display::return_icon('back.png', get_lang('BackTo').' '.get_lang('DocumentsOverview'), '', ICON_SIZE_MEDIUM).'</a>';
Display::return_icon('back.png', get_lang('Back to').' '.get_lang('Documents overview'), '', ICON_SIZE_MEDIUM).'</a>';
echo '<a href="edit_document.php?'.api_get_cidreq().'&id='.$document_id.'&origin=editdraw">'.
Display::return_icon('edit.png', get_lang('Rename').'/'.get_lang('Comments'), '', ICON_SIZE_MEDIUM).'</a>';
echo '</div>';
@ -167,6 +167,6 @@ if (api_browser_support('svg')) {
echo '<iframe style="height: 550px; width: 100%;" scrolling="no" frameborder="0\' src="'.$svg_url.'"<noframes><p>Sorry, your browser does not handle frames</p></noframes></iframe>';
echo '</noscript>';
} else {
echo Display::return_message(get_lang('BrowserDontSupportsSVG'), 'error');
echo Display::return_message(get_lang('Your browser does not support SVG files. To use the drawing tool you must have an advanced browser such as Firefox or Chrome'), 'error');
}
Display::display_footer();

@ -115,7 +115,7 @@ if (!empty($documentInfo['parents'])) {
$actionBack = Display::url(
Display::return_icon(
'back.png',
get_lang('BackTo').' '.get_lang('DocumentsOverview'),
get_lang('Back to').' '.get_lang('Documents overview'),
[],
ICON_SIZE_MEDIUM
),

@ -54,7 +54,7 @@ $get_file = Security::remove_XSS($file_path);
$file = basename($get_file);
$temp_file = explode(".", $file);
$filename = $temp_file[0];
$nameTools = get_lang('EditDocument').': '.$filename;
$nameTools = get_lang('Edit').': '.$filename;
$courseDir = $_course['path'].'/document';
$is_allowed_to_edit = api_is_allowed_to_edit(null, true);
/* Other initialization code */
@ -85,7 +85,7 @@ if (!is_dir($filepath)) {
if (!empty($groupId)) {
$interbreadcrumb[] = [
'url' => api_get_path(WEB_CODE_PATH).'group/group_space.php?'.api_get_cidreq(),
'name' => get_lang('GroupSpace'),
'name' => get_lang('Group area'),
];
$group_document = true;
}
@ -100,7 +100,7 @@ if (!$is_certificate_mode) {
} else {
$interbreadcrumb[] = [
'url' => Category::getUrl(),
'name' => get_lang('Gradebook'),
'name' => get_lang('Assessments'),
];
}
@ -128,7 +128,7 @@ Event::event_access_tool(TOOL_DOCUMENT);
Display :: display_header($nameTools, 'Doc');
echo '<div class="actions">';
echo '<a href="document.php?id='.$parent_id.'&'.api_get_cidreq().'">'.
Display::return_icon('back.png', get_lang('BackTo').' '.get_lang('DocumentsOverview'), '', ICON_SIZE_MEDIUM).'</a>';
Display::return_icon('back.png', get_lang('Back to').' '.get_lang('Documents overview'), '', ICON_SIZE_MEDIUM).'</a>';
echo '<a href="edit_document.php?'.api_get_cidreq().'&id='.$document_id.'&'.api_get_cidreq().'&origin=editpaint">'.
Display::return_icon('edit.png', get_lang('Rename').'/'.get_lang('Comment'), '', ICON_SIZE_MEDIUM).'</a>';
echo '</div>';

@ -33,7 +33,7 @@ if (empty($exit)) {
echo '<script>window.parent.location.href="'.$location.'"</script>';
api_not_allowed(true);
} else {
echo '<div align="center" style="padding-top:150; font-family:Arial, Helvetica, Sans-serif;font-size:25px;color:#aaa;font-weight:bold;">'.get_lang('PleaseStandBy').'</div>';
echo '<div align="center" style="padding-top:150; font-family:Arial, Helvetica, Sans-serif;font-size:25px;color:#aaa;font-weight:bold;">'.get_lang('Please stand by...').'</div>';
$location = api_get_path(WEB_CODE_PATH).'document/document.php?id='.Security::remove_XSS($exit).'&'.api_get_cidreq();
echo '<script>window.parent.location.href="'.$location.'"</script>';
Session::erase('exit_pixlr');

@ -11,7 +11,7 @@ use ChamiloSession as Session;
require_once __DIR__.'/../inc/global.inc.php';
$this_section = SECTION_COURSES;
$groupRights = Session::read('group_member_with_upload_rights');
$nameTools = get_lang('VoiceRecord');
$nameTools = get_lang('Voice record');
api_protect_course_script();
api_block_anonymous_users();
@ -76,7 +76,7 @@ if (!is_dir($filepath)) {
//groups //TODO: clean
if (!empty($groupId)) {
$interbreadcrumb[] = ["url" => "../group/group_space.php?".api_get_cidreq(), "name" => get_lang('GroupSpace')];
$interbreadcrumb[] = ["url" => "../group/group_space.php?".api_get_cidreq(), "name" => get_lang('Group area')];
$group = GroupManager :: get_group_properties($groupId);
$path = explode('/', $dir);
if ('/'.$path[1] != $group['directory']) {
@ -141,7 +141,7 @@ $htmlHeadXtra[] = '<script src="'.api_get_path(WEB_LIBRARY_PATH).'swfobject/swfo
$htmlHeadXtra[] = api_get_js('record_audio/record_audio.js');
$actions = Display::toolbarButton(
get_lang('BackTo').' '.get_lang('DocumentsOverview'),
get_lang('Back to').' '.get_lang('Documents overview'),
'document.php?'.api_get_cidreq()."&id=$document_id",
'arrow-left',
'default',

@ -14,13 +14,13 @@ $sessionId = api_get_session_id();
$files = DocumentManager::getDeletedDocuments($courseInfo, $sessionId);
$actions = Display::url(
get_lang('DownloadAll'),
get_lang('Download all'),
api_get_self().'?'.api_get_cidreq().'&action=download_all',
['class' => 'btn btn-default']
);
$actions .= Display::url(
get_lang('DeleteAll'),
get_lang('Delete all'),
api_get_self().'?'.api_get_cidreq().'&action=delete_all',
['class' => 'btn btn-danger']
);
@ -54,7 +54,7 @@ $interbreadcrumb[] = [
'url' => api_get_path(WEB_CODE_PATH).'document/document.php?'.api_get_cidreq(),
'name' => get_lang('Documents'),
];
$template = new Template(get_lang('DeletedDocuments'));
$template = new Template(get_lang('Deleted documents'));
$template->assign('files', $files);
$template->assign(
'actions',

@ -148,7 +148,7 @@ if (empty($temp_file_2delete)) {
$title
);
if ($document) {
Display::addFlash(Display::return_message(get_lang('Saved')));
Display::addFlash(Display::return_message(get_lang('Saved.')));
}
} else {
// Update
@ -186,7 +186,7 @@ if (empty($temp_file_2delete)) {
$title
);
if ($document) {
Display::addFlash(Display::return_message(get_lang('Updated')));
Display::addFlash(Display::return_message(get_lang('Update successful')));
}
}
}
@ -207,7 +207,7 @@ if (empty($exit)) {
echo '<script>window.parent.location.href="'.$location.'"</script>';
exit;
} else {
echo '<div align="center" style="padding-top:150; font-family:Arial, Helvetica, Sans-serif;font-size:25px;color:#aaa;font-weight:bold;">'.get_lang('PleaseStandBy').'</div>';
echo '<div align="center" style="padding-top:150; font-family:Arial, Helvetica, Sans-serif;font-size:25px;color:#aaa;font-weight:bold;">'.get_lang('Please stand by...').'</div>';
$location = api_get_path(WEB_CODE_PATH).'document/document.php?id='.Security::remove_XSS($exit).'&'.api_get_cidreq();
echo '<script>window.parent.location.href="'.$location.'"</script>';
Session::erase('exit_pixlr');

@ -112,7 +112,7 @@ if (isset($group_id) && $group_id != '') {
];
$interbreadcrumb[] = [
'url' => api_get_path(WEB_CODE_PATH).'group/group_space.php?'.api_get_cidreq(),
'name' => get_lang('GroupSpace').' '.$current_group_name,
'name' => get_lang('Group area').' '.$current_group_name,
];
$name_to_show = explode('/', $name_to_show);
unset($name_to_show[1]);
@ -297,7 +297,7 @@ if ($execute_iframe) {
$actionsLeft .= Display::url(
Display::return_icon(
'edit.png',
get_lang('Modify'),
get_lang('Edit'),
'',
ICON_SIZE_MEDIUM
),
@ -325,7 +325,7 @@ if ($execute_iframe) {
]
);
$actionsLeft .= Display::url(
Display::return_icon('pdf.png', get_lang('Export2PDF'), [], ICON_SIZE_MEDIUM),
Display::return_icon('pdf.png', get_lang('Export to PDF format'), [], ICON_SIZE_MEDIUM),
api_get_path(WEB_CODE_PATH).'document/document.php?'.api_get_cidreq(
).'&action=export_to_pdf&id='.$document_id
);

@ -39,7 +39,7 @@ $url = 'document.php?curdirpath='.$pathurl.'&'.api_get_cidreq();
$originaltoolname = get_lang('Documents');
$_course = api_get_course_info();
$interbreadcrumb[] = ['url' => Security::remove_XSS($url), 'name' => $originaltoolname];
$originaltoolname = get_lang('SlideShow');
$originaltoolname = get_lang('Slideshow');
$sessionId = api_get_session_id();
$groupIid = 0;
@ -93,7 +93,7 @@ if ($slide_id != 'all') {
} else {
$imgp = 'action_prev.png';
$first = '<a href="slideshow.php?slide_id=0&curdirpath='.$pathurl.'&'.api_get_cidreq().'">
'.Display::return_icon('action_first.png', get_lang('FirstSlide')).'
'.Display::return_icon('action_first.png', get_lang('First slide')).'
</a>';
}
@ -120,11 +120,11 @@ if ($slide_id != 'all') {
}
if ($slide == $total_slides - 1) {
$imgn = 'action_next_na.png';
$last = Display::return_icon('action_last_na.png', get_lang('LastSlide'));
$last = Display::return_icon('action_last_na.png', get_lang('Last slide'));
} else {
$imgn = 'action_next.png';
$last = '<a href="slideshow.php?slide_id='.($total_slides - 1).'&curdirpath='.$pathurl.'&'.api_get_cidreq().'">
'.Display::return_icon('action_last.png', get_lang('LastSlide')).'
'.Display::return_icon('action_last.png', get_lang('Last slide')).'
</a>';
}
echo Display::return_icon($imgn, get_lang('Next'));
@ -146,13 +146,13 @@ echo Display::url(
// Show thumbnails
if ($slide_id != 'all') {
echo '<a href="slideshow.php?slide_id=all&curdirpath='.$pathurl.'&'.api_get_cidreq().'">'.
Display::return_icon('thumbnails.png', get_lang('ShowThumbnails'), '', ICON_SIZE_MEDIUM).'</a>';
Display::return_icon('thumbnails.png', get_lang('Show Thumbnails'), '', ICON_SIZE_MEDIUM).'</a>';
} else {
echo Display::return_icon('thumbnails_na.png', get_lang('ShowThumbnails'), '', ICON_SIZE_MEDIUM);
echo Display::return_icon('thumbnails_na.png', get_lang('Show Thumbnails'), '', ICON_SIZE_MEDIUM);
}
// Slideshow options
echo '<a href="slideshowoptions.php?curdirpath='.$pathurl.'&'.api_get_cidreq().'">'.
Display::return_icon('settings.png', get_lang('SetSlideshowOptions'), '', ICON_SIZE_MEDIUM).'</a>';
Display::return_icon('settings.png', get_lang('Gallery settings'), '', ICON_SIZE_MEDIUM).'</a>';
echo '</div>';
echo '<br />';
@ -490,15 +490,15 @@ if ($slide_id != 'all' && !empty($image_files_only)) {
$aux = explode('.', htmlspecialchars($image_files_only[$slide]));
$ext = $aux[count($aux) - 1];
if ($imageResize == 'resizing') {
$resize_info = get_lang('Resizing').'<br />';
$resize_info = get_lang('RESIZE').'<br />';
$resize_width = Session::read('image_resizing_width').' x ';
$resize_height = Session::read('image_resizing_height');
} elseif ($imageResize != 'noresizing') {
$resize_info = get_lang('Resizing').'<br />';
$resize_info = get_lang('RESIZE').'<br />';
$resize_width = get_lang('Auto').' x ';
$resize_height = get_lang('Auto');
} else {
$resize_info = get_lang('NoResizing').'<br />';
$resize_info = get_lang('NoRESIZE').'<br />';
$resize_width = '';
$resize_height = '';
}
@ -506,7 +506,7 @@ if ($slide_id != 'all' && !empty($image_files_only)) {
echo '<li class="text-center">';
echo $image_files_only[$slide].' ';
echo Display::toolbarButton(
get_lang('Modify'),
get_lang('Edit'),
'edit_document.php?'.api_get_cidreq().'&'.http_build_query([
'id' => $row['id'],
'origin' => 'slideshow',
@ -527,11 +527,11 @@ if ($slide_id != 'all' && !empty($image_files_only)) {
echo '</ul>';
}
} else {
echo Display::return_message(get_lang('FileNotFound'), 'warning');
echo Display::return_message(get_lang('The file was not found'), 'warning');
}
} else {
if ($slide_id != 'all') {
echo Display::return_message(get_lang('NoDataAvailable'), 'warning');
echo Display::return_message(get_lang('No data available'), 'warning');
}
}

@ -36,13 +36,13 @@ $originaltoolname = get_lang('Documents');
$interbreadcrumb[] = ['url' => $url, 'name' => $originaltoolname];
$url = 'slideshow.php?curdirpath='.$pathurl;
$originaltoolname = get_lang('SlideShow');
$originaltoolname = get_lang('Slideshow');
$interbreadcrumb[] = ['url' => $url, 'name' => $originaltoolname];
// Because $nametools uses $_SERVER['PHP_SELF'] for the breadcrumbs instead of $_SERVER['REQUEST_URI'], I had to
// bypass the $nametools thing and use <b></b> tags in the $interbreadcrump array
$url = 'slideshowoptions.php?curdirpath='.$pathurl;
$originaltoolname = '<b>'.get_lang('SlideshowOptions').'</b>';
$originaltoolname = '<b>'.get_lang('Slideshow Options').'</b>';
$interbreadcrumb[] = ['url' => $url, 'name' => $originaltoolname];
Display::display_header($originaltoolname, 'Doc');
@ -65,14 +65,14 @@ window.onload = <?php echo $image_resizing == 'resizing' ? 'enableresizing' : 'd
</script>
<?php
$actions = '<a href="document.php?action=exit_slideshow&curdirpath='.$pathurl.'">'.Display::return_icon('back.png', get_lang('BackTo').' '.get_lang('DocumentsOverview'), '', ICON_SIZE_MEDIUM).'</a>';
$actions .= '<a href="slideshow.php?curdirpath='.$pathurl.'">'.Display::return_icon('slideshow.png', get_lang('BackTo').' '.get_lang('SlideShow'), '', ICON_SIZE_MEDIUM).'</a>';
$actions = '<a href="document.php?action=exit_slideshow&curdirpath='.$pathurl.'">'.Display::return_icon('back.png', get_lang('Back to').' '.get_lang('Documents overview'), '', ICON_SIZE_MEDIUM).'</a>';
$actions .= '<a href="slideshow.php?curdirpath='.$pathurl.'">'.Display::return_icon('slideshow.png', get_lang('Back to').' '.get_lang('Slideshow'), '', ICON_SIZE_MEDIUM).'</a>';
echo Display::toolbarAction('toolbar-slideshow', [$actions]);
?>
<div class="panel panel-default">
<div class="panel-body">
<form action="slideshow.php?curdirpath=<?php echo $pathurl; ?>" method="post" name="options" id="options" class="form-horizontal">
<legend><?php echo get_lang('SlideshowOptions'); ?></legend>
<legend><?php echo get_lang('Slideshow Options'); ?></legend>
<div class="radio">
<label>
<input name="radio_resizing" type="radio" onClick="disableresizing()" value="noresizing" <?php
@ -81,7 +81,7 @@ echo Display::toolbarAction('toolbar-slideshow', [$actions]);
}
?>>
</label>
<?php echo '<b>'.get_lang('NoResizing').'</b>, '.get_lang('NoResizingComment'); ?>
<?php echo '<b>'.get_lang('NO RESIZING').'</b>, '.get_lang('NO RESIZINGComment'); ?>
</div>
<div class="radio">
<label>
@ -91,7 +91,7 @@ echo Display::toolbarAction('toolbar-slideshow', [$actions]);
}
?>>
</label>
<?php echo '<b>'.get_lang('ResizingAuto').'</b>, '.get_lang('ResizingAutoComment'); ?>
<?php echo '<b>'.get_lang('AUTO RESIZE (default)').'</b>, '.get_lang('AUTO RESIZE (default)Comment'); ?>
</div>
<div class="radio">
<label>
@ -103,7 +103,7 @@ echo Display::toolbarAction('toolbar-slideshow', [$actions]);
}
?>>
</label>
<?php echo '<b>'.get_lang('Resizing').'</b>, '.get_lang('ResizingComment'); ?>
<?php echo '<b>'.get_lang('RESIZE').'</b>, '.get_lang('RESIZEComment'); ?>
</div>
<div class="form-group">
<label class="col-sm-1 control-label"><?php echo get_lang('Width'); ?></label>

@ -83,7 +83,7 @@ if (!empty($groupId)) {
if ($is_allowed_to_edit || GroupManager::is_user_in_group(api_get_user_id(), $group_properties)) {
$interbreadcrumb[] = [
'url' => api_get_path(WEB_CODE_PATH).'group/group_space.php?'.api_get_cidreq(),
'name' => get_lang('GroupSpace'),
'name' => get_lang('Group area'),
];
} else {
api_not_allowed(true);
@ -116,10 +116,10 @@ if ($groupId != 0) {
$add_group_to_title = ' ('.$group_properties['name'].')';
}
if (isset($_REQUEST['certificate'])) {
$nameTools = get_lang('UploadCertificate').$add_group_to_title;
$nameTools = get_lang('Upload certificate').$add_group_to_title;
$is_certificate_mode = true;
} else {
$nameTools = get_lang('UplUploadDocument').$add_group_to_title;
$nameTools = get_lang('Upload documents').$add_group_to_title;
}
$certificateLink = '';
@ -131,7 +131,7 @@ if ($is_certificate_mode) {
if ($is_certificate_mode) {
$interbreadcrumb[] = [
'url' => '../gradebook/index.php?'.api_get_cidreq().$certificateLink,
'name' => get_lang('Gradebook'),
'name' => get_lang('Assessments'),
];
} else {
$interbreadcrumb[] = [
@ -196,11 +196,11 @@ Display::display_header($nameTools, 'Doc');
// Link back to the documents overview
if ($is_certificate_mode) {
$actions = '<a href="document.php?id='.$document_id.'&selectcat='.$selectcat.'&'.api_get_cidreq().'">'.
Display::return_icon('back.png', get_lang('BackTo').' '.get_lang('CertificateOverview'), '', ICON_SIZE_MEDIUM).
Display::return_icon('back.png', get_lang('Back to').' '.get_lang('Certificate overview'), '', ICON_SIZE_MEDIUM).
'</a>';
} else {
$actions = '<a href="document.php?id='.$document_id.'&'.api_get_cidreq().'">'.
Display::return_icon('back.png', get_lang('BackTo').' '.get_lang('DocumentsOverview'), '', ICON_SIZE_MEDIUM).
Display::return_icon('back.png', get_lang('Back to').' '.get_lang('Documents overview'), '', ICON_SIZE_MEDIUM).
'</a>';
}
@ -236,8 +236,8 @@ $repo = Container::getDocumentRepository();
$total = $repo->getTotalSpace(api_get_course_int_id());
$courseQuota = format_file_size(DocumentManager::get_course_quota() - $total);
$label =
get_lang('MaxFileSize').': '.ini_get('upload_max_filesize').'<br/>'.
get_lang('DocumentQuota').': '.$courseQuota;
get_lang('Maximum file size').': '.ini_get('upload_max_filesize').'<br/>'.
get_lang('Space Available').': '.$courseQuota;
$form->addElement('file', 'file', [get_lang('File'), $label], 'style="width: 250px" id="user_upload"');
$form->addElement('text', 'title', get_lang('Title'), ['id' => 'title_file']);
@ -252,21 +252,21 @@ $form->addElement(
'checkbox',
'unzip',
get_lang('Options'),
get_lang('Uncompress'),
get_lang('Uncompress zip'),
'onclick="javascript: check_unzip();" value="1"'
);
if (api_get_setting('search_enabled') === 'true') {
//TODO: include language file
$supportedFormats = get_lang('SupportedFormatsForIndex').': HTML, PDF, TXT, PDF, Postscript, MS Word, RTF, MS Power Point';
$supportedFormats = get_lang('Supported formats for index').': HTML, PDF, TXT, PDF, Postscript, MS Word, RTF, MS Power Point';
$form->addElement(
'checkbox',
'index_document',
'',
get_lang('SearchFeatureDoIndexDocument').'<div style="font-size: 80%" >'.$supportedFormats.'</div>'
get_lang('Index document text?').'<div style="font-size: 80%" >'.$supportedFormats.'</div>'
);
$form->addElement('html', '<br /><div class="sub-form">');
$form->addElement('html', '<div class="label">'.get_lang('SearchFeatureDocumentLanguage').'</div>');
$form->addElement('html', '<div class="label">'.get_lang('Document language for indexation').'</div>');
$form->addLabel(get_lang('Language'), api_get_languages_combo());
$form->addElement('html', '</div><div class="sub-form">');
$specific_fields = get_specific_field_list();
@ -276,14 +276,14 @@ if (api_get_setting('search_enabled') === 'true') {
$form->addElement('html', '</div>');
}
$form->addElement('radio', 'if_exists', get_lang('UplWhatIfFileExists'), get_lang('UplDoNothing'), 'nothing');
$form->addElement('radio', 'if_exists', '', get_lang('UplOverwriteLong'), 'overwrite');
$form->addElement('radio', 'if_exists', '', get_lang('UplRenameLong'), 'rename');
$form->addElement('radio', 'if_exists', get_lang('If file exists:'), get_lang('Do nothing'), 'nothing');
$form->addElement('radio', 'if_exists', '', get_lang('Overwrite the existing file'), 'overwrite');
$form->addElement('radio', 'if_exists', '', get_lang('Rename the uploaded file if it exists'), 'rename');
// Close the java script and avoid the footer up
$form->addElement('html', '</div>');
// Button upload document
$form->addButtonSend(get_lang('SendDocument'), 'submitDocument');
$form->addButtonSend(get_lang('Upload file'), 'submitDocument');
$form->addProgress('DocumentUpload', 'file');
$fileExistsOption = api_get_setting('document_if_file_exists_option');

@ -17,7 +17,7 @@ require_once __DIR__.'/../inc/global.inc.php';
$_SESSION['whereami'] = 'document/webcamclip';
$this_section = SECTION_COURSES;
$nameTools = get_lang('WebCamClip');
$nameTools = get_lang('Webcam Clip');
$htmlHeadXtra[] = api_get_js_simple(api_get_path(WEB_PATH).'web/assets/webcamjs/webcam.js');
$htmlHeadXtra[] = api_get_js('webcam_recorder.js');
$groupRights = Session::read('group_member_with_upload_rights');
@ -81,7 +81,7 @@ if (!is_dir($filepath)) {
if (!empty($groupId)) {
$interbreadcrumb[] = [
"url" => "../group/group_space.php?".api_get_cidreq(),
"name" => get_lang('GroupSpace'),
"name" => get_lang('Group area'),
];
$noPHP_SELF = true;
$group = GroupManager::get_group_properties($groupId);
@ -142,7 +142,7 @@ $actions = Display::toolbarAction(
Display::url(
Display::return_icon(
'back.png',
get_lang('BackTo').' '.get_lang('DocumentsOverview'),
get_lang('Back to').' '.get_lang('Documents overview'),
[],
ICON_SIZE_MEDIUM
),
@ -159,7 +159,7 @@ $template->assign('filename', 'video_clip.jpg');
$layout = $template->get_template('document/webcam.tpl');
$content = $template->fetch($layout);
$template->assign('header', get_lang('TakeYourPhotos'));
$template->assign('header', get_lang('Take your photos'));
$template->assign('actions', $actions);
$template->assign('content', $content);
$template->display_one_col_template();

@ -84,4 +84,4 @@ $doc_id = DocumentManager::addDocument(
$title_to_save
);
$url = 'http://'.$_SERVER['HTTP_HOST'].dirname($_SERVER['REQUEST_URI']).'/'.$documentPath;
echo get_lang('ClipSent');
echo get_lang('Clip sent');

@ -90,7 +90,7 @@ if ($intro_editAllowed) {
$em->persist($toolIntro);
$em->flush();
Display::addFlash(Display::return_message(get_lang('IntroductionTextUpdated'), 'confirmation', false));
Display::addFlash(Display::return_message(get_lang('Intro was updated'), 'confirmation', false));
} else {
// got to the delete command
$intro_cmdDel = true;
@ -105,7 +105,7 @@ if ($intro_editAllowed) {
$em->remove($toolIntro);
$em->flush();
Display::addFlash(Display::return_message(get_lang('IntroductionTextDeleted'), 'confirmation'));
Display::addFlash(Display::return_message(get_lang('Intro was deleted'), 'confirmation'));
}
}
@ -184,7 +184,7 @@ if ($tool == TOOL_COURSE_HOMEPAGE && !isset($_GET['intro_cmdEdit'])) {
// Show only the current course progress step
$last_done_advance = $thematic->get_last_done_thematic_advance();
$thematic_advance_info = $thematic->get_thematic_advance_list($last_done_advance);
$subTitle1 = get_lang('CurrentTopic');
$subTitle1 = get_lang('Current topic');
$class1 = ' current';
} elseif ($displayMode == '2') {
// Show only the two next course progress steps
@ -192,20 +192,20 @@ if ($tool == TOOL_COURSE_HOMEPAGE && !isset($_GET['intro_cmdEdit'])) {
$next_advance_not_done = $thematic->get_next_thematic_advance_not_done(2);
$thematic_advance_info = $thematic->get_thematic_advance_list($last_done_advance);
$thematic_advance_info2 = $thematic->get_thematic_advance_list($next_advance_not_done);
$subTitle1 = $subTitle2 = get_lang('NextTopic');
$subTitle1 = $subTitle2 = get_lang('Next topic');
} elseif ($displayMode == '3') {
// Show the current and next course progress steps
$last_done_advance = $thematic->get_last_done_thematic_advance();
$next_advance_not_done = $thematic->get_next_thematic_advance_not_done();
$thematic_advance_info = $thematic->get_thematic_advance_list($last_done_advance);
$thematic_advance_info2 = $thematic->get_thematic_advance_list($next_advance_not_done);
$subTitle1 = get_lang('CurrentTopic');
$subTitle2 = get_lang('NextTopic');
$subTitle1 = get_lang('Current topic');
$subTitle2 = get_lang('Next topic');
$class1 = ' current';
}
if (!empty($thematic_advance_info)) {
$thematic_advance = get_lang('CourseThematicAdvance');
$thematic_advance = get_lang('Course progress');
$thematicScore = $thematic->get_total_average_of_thematic_advances().'%';
$thematicUrl = api_get_path(WEB_CODE_PATH).'course_progress/index.php?action=thematic_details&'.api_get_cidreq();
$thematic_info = $thematic->get_thematic_list($thematic_advance_info['thematic_id']);
@ -235,7 +235,7 @@ if ($tool == TOOL_COURSE_HOMEPAGE && !isset($_GET['intro_cmdEdit'])) {
<h4 class="title-topics">'.Display::returnFontAwesomeIcon('book').strip_tags($thematic_info['title']).'</h4>
<p class="date">'.Display::returnFontAwesomeIcon('calendar-o').$thematic_advance_info['start_date'].'</p>
<div class="views">'.Display::returnFontAwesomeIcon('file-text-o').strip_tags($thematic_advance_info['content']).'</div>
<p class="time">'.Display::returnFontAwesomeIcon('clock-o').get_lang('DurationInHours').' : '.$thematic_advance_info['duration'].' - <a href="'.$thematicUrl.'">'.get_lang('SeeDetail').'</a></p>
<p class="time">'.Display::returnFontAwesomeIcon('clock-o').get_lang('Duration in hours').' : '.$thematic_advance_info['duration'].' - <a href="'.$thematicUrl.'">'.get_lang('See detail').'</a></p>
</div>
</div>';
@ -251,7 +251,7 @@ if ($tool == TOOL_COURSE_HOMEPAGE && !isset($_GET['intro_cmdEdit'])) {
<h4 class="title-topics">'.Display::returnFontAwesomeIcon('book').$thematic_info2['title'].'</h4>
<p class="date">'.Display::returnFontAwesomeIcon('calendar-o').$thematic_advance_info2['start_date'].'</p>
<div class="views">'.Display::returnFontAwesomeIcon('file-text-o').strip_tags($thematic_advance_info2['content']).'</div>
<p class="time">'.Display::returnFontAwesomeIcon('clock-o').get_lang('DurationInHours').' : '.$thematic_advance_info2['duration'].' - <a href="'.$thematicUrl.'">'.get_lang('SeeDetail').'</a></p>
<p class="time">'.Display::returnFontAwesomeIcon('clock-o').get_lang('Duration in hours').' : '.$thematic_advance_info2['duration'].' - <a href="'.$thematicUrl.'">'.get_lang('See detail').'</a></p>
</div>
</div>';
}
@ -260,7 +260,7 @@ if ($tool == TOOL_COURSE_HOMEPAGE && !isset($_GET['intro_cmdEdit'])) {
$thematicPanel .= '<div class="col-md-10"><div class="row">'.$thematicItemOne.$thematicItemTwo.'</div></div>';
$thematicPanel .= '</div>';
$thematicPanel .= '<div class="separate">
<a href="'.$thematicUrl.'" class="btn btn-default btn-block">'.get_lang('ShowFullCourseAdvance').'</a>
<a href="'.$thematicUrl.'" class="btn btn-default btn-block">'.get_lang('Show course planning').'</a>
</div>';
$thematicProgress = Display::panelCollapse(
@ -285,7 +285,7 @@ $toolbar = [];
/*if (api_is_allowed_to_edit() && empty($session_id)) {
$tool = [
'name' => get_lang('CustomizeIcons'),
'name' => get_lang('Customize icons'),
'url' => api_get_path(WEB_CODE_PATH).'course_info/tools.php?'.api_get_cidreq(),
'icon' => 'fas fa-cog',
];
@ -316,14 +316,14 @@ if ($intro_dispCommand) {
if (!empty($courseId)) {
$tool = [
'name' => get_lang('Modify'),
'name' => get_lang('Edit'),
'url' => api_get_self().'?'.api_get_cidreq().$blogParam.'&intro_cmdEdit=1',
'icon' => 'fas fa-pencil-alt',
];
$toolbar[] = $tool;
$tool = [
'name' => addslashes(api_htmlentities(get_lang('ConfirmYourChoice'))),
'name' => addslashes(api_htmlentities(get_lang('Please confirm your choice'))),
'url' => api_get_self()."?".api_get_cidreq().$blogParam."&intro_cmdDel=1",
'icon' => 'fas fa-trash-alt',
'class' => 'delete-swal',
@ -331,14 +331,14 @@ if ($intro_dispCommand) {
$toolbar[] = $tool;
} else {
$tool = [
'name' => get_lang('Modify'),
'name' => get_lang('Edit'),
'url' => api_get_self().'?intro_cmdEdit=1',
'icon' => 'fas fa-pencil-alt',
];
$toolbar[] = $tool;
$tool = [
'name' => addslashes(api_htmlentities(get_lang('ConfirmYourChoice'))),
'name' => addslashes(api_htmlentities(get_lang('Please confirm your choice'))),
'url' => api_get_self()."?".api_get_cidreq()."&intro_cmdDel=1",
'icon' => 'fas fa-trash-alt',
'class' => 'delete-swal',

@ -44,7 +44,7 @@ class SelectAjax extends HTML_QuickForm_select
$plHolder = $this->getAttribute('placeholder');
if (empty($plHolder)) {
$plHolder = get_lang('SelectAnOption');
$plHolder = get_lang('Please select an option');
}
$id = $this->getAttribute('id');

@ -87,8 +87,8 @@ class FormValidator extends HTML_QuickForm
//When you want to group buttons use something like this
/* $group = array();
$group[] = $form->createElement('button', 'mark_all', get_lang('MarkAll'));
$group[] = $form->createElement('button', 'unmark_all', get_lang('UnmarkAll'));
$group[] = $form->createElement('button', 'mark_all', get_lang('Select all'));
$group[] = $form->createElement('button', 'unmark_all', get_lang('Unselect all'));
$form->addGroup($group, 'buttons_in_action');
*/
$renderer->setElementTemplate($templateSimple, 'buttons_in_action');
@ -102,7 +102,7 @@ class FormValidator extends HTML_QuickForm
//Set required field template
$this->setRequiredNote(
'<span class="form_required">*</span> <small>'.get_lang('ThisFieldIsRequired').'</small>'
'<span class="form_required">*</span> <small>'.get_lang('Required field').'</small>'
);
$noteTemplate = <<<EOT
@ -195,7 +195,7 @@ EOT;
$this->applyFilter($name, 'trim');
if ($required) {
$this->addRule($name, get_lang('ThisFieldIsRequired'), 'required');
$this->addRule($name, get_lang('Required field'), 'required');
}
return $element;
@ -229,7 +229,7 @@ EOT;
$this->addElement('hidden', $name.'_end');
if ($required) {
$this->addRule($name, get_lang('ThisFieldIsRequired'), 'required');
$this->addRule($name, get_lang('Required field'), 'required');
}
}
@ -329,7 +329,7 @@ EOT;
$element = $this->addElement('textarea', $name, $label, $attributes);
if ($required) {
$this->addRule($name, get_lang('ThisFieldIsRequired'), 'required');
$this->addRule($name, get_lang('Required field'), 'required');
}
return $element;
@ -951,7 +951,7 @@ EOT;
<img id="'.$id.'_preview_image">
</div>
<button class="btn btn-primary" type="button" name="cropButton" id="'.$id.'_crop_button">
<em class="fa fa-crop"></em> '.get_lang('CropYourPicture').'
<em class="fa fa-crop"></em> '.get_lang('Crop your picture').'
</button>
</div>
</div>
@ -1047,7 +1047,7 @@ EOT;
$this->addElement('html_editor', $name, $label, $attributes, $config);
$this->applyFilter($name, 'trim');
if ($required) {
$this->addRule($name, get_lang('ThisFieldIsRequired'), 'required');
$this->addRule($name, get_lang('Required field'), 'required');
}
/** @var HtmlEditor $element */
@ -1122,7 +1122,7 @@ EOT;
*/
public function addButtonAdvancedSettings($name, $label = '')
{
$label = !empty($label) ? $label : get_lang('AdvancedParameters');
$label = !empty($label) ? $label : get_lang('Advanced settings');
return $this->addElement('advanced_settings', $name, $label);
}
@ -1133,7 +1133,7 @@ EOT;
public function addProgress($delay = 2, $label = '')
{
if (empty($label)) {
$label = get_lang('PleaseStandBy');
$label = get_lang('Please stand by...');
}
$this->with_progress_bar = true;
$id = $this->getAttribute('id');
@ -1241,10 +1241,10 @@ EOT;
{
$this->addElement('url', $name, $label, $attributes);
$this->applyFilter($name, 'trim');
$this->addRule($name, get_lang('InsertAValidUrl'), 'url');
$this->addRule($name, get_lang('Insert a valid URL'), 'url');
if ($required) {
$this->addRule($name, get_lang('ThisFieldIsRequired'), 'required');
$this->addRule($name, get_lang('Required field'), 'required');
}
}
@ -1267,7 +1267,7 @@ EOT;
$attributes,
[
'pattern' => '[a-zA-ZñÑ]+',
'title' => get_lang('OnlyLetters'),
'title' => get_lang('Only letters'),
]
);
@ -1276,7 +1276,7 @@ EOT;
$name,
[
$label,
get_lang('OnlyLetters'),
get_lang('Only letters'),
],
$attributes
);
@ -1284,12 +1284,12 @@ EOT;
$this->applyFilter($name, 'trim');
if ($required) {
$this->addRule($name, get_lang('ThisFieldIsRequired'), 'required');
$this->addRule($name, get_lang('Required field'), 'required');
}
$this->addRule(
$name,
get_lang('OnlyLetters'),
get_lang('Only letters'),
'regex',
'/^[a-zA-ZñÑ]+$/'
);
@ -1314,7 +1314,7 @@ EOT;
$attributes,
[
'pattern' => '[a-zA-Z0-9ñÑ]+',
'title' => get_lang('OnlyLettersAndNumbers'),
'title' => get_lang('Only lettersAndNumbers'),
]
);
@ -1323,7 +1323,7 @@ EOT;
$name,
[
$label,
get_lang('OnlyLettersAndNumbers'),
get_lang('Only lettersAndNumbers'),
],
$attributes
);
@ -1331,12 +1331,12 @@ EOT;
$this->applyFilter($name, 'trim');
if ($required) {
$this->addRule($name, get_lang('ThisFieldIsRequired'), 'required');
$this->addRule($name, get_lang('Required field'), 'required');
}
$this->addRule(
$name,
get_lang('OnlyLettersAndNumbers'),
get_lang('Only lettersAndNumbers'),
'regex',
'/^[a-zA-Z0-9ÑÑ]+$/'
);
@ -1370,13 +1370,13 @@ EOT;
$this->applyFilter($name, 'trim');
if ($required) {
$this->addRule($name, get_lang('ThisFieldIsRequired'), 'required');
$this->addRule($name, get_lang('Required field'), 'required');
}
// Rule allows "," and "."
/*$this->addRule(
$name,
get_lang('OnlyNumbers'),
get_lang('Only numbers'),
'regex',
'/(^-?\d\d*\.\d*$)|(^-?\d\d*$)|(^-?\.\d\d*$)|(^-?\d\d*\,\d*$)|(^-?\,\d\d*$)/'
);*/
@ -1384,7 +1384,7 @@ EOT;
if ($allowNegative == false) {
$this->addRule(
$name,
get_lang('NegativeValue'),
get_lang('Negative value'),
'compare',
'>=',
'server',
@ -1397,7 +1397,7 @@ EOT;
if (!is_null($minValue)) {
$this->addRule(
$name,
get_lang('UnderMin'),
get_lang('Under the minimum.'),
'compare',
'>=',
'server',
@ -1410,7 +1410,7 @@ EOT;
if (!is_null($maxValue)) {
$this->addRule(
$name,
get_lang('OverMax'),
get_lang('Value exceeds score.'),
'compare',
'<=',
'server',
@ -1440,7 +1440,7 @@ EOT;
$attributes,
[
'pattern' => '[a-zA-ZñÑ\s]+',
'title' => get_lang('OnlyLettersAndSpaces'),
'title' => get_lang('Only lettersAndSpaces'),
]
);
@ -1449,7 +1449,7 @@ EOT;
$name,
[
$label,
get_lang('OnlyLettersAndSpaces'),
get_lang('Only lettersAndSpaces'),
],
$attributes
);
@ -1457,12 +1457,12 @@ EOT;
$this->applyFilter($name, 'trim');
if ($required) {
$this->addRule($name, get_lang('ThisFieldIsRequired'), 'required');
$this->addRule($name, get_lang('Required field'), 'required');
}
$this->addRule(
$name,
get_lang('OnlyLettersAndSpaces'),
get_lang('Only lettersAndSpaces'),
'regex',
'/^[a-zA-ZñÑ\s]+$/'
);
@ -1487,7 +1487,7 @@ EOT;
$attributes,
[
'pattern' => '[a-zA-Z0-9ñÑ\s]+',
'title' => get_lang('OnlyLettersAndNumbersAndSpaces'),
'title' => get_lang('Only lettersAndNumbersAndSpaces'),
]
);
@ -1496,7 +1496,7 @@ EOT;
$name,
[
$label,
get_lang('OnlyLettersAndNumbersAndSpaces'),
get_lang('Only lettersAndNumbersAndSpaces'),
],
$attributes
);
@ -1504,12 +1504,12 @@ EOT;
$this->applyFilter($name, 'trim');
if ($required) {
$this->addRule($name, get_lang('ThisFieldIsRequired'), 'required');
$this->addRule($name, get_lang('Required field'), 'required');
}
$this->addRule(
$name,
get_lang('OnlyLettersAndNumbersAndSpaces'),
get_lang('Only lettersAndNumbersAndSpaces'),
'regex',
'/^[a-zA-Z0-9ñÑ\s]+$/'
);
@ -1526,17 +1526,17 @@ EOT;
$this->addHtml('
<div class="description-upload">
'.get_lang('ClickToSelectOrDragAndDropMultipleFilesOnTheUploadField').'
'.get_lang('Click on the box below to select files from your computer (you can use CTRL + clic to select various files at a time), or drag and drop some files from your desktop directly over the box below. The system will handle the rest!').'
</div>
<span class="btn btn-success fileinput-button">
<i class="glyphicon glyphicon-plus"></i>
<span>'.get_lang('AddFiles').'</span>
<span>'.get_lang('Add files').'</span>
<!-- The file input field used as target for the file upload widget -->
<input id="'.$inputName.'" type="file" name="files[]" multiple>
</span>
<div id="dropzone">
<div class="button-load">
'.get_lang('UploadFiles').'
'.get_lang('Click or drag and drop files here to upload them').'
</div>
</div>
<br />
@ -1557,7 +1557,7 @@ EOT;
public function addPasswordRule($elementName, $groupName = '')
{
if (api_get_setting('security.check_password') == 'true') {
$message = get_lang('PassTooEasy').': '.api_generate_password();
$message = get_lang('this password is too simple. Use a pass like this').': '.api_generate_password();
if (!empty($groupName)) {
$groupObj = $this->getElement($groupName);
@ -1786,7 +1786,7 @@ EOT;
// Update file name with new one from Chamilo
$(data.context.children()[index]).parent().find('.file_name').html(file.name);
var message = $('<div class=\"col-sm-3\">').html(
$('<span class=\"message-image-success\"/>').text('".addslashes(get_lang('UplUploadSucceeded'))."')
$('<span class=\"message-image-success\"/>').text('".addslashes(get_lang('File upload succeeded!'))."')
);
$(data.context.children()[index]).parent().append(message);
});
@ -1794,7 +1794,7 @@ EOT;
".$redirectCondition."
}).on('fileuploadfail', function (e, data) {
$.each(data.files, function (index) {
var failedMessage = '".addslashes(get_lang('UplUploadFailed'))."';
var failedMessage = '".addslashes(get_lang('The file upload has failed.'))."';
var error = $('<div class=\"col-sm-3\">').html(
$('<span class=\"alert alert-danger\"/>').text(failedMessage)
);

@ -41,7 +41,7 @@ $htmlHeadXtra[] = '<script type="text/javascript" src="'
$navigator = api_get_navigator();
Display::addFlash(
Display::return_message(get_lang('FeatureDisabledBecauseOfUnmaintainedThirdPartyLibraries'), 'error')
Display::return_message(get_lang('This feature has been disabled because the libraries it depends on are no longer unmaintained.'), 'error')
);
$template = new Template();
@ -61,6 +61,6 @@ $template->assign('header', $templateHeader);
$template->assign('content', $content);
$template->assign(
'message',
Display::return_message(get_lang('YourBroswerDoesNotSupportWebRTC'), 'warning')
Display::return_message(get_lang('Your browser does not support native video transmission.'), 'warning')
);
$template->display_one_col_template();

@ -66,7 +66,7 @@ $style .='</style>';
<?php echo $style ?>
<body>
<?php
echo '<h2>'.get_lang('GroupSingle').': '.$group_properties['name'].'</h2>';
echo '<h2>'.get_lang('Group').': '.$group_properties['name'].'</h2>';
if ((
$group_properties['doc_state'] == 2 &&
@ -75,7 +75,7 @@ if ((
){
if (!empty($png_svg_files)) {
echo '<h3>'.get_lang('SelectSVGEditImage').'</h3>';
echo '<h3>'.get_lang('Select a picture (SVG, PNG)').'</h3>';
echo '<ul>';
foreach($png_svg_files as $filename) {
$image = $group_disk_path.$filename;
@ -93,7 +93,7 @@ if ((
echo '</ul>';
}
} else {
echo Display::return_message(get_lang('OnlyAccessFromYourGroup'), 'warning');
echo Display::return_message(get_lang('Only accessible from your group'), 'warning');
}
?>
</body>

@ -64,7 +64,7 @@ $style .='</style>';
<?php
echo '<h2>'.get_lang('Course').': '.$course_info['name'].'</h2>';
if (!empty($png_svg_files)) {
echo '<h3>'.get_lang('SelectSVGEditImage').'</h3>';
echo '<h3>'.get_lang('Select a picture (SVG, PNG)').'</h3>';
echo '<ul>';
foreach($png_svg_files as $filename) {
$image=$disk_path.$filename;
@ -81,7 +81,7 @@ if (!empty($png_svg_files)) {
}
echo '</ul>';
} else {
echo Display::return_message(get_lang('NoSVGImagesInImagesGalleryPath'), 'warning');
echo Display::return_message(get_lang('There are no SVG images in your images gallery directory'), 'warning');
}
?>
</body>

@ -44,10 +44,10 @@ $style .='</style>';
<?php
echo '<h2>'.get_lang('SocialNetwork').': '.get_lang('MyFiles').'</h2>';
echo '<h2>'.get_lang('Social network').': '.get_lang('My files').'</h2>';
if (!empty($png_svg_files)) {
echo '<h3>'.get_lang('SelectSVGEditImage').'</h3>';
echo '<h3>'.get_lang('Select a picture (SVG, PNG)').'</h3>';
echo '<ul>';
foreach($png_svg_files as $filename) {
$image = $user_disk_path.$filename;
@ -63,7 +63,7 @@ if (!empty($png_svg_files)) {
}
echo '</ul>';
} else {
echo Display::return_message(get_lang('NoSVGImages'), 'warning');
echo Display::return_message(get_lang('No SVG image'), 'warning');
}
?>
</body>

@ -74,7 +74,7 @@ $drawFileNameFromSession = Session::read('draw_file');
if (file_exists($saveDir.'/'.$filename.'.'.$extension) &&
empty($drawFileNameFromSession)
) {
$message = get_lang('FileExistsChangeToSave');
$message = get_lang('This file name already exists, choose another to save your image.');
$params = array(
'message' => $message,
'url' => ''
@ -145,10 +145,10 @@ if ($suffix != 'png') {
$relativeUrlPath = '/';
};
$url = api_get_path(WEB_CODE_PATH).'document/document.php?'.api_get_cidreq().'&curdirpath='.urlencode($relativeUrlPath);
$message = get_lang('FileSavedAs').': '.$title;
$message = get_lang('File saved as').': '.$title;
} else {
$url = '';
$message = get_lang('FileExportAs').': '.$title;
$message = get_lang('File export as').': '.$title;
}
$params = array(

@ -14,7 +14,7 @@ class HTML_QuickForm_advanced_settings extends HTML_QuickForm_static
public function __construct($name = '', $label = '')
{
if (empty($label)) {
$label = get_lang('AdvancedParameters');
$label = get_lang('Advanced settings');
}
$this->updateAttributes(
array(

@ -320,7 +320,7 @@ class HTML_QuickForm_file extends HTML_QuickForm_input
if (inputFile.setCustomValidity) {
inputFile.setCustomValidity(
inputFile.title ? inputFile.title : \''.get_lang('OnlyImagesAllowed').'\'
inputFile.title ? inputFile.title : \''.get_lang('Only PNG, JPG or GIF images allowed').'\'
);
}

@ -67,7 +67,7 @@ $style .='</style>';
<?php echo $style ?>
<body>
<?php
echo '<h2>'.get_lang('GroupSingle').': '.$group_properties['name'].'</h2>';
echo '<h2>'.get_lang('Group').': '.$group_properties['name'].'</h2>';
if ((
$group_properties['doc_state'] == 2 &&
@ -75,7 +75,7 @@ if ((
){
if (!empty($png_svg_files)) {
echo '<h3>'.get_lang('SelectSVGEditImage').'</h3>';
echo '<h3>'.get_lang('Select a picture (SVG, PNG)').'</h3>';
echo '<ul>';
foreach($png_svg_files as $filename) {
$image = $group_disk_path.$filename;
@ -93,7 +93,7 @@ if ((
echo '</ul>';
}
} else {
echo Display::return_message(get_lang('OnlyAccessFromYourGroup'), 'warning');
echo Display::return_message(get_lang('Only accessible from your group'), 'warning');
}
?>
</body>

@ -63,7 +63,7 @@ $style .='</style>';
<?php
echo '<h2>'.get_lang('Course').': '.$course_info['name'].'</h2>';
if (!empty($png_svg_files)) {
echo '<h3>'.get_lang('SelectSVGEditImage').'</h3>';
echo '<h3>'.get_lang('Select a picture (SVG, PNG)').'</h3>';
echo '<ul>';
foreach($png_svg_files as $filename) {
$image=$disk_path.$filename;
@ -80,7 +80,7 @@ if (!empty($png_svg_files)) {
}
echo '</ul>';
} else {
echo Display::return_message(get_lang('NoSVGImagesInImagesGalleryPath'), 'warning');
echo Display::return_message(get_lang('There are no SVG images in your images gallery directory'), 'warning');
}
?>
</body>

@ -44,10 +44,10 @@ $style .='</style>';
<?php
echo '<h2>'.get_lang('SocialNetwork').': '.get_lang('MyFiles').'</h2>';
echo '<h2>'.get_lang('Social network').': '.get_lang('My files').'</h2>';
if (!empty($png_svg_files)) {
echo '<h3>'.get_lang('SelectSVGEditImage').'</h3>';
echo '<h3>'.get_lang('Select a picture (SVG, PNG)').'</h3>';
echo '<ul>';
foreach($png_svg_files as $filename) {
$image = $user_disk_path.$filename;
@ -63,7 +63,7 @@ if (!empty($png_svg_files)) {
}
echo '</ul>';
} else {
echo Display::return_message(get_lang('NoSVGImages'), 'warning');
echo Display::return_message(get_lang('No SVG image'), 'warning');
}
?>
</body>

@ -99,7 +99,7 @@ if (phpversion() >= '5.3' && extension_loaded('fileinfo')) {
//checks if the file exists, then rename the new
if (file_exists($saveDir.'/'.$filename.'.'.$extension) && $currentTool=='document/createdraw') {
$message = get_lang('FileExistsChangeToSave');
$message = get_lang('This file name already exists, choose another to save your image.');
$params = array(
'message' => $message,
'url' => ''
@ -174,12 +174,12 @@ if ($suffix != 'png') {
$relativeUrlPath = '/';
};
$url = api_get_path(WEB_CODE_PATH).'document/document.php?'.api_get_cidreq().'&curdirpath='.urlencode($relativeUrlPath);
$message = get_lang('FileSavedAs').': '.$title;
//echo 'alert("'.get_lang('FileSavedAs').': '.$title.'");';
$message = get_lang('File saved as').': '.$title;
//echo 'alert("'.get_lang('File saved as').': '.$title.'");';
//echo 'window.top.location.href="'.$interbreadcrumb.'";';//return to current document list
} else {
$url = '';
$message = get_lang('FileExportAs').': '.$title;
$message = get_lang('File export as').': '.$title;
}
$params = array(

@ -95,7 +95,7 @@ class Rest extends WebService
$course = $em->find('ChamiloCoreBundle:Course', $id);
if (!$course) {
throw new Exception(get_lang('NoCourse'));
throw new Exception(get_lang('This course could not be found'));
}
$this->course = $course;
@ -119,7 +119,7 @@ class Rest extends WebService
$session = $em->find('ChamiloCoreBundle:Session', $id);
if (!$session) {
throw new Exception(get_lang('NoSession'));
throw new Exception(get_lang('The session could not be found'));
}
$this->session = $session;
@ -138,7 +138,7 @@ class Rest extends WebService
$apiKey = self::findUserApiKey($username, self::SERVICE_NAME);
if ($apiKey != $apiKeyToValidate) {
throw new Exception(get_lang('InvalidApiKey'));
throw new Exception(get_lang('Invalid API key'));
}
return new self($username, $apiKey);
@ -434,7 +434,7 @@ class Rest extends WebService
);
if (!$announcement) {
throw new Exception(get_lang('NoAnnouncement'));
throw new Exception(get_lang('No announcement'));
}
return [
@ -625,7 +625,7 @@ class Rest extends WebService
$forumInfo = get_forums($forumId, $this->course->getCode(), true, $sessionId);
if (!isset($forumInfo['iid'])) {
throw new Exception(get_lang('NoForum'));
throw new Exception(get_lang('No forum'));
}
$webCoursePath = api_get_path(WEB_COURSE_PATH).$this->course->getDirectory().'/upload/forum/images/';
@ -737,7 +737,7 @@ class Rest extends WebService
$categoryNone = new CLpCategory();
$categoryNone->setId(0);
$categoryNone->setName(get_lang('WithOutCategory'));
$categoryNone->setName(get_lang('Without category'));
$categoryNone->setPosition(0);
$categories = array_merge([$categoryNone], $categoriesTempList);
@ -1420,7 +1420,7 @@ class Rest extends WebService
if ($result) {
return [
'status' => true,
'message' => get_lang('URLDeleted'),
'message' => get_lang('URL deleted.'),
];
} else {
return [

@ -37,7 +37,7 @@ class ZombieReport implements Countable
'items' => [
[
'name' => 'ceiling',
'label' => get_lang('LastAccess'),
'label' => get_lang('Latest access'),
'type' => 'date_picker',
'default' => $this->get_ceiling('Y-m-d'),
'rules' => [
@ -49,7 +49,7 @@ class ZombieReport implements Countable
],
[
'name' => 'active_only',
'label' => get_lang('ActiveOnly'),
'label' => get_lang('active only'),
'type' => 'checkbox',
'default' => $this->get_active_only(),
],
@ -78,8 +78,8 @@ class ZombieReport implements Countable
['class' => 'well form-horizontal form-search']
);
$form->addDatePicker('ceiling', get_lang('LastAccess'));
$form->addCheckBox('active_only', get_lang('ActiveOnly'));
$form->addDatePicker('ceiling', get_lang('Latest access'));
$form->addCheckBox('active_only', get_lang('active only'));
$form->addButtonSearch(get_lang('Search'));
$params = [
@ -228,16 +228,16 @@ class ZombieReport implements Countable
$col = 0;
$table->set_header($col++, '', false);
$table->set_header($col++, get_lang('OfficialCode'));
$table->set_header($col++, get_lang('FirstName'));
$table->set_header($col++, get_lang('LastName'));
$table->set_header($col++, get_lang('LoginName'));
$table->set_header($col++, get_lang('Email'));
$table->set_header($col++, get_lang('Code'));
$table->set_header($col++, get_lang('First name'));
$table->set_header($col++, get_lang('Last name'));
$table->set_header($col++, get_lang('Login'));
$table->set_header($col++, get_lang('e-mail'));
$table->set_header($col++, get_lang('Profile'));
$table->set_header($col++, get_lang('AuthenticationSource'));
$table->set_header($col++, get_lang('RegisteredDate'));
$table->set_header($col++, get_lang('LastAccess'), false);
$table->set_header($col, get_lang('Active'), false);
$table->set_header($col++, get_lang('Authentication source'));
$table->set_header($col++, get_lang('Registered date'));
$table->set_header($col++, get_lang('Latest access'), false);
$table->set_header($col, get_lang('active'), false);
$table->set_column_filter(5, [$this, 'format_email']);
$table->set_column_filter(6, [$this, 'format_status']);
@ -297,7 +297,7 @@ class ZombieReport implements Countable
$valid = $this->perform_action();
if ($valid) {
echo Display::return_message(get_lang('Updated'), 'confirmation');
echo Display::return_message(get_lang('Update successful'), 'confirmation');
}
$result .= $this->display_data($return);

@ -23,21 +23,21 @@ $message = '';
if (isset($_GET['error'])) {
switch ($_GET['error']) {
case 'document_deleted':
$message = Display::return_message(get_lang('DocumentHasBeenDeleted'), 'error');
$message = Display::return_message(get_lang('The document cannot be displayed because it has been deleted'), 'error');
break;
case 'prerequisites':
$prerequisiteMessage = isset($_GET['prerequisite_message']) ? $_GET['prerequisite_message'] : '';
$message = Display::return_message(get_lang('LearnpathPrereqNotCompleted'), 'warning');
$message = Display::return_message(get_lang('This learning object cannot display because the course prerequisites are not completed. This happens when a course imposes that you follow it step by step or get a minimum score in tests before you reach the next steps.'), 'warning');
if (!empty($prerequisiteMessage)) {
$message = Display::return_message(Security::remove_XSS($prerequisiteMessage), 'warning');
}
break;
case 'document_not_found':
$message = Display::return_message(get_lang('FileNotFound'), 'warning');
$message = Display::return_message(get_lang('The file was not found'), 'warning');
break;
case 'reached_one_attempt':
$message = Display::return_message(get_lang('ReachedOneAttempt'), 'warning');
$message = Display::return_message(get_lang('You can not take this test because you have already reached one attempt'), 'warning');
break;
case 'x_frames_options':
$src = Session::read('x_frame_source');
@ -59,7 +59,7 @@ if (isset($_GET['error'])) {
break;
}
} elseif (isset($_GET['msg']) && $_GET['msg'] == 'exerciseFinished') {
$message = Display::return_message(get_lang('ExerciseFinished'));
$message = Display::return_message(get_lang('Test Finished'));
}
$template = new Template();

@ -9,7 +9,7 @@
* @author Yannick Warnier <yannick.warnier@beeznest.com>
*/
$content_origins = [
'--'.get_lang('GenericScorm').'--',
'--'.get_lang('Generic SCORM').'--',
'--'.get_lang('Other').'--',
'Accent',
'Accenture',

@ -54,6 +54,6 @@ if ($lp) {
}
}
echo Display::return_message(get_lang('ProtectedDocument'), 'error');
echo Display::return_message(get_lang('Protected Document'), 'error');
//api_not_allowed backbutton won't work.
exit;

@ -27,7 +27,7 @@ if ($allowSocial) {
$this_section = SECTION_SOCIAL;
$interbreadcrumb[] = [
'url' => api_get_path(WEB_PATH).'main/social/home.php',
'name' => get_lang('SocialNetwork'),
'name' => get_lang('Social network'),
];
} else {
$this_section = SECTION_MYPROFILE;
@ -47,7 +47,7 @@ $actions = '';
// Comes from normal profile
if ($allowSocial === false && $allowMessage) {
$actions .= '<a href="'.api_get_path(WEB_PATH).'main/messages/new_message.php">'.
Display::return_icon('message_new.png', get_lang('ComposeMessage')).'</a>';
Display::return_icon('message_new.png', get_lang('Compose message')).'</a>';
$actions .= '<a href="'.api_get_path(WEB_PATH).'main/messages/inbox.php">'.
Display::return_icon('inbox.png', get_lang('Inbox')).'</a>';
$actions .= '<a href="'.api_get_path(WEB_PATH).'main/messages/outbox.php">'.
@ -66,7 +66,7 @@ $social_right_content = '';
$keyword = '';
if ($allowSocial) {
$actionsLeft = '<a href="'.api_get_path(WEB_PATH).'main/messages/new_message.php">'.
Display::return_icon('new-message.png', get_lang('ComposeMessage'), [], 32).'</a>';
Display::return_icon('new-message.png', get_lang('Compose message'), [], 32).'</a>';
$actionsLeft .= '<a href="'.api_get_path(WEB_PATH).'main/messages/outbox.php">'.
Display::return_icon('outbox.png', get_lang('Outbox'), [], 32).'</a>';

@ -47,7 +47,7 @@ function add_image_form() {
filepaths.appendChild(elem1);
id_elem1 = "filepath_"+counter_image;
id_elem1 = "\'"+id_elem1+"\'";
document.getElementById("filepath_"+counter_image).innerHTML = "<div class=\"form-group\" ><label class=\"col-sm-4\">'.get_lang('FilesAttachment').'</label><input class=\"col-sm-8\" type=\"file\" name=\"attach_"+counter_image+"\" /></div><div class=\"form-group\" ><label class=\"col-sm-4\">'.get_lang('Description').'</label><div class=\"col-sm-8\"><input style=\"width:100%\" type=\"text\" name=\"legend[]\" /></div></div>";
document.getElementById("filepath_"+counter_image).innerHTML = "<div class=\"form-group\" ><label class=\"col-sm-4\">'.get_lang('Files attachments').'</label><input class=\"col-sm-8\" type=\"file\" name=\"attach_"+counter_image+"\" /></div><div class=\"form-group\" ><label class=\"col-sm-4\">'.get_lang('Description').'</label><div class=\"col-sm-8\"><input style=\"width:100%\" type=\"text\" name=\"legend[]\" /></div></div>";
if (filepaths.childNodes.length == 6) {
var link_attach = document.getElementById("link-more-attach");
if (link_attach) {
@ -56,8 +56,8 @@ function add_image_form() {
}
}
</script>';
$nameTools = get_lang('ComposeMessage');
$tpl = new Template(get_lang('ComposeMessage'));
$nameTools = get_lang('Compose message');
$tpl = new Template(get_lang('Compose message'));
/**
* Shows the compose area + a list of users to select from.
@ -83,7 +83,7 @@ function show_compose_reply_to_message($message_id, $receiver_id, $tpl)
$row = Database::fetch_array($result, 'ASSOC');
$userInfo = api_get_user_info($row['user_sender_id']);
if (empty($row['user_sender_id']) || empty($userInfo)) {
$html = get_lang('InvalidMessageId');
$html = get_lang('The id of the message to reply to is not valid.');
return $html;
}
@ -98,7 +98,7 @@ function show_compose_to_user($receiver_id, $tpl)
{
$userInfo = api_get_user_info($receiver_id);
$html = get_lang('To').':&nbsp;<strong>'.$userInfo['complete_name'].'</strong>';
$default['title'] = api_xml_http_response_encode(get_lang('EnterTitle'));
$default['title'] = api_xml_http_response_encode(get_lang('Please enter a title'));
$default['users'] = [$receiver_id];
$html .= manageForm($default, null, '', $tpl);
@ -130,7 +130,7 @@ function manageForm($default, $select_from_user_list = null, $sent_to = '', $tpl
if (isset($select_from_user_list)) {
$form->addText(
'id_text_name',
get_lang('SendMessageTo'),
get_lang('Send to'),
true,
[
'id' => 'id_text_name',
@ -138,19 +138,19 @@ function manageForm($default, $select_from_user_list = null, $sent_to = '', $tpl
'autocomplete' => 'off',
]
);
$form->addRule('id_text_name', get_lang('ThisFieldIsRequired'), 'required');
$form->addRule('id_text_name', get_lang('Required field'), 'required');
$form->addElement('html', '<div id="id_div_search" style="padding:0px" class="message-select-box" >&nbsp;</div>');
$form->addElement('hidden', 'user_list', 0, ['id' => 'user_list']);
} else {
if (!empty($sent_to)) {
$form->addLabel(get_lang('SendMessageTo'), $sent_to);
$form->addLabel(get_lang('Send to'), $sent_to);
}
if (empty($default['users'])) {
//fb select
$form->addElement(
'select_ajax',
'users',
get_lang('SendMessageTo'),
get_lang('Send to'),
[],
[
'multiple' => 'multiple',
@ -165,7 +165,7 @@ function manageForm($default, $select_from_user_list = null, $sent_to = '', $tpl
$userGroup = new UserGroup();
$group_info = $userGroup->get($group_id);
$form->addElement('label', get_lang('ToGroup'), api_xml_http_response_encode($group_info['name']));
$form->addElement('label', get_lang('To social group'), api_xml_http_response_encode($group_info['name']));
$form->addElement('hidden', 'group_id', $group_id);
$form->addElement('hidden', 'parent_id', $message_id);
}
@ -181,14 +181,14 @@ function manageForm($default, $select_from_user_list = null, $sent_to = '', $tpl
if (isset($_GET['re_id'])) {
$message_reply_info = MessageManager::get_message_by_id($_GET['re_id']);
$default['title'] = get_lang('MailSubjectReplyShort').' '.Security::remove_XSS($message_reply_info['title']);
$default['title'] = get_lang('RE:').' '.Security::remove_XSS($message_reply_info['title']);
$form->addHidden('re_id', (int) $_GET['re_id']);
$form->addHidden('save_form', 'save_form');
// Adding reply mail
$user_reply_info = api_get_user_info($message_reply_info['user_sender_id']);
$default['content'] = '<p><br/></p>'.sprintf(
get_lang('XWroteY'),
get_lang('%s wrote: <br /><i>%s</i>'),
$user_reply_info['complete_name'],
Security::filter_terms($message_reply_info['content'])
);
@ -202,12 +202,12 @@ function manageForm($default, $select_from_user_list = null, $sent_to = '', $tpl
$fileListToString = !empty($attachments) ? implode('<br />', $attachments) : '';
$form->addLabel('', $fileListToString);
}
$default['title'] = '['.get_lang('MailSubjectForwardShort').": ".Security::remove_XSS($message_reply_info['title']).']';
$default['title'] = '['.get_lang('Fwd').": ".Security::remove_XSS($message_reply_info['title']).']';
$form->addHidden('forward_id', $forwardId);
$form->addHidden('save_form', 'save_form');
$receiverInfo = api_get_user_info($message_reply_info['user_receiver_id']);
$forwardMessage = '---------- '.get_lang('ForwardedMessage').' ---------'.'<br />';
$forwardMessage = '---------- '.get_lang('Forwarded message').' ---------'.'<br />';
$forwardMessage .= get_lang('Date').': '.api_get_local_time($message_reply_info['send_date']).'<br />';
$forwardMessage .= get_lang('Subject').': '.Security::remove_XSS($message_reply_info['title']).'<br />';
$forwardMessage .= get_lang('To').': '.$receiverInfo['complete_name'].' - '.$receiverInfo['email'].' <br />';
@ -220,7 +220,7 @@ function manageForm($default, $select_from_user_list = null, $sent_to = '', $tpl
'<div id="file_uploads"><div id="filepath_1">
<div id="filepaths" class="form-horizontal">
<div id="paths-file" class="form-group">
<label class="col-sm-4">'.get_lang('FilesAttachment').'</label>
<label class="col-sm-4">'.get_lang('Files attachments').'</label>
<input class="col-sm-8" type="file" name="attach_1"/>
</div>
</div>
@ -237,9 +237,9 @@ function manageForm($default, $select_from_user_list = null, $sent_to = '', $tpl
$form->addLabel(
'',
'<span id="link-more-attach"><a class="btn btn-default" href="javascript://" onclick="return add_image_form()">'.
get_lang('AddOneMoreFile').'</a></span>&nbsp;('.
get_lang('Add one more file').'</a></span>&nbsp;('.
sprintf(
get_lang('MaximunFileSizeX'),
get_lang('Maximun file size: %s'),
format_file_size(api_get_setting('message_max_upload_filesize'))
).')'
);
@ -252,12 +252,12 @@ function manageForm($default, $select_from_user_list = null, $sent_to = '', $tpl
src="'.api_get_path(WEB_CODE_PATH).'messages/record_audio.php"></iframe>'
);
$form->addButtonSend(get_lang('SendMessage'), 'compose');
$form->setRequiredNote('<span class="form_required">*</span> <small>'.get_lang('ThisFieldIsRequired').'</small>');
$form->addButtonSend(get_lang('Send message'), 'compose');
$form->setRequiredNote('<span class="form_required">*</span> <small>'.get_lang('Required field').'</small>');
if (!empty($group_id) && !empty($message_id)) {
$message_info = MessageManager::get_message_by_id($message_id);
$default['title'] = get_lang('MailSubjectReplyShort')." ".$message_info['title'];
$default['title'] = get_lang('RE:')." ".$message_info['title'];
}
$form->setDefaults($default);
$html = '';
@ -300,7 +300,7 @@ function manageForm($default, $select_from_user_list = null, $sent_to = '', $tpl
if ($res) {
$userInfo = api_get_user_info($userId);
Display::addFlash(Display::return_message(
get_lang('MessageSentTo')."&nbsp;<b>".$userInfo['complete_name_with_username']."</b>",
get_lang('The message has been sent to')."&nbsp;<b>".$userInfo['complete_name_with_username']."</b>",
'confirmation',
false
));
@ -308,7 +308,7 @@ function manageForm($default, $select_from_user_list = null, $sent_to = '', $tpl
}
MessageManager::cleanAudioMessage();
} else {
Display::addFlash(Display::return_message('ErrorSendingMessage', 'error'));
Display::addFlash(Display::return_message('There was an error while trying to send the message.', 'error'));
}
}
Security::clear_token();
@ -328,7 +328,7 @@ if ($allowSocial) {
$this_section = SECTION_SOCIAL;
$interbreadcrumb[] = [
'url' => api_get_path(WEB_CODE_PATH).'social/home.php',
'name' => get_lang('SocialNetwork'),
'name' => get_lang('Social network'),
];
} else {
$this_section = SECTION_MYPROFILE;
@ -348,9 +348,9 @@ $social_right_content = null;
if ($group_id != 0) {
$social_right_content .= '<div class=actions>';
$social_right_content .= '<a href="'.api_get_path(WEB_CODE_PATH).'social/group_view.php?id='.$group_id.'">'.
Display::return_icon('back.png', api_xml_http_response_encode(get_lang('ComposeMessage'))).'</a>';
Display::return_icon('back.png', api_xml_http_response_encode(get_lang('Compose message'))).'</a>';
$social_right_content .= '<a href="'.api_get_path(WEB_CODE_PATH).'messages/new_message.php?group_id='.$group_id.'">'.
Display::return_icon('message_new.png', api_xml_http_response_encode(get_lang('ComposeMessage'))).'</a>';
Display::return_icon('message_new.png', api_xml_http_response_encode(get_lang('Compose message'))).'</a>';
$social_right_content .= '</div>';
} else {
if ($allowSocial) {
@ -358,7 +358,7 @@ if ($group_id != 0) {
$social_right_content .= '<div class=actions>';
if (api_get_setting('allow_message_tool') === 'true') {
$social_right_content .= '<a href="'.api_get_path(WEB_CODE_PATH).'messages/new_message.php">'.
Display::return_icon('message_new.png', get_lang('ComposeMessage')).'</a>';
Display::return_icon('message_new.png', get_lang('Compose message')).'</a>';
$social_right_content .= '<a href="'.api_get_path(WEB_CODE_PATH).'messages/inbox.php">'.
Display::return_icon('inbox.png', get_lang('Inbox')).'</a>';
$social_right_content .= '<a href="'.api_get_path(WEB_CODE_PATH).'messages/outbox.php">'.
@ -425,7 +425,7 @@ if (!isset($_POST['compose'])) {
}
$social_right_content .= manageForm($default, null, null, $tpl);
} else {
$social_right_content .= Display::return_message(get_lang('ErrorSendingMessage'), 'error');
$social_right_content .= Display::return_message(get_lang('There was an error while trying to send the message.'), 'error');
}
}
}

@ -33,7 +33,7 @@ if ($allowSocial) {
$this_section = SECTION_SOCIAL;
$interbreadcrumb[] = [
'url' => api_get_path(WEB_PATH).'main/social/home.php',
'name' => get_lang('SocialNetwork'),
'name' => get_lang('Social network'),
];
} else {
$this_section = SECTION_MYPROFILE;
@ -48,7 +48,7 @@ $interbreadcrumb[] = [
$actions = '';
if ($allowMessage) {
$actions .= '<a href="'.api_get_path(WEB_PATH).'main/messages/new_message.php">'.
Display::return_icon('message_new.png', get_lang('ComposeMessage')).'</a>';
Display::return_icon('message_new.png', get_lang('Compose message')).'</a>';
$actions .= '<a href="'.api_get_path(WEB_PATH).'main/messages/inbox.php">'.
Display::return_icon('inbox.png', get_lang('Inbox')).'</a>';
$actions .= '<a href="'.api_get_path(WEB_PATH).'main/messages/outbox.php">'.

@ -12,7 +12,7 @@ $htmlHeadXtra[] = '<script type="text/javascript" src="'.api_get_path(WEB_LIBRAR
$htmlHeadXtra[] = '<script src="'.api_get_path(WEB_LIBRARY_PATH).'swfobject/swfobject.js"></script>';
$htmlHeadXtra[] = api_get_js('record_audio/record_audio.js');
$tpl = new Template(get_lang('ComposeMessage'), false, false, false, true);
$tpl = new Template(get_lang('Compose message'), false, false, false, true);
$record = $tpl->get_template('message/record_audio.tpl');
$tpl->assign('user_id', api_get_user_id());

@ -23,7 +23,7 @@ if (empty($messageId)) {
if ($allowSocial) {
$this_section = SECTION_SOCIAL;
$interbreadcrumb[] = ['url' => api_get_path(WEB_PATH).'main/social/home.php', 'name' => get_lang('SocialNetwork')];
$interbreadcrumb[] = ['url' => api_get_path(WEB_PATH).'main/social/home.php', 'name' => get_lang('Social network')];
} else {
$this_section = SECTION_MYPROFILE;
$interbreadcrumb[] = ['url' => api_get_path(WEB_PATH).'main/auth/profile.php', 'name' => get_lang('Profile')];
@ -33,7 +33,7 @@ $interbreadcrumb[] = ['url' => 'inbox.php', 'name' => get_lang('Messages')];
$social_right_content = '<div class="actions">';
if ($allowMessage) {
$social_right_content .= '<a href="'.api_get_path(WEB_PATH).'main/messages/new_message.php">'.
Display::return_icon('new-message.png', get_lang('ComposeMessage')).'</a>';
Display::return_icon('new-message.png', get_lang('Compose message')).'</a>';
$social_right_content .= '<a href="'.api_get_path(WEB_PATH).'main/messages/inbox.php">'.
Display::return_icon('inbox.png', get_lang('Inbox')).'</a>';
$social_right_content .= '<a href="'.api_get_path(WEB_PATH).'main/messages/outbox.php">'.

@ -26,14 +26,14 @@ if ($form->validate()) {
$em->flush();
Display::addFlash(
Display::return_message(get_lang('CategoryAdded'), 'success')
Display::return_message(get_lang('Category added'), 'success')
);
header("Location: $baseUrl");
exit;
}
$toolName = get_lang('AddCategory');
$toolName = get_lang('Add category');
$interbreadcrumb[] = [
'name' => get_lang('Portfolio'),
'url' => $baseUrl,

@ -44,14 +44,14 @@ if ($form->validate()) {
$em->flush();
Display::addFlash(
Display::return_message(get_lang('PortfolioItemAdded'), 'success')
Display::return_message(get_lang('Portfolio item added'), 'success')
);
header("Location: $baseUrl");
exit;
}
$toolName = get_lang('AddPortfolioItem');
$toolName = get_lang('Add item to portfolio');
$interbreadcrumb[] = [
'name' => get_lang('Portfolio'),
'url' => $baseUrl,

@ -26,14 +26,14 @@ if ($form->validate()) {
$em->flush();
Display::addFlash(
Display::return_message(get_lang('Updated'), 'success')
Display::return_message(get_lang('Update successful'), 'success')
);
header("Location: $baseUrl");
exit;
}
$toolName = get_lang('EditCategory');
$toolName = get_lang('Edit this category');
$interbreadcrumb[] = [
'name' => get_lang('Portfolio'),
'url' => $baseUrl,

@ -39,14 +39,14 @@ if ($form->validate()) {
$em->flush();
Display::addFlash(
Display::return_message(get_lang('ItemUpdated'), 'success')
Display::return_message(get_lang('Item updated'), 'success')
);
header("Location: $baseUrl");
exit;
}
$toolName = get_lang('EditPortfolioItem');
$toolName = get_lang('Edit portfolio item');
$interbreadcrumb[] = [
'name' => get_lang('Portfolio'),
'url' => $baseUrl,

@ -114,7 +114,7 @@ switch ($action) {
$em->flush();
Display::addFlash(
Display::return_message(get_lang('VisibilityChanged'), 'success')
Display::return_message(get_lang('The visibility has been changed.'), 'success')
);
header("Location: $baseUrl");
@ -137,7 +137,7 @@ switch ($action) {
$em->flush();
Display::addFlash(
Display::return_message(get_lang('CategoryDeleted'), 'success')
Display::return_message(get_lang('The category has been deleted.'), 'success')
);
header("Location: $baseUrl");
@ -182,7 +182,7 @@ switch ($action) {
$em->flush();
Display::addFlash(
Display::return_message(get_lang('VisibilityChanged'), 'success')
Display::return_message(get_lang('The visibility has been changed.'), 'success')
);
header("Location: $baseUrl");
@ -205,7 +205,7 @@ switch ($action) {
$em->flush();
Display::addFlash(
Display::return_message(get_lang('ItemDeleted'), 'success')
Display::return_message(get_lang('Item deleted'), 'success')
);
header("Location: $baseUrl");

@ -8,7 +8,7 @@ if ($currentUserId == $user->getId()) {
$baseUrl.'action=add_item'
);
$actions[] = Display::url(
Display::return_icon('folder.png', get_lang('AddCategory'), [], ICON_SIZE_MEDIUM),
Display::return_icon('folder.png', get_lang('Add category'), [], ICON_SIZE_MEDIUM),
$baseUrl.'action=add_category'
);
$actions[] = Display::url(

@ -44,20 +44,20 @@ $result_forum = Database::query($sql_forum);
echo '<div class="row">
<input type="hidden" id="rs_id" name ="rs_id" value="'.$id.'">
<div class="formw">'.get_lang('PleaseSelectTasks').'</div>
<div class="formw">'.get_lang('Please select tasks').'</div>
</div>';
echo '<div class="row"><div class="formw"><select name ="work_id" id="work_id">';
echo '<option value="0"'.(($row['colid'] == $rs->work_id) ? "selected" : "").'>'.get_lang('PleaseSelect').'</option>';
echo '<option value="0"'.(($row['colid'] == $rs->work_id) ? "selected" : "").'>'.get_lang('Please select').'</option>';
while ($row = Database::fetch_assoc($result_tasks)) {
echo '<option value="'.$row['colid'].'"'.(($row['colid'] == $rs->work_id) ? "selected" : "").'>'.
$row['coltitle'].'</option>';
}
echo '</select></div><div>';
echo '<div class="row">
<div class="formw">'.get_lang('PleaseSelectThread').'</div>
<div class="formw">'.get_lang('Please selectThread').'</div>
</div>';
echo '<div class="row"><div class="formw"><select name ="forum_id" id="forum_id">';
echo '<option value="0"'.(($row['colid'] == $rs->work_id) ? "forum_id" : "").'>'.get_lang('PleaseSelect').'</option>';
echo '<option value="0"'.(($row['colid'] == $rs->work_id) ? "forum_id" : "").'>'.get_lang('Please select').'</option>';
while ($row = Database::fetch_assoc($result_forum)) {
echo '<option value="'.$row['colid'].'"'.(($row['colid'] == $rs->forum_id) ? "selected" : "").'>'.
$row['coltitle'].'</option>';

@ -50,7 +50,7 @@ $action = isset($_GET['action']) ? $_GET['action'] : '';
$interbreadcrumb[] = [
'url' => api_get_path(WEB_CODE_PATH).'ticket/tickets.php?project_id='.$projectId,
'name' => get_lang('MyTickets'),
'name' => get_lang('My tickets'),
];
$interbreadcrumb[] = [
@ -75,7 +75,7 @@ switch ($action) {
TicketManager::deleteCategory($id);
Display::addFlash(Display::return_message(get_lang('Deleted')));
} else {
Display::addFlash(Display::return_message(get_lang('ThisItemIsRelatedToOtherTickets')));
Display::addFlash(Display::return_message(get_lang('This item is related to other tickets.')));
}
header("Location: ".api_get_self().'?project_id='.$projectId);
exit;
@ -135,7 +135,7 @@ switch ($action) {
'sys_lastedit_user_id' => api_get_user_id(),
];
$cat = TicketManager::updateCategory($_GET['id'], $params);
Display::addFlash(Display::return_message(get_lang('Updated')));
Display::addFlash(Display::return_message(get_lang('Update successful')));
header("Location: ".api_get_self().'?project_id='.$projectId);
exit;
}
@ -165,7 +165,7 @@ function modify_filter($id, $params, $row)
}
$result .= Display::url(
Display::return_icon('user.png', get_lang('AssignUser')),
Display::return_icon('user.png', get_lang('Assign user')),
"categories_add_user.php?id={$row['id']}&project_id=".$projectId
);
@ -182,8 +182,8 @@ function modify_filter($id, $params, $row)
$table->set_header(0, '', false);
$table->set_header(1, get_lang('Title'), false);
$table->set_header(2, get_lang('Description'), true, ["style" => "width:200px"]);
$table->set_header(3, get_lang('TotalTickets'), false);
$table->set_header(4, get_lang('Actions'), true);
$table->set_header(3, get_lang('Total tickets'), false);
$table->set_header(4, get_lang('Detail'), true);
$table->set_column_filter(4, 'modify_filter');
Display::display_header($toolName);

@ -48,14 +48,14 @@ if ($form->validate()) {
$values = $form->exportValues();
TicketManager::deleteAllUserInCategory($categoryId);
TicketManager::addUsersToCategory($categoryId, $values['users']);
Display::addFlash(Display::return_message(get_lang('Updated')));
Display::addFlash(Display::return_message(get_lang('Update successful')));
header('Location: '.api_get_self().'?id='.$categoryId.'&project_id='.$projectId);
exit;
}
$interbreadcrumb[] = [
'url' => api_get_path(WEB_CODE_PATH).'ticket/tickets.php?project_id='.$projectId,
'name' => get_lang('MyTickets'),
'name' => get_lang('My tickets'),
];
$interbreadcrumb[] = [

@ -168,13 +168,13 @@ function save_ticket()
header('Location:'.api_get_path(WEB_CODE_PATH).'ticket/tickets.php');
exit;
} else {
Display::addFlash(Display::return_message(get_lang('ThereWasAnErrorRegisteringTheTicket')));
Display::addFlash(Display::return_message(get_lang('There was an error registering your ticket')));
}
}
$interbreadcrumb[] = [
'url' => api_get_path(WEB_CODE_PATH).'ticket/tickets.php',
'name' => get_lang('MyTickets'),
'name' => get_lang('My tickets'),
];
$userId = api_get_user_id();
@ -201,15 +201,15 @@ $sourceAttributes = [
'id' => 'source_id',
'for' => 'source_id',
];
$sourceList[TicketManager::SOURCE_PLATFORM] = get_lang('SrcPlatform');
$sourceList[TicketManager::SOURCE_PLATFORM] = get_lang('Platform');
if (api_is_platform_admin()) {
$sourceAttributes = [
'id' => 'source_id',
'for' => 'source_id',
];
$sourceList[TicketManager::SOURCE_EMAIL] = get_lang('SrcEmail');
$sourceList[TicketManager::SOURCE_PHONE] = get_lang('SrcPhone');
$sourceList[TicketManager::SOURCE_PRESENTIAL] = get_lang('SrcPresential');
$sourceList[TicketManager::SOURCE_EMAIL] = get_lang('E-mail');
$sourceList[TicketManager::SOURCE_PHONE] = get_lang('Phone');
$sourceList[TicketManager::SOURCE_PRESENTIAL] = get_lang('Presential');
}
// Priority List
@ -303,7 +303,7 @@ if (api_is_platform_admin()) {
$form->addElement(
'text',
'personal_email',
get_lang('PersonalEmail'),
get_lang('Personal e-mail'),
[
'id' => 'personal_email',
]
@ -387,15 +387,15 @@ if (!empty($courseInfo)) {
$form->setDefaults($params);
$form->addElement('file', 'attach_1', get_lang('FilesAttachment'));
$form->addElement('file', 'attach_1', get_lang('Files attachments'));
$form->addLabel('', '<span id="filepaths"><div id="filepath_1"></div></span>');
$form->addLabel(
'',
'<span id="link-more-attach">
<span class="btn btn-success" onclick="return add_image_form()">'.get_lang('AddOneMoreFile').'</span>
<span class="btn btn-success" onclick="return add_image_form()">'.get_lang('Add one more file').'</span>
</span>
('.sprintf(get_lang('MaximunFileSizeX'), format_file_size(api_get_setting('message_max_upload_filesize'))).')
('.sprintf(get_lang('Maximun file size: %s'), format_file_size(api_get_setting('message_max_upload_filesize'))).')
'
);
@ -403,7 +403,7 @@ $form->addElement('html', '<br/>');
$form->addElement(
'button',
'compose',
get_lang('SendMessage'),
get_lang('Send message'),
null,
null,
null,
@ -413,15 +413,15 @@ $form->addElement(
]
);
$form->addRule('content', get_lang('ThisFieldIsRequired'), 'required');
$form->addRule('category_id', get_lang('ThisFieldIsRequired'), 'required');
$form->addRule('subject', get_lang('ThisFieldIsRequired'), 'required');
$form->addRule('content', get_lang('Required field'), 'required');
$form->addRule('category_id', get_lang('Required field'), 'required');
$form->addRule('subject', get_lang('Required field'), 'required');
if ($form->validate()) {
save_ticket();
}
Display::display_header(get_lang('ComposeMessage'));
Display::display_header(get_lang('Compose message'));
echo '<div class="actions">';
echo Display::url(

@ -37,7 +37,7 @@ $action = isset($_GET['action']) ? $_GET['action'] : '';
$interbreadcrumb[] = [
'url' => api_get_path(WEB_CODE_PATH).'ticket/tickets.php',
'name' => get_lang('MyTickets'),
'name' => get_lang('My tickets'),
];
$interbreadcrumb[] = [
@ -52,7 +52,7 @@ switch ($action) {
TicketManager::deletePriority($id);
Display::addFlash(Display::return_message(get_lang('Deleted')));
} else {
Display::addFlash(Display::return_message(get_lang('ThisItemIsRelatedToOtherTickets'), 'warning'));
Display::addFlash(Display::return_message(get_lang('This item is related to other tickets.'), 'warning'));
}
header("Location: ".api_get_self());
exit;
@ -103,7 +103,7 @@ switch ($action) {
'description' => $values['description'],
];
$cat = TicketManager::updatePriority($_GET['id'], $params);
Display::addFlash(Display::return_message(get_lang('Updated')));
Display::addFlash(Display::return_message(get_lang('Update successful')));
header("Location: ".api_get_self());
exit;
}
@ -146,7 +146,7 @@ function modify_filter($id, $params, $row)
$table->set_header(0, '', false);
$table->set_header(1, get_lang('Title'), false);
$table->set_header(2, get_lang('Description'), true, ["style" => "width:200px"]);
$table->set_header(3, get_lang('Actions'), true);
$table->set_header(3, get_lang('Detail'), true);
$table->set_column_filter('3', 'modify_filter');
Display::display_header($toolName);
@ -154,7 +154,7 @@ Display::display_header($toolName);
$items = [
'icon' => 'new_folder.png',
'url' => 'priorities.php?action=add',
'content' => get_lang('AddPriority'),
'content' => get_lang('Add priority'),
];
echo '<div class="actions">';
echo Display::url(

@ -35,7 +35,7 @@ $action = isset($_GET['action']) ? $_GET['action'] : '';
$interbreadcrumb[] = [
'url' => api_get_path(WEB_CODE_PATH).'ticket/tickets.php',
'name' => get_lang('MyTickets'),
'name' => get_lang('My tickets'),
];
$interbreadcrumb[] = [
@ -55,7 +55,7 @@ switch ($action) {
TicketManager::deleteProject($id);
Display::addFlash(Display::return_message(get_lang('Deleted')));
} else {
Display::addFlash(Display::return_message(get_lang('ThisItemIsRelatedToOtherTickets')));
Display::addFlash(Display::return_message(get_lang('This item is related to other tickets.')));
}
header("Location: ".api_get_self());
exit;
@ -106,7 +106,7 @@ switch ($action) {
'sys_lastedit_user_id' => api_get_user_id(),
];
TicketManager::updateProject($id, $params);
Display::addFlash(Display::return_message(get_lang('Updated')));
Display::addFlash(Display::return_message(get_lang('Update successful')));
header("Location: ".api_get_self());
exit;
}
@ -157,7 +157,7 @@ function modify_filter($id, $params, $row)
$table->set_header(0, '', false);
$table->set_header(1, get_lang('Title'), false);
$table->set_header(2, get_lang('Description'), true, ["style" => "width:200px"]);
$table->set_header(3, get_lang('Actions'), true);
$table->set_header(3, get_lang('Detail'), true);
$table->set_column_filter('3', 'modify_filter');
Display::display_header('');
@ -165,7 +165,7 @@ Display::display_header('');
$items = [
'icon' => 'new_folder.png',
'url' => 'projects.php?action=add',
'content' => get_lang('AddProject'),
'content' => get_lang('Add project'),
];
echo '<div class="actions">';

@ -9,7 +9,7 @@ api_protect_admin_script();
$interbreadcrumb[] = [
'url' => api_get_path(WEB_CODE_PATH).'ticket/tickets.php',
'name' => get_lang('MyTickets'),
'name' => get_lang('My tickets'),
];
$action = isset($_GET['action']) ? $_GET['action'] : 'projects';

@ -37,7 +37,7 @@ $action = isset($_GET['action']) ? $_GET['action'] : '';
$interbreadcrumb[] = [
'url' => api_get_path(WEB_CODE_PATH).'ticket/tickets.php',
'name' => get_lang('MyTickets'),
'name' => get_lang('My tickets'),
];
$interbreadcrumb[] = [
'url' => api_get_path(WEB_CODE_PATH).'ticket/settings.php',
@ -51,7 +51,7 @@ switch ($action) {
TicketManager::deleteStatus($id);
Display::addFlash(Display::return_message(get_lang('Deleted')));
} else {
Display::addFlash(Display::return_message(get_lang('ThisItemIsRelatedToOtherTickets'), 'warning'));
Display::addFlash(Display::return_message(get_lang('This item is related to other tickets.'), 'warning'));
}
header("Location: ".api_get_self());
@ -103,7 +103,7 @@ switch ($action) {
'description' => $values['description'],
];
$cat = TicketManager::updateStatus($id, $params);
Display::addFlash(Display::return_message(get_lang('Updated')));
Display::addFlash(Display::return_message(get_lang('Update successful')));
header("Location: ".api_get_self());
exit;
}
@ -147,7 +147,7 @@ function modify_filter($id, $params, $row)
$table->set_header(0, '', false);
$table->set_header(1, get_lang('Title'), false);
$table->set_header(2, get_lang('Description'), true, ["style" => "width:200px"]);
$table->set_header(3, get_lang('Actions'), true);
$table->set_header(3, get_lang('Detail'), true);
$table->set_column_filter('3', 'modify_filter');
Display::display_header($toolName);
@ -155,7 +155,7 @@ Display::display_header($toolName);
$items = [
'icon' => 'new_folder.png',
'url' => 'status.php?action=add',
'content' => get_lang('AddStatus'),
'content' => get_lang('Add status'),
];
echo '<div class="actions">';
echo Display::url(

@ -1,9 +1,6 @@
<?php
/* For licensing terms, see /license.txt */
/**
* @package chamilo.plugin.ticket
*/
require_once __DIR__.'/../inc/global.inc.php';
api_protect_admin_script();
@ -20,7 +17,7 @@ $history = TicketManager::get_assign_log($ticket_id);
if (count($history) == 0) {
?>
<tr>
<td colspan="2"><?php echo api_ucfirst(get_lang('TicketNoHistory')); ?></td>
<td colspan="2"><?php echo api_ucfirst(get_lang('No history')); ?></td>
</tr>
<?php
}

@ -1,9 +1,6 @@
<?php
/* For licensing terms, see /license.txt */
/**
* @package chamilo.plugin.ticket
*/
$cidReset = true;
require_once __DIR__.'/../inc/global.inc.php';
@ -14,9 +11,9 @@ $user_id = api_get_user_id();
$isAdmin = api_is_platform_admin();
$interbreadcrumb[] = [
'url' => api_get_path(WEB_CODE_PATH).'ticket/tickets.php',
'name' => get_lang('MyTickets'),
'name' => get_lang('My tickets'),
];
$interbreadcrumb[] = ['url' => '#', 'name' => get_lang('TicketDetail')];
$interbreadcrumb[] = ['url' => '#', 'name' => get_lang('Ticket details')];
$disableReponseButtons = '';
$htmlHeadXtra[] = '<script>
@ -41,13 +38,13 @@ $(function() {
});
$(".responseyes").click(function () {
if(!confirm("'.get_lang('AreYouSure').' : '.strtoupper(get_lang('Yes')).'. '.get_lang('IfYouAreSureTheTicketWillBeClosed').'")){
if(!confirm("'.get_lang('Are you sure').' : '.strtoupper(get_lang('Yes')).'. '.get_lang('If you are certain, the ticket will be closed.').'")){
return false;
}
});
$(".responseno").click(function () {
if(!confirm("'.get_lang('AreYouSure').' : '.strtoupper(get_lang('No')).'")){
if(!confirm("'.get_lang('Are you sure').' : '.strtoupper(get_lang('No')).'")){
return false;
}
});
@ -146,7 +143,7 @@ if (!isset($_REQUEST['ticket_id'])) {
$ticket_id,
$user_id
);
Display::addFlash(Display::return_message(get_lang('Updated')));
Display::addFlash(Display::return_message(get_lang('Update successful')));
header("Location:".api_get_self()."?ticket_id=".$ticket_id);
exit;
}
@ -195,7 +192,7 @@ foreach ($messages as $message) {
$counterLink = Display::url('#'.$counter, api_get_self().'?ticket_id='.$ticket_id.'#note-'.$counter);
$messageToShow .= '<a id="note-'.$counter.'"> </a><h4>'.sprintf(
get_lang('UpdatedByX'),
get_lang('Update successfulByX'),
$message['user_info']['complete_name_with_message_link']
);
@ -211,7 +208,7 @@ foreach ($messages as $message) {
$counter++;
}
$subject = get_lang('ReplyShort').': '.Security::remove_XSS($ticket['ticket']['subject']);
$subject = get_lang('Re:').': '.Security::remove_XSS($ticket['ticket']['subject']);
if ($ticket['ticket']['status_id'] != TicketManager::STATUS_FORWARDED &&
$ticket['ticket']['status_id'] != TicketManager::STATUS_CLOSE
@ -253,7 +250,7 @@ if ($ticket['ticket']['status_id'] != TicketManager::STATUS_FORWARDED &&
}
$messageToSend .= sprintf(
get_lang('AssignedChangeFromXToY'),
get_lang('Assignee changed from %s to %s'),
$oldUserName,
$userCompleteName
).'<br />';
@ -284,7 +281,7 @@ if ($ticket['ticket']['status_id'] != TicketManager::STATUS_FORWARDED &&
$oldPriorityTitle = $oldPriority->getName();
}
$messageToSend .= sprintf(
get_lang('PriorityChangeFromXToY'),
get_lang('Priority changed from %s to %s'),
$oldPriorityTitle,
$newPriorityTitle
).'<br />';
@ -307,7 +304,7 @@ if ($ticket['ticket']['status_id'] != TicketManager::STATUS_FORWARDED &&
}
$messageToSend .= sprintf(
get_lang('StatusChangeFromXToY'),
get_lang('Status changed from %s to %s'),
$oldStatusTitle,
$newTitle
).'<br />';
@ -328,11 +325,11 @@ if ($ticket['ticket']['status_id'] != TicketManager::STATUS_FORWARDED &&
TicketManager::sendNotification(
$ticket_id,
get_lang('TicketUpdated'),
get_lang('TicketUpdate successful'),
$messageToSend
);
Display::addFlash(Display::return_message(get_lang('Saved')));
Display::addFlash(Display::return_message(get_lang('Saved.')));
header("Location:".api_get_self()."?ticket_id=".$ticket_id);
exit;
}
@ -350,7 +347,7 @@ $bold = '';
if ($ticket['ticket']['status_id'] == TicketManager::STATUS_CLOSE) {
$bold = 'style = "font-weight: bold;"';
}
$senderData = get_lang('AddedBy').' '.$ticket['usuario']['complete_name_with_message_link'];
$senderData = get_lang('added by').' '.$ticket['usuario']['complete_name_with_message_link'];
echo '<table width="100%" >
<tr>
@ -365,7 +362,7 @@ echo '<table width="100%" >
'#',
['title' => $ticket['ticket']['start_date'], 'class' => 'boot-tooltip']
).'. '.
get_lang('TicketUpdated').' '.
get_lang('TicketUpdate successful').' '.
Display::url(
date_to_str_ago($ticket['ticket']['sys_lastedit_datetime_from_db']),
'#',
@ -387,11 +384,11 @@ echo '<table width="100%" >
if (!empty($ticket['ticket']['assigned_last_user'])) {
$assignedUser = api_get_user_info($ticket['ticket']['assigned_last_user']);
echo '<tr>
<td><p><b>'.get_lang('AssignedTo').': </b>'.$assignedUser['complete_name_with_message_link'].'<p></td>
<td><p><b>'.get_lang('Assigned to').': </b>'.$assignedUser['complete_name_with_message_link'].'<p></td>
</tr>';
} else {
echo '<tr>
<td><p><b>'.get_lang('AssignedTo').': </b>-<p></td>
<td><p><b>'.get_lang('Assigned to').': </b>-<p></td>
</tr>';
}
if ($ticket['ticket']['course_url'] != null) {
@ -516,11 +513,11 @@ function getForm($ticket)
'checkbox',
'confirmation',
null,
get_lang('RequestConfirmation')
get_lang('Request confirmation')
);
}
$form->addElement('file', 'attach_1', get_lang('FilesAttachment'));
$form->addElement('file', 'attach_1', get_lang('Files attachments'));
$form->addLabel(
'',
'<span id="filepaths"><div id="filepath_1"></div></span>'
@ -528,13 +525,13 @@ function getForm($ticket)
$form->addLabel(
'',
'<span id="link-more-attach">
<span class="btn btn-success" onclick="return add_image_form()">'.get_lang('AddOneMoreFile').'</span>
<span class="btn btn-success" onclick="return add_image_form()">'.get_lang('Add one more file').'</span>
</span>
('.sprintf(get_lang('MaximunFileSizeX'), format_file_size(api_get_setting('message_max_upload_filesize'))).')'
('.sprintf(get_lang('Maximun file size: %s'), format_file_size(api_get_setting('message_max_upload_filesize'))).')'
);
$form->addElement('html', '<br/>');
$form->addButtonSend(get_lang('Send'));
$form->addButtonSend(get_lang('Send message'));
return $form;
}

@ -43,10 +43,10 @@ $(function() {
function display_advanced_search_form () {
if ($("#advanced_search_form").css("display") == "none") {
$("#advanced_search_form").css("display","block");
$("#img_plus_and_minus").html(\'&nbsp;'.Display::returnFontAwesomeIcon('arrow-down').' '.get_lang('AdvancedSearch').'\');
$("#img_plus_and_minus").html(\'&nbsp;'.Display::returnFontAwesomeIcon('arrow-down').' '.get_lang('Advanced search').'\');
} else {
$("#advanced_search_form").css("display","none");
$("#img_plus_and_minus").html(\'&nbsp;'.Display::returnFontAwesomeIcon('arrow-right').' '.get_lang('AdvancedSearch').'\');
$("#img_plus_and_minus").html(\'&nbsp;'.Display::returnFontAwesomeIcon('arrow-right').' '.get_lang('Advanced search').'\');
}
}
</script>';
@ -83,11 +83,11 @@ switch ($action) {
[
'#',
get_lang('Date'),
get_lang('LastUpdate'),
get_lang('Last update'),
get_lang('Category'),
get_lang('User'),
get_lang('Program'),
get_lang('AssignedTo'),
get_lang('Course Program</a>. If your course has no code, whatever the reason, invent one. For instance <i>INNOVATION</i> if the course is about Innovation Management'),
get_lang('Assigned to'),
get_lang('Status'),
get_lang('Description'),
],
@ -132,7 +132,7 @@ $isAllow = TicketManager::userIsAllowInProject(api_get_user_info(), $projectId);
$isAdmin = api_is_platform_admin();
$actionRight = '';
Display::display_header(get_lang('MyTickets'));
Display::display_header(get_lang('My tickets'));
if (!empty($projectId)) {
$getParameters = [];
@ -198,10 +198,10 @@ if (!empty($projectId)) {
}
$selectPriority = TicketManager::getPriorityList();
$selectStatusUnread = [
'' => get_lang('StatusAll'),
'yes' => get_lang('StatusUnread'),
'no' => get_lang('StatusRead'),
$selectUnread = [
'' => get_lang('All'),
'yes' => get_lang('Unread'),
'no' => get_lang('Read'),
];
// Create a search-box
@ -219,7 +219,7 @@ if (!empty($projectId)) {
$advancedSearch = Display::url(
'<span id="img_plus_and_minus">&nbsp;'.
Display::returnFontAwesomeIcon('arrow-right').' '.get_lang('AdvancedSearch'),
Display::returnFontAwesomeIcon('arrow-right').' '.get_lang('Advanced search'),
'javascript://',
[
'class' => 'btn btn-default advanced-parameters',
@ -274,11 +274,11 @@ if (!empty($projectId)) {
]
);
$ticketLabel = get_lang('AllTickets');
$ticketLabel = get_lang('All tickets');
$url = api_get_path(WEB_CODE_PATH).'ticket/tickets.php?project_id='.$projectId;
if (!isset($_GET['keyword_assigned_to'])) {
$ticketLabel = get_lang('MyTickets');
$ticketLabel = get_lang('My tickets');
$url = api_get_path(WEB_CODE_PATH).'ticket/tickets.php?project_id='.$projectId.'&keyword_assigned_to='.api_get_user_id();
}
@ -324,7 +324,7 @@ if (!empty($projectId)) {
);
$advancedSearchForm->addHidden('project_id', $projectId);
$advancedSearchForm->addHeader(get_lang('AdvancedSearch'));
$advancedSearchForm->addHeader(get_lang('Advanced search'));
$advancedSearchForm->addSelect(
'keyword_category',
get_lang('Category'),
@ -335,7 +335,7 @@ if (!empty($projectId)) {
$advancedSearchForm->addDateTimePicker('keyword_start_date_end', get_lang('Until'));
$advancedSearchForm->addSelect(
'keyword_assigned_to',
get_lang('AssignedTo'),
get_lang('Assigned to'),
$selectAdmins,
['placeholder' => get_lang('All')]
);
@ -352,7 +352,7 @@ if (!empty($projectId)) {
['placeholder' => get_lang('All')]
);
$advancedSearchForm->addText('keyword_course', get_lang('Course'), false);
$advancedSearchForm->addButtonSearch(get_lang('AdvancedSearch'), 'submit_advanced');
$advancedSearchForm->addButtonSearch(get_lang('Advanced search'), 'submit_advanced');
$advancedSearchForm->display();
} else {
if (api_get_setting('ticket_allow_student_add') === 'true') {
@ -368,20 +368,20 @@ if ($isAdmin) {
$table->set_header(0, '#', true);
$table->set_header(1, get_lang('Status'), true);
$table->set_header(2, get_lang('Date'), true);
$table->set_header(3, get_lang('LastUpdate'), true);
$table->set_header(3, get_lang('Last update'), true);
$table->set_header(4, get_lang('Category'), true);
$table->set_header(5, get_lang('CreatedBy'), true);
$table->set_header(6, get_lang('AssignedTo'), true);
$table->set_header(5, get_lang('Created by'), true);
$table->set_header(6, get_lang('Assigned to'), true);
$table->set_header(7, get_lang('Message'), true);
} else {
if ($isAllow == false) {
echo Display::page_subheader(get_lang('MyTickets'));
echo Display::return_message(get_lang('TicketMsgWelcome'));
echo Display::page_subheader(get_lang('My tickets'));
echo Display::return_message(get_lang('Welcome to YOUR tickets section. Here, you\'ll be able to track the state of all the tickets you created in the main tickets section.'));
}
$table->set_header(0, '#', true);
$table->set_header(1, get_lang('Status'), false);
$table->set_header(2, get_lang('Date'), true);
$table->set_header(3, get_lang('LastUpdate'), true);
$table->set_header(3, get_lang('Last update'), true);
$table->set_header(4, get_lang('Category'));
}

@ -135,7 +135,7 @@ function showResults($courseInfo, $weeksCount, $page)
$html = '<form action="tutor.php" name="semanas" id="semanas" method="POST">
<div class="row">
'.get_lang('SelectWeeksSpan').'
'.get_lang('Select the timespan in weeks').'
<select name="weeksNumber" id="weeksNumber" onChange="submit();">
<option value="7" '.(($weeksCount == 7) ? 'selected="selected"' : "").'>7 weeks</option>
<option value="14" '.(($weeksCount == 14) ? 'selected="selected"' : "").'>14 weeks</option>

@ -12,7 +12,7 @@
/**
* Just display the form needed to upload a SCORM and give its settings.
*/
$nameTools = get_lang('FileUpload');
$nameTools = get_lang('File upload');
$interbreadcrumb[] = ["url" => "../lp/lp_controller.php?action=list", "name" => get_lang(TOOL_DOCUMENT)];
Display::display_header($nameTools, "Doc");
// Show the title

@ -39,10 +39,10 @@ function get_zip_files_in_garbage()
/**
* Just display the form needed to upload a SCORM and give its settings.
*/
$nameTools = get_lang('FileUpload');
$nameTools = get_lang('File upload');
$interbreadcrumb[] = [
'url' => api_get_path(WEB_CODE_PATH).'lp/lp_controller.php?action=list&'.api_get_cidreq(),
'name' => get_lang('ToolLearnpath'),
'name' => get_lang('Learning path'),
];
Display::display_header($nameTools, 'Path');
@ -52,7 +52,7 @@ require_once api_get_path(LIBRARY_PATH).'specific_fields_manager.lib.php';
echo '<div class="actions">';
echo '<a href="'.api_get_path(WEB_CODE_PATH).'lp/lp_controller.php?'.api_get_cidreq().'">'.
Display::return_icon('back.png', get_lang('ReturnToLearningPaths'), '', ICON_SIZE_MEDIUM).'</a>';
Display::return_icon('back.png', get_lang('Back to learning paths'), '', ICON_SIZE_MEDIUM).'</a>';
echo '</div>';
$form = new FormValidator(
@ -69,15 +69,15 @@ $form->addHeader($nameTools);
$form->addLabel(null, Display::return_icon('scorm_logo.jpg', null, ['style' => 'width:230px;height:100px']));
$form->addElement('hidden', 'curdirpath', $path);
$form->addElement('hidden', 'tool', $my_tool);
$form->addElement('file', 'user_file', get_lang('FileToUpload'));
$form->addElement('file', 'user_file', get_lang('SCORM or AICC file to upload'));
$form->addProgress();
$form->addRule('user_file', get_lang('ThisFieldIsRequired'), 'required');
$form->addRule('user_file', get_lang('Required field'), 'required');
unset($content_origins[0]);
unset($content_origins[1]);
if (api_get_setting('search_enabled') == 'true') {
$form->addElement('checkbox', 'index_document', '', get_lang('SearchFeatureDoIndexDocument'));
$form->addElement('checkbox', 'index_document', '', get_lang('Index document text?'));
$specific_fields = get_specific_field_list();
foreach ($specific_fields as $specific_field) {
$form->addElement('text', $specific_field['code'], $specific_field['name'].' : ');
@ -85,11 +85,11 @@ if (api_get_setting('search_enabled') == 'true') {
}
if (api_is_platform_admin()) {
$form->addElement('checkbox', 'use_max_score', null, get_lang('UseMaxScore100'));
$form->addElement('checkbox', 'use_max_score', null, get_lang('Use default maximum score of 100'));
}
if (api_get_configuration_value('allow_htaccess_import_from_scorm')) {
$form->addElement('checkbox', 'allow_htaccess', null, get_lang('AllowHtaccessScormImport'));
$form->addElement('checkbox', 'allow_htaccess', null, get_lang('Allow htaccess in the SCORM import'));
}
$form->addButtonUpload(get_lang('Upload'));
@ -98,7 +98,7 @@ $form->addButtonUpload(get_lang('Upload'));
$defaults = ['index_document' => 'checked="checked"', 'use_max_score' => 1];
$form->setDefaults($defaults);
echo Display::return_message(
Display::tag('strong', get_lang('SupportedScormContentMakers')).': '.implode(', ', $content_origins),
Display::tag('strong', get_lang('SCORM Authoring tools supported')).': '.implode(', ', $content_origins),
'normal',
false
);

@ -33,7 +33,7 @@ if (!DocumentManager::get_document_id($_course, $path)) {
/**
* Header.
*/
$nameTools = get_lang('UplUploadDocument');
$nameTools = get_lang('Upload documents');
$interbreadcrumb[] = [
"url" => api_get_path(WEB_CODE_PATH)."document/document.php?curdirpath=".urlencode($path).'&'.api_get_cidreq(),
"name" => get_lang('Documents'),
@ -146,10 +146,10 @@ if (isset($_POST['create_dir']) && $_POST['dirname'] != '') {
$_POST['dirname']
);
if ($created_dir) {
echo Display::return_message(get_lang('DirCr'));
echo Display::return_message(get_lang('Folder created'));
$path = $created_dir;
} else {
echo Display::return_message(get_lang('CannotCreateDir'));
echo Display::return_message(get_lang('Unable to create the folder.'));
}
}
@ -157,9 +157,9 @@ if (isset($_GET['createdir'])) {
//create the form that asks for the directory name
$new_folder_text = '<form action="'.api_get_self().'" method="POST">';
$new_folder_text .= '<input type="hidden" name="curdirpath" value="'.$path.'"/>';
$new_folder_text .= get_lang('NewDir').' ';
$new_folder_text .= get_lang('Name of the new folder').' ';
$new_folder_text .= '<input type="text" name="dirname"/>';
$new_folder_text .= '<input type="submit" name="create_dir" value="'.get_lang('Ok').'"/>';
$new_folder_text .= '<input type="submit" name="create_dir" value="'.get_lang('Validate').'"/>';
$new_folder_text .= '</form>';
//show the form
echo Display::return_message($new_folder_text, 'normal');
@ -168,7 +168,7 @@ if (isset($_GET['createdir'])) {
<p>
<a href="<?php echo api_get_self(); ?>?path=<?php echo $path; ?>&amp;createdir=1">
<?php echo Display::return_icon('new_folder.gif'); ?>
<?php echo get_lang('CreateDir'); ?>
<?php echo get_lang('Create folder'); ?>
</a>
</p>
<?php
@ -203,21 +203,21 @@ if (isset($_GET['createdir'])) {
<?php echo get_lang('Options'); ?>
</td>
<td>
- <input type="checkbox" name="unzip" value="1" onclick="check_unzip()"/> <?php echo get_lang('Uncompress'); ?><br/>
- <?php echo get_lang('UplWhatIfFileExists'); ?><br/>
&nbsp;&nbsp;&nbsp;<input type="radio" name="if_exists" value="nothing" title="<?php echo get_lang('UplDoNothingLong'); ?>" checked="checked"/> <?php echo get_lang('UplDoNothing'); ?><br/>
&nbsp;&nbsp;&nbsp;<input type="radio" name="if_exists" value="overwrite" title="<?php echo get_lang('UplOverwriteLong'); ?>"/> <?php echo get_lang('UplOverwrite'); ?><br/>
&nbsp;&nbsp;&nbsp;<input type="radio" name="if_exists" value="rename" title="<?php echo get_lang('UplRenameLong'); ?>"/> <?php echo get_lang('UplRename'); ?>
- <input type="checkbox" name="unzip" value="1" onclick="check_unzip()"/> <?php echo get_lang('Uncompress zip'); ?><br/>
- <?php echo get_lang('If file exists:'); ?><br/>
&nbsp;&nbsp;&nbsp;<input type="radio" name="if_exists" value="nothing" title="<?php echo get_lang('Don\'t upload if file exists'); ?>" checked="checked"/> <?php echo get_lang('Do nothing'); ?><br/>
&nbsp;&nbsp;&nbsp;<input type="radio" name="if_exists" value="overwrite" title="<?php echo get_lang('Overwrite the existing file'); ?>"/> <?php echo get_lang('Overwrite'); ?><br/>
&nbsp;&nbsp;&nbsp;<input type="radio" name="if_exists" value="rename" title="<?php echo get_lang('Rename the uploaded file if it exists'); ?>"/> <?php echo get_lang('Rename'); ?>
</td>
</tr>
</table>
<input type="submit" value="<?php echo get_lang('Ok'); ?>">
<input type="submit" value="<?php echo get_lang('Validate'); ?>">
</form>
<!-- end upload form -->
<!-- so they can get back to the documents -->
<p><?php echo get_lang('Back'); ?> <?php echo get_lang('To'); ?> <a href="document.php?curdirpath=<?php echo $path; ?>"><?php echo get_lang('DocumentsOverview'); ?></a></p>
<p><?php echo get_lang('Back'); ?> <?php echo get_lang('To'); ?> <a href="document.php?curdirpath=<?php echo $path; ?>"><?php echo get_lang('Documents overview'); ?></a></p>
<?php
Display::display_footer();

@ -7,8 +7,6 @@ use Chamilo\CoreBundle\Component\Utils\ChamiloApi;
* Action controller for the upload process. The display scripts (web forms) redirect
* the process here to do what needs to be done with each file.
*
* @package chamilo.upload
*
* @author Yannick Warnier <ywarnier@beeznest.org>
*/
require_once __DIR__.'/../inc/global.inc.php';
@ -50,11 +48,11 @@ if (isset($_POST['convert'])) {
if (!empty($o_ppt->error)) {
$errorMessage = $o_ppt->error;
} else {
$errorMessage = get_lang('OogieUnknownError');
$errorMessage = get_lang('The conversion failed for an unknown reason.<br />Please contact your administrator to get more information.');
}
}
} else {
$errorMessage = get_lang('OogieBadExtension');
$errorMessage = get_lang('Please upload presentations only. Filename extension should be .ppt or .odp');
}
}
}
@ -68,36 +66,36 @@ if (!$is_allowed_to_edit) {
api_not_allowed(true);
}
$interbreadcrumb[] = ["url" => "../lp/lp_controller.php?action=list", "name" => get_lang("Doc")];
$interbreadcrumb[] = ["url" => "../lp/lp_controller.php?action=list", "name" => get_lang("Document")];
$nameTools = get_lang("OogieConversionPowerPoint");
$nameTools = get_lang("Chamilo RAPID : PowerPoint conversion");
Display :: display_header($nameTools);
$message = get_lang("WelcomeOogieConverter");
$message = get_lang('Welcome to Chamilo RAPID<ul type="1"><li>Browse your hard disk to find any .ppt or .odp file<li>Upload it to Oogie. It will convert it into a SCORM course.<li>You will then be allowed to add audio comments on each slide and insert test and activities between slides.');
if (!empty($errorMessage)) {
echo Display::return_message($errorMessage, 'warning', false);
}
$div_upload_limit = get_lang('UploadMaxSize').' : '.ini_get('post_max_size');
$div_upload_limit = get_lang('Upload max size').' : '.ini_get('post_max_size');
$form = new FormValidator('upload_ppt', 'POST', '?'.api_get_cidreq(), '');
$form->addElement('header', get_lang("WelcomeOogieSubtitle"));
$form->addElement('header', get_lang("A PowerPoint to SCORM Courses converter"));
$form->addElement('html', Display::return_message($message, 'info', false));
$form->addElement('file', 'user_file', [Display::return_icon('powerpoint_big.gif'), $div_upload_limit]);
$form->addElement('checkbox', 'take_slide_name', '', get_lang('TakeSlideName'));
$options = ChamiloApi::getDocumentConversionSizes();
$form->addElement('select', 'slide_size', get_lang('SlideSize'), $options);
$form->addElement('checkbox', 'take_slide_name', '', get_lang('Use the slides names as course learning object names'));
$options = ChamiloApi::getDocumentumentConversionSizes();
$form->addElement('select', 'slide_size', get_lang('Size of the slides'), $options);
if (api_get_setting('search_enabled') === 'true') {
require_once api_get_path(LIBRARY_PATH).'specific_fields_manager.lib.php';
$specific_fields = get_specific_field_list();
$form->addElement('checkbox', 'index_document', '', get_lang('SearchFeatureDoIndexDocument'));
$form->addSelectLanguage('language', get_lang('SearchFeatureDocumentLanguage'));
$form->addElement('checkbox', 'index_document', '', get_lang('Index document text?ument'));
$form->addSelectLanguage('language', get_lang('SearchFeatureDocumentumentLanguage'));
foreach ($specific_fields as $specific_field) {
$form->addElement('text', $specific_field['code'], $specific_field['name'].' : ');
}
}
$form->addButtonUpload(get_lang('ConvertToLP'), 'convert');
$form->addButtonUpload(get_lang('Convert to course'), 'convert');
$form->addElement('hidden', 'ppt2lp', 'true');
$form->addProgress();
$size = api_get_setting('service_ppt2lp', 'size');
@ -108,6 +106,5 @@ $defaults = [
];
$form->setDefaults($defaults);
// display the form
$form->display();
Display::display_footer();

@ -6,8 +6,6 @@
* redirect
* the process here to do what needs to be done with each file.
*
* @package chamilo.upload
*
* @author Yannick Warnier <ywarnier@beeznest.org>
*/
require_once __DIR__.'/../inc/global.inc.php';
@ -65,11 +63,11 @@ if (isset($_POST['convert'])) {
if (!empty($o_doc->error)) {
$errorMessage = $o_doc->error;
} else {
$errorMessage = get_lang('OogieUnknownError');
$errorMessage = get_lang('The conversion failed for an unknown reason.<br />Please contact your administrator to get more information.');
}
}
} else {
$errorMessage = get_lang('WoogieBadExtension');
$errorMessage = get_lang('Please upload text documents only. Filename extension should be .doc, .docx or .odt');
}
}
}
@ -81,13 +79,13 @@ if (!$is_allowed_to_edit) {
api_not_allowed(true);
}
$interbreadcrumb[] = ["url" => "../lp/lp_controller.php?action=list", "name" => get_lang("Doc")];
$nameTools = get_lang("WoogieConversionPowerPoint");
$interbreadcrumb[] = ["url" => "../lp/lp_controller.php?action=list", "name" => get_lang("Document")];
$nameTools = get_lang("Woogie : Word conversion");
Display :: display_header($nameTools);
echo '<span style="color: #5577af; font-size: 16px; font-family: Arial; margin-left: 10px;">'.
get_lang("WelcomeWoogieSubtitle").'</span><br>';
$message = get_lang("WelcomeWoogieConverter");
get_lang("MS Word to course converter").'</span><br>';
$message = get_lang('Welcome to Woogie Rapid Learning<ul type="1"><li>Browse your hard disk to find any .doc, .sxw or .odt file<li>Upload it to Woogie. It will convert it into a SCORM course<li>You will then be able to add audio comments on each page and insert quizzes and other activities between pages</ul>');
echo '<br />';
$s_style = "border-width: 1px;
border-style: solid;
@ -131,7 +129,7 @@ $form = new FormValidator('update_course', 'POST', '', '', 'style="margin: 0;"')
$form->addElement('html', '<br>');
$div_upload_limit = '&nbsp;&nbsp;'.get_lang('UploadMaxSize').' : '.ini_get('post_max_size');
$div_upload_limit = '&nbsp;&nbsp;'.get_lang('Upload max size').' : '.ini_get('post_max_size');
$renderer = $form->defaultRenderer();
// set template for user_file element
@ -156,12 +154,12 @@ $renderer->setCustomElementTemplate($user_file_template);
$form->addElement('file', 'user_file', Display::return_icon('word_big.gif'));
if (api_get_setting('search_enabled') === 'true') {
$form->addElement('checkbox', 'index_document', '', get_lang('SearchFeatureDoIndexDocument'));
$form->addElement('checkbox', 'index_document', '', get_lang('Index document text?ument'));
$form->addElement('html', '<br />');
$form->addElement(
'html',
get_lang(
'SearchFeatureDocumentLanguage'
'SearchFeatureDocumentumentLanguage'
).': &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;'.api_get_languages_combo()
);
$form->addElement('html', '<div class="sub-form">');
@ -172,12 +170,12 @@ if (api_get_setting('search_enabled') === 'true') {
}
/*
* commented because SplitStepsPerChapter is not stable at all
* $form -> addElement ('radio', 'split_steps',null, get_lang('SplitStepsPerPage'),'per_page');
* $form -> addElement ('radio', 'split_steps',null, get_lang('SplitStepsPerChapter'),'per_chapter');
* commented because A section, a learning object is not stable at all
* $form -> addElement ('radio', 'split_steps',null, get_lang('A page, a learning object'),'per_page');
* $form -> addElement ('radio', 'split_steps',null, get_lang('A section, a learning object'),'per_chapter');
*/
$form->addElement('hidden', 'split_steps', 'per_page');
$form->addElement('submit', 'convert', get_lang('ConvertToLP'), 'class="convert_button"');
$form->addElement('submit', 'convert', get_lang('Convert to course'), 'class="convert_button"');
$form->addElement('hidden', 'woogie', 'true');
$form->addProgress();
$defaults = ['split_steps' => 'per_page', 'index_document' => 'checked="checked"'];

@ -142,20 +142,20 @@ class WSCM
if ($uData->getExpirationDate() > $now || !$uData->getExpirationDate()) {
return "valid";
} else {
return get_lang('AccountExpired');
return get_lang('Account expired');
}
} else {
return get_lang('AccountInactive');
return get_lang('Account inactive');
}
} else {
return get_lang('InvalidId');
return get_lang('Login failed - incorrect login or password.');
}
} else {
return get_lang('AccountURLInactive');
return get_lang('Account inactive for this URL');
}
}
return get_lang('InvalidId');
return get_lang('Login failed - incorrect login or password.');
}
/**

@ -26,7 +26,7 @@ class WSCMAnnouncements extends WSCM
return $announcements;
} else {
return get_lang('InvalidId');
return get_lang('Login failed - incorrect login or password.');
}
}
@ -80,7 +80,7 @@ class WSCMAnnouncements extends WSCM
$announcements[0][$field_table]
) : $announcements[0][$field_table];
} else {
return get_lang('InvalidId');
return get_lang('Login failed - incorrect login or password.');
}
}

@ -27,7 +27,7 @@ class WSCMCourses extends WSCM
return $courses_id;
} else {
return get_lang('InvalidId');
return get_lang('Login failed - incorrect login or password.');
}
}
@ -38,7 +38,7 @@ class WSCMCourses extends WSCM
return $course_info['title'];
} else {
return get_lang('InvalidId');
return get_lang('Login failed - incorrect login or password.');
}
}
}

@ -28,7 +28,7 @@ class WSCMForum extends WSCM
return $foruns_id;
} else {
return get_lang('InvalidId');
return get_lang('Login failed - incorrect login or password.');
}
}
@ -55,7 +55,7 @@ class WSCMForum extends WSCM
return $forum_title;
} else {
return get_lang('InvalidId');
return get_lang('Login failed - incorrect login or password.');
}
}
@ -76,7 +76,7 @@ class WSCMForum extends WSCM
return $threads_id;
} else {
return get_lang('InvalidId');
return get_lang('Login failed - incorrect login or password.');
}
}
@ -122,7 +122,7 @@ class WSCMForum extends WSCM
return $thread_info[$field_table];
} else {
return get_lang('InvalidId');
return get_lang('Login failed - incorrect login or password.');
}
}
@ -149,7 +149,7 @@ class WSCMForum extends WSCM
return $thread_info[$field_table];
} else {
return get_lang('InvalidId');
return get_lang('Login failed - incorrect login or password.');
}
}
@ -192,7 +192,7 @@ class WSCMForum extends WSCM
return $posts_id;
} else {
return get_lang('InvalidId');
return get_lang('Login failed - incorrect login or password.');
}
}
@ -238,7 +238,7 @@ class WSCMForum extends WSCM
return ($htmlcode) ? html_entity_decode($post_info[$field_table]) : $post_info[$field_table];
} else {
return get_lang('InvalidId');
return get_lang('Login failed - incorrect login or password.');
}
}
@ -288,7 +288,7 @@ class WSCMForum extends WSCM
return "Post enviado!";
} else {
return get_lang('InvalidId');
return get_lang('Login failed - incorrect login or password.');
}
}
}

@ -55,7 +55,7 @@ class WSCMInbox extends WSCM
return $message;
} else {
return get_lang('InvalidId');
return get_lang('Login failed - incorrect login or password.');
}
}
@ -97,7 +97,7 @@ class WSCMInbox extends WSCM
return $htmlcode ? html_entity_decode($result[0]) : $result[0];
} else {
return get_lang('InvalidId');
return get_lang('Login failed - incorrect login or password.');
}
}
@ -123,7 +123,7 @@ class WSCMInbox extends WSCM
return $message;
} else {
return get_lang('InvalidId');
return get_lang('Login failed - incorrect login or password.');
}
}
@ -161,7 +161,7 @@ class WSCMInbox extends WSCM
return $htmlcode ? html_entity_decode($result[0]) : $result[0];
} else {
return get_lang('InvalidId');
return get_lang('Login failed - incorrect login or password.');
}
}
@ -197,7 +197,7 @@ class WSCMInbox extends WSCM
return $inbox_last_id;
} else {
return get_lang('InvalidId');
return get_lang('Login failed - incorrect login or password.');
}
}

@ -117,7 +117,7 @@ class WSCMUser extends WSCM
if ($count_is_true) {
return Display::return_message(
api_htmlentities(
get_lang('InvitationHasBeenSent'),
get_lang('The invitation has been sent'),
ENT_QUOTES,
$charset
),
@ -127,7 +127,7 @@ class WSCMUser extends WSCM
} else {
return Display::return_message(
api_htmlentities(
get_lang('YouAlreadySentAnInvitation'),
get_lang('You already sent an invitation'),
ENT_QUOTES,
$charset
),
@ -137,7 +137,7 @@ class WSCMUser extends WSCM
}
}
return get_lang('InvalidId');
return get_lang('Login failed - incorrect login or password.');
}
public function accept_friend($username, $password, $userfriend_id)
@ -151,10 +151,10 @@ class WSCMUser extends WSCM
);
SocialManager::invitation_accepted($userfriend_id, $user_id);
return get_lang('AddedContactToList');
return get_lang('Added contact to list');
}
return get_lang('InvalidId');
return get_lang('Login failed - incorrect login or password.');
}
public function denied_invitation($username, $password, $userfriend_id)
@ -163,10 +163,10 @@ class WSCMUser extends WSCM
$user_id = UserManager::get_user_id_from_username($username);
SocialManager::invitation_denied($userfriend_id, $user_id);
return get_lang('InvitationDenied');
return get_lang('Invitation denied');
}
return get_lang('InvalidId');
return get_lang('Login failed - incorrect login or password.');
}
/**

@ -3588,14 +3588,14 @@ function WSCourseDescription($params)
$result = Database::query($sql);
$default_titles = [
get_lang('GeneralDescription'),
get_lang('Description'),
get_lang('Objectives'),
get_lang('Topics'),
get_lang('Methodology'),
get_lang('CourseMaterial'),
get_lang('HumanAndTechnicalResources'),
get_lang('Course material'),
get_lang('Resources'),
get_lang('Assessment'),
get_lang('AddCategory'),
get_lang('Add category'),
];
for ($x = 1; $x < 9; $x++) {

Loading…
Cancel
Save