learn-ocaml icon indicating copy to clipboard operation
learn-ocaml copied to clipboard

Hide exercises by default

Open VLanvin opened this issue 7 years ago • 5 comments
trafficstars

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.

VLanvin avatar Oct 15 '18 12:10 VLanvin

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 ?

AltGr avatar Oct 16 '18 09:10 AltGr

ping @yurug

AltGr avatar Nov 05 '18 16:11 AltGr

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:

  1. 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.

  2. 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?

yurug avatar Nov 05 '18 22:11 yurug

Hi! I know this issue is old, but here's an idea: What about having a field in the meta.json of each exercise?

hannelita avatar Oct 02 '20 23:10 hannelita

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.

yurug avatar Oct 03 '20 19:10 yurug