Commit Graph

10 Commits

Author SHA1 Message Date
Jakub Zych
ef38b81fd9 fix: close expired test attempts at the attempt limit 2026-11-09 15:30:51 +01:00
Jakub Zych
c6d8d1a973 feat: edit quiz questions over MCP
- quizzes_create_question, update_question, delete_question and
  reorder_questions on /api/v1/quizzes/{slug}/questions
- update_question replaces answers by id (kept, created, deleted), so
  answer ids stored in past attempts stay valid; foreign ids are refused
- classes.CheckQuestion holds the importer's per-question rules, shared
  with the manage routes; attempt scores are never touched (D-16)
2026-11-09 14:33:56 +01:00
Jakub Zych
4a60eda425 feat: create, publish, import and report on quizzes over MCP
- quizzes_create_quiz, update_quiz, delete_quiz (confirm repeats the
  slug), publish, unpublish, import_quiz (the existing import route) and
  quiz_stats on new manage routes
- stats close expired open test attempts first, then report per student
  over completed whole-quiz attempts and per question over every
  completed attempt
- input is checked before the database; TestManageAPIAgainstDatabase is
  written and skipped under -short
2026-11-09 14:30:31 +01:00
Jakub Zych
e615cc88db feat: list and show quizzes over MCP for their owner
- quizzes_list_quizzes and quizzes_show_quiz bound to GET /api/v1/quizzes
  and /api/v1/quizzes/{slug} behind user.api_token, the per-user
  golem15.quizzes.manage throttle, a scope and the access_quizzes permission
- the permission is grantable through pact.HasFrontendPermissions
- owner JSON shapes with solutions in manage_json.go, never used by a
  student route
2026-11-09 14:25:07 +01:00
Jakub Zych
487d573208 feat: enforce attempt limits, time limits and one-way tests
- Service.Start resumes an open test attempt, closes expired ones at
  their deadline and refuses a start past max_attempts under an
  advisory lock; StartAttempt stays as a wrapper
- answers to a test are accepted until the deadline plus
  golem15.quizzes.test.grace_seconds; one_way answers are final
- a test covers the whole quiz and keeps a stable per-attempt order
- 409 bodies carry a code; list and attempt rows carry attempts_left,
  question_types and seconds_left; import accepts the test keys
2026-11-09 14:07:37 +01:00
Jakub Zych
6c6ecae9d8 feat: add test mode to quizzes and withhold its solutions
- mode, navigation and max_attempts columns with Go-side defaults
- classes.Withheld gates every solution field of the answer feedback
  and the attempt result while a test attempt is open
- a test's quiz detail lists no questions before the attempt starts
- admin fields and lang keys for the three settings
2026-11-09 14:03:34 +01:00
Jakub Zych
d05bee4e50 feat: add the quizzes:import command for JSON quiz files 2026-10-02 14:20:33 +02:00
Jakub Zych
effe640549 feat: serve the quiz API under /_quizzes/api/v1 behind jwt.auth 2026-10-02 14:13:30 +02:00
Jakub Zych
4d4da5dc14 feat: score single, multiple and self-check answers with configurable partial credit and penalty 2026-10-02 14:05:41 +02:00
Jakub Zych
a01a75d49b chore: scaffold the plugin with summer make:plugin 2026-10-02 13:57:17 +02:00