danmarsden/moodle-mod_attendance

"Exception - Call to a member function get() on bool" Error Message

Closed this issue · 2 comments

We are running version 2023020107 of the Attendance module under Moodle 4.1.5.

Unfortunately, the QR code generation feature is no longer working. When you allow students to take their own attendance and choose to have a QR code generated, clicking on the icon to display the code opens a new page in Moodle with the following error message: "Exception - Call to a member function get() on bool." I get the same error message when I set a password for student recording of attendance and click on the "key" icon to view the password. I go to this page - https://[moodle url]/mod/attendance/password.php?session=36258, but I see only that "Exception - Call to a member function get() on bool" error message.

I turned debugging on and go the following stack trace along with the error:

Exception - Call to a member function get() on bool
Debug info:
Error code: generalexceptionmessage
Stack trace:
line 47 of /local/metagroup/lib.php: Error thrown
line 5700 of /lib/navigationlib.php: call to local_metagroup_extend_settings_navigation()
line 4410 of /lib/navigationlib.php: call to settings_navigation->load_local_plugin_settings()
line 838 of /lib/pagelib.php: call to settings_navigation->initialise()
line 967 of /lib/pagelib.php: call to moodle_page->magic_get_settingsnav()
line 761 of /lib/classes/navigation/views/secondary.php: call to moodle_page->__get()
line 236 of /lib/classes/navigation/views/secondary.php: call to core\navigation\views\secondary->load_admin_navigation()
line 895 of /lib/pagelib.php: call to core\navigation\views\secondary->initialise()
line 967 of /lib/pagelib.php: call to moodle_page->magic_get_secondarynav()
line 33 of /theme/adaptable/layout/includes/secondarynav.php: call to moodle_page->__get()
line 35 of /theme/adaptable/layout/columns1.php: call to require_once()
line 1477 of /lib/outputrenderers.php: call to include()
line 1403 of /lib/outputrenderers.php: call to core_renderer->render_page_layout()
line 1973 of /lib/setuplib.php: call to core_renderer->header()
line 57 of /mod/attendance/password.php: call to bootstrap_renderer->__call()

The QR code feature was working fine when we were using Moodle 3.11 (and that version of the plugin), but it is not working now.

Leslie Harris
Bucknell University

It turns out that the problem was with a second plugin that was installed on our server, although I'm not sure how it got there. There was a "Metagroup sync" plugin (AKA "local_metagroup") that was several years old. Once we removed that plugin, the QR code functionality worked fine, without causing any errors.

Thanks for the update - great to hear you tracked the issue down!