From 251477832ad9cdcc2871d7893654074a13deace0 Mon Sep 17 00:00:00 2001 From: Alan McCoy Date: Thu, 1 Aug 2024 15:18:54 -0400 Subject: [PATCH 1/5] Add IDs to activity details sections and rows --- view.php | 174 ++++++++++++++++++++++++++++++++++++++++++++++--------- 1 file changed, 146 insertions(+), 28 deletions(-) diff --git a/view.php b/view.php index 1f7c6115..43103ef9 100755 --- a/view.php +++ b/view.php @@ -245,6 +245,7 @@ } if ($zoom->show_schedule) { + echo $OUTPUT->box_start('', 'section-schedule'); // Output "Schedule" heading. echo $OUTPUT->heading(get_string('schedule', 'mod_zoom'), 3); @@ -256,21 +257,42 @@ $numcolumns = 2; // Show start/end date or recurring meeting information. + $rowmeetingtime = new html_table_row(); + $rowmeetingtime->id = 'schedule-row-meetingtime'; + $thmeetingtime = new html_table_cell(); + $thmeetingtime->header = true; + $tdmeetingtime = new html_table_cell(); + if ($isrecurringnotime) { - $table->data[] = [get_string('recurringmeeting', 'mod_zoom'), get_string('recurringmeetingexplanation', 'mod_zoom')]; + $thmeetingtime->text = get_string('recurringmeeting', 'mod_zoom'); + $tdmeetingtime->text = get_string('recurringmeetingexplanation', 'mod_zoom'); } else if ($zoom->recurring && $zoom->recurrence_type != ZOOM_RECURRINGTYPE_NOTIME) { - $table->data[] = [get_string('recurringmeeting', 'mod_zoom'), get_string('recurringmeetingthisis', 'mod_zoom')]; + $thmeetingtime->text = get_string('recurringmeeting', 'mod_zoom'); + $tdmeetingtime->text = get_string('recurringmeetingthisis', 'mod_zoom'); $nextoccurrence = zoom_get_next_occurrence($zoom); if ($nextoccurrence > 0) { - $table->data[] = [get_string('nextoccurrence', 'mod_zoom'), userdate($nextoccurrence)]; + $thmeetingtime->text = get_string('nextoccurrence', 'mod_zoom'); + $tdmeetingtime->text = userdate($nextoccurrence); } else { - $table->data[] = [get_string('nextoccurrence', 'mod_zoom'), get_string('nooccurrenceleft', 'mod_zoom')]; + $thmeetingtime->text = get_string('nextoccurrence', 'mod_zoom'); + $tdmeetingtime->text = get_string('nooccurrenceleft', 'mod_zoom'); } - - $table->data[] = [$strduration, format_time($zoom->duration)]; } else { - $table->data[] = [$strtime, userdate($zoom->start_time)]; - $table->data[] = [$strduration, format_time($zoom->duration)]; + $thmeetingtime->text = $strtime; + $tdmeetingtime->text = userdate($zoom->start_time); + } + + $rowmeetingtime->cells = [$thmeetingtime, $tdmeetingtime]; + $table->data[] = $rowmeetingtime; + + // Show meeting duration + if (!$isrecurringnotime) { + $rowduration = new html_table_row(); + $rowduration->id = 'schedule-row-duration'; + $thduration = new html_table_cell($strduration); + $thduration->header = true; + $rowduration->cells = [$thduration, format_time($zoom->duration)]; + $table->data[] = $rowduration; } // Show recordings section if option enabled to view recordings. @@ -282,7 +304,12 @@ $recordingaddhtml = html_writer::div($recordingaddbuttonhtml); $recordinghtml .= $recordingaddhtml; - $table->data[] = [get_string('recordings', 'mod_zoom'), $recordinghtml]; + $rowrecordings = new html_table_row(); + $rowrecordings->id = 'schedule-row-recordings'; + $threcording = new html_table_cell(get_string('recordings', 'mod_zoom')); + $threcording->header = true; + $rowrecordings->cells = [$threcording, $recordinghtml]; + $table->data[] = $rowrecordings; } // Display add-to-calendar button if meeting was found and isn't recurring and if the admin did not disable the feature. @@ -291,7 +318,12 @@ $calendaricon = $OUTPUT->pix_icon('i/calendar', get_string('calendariconalt', 'mod_zoom')); $calendarbutton = html_writer::div($calendaricon . ' ' . get_string('downloadical', 'mod_zoom'), 'btn btn-primary'); $buttonhtml = html_writer::link((string) $icallink, $calendarbutton, ['target' => '_blank']); - $table->data[] = [get_string('addtocalendar', 'mod_zoom'), $buttonhtml]; + $rowaddtocalendar = new html_table_row(); + $rowaddtocalendar->id = 'schedule-row-addtocalendar'; + $thaddtocalendar = new html_table_cell(get_string('addtocalendar', 'mod_zoom')); + $thaddtocalendar->header = true; + $rowaddtocalendar->cells = [$thaddtocalendar, $buttonhtml]; + $table->data[] = $rowaddtocalendar; } // Show meeting status. @@ -305,20 +337,34 @@ } else { $status = get_string('meeting_not_started', 'mod_zoom'); } - - $table->data[] = [$strstatus, $status]; + $rowstatus = new html_table_row(); + $rowstatus->id = 'schedule-row-status'; + $thstatus = new html_table_cell($strstatus); + $thstatus->header = true; + $rowstatus->cells = [$thstatus, $status]; + $table->data[] = $rowstatus; } // Show host. $hostdisplayname = zoom_get_user_display_name($zoom->host_id); if (isset($hostdisplayname)) { - $table->data[] = [$strhost, $hostdisplayname]; + $rowhost = new html_table_row(); + $rowhost->id = 'schedule-row-host'; + $thhost = new html_table_cell($strhost); + $thhost->header = true; + $rowhost->cells = [$thhost, $hostdisplayname]; + $table->data[] = $rowhost; } // Display alternate hosts if they exist and if the admin did not disable the feature. if ($iszoommanager) { if ($config->showalternativehosts != ZOOM_ALTERNATIVEHOSTS_DISABLE && !empty($zoom->alternative_hosts)) { // If the admin did show the alternative hosts user picker, we try to show the real names of the users here. + $rowshowalternativehosts = new html_table_row(); + $rowshowalternativehosts->id = 'schedule-row-showalternativehosts'; + $thalternativehosts = new html_table_cell(get_string('alternative_hosts', 'mod_zoom')); + $thalternativehosts->header = true; + if ($config->showalternativehosts == ZOOM_ALTERNATIVEHOSTS_PICKER) { // Unfortunately, the host is not only able to add alternative hosts in Moodle with the user picker. // He is also able to add any alternative host with an email address in Zoom directly. @@ -352,12 +398,14 @@ } // Output the concatenated string of alternative hosts. - $table->data[] = [get_string('alternative_hosts', 'mod_zoom'), $alternativehoststring]; + $rowshowalternativehosts->cells = [$thalternativehosts, $alternativehoststring]; // Otherwise we stick with the plain list of email addresses as we got it from Zoom directly. } else { - $table->data[] = [get_string('alternative_hosts', 'mod_zoom'), $zoom->alternative_hosts]; + $rowshowalternativehosts->cells = [$thalternativehosts, $zoom->alternative_hosts]; } + + $table->data[] = $rowshowalternativehosts; } } @@ -365,14 +413,21 @@ if ($iszoommanager) { $sessionsurl = new moodle_url('/mod/zoom/report.php', ['id' => $cm->id]); $sessionslink = html_writer::link($sessionsurl, get_string('sessionsreport', 'mod_zoom')); - $table->data[] = [get_string('sessions', 'mod_zoom'), $sessionslink]; + $rowsessions = new html_table_row(); + $rowsessions->id = 'schedule-row-sessions'; + $thsessions = new html_table_cell(get_string('sessions', 'mod_zoom')); + $thsessions->header = true; + $rowsessions->cells = [$thsessions, $sessionslink]; + $table->data[] = $rowsessions; } // Output table. echo html_writer::table($table); + echo $OUTPUT->box_end(); } if ($zoom->show_security) { + echo $OUTPUT->box_start('', 'section-security'); // Output "Security" heading. echo $OUTPUT->heading(get_string('security', 'mod_zoom'), 3); @@ -389,16 +444,31 @@ $canviewjoinurl = ($userishost || has_capability('mod/zoom:viewjoinurl', $context)); // Show passcode status. - $table->data[] = [$strpassprotect, $strhaspass]; + $rowhaspass = new html_table_row(); + $rowhaspass->id = 'security-row-haspass'; + $thhaspass = new html_table_cell($strpassprotect); + $thhaspass->header = true; + $rowhaspass->cells = [$thhaspass, $strhaspass]; + $table->data[] = $rowhaspass; // Show passcode. if ($haspassword && ($canviewjoinurl || get_config('zoom', 'displaypassword'))) { - $table->data[] = [$strpassword, $zoom->password]; + $rowpassword = new html_table_row(); + $rowpassword->id = 'security-row-password'; + $thpassword = new html_table_cell($strpassword); + $thpassword->header = true; + $rowpassword->cells = [$thpassword, $zoom->password]; + $table->data[] = $rowpassword; } // Show join link. if ($canviewjoinurl) { - $table->data[] = [$strjoinlink, html_writer::link($zoom->join_url, $zoom->join_url, ['target' => '_blank'])]; + $rowjoinurl = new html_table_row(); + $rowjoinurl->id = 'security-row-joinurl'; + $thjoinurl = new html_table_cell($strjoinlink); + $thjoinurl->header = true; + $rowjoinurl->cells = [$thjoinurl, html_writer::link($zoom->join_url, $zoom->join_url, ['target' => '_blank'])]; + $table->data[] = $rowjoinurl; } // Show encryption type. @@ -407,30 +477,52 @@ $strenc = ($zoom->option_encryption_type === ZOOM_ENCRYPTION_TYPE_E2EE) ? $strencryptionendtoend : $strencryptionenhanced; - $table->data[] = [$strencryption, $strenc]; + $rowencryption = new html_table_row(); + $rowencryption->id = 'security-row-encryption'; + $thencryption = new html_table_cell($strencryption); + $thencryption->header = true; + $rowencryption->cells = [$thencryption, $strenc]; + $table->data[] = $rowencryption; } } // Show waiting room. if (!$zoom->webinar) { $strwr = ($zoom->option_waiting_room) ? $stryes : $strno; - $table->data[] = [$strwwaitingroom, $strwr]; + $rowwaitingroom = new html_table_row(); + $rowwaitingroom->id = 'security-row-waitingroom'; + $thwaitingroom = new html_table_cell($strwwaitingroom); + $thwaitingroom->header = true; + $rowwaitingroom->cells = [$thwaitingroom, $strwr]; + $table->data[] = $rowwaitingroom; } // Show join before host. if (!$zoom->webinar) { $strjbh = ($zoom->option_jbh) ? $stryes : $strno; - $table->data[] = [$strjoinbeforehost, $strjbh]; + $rowjoinbeforehost = new html_table_row(); + $rowjoinbeforehost->id = 'security-row-joinbeforehost'; + $thjoinbeforehost = new html_table_cell($strjoinbeforehost); + $thjoinbeforehost->header = true; + $rowjoinbeforehost->cells = [$thjoinbeforehost, $strjbh]; + $table->data[] = $rowjoinbeforehost; } // Show authentication. - $table->data[] = [$strauthenticatedusers, ($zoom->option_authenticated_users) ? $stryes : $strno]; + $rowauthenticatedusers = new html_table_row(); + $rowauthenticatedusers->id = 'security-row-authenticatedusers'; + $thauthenticatedusers = new html_table_cell($strauthenticatedusers); + $thauthenticatedusers->header = true; + $rowauthenticatedusers->cells = [$thauthenticatedusers, $zoom->option_authenticated_users]; + $table->data[] = $rowauthenticatedusers; // Output table. echo html_writer::table($table); + echo $OUTPUT->box_end(); } if ($zoom->show_media) { + echo $OUTPUT->box_start('', 'section-media'); // Output "Media" heading. echo $OUTPUT->heading(get_string('media', 'mod_zoom'), 3); @@ -444,20 +536,40 @@ // Show host video. if (!$zoom->webinar) { $strvideohost = ($zoom->option_host_video) ? $stryes : $strno; - $table->data[] = [$strstartvideohost, $strvideohost]; + $rowshowhostvideo = new html_table_row(); + $rowshowhostvideo->id = 'media-row-showhostvideo'; + $thshowhostvideo = new html_table_cell($strstartvideohost); + $thshowhostvideo->header = true; + $rowshowhostvideo->cells = [$thshowhostvideo, $strvideohost]; + $table->data[] = $rowshowhostvideo; } // Show participants video. if (!$zoom->webinar) { $strparticipantsvideo = ($zoom->option_participants_video) ? $stryes : $strno; - $table->data[] = [$strstartvideopart, $strparticipantsvideo]; + $rowstartvideopart = new html_table_row(); + $rowstartvideopart->id = 'media-row-startvideopart'; + $thstartvideopart = new html_table_cell($strstartvideopart); + $thstartvideopart->header = true; + $rowstartvideopart->cells = [$thstartvideopart, $strparticipantsvideo]; + $table->data[] = $rowstartvideopart; } // Show audio options. - $table->data[] = [$straudioopt, get_string('audio_' . $zoom->option_audio, 'mod_zoom')]; + $rowaudioopt = new html_table_row(); + $rowaudioopt->id = 'media-row-audioopt'; + $thaudioopt = new html_table_cell($straudioopt); + $thaudioopt->header = true; + $rowaudioopt->cells = [$thaudioopt, get_string('audio_' . $zoom->option_audio, 'mod_zoom')]; + $table->data[] = $rowaudioopt; // Show audio default configuration. - $table->data[] = [$strmuteuponentry, ($zoom->option_mute_upon_entry) ? $stryes : $strno]; + $rowmuteuponentry = new html_table_row(); + $rowmuteuponentry->id = 'media-row-muteuponentry'; + $thmuteuponentry = new html_table_cell($strmuteuponentry); + $thmuteuponentry->header = true; + $rowmuteuponentry->cells = [$thmuteuponentry, ($zoom->option_mute_upon_entry) ? $stryes : $strno]; + $table->data[] = $rowmuteuponentry; // Show dial-in information. if ( @@ -480,12 +592,18 @@ '', ['id' => 'show-more-body', 'style' => 'display: none;'] ); - $table->data[] = [$strmeetinginvite, html_writer::div($showbutton . $meetinginvitebody, '')]; + $rowmeetinginvite = new html_table_row(); + $rowmeetinginvite->id = 'media-row-meetinginvite'; + $thmeetinginvite = new html_table_cell($strmeetinginvite); + $thmeetinginvite->header = true; + $rowmeetinginvite->cells = [$thmeetinginvite, html_writer::div($showbutton . $meetinginvitebody, '')]; + $table->data[] = $rowmeetinginvite; } } // Output table. echo html_writer::table($table); + echo $OUTPUT->box_end(); } // Supplementary feature: All meetings link. From 095500bd6410f64947d5f935885cc73ef3a8fda6 Mon Sep 17 00:00:00 2001 From: Jonathan Champ Date: Fri, 2 Aug 2024 16:36:16 -0400 Subject: [PATCH 2/5] view: minor moodle-cs comment fix --- view.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/view.php b/view.php index 43103ef9..adc54b4d 100755 --- a/view.php +++ b/view.php @@ -285,7 +285,7 @@ $rowmeetingtime->cells = [$thmeetingtime, $tdmeetingtime]; $table->data[] = $rowmeetingtime; - // Show meeting duration + // Show meeting duration. if (!$isrecurringnotime) { $rowduration = new html_table_row(); $rowduration->id = 'schedule-row-duration'; From 7818c628e7658ad4fd0d019bec3b9f1927bc12a5 Mon Sep 17 00:00:00 2001 From: Alan McCoy Date: Thu, 29 Aug 2024 13:54:27 -0400 Subject: [PATCH 3/5] Edits from code review suggestions --- view.php | 190 +++++++++++++++++++++++++++---------------------------- 1 file changed, 95 insertions(+), 95 deletions(-) diff --git a/view.php b/view.php index adc54b4d..f96ce74d 100755 --- a/view.php +++ b/view.php @@ -245,7 +245,7 @@ } if ($zoom->show_schedule) { - echo $OUTPUT->box_start('', 'section-schedule'); + echo $OUTPUT->box_start('', 'zoom_section-schedule'); // Output "Schedule" heading. echo $OUTPUT->heading(get_string('schedule', 'mod_zoom'), 3); @@ -258,40 +258,40 @@ // Show start/end date or recurring meeting information. $rowmeetingtime = new html_table_row(); - $rowmeetingtime->id = 'schedule-row-meetingtime'; - $thmeetingtime = new html_table_cell(); - $thmeetingtime->header = true; - $tdmeetingtime = new html_table_cell(); + $rowmeetingtime->id = 'zoom_schedule-meetingtime'; + $meetingtimeheader = new html_table_cell(); + $meetingtimeheader->header = true; + $meetingtimetext = new html_table_cell(); if ($isrecurringnotime) { - $thmeetingtime->text = get_string('recurringmeeting', 'mod_zoom'); - $tdmeetingtime->text = get_string('recurringmeetingexplanation', 'mod_zoom'); + $meetingtimeheader->text = get_string('recurringmeeting', 'mod_zoom'); + $meetingtimetext->text = get_string('recurringmeetingexplanation', 'mod_zoom'); } else if ($zoom->recurring && $zoom->recurrence_type != ZOOM_RECURRINGTYPE_NOTIME) { - $thmeetingtime->text = get_string('recurringmeeting', 'mod_zoom'); - $tdmeetingtime->text = get_string('recurringmeetingthisis', 'mod_zoom'); + $meetingtimeheader->text = get_string('recurringmeeting', 'mod_zoom'); + $meetingtimetext->text = get_string('recurringmeetingthisis', 'mod_zoom'); $nextoccurrence = zoom_get_next_occurrence($zoom); + $meetingtimeheader->text = get_string('nextoccurrence', 'mod_zoom'); if ($nextoccurrence > 0) { - $thmeetingtime->text = get_string('nextoccurrence', 'mod_zoom'); - $tdmeetingtime->text = userdate($nextoccurrence); + $meetingtimetext->text = userdate($nextoccurrence); } else { - $thmeetingtime->text = get_string('nextoccurrence', 'mod_zoom'); - $tdmeetingtime->text = get_string('nooccurrenceleft', 'mod_zoom'); + + $meetingtimetext->text = get_string('nooccurrenceleft', 'mod_zoom'); } } else { - $thmeetingtime->text = $strtime; - $tdmeetingtime->text = userdate($zoom->start_time); + $meetingtimeheader->text = $strtime; + $meetingtimetext->text = userdate($zoom->start_time); } - $rowmeetingtime->cells = [$thmeetingtime, $tdmeetingtime]; + $rowmeetingtime->cells = [$meetingtimeheader, $meetingtimetext]; $table->data[] = $rowmeetingtime; // Show meeting duration. if (!$isrecurringnotime) { $rowduration = new html_table_row(); - $rowduration->id = 'schedule-row-duration'; - $thduration = new html_table_cell($strduration); - $thduration->header = true; - $rowduration->cells = [$thduration, format_time($zoom->duration)]; + $rowduration->id = 'zoom_schedule-duration'; + $durationheader = new html_table_cell($strduration); + $durationheader->header = true; + $rowduration->cells = [$durationheader, format_time($zoom->duration)]; $table->data[] = $rowduration; } @@ -305,10 +305,10 @@ $recordinghtml .= $recordingaddhtml; $rowrecordings = new html_table_row(); - $rowrecordings->id = 'schedule-row-recordings'; - $threcording = new html_table_cell(get_string('recordings', 'mod_zoom')); - $threcording->header = true; - $rowrecordings->cells = [$threcording, $recordinghtml]; + $rowrecordings->id = 'zoom_schedule-recordings'; + $recordingheader = new html_table_cell(get_string('recordings', 'mod_zoom')); + $recordingheader->header = true; + $rowrecordings->cells = [$recordingheader, $recordinghtml]; $table->data[] = $rowrecordings; } @@ -319,10 +319,10 @@ $calendarbutton = html_writer::div($calendaricon . ' ' . get_string('downloadical', 'mod_zoom'), 'btn btn-primary'); $buttonhtml = html_writer::link((string) $icallink, $calendarbutton, ['target' => '_blank']); $rowaddtocalendar = new html_table_row(); - $rowaddtocalendar->id = 'schedule-row-addtocalendar'; - $thaddtocalendar = new html_table_cell(get_string('addtocalendar', 'mod_zoom')); - $thaddtocalendar->header = true; - $rowaddtocalendar->cells = [$thaddtocalendar, $buttonhtml]; + $rowaddtocalendar->id = 'zoom_schedule-addtocalendar'; + $addtocalendarheader = new html_table_cell(get_string('addtocalendar', 'mod_zoom')); + $addtocalendarheader->header = true; + $rowaddtocalendar->cells = [$addtocalendarheader, $buttonhtml]; $table->data[] = $rowaddtocalendar; } @@ -338,10 +338,10 @@ $status = get_string('meeting_not_started', 'mod_zoom'); } $rowstatus = new html_table_row(); - $rowstatus->id = 'schedule-row-status'; - $thstatus = new html_table_cell($strstatus); - $thstatus->header = true; - $rowstatus->cells = [$thstatus, $status]; + $rowstatus->id = 'zoom_schedule-status'; + $statusheader = new html_table_cell($strstatus); + $statusheader->header = true; + $rowstatus->cells = [$statusheader, $status]; $table->data[] = $rowstatus; } @@ -349,10 +349,10 @@ $hostdisplayname = zoom_get_user_display_name($zoom->host_id); if (isset($hostdisplayname)) { $rowhost = new html_table_row(); - $rowhost->id = 'schedule-row-host'; - $thhost = new html_table_cell($strhost); - $thhost->header = true; - $rowhost->cells = [$thhost, $hostdisplayname]; + $rowhost->id = 'zoom_schedule-host'; + $hostheader = new html_table_cell($strhost); + $hostheader->header = true; + $rowhost->cells = [$hostheader, $hostdisplayname]; $table->data[] = $rowhost; } @@ -361,9 +361,9 @@ if ($config->showalternativehosts != ZOOM_ALTERNATIVEHOSTS_DISABLE && !empty($zoom->alternative_hosts)) { // If the admin did show the alternative hosts user picker, we try to show the real names of the users here. $rowshowalternativehosts = new html_table_row(); - $rowshowalternativehosts->id = 'schedule-row-showalternativehosts'; - $thalternativehosts = new html_table_cell(get_string('alternative_hosts', 'mod_zoom')); - $thalternativehosts->header = true; + $rowshowalternativehosts->id = 'zoom_schedule-showalternativehosts'; + $alternativehostsheader = new html_table_cell(get_string('alternative_hosts', 'mod_zoom')); + $alternativehostsheader->header = true; if ($config->showalternativehosts == ZOOM_ALTERNATIVEHOSTS_PICKER) { // Unfortunately, the host is not only able to add alternative hosts in Moodle with the user picker. @@ -398,11 +398,11 @@ } // Output the concatenated string of alternative hosts. - $rowshowalternativehosts->cells = [$thalternativehosts, $alternativehoststring]; + $rowshowalternativehosts->cells = [$alternativehostsheader, $alternativehoststring]; // Otherwise we stick with the plain list of email addresses as we got it from Zoom directly. } else { - $rowshowalternativehosts->cells = [$thalternativehosts, $zoom->alternative_hosts]; + $rowshowalternativehosts->cells = [$alternativehostsheader, $zoom->alternative_hosts]; } $table->data[] = $rowshowalternativehosts; @@ -414,10 +414,10 @@ $sessionsurl = new moodle_url('/mod/zoom/report.php', ['id' => $cm->id]); $sessionslink = html_writer::link($sessionsurl, get_string('sessionsreport', 'mod_zoom')); $rowsessions = new html_table_row(); - $rowsessions->id = 'schedule-row-sessions'; - $thsessions = new html_table_cell(get_string('sessions', 'mod_zoom')); - $thsessions->header = true; - $rowsessions->cells = [$thsessions, $sessionslink]; + $rowsessions->id = 'zoom_schedule-sessions'; + $sessionsheader = new html_table_cell(get_string('sessions', 'mod_zoom')); + $sessionsheader->header = true; + $rowsessions->cells = [$sessionsheader, $sessionslink]; $table->data[] = $rowsessions; } @@ -427,7 +427,7 @@ } if ($zoom->show_security) { - echo $OUTPUT->box_start('', 'section-security'); + echo $OUTPUT->box_start('', 'zoom_section-security'); // Output "Security" heading. echo $OUTPUT->heading(get_string('security', 'mod_zoom'), 3); @@ -445,29 +445,29 @@ // Show passcode status. $rowhaspass = new html_table_row(); - $rowhaspass->id = 'security-row-haspass'; - $thhaspass = new html_table_cell($strpassprotect); - $thhaspass->header = true; - $rowhaspass->cells = [$thhaspass, $strhaspass]; + $rowhaspass->id = 'zoom_security-haspass'; + $haspassheader = new html_table_cell($strpassprotect); + $haspassheader->header = true; + $rowhaspass->cells = [$haspassheader, $strhaspass]; $table->data[] = $rowhaspass; // Show passcode. if ($haspassword && ($canviewjoinurl || get_config('zoom', 'displaypassword'))) { $rowpassword = new html_table_row(); - $rowpassword->id = 'security-row-password'; - $thpassword = new html_table_cell($strpassword); - $thpassword->header = true; - $rowpassword->cells = [$thpassword, $zoom->password]; + $rowpassword->id = 'zoom_security-password'; + $passwordheader = new html_table_cell($strpassword); + $passwordheader->header = true; + $rowpassword->cells = [$passwordheader, $zoom->password]; $table->data[] = $rowpassword; } // Show join link. if ($canviewjoinurl) { $rowjoinurl = new html_table_row(); - $rowjoinurl->id = 'security-row-joinurl'; - $thjoinurl = new html_table_cell($strjoinlink); - $thjoinurl->header = true; - $rowjoinurl->cells = [$thjoinurl, html_writer::link($zoom->join_url, $zoom->join_url, ['target' => '_blank'])]; + $rowjoinurl->id = 'zoom_security-joinurl'; + $joinurlheader = new html_table_cell($strjoinlink); + $joinurlheader->header = true; + $rowjoinurl->cells = [$joinurlheader, html_writer::link($zoom->join_url, $zoom->join_url, ['target' => '_blank'])]; $table->data[] = $rowjoinurl; } @@ -478,10 +478,10 @@ ? $strencryptionendtoend : $strencryptionenhanced; $rowencryption = new html_table_row(); - $rowencryption->id = 'security-row-encryption'; - $thencryption = new html_table_cell($strencryption); - $thencryption->header = true; - $rowencryption->cells = [$thencryption, $strenc]; + $rowencryption->id = 'zoom_security-encryption'; + $encryptionheader = new html_table_cell($strencryption); + $encryptionheader->header = true; + $rowencryption->cells = [$encryptionheader, $strenc]; $table->data[] = $rowencryption; } } @@ -490,10 +490,10 @@ if (!$zoom->webinar) { $strwr = ($zoom->option_waiting_room) ? $stryes : $strno; $rowwaitingroom = new html_table_row(); - $rowwaitingroom->id = 'security-row-waitingroom'; - $thwaitingroom = new html_table_cell($strwwaitingroom); - $thwaitingroom->header = true; - $rowwaitingroom->cells = [$thwaitingroom, $strwr]; + $rowwaitingroom->id = 'zoom_security-waitingroom'; + $waitingroomheader = new html_table_cell($strwwaitingroom); + $waitingroomheader->header = true; + $rowwaitingroom->cells = [$waitingroomheader, $strwr]; $table->data[] = $rowwaitingroom; } @@ -501,19 +501,19 @@ if (!$zoom->webinar) { $strjbh = ($zoom->option_jbh) ? $stryes : $strno; $rowjoinbeforehost = new html_table_row(); - $rowjoinbeforehost->id = 'security-row-joinbeforehost'; - $thjoinbeforehost = new html_table_cell($strjoinbeforehost); - $thjoinbeforehost->header = true; - $rowjoinbeforehost->cells = [$thjoinbeforehost, $strjbh]; + $rowjoinbeforehost->id = 'zoom_security-joinbeforehost'; + $joinbeforehostheader = new html_table_cell($strjoinbeforehost); + $joinbeforehostheader->header = true; + $rowjoinbeforehost->cells = [$joinbeforehostheader, $strjbh]; $table->data[] = $rowjoinbeforehost; } // Show authentication. $rowauthenticatedusers = new html_table_row(); - $rowauthenticatedusers->id = 'security-row-authenticatedusers'; - $thauthenticatedusers = new html_table_cell($strauthenticatedusers); - $thauthenticatedusers->header = true; - $rowauthenticatedusers->cells = [$thauthenticatedusers, $zoom->option_authenticated_users]; + $rowauthenticatedusers->id = 'zoom_security-authenticatedusers'; + $authenticatedusersheader = new html_table_cell($strauthenticatedusers); + $authenticatedusersheader->header = true; + $rowauthenticatedusers->cells = [$authenticatedusersheader, $zoom->option_authenticated_users ? $stryes : $strno]; $table->data[] = $rowauthenticatedusers; // Output table. @@ -522,7 +522,7 @@ } if ($zoom->show_media) { - echo $OUTPUT->box_start('', 'section-media'); + echo $OUTPUT->box_start('', 'zoom_section-media'); // Output "Media" heading. echo $OUTPUT->heading(get_string('media', 'mod_zoom'), 3); @@ -537,10 +537,10 @@ if (!$zoom->webinar) { $strvideohost = ($zoom->option_host_video) ? $stryes : $strno; $rowshowhostvideo = new html_table_row(); - $rowshowhostvideo->id = 'media-row-showhostvideo'; - $thshowhostvideo = new html_table_cell($strstartvideohost); - $thshowhostvideo->header = true; - $rowshowhostvideo->cells = [$thshowhostvideo, $strvideohost]; + $rowshowhostvideo->id = 'zoom_media-showhostvideo'; + $showhostvideoheader = new html_table_cell($strstartvideohost); + $showhostvideoheader->header = true; + $rowshowhostvideo->cells = [$showhostvideoheader, $strvideohost]; $table->data[] = $rowshowhostvideo; } @@ -548,27 +548,27 @@ if (!$zoom->webinar) { $strparticipantsvideo = ($zoom->option_participants_video) ? $stryes : $strno; $rowstartvideopart = new html_table_row(); - $rowstartvideopart->id = 'media-row-startvideopart'; - $thstartvideopart = new html_table_cell($strstartvideopart); - $thstartvideopart->header = true; - $rowstartvideopart->cells = [$thstartvideopart, $strparticipantsvideo]; + $rowstartvideopart->id = 'zoom_media-startvideopart'; + $startvideopartheader = new html_table_cell($strstartvideopart); + $startvideopartheader->header = true; + $rowstartvideopart->cells = [$startvideopartheader, $strparticipantsvideo]; $table->data[] = $rowstartvideopart; } // Show audio options. $rowaudioopt = new html_table_row(); - $rowaudioopt->id = 'media-row-audioopt'; - $thaudioopt = new html_table_cell($straudioopt); - $thaudioopt->header = true; - $rowaudioopt->cells = [$thaudioopt, get_string('audio_' . $zoom->option_audio, 'mod_zoom')]; + $rowaudioopt->id = 'zoom_media-audioopt'; + $audiooptheader = new html_table_cell($straudioopt); + $audiooptheader->header = true; + $rowaudioopt->cells = [$audiooptheader, get_string('audio_' . $zoom->option_audio, 'mod_zoom')]; $table->data[] = $rowaudioopt; // Show audio default configuration. $rowmuteuponentry = new html_table_row(); - $rowmuteuponentry->id = 'media-row-muteuponentry'; - $thmuteuponentry = new html_table_cell($strmuteuponentry); - $thmuteuponentry->header = true; - $rowmuteuponentry->cells = [$thmuteuponentry, ($zoom->option_mute_upon_entry) ? $stryes : $strno]; + $rowmuteuponentry->id = 'zoom_media-muteuponentry'; + $muteuponentryheader = new html_table_cell($strmuteuponentry); + $muteuponentryheader->header = true; + $rowmuteuponentry->cells = [$muteuponentryheader, ($zoom->option_mute_upon_entry) ? $stryes : $strno]; $table->data[] = $rowmuteuponentry; // Show dial-in information. @@ -593,10 +593,10 @@ ['id' => 'show-more-body', 'style' => 'display: none;'] ); $rowmeetinginvite = new html_table_row(); - $rowmeetinginvite->id = 'media-row-meetinginvite'; - $thmeetinginvite = new html_table_cell($strmeetinginvite); - $thmeetinginvite->header = true; - $rowmeetinginvite->cells = [$thmeetinginvite, html_writer::div($showbutton . $meetinginvitebody, '')]; + $rowmeetinginvite->id = 'zoom_media-meetinginvite'; + $meetinginviteheader = new html_table_cell($strmeetinginvite); + $meetinginviteheader->header = true; + $rowmeetinginvite->cells = [$meetinginviteheader, html_writer::div($showbutton . $meetinginvitebody, '')]; $table->data[] = $rowmeetinginvite; } } From d750c05c576c44780e65fd24bc1a1396cad90760 Mon Sep 17 00:00:00 2001 From: Alan McCoy Date: Fri, 13 Sep 2024 10:43:50 -0400 Subject: [PATCH 4/5] Make sure recurring meeting status is displayed before next occurrence time. Co-authored-by: Jonathan Champ --- view.php | 11 +++++++++-- 1 file changed, 9 insertions(+), 2 deletions(-) diff --git a/view.php b/view.php index f96ce74d..755bf7e5 100755 --- a/view.php +++ b/view.php @@ -267,8 +267,15 @@ $meetingtimeheader->text = get_string('recurringmeeting', 'mod_zoom'); $meetingtimetext->text = get_string('recurringmeetingexplanation', 'mod_zoom'); } else if ($zoom->recurring && $zoom->recurrence_type != ZOOM_RECURRINGTYPE_NOTIME) { - $meetingtimeheader->text = get_string('recurringmeeting', 'mod_zoom'); - $meetingtimetext->text = get_string('recurringmeetingthisis', 'mod_zoom'); + $meetingrecurringheader = new html_table_cell(); + $meetingrecurringheader->header = true; + $meetingrecurringheader->text = get_string('recurringmeeting', 'mod_zoom'); + $meetingrecurringtext = new html_table_cell(); + $meetingrecurringtext->text = get_string('recurringmeetingthisis', 'mod_zoom'); + $rowmeetingrecurring = new html_table_row(); + $rowmeetingrecurring ->id = 'zoom_schedule-meetingrecurring'; + $rowmeetingrecurring->cells = [$meetingrecurringheader, $meetingrecurringtext]; + $table->data[] = $rowmeetingrecurring; $nextoccurrence = zoom_get_next_occurrence($zoom); $meetingtimeheader->text = get_string('nextoccurrence', 'mod_zoom'); if ($nextoccurrence > 0) { From 160cae3bd15ab875b9315ae970c81e23e9ae2616 Mon Sep 17 00:00:00 2001 From: Jonathan Champ Date: Fri, 13 Sep 2024 14:07:09 -0400 Subject: [PATCH 5/5] fixup! Make sure recurring meeting status is displayed before next occurrence time. --- view.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/view.php b/view.php index 755bf7e5..8a142b7b 100755 --- a/view.php +++ b/view.php @@ -273,7 +273,7 @@ $meetingrecurringtext = new html_table_cell(); $meetingrecurringtext->text = get_string('recurringmeetingthisis', 'mod_zoom'); $rowmeetingrecurring = new html_table_row(); - $rowmeetingrecurring ->id = 'zoom_schedule-meetingrecurring'; + $rowmeetingrecurring->id = 'zoom_schedule-meetingrecurring'; $rowmeetingrecurring->cells = [$meetingrecurringheader, $meetingrecurringtext]; $table->data[] = $rowmeetingrecurring; $nextoccurrence = zoom_get_next_occurrence($zoom);