Zoom Online
------------

Zoom Online adds a Join button to a Moodle course. The first time an editing
teacher opens the course, the block creates a Zoom meeting for them and keeps
the same link for that course. Students see the button and go straight into
Zoom.

It also brings cloud recordings back into the course, and it can write Zoom
attendance into Moodle's Attendance activity.

Version: 1.1.0 (Build 20261007)
Maintained by Inneall.

Requirements
- Moodle 4.5, 5.0, 5.1, 5.2, or 5.3
- A Zoom Server-to-Server OAuth app (Zoom Pro or higher for cloud recordings)
- The editing teacher's email in Moodle must belong to a user on that Zoom account

No extra Moodle plugin is required. Attendance tracking is optional and needs
the Attendance activity (mod_attendance).

Install
1. Copy the zoomonline folder into blocks/.
2. As an administrator, open Site administration, Notifications.
3. Open Site administration, Plugins, Blocks, Zoom Online.

Zoom setup
Create a Server-to-Server OAuth app in the Zoom App Marketplace. Copy the
Client ID, Client Secret, and Account ID into the plugin settings.

The app needs permission to create and read meetings. If you store recordings,
it also needs permission to read and delete cloud recordings.

Add the block to a course. The course needs an editing teacher. The course end
date must be empty or still in the future. A course with no end date stays open.

Messages
- Missing client id, secret, or account id: fill in the three OAuth settings.
- Add an editing teacher: enrol an editing teacher whose Moodle email exists in Zoom.
- End date is in the past: clear it, or move it forward, if the course should still meet.
- Zoom has no user with this email: the Moodle email must match a Zoom user.
- Zoom meeting was not created: the rest of the message is Zoom's own reason.

A course manager can open the course and create the meeting for the editing
teacher. Students see the Join button. Teachers can hide it.

Groups
Turn on "Enforce group membership" for one meeting and Join button per Moodle
group. Leave it off for one meeting per teacher for the whole course.

Recordings
Every 15 minutes the block checks meetings it created. A cloud recording is
downloaded and added to the course as a Book or a Label.

Store the file on Amazon S3, or keep it in Moodle. After a successful copy the
recording is removed from Zoom. S3 needs an access key, secret, region, and
bucket. Those values are stored in the plugin settings.

Attendance
Turn this on when the Attendance activity is installed. The scheduled task
reads Zoom's participant report and marks students Present or Late.

Match students by email, or by Zoom display name when that name is their
Moodle username. Guests joining from a free Zoom client often do not send an
email, so display-name matching is the fallback.

Defaults: 15 minutes late, 15 minutes early, and 70 percent of the session.

Changes in 1.1.0
- Moodle 4.5 through 5.3.
- Installs on its own. It no longer asks for the old Guzzle plugin.
- A failed Zoom call is shown to the teacher, including a missing Zoom user.
- A course with no end date is no longer treated as already finished.
- A course with no editing teacher explains what is missing.
- A course manager can create the meeting for the editing teacher.
- The groups setting is applied.

Privacy
The block stores the teacher's Moodle user id, the course id, the group id,
and the Zoom meeting id. The teacher's email and name are sent to Zoom so the
meeting is created on their user.

Support
support@inneall.ie

Licence
GNU GPL v3 or later. https://www.gnu.org/licenses/gpl-3.0.html
