diff --git a/physics/templates/physics/exam_take.html b/physics/templates/physics/exam_take.html index ec90c304..cf5baa08 100755 --- a/physics/templates/physics/exam_take.html +++ b/physics/templates/physics/exam_take.html @@ -49,107 +49,7 @@

Questions

- - - - {% include "physics/exam_take_help.html" %} @@ -375,37 +275,6 @@ // The view sets an `HX-Trigger` header named `saved` when an HTMX save occurs. document.addEventListener('saved', function(evt){ try { - // Prefer toastr if available - if (typeof toastr !== 'undefined' && toastr && typeof toastr.success === 'function') { - toastr.success('Saved'); - return; - } - - // Lightweight fallback toast - const id = 'htmx-save-toast'; - let el = document.getElementById(id); - if (!el) { - el = document.createElement('div'); - el.id = id; - el.style.position = 'fixed'; - el.style.top = '1rem'; - el.style.right = '1rem'; - el.style.zIndex = 2000; - el.style.padding = '0.6rem 0.9rem'; - el.style.background = 'rgba(40,167,69,0.95)'; - el.style.color = '#fff'; - el.style.borderRadius = '0.4rem'; - el.style.boxShadow = '0 2px 8px rgba(0,0,0,0.2)'; - el.style.fontWeight = '600'; - el.style.opacity = '0'; - el.style.transition = 'opacity 220ms ease-in-out'; - document.body.appendChild(el); - } - el.textContent = 'Saved'; - // show - requestAnimationFrame(function(){ el.style.opacity = '1'; }); - // hide after 1.6s - setTimeout(function(){ el.style.opacity = '0'; }, 1600); // Update the question list state locally so the menu reflects answered questions try { var pos = (typeof window.currentQuestionPos === 'number') ? window.currentQuestionPos : (document.getElementById('question-number') ? parseInt(document.getElementById('question-number').textContent, 10) - 1 : NaN); @@ -423,4 +292,105 @@ } catch (e) { console && console.error && console.error(e); } }); + + + + {% endblock %} diff --git a/physics/templates/physics/partials/exam_take_overview_fragment.html b/physics/templates/physics/partials/exam_take_overview_fragment.html index 79742fef..675abf0e 100644 --- a/physics/templates/physics/partials/exam_take_overview_fragment.html +++ b/physics/templates/physics/partials/exam_take_overview_fragment.html @@ -4,25 +4,25 @@
    - {% for q, ans in question_answer_tuples %} -
  1. -
    - -
    {{ q.stem|truncatechars:140|safe }}
    -
    - {% if ans %} - {% if ans.a or ans.b or ans.c or ans.d or ans.e %} - Answered + {% for q, ans in question_answer_tuples %} +
  2. +
    + +
    {{ q.stem|truncatechars:140|safe }}
    +
    + {% if ans %} + {% if ans.a or ans.b or ans.c or ans.d or ans.e %} + Answered + {% else %} + Unanswered + {% endif %} {% else %} Unanswered {% endif %} - {% else %} - Unanswered - {% endif %} +
    -
- - {% endfor %} + + {% endfor %} @@ -31,38 +31,41 @@ diff --git a/sbas/templates/sbas/exam_take.html b/sbas/templates/sbas/exam_take.html index b964702a..fdaaca02 100755 --- a/sbas/templates/sbas/exam_take.html +++ b/sbas/templates/sbas/exam_take.html @@ -36,7 +36,7 @@
@@ -60,7 +60,7 @@