INGInious icon indicating copy to clipboard operation
INGInious copied to clipboard

Webapp : Prevent the concurrent edition of task.yaml from the GUI

Open vvandenschrieck opened this issue 8 years ago • 4 comments

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

vvandenschrieck avatar Aug 17 '16 09:08 vvandenschrieck

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.

layus avatar Aug 17 '16 09:08 layus

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

GuillaumeDerval avatar Aug 17 '16 10:08 GuillaumeDerval

What we could do is to check which are the field that changed, and update only those fields

GuillaumeDerval avatar Aug 17 '16 19:08 GuillaumeDerval

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

ogoletti avatar Jan 10 '19 09:01 ogoletti