Totara Learn Open Discussions

Dashboard Custom Blocks with forms

 
John Wiles
Dashboard Custom Blocks with forms
by John Wiles - Thursday, 1 October 2020, 9:43 AM
 

I have a need to create custom blocks on our user's dashboards. The blocks will display html tables based upon a sql query, with custom css to format the output.  

The original reports were created by me in reportbuilder, but needed to have a different format, and other options customized. So, I treated them as embedded reports, created pages under the 'my' directory and was able to get that to function and display as needed.

The only problem is that we need those to be displayed/functional in the user dashboards. So I thought, ok recreate each report as a block plugin. Simple enough, pull the records, parse the pages out for pagination. Parse the output through mustache. 

Then came the filters. I've been trying to figure out how/if it were possible to add them to the blocks (preferably as either a dialog or something similar). Is that possible, if so and anyone has pointers please share.

I would also, if it were possible, be okay with including the 'my' pages in blocks as well.

We're using v11.2.