Posts made by Simon Coggins

I'm pleased to report that Open Badges has been integrated into Moodle in time for the 2.5 release (the next major release).

Now that it is part of core Moodle it has it's own discussion forum:

https://moodle.org/mod/forum/view.php?id=8085

So I'd encourage you to subscribe and post any new questions or ideas there.

Simon

 

I'm pleased to report that Open Badges has been integrated into Moodle in time for the 2.5 release (the next major release).

Now that it is part of core Moodle it has it's own discussion forum:

https://moodle.org/mod/forum/view.php?id=8085

So I'd encourage you to subscribe and post any new questions or ideas there.

Simon

 

What's the best setting for the $forcedownload argument when calling send_stored_file() from within a module's xxx_pluginfile() call? In the Moodle code there are three different examples:

Explicitly set to false (e.g. mod/scorm/lib.php):

send_stored_file($file, $lifetime, 0, false, $options);

Explicitly set to true (e.g. mod/data/lib.php):

send_stored_file($file, 0, 0, true); // download MUST be forced - security!

Use the $forcedownload parameter passed into the *_pluginfile() call (e.g. mod/workshop/lib.php):

send_stored_file($file, 0, 0, $forcedownload, $options);

Is there a "correct" way to do this or does it depend on the source of the file being downloaded? What is the security risk mentioned in the comment for the second one?

Simon

Average of ratings: -

It should be possible to backport our work to 2.4. You would need to use a version control system to generate a diff between our code and the version of Moodle it is based on. You could then apply that against a stable Moodle release (fixing any conflicts due to changes to Moodle between 2.4 and 2.5). I don't think it would be too hard since most of the badges code is independent from Moodle.

The advantage of backporting is that you would avoid having to build something for yourself, and would get any ongoing updates and bug fixes for free. You could also contribute back any bug fixes or improvements you make. On the down side, if we have to make any significant changes to get our code into Moodle you may have some work to merge your branch with the new version when it eventually makes it into Moodle.

Hope that helps,

Simon