Update get_lang calls using full string.

pull/3016/head
Julio Montoya 6 years ago
parent fecbeec39e
commit 817560287f
  1. 37
      main/user/add_users_to_session.php
  2. 2
      main/user/career_diagram.php
  3. 12
      main/user/class.php
  4. 4
      main/user/classes.php
  5. 52
      main/user/resume_session.php
  6. 26
      main/user/session_list.php
  7. 54
      main/user/subscribe_user.php
  8. 136
      main/user/user.php
  9. 18
      main/user/user_import.php
  10. 570
      main/wiki/wiki.inc.php
  11. 10
      main/work/add_document.php
  12. 10
      main/work/add_user.php
  13. 28
      main/work/edit.php
  14. 10
      main/work/edit_work.php
  15. 24
      main/work/student_work.php
  16. 12
      main/work/upload.php
  17. 18
      main/work/upload_corrections.php
  18. 8
      main/work/upload_from_template.php
  19. 10
      main/work/view.php
  20. 210
      main/work/work.lib.php
  21. 40
      main/work/work.php
  22. 20
      main/work/work_list.php
  23. 66
      main/work/work_list_all.php
  24. 22
      main/work/work_list_others.php
  25. 20
      main/work/work_missing.php

@ -1,14 +1,9 @@
<?php
/* For licensing terms, see /license.txt */
/**
* @package chamilo.admin
*/
$cidReset = true;
// including some necessary files
require_once __DIR__.'/../inc/global.inc.php';
require_once '../inc/lib/xajax/xajax.inc.php';
$xajax = new xajax();
$xajax->registerFunction('search_users');
@ -23,15 +18,15 @@ SessionManager::protect_teacher_session_edit($id_session);
if (api_is_platform_admin()) {
$interbreadcrumb[] = [
'url' => 'index.php',
'name' => get_lang('PlatformAdmin'),
'name' => get_lang('Administration'),
];
$interbreadcrumb[] = [
'url' => 'session_list.php',
'name' => get_lang('SessionList'),
'name' => get_lang('Session list'),
];
$interbreadcrumb[] = [
'url' => "resume_session.php?id_session=".$id_session,
"name" => get_lang('SessionOverview'),
"name" => get_lang('Session overview'),
];
}
$allowTutors = api_get_setting('allow_tutors_to_assign_students_to_session');
@ -44,7 +39,7 @@ if ($allowTutors == 'true') {
$tbl_session_rel_user = Database::get_main_table(TABLE_MAIN_SESSION_USER);
// setting the name of the tool
$tool_name = get_lang('SubscribeUsersToSession');
$tool_name = get_lang('Subscribe users to this session');
$add_type = 'unique';
if (isset($_REQUEST['add_type']) && $_REQUEST['add_type'] != '') {
@ -467,15 +462,15 @@ if ($allowTutors == 'true') {
if ($add_type === 'multiple') {
$link_add_type_unique = '<a href="'.api_get_self().'?id_session='.$id_session.'&add='.Security::remove_XSS($_GET['add']).'&add_type=unique">'.
Display::return_icon('single.gif').get_lang('SessionAddTypeUnique').'</a>';
$link_add_type_multiple = Display::return_icon('multiple.gif').get_lang('SessionAddTypeMultiple');
Display::return_icon('single.gif').get_lang('Single registration').'</a>';
$link_add_type_multiple = Display::return_icon('multiple.gif').get_lang('Multiple registration');
} else {
$link_add_type_unique = Display::return_icon('single.gif').get_lang('SessionAddTypeUnique');
$link_add_type_unique = Display::return_icon('single.gif').get_lang('Single registration');
$link_add_type_multiple = '<a href="'.api_get_self().'?id_session='.$id_session.'&add='.Security::remove_XSS($_GET['add']).'&add_type=multiple">'.
Display::return_icon('multiple.gif').get_lang('SessionAddTypeMultiple').'</a>';
Display::return_icon('multiple.gif').get_lang('Multiple registration').'</a>';
}
$link_add_group = '<a href="usergroups.php">'.
Display::return_icon('multiple.gif', get_lang('RegistrationByUsersGroups')).get_lang('RegistrationByUsersGroups').'</a>'; ?>
Display::return_icon('multiple.gif', get_lang('Enrolment by classes')).get_lang('Enrolment by classes').'</a>'; ?>
<div class="actions">
<?php echo $link_add_type_unique; ?>&nbsp;|&nbsp;<?php echo $link_add_type_multiple; ?>&nbsp;|&nbsp;<?php echo $link_add_group; ?>
</div>
@ -490,7 +485,7 @@ if ($allowTutors == 'true') {
if ($add_type === 'multiple') {
if (is_array($extra_field_list)) {
if (is_array($new_field_list) && count($new_field_list) > 0) {
echo '<h3>'.get_lang('FilterUsers').'</h3>';
echo '<h3>'.get_lang('Filter users').'</h3>';
foreach ($new_field_list as $new_field) {
echo $new_field['name'];
$varname = 'field_'.$new_field['variable'];
@ -518,10 +513,10 @@ if ($allowTutors == 'true') {
<div class="row">
<div class="span5">
<div class="multiple_select_header">
<b><?php echo get_lang('UserListInPlatform'); ?> :</b>
<b><?php echo get_lang('Portal users list'); ?> :</b>
<?php if ($add_type == 'multiple') {
?>
<?php echo get_lang('FirstLetterUser'); ?> :
<?php echo get_lang('First letter (last name)'); ?> :
<select id="first_letter_user" name="firstLetterUser" onchange = "change_select(this.value);" >
<option value = "%">--</option>
<?php
@ -552,7 +547,7 @@ if ($allowTutors == 'true') {
</select>
</div>
<input type="checkbox" onchange="checked_in_no_session(this.checked);" name="user_with_any_session" id="user_with_any_session_id">
<label for="user_with_any_session_id"><?php echo get_lang('UsersRegisteredInNoSession'); ?></label>
<label for="user_with_any_session_id"><?php echo get_lang('Users not registered in any session'); ?></label>
<?php
}
unset($nosessionUsersList); ?>
@ -582,15 +577,15 @@ if ($allowTutors == 'true') {
<br />
<?php
if (isset($_GET['add'])) {
echo '<button class="btn btn-primary" type="button" value="" onclick="valide()" >'.get_lang('FinishSessionCreation').'</button>';
echo '<button class="btn btn-primary" type="button" value="" onclick="valide()" >'.get_lang('Finish session creation').'</button>';
} else {
//@todo see that the call to "valide()" doesn't duplicate the onsubmit of the form (necessary to avoid delete on "enter" key pressed)
echo '<button class="save" type="button" value="" onclick="valide()" >'.get_lang('SubscribeUsersToSession').'</button>';
echo '<button class="save" type="button" value="" onclick="valide()" >'.get_lang('Subscribe users to this session').'</button>';
} ?>
</div>
<div class="span5">
<div class="multiple_select_header">
<b><?php echo get_lang('UserListInSession'); ?> :</b>
<b><?php echo get_lang('List of users registered in this session'); ?> :</b>
</div>
<select id="destination_users" name="sessionUsersList[]" multiple="multiple" size="15" class="span5">
<?php

@ -88,7 +88,7 @@ if (!empty($diagram)) {
} else {
Display::addFlash(
Display::return_message(
sprintf(get_lang('CareerXDoesntHaveADiagram'), $careerInfo['name']),
sprintf(get_lang('Career %s doesn\'t have a diagram.'), $careerInfo['name']),
'warning'
)
);

@ -22,7 +22,7 @@ $htmlHeadXtra[] = api_get_jqgrid_js();
// Extra entries in breadcrumb
$interbreadcrumb[] = [
'url' => 'user.php?'.api_get_cidreq(),
'name' => get_lang('ToolUser'),
'name' => get_lang('Users'),
];
$type = isset($_GET['type']) ? Security::remove_XSS($_GET['type']) : 'registered';
@ -46,7 +46,7 @@ $actions = '';
if (api_is_allowed_to_edit()) {
if ($type === 'registered') {
$actionsLeft .= '<a href="class.php?'.api_get_cidreq().'&type=not_registered">'.
Display::return_icon('add-class.png', get_lang('AddClassesToACourse'), [], ICON_SIZE_MEDIUM).'</a>';
Display::return_icon('add-class.png', get_lang('Add classes to a course'), [], ICON_SIZE_MEDIUM).'</a>';
} else {
$actionsLeft .= '<a href="class.php?'.api_get_cidreq().'&type=registered">'.
Display::return_icon('back.png', get_lang('Classes'), [], ICON_SIZE_MEDIUM).'</a>';
@ -61,7 +61,7 @@ if (api_is_allowed_to_edit()) {
);
$options = [
-1 => get_lang('All'),
1 => get_lang('SocialGroups'),
1 => get_lang('Social groups'),
0 => get_lang('Classes'),
];
$form->addSelect(
@ -74,7 +74,7 @@ if (api_is_allowed_to_edit()) {
$form->addText('keyword', '', false);
$form->setDefaults(['group_filter' => $groupFilter]);
$form->addCourseHiddenParams();
$form->addButtonSearch(get_lang('SearchButton'));
$form->addButtonSearch(get_lang('Search'));
$actionsRight .= $form->returnForm();
}
@ -117,7 +117,7 @@ $columns = [
get_lang('Users'),
get_lang('Status'),
get_lang('Type'),
get_lang('Actions'),
get_lang('Detail'),
];
// Column config
@ -182,6 +182,6 @@ $(function() {
echo $actions;
echo UserManager::getUserSubscriptionTab(4);
echo Display::return_message(get_lang('UserClassExplanation'));
echo Display::return_message(get_lang('Information: The list of classes below contains the list of classes you have already registered in your course. If this list is empty, use the + green above to add classes.'));
$usergroup->display_teacher_view();
Display::display_footer();

@ -22,7 +22,7 @@ $content = '';
$usergroup = new UserGroup();
$usergroup_list = $usergroup->get_usergroup_by_user(api_get_user_id());
if (!empty($usergroup_list)) {
$content .= Display::tag('h1', get_lang('MyClasses'));
$content .= Display::tag('h1', get_lang('My classes'));
foreach ($usergroup_list as $group_id) {
if (isset($_GET['id']) && $_GET['id'] != $group_id) {
continue;
@ -36,7 +36,7 @@ if (!empty($usergroup_list)) {
Display::addFlash(
Display::return_message(
Display::url(
get_lang('AddClasses'),
get_lang('Add classes'),
api_get_path(WEB_CODE_PATH).'admin/usergroups.php?action=add'
),
'normal',

@ -14,7 +14,7 @@ $this_section = SECTION_PLATFORM_ADMIN;
$id_session = (int) $_GET['id_session'];
SessionManager::protect_teacher_session_edit($id_session);
$tool_name = get_lang('SessionOverview');
$tool_name = get_lang('Session overview');
$allowTutors = api_get_setting('allow_tutors_to_assign_students_to_session');
if ($allowTutors === 'true') {
@ -77,7 +77,7 @@ if ($allowTutors === 'true') {
if ($result) {
Display::addFlash(
Display::return_message(
get_lang('UserAdded').' '.api_get_person_name(
get_lang('The user has been added').' '.api_get_person_name(
$user_info['firstname'],
$user_info['lastname']
),
@ -130,17 +130,17 @@ if ($allowTutors === 'true') {
get_lang('Session')
).' '.$session['name']
);
echo Display::page_subheader(get_lang('GeneralProperties').$url); ?>
echo Display::page_subheader(get_lang('General properties').$url); ?>
<!-- General properties -->
<table class="data_table">
<tr>
<td><?php echo get_lang('GeneralCoach'); ?> :</td>
<td><?php echo get_lang('General coach'); ?> :</td>
<td><?php echo api_get_person_name($session['firstname'], $session['lastname']).' ('.$session['username'].')'; ?></td>
</tr>
<?php if (!empty($session_category)) {
?>
<tr>
<td><?php echo get_lang('SessionCategory'); ?></td>
<td><?php echo get_lang('Sessions categories'); ?></td>
<td><?php echo $session_category; ?></td>
</tr>
<?php
@ -150,10 +150,10 @@ if ($allowTutors === 'true') {
<td>
<?php
if ($session['access_start_date'] == '00-00-0000' && $session['access_end_date'] == '00-00-0000') {
echo get_lang('NoTimeLimits');
echo get_lang('No time limits');
} else {
if ($session['access_start_date'] != '00-00-0000') {
//$session['date_start'] = Display::tag('i', get_lang('NoTimeLimits'));
//$session['date_start'] = Display::tag('i', get_lang('No time limits'));
$session['access_start_date'] = get_lang('From').' '.$session['access_start_date'];
} else {
$session['access_start_date'] = '';
@ -170,7 +170,7 @@ if ($allowTutors === 'true') {
<!-- show nb_days_before and nb_days_after only if they are different from 0 -->
<tr>
<td>
<?php echo api_ucfirst(get_lang('SessionCoachStartDate')); ?> :
<?php echo api_ucfirst(get_lang('Access start date for coaches')); ?> :
</td>
<td>
<?php echo intval($session['coach_access_start_date']); ?>
@ -178,7 +178,7 @@ if ($allowTutors === 'true') {
</tr>
<tr>
<td>
<?php echo api_ucfirst(get_lang('SessionCoachEndDate')); ?> :
<?php echo api_ucfirst(get_lang('Access end date for coaches')); ?> :
</td>
<td>
<?php echo intval($session['coach_session_access_end_date']); ?>
@ -186,15 +186,15 @@ if ($allowTutors === 'true') {
</tr>
<tr>
<td>
<?php echo api_ucfirst(get_lang('SessionVisibility')); ?> :
<?php echo api_ucfirst(get_lang('Visibility after end date')); ?> :
</td>
<td>
<?php if ($session['visibility'] == 1) {
echo get_lang('ReadOnly');
echo get_lang('Read only');
} elseif ($session['visibility'] == 2) {
echo get_lang('Visible');
} elseif ($session['visibility'] == 3) {
echo api_ucfirst(get_lang('Invisible'));
echo api_ucfirst(get_lang('invisible'));
} ?>
</td>
</tr>
@ -215,18 +215,18 @@ if ($allowTutors === 'true') {
</table>
<br />
<?php
echo Display::page_subheader(get_lang('CourseList').$url); ?>
echo Display::page_subheader(get_lang('Course list').$url); ?>
<!--List of courses -->
<table class="data_table">
<tr>
<th width="35%"><?php echo get_lang('CourseTitle'); ?></th>
<th width="30%"><?php echo get_lang('CourseCoach'); ?></th>
<th width="20%"><?php echo get_lang('UsersNumber'); ?></th>
<th width="35%"><?php echo get_lang('Course title'); ?></th>
<th width="30%"><?php echo get_lang('Course coach'); ?></th>
<th width="20%"><?php echo get_lang('Users number'); ?></th>
</tr>
<?php
if ($session['nbr_courses'] == 0) {
echo '<tr>
<td colspan="4">'.get_lang('NoCoursesForThisSession').'</td>
<td colspan="4">'.get_lang('No course for this session').'</td>
</tr>';
} else {
// select the courses
@ -270,13 +270,13 @@ if ($allowTutors === 'true') {
).' ('.$info_coach['username'].')';
}
} else {
$coach = get_lang('None');
$coach = get_lang('none');
}
if (count($coachs) > 0) {
$coach = implode('<br />', $coachs);
} else {
$coach = get_lang('None');
$coach = get_lang('none');
}
$orig_param = '&origin=resume_session';
@ -294,7 +294,7 @@ if ($allowTutors === 'true') {
</table>
<br />
<?php
echo Display::page_subheader(get_lang('UserList').$url); ?>
echo Display::page_subheader(get_lang('User list').$url); ?>
<!--List of users -->
<table class="data_table">
<tr>
@ -302,14 +302,14 @@ if ($allowTutors === 'true') {
<?php echo get_lang('User'); ?>
</th>
<th>
<?php echo get_lang('Actions'); ?>
<?php echo get_lang('Detail'); ?>
</th>
</tr>
<?php
if ($session['nbr_users'] == 0) {
echo '<tr>
<td colspan="2">'.get_lang('NoUsersForThisSession').'</td>
<td colspan="2">'.get_lang('No Users for this session').'</td>
</tr>';
} else {
$order_clause = api_sort_by_first_name() ? ' ORDER BY firstname, lastname' : ' ORDER BY lastname, firstname';
@ -345,8 +345,8 @@ if ($allowTutors === 'true') {
if ($multiple_url_is_on) {
if ($user['access_url_id'] != $url_id) {
$user_link .= ' '.Display::return_icon('warning.png', get_lang('UserNotAddedInURL'), [], ICON_SIZE_SMALL);
$add = Display::return_icon('add.png', get_lang('AddUsersToURL'), [], ICON_SIZE_SMALL);
$user_link .= ' '.Display::return_icon('warning.png', get_lang('Users not added to the URL'), [], ICON_SIZE_SMALL);
$add = Display::return_icon('add.png', get_lang('Add users to an URL'), [], ICON_SIZE_SMALL);
$link_to_add_user_in_url = '<a href="resume_session.php?action=add_user_to_url&id_session='.$id_session.'&user_id='.$user['user_id'].'">'.$add.'</a>';
}
}
@ -359,8 +359,8 @@ if ($allowTutors === 'true') {
<a href="../mySpace/myStudents.php?student='.$user['user_id'].''.$orig_param.'">'.
Display::return_icon('statistics.gif', get_lang('Reporting')).'</a>&nbsp;
<a href="session_course_user.php?id_user='.$user['user_id'].'&id_session='.$id_session.'">'.
Display::return_icon('course.png', get_lang('BlockCoursesForThisUser')).'</a>&nbsp;
<a href="'.api_get_self().'?id_session='.$id_session.'&action=delete&user='.$user['user_id'].'" onclick="javascript:if(!confirm(\''.get_lang('ConfirmYourChoice').'\')) return false;">'.
Display::return_icon('course.png', get_lang('Block user from courses in this session')).'</a>&nbsp;
<a href="'.api_get_self().'?id_session='.$id_session.'&action=delete&user='.$user['user_id'].'" onclick="javascript:if(!confirm(\''.get_lang('Please confirm your choice').'\')) return false;">'.
Display::return_icon('delete.png', get_lang('Delete')).'</a>
'.$link_to_add_user_in_url.'
</td>

@ -15,7 +15,7 @@ api_protect_teacher_script(true);
// Add the JS needed to use the jqgrid
$htmlHeadXtra[] = api_get_jqgrid_js();
$tool_name = get_lang('SessionList');
$tool_name = get_lang('Session list');
$allowTutors = api_get_setting('allow_tutors_to_assign_students_to_session');
if ($allowTutors !== 'true') {
@ -34,15 +34,15 @@ if (isset($_REQUEST['keyword'])) {
//The order is important you need to check the the $column variable in the model.ajax.php file
$columns = [
get_lang('Name'),
get_lang('NumberOfCourses'),
get_lang('NumberOfUsers'),
get_lang('SessionCategoryName'),
get_lang('StartDate'),
get_lang('EndDate'),
get_lang('Courses'),
get_lang('Number of users'),
get_lang('Category name'),
get_lang('Start Date'),
get_lang('End Date'),
get_lang('Coach'),
get_lang('Status'),
get_lang('Visibility'),
get_lang('Actions'),
get_lang('Detail'),
];
//Column config
@ -58,10 +58,10 @@ $column_model = [
//for the bottom bar
'searchoptions' => [
'defaultValue' => '1',
'value' => '1:'.get_lang('Active').';0:'.get_lang('Inactive'),
'value' => '1:'.get_lang('active').';0:'.get_lang('inactive'),
],
//for the top bar
'editoptions' => ['value' => ':'.get_lang('All').';1:'.get_lang('Active').';0:'.get_lang('Inactive')], ],
'editoptions' => ['value' => ':'.get_lang('All').';1:'.get_lang('active').';0:'.get_lang('inactive')], ],
['name' => 'visibility', 'index' => 'visibility', 'width' => '40', 'align' => 'left', 'search' => 'false'],
['name' => 'actions', 'index' => 'actions', 'width' => '100', 'align' => 'left', 'formatter' => 'action_formatter', 'sortable' => 'false', 'search' => 'false'],
];
@ -75,7 +75,7 @@ $extra_params['height'] = 'auto';
//With this function we can add actions to the jgrid (edit, delete, etc)
$action_links = 'function action_formatter(cellvalue, options, rowObject) {
return \'&nbsp;<a href="add_users_to_session.php?page=session_list.php&id_session=\'+options.rowId+\'">'.Display::return_icon('user_subscribe_session.png', get_lang('SubscribeUsersToSession'), '', ICON_SIZE_SMALL).'</a>'.
return \'&nbsp;<a href="add_users_to_session.php?page=session_list.php&id_session=\'+options.rowId+\'">'.Display::return_icon('user_subscribe_session.png', get_lang('Subscribe users to this session'), '', ICON_SIZE_SMALL).'</a>'.
'\';
}';
?>
@ -140,11 +140,11 @@ $(function() {
if (api_is_platform_admin()) {
echo '<div class="actions">';
echo '<a href="'.api_get_path(WEB_CODE_PATH).'session/session_add.php">'.
Display::return_icon('new_session.png', get_lang('AddSession'), '', ICON_SIZE_MEDIUM).'</a>';
Display::return_icon('new_session.png', get_lang('Add a training session'), '', ICON_SIZE_MEDIUM).'</a>';
echo '<a href="'.api_get_path(WEB_CODE_PATH).'session/add_many_session_to_category.php">'.
Display::return_icon('session_to_category.png', get_lang('AddSessionsInCategories'), '', ICON_SIZE_MEDIUM).'</a>';
Display::return_icon('session_to_category.png', get_lang('Add a training sessionsInCategories'), '', ICON_SIZE_MEDIUM).'</a>';
echo '<a href="'.api_get_path(WEB_CODE_PATH).'session/session_category_list.php">'.
Display::return_icon('folder.png', get_lang('ListSessionCategory'), '', ICON_SIZE_MEDIUM).'</a>';
Display::return_icon('folder.png', get_lang('Sessions categories list'), '', ICON_SIZE_MEDIUM).'</a>';
echo '</div>';
}
echo Display::grid_html('sessions');

@ -30,39 +30,39 @@ if (!api_is_allowed_to_edit()) {
api_not_allowed(true);
}
$tool_name = get_lang('SubscribeUserToCourse');
$tool_name = get_lang('Enroll users to course');
$type = isset($_REQUEST['type']) ? (int) $_REQUEST['type'] : STUDENT;
$keyword = isset($_REQUEST['keyword']) ? Security::remove_XSS($_REQUEST['keyword']) : null;
$courseInfo = api_get_course_info();
if ($type == COURSEMANAGER) {
$tool_name = get_lang('SubscribeUserToCourseAsTeacher');
$tool_name = get_lang('Enroll users to courseAsTeacher');
}
//extra entries in breadcrumb
$interbreadcrumb[] = [
'url' => 'user.php?'.api_get_cidreq(),
'name' => get_lang('ToolUser'),
'name' => get_lang('Users'),
];
if ($keyword) {
$interbreadcrumb[] = [
'url' => 'subscribe_user.php?type='.$type.'&'.api_get_cidreq(),
'name' => $tool_name,
];
$tool_name = get_lang('SearchResults');
$tool_name = get_lang('Search results');
}
$sessionId = api_get_session_id();
$list_register_user = '';
$list_not_register_user = '';
$list_Registerister_user = '';
$list_not_Registerister_user = '';
if (isset($_REQUEST['register'])) {
if (isset($_REQUEST['Registerister'])) {
$userInfo = api_get_user_info($_REQUEST['user_id']);
if ($userInfo) {
if ($type === COURSEMANAGER) {
if (!empty($sessionId)) {
$message = $userInfo['complete_name_with_username'].' '.get_lang('AddedToCourse');
$message = $userInfo['complete_name_with_username'].' '.get_lang('has been Registeristered to your course');
SessionManager::set_coach_to_course_session(
$_REQUEST['user_id'],
$sessionId,
@ -97,7 +97,7 @@ if (isset($_POST['action'])) {
if ($userInfo) {
if ($type === COURSEMANAGER) {
if (!empty($sessionId)) {
$message = $userInfo['complete_name_with_username'].' '.get_lang('AddedToCourse');
$message = $userInfo['complete_name_with_username'].' '.get_lang('has been Registeristered to your course');
$result = SessionManager::set_coach_to_course_session(
$user_id,
$sessionId,
@ -143,28 +143,28 @@ $parameters['type'] = $type;
$table->set_additional_parameters($parameters);
$col = 0;
$table->set_header($col++, '', false);
$table->set_header($col++, get_lang('OfficialCode'));
$table->set_header($col++, get_lang('Code'));
if (api_is_western_name_order()) {
$table->set_header($col++, get_lang('FirstName'));
$table->set_header($col++, get_lang('LastName'));
$table->set_header($col++, get_lang('First name'));
$table->set_header($col++, get_lang('Last name'));
} else {
$table->set_header($col++, get_lang('LastName'));
$table->set_header($col++, get_lang('FirstName'));
$table->set_header($col++, get_lang('Last name'));
$table->set_header($col++, get_lang('First name'));
}
if (api_get_setting('show_email_addresses') == 'true') {
$table->set_header($col++, get_lang('Email'));
$table->set_header($col++, get_lang('e-mail'));
$table->set_column_filter($col - 1, 'email_filter');
}
$table->set_header($col++, get_lang('Active'), false);
$table->set_header($col++, get_lang('active'), false);
$table->set_column_filter($col - 1, 'active_filter');
$table->set_header($col++, get_lang('Actions'), false);
$table->set_column_filter($col - 1, 'reg_filter');
$table->set_form_actions(['subscribe' => get_lang('reg')], 'user');
$table->set_header($col++, get_lang('Detail'), false);
$table->set_column_filter($col - 1, 'Register_filter');
$table->set_form_actions(['subscribe' => get_lang('Register')], 'user');
if (!empty($_POST['keyword'])) {
$keyword_name = Security::remove_XSS($_POST['keyword']);
echo '<br/>'.get_lang('SearchResultsFor').' <span style="font-style: italic ;"> '.$keyword_name.' </span><br>';
echo '<br/>'.get_lang('Search resultsFor').' <span style="font-style: italic ;"> '.$keyword_name.' </span><br>';
}
Display :: display_header($tool_name, 'User');
@ -186,7 +186,7 @@ $actionsLeft = Display::url(
if (isset($_GET['subscribe_user_filter_value']) && !empty($_GET['subscribe_user_filter_value'])) {
$actionsLeft .= '<a href="subscribe_user.php?type='.$type.'">'.
Display::return_icon('clean_group.gif').' '.get_lang('ClearFilterResults').'</a>';
Display::return_icon('clean_group.gif').' '.get_lang('Clear filter results').'</a>';
}
$extraForm = '';
if (api_get_setting('ProfilingFilterAddingUsers') === 'true') {
@ -686,13 +686,13 @@ function email_filter($email)
return Display :: encrypted_mailto_link($email, $email);
}
/**
* Build the reg-column of the table.
* Build the Register-column of the table.
*
* @param int $user_id The user id
*
* @return string Some HTML-code
*/
function reg_filter($user_id)
function Register_filter($user_id)
{
if (isset($_REQUEST['type']) && $_REQUEST['type'] == COURSEMANAGER) {
$type = COURSEMANAGER;
@ -701,8 +701,8 @@ function reg_filter($user_id)
}
$user_id = (int) $user_id;
$result = '<a class="btn btn-small btn-primary" href="'.api_get_self().'?'.api_get_cidreq().'&register=yes&type='.$type.'&user_id='.$user_id.'">'.
get_lang("reg").'</a>';
$result = '<a class="btn btn-small btn-primary" href="'.api_get_self().'?'.api_get_cidreq().'&Registerister=yes&type='.$type.'&user_id='.$user_id.'">'.
get_lang("Register").'</a>';
return $result;
}
@ -722,7 +722,7 @@ function active_filter($active, $url_params, $row)
{
$_user = api_get_user_info();
if ($active == '1') {
$action = 'AccountActive';
$action = 'Accountactive';
$image = 'accept';
}
@ -817,7 +817,7 @@ function display_extra_profile_fields_filter()
{
// getting all the additional user profile fields
$extra = UserManager::get_extra_fields(0, 50, 5, 'ASC');
$return = '<option value="">'.get_lang('SelectFilter').'</option>';
$return = '<option value="">'.get_lang('Select filter').'</option>';
// looping through the additional user profile fields
foreach ($extra as $id => $field_details) {

@ -55,7 +55,7 @@ if (api_is_allowed_to_edit(null, true)) {
if (count($user_ids) > 0) {
CourseManager::unsubscribe_user($user_ids, $courseCode);
Display::addFlash(
Display::return_message(get_lang('UsersUnsubscribed'))
Display::return_message(get_lang('The selected users have been unsubscribed from the course'))
);
}
}
@ -90,12 +90,12 @@ if (isset($_GET['action'])) {
$isTutor
);
Display::addFlash(
Display::return_message(get_lang('Updated'))
Display::return_message(get_lang('Update successful'))
);
} else {
Display::addFlash(
Display::return_message(
get_lang('InviteesCantBeTutors'),
get_lang('Invitees cannot be tutors'),
'error'
)
);
@ -129,46 +129,46 @@ if (isset($_GET['action'])) {
if ($sort_by_first_name) {
$a_users[0] = [
'id',
get_lang('FirstName'),
get_lang('LastName'),
get_lang('First name'),
get_lang('Last name'),
get_lang('Username'),
get_lang('Email'),
get_lang('e-mail'),
get_lang('Phone'),
get_lang('OfficialCode'),
get_lang('Active'),
get_lang('Code'),
get_lang('active'),
];
} else {
$a_users[0] = [
'id',
get_lang('LastName'),
get_lang('FirstName'),
get_lang('Last name'),
get_lang('First name'),
get_lang('Username'),
get_lang('Email'),
get_lang('e-mail'),
get_lang('Phone'),
get_lang('OfficialCode'),
get_lang('Active'),
get_lang('Code'),
get_lang('active'),
];
}
} else {
if ($sort_by_first_name) {
$a_users[0] = [
'id',
get_lang('FirstName'),
get_lang('LastName'),
get_lang('First name'),
get_lang('Last name'),
get_lang('Username'),
get_lang('Phone'),
get_lang('OfficialCode'),
get_lang('Active'),
get_lang('Code'),
get_lang('active'),
];
} else {
$a_users[0] = [
'id',
get_lang('LastName'),
get_lang('FirstName'),
get_lang('Last name'),
get_lang('First name'),
get_lang('Username'),
get_lang('Phone'),
get_lang('OfficialCode'),
get_lang('Active'),
get_lang('Code'),
get_lang('active'),
];
}
}
@ -177,7 +177,7 @@ if (isset($_GET['action'])) {
if (isset($course_info['activate_legal']) && $course_info['activate_legal'] == 1) {
$legal = ', legal_agreement';
$a_users[0][] = get_lang('LegalAgreementAccepted');
$a_users[0][] = get_lang('Legal agreement accepted');
}
if ($_GET['format'] === 'pdf') {
@ -185,19 +185,19 @@ if (isset($_GET['action'])) {
if ($is_western_name_order) {
$a_users[0] = [
'#',
get_lang('UserPicture'),
get_lang('OfficialCode'),
get_lang('FirstName').', '.get_lang('LastName'),
get_lang('Email'),
get_lang('Picture'),
get_lang('Code'),
get_lang('First name').', '.get_lang('Last name'),
get_lang('e-mail'),
get_lang('Phone'),
];
} else {
$a_users[0] = [
'#',
get_lang('UserPicture'),
get_lang('OfficialCode'),
get_lang('LastName').', '.get_lang('FirstName'),
get_lang('Email'),
get_lang('Picture'),
get_lang('Code'),
get_lang('Last name').', '.get_lang('First name'),
get_lang('e-mail'),
get_lang('Phone'),
];
}
@ -383,12 +383,12 @@ if (isset($_GET['action'])) {
}
}
$fileName = get_lang('StudentList');
$pdfTitle = get_lang('StudentList');
$fileName = get_lang('Learners list');
$pdfTitle = get_lang('Learners list');
if ($type == COURSEMANAGER) {
$fileName = get_lang('Teachers');
$pdfTitle = get_lang('Teachers');
$fileName = get_lang('Trainers');
$pdfTitle = get_lang('Trainers');
}
switch ($_GET['format']) {
@ -443,12 +443,12 @@ if (api_is_allowed_to_edit(null, true)) {
if ($row['user_id'] == $user_id || $row['user_id'] == "") {
CourseManager::unsubscribe_user($_GET['user_id'], $courseCode);
Display::addFlash(
Display::return_message(get_lang('UserUnsubscribed'))
Display::return_message(get_lang('User is now unsubscribed'))
);
} else {
Display::addFlash(
Display::return_message(
get_lang('ThisStudentIsSubscribeThroughASession')
get_lang('This learner is subscribed in this training through a training session. You cannot edit his information')
)
);
}
@ -495,23 +495,23 @@ $table->set_header($header_nr++, '', false);
$indexList['photo'] = $header_nr;
$table->set_header($header_nr++, get_lang('Photo'), false);
$indexList['official_code'] = $header_nr;
$table->set_header($header_nr++, get_lang('OfficialCode'));
$table->set_header($header_nr++, get_lang('Code'));
if ($is_western_name_order) {
$indexList['firstname'] = $header_nr;
$table->set_header($header_nr++, get_lang('FirstName'));
$table->set_header($header_nr++, get_lang('First name'));
$indexList['lastname'] = $header_nr;
$table->set_header($header_nr++, get_lang('LastName'));
$table->set_header($header_nr++, get_lang('Last name'));
} else {
$indexList['lastname'] = $header_nr;
$table->set_header($header_nr++, get_lang('LastName'));
$table->set_header($header_nr++, get_lang('Last name'));
$indexList['firstname'] = $header_nr;
$table->set_header($header_nr++, get_lang('FirstName'));
$table->set_header($header_nr++, get_lang('First name'));
}
$indexList['username'] = $header_nr;
$table->set_header($header_nr++, get_lang('LoginName'));
$table->set_header($header_nr++, get_lang('Login'));
$indexList['groups'] = $header_nr;
$table->set_header($header_nr++, get_lang('GroupSingle'), false);
$table->set_header($header_nr++, get_lang('Group'), false);
$hideFields = api_get_configuration_value('hide_user_field_from_list');
@ -529,7 +529,7 @@ $table->setHideColumn('user_status_in_course');
if (api_is_allowed_to_edit(null, true)) {
$table->set_header($header_nr++, get_lang('Status'), false);
$table->set_header($header_nr++, get_lang('Active'), false);
$table->set_header($header_nr++, get_lang('active'), false);
if ($canEditUsers) {
$table->set_column_filter(8, 'active_filter');
} else {
@ -545,7 +545,7 @@ if (api_is_allowed_to_edit(null, true)) {
$table->set_column_filter($header_nr - 1, 'modify_filter');
if ($canEditUsers) {
$table->set_form_actions(['unsubscribe' => get_lang('Unreg')], 'user');
$table->set_form_actions(['unsubscribe' => get_lang('Unsubscribe')], 'user');
}
} else {
if ($course_info['unsubscribe'] == 1) {
@ -563,7 +563,7 @@ if (isset($origin) && $origin === 'learnpath') {
'url' => 'user.php?'.api_get_cidreq(),
'name' => get_lang('Users'),
];
$tool_name = get_lang('SearchResults');
$tool_name = get_lang('Search results');
} else {
$tool_name = get_lang('Users');
$origin = 'users';
@ -606,19 +606,19 @@ if ($canRead) {
if ($canRead) {
$actions .= '<a href="user.php?'.api_get_cidreq().'&action=export&format=csv&type='.$type.'">'.
Display::return_icon('export_csv.png', get_lang('ExportAsCSV'), [], ICON_SIZE_MEDIUM).'</a> ';
Display::return_icon('export_csv.png', get_lang('CSV export'), [], ICON_SIZE_MEDIUM).'</a> ';
$actions .= '<a href="user.php?'.api_get_cidreq().'&action=export&format=xls&type='.$type.'">'.
Display::return_icon('export_excel.png', get_lang('ExportAsXLS'), [], ICON_SIZE_MEDIUM).'</a> ';
Display::return_icon('export_excel.png', get_lang('Excel export'), [], ICON_SIZE_MEDIUM).'</a> ';
}
if ($canEditUsers && $canEdit) {
$actions .= '<a href="user_import.php?'.api_get_cidreq().'&action=import&type='.$type.'">'.
Display::return_icon('import_csv.png', get_lang('ImportUsersToACourse'), [], ICON_SIZE_MEDIUM).'</a> ';
Display::return_icon('import_csv.png', get_lang('Import users list'), [], ICON_SIZE_MEDIUM).'</a> ';
}
if ($canRead) {
$actions .= '<a href="user.php?'.api_get_cidreq().'&action=export&format=pdf&type='.$type.'">'.
Display::return_icon('pdf.png', get_lang('ExportToPDF'), [], ICON_SIZE_MEDIUM).'</a> ';
Display::return_icon('pdf.png', get_lang('Export to PDF'), [], ICON_SIZE_MEDIUM).'</a> ';
}
echo $actions;
@ -637,7 +637,7 @@ if ($canRead) {
$form->addHidden('type', $type);
$form->addText('keyword', '', false);
$form->addElement('hidden', 'cidReq', api_get_course_id());
$form->addButtonSearch(get_lang('SearchButton'));
$form->addButtonSearch(get_lang('Search'));
$form->display();
echo '</div>';
echo '</div>';
@ -646,7 +646,7 @@ if ($canRead) {
$allowTutors = api_get_setting('allow_tutors_to_assign_students_to_session');
if (api_is_allowed_to_edit() && $allowTutors === 'true') {
$actions .= ' <a class="btn btn-default" href="session_list.php?'.api_get_cidreq().'">'.
get_lang('Sessions').'</a>';
get_lang('Course sessions').'</a>';
}
echo '</div>';
}
@ -656,7 +656,7 @@ $table->display();
if (!empty($_GET['keyword']) && !empty($_GET['submit'])) {
$keyword_name = Security::remove_XSS($_GET['keyword']);
echo '<br/>'.get_lang('SearchResultsFor').' <span style="font-style: italic ;"> '.$keyword_name.' </span><br>';
echo '<br/>'.get_lang('Search resultsFor').' <span style="font-style: italic ;"> '.$keyword_name.' </span><br>';
}
if (!isset($origin) || $origin != 'learnpath') {
@ -832,7 +832,7 @@ function get_user_data($from, $number_of_items, $column, $direction)
}
}
$a_course_users = CourseManager :: get_user_list_from_course_code(
$a_course_users = CourseManager::get_user_list_from_course_code(
$course_code,
$sessionId,
$limit,
@ -887,18 +887,18 @@ function get_user_data($from, $number_of_items, $column, $direction)
$temp[] = implode(', ', $groupsNameListParsed);
// Status
$default_status = get_lang('Student');
$default_status = get_lang('Learner');
if ((isset($o_course_user['status_rel']) && $o_course_user['status_rel'] == 1) ||
(isset($o_course_user['status_session']) && $o_course_user['status_session'] == 2)
) {
$default_status = get_lang('CourseManager');
$default_status = get_lang('Teacher');
} elseif (isset($o_course_user['is_tutor']) && $o_course_user['is_tutor'] == 1) {
$default_status = get_lang('Tutor');
$default_status = get_lang('Coach');
}
$temp[] = $default_status;
// Active
// active
$temp[] = $o_course_user['active'];
$extraFieldOption = new ExtraFieldOption('user');
$extraFieldValue = new ExtraFieldValue('user');
@ -978,7 +978,7 @@ function active_filter($active, $urlParams, $row)
$action = '';
$image = '';
if ($active == '1') {
$action = 'AccountActive';
$action = 'Accountactive';
$image = 'accept';
}
if ($active == '0') {
@ -1020,8 +1020,8 @@ function modify_filter($user_id, $row, $data)
$result = '';
if ($is_allowed_to_track) {
$result .= '<a href="../mySpace/myStudents.php?'.api_get_cidreq().'&student='.$user_id.'&details=true&course='.$_course['id'].'&origin=user_course&id_session='.api_get_session_id().'" title="'.get_lang('Tracking').'">
'.Display::return_icon('statistics.png', get_lang('Tracking')).'
$result .= '<a href="../mySpace/myStudents.php?'.api_get_cidreq().'&student='.$user_id.'&details=true&course='.$_course['id'].'&origin=user_course&id_session='.api_get_session_id().'" title="'.get_lang('Reporting').'">
'.Display::return_icon('statistics.png', get_lang('Reporting')).'
</a>';
}
@ -1029,7 +1029,7 @@ function modify_filter($user_id, $row, $data)
// time taken by support to test things out)
if (api_is_platform_admin()) {
$result .= ' <a href="'.api_get_path(WEB_CODE_PATH).'admin/user_list.php?action=login_as&user_id='.$user_id.'&sec_token='.Security::getTokenFromSession().'">'.
Display::return_icon('login_as.png', get_lang('LoginAs')).'</a>&nbsp;&nbsp;';
Display::return_icon('login_as.png', get_lang('Login as')).'</a>&nbsp;&nbsp;';
}
if (api_is_allowed_to_edit(null, true)) {
@ -1037,9 +1037,9 @@ function modify_filter($user_id, $row, $data)
$isTutor = isset($data['is_tutor']) ? intval($data['is_tutor']) : 0;
$isTutor = empty($isTutor) ? 1 : 0;
$text = get_lang('RemoveTutorStatus');
$text = get_lang('RemoveCoachStatus');
if ($isTutor) {
$text = get_lang('SetTutor');
$text = get_lang('SetCoach');
}
if ($isInvitee) {
@ -1069,16 +1069,16 @@ function modify_filter($user_id, $row, $data)
if ($canEditUsers) {
// unregister
if ($user_id != $current_user_id || api_is_platform_admin()) {
$result .= '<a class="btn btn-sm btn-danger delete-swal" href="'.api_get_self().'?'.api_get_cidreq().'&type='.$type.'&unregister=yes&user_id='.$user_id.'" title="'.addslashes(api_htmlentities(get_lang('Unreg'))).' " >'.
get_lang('Unreg').'</a>&nbsp;';
$result .= '<a class="btn btn-sm btn-danger delete-swal" href="'.api_get_self().'?'.api_get_cidreq().'&type='.$type.'&unregister=yes&user_id='.$user_id.'" title="'.addslashes(api_htmlentities(get_lang('Unsubscribe'))).' " >'.
get_lang('Unsubscribe').'</a>&nbsp;';
}
}
} else {
// Show buttons for unsubscribe
if ($course_info['unsubscribe'] == 1) {
if ($user_id == $current_user_id) {
$result .= '<a class="btn btn-sm btn-danger delete-swal" href="'.api_get_self().'?'.api_get_cidreq().'&type='.$type.'&unregister=yes&user_id='.$user_id.'" title="'.addslashes(api_htmlentities(get_lang('Unreg'))).' >'.
get_lang('Unreg').'</a>&nbsp;';
$result .= '<a class="btn btn-sm btn-danger delete-swal" href="'.api_get_self().'?'.api_get_cidreq().'&type='.$type.'&unregister=yes&user_id='.$user_id.'" title="'.addslashes(api_htmlentities(get_lang('Unsubscribe'))).' >'.
get_lang('Unsubscribe').'</a>&nbsp;';
}
}
}

@ -19,15 +19,15 @@ if (!empty($_REQUEST['type']) && $_REQUEST['type'] == COURSEMANAGER) {
$userType = COURSEMANAGER;
}
$tool_name = get_lang('ImportUsersToACourse');
$tool_name = get_lang('Import users list');
$interbreadcrumb[] = ["url" => "user.php", "name" => get_lang("Users")];
$interbreadcrumb[] = ["url" => "#", "name" => get_lang("ImportUsersToACourse")];
$interbreadcrumb[] = ["url" => "#", "name" => get_lang("Import users list")];
$form = new FormValidator('user_import', 'post', 'user_import.php');
$form->addElement('header', $tool_name);
$form->addElement('file', 'import_file', get_lang('ImportCSVFileLocation'));
$form->addElement('checkbox', 'unsubscribe_users', null, get_lang('UnsubscribeUsersAlreadyAddedInCourse'));
$form->addElement('file', 'import_file', get_lang('CSV file import location'));
$form->addElement('checkbox', 'unsubscribe_users', null, get_lang('Unsubscribe users already added'));
$form->addElement('hidden', 'type', $userType);
$form->addButtonImport(get_lang('Import'));
@ -75,7 +75,7 @@ if ($form->validate()) {
if (empty($invalid_users)) {
$type = 'confirmation';
$message = get_lang('ListOfUsersSubscribedToCourse');
$message = get_lang('List of users subscribed to course');
if ($unsubscribe_users) {
$current_user_list = CourseManager::get_user_list_from_course_code(
@ -118,7 +118,7 @@ if ($form->validate()) {
}
}
} else {
$message = get_lang('CheckUsersWithId');
$message = get_lang('Use user\'s IDs from the file to subscribe them');
$type = 'warning';
foreach ($invalid_users as $invalid_user) {
$user_to_show[] = $invalid_user;
@ -146,14 +146,14 @@ if (!empty($message)) {
echo Display::return_message($message.': <br />'.$userMessage, 'warning', false);
}
} else {
$empty_line_msg = ($empty_line == 0) ? get_lang('ErrorsWhenImportingFile') : get_lang('ErrorsWhenImportingFile').': '.get_lang('EmptyHeaderLine');
$empty_line_msg = ($empty_line == 0) ? get_lang('Errors when importing file') : get_lang('Errors when importing file').': '.get_lang('There are empty lines in the header of selected file');
echo Display::return_message($empty_line_msg, 'error');
}
}
$form->display();
echo get_lang('CSVMustLookLike');
echo get_lang('The CSV file must look like this');
echo '<blockquote><pre>
username
jdoe
@ -161,7 +161,7 @@ echo '<blockquote><pre>
</pre>
</blockquote>';
echo get_lang('Or');
echo get_lang('or');
echo '<blockquote><pre>
id
23

File diff suppressed because it is too large Load Diff

@ -34,13 +34,13 @@ $courseInfo = api_get_course_info();
$interbreadcrumb[] = [
'url' => api_get_path(WEB_CODE_PATH).'work/work.php?'.api_get_cidreq(),
'name' => get_lang('StudentPublications'),
'name' => get_lang('Assignments'),
];
$interbreadcrumb[] = [
'url' => api_get_path(WEB_CODE_PATH).'work/work_list_all.php?'.api_get_cidreq().'&id='.$workId,
'name' => $my_folder_data['title'],
];
$interbreadcrumb[] = ['url' => '#', 'name' => get_lang('AddDocument')];
$interbreadcrumb[] = ['url' => '#', 'name' => get_lang('Add document')];
switch ($action) {
case 'delete':
@ -58,7 +58,7 @@ if (empty($docId)) {
Display::display_header(null);
$documents = getAllDocumentToWork($workId, api_get_course_int_id());
if (!empty($documents)) {
echo Display::page_subheader(get_lang('DocumentsAdded'));
echo Display::page_subheader(get_lang('Documents added'));
echo '<div class="well">';
$urlDocument = api_get_path(WEB_CODE_PATH).'work/add_document.php';
foreach ($documents as $doc) {
@ -94,7 +94,7 @@ if (empty($docId)) {
$documentInfo = DocumentManager::get_document_data_by_id($docId, $courseInfo['code']);
$url = api_get_path(WEB_CODE_PATH).'work/add_document.php?id='.$workId.'&document_id='.$docId.'&'.api_get_cidreq();
$form = new FormValidator('add_doc', 'post', $url);
$form->addElement('header', get_lang('AddDocument'));
$form->addElement('header', get_lang('Add document'));
$form->addElement('hidden', 'add_doc', '1');
$form->addElement('hidden', 'id', $workId);
$form->addElement('hidden', 'document_id', $docId);
@ -110,7 +110,7 @@ if (empty($docId)) {
addDocumentToWork($docId, $workId, api_get_course_int_id());
Display::addFlash(Display::return_message(get_lang('Added'), 'success'));
} else {
Display::addFlash(Display::return_message(get_lang('DocumentAlreadyAdded'), 'warning'));
Display::addFlash(Display::return_message(get_lang('Document already added'), 'warning'));
}
$url = api_get_path(WEB_CODE_PATH).'work/add_document.php?id='.$workId.'&'.api_get_cidreq();

@ -30,13 +30,13 @@ $courseInfo = api_get_course_info();
$interbreadcrumb[] = [
'url' => api_get_path(WEB_CODE_PATH).'work/work.php?'.api_get_cidreq(),
'name' => get_lang('StudentPublications'),
'name' => get_lang('Assignments'),
];
$interbreadcrumb[] = [
'url' => api_get_path(WEB_CODE_PATH).'work/work_list_all.php?'.api_get_cidreq().'&id='.$workId,
'name' => $my_folder_data['title'],
];
$interbreadcrumb[] = ['url' => '#', 'name' => get_lang('AddUsers')];
$interbreadcrumb[] = ['url' => '#', 'name' => get_lang('Add a user')];
switch ($action) {
case 'add':
@ -66,7 +66,7 @@ Display::display_header(null);
$items = getAllUserToWork($workId, api_get_course_int_id());
$usersAdded = [];
if (!empty($items)) {
echo Display::page_subheader(get_lang('UsersAdded'));
echo Display::page_subheader(get_lang('Users added'));
echo '<ul class="list-group">';
foreach ($items as $data) {
$myUserId = $data['user_id'];
@ -105,7 +105,7 @@ foreach ($userList as $user) {
}
if (!empty($userToAddList)) {
echo Display::page_subheader(get_lang('UsersToAdd'));
echo Display::page_subheader(get_lang('Users to add'));
echo '<ul class="list-group">';
foreach ($userToAddList as $user) {
$userName = api_get_person_name($user['firstname'], $user['lastname']).' ('.$user['username'].') ';
@ -119,7 +119,7 @@ if (!empty($userToAddList)) {
}
echo '</ul>';
} else {
echo Display::return_message(get_lang('NoUsersToAdd'), 'warning');
echo Display::return_message(get_lang('NoUsers to add'), 'warning');
}
echo '<hr /><div class="clear"></div>';

@ -107,7 +107,7 @@ if (!empty($my_folder_data)) {
$interbreadcrumb[] = [
'url' => api_get_path(WEB_CODE_PATH).'work/work.php?'.api_get_cidreq(),
'name' => get_lang('StudentPublications'),
'name' => get_lang('Assignments'),
];
if (api_is_allowed_to_edit()) {
@ -176,14 +176,14 @@ if ($is_allowed_to_edit && !empty($item_id)) {
$row = Database::fetch_array($result);
$qualification_over = $row['qualification'];
if (!empty($qualification_over) && intval($qualification_over) > 0) {
$form->addText('qualification', array(get_lang('Qualification'), " / ".$qualification_over), false, 'size="10"');
$form->addText('qualification', array(get_lang('Score'), " / ".$qualification_over), false, 'size="10"');
$form->addElement('hidden', 'qualification_over', $qualification_over);
}*/
$form->addCheckBox(
'send_email',
null,
get_lang('SendMailToStudent')
get_lang('Send mail to student')
);
// Check if user to qualify has some DRHs
@ -192,7 +192,7 @@ if ($is_allowed_to_edit && !empty($item_id)) {
$form->addCheckBox(
'send_to_drh_users',
null,
get_lang('SendMailToHR')
get_lang('Send mail to HR manager')
);
}
}
@ -202,7 +202,7 @@ $form->addElement('hidden', 'accepted', 1);
$form->addElement('hidden', 'item_to_edit', $item_id);
$form->addElement('hidden', 'sec_token', $token);
$text = get_lang('UpdateWork');
$text = get_lang('Update this task');
$class = 'save';
// fix the Ok button when we see the tool in the learn path
@ -238,8 +238,8 @@ if ($form->validate()) {
if (isset($_POST['send_email'])) {
$url = api_get_path(WEB_CODE_PATH).'work/view.php?'.api_get_cidreq().'&id='.$item_to_edit_id;
$subject = sprintf(get_lang('ThereIsANewWorkFeedback'), $work_item['title']);
$message = sprintf(get_lang('ThereIsANewWorkFeedbackInWorkXHere'), $work_item['title'], $url);
$subject = sprintf(get_lang('There\'s a new feedback in work: %s'), $work_item['title']);
$message = sprintf(get_lang('There\'s a new feedback in work: %sInWorkXHere'), $work_item['title'], $url);
MessageManager::send_message_simple(
$work_item['user_id'],
@ -253,7 +253,7 @@ if ($form->validate()) {
if ($_POST['qualification'] > $_POST['qualification_over']) {
Display::addFlash(Display::return_message(
get_lang('QualificationMustNotBeMoreThanQualificationOver'),
get_lang('ScoreMustNotBeMoreThanScoreOver'),
'error'
));
} else {
@ -274,12 +274,12 @@ if ($form->validate()) {
);
$succeed = true;
Display::addFlash(Display::return_message(get_lang('ItemUpdated')));
Display::addFlash(Display::return_message(get_lang('Item updated')));
}
Security::clear_token();
} else {
// Bad token or can't add works
Display::addFlash(Display::return_message(get_lang('ImpossibleToSaveTheDocument'), 'error'));
Display::addFlash(Display::return_message(get_lang('Impossible to save the document'), 'error'));
}
$script = 'work_list.php';
@ -297,7 +297,7 @@ $content = null;
if (!empty($work_id)) {
if ($is_allowed_to_edit) {
if (api_resource_is_locked_by_gradebook($work_id, LINK_STUDENTPUBLICATION)) {
echo Display::return_message(get_lang('ResourceLockedByGradebook'), 'warning');
echo Display::return_message(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.'), 'warning');
} else {
$content .= $form->returnForm();
}
@ -305,15 +305,15 @@ if (!empty($work_id)) {
if (empty($work_item['qualificator_id']) || $work_item['qualificator_id'] == 0) {
$content .= $form->returnForm();
} else {
$content .= Display::return_message(get_lang('ActionNotAllowed'), 'error');
$content .= Display::return_message(get_lang('Action not allowed'), 'error');
}
} elseif ($student_can_edit_in_session && $has_ended == false) {
$content .= $form->returnForm();
} else {
$content .= Display::return_message(get_lang('ActionNotAllowed'), 'error');
$content .= Display::return_message(get_lang('Action not allowed'), 'error');
}
} else {
$content .= Display::return_message(get_lang('ActionNotAllowed'), 'error');
$content .= Display::return_message(get_lang('Action not allowed'), 'error');
}
$tpl->assign('content', $content);

@ -38,7 +38,7 @@ if (api_is_platform_admin() == false && $locked == true) {
$htmlHeadXtra[] = to_javascript_work();
$interbreadcrumb[] = [
'url' => api_get_path(WEB_CODE_PATH).'work/work.php?'.api_get_cidreq(),
'name' => get_lang('StudentPublications'),
'name' => get_lang('Assignments'),
];
$interbreadcrumb[] = ['url' => '#', 'name' => get_lang('Edit')];
@ -91,7 +91,7 @@ if (!empty($homework['ends_on'])) {
$defaults['add_to_calendar'] = isset($homework['add_to_calendar']) ? $homework['add_to_calendar'] : null;
$form = getFormWork($form, $defaults, $workId);
$form->addElement('hidden', 'work_id', $workId);
$form->addButtonUpdate(get_lang('ModifyDirectory'));
$form->addButtonUpdate(get_lang('Validate'));
$currentUrl = api_get_path(WEB_CODE_PATH).'work/edit_work.php?id='.$workId.'&'.api_get_cidreq();
if ($form->validate()) {
@ -105,7 +105,7 @@ if ($form->validate()) {
if ($params['expires_on'] > $params['ends_on']) {
Display::addFlash(
Display::return_message(
get_lang('DateExpiredNotBeLessDeadLine'),
get_lang('The date of effective blocking of sending the work can not be before the displayed posting deadline.'),
'warning'
)
);
@ -129,11 +129,11 @@ if ($form->validate()) {
updatePublicationAssignment($workId, $params, $courseInfo, $groupId);
updateDirName($workData, $params['new_dir']);
Skill::saveSkills($form, ITEM_TYPE_STUDENT_PUBLICATION, $workData['iid']);
Display::addFlash(Display::return_message(get_lang('Updated'), 'success'));
Display::addFlash(Display::return_message(get_lang('Update successful'), 'success'));
header('Location: '.$currentUrl);
exit;
} else {
Display::addFlash(Display::return_message(get_lang('FileExists'), 'warning'));
Display::addFlash(Display::return_message(get_lang('The operation is impossible, a file with this name already exists.'), 'warning'));
}
}

@ -16,7 +16,7 @@ if (empty($studentId)) {
api_not_allowed(true);
}
$tool_name = get_lang('StudentPublications');
$tool_name = get_lang('Assignments');
$group_id = api_get_group_id();
$userInfo = api_get_user_info($studentId);
$courseInfo = api_get_course_info();
@ -35,7 +35,7 @@ if (!empty($group_id)) {
];
$interbreadcrumb[] = [
'url' => api_get_path(WEB_CODE_PATH).'group/group_space.php?'.api_get_cidreq(),
'name' => get_lang('GroupSpace').' '.$group_properties['name'],
'name' => get_lang('Group area').' '.$group_properties['name'],
];
} else {
if (!(api_is_allowed_to_edit() || api_is_coach())) {
@ -59,7 +59,7 @@ switch ($action) {
if (api_is_allowed_to_edit()) {
$deletedItems = deleteAllWorkPerUser($studentId, $courseInfo);
if (!empty($deletedItems)) {
$message = get_lang('DocDel').'<br >';
$message = get_lang('File deleted').'<br >';
foreach ($deletedItems as $item) {
$message .= $item['title'].'<br />';
}
@ -74,7 +74,7 @@ switch ($action) {
$interbreadcrumb[] = [
'url' => api_get_path(WEB_CODE_PATH).'work/work.php?'.api_get_cidreq(),
'name' => get_lang('StudentPublications'),
'name' => get_lang('Assignments'),
];
$interbreadcrumb[] = [
'url' => '#',
@ -87,19 +87,19 @@ $workPerUser = getWorkPerUser($studentId);
echo '<div class="actions">';
echo '<a href="'.api_get_path(WEB_CODE_PATH).'work/work.php?'.api_get_cidreq().'">'.
Display::return_icon('back.png', get_lang('BackToWorksList'), '', ICON_SIZE_MEDIUM).'</a>';
Display::return_icon('back.png', get_lang('Back to Assignments list'), '', ICON_SIZE_MEDIUM).'</a>';
if (api_is_allowed_to_edit()) {
echo '<a href="'.api_get_path(WEB_CODE_PATH).'work/student_work.php?action=export_to_pdf&studentId='.$studentId.'&'.api_get_cidreq().'">'.
Display::return_icon('pdf.png', get_lang('ExportToPDF'), '', ICON_SIZE_MEDIUM).'</a>';
Display::return_icon('pdf.png', get_lang('Export to PDF'), '', ICON_SIZE_MEDIUM).'</a>';
echo '<a href="'.api_get_path(WEB_CODE_PATH).'work/student_work.php?action=download&studentId='.$studentId.'&'.api_get_cidreq().'">'.
Display::return_icon('save.png', get_lang('Download'), '', ICON_SIZE_MEDIUM).'</a>';
echo '<a
onclick="javascript:if(!confirm(\''.get_lang('AreYouSureToDelete').'\')) return false;"
onclick="javascript:if(!confirm(\''.get_lang('Are you sure you want to delete').'\')) return false;"
href="'.api_get_path(WEB_CODE_PATH).'work/student_work.php?action=delete_all&studentId='.$studentId.'&'.api_get_cidreq().'">'.
Display::return_icon('delete.png', get_lang('DeleteAllFiles'), '', ICON_SIZE_MEDIUM).'</a>';
Display::return_icon('delete.png', get_lang('Delete all papers'), '', ICON_SIZE_MEDIUM).'</a>';
}
echo '</div>';
@ -109,10 +109,10 @@ $column = 0;
$row = 0;
$headers = [
get_lang('Title'),
get_lang('HandedOutDate'),
get_lang('HandOutDateLimit'),
get_lang('Time of reception'),
get_lang('Deadline'),
get_lang('Feedback'),
get_lang('Actions'),
get_lang('Detail'),
];
foreach ($headers as $header) {
$table->setHeaderContents($row, $column, $header);
@ -144,7 +144,7 @@ foreach ($workPerUser as $work) {
$table->setCellContents($row, $column, $score);
$column++;
// Actions
// Detail
$links = null;
// is a text

@ -58,13 +58,13 @@ $validationStatus = getWorkDateValidationStatus($homework);
$interbreadcrumb[] = [
'url' => api_get_path(WEB_CODE_PATH).'work/work.php?'.api_get_cidreq(),
'name' => get_lang('StudentPublications'),
'name' => get_lang('Assignments'),
];
$interbreadcrumb[] = [
'url' => api_get_path(WEB_CODE_PATH).'work/work_list.php?'.api_get_cidreq().'&id='.$work_id,
'name' => $workInfo['title'],
];
$interbreadcrumb[] = ['url' => '#', 'name' => get_lang('UploadADocument')];
$interbreadcrumb[] = ['url' => '#', 'name' => get_lang('Upload a document')];
$form = new FormValidator(
'form-work',
@ -115,7 +115,7 @@ if ($form->validate()) {
} else {
// Bad token or can't add works
Display::addFlash(
Display::return_message(get_lang('ImpossibleToSaveTheDocument'), 'error')
Display::return_message(get_lang('Impossible to save the document'), 'error')
);
}
}
@ -149,17 +149,17 @@ if (!empty($work_id)) {
echo $validationStatus['message'];
if ($is_allowed_to_edit) {
if (api_resource_is_locked_by_gradebook($work_id, LINK_STUDENTPUBLICATION)) {
echo Display::return_message(get_lang('ResourceLockedByGradebook'), 'warning');
echo Display::return_message(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.'), 'warning');
} else {
echo $tabs;
}
} elseif ($student_can_edit_in_session && $validationStatus['has_ended'] == false) {
echo $tabs;
} else {
Display::addFlash(Display::return_message(get_lang('ActionNotAllowed'), 'error'));
Display::addFlash(Display::return_message(get_lang('Action not allowed'), 'error'));
}
} else {
Display::addFlash(Display::return_message(get_lang('ActionNotAllowed'), 'error'));
Display::addFlash(Display::return_message(get_lang('Action not allowed'), 'error'));
}
Display :: display_footer();

@ -42,13 +42,13 @@ $validationStatus = getWorkDateValidationStatus($homework);
$interbreadcrumb[] = [
'url' => api_get_path(WEB_CODE_PATH).'work/work.php?'.api_get_cidreq(),
'name' => get_lang('StudentPublications'),
'name' => get_lang('Assignments'),
];
$interbreadcrumb[] = [
'url' => api_get_path(WEB_CODE_PATH).'work/work_list.php?'.api_get_cidreq().'&id='.$workId,
'name' => $workInfo['title'],
];
$interbreadcrumb[] = ['url' => '#', 'name' => get_lang('UploadCorrections')];
$interbreadcrumb[] = ['url' => '#', 'name' => get_lang('Upload corrections')];
$downloadLink = api_get_path(WEB_CODE_PATH).'work/downloadfolder.inc.php?id='.$workId.'&'.api_get_cidreq();
@ -60,18 +60,18 @@ $form = new FormValidator(
['enctype' => "multipart/form-data"]
);
$form->addElement('header', get_lang('UploadCorrections'));
$form->addElement('header', get_lang('Upload corrections'));
$form->addHtml(Display::return_message(
sprintf(
get_lang('UploadCorrectionsExplanationWithDownloadLinkX'),
get_lang('Upload correctionsExplanationWithDownloadLinkX'),
$downloadLink
),
'normal',
false
));
$form->addElement('file', 'file', get_lang('UploadADocument'));
$form->addElement('file', 'file', get_lang('Upload a document'));
$form->addProgress();
$form->addRule('file', get_lang('ThisFieldIsRequired'), 'required');
$form->addRule('file', get_lang('Required field'), 'required');
$form->addElement('hidden', 'id', $workId);
$form->addButtonUpload(get_lang('Upload'));
@ -95,7 +95,7 @@ if ($form->validate()) {
if (!DocumentManager::enough_space($realSize, $maxSpace)) {
Display::addFlash(
Display::return_message(
get_lang('UplNotEnoughSpace'),
get_lang('There is not enough space to upload this file.'),
'warning'
)
);
@ -120,7 +120,7 @@ if ($form->validate()) {
if (empty($result)) {
Display::addFlash(
Display::return_message(
get_lang('NoDataAvailable'),
get_lang('No data available'),
'warning'
)
);
@ -188,7 +188,7 @@ if ($form->validate()) {
Display::addFlash(
Display::return_message(
get_lang('Uploaded')
get_lang('Uploaded.')
)
);
}

@ -54,13 +54,13 @@ $validationStatus = getWorkDateValidationStatus($homework);
$interbreadcrumb[] = [
'url' => api_get_path(WEB_CODE_PATH).'work/work.php?'.api_get_cidreq(),
'name' => get_lang('StudentPublications'),
'name' => get_lang('Assignments'),
];
$interbreadcrumb[] = [
'url' => api_get_path(WEB_CODE_PATH).'work/work_list.php?'.api_get_cidreq().'&id='.$work_id,
'name' => $workInfo['title'],
];
$interbreadcrumb[] = ['url' => '#', 'name' => get_lang('UploadFromTemplate')];
$interbreadcrumb[] = ['url' => '#', 'name' => get_lang('Upload from template')];
$form = new FormValidator(
'form',
@ -109,7 +109,7 @@ if ($form->validate()) {
exit;
} else {
// Bad token or can't add works
Display::addFlash(Display::return_message(get_lang('ImpossibleToSaveTheDocument'), 'error'));
Display::addFlash(Display::return_message(get_lang('Impossible to save the document'), 'error'));
}
}
@ -120,7 +120,7 @@ if (!empty($work_id)) {
echo $validationStatus['message'];
if ($is_allowed_to_edit) {
if (api_resource_is_locked_by_gradebook($work_id, LINK_STUDENTPUBLICATION)) {
echo Display::return_message(get_lang('ResourceLockedByGradebook'), 'warning');
echo Display::return_message(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.'), 'warning');
} else {
$form->display();
}

@ -22,7 +22,7 @@ $work['description'] = isset($work['description']) ? Security::remove_XSS($work[
$htmlHeadXtra[] = '<script>'.ExerciseLib::getJsCode().'</script>';
$interbreadcrumb[] = [
'url' => api_get_path(WEB_CODE_PATH).'work/work.php?'.api_get_cidreq(),
'name' => get_lang('StudentPublications'),
'name' => get_lang('Assignments'),
];
$my_folder_data = get_work_data_by_id($work['parent_id']);
@ -105,7 +105,7 @@ if ((user_is_author($id) || $isDrhOfCourse || (api_is_allowed_to_edit() || api_i
WHERE c_id = ".$courseInfo['real_id']." AND id = $id";
Database::query($sql);
Display::addFlash(Display::return_message(get_lang('Updated')));
Display::addFlash(Display::return_message(get_lang('Update successful')));
$resultUpload = uploadWork(
$my_folder_data,
@ -128,7 +128,7 @@ if ((user_is_author($id) || $isDrhOfCourse || (api_is_allowed_to_edit() || api_i
WHERE iid = ".$work['iid'];
Database::query($sql);
Display::addFlash(
Display::return_message(get_lang('FileUploadSucces'))
Display::return_message(get_lang('The file has successfully been uploaded.'))
);
}
}
@ -148,7 +148,7 @@ if ((user_is_author($id) || $isDrhOfCourse || (api_is_allowed_to_edit() || api_i
api_get_course_info()
);
Display::addFlash(Display::return_message(get_lang('DocDeleted')));
Display::addFlash(Display::return_message(get_lang('Document deleted')));
header('Location: '.$url);
exit;
break;
@ -180,7 +180,7 @@ if ((user_is_author($id) || $isDrhOfCourse || (api_is_allowed_to_edit() || api_i
$actions = Display::url(
Display::return_icon(
'back.png',
get_lang('BackToWorksList'),
get_lang('Back to Assignments list'),
null,
ICON_SIZE_MEDIUM
),

@ -37,7 +37,7 @@ function displayWorkActionLinks($id, $action, $isTutor)
if (!empty($id)) {
$output .= '<a href="'.api_get_self().'?'.api_get_cidreq().'&id='.$my_back_id.'">'.
Display::return_icon('back.png', get_lang('BackToWorksList'), '', ICON_SIZE_MEDIUM).
Display::return_icon('back.png', get_lang('Back to Assignments list'), '', ICON_SIZE_MEDIUM).
'</a>';
}
@ -49,7 +49,7 @@ function displayWorkActionLinks($id, $action, $isTutor)
$output .= '<a href="'.api_get_self().'?'.api_get_cidreq().'&action=create_dir">';
$output .= Display::return_icon(
'new_work.png',
get_lang('CreateAssignment'),
get_lang('Create assignment'),
'',
ICON_SIZE_MEDIUM
);
@ -61,7 +61,7 @@ function displayWorkActionLinks($id, $action, $isTutor)
$output .= '<a id="open-view-list" href="#">'.
Display::return_icon(
'listwork.png',
get_lang('ViewStudents'),
get_lang('View students'),
'',
ICON_SIZE_MEDIUM
).
@ -149,7 +149,7 @@ function get_work_data_by_id($id, $courseId = 0, $sessionId = 0)
} elseif (false !== strpos($fileType, 'video/')) {
$work['show_content'] = Display::tag(
'video',
get_lang('FileFormatNotSupported'),
get_lang('File format not supported'),
['src' => $work['show_url']]
);
}
@ -260,7 +260,7 @@ function getWorkList($id, $my_folder_data, $add_in_where_query = null, $course_i
if ($is_allowed_to_edit) {
if (intval($my_folder_data['qualification']) == 0) {
echo Display::return_message(
get_lang('MaxWeightNeedToBeProvided'),
get_lang('Max weight need to be provided'),
'warning'
);
}
@ -491,9 +491,9 @@ function showStudentWorkGrid()
$columns = [
get_lang('Type'),
get_lang('Title'),
get_lang('HandOutDateLimit'),
get_lang('Deadline'),
get_lang('Feedback'),
get_lang('LastUpload'),
get_lang('Last upload'),
];
$columnModel = [
@ -576,10 +576,10 @@ function showTeacherWorkGrid()
$columns = [
get_lang('Type'),
get_lang('Title'),
get_lang('SentDate'),
get_lang('HandOutDateLimit'),
get_lang('AmountSubmitted'),
get_lang('Actions'),
get_lang('Sent date'),
get_lang('Deadline'),
get_lang('Number submitted'),
get_lang('Detail'),
];
$params = [
@ -622,11 +622,11 @@ function showTeacherWorkGrid()
function build_work_directory_selector($folders, $curdirpath, $group_dir = '')
{
$form = '<form name="selector" action="'.api_get_self().'?'.api_get_cidreq().'" method="POST">';
$form .= get_lang('CurrentDirectory').'
$form .= get_lang('Current folder').'
<select name="curdirpath" onchange="javascript: document.selector.submit();">';
//group documents cannot be uploaded in the root
if ($group_dir == '') {
$form .= '<option value="/">/ ('.get_lang('Root').')</option>';
$form .= '<option value="/">/ ('.get_lang('root').')</option>';
if (is_array($folders)) {
foreach ($folders as $folder) {
$selected = ($curdirpath == $folder) ? ' selected="selected"' : '';
@ -637,13 +637,13 @@ function build_work_directory_selector($folders, $curdirpath, $group_dir = '')
foreach ($folders as $folder) {
$selected = ($curdirpath == $folder) ? ' selected="selected"' : '';
$display_folder = substr($folder, strlen($group_dir));
$display_folder = ($display_folder == '') ? '/ ('.get_lang('Root').')' : $display_folder;
$display_folder = ($display_folder == '') ? '/ ('.get_lang('root').')' : $display_folder;
$form .= '<option'.$selected.' value="'.$folder.'">'.$display_folder.'</option>'."\n";
}
}
$form .= '</select>';
$form .= '<noscript><input type="submit" name="change_path" value="'.get_lang('Ok').'" /></noscript>';
$form .= '<noscript><input type="submit" name="change_path" value="'.get_lang('Validate').'" /></noscript>';
$form .= '</form>';
return $form;
@ -678,7 +678,7 @@ function build_work_move_to_selector($folders, $curdirpath, $move_file, $group_d
api_get_self().'?'.api_get_cidreq().'&curdirpath='.Security::remove_XSS($curdirpath)
);
$form->addHeader(get_lang('MoveFile').' - '.Security::remove_XSS($title));
$form->addHeader(get_lang('Move the file').' - '.Security::remove_XSS($title));
$form->addHidden('item_id', $move_file);
$form->addHidden('action', 'move_to');
@ -700,7 +700,7 @@ function build_work_move_to_selector($folders, $curdirpath, $move_file, $group_d
}
} else {
if ($curdirpath != '/') {
$form .= '<option value="0">/ ('.get_lang('Root').')</option>';
$form .= '<option value="0">/ ('.get_lang('root').')</option>';
}
foreach ($folders as $fid => $folder) {
if (($curdirpath != $folder) && ($folder != $move_file) &&
@ -708,7 +708,7 @@ function build_work_move_to_selector($folders, $curdirpath, $move_file, $group_d
) {
//cannot copy dir into his own subdir
$display_folder = substr($folder, strlen($group_dir));
$display_folder = ($display_folder == '') ? '/ ('.get_lang('Root').')' : $display_folder;
$display_folder = ($display_folder == '') ? '/ ('.get_lang('root').')' : $display_folder;
//$form .= '<option value="'.$fid.'">'.$display_folder.'</option>'."\n";
$options[$fid] = $display_folder;
}
@ -716,7 +716,7 @@ function build_work_move_to_selector($folders, $curdirpath, $move_file, $group_d
}
$form->addSelect('move_to_id', get_lang('Select'), $options);
$form->addButtonSend(get_lang('MoveFile'), 'move_file_submit');
$form->addButtonSend(get_lang('Move the file'), 'move_file_submit');
return $form->returnForm();
}
@ -763,7 +763,7 @@ function deleteDirWork($id)
$locked = api_resource_is_locked_by_gradebook($id, LINK_STUDENTPUBLICATION);
if ($locked == true) {
echo Display::return_message(get_lang('ResourceLockedByGradebook'), 'warning');
echo Display::return_message(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.'), 'warning');
return false;
}
@ -1472,7 +1472,7 @@ function getWorkListTeacher(
$class = '';
} else {
$icon = 'invisible.png';
$text = get_lang('Invisible');
$text = get_lang('invisible');
$action = 'visible';
$class = 'muted';
}
@ -1499,7 +1499,7 @@ function getWorkListTeacher(
}
$correctionLink = '&nbsp;'.Display::url(
Display::return_icon('upload_package.png', get_lang('UploadCorrections'), '', ICON_SIZE_SMALL),
Display::return_icon('upload_package.png', get_lang('Upload corrections'), '', ICON_SIZE_SMALL),
api_get_path(WEB_CODE_PATH).'work/upload_corrections.php?'.api_get_cidreq().'&id='.$workId
).'&nbsp;';
@ -1753,7 +1753,7 @@ function get_work_user_list_from_documents(
if ($qualificationExists) {
if (empty($row['qualificator_id'])) {
$status = Display::label(get_lang('NotRevised'), 'warning');
$status = Display::label(get_lang('Not reviewed'), 'warning');
} else {
$status = Display::label(get_lang('Revised'), 'success');
}
@ -1944,8 +1944,8 @@ function get_work_user_list(
$url = api_get_path(WEB_CODE_PATH).'work/';
$unoconv = api_get_configuration_value('unoconv.binaries');
$loadingText = addslashes(get_lang('Loading'));
$uploadedText = addslashes(get_lang('Uploaded'));
$failsUploadText = addslashes(get_lang('UplNoFileUploaded'));
$uploadedText = addslashes(get_lang('Uploaded.'));
$failsUploadText = addslashes(get_lang('No file was uploaded..'));
$failsUploadIcon = Display::return_icon(
'closed-circle.png',
'',
@ -1975,7 +1975,7 @@ function get_work_user_list(
$rateIcon = Display::return_icon(
'rate_work.png',
get_lang('CorrectAndRate'),
get_lang('Correct and rate'),
[],
ICON_SIZE_SMALL
);
@ -2114,8 +2114,8 @@ function get_work_user_list(
if ($unoconv && empty($work['contains_file'])) {
$action .= '<a f
href="'.$url.'work_list_all.php?'.api_get_cidreq().'&id='.$work_id.'&action=export_to_doc&item_id='.$item_id.'"
title="'.get_lang('ExportToDoc').'" >'.
Display::return_icon('export_doc.png', get_lang('ExportToDoc'), [], ICON_SIZE_SMALL).'</a> ';
title="'.get_lang('Export to .doc').'" >'.
Display::return_icon('export_doc.png', get_lang('Export to .doc'), [], ICON_SIZE_SMALL).'</a> ';
}
$alreadyUploaded = '';
@ -2130,7 +2130,7 @@ function get_work_user_list(
action="'.api_get_path(WEB_AJAX_PATH).'work.ajax.php?'.api_get_cidreq().'&a=upload_correction_file&item_id='.$item_id.'" method="POST" enctype="multipart/form-data"
>
<div id="progress_'.$item_id.'" class="text-center button-load">
'.addslashes(get_lang('ClickOrDropOneFileHere')).'
'.addslashes(get_lang('Click or drop one file here')).'
'.Display::return_icon('upload_file.png', get_lang('Correction'), [], ICON_SIZE_TINY).'
'.$alreadyUploaded.'
</div>
@ -2176,7 +2176,7 @@ function get_work_user_list(
if ($qualification_exists) {
$action .= Display::return_icon(
'edit_na.png',
get_lang('CorrectAndRate'),
get_lang('Correct and rate'),
[],
ICON_SIZE_SMALL
);
@ -2196,7 +2196,7 @@ function get_work_user_list(
} else {
$editLink = '<a href="'.$url.'edit.php?'.api_get_cidreq(
).'&item_id='.$item_id.'&id='.$work['parent_id'].'" title="'.get_lang(
'Modify'
'Edit'
).'">'.
Display::return_icon('edit.png', get_lang('Edit'), [], ICON_SIZE_SMALL).'</a>';
}
@ -2219,8 +2219,8 @@ function get_work_user_list(
}
if ($work['accepted'] == '1') {
$action .= '<a href="'.$url.'work_list_all.php?'.api_get_cidreq().'&id='.$work_id.'&action=make_invisible&item_id='.$item_id.'" title="'.get_lang('Invisible').'" >'.
Display::return_icon('visible.png', get_lang('Invisible'), [], ICON_SIZE_SMALL).'</a>';
$action .= '<a href="'.$url.'work_list_all.php?'.api_get_cidreq().'&id='.$work_id.'&action=make_invisible&item_id='.$item_id.'" title="'.get_lang('invisible').'" >'.
Display::return_icon('visible.png', get_lang('invisible'), [], ICON_SIZE_SMALL).'</a>';
} else {
$action .= '<a href="'.$url.'work_list_all.php?'.api_get_cidreq().'&id='.$work_id.'&action=make_visible&item_id='.$item_id.'" title="'.get_lang('Visible').'" >'.
Display::return_icon('invisible.png', get_lang('Visible'), [], ICON_SIZE_SMALL).'</a> ';
@ -2229,7 +2229,7 @@ function get_work_user_list(
if ($locked) {
$action .= Display::return_icon('delete_na.png', get_lang('Delete'), '', ICON_SIZE_SMALL);
} else {
$action .= '<a href="'.$url.'work_list_all.php?'.api_get_cidreq().'&id='.$work_id.'&action=delete&item_id='.$item_id.'" onclick="javascript:if(!confirm('."'".addslashes(api_htmlentities(get_lang('ConfirmYourChoice'), ENT_QUOTES))."'".')) return false;" title="'.get_lang('Delete').'" >'.
$action .= '<a href="'.$url.'work_list_all.php?'.api_get_cidreq().'&id='.$work_id.'&action=delete&item_id='.$item_id.'" onclick="javascript:if(!confirm('."'".addslashes(api_htmlentities(get_lang('Please confirm your choice'), ENT_QUOTES))."'".')) return false;" title="'.get_lang('Delete').'" >'.
Display::return_icon('delete.png', get_lang('Delete'), '', ICON_SIZE_SMALL).'</a>';
}
} elseif ($is_author && (empty($work['qualificator_id']) || $work['qualificator_id'] == 0)) {
@ -2238,10 +2238,10 @@ function get_work_user_list(
if (api_get_course_setting('student_delete_own_publication') == 1) {
if (api_is_allowed_to_session_edit(false, true)) {
$action .= '<a href="'.$url.'edit.php?'.api_get_cidreq().'&item_id='.$item_id.'&id='.$work['parent_id'].'" title="'.get_lang('Modify').'">'.
$action .= '<a href="'.$url.'edit.php?'.api_get_cidreq().'&item_id='.$item_id.'&id='.$work['parent_id'].'" title="'.get_lang('Edit').'">'.
Display::return_icon('edit.png', get_lang('Comment'), [], ICON_SIZE_SMALL).'</a>';
}
$action .= ' <a href="'.$url.'work_list.php?'.api_get_cidreq().'&action=delete&item_id='.$item_id.'&id='.$work['parent_id'].'" onclick="javascript:if(!confirm('."'".addslashes(api_htmlentities(get_lang('ConfirmYourChoice'), ENT_QUOTES))."'".')) return false;" title="'.get_lang('Delete').'" >'.
$action .= ' <a href="'.$url.'work_list.php?'.api_get_cidreq().'&action=delete&item_id='.$item_id.'&id='.$work['parent_id'].'" onclick="javascript:if(!confirm('."'".addslashes(api_htmlentities(get_lang('Please confirm your choice'), ENT_QUOTES))."'".')) return false;" title="'.get_lang('Delete').'" >'.
Display::return_icon('delete.png', get_lang('Delete'), '', ICON_SIZE_SMALL).'</a>';
}
} else {
@ -2251,7 +2251,7 @@ function get_work_user_list(
// Status.
if (empty($work['qualificator_id'])) {
$qualificator_id = Display::label(get_lang('NotRevised'), 'warning');
$qualificator_id = Display::label(get_lang('Not reviewed'), 'warning');
} else {
$qualificator_id = Display::label(get_lang('Revised'), 'success');
}
@ -2263,25 +2263,25 @@ function get_work_user_list(
$compilationId = $compilation->getCompilatioId($item_id, $course_id);
if ($compilationId) {
$actionCompilatio = "<div id='id_avancement".$item_id."' class='compilation_block'>
".$loading.'&nbsp;'.get_lang('CompilatioConnectionWithServer').'</div>';
".$loading.'&nbsp;'.get_lang('Connecting with the Compilatio server').'</div>';
} else {
$workDirectory = api_get_path(SYS_COURSE_PATH).$course_info['directory'];
if (!Compilatio::verifiFileType($dbTitle)) {
$actionCompilatio = get_lang('FileFormatNotSupported');
$actionCompilatio = get_lang('File format not supported');
} elseif (filesize($workDirectory.'/'.$work['url']) > $compilation->getMaxFileSize()) {
$sizeFile = round(filesize($workDirectory.'/'.$work['url']) / 1000000);
$actionCompilatio = get_lang('UplFileTooBig').': '.format_file_size($sizeFile).'<br />';
$actionCompilatio = get_lang('The file is too big to upload.').': '.format_file_size($sizeFile).'<br />';
} else {
$actionCompilatio = "<div id='id_avancement".$item_id."' class='compilation_block'>";
$actionCompilatio .= Display::url(
get_lang('CompilatioAnalysis'),
get_lang('Analyse'),
'javascript:void(0)',
[
'class' => 'getSingleCompilatio btn btn-primary btn-xs',
'onclick' => "getSingleCompilatio($item_id);",
]
);
$actionCompilatio .= get_lang('CompilatioWithCompilatio');
$actionCompilatio .= get_lang('with Compilatio');
}
}
$work['compilatio'] = $actionCompilatio;
@ -2311,8 +2311,8 @@ function send_reminder_users_without_publication($task_data)
$subject = '['.api_get_setting('siteName').'] ';
// The body can be as long as you wish, and any combination of text and variables
$content = get_lang('ReminderToSubmitPendingTask')."\n".get_lang('CourseName').' : '.$_course['name']."\n";
$content .= get_lang('WorkName').' : '.$task_title."\n";
$content = get_lang('Please remember you still have to send an assignment')."\n".get_lang('Course name').' : '.$_course['name']."\n";
$content .= get_lang('Assignment name').' : '.$task_title."\n";
$list_users = get_list_users_without_publication($task_id);
$mails_sent_to = [];
foreach ($list_users as $user) {
@ -2367,7 +2367,7 @@ function sendEmailToDrhOnHomeworkCreation($workId, $courseId, $sessionId = 0)
MessageManager::send_message(
$hrm['id'],
sprintf(
get_lang('StudentXHasBeenAssignedNewWorkInCourseY'),
get_lang('%s got a new assignment in course %s'),
$student['firstname'],
$courseInfo['title']
),
@ -2397,7 +2397,7 @@ function sendEmailToStudentsOnHomeworkCreation($workId, $courseId, $sessionId =
} else {
$students = CourseManager::get_student_list_from_course_code($courseCode, true, $sessionId);
}
$emailsubject = '['.api_get_setting('siteName').'] '.get_lang('HomeworkCreated');
$emailsubject = '['.api_get_setting('siteName').'] '.get_lang('An assignment was created');
$currentUser = api_get_user_info(api_get_user_id());
if (!empty($students)) {
foreach ($students as $student) {
@ -2405,8 +2405,8 @@ function sendEmailToStudentsOnHomeworkCreation($workId, $courseId, $sessionId =
if (!empty($user_info)) {
$link = api_get_path(WEB_CODE_PATH).'work/work_list.php?'.api_get_cidreq().'&id='.$workId;
$emailbody = get_lang('Dear')." ".$user_info['complete_name'].",\n\n";
$emailbody .= get_lang('HomeworkHasBeenCreatedForTheCourse')." ".$courseCode.". "."\n\n".
'<a href="'.$link.'">'.get_lang('PleaseCheckHomeworkPage').'</a>';
$emailbody .= get_lang('An assignment has been added to course')." ".$courseCode.". "."\n\n".
'<a href="'.$link.'">'.get_lang('Please check the assignments page.').'</a>';
$emailbody .= "\n\n".$currentUser['complete_name'];
$additionalParameters = [
@ -2624,9 +2624,9 @@ function get_list_users_without_publication($task_id, $studentId = 0)
function display_list_users_without_publication($task_id, $studentId = null)
{
$origin = api_get_origin();
$table_header[] = [get_lang('LastName'), true];
$table_header[] = [get_lang('FirstName'), true];
$table_header[] = [get_lang('Email'), true];
$table_header[] = [get_lang('Last name'), true];
$table_header[] = [get_lang('First name'), true];
$table_header[] = [get_lang('e-mail'), true];
$data = get_list_users_without_publication($task_id);
@ -3424,7 +3424,7 @@ function addWorkComment($courseInfo, $userId, $parentWork, $work, $data)
if ($commentId) {
Display::addFlash(
Display::return_message(get_lang('CommentAdded'))
Display::return_message(get_lang('You comment has been added'))
);
$sql = "UPDATE $commentTable SET id = iid WHERE iid = $commentId";
@ -3464,8 +3464,8 @@ function addWorkComment($courseInfo, $userId, $parentWork, $work, $data)
}
$url = api_get_path(WEB_CODE_PATH).'work/view.php?'.api_get_cidreq().'&id='.$work['id'];
$subject = sprintf(get_lang('ThereIsANewWorkFeedback'), $parentWork['title']);
$content = sprintf(get_lang('ThereIsANewWorkFeedbackInWorkXHere'), $work['title'], $url);
$subject = sprintf(get_lang('There\'s a new feedback in work: %s'), $parentWork['title']);
$content = sprintf(get_lang('There\'s a new feedback in work: %sInWorkXHere'), $work['title'], $url);
if (!empty($data['comment'])) {
$content .= '<br /><b>'.get_lang('Comment').':</b><br />'.$data['comment'];
@ -3525,7 +3525,7 @@ function getWorkCommentForm($work, $workParent)
if (empty($model)) {
$form->addFloat(
'qualification',
[get_lang('Qualification'), " / ".$qualification],
[get_lang('Score'), " / ".$qualification],
false,
[],
false,
@ -3554,7 +3554,7 @@ function getWorkCommentForm($work, $workParent)
$form->addCheckBox(
'send_email',
null,
get_lang('SendMailToStudent')
get_lang('Send message mail to student')
);
}
@ -3603,12 +3603,12 @@ function getWorkDateValidationStatus($homework)
}
if ($has_ended) {
$message = Display::return_message(get_lang('EndDateAlreadyPassed').' '.$ends_on, 'error');
$message = Display::return_message(get_lang('End date already passed').' '.$ends_on, 'error');
} elseif ($has_expired) {
$message = Display::return_message(get_lang('ExpiryDateAlreadyPassed').' '.$expires_on, 'warning');
$message = Display::return_message(get_lang('Expiry date already passed').' '.$expires_on, 'warning');
} else {
if ($has_expired) {
$message = Display::return_message(get_lang('ExpiryDateToSendWorkIs').' '.$expires_on);
$message = Display::return_message(get_lang('ExpiryDateToSend messageWorkIs').' '.$expires_on);
}
}
}
@ -3626,7 +3626,7 @@ function getWorkDateValidationStatus($homework)
*/
function setWorkUploadForm($form, $uploadFormType = 0)
{
$form->addHeader(get_lang('UploadADocument'));
$form->addHeader(get_lang('Upload a document'));
$form->addHidden('contains_file', 0, ['id' => 'contains_file_id']);
$form->addHidden('active', 1);
$form->addHidden('accepted', 1);
@ -3634,10 +3634,10 @@ function setWorkUploadForm($form, $uploadFormType = 0)
$form->addElement(
'text',
'extension',
get_lang('FileExtension'),
get_lang('File extension'),
['id' => 'file_extension', 'readonly' => 'readonly']
);
$form->addRule('title', get_lang('ThisFieldIsRequired'), 'required');
$form->addRule('title', get_lang('Required field'), 'required');
switch ($uploadFormType) {
case 0:
@ -3645,7 +3645,7 @@ function setWorkUploadForm($form, $uploadFormType = 0)
$form->addElement(
'file',
'file',
get_lang('UploadADocument'),
get_lang('Upload a document'),
'size="40" onchange="updateDocumentTitle(this.value)"'
);
$form->addProgress();
@ -3654,18 +3654,18 @@ function setWorkUploadForm($form, $uploadFormType = 0)
case 1:
// Only text.
$form->addHtmlEditor('description', get_lang('Description'), false, false, getWorkDescriptionToolbar());
$form->addRule('description', get_lang('ThisFieldIsRequired'), 'required');
$form->addRule('description', get_lang('Required field'), 'required');
break;
case 2:
// Only file.
$form->addElement(
'file',
'file',
get_lang('UploadADocument'),
get_lang('Upload a document'),
'size="40" onchange="updateDocumentTitle(this.value)"'
);
$form->addProgress();
$form->addRule('file', get_lang('ThisFieldIsRequired'), 'required');
$form->addRule('file', get_lang('Required field'), 'required');
break;
}
@ -3690,7 +3690,7 @@ function uploadWork($my_folder_data, $_course, $isCorrection = false, $workInfo
if (empty($file['size'])) {
return [
'error' => Display:: return_message(
get_lang('UplUploadFailedSizeIsZero'),
get_lang('There was a problem uploading your document: the received file had a 0 bytes size on the server. Please, review your local file for any corruption or damage, then try again.'),
'error'
),
];
@ -3710,14 +3710,14 @@ function uploadWork($my_folder_data, $_course, $isCorrection = false, $workInfo
if (empty($filesize)) {
return [
'error' => Display::return_message(
get_lang('UplUploadFailedSizeIsZero'),
get_lang('There was a problem uploading your document: the received file had a 0 bytes size on the server. Please, review your local file for any corruption or damage, then try again.'),
'error'
),
];
} elseif (!filter_extension($new_file_name)) {
return [
'error' => Display::return_message(
get_lang('UplUnableToSaveFileFilteredExtension'),
get_lang('File upload failed: this file extension or file type is prohibited'),
'error'
),
];
@ -3730,7 +3730,7 @@ function uploadWork($my_folder_data, $_course, $isCorrection = false, $workInfo
if ($total_size > $course_max_space) {
return [
'error' => Display::return_message(get_lang('NoSpace'), 'error'),
'error' => Display::return_message(get_lang('The upload has failed. Either you have exceeded your maximum quota, or there is not enough disk space.'), 'error'),
];
}
@ -3756,7 +3756,7 @@ function uploadWork($my_folder_data, $_course, $isCorrection = false, $workInfo
} else {
return [
'error' => Display :: return_message(
get_lang('FolderDoesntExistsInFileSystem'),
get_lang('Target folder doesn\'t exist on the server.'),
'error'
),
];
@ -3826,15 +3826,15 @@ function sendAlertToUsers($workId, $courseInfo, $sessionId)
}
if ($send) {
$subject = "[".api_get_setting('siteName')."] ".get_lang('SendMailBody')."\n ".get_lang('CourseName').": ".$courseInfo['name']." ";
$subject = "[".api_get_setting('siteName')."] ".get_lang('Send messageMailBody')."\n ".get_lang('Course name').": ".$courseInfo['name']." ";
foreach ($userList as $user_data) {
$to_user_id = $user_data['user_id'];
$user_info = api_get_user_info($to_user_id);
$message = get_lang('SendMailBody')."\n".get_lang('CourseName')." : ".$courseInfo['name']."\n";
$message .= get_lang('UserName')." : ".$user_info['complete_name']."\n";
$message .= get_lang('DateSent')." : ".api_format_date(api_get_local_time())."\n";
$message = get_lang('Send messageMailBody')."\n".get_lang('Course name')." : ".$courseInfo['name']."\n";
$message .= get_lang('Username')." : ".$user_info['complete_name']."\n";
$message .= get_lang('Date sent')." : ".api_format_date(api_get_local_time())."\n";
$url = api_get_path(WEB_CODE_PATH)."work/work.php?cidReq=".$courseInfo['code']."&id_session=".$sessionId."&id=".$workData['id'];
$message .= get_lang('WorkName')." : ".$workData['title']."\n\n".'<a href="'.$url.'">'.get_lang('DownloadLink')."</a>\n";
$message .= get_lang('Assignment name')." : ".$workData['title']."\n\n".'<a href="'.$url.'">'.get_lang('Download link')."</a>\n";
MessageManager::send_message_simple(
$to_user_id,
$subject,
@ -3928,8 +3928,8 @@ function processWorkForm(
if ($checkDuplicated) {
if (checkExistingWorkFileName($file['name'], $workInfo['id'])) {
$saveWork = false;
$result['error'] = get_lang('YouAlreadySentThisFile');
$workData['error'] = get_lang('UplAlreadyExists');
$result['error'] = get_lang('You have already sent this file or another file with the same name. Please make sure you only upload each file once.');
$workData['error'] = get_lang(' already exists.');
} else {
$result = uploadWork($workInfo, $courseInfo, false, [], $file);
}
@ -4077,14 +4077,14 @@ function processWorkForm(
}
$workData = get_work_data_by_id($workId);
if ($workData && $showFlashMessage) {
Display::addFlash(Display::return_message(get_lang('DocAdd')));
Display::addFlash(Display::return_message(get_lang('The file has been added to the list of publications.')));
}
}
} else {
if ($showFlashMessage) {
Display::addFlash(
Display::return_message(
$message ? $message : get_lang('ImpossibleToSaveTheDocument'),
$message ? $message : get_lang('Impossible to save the document'),
'error'
)
);
@ -4148,7 +4148,7 @@ function addDir($formValues, $user_id, $courseInfo, $groupId, $sessionId = 0)
if ($formValues['expires_on'] > $formValues['ends_on']) {
Display::addFlash(
Display::return_message(
get_lang('DateExpiredNotBeLessDeadLine'),
get_lang('The date of effective blocking of sending the work can not be before the displayed posting deadline.'),
'warning'
)
);
@ -4318,7 +4318,7 @@ function updatePublicationAssignment($workId, $params, $courseInfo, $groupId)
$date = $end_date;
}
$title = sprintf(get_lang('HandingOverOfTaskX'), $params['new_dir']);
$title = sprintf(get_lang('Handing over of task %s'), $params['new_dir']);
$description = isset($params['description']) ? $params['description'] : '';
$content = '<a href="'.api_get_path(WEB_CODE_PATH).'work/work_list.php?'.api_get_cidreq().'&id='.$workId.'">'
.$params['new_dir'].'</a>'.$description;
@ -4656,7 +4656,7 @@ function getFormWork($form, $defaults = [], $workId = 0)
}
// Create the form that asks for the directory name
$form->addText('new_dir', get_lang('AssignmentName'));
$form->addText('new_dir', get_lang('Assignment name'));
$form->addHtmlEditor(
'description',
get_lang('Description'),
@ -4664,7 +4664,7 @@ function getFormWork($form, $defaults = [], $workId = 0)
false,
getWorkDescriptionToolbar()
);
$form->addButtonAdvancedSettings('advanced_params', get_lang('AdvancedParameters'));
$form->addButtonAdvancedSettings('advanced_params', get_lang('Advanced settings'));
if (!empty($defaults) && (isset($defaults['enableEndDate']) || isset($defaults['enableExpiryDate']))) {
$form->addHtml('<div id="advanced_params_options" style="display:block">');
@ -4672,15 +4672,15 @@ function getFormWork($form, $defaults = [], $workId = 0)
$form->addHtml('<div id="advanced_params_options" style="display:none">');
}
// QualificationOfAssignment
$form->addElement('text', 'qualification', get_lang('QualificationNumeric'));
// ScoreOfAssignment
$form->addElement('text', 'qualification', get_lang('ScoreNumeric'));
if (($sessionId != 0 && Gradebook::is_active()) || $sessionId == 0) {
$form->addElement(
'checkbox',
'make_calification',
null,
get_lang('MakeQualifiable'),
get_lang('Add to gradebook'),
[
'id' => 'make_calification_id',
'onclick' => "javascript: if(this.checked) { document.getElementById('option1').style.display='block';}else{document.getElementById('option1').style.display='none';}",
@ -4700,10 +4700,10 @@ function getFormWork($form, $defaults = [], $workId = 0)
// Loading Gradebook select
GradebookUtils::load_gradebook_select_in_tool($form);
$form->addElement('text', 'weight', get_lang('WeightInTheGradebook'));
$form->addElement('text', 'weight', get_lang('Weight inside assessment'));
$form->addHtml('</div>');
$form->addElement('checkbox', 'enableExpiryDate', null, get_lang('EnableExpiryDate'), 'id="expiry_date"');
$form->addElement('checkbox', 'enableExpiryDate', null, get_lang('Enable handing over deadline (visible to learners)'), 'id="expiry_date"');
if (isset($defaults['enableExpiryDate']) && $defaults['enableExpiryDate']) {
$form->addHtml('<div id="option2" style="display: block;">');
} else {
@ -4717,9 +4717,9 @@ function getFormWork($form, $defaults = [], $workId = 0)
$defaults['expires_on'] = $date.' 23:59';
}
$form->addElement('date_time_picker', 'expires_on', get_lang('ExpiresAt'));
$form->addElement('date_time_picker', 'expires_on', get_lang('Posted sending deadline'));
$form->addHtml('</div>');
$form->addElement('checkbox', 'enableEndDate', null, get_lang('EnableEndDate'), 'id="end_date"');
$form->addElement('checkbox', 'enableEndDate', null, get_lang('Enable final acceptance date (invisible to learners)'), 'id="end_date"');
if (!isset($defaults['ends_on'])) {
$nextDay = substr(api_get_local_time($timeNextWeek + 86400), 0, 10);
@ -4732,11 +4732,11 @@ function getFormWork($form, $defaults = [], $workId = 0)
$form->addHtml('<div id="option3" style="display: none;">');
}
$form->addElement('date_time_picker', 'ends_on', get_lang('EndsAt'));
$form->addElement('date_time_picker', 'ends_on', get_lang('Ends at (completely closed)'));
$form->addHtml('</div>');
$form->addElement('checkbox', 'add_to_calendar', null, get_lang('AddToCalendar'));
$form->addElement('select', 'allow_text_assignment', get_lang('DocumentType'), getUploadDocumentType());
$form->addElement('checkbox', 'add_to_calendar', null, get_lang('Add to calendar'));
$form->addElement('select', 'allow_text_assignment', get_lang('Document type'), getUploadDocumentType());
// Extra fields
$extraField = new ExtraField('work');
@ -4767,9 +4767,9 @@ function getFormWork($form, $defaults = [], $workId = 0)
function getUploadDocumentType()
{
return [
0 => get_lang('AllowFileOrText'),
1 => get_lang('AllowOnlyText'),
2 => get_lang('AllowOnlyFiles'),
0 => get_lang('Allow files or online text'),
1 => get_lang('Allow only text'),
2 => get_lang('Allow only files'),
];
}
@ -4893,8 +4893,8 @@ function showStudentList($workId)
$url = api_get_path(WEB_AJAX_PATH).'model.ajax.php?a=get_work_student_list_overview&work_id='.$workId.'&'.api_get_cidreq();
$columns = [
get_lang('Students'),
get_lang('Works'),
get_lang('Learners'),
get_lang('Assignments'),
];
$order = api_is_western_name_order() ? 'firstname' : 'lastname';
@ -5337,15 +5337,15 @@ function exportAllStudentWorkFromPublication(
}
}
$header .= '<br />'.get_lang('Teachers').': '.$teachers.'<br />';
$header .= '<br />'.get_lang('Trainers').': '.$teachers.'<br />';
$header .= '<br />'.get_lang('Date').': '.api_get_local_time().'<br />';
$header .= '<br />'.get_lang('WorkName').': '.$workData['title'].'<br />';
$header .= '<br />'.get_lang('Assignment name').': '.$workData['title'].'<br />';
$content = null;
$expiresOn = null;
if (!empty($assignment) && isset($assignment['expires_on'])) {
$content .= '<br /><strong>'.get_lang('PostedExpirationDate').'</strong>: '.api_get_local_time($assignment['expires_on']);
$content .= '<br /><strong>'.get_lang('Posted deadline for sending the work (Visible to the learner)').'</strong>: '.api_get_local_time($assignment['expires_on']);
$expiresOn = api_get_local_time($assignment['expires_on']);
}
@ -5362,9 +5362,9 @@ function exportAllStudentWorkFromPublication(
$headers = [
get_lang('Name'),
get_lang('User'),
get_lang('HandOutDateLimit'),
get_lang('SentDate'),
get_lang('FileName'),
get_lang('Deadline'),
get_lang('Sent date'),
get_lang('Filename'),
get_lang('Score'),
get_lang('Feedback'),
];

@ -27,7 +27,7 @@ $htmlHeadXtra[] = to_javascript_work();
/* Constants and variables */
$tool_name = get_lang('StudentPublications');
$tool_name = get_lang('Assignments');
$item_id = isset($_REQUEST['item_id']) ? (int) $_REQUEST['item_id'] : null;
$origin = api_get_origin();
@ -49,7 +49,7 @@ if ($action === 'upload_form') {
if (api_is_in_gradebook()) {
$interbreadcrumb[] = [
'url' => api_get_path(WEB_CODE_PATH).'gradebook/index.php?'.api_get_cidreq(),
'name' => get_lang('ToolGradebook'),
'name' => get_lang('Assessments'),
];
}
@ -63,11 +63,11 @@ 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).'work/work.php?'.api_get_cidreq(),
'name' => get_lang('StudentPublications'),
'name' => get_lang('Assignments'),
];
$url_dir = api_get_path(WEB_CODE_PATH).'work/work.php?&id='.$work_id.'&'.api_get_cidreq();
if (!empty($my_folder_data)) {
@ -77,14 +77,14 @@ if (!empty($groupId)) {
if ($action == 'upload_form') {
$interbreadcrumb[] = [
'url' => api_get_path(WEB_CODE_PATH).'work/work.php?'.api_get_cidreq(),
'name' => get_lang('UploadADocument'),
'name' => get_lang('Upload a document'),
];
}
if ($action == 'create_dir') {
$interbreadcrumb[] = [
'url' => api_get_path(WEB_CODE_PATH).'work/work.php?'.api_get_cidreq(),
'name' => get_lang('CreateAssignment'),
'name' => get_lang('Create assignment'),
];
}
} else {
@ -94,10 +94,10 @@ if (!empty($groupId)) {
) {
$interbreadcrumb[] = [
'url' => api_get_path(WEB_CODE_PATH).'work/work.php?'.api_get_cidreq(),
'name' => get_lang('StudentPublications'),
'name' => get_lang('Assignments'),
];
} else {
$interbreadcrumb[] = ['url' => '#', 'name' => get_lang('StudentPublications')];
$interbreadcrumb[] = ['url' => '#', 'name' => get_lang('Assignments')];
}
if (!empty($my_folder_data)) {
@ -108,11 +108,11 @@ if (!empty($groupId)) {
}
if ($action === 'upload_form') {
$interbreadcrumb[] = ['url' => '#', 'name' => get_lang('UploadADocument')];
$interbreadcrumb[] = ['url' => '#', 'name' => get_lang('Upload a document')];
}
if ($action === 'create_dir') {
$interbreadcrumb[] = ['url' => '#', 'name' => get_lang('CreateAssignment')];
$interbreadcrumb[] = ['url' => '#', 'name' => get_lang('Create assignment')];
}
}
}
@ -161,13 +161,13 @@ switch ($action) {
'post',
$addUrl
);
$form->addHeader(get_lang('CreateAssignment'));
$form->addHeader(get_lang('Create assignment'));
$form->addElement('hidden', 'action', 'add');
// Set default values
$defaults = !empty($_POST) ? $_POST : ['allow_text_assignment' => 2];
$form = getFormWork($form, $defaults);
$form->addButtonCreate(get_lang('CreateDirectory'));
$form->addButtonCreate(get_lang('Validate'));
if ($form->validate()) {
$values = $form->getSubmitValues();
@ -182,10 +182,10 @@ switch ($action) {
if ($result) {
Skill::saveSkills($form, ITEM_TYPE_STUDENT_PUBLICATION, $result);
$message = Display::return_message(get_lang('DirectoryCreated'), 'success');
$message = Display::return_message(get_lang('Directory created'), 'success');
} else {
$currentUrl = $addUrl;
$message = Display::return_message(get_lang('CannotCreateDir'), 'error');
$message = Display::return_message(get_lang('Unable to create the folder.'), 'error');
}
Display::addFlash($message);
@ -201,7 +201,7 @@ switch ($action) {
$result = deleteDirWork($_REQUEST['id']);
if ($result) {
$message = Display::return_message(
get_lang('DirDeleted').': '.$work_to_delete['title'],
get_lang('Folder deleted').': '.$work_to_delete['title'],
'success'
);
Display::addFlash($message);
@ -253,12 +253,12 @@ switch ($action) {
$user_id
);
$message = Display::return_message(get_lang('DirMv'), 'success');
$message = Display::return_message(get_lang('Element moved'), 'success');
} else {
$message = Display::return_message(get_lang('Impossible'), 'error');
$message = Display::return_message(get_lang('Operation impossible'), 'error');
}
} else {
$message = Display::return_message(get_lang('Impossible'), 'error');
$message = Display::return_message(get_lang('Operation impossible'), 'error');
}
Display::addFlash($message);
header('Location: '.$currentUrl);
@ -285,7 +285,7 @@ switch ($action) {
Display::addFlash(
Display::return_message(
get_lang('VisibilityChanged'),
get_lang('The visibility has been changed.'),
'confirmation'
)
);
@ -314,7 +314,7 @@ switch ($action) {
Display::addFlash(
Display::return_message(
get_lang('VisibilityChanged'),
get_lang('The visibility has been changed.'),
'confirmation'
)
);

@ -35,7 +35,7 @@ protectWork($courseInfo, $workId);
$my_folder_data = get_work_data_by_id($workId);
$work_data = get_work_assignment_by_id($workId);
$tool_name = get_lang('StudentPublications');
$tool_name = get_lang('Assignments');
$group_id = api_get_group_id();
@ -50,13 +50,13 @@ if (!empty($group_id)) {
];
$interbreadcrumb[] = [
'url' => api_get_path(WEB_CODE_PATH).'group/group_space.php?'.api_get_cidreq(),
'name' => get_lang('GroupSpace').' '.$group_properties['name'],
'name' => get_lang('Group area').' '.$group_properties['name'],
];
}
$interbreadcrumb[] = [
'url' => api_get_path(WEB_CODE_PATH).'work/work.php?'.api_get_cidreq(),
'name' => get_lang('StudentPublications'),
'name' => get_lang('Assignments'),
];
$interbreadcrumb[] = [
'url' => api_get_path(WEB_CODE_PATH).'work/work_list.php?'.api_get_cidreq().'&id='.$workId,
@ -66,7 +66,7 @@ $interbreadcrumb[] = [
$documentsAddedInWork = getAllDocumentsFromWorkToString($workId, $courseInfo);
$actionsLeft = '<a href="'.api_get_path(WEB_CODE_PATH).'work/work.php?'.api_get_cidreq().'">'.
Display::return_icon('back.png', get_lang('BackToWorksList'), '', ICON_SIZE_MEDIUM).'</a>';
Display::return_icon('back.png', get_lang('Back to Assignments list'), '', ICON_SIZE_MEDIUM).'</a>';
$actionsRight = '';
$onlyOnePublication = api_get_configuration_value('allow_only_one_student_publication_per_user');
@ -76,7 +76,7 @@ if (api_is_allowed_to_session_edit(false, true) && !empty($workId) && !api_is_in
Display::returnFontAwesomeIcon(
' fa-upload'
).
get_lang('UploadMyAssignment'),
get_lang('Upload my assignment'),
$url,
['class' => 'btn btn-primary', 'id' => 'upload_button']
);
@ -140,9 +140,9 @@ switch ($action) {
$fileDeleted = deleteWorkItem($item_id, $courseInfo);
if (!$fileDeleted) {
Display::addFlash(Display::return_message(get_lang('YouAreNotAllowedToDeleteThisDocument')));
Display::addFlash(Display::return_message(get_lang('You are not allowed to delete this document')));
} else {
Display::addFlash(Display::return_message(get_lang('TheDocumentHasBeenDeleted')));
Display::addFlash(Display::return_message(get_lang('The document has been deleted.')));
}
break;
}
@ -158,10 +158,10 @@ if (!api_is_invitee()) {
$columns = [
get_lang('Type'),
get_lang('Title'),
get_lang('Qualification'),
get_lang('Score'),
get_lang('Date'),
get_lang('Status'),
get_lang('Actions'),
get_lang('Detail'),
];
$columnModel = [
@ -220,7 +220,7 @@ if (!api_is_invitee()) {
get_lang('Title'),
get_lang('Feedback'),
get_lang('Date'),
get_lang('Actions'),
get_lang('Detail'),
];
$columnModel = [

@ -63,13 +63,13 @@ if (!empty($group_id)) {
$interbreadcrumb[] = [
'url' => api_get_path(WEB_CODE_PATH).'group/group_space.php?'.api_get_cidreq(),
'name' => get_lang('GroupSpace').' '.$group_properties['name'],
'name' => get_lang('Group area').' '.$group_properties['name'],
];
}
$interbreadcrumb[] = [
'url' => api_get_path(WEB_CODE_PATH).'work/work.php?'.api_get_cidreq(),
'name' => get_lang('StudentPublications'),
'name' => get_lang('Assignments'),
];
$interbreadcrumb[] = [
'url' => api_get_path(WEB_CODE_PATH).'work/work_list_all.php?'.api_get_cidreq().'&id='.$workId,
@ -96,11 +96,11 @@ switch ($action) {
$fileDeleted = deleteWorkItem($itemId, $courseInfo);
if (!$fileDeleted) {
Display::addFlash(
Display::return_message(get_lang('YouAreNotAllowedToDeleteThisDocument'), 'error')
Display::return_message(get_lang('You are not allowed to delete this document'), 'error')
);
} else {
Display::addFlash(
Display::return_message(get_lang('TheDocumentHasBeenDeleted'), 'confirmation')
Display::return_message(get_lang('The document has been deleted.'), 'confirmation')
);
}
}
@ -127,7 +127,7 @@ switch ($action) {
} else {
makeVisible($itemId, $courseInfo);
Display::addFlash(
Display::return_message(get_lang('FileVisible'), 'confirmation')
Display::return_message(get_lang('The file is now visible'), 'confirmation')
);
}
}
@ -140,7 +140,7 @@ switch ($action) {
} else {
makeInvisible($itemId, $courseInfo);
Display::addFlash(
Display::return_message(get_lang('FileInvisible'), 'confirmation')
Display::return_message(get_lang('The file is now invisible'), 'confirmation')
);
}
}
@ -162,24 +162,24 @@ Display::display_header(null);
$documentsAddedInWork = getAllDocumentsFromWorkToString($workId, $courseInfo);
$actionsLeft = '<a href="'.api_get_path(WEB_CODE_PATH).'work/work.php?'.api_get_cidreq().'">'.
Display::return_icon('back.png', get_lang('BackToWorksList'), '', ICON_SIZE_MEDIUM).'</a>';
Display::return_icon('back.png', get_lang('Back to Assignments list'), '', ICON_SIZE_MEDIUM).'</a>';
if (api_is_allowed_to_session_edit(false, true) && !empty($workId) && !$isDrhOfCourse) {
$blockAddDocuments = api_get_configuration_value('block_student_publication_add_documents');
if (!$blockAddDocuments) {
$actionsLeft .= '<a href="'.api_get_path(WEB_CODE_PATH).'work/add_document.php?'.api_get_cidreq().'&id='.$workId.'">';
$actionsLeft .= Display::return_icon('new_document.png', get_lang('AddDocument'), '', ICON_SIZE_MEDIUM).'</a>';
$actionsLeft .= Display::return_icon('new_document.png', get_lang('Add document'), '', ICON_SIZE_MEDIUM).'</a>';
}
$actionsLeft .= '<a href="'.api_get_path(WEB_CODE_PATH).'work/add_user.php?'.api_get_cidreq().'&id='.$workId.'">';
$actionsLeft .= Display::return_icon('addworkuser.png', get_lang('AddUsers'), '', ICON_SIZE_MEDIUM).'</a>';
$actionsLeft .= Display::return_icon('addworkuser.png', get_lang('Add a user'), '', ICON_SIZE_MEDIUM).'</a>';
$actionsLeft .= '<a href="'.api_get_path(WEB_CODE_PATH).'work/work_list_all.php?'.api_get_cidreq().'&id='.$workId.'&action=export_pdf">';
$actionsLeft .= Display::return_icon('pdf.png', get_lang('Export'), '', ICON_SIZE_MEDIUM).'</a>';
$display_output = '<a href="'.api_get_path(WEB_CODE_PATH).'work/work_missing.php?'.api_get_cidreq().'&amp;id='.$workId.'&amp;list=without">'.
Display::return_icon('exercice_uncheck.png', get_lang('ViewUsersWithoutTask'), '', ICON_SIZE_MEDIUM)."</a>";
Display::return_icon('exercice_uncheck.png', get_lang('View missing assignments'), '', ICON_SIZE_MEDIUM)."</a>";
$editLink = '<a href="'.api_get_path(WEB_CODE_PATH).'work/edit_work.php?'.api_get_cidreq().'&id='.$workId.'">';
$editLink .= Display::return_icon('edit.png', get_lang('Edit'), '', ICON_SIZE_MEDIUM).'</a>';
@ -193,14 +193,14 @@ if (api_is_allowed_to_session_edit(false, true) && !empty($workId) && !$isDrhOfC
$count = get_count_work($workId);
if ($count > 0) {
$display_output .= '<a class="btn-toolbar" href="downloadfolder.inc.php?id='.$workId.'&'.api_get_cidreq().'">'.
Display::return_icon('save_pack.png', get_lang('DownloadTasksPackage'), null, ICON_SIZE_MEDIUM).' '.get_lang('DownloadTasksPackage').'</a>';
Display::return_icon('save_pack.png', get_lang('Download assignments package'), null, ICON_SIZE_MEDIUM).' '.get_lang('Download assignments package').'</a>';
}
$actionsLeft .= $display_output;
$url = api_get_path(WEB_CODE_PATH).'work/upload_corrections.php?'.api_get_cidreq().'&id='.$workId;
$actionsLeft .= '<a class="btn-toolbar" href="'.$url.'">'.
Display::return_icon('upload_package.png', get_lang('UploadCorrectionsPackage'), '', ICON_SIZE_MEDIUM).' '.get_lang('UploadCorrectionsPackage').'</a>';
Display::return_icon('upload_package.png', get_lang('Upload corrections package'), '', ICON_SIZE_MEDIUM).' '.get_lang('Upload corrections package').'</a>';
$url = api_get_path(WEB_CODE_PATH).'work/work_list_all.php?'.api_get_cidreq().'&id='.$workId.'&action=delete_correction';
$actionsLeft .= Display::toolbarButton(get_lang('DeleteCorrections'), $url, 'remove', 'danger');
$actionsLeft .= Display::toolbarButton(get_lang('Delete all corrections'), $url, 'remove', 'danger');
}
echo Display::toolbarAction('toolbar-worklist', [$actionsLeft]);
@ -241,15 +241,15 @@ if (!empty($work_data['enable_qualification']) &&
) {
$type = 'simple';
$columns = [
get_lang('FullUserName'),
get_lang('Full name'),
get_lang('Title'),
get_lang('Score'),
get_lang('Date'),
get_lang('Status'),
get_lang('UploadCorrection'),
get_lang('Upload correction'),
];
$columns = array_merge($columns, $plagiarismListJqgridColumn);
$columns[] = get_lang('Actions');
$columns[] = get_lang('Detail');
$column_model = [
[
@ -311,14 +311,14 @@ if (!empty($work_data['enable_qualification']) &&
} else {
$type = 'complex';
$columns = [
get_lang('FullUserName'),
get_lang('Full name'),
get_lang('Title'),
get_lang('Feedback'),
get_lang('Date'),
get_lang('UploadCorrection'),
get_lang('Upload correction'),
];
$columns = array_merge($columns, $plagiarismListJqgridColumn);
$columns[] = get_lang('Actions');
$columns[] = get_lang('Detail');
$column_model = [
[
@ -423,12 +423,12 @@ $(function() {
}
});
} else {
alert("<?php echo addslashes(get_lang('SelectAnOption')); ?>");
alert("<?php echo addslashes(get_lang('Please select an option')); ?>");
}
},
position:"last"
}).navButtonAdd('#results_pager', {
//caption:"<?php //echo addslashes(get_lang('SetVisible'));?>//",
//caption:"<?php //echo addslashes(get_lang('Set visible'));?>//",
caption:"<i class=\"fa fa-eye-slash\" ></i>",
buttonicon:"ui-icon-blank",
onClickButton: function(a) {
@ -443,7 +443,7 @@ $(function() {
}
});
} else {
alert("<?php echo addslashes(get_lang('SelectAnOption')); ?>");
alert("<?php echo addslashes(get_lang('Please select an option')); ?>");
}
},
position:"last"
@ -464,7 +464,7 @@ if ($allowAntiPlagiarism) {
echo '<div class="list-work-results">';
$table = '<table style="display:none; width:100%" class="files data_table">
<tr>
<th>'.get_lang('FileName').'</th>
<th>'.get_lang('Filename').'</th>
<th>'.get_lang('Size').'</th>
<th>'.get_lang('Status').'</th>
</tr>
@ -475,8 +475,8 @@ if ($allowAntiPlagiarism) {
$workTable = Database:: get_course_table(TABLE_STUDENT_PUBLICATION);
$courseId = $courseInfo['real_id'];
$formAction['analyseCompilatio'] = [
'label' => get_lang('CompilatioStartAnalysis'),
'data-action' => get_lang('CompilatioStartAnalysis'),
'label' => get_lang('Start Compilatio analysis'),
'data-action' => get_lang('Start Compilatio analysis'),
'onClick' => "onclick='getMultiCompilatio()'",
];
@ -490,18 +490,18 @@ if ($allowAntiPlagiarism) {
$html .= '<a class="btn btn-default" href="?'
.'&amp;'."gbox_results".'&amp;'.'selectall=1" onclick="javascript: setCheckbox(true, \''
."gbox_results".'\'); return false;">'
.get_lang('SelectAll')
.get_lang('Select all')
.'</a>';
$html .= '<a class="btn btn-default" href="?'
.'" onclick="javascript: setCheckbox(false, \''
."gbox_results"
.'\'); return false;">'
.get_lang('UnSelectAll')
.get_lang('UnSelect all')
.'</a> ';
$html .= '</div>';
$html .= '<div class="btn-group">
<button class="btn btn-default" onclick="javascript:return false;">'
.get_lang('Actions')
.get_lang('Detail')
.'</button>'
.'<button class="btn btn-default dropdown-toggle" data-toggle="dropdown">'
.'<span class="caret"></span>'
@ -552,12 +552,12 @@ if ($allowAntiPlagiarism) {
var workFolderId = "<?php echo $workId; ?>";
var compilationWebUrl = "<?php echo api_get_path(WEB_CODE_PATH).'plagiarism/compilatio/'; ?>";
var divExisteTimer = null;
var msgWaitJS = '<?php echo Display::return_message(get_lang('PleaseWaitThisCouldTakeAWhile')); ?>';
var msgWaitJS = '<?php echo Display::return_message(get_lang('Please wait. This could take a while...')); ?>';
var div = document.createElement('div');
var referent = document.getElementById('compilation-results');
var Analyse = '<?php echo get_lang('CompilatioAnalysis'); ?>';
var compiReport = '<?php echo get_lang('CompilatioSeeReport'); ?>';
var compiNonToAnalyse = '<?php echo Display::return_message(get_lang('CompilatioNonToAnalyse'), 'error'); ?>';
var Analyse = '<?php echo get_lang('Analyse'); ?>';
var compiReport = '<?php echo get_lang('See report'); ?>';
var compiNonToAnalyse = '<?php echo Display::return_message(get_lang('Your selection contains no jobs to analyze. Only jobs managed by Compilatio and not already scanned can be sent.'), 'error'); ?>';
var clickTrigger = false;
function compilatioInit() {
@ -688,7 +688,7 @@ if ($allowAntiPlagiarism) {
type: "get",
dataType: "html",
error: function () {
showData("<?php echo get_lang('CompilatioComunicationAjaxImpossible'); ?>");
showData("<?php echo get_lang('AJAX communication with the Compilatio server impossible. Please retry later.'); ?>");
},
success: function (strData) {
showData(strData);

@ -23,7 +23,7 @@ if (empty($my_folder_data)) {
}
$work_data = get_work_assignment_by_id($workId);
$tool_name = get_lang('StudentPublications');
$tool_name = get_lang('Assignments');
$group_id = api_get_group_id();
$courseInfo = api_get_course_info();
@ -61,13 +61,13 @@ if (!empty($group_id)) {
];
$interbreadcrumb[] = [
'url' => api_get_path(WEB_CODE_PATH).'group/group_space.php?'.api_get_cidreq(),
'name' => get_lang('GroupSpace').' '.$group_properties['name'],
'name' => get_lang('Group area').' '.$group_properties['name'],
];
}
$interbreadcrumb[] = [
'url' => api_get_path(WEB_CODE_PATH).'work/work.php?'.api_get_cidreq(),
'name' => get_lang('StudentPublications'),
'name' => get_lang('Assignments'),
];
$interbreadcrumb[] = [
'url' => api_get_path(WEB_CODE_PATH).'work/work_list_others.php?'.api_get_cidreq().'&id='.$workId,
@ -78,7 +78,7 @@ Display :: display_header(null);
echo '<div class="actions">';
echo '<a href="'.api_get_path(WEB_CODE_PATH).'work/work.php?'.api_get_cidreq().'>'.
Display::return_icon('back.png', get_lang('BackToWorksList'), '', ICON_SIZE_MEDIUM).'</a>';
Display::return_icon('back.png', get_lang('Back to Assignments list'), '', ICON_SIZE_MEDIUM).'</a>';
echo '</div>';
if (!empty($my_folder_data['description'])) {
@ -92,13 +92,13 @@ if (!empty($work_data['enable_qualification']) && !empty($check_qualification))
$type = 'simple';
$columns = [
get_lang('Type'),
get_lang('FirstName'),
get_lang('LastName'),
get_lang('First name'),
get_lang('Last name'),
get_lang('Title'),
get_lang('Qualification'),
get_lang('Score'),
get_lang('Date'),
get_lang('Status'),
get_lang('Actions'),
get_lang('Detail'),
];
$column_model = [
[
@ -154,11 +154,11 @@ if (!empty($work_data['enable_qualification']) && !empty($check_qualification))
$type = 'complex';
$columns = [
get_lang('Type'),
get_lang('FirstName'),
get_lang('LastName'),
get_lang('First name'),
get_lang('Last name'),
get_lang('Title'),
get_lang('Date'),
get_lang('Actions'),
get_lang('Detail'),
];
$column_model = [
[

@ -39,10 +39,10 @@ switch ($action) {
);
if (empty($mails_sent_to)) {
Display::addFlash(Display::return_message(get_lang('NoResults'), 'warning'));
Display::addFlash(Display::return_message(get_lang('No results found'), 'warning'));
} else {
Display::addFlash(Display::return_message(
get_lang('MessageHasBeenSent').' '.implode(', ', $mails_sent_to),
get_lang('Your message has been sent.').' '.implode(', ', $mails_sent_to),
'success'
));
}
@ -78,13 +78,13 @@ if (!empty($group_id)) {
];
$interbreadcrumb[] = [
'url' => api_get_path(WEB_CODE_PATH).'group/group_space.php?gidReq='.$group_id,
'name' => get_lang('GroupSpace').' '.$group_properties['name'],
'name' => get_lang('Group area').' '.$group_properties['name'],
];
}
$interbreadcrumb[] = [
'url' => api_get_path(WEB_CODE_PATH).'work/work.php?'.api_get_cidreq(),
'name' => get_lang('StudentPublications'),
'name' => get_lang('Assignments'),
];
$interbreadcrumb[] = [
'url' => api_get_path(WEB_CODE_PATH).'work/work_list_all.php?'.api_get_cidreq().'&id='.$workId,
@ -92,29 +92,29 @@ $interbreadcrumb[] = [
];
if (isset($_GET['list']) && $_GET['list'] == 'with') {
$interbreadcrumb[] = ['url' => '#', 'name' => get_lang('UsersWithTask')];
$interbreadcrumb[] = ['url' => '#', 'name' => get_lang('Learners who sent their work')];
} else {
$interbreadcrumb[] = ['url' => '#', 'name' => get_lang('UsersWithoutTask')];
$interbreadcrumb[] = ['url' => '#', 'name' => get_lang('Learners who didn\'t send their work')];
}
Display::display_header(null);
echo '<div class="actions">';
echo '<a href="'.api_get_path(WEB_CODE_PATH).'work/work_list_all.php?id='.$workId.'&'.api_get_cidreq().'">'.
Display::return_icon('back.png', get_lang('BackToWorksList'), '', ICON_SIZE_MEDIUM).'</a>';
Display::return_icon('back.png', get_lang('Back to Assignments list'), '', ICON_SIZE_MEDIUM).'</a>';
$output = '';
if (!empty($workId)) {
if (empty($_GET['list']) or Security::remove_XSS($_GET['list']) == 'with') {
$output .= '<a href="'.api_get_self().'?'.api_get_cidreq().'&id='.$workId.'&list=without">'.
Display::return_icon('exercice_uncheck.png', get_lang('ViewUsersWithoutTask'), '', ICON_SIZE_MEDIUM).
Display::return_icon('exercice_uncheck.png', get_lang('ViewLearners who didn\'t send their work'), '', ICON_SIZE_MEDIUM).
"</a>";
} else {
if (!isset($_GET['action']) || (isset($_GET['action']) && $_GET['action'] != 'send_mail')) {
$output .= '<a href="'.api_get_self().'?'.api_get_cidreq().'&id='.$workId.'&list=without&action=send_mail&sec_token='.$token.'">'.
Display::return_icon('mail_send.png', get_lang('ReminderMessage'), '', ICON_SIZE_MEDIUM).
Display::return_icon('mail_send.png', get_lang('Send a reminder'), '', ICON_SIZE_MEDIUM).
"</a>";
} else {
$output .= Display::return_icon('mail_send_na.png', get_lang('ReminderMessage'), '', ICON_SIZE_MEDIUM);
$output .= Display::return_icon('mail_send_na.png', get_lang('Send a reminder'), '', ICON_SIZE_MEDIUM);
}
}
}

Loading…
Cancel
Save