Lab page: per-variant create/edit modals, rendered conditions, inline lab edit; student page: compact code field, big score, defense wording, header highlight; toasts tinted; p margin
This commit is contained in:
@@ -363,7 +363,7 @@ function applyDefenseToCell(s) {
|
||||
: (s.code ? 'код ' + s.code : 'ожидает')));
|
||||
}
|
||||
if (s.status === 'ready') {
|
||||
btn.title = 'Защита завершена: ' + (s.readyReason === 'timeout' ? 'время вышло' : 'студент нажал «Готов»');
|
||||
btn.title = 'Защита: ' + defenseReasonText(s.readyReason);
|
||||
if (label) label.textContent = 'готова';
|
||||
}
|
||||
}
|
||||
@@ -388,7 +388,7 @@ function syncDefenseStatuses(sessions, initial) {
|
||||
var who = (btn && btn.getAttribute('data-student-name')) || 'студент';
|
||||
var lab = (btn && btn.getAttribute('data-lab-name')) || 'лабораторная';
|
||||
var reason = s.readyReason === 'timeout' ? 'время вышло' : 'нажал «Готов»';
|
||||
showToast(who + ' — ' + lab + ': завершил защиту (' + reason + ').');
|
||||
showToast(who + ' — ' + lab + ': ' + reason + '.');
|
||||
}
|
||||
|
||||
// Обновляем открытый диалог, если он про эту сессию.
|
||||
@@ -440,9 +440,8 @@ function startDefenseWatch() {
|
||||
/* ---------- Индивидуальное задание (защита) ---------- */
|
||||
|
||||
function defenseReasonText(reason) {
|
||||
if (reason === 'timeout') return 'время вышло';
|
||||
if (reason === 'button') return 'студент нажал «Готов»';
|
||||
return '';
|
||||
if (reason === 'timeout') return 'Вышло время';
|
||||
return 'Готов к сдаче';
|
||||
}
|
||||
|
||||
function defenseStatusText(status, code, seconds, reason) {
|
||||
@@ -453,8 +452,7 @@ function defenseStatusText(status, code, seconds, reason) {
|
||||
}
|
||||
if (status === 'started') return 'Студент выполняет работу, осталось ' + fmtSeconds(seconds) + '.';
|
||||
if (status === 'ready') {
|
||||
var why = defenseReasonText(reason);
|
||||
return 'Студент готов к сдаче' + (why ? ' (' + why + ')' : '') + '. Можно начать заново для дополнительного задания.';
|
||||
return defenseReasonText(reason) + '. Можно начать заново для дополнительного задания.';
|
||||
}
|
||||
return '';
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user