This is a Moodle Block Plugin used to issue Acclaim badges when a course is successfully completed.
To install this block plugin:
- Clone this repository
- Remove directory .git and .gitignore
- Zip the repository directory block_acclaim and name acclaim.zip
- Login to Moodle as Administrator
- Navigate to: Site Administration > Plugins > Install Plugins
- Under Plugin type, choose “Block”
- Drag and drop acclaim.zip
- Select “Install Plugin From Zip”
- Next, select “Install plugin!” If all validations pass.
- Choose “Upgrade Moodle database now”.
- Press continue, when prompted to upgrade version.
- Finally, enter the Acclaim URL, your Organization ID and Token
- Lastly, choose “Save changes”.
Once the Block Plugin has been installed, you can attach a Badge to any of your Moodle Courses as follows.
- Begin by logging in as Administrator, teacher, or course creator.
- Turn on editing.
- Next, select the course you wish to attach a badge to from Navigation > Current Course. You must be in a course view to add the Acclaim Block because it operates in that course context.
- Add the Acclaim Block from “Add A Block” drop down.
- Next, click “Select Badge” in the Acclaim Block to choose which Acclaim badge will be issued upon course completion.
- Select a badge to be issued by selecting the “Acclaim Badges” drop down. This list is generated by connecting to the Acclaim platform using the credentials defined during installation.
- Optionally select a badge expiration date by choosing the date, and checking “Enable”
- Lastly, select “Save Changes”
In addition to configuring the Acclaim plugin, you will also need to configure how a course is successfully completed.
- First, navigate to Home > Navigation > My Courses > Select Course > Edit Settings
- Enable completion tracking, and select save.
- Finally, edit the Criteria that will trigger a course completion. This can be done by navigating to administration > course administration > select criteria. For example, course grade.
Note: If course completion tracking is missing from the course settings, enable completion tracking: Administration > Course administration > Edit Settings > Enable completion tracking.
Further documentation on course completion tracking can be found here: https://docs.moodle.org/23/en/Course_completion_settings
This plugin includes unit tests to verify functionality.
- Create env variable named token with value of a valid token on Acclaim.
- vendor/bin/phpunit acclaim_lib_test my/tests/acclaim_test.php
- The stage environent and org ID is hard coded in the unit tests. This should be changed to something like a env variable.
- Allow a course to have a badge set to none (or delete).
- Create language file so this plugin can be used on platforms other then english.
- Replaced entering API URL with dropdown with production and sandbox as choices
- Get all active templates when more than 50 and sorted alphabetically