Blocks: CQU MyMoodle
CQU MyMoodle 1.5.0 (Build: 2016031800)
Code prechecksHTML | XML
1.5.0 : Adding caching using MUC which greatly improves performance, and reduces load on linked Moodle instances.
Installation is very straight forward. Just drop the cqumymoodle folder into the path/to/moodle/blocks directory and either navigate to http://www.yourmoodle.com/admin/index.php OR run php admin/cli/upgrade.php from the command line in your dirroot.
Web Service Configuration
- Make sure you have webservices and REST is turned on
- Site administration > Advanced features
- Make sure "Enable web services" is checked
- Site administration > Plugins > Web services > Manage protocols > Enable REST protocol
- Create a new user for webservice functions, if user does not exist(this is for added security)
- Site administration > Users > Accounts > Add a new user
- Fill in the form, and make sure "Choose an authentication method" is set to "Web services authentication"
- Create a custom role for webservice functions and assign the webservice user to this role
- Site administration > Users > Permissions > Define roles
- Add a new role > "Use role or archetype" > Set to "No role"
- Context types where this role may be assigned, set to "System"
- Assign the following permissions:
moodle/user:update moodle/course:useremail moodle/course:viewparticipants moodle/course:view moodle/user:viewdetails moodle/user:viewhiddendetails webservice/rest:use
- Create a new external service
- Site administration > Plugins > Web services > External services
- Under Custom services click "Add"
- Give it a unique name, make sure "Enabled" and "Authorised users only" is checked
- Click "Add service"
- Click "Add functions"
- Search for cqu_get_user_courses
- Click "Add functions"
- Go back to External services, under your newly created custom service, click on Authorised users
- Add the webservice user you created in step 2
- Create a token for this external service
- Site administration > Plugins > Web services > Manage tokens
- Click on "Add"
- Search for the webservice user you created in step 2 in "User"
- Choose the custom external service that you created in step 4 in "Service"
- You can choose to configure "IP restriction" and "Valid until" for more security
Note: You may add this block wherever blocks are allowed but for the sake of this tutorial, we are going to assume that you are adding it to the /my page and have configured your site to go to /my instead of /index.php or SITE
- Site adminsitration > Appearance > Default My home page
- Turn "Blocks editing on"
- Add block of type "CQU MyMoodle"
- Move it to wherever you want to on the page
- Edit the block settings (click on the hand icon or gear icon)
- Give the block a unique name
- For Endpoint, the normal path is "www.yourmoodle.com/webservice/rest/server.php"
- "External Moodle" is checked if we are connecting to another Moodle site that also has this block installed
- WebService Token, is the token we created in the Web Service configuration steps above
- Version build number
- Version release name
- 1.5.0 (Build: 2016031800)
- Stable version
- MD5 Sum
- Supported software
- Moodle 2.2, Moodle 2.3, Moodle 2.4, Moodle 2.5, Moodle 2.6, Moodle 2.7, Moodle 2.8, Moodle 2.9, Moodle 3.0
- This is the latest release for Moodle 2.2
- This is the latest release for Moodle 2.3
- This is the latest release for Moodle 2.4
- This is the latest release for Moodle 2.5
- This is the latest release for Moodle 2.6
- This is the latest release for Moodle 2.7
- This is the latest release for Moodle 2.8
- This is the latest release for Moodle 2.9
- This is the latest release for Moodle 3.0
Version control information
- Version control system (VCS)
- VCS repository URL
Default installation instructions for plugins of the type Blocks
- Make sure you have all the required versions.
- Download and unpack the block folder.
- Place the folder (eg "myblock") in the "blocks" subdirectory.
- Visit http://yoursite.com/admin to complete the installation
- Turn editing on in any home or course page.
- Add the block to the page
- Visit the config link in the block for more options.