Fix "-" if qualification doesn't exist in last work upload and added upload success msg - Refs BT#11478

1.10.x
José Loguercio 9 years ago
parent 922cf4d46e
commit 7ba2774af9
  1. 4
      main/inc/lib/formvalidator/FormValidator.class.php
  2. 2
      main/work/work.lib.php

@ -1386,6 +1386,9 @@ EOT;
node
.prepend('<br>')
.prepend(file.preview);
node
.append('<br>')
.append($('<span class=\"text-success\"/>').text('" . get_lang('UplUploadSucceeded') . "'));
}
if (file.error) {
node
@ -1404,7 +1407,6 @@ EOT;
progress + '%'
);
}).on('fileuploaddone', function (e, data) {
$.each(data.result.files, function (index, file) {
if (file.url) {
var link = $('<a>')

@ -1423,7 +1423,7 @@ function getWorkListStudent(
$lastWork = getLastWorkStudentFromParentByUser($userId, $work['id'], $courseInfo);
if (!empty($lastWork)) {
$work['last_upload'] = Display::label($lastWork['qualification'], 'warning').' - ';
$work['last_upload'] = (!empty($lastWork['qualification'])) ? Display::label($lastWork['qualification'], 'warning').' - ' : '';
$work['last_upload'] .= api_get_local_time($lastWork['sent_date']);
}

Loading…
Cancel
Save