Experiment Projects are dependent on each other by name
Every student at physics needs to complete multiple experiment projects. They cannot complete the same experiment again. Exeperiments are done in rounds, where for each round students give preferences (not very unlike how this should work for technical medicine). To do so, experiments are copied from their originals when the next round starts.
However, the system needs to ensure that a student does not get assigned an experiment they have already done, so a check is done which compares projects by name. If the name is identical to an experiment project the student did in the past, then the experiment project is not made available. Using the name alone for this does not seem to be the best way, as a change in name means that the system no longer recognizes it as identical.
As such, the suggestion is to also use the original_id present in experiment_project to determine when projects are equivalent.
Suggested improvements:
-
Fix original_id to actually link to the originalest (oldest in the chain), rather than in a chain (3->2->1) like it is currently. -
Link projects by their original_id (what they were copied from) or by name -
When the original is deleted (for some reason) set the original_id to the next-in-line rather than losing the relation. -
Show the link explicitly/more explicitly in the admin interface (this project is a copy of "original").
For reference:
-
UserConcerns::Experimentable::available_experiments
determines the experiments available to the user. -
ExperimentProject::other_same_projects
determines the "same" experiments as shown to admin users.