minnojs / minno-dashboard

Client-side of minno’s study management and authoring tool
1 stars 2 forks source link

Study Editor: Running a questionnaire after renaming a file #26

Closed baranan closed 8 years ago

baranan commented 8 years ago

In a study shared with me with a write permission, I renamed a questionnaire and modified the code. When I clicked play to see the questionnaire, I kept seeing the previous version of the file.

I thought that perhaps this a rename problem, so I tried to rename it to the old file name. After renaming the file just couldn't run. So, I tried t rename the file back and got this error: image

This is the study: https://app-prod-03.implicit.harvard.edu/implicit/showfiles.jsp?user=danielleh&study=ease.manhood And this is the file: https://app-prod-03.implicit.harvard.edu/implicit/user/danielleh/ease.manhood/exphomo.js In the Dashboard, the name of the file is expHomo.js, but in the showfiles link above, it is exphomo.js. I think the file used to have the name expHomo.js, which I renamed to exphomo.js, and when I had the problem described above I renamed back to expHomo.js, and now I just can't rename the file anymore.

If it is related, again, to renaming files and how the system knows what the name of the file is, perhaps there is something wrong in the logic you use.

eladzlot commented 8 years ago

This seemed to be a cache error. I disabled cache for scripts (You may need to clear cache once for the change to take place).

I have a faint recollection that this has caused us problems in the past but I couldn't reproduce any of them.

baranan commented 8 years ago

I do not think it is a cache issue.

I cleared the cache, updated a questionnaire, and Play did not use the file I just updated: https://app-prod-03.implicit.harvard.edu/implicit/user/danielleh/ease.manhood/exphomo.js

I thought it is related very specifically to a renaming issue because I haven't had similar problems with other files.

Indeed, I just tried it with another questionnaire file and any edit I made was updated immediately and I could see it: https://app-prod-03.implicit.harvard.edu/implicit/user/danielleh/ease.manhood/exp2racism.js

With the file that had the rename saga, I updated, the new version is saved, and still the changes are not shown.

To make sure that it is a problem with that specific file, I created a new empty file in the same study, copied the content of the problematic file, run it fine. Modified it and played it again, and the modifications appear immediately.
https://app-prod-03.implicit.harvard.edu/implicit/user/danielleh/ease.manhood/test.js

So, I still guess it is an issue related to how files are identified in the system, somehow related to the renaming of that specifi file.

Yoav

eladzlot commented 8 years ago

Turns out the problem happens only when renaming files to have uppercase letters in them.

There was a request a while ago that we disallow creating files with uppercase letters. This feature was very partially implemented, so every time you try to save or create a file with uppercase letters, it gets save with lowercase letters. The server does not currently warn of this change, and the client does not validate and communicate this change to the users. At this point in time it is trivial to roll this feature back. And it is not clear what needs to be done in order to complete it.

For now, @baranan asked for us to roll back this change. I created a new issue #28 to deal with uppercase characters in file names.

ronenno1 commented 8 years ago

Done.