Skip to content

Commit

Permalink
add reason to response
Browse files Browse the repository at this point in the history
  • Loading branch information
faisalnjs committed Oct 2, 2024
1 parent 7510b0d commit 3171153
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 1 deletion.
2 changes: 1 addition & 1 deletion src/checker/admin.js
Original file line number Diff line number Diff line change
Expand Up @@ -721,7 +721,7 @@ function updateResponses() {
var buttonGrid = document.createElement('div');
buttonGrid.className = "button-grid inputs";
buttonGrid.id = `response-${r.id}`;
buttonGrid.innerHTML = `<input type="text" autocomplete="off" class="small" id="response-id-input" value="${r.id}" disabled hidden /><input type="text" autocomplete="off" class="small" id="response-segment-input" value="${r.segment}" disabled /><input type="text" autocomplete="off" class="small" id="response-question-input" value="${questions.find(q => q.id == r.question_id).number}" disabled /><input type="text" autocomplete="off" class="small" id="response-seat-code-input" value="${r.seatCode}" disabled /><input type="text" autocomplete="off" id="response-response-input" value="${r.response}" disabled /><button square id="mark-correct-button"${(r.status === 'Correct') ? ' disabled' : ''}><i class="bi bi-check-circle${(r.status === 'Correct') ? '-fill' : ''}"></i></button><button square id="mark-incorrect-button"${(r.status === 'Incorrect') ? ' disabled' : ''}><i class="bi bi-x-circle${(r.status === 'Incorrect') ? '-fill' : ''}"></i></button>`;
buttonGrid.innerHTML = `<input type="text" autocomplete="off" class="small" id="response-id-input" value="${r.id}" disabled hidden /><input type="text" autocomplete="off" class="small" id="response-segment-input" value="${r.segment}" disabled /><input type="text" autocomplete="off" class="small" id="response-question-input" value="${questions.find(q => q.id == r.question_id).number}" disabled /><input type="text" autocomplete="off" class="small" id="response-seat-code-input" value="${r.seatCode}" disabled /><input type="text" autocomplete="off" id="response-response-input" value="${r.response}" disabled />${((r.status === 'Incorrect') && r.reason) ? `<input type="text" autocomplete="off" id="response-response-input" value="${r.reason}" disabled />` : ''}<button square id="mark-correct-button"${(r.status === 'Correct') ? ' disabled' : ''}><i class="bi bi-check-circle${(r.status === 'Correct') ? '-fill' : ''}"></i></button><button square id="mark-incorrect-button"${(r.status === 'Incorrect') ? ' disabled' : ''}><i class="bi bi-x-circle${(r.status === 'Incorrect') ? '-fill' : ''}"></i></button>`;
document.querySelector('.responses .section').appendChild(buttonGrid);
if ((r.status === 'Invalid Format') || (r.status === 'Unknown, Recorded')) document.querySelector('.awaitingResponses .section').appendChild(buttonGrid);
var trend = trendingResponses.find(t => (t.segment === r.segment) && (t.question_id === r.question_id) && (t.response === r.response) && (t.status === r.status));
Expand Down
2 changes: 2 additions & 0 deletions src/design.css
Original file line number Diff line number Diff line change
Expand Up @@ -129,6 +129,8 @@ input:disabled,
select:disabled {
opacity: 0.5;
cursor: not-allowed;
overflow: auto;
pointer-events: auto;
}

.drag {
Expand Down

0 comments on commit 3171153

Please sign in to comment.