ncstate-delta / moodle-mod_zoom

Moodle plugin for Zoom meeting
https://moodle.org/plugins/mod_zoom
61 stars 106 forks source link

Feature request: Let the admin decide if to include upcoming meetings in the Timeline block #592

Open acquaalta opened 2 months ago

acquaalta commented 2 months ago

Hi, A couple of years ago the following feature was added to the plugin: https://github.com/ncstate-delta/moodle-mod_zoom/issues/48

While it helped some users, it seems that a lot of other users don't want to see the activities of the "Zoom Meeting" plugin in their "Timeline" block. The ideal situation would be if each user could decide for itself, but I guess that would demand too much work. Can you at least add a site setting so the Moodle administrator could decide if Zoom meetings should appear in the "Timeline" block?

Thanks :-)

jrchamp commented 2 months ago

The mod_zoom_core_calendar_provide_event_action was added originally by #169.

https://github.com/ncstate-delta/moodle-mod_zoom/blob/e2f6f7bd8b9673e828d70bef47808ef8f006fc01/lib.php#L656

It seems like there are a few callbacks that exist: https://github.com/moodle/moodle/blob/792698af000c3fb598b15f4d048fa76e02fbef50/mod/upgrade.txt#L108-L113

So one option might be to add a mod_zoom_core_calendar_is_event_visible function to lib.php and create an admin setting that can allow turning off Zoom events in the timeline.

acquaalta commented 2 months ago

Hi @jrchamp, Just to be sure, I assume that in your last comment you explain to yourself if and how can the feature be implemented. Because I don't know how to implement it in the code 😂 I hope you don't count on me to understand what you wrote 😊

jrchamp commented 2 months ago

@acquaalta Correct! I try to understand the situation and describe it for whomever may research and implement the change.

Regarding mod_zoom_core_calendar_is_event_visible, I'm concerned that some activities are not visible to all users, but the events for those activities might be visible to all users. This needs to be tested. If my concern is correct, a new issue should be created and marked as a bug.

EDIT: The events are correctly only visible to users who can access the associated activities.

acquaalta commented 6 days ago

Hi @jrchamp, Until someone could implement this change, I've got a another question related to the bigger issue:

If our main concern nowadays, Zoom-wise, is to remove the appearance of the "Zoom Meeting" activities occurrences from the "Timeline" block, and we are prepared to locally edit some code files of the plugin in the server, is there an easy and efficient way to do that? Maybe removing/commenting some code lines, so the zoom meetings won't be shown in the "Timeline" block?

Thanks

jrchamp commented 3 days ago

Hi @acquaalta,

If you modify lib.php to add the following code, it should hide all of the Zoom activity events:

function mod_zoom_core_calendar_is_event_visible(calendar_event $event) {
    return false;
}

I'm not sure how to only hide it from the timeline block, so this might hide it from the Calendar also. I hope this helps!