fixes for fileupload question type

This commit is contained in:
adam j hartz 2025-12-29 00:17:56 -05:00
commit b6a3338c55
Signed by: hz
GPG key ID: B63A0A59F5C82493
2 changed files with 6 additions and 2 deletions

View file

@ -30,6 +30,8 @@ _(Work toward next release. Currently under development.)_
* Fixed visual jitter from varying character widths in the countdown timer when
`cs_auto_lock = True` is set
* Fixed `fileupload` question type so that it respects `cs_upload_management`
**SECURITY**
* Fixed issue that allowed access to `list_users` API endpoint in some cases

View file

@ -38,11 +38,13 @@ defaults.update(
def handle_submission(submissions, **info):
o = {"score": 0.0, "msg": "", "rerender": True}
name = info["csq_name"]
ll = submissions.get(name, None)
ll = submissions.get(name, {"type": "raw", "data": ""})
if ll is not None:
if "data" not in ll:
submissions = submissions.copy()
submissions[name] = ll = ll.copy()
ll["data"] = info["csm_cslog"].retrieve_upload(ll["id"])[1]
o.update(base["handle_submission"](submissions, **info))
o.update(base["handle_submission"](submissions, **info))
return o