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

Zoom welcome message to Participants #550

Open
ferozsho opened this issue Dec 2, 2023 · 2 comments
Open

Zoom welcome message to Participants #550

ferozsho opened this issue Dec 2, 2023 · 2 comments
Labels
enhancement Adds new functionality help wanted We need your help to make this possible

Comments

@ferozsho
Copy link

ferozsho commented Dec 2, 2023

Hi,

Currently, when a Zoom meeting is created, there is no automatic email sent to enrolled users, similar to the registration confirmation emails Zoom sends out. I noticed the Send iCal notifications task and was wondering if it could be integrated or if a separate branch could be provided. This would allow us to pull and utilize the method for sending invitation emails to enrolled users.

I appreciate your attention to this matter.

For the time being, I've incorporated the Zoom plugin file and invoked the 'zoom_add_instance' function.

htdocs/mod/zoom/classes/webservice.php

    public function post_registrants_meeting($meetingId, $webinar, $user)
    {
        $res = new stdClass();
        $res->status = true;
        $res->data = 'Success';

        if (empty($user->email)) {
            $res->status = false;
            $res->data = 'User email not present!';
            return $res;
        }

        try {
            $url = ($webinar ? 'webinars/' : 'meetings/') . $meetingId . '/registrants';
            $data = [
                'email' => $user->email,
                'first_name' => $user->firstname,
                'last_name' => $user->lastname,
                'auto_approve' => true,
            ];
            $this->make_call($url, $data, 'post');
        } catch (moodle_exception $error) {

            if (strpos($error->getCode(), 1010) === true) {
                $res->status = false;
                $res->data = 'User does not belong to this account';
            } else {
                $res->status = false;
                $error->data = $error->getMessage();
            }
        }

        return $res;
    }
@jrchamp
Copy link
Collaborator

jrchamp commented Dec 4, 2023

#452 needs some changes. I reviewed it a couple times, but the remaining issues need to be resolved before it can be merged. Unfortunately, I do not have time to work on it myself.

It sounds like you have instead started to implement #504, automatically registering all users when an activity is created. For completeness, you will need to make sure to automatically register a user for all Zoom activity that already exist in the course at the time when the user enrolls into the course. That way people who join the class after the Zoom activities have been created will be registered for the meetings.

@jrchamp
Copy link
Collaborator

jrchamp commented Dec 7, 2023

Additional complexity: Activities with access restrictions must be honored. So only people who meet the access restrictions can be registered (added to a group, removed from a group, conditional availability, time-based, and more).

The only scalable option that we can think of is to track which meetings a user has been registered for. When a user access the course, we can compare the set of meetings that they were previously registered for with the set of meetings that they currently have access to; then add the new meetings and remove the old meetings via Zoom's API. To mitigate the situation where a student does not log in to Moodle for a period of time, we can update all users periodically, such as once-a-day or when a Zoom activity is updated.

New table, something like:

zoom_registration
id, user.id, course.id, cm.id, zoom.id, registration time(int)

@jrchamp jrchamp added the enhancement Adds new functionality label Dec 7, 2023
@jrchamp jrchamp added the help wanted We need your help to make this possible label Feb 29, 2024
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

2 participants