-
Notifications
You must be signed in to change notification settings - Fork 70
Installing the Moodle block
This page serves as a guide to developers who want to install the IBM Connections Toolkit Moodle block. This block requires you to run Moodle using HTTPS
There are two ways of installing the block. The first is if you already have a packaged block at hand. In that case, simply unzip it into moodle/blocks and proceed to step 9. If not, you will have to manually piece the files together. If this is the case, proceed to step 1 below to learn how to do this.
Step 1: Clone the SocialSDK repository.
Step 2: Under the Moodle block directory (moodle/blocks/) create a folder called ibmsbt.
Step 3: Copy the contents of SocialSDK/php/moodle-block/src into moodle/blocks/ibmsbt.
Step 4: Deploy the core. copy the contents of SDKWorkspace/SocialSDK/php/php-core/src/ into moodle/blocks/ibmsbt/core.
Step 5: Overwrite core SBTSettings and SBTCredentialStore with the Moodle-specific implementations. Copy SDKWorkspace/SocialSDK/php/moodle-block/src/core/models/SBTSettings.php into moodle/blocks/ibmsbt/core/models/. Copy SocialSDK/php/moodle-block/src/core/models/SBTCredentialStore.php into moodle/blocks/ibmsbt/core/models/. When prompted, over-write the existing files.
Step 6: Add the JS SDK to the moodle block. To do this, copy the contents of SDKWorkspace/SocialSDK/sdk/com.ibm.sbt.web/src/main/webapp into moodle/blocks/ibmsbt/core/system/libs/js-sdk
Step 7: Download and install PHP Guzzle 3.8.0 (https://github.com/guzzle/guzzle/tree/v3.8.0) into moodle/blocks/ibmsbt/core/system/libs/vendor
Step 8: Replace the core header with the Moodle-specific header implementation. Copy SocialSDK/php/moodle-block/src/core/views/includes/header.php into moodle/blocks/ibmsbt/core/views/includes/ and replace the existing file. Then edit moodle/blocks/ibmsbt/security-config.php and specify your passphrase (edit the value of $your_secret_phrase on line 28).
Step 9: Make sure that the permissions for the block are set correctly (Moodle needs to be able to read the contents of ibmsbt). Then log into Moodle (or if already logged in, refresh your current page). You will be prompted by the Moodle upgrade wizard to register / install the new block. Click Accept / Install (button label may differ between versions). The block will now appear as "IBM Connections Toolkit" under your "Add a block" tab (to make this tab visible turn editing on - see Moodle documentation for detailed instructions). Once you added a new block, you can configure it.
Step 10: Go to "Site Administration" -> "Plugins" -> "Blocks" -> "IBM Connections Toolkit". Ensure that your SDK deploy directory is correct and that you are including the correct Dojo or jQuery version.
Step 11: Your block is now configured and you can create new SBT blocks by turning on block editing and adding a new IBM Connections Toolkit block to your page.