From 5f46466d1964d7c94ec9364d6d842c5bbcbd8ab0 Mon Sep 17 00:00:00 2001 From: Karen Liu <36342242+karenliulll@users.noreply.github.com> Date: Wed, 3 Apr 2024 14:18:02 -0400 Subject: [PATCH 1/4] Cleanup: move function from view.php to locallib --- locallib.php | 27 +++++++++++++++++++++++++++ view.php | 27 --------------------------- 2 files changed, 27 insertions(+), 27 deletions(-) diff --git a/locallib.php b/locallib.php index 6f42e2c9..019b9266 100755 --- a/locallib.php +++ b/locallib.php @@ -1314,3 +1314,30 @@ function zoom_get_registrant_join_url($useremail, $meetingid, $iswebinar) { return false; } + +/** + * Get the display name for a Zoom user. + * This is wrapped in a function to avoid unnecessary API calls. + * + * @package mod_zoom + * @param string $zoomuserid Zoom user ID. + * @return ?string + */ +function zoom_get_user_display_name($zoomuserid) { + try { + $hostuser = zoom_get_user($zoomuserid); + + // Compose Moodle user object for host. + $hostmoodleuser = new stdClass(); + $hostmoodleuser->firstname = $hostuser->first_name; + $hostmoodleuser->lastname = $hostuser->last_name; + $hostmoodleuser->alternatename = ''; + $hostmoodleuser->firstnamephonetic = ''; + $hostmoodleuser->lastnamephonetic = ''; + $hostmoodleuser->middlename = ''; + + return fullname($hostmoodleuser); + } catch (moodle_exception $error) { + return null; + } +} diff --git a/view.php b/view.php index d946ec9f..bf1033b8 100755 --- a/view.php +++ b/view.php @@ -90,33 +90,6 @@ } } -/** - * Get the display name for a Zoom user. - * This is wrapped in a function to avoid unnecessary API calls. - * - * @package mod_zoom - * @param string $zoomuserid Zoom user ID. - * @return ?string - */ -function zoom_get_user_display_name($zoomuserid) { - try { - $hostuser = zoom_get_user($zoomuserid); - - // Compose Moodle user object for host. - $hostmoodleuser = new stdClass(); - $hostmoodleuser->firstname = $hostuser->first_name; - $hostmoodleuser->lastname = $hostuser->last_name; - $hostmoodleuser->alternatename = ''; - $hostmoodleuser->firstnamephonetic = ''; - $hostmoodleuser->lastnamephonetic = ''; - $hostmoodleuser->middlename = ''; - - return fullname($hostmoodleuser); - } catch (moodle_exception $error) { - return null; - } -} - $isrecurringnotime = ($zoom->recurring && $zoom->recurrence_type == ZOOM_RECURRINGTYPE_NOTIME); $stryes = get_string('yes'); From 6e513660b8ea1519c822996abd0dcc1b27e91394 Mon Sep 17 00:00:00 2001 From: Jonathan Champ Date: Mon, 8 Apr 2024 11:56:05 -0400 Subject: [PATCH 2/4] phpcs: add blank line after header; explicit nullable types; ignore test methods --- classes/invitation.php | 4 ++-- lib.php | 18 +++++++++--------- locallib.php | 1 - participants.php | 8 ++++++-- recreate.php | 1 + report.php | 1 + tests/generator/lib.php | 4 ++-- tests/mod_zoom_webservice_test.php | 12 ++++++------ view.php | 1 + 9 files changed, 28 insertions(+), 22 deletions(-) diff --git a/classes/invitation.php b/classes/invitation.php index d6bd9c36..f96aeb57 100644 --- a/classes/invitation.php +++ b/classes/invitation.php @@ -60,9 +60,9 @@ public function __construct($invitation) { * * @param int $coursemoduleid Course module where the user will view the invitation. * @param int|null $userid Optionally supply the intended user to view the string. Defaults to global $USER. - * @return string|null + * @return ?string */ - public function get_display_string(int $coursemoduleid, int $userid = null) { + public function get_display_string(int $coursemoduleid, ?int $userid = null) { if (empty($this->invitation)) { return null; } diff --git a/lib.php b/lib.php index 5f5e9674..59bc79f8 100755 --- a/lib.php +++ b/lib.php @@ -64,10 +64,10 @@ function zoom_supports($feature) { * will create a new instance and return the id number of the new instance. * * @param stdClass $zoom Submitted data from the form in mod_form.php - * @param mod_zoom_mod_form $mform The form instance (included because the function is used as a callback) + * @param mod_zoom_mod_form|null $mform The form instance (included because the function is used as a callback) * @return int The id of the newly inserted zoom record */ -function zoom_add_instance(stdClass $zoom, mod_zoom_mod_form $mform = null) { +function zoom_add_instance(stdClass $zoom, ?mod_zoom_mod_form $mform = null) { global $CFG, $DB; require_once($CFG->dirroot . '/mod/zoom/locallib.php'); @@ -143,10 +143,10 @@ function zoom_add_instance(stdClass $zoom, mod_zoom_mod_form $mform = null) { * will update an existing instance with new data. * * @param stdClass $zoom An object from the form in mod_form.php - * @param mod_zoom_mod_form $mform The form instance (included because the function is used as a callback) + * @param mod_zoom_mod_form|null $mform The form instance (included because the function is used as a callback) * @return boolean Success/Failure */ -function zoom_update_instance(stdClass $zoom, mod_zoom_mod_form $mform = null) { +function zoom_update_instance(stdClass $zoom, ?mod_zoom_mod_form $mform = null) { global $CFG, $DB; require_once($CFG->dirroot . '/mod/zoom/locallib.php'); @@ -586,10 +586,10 @@ function zoom_get_monthweek_options() { * Populate the calendar event object, based on the zoom instance * * @param stdClass $zoom The zoom instance. - * @param stdClass $occurrence The occurrence object passed from the zoom api. + * @param stdClass|null $occurrence The occurrence object passed from the zoom api. * @return stdClass The calendar event object. */ -function zoom_populate_calender_item(stdClass $zoom, stdClass $occurrence = null) { +function zoom_populate_calender_item(stdClass $zoom, ?stdClass $occurrence = null) { $event = new stdClass(); $event->type = CALENDAR_EVENT_TYPE_ACTION; $event->modulename = 'zoom'; @@ -873,7 +873,7 @@ function zoom_reset_userdata($data) { * * @param object $mform the course reset form that is being built. */ -function zoom_reset_course_form_definition(&$mform) { +function zoom_reset_course_form_definition($mform) { $mform->addElement('header', 'zoomheader', get_string('modulenameplural', 'zoom')); $mform->addElement('checkbox', 'reset_zoom_all', get_string('resetzoomsall', 'zoom')); @@ -973,9 +973,9 @@ function zoom_extend_navigation(navigation_node $navref, stdClass $course, stdCl * so it is safe to rely on the $PAGE. * * @param settings_navigation $settingsnav complete settings navigation tree - * @param navigation_node $zoomnode zoom administration node + * @param navigation_node|null $zoomnode zoom administration node */ -function zoom_extend_settings_navigation(settings_navigation $settingsnav, navigation_node $zoomnode = null) { +function zoom_extend_settings_navigation(settings_navigation $settingsnav, ?navigation_node $zoomnode = null) { } /** diff --git a/locallib.php b/locallib.php index 019b9266..0a3d8aa6 100755 --- a/locallib.php +++ b/locallib.php @@ -1319,7 +1319,6 @@ function zoom_get_registrant_join_url($useremail, $meetingid, $iswebinar) { * Get the display name for a Zoom user. * This is wrapped in a function to avoid unnecessary API calls. * - * @package mod_zoom * @param string $zoomuserid Zoom user ID. * @return ?string */ diff --git a/participants.php b/participants.php index 4576ed7f..2e90f46e 100644 --- a/participants.php +++ b/participants.php @@ -21,6 +21,7 @@ * @copyright 2015 UC Regents * @license http://www.gnu.org/copyleft/gpl.html GNU GPL v3 or later */ + require(__DIR__ . '/../../config.php'); require_once(__DIR__ . '/lib.php'); require_once(__DIR__ . '/locallib.php'); @@ -166,8 +167,11 @@ 'export' => 'xls', ]); $xlsstring = get_string('application/vnd.ms-excel', 'mimetypes'); - $xlsicon = html_writer::img($OUTPUT->image_url('f/spreadsheet'), $xlsstring, - ['title' => $xlsstring, 'class' => 'mimetypeicon']); + $xlsicon = html_writer::img( + $OUTPUT->image_url('f/spreadsheet'), + $xlsstring, + ['title' => $xlsstring, 'class' => 'mimetypeicon'] + ); echo get_string('export', 'mod_zoom') . ': ' . html_writer::link($exporturl, $xlsicon); echo $OUTPUT->footer(); diff --git a/recreate.php b/recreate.php index 412645aa..9b4e3e0d 100644 --- a/recreate.php +++ b/recreate.php @@ -21,6 +21,7 @@ * @copyright 2017 UC Regents * @license http://www.gnu.org/copyleft/gpl.html GNU GPL v3 or later */ + require(__DIR__ . '/../../config.php'); require_once(__DIR__ . '/lib.php'); require_once(__DIR__ . '/locallib.php'); diff --git a/report.php b/report.php index 5e35a337..3e8af364 100755 --- a/report.php +++ b/report.php @@ -21,6 +21,7 @@ * @copyright 2015 UC Regents * @license http://www.gnu.org/copyleft/gpl.html GNU GPL v3 or later */ + require(__DIR__ . '/../../config.php'); require_once(__DIR__ . '/lib.php'); require_once(__DIR__ . '/locallib.php'); diff --git a/tests/generator/lib.php b/tests/generator/lib.php index cf507501..46ad3948 100644 --- a/tests/generator/lib.php +++ b/tests/generator/lib.php @@ -25,10 +25,10 @@ class mod_zoom_generator extends testing_module_generator { /** * Creates new Zoom module instance. * @param array|stdClass $record - * @param array $options + * @param array|null $options * @return stdClass Zoom instance */ - public function create_instance($record = null, array $options = null) { + public function create_instance($record = null, ?array $options = null) { global $CFG; require_once($CFG->dirroot . '/mod/zoom/locallib.php'); diff --git a/tests/mod_zoom_webservice_test.php b/tests/mod_zoom_webservice_test.php index d126b74f..1e2ebd06 100644 --- a/tests/mod_zoom_webservice_test.php +++ b/tests/mod_zoom_webservice_test.php @@ -54,8 +54,8 @@ public function setUp(): void { set_config('clientsecret', 'test', 'zoom'); set_config('accountid', 'test', 'zoom'); + // @codingStandardsIgnoreStart $this->notfoundmockcurl = new class { - // @codingStandardsIgnoreStart /** * Stub for curl setHeader(). * @param string $unusedparam @@ -169,8 +169,8 @@ public function test_user_not_found_exception(): void { * Tests whether invalid user errors are parsed properly */ public function test_invalid_user_exception(): void { + // @codingStandardsIgnoreStart $invalidmockcurl = new class { - // @codingStandardsIgnoreStart /** * Stub for curl setHeader(). * @param string $unusedparam @@ -230,9 +230,9 @@ public function get_info() { * is in the curl response to specify the time that the retry should be sent. */ public function test_retry_with_header(): void { + // @codingStandardsIgnoreStart $retrywithheadermockcurl = new class { public $numgetinfocalls = 0; - // @codingStandardsIgnoreStart /** * Stub for curl setHeader(). * @param string $unusedparam @@ -309,9 +309,9 @@ public function getResponse() { * header is not sent in the curl response. */ public function test_retry_without_header(): void { + // @codingStandardsIgnoreStart $retrynoheadermockcurl = new class { public $numgetinfocalls = 0; - // @codingStandardsIgnoreStart /** * Stub for curl setHeader(). * @param string $unusedparam @@ -377,9 +377,9 @@ public function getResponse() { * Tests that we throw error if we tried more than max retries. */ public function test_retry_exception(): void { + // @codingStandardsIgnoreStart $retryfailuremockcurl = new class { public $urlpath = null; - // @codingStandardsIgnoreStart /** * Stub for curl setHeader(). * @param string $unusedparam @@ -464,9 +464,9 @@ public function getResponse() { * Tests that we are waiting 1 minute for QPS rate limit types. */ public function test_retryqps_exception(): void { + // @codingStandardsIgnoreStart $retryqpsmockcurl = new class { public $urlpath = null; - // @codingStandardsIgnoreStart /** * Stub for curl setHeader(). * @param string $unusedparam diff --git a/view.php b/view.php index bf1033b8..1f7c6115 100755 --- a/view.php +++ b/view.php @@ -24,6 +24,7 @@ * @copyright 2015 UC Regents * @license http://www.gnu.org/copyleft/gpl.html GNU GPL v3 or later */ + require(__DIR__ . '/../../config.php'); require_once(__DIR__ . '/lib.php'); require_once(__DIR__ . '/locallib.php'); From fd39504eef4ec7b80860f2095e6e2817e8101e6e Mon Sep 17 00:00:00 2001 From: Jonathan Champ Date: Mon, 8 Apr 2024 18:26:13 -0400 Subject: [PATCH 3/4] lang: sort strings by key --- .github/workflows/ci.yml | 2 +- lang/en/zoom.php | 176 +++++++++++++++++++-------------------- 2 files changed, 89 insertions(+), 89 deletions(-) diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index cf9edfd8..dd7761a5 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -31,7 +31,7 @@ jobs: matrix: include: - php: '8.2' - moodle-branch: 'master' + moodle-branch: 'main' database: 'mariadb' - php: '8.2' moodle-branch: 'MOODLE_403_STABLE' diff --git a/lang/en/zoom.php b/lang/en/zoom.php index 2c7b9d7a..a5bee66f 100644 --- a/lang/en/zoom.php +++ b/lang/en/zoom.php @@ -28,33 +28,33 @@ $string['accountid'] = 'Zoom account ID'; $string['accountid_desc'] = ''; $string['actions'] = 'Actions'; -$string['activitydate:starts'] = 'Starts: '; -$string['activitydate:started'] = 'Started: '; $string['activitydate:ended'] = 'Ended: '; +$string['activitydate:started'] = 'Started: '; +$string['activitydate:starts'] = 'Starts: '; $string['addparticipant'] = 'Add a participant'; $string['addparticipantgroup'] = 'Add a group of participants'; $string['addroom'] = 'Add a room'; $string['addroomalert'] = 'Add a room by clicking'; $string['addtocalendar'] = 'Add to calendar'; +$string['allmeetings'] = 'All meetings'; +$string['allmeetings_desc'] = 'With this setting, you can control if a link to the Zoom activity index page will be shown at the bottom of every activity instance overview page or not. This setting only affects the presentation of the link on the Zoom activity overview pages. Even if you decide not to show the link there, the user might still be able to access the Zoom activity index page through other links within the course.'; +$string['allmeetings_disable'] = 'Disable all meetings link'; +$string['allmeetings_enable'] = 'Enable all meetings link'; $string['alternative_hosts'] = 'Alternative Hosts'; -$string['alternative_hosts_help'] = "The alternative host option allows you to schedule meetings and designate other Zoom user(s) to start the meeting as well. These users will receive an email from Zoom notifying them that they've been added as an alternative host, with a link to start the meeting.\n\nAs input format, please provide the email address(es) of the alternative host(s). You can separate multiple emails by a comma (without spaces)."; $string['alternative_hosts_desc'] = 'With this setting, you can control if the option to choose alternative hosts is shown to users in the activity instance settings or not. Two types of widgets are available: A plain input field which accepts comma-separated email addresses. And a user picker with autocompletion which provides easy selection of users who are enrolled into the course, have a Zoom account and have a role out of {$a->roles}. Alternative hosts which might have been set by the teacher in Zoom directly but are not selectable from within the Moodle user picker are still shown on the activity overview page and are also preserved when a meeting is updated from within Moodle.'; $string['alternative_hosts_disable'] = 'Disable alternative hosts option'; +$string['alternative_hosts_help'] = "The alternative host option allows you to schedule meetings and designate other Zoom user(s) to start the meeting as well. These users will receive an email from Zoom notifying them that they've been added as an alternative host, with a link to start the meeting.\n\nAs input format, please provide the email address(es) of the alternative host(s). You can separate multiple emails by a comma (without spaces)."; $string['alternative_hosts_inputfield'] = 'Show alternative hosts option as plain input field'; $string['alternative_hosts_picker'] = 'Show alternative hosts option as user picker with autocompletion'; $string['alternative_hosts_picker_help'] = "The alternative host option allows you to schedule meetings and designate other Zoom user(s) enrolled in this course to start the meeting as well. These users will receive an email from Zoom notifying them that they've been added as an alternative host, with a link to start the meeting.\n\nYou can pick one or multiple alternative hosts based on your meeting needs.\n\nIf you can't find a particular user in this user picker, this user either is not enrolled into this course with an appropriate role or does not have an eligible account on Zoom."; $string['alternative_hosts_picker_noneselected'] = 'No alternative host selected'; $string['alternative_hosts_picker_placeholder'] = 'Select user(s)'; -$string['allmeetings'] = 'All meetings'; -$string['allmeetings_desc'] = 'With this setting, you can control if a link to the Zoom activity index page will be shown at the bottom of every activity instance overview page or not. This setting only affects the presentation of the link on the Zoom activity overview pages. Even if you decide not to show the link there, the user might still be able to access the Zoom activity index page through other links within the course.'; -$string['allmeetings_disable'] = 'Disable all meetings link'; -$string['allmeetings_enable'] = 'Enable all meetings link'; -$string['apiidentifier'] = 'Zoom API Identifier'; -$string['apiidentifier_desc'] = 'The identifier field to use when making a call to the Zoom API'; $string['apiendpoint'] = 'Zoom API Endpoint'; $string['apiendpoint_desc'] = 'Choose which Zoom API endpoint the Zoom activity will use to connect. The global API endpoint should work for all users. The European Union (EU) API endpoint is only intended for users who have a Zoom license with the EU provisioning option. If you are unsure, use the global API endpoint.'; $string['apiendpoint_eu'] = 'EU API Endpoint'; $string['apiendpoint_global'] = 'Global API Endpoint'; +$string['apiidentifier'] = 'Zoom API Identifier'; +$string['apiidentifier_desc'] = 'The identifier field to use when making a call to the Zoom API'; $string['apiurl'] = 'Zoom API url'; $string['apiurl_desc'] = ''; $string['audio_both'] = 'Computer audio and Telephone'; @@ -80,8 +80,8 @@ $string['clientid_desc'] = ''; $string['clientsecret'] = 'Zoom client secret'; $string['clientsecret_desc'] = ''; -$string['connectionok'] = 'Connection working.'; $string['connectionfailed'] = 'Connection failed: '; +$string['connectionok'] = 'Connection working.'; $string['connectionsettings'] = 'Connection settings'; $string['connectionsettings_desc'] = 'These settings define how Moodle connects to Zoom.'; $string['connectionstatus'] = 'Connection status'; @@ -90,10 +90,10 @@ $string['defaultsettings_help'] = 'These settings define the defaults for all new Zoom meetings and webinars.'; $string['deletemeetingrecordings'] = 'Delete meeting recordings from Moodle'; $string['deleteroom'] = 'Delete room'; -$string['displayfullname'] = 'Full name'; $string['displayfirstname'] = 'First name only'; -$string['displayidfullname'] = '(user id) followed by fullname'; +$string['displayfullname'] = 'Full name'; $string['displayid'] = '(user id) only'; +$string['displayidfullname'] = '(user id) followed by fullname'; $string['displayleadtime'] = 'Display lead time'; $string['displayleadtime_desc'] = 'If enabled, the leadtime will be displayed to the users. This way, users are informed that / when they can join the meeting before the scheduled start time. This might keep users from constantly reloading the page until they can join.'; $string['displayleadtime_nohideif'] = 'Please note: This setting is only processed if the \'{$a}\' setting is set to a value greater than zero.'; @@ -105,48 +105,48 @@ $string['downloadical_enable'] = 'Enable download iCal link'; $string['duration'] = 'Duration (minutes)'; $string['encryptiontype'] = 'Encryption type'; +$string['encryptiontype_alwaysshow'] = 'Always show encryption type chooser regardless if the user can use end-to-end encryption or not'; $string['encryptiontype_desc'] = 'With this setting, you can control if the option to choose end-to-end encryption over enhanced encryption is shown to users in the activity instance settings or not. This setting only affects the Moodle activity instance settings. Even if you decide to always show the option, the user will still need end-to-end encryption in Zoom to finally enable end-to-end encryption.'; $string['encryptiontype_disable'] = 'Disable encryption type chooser'; $string['encryptiontype_showonlyife2epossible'] = 'Show encryption type chooser only if the user can use end-to-end encryption'; -$string['encryptiontype_alwaysshow'] = 'Always show encryption type chooser regardless if the user can use end-to-end encryption or not'; $string['end_date_option_after'] = 'After'; $string['end_date_option_by'] = 'By'; $string['end_date_option_occurrences'] = 'occurrences'; $string['enddate'] = 'End date'; $string['endtime'] = 'End time'; -$string['err_end_date'] = 'Recurrence end date cannot be in the past'; -$string['err_end_date_before_start'] = 'Recurrence end date cannot be before start date'; $string['err_downloadicaldisabled'] = 'Downloading Zoom meeting iCal files was disabled.'; -$string['err_downloadicalrecurringnofixed'] = 'Downloading Zoom meeting iCal file is not possible for this meeting as it is a recurring meeting with no fixed time.'; $string['err_downloadicalrecurringempty'] = 'Downloading Zoom meeting iCal file is not possible for this meeting as it does not contain at least a single occurrence.'; +$string['err_downloadicalrecurringnofixed'] = 'Downloading Zoom meeting iCal file is not possible for this meeting as it is a recurring meeting with no fixed time.'; $string['err_duration_nonpositive'] = 'The duration must be positive.'; $string['err_duration_too_long'] = 'The duration cannot exceed 150 hours.'; -$string['err_long_timeframe'] = 'Requested time frame too long, showing results of latest month in range.'; +$string['err_end_date'] = 'Recurrence end date cannot be in the past'; +$string['err_end_date_before_start'] = 'Recurrence end date cannot be before start date'; $string['err_invalid_password'] = 'Passcode contains invalid characters.'; +$string['err_long_timeframe'] = 'Requested time frame too long, showing results of latest month in range.'; $string['err_password'] = 'Passcode may only contain the following characters: [a-z A-Z 0-9 @ - _ *]. Max of 10 characters.'; $string['err_password_required'] = 'Passcode is required.'; -$string['err_repeat_weekly_interval'] = 'Max interval for weekly meeting is 12 weeks'; $string['err_repeat_monthly_interval'] = 'Max interval for monthly meeting is 3 months'; +$string['err_repeat_weekly_interval'] = 'Max interval for weekly meeting is 12 weeks'; $string['err_start_time_past'] = 'The start date cannot be in the past.'; $string['err_start_time_past_recurring'] = 'For recurring meetings, the date portion of this field is the earliest possible date for the next meeting. This date must be today or in the future.'; $string['err_weekly_days'] = 'Select day(s) for the recurring weekly meeting'; $string['erroraddinstance'] = 'Could not create new zoom meeting. Invalid options selected for a recurring meeting.'; +$string['errorwebservice'] = 'Zoom webservice error: {$a}.'; $string['errorwebservice_badrequest'] = 'Zoom received a bad request: {$a}'; $string['errorwebservice_notfound'] = 'The resource does not exists'; -$string['errorwebservice'] = 'Zoom webservice error: {$a}.'; $string['export'] = 'Export'; $string['externaluser'] = 'External user'; $string['firstjoin'] = 'First able to join'; $string['firstjoin_desc'] = 'The earliest a user can join a scheduled meeting (minutes before start).'; -$string['getmeetingreports'] = 'Get meeting report from Zoom'; $string['getmeetingrecordings'] = 'Get meeting recordings from Zoom'; +$string['getmeetingreports'] = 'Get meeting report from Zoom'; $string['globalsettings'] = 'Global settings'; $string['globalsettings_desc'] = 'These settings apply to the Zoom plugin as a whole.'; $string['grading_needgrade'] = "The following users need to be graded manually as they could not be identified:\n"; $string['grading_notenrolled'] = "The following users joined the meeting but were not recognized as enroled users:\n"; $string['grading_notfound'] = "List of users who clicked to join the meeting, but were not recognized in the participant report:\n"; +$string['gradingentry'] = 'Upon entry'; $string['gradinglink'] = 'Review or update grades'; -$string['gradingmessagesubject'] = 'User grades for Zoom meeting: {$a->name}'; $string['gradingmessagebody'] = 'For Zoom Meeting session: {$a->zoomurl};
Number of users that have been automatically graded according to their duration in the meeting: {$a->graded}. @@ -159,14 +159,10 @@ {$a->notfound}
{$a->notenrolled}'; -$string['gradingsmallmeassage'] = 'User grades quick report for {$a->name}: -
-Need manual grading: {$a->number} -
-Graded users: {$a->graded + $a->alreadygraded}'; +$string['gradingmessagesubject'] = 'User grades for Zoom meeting: {$a->name}'; +$string['gradingmethod'] = 'Grading method'; $string['gradingmethod_heading'] = 'Options for grading method'; $string['gradingmethod_heading_help'] = 'Decide which method to use when grading Zoom participation.'; -$string['gradingmethod'] = 'Grading method'; $string['gradingmethod_help'] = 'Choose the method to use when grading student participation.
Upon entry: the student receives full marks (max grade) when they click to join the meeting in Moodle.
Attendance duration: the student receives a score based on the percentage of their meeting attendance compared to the total meeting duration.
@@ -174,8 +170,12 @@ - This method requires the display name to contain id or fullname.
- It is recommended to set the setting \'zoom | defaultjoinbeforehost\' to (No) so the meeting duration is accurate.
- Some students who are already signed in to the Zoom client with details not matching those in Moodle must be graded manually after reviewing the meeting report.'; -$string['gradingentry'] = 'Upon entry'; $string['gradingperiod'] = 'Attendance Duration'; +$string['gradingsmallmeassage'] = 'User grades quick report for {$a->name}: +
+Need manual grading: {$a->number} +
+Graded users: {$a->graded + $a->alreadygraded}'; $string['host'] = 'Host'; $string['hostintro'] = 'Alternative Hosts can start Zoom meetings and manage the Waiting Room.'; $string['indicator:cognitivedepth'] = 'Zoom cognitive'; @@ -184,19 +184,8 @@ $string['indicator:socialbreadth_help'] = 'This indicator is based on the social breadth reached by the student in a Zoom activity.'; $string['instanceusers'] = 'Check instance users'; $string['instanceusers_desc'] = 'If Redefine licenses is enabled, only check licensed users on this Moodle instance. Useful for setups where separate instances are dividing up a single pool of Zoom licenses.'; -$string['invalidscheduleuser'] = 'You cannot schedule for the specified user.'; $string['invalid_status'] = 'Status invalid, check the database.'; -$string['invitationmatchnotfound'] = 'No match found in zoom invitation for element: "{$a->element}" with pattern: "{$a->pattern}".'; -$string['invitationmodificationfailed'] = 'Error in regex for zoom invitation element: "{$a->element}" with pattern: "{$a->pattern}".'; -$string['invitationregex'] = 'Zoom invitation regex and capabilities'; -$string['invitationregex_help'] = 'Define the regex patterns to isolate each part of a zoom invitation so the information can be controlled by capabilities.'; -$string['invitationregex_nohideif'] = 'Please note: The regex patterns will only be used if the \'{$a}\' setting is enabled.'; -$string['invitationregexenabled'] = 'Enable zoom invitation regex and capabilities.'; -$string['invitationregexenabled_help'] = 'When enabled, the zoom invitation shown in the activity will be broken up into elements using the following regex and capabilities will be used to decide which parts to display to each user. See zoom/viewjoinurl and zoom/viewdialin capabilities.'; -$string['invitationremoveicallink'] = 'Remove zoom invitation iCal link'; -$string['invitationremoveicallink_help'] = 'If enabled, the iCal link which may be included in the zoom meeting email message will be stripped using the invitation_icallink regex pattern.'; -$string['invitationremoveinvite'] = 'Remove zoom invitation invite message'; -$string['invitationremoveinvite_help'] = 'If enabled, the introduction sentence in the zoom meeting email message will be stripped using the invitation_invite regex pattern.'; +$string['invalidscheduleuser'] = 'You cannot schedule for the specified user.'; $string['invitation_dialin'] = 'Dial in pattern'; $string['invitation_dialin_help'] = 'The regex pattern to find the Zoom meeting dial in numbers.'; $string['invitation_h323'] = 'H.323 message pattern'; @@ -211,26 +200,37 @@ $string['invitation_onetapmobile_help'] = 'The regex pattern to find the Zoom meeting one tap mobile details.'; $string['invitation_sip'] = 'SIP pattern'; $string['invitation_sip_help'] = 'The regex pattern to find the Zoom meeting SIP information. If your invitations do not contain SIP or H.323 elements, set the matching regular expression pattern to an empty string. (This especially applies to servers with debugging enabled, because it can break the format of special file types like the iCal export.)'; +$string['invitationmatchnotfound'] = 'No match found in zoom invitation for element: "{$a->element}" with pattern: "{$a->pattern}".'; +$string['invitationmodificationfailed'] = 'Error in regex for zoom invitation element: "{$a->element}" with pattern: "{$a->pattern}".'; +$string['invitationregex'] = 'Zoom invitation regex and capabilities'; +$string['invitationregex_help'] = 'Define the regex patterns to isolate each part of a zoom invitation so the information can be controlled by capabilities.'; +$string['invitationregex_nohideif'] = 'Please note: The regex patterns will only be used if the \'{$a}\' setting is enabled.'; +$string['invitationregexenabled'] = 'Enable zoom invitation regex and capabilities.'; +$string['invitationregexenabled_help'] = 'When enabled, the zoom invitation shown in the activity will be broken up into elements using the following regex and capabilities will be used to decide which parts to display to each user. See zoom/viewjoinurl and zoom/viewdialin capabilities.'; +$string['invitationremoveicallink'] = 'Remove zoom invitation iCal link'; +$string['invitationremoveicallink_help'] = 'If enabled, the iCal link which may be included in the zoom meeting email message will be stripped using the invitation_icallink regex pattern.'; +$string['invitationremoveinvite'] = 'Remove zoom invitation invite message'; +$string['invitationremoveinvite_help'] = 'If enabled, the introduction sentence in the zoom meeting email message will be stripped using the invitation_invite regex pattern.'; $string['join'] = 'Join'; +$string['join_meeting'] = 'Join Meeting'; $string['joinbeforehost'] = 'Join meeting before host'; $string['joinbeforehostenable'] = 'Allow participants to join anytime'; $string['joinlink'] = 'Join link'; -$string['join_meeting'] = 'Join Meeting'; $string['jointime'] = 'Join time'; $string['leavetime'] = 'Leave time'; -$string['licensesnumber'] = 'Number of licenses'; +$string['licenseonjoin'] = 'Select this option if you would like the host to receive a license upon starting the meeting, as well as upon creation.'; $string['licensesettings'] = 'License settings'; $string['licensesettings_desc'] = 'These settings define the way how Moodle handles your Zoom license.'; -$string['redefinelicenses'] = 'Redefine licenses'; +$string['licensesnumber'] = 'Number of licenses'; $string['lowlicenses'] = 'If the number of your licenses exceeds those required, then when you create each new activity by the user, it will be assigned a PRO license by lowering the status of another user. The option is effective when the number of active PRO-licenses is more than 5.'; $string['maskparticipantdata'] = 'Mask participant data'; $string['maskparticipantdata_help'] = 'Prevents participant data from appearing in reports (useful for sites that mask participant data, e.g., for HIPAA).'; $string['media'] = 'Media'; -$string['meeting_nonexistent_on_zoom'] = 'Nonexistent on Zoom'; +$string['meeting_finished'] = 'Finished'; $string['meeting_invite'] = 'Phone/Dial-In info'; -$string['meeting_invite_show'] = 'Show meeting invitation'; $string['meeting_invite_hide'] = 'Hide meeting invitation'; -$string['meeting_finished'] = 'Finished'; +$string['meeting_invite_show'] = 'Show meeting invitation'; +$string['meeting_nonexistent_on_zoom'] = 'Nonexistent on Zoom'; $string['meeting_not_started'] = 'Not started'; $string['meeting_started'] = 'In progress'; $string['meeting_time'] = 'Start Time'; @@ -238,21 +238,21 @@ $string['meetingcapacitywarning_desc'] = 'With this setting, you can show a warning notification if there are more active and enrolled participants in the course than the host\'s Zoom license meeting capacity is. The notification will be shown to the host (and alternative hosts) on the Zoom activity overview page. It will recommend the host to turn to the Zoom account owner to obtain a larger Zoom license if necessary. You can change this message through Moodle language customization.'; $string['meetingcapacitywarning_disable'] = 'Disable meeting capacity warning'; $string['meetingcapacitywarning_enable'] = 'Enable meeting capacity warning'; -$string['meetingcapacitywarningheading'] = 'Meeting capacity warning:'; -$string['meetingcapacitywarningbodyrealhost'] = 'Your Zoom license has a capacity of {$a->meetingcapacity} meeting participants, but this course has {$a->eligiblemeetingparticipants} enrolled and active participants.'; $string['meetingcapacitywarningbodyalthost'] = 'The Zoom license of this meeting\'s host, {$a->hostname}, has a capacity of {$a->meetingcapacity} meeting participants, but this course has {$a->eligiblemeetingparticipants} enrolled and active participants.'; -$string['meetingcapacitywarningcontactrealhost'] = 'Please turn to the Zoom account owner to obtain a larger Zoom license if all of these course participants need to join the meeting.'; +$string['meetingcapacitywarningbodyrealhost'] = 'Your Zoom license has a capacity of {$a->meetingcapacity} meeting participants, but this course has {$a->eligiblemeetingparticipants} enrolled and active participants.'; $string['meetingcapacitywarningcontactalthost'] = 'Please ask the host to turn to the Zoom account owner to obtain a larger Zoom license if all of these course participants need to join the meeting.'; +$string['meetingcapacitywarningcontactrealhost'] = 'Please turn to the Zoom account owner to obtain a larger Zoom license if all of these course participants need to join the meeting.'; +$string['meetingcapacitywarningheading'] = 'Meeting capacity warning:'; $string['meetingparticipantsdeleted'] = 'Meeting participant user data deleted.'; $string['meetingrecordingviewsdeleted'] = 'Meeting recording user view data deleted.'; $string['messageprovider:teacher_notification'] = 'Notify teachers about user grades (according to duration) in a Zoom session'; $string['modulename'] = 'Zoom meeting'; -$string['modulenameplural'] = 'Zoom Meetings'; $string['modulename_help'] = 'Zoom is a video and web conferencing platform that gives authorized users the ability to host online meetings.'; +$string['modulenameplural'] = 'Zoom Meetings'; $string['month'] = 'Month(s)'; $string['month_day_text'] = 'of the month'; -$string['nextoccurrence'] = 'Next occurrence'; $string['newmeetings'] = 'New Meetings'; +$string['nextoccurrence'] = 'Next occurrence'; $string['nomeetinginstances'] = 'No sessions found for this meeting.'; $string['nonrecognizedusergrade'] = '(Name: {$a->userid}, grade: {$a->grade})'; $string['nooccurrenceleft'] = 'The last occurrence is already over'; @@ -275,9 +275,9 @@ $string['option_auto_recording'] = 'Automatic recording'; $string['option_auto_recording_help'] = 'Enabling this option will automatically record the meeting'; $string['option_encryption_type'] = 'Encryption'; -$string['option_encryption_type_help'] = "With this option, you control the level of encryption and privacy of this meeting.\n\n*Enhanced encryption* means that the encryption key is stored in the Zoom cloud.\n\n*End-to-end encryption* means that the encryption key is stored on your local device and no one else can obtain your encryption key, not even Zoom.\n\nPlease note that when you enable end-to-end encryption, several features will not be available from within the meeting - [See details in the Zoom documentation](https://support.zoom.us/hc/en-us/articles/360048660871)."; -$string['option_encryption_type_enhancedencryption'] = 'Enhanced encryption'; $string['option_encryption_type_endtoendencryption'] = 'End-to-end encryption'; +$string['option_encryption_type_enhancedencryption'] = 'Enhanced encryption'; +$string['option_encryption_type_help'] = "With this option, you control the level of encryption and privacy of this meeting.\n\n*Enhanced encryption* means that the encryption key is stored in the Zoom cloud.\n\n*End-to-end encryption* means that the encryption key is stored on your local device and no one else can obtain your encryption key, not even Zoom.\n\nPlease note that when you enable end-to-end encryption, several features will not be available from within the meeting - [See details in the Zoom documentation](https://support.zoom.us/hc/en-us/articles/360048660871)."; $string['option_host_video'] = 'Host video'; $string['option_host_video_help'] = 'Enabling this option will enable the host\'s video when joining the meeting. Even if you choose off, the host will have the option to start his/her video.'; $string['option_jbh'] = 'Join before host'; @@ -293,8 +293,8 @@ $string['option_waiting_room_help'] = "Enabling this option allows the host to control when a participant joins the meeting.\n\nThis option is mutually exclusive with the 'Join before host' option, so selecting one will disable the other."; $string['participantdatanotavailable'] = 'Details not available'; $string['participantdatanotavailable_help'] = 'Participant data is not available for this Zoom session (e.g., due to HIPAA-compliance).'; -$string['participants'] = 'Participants'; $string['participantgroups'] = 'Participant groups'; +$string['participants'] = 'Participants'; $string['password'] = 'Passcode'; $string['password_allowed_char'] = 'Passcode may only contain the following characters: [a-z A-Z 0-9 @ - _ *].'; $string['password_consecutive'] = 'Maximum of {$a} consecutive characters (abcd, 1111, 1234, etc.).'; @@ -327,36 +327,36 @@ $string['recordinghide'] = 'Hide Recording (Currently Visible)'; $string['recordinglink'] = 'Recording Link'; $string['recordingname'] = 'Title'; +$string['recordingnotfound'] = 'Recording could not be found'; $string['recordingnotvisible'] = 'Recording is not visible. Please contact your System Administrator if you believe this is an error'; $string['recordingpasscode'] = 'Recording Passcode'; $string['recordings'] = 'Recordings'; $string['recordingshow'] = 'Show Recording (Currently Hidden)'; $string['recordingshowtoggle'] = 'Toggle Show Recording'; -$string['recordingurl'] = 'Recording URL'; -$string['recordingview'] = 'View Recordings'; $string['recordingtypeaudio'] = 'Audio only'; $string['recordingtypevideo'] = 'Video and Audio'; +$string['recordingurl'] = 'Recording URL'; +$string['recordingview'] = 'View Recordings'; $string['recordingvisibility'] = 'Are recordings for this meeting visible by default?'; $string['recordingvisibility_help'] = 'When new recordings for this meeting are fetched, should they be visible in Moodle by default?'; -$string['recurrencetype'] = 'Recurrence'; -$string['recurrence_option_no_time'] = 'No Fixed Time'; +$string['recreatesuccessful'] = 'Sucessfully recreated meeting'; $string['recurrence_option_daily'] = 'Daily'; -$string['recurrence_option_weekly'] = 'Weekly'; $string['recurrence_option_monthly'] = 'Monthly'; +$string['recurrence_option_no_time'] = 'No Fixed Time'; +$string['recurrence_option_weekly'] = 'Weekly'; +$string['recurrencetype'] = 'Recurrence'; $string['recurringmeeting'] = 'Recurring meeting'; $string['recurringmeeting_help'] = 'Enabling this option will make the meeting a recurring meeting without an end date or time. It can then be accessed anytime.'; -$string['recurringmeetingthisis'] = 'This is a recurring meeting'; -$string['recurringmeetinglong'] = 'Recurring meeting (meeting with no end date or time)'; $string['recurringmeetingexplanation'] = 'The meeting does not have an end date or time'; +$string['recurringmeetinglong'] = 'Recurring meeting (meeting with no end date or time)'; +$string['recurringmeetingthisis'] = 'This is a recurring meeting'; $string['recycleonjoin'] = 'Recycle license upon join'; +$string['redefinelicenses'] = 'Redefine licenses'; $string['refreshreports'] = 'Refresh session reports'; -$string['licenseonjoin'] = 'Select this option if you would like the host to receive a license upon starting the meeting, as well as upon creation.'; -$string['recordingnotfound'] = 'Recording could not be found'; -$string['recreatesuccessful'] = 'Sucessfully recreated meeting'; $string['register'] = 'Register'; $string['registration'] = 'Require registration'; -$string['registration_text'] = 'Force participants to register for the meeting/webinar'; $string['registration_help'] = 'Enabling this option will force participants to register for the Zoom meeting/webinar before joining.'; +$string['registration_text'] = 'Force participants to register for the meeting/webinar'; $string['repeatinterval'] = 'Repeat Every'; $string['report'] = 'Reports'; $string['reportapicalls'] = 'Report API calls exhausted'; @@ -365,12 +365,12 @@ $string['resetapicalls'] = 'Reset the number of available API calls'; $string['resetzoomsall'] = 'Delete all user grades, recording user view data, and meeting participant user data.'; $string['room'] = 'Room'; -$string['rooms'] = 'Rooms'; $string['roomname'] = 'Room name'; +$string['rooms'] = 'Rooms'; $string['schedule'] = 'Schedule'; $string['schedulefor'] = 'Schedule meeting for'; -$string['scheduleforself'] = 'Yourself'; $string['schedulefor_help'] = 'You can schedule meetings on behalf of another user. As a prerequisite, this user must have assigned you scheduling privilege in Zoom. The selected user will be the host of the meeting and will be the one whose Zoom license will be used for the meeting.'; +$string['scheduleforself'] = 'Yourself'; $string['schedulingprivilege'] = 'Scheduling privilege'; $string['schedulingprivilege_desc'] = 'With this setting, you can control if the scheduling privilege option is shown to users in the activity instance settings or not. This setting only affects the Moodle activity instance settings. Even if you decide to show the option, the user will still need to get the scheduling privilege granted by another user in Zoom to finally schedule a meeting for the other user.'; $string['schedulingprivilege_disable'] = 'Disable scheduling privilege option'; @@ -378,24 +378,24 @@ $string['search:activity'] = 'Zoom - activity information'; $string['security'] = 'Security'; $string['selectionarea'] = 'No selection'; -$string['sesskeyinvalid'] = 'Invalid session detected. Cannot proceed further.'; $string['sessions'] = 'Sessions'; $string['sessionsreport'] = 'Sessions report'; +$string['sesskeyinvalid'] = 'Invalid session detected. Cannot proceed further.'; $string['setpasscode'] = 'Set passcode'; $string['showmedia'] = 'Show Media section'; -$string['showmediaonview'] = 'Show Media section on meeting page'; $string['showmedia_help'] = 'Enabling this option will show the Media section on the meeting activity page.'; +$string['showmediaonview'] = 'Show Media section on meeting page'; $string['showschedule'] = 'Show Schedule section'; -$string['showscheduleonview'] = 'Show Schedule section on meeting page'; $string['showschedule_help'] = 'Enabling this option will show the Schedule section on the meeting activity page.'; +$string['showscheduleonview'] = 'Show Schedule section on meeting page'; $string['showsecurity'] = 'Show Security section'; -$string['showsecurityonview'] = 'Show Security section on meeting page'; $string['showsecurity_help'] = 'Enabling this option will show the Security section on the meeting activity page.'; +$string['showsecurityonview'] = 'Show Security section on meeting page'; $string['start'] = 'Start'; -$string['starthostjoins'] = 'Start video when host joins'; $string['start_meeting'] = 'Start Meeting'; -$string['startpartjoins'] = 'Start video when participant joins'; $string['start_time'] = 'When'; +$string['starthostjoins'] = 'Start video when host joins'; +$string['startpartjoins'] = 'Start video when participant joins'; $string['starttime'] = 'Start time'; $string['status'] = 'Status'; $string['supplementaryfeaturessettings'] = 'Supplementary features settings'; @@ -408,8 +408,8 @@ $string['unamedisplay'] = 'User display name'; $string['unamedisplay_help'] = 'How the name of a user should be displayed in meetings (only works for users who are not logged in to the Zoom client).'; $string['unavailable'] = 'You are unable to join at this time.'; -$string['unavailablefirstjoin'] = 'You can join {$a->mins} minutes before the scheduled start time at the earliest.'; $string['unavailablefinished'] = 'The meeting has finished already.'; +$string['unavailablefirstjoin'] = 'You can join {$a->mins} minutes before the scheduled start time at the earliest.'; $string['unavailablenotstartedyet'] = 'The meeting has not started yet.'; $string['updatemeetings'] = 'Update meeting settings from Zoom'; $string['updatetrackingfields'] = 'Update tracking field settings from Zoom'; @@ -417,24 +417,30 @@ $string['waitingroom'] = 'Waiting room'; $string['waitingroomenable'] = 'Enable waiting room'; $string['webinar'] = 'Webinar'; -$string['webinarthisis'] = 'This is a webinar'; -$string['webinar_desc'] = 'With this setting, you can control if the option to create a webinar is shown to users during the creation of a meeting or not. This setting only affects the Moodle activity instance settings. Even if you decide to always show the option, the user will still need a valid license for webinars to finally host a webinar.'; -$string['webinar_help'] = "Webinars give hosts enhanced control and flexibility for hosting meetings with larger audiences.\n\nThis option is only available to pre-authorized Zoom accounts."; -$string['webinar_already_true'] = '

This module was already set as a webinar, not meeting. You cannot toggle this setting after creating the webinar.

'; $string['webinar_already_false'] = '

This module was already set as a meeting, not webinar. You cannot toggle this setting after creating the meeting.

'; -$string['webinar_disable'] = 'Disable webinars'; -$string['webinar_showonlyiflicense'] = 'Show webinar option only if the user has a license to host webinars'; +$string['webinar_already_true'] = '

This module was already set as a webinar, not meeting. You cannot toggle this setting after creating the webinar.

'; $string['webinar_alwaysshow'] = 'Always show webinar option regardless if the user has a license to host webinars'; $string['webinar_by_default'] = 'Webinar by default'; $string['webinar_by_default_desc'] = 'Create Zoom instance as a webinar by default.'; -$string['zoom:addinstance'] = 'Add a new Zoom meeting'; +$string['webinar_desc'] = 'With this setting, you can control if the option to create a webinar is shown to users during the creation of a meeting or not. This setting only affects the Moodle activity instance settings. Even if you decide to always show the option, the user will still need a valid license for webinars to finally host a webinar.'; +$string['webinar_disable'] = 'Disable webinars'; +$string['webinar_help'] = "Webinars give hosts enhanced control and flexibility for hosting meetings with larger audiences.\n\nThis option is only available to pre-authorized Zoom accounts."; +$string['webinar_showonlyiflicense'] = 'Show webinar option only if the user has a license to host webinars'; +$string['webinarthisis'] = 'This is a webinar'; $string['week'] = 'Week(s)'; $string['weekoption_first'] = 'First'; $string['weekoption_fourth'] = 'Fourth'; $string['weekoption_last'] = 'Last'; $string['weekoption_second'] = 'Second'; $string['weekoption_third'] = 'Third'; -$string['zoomerr'] = 'An error occured with Zoom.'; // Generic error. +$string['zoom:addinstance'] = 'Add a new Zoom meeting'; +$string['zoom:eligiblealternativehost'] = 'Selectable as alternative host within Zoom meetings'; +$string['zoom:refreshsessions'] = 'Refresh Zoom meeting reports'; +$string['zoom:view'] = 'View Zoom meetings'; +$string['zoom:viewdialin'] = 'View Zoom dial-in information'; +$string['zoom:viewjoinurl'] = 'View Zoom join url'; +$string['zoomerr'] = 'An error occured with Zoom.'; +$string['zoomerr_alternativehostusernotfound'] = 'User {$a} was not found on Zoom.'; $string['zoomerr_apilimit'] = 'Reached the maximum daily rate limit for this API. Retry at {$a}'; $string['zoomerr_field_missing'] = '{$a} not found'; $string['zoomerr_id_missing'] = 'You must specify a course_module ID or an instance ID'; @@ -445,12 +451,6 @@ $string['zoomerr_no_access_token'] = 'No access token returned'; $string['zoomerr_scopes'] = 'The Zoom OAuth configuration is missing these required scopes: {$a}'; $string['zoomerr_usernotfound'] = 'Unable to find your account on Zoom. If you are using Zoom for the first time, you must activate your Zoom account by logging into {$a}. Once you\'ve activated your Zoom account, reload this page and continue setting up your meeting. Else make sure your email on Zoom matches your email on this system.'; -$string['zoomerr_alternativehostusernotfound'] = 'User {$a} was not found on Zoom.'; $string['zoomerr_viewrecordings_off'] = 'View Recordings is switched off, task cannot run'; $string['zoomurl'] = 'Zoom home page URL'; $string['zoomurl_desc'] = ''; -$string['zoom:eligiblealternativehost'] = 'Selectable as alternative host within Zoom meetings'; -$string['zoom:refreshsessions'] = 'Refresh Zoom meeting reports'; -$string['zoom:view'] = 'View Zoom meetings'; -$string['zoom:viewdialin'] = 'View Zoom dial-in information'; -$string['zoom:viewjoinurl'] = 'View Zoom join url'; From 60b86f18e25d63240c411165add84fdc92fdf032 Mon Sep 17 00:00:00 2001 From: Jonathan Champ Date: Mon, 8 Apr 2024 19:32:38 -0400 Subject: [PATCH 4/4] gha: 4.4.2 (add Behat artifact; drop phpcpd) --- .github/workflows/ci.yml | 23 ++++++++++++++++------- 1 file changed, 16 insertions(+), 7 deletions(-) diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index dd7761a5..c1b342e5 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -5,6 +5,7 @@ on: [push, pull_request] jobs: test: runs-on: 'ubuntu-latest' + services: postgres: image: postgres:13 @@ -54,7 +55,7 @@ jobs: steps: - name: Check out repository code - uses: actions/checkout@v3 + uses: actions/checkout@v4 with: path: plugin @@ -64,7 +65,8 @@ jobs: php-version: ${{ matrix.php }} extensions: ${{ matrix.extensions }} ini-values: max_input_vars=5000 - # none to use phpdbg fallback. Specify pcov (Moodle 3.10 and up) or xdebug to use them instead. + # If you are not using code coverage, keep "none". Otherwise, use "pcov" (Moodle 3.10 and up) or "xdebug". + # If you try to use code coverage with "none", it will fallback to phpdbg (which has known problems). coverage: none - name: Initialise moodle-plugin-ci @@ -92,16 +94,13 @@ jobs: DB: ${{ matrix.database }} MOODLE_BRANCH: ${{ matrix.moodle-branch }} MUSTACHE_IGNORE_NAMES: 'mobile_view_page_latest.mustache,mobile_view_page_ionic3.mustache' + # Uncomment this to run Behat tests using the Moodle App. + # MOODLE_APP: 'true' - name: PHP Lint if: ${{ !cancelled() && steps.install_ci.outcome == 'success' }} run: moodle-plugin-ci phplint - - name: PHP Copy/Paste Detector - continue-on-error: true # This step will show errors but will not fail - if: ${{ !cancelled() && steps.install_ci.outcome == 'success' }} - run: moodle-plugin-ci phpcpd - - name: PHP Mess Detector continue-on-error: true # This step will show errors but will not fail if: ${{ !cancelled() && steps.install_ci.outcome == 'success' }} @@ -142,9 +141,19 @@ jobs: run: moodle-plugin-ci phpunit --fail-on-warning - name: Behat features + id: behat if: ${{ !cancelled() && steps.install_ci.outcome == 'success' }} run: moodle-plugin-ci behat --profile chrome + - name: Upload Behat Faildump + if: ${{ failure() && steps.behat.outcome == 'failure' }} + uses: actions/upload-artifact@v4 + with: + name: Behat Faildump (${{ join(matrix.*, ', ') }}) + path: ${{ github.workspace }}/moodledata/behat_dump + retention-days: 7 + if-no-files-found: ignore + - name: Make sure cancelled jobs are marked as failures. if: ${{ cancelled() }} run: exit 1