feat: add open questions with a pending grading state

- migration: open question type, rubric, max_length, quiz grader and
  the grading and review columns of attempt answers
- open answers are checked, stored as pending and never scored on
  answer; a changed text resets the grading state
- student JSON gains text, grading_status, grader_feedback,
  review_comment, max_length, needs_review and open_answers; the
  rubric is never serialized
This commit is contained in:
Jakub Zych
2026-11-09 17:48:11 +01:00
parent ef38b81fd9
commit 297780cb8e
19 changed files with 893 additions and 48 deletions

View File

@@ -43,8 +43,8 @@ func TestPluginActivates(t *testing.T) {
if len(migrations) == 0 {
t.Fatal("no migrations")
}
if got := migrations[len(migrations)-1].ID; got != "20261109120000_add_test_mode_to_quizzes" {
t.Errorf("last migration = %s, want 20261109120000_add_test_mode_to_quizzes", got)
if got := migrations[len(migrations)-1].ID; got != "20261109180000_add_open_questions_and_grading" {
t.Errorf("last migration = %s, want 20261109180000_add_open_questions_and_grading", got)
}
if app.Config.Bool("golem15.quizzes.scoring.multiple_partial") {
t.Error("scoring.multiple_partial defaults to true, want false")