Skip to content

Add likert_question type: survey matrix of radio buttons#98

Draft
acbart with Copilot wants to merge 3 commits into
masterfrom
copilot/add-quiz-editor-feature
Draft

Add likert_question type: survey matrix of radio buttons#98
acbart with Copilot wants to merge 3 commits into
masterfrom
copilot/add-quiz-editor-feature

Conversation

Copilot AI commented May 5, 2026

Copy link
Copy Markdown

Adds a new likert_question type — a matrix where multiple statements share a common scale, each answered via a radio button row.

Data format

Instructions:

{
  "type": "likert_question",
  "statements": ["I enjoy Python.", "Tests are useful."],
  "options": ["Strongly Disagree", "Disagree", "Neutral", "Agree", "Strongly Agree"],
  "points": 2
}

Checks (optional — omit correct entirely for survey/always-correct mode):

{
  "correct": {"0": "Agree", "1": "Strongly Agree"},
  "wrong_any": "Some selections were unexpected."
}

Student answer: {"0": "Agree", "1": "Neutral"} (string-keyed dict, one entry per statement)

Changes

  • questions.ts — adds likert_question to QuizQuestionTypes; student state is a {[index]: ko.Observable<string>} dict (same pattern as multiple_dropdowns_question)
  • quizzes.py — grading branch: partial credit (correct / total); no correct key = survey mode, always full credit
  • questions_ui.html<table> with option column headers, one radio-button row per statement; binds checked to student[String(statementIndex)]
  • quiz_editor_state.ts — adds likert_options, likert_correct, likert_wrong_any fields; toInstructionsJson/toChecksJson serialise correctly; addStatement/removeStatement keep likert_correct in sync
  • quiz_editor_ui.html — editor form: statement list, scale options list, per-statement correct-answer dropdown (leave blank = survey mode)
  • tests/test_quiz_grading.py — 8 new tests covering all-correct, all-wrong, partial credit, wrong_any feedback, survey mode, empty/partial student answers
  • quiz_schema.md — documents format, grading rules, and survey mode

Copilot AI changed the title Add visual quiz editor for instructors + fix KnockoutJS bugs + comprehensive tests Add likert_question type: survey matrix of radio buttons Jul 1, 2026
Copilot finished work on behalf of acbart July 1, 2026 15:32
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