Draft
Add likert_question type: survey matrix of radio buttons#98
Conversation
Agent-Logs-Url: https://github.com/blockpy-edu/blockpy-server/sessions/ac8edbd5-522e-4d04-85c1-bafaab5c3c1b Co-authored-by: acbart <897227+acbart@users.noreply.github.com>
Agent-Logs-Url: https://github.com/blockpy-edu/blockpy-server/sessions/ac8edbd5-522e-4d04-85c1-bafaab5c3c1b Co-authored-by: acbart <897227+acbart@users.noreply.github.com>
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
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Adds a new
likert_questiontype — 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
correctentirely 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— addslikert_questiontoQuizQuestionTypes; student state is a{[index]: ko.Observable<string>}dict (same pattern asmultiple_dropdowns_question)quizzes.py— grading branch: partial credit (correct / total); nocorrectkey = survey mode, always full creditquestions_ui.html—<table>with option column headers, one radio-button row per statement; bindscheckedtostudent[String(statementIndex)]quiz_editor_state.ts— addslikert_options,likert_correct,likert_wrong_anyfields;toInstructionsJson/toChecksJsonserialise correctly;addStatement/removeStatementkeeplikert_correctin syncquiz_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_anyfeedback, survey mode, empty/partial student answersquiz_schema.md— documents format, grading rules, and survey mode