catalyst / moodle-report_coursesize

upgraded coursesize report
14 stars 19 forks source link

Add export feature #6

Open mackensen opened 7 years ago

mackensen commented 7 years ago

It'd be cool if this leveraged dataformats for export; we'd like to do some calculations such as median course size.

danmarsden commented 7 years ago

yeah - would be nice to convert to using flexible_table - I'd like to rewrite the structure of the page to support this - hopefully I'll have time someday but feel free to submit a pull request!

mackensen commented 7 years ago

I'm looking into this and I should have some code to review in a day or two.

danmarsden commented 7 years ago

sweet - feel free to redesign the structure of the page as you see fit - it's a bit too hacky in some places IMO.

mackensen commented 7 years ago

Talk about tugging on a thread :). I pushed up https://github.com/mackensen/moodle-report_coursesize/tree/flexible_table which implements flexible tables for the site report and the user report (both on index). I haven't looked at the course report at all. I implemented a simple cache as well. I think another enhancement could be a scheduled task to populate the cache at the site level. As far as possible I didn't alter the underlying database logic. I need to write some tests as well.

danmarsden commented 7 years ago

yeah - great to see it get some attention! - nice to see the caching improvements - the biggest time consuming part on the page is the full disk usage check. We run an automated task on our infrastructure which populates that field in the database for each of our clients but it's not run from within Moodle - (but probably should be) I'm not sure if the course report should be generated on a schedule though - especially now that we've removed the shared size calculation from the report (which wasn't very accurate anyway) - I didn't get a chance to look at this patch today but will try to take a closer look next week and merge it in. Thanks heaps!