To prepare for some QoL improvements in the frontend (displaying all documents sorted by their type from the get go) we require all data to contain a valid document type field. Thus the API should implement this requirement in the backend.
Additionally, new subfields for exams should be added for Spring and Autumn exams, so that they can be displayed sorted as well.
Edited
Designs
Child items
...
Show closed items
Linked items
0
Link issues together to show that they're related.
Learn more.
Johannes Zumthurmchanged title from Make the type of a document a necessary field for the Study Documents to New necessary fields for the Study Documents·
Imported
changed title from Make the type of a document a necessary field for the Study Documents to New necessary fields for the Study Documents
Could you provide some additional detail on how you would imagine this? Studydocs can contain a list of files of any type, and they already provide their document types in the content_type field.
Let's say we have a study doc like this one (shamelessly plugging my own stuff haha). It contains multiple pdfs, and a zip file.
The current API response of this document looks like this (I have removed the metadata).
Good morning Alex :)
Thanks for the fast reply! What I meant was the requirement to fill out the "Type" field (Exam, PVK, Exercises, Lecture Documents) when uploading new documents. The only field required atm when uploading something is a title and the files themselves (https://api.amiv.ethz.ch/docs#tag/Study-Document/paths/~1studydocuments/post). We want to display the documents sorted by type, meaning first all exams, then all PVK materials, then all summaries etc., such that lazy students (which there are a lot of haha) find what they need more easily without including the type they're searching for in the query (which they obviously could, but I got some negative feedback that students couldn't find the exams they searched for, obviously not using the query feature).
Ah, so just to make sure: You don't want any extra field, you just want the type field to be required?
And one more question: How do you image the "sub-fields" for exams? We do not really have a concept of sub-fields. Should we remove the option exam and add spring exam and autumn exam? Or should we also keep the generic exam as well?
Yes exactly, same fields, just required instead of voluntary :)
For the exams, splitting them up into autumn and spring should work, as long as that does not interfere with the already uploaded documents. Would they still retain the basic exam type?