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

@ -42,7 +42,7 @@ if ($skill) {
} }
Display::addFlash( 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)); header('Location: '.api_get_path(WEB_PATH));

@ -28,7 +28,7 @@ $skillIssue = $entityManager->find('ChamiloCoreBundle:SkillRelUser', $issue);
if (!$skillIssue) { if (!$skillIssue) {
Display::addFlash( Display::addFlash(
Display::return_message( Display::return_message(
get_lang('SkillNotFound'), get_lang('Skill not found'),
'warning' 'warning'
) )
); );
@ -44,7 +44,7 @@ $skill = $skillIssue->getSkill();
if (!$user || !$skill) { if (!$user || !$skill) {
Display::addFlash( 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)); header('Location: '.api_get_path(WEB_PATH));
@ -67,7 +67,7 @@ $skillInfo = [
'courses' => [], '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 // Open Graph Markup
$htmlHeadXtra[] = " $htmlHeadXtra[] = "
@ -84,7 +84,7 @@ $allowExport = $currentUser ? $currentUser->getId() === $user->getId() : false;
$allowComment = $currentUser ? Skill::userCanAddFeedbackToUser($currentUser, $user) : false; $allowComment = $currentUser ? Skill::userCanAddFeedbackToUser($currentUser, $user) : false;
$skillIssueDate = api_get_local_time($skillIssue->getAcquiredSkillAt()); $skillIssueDate = api_get_local_time($skillIssue->getAcquiredSkillAt());
$currentSkillLevel = get_lang('NoLevelAcquiredYet'); $currentSkillLevel = get_lang('No level acquired yet');
if ($skillIssue->getAcquiredLevel()) { if ($skillIssue->getAcquiredLevel()) {
$currentSkillLevel = $skillLevelRepo->find(['id' => $skillIssue->getAcquiredLevel()])->getName(); $currentSkillLevel = $skillLevelRepo->find(['id' => $skillIssue->getAcquiredLevel()])->getName();
} }
@ -176,7 +176,7 @@ $allowToEdit = Skill::isAllowed($user->getId(), false);
if ($showLevels && $allowToEdit) { if ($showLevels && $allowToEdit) {
$formAcquiredLevel = new FormValidator('acquired_level'); $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('user', $skillIssue->getUser()->getId());
$formAcquiredLevel->addHidden('issue', $skillIssue->getId()); $formAcquiredLevel->addHidden('issue', $skillIssue->getId());
$formAcquiredLevel->addButtonSave(get_lang('Save')); $formAcquiredLevel->addButtonSave(get_lang('Save'));
@ -196,17 +196,17 @@ if ($showLevels && $allowToEdit) {
} }
$form = new FormValidator('comment'); $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->applyFilter('comment', 'trim');
$form->addRule('comment', get_lang('ThisFieldIsRequired'), 'required'); $form->addRule('comment', get_lang('Required field'), 'required');
$form->addSelect( $form->addSelect(
'value', '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] ['-', 1, 2, 3, 4, 5, 6, 7, 8, 9, 10]
); );
$form->addHidden('user', $skillIssue->getUser()->getId()); $form->addHidden('user', $skillIssue->getUser()->getId());
$form->addHidden('issue', $skillIssue->getId()); $form->addHidden('issue', $skillIssue->getId());
$form->addButtonSend(get_lang('Send')); $form->addButtonSend(get_lang('Send message'));
if ($form->validate() && $allowComment && $allowToEdit) { if ($form->validate() && $allowComment && $allowToEdit) {
$values = $form->exportValues(); $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('issue_info', $skillIssueInfo);
$template->assign('allow_comment', $allowComment); $template->assign('allow_comment', $allowComment);
$template->assign('allow_export', $allowExport); $template->assign('allow_export', $allowExport);
@ -297,6 +297,6 @@ $template->assign('badge_error', $badgeInfoError);
$template->assign('personal_badge', $personalBadge); $template->assign('personal_badge', $personalBadge);
$template->assign('show_level', $showLevels); $template->assign('show_level', $showLevels);
$content = $template->fetch($template->get_template('skill/issued.tpl')); $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->assign('content', $content);
$template->display_one_col_template(); $template->display_one_col_template();

@ -30,7 +30,7 @@ $currentUserId = api_get_user_id();
if (!$user || !$skill) { if (!$user || !$skill) {
Display::addFlash( 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)); header('Location: '.api_get_path(WEB_PATH));
@ -68,7 +68,7 @@ foreach ($userSkills as $index => $skillIssue) {
$allowDownloadExport = $currentUser ? $currentUser->getId() === $user->getId() : false; $allowDownloadExport = $currentUser ? $currentUser->getId() === $user->getId() : false;
$allowComment = $currentUser ? Skill::userCanAddFeedbackToUser($currentUser, $user) : false; $allowComment = $currentUser ? Skill::userCanAddFeedbackToUser($currentUser, $user) : false;
$skillIssueDate = api_get_local_time($skillIssue->getAcquiredSkillAt()); $skillIssueDate = api_get_local_time($skillIssue->getAcquiredSkillAt());
$currentSkillLevel = get_lang('NoLevelAcquiredYet'); $currentSkillLevel = get_lang('No level acquired yet');
if ($skillIssue->getAcquiredLevel()) { if ($skillIssue->getAcquiredLevel()) {
$currentSkillLevel = $skillLevelRepo->find(['id' => $skillIssue->getAcquiredLevel()])->getName(); $currentSkillLevel = $skillLevelRepo->find(['id' => $skillIssue->getAcquiredLevel()])->getName();
} }
@ -160,7 +160,7 @@ foreach ($userSkills as $index => $skillIssue) {
'post', 'post',
SkillRelUserManager::getIssueUrlAll($skillIssue) 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('user', $skillIssue->getUser()->getId());
$formAcquiredLevel->addHidden('issue', $skillIssue->getId()); $formAcquiredLevel->addHidden('issue', $skillIssue->getId());
$formAcquiredLevel->addButtonSend(get_lang('Save')); $formAcquiredLevel->addButtonSend(get_lang('Save'));
@ -183,17 +183,17 @@ foreach ($userSkills as $index => $skillIssue) {
'post', 'post',
SkillRelUserManager::getIssueUrlAll($skillIssue) 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->applyFilter('comment', 'trim');
$form->addRule('comment', get_lang('ThisFieldIsRequired'), 'required'); $form->addRule('comment', get_lang('Required field'), 'required');
$form->addSelect( $form->addSelect(
'value', '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] ['-', 1, 2, 3, 4, 5, 6, 7, 8, 9, 10]
); );
$form->addHidden('user', $skillIssue->getUser()->getId()); $form->addHidden('user', $skillIssue->getUser()->getId());
$form->addHidden('issue', $skillIssue->getId()); $form->addHidden('issue', $skillIssue->getId());
$form->addButtonSend(get_lang('Send')); $form->addButtonSend(get_lang('Send message'));
if ($form->validate() && $allowComment) { if ($form->validate() && $allowComment) {
$values = $form->exportValues(); $values = $form->exportValues();
@ -273,7 +273,7 @@ foreach ($userSkills as $index => $skillIssue) {
$allUserBadges[$index]['personal_badge'] = $personalBadge; $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('user_badges', $allUserBadges);
$template->assign('show_level', api_get_configuration_value('hide_skill_levels') == false); $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->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->assign('content', $content);
$template->display_one_col_template(); $template->display_one_col_template();

@ -1,10 +1,10 @@
<?php <?php
/* For licensing terms, see /license.txt */ /* For licensing terms, see /license.txt */
/** /**
* BLOG HOMEPAGE * BLOG HOMEPAGE
* This file takes care of all blog navigation and displaying. * This file takes care of all blog navigation and displaying.
* *
* @package chamilo.blogs
*/ */
require_once __DIR__.'/../inc/global.inc.php'; require_once __DIR__.'/../inc/global.inc.php';
@ -49,7 +49,7 @@ if (!empty($_POST['edit_post_submit'])) {
$blog_id $blog_id
); );
Display::addFlash( 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::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'] $_POST['task_color']
); );
Display::addFlash( 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'] $_POST['task_day']
); );
Display::addFlash( 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'] $_POST['old_target_date']
); );
Display::addFlash( Display::addFlash(
Display::return_message(get_lang('AssignedTaskEdited'), 'success') Display::return_message(get_lang('AssignedThe task has been edited.'), 'success')
); );
} }
if (!empty($_POST['register'])) { if (!empty($_POST['register'])) {
@ -128,7 +128,7 @@ if (!empty($_POST['unregister'])) {
if (!empty($_GET['register'])) { if (!empty($_GET['register'])) {
Blog::subscribeUser((int) $_GET['blog_id'], (int) $_GET['user_id']); Blog::subscribeUser((int) $_GET['blog_id'], (int) $_GET['user_id']);
Display::addFlash( Display::addFlash(
Display::return_message(get_lang('UserRegistered'), 'success') Display::return_message(get_lang('The user has been registered'), 'success')
); );
$flag = 1; $flag = 1;
} }
@ -140,14 +140,14 @@ if (isset($_GET['action']) && $_GET['action'] == 'manage_tasks') {
if (isset($_GET['do']) && $_GET['do'] == 'delete') { if (isset($_GET['do']) && $_GET['do'] == 'delete') {
Blog::deleteTask($blog_id, (int) $_GET['task_id']); Blog::deleteTask($blog_id, (int) $_GET['task_id']);
Display::addFlash( 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') { if (isset($_GET['do']) && $_GET['do'] == 'delete_assignment') {
Blog::deleteAssignedTask($blog_id, intval($_GET['task_id']), intval($_GET['user_id'])); Blog::deleteAssignedTask($blog_id, intval($_GET['task_id']), intval($_GET['user_id']));
Display::addFlash( 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)) { if (api_is_allowed('BLOG_'.$blog_id, 'article_comments_delete', $task_id)) {
Blog::deleteComment($blog_id, (int) $_GET['post_id'], (int) $_GET['comment_id']); Blog::deleteComment($blog_id, (int) $_GET['post_id'], (int) $_GET['comment_id']);
Display::addFlash( Display::addFlash(
Display::return_message(get_lang('CommentDeleted'), 'success') Display::return_message(get_lang('The comment has been deleted.'), 'success')
); );
} else { } else {
Display::addFlash( 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']); Blog::deletePost($blog_id, (int) $_GET['article_id']);
$action = ''; // Article is gone, go to blog home $action = ''; // Article is gone, go to blog home
Display::addFlash( Display::addFlash(
Display::return_message(get_lang('BlogDeleted'), 'success') Display::return_message(get_lang('The project has been deleted.'), 'success')
); );
} else { } else {
Display::addFlash( 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')) { if (api_is_allowed('BLOG_'.$blog_id, 'article_rate')) {
Blog::addRating('post', $blog_id, (int) $_GET['post_id'], (int) $_GET['rating']); Blog::addRating('post', $blog_id, (int) $_GET['post_id'], (int) $_GET['rating']);
Display::addFlash( 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')) { if (api_is_allowed('BLOG_'.$blog_id, 'article_comments_add')) {
Blog::addRating('comment', $blog_id, (int) $_GET['comment_id'], (int) $_GET['rating']); Blog::addRating('comment', $blog_id, (int) $_GET['comment_id'], (int) $_GET['rating']);
Display::addFlash( 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 // Set breadcrumb
switch ($action) { switch ($action) {
case 'new_post': case 'new_post':
$nameTools = get_lang('NewPost'); $nameTools = get_lang('New task');
break; break;
case 'view_post': case 'view_post':
$nameTools = ''; $nameTools = '';
break; break;
case 'manage_tasks': case 'manage_tasks':
$nameTools = get_lang('TaskManager'); $nameTools = get_lang('Roles management');
break; break;
case 'manage_members': case 'manage_members':
$nameTools = get_lang('MemberManager'); $nameTools = get_lang('Users management');
break; break;
case 'manage_rights': case 'manage_rights':
$nameTools = get_lang('RightsManager'); $nameTools = get_lang('Users rights management');
break; break;
case 'view_search_result': case 'view_search_result':
$nameTools = get_lang('SearchResults'); $nameTools = get_lang('Search results');
break; break;
case 'execute_task': case 'execute_task':
$nameTools = get_lang('ExecuteThisTask'); $nameTools = get_lang('A task for me');
break; break;
default: default:
$nameTools = Blog::getBlogTitle($blog_id); $nameTools = Blog::getBlogTitle($blog_id);
@ -241,19 +241,19 @@ $actionsLeft = Display::url(
); );
if (api_is_allowed('BLOG_'.$blog_id, 'article_add')) { if (api_is_allowed('BLOG_'.$blog_id, 'article_add')) {
$actionsLeft .= Display::url( $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() api_get_self().'?action=new_post&blog_id='.$blog_id.'&'.api_get_cidreq()
); );
} }
if (api_is_allowed('BLOG_'.$blog_id, 'task_management')) { if (api_is_allowed('BLOG_'.$blog_id, 'task_management')) {
$actionsLeft .= Display::url( $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() api_get_self().'?action=manage_tasks&blog_id='.$blog_id.'&'.api_get_cidreq()
); );
} }
if (api_is_allowed('BLOG_'.$blog_id, 'member_management')) { if (api_is_allowed('BLOG_'.$blog_id, 'member_management')) {
$actionsLeft .= Display::url( $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() 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'])) { if (isset($_GET['filter']) && !empty($_GET['filter'])) {
$listArticles = Blog::getDailyResults($blog_id, Database::escape_string($_GET['filter'])); $listArticles = Blog::getDailyResults($blog_id, Database::escape_string($_GET['filter']));
$dateSearch = api_format_date($_GET['filter'], DATE_FORMAT_LONG); $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('search', $titleSearch);
$tpl->assign('articles', $listArticles); $tpl->assign('articles', $listArticles);
$blogLayout = $tpl->get_template('blog/blog.tpl'); $blogLayout = $tpl->get_template('blog/blog.tpl');

@ -4,8 +4,6 @@
/** /**
* BLOG HOMEPAGE * BLOG HOMEPAGE
* This file takes care of all blog navigation and displaying. * This file takes care of all blog navigation and displaying.
*
* @package chamilo.blogs
*/ */
require_once __DIR__.'/../inc/global.inc.php'; require_once __DIR__.'/../inc/global.inc.php';
$current_course_tool = TOOL_BLOGS; $current_course_tool = TOOL_BLOGS;
@ -23,7 +21,7 @@ $origin = api_get_origin();
$action = isset($_GET['action']) ? $_GET['action'] : ''; $action = isset($_GET['action']) ? $_GET['action'] : '';
if (api_is_allowed_to_edit()) { 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 // 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 // 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 = ''; $my_url = '';
if ($action == 'add') { if ($action == 'add') {
$current_section = get_lang('AddBlog'); $current_section = get_lang('Create a new project');
$my_url = 'action=add'; $my_url = 'action=add';
} elseif ($action == 'edit') { } 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']); $my_url = 'action=edit&amp;blog_id='.Security::remove_XSS($_GET['blog_id']);
} }
Display::display_header(''); Display::display_header('');
} }
echo '<div class="actions">'; echo '<div class="actions">';
echo "<a href='".api_get_self()."?".api_get_cidreq()."&action=add'>", 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>'; echo '</div>';
if (!empty($_POST['new_blog_submit']) && !empty($_POST['blog_name'])) { if (!empty($_POST['new_blog_submit']) && !empty($_POST['blog_name'])) {
if (isset($_POST['blog_name'])) { if (isset($_POST['blog_name'])) {
Blog::addBlog($_POST['blog_name'], $_POST['blog_subtitle']); 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 (!empty($_POST['edit_blog_submit']) && !empty($_POST['blog_name'])) {
if (strlen(trim($_POST['blog_name'])) > 0) { if (strlen(trim($_POST['blog_name'])) > 0) {
Blog::editBlog($_POST['blog_id'], $_POST['blog_name'], $_POST['blog_subtitle']); 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') { if (isset($_GET['action']) && $_GET['action'] == 'visibility') {
Blog::changeBlogVisibility(intval($_GET['blog_id'])); 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') { if (isset($_GET['action']) && $_GET['action'] == 'delete') {
Blog::deleteBlog(intval($_GET['blog_id'])); 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') { 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 (!$_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 there is post data there is certainly an error in the form
if ($_POST) { 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'])); Blog::displayBlogEditForm(intval($_GET['blog_id']));
} }

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

@ -62,7 +62,7 @@ if (!empty($group_id)) {
]; ];
$interbreadcrumb[] = [ $interbreadcrumb[] = [
"url" => api_get_path(WEB_CODE_PATH)."group/group_space.php?".api_get_cidreq(), "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( $tpl->assign(
'export_ical_confidential_icon', '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); $actions = $agenda->displayActions('calendar', $userId);
@ -161,7 +161,7 @@ $type_event_class = $type.'_event';
$type_label = get_lang(ucfirst($type).'Calendar'); $type_label = get_lang(ucfirst($type).'Calendar');
if ($type == 'course' && !empty($group_id)) { if ($type == 'course' && !empty($group_id)) {
$type_event_class = 'group_event'; $type_event_class = 'group_event';
$type_label = get_lang('GroupCalendar'); $type_label = get_lang('Agenda');
} }
$defaultView = api_get_setting('default_calendar_view'); $defaultView = api_get_setting('default_calendar_view');
@ -175,7 +175,7 @@ $tpl->assign('default_view', $defaultView);
if ($type == 'course' && !empty($session_id)) { if ($type == 'course' && !empty($session_id)) {
$type_event_class = 'session_event'; $type_event_class = 'session_event';
$type_label = get_lang('SessionCalendar'); $type_label = get_lang('Session calendar');
} }
$agendaColors = array_merge( $agendaColors = array_merge(
@ -273,7 +273,7 @@ $form->addHtmlEditor(
if ($agenda->type === 'course') { if ($agenda->type === 'course') {
$form->addHtml('<div id="add_as_announcement_div" style="display: none">'); $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->addHtml('</div>');
$form->addElement('textarea', 'comment', get_lang('Comment'), ['id' => 'comment']); $form->addElement('textarea', 'comment', get_lang('Comment'), ['id' => 'comment']);
} }

@ -35,7 +35,7 @@ if (!empty($groupId)) {
]; ];
$interbreadcrumb[] = [ $interbreadcrumb[] = [
'url' => api_get_path(WEB_CODE_PATH)."group/group_space.php?".api_get_cidreq(), '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(); api_block_anonymous_users();
// setting the name of the tool // setting the name of the tool
$nameTools = get_lang('MyAgenda'); $nameTools = get_lang('Personal agenda');
// the variables for the days and the months // the variables for the days and the months
// Defining the shorts for the days // Defining the shorts for the days

@ -44,7 +44,7 @@ $colors = ChamiloApi::getColorPalette(false, true, count($sessions));
$agenda = new Agenda('personal'); $agenda = new Agenda('personal');
$actions = $agenda->displayActions('list', $userId); $actions = $agenda->displayActions('list', $userId);
$toolName = get_lang('SessionsPlanCalendar'); $toolName = get_lang('Sessions plan calendar');
$interbreadcrumb[] = [ $interbreadcrumb[] = [
'url' => api_get_path(WEB_CODE_PATH).'calendar/agenda_js.php?type=personal', '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) { foreach ($default_description_titles as $id => $title) {
$categories[$id] = $title; $categories[$id] = $title;
} }
$categories[ADD_BLOCK] = get_lang('NewBloc'); $categories[ADD_BLOCK] = get_lang('Other');
$i = 1; $i = 1;
echo '<div class="actions" style="margin-bottom:30px">'; echo '<div class="actions" style="margin-bottom:30px">';
echo '<a href="index.php?'.api_get_cidreq().'">'. 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>'; '</a>';
ksort($categories); ksort($categories);
foreach ($categories as $id => $title) { foreach ($categories as $id => $title) {
@ -41,7 +41,7 @@ echo '</div>';
// error messages // error messages
if (isset($error) && intval($error) == 1) { if (isset($error) && intval($error) == 1) {
echo Display::return_message( echo Display::return_message(
get_lang('FormHasErrorsPleaseComplete'), get_lang('The form contains incorrect or incomplete data. Please check your input.'),
'error', 'error',
false false
); );
@ -89,7 +89,7 @@ $form->addButtonCreate(get_lang('Save'));
// display default questions // display default questions
if (isset($question[$description_type])) { if (isset($question[$description_type])) {
$message = '<strong>'.get_lang('QuestionPlan').'</strong><br />'; $message = '<strong>'.get_lang('Help').'</strong><br />';
$message .= $question[$description_type]; $message .= $question[$description_type];
echo Display::return_message($message, 'normal', false); echo Display::return_message($message, 'normal', false);
} }

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

@ -35,12 +35,12 @@ $categories = [];
foreach ($default_description_titles as $id => $title) { foreach ($default_description_titles as $id => $title) {
$categories[$id] = $title; $categories[$id] = $title;
} }
$categories[ADD_BLOCK] = get_lang('NewBloc'); $categories[ADD_BLOCK] = get_lang('Other');
$i = 1; $i = 1;
echo '<div class="actions" style="margin-bottom:30px">'; echo '<div class="actions" style="margin-bottom:30px">';
echo '<a href="index.php?'.api_get_cidreq().'">'. 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>'; '</a>';
ksort($categories); ksort($categories);
@ -59,7 +59,7 @@ echo '</div>';
// error messages // error messages
if (isset($error) && intval($error) == 1) { 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 // default header title form
@ -117,7 +117,7 @@ $default['description_type'] = $description_type;
$form->setDefaults($default); $form->setDefaults($default);
if (isset($question[$description_type])) { if (isset($question[$description_type])) {
$message = '<strong>'.get_lang('QuestionPlan').'</strong><br />'; $message = '<strong>'.get_lang('Help').'</strong><br />';
$message .= $question[$description_type]; $message .= $question[$description_type];
Display::addFlash(Display::return_message($message, 'normal', false)); Display::addFlash(Display::return_message($message, 'normal', false));
} }

@ -47,9 +47,9 @@ if (isset($_GET['isStudentView']) && $_GET['isStudentView'] == 'true') {
} }
// interbreadcrumb // 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) { if ($description_type == 1) {
$interbreadcrumb[] = ["url" => "#", "name" => get_lang('GeneralDescription')]; $interbreadcrumb[] = ["url" => "#", "name" => get_lang('Description')];
} }
if ($description_type == 2) { if ($description_type == 2) {
$interbreadcrumb[] = ["url" => "#", "name" => get_lang('Objectives')]; $interbreadcrumb[] = ["url" => "#", "name" => get_lang('Objectives')];
@ -61,16 +61,16 @@ if ($description_type == 4) {
$interbreadcrumb[] = ["url" => "#", "name" => get_lang('Methodology')]; $interbreadcrumb[] = ["url" => "#", "name" => get_lang('Methodology')];
} }
if ($description_type == 5) { if ($description_type == 5) {
$interbreadcrumb[] = ["url" => "#", "name" => get_lang('CourseMaterial')]; $interbreadcrumb[] = ["url" => "#", "name" => get_lang('Course material')];
} }
if ($description_type == 6) { if ($description_type == 6) {
$interbreadcrumb[] = ["url" => "#", "name" => get_lang('HumanAndTechnicalResources')]; $interbreadcrumb[] = ["url" => "#", "name" => get_lang('Resources')];
} }
if ($description_type == 7) { if ($description_type == 7) {
$interbreadcrumb[] = ["url" => "#", "name" => get_lang('Assessment')]; $interbreadcrumb[] = ["url" => "#", "name" => get_lang('Assessment')];
} }
if ($description_type == 8) { if ($description_type == 8) {
$interbreadcrumb[] = ["url" => "#", "name" => get_lang('ThematicAdvance')]; $interbreadcrumb[] = ["url" => "#", "name" => get_lang('Thematic advance')];
} }
if ($description_type >= 9) { if ($description_type >= 9) {
$interbreadcrumb[] = ["url" => "#", "name" => get_lang('Others')]; $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 // Show message to confirm that a tool it to be hidden from available tools
// visibility 0,1->2 // visibility 0,1->2
if (!empty($_GET['askDelete'])) { 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().'">'.get_lang('No').'</a>&nbsp;|&nbsp;
<a href="'.api_get_self().'?delete=yes&id='.$id.'">'.get_lang('Yes').'</a> <a href="'.api_get_self().'?delete=yes&id='.$id.'">'.get_lang('Yes').'</a>
</div>'; </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;"> $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">'; <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 .= '<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> $content .= '</div>
<div class="alert alert-success" id="id_confirmation_message" style="display:none"></div> <div class="alert alert-success" id="id_confirmation_message" style="display:none"></div>
</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) { if (api_get_setting('show_session_data') === 'true' && $session_id > 0) {
$content .= '<div class="row"> $content .= '<div class="row">
<div class="col-xs-12 col-md-12"> <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">'; <table class="course_activity_home">';
$content .= CourseHome::show_session_data($session_id); $content .= CourseHome::show_session_data($session_id);
$content .= '</table></div></div>'; $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 * Show message to confirm that a tools must be hide from available tools
* *
* visibility 0,1 * visibility 0,1
*
* @package chamilo.course_home
*/ */
$use_anonymous = true; $use_anonymous = true;
require_once __DIR__.'/../inc/global.inc.php'; require_once __DIR__.'/../inc/global.inc.php';
@ -241,14 +239,14 @@ if (!empty($lpAutoLaunch)) {
} }
if ($showAutoLaunchLpWarning) { 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'); $forumAutoLaunch = api_get_course_setting('enable_forum_auto_launch');
if ($forumAutoLaunch == 1) { if ($forumAutoLaunch == 1) {
if ($allowAutoLaunchForCourseAdmins) { if ($allowAutoLaunchForCourseAdmins) {
if (empty($autoLaunchWarning)) { 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 { } else {
$url = api_get_path(WEB_CODE_PATH).'forum/index.php?'.api_get_cidreq().'&id_session='.$session_id; $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 ($documentAutoLaunch == 1) {
if ($allowAutoLaunchForCourseAdmins) { if ($allowAutoLaunchForCourseAdmins) {
if (empty($autoLaunchWarning)) { 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 { } else {
// Redirecting to the document // Redirecting to the document

Loading…
Cancel
Save