Pushing individualized documents to users for access from Moodle Dashboard

Moodle does not have a way for teachers to automatically push individual documents to Moodle users. A good example is class reports: If a student stays in a school for 12 years needs to be able to access their class performance reports year by year, there is no existing provision. The closest is to push document links in the feedback of an Assignment activity. This however is course (year) based and when new students enroll  and old students are un-enrolled each year, the data is gone! If the students don’t access the report in allocated time and save it in some repository of their own they will keep requesting school administration for their old reports.

I have implemented one scheme to accomplish this – it consists of 2 parts:

  1. A Google Apps Script (GAS) that takes appropriately named Google documents located in a particular sub-folder and based on the naming convention derive the user ID and push this document file ID to that user using Moodle REST API. The data is stored as a JSON encoded string in a dedicated user profile field created specially for this purpose but not visible or accessible to the user from their profile directly. The file naming convention is: username_idnumber. The file type can be anything but I have only tested this GAS on PDFs.
  2. A custom Moodle block that can be installed by any user on their dashboard which then reads this data and displays links to the users Google Docs.
Posted in customization, Google Apps Script, moodle.

Leave a Reply

Your email address will not be published. Required fields are marked *

This site uses Akismet to reduce spam. Learn how your comment data is processed.