Consider this a helper type class. At certain times during our process, we'd like to be able to download the remote resource and put it in temp storage (for use in subsequent steps). Some examples:
If the file is a backup, we want to download this prior to starting the restore, but after confirming the user's intent to do so.
If the file is an image, we want to postpone file download until the user has confirmed their intent to import the file into a specific course section.
Note: Licenses are deemed to follow the same rules as other files in Moodle. A must have a license set by the teacher/content creator, when that file is used in Moodle. In our case, this is when the import is complete, and is something which should be achieved through existing UI elements. Nothing specific is required to facilitate this in this issue.
See also: Moodle URL downloader repo - this might provide useful/relevant.
The acceptance criteria for this issue is as follows:
- A new class in admin/tool/moodlenet/classes/local/
- Must support downloading a remote URL to a file area (temp or otherwise), returning relevant handle for the resource, which can then be used for other things.