Skip to content

Improve exam question presentation for categories and code tracing content - #167

Merged
kristofer merged 3 commits into
mainfrom
copilot/fix-exam-question-formatting
Jun 11, 2026
Merged

kristofer merged 3 commits into
mainfrom
copilot/fix-exam-question-formatting

Conversation

Copilot AI commented Jun 11, 2026 •

Copy link
Copy Markdown

Exam questions were missing category context and code-tracing prompts were rendered as flattened text in both the active exam view and the post-exam review. This updates the exam presentation path so question metadata and code content are shown in a readable, exam-ready format.

  • Question metadata

    • Add a per-question category label to the exam start payload.
    • Render the category as a pill next to the question number in:
      • exam-taking view
      • post-exam breakdown view
    • Use the topic display name as the user-facing category label, with fallback behavior if topic data is unavailable.
  • Code block rendering

    • Replace inline escaped question text rendering with structured question content rendering.
    • Parse fenced code blocks and render them as <pre><code> blocks so tracing questions preserve line breaks, indentation, and monospace formatting.
    • Keep non-code prompt text rendered separately from code blocks so mixed prompts display cleanly.
  • Review view parity

    • Reuse the same question content renderer in the results breakdown so post-exam review matches the in-exam presentation instead of degrading code prompts into plain text.
  • API coverage

    • Extend the exam API test to assert that question category data is returned in the start-exam response.
{
  "id": 11,
  "question_text": "What value is printed?\n\n```java\nint[] arr = {1, 2, 3, 4, 5};\n...\n```",
  "category": "Java Code Tracing"
}

Copilot AI changed the title [WIP] Fix exam question formatting and display issues Improve exam question presentation for categories and code tracing content Jun 11, 2026
Copilot AI requested a review from kristofer June 11, 2026 17:36
@kristofer
kristofer marked this pull request as ready for review June 11, 2026 17:58
@kristofer
kristofer merged commit 90b8487 into main Jun 11, 2026
2 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants