Add instructions field to quiz and matching item types
Instructions are optional free text shown to the student above the questions/word bank. Admin enters them in the item editor; stored in items.body for quiz and matching types. Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
This commit is contained in:
1 parent
f9cc515cec
commit
60bfe3ca4a
5 files changed
+35
-4
No files matched your search
@@ -771,6 +771,9 @@ async function openQuiz(itemId, forceRetake = false) {
|
||||
const item = await api(`/api/items/${itemId}?studentId=${currentStudent.id}`);
|
||||
$('#quiz-kicker').textContent = `${item.course_name} · ${item.unit_name}`;
|
||||
$('#quiz-title').textContent = item.title;
|
||||
const instrEl = $('#quiz-instructions');
|
||||
if (item.body) { instrEl.textContent = item.body; instrEl.hidden = false; }
|
||||
else instrEl.hidden = true;
|
||||
const graded = !forceRetake && item.submission && item.submission.status === 'graded';
|
||||
const result = $('#quiz-result');
|
||||
|
||||
@@ -865,6 +868,9 @@ async function openMatching(itemId, forceRetake = false) {
|
||||
const item = await api(`/api/items/${itemId}?studentId=${currentStudent.id}`);
|
||||
$('#quiz-kicker').textContent = `${item.course_name} · ${item.unit_name}`;
|
||||
$('#quiz-title').textContent = item.title;
|
||||
const instrEl = $('#quiz-instructions');
|
||||
if (item.body) { instrEl.textContent = item.body; instrEl.hidden = false; }
|
||||
else instrEl.hidden = true;
|
||||
const graded = !forceRetake && item.submission && item.submission.status === 'graded';
|
||||
const result = $('#quiz-result');
|
||||
|
||||
|
||||
Reference in new issue
Block a user