@ -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('BackToWorksL ist'), '', ICON_SIZE_MEDIUM).
Display::return_icon('back.png', get_lang('Back to Assignments l ist'), '', 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('CreateA ssignment'),
get_lang('Create a ssignment'),
'',
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('ViewS tudents'),
get_lang('View s tudents'),
'',
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('FileFormatNotS upported'),
get_lang('File format not s upported'),
['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('MaxWeightNeedToBeP rovided'),
get_lang('Max weight need to be p rovided'),
'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('LastU pload'),
get_lang('Last u pload'),
];
$columnModel = [
@ -576,10 +576,10 @@ function showTeacherWorkGrid()
$columns = [
get_lang('Type'),
get_lang('Title'),
get_lang('SentD ate'),
get_lang('HandOutDateLimit '),
get_lang('AmountS ubmitted'),
get_lang('Actions '),
get_lang('Sent d ate'),
get_lang('Deadline '),
get_lang('Number s ubmitted'),
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('R oot').')< / option > ';
$form .= '< option value = "/" > / ('.get_lang('r oot').')< / 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('R oot').')' : $display_folder;
$display_folder = ($display_folder == '') ? '/ ('.get_lang('r oot').')' : $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('MoveF ile').' - '.Security::remove_XSS($title));
$form->addHeader(get_lang('Move the f ile').' - '.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('R oot').')< / option > ';
$form .= '< option value = "0" > / ('.get_lang('r oot').')< / 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('R oot').')' : $display_folder;
$display_folder = ($display_folder == '') ? '/ ('.get_lang('r oot').')' : $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('MoveF ile'), 'move_file_submit');
$form->addButtonSend(get_lang('Move the f ile'), '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('I nvisible');
$text = get_lang('i nvisible');
$action = 'visible';
$class = 'muted';
}
@ -1499,7 +1499,7 @@ function getWorkListTeacher(
}
$correctionLink = ' '.Display::url(
Display::return_icon('upload_package.png', get_lang('UploadC orrections'), '', ICON_SIZE_SMALL),
Display::return_icon('upload_package.png', get_lang('Upload c orrections'), '', ICON_SIZE_SMALL),
api_get_path(WEB_CODE_PATH).'work/upload_corrections.php?'.api_get_cidreq().'& id='.$workId
).' ';
@ -1753,7 +1753,7 @@ function get_work_user_list_from_documents(
if ($qualificationExists) {
if (empty($row['qualificator_id'])) {
$status = Display::label(get_lang('NotRevis ed'), 'warning');
$status = Display::label(get_lang('Not review ed'), '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('CorrectAndR ate'),
get_lang('Correct and r ate'),
[],
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('ExportToD oc').'" >'.
Display::return_icon('export_doc.png', get_lang('ExportToD oc'), [], ICON_SIZE_SMALL).'< / a > ';
title="'.get_lang('Export to .d oc').'" >'.
Display::return_icon('export_doc.png', get_lang('Export to .d oc'), [], 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('ClickOrDropOneFileH ere')).'
'.addslashes(get_lang('Click or drop one file h ere')).'
'.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('CorrectAndR ate'),
get_lang('Correct and r ate'),
[],
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('I nvisible').'" > '.
Display::return_icon('visible.png', get_lang('I nvisible'), [], 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('i nvisible').'" > '.
Display::return_icon('visible.png', get_lang('i nvisible'), [], 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 ( ' ConfirmYourC hoice' ) , 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 c hoice' ) , 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 ( ' ConfirmYourC hoice' ) , 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 c hoice' ) , 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('NotRevis ed'), 'warning');
$qualificator_id = Display::label(get_lang('Not review ed'), '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.' '.get_lang('CompilatioConnectionWithS erver').'< / div > ';
".$loading.' '.get_lang('Connecting with the Compilatio s erver').'< / div > ';
} else {
$workDirectory = api_get_path(SYS_COURSE_PATH).$course_info['directory'];
if (!Compilatio::verifiFileType($dbTitle)) {
$actionCompilatio = get_lang('FileFormatNotS upported');
$actionCompilatio = get_lang('File format not s upported');
} 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('CompilatioWith Compilatio');
$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('CourseN ame').' : '.$_course['name']."\n";
$content .= get_lang('WorkN ame').' : '.$task_title."\n";
$content = get_lang('Please remember you still have to send an assignment')."\n".get_lang('Course n ame').' : '.$_course['name']."\n";
$content .= get_lang('Assignment n ame').' : '.$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('HomeworkC reated');
$emailsubject = '['.api_get_setting('siteName').'] '.get_lang('An assignment was c reated');
$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('HomeworkHasBeenCreatedForTheC ourse')." ".$courseCode.". "."\n\n".
'< a href = "'.$link.'" > '.get_lang('PleaseCheckHomeworkPage ').'< / a > ';
$emailbody .= get_lang('An assignment has been added to c ourse')." ".$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('LastN ame'), true];
$table_header[] = [get_lang('FirstN ame'), true];
$table_header[] = [get_lang('E mail'), true];
$table_header[] = [get_lang('Last n ame'), true];
$table_header[] = [get_lang('First n ame'), 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('CommentA dded'))
Display::return_message(get_lang('You comment has been a dded'))
);
$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('ThereIsANewWorkFeedback InWorkXHere'), $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: %s InWorkXHere'), $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('SendMailToS tudent')
get_lang('Send message mail to s tudent')
);
}
@ -3603,12 +3603,12 @@ function getWorkDateValidationStatus($homework)
}
if ($has_ended) {
$message = Display::return_message(get_lang('EndDateAlreadyP assed').' '.$ends_on, 'error');
$message = Display::return_message(get_lang('End date already p assed').' '.$ends_on, 'error');
} elseif ($has_expired) {
$message = Display::return_message(get_lang('ExpiryDateAlreadyP assed').' '.$expires_on, 'warning');
$message = Display::return_message(get_lang('Expiry date already p assed').' '.$expires_on, 'warning');
} else {
if ($has_expired) {
$message = Display::return_message(get_lang('ExpiryDateToSendWorkIs').' '.$expires_on);
$message = Display::return_message(get_lang('ExpiryDateToSend message WorkIs').' '.$expires_on);
}
}
}
@ -3626,7 +3626,7 @@ function getWorkDateValidationStatus($homework)
*/
function setWorkUploadForm($form, $uploadFormType = 0)
{
$form->addHeader(get_lang('UploadAD ocument'));
$form->addHeader(get_lang('Upload a d ocument'));
$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('FileE xtension'),
get_lang('File e xtension'),
['id' => 'file_extension', 'readonly' => 'readonly']
);
$form->addRule('title', get_lang('ThisFieldIs Required'), 'required');
$form->addRule('title', get_lang('Required fiel d'), 'required');
switch ($uploadFormType) {
case 0:
@ -3645,7 +3645,7 @@ function setWorkUploadForm($form, $uploadFormType = 0)
$form->addElement(
'file',
'file',
get_lang('UploadAD ocument'),
get_lang('Upload a d ocument'),
'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('ThisFieldIs Required'), 'required');
$form->addRule('description', get_lang('Required fiel d'), 'required');
break;
case 2:
// Only file.
$form->addElement(
'file',
'file',
get_lang('UploadAD ocument'),
get_lang('Upload a d ocument'),
'size="40" onchange="updateDocumentTitle(this.value)"'
);
$form->addProgress();
$form->addRule('file', get_lang('ThisFieldIs Required'), 'required');
$form->addRule('file', get_lang('Required fiel d'), '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('CourseN ame').": ".$courseInfo['name']." ";
$subject = "[".api_get_setting('siteName')."] ".get_lang('Send messageMailBody')."\n ".get_lang('Course n ame').": ".$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('CourseN ame')." : ".$courseInfo['name']."\n";
$message .= get_lang('UserN ame')." : ".$user_info['complete_name']."\n";
$message .= get_lang('DateS ent')." : ".api_format_date(api_get_local_time())."\n";
$message = get_lang('Send messageMailBody')."\n".get_lang('Course n ame')." : ".$courseInfo['name']."\n";
$message .= get_lang('Usern ame')." : ".$user_info['complete_name']."\n";
$message .= get_lang('Date s ent')." : ".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('WorkN ame')." : ".$workData['title']."\n\n".'< a href = "'.$url.'" > '.get_lang('DownloadL ink')."< / a > \n";
$message .= get_lang('Assignment n ame')." : ".$workData['title']."\n\n".'< a href = "'.$url.'" > '.get_lang('Download l ink')."< / 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('ImpossibleToSaveTheD ocument'),
$message ? $message : get_lang('Impossible to save the d ocument'),
'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('AssignmentN ame'));
$form->addText('new_dir', get_lang('Assignment n ame'));
$form->addHtmlEditor(
'description',
get_lang('Description'),
@ -4664,7 +4664,7 @@ function getFormWork($form, $defaults = [], $workId = 0)
false,
getWorkDescriptionToolbar()
);
$form->addButtonAdvancedSettings('advanced_params', get_lang('AdvancedParameter s'));
$form->addButtonAdvancedSettings('advanced_params', get_lang('Advanced setting s'));
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" > ');
}
// Qualification OfAssignment
$form->addElement('text', 'qualification', get_lang('Qualification Numeric'));
// Score OfAssignment
$form->addElement('text', 'qualification', get_lang('Score Numeric'));
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('AddToC alendar'));
$form->addElement('select', 'allow_text_assignment', get_lang('DocumentT ype'), getUploadDocumentType());
$form->addElement('checkbox', 'add_to_calendar', null, get_lang('Add to c alendar'));
$form->addElement('select', 'allow_text_assignment', get_lang('Document t ype'), getUploadDocumentType());
// Extra fields
$extraField = new ExtraField('work');
@ -4767,9 +4767,9 @@ function getFormWork($form, $defaults = [], $workId = 0)
function getUploadDocumentType()
{
return [
0 => get_lang('AllowFileOrT ext'),
1 => get_lang('AllowOnlyT ext'),
2 => get_lang('AllowOnlyF iles'),
0 => get_lang('Allow files or online t ext'),
1 => get_lang('Allow only t ext'),
2 => get_lang('Allow only f iles'),
];
}
@ -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('Student s'),
get_lang('Work s'),
get_lang('Learner s'),
get_lang('Assignment s'),
];
$order = api_is_western_name_order() ? 'firstname' : 'lastname';
@ -5337,15 +5337,15 @@ function exportAllStudentWorkFromPublication(
}
}
$header .= '< br / > '.get_lang('Teach ers').': '.$teachers.'< br / > ';
$header .= '< br / > '.get_lang('Train ers').': '.$teachers.'< br / > ';
$header .= '< br / > '.get_lang('Date').': '.api_get_local_time().'< br / > ';
$header .= '< br / > '.get_lang('WorkN ame').': '.$workData['title'].'< br / > ';
$header .= '< br / > '.get_lang('Assignment n ame').': '.$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('SentD ate'),
get_lang('FileN ame'),
get_lang('Deadline '),
get_lang('Sent d ate'),
get_lang('Filen ame'),
get_lang('Score'),
get_lang('Feedback'),
];