OBF plugin for Moodle learning platform
PHP Gherkin
Fetching latest commit…
Cannot retrieve the latest commit at this time.
Permalink
Failed to load latest commit information.
build
src
.gitignore
README.md
build.xml
composer.json

README.md

OBF Moodle/Totara plugin

This project is for 2 Open Badge Factory Moodle/Totara -plugins.

For developers

This project uses Composer to manage dependencies. If you don't have Composer installed, run the following command to install it:

curl -sS https://getcomposer.org/installer | php

And then, install the project dependencies using Composer:

php composer.phar install

Building

Build task creates a zip-file to project's build-directory. Building the plugin is as easy as running the following command in project directory:

vendor/bin/phing

Testing

The plugin has a few unit tests (there should be more and the current ones should cover more). To test the plugin, you need to have Moodle installed and it's test environment initialized. To initialize Moodle's test environment, set the PHPUnit-related configuration values (mainly $CFG->phpunit_prefix and $CFG->phpunit_dataroot in /[MoodleDir]/config.php and run the following commands:

cd /[MoodleDir]
php admin/tool/phpunit/cli/init.php

When the test environment is initialized, the tests are run using command

$ vendor/bin/phing test

Behat

There are also a few acceptance tests in tests-directory created using Behat, but running them doesn't serve any purpose. They are done mostly to test Behat and Selenium.

How to install (issuer plugin)

Moodle 2.7 / Totara 2.7 and up:

  1. Install the zip via Moodle's plugin page. Select "local" as the type of the plugin.
  2. Update the database using the notifications page
  3. Complete the Post install steps

Post install

To connect to Open Badge Factory, the plugin needs a request token or API key.

To generate the required API key, log in to Open Badge Factory. When logged in, navigate to Admin tools > API key. On the API key -page click on Generate certificate signing request token.

Copy the generated token into OBF Moodle plugin settings, in Site administration > Open Badges > Settings.