INGInious
INGInious copied to clipboard
Webapp : Prevent the concurrent edition of task.yaml from the GUI
Task edition in different browser tabs is problematic - You can't edit the basic settings and subproblems in parallel a as changes made in one tab will override changes in the other (which is logical given that both information are in the same file).
GitHub uses websockets to detect multiple tabs from the same user/browser. This could be used to implement a simple locking mechanism, or preventing multiple editor tabs.
For now, websockets are not available in both lighttpd (https://redmine.lighttpd.net/boards/3/topics/4782) and web.py.
What we can do is to check periodically if the original file changed, and to force a refresh, discarding changes that are "now outdated".
What we could do is to check which are the field that changed, and update only those fields
Even though, this is only a partial solution. A warning could be nice when editing the same field. And this also occur when editing different files ! For example : A edits the run file, at the same moment B edits the context (ie, the task.yaml). => the last one to save will override the other modifications