Update get_lang calls using full string.

pull/3016/head
Julio Montoya 6 years ago
parent 292add908d
commit a87d6e7dce
  1. 16
      main/forum/editpost.php
  2. 30
      main/forum/editthread.php
  3. 262
      main/forum/forumfunction.inc.php
  4. 40
      main/forum/forumqualify.php
  5. 10
      main/forum/forumsearch.php
  6. 4
      main/forum/iframe_thread.php
  7. 24
      main/forum/index.php
  8. 12
      main/forum/newthread.php
  9. 8
      main/forum/reply.php
  10. 54
      main/forum/viewforum.php
  11. 26
      main/forum/viewforumcategory.php
  12. 38
      main/forum/viewthread.php
  13. 2
      main/gradebook/lib/be/dropboxlink.class.php
  14. 2
      main/gradebook/lib/be/evaluation.class.php
  15. 4
      main/gradebook/lib/be/exerciselink.class.php
  16. 2
      main/gradebook/lib/be/forumthreadlink.class.php
  17. 2
      main/gradebook/lib/be/learnpathlink.class.php
  18. 2
      main/gradebook/lib/be/studentpublicationlink.class.php

@ -29,7 +29,7 @@ $this_section = SECTION_COURSES;
// Notification for unauthorized people.
api_protect_course_script(true);
$nameTools = get_lang('ToolForum');
$nameTools = get_lang('Forums');
// Unset the formElements in session before the includes function works
unset($_SESSION['formelements']);
@ -65,7 +65,7 @@ if (!$isEditable) {
if (api_is_in_gradebook()) {
$interbreadcrumb[] = [
'url' => Category::getUrl(),
'name' => get_lang('ToolGradebook'),
'name' => get_lang('Assessments'),
];
}
@ -78,13 +78,13 @@ if ($origin == 'group') {
];
$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'],
];
$interbreadcrumb[] = [
'url' => api_get_path(WEB_CODE_PATH).'forum/viewforum.php?'.api_get_cidreq().'&forum='.$forumId,
'name' => prepare4display($current_forum['forum_title']),
];
$interbreadcrumb[] = ['url' => 'javascript: void (0);', 'name' => get_lang('EditPost')];
$interbreadcrumb[] = ['url' => 'javascript: void (0);', 'name' => get_lang('Edit a post')];
} else {
$interbreadcrumb[] = [
'url' => api_get_path(WEB_CODE_PATH).'forum/index.php?'.api_get_cidreq(),
@ -102,7 +102,7 @@ if ($origin == 'group') {
'url' => api_get_path(WEB_CODE_PATH).'forum/viewthread.php?'.api_get_cidreq().'&forum='.$forumId.'&thread='.intval($_GET['thread']),
'name' => prepare4display($current_thread['thread_title']),
];
$interbreadcrumb[] = ['url' => 'javascript: void (0);', 'name' => get_lang('EditPost')];
$interbreadcrumb[] = ['url' => 'javascript: void (0);', 'name' => get_lang('Edit a post')];
}
$table_link = Database::get_main_table(TABLE_MAIN_GRADEBOOK_LINK);
@ -180,7 +180,7 @@ if ($origin != 'learnpath') {
echo '<a href="../group/group_space.php?'.api_get_cidreq().'">'.
Display::return_icon(
'back.png',
get_lang('BackTo').' '.get_lang('Groups'),
get_lang('Back to').' '.get_lang('Groups'),
'',
ICON_SIZE_MEDIUM
).
@ -189,7 +189,7 @@ if ($origin != 'learnpath') {
echo '<a href="index.php?'.api_get_cidreq().'">'.
Display::return_icon(
'back.png',
get_lang('BackToForumOverview'),
get_lang('Back toForumOverview'),
'',
ICON_SIZE_MEDIUM
).
@ -198,7 +198,7 @@ if ($origin != 'learnpath') {
echo '<a href="viewforum.php?forum='.$forumId.'&'.api_get_cidreq().'">'.
Display::return_icon(
'forum.png',
get_lang('BackToForum'),
get_lang('Back toForum'),
'',
ICON_SIZE_MEDIUM
).

@ -16,7 +16,7 @@ $this_section = SECTION_COURSES;
api_protect_course_script(true);
$cidreq = api_get_cidreq();
$nameTools = get_lang('ToolForum');
$nameTools = get_lang('Forums');
$_user = api_get_user_info();
require_once 'forumfunction.inc.php';
@ -32,7 +32,7 @@ $currentForumCategory = get_forumcategory_information($currentForum['forum_categ
if (api_is_in_gradebook()) {
$interbreadcrumb[] = [
'url' => Category::getUrl(),
'name' => get_lang('ToolGradebook'),
'name' => get_lang('Assessments'),
];
}
@ -96,7 +96,7 @@ if (!empty($groupId)) {
];
$interbreadcrumb[] = [
'url' => api_get_path(WEB_CODE_PATH).'group/group_space.php?'.$cidreq,
'name' => get_lang('GroupSpace').' '.$groupProperties['name'],
'name' => get_lang('Group area').' '.$groupProperties['name'],
];
$interbreadcrumb[] = [
'url' => api_get_path(WEB_CODE_PATH).'forum/viewforum.php?'.$cidreq.'&forum='.$forumId,
@ -104,7 +104,7 @@ if (!empty($groupId)) {
];
$interbreadcrumb[] = [
'url' => api_get_path(WEB_CODE_PATH).'forum/newthread.php?'.$cidreq.'&forum='.$forumId,
'name' => get_lang('EditThread'),
'name' => get_lang('Edit thread'),
];
} else {
$interbreadcrumb[] = ['url' => api_get_path(WEB_CODE_PATH).'forum/index.php?'.$cidreq, 'name' => $nameTools];
@ -116,7 +116,7 @@ if (!empty($groupId)) {
'url' => api_get_path(WEB_CODE_PATH).'forum/viewforum.php?'.$cidreq.'&forum='.$forumId,
'name' => $currentForum['forum_title'],
];
$interbreadcrumb[] = ['url' => '#', 'name' => get_lang('EditThread')];
$interbreadcrumb[] = ['url' => '#', 'name' => get_lang('Edit thread')];
}
$tableLink = Database::get_main_table(TABLE_MAIN_GRADEBOOK_LINK);
@ -143,7 +143,7 @@ JS;
// Action links
$actions = [
Display::url(
Display::return_icon('back.png', get_lang('BackToForum'), '', ICON_SIZE_MEDIUM),
Display::return_icon('back.png', get_lang('Back to forum'), '', ICON_SIZE_MEDIUM),
'viewforum.php?forum='.$forumId.'&'.$cidreq
),
search_link(),
@ -162,13 +162,13 @@ $form = new FormValidator(
]).'&'.api_get_cidreq()
);
$form->addElement('header', get_lang('EditThread'));
$form->addElement('header', get_lang('Edit thread'));
$form->setConstants(['forum' => '5']);
$form->addElement('hidden', 'forum_id', $forumId);
$form->addElement('hidden', 'thread_id', $threadId);
$form->addElement('hidden', 'gradebook', $gradebookId);
$form->addElement('text', 'thread_title', get_lang('Title'));
$form->addElement('advanced_settings', 'advanced_params', get_lang('AdvancedParameters'));
$form->addElement('advanced_settings', 'advanced_params', get_lang('Advanced settings'));
$form->addElement('html', '<div id="advanced_params_options" style="display:none">');
if ((api_is_course_admin() || api_is_session_general_coach() || api_is_course_tutor()) && $threadId) {
@ -180,21 +180,21 @@ if ((api_is_course_admin() || api_is_session_general_coach() || api_is_course_tu
'checkbox',
'thread_qualify_gradebook',
'',
get_lang('QualifyThreadGradebook')
get_lang('Grade this thread')
);
} else {
$form->addElement('hidden', 'thread_qualify_gradebook', false);
}
$form->addElement('html', '<div id="options_field" style="'.($gradeThisThread ? '' : 'display:none;').'">');
$form->addElement('text', 'numeric_calification', get_lang('QualificationNumeric'));
$form->addElement('text', 'numeric_calification', get_lang('Maximum score'));
$form->applyFilter('numeric_calification', 'html_filter');
$form->addElement('text', 'calification_notebook_title', get_lang('TitleColumnGradebook'));
$form->addElement('text', 'calification_notebook_title', get_lang('Column header in Competences Report'));
$form->applyFilter('calification_notebook_title', 'html_filter');
$form->addElement(
'number',
'weight_calification',
get_lang('QualifyWeight'),
get_lang('Weight in Report'),
['value' => '0.00', 'step' => '0.01']
);
$form->applyFilter('weight_calification', 'html_filter');
@ -204,13 +204,13 @@ if ((api_is_course_admin() || api_is_session_general_coach() || api_is_course_tu
$form->addGroup(
$group,
'',
[get_lang('ForumThreadPeerScoring'), get_lang('ForumThreadPeerScoringComment')]
[get_lang('Thread scored by peers'), get_lang('Thread scored by peersComment')]
);
$form->addElement('html', '</div>');
}
if (api_is_allowed_to_edit(null, true)) {
$form->addElement('checkbox', 'thread_sticky', '', get_lang('StickyPost'));
$form->addElement('checkbox', 'thread_sticky', '', get_lang('This is a sticky message (appears always on top and has a special sticky icon)'));
}
$form->addElement('html', '</div>');
@ -235,7 +235,7 @@ if (!empty($threadData)) {
$defaults['skills'] = array_keys($skillList);
$form->addButtonUpdate(get_lang('ModifyThread'), 'SubmitPost');
$form->addButtonUpdate(get_lang('Edit thread'), 'SubmitPost');
if ($form->validate()) {
$redirectUrl = api_get_path(WEB_CODE_PATH).'forum/viewforum.php?forum='.$forumId.'&'.api_get_cidreq();

@ -63,7 +63,7 @@ $(function () {
var l = $(this);
var id = l.closest("tr").attr("id");
var filename = l.closest("tr").find(".attachFilename").html();
if (confirm("'.get_lang('AreYouSureToDeleteJS').'", filename)) {
if (confirm("'.get_lang('Are you sure to delete').'", filename)) {
$.ajax({
type: "POST",
url: "'.$ajaxUrl.'&a=delete_file&attachId=" + id +"&thread='.$threadId.'&forum='.$forumId.'",
@ -200,7 +200,7 @@ function show_add_forumcategory_form($inputvalues = [], $lp_id)
// hidden field if from learning path
$form->addElement('hidden', 'lp_id', $lp_id);
// Setting the form elements.
$form->addElement('header', get_lang('AddForumCategory'));
$form->addElement('header', get_lang('Add forum category'));
$form->addElement('text', 'forum_category_title', get_lang('Title'), ['autofocus']);
$form->addElement(
'html_editor',
@ -222,10 +222,10 @@ function show_add_forumcategory_form($inputvalues = [], $lp_id)
[] // extra data
);
$form->addButtonCreate(get_lang('CreateCategory'), 'SubmitForumCategory');
$form->addButtonCreate(get_lang('Create category'), 'SubmitForumCategory');
// Setting the rules.
$form->addRule('forum_category_title', get_lang('ThisFieldIsRequired'), 'required');
$form->addRule('forum_category_title', get_lang('Required field'), 'required');
// The validation or display
if ($form->validate()) {
@ -261,9 +261,9 @@ function show_add_forum_form($inputvalues = [], $lp_id)
$form = new FormValidator('forumcategory', 'post', 'index.php?'.api_get_cidreq());
// The header for the form
$form_title = get_lang('AddForum');
$form_title = get_lang('Add a forum');
if (!empty($inputvalues)) {
$form_title = get_lang('EditForum');
$form_title = get_lang('Edit forum');
}
$form->addHeader($form_title);
@ -298,7 +298,7 @@ function show_add_forum_form($inputvalues = [], $lp_id)
$form->addElement(
'select',
'forum_category',
get_lang('InForumCategory'),
get_lang('Create in category'),
$forum_categories_titles
);
$form->applyFilter('forum_category', 'html_filter');
@ -308,7 +308,7 @@ function show_add_forum_form($inputvalues = [], $lp_id)
$group = [];
$group[] = $form->createElement('radio', 'allow_anonymous', null, get_lang('Yes'), 1);
$group[] = $form->createElement('radio', 'allow_anonymous', null, get_lang('No'), 0);
$form->addGroup($group, 'allow_anonymous_group', get_lang('AllowAnonymousPosts'));
$form->addGroup($group, 'allow_anonymous_group', get_lang('Allow anonymous posts?'));
}
$form->addButtonAdvancedSettings('advanced_params');
@ -316,19 +316,19 @@ function show_add_forum_form($inputvalues = [], $lp_id)
$form->addDateTimePicker(
'start_time',
[get_lang('ForumStartDate'), get_lang('ForumStartDateComment')],
[get_lang('Public access (access authorized to any member of the course)ation date'), get_lang('Public access (access authorized to any member of the course)ation dateComment')],
['id' => 'start_time']
);
$form->addDateTimePicker(
'end_time',
[get_lang('ForumEndDate'), get_lang('ForumEndDateComment')],
[get_lang('Closing date'), get_lang('Closing dateComment')],
['id' => 'end_time']
);
$form->addRule(
['start_time', 'end_time'],
get_lang('StartDateMustBeBeforeTheEndDate'),
get_lang('Start date must be before the end date'),
'compare_datetime_text',
'< allow_empty'
);
@ -336,12 +336,12 @@ function show_add_forum_form($inputvalues = [], $lp_id)
$group = [];
$group[] = $form->createElement('radio', 'moderated', null, get_lang('Yes'), 1);
$group[] = $form->createElement('radio', 'moderated', null, get_lang('No'), 0);
$form->addGroup($group, 'moderated', get_lang('ModeratedForum'));
$form->addGroup($group, 'moderated', get_lang('Moderated forum'));
$group = [];
$group[] = $form->createElement('radio', 'students_can_edit', null, get_lang('Yes'), 1);
$group[] = $form->createElement('radio', 'students_can_edit', null, get_lang('No'), 0);
$form->addGroup($group, 'students_can_edit_group', get_lang('StudentsCanEdit'));
$form->addGroup($group, 'students_can_edit_group', get_lang('Can learners edit their own posts?'));
$group = [];
$group[] = $form->createElement('radio', 'approval_direct', null, get_lang('Approval'), 1);
@ -354,27 +354,27 @@ function show_add_forum_form($inputvalues = [], $lp_id)
$group = [];
$group[] = $form->createElement('radio', 'allow_new_threads', null, get_lang('Yes'), 1);
$group[] = $form->createElement('radio', 'allow_new_threads', null, get_lang('No'), 0);
$form->addGroup($group, 'allow_new_threads_group', get_lang('AllowNewThreads'));
$form->addGroup($group, 'allow_new_threads_group', get_lang('Allow users to start new threads'));
$group = [];
$group[] = $form->createElement('radio', 'default_view_type', null, get_lang('Flat'), 'flat');
$group[] = $form->createElement('radio', 'default_view_type', null, get_lang('Threaded'), 'threaded');
$group[] = $form->createElement('radio', 'default_view_type', null, get_lang('Nested'), 'nested');
$form->addGroup($group, 'default_view_type_group', get_lang('DefaultViewType'));
$form->addGroup($group, 'default_view_type_group', get_lang('Default view type'));
// Drop down list: Groups
$groups = GroupManager::get_group_list();
$groups_titles[0] = get_lang('NotAGroupForum');
$groups_titles[0] = get_lang('Not a group forum');
foreach ($groups as $key => $value) {
$groups_titles[$value['id']] = $value['name'];
}
$form->addElement('select', 'group_forum', get_lang('ForGroup'), $groups_titles);
$form->addElement('select', 'group_forum', get_lang('For Group'), $groups_titles);
// Public or private group forum
$group = [];
$group[] = $form->createElement('radio', 'public_private_group_forum', null, get_lang('Public'), 'public');
$group[] = $form->createElement('radio', 'public_private_group_forum', null, get_lang('Private'), 'private');
$form->addGroup($group, 'public_private_group_forum_group', get_lang('PublicPrivateGroupForum'));
$group[] = $form->createElement('radio', 'public_private_group_forum', null, get_lang('Public access (access authorized to any member of the course)'), 'public');
$group[] = $form->createElement('radio', 'public_private_group_forum', null, get_lang('Private access (access authorized to group members only)'), 'private');
$form->addGroup($group, 'public_private_group_forum_group', get_lang('Public access (access authorized to any member of the course)Private access (access authorized to group members only)GroupForum'));
// Forum image
$form->addProgress();
@ -389,15 +389,15 @@ function show_add_forum_form($inputvalues = [], $lp_id)
null,
['class' => 'img-responsive']
);
$form->addElement('label', get_lang('PreviewImage'), $show_preview_image);
$form->addElement('checkbox', 'remove_picture', null, get_lang('DelImage'));
$form->addElement('label', get_lang('Preview image'), $show_preview_image);
$form->addElement('checkbox', 'remove_picture', null, get_lang('Remove picture'));
}
}
$forum_image = isset($inputvalues['forum_image']) ? $inputvalues['forum_image'] : '';
$form->addElement('file', 'picture', ($forum_image != '' ? get_lang('UpdateImage') : get_lang('AddImage')));
$form->addElement('file', 'picture', ($forum_image != '' ? get_lang('Update Image') : get_lang('Add image')));
$form->addRule(
'picture',
get_lang('OnlyImagesAllowed'),
get_lang('Only PNG, JPG or GIF images allowed'),
'filetype',
['jpg', 'jpeg', 'png', 'gif']
);
@ -409,14 +409,14 @@ function show_add_forum_form($inputvalues = [], $lp_id)
// The OK button
if (isset($_GET['id']) && $_GET['action'] == 'edit') {
$form->addButtonUpdate(get_lang('ModifyForum'), 'SubmitForum');
$form->addButtonUpdate(get_lang('Edit forum'), 'SubmitForum');
} else {
$form->addButtonCreate(get_lang('CreateForum'), 'SubmitForum');
$form->addButtonCreate(get_lang('Create forum'), 'SubmitForum');
}
// setting the rules
$form->addRule('forum_title', get_lang('ThisFieldIsRequired'), 'required');
$form->addRule('forum_category', get_lang('ThisFieldIsRequired'), 'required');
$form->addRule('forum_title', get_lang('Required field'), 'required');
$form->addRule('forum_category', get_lang('Required field'), 'required');
$defaultSettingAllowNewThreads = api_get_default_tool_setting('forum', 'allow_new_threads', 0);
@ -462,9 +462,9 @@ function show_add_forum_form($inputvalues = [], $lp_id)
if ($forumId) {
// Skill::saveSkills($form, ITEM_TYPE_FORUM, $forumId);
if (isset($values['forum_id'])) {
Display::addFlash(Display::return_message(get_lang('ForumEdited'), 'confirmation'));
Display::addFlash(Display::return_message(get_lang('The forum has been modified'), 'confirmation'));
} else {
Display::addFlash(Display::return_message(get_lang('ForumAdded'), 'confirmation'));
Display::addFlash(Display::return_message(get_lang('The forum has been added'), 'confirmation'));
}
}
}
@ -528,7 +528,7 @@ function show_edit_forumcategory_form($inputvalues = [])
$form = new FormValidator('forumcategory', 'post', 'index.php?'.api_get_cidreq().'&id='.$categoryId);
// Setting the form elements.
$form->addElement('header', '', get_lang('EditForumCategory'));
$form->addElement('header', '', get_lang('Edit forumCategory'));
$form->addElement('hidden', 'forum_category_id');
$form->addElement('text', 'forum_category_title', get_lang('Title'));
@ -552,7 +552,7 @@ function show_edit_forumcategory_form($inputvalues = [])
[] // extra data
);
$form->addButtonUpdate(get_lang('ModifyCategory'), 'SubmitEditForumCategory');
$form->addButtonUpdate(get_lang('Edit category'), 'SubmitEdit forumCategory');
// Setting the default values.
$defaultvalues['forum_category_id'] = $inputvalues['cat_id'];
@ -561,7 +561,7 @@ function show_edit_forumcategory_form($inputvalues = [])
$form->setDefaults($defaultvalues);
// Setting the rules.
$form->addRule('forum_category_title', get_lang('ThisFieldIsRequired'), 'required');
$form->addRule('forum_category_title', get_lang('Required field'), 'required');
// Validation or display
if ($form->validate()) {
@ -634,7 +634,7 @@ function store_forumcategory($values, $courseInfo = [], $showMessage = true)
'ForumCategoryUpdated',
api_get_user_id()
);
$return_message = get_lang('ForumCategoryEdited');
$return_message = get_lang('The forum category has been modified');
$logInfo = [
'tool' => TOOL_FORUM,
@ -677,7 +677,7 @@ function store_forumcategory($values, $courseInfo = [], $showMessage = true)
$courseInfo
);
}
$return_message = get_lang('ForumCategoryAdded');
$return_message = get_lang('The forum category has been added');
$logInfo = [
'tool' => TOOL_FORUM,
@ -770,7 +770,7 @@ function store_forum($values, $courseInfo = [], $returnId = false)
$_FILES['picture']['type']
);
if (!filter_extension($new_file_name)) {
//Display::addFlash(Display::return_message(get_lang('UplUnableToSaveFileFilteredExtension'), 'error'));
//Display::addFlash(Display::return_message(get_lang('File upload failed: this file extension or file type is prohibited'), 'error'));
$image_moved = false;
} else {
$file_extension = explode('.', $_FILES['picture']['name']);
@ -885,7 +885,7 @@ function store_forum($values, $courseInfo = [], $returnId = false)
$groupInfo
);
$return_message = get_lang('ForumEdited');
$return_message = get_lang('The forum has been modified');
$forumId = $values['forum_id'];
$logInfo = [
@ -973,7 +973,7 @@ function store_forum($values, $courseInfo = [], $returnId = false)
];
Event::registerLog($logInfo);
}
$return_message = get_lang('ForumAdded');
$return_message = get_lang('The forum has been added');
}
if ($returnId) {
@ -1029,7 +1029,7 @@ function deleteForumCategoryThread($content, $id)
$return_message = '';
if ($content === 'forumcategory') {
$tool_constant = TOOL_FORUM_CATEGORY;
$return_message = get_lang('ForumCategoryDeleted');
$return_message = get_lang('Forum category deleted');
if (!empty($forum_list)) {
$sql = "SELECT forum_id FROM $table_forums
@ -1051,7 +1051,7 @@ function deleteForumCategoryThread($content, $id)
if ($content === 'forum') {
$tool_constant = TOOL_FORUM;
$return_message = get_lang('ForumDeleted');
$return_message = get_lang('Forum deleted');
if (!empty($number_threads)) {
$sql = "SELECT thread_id FROM $table_forum_thread
@ -1073,7 +1073,7 @@ function deleteForumCategoryThread($content, $id)
if ($content === 'thread') {
$tool_constant = TOOL_FORUM_THREAD;
$return_message = get_lang('ThreadDeleted');
$return_message = get_lang('Thread deleted');
Skill::deleteSkillsFromItem($id, ITEM_TYPE_FORUM_THREAD);
}
@ -1230,7 +1230,7 @@ function return_visible_invisible_icon(
}
}
$html .= 'action=invisible&content='.$content.'&id='.$id.'">'.
Display::return_icon('visible.png', get_lang('MakeInvisible'), [], ICON_SIZE_SMALL).'</a>';
Display::return_icon('visible.png', get_lang('Make invisible'), [], ICON_SIZE_SMALL).'</a>';
}
if ($current_visibility_status == 0) {
$html .= '<a href="'.api_get_self().'?'.api_get_cidreq().'&';
@ -1240,7 +1240,7 @@ function return_visible_invisible_icon(
}
}
$html .= 'action=visible&content='.$content.'&id='.$id.'">'.
Display::return_icon('invisible.png', get_lang('MakeVisible'), [], ICON_SIZE_SMALL).'</a>';
Display::return_icon('invisible.png', get_lang('Make Visible'), [], ICON_SIZE_SMALL).'</a>';
}
return $html;
@ -1263,7 +1263,7 @@ function return_lock_unlock_icon($content, $id, $current_lock_status, $additiona
if (api_resource_is_locked_by_gradebook($id, LINK_FORUM_THREAD)) {
$html .= Display::return_icon(
'lock_na.png',
get_lang('ResourceLockedByGradebook'),
get_lang('This option is not available because this activity is contained by an assessment, which is currently locked. To unlock the assessment, ask your platform administrator.'),
[],
ICON_SIZE_SMALL
);
@ -1324,15 +1324,15 @@ function return_up_down_icon($content, $id, $list)
}
if ($position > 1) {
$return_value = '<a href="'.api_get_self().'?'.api_get_cidreq().'&action=move&direction=up&content='.$content.'&forumcategory='.$forumCategory.'&id='.$id.'" title="'.get_lang('MoveUp').'">'.
Display::return_icon('up.png', get_lang('MoveUp'), [], ICON_SIZE_SMALL).'</a>';
$return_value = '<a href="'.api_get_self().'?'.api_get_cidreq().'&action=move&direction=up&content='.$content.'&forumcategory='.$forumCategory.'&id='.$id.'" title="'.get_lang('Move up').'">'.
Display::return_icon('up.png', get_lang('Move up'), [], ICON_SIZE_SMALL).'</a>';
} else {
$return_value = Display::return_icon('up_na.png', '-', [], ICON_SIZE_SMALL);
}
if ($position < $total_items) {
$return_value .= '<a href="'.api_get_self().'?'.api_get_cidreq().'&action=move&direction=down&content='.$content.'&forumcategory='.$forumCategory.'&id='.$id.'" title="'.get_lang('MoveDown').'" >'.
Display::return_icon('down.png', get_lang('MoveDown'), [], ICON_SIZE_SMALL).'</a>';
$return_value .= '<a href="'.api_get_self().'?'.api_get_cidreq().'&action=move&direction=down&content='.$content.'&forumcategory='.$forumCategory.'&id='.$id.'" title="'.get_lang('Move down').'" >'.
Display::return_icon('down.png', get_lang('Move down'), [], ICON_SIZE_SMALL).'</a>';
} else {
$return_value .= Display::return_icon('down_na.png', '-', [], ICON_SIZE_SMALL);
}
@ -1377,7 +1377,7 @@ function change_visibility($content, $id, $target_visibility)
handle_mail_cue($content, $id);
}
return get_lang('VisibilityChanged');
return get_lang('The visibility has been changed.');
}
/**
@ -1418,10 +1418,10 @@ function change_lock_status($content, $id, $action)
// Determine what we are doing => defines the value for the database and the return message.
if ($action == 'lock') {
$db_locked = 1;
$return_message = get_lang('Locked');
$return_message = get_lang('Locked: students can no longer post new messages in this forum category, forum or thread but they can still read the messages that were already posted');
} elseif ($action == 'unlock') {
$db_locked = 0;
$return_message = get_lang('Unlocked');
$return_message = get_lang('Unlocked: learners can post new messages in this forum category, forum or thread');
} else {
return get_lang('Error');
}
@ -2809,7 +2809,7 @@ function updateThread($values)
}
}
$message = get_lang('EditPostStored').'<br />';
$message = get_lang('The post has been modified').'<br />';
Display::addFlash(Display::return_message($message, 'confirmation', false));
}
@ -2860,7 +2860,7 @@ function store_thread(
if ($showMessage) {
Display::addFlash(
Display::return_message(
get_lang('UplNoFileUploaded'),
get_lang('No file was uploaded.'),
'error',
false
)
@ -3052,13 +3052,13 @@ function store_thread(
c_id = $course_id AND
thread_id='".Database::escape_string($lastThread->getIid())."'";
$result = Database::query($sql);
$message = get_lang('NewThreadStored');
$message = get_lang('The new thread has been added');
// Overwrite default message.
if ($current_forum['moderated'] &&
!api_is_allowed_to_edit(null, true)
) {
$message = get_lang('MessageHasToBeApproved');
$message = get_lang('Your message has to be approved before people can view it.');
}
// Storing the attachments if any.
@ -3072,7 +3072,7 @@ function store_thread(
if (!filter_extension($new_file_name)) {
if ($showMessage) {
Display::addFlash(Display::return_message(
get_lang('UplUnableToSaveFileFilteredExtension'),
get_lang('File upload failed: this file extension or file type is prohibited'),
'error'
));
}
@ -3091,13 +3091,13 @@ function store_thread(
if ($current_forum['approval_direct_post'] == '1' &&
!api_is_allowed_to_edit(null, true)
) {
$message .= get_lang('MessageHasToBeApproved').'<br />';
$message .= get_lang('ReturnTo').' <a href="viewforum.php?'.api_get_cidreq().'&forum='.$values['forum_id'].'">'.
$message .= get_lang('Your message has to be approved before people can view it.').'<br />';
$message .= get_lang('You can now return to the').' <a href="viewforum.php?'.api_get_cidreq().'&forum='.$values['forum_id'].'">'.
get_lang('Forum').'</a><br />';
} else {
$message .= get_lang('ReturnTo').' <a href="viewforum.php?'.api_get_cidreq().'&forum='.$values['forum_id'].'">'.
$message .= get_lang('You can now return to the').' <a href="viewforum.php?'.api_get_cidreq().'&forum='.$values['forum_id'].'">'.
get_lang('Forum').'</a><br />';
$message .= get_lang('ReturnTo').' <a href="viewthread.php?'.api_get_cidreq().'&forum='.$values['forum_id'].'&thread='.$lastThread->getIid().'">'.
$message .= get_lang('You can now return to the').' <a href="viewthread.php?'.api_get_cidreq().'&forum='.$values['forum_id'].'&thread='.$lastThread->getIid().'">'.
get_lang('Message').'</a>';
}
$reply_info['new_post_id'] = $lastPostId;
@ -3201,7 +3201,7 @@ function show_add_post_form($current_forum, $action, $form_values = '', $showPre
'UserStatus' => 'student',
]
);
$form->addRule('post_text', get_lang('ThisFieldIsRequired'), 'required');
$form->addRule('post_text', get_lang('Required field'), 'required');
if (in_array($action, ['newthread', 'replythread', 'replymessage', 'quote'])) {
$extraFields = new ExtraField('forum_post');
@ -3232,7 +3232,7 @@ function show_add_post_form($current_forum, $action, $form_values = '', $showPre
if (Gradebook::is_active() &&
(api_is_course_admin() || api_is_session_general_coach() || api_is_course_tutor()) && !($myThread)
) {
$form->addElement('advanced_settings', 'advanced_params', get_lang('AdvancedParameters'));
$form->addElement('advanced_settings', 'advanced_params', get_lang('Advanced settings'));
$form->addElement('html', '<div id="advanced_params_options" style="display:none">');
// Thread qualify
@ -3243,7 +3243,7 @@ function show_add_post_form($current_forum, $action, $form_values = '', $showPre
'checkbox',
'thread_qualify_gradebook',
'',
get_lang('QualifyThreadGradebook'),
get_lang('Grade this thread'),
'onclick="javascript:if(this.checked==true){document.getElementById(\'options_field\').style.display = \'block\';}else{document.getElementById(\'options_field\').style.display = \'none\';}"'
);
} else {
@ -3251,15 +3251,15 @@ function show_add_post_form($current_forum, $action, $form_values = '', $showPre
}
$form->addElement('html', '<div id="options_field" style="display:none">');
$form->addElement('text', 'numeric_calification', get_lang('QualificationNumeric'));
$form->addElement('text', 'numeric_calification', get_lang('Maximum score'));
$form->applyFilter('numeric_calification', 'html_filter');
$form->addElement('text', 'calification_notebook_title', get_lang('TitleColumnGradebook'));
$form->addElement('text', 'calification_notebook_title', get_lang('Column header in Competences Report'));
$form->applyFilter('calification_notebook_title', 'html_filter');
$form->addElement(
'text',
'weight_calification',
get_lang('QualifyWeight'),
get_lang('Weight in Report'),
['value' => '0.00', 'onfocus' => "javascript: this.select();"]
);
$form->applyFilter('weight_calification', 'html_filter');
@ -3271,8 +3271,8 @@ function show_add_post_form($current_forum, $action, $form_values = '', $showPre
$group,
'',
[
get_lang('ForumThreadPeerScoring'),
get_lang('ForumThreadPeerScoringComment'),
get_lang('Thread scored by peers'),
get_lang('Thread scored by peersComment'),
]
);
$form->addElement('html', '</div>');
@ -3284,14 +3284,14 @@ function show_add_post_form($current_forum, $action, $form_values = '', $showPre
}
if (api_is_allowed_to_edit(null, true) && $action == 'newthread') {
$form->addElement('checkbox', 'thread_sticky', '', get_lang('StickyPost'));
$form->addElement('checkbox', 'thread_sticky', '', get_lang('This is a sticky message (appears always on top and has a special sticky icon)'));
}
if (in_array($action, ['quote', 'replymessage'])) {
$form->addFile('user_upload[]', get_lang('Attachment'));
$form->addButton(
'add_attachment',
get_lang('AddAttachment'),
get_lang('Add attachment'),
'paperclip',
'default',
'default',
@ -3324,13 +3324,13 @@ function show_add_post_form($current_forum, $action, $form_values = '', $showPre
// Setting the class and text of the form title and submit button.
if ($action == 'quote') {
$form->addButtonCreate(get_lang('QuoteMessage'), 'SubmitPost');
$form->addButtonCreate(get_lang('Quote this message'), 'SubmitPost');
} elseif ($action == 'replythread') {
$form->addButtonCreate(get_lang('ReplyToThread'), 'SubmitPost');
$form->addButtonCreate(get_lang('Reply to this thread'), 'SubmitPost');
} elseif ($action == 'replymessage') {
$form->addButtonCreate(get_lang('ReplyToMessage'), 'SubmitPost');
$form->addButtonCreate(get_lang('Reply to this message'), 'SubmitPost');
} else {
$form->addButtonCreate(get_lang('CreateThread'), 'SubmitPost');
$form->addButtonCreate(get_lang('Create thread'), 'SubmitPost');
}
$defaults['thread_peer_qualify'] = 0;
@ -3356,7 +3356,7 @@ function show_add_post_form($current_forum, $action, $form_values = '', $showPre
if ($posterInfo) {
$posterName = $posterInfo['complete_name'];
}
$defaults['post_title'] = get_lang('ReplyShort').api_html_entity_decode($values['post_title'], ENT_QUOTES);
$defaults['post_title'] = get_lang('Re:').api_html_entity_decode($values['post_title'], ENT_QUOTES);
// When we are quoting a message then we have to put that message into the wysiwyg editor.
// Note: The style has to be hardcoded here because using class="quote" didn't work.
if ($action == 'quote') {
@ -3380,11 +3380,11 @@ function show_add_post_form($current_forum, $action, $form_values = '', $showPre
$form->setDefaults(isset($defaults) ? $defaults : []);
// The course admin can make a thread sticky (=appears with special icon and always on top).
$form->addRule('post_title', get_lang('ThisFieldIsRequired'), 'required');
$form->addRule('post_title', get_lang('Required field'), 'required');
if ($current_forum['allow_anonymous'] == 1 && !isset($_user['user_id'])) {
$form->addRule(
'poster_name',
get_lang('ThisFieldIsRequired'),
get_lang('Required field'),
'required'
);
}
@ -3400,7 +3400,7 @@ function show_add_post_form($current_forum, $action, $form_values = '', $showPre
) {
Display::addFlash(
Display::return_message(
get_lang('YouMustAssignWeightOfQualification').'&nbsp;<a href="javascript:window.history.go(-1);">'.get_lang('Back').'</a>',
get_lang('You must assign a score to this activity').'&nbsp;<a href="javascript:window.history.go(-1);">'.get_lang('Back').'</a>',
'error',
false
)
@ -3852,7 +3852,7 @@ function store_reply($current_forum, $values, $courseId = 0, $userId = 0)
Database::query($sql);
$values['new_post_id'] = $new_post_id;
$message = get_lang('ReplyAdded');
$message = get_lang('The reply has been added');
if (!empty($_POST['file_ids']) && is_array($_POST['file_ids'])) {
foreach ($_POST['file_ids'] as $key => $id) {
@ -3890,13 +3890,13 @@ function store_reply($current_forum, $values, $courseId = 0, $userId = 0)
if ($current_forum['approval_direct_post'] == '1' &&
!api_is_allowed_to_edit(null, true)
) {
$message .= '<br />'.get_lang('MessageHasToBeApproved').'<br />';
$message .= '<br />'.get_lang('Your message has to be approved before people can view it.').'<br />';
}
if ($current_forum['moderated'] &&
!api_is_allowed_to_edit(null, true)
) {
$message .= '<br />'.get_lang('MessageHasToBeApproved').'<br />';
$message .= '<br />'.get_lang('Your message has to be approved before people can view it.').'<br />';
}
// Setting the notification correctly.
@ -3933,7 +3933,7 @@ function store_reply($current_forum, $values, $courseId = 0, $userId = 0)
} else {
Display::addFlash(
Display::return_message(
get_lang('UplNoFileUploaded').' '.get_lang('UplSelectFileFirst'),
get_lang('No file was uploaded.').' '.get_lang('Please select a file before pressing the upload button.'),
'error'
)
);
@ -3967,7 +3967,7 @@ function show_edit_post_form(
'post',
api_get_self().'?'.api_get_cidreq().'&forum='.intval($_GET['forum']).'&thread='.intval($_GET['thread']).'&post='.intval($_GET['post'])
);
$form->addElement('header', get_lang('EditPost'));
$form->addElement('header', get_lang('Edit a post'));
// Setting the form elements.
$form->addElement('hidden', 'post_id', $current_post['post_id']);
$form->addElement('hidden', 'thread_id', $current_thread['thread_id']);
@ -3995,7 +3995,7 @@ function show_edit_post_form(
'UserStatus' => 'student',
]
);
$form->addRule('post_text', get_lang('ThisFieldIsRequired'), 'required');
$form->addRule('post_text', get_lang('Required field'), 'required');
$extraFields = new ExtraField('forum_post');
$extraFields->addElements($form, $current_post['post_id']);
@ -4016,7 +4016,7 @@ function show_edit_post_form(
'radio',
'status',
null,
get_lang('WaitingModeration'),
get_lang('Waiting for moderation'),
2
);
$group[] = $form->createElement(
@ -4034,14 +4034,14 @@ function show_edit_post_form(
'checkbox',
'post_notification',
'',
get_lang('NotifyByEmail').' ('.$current_post['email'].')'
get_lang('Notify me by e-mail when somebody replies').' ('.$current_post['email'].')'
);
if (api_is_allowed_to_edit(null, true) &&
empty($current_post['post_parent_id'])
) {
// The sticky checkbox only appears when it is the first post of a thread.
$form->addElement('checkbox', 'thread_sticky', '', get_lang('StickyPost'));
$form->addElement('checkbox', 'thread_sticky', '', get_lang('This is a sticky message (appears always on top and has a special sticky icon)'));
if ($current_thread['thread_sticky'] == 1) {
$defaults['thread_sticky'] = true;
}
@ -4052,7 +4052,7 @@ function show_edit_post_form(
$form->addFile('user_upload[]', get_lang('Attachment'));
$form->addButton(
'add_attachment',
get_lang('AddAttachment'),
get_lang('Add attachment'),
'paperclip',
'default',
'default',
@ -4060,7 +4060,7 @@ function show_edit_post_form(
['id' => 'reply-add-attachment']
);
$form->addButtonUpdate(get_lang('Modify'), 'SubmitPost');
$form->addButtonUpdate(get_lang('Edit'), 'SubmitPost');
// Setting the default values for the form elements.
$defaults['post_title'] = $current_post['post_title'];
@ -4079,7 +4079,7 @@ function show_edit_post_form(
// The course admin can make a thread sticky (=appears with special icon and always on top).
$form->addRule('post_title', get_lang('ThisFieldIsRequired'), 'required');
$form->addRule('post_title', get_lang('Required field'), 'required');
// Validation or display
if ($form->validate()) {
@ -4201,9 +4201,9 @@ function store_edit_post($forumInfo, $values)
);
}
$message = get_lang('EditPostStored').'<br />';
$message .= get_lang('ReturnTo').' <a href="viewforum.php?'.api_get_cidreq().'&forum='.intval($_GET['forum']).'&">'.get_lang('Forum').'</a><br />';
$message .= get_lang('ReturnTo').' <a href="viewthread.php?'.api_get_cidreq().'&forum='.intval($_GET['forum']).'&thread='.$values['thread_id'].'&post='.Security::remove_XSS($_GET['post']).'">'.get_lang('Message').'</a>';
$message = get_lang('The post has been modified').'<br />';
$message .= get_lang('You can now return to the').' <a href="viewforum.php?'.api_get_cidreq().'&forum='.intval($_GET['forum']).'&">'.get_lang('Forum').'</a><br />';
$message .= get_lang('You can now return to the').' <a href="viewthread.php?'.api_get_cidreq().'&forum='.intval($_GET['forum']).'&thread='.$values['thread_id'].'&post='.Security::remove_XSS($_GET['post']).'">'.get_lang('Message').'</a>';
Session::erase('formelements');
Session::erase('origin');
@ -4392,7 +4392,7 @@ function approve_post($post_id, $action)
$return = Database::query($sql);
if ($return) {
return 'PostVisibilityChanged';
return 'PostThe visibility has been changed.';
}
}
@ -4608,14 +4608,14 @@ function send_mail($userInfo, $forumInfo, $thread_information, $postInfo = [])
'forum/viewthread.php?'.api_get_cidreq().'&forum='.$thread_information['forum_id'].'&thread='.$thread_information['thread_id'];
}
$email_body = get_lang('Dear').' '.api_get_person_name($userInfo['firstname'], $userInfo['lastname'], null, PERSON_NAME_EMAIL_ADDRESS).", <br />\n\r";
$email_body .= get_lang('NewForumPost').': '.$forumInfo['forum_title'].' - '.$thread_information['thread_title']." <br />\n";
$email_body .= get_lang('New Post in the forum').': '.$forumInfo['forum_title'].' - '.$thread_information['thread_title']." <br />\n";
$courseId = api_get_configuration_value('global_forums_course_id');
$subject = get_lang('NewForumPost').' - '.$_course['official_code'].': '.$forumInfo['forum_title'].' - '.$thread_information['thread_title']." <br />\n";
$subject = get_lang('New Post in the forum').' - '.$_course['official_code'].': '.$forumInfo['forum_title'].' - '.$thread_information['thread_title']." <br />\n";
$courseInfoTitle = get_lang('Course').': '.$_course['name'].' - ['.$_course['official_code']."] - <br />\n";
if (!empty($courseId) && $_course['real_id'] == $courseId) {
$subject = get_lang('NewForumPost').': '.$forumInfo['forum_title'].' - '.$thread_information['thread_title']." <br />\n";
$subject = get_lang('New Post in the forum').': '.$forumInfo['forum_title'].' - '.$thread_information['thread_title']." <br />\n";
$courseInfoTitle = " <br />\n";
}
$email_body .= $courseInfoTitle;
@ -4629,10 +4629,10 @@ function send_mail($userInfo, $forumInfo, $thread_information, $postInfo = [])
}
}
$email_body .= get_lang('YouWantedToStayInformed')."<br />\n";
$email_body .= get_lang('You stated that you wanted to be informed by e-mail whenever somebody replies on the thread')."<br />\n";
if (!empty($thread_link)) {
$email_body .= get_lang('ThreadCanBeFoundHere')." : <br /><a href=\"".$thread_link."\">".$thread_link."</a>\n";
$email_body .= get_lang('The thread can be found here')." : <br /><a href=\"".$thread_link."\">".$thread_link."</a>\n";
}
if ($userInfo['user_id'] != $user_id) {
@ -4666,7 +4666,7 @@ function move_thread_form()
api_get_self().'?forum='.intval($_GET['forum']).'&thread='.intval($_GET['thread']).'&action='.Security::remove_XSS($_GET['action']).'&'.api_get_cidreq()
);
// The header for the form
$form->addElement('header', get_lang('MoveThread'));
$form->addElement('header', get_lang('Move Thread'));
// Invisible form: the thread_id
$form->addElement('hidden', 'thread_id', intval($_GET['thread']));
// the fora
@ -4675,7 +4675,7 @@ function move_thread_form()
$htmlcontent = '<div class="row">
<div class="label">
<span class="form_required">*</span>'.get_lang('MoveTo').'
<span class="form_required">*</span>'.get_lang('Move to').'
</div>
<div class="formw">';
$htmlcontent .= '<select name="forum">';
@ -4697,7 +4697,7 @@ function move_thread_form()
$form->addElement('html', $htmlcontent);
// The OK button
$form->addButtonSave(get_lang('MoveThread'), 'SubmitForum');
$form->addButtonSave(get_lang('Move Thread'), 'SubmitForum');
// Validation or display
if ($form->validate()) {
@ -4725,7 +4725,7 @@ function move_post_form()
api_get_self().'?'.api_get_cidreq().'&forum='.intval($_GET['forum']).'&thread='.intval($_GET['thread']).'&post='.Security::remove_XSS($_GET['post']).'&action='.Security::remove_XSS($_GET['action']).'&post='.Security::remove_XSS($_GET['post'])
);
// The header for the form
$form->addElement('header', '', get_lang('MovePost'));
$form->addElement('header', '', get_lang('Move post'));
// Invisible form: the post_id
$form->addElement('hidden', 'post_id', intval($_GET['post']));
@ -4733,18 +4733,18 @@ function move_post_form()
// Dropdown list: Threads of this forum
$threads = get_threads($_GET['forum']);
//my_print_r($threads);
$threads_list[0] = get_lang('ANewThread');
$threads_list[0] = get_lang('A new thread');
foreach ($threads as $key => $value) {
$threads_list[$value['thread_id']] = $value['thread_title'];
}
$form->addElement('select', 'thread', get_lang('MoveToThread'), $threads_list);
$form->addElement('select', 'thread', get_lang('Move toThread'), $threads_list);
$form->applyFilter('thread', 'html_filter');
// The OK button
$form->addButtonSave(get_lang('MovePost'), 'submit');
$form->addButtonSave(get_lang('Move post'), 'submit');
// Setting the rules
$form->addRule('thread', get_lang('ThisFieldIsRequired'), 'required');
$form->addRule('thread', get_lang('Required field'), 'required');
// Validation or display
if ($form->validate()) {
@ -4875,7 +4875,7 @@ function store_move_post($values)
Database::query($sql);
}
return get_lang('ThreadMoved');
return get_lang('Thread moved');
}
/**
@ -4946,7 +4946,7 @@ function store_move_thread($values)
}
}
return get_lang('ThreadMoved');
return get_lang('Thread moved');
}
/**
@ -5014,15 +5014,15 @@ function forum_search()
);
// Setting the form elements.
$form->addElement('header', '', get_lang('ForumSearch'));
$form->addElement('text', 'search_term', get_lang('SearchTerm'), ['autofocus']);
$form->addElement('header', '', get_lang('Search in the Forum'));
$form->addElement('text', 'search_term', get_lang('Search term'), ['autofocus']);
$form->applyFilter('search_term', 'html_filter');
$form->addElement('static', 'search_information', '', get_lang('ForumSearchInformation'));
$form->addElement('static', 'search_information', '', get_lang('Search in the ForumInformation'));
$form->addButtonSearch(get_lang('Search'));
// Setting the rules.
$form->addRule('search_term', get_lang('ThisFieldIsRequired'), 'required');
$form->addRule('search_term', get_lang('TooShort'), 'minlength', 3);
$form->addRule('search_term', get_lang('Required field'), 'required');
$form->addRule('search_term', get_lang('Too short'), 'minlength', 3);
// Validation or display.
if ($form->validate()) {
@ -5145,7 +5145,7 @@ function display_forum_search_results($search_term)
$search_results[] = $search_results_item;
}
}
echo '<legend>'.count($search_results).' '.get_lang('ForumSearchResults').'</legend>';
echo '<legend>'.count($search_results).' '.get_lang('Search in the ForumResults').'</legend>';
echo '<ol>';
if ($search_results) {
echo implode($search_results);
@ -5178,7 +5178,7 @@ function search_link()
}
}
$url = $url.implode('&', $url_parameter);
$return .= '<a href="'.$url.'">'.Display::return_icon('delete.gif', get_lang('RemoveSearchResults')).'</a>';
$return .= '<a href="'.$url.'">'.Display::return_icon('delete.gif', get_lang('Clean search results')).'</a>';
}
}
@ -5242,7 +5242,7 @@ function add_forum_attachment_file($file_comment, $last_id)
if (!filter_extension($new_file_name)) {
Display::addFlash(
Display::return_message(
get_lang('UplUnableToSaveFileFilteredExtension'),
get_lang('File upload failed: this file extension or file type is prohibited'),
'error'
)
);
@ -5335,7 +5335,7 @@ function edit_forum_attachment_file($file_comment, $post_id, $id_attach)
if (!filter_extension($new_file_name)) {
Display::addFlash(
Display::return_message(
get_lang('UplUnableToSaveFileFilteredExtension'),
get_lang('File upload failed: this file extension or file type is prohibited'),
'error'
)
);
@ -5489,7 +5489,7 @@ function delete_attachment($post_id, $id_attach = 0)
);
if (!empty($result) && !empty($id_attach)) {
Display::addFlash(Display::return_message(get_lang('AttachmentFileDeleteSuccess'), 'confirmation'));
Display::addFlash(Display::return_message(get_lang('The attached file has been deleted'), 'confirmation'));
}
return $affectedRows;
@ -5693,7 +5693,7 @@ function set_notification($content, $id, $addOnly = false, $userInfo = [], $cour
Session::erase('forum_notification');
getNotificationsPerUser(0, true);
return get_lang('YouWillBeNotifiedOfNewPosts');
return get_lang('You will be notified of new posts by e-mail.');
} else {
if (!$addOnly) {
$sql = "DELETE FROM $table_notification
@ -5705,7 +5705,7 @@ function set_notification($content, $id, $addOnly = false, $userInfo = [], $cour
Session::erase('forum_notification');
getNotificationsPerUser(0, true);
return get_lang('YouWillNoLongerBeNotifiedOfNewPosts');
return get_lang('You will no longer be notified of new posts by email');
}
}
}
@ -6086,7 +6086,7 @@ function get_all_post_from_user($user_id, $course_code)
Display::return_icon('forum.gif', get_lang('Forum')).'&nbsp;'.Security::remove_XSS($forum['forum_title'], STUDENT).
'<div style="float:right;margin-top:-35px">
<a href="../forum/viewforum.php?'.api_get_cidreq_params($course_code).'&forum='.$forum['forum_id'].' " >'.
get_lang('SeeForum').'
get_lang('See forum').'
</a>
</div></div>';
$forum_results .= '<br / >';
@ -6331,11 +6331,11 @@ function getAttachmentsAjaxTable($postId = 0)
// Forum attachment Ajax table
$fileData = '
<div class="control-group " style="'.$style.'">
<label class="control-label">'.get_lang('AttachmentList').'</label>
<label class="control-label">'.get_lang('Attachments list').'</label>
<div class="controls">
<table id="attachmentFileList" class="files data_table span10">
<tr>
<th>'.get_lang('FileName').'</th>
<th>'.get_lang('Filename').'</th>
<th>'.get_lang('Size').'</th>
<th>'.get_lang('Status').'</th>
<th>'.get_lang('Comment').'</th>
@ -6417,7 +6417,7 @@ function getAttachedFiles(
// Check if $row is consistent
if (!empty($row) && is_array($row)) {
// Set result as success and bring delete URL
$json['result'] = Display::return_icon('accept.png', get_lang('Uploaded'));
$json['result'] = Display::return_icon('accept.png', get_lang('Uploaded.'));
$url = api_get_path(WEB_CODE_PATH).'forum/viewthread.php?'.api_get_cidreq().'&action=delete_attach&forum='.$forumId.'&thread='.$threadId.'&id_attach='.$row['iid'];
$json['delete'] = Display::url(
Display::return_icon('delete.png', get_lang('Delete'), [], ICON_SIZE_SMALL),
@ -6611,7 +6611,7 @@ function getPostStatus($current_forum, $row, $addWrapper = true)
$buttonType = 'success';
break;
case CForumPost::STATUS_WAITING_MODERATION:
$label = get_lang('WaitingModeration');
$label = get_lang('Waiting for moderation');
$icon = 'warning';
$buttonType = 'warning';
break;
@ -6800,10 +6800,10 @@ function getAskRevisionButton($postId, $threadInfo)
}
return Display::url(
get_lang('AskRevision'),
get_lang('Ask for a revision'),
api_get_path(WEB_CODE_PATH).'forum/viewthread.php?'.
api_get_cidreq().'&action=ask_revision&post_id='.$postId.'&forum='.$threadInfo['forum_id'].'&thread='.$threadInfo['thread_id'],
['class' => "btn $status", 'title' => get_lang('AskRevision')]
['class' => "btn $status", 'title' => get_lang('Ask for a revision')]
);
}
@ -6818,7 +6818,7 @@ function giveRevisionButton($postId, $threadInfo)
$postId = (int) $postId;
return Display::toolbarButton(
get_lang('GiveRevision'),
get_lang('Give revision'),
api_get_path(WEB_CODE_PATH).'forum/reply.php?'.api_get_cidreq().'&'.http_build_query(
[
'forum' => $threadInfo['forum_id'],
@ -6944,9 +6944,9 @@ function reportPost($postId, $forumInfo, $threadInfo)
$postData['post_title'],
$url
);
$subject = get_lang('ForumPostReported');
$subject = get_lang('Post reported');
$content = sprintf(
get_lang('UserXReportedPostXInForumX'),
get_lang('User %s has reported the message %s in the forum %s'),
$currentUser['complete_name'],
$postLink,
$forumInfo['forum_title']

@ -11,7 +11,7 @@ require_once 'forumfunction.inc.php';
api_protect_course_script(true);
$nameTools = get_lang('ToolForum');
$nameTools = get_lang('Forums');
$this_section = SECTION_COURSES;
$message = '';
//are we in a lp ?
@ -21,7 +21,7 @@ $currentUserId = api_get_user_id();
$userIdToQualify = isset($_GET['user_id']) ? intval($_GET['user_id']) : null;
$forumId = isset($_GET['forum']) ? intval($_GET['forum']) : 0;
api_block_course_item_locked_by_gradebook($_GET['thread'], LINK_FORUM_THREAD);
$nameTools = get_lang('ToolForum');
$nameTools = get_lang('Forums');
$allowed_to_edit = api_is_allowed_to_edit(null, true);
$currentThread = get_thread_information($forumId, $_GET['thread']);
@ -71,7 +71,7 @@ if (isset($_POST['idtextqualify'])) {
}
Display::addFlash(
Display::return_message(get_lang('QualificationCanNotBeGreaterThanMaxScore'), 'error')
Display::return_message(get_lang('Grade cannot exceed max score'), 'error')
);
}
@ -94,7 +94,7 @@ $groupId = api_get_group_id();
if (api_is_in_gradebook()) {
$interbreadcrumb[] = [
'url' => Category::getUrl(),
'name' => get_lang('ToolGradebook'),
'name' => get_lang('Assessments'),
];
}
@ -111,7 +111,7 @@ if ($origin == 'learnpath') {
];
$interbreadcrumb[] = [
"url" => "../group/group_space.php?".api_get_cidreq(),
"name" => get_lang('GroupSpace').' ('.$group_properties['name'].')',
"name" => get_lang('Group area').' ('.$group_properties['name'].')',
];
$interbreadcrumb[] = [
"url" => "viewforum.php?".api_get_cidreq()."&forum=".intval($_GET['forum'])."&search=".$search,
@ -126,7 +126,7 @@ if ($origin == 'learnpath') {
$interbreadcrumb[] = [
"url" => "#",
"name" => get_lang('QualifyThread'),
"name" => get_lang('Grade thread'),
];
// the last element of the breadcrumb navigation is already set in interbreadcrumb, so give empty string
@ -156,7 +156,7 @@ if ($origin == 'learnpath') {
// the last element of the breadcrumb navigation is already set in interbreadcrumb, so give empty string
$interbreadcrumb[] = [
"url" => "#",
"name" => get_lang('QualifyThread'),
"name" => get_lang('Grade thread'),
];
Display::display_header('');
}
@ -219,16 +219,16 @@ $userToQualifyInfo = api_get_user_info($userIdToQualify);
$form = new FormValidator('forum-thread-qualify', 'post', $url);
$form->addHeader($userToQualifyInfo['complete_name']);
$form->addLabel(get_lang('Thread'), $currentThread['thread_title']);
$form->addLabel(get_lang('CourseUsers'), $result['user_course']);
$form->addLabel(get_lang('PostsNumber'), $result['post']);
$form->addLabel(get_lang('NumberOfPostsForThisUser'), $result['user_post']);
$form->addLabel(get_lang('Users in course'), $result['user_course']);
$form->addLabel(get_lang('Number of posts'), $result['post']);
$form->addLabel(get_lang('Number of posts for this user'), $result['user_post']);
$form->addLabel(
get_lang('AveragePostPerUser'),
get_lang('Posts by user'),
round($result['user_post'] / $result['post'], 2)
);
$form->addText(
'idtextqualify',
[get_lang('Qualification'), get_lang('MaxScore').' '.$maxQualify],
[get_lang('Score'), get_lang('Max score').' '.$maxQualify],
$qualify
);
@ -299,28 +299,28 @@ if (isset($rows)) {
}
}
$form->addButtonSave(get_lang('QualifyThisThread'));
$form->addButtonSave(get_lang('Grade this thread'));
$form->setDefaults(['idtextqualify' => $qualify]);
$form->display();
// Show past data
if (api_is_allowed_to_edit() && $counter > 0) {
echo '<h4>'.get_lang('QualificationChangesHistory').'</h4>';
echo '<h4>'.get_lang('ScoreChangesHistory').'</h4>';
if (isset($_GET['type']) && $_GET['type'] === 'false') {
$buttons = '<a class="btn btn-default" href="forumqualify.php?'.api_get_cidreq().'&forum='.intval($_GET['forum']).'&origin='.$origin.'&thread='.$threadId.'&user='.intval($_GET['user']).'&user_id='.intval($_GET['user_id']).'&type=true&idtextqualify='.$score.'#history">'.
get_lang('MoreRecent').'</a> <a class="btn btn-default disabled" >'.get_lang('Older').'</a>';
get_lang('more recent').'</a> <a class="btn btn-default disabled" >'.get_lang('older').'</a>';
} else {
$buttons = '<a class="btn btn-default">'.get_lang('MoreRecent').'</a>
$buttons = '<a class="btn btn-default">'.get_lang('more recent').'</a>
<a class="btn btn-default" href="forumqualify.php?'.api_get_cidreq().'&forum='.intval($_GET['forum']).'&origin='.$origin.'&thread='.$threadId.'&user='.intval($_GET['user']).'&user_id='.intval($_GET['user_id']).'&type=false&idtextqualify='.$score.'#history">'.
get_lang('Older').'</a>';
get_lang('older').'</a>';
}
$table_list = '<br /><div class="btn-group">'.$buttons.'</div>';
$table_list .= '<br /><table class="table">';
$table_list .= '<tr>';
$table_list .= '<th width="50%">'.get_lang('WhoChanged').'</th>';
$table_list .= '<th width="10%">'.get_lang('NoteChanged').'</th>';
$table_list .= '<th width="40%">'.get_lang('DateChanged').'</th>';
$table_list .= '<th width="50%">'.get_lang('Who changed').'</th>';
$table_list .= '<th width="10%">'.get_lang('Note changed').'</th>';
$table_list .= '<th width="40%">'.get_lang('Date changed').'</th>';
$table_list .= '</tr>';
for ($i = 0; $i < count($historyList); $i++) {

@ -35,12 +35,12 @@ include 'forumfunction.inc.php';
$origin = api_get_origin();
// Name of the tool
$nameTools = get_lang('ToolForum');
$nameTools = get_lang('Forums');
if (api_is_in_gradebook()) {
$interbreadcrumb[] = [
'url' => Category::getUrl(),
'name' => get_lang('ToolGradebook'),
'name' => get_lang('Assessments'),
];
}
@ -54,7 +54,7 @@ if ($origin == 'group') {
];
$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'].')',
];
$interbreadcrumb[] = [
'url' => api_get_path(WEB_CODE_PATH).'forum/viewforum.php?origin='.$origin.'&forum='.intval($_GET['forum']).'&'.api_get_cidreq(),
@ -62,14 +62,14 @@ if ($origin == 'group') {
];
$interbreadcrumb[] = [
'url' => api_get_path(WEB_CODE_PATH).'forum/forumsearch.php?'.api_get_cidreq(),
'name' => get_lang('ForumSearch'),
'name' => get_lang('Search in the Forum'),
];
} else {
$interbreadcrumb[] = [
'url' => api_get_path(WEB_CODE_PATH).'forum/index.php?'.api_get_cidreq(),
'name' => $nameTools,
];
$nameTools = get_lang('ForumSearch');
$nameTools = get_lang('Search in the Forum');
}
// Display the header.

@ -25,7 +25,7 @@ require_once __DIR__.'/../inc/global.inc.php';
// A notice for unauthorized people.
api_protect_course_script(true);
$nameTools = get_lang('ToolForum');
$nameTools = get_lang('Forums');
require_once 'forumfunction.inc.php';
@ -79,7 +79,7 @@ $content = "<table width=\"100%\" height=\"100%\" cellspacing=\"5\" border=\"0\"
while ($row = Database::fetch_array($result)) {
$content .= "<tr>";
$content .= "<td rowspan=\"2\" class=\"forum_message_left\">";
$username = api_htmlentities(sprintf(get_lang('LoginX'), $row['username']), ENT_QUOTES);
$username = api_htmlentities(sprintf(get_lang('Login: %s'), $row['username']), ENT_QUOTES);
if ($row['user_id'] == '0') {
$name = $row['poster_name'];
} else {

@ -55,7 +55,7 @@ require_once 'forumfunction.inc.php';
if (api_is_in_gradebook()) {
$interbreadcrumb[] = [
'url' => Category::getUrl(),
'name' => get_lang('ToolGradebook'),
'name' => get_lang('Assessments'),
];
}
@ -73,7 +73,7 @@ if ($action === 'add') {
];
$interbreadcrumb[] = [
'url' => '#',
'name' => get_lang('AddForum'),
'name' => get_lang('Add a forum'),
];
break;
case 'forumcategory':
@ -83,7 +83,7 @@ if ($action === 'add') {
];
$interbreadcrumb[] = [
'url' => '#',
'name' => get_lang('AddForumCategory'),
'name' => get_lang('Add a forumCategory'),
];
break;
default:
@ -92,7 +92,7 @@ if ($action === 'add') {
} else {
$interbreadcrumb[] = [
'url' => '#',
'name' => get_lang('ForumCategories'),
'name' => get_lang('Forum Categories'),
];
}
@ -170,7 +170,7 @@ if (!empty($_GET['lp_id']) || !empty($_POST['lp_id'])) {
$actionLeft .= Display::url(
Display::return_icon(
'back.png',
get_lang("BackTo").' '.get_lang("LearningPaths"),
get_lang("Back to").' '.get_lang("Learning paths"),
null,
ICON_SIZE_MEDIUM
),
@ -183,7 +183,7 @@ if (api_is_allowed_to_edit(false, true)) {
$actionLeft .= Display::url(
Display::return_icon(
'new_forum.png',
get_lang('AddForum'),
get_lang('Add a forum'),
null,
ICON_SIZE_MEDIUM
),
@ -194,7 +194,7 @@ if (api_is_allowed_to_edit(false, true)) {
$actionLeft .= Display::url(
Display::return_icon(
'new_folder.png',
get_lang('AddForumCategory'),
get_lang('Add a forumCategory'),
null,
ICON_SIZE_MEDIUM
),
@ -274,7 +274,7 @@ if (is_array($forumCategories)) {
foreach ($forumCategories as $forumCategory) {
$forumCategoryInfo['id'] = $forumCategory['cat_id'];
if (empty($forumCategory['cat_title'])) {
$forumCategoryInfo['title'] = get_lang('WithoutCategory');
$forumCategoryInfo['title'] = get_lang('Without category');
} else {
$forumCategoryInfo['title'] = $forumCategory['cat_title'];
}
@ -310,7 +310,7 @@ if (is_array($forumCategories)) {
.'&action=delete&content=forumcategory&id='.$idCategory
."\" onclick=\"javascript:if(!confirm('"
.addslashes(api_htmlentities(
get_lang('DeleteForumCategory'),
get_lang('Delete forum category ?'),
ENT_QUOTES
))
."')) return false;\">"
@ -495,7 +495,7 @@ if (is_array($forumCategories)) {
$poster_id = $forum['last_poster_id'];
$userinfo = api_get_user_info($poster_id);
$username = sprintf(
get_lang('LoginX'),
get_lang('Login: %s'),
$userinfo['username']
);
}
@ -518,7 +518,7 @@ if (is_array($forumCategories)) {
$toolActions .= '<a href="'.api_get_self().'?'.api_get_cidreq()
.'&action=delete&content=forum&id='.$forum['forum_id']
."\" onclick=\"javascript:if(!confirm('".addslashes(
api_htmlentities(get_lang('DeleteForum'), ENT_QUOTES)
api_htmlentities(get_lang('Delete forum ?'), ENT_QUOTES)
)
."')) return false;\">"
.Display::return_icon('delete.png', get_lang('Delete'), [], ICON_SIZE_SMALL)
@ -557,7 +557,7 @@ if (is_array($forumCategories)) {
if ($hideNotifications == false && !api_is_anonymous() && api_is_allowed_to_session_edit(false, true)) {
$toolActions .= '<a href="'.api_get_self().'?'.api_get_cidreq()
.'&action=notify&content=forum&id='.$forum['forum_id'].'">'
.Display::return_icon($iconnotify, get_lang('NotifyMe'), null, ICON_SIZE_SMALL)
.Display::return_icon($iconnotify, get_lang('Notify me'), null, ICON_SIZE_SMALL)
.'</a>';
}
$forumInfo['tools'] = $toolActions;

@ -32,7 +32,7 @@ api_protect_course_script(true);
$cidreq = api_get_cidreq();
$_user = api_get_user_info();
$nameTools = get_lang('ToolForum');
$nameTools = get_lang('Forums');
require_once 'forumfunction.inc.php';
@ -54,7 +54,7 @@ Event::registerLog($logInfo);
if (api_is_in_gradebook()) {
$interbreadcrumb[] = [
'url' => Category::getUrl(),
'name' => get_lang('ToolGradebook'),
'name' => get_lang('Assessments'),
];
}
@ -113,7 +113,7 @@ if (!empty($groupId)) {
];
$interbreadcrumb[] = [
'url' => api_get_path(WEB_CODE_PATH).'group/group_space.php?'.$cidreq,
'name' => get_lang('GroupSpace').' '.$groupProperties['name'],
'name' => get_lang('Group area').' '.$groupProperties['name'],
];
$interbreadcrumb[] = [
'url' => api_get_path(WEB_CODE_PATH).'forum/viewforum.php?'.$cidreq.'&forum='.intval($_GET['forum']),
@ -121,7 +121,7 @@ if (!empty($groupId)) {
];
$interbreadcrumb[] = [
'url' => api_get_path(WEB_CODE_PATH).'forum/newthread.php?'.$cidreq.'&forum='.intval($_GET['forum']),
'name' => get_lang('NewTopic'),
'name' => get_lang('Create thread'),
];
} else {
$interbreadcrumb[] = ['url' => api_get_path(WEB_CODE_PATH).'forum/index.php?'.$cidreq, 'name' => $nameTools];
@ -133,7 +133,7 @@ if (!empty($groupId)) {
'url' => api_get_path(WEB_CODE_PATH).'forum/viewforum.php?'.$cidreq.'&forum='.intval($_GET['forum']),
'name' => $current_forum['forum_title'],
];
$interbreadcrumb[] = ['url' => '#', 'name' => get_lang('NewTopic')];
$interbreadcrumb[] = ['url' => '#', 'name' => get_lang('Create thread')];
}
$htmlHeadXtra[] = "
@ -169,7 +169,7 @@ handle_forum_and_forumcategories();
echo '<div class="actions">';
echo '<span style="float:right;">'.search_link().'</span>';
echo '<a href="viewforum.php?forum='.intval($_GET['forum']).'&'.$cidreq.'">'.
Display::return_icon('back.png', get_lang('BackToForum'), '', ICON_SIZE_MEDIUM).'</a>';
Display::return_icon('back.png', get_lang('Back to forum'), '', ICON_SIZE_MEDIUM).'</a>';
echo '</div>';
// Set forum attachment data into $_SESSION

@ -23,7 +23,7 @@ $this_section = SECTION_COURSES;
api_protect_course_script(true);
$nameTools = get_lang('ForumCategories');
$nameTools = get_lang('Forum Categories');
$origin = api_get_origin();
$_user = api_get_user_info();
@ -80,7 +80,7 @@ if ($current_forum['forum_of_group'] != 0) {
if (api_is_in_gradebook()) {
$interbreadcrumb[] = [
'url' => Category::getUrl(),
'name' => get_lang('ToolGradebook'),
'name' => get_lang('Assessments'),
];
}
$groupId = api_get_group_id();
@ -93,7 +93,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'],
];
$interbreadcrumb[] = [
@ -181,7 +181,7 @@ if ($origin != 'learnpath') {
echo '<a href="viewthread.php?'.api_get_cidreq().'&forum='.$forumId.'&thread='.$threadId.'">';
echo Display::return_icon(
'back.png',
get_lang('BackToThread'),
get_lang('Back to thread'),
'',
ICON_SIZE_MEDIUM
).'</a>';

@ -32,7 +32,7 @@ api_protect_course_group(GroupManager::GROUP_TOOL_FORUM);
// The section (tabs).
$this_section = SECTION_COURSES;
$nameTools = get_lang('ToolForum');
$nameTools = get_lang('Forums');
// Are we in a lp ?
$origin = api_get_origin();
@ -113,7 +113,7 @@ Event::registerLog($logInfo);
if (api_is_in_gradebook()) {
$interbreadcrumb[] = [
'url' => Category::getUrl(),
'name' => get_lang('ToolGradebook'),
'name' => get_lang('Assessments'),
];
}
@ -126,7 +126,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'],
];
$interbreadcrumb[] = [
'url' => '#',
@ -135,7 +135,7 @@ if (!empty($groupId)) {
} else {
$interbreadcrumb[] = [
'url' => $forumUrl.'index.php?search='.Security::remove_XSS($my_search),
'name' => get_lang('ForumCategories'),
'name' => get_lang('Forum Categories'),
];
$interbreadcrumb[] = [
'url' => $forumUrl.'viewforumcategory.php?forumcategory='.$current_forum_category['cat_id']
@ -237,7 +237,7 @@ if ($my_action == 'liststd' &&
break;
}
$table_list = Display::page_subheader(get_lang('ThreadUsersList').': '.get_name_thread_by_id($_GET['id']));
$table_list = Display::page_subheader(get_lang('Users list of the thread').': '.get_name_thread_by_id($_GET['id']));
if ($nrorow3 > 0 || $nrorow3 == -2) {
$url = api_get_cidreq().'&forum='.$my_forum.'&action='
@ -245,15 +245,15 @@ if ($my_action == 'liststd' &&
.Security::remove_XSS($_GET['content'], STUDENT).'&id='.intval($_GET['id']);
$tabs = [
[
'content' => get_lang('AllStudents'),
'content' => get_lang('All learners'),
'url' => $forumUrl.'viewforum.php?'.$url.'&list=all',
],
[
'content' => get_lang('StudentsQualified'),
'content' => get_lang('Qualified learners'),
'url' => $forumUrl.'viewforum.php?'.$url.'&list=qualify',
],
[
'content' => get_lang('StudentsNotQualified'),
'content' => get_lang('Unqualified learners'),
'url' => $forumUrl.'viewforum.php?'.$url.'&list=notqualify',
],
];
@ -263,13 +263,13 @@ if ($my_action == 'liststd' &&
$table_list .= '<center><br /><table class="data_table" style="width:50%">';
// The column headers (TODO: Make this sortable).
$table_list .= '<tr >';
$table_list .= '<th height="24">'.get_lang('NamesAndLastNames').'</th>';
$table_list .= '<th height="24">'.get_lang('First names and last names').'</th>';
if ($listType == 'qualify') {
$table_list .= '<th>'.get_lang('Qualification').'</th>';
$table_list .= '<th>'.get_lang('Score').'</th>';
}
if (api_is_allowed_to_edit(null, true)) {
$table_list .= '<th>'.get_lang('Qualify').'</th>';
$table_list .= '<th>'.get_lang('Grade activity').'</th>';
}
$table_list .= '</tr>';
$max_qualify = showQualify('2', $userId, $_GET['id']);
@ -302,22 +302,22 @@ if ($my_action == 'liststd' &&
.intval($_GET['id']).'&user='.$row_student_list['id']
.'&user_id='.$row_student_list['id'].'&idtextqualify='
.$current_qualify_thread.'">'
.Display::return_icon($icon_qualify, get_lang('Qualify')).'</a></td></tr>';
.Display::return_icon($icon_qualify, get_lang('Grade activity')).'</a></td></tr>';
}
$counter_stdlist++;
}
} else {
if ($listType === 'qualify') {
$table_list .= '<tr><td colspan="2">'.get_lang('ThereIsNotQualifiedLearners').'</td></tr>';
$table_list .= '<tr><td colspan="2">'.get_lang('There are no qualified learners').'</td></tr>';
} else {
$table_list .= '<tr><td colspan="2">'.get_lang('ThereIsNotUnqualifiedLearners').'</td></tr>';
$table_list .= '<tr><td colspan="2">'.get_lang('There are no unqualified learners').'</td></tr>';
}
}
$table_list .= '</table></center>';
$table_list .= '<br />';
} else {
$table_list .= Display::return_message(get_lang('NoParticipation'), 'warning');
$table_list .= Display::return_message(get_lang('There are no participants'), 'warning');
}
}
@ -335,12 +335,12 @@ echo '<div class="actions">';
if ($origin != 'learnpath') {
if (!empty($groupId)) {
echo '<a href="'.api_get_path(WEB_CODE_PATH).'group/group_space.php?'.api_get_cidreq().'">'
.Display::return_icon('back.png', get_lang('BackTo')
.Display::return_icon('back.png', get_lang('Back to')
.' '.get_lang('Groups'), '', ICON_SIZE_MEDIUM).'</a>';
} else {
echo '<span style="float:right;">'.search_link().'</span>';
echo '<a href="'.$forumUrl.'index.php?'.api_get_cidreq().'">'
.Display::return_icon('back.png', get_lang('BackToForumOverview'), '', ICON_SIZE_MEDIUM)
.Display::return_icon('back.png', get_lang('Back toForumOverview'), '', ICON_SIZE_MEDIUM)
.'</a>';
}
}
@ -358,18 +358,18 @@ if (api_is_allowed_to_edit(false, true) ||
if ($my_forum == strval(intval($my_forum))) {
echo '<a href="'.$forumUrl.'newthread.php?'.api_get_cidreq().'&forum='
.Security::remove_XSS($my_forum).'">'
.Display::return_icon('new_thread.png', get_lang('NewTopic'), '', ICON_SIZE_MEDIUM)
.Display::return_icon('new_thread.png', get_lang('Create thread'), '', ICON_SIZE_MEDIUM)
.'</a>';
} else {
$my_forum = strval(intval($my_forum));
echo '<a href="'.$forumUrl.'newthread.php?'.api_get_cidreq()
.'&forum='.$my_forum.'">'
.Display::return_icon('new_thread.png', get_lang('NewTopic'), '', ICON_SIZE_MEDIUM)
.Display::return_icon('new_thread.png', get_lang('Create thread'), '', ICON_SIZE_MEDIUM)
.'</a>';
}
}
} else {
echo get_lang('ForumLocked');
echo get_lang('Forum blocked');
}
}
echo '</div>';
@ -449,7 +449,7 @@ if (is_array($threads)) {
// display the author name
$tab_poster_info = api_get_user_info($row['user_id']);
$poster_username = sprintf(get_lang('LoginX'), $tab_poster_info['username']);
$poster_username = sprintf(get_lang('Login: %s'), $tab_poster_info['username']);
$authorName = '';
if ($origin != 'learnpath') {
@ -518,7 +518,7 @@ if (is_array($threads)) {
);
if (!empty($waitingCount)) {
$html .= Display::label(
get_lang('PostsPendingModeration').': '.$waitingCount,
get_lang('Posts pending moderation').': '.$waitingCount,
'warning'
);
}
@ -586,7 +586,7 @@ if (is_array($threads)) {
if (api_resource_is_locked_by_gradebook($row['thread_id'], LINK_FORUM_THREAD)) {
$iconsEdit .= Display::return_icon(
'delete_na.png',
get_lang('ResourceLockedByGradebook'),
get_lang('This option is not available because this activity is contained by an assessment, which is currently locked. To unlock the assessment, ask your platform administrator.'),
[],
ICON_SIZE_SMALL
);
@ -594,7 +594,7 @@ if (is_array($threads)) {
$iconsEdit .= '<a href="'.api_get_self().'?'.$cidreq.'&forum='
.$my_forum.'&action=delete&content=thread&id='
.$row['thread_id']."\" onclick=\"javascript:if(!confirm('"
.addslashes(api_htmlentities(get_lang('DeleteCompleteThread'), ENT_QUOTES))
.addslashes(api_htmlentities(get_lang('Delete complete thread?'), ENT_QUOTES))
."')) return false;\">"
.Display::return_icon('delete.png', get_lang('Delete'), [], ICON_SIZE_SMALL).'</a>';
}
@ -620,7 +620,7 @@ if (is_array($threads)) {
$iconsEdit .= '<a href="viewforum.php?'.$cidreq.'&forum='
.$my_forum
.'&action=move&thread='.$row['thread_id'].'">'
.Display::return_icon('move.png', get_lang('MoveThread'), [], ICON_SIZE_SMALL)
.Display::return_icon('move.png', get_lang('Move Thread'), [], ICON_SIZE_SMALL)
.'</a>';
}
}
@ -638,14 +638,14 @@ if (is_array($threads)) {
$iconsEdit .= '<a href="'.api_get_self().'?'.$cidreq.'&forum='
.$my_forum
."&action=notify&content=thread&id={$row['thread_id']}"
.'">'.Display::return_icon($iconnotify, get_lang('NotifyMe')).'</a>';
.'">'.Display::return_icon($iconnotify, get_lang('Notify me')).'</a>';
}
if (api_is_allowed_to_edit(null, true) && $origin != 'learnpath') {
$iconsEdit .= '<a href="'.api_get_self().'?'.$cidreq.'&forum='
.$my_forum
."&action=liststd&content=thread&id={$row['thread_id']}"
.'">'.Display::return_icon($icon_liststd, get_lang('StudentList'), [], ICON_SIZE_SMALL)
.'">'.Display::return_icon($icon_liststd, get_lang('Learners list'), [], ICON_SIZE_SMALL)
.'</a>';
}
$html .= $iconsEdit;

@ -45,7 +45,7 @@ function hidecontent(content){
$this_section = SECTION_COURSES;
// Including additional library scripts.
$nameTools = get_lang('ToolForum');
$nameTools = get_lang('Forums');
$_user = api_get_user_info();
$_course = api_get_course_info();
@ -62,7 +62,7 @@ $origin = api_get_origin();
if (api_is_in_gradebook()) {
$interbreadcrumb[] = [
'url' => Category::getUrl(),
'name' => get_lang('ToolGradebook'),
'name' => get_lang('Assessments'),
];
}
@ -81,7 +81,7 @@ if (!empty($action) && !empty($_GET['content'])) {
];
$interbreadcrumb[] = [
'url' => '#',
'name' => get_lang('AddForum'),
'name' => get_lang('Add a forum'),
];
}
} else {
@ -113,11 +113,11 @@ if (!api_is_allowed_to_edit(false, true) &&
/* Action Links */
$html = '<div class="actions">';
$html .= '<a href="index.php?'.api_get_cidreq().'">'.
Display::return_icon('back.png', get_lang('BackToForumOverview'), '', ICON_SIZE_MEDIUM).'</a>';
Display::return_icon('back.png', get_lang('Back to forum overview'), '', ICON_SIZE_MEDIUM).'</a>';
if (api_is_allowed_to_edit(false, true)) {
$html .= '<a href="'.api_get_path(WEB_CODE_PATH).'forum/index.php?'.api_get_cidreq().'&forumcategory='
.$current_forum_category['cat_id'].'&action=add&content=forum"> '
.Display::return_icon('new_forum.png', get_lang('AddForum'), '', ICON_SIZE_MEDIUM).'</a>';
.Display::return_icon('new_forum.png', get_lang('Add a forum'), '', ICON_SIZE_MEDIUM).'</a>';
}
$html .= search_link();
$html .= '</div>';
@ -202,7 +202,7 @@ if ($action != 'add') {
.Security::remove_XSS($_GET['forumcategory'])
.'&action=delete&content=forumcategory&id='.$forumId
."\" onclick=\"javascript:if(!confirm('"
.addslashes(api_htmlentities(get_lang('DeleteForumCategory'), ENT_QUOTES))
.addslashes(api_htmlentities(get_lang('Delete forum category ?'), ENT_QUOTES))
."')) return false;\">".Display::return_icon('delete.png', get_lang('Delete'), [], ICON_SIZE_SMALL)
.'</a>';
$iconsEdit .= return_visible_invisible_icon(
@ -312,7 +312,7 @@ if ($action != 'add') {
if ($forum['forum_of_group'] == '0') {
$forum_image = Display::return_icon(
'forum_group.png',
get_lang('GroupForum'),
get_lang('Group Forum'),
null,
ICON_SIZE_LARGE
);
@ -335,7 +335,7 @@ if ($action != 'add') {
$group_title = api_substr($my_all_groups_forum_name, 0, 30);
$forum_title_group_addition = ' (<a href="../group/group_space.php?'.api_get_cidreq()
.'&gidReq='.$my_all_groups_forum_id.'" class="forum_group_link">'
.get_lang('GoTo').' '.$group_title.'</a>)';
.get_lang('Go to').' '.$group_title.'</a>)';
} else {
$forum_title_group_addition = '';
}
@ -354,7 +354,7 @@ if ($action != 'add') {
$html .= '<div class="col-md-6">';
$html .= '<div class="col-md-3">';
$html .= '<div class="number-post">'.$forum_image.
'<p>'.$my_number_threads.' '.get_lang('ForumThreads').'</p></div>';
'<p>'.$my_number_threads.' '.get_lang('Forum threads').'</p></div>';
$html .= '</div>';
$html .= '<div class="col-md-9">';
@ -395,7 +395,7 @@ if ($action != 'add') {
);
if (!empty($waitingCount)) {
$html .= Display::label(
get_lang('PostsPendingModeration').': '.$waitingCount,
get_lang('Posts pending moderation').': '.$waitingCount,
'warning'
);
}
@ -453,7 +453,7 @@ if ($action != 'add') {
.Display::return_icon('edit.png', get_lang('Edit'), [], ICON_SIZE_SMALL).'</a>';
$html .= '<a href="'.$url.'?'.api_get_cidreq().'&forumcategory='.$forumCategoryId.'&action=delete&content=forum&id='.$forum['forum_id']
."\" onclick=\"javascript:if(!confirm('"
.addslashes(api_htmlentities(get_lang('DeleteForum'), ENT_QUOTES))
.addslashes(api_htmlentities(get_lang('Delete forum ?'), ENT_QUOTES))
."')) return false;\">"
.Display::return_icon('delete.png', get_lang('Delete'), [], ICON_SIZE_SMALL)
.'</a>';
@ -485,7 +485,7 @@ if ($action != 'add') {
if (!api_is_anonymous() && $hideNotifications == false) {
$html .= '<a href="'.$url.'?'.api_get_cidreq().'&forumcategory='.$forumCategoryId.'&action=notify&content=forum&id='.$forum['forum_id'].'">'.
Display::return_icon($iconnotify, get_lang('NotifyMe')).
Display::return_icon($iconnotify, get_lang('Notify me')).
'</a>';
}
$html .= '</div>';
@ -499,7 +499,7 @@ if ($action != 'add') {
}
}
if (count($forum_list) == 0) {
echo '<div class="alert alert-warning">'.get_lang('NoForumInThisCategory').'</div>';
echo '<div class="alert alert-warning">'.get_lang('There are no forums in this category').'</div>';
}
echo '</div>';
}

@ -45,7 +45,7 @@ $whatsnew_post_info = isset($_SESSION['whatsnew_post_info']) ? $_SESSION['whatsn
if (api_is_in_gradebook()) {
$interbreadcrumb[] = [
'url' => Category::getUrl(),
'name' => get_lang('ToolGradebook'),
'name' => get_lang('Assessments'),
];
}
@ -132,7 +132,7 @@ switch ($my_action) {
if (api_get_configuration_value('allow_forum_post_revisions')) {
$postId = isset($_GET['post_id']) ? $_GET['post_id'] : 0;
$result = savePostRevision($postId);
Display::addFlash(Display::return_message(get_lang('Saved')));
Display::addFlash(Display::return_message(get_lang('Saved.')));
}
header('Location: '.$currentUrl);
exit;
@ -146,7 +146,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'],
];
$interbreadcrumb[] = [
'url' => api_get_path(WEB_CODE_PATH).'forum/viewforum.php?forum='.$forumId.'&'.api_get_cidreq()."&search=".Security::remove_XSS(urlencode($my_search)),
@ -203,7 +203,7 @@ if ($origin == 'learnpath') {
$actions = '<span style="float:right;">'.search_link().'</span>';
if ($origin != 'learnpath') {
$actions .= '<a href="'.$forumUrl.'viewforum.php?forum='.$forumId.'&'.api_get_cidreq().'">'
.Display::return_icon('back.png', get_lang('BackToForum'), '', ICON_SIZE_MEDIUM).'</a>';
.Display::return_icon('back.png', get_lang('Back to forum'), '', ICON_SIZE_MEDIUM).'</a>';
}
// The reply to thread link should only appear when the forum_category is
@ -221,7 +221,7 @@ if (($current_forum_category &&
if (!api_is_anonymous() && api_is_allowed_to_session_edit(false, true)) {
$actions .= '<a href="'.$forumUrl.'reply.php?'.api_get_cidreq().'&forum='.$forumId.'&thread='
.$threadId.'&action=replythread">'
.Display::return_icon('reply_thread.png', get_lang('ReplyToThread'), '', ICON_SIZE_MEDIUM)
.Display::return_icon('reply_thread.png', get_lang('Reply to this thread'), '', ICON_SIZE_MEDIUM)
.'</a>';
}
// new thread link
@ -234,7 +234,7 @@ if (($current_forum_category &&
if ($current_forum['locked'] != 1 && $current_forum['locked'] != 1) {
$actions .= '&nbsp;&nbsp;';
} else {
$actions .= get_lang('ForumLocked');
$actions .= get_lang('Forum blocked');
}
}
}
@ -261,7 +261,7 @@ if (empty($viewMode)) {
}
if ($current_thread['thread_peer_qualify'] == 1) {
Display::addFlash(Display::return_message(get_lang('ForumThreadPeerScoringStudentComment'), 'info'));
Display::addFlash(Display::return_message(get_lang('To get the expected score in this forum, your contribution will have to be scored by another student, and you will have to score at least 2 other student\'s contributions. Until you reach this objective, even if scored, your contribution will show as a 0 score in the global grades for this course.'), 'info'));
}
$allowReport = reportAvailable();
@ -305,7 +305,7 @@ foreach ($posts as $post) {
$posterId = isset($post['user_id']) ? $post['user_id'] : 0;
$username = '';
if (isset($post['username'])) {
$username = sprintf(get_lang('LoginX'), $post['username']);
$username = sprintf(get_lang('Login: %s'), $post['username']);
}
$name = $post['complete_name'];
@ -407,7 +407,7 @@ foreach ($posts as $post) {
$deleteUrl,
[
'onclick' => "javascript:if(!confirm('"
.addslashes(api_htmlentities(get_lang('DeletePost'), ENT_QUOTES))
.addslashes(api_htmlentities(get_lang('Are you sure you want to delete this post? Deleting this post will also delete the replies on this post. Please check the threaded view to see which posts will also be deleted'), ENT_QUOTES))
."')) return false;",
'id' => "delete-post-{$post['post_id']}",
]
@ -434,7 +434,7 @@ foreach ($posts as $post) {
if ($count > 0) {
$iconEdit .= "<a href=\"viewthread.php?".api_get_cidreq()
."&forum=$forumId&thread=$threadId&action=move&post={$post['post_id']}"
."\">".Display::return_icon('move.png', get_lang('MovePost'), [], ICON_SIZE_SMALL)."</a>";
."\">".Display::return_icon('move.png', get_lang('Move post'), [], ICON_SIZE_SMALL)."</a>";
}
}
@ -495,7 +495,7 @@ foreach ($posts as $post) {
."&forum=$forumId&thread=$threadId&action=list&post={$post['post_id']}"
."&user={$post['user_id']}&user_id={$post['user_id']}"
."&idtextqualify=$current_qualify_thread"
."\" >".Display::return_icon('quiz.png', get_lang('Qualify'))."</a>";
."\" >".Display::return_icon('quiz.png', get_lang('Grade activity'))."</a>";
}
}
}
@ -524,7 +524,7 @@ foreach ($posts as $post) {
if ($userId || ($current_forum['allow_anonymous'] == 1 && !$userId)) {
if (!api_is_anonymous() && api_is_allowed_to_session_edit(false, true)) {
$buttonReply = Display::toolbarButton(
get_lang('ReplyToMessage'),
get_lang('Reply to this message'),
'reply.php?'.api_get_cidreq().'&'.http_build_query([
'forum' => $forumId,
'thread' => $threadId,
@ -537,7 +537,7 @@ foreach ($posts as $post) {
);
$buttonQuote = Display::toolbarButton(
get_lang('QuoteMessage'),
get_lang('Quote this message'),
'reply.php?'.api_get_cidreq().'&'.http_build_query([
'forum' => $forumId,
'thread' => $threadId,
@ -562,21 +562,21 @@ foreach ($posts as $post) {
if ($current_forum_category && $current_forum_category['locked'] == 1) {
$closedPost = Display::tag(
'div',
'<em class="fa fa-exclamation-triangle"></em> '.get_lang('ForumcategoryLocked'),
'<em class="fa fa-exclamation-triangle"></em> '.get_lang('Forum category Locked'),
['class' => 'alert alert-warning post-closed']
);
}
if ($current_forum['locked'] == 1) {
$closedPost = Display::tag(
'div',
'<em class="fa fa-exclamation-triangle"></em> '.get_lang('ForumLocked'),
'<em class="fa fa-exclamation-triangle"></em> '.get_lang('Forum blocked'),
['class' => 'alert alert-warning post-closed']
);
}
if ($current_thread['locked'] == 1) {
$closedPost = Display::tag(
'div',
'<em class="fa fa-exclamation-triangle"></em> '.get_lang('ThreadLocked'),
'<em class="fa fa-exclamation-triangle"></em> '.get_lang('Thread is locked.'),
['class' => 'alert alert-warning post-closed']
);
}
@ -597,7 +597,7 @@ foreach ($posts as $post) {
if ($post['post_notification'] == '1' && $post['poster_id'] == $userId) {
$post_image .= Display::return_icon(
'forumnotification.gif',
get_lang('YouWillBeNotified')
get_lang('You will be notified')
);
}
@ -608,7 +608,7 @@ foreach ($posts as $post) {
// Replace Re: with an icon
$search = [
get_lang('ReplyShort'),
get_lang('Re:'),
'Re:',
'RE:',
'AW:',
@ -642,7 +642,7 @@ foreach ($posts as $post) {
$post['post_attachments'] .= '&nbsp;&nbsp;<a href="'.api_get_self().'?'.api_get_cidreq().'&action=delete_attach&id_attach='
.$attachment['iid'].'&forum='.$forumId.'&thread='.$threadId
.'" onclick="javascript:if(!confirm(\''
.addslashes(api_htmlentities(get_lang('ConfirmYourChoice'), ENT_QUOTES)).'\')) return false;">'
.addslashes(api_htmlentities(get_lang('Please confirm your choice'), ENT_QUOTES)).'\')) return false;">'
.Display::return_icon('delete.png', get_lang('Delete')).'</a><br />';
}
}

@ -47,7 +47,7 @@ class DropboxLink extends EvalLink
public function get_type_name()
{
return get_lang('LMSDropbox');
return get_lang('Dropbox');
}
public function is_allowed_to_change_name()

@ -671,7 +671,7 @@ class Evaluation implements GradebookItem
$user = api_is_platform_admin() ? null : api_get_user_id();
$targets = [];
$level = 0;
$root = [0, get_lang('RootCat'), $level];
$root = [0, get_lang('Main folder'), $level];
$targets[] = $root;
if (isset($this->courseId) && !empty($this->courseId)) {

@ -135,7 +135,7 @@ class ExerciseLink extends AbstractLink
foreach ($exerciseInLP as $exercise) {
$cats[] = [
$exercise['iid'],
$exercise['title'].' ('.get_lang('ToolLearnpath').')',
$exercise['title'].' ('.get_lang('Learning path').')',
];
}
}
@ -503,7 +503,7 @@ class ExerciseLink extends AbstractLink
return 'HotPotatoes';
}
return get_lang('Quiz');
return get_lang('Tests');
}
public function needs_name_and_description()

@ -27,7 +27,7 @@ class ForumThreadLink extends AbstractLink
*/
public function get_type_name()
{
return get_lang('ForumThreads');
return get_lang('Forum threads');
}
/**

@ -204,7 +204,7 @@ class LearnpathLink extends AbstractLink
public function get_type_name()
{
return get_lang('LearningPaths');
return get_lang('Learning paths');
}
public function needs_name_and_description()

@ -64,7 +64,7 @@ class StudentPublicationLink extends AbstractLink
*/
public function get_type_name()
{
return get_lang('Works');
return get_lang('Assignments');
}
public function is_allowed_to_change_name()

Loading…
Cancel
Save