catalyst / moodle-report_coursesize

upgraded coursesize report
14 stars 19 forks source link

Undefined constant REPORT_COURSESIZE_NUMBEROFUSERS #48

Closed sharpchi closed 1 year ago

sharpchi commented 2 years ago

The report_coursesize_get_usersizes function in locallib.php is called by the cron. It requires REPORT_COURSESIZE_NUMBEROFUSERS to be defined. It's defined in the index.php file. Perhaps it would be better to define it either in the locallib.php file or in the lib.php file (to ensure it's loaded).

As it stands it causes the cron to fail. Moodle 4.0, PHP 8.0, MOODLE_39_STABLE of your plugin

danmarsden commented 2 years ago

thanks - those 2 constants should really be converted to config settings, pull requests always welcome ;-) @katerynadegtyariova - looks like a regression from #40

michael-milette commented 1 year ago

+1

@danmarsden - any thoughts on when you might have a chance to fix this?

Also failing in Moodle 3.11, PHP 7.4, MOODLE_39_STABLE of your plugin.

danmarsden commented 1 year ago

Thanks for the ping - I asked @uzimike to take a look at this today and he's fixed it in #51 - we'll look to bumping the version at some point and releasing to the plugins db but let us know if you get a chance to test.

abias commented 1 year ago

@danmarsden - thanks for fixing this issue. I tested it locally and can confirm that it seems to fix this issue. I would be grateful if you could push out a new official release to moodle.org/plugins