KQMATH / moodle-mod_capquiz

:mushroom: Computer adaptive practice activity module for Moodle
https://moodle.org/plugins/mod_capquiz
GNU General Public License v3.0
4 stars 5 forks source link

Reports do not work in Moodle 4. #218

Closed hgeorgsch closed 1 year ago

hgeorgsch commented 1 year ago

The reports tab uses deprecated functions.

get_extra_user_fields_sql() is deprecated. Please use the \core_user\fields API instead. line 3343 of /lib/deprecatedlib.php: call to debugging() line 358 of /mod/capquiz/report/attemptsreport_table.php: call to get_extra_user_fields_sql() line 336 of /mod/capquiz/report/attemptsreport_table.php: call to mod_capquiz\report\capquiz_attempts_report_table->base_sql() line 113 of /mod/capquiz/report/attempts/report.php: call to mod_capquiz\report\capquiz_attempts_report_table->setup_sql_queries() line 106 of /mod/capquiz/classes/output/report_renderer.php: call to capquizreport_attempts\capquizreport_attempts_report->display() line 108 of /mod/capquiz/classes/output/renderer.php: call to mod_capquiz\output\report_renderer->render() line 298 of /mod/capquiz/classes/output/renderer.php: call to mod_capquiz\output\renderer->display_tabbed_view() line 46 of /mod/capquiz/view_report.php: call to mod_capquiz\output\renderer->display_report() get_all_user_name_fields() is deprecated. Please use the \core_user\fields API instead line 3381 of /lib/deprecatedlib.php: call to debugging() line 360 of /mod/capquiz/report/attemptsreport_table.php: call to get_all_user_name_fields() line 336 of /mod/capquiz/report/attemptsreport_table.php: call to mod_capquiz\report\capquiz_attempts_report_table->base_sql() line 113 of /mod/capquiz/report/attempts/report.php: call to mod_capquiz\report\capquiz_attempts_report_table->setup_sql_queries() line 106 of /mod/capquiz/classes/output/report_renderer.php: call to capquizreport_attempts\capquizreport_attempts_report->display() line 108 of /mod/capquiz/classes/output/renderer.php: call to mod_capquiz\output\report_renderer->render() line 298 of /mod/capquiz/classes/output/renderer.php: call to mod_capquiz\output\renderer->display_tabbed_view() line 46 of /mod/capquiz/view_report.php: call to mod_capquiz\output\renderer->display_report() get_extra_user_fields() is deprecated. Please use the \core_user\fields API instead. line 3321 of /lib/deprecatedlib.php: call to debugging() line 172 of /mod/capquiz/report/attemptsreport.php: call to get_extra_user_fields() line 124 of /mod/capquiz/report/attempts/report.php: call to mod_capquiz\report\capquiz_attempts_report->add_user_columns() line 106 of /mod/capquiz/classes/output/report_renderer.php: call to capquizreport_attempts\capquizreport_attempts_report->display() line 108 of /mod/capquiz/classes/output/renderer.php: call to mod_capquiz\output\report_renderer->render() line 298 of /mod/capquiz/classes/output/renderer.php: call to mod_capquiz\output\renderer->display_tabbed_view() line 46 of /mod/capquiz/view_report.php: call to mod_capquiz\output\renderer->display_report() get_user_field_name() is deprecated. Please use \core_user\fields::get_display_name() instead line 3363 of /lib/deprecatedlib.php: call to debugging() line 175 of /mod/capquiz/report/attemptsreport.php: call to get_user_field_name() line 124 of /mod/capquiz/report/attempts/report.php: call to mod_capquiz\report\capquiz_attempts_report->add_user_columns() line 106 of /mod/capquiz/classes/output/report_renderer.php: call to capquizreport_attempts\capquizreport_attempts_report->display() line 108 of /mod/capquiz/classes/output/renderer.php: call to mod_capquiz\output\report_renderer->render() line 298 of /mod/capquiz/classes/output/renderer.php: call to mod_capquiz\output\renderer->display_tabbed_view() line 46 of /mod/capquiz/view_report.php: call to mod_capquiz\output\renderer->display_report() get_extra_user_fields() is deprecated. Please use the \core_user\fields API instead. line 3321 of /lib/deprecatedlib.php: call to debugging() line 241 of /mod/capquiz/report/attemptsreport.php: call to get_extra_user_fields() line 167 of /mod/capquiz/report/attempts/report.php: call to mod_capquiz\report\capquiz_attempts_report->configure_user_columns() line 106 of /mod/capquiz/classes/output/report_renderer.php: call to capquizreport_attempts\capquizreport_attempts_report->display() line 108 of /mod/capquiz/classes/output/renderer.php: call to mod_capquiz\output\report_renderer->render() line 298 of /mod/capquiz/classes/output/renderer.php: call to mod_capquiz\output\renderer->display_tabbed_view() line 46 of /mod/capquiz/view_report.php: call to mod_capquiz\output\renderer->display_report()

hgeorgsch commented 1 year ago

The deprecation errors have been resolved. Further testing is required, but that's not restricted to this fix.