ecampbell / moodle-atto_wordimport

Import Word file contents into Moodle Atto text box
2 stars 7 forks source link

silently fails when importing non-DOCX files #11

Open ndunand opened 8 years ago

ndunand commented 8 years ago

When by mistake trying to import e.g a DOC file (using the filepicker), nothing happens.

It would be good for the user to get some feedback, such as an error message.

ecampbell commented 8 years ago

Hi Nicolas, I agree with you that this is undesirable behaviour. However, technically the plugin is behaving correctly, I think, because there could be a different plugin installed that does process .doc files.

ndunand commented 8 years ago

Hi, I thought the file picker was in this case managed by the atto_wordimport plugin. I mean, the filepicker takes care of the file upload (or selection) agnostically, but then it hands it to the plugin, no? Shouldn't then the plugin refuse the file – which seems to be the case – and display some feedback to the user?

ecampbell commented 8 years ago

Good point. I'd forgotten that. The reason I haven't done this is that I can't figure out how to specify (in code) to the filepicker what file type or types to accept. I had to configure it to accept anything. Any suggestions gratefully received.

ndunand commented 8 years ago

I have no idea about how to achieve this. However, as we're currently reviewing this plugin for inclusion in our LMS, I'd have to look into it if we decided to use it. Of course, I'll let you know if I come up with anything.