Sequencing of a question paper
Question paper needs to be sequenced. Have a Go-live/ Start date and a Live-Until/ End date. These are required to ensure that the Question paper can be prepared and published beforehand and will only be shown to students only after the start date and until the end date.
Approach 1:
This is configured as a property for the collection/ question set
The API sends all the Question papers in the search API
It will be the job of the frontend to identify the active/live question papers and show it to the users
Approach 2:
This is configured as a property for the collection/ question set
The API sends only a filtered list of question papers (Filtered for active; the date of request lies between the dates of Start and end date of question paper) relevant Question papers in the search API
The front end is dumb and shows whatever the API returns
@Saket Sinha - Approach 2 is ok but with a slight change. API should not completely filter out the inactive question papers, it should return only basic info of question papers which are not active (may be based on a filter in the search request). Front end should use this info to show that the question paper will go live on XYZ date using the data returned by the API.
This behaviour should be there in both search and read APIs. And as with everything else, this behaviour should be applicable for all assets, and not just question papers.