Markbook error to a specific class

Hi all.

I am getting a very strange error with my markbook. The error is only appearing within one specific class. The error code thrown on the screen is as follows:

Warning: SQLSTATE[42000]: Syntax error or access violation: 1064 You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near ‘A) ORDER BY name LIMIT 1’ at line 6
Line 197 in C:\laragon\www\gika\src\Database\Connection.php
Line 181 in C:\laragon\www\gika\src\Database\Connection.php
Line 116 in C:\laragon\www\gika\src\Database\Connection.php
Line 985 in C:\laragon\www\gika\modules\Markbook\src\MarkbookView.php
Line 211 in C:\laragon\www\gika\modules\Markbook\markbook_view_allClassesAllData.php
Line 56 in C:\laragon\www\gika\modules\Markbook\markbook_view.php
Uncaught Exception: Error - PDO object is uninitialized
Line 990 in C:\laragon\www\gika\modules\Markbook\src\MarkbookView.php
Line 990 in C:\laragon\www\gika\modules\Markbook\src\MarkbookView.php
Line 211 in C:\laragon\www\gika\modules\Markbook\markbook_view_allClassesAllData.php
Line 56 in C:\laragon\www\gika\modules\Markbook\markbook_view.php
Line 87 in C:\laragon\www\gika\src\View\View.php
Line 478 in C:\laragon\www\gika\src\View\Page.php
Line 703 in C:\laragon\www\gika\index.php

These show up directly on the webpage when i try to access the class.

The php error log indicate the following error

[29-Oct-2024 11:45:15 /] Warning: SQLSTATE[42000]: Syntax error or access violation: 1064 You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near ‘A)
ORDER BY name
LIMIT 1’ at line 6 in C:\laragon\www\gika\src\Database\Connection.php on line 197
[29-Oct-2024 11:45:15 /] Uncaught Exception: Error - PDO object is uninitialized in C:\laragon\www\gika\modules\Markbook\src\MarkbookView.php on line 990

Can anyone help me with this?

Regards

NGN

Hi @ngn, thanks for the heads up. This is indeed a bug in some code related to external assessment baselines, which I’ve now fixed in v28. Luckily, it was a single-file fix that will be backwards compatible, so you should be able to apply it to your own system by updating the MarkbookView.php file using the one from this commit: Markbook: fix dynamic SQL statement in cacheExternalAssessments in Ma… · GibbonEdu/core@74895b6 · GitHub