drachels / moodle-mod_diary

A daily diary activity for Moodle.
4 stars 6 forks source link

copying any moodle activity gives the error Class 'Moodle\Diary\backup_activity_task' not found #13

Closed koenr closed 3 years ago

koenr commented 3 years ago

Trying to make a copy of any activity on the site gives the error "Class 'Moodle\Diary\backup_activity_task' not found"

Workaround was deleting the diary module.

koenr commented 3 years ago

Stack trace:

Error code: generalexceptionmessage

koenr commented 3 years ago

Workaround in /mod/diary/lib.php case FEATURE_BACKUP_MOODLE2: return false;

This switches backups of for this module, so the rest works again.

drachels commented 3 years ago

Sorry to take so long to respond but was delayed due to medical appointments. This and issue #12 are both caused by the same thing. In the file yourmoodle/mod/diary/moodle2/backup_diary_activity_task.class.php you need to delete or comment out line 26: namespace Moodle\Diary.

drachels commented 3 years ago

Fixed in Diary 3.2.2.

koenr commented 3 years ago

No problem with the delay :-) Hope you are well. Thank you for your reply. It's a more elegant solution then disabling the backup feature completely. I can confirm that this solves the issue

drachels commented 3 years ago

Thanks for the confirmation. The problem was caused by trying to do multiple things at once and having too many servers and versions of Moodle. I accidentally included that line of code from a test version into the published version, when I was in a hurry to publish that release and also get on the road to a medical appointment.

koenr commented 3 years ago

Things like that happen - only human :-) Thank you for maintaining this wonderful module. I'm very happy to see the code evolving further. Kind regards Koen

Op di 4 mei 2021 om 20:49 schreef AL Rachels @.***>:

Thanks for the confirmation. The problem was caused by trying to do multiple things at once and having too many servers and versions of Moodle. I accidentally included that line of code from a test version into the published version, when I was in a hurry to publish that release and also get on the road to a medical appointment.

— You are receiving this because you authored the thread. Reply to this email directly, view it on GitHub https://github.com/drachels/moodle-mod_diary/issues/13#issuecomment-832165220, or unsubscribe https://github.com/notifications/unsubscribe-auth/AAWT4BS5UYGHDEWYNJSEN33TMA6ULANCNFSM44CKBH5A .

drachels commented 3 years ago

Thanks for the kind comments. If you have any ideas or things you would like to see in Diary please let me know. Currently, I am trying to move some of the embedded styling into the css file as classes to make it easier for sites to make the plugin look the way the want it to.