Skip to content

[issue 7] Add support of additional question types#9

Open
graceQUE03 wants to merge 9 commits intomainfrom
phase2-7
Open

[issue 7] Add support of additional question types#9
graceQUE03 wants to merge 9 commits intomainfrom
phase2-7

Conversation

@graceQUE03
Copy link
Copy Markdown
Collaborator

@graceQUE03 graceQUE03 commented Apr 4, 2026

Changes

Changes are made to both frontend and backend that support for generating multiple types of questions.

Details of Changes

Note: FIB stands for fill-in-the-blank

  • Server (rag-llm, app-constants): Prompts and validation follow question type: MC expects options A–D and letter correctAnswer; FIB expects text correctAnswer, acceptableAnswers, and no options. Normalization handles common LLM mistakes (e.g. loose answer + repair for MC). Stricter JSON-only instructions, retry hints, and more robust JSON extraction from noisy replies.
  • Persistence (question service): Stores questionType and acceptableAnswers; updates support the same fields.
  • Quiz / student APIs: Distinguishes types for transforms and shuffling (MC only); FIB checking via answerText where applicable; avoids treating FIB correctAnswer as an option letter.
  • Client generation (generation-questions, llm-service, direct-ollama-service): Type-specific prompts and exports (CSV / QTI) for both shapes.
  • Question generation page: Groups convert FIB items correctly; step-2 cards show question + correct answer (and acceptable variants) with edit paths for FIB.
  • Question bank: Question type column; View/Edit modal branches on type (FIB vs MC).
  • Settings: Prompt help text updated for dual types.
  • FIB prompt style: Fill-in-the-blank stems as declarative unfinished sentences with a _________ blank (not WH-questions); examples include formula-style items.

Example

  • In Question Generation page, support generating fill-in-the-blank questions. A declarative question with exactly one blank to fill is generated.
image
  • In Question Bank page, all questions are listed with question type.
image
  • When click on 'View/Edit Question' button of a FIB question, question (title), correct answer, and allowed answers are shown.
image

Student side

  • Allow student to type down an answer and grading by clicking on 'Submit Answer' button.
image - Able to grade students' answer against stored correct answer. image - When student submits an incorrect answer for FIB question, displays correct answer at the bottom. image

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.

1 participant