Closed pjritee closed 9 years ago
What we were thinking as a compromise was to show the login menu on start, but not show the message window if you cancel; see #63.
For synchronisation purposes we really want all students to log on all the time, or they could end up overwriting work (by editing a local copy which is later synchronised to the server).
I was actually toying with the idea of requiring students to log in (see #41), as practically everyone has an 'always on' internet connection.
I have sympathy for that position - what if a student is working on MPT on the train/bus?
I think we could get away with requiring an internet connection, so long as the expectation is set for students at the start. There are other assessment pieces that are online only, such as blackboard quizzes.
Perhaps we could have an offline mode where you are told which local files are newer than those on the server (and possibly compare them somehow) when you then login.
I haven't looked at the code but how does the sync work - if it was done like, say, unison then we could show when there is a conflict between server files and local files. Maybe this is a TODO idea - for this semester we could just make it clear to students that this could be a problem. I notice the sync is reasonably slow - is it going to be a problem if several students do a sync at the same time - e.g. at the beginning/end of a prac session?
The whole idea is that there should never be a conflict between the server and the local files; the student should log in (and thus sync) at the start, and then sync the files back when MPT is closed. Check out the documentation for TutorialApp.synchronise
to see the actual logic.
I can speed it up pretty easily. It's currently doing each tutorial synchronously; all I need to do is make it work async, with a bunch of threads. I might repurpose this issue to do that, actually.
A conflict can arise if the user is allowed to be in "local mode"
Yes, but only if they've also worked on another computer. Seeing as the default logic is always to take the newest file, it doesn't matter how often they work locally if they only have a single MPT install.
Conflicts basically occur in one of two situations:
I don't think you'll be able to entirely avoid sync conflicts. If students choose not to log in, or if they are working without an internet connection, or simply edit the local files outside of the MPT environment, you have a conflict.
On Thu, 5 Feb 2015 08:28 Sean Purdon notifications@github.com wrote:
The whole idea is that there should never be a conflict between the server and the local files; the student should log in (and thus sync) at the start, and then sync the files back when MPT is closed. Check out the documentation for TutorialApp.synchronise to see the actual logic.
I can speed it up pretty easily. It's currently doing each tutorial synchronously; all I need to do is make it work async, with a bunch of threads. I might repurpose this issue to do that, actually.
— Reply to this email directly or view it on GitHub https://github.com/CSSE1001/MyPyTutor/issues/72#issuecomment-72943089.
It still seems to take a long time to sync. My home internet connection is sometime a bit slow and last time I shut down it took ages to finish the shutdown sync
Maybe it's to do with the 'Unknown' problems????
In my testing on decent internet connections, the sync process is quite fast (well under 5-10 seconds, and often instant).
One possibility would be to add a timeout, but that's just asking for inconsistent sync data. I'd really rather not do that. People can ctrl+c out if they're that desperate to close things down.
I'm an idiot. The code wasn't actually async (had the classic typo).
I'll push a hotfix in the very near future.
I confirm that the sync is MUCH faster :)
Actually, it's much faster because I broke it completely. I shouldn't have made the change before my coffee. I'll revert it in a sec.
Sadly, that means that our previous performance is about as good as we can hope for. Bugger. Sorry to get your hopes up.
When I start MPT I get a login window and if I press cancel (because I don't want to log on) I get a message window - it should just let me do local work. I guess, given the syncing of student work it probably makes sense to be more "permanently connected" but I am 50-50 about the default start up being to pop up a login box or to start without that and then select the login menu.