forked from jleyva/moodle-block_configurablereports
-
Notifications
You must be signed in to change notification settings - Fork 0
Home
spinozarabel edited this page Aug 5, 2021
·
2 revisions
My customized moodle-block_configurablereports wiki! The Moodle plugin called Configurable Reports is an extremely useful and versatile plugin. What's particularly notable is that it can be extensively customized. I have performed the following customizations:
- Messaging instead of email for sendemail column of id's. This way, all the 3 modes of web, email, and Mobile are possible.
- Extend the export plugins. The original export plugins for CSV, XLS, etc., file export are very convenient ways to do limitless operations on the record set extracted from the SQL in a safe manner in the web environment. For example: I have used an export plugin called SYNC to synchronize an LDAP directory to the Moodle user database. An another example is to synchronize Virtual Accounts at CashFree (A payment Gateway in India) for the Moodle Students, in order to make payments. A 3rd example: Fee amounts for each student are read from a Google published as CSV file and to write them to a user's profile field for later use, etc.
- Set up a task in the block that can run specified reports including their extended export plugins, as background tasks at specified times, unsupervised. For example, I currently have my custom Moodle to LDAP sync run every 4 hours.
- I have implemented a JSON field. A user's profile field is customized to hold a JSON encoded array of arbitrary items. By setting an option in the SQL code itself I can show the JSON items expanded as columns in the report. I have further added actions similar to sendemail but for the JSON case, where I can delete selected JSON rows that basically deletes the items in the JSON encoded field. My use case is a JSON field that contains records of documents and their google ID's or payments made by the user. The use cases are limitless. My code is hard coded obviously so each use case needs different coding of the export plugin as well as customized SQL.
This plugin is basically a programmable plugin. You can customize the SQL, you can then customize the operations that can be performed on that set including integration of external API, etc. In essence, it obviates the need to write a new plugin every time you need one to do some functionality not available in Moodle and its published plugin database. My examples clearly illustrate the means.