Upload Hotpot file using drag and drop

Re: Upload Hotpot file using drag and drop

by Gordon Bateson -
Number of replies: 1
Picture of Core developers Picture of Peer reviewers Picture of Plugin developers

Hello Florian,
You ask an interesting question. Thank you!

I looked at the Moodle code, and discovered that it is possible!
For my future reference, I will note here that we need to add the following two functions to "mod/hotpot/lib.php":

  • hotpot_dndupload_register()
  • hotpot_dndupload_handle($uploadinfo)

For examples of how these functions operate, have a look at how the following modules handle drag-and-drop:

  • mod/page/lib.php
  • mod/folder/lib.php
  • mod/label/lib.php
  • mod/url/lib.php
  • mod/scorm/lib.php
  • mod/resource/lib.php

I don't know when I will be able to do this, but if you can find some funding, that will speed up the process.

Kins regards,
Gordon

In reply to Gordon Bateson

Re: Upload Hotpot file using drag and drop

by Florian Bayer -

Hello Gordon,

I'm glad that it would be possible to enable the drag and drop for HotPot files and I'm happy because of your fast and positive reaction.

(As I don't know a lot of PHP, I don't understand well the scripts...)

I can add a new entry for crowd funding on "https://moodle.org/mod/data/view.php?id=8090#_=_", if you mean this. But - although I don't think that it would be a lot of work to do - I don't know how much work it will be and which price to put...

Kind regards,
Florian

(P.S.: I'm new on this forum and still don't know well how everything works her. I just used the moodle of my school before.)