oliviervalentin / moodle-report_coursemanager

Course Managet is a report tool for Moodle for helping teachers to clean and manage their courses and contents. It is based on an automatic task which calculates reports, that are displayed in a general dashboard and directly in courses.
GNU General Public License v3.0
9 stars 6 forks source link

Unsupported operand types: string / int #56

Closed mamaeves closed 7 months ago

mamaeves commented 7 months ago

I have empty config values

When I open page /report/coursemanager/view.php I get Unsupported operand types: string / int exception on lines 262 and 276

oliviervalentin commented 7 months ago

Hi @mamaeves !

These two config values must be set in the plugin settings (Site administration > Plugins > Reports > Course Manager). Without these, Course Manager can't calculate reports to set if a course has no visits since the defined number of days.

Visits are a good indicator to see if a course is stuill alive or not, so these params are necessary to make this plugin work. But I admit that no values generates an error ! I will add a precontrol to check if all settings are ok. I tag your ticket as "enhancement".

Olivier

oliviervalentin commented 7 months ago

OK, this problem is fixed in new version I just released at the moment. I keep this ticket open - I'd like to work on possibility to enable/disable reports, this will too avoid errors when settings are not defined correctly.