Moodle Plugins directory: Credly | Moodle.org
Credly
Blocks ::: block_credly
Maintained by
Deds Castillo
A moodle block to integrate with the Credly Open Credit API
Latest release:
6 sites
4 downloads
8 fans
Current versions available: 1
The Credly block allows integration between your Moodle site and the Credly Open Credit API -- a platform for verifying, sharing and managing digital badges and credentials.
Current features are:
- Provides a block that can display a user's earned badges.
- A simple management UI that can create and update badges hosted on credly.
- Provides ability to grant a badge to a user.
Useful links
Contributors
Deds Castillo (Lead maintainer)
Please login to view contributors details and/or to contact them
I noticed that the recommended boilerplate was not used in the version.php file. The full boilerplate is recommended at the beginning of each file.
One concern I have is storing the Credly password as plain text in the database. Moodle generally tries to avoid doing this for obvious security reasons.
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.
The code checker plugin can be quite helpful in fine tuning your code and can be found at: https://moodle.org/plugins/view.php?plugin=local_codechecker
You may wish to consider using that tool to further improve your plugin. Below are the initial results:
Files found: 13
blocks/credly/block_credly.php - 22 error(s) and 5 warning(s)
blocks/credly/db/access.php - 1 error(s) and 0 warning(s)
blocks/credly/edit_form.php - 1 error(s) and 0 warning(s)
blocks/credly/editbadge.php - 11 error(s) and 0 warning(s)
blocks/credly/grantbadge.php - 42 error(s) and 2 warning(s)
blocks/credly/lang/en/block_credly.php - 1 error(s) and 0 warning(s)
blocks/credly/lib.php - 169 error(s) and 0 warning(s)
blocks/credly/locallib.php - 11 error(s) and 7 warning(s)
blocks/credly/managebadges.php - 10 error(s) and 0 warning(s)
blocks/credly/settings.php - 2 error(s) and 2 warning(s)
blocks/credly/styles.css
blocks/credly/version.php - 1 error(s) and 2 warning(s)
blocks/credly/viewbadge.php - 35 error(s) and 3 warning(s)
Total: 306 error(s) and 21 warning(s)
With the developer.credly.com site I was able to create an app and test the plugin further by creating a badge from within Moodle and I was able to see it Credly a few moments later. I was also able to see the badges I had been awarded and the other that I had created on the Credly site. So basic functionality seems to work.
You may want to do some further testing with Developer Mode set to show all notices and errors. When testing plugins, I try to get the most feedback possible by setting Moodle debugging to Developer Mode. Here are some things I found while testing:
Did you remember to call setType() for 'title'? Defaulting to PARAM_RAW cleaning.
line 1310 of /lib/formslib.php: call to debugging()
line 282 of /lib/formslib.php: call to moodleform->detectMissingSetType()
line 202 of /lib/formslib.php: call to moodleform->_process_submission()
line 23 of /blocks/credly/locallib.php: call to moodleform->moodleform()
line 57 of /blocks/credly/editbadge.php: call to block_credly_badge_edit_form->__construct()
Did you remember to call setType() for 'short_description'? Defaulting to PARAM_RAW cleaning.
line 1310 of /lib/formslib.php: call to debugging()
line 282 of /lib/formslib.php: call to moodleform->detectMissingSetType()
line 202 of /lib/formslib.php: call to moodleform->_process_submission()
line 23 of /blocks/credly/locallib.php: call to moodleform->moodleform()
line 57 of /blocks/credly/editbadge.php: call to block_credly_badge_edit_form->__construct()
Did you remember to call setType() for 'description'? Defaulting to PARAM_RAW cleaning.
line 1310 of /lib/formslib.php: call to debugging()
line 282 of /lib/formslib.php: call to moodleform->detectMissingSetType()
line 202 of /lib/formslib.php: call to moodleform->_process_submission()
line 23 of /blocks/credly/locallib.php: call to moodleform->moodleform()
line 57 of /blocks/credly/editbadge.php: call to block_credly_badge_edit_form->__construct()
Did you remember to call setType() for 'criteria'? Defaulting to PARAM_RAW cleaning.
line 1310 of /lib/formslib.php: call to debugging()
line 282 of /lib/formslib.php: call to moodleform->detectMissingSetType()
line 202 of /lib/formslib.php: call to moodleform->_process_submission()
line 23 of /blocks/credly/locallib.php: call to moodleform->moodleform()
line 57 of /blocks/credly/editbadge.php: call to block_credly_badge_edit_form->__construct()
Did you remember to call setType() for 'expires_in'? Defaulting to PARAM_RAW cleaning.
line 1310 of /lib/formslib.php: call to debugging()
line 282 of /lib/formslib.php: call to moodleform->detectMissingSetType()
line 202 of /lib/formslib.php: call to moodleform->_process_submission()
line 23 of /blocks/credly/locallib.php: call to moodleform->moodleform()
line 57 of /blocks/credly/editbadge.php: call to block_credly_badge_edit_form->__construct()
Notice: Undefined variable: course in /var/www/m27/blocks/credly/viewbadge.php on line 61
I was seeing a similar notice for line 84 in managebadges so we will want to be able to handle the case when there are no badges.
When adding a new badge - I see Notice: Undefined variable: rec in /var/www/m27/blocks/credly/lib.php on line 93
Peace - Anthony
Thanks for the feedback. I appreciate it. I'll get to them as soon as I have time.
I'm done with the changes.
Thank you!!