Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Redefine licenses only from specific Zoom group(s) or exclude specific group(s) #148

Open
tsostef opened this issue Oct 9, 2020 · 6 comments
Labels
enhancement Adds new functionality help wanted We need your help to make this possible

Comments

@tsostef
Copy link

tsostef commented Oct 9, 2020

Hi

Is it possible to consider the "redefine licenses" option with only a particular group in Zoom? This would prevent certain users from losing their licenses at times like administrators etc. and the license would be taken only from the group members in Zoom.

Or inverse to be able to exclude specific group from "pool" so that they do not lose their license.

Thank you

@jrchamp
Copy link
Collaborator

jrchamp commented Oct 9, 2020

I'm not advocating for or against this idea, but I would think that Role (where most of the "pool" people are Member) might be better than Group. Not sure if this meets your use case. (Edit: I no longer believe in the Role-based approach.)

@tsostef
Copy link
Author

tsostef commented Oct 9, 2020

Either Role based or Group based exclusion from the "pool" would be fine for our case. For example our 250 licenses would be allocated as 220 for the pool where all member have to use the plugin in order to get a license and 30 for people that must have a license at all times.

I have seen this posted on the moodle forum as well so I assume that other people must have the same issue like us

@rlorenzo rlorenzo added the help wanted We need your help to make this possible label Oct 10, 2020
@tsostef
Copy link
Author

tsostef commented Dec 14, 2020

If other users are facing the same issue as my original post, how do you deal with it?

Thanks

@lcollong
Copy link
Contributor

We have the same need. I think "Group" is better than "Role" to exclude/include some users from the pool of "down gradable" ones (set type to basic). First because a user can belong to several groups whereas he can only have one role. Second because it's a hard process to create a new role in Zoom UI as you can't clone it. You need to go through all the params to set them correctly.

As the field "dept" is included in the get_users API call, it would be even easier to check against a free string field set in the plugin configuration (ie "school,teachers") to exclude users having such a string in their "dept" field. This avoid the need to fetch group or role definition to store in the setup. But role_id, and group_ids are also there. So....

The current process is using the last_login field to select the "oldest" user to down grade. But I'm wondering if this field is updated in Zoom when a user create or start a meeting from within Moodle (from the API ) ? Some of our very active users (as hosts or alternative hosts) don't even never connect to their zoom account web site....

@jrchamp
Copy link
Collaborator

jrchamp commented Sep 29, 2021

I agree @lcollong, last_login_time is updated when they log in to the Zoom account, either via the website or another Zoom client. If they are not using the Host features, it is possible that they might not be logging in.

As far as a minimal implementation, it might be as simple as adding an additional requirement to _get_least_recently_active_paid_user_id():

if ($user->type != ZOOM_USER_TYPE_BASIC && isset($user->last_login_time)) {

Example if there's only one , though I think the real group IDs are 22 character strings:

if ($user->type != ZOOM_USER_TYPE_BASIC && !in_array('ABCDEF_123456', $user->group_ids, true) && isset($user->last_login_time)) {

A full implementation would probably need to fetch the list of groups using https://marketplace.zoom.us/docs/api-reference/zoom-api/groups/groups and then allow one or more selections from the list. A cleaner implementation of the code would then be more like:

// Skip basic users.
if ($user->type == ZOOM_USER_TYPE_BASIC) {
    continue;
}

// Skip users in protected groups.
foreach ($protectedgroups as $groupid) {
    if (in_array($groupid, $user->group_ids, true)) {
        continue 2;
    }
}

// Try to pick the least recently active user.
if (isset($user->last_login_time)) {

@jrchamp jrchamp added the enhancement Adds new functionality label Sep 29, 2021
@jrchamp jrchamp moved this to Help wanted in mod_zoom Workflow May 23, 2024
@jrchamp jrchamp changed the title Redefine licenses only from specific Zoom group(s) or exclude spefic group(s) Redefine licenses only from specific Zoom group(s) or exclude specific group(s) May 29, 2024
@izendegi
Copy link

Hi,

We've developed at #630 the functionality to select a Zoom group to be protected, so no licenses will be taken from the members of that group.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement Adds new functionality help wanted We need your help to make this possible
Projects
Status: Help wanted
Development

No branches or pull requests

5 participants