This is the tracker issue for this:
Ray Morris
Posts made by Ray Morris
We did the same thing previously, checking for the completion of the SCORM. Now that we have a course with multiple SCORMs, we're going to do it "right" by firing from course competion.
BTW I mentioned doing it in the cron script. Taking a second look, I think the right place would be:
lib/completion/completion_completion.php
public function mark_complete
I'm submitting a tracker issue to get feedback from Aaron Barnes, maintainer of the completion module, and other interested parties.
I'm kind of tempted to sprinkle events in a few places within completion - it's job is basically to track completion events, it seems, so it would be good if it raised events, I'm thinking.
I'm somewhat new with Moodle myself, but I'd think an event should be raised within:
lib/completion/cron.php function completion_cron_completions() {
Looks like about 2/3rds of the way into the function it actually marks the completions. Reading the Events API page, it looks like I should be pretty simple to add. I suppose one could add it, then send the proposed code to the author listed at the top of the module for review.
If you do code it, please post your code here as well and / or email me as I'd be interested in helping / reviewing / using that. If you try to add it and run into any questions or prpblems I'd be glad to try to help work through any problems. (I have many years of programming expereince, not much Moodle experience.)
Attached is a patch to allow certificates to be generated in Flash if you prefer that to the existing PDF option. The patch will let Moodle call up your Flash certificate and passes student and course data such as student name, etc. The actual Flash swf is not included in this patch - you get to design your own.
For those not familiar with the "patch" format, on Mac, Linux, and other POSIX systems you can use the program "patch" to merge in this functionallity with whatever version of the certificate module you may be using. On Windows, TortoiseMerge can be used.
The maintainer of the certificate module has indicated he may add this to the default download of the certificate module if there is enough interest, so if this is of interest to you please indicate so.
It looks like I'm going to be doing a lot of Moodle development as part of my new job, so I thought I'd introduce myself. My name is Ray Morris and I'm helping the Texas Engineering Extension Service transition to Moodle. I expect we'll be contributing a fair number of modules and patches. Though I have fifteen years of web development experience, I'm new to Moodle development, so I'm trying to become familiar with the system and the culture.
I'm seeing that we'll need to add more features to the Moodle core than I had expected. Already some of the tasks we needed to do couldn't reasonably be done with plugins because it alters code currently in the core which doesn't have plugin hooks. When doing so, is it considered perferable to:
a) Add the features to the existing code in the core
b) Add hooks to the core to call plugins where needed
c) Move the code from the core to a plugin, where it's behavior can be altered by other plugins
We're currently running Moodle 2.2, so adjusting our patches to work with 2.3 and submitting them will involve some amount of work. I am hoping it can be done with a reasonable amount of work so that we can do so for most of our enhancements.