Advices : Need some entity (module or course) informations while triggering course_bin_item_created and category_bin_item_created

Advices : Need some entity (module or course) informations while triggering course_bin_item_created and category_bin_item_created

by Céline Perves -
Number of replies: 0
Picture of Core developers Picture of Particularly helpful Moodlers Picture of Plugin developers

Hello,

I am working on a Rocket.Chat module development for ESUP community and face some troubles with recyclebin events

The plugin is a module that interact with a remote Rocket.Chat server and take in charge

  • remote group creations ( Rocket.Chat private groups)
  • remote user enrolments and unenrolments
  • enabling user to access its Rocket.Chat groups from moodle and directly from a Rocket.Chat client

When taking into consideration recyclebin process I face troubles.

  • The remote room must'n be deleted while passing to recycle bin but must be archived (changing state)
  • While restoring the state will be changed and while clening recyclebin definitely deleted

To do that kind of things I need to work with course_bin_item_created and category_bin_item_created moodle events

But cmid or courseid are missing to be able to act on the remote Rocket.Chat groups

I would'nt have to fopen backup file stored in recyclebin to retrieve cmid/instanceid or courseid

So I choose to patch code into course_bin and cateogry bin to pass cmid/instanceid and courseid

I also add a table to the plugin  rocketchatxrecyclebin to have the corespondance beetwin binid and rocketchat module informations

I made that choices thinking in term of patch, with minimum impact and minimum code

But maybe something would be better to do or maybe something would be made into moodle recyclebin code.

The Rocket.Chat module have a special behaviour that would be interesting for others plugin, so maybe changing course_bin_item_created and category_bin_item_created would be interesting

I will appreciate your advices and help

The plugin, under developement, can be find here https://github.com/EsupPortail/esup-mod_rocketchat

Thank you for your responses

Céline Pervès for Esup Portail moodle Rocket.Chat plugin Team
Moodle developper at Université de Strasbourg


Average of ratings: -