dired-ufla / moodle-report_questionstats

That is a report plugin that helps the admin to known how the Moodle question types are being used by users (e.g. as essay, true/false, etc).
0 stars 0 forks source link

Fix compatibility with Moodle 4 #2

Open azmatksa opened 1 year ago

azmatksa commented 1 year ago

In Moode 4, it shows an error, there is a field hidden that's not exist in question table while in query it's using.

image

Shotte commented 8 months ago

@azmatksa I had to do the following, because a database column named "hidden" for table "mdl_question" no longer exists: 1) go to the file location <...>/moodle/report/questionstats/ 2) edit file index.php 3) delete from line 50 and 53 (SQL queries) the text "Q.hidden = 0 AND" 4) save file and it should work

If you addionally want to solve that a couple of questions are announced as "Unknown plugin type", change lines 78 to 80 as follows:

if ($ctype_name == '[[pluginname]]') { $ctype_name = '[' . $item->typename . ']'; } else { $ctype_name = $ctype_name . ' [' . $item->typename . ']'; }

Now it looks all fine like this:

Screenshot 2024-02-01 203026