Update get_lang calls using full string

pull/3016/head
Julio Montoya 6 years ago
parent f537d60625
commit a6db6ac653
  1. 43
      main/badge/assign.php
  2. 2
      main/badge/criteria.php
  3. 22
      main/badge/issued.php
  4. 18
      main/badge/issued_all.php
  5. 50
      main/blog/blog.php
  6. 20
      main/blog/blog_admin.php
  7. 14
      main/calendar/agenda.php
  8. 10
      main/calendar/agenda_js.php
  9. 2
      main/calendar/agenda_list.php
  10. 2
      main/calendar/ical_export.php
  11. 2
      main/calendar/planification.php
  12. 8
      main/course_description/add.php
  13. 12
      main/course_description/course_description_controller.php
  14. 8
      main/course_description/edit.php
  15. 10
      main/course_description/index.php
  16. 6
      main/course_home/activity.php
  17. 8
      main/course_home/course_home.php

@ -9,7 +9,6 @@ use Skill as SkillManager;
*
* @author: Jose Loguercio <jose.loguercio@beeznest.com>
*
* @package chamilo.badge
*/
require_once __DIR__.'/../inc/global.inc.php';
@ -37,7 +36,7 @@ $skillUserRepo = $entityManager->getRepository('ChamiloCoreBundle:SkillRelUser')
$skillLevels = api_get_configuration_value('skill_levels_names');
$skillsOptions = ['' => get_lang('Select')];
$acquiredLevel = ['' => get_lang('None')];
$acquiredLevel = ['' => get_lang('none')];
$formDefaultValues = [];
if (empty($skillLevels)) {
@ -154,8 +153,8 @@ $disableList = [];
$currentUrl = api_get_self().'?user='.$userId.'&current='.$currentLevel;
$form = new FormValidator('assign_skill', 'POST', $currentUrl);
$form->addHeader(get_lang('AssignSkill'));
$form->addText('user_name', get_lang('UserName'), false);
$form->addHeader(get_lang('Assign skill'));
$form->addText('user_name', get_lang('Username'), false);
$levelName = get_lang('Skill');
if (!empty($skillLevels)) {
@ -191,7 +190,7 @@ if (!empty($skillIdFromGet)) {
$skillsOptions[$child['id']] = $child['data']['name'];
}
$levelName = get_lang('SubSkill');
$levelName = get_lang('Sub-skill');
if (!empty($skillLevels)) {
if (isset($skillLevels['levels'][$counter + 2])) {
$levelName = get_lang($skillLevels['levels'][$counter + 2]);
@ -227,20 +226,20 @@ $currentUrl = api_get_self().'?user='.$userId.'&current='.$currentLevel.'&sub_sk
$form->addHidden('sub_skill_list', $subSkillListToString);
$form->addHidden('user', $user->getId());
$form->addHidden('id', $skillId);
$form->addRule('skill', get_lang('ThisFieldIsRequired'), 'required');
$form->addRule('skill', get_lang('Required field'), 'required');
$showLevels = api_get_configuration_value('hide_skill_levels') === false;
if ($showLevels) {
$form->addSelect('acquired_level', get_lang('AcquiredLevel'), $acquiredLevel);
//$form->addRule('acquired_level', get_lang('ThisFieldIsRequired'), 'required');
$form->addSelect('acquired_level', get_lang('Level acquired'), $acquiredLevel);
//$form->addRule('acquired_level', get_lang('Required field'), 'required');
}
$form->addTextarea('argumentation', get_lang('Argumentation'), ['rows' => 6]);
$form->addRule('argumentation', get_lang('ThisFieldIsRequired'), 'required');
$form->addRule('argumentation', get_lang('Required field'), 'required');
$form->addRule(
'argumentation',
sprintf(get_lang('ThisTextShouldBeAtLeastXCharsLong'), 10),
sprintf(get_lang('This text should be at least %s characters long'), 10),
'mintext',
10
);
@ -264,7 +263,7 @@ if ($form->validate()) {
if (!$skill) {
Display::addFlash(
Display::return_message(get_lang('SkillNotFound'), 'error')
Display::return_message(get_lang('Skill not found'), 'error')
);
header('Location: '.api_get_self().'?'.$currentUrl);
@ -275,7 +274,7 @@ if ($form->validate()) {
Display::addFlash(
Display::return_message(
sprintf(
get_lang('TheUserXHasAlreadyAchievedTheSkillY'),
get_lang('The user %s has already achieved the skill %s'),
UserManager::formatUserFullName($user),
$skill->getName()
),
@ -320,12 +319,12 @@ if ($form->validate()) {
if ($counter >= $requiredSkills) {
$bossList = UserManager::getStudentBossList($userId);
if (!empty($bossList)) {
Display::addFlash(Display::return_message(get_lang('MessageSent')));
Display::addFlash(Display::return_message(get_lang('Message Sent')));
$url = api_get_path(WEB_CODE_PATH).'badge/assign.php?user='.$userId.'&id='.$parentId;
$link = Display::url($url, $url);
$subject = get_lang('StudentHadEnoughSkills');
$subject = get_lang('A student has obtained the number of sub-skills needed to validate the mother skill.');
$message = sprintf(
get_lang('StudentXHadEnoughSkillsToGetSkillXToAssignClickHereX'),
get_lang('Learner %s has enough sub-skill to get skill %s. To assign this skill it is possible to go here : %s'),
UserManager::formatUserFullName($user),
$parentData['name'],
$link
@ -346,7 +345,7 @@ if ($form->validate()) {
Display::addFlash(
Display::return_message(
sprintf(
get_lang('SkillXAssignedToUserY'),
get_lang('The skill %s has been assigned to user %s'),
$skill->getName(),
UserManager::formatUserFullName($user)
),
@ -364,17 +363,17 @@ $form->freeze(['user_name']);
if (api_is_drh()) {
$interbreadcrumb[] = [
'url' => api_get_path(WEB_CODE_PATH).'mySpace/index.php',
"name" => get_lang('MySpace'),
"name" => get_lang('Reporting'),
];
if ($user->getStatus() == COURSEMANAGER) {
$interbreadcrumb[] = [
"url" => api_get_path(WEB_CODE_PATH).'mySpace/teachers.php',
'name' => get_lang('Teachers'),
'name' => get_lang('Trainers'),
];
} else {
$interbreadcrumb[] = [
"url" => api_get_path(WEB_CODE_PATH).'mySpace/student.php',
'name' => get_lang('MyStudents'),
'name' => get_lang('My learners'),
];
}
$interbreadcrumb[] = [
@ -384,11 +383,11 @@ if (api_is_drh()) {
} else {
$interbreadcrumb[] = [
'url' => api_get_path(WEB_CODE_PATH).'admin/index.php',
'name' => get_lang('PlatformAdmin'),
'name' => get_lang('Administration'),
];
$interbreadcrumb[] = [
'url' => api_get_path(WEB_CODE_PATH).'admin/user_list.php',
'name' => get_lang('UserList'),
'name' => get_lang('User list'),
];
$interbreadcrumb[] = [
'url' => api_get_path(WEB_CODE_PATH).'admin/user_information.php?user_id='.$userId,
@ -418,6 +417,6 @@ $(function() {
});
</script>';
$template = new Template(get_lang('AddSkill'));
$template = new Template(get_lang('Add skill'));
$template->assign('content', $form->returnForm());
$template->display_one_col_template();

@ -42,7 +42,7 @@ if ($skill) {
}
Display::addFlash(
Display::return_message(get_lang('SkillNotFound'), 'error')
Display::return_message(get_lang('Skill not found'), 'error')
);
header('Location: '.api_get_path(WEB_PATH));

@ -28,7 +28,7 @@ $skillIssue = $entityManager->find('ChamiloCoreBundle:SkillRelUser', $issue);
if (!$skillIssue) {
Display::addFlash(
Display::return_message(
get_lang('SkillNotFound'),
get_lang('Skill not found'),
'warning'
)
);
@ -44,7 +44,7 @@ $skill = $skillIssue->getSkill();
if (!$user || !$skill) {
Display::addFlash(
Display::return_message(get_lang('NoResults'), 'warning')
Display::return_message(get_lang('No results found'), 'warning')
);
header('Location: '.api_get_path(WEB_PATH));
@ -67,7 +67,7 @@ $skillInfo = [
'courses' => [],
];
$titleContent = sprintf(get_lang('IHaveObtainedSkillXOnY'), $skillInfo['name'], api_get_setting('siteName'));
$titleContent = sprintf(get_lang('I have achieved skill %s on %s'), $skillInfo['name'], api_get_setting('siteName'));
// Open Graph Markup
$htmlHeadXtra[] = "
@ -84,7 +84,7 @@ $allowExport = $currentUser ? $currentUser->getId() === $user->getId() : false;
$allowComment = $currentUser ? Skill::userCanAddFeedbackToUser($currentUser, $user) : false;
$skillIssueDate = api_get_local_time($skillIssue->getAcquiredSkillAt());
$currentSkillLevel = get_lang('NoLevelAcquiredYet');
$currentSkillLevel = get_lang('No level acquired yet');
if ($skillIssue->getAcquiredLevel()) {
$currentSkillLevel = $skillLevelRepo->find(['id' => $skillIssue->getAcquiredLevel()])->getName();
}
@ -176,7 +176,7 @@ $allowToEdit = Skill::isAllowed($user->getId(), false);
if ($showLevels && $allowToEdit) {
$formAcquiredLevel = new FormValidator('acquired_level');
$formAcquiredLevel->addSelect('acquired_level', get_lang('AcquiredLevel'), $acquiredLevel);
$formAcquiredLevel->addSelect('acquired_level', get_lang('Level acquired'), $acquiredLevel);
$formAcquiredLevel->addHidden('user', $skillIssue->getUser()->getId());
$formAcquiredLevel->addHidden('issue', $skillIssue->getId());
$formAcquiredLevel->addButtonSave(get_lang('Save'));
@ -196,17 +196,17 @@ if ($showLevels && $allowToEdit) {
}
$form = new FormValidator('comment');
$form->addTextarea('comment', get_lang('NewComment'), ['rows' => 4]);
$form->addTextarea('comment', get_lang('New comment'), ['rows' => 4]);
$form->applyFilter('comment', 'trim');
$form->addRule('comment', get_lang('ThisFieldIsRequired'), 'required');
$form->addRule('comment', get_lang('Required field'), 'required');
$form->addSelect(
'value',
[get_lang('Value'), get_lang('RateTheSkillInPractice')],
[get_lang('Value'), get_lang('On a grade of 1 to 10, how well did you observe that this person could put this skill in practice?')],
['-', 1, 2, 3, 4, 5, 6, 7, 8, 9, 10]
);
$form->addHidden('user', $skillIssue->getUser()->getId());
$form->addHidden('issue', $skillIssue->getId());
$form->addButtonSend(get_lang('Send'));
$form->addButtonSend(get_lang('Send message'));
if ($form->validate() && $allowComment && $allowToEdit) {
$values = $form->exportValues();
@ -277,7 +277,7 @@ if ($allowExport) {
}
}
$template = new Template(get_lang('IssuedBadgeInformation'));
$template = new Template(get_lang('Issued badge information'));
$template->assign('issue_info', $skillIssueInfo);
$template->assign('allow_comment', $allowComment);
$template->assign('allow_export', $allowExport);
@ -297,6 +297,6 @@ $template->assign('badge_error', $badgeInfoError);
$template->assign('personal_badge', $personalBadge);
$template->assign('show_level', $showLevels);
$content = $template->fetch($template->get_template('skill/issued.tpl'));
$template->assign('header', get_lang('IssuedBadgeInformation'));
$template->assign('header', get_lang('Issued badge information'));
$template->assign('content', $content);
$template->display_one_col_template();

@ -30,7 +30,7 @@ $currentUserId = api_get_user_id();
if (!$user || !$skill) {
Display::addFlash(
Display::return_message(get_lang('NoResults'), 'error')
Display::return_message(get_lang('No results found'), 'error')
);
header('Location: '.api_get_path(WEB_PATH));
@ -68,7 +68,7 @@ foreach ($userSkills as $index => $skillIssue) {
$allowDownloadExport = $currentUser ? $currentUser->getId() === $user->getId() : false;
$allowComment = $currentUser ? Skill::userCanAddFeedbackToUser($currentUser, $user) : false;
$skillIssueDate = api_get_local_time($skillIssue->getAcquiredSkillAt());
$currentSkillLevel = get_lang('NoLevelAcquiredYet');
$currentSkillLevel = get_lang('No level acquired yet');
if ($skillIssue->getAcquiredLevel()) {
$currentSkillLevel = $skillLevelRepo->find(['id' => $skillIssue->getAcquiredLevel()])->getName();
}
@ -160,7 +160,7 @@ foreach ($userSkills as $index => $skillIssue) {
'post',
SkillRelUserManager::getIssueUrlAll($skillIssue)
);
$formAcquiredLevel->addSelect('acquired_level', get_lang('AcquiredLevel'), $acquiredLevel);
$formAcquiredLevel->addSelect('acquired_level', get_lang('Level acquired'), $acquiredLevel);
$formAcquiredLevel->addHidden('user', $skillIssue->getUser()->getId());
$formAcquiredLevel->addHidden('issue', $skillIssue->getId());
$formAcquiredLevel->addButtonSend(get_lang('Save'));
@ -183,17 +183,17 @@ foreach ($userSkills as $index => $skillIssue) {
'post',
SkillRelUserManager::getIssueUrlAll($skillIssue)
);
$form->addTextarea('comment', get_lang('NewComment'), ['rows' => 4]);
$form->addTextarea('comment', get_lang('New comment'), ['rows' => 4]);
$form->applyFilter('comment', 'trim');
$form->addRule('comment', get_lang('ThisFieldIsRequired'), 'required');
$form->addRule('comment', get_lang('Required field'), 'required');
$form->addSelect(
'value',
[get_lang('Value'), get_lang('RateTheSkillInPractice')],
[get_lang('Value'), get_lang('On a grade of 1 to 10, how well did you observe that this person could put this skill in practice?')],
['-', 1, 2, 3, 4, 5, 6, 7, 8, 9, 10]
);
$form->addHidden('user', $skillIssue->getUser()->getId());
$form->addHidden('issue', $skillIssue->getId());
$form->addButtonSend(get_lang('Send'));
$form->addButtonSend(get_lang('Send message'));
if ($form->validate() && $allowComment) {
$values = $form->exportValues();
@ -273,7 +273,7 @@ foreach ($userSkills as $index => $skillIssue) {
$allUserBadges[$index]['personal_badge'] = $personalBadge;
}
$template = new Template(get_lang('IssuedBadgeInformation'));
$template = new Template(get_lang('Issued badge information'));
$template->assign('user_badges', $allUserBadges);
$template->assign('show_level', api_get_configuration_value('hide_skill_levels') == false);
@ -281,6 +281,6 @@ $content = $template->fetch(
$template->get_template('skill/issued_all.tpl')
);
$template->assign('header', get_lang('IssuedBadgeInformation'));
$template->assign('header', get_lang('Issued badge information'));
$template->assign('content', $content);
$template->display_one_col_template();

@ -1,10 +1,10 @@
<?php
/* For licensing terms, see /license.txt */
/**
* BLOG HOMEPAGE
* This file takes care of all blog navigation and displaying.
*
* @package chamilo.blogs
*/
require_once __DIR__.'/../inc/global.inc.php';
@ -49,7 +49,7 @@ if (!empty($_POST['edit_post_submit'])) {
$blog_id
);
Display::addFlash(
Display::return_message(get_lang('BlogEdited'), 'success')
Display::return_message(get_lang('The project has been edited.'), 'success')
);
}
@ -65,7 +65,7 @@ if (!empty($_POST['new_task_submit'])) {
);
Display::addFlash(
Display::return_message(get_lang('TaskCreated'), 'success')
Display::return_message(get_lang('The task has been created'), 'success')
);
}
@ -81,7 +81,7 @@ if (isset($_POST['edit_task_submit'])) {
$_POST['task_color']
);
Display::addFlash(
Display::return_message(get_lang('TaskEdited'), 'success')
Display::return_message(get_lang('The task has been edited.'), 'success')
);
}
@ -93,7 +93,7 @@ if (!empty($_POST['assign_task_submit'])) {
$_POST['task_day']
);
Display::addFlash(
Display::return_message(get_lang('TaskAssigned'), 'success')
Display::return_message(get_lang('The task has been assigned.'), 'success')
);
}
@ -108,7 +108,7 @@ if (isset($_POST['assign_task_edit_submit'])) {
$_POST['old_target_date']
);
Display::addFlash(
Display::return_message(get_lang('AssignedTaskEdited'), 'success')
Display::return_message(get_lang('AssignedThe task has been edited.'), 'success')
);
}
if (!empty($_POST['register'])) {
@ -128,7 +128,7 @@ if (!empty($_POST['unregister'])) {
if (!empty($_GET['register'])) {
Blog::subscribeUser((int) $_GET['blog_id'], (int) $_GET['user_id']);
Display::addFlash(
Display::return_message(get_lang('UserRegistered'), 'success')
Display::return_message(get_lang('The user has been registered'), 'success')
);
$flag = 1;
}
@ -140,14 +140,14 @@ if (isset($_GET['action']) && $_GET['action'] == 'manage_tasks') {
if (isset($_GET['do']) && $_GET['do'] == 'delete') {
Blog::deleteTask($blog_id, (int) $_GET['task_id']);
Display::addFlash(
Display::return_message(get_lang('TaskDeleted'), 'success')
Display::return_message(get_lang('The task has been deleted.'), 'success')
);
}
if (isset($_GET['do']) && $_GET['do'] == 'delete_assignment') {
Blog::deleteAssignedTask($blog_id, intval($_GET['task_id']), intval($_GET['user_id']));
Display::addFlash(
Display::return_message(get_lang('TaskAssignmentDeleted'), 'success')
Display::return_message(get_lang('The task assignment has been deleted.'), 'success')
);
}
}
@ -159,11 +159,11 @@ if (isset($_GET['action']) && $_GET['action'] == 'view_post') {
if (api_is_allowed('BLOG_'.$blog_id, 'article_comments_delete', $task_id)) {
Blog::deleteComment($blog_id, (int) $_GET['post_id'], (int) $_GET['comment_id']);
Display::addFlash(
Display::return_message(get_lang('CommentDeleted'), 'success')
Display::return_message(get_lang('The comment has been deleted.'), 'success')
);
} else {
Display::addFlash(
Display::return_message(get_lang('ActionNotAllowed'), 'error')
Display::return_message(get_lang('Action not allowed'), 'error')
);
}
}
@ -173,11 +173,11 @@ if (isset($_GET['action']) && $_GET['action'] == 'view_post') {
Blog::deletePost($blog_id, (int) $_GET['article_id']);
$action = ''; // Article is gone, go to blog home
Display::addFlash(
Display::return_message(get_lang('BlogDeleted'), 'success')
Display::return_message(get_lang('The project has been deleted.'), 'success')
);
} else {
Display::addFlash(
Display::return_message(get_lang('ActionNotAllowed'), 'error')
Display::return_message(get_lang('Action not allowed'), 'error')
);
}
}
@ -186,7 +186,7 @@ if (isset($_GET['action']) && $_GET['action'] == 'view_post') {
if (api_is_allowed('BLOG_'.$blog_id, 'article_rate')) {
Blog::addRating('post', $blog_id, (int) $_GET['post_id'], (int) $_GET['rating']);
Display::addFlash(
Display::return_message(get_lang('RatingAdded'), 'success')
Display::return_message(get_lang('A rating has been added.'), 'success')
);
}
}
@ -194,7 +194,7 @@ if (isset($_GET['action']) && $_GET['action'] == 'view_post') {
if (api_is_allowed('BLOG_'.$blog_id, 'article_comments_add')) {
Blog::addRating('comment', $blog_id, (int) $_GET['comment_id'], (int) $_GET['rating']);
Display::addFlash(
Display::return_message(get_lang('RatingAdded'), 'success')
Display::return_message(get_lang('A rating has been added.'), 'success')
);
}
}
@ -207,25 +207,25 @@ if (isset($_GET['action']) && $_GET['action'] == 'view_post') {
// Set breadcrumb
switch ($action) {
case 'new_post':
$nameTools = get_lang('NewPost');
$nameTools = get_lang('New task');
break;
case 'view_post':
$nameTools = '';
break;
case 'manage_tasks':
$nameTools = get_lang('TaskManager');
$nameTools = get_lang('Roles management');
break;
case 'manage_members':
$nameTools = get_lang('MemberManager');
$nameTools = get_lang('Users management');
break;
case 'manage_rights':
$nameTools = get_lang('RightsManager');
$nameTools = get_lang('Users rights management');
break;
case 'view_search_result':
$nameTools = get_lang('SearchResults');
$nameTools = get_lang('Search results');
break;
case 'execute_task':
$nameTools = get_lang('ExecuteThisTask');
$nameTools = get_lang('A task for me');
break;
default:
$nameTools = Blog::getBlogTitle($blog_id);
@ -241,19 +241,19 @@ $actionsLeft = Display::url(
);
if (api_is_allowed('BLOG_'.$blog_id, 'article_add')) {
$actionsLeft .= Display::url(
Display::return_icon('new_article.png', get_lang('NewPost'), '', ICON_SIZE_MEDIUM),
Display::return_icon('new_article.png', get_lang('New task'), '', ICON_SIZE_MEDIUM),
api_get_self().'?action=new_post&blog_id='.$blog_id.'&'.api_get_cidreq()
);
}
if (api_is_allowed('BLOG_'.$blog_id, 'task_management')) {
$actionsLeft .= Display::url(
Display::return_icon('blog_tasks.png', get_lang('TaskManager'), '', ICON_SIZE_MEDIUM),
Display::return_icon('blog_tasks.png', get_lang('Roles management'), '', ICON_SIZE_MEDIUM),
api_get_self().'?action=manage_tasks&blog_id='.$blog_id.'&'.api_get_cidreq()
);
}
if (api_is_allowed('BLOG_'.$blog_id, 'member_management')) {
$actionsLeft .= Display::url(
Display::return_icon('blog_admin_users.png', get_lang('MemberManager'), '', ICON_SIZE_MEDIUM),
Display::return_icon('blog_admin_users.png', get_lang('Users management'), '', ICON_SIZE_MEDIUM),
api_get_self().'?action=manage_members&blog_id='.$blog_id.'&'.api_get_cidreq()
);
}
@ -419,7 +419,7 @@ switch ($action) {
if (isset($_GET['filter']) && !empty($_GET['filter'])) {
$listArticles = Blog::getDailyResults($blog_id, Database::escape_string($_GET['filter']));
$dateSearch = api_format_date($_GET['filter'], DATE_FORMAT_LONG);
$titleSearch = get_lang('PostsOf').' '.$dateSearch;
$titleSearch = get_lang('Tasks by').' '.$dateSearch;
$tpl->assign('search', $titleSearch);
$tpl->assign('articles', $listArticles);
$blogLayout = $tpl->get_template('blog/blog.tpl');

@ -4,8 +4,6 @@
/**
* BLOG HOMEPAGE
* This file takes care of all blog navigation and displaying.
*
* @package chamilo.blogs
*/
require_once __DIR__.'/../inc/global.inc.php';
$current_course_tool = TOOL_BLOGS;
@ -23,7 +21,7 @@ $origin = api_get_origin();
$action = isset($_GET['action']) ? $_GET['action'] : '';
if (api_is_allowed_to_edit()) {
$nameTools = get_lang('blog_management');
$nameTools = get_lang('Project management');
// showing the header if we are not in the learning path, if we are in
// the learning path, we do not include the banner so we have to explicitly
@ -35,38 +33,38 @@ if (api_is_allowed_to_edit()) {
];
$my_url = '';
if ($action == 'add') {
$current_section = get_lang('AddBlog');
$current_section = get_lang('Create a new project');
$my_url = 'action=add';
} elseif ($action == 'edit') {
$current_section = get_lang('EditBlog');
$current_section = get_lang('Edit a project');
$my_url = 'action=edit&amp;blog_id='.Security::remove_XSS($_GET['blog_id']);
}
Display::display_header('');
}
echo '<div class="actions">';
echo "<a href='".api_get_self()."?".api_get_cidreq()."&action=add'>",
Display::return_icon('new_blog.png', get_lang('AddBlog'), '', ICON_SIZE_MEDIUM)."</a>";
Display::return_icon('new_blog.png', get_lang('Create a new project'), '', ICON_SIZE_MEDIUM)."</a>";
echo '</div>';
if (!empty($_POST['new_blog_submit']) && !empty($_POST['blog_name'])) {
if (isset($_POST['blog_name'])) {
Blog::addBlog($_POST['blog_name'], $_POST['blog_subtitle']);
echo Display::return_message(get_lang('BlogStored'), 'confirmation');
echo Display::return_message(get_lang('The project has been added.'), 'confirmation');
}
}
if (!empty($_POST['edit_blog_submit']) && !empty($_POST['blog_name'])) {
if (strlen(trim($_POST['blog_name'])) > 0) {
Blog::editBlog($_POST['blog_id'], $_POST['blog_name'], $_POST['blog_subtitle']);
echo Display::return_message(get_lang('BlogEdited'), 'confirmation');
echo Display::return_message(get_lang('The project has been edited.'), 'confirmation');
}
}
if (isset($_GET['action']) && $_GET['action'] == 'visibility') {
Blog::changeBlogVisibility(intval($_GET['blog_id']));
echo Display::return_message(get_lang('VisibilityChanged'), 'confirmation');
echo Display::return_message(get_lang('The visibility has been changed.'), 'confirmation');
}
if (isset($_GET['action']) && $_GET['action'] == 'delete') {
Blog::deleteBlog(intval($_GET['blog_id']));
echo Display::return_message(get_lang('BlogDeleted'), 'confirmation');
echo Display::return_message(get_lang('The project has been deleted.'), 'confirmation');
}
if (isset($_GET['action']) && $_GET['action'] == 'add') {
@ -85,7 +83,7 @@ if (api_is_allowed_to_edit()) {
if (!$_POST || (!empty($_POST) && (empty($_POST['edit_blog_submit']) || empty($_POST['blog_name'])))) {
// if there is post data there is certainly an error in the form
if ($_POST) {
echo Display::return_message(get_lang('FormHasErrorsPleaseComplete'), 'error');
echo Display::return_message(get_lang('The form contains incorrect or incomplete data. Please check your input.'), 'error');
}
Blog::displayBlogEditForm(intval($_GET['blog_id']));
}

@ -161,10 +161,10 @@ if ($allowToEdit) {
$values['users_to_send']
);
}
$message = Display::return_message(get_lang('AddSuccess'), 'confirmation');
$message = Display::return_message(get_lang('Event added'), 'confirmation');
if ($sendEmail) {
$message .= Display::return_message(
get_lang('AdditionalMailWasSentToSelectedUsers'),
get_lang('Additionally, a new announcement has been created and sent to selected users'),
'confirmation'
);
}
@ -219,7 +219,7 @@ if ($allowToEdit) {
$comment
);
$message = Display::return_message(get_lang('Updated'), 'confirmation');
$message = Display::return_message(get_lang('Update successful'), 'confirmation');
Display::addFlash($message);
header("Location: $agendaUrl");
exit;
@ -265,7 +265,7 @@ if ($allowToEdit) {
}
}
$message = Display::return_message(get_lang('Updated'), 'confirmation');
$message = Display::return_message(get_lang('Update successful'), 'confirmation');
Display::addFlash($message);
header("Location: $agendaUrl");
exit;
@ -283,9 +283,9 @@ if ($allowToEdit) {
if (in_array($ext, ['ics', 'ical', 'icalendar', 'ifb'])) {
$content = $agenda->importEventFile($course_info, $_FILES['ical_import']);
$message = Display::return_message(get_lang('AddSuccess'));
$message = Display::return_message(get_lang('Event added'));
} else {
$message = Display::return_message(get_lang('IsNotiCalFormatFile'), 'error');
$message = Display::return_message(get_lang('This file is not in iCal format'), 'error');
}
Display::addFlash($message);
$url = api_get_self().'?action=importical&type='.$agenda->type;
@ -313,7 +313,7 @@ if (!empty($group_id)) {
];
$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'],
];
}
if (!empty($actionName)) {

@ -62,7 +62,7 @@ if (!empty($group_id)) {
];
$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'],
];
}
@ -147,7 +147,7 @@ $export_icon_high = Display::return_icon(
$tpl->assign(
'export_ical_confidential_icon',
Display::return_icon($export_icon_high, get_lang('ExportiCalConfidential'))
Display::return_icon($export_icon_high, get_lang('Export in iCal format as confidential event'))
);
$actions = $agenda->displayActions('calendar', $userId);
@ -161,7 +161,7 @@ $type_event_class = $type.'_event';
$type_label = get_lang(ucfirst($type).'Calendar');
if ($type == 'course' && !empty($group_id)) {
$type_event_class = 'group_event';
$type_label = get_lang('GroupCalendar');
$type_label = get_lang('Agenda');
}
$defaultView = api_get_setting('default_calendar_view');
@ -175,7 +175,7 @@ $tpl->assign('default_view', $defaultView);
if ($type == 'course' && !empty($session_id)) {
$type_event_class = 'session_event';
$type_label = get_lang('SessionCalendar');
$type_label = get_lang('Session calendar');
}
$agendaColors = array_merge(
@ -273,7 +273,7 @@ $form->addHtmlEditor(
if ($agenda->type === 'course') {
$form->addHtml('<div id="add_as_announcement_div" style="display: none">');
$form->addElement('checkbox', 'add_as_annonuncement', null, get_lang('AddAsAnnouncement'));
$form->addElement('checkbox', 'add_as_annonuncement', null, get_lang('Add as an announcement'));
$form->addHtml('</div>');
$form->addElement('textarea', 'comment', get_lang('Comment'), ['id' => 'comment']);
}

@ -35,7 +35,7 @@ if (!empty($groupId)) {
];
$interbreadcrumb[] = [
'url' => api_get_path(WEB_CODE_PATH)."group/group_space.php?".api_get_cidreq(),
'name' => get_lang('GroupSpace').' '.$groupProperties['name'],
'name' => get_lang('Group area').' '.$groupProperties['name'],
];
}

@ -17,7 +17,7 @@ $this_section = SECTION_MYAGENDA;
api_block_anonymous_users();
// setting the name of the tool
$nameTools = get_lang('MyAgenda');
$nameTools = get_lang('Personal agenda');
// the variables for the days and the months
// Defining the shorts for the days

@ -44,7 +44,7 @@ $colors = ChamiloApi::getColorPalette(false, true, count($sessions));
$agenda = new Agenda('personal');
$actions = $agenda->displayActions('list', $userId);
$toolName = get_lang('SessionsPlanCalendar');
$toolName = get_lang('Sessions plan calendar');
$interbreadcrumb[] = [
'url' => api_get_path(WEB_CODE_PATH).'calendar/agenda_js.php?type=personal',

@ -17,12 +17,12 @@ $categories = [];
foreach ($default_description_titles as $id => $title) {
$categories[$id] = $title;
}
$categories[ADD_BLOCK] = get_lang('NewBloc');
$categories[ADD_BLOCK] = get_lang('Other');
$i = 1;
echo '<div class="actions" style="margin-bottom:30px">';
echo '<a href="index.php?'.api_get_cidreq().'">'.
Display::return_icon('back.png', get_lang('BackTo').' '.get_lang('ToolCourseDescription'), '', ICON_SIZE_MEDIUM).
Display::return_icon('back.png', get_lang('Back to').' '.get_lang('Course description'), '', ICON_SIZE_MEDIUM).
'</a>';
ksort($categories);
foreach ($categories as $id => $title) {
@ -41,7 +41,7 @@ echo '</div>';
// error messages
if (isset($error) && intval($error) == 1) {
echo Display::return_message(
get_lang('FormHasErrorsPleaseComplete'),
get_lang('The form contains incorrect or incomplete data. Please check your input.'),
'error',
false
);
@ -89,7 +89,7 @@ $form->addButtonCreate(get_lang('Save'));
// display default questions
if (isset($question[$description_type])) {
$message = '<strong>'.get_lang('QuestionPlan').'</strong><br />';
$message = '<strong>'.get_lang('Help').'</strong><br />';
$message .= $question[$description_type];
echo Display::return_message($message, 'normal', false);
}

@ -56,7 +56,7 @@ class CourseDescriptionController
global $htmlHeadXtra;
$htmlHeadXtra[] = "<script>
function confirmation(name) {
if (confirm(\" ".trim(get_lang('AreYouSureToDeleteJS'))." \"+name+\"?\")) {
if (confirm(\" ".trim(get_lang('Are you sure to delete'))." \"+name+\"?\")) {
return true;
} else {
return false;
@ -84,7 +84,7 @@ class CourseDescriptionController
foreach ($data['default_description_titles'] as $id => $title) {
$categories[$id] = $title;
}
$categories[ADD_BLOCK] = get_lang('NewBloc');
$categories[ADD_BLOCK] = get_lang('Other');
$i = 1;
ksort($categories);
@ -114,7 +114,7 @@ class CourseDescriptionController
$actions = Display::toolbarAction('toolbar', [0 => $actionLeft]);
}
$tpl = new Template(get_lang('CourseProgram'));
$tpl = new Template(get_lang('Description'));
$tpl->assign('listing', $data);
$tpl->assign('is_allowed_to_edit', $is_allowed_to_edit);
$tpl->assign('actions', $actions);
@ -173,7 +173,7 @@ class CourseDescriptionController
Display::addFlash(
Display::return_message(
get_lang('CourseDescriptionUpdated')
get_lang('The description has been updated')
)
);
}
@ -266,7 +266,7 @@ class CourseDescriptionController
Display::addFlash(
Display::return_message(
get_lang('CourseDescriptionUpdated')
get_lang('The description has been updated')
)
);
}
@ -316,7 +316,7 @@ class CourseDescriptionController
$course_description->set_id($id);
$course_description->delete();
Display::addFlash(
Display::return_message(get_lang('CourseDescriptionDeleted'))
Display::return_message(get_lang('Description has been deleted'))
);
}
$this->listing(false);

@ -35,12 +35,12 @@ $categories = [];
foreach ($default_description_titles as $id => $title) {
$categories[$id] = $title;
}
$categories[ADD_BLOCK] = get_lang('NewBloc');
$categories[ADD_BLOCK] = get_lang('Other');
$i = 1;
echo '<div class="actions" style="margin-bottom:30px">';
echo '<a href="index.php?'.api_get_cidreq().'">'.
Display::return_icon('back.png', get_lang('BackTo').' '.get_lang('ToolCourseDescription'), '', ICON_SIZE_MEDIUM).
Display::return_icon('back.png', get_lang('Back to').' '.get_lang('Course description'), '', ICON_SIZE_MEDIUM).
'</a>';
ksort($categories);
@ -59,7 +59,7 @@ echo '</div>';
// error messages
if (isset($error) && intval($error) == 1) {
echo Display::return_message(get_lang('FormHasErrorsPleaseComplete'), 'error', false);
echo Display::return_message(get_lang('The form contains incorrect or incomplete data. Please check your input.'), 'error', false);
}
// default header title form
@ -117,7 +117,7 @@ $default['description_type'] = $description_type;
$form->setDefaults($default);
if (isset($question[$description_type])) {
$message = '<strong>'.get_lang('QuestionPlan').'</strong><br />';
$message = '<strong>'.get_lang('Help').'</strong><br />';
$message .= $question[$description_type];
Display::addFlash(Display::return_message($message, 'normal', false));
}

@ -47,9 +47,9 @@ if (isset($_GET['isStudentView']) && $_GET['isStudentView'] == 'true') {
}
// interbreadcrumb
$interbreadcrumb[] = ["url" => "index.php?".api_get_cidreq(), "name" => get_lang('CourseProgram')];
$interbreadcrumb[] = ["url" => "index.php?".api_get_cidreq(), "name" => get_lang('Description')];
if ($description_type == 1) {
$interbreadcrumb[] = ["url" => "#", "name" => get_lang('GeneralDescription')];
$interbreadcrumb[] = ["url" => "#", "name" => get_lang('Description')];
}
if ($description_type == 2) {
$interbreadcrumb[] = ["url" => "#", "name" => get_lang('Objectives')];
@ -61,16 +61,16 @@ if ($description_type == 4) {
$interbreadcrumb[] = ["url" => "#", "name" => get_lang('Methodology')];
}
if ($description_type == 5) {
$interbreadcrumb[] = ["url" => "#", "name" => get_lang('CourseMaterial')];
$interbreadcrumb[] = ["url" => "#", "name" => get_lang('Course material')];
}
if ($description_type == 6) {
$interbreadcrumb[] = ["url" => "#", "name" => get_lang('HumanAndTechnicalResources')];
$interbreadcrumb[] = ["url" => "#", "name" => get_lang('Resources')];
}
if ($description_type == 7) {
$interbreadcrumb[] = ["url" => "#", "name" => get_lang('Assessment')];
}
if ($description_type == 8) {
$interbreadcrumb[] = ["url" => "#", "name" => get_lang('ThematicAdvance')];
$interbreadcrumb[] = ["url" => "#", "name" => get_lang('Thematic advance')];
}
if ($description_type >= 9) {
$interbreadcrumb[] = ["url" => "#", "name" => get_lang('Others')];

@ -21,7 +21,7 @@ if (api_is_platform_admin()) {
// Show message to confirm that a tool it to be hidden from available tools
// visibility 0,1->2
if (!empty($_GET['askDelete'])) {
$content .= '<div id="toolhide">'.get_lang('DelLk').'<br />&nbsp;&nbsp;&nbsp;
$content .= '<div id="toolhide">'.get_lang('Do you really want to delete this link?').'<br />&nbsp;&nbsp;&nbsp;
<a href="'.api_get_self().'">'.get_lang('No').'</a>&nbsp;|&nbsp;
<a href="'.api_get_self().'?delete=yes&id='.$id.'">'.get_lang('Yes').'</a>
</div>';
@ -47,7 +47,7 @@ if ($session_id === 0 && api_is_course_admin() && api_is_allowed_to_edit(null, t
$content .= '<div class="alert alert-success" style="border:0px; margin-top: 0px;padding:0px;">
<div class="normal-message" id="id_normal_message" style="display:none">';
$content .= '<img src="'.api_get_path(WEB_PATH).'main/inc/lib/javascript/indicator.gif"/>&nbsp;&nbsp;';
$content .= get_lang('PleaseStandBy');
$content .= get_lang('Please stand by...');
$content .= '</div>
<div class="alert alert-success" id="id_confirmation_message" style="display:none"></div>
</div>';
@ -57,7 +57,7 @@ if ($session_id === 0 && api_is_course_admin() && api_is_allowed_to_edit(null, t
if (api_get_setting('show_session_data') === 'true' && $session_id > 0) {
$content .= '<div class="row">
<div class="col-xs-12 col-md-12">
<span class="viewcaption">'.get_lang('SessionData').'</span>
<span class="viewcaption">'.get_lang('Session\'s data').'</span>
<table class="course_activity_home">';
$content .= CourseHome::show_session_data($session_id);
$content .= '</table></div></div>';

@ -26,8 +26,6 @@ use Fhaculty\Graph\Graph;
* Show message to confirm that a tools must be hide from available tools
*
* visibility 0,1
*
* @package chamilo.course_home
*/
$use_anonymous = true;
require_once __DIR__.'/../inc/global.inc.php';
@ -241,14 +239,14 @@ if (!empty($lpAutoLaunch)) {
}
if ($showAutoLaunchLpWarning) {
$autoLaunchWarning = get_lang('TheLPAutoLaunchSettingIsONStudentsWillBeRedirectToAnSpecificLP');
$autoLaunchWarning = get_lang('The learning path auto-launch setting is ON. When learners enter this course, they will be automatically redirected to the learning path marked as auto-launch.');
}
$forumAutoLaunch = api_get_course_setting('enable_forum_auto_launch');
if ($forumAutoLaunch == 1) {
if ($allowAutoLaunchForCourseAdmins) {
if (empty($autoLaunchWarning)) {
$autoLaunchWarning = get_lang('TheForumAutoLaunchSettingIsOnStudentsWillBeRedirectToTheForumTool');
$autoLaunchWarning = get_lang('The forum\'s auto-launch setting is on. Students will be redirected to the forum tool when entering this course.');
}
} else {
$url = api_get_path(WEB_CODE_PATH).'forum/index.php?'.api_get_cidreq().'&id_session='.$session_id;
@ -315,7 +313,7 @@ $documentAutoLaunch = api_get_course_setting('enable_document_auto_launch');
if ($documentAutoLaunch == 1) {
if ($allowAutoLaunchForCourseAdmins) {
if (empty($autoLaunchWarning)) {
$autoLaunchWarning = get_lang('TheDocumentAutoLaunchSettingIsOnStudentsWillBeRedirectToTheDocumentTool');
$autoLaunchWarning = get_lang('The document auto-launch feature configuration is enabled. Learners will be automatically redirected to document tool.');
}
} else {
// Redirecting to the document

Loading…
Cancel
Save