drachels/moodle-mod_hotquestion

Event monitoring broken because of hotquestion mod

mputzi opened this issue · 5 comments

I'm getting the following php error:
Fatal error: Cannot declare class mod_data\event\comment_deleted, because the name is already in use in /var/www/moodle/mod/hotquestion/classes/event/xxxcomment_created.php on line 0

Maybe the file with filename starting with "xxx" shouldn't be there anymore?

moodle version 3.10.1, php 7.4.3, hotquestion plugin version 3.9.2 (Build: 2021021500)

The error occurs in three use cases so far:

  1. opening event list on /report/eventlist/index.php
  2. creating new event monitor on /admin/tool/monitor/edit.php?courseid=0
  3. editing existing event monitor via /admin/tool/monitor/edit.php?ruleid=1&courseid=0&sesskey=…

Existing event monitors continue to work, but still this is quite critical.

Hi mputzi,
Yes you can delete all three of the files that start with "xxx" as they were part of something I started a couple of years ago then abandoned, for the time being. This happened in the latest release because I switched from using Git Gui to push changes from my desktop to Github, to using GitHub Desktop instead. With the software changeover, I accidentally pushed those three files. Simply deleting them should eliminate the errors.

Where we find the three files that start with "xxx"?

As noted in the OP: /var/www/moodle/mod/hotquestion/classes/event/xxxcomment_created.php
Your Moodle location may vary. Sorry that I've just been too busy to put out a new, corrected version. So far today, three medical appointments and family shopping. Hopefully will get out a new version soon.

2023113001 Published fix and included as part of HotQuestion v4.0.0.