feat: restrict user answer compaction to admin users and update related tests

This commit is contained in:
Ross
2026-07-06 09:43:01 +01:00
parent daebdc1844
commit e56c1f2d0f
7 changed files with 53 additions and 45 deletions
+4 -2
View File
@@ -1,6 +1,8 @@
User answer compaction should only be available to admin users and on an exam wide basis.
User answer compaction should only be available to admin users and only on an exam wide basis.
We need to update tests so that they can handle the new format of answer submission from rts: res = client.post(reverse("global_exam_answers_submit"), data=post_json)
We need to update tests so that they can handle the new format of answer submission from rts (although this may actually be due to a bug in the underlying submission code):
res = client.post(reverse("global_exam_answers_submit"), data=post_json)
json_res = json.loads(res.content)
assert json_res["success"] == False
> assert json_res["error"] == "Invalid data"