uzh / marugoto

Marugoto: eLearning Framework for Story Telling
GNU General Public License v2.0
8 stars 6 forks source link

uploadExercise component not showing in Notebook #72

Closed martindusinberre closed 4 years ago

martindusinberre commented 4 years ago

In OurTestTopic 1.1.7.2.1, I have included an uploadExercise json file. The frontend display is good and the upload itself seems to be registered, but if it's an image file it doesn't display properly in the notebook, nor in the downloaded PDF. Is this something that can be fixed quite quickly or does it involve more time-consuming development? Connected to this: if you do end up doing more development work on the uploadExercise, could you change the notebook entry from "My Output" to "My Upload"?

martindusinberre commented 4 years ago

If this is a lot of work to fix, the work-around would be that we simply don't use the uploadExercise functionality. But that seems a bit of a pity after you've developed it. We can talk about this if it's easier.

christian-bernet commented 4 years ago

The idea from me was to handle all the uploaded files the same way. So in the notebook you see the name of the file and if you download the zip from the game state you get this files too.

so, what we can easily can is:

@martindusinberre should we change it like this?

martindusinberre commented 4 years ago

Hi Christian: OK, so if you download the PDF of the Notebook you'll see the uploaded file in the Appendix, for example? I'm just wondering if we have a problem if a player uploads, say, a 40-page PDF file. What do you think? Should we add a note saying "images only"? Or leave it entirely free? Do we have an upper limit (eg 3MB) for files? What do you think?

interrogator commented 4 years ago

Recommend you just get it working for one format and max size (JPG under 2mb) or whatever, and then specify the constraint. It's very hard to get all kinds of formats displaying correctly, when you don't know even know what they could be!

christian-bernet commented 4 years ago

PDF changed Label to "My Upload:" before file name! commit: 5e33f978

christian-bernet commented 4 years ago

@zlaxi please change label for UploadExercise in Notebook to "My Upload" instead of "My Output"

christian-bernet commented 4 years ago

@martindusinberre we do not have the time to link the icon in the notebook. But the label changes we will be do.

martindusinberre commented 4 years ago

@christian-bernet Thanks for the update. When do you think the changes will be finished? (It just depends whether I include this functionality in our "trailer" demo) And just to confirm: this means that the player will see an icon in their notebook that they have uploaded a file (under "My Upload"), but no link from the icon. And then, when they download the Zip folder with their notebook at the end of the game (or in the middle), the file they've uploaded will be also in that folder--be it .pdf or .jpg or whatever. Is that right?

christian-bernet commented 4 years ago

@martindusinberre yes. Exactly. That is already done and works like this. Only to change the label is open. And we will do that on Monday.

martindusinberre commented 4 years ago

Perfect, thanks for the update.

zlaxi commented 4 years ago

change uploadExercise label to My Upload

https://github.com/uzh/marugoto-frontend/commit/55f3944b3ec38a069df09e853a0b108687c2e0fd

christian-bernet commented 4 years ago

Both label are now updated.

martindusinberre commented 4 years ago

@christian-bernet May I just check: when I downloaded an uploaded .jpg file at the end of playing the OurTestTopic, it gave the file name jpg.pdf It seems, therefore, as if all files in the zip folder are being converted to PDFs when they are downloaded. So the question: does this mean that anyone uploading, say, an mp3 file would not be able to hear it in the zip folder? --> is it possible for uploaded files to be downloaded in the zip folder in the same format that they're uploaded? Or is that too complicated?

martindusinberre commented 4 years ago

Just for your reference:

Screen Shot 2019-10-21 at 14 13 21

And, with the file extension jpg.pdf, I was actually unable to open the uploaded file.

christian-bernet commented 4 years ago

That is a bug. The uploaded file should stay in the format with which it was uploaded.

christian-bernet commented 4 years ago

fixed with: d1c58fbc

martindusinberre commented 4 years ago

Thank you, Christian.