learn-ocaml
learn-ocaml copied to clipboard
Hide exercises by default
Currently, when new exercises are added to the server, they are immediately considered as "open" and are available to the students. It would be nicer if they were hidden by default, especially if they are still being worked on.
That would be an easy change, but I am not sure how well it would fit the different use-cases (e.g. some users prefer to work by assignments, while others keep all exercises open). @yurug, what is your opinion on this ? Should this be a configuration option ?
ping @yurug
If I remember correctly, here is the use-case that motivates the initial status of exercises to be "open" : when a teacher is developing a new exercise on his local machine, he wants the exercise to be open and not having to make it open before testing it.
When the new exercise is deployed in production, it indeed makes sense not to make it open by default.
I suggest the following:
-
We add a configuration file so that the initial status of new exercises is defined explicitely by the teacher. Then, the teacher could have two distinct configuration files, one for development on his personal machine, and one for deployment on the server. That is what @AltGr is proposing if I am correct.
-
As managing configuration files is not as easy as we think, especially for non-geek users, we should also have a default behavior that works well when there is no configuration file. We say that the initial status of new exercises is always "closed" if there is no configuration file and we add an option to the learn-ocaml executable to run it in a "exercise development mode" that makes all exercises open by default.
What do you think?
Hi! I know this issue is old, but here's an idea:
What about having a field in the meta.json of each exercise?
Thank you for this suggestion. This looks like a simple solution to this issue.
I will investigate if that is easily feasible to interpret such a field in the component dealing with access control.