davosmith / moodle-grade_checklist

Excel export for checklist activities in Moodle
GNU General Public License v3.0
4 stars 7 forks source link

Moodle 2.9: Missing capabilty gradeexport/checklist:publish #2

Closed Kathrin84 closed 9 years ago

Kathrin84 commented 9 years ago

Hi Davo,

in Moodle 2.9 a debug notice says that the above mentioned capability is missing:

Capability "gradeexport/checklist:publish" was not found! This has to be fixed in code. line 389 of /lib/accesslib.php: call to debugging() line 3059 of /grade/lib.php: call to has_capability() line 871 of /grade/lib.php: call to grade_helper::get_plugins_export() line 991 of /grade/lib.php: call to grade_get_plugin_info() line 129 of /grade/report/grader/index.php: call to print_grade_page_head()

It always occurs directly when opening the gradebook.

Are you still maintaining this plugin? In the Moodle plugin repo the latest version it's officially suitable for is Moodle 2.7.

Kind regards Kathrin

davosmith commented 9 years ago

Hi Kathrin - I have to admit that maintaining this plugin is lower down my priority list, but I'll certainly fix issues as I am aware of them.

I assume this is a non-fatal debugging warning (that I can fix in a few days), rather than a fatal error that needs fixing immediately?

Kathrin84 commented 9 years ago

Hi Davo,

when I try to export a checklist within the gradebook with your extension, it does'nt work and the following message is displayed:

Debug info: ERROR: column "guest" does not exist LINE 1: ...e.courseid = $1 AND ue.userid = $2 AND e.enrol <> "guest" OR... ^ SELECT ue.id, ue.timestart FROM mdl_user_enrolments ue, mdl_enrol e WHERE e.id = ue.enrolid AND e.courseid = $1 AND ue.userid = $2 AND e.enrol <> "guest" ORDER BY ue.timestart ASC LIMIT 1 OFFSET 0 [array ( 0 => '5008', 1 => '4526', )] Error code: dmlreadexception Stack trace: line 443 of /lib/dml/moodle_database.php: dml_read_exception thrown line 244 of /lib/dml/pgsql_native_moodle_database.php: call to moodle_database->query_end() line 764 of /lib/dml/pgsql_native_moodle_database.php: call to pgsql_native_moodle_database->query_end() line 230 of /grade/export/checklist/export.php: call to pgsql_native_moodle_database->get_records_sql() Output buffer:
Strict Standards: Only variables should be assigned by reference in /var/www/html/moodle_dev/grade/export/checklist/export.php on line 118

davosmith commented 9 years ago

OK - that looks like a PostgreSQL compatibility issue - the plugin was developed using MySQL and looks like it hasn't been used with PostgreSQL by anyone. I'll try to fix that issue later today.

Kathrin84 commented 9 years ago

Okay, thanks! :)

davosmith commented 9 years ago

Looks like I fixed the first issue a month ago, but forgot to push it. The second issue was already fixed by someone else (I'd merged the patch here, but not updated on Moodle.org).

However, as a result of looking at this, I've now added some automated testing + fixed a different issue (the 'start date' calculation was broken, as it was based on the mdl_log table, which is deprecated in Moodle 2.7+).

Kathrin84 commented 9 years ago

Hi Davo, now everything works fine again with your pugin, Thanks for your fix. :+1: