diff --git a/frontend/src/utils/exam-correct/exam-correct.js b/frontend/src/utils/exam-correct/exam-correct.js index bdf3a253d..de8b77eac 100644 --- a/frontend/src/utils/exam-correct/exam-correct.js +++ b/frontend/src/utils/exam-correct/exam-correct.js @@ -189,7 +189,7 @@ export class ExamCorrect { if (Object.keys(results).length <= 0) return; const rowInfo = { - users: [{ id: userId, name: user }], + users: [userId || user], results: results, status: STATUS.LOADING, }; @@ -297,6 +297,7 @@ export class ExamCorrect { // TODO special style for server time? newEntry.users = [response.user]; newEntry.results = response.results; + newEntry.date = response.time; } // TODO replace results with results from response // TODO set edit button visibility @@ -443,7 +444,7 @@ export class ExamCorrect { } else if (rowInfo.users.length === 1) { const user = rowInfo.users[0]; userCell.innerHTML = userToHTML(user); - userCell.setAttribute(EXAM_CORRECT_USER_ATTR, user.id || user.name); + userCell.setAttribute(EXAM_CORRECT_USER_ATTR, user); } else { userCell = this._showUserList(newRow, rowInfo.users, rowInfo.results); }