Accredible Certificates and Badges
Maintained by
Accredible Inc, David King
Accredible lets you issue digital certificates, open badges, or Blockchain credentials from your Moodle instance. They are a feature-rich replacement for the PDF certificates normally generated for your courses.
Comments
Comments are no longer open for new posts. Existing comments remain available to read.
Sign up for a free trial at accredible.com.
Can anyone assist?
Installing the plugin pulled in all my existing certificates and mapped them to current users. This is amazing.
On thing that would be really cool is if I could select an "Assignment" module for use with the "Auto-issue criteria: by activity completion" function. The courses I run include quizzes but then also a final assignment that must be completed in order to complete the certification. Right now, I only see the option to select quizzes, but it is quite possible I'm overlooking something obvious.
Thanks again, I'm really happy with this plugin it made my day.
You guys over at Accredible are awesome. I see this plugin is even cooler now, as it can access the fancy certificates I've already created using design templates. This is going to make life easier for me. Thank you very much for putting this together and sharing the code with the community!!!
Note: I'm on Moodle 3.0.4+ (Build: 20160623) with pre-existing Accredible cohorts and the install worked without issue.
- Chris
I just tried a clean 3.0.2-1 installation and didn't have any issues.
I'll follow up with a private message and hopefully we can debug it.
-Ryan
Should this work with Moodle 3.02? When installing the plugin I am getting issues from the plugin manager - it's advising there are dependencies on assignment upload which is not available? This is a completely clean version of Moodle 3.02.
Any guidance appreciated!
Thanks
html_writer - I think I’ve successfully removed all raw html and replaced it with the html_writer. Thanks for directing me to that.
EN language tags - I’ve removed all the capitals except when referring to the proper noun Accredible. I hope that’s okay. I also added a lot more tags to fill in the hard-coded strings you guys pointed out, and removed the unnecessary ones left over from mod_certificate.
logging support - thanks a ton for emphasizing logs. I’ve added logging for new certificates and I think having that in there will be a big help. I removed the old code from mod_certificate.
enrolment API - again, thanks for the link David. There’s a lot to take in when you start Moodle dev, but these are great APIs once you have them.
lib.php - I separated the majority of the functions into locallib.php. I’m not sure which functions I was missing in lib.php; there are only 3 listed here (https://docs.moodle.org/dev/Activity_modules#lib.php):
function MODNAME_add_instance($post);
function MODNAME_update_instance($post);
function MODNAME_delete_instance($id);
course completion tracking - this new version includes another auto-issue criteria based on quiz attempts. This was requested by one of the alpha users we have, and was the feature I was referring to (got ahead of myself). I would have preferred to use Course Completion Tracking, but that’s not really the same thing they were looking for, and it looks like this page on Course Completion (https://docs.moodle.org/dev/Course_completion) is about an ongoing project in that area. Looking forward to that in later releases.
DB->get_record - removed the print_errors and subbed in the MUST_EXIST flag. Thanks.
Removed the print teacher capability (a remnant of mod_certificate).
Lastly, I added moodle_exceptions when there is a possibility of missing API results like you suggested. The one thing I really couldn’t figure out was why my error messages aren’t showing up. This is the syntax I used:
throw new moodle_exception('manualadderror:add', 'accredible', 'https://accredible.com/contact/support', $user_id, var_dump($post));
and I added a lang/en/error.php file like the main Moodle branch.
Hope that addresses everything, and thanks again for the concise and helpful feedback! We’re excited to get this listed ASAP.
- Ryan Booth
Sending an update ASAP.
make a lot of Moodle users happy. There are some small issues I spotted while reviewing this.
There is no logging support in your plugin, neither the legacy one nor the new one. There seems to be a forgotten copy&pasted
fragment of the code in classes/event/course_module_viewed.php that refers to the `mod_certificate` namespace and `certificate`
database table. Please see https://docs.moodle.org/dev/Migrating_logging_calls_in_plugins and implement the full logging support for
your module (or at least remove these invalid event classes).
Attempting to load all enrolled users via SQL like yours in mod_form is not the correct way. Having 'roleid=5' may easily fail, the
query does not respect enrolment status and there might be alternative ways to enrol users. Moodle provides an API for this - see
`get_enrolled_users()`.
The function accredible_get_issued() in lib.php on line 160 does not check it has valid $result so may lead to "Trying to get
property of non-object" if the communication with your API fails for whatever reason. Consequently, you don't check $certificates
returned by accredible_get_issued() is a valid array in view.php, leading to another PHP warning.
Your lib.php does not implement the full activity module interface and on contrary, it defines functions that are internal ones
implementing your plugin logic. It is preferred to put all your own functions into a separate file locallib.php and include it only
when really needed (by your action scripts like view.php). The files lib.php are loaded from all plugins at all page request so
having unnecessary functions defined there is suboptimal.
Your plugin's description claims to "certificates can be issued manually or automatically emailed to students upon completion of the
course." However, at the moment I can see just hard-coded support for attempted Quizes (that are referred to as Exams in your UI
which may be quite confusing). The observing "course completion" does not seem to be present. Am I missing something?
Please note, there is a policy on not using capital letters in the English language pack in Moodle. To achieve consistency with the
standard Moodle installation, you may want to remove them (e.g. the plugin name itself) and eventually (once this module is
approved) reintroduce them in the US English language pack via lang.moodle.org. There are multiple hard-coded English strings like
Rex already mentioned, including the headings in the view.php.
Note that `$DB->get_record()` has support for MUST_EXIST flag that is preferred over calling print_error() on false returned.
The capability mod/accredible:printteacher does not seem to be used at all.
For now, I am going to mark this plugin as needing more work until we get these issues resolved. Thanks for your patience with the
review and approval process.
view.php (alt text) and index.php (h3 tag)
Also, do you know about the Moodle html_writer (https://docs.moodle.org/dev/html_writer)?
I would also add consider adding in help text for the activity chooser to explain what this modules does.