Skip to content

Commit

Permalink
phpcs: small cleanups
Browse files Browse the repository at this point in the history
  • Loading branch information
jrchamp committed Aug 3, 2023
1 parent b60520e commit 7983941
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 8 deletions.
10 changes: 4 additions & 6 deletions classes/task/get_meeting_reports.php
Original file line number Diff line number Diff line change
Expand Up @@ -461,7 +461,7 @@ public function debugmsg($msg) {
* @return boolean
*/
public function process_meeting_reports($meeting) {
global $DB, $CFG;
global $DB;

$this->debugmsg(sprintf('Processing meeting %s|%s that occurred at %s',
$meeting->meeting_id, $meeting->uuid, $meeting->start_time));
Expand Down Expand Up @@ -532,7 +532,7 @@ public function process_meeting_reports($meeting) {
'detailsid' => $participant['detailsid'],
'zoomuserid' => $participant['zoomuserid'],
'join_time' => $participant['join_time'],
'leave_time' => $participant['leave_time']
'leave_time' => $participant['leave_time'],
];

// Check if the record already exists.
Expand Down Expand Up @@ -623,7 +623,7 @@ public function grading_participant_upon_duration($zoomrecord, $detailsid) {

// Check if there is old duration stored for this user.
if (!empty($durations[$userid])) {
$old = new \stdClass;
$old = new \stdClass();
$old->duration = $durations[$userid];
$old->join_time = $join[$userid];
$old->leave_time = $leave[$userid];
Expand Down Expand Up @@ -700,7 +700,6 @@ public function grading_participant_upon_duration($zoomrecord, $detailsid) {
} else {
$notenrolled[$userid] = fullname(\core_user::get_user($userid));
}

} else {
// This means that this user was not identified.
// Provide information about participants that need to be graded manually.
Expand Down Expand Up @@ -800,7 +799,7 @@ public function notify_teachers($data) {
$needgradenumber = count($data['needgrade']);
// List of users need grading.
$needstring = get_string('grading_needgrade', 'mod_zoom');
$needgrade = (!empty($data['needgrade'])) ? $needstring.implode('<br>', $data['needgrade'])."\n" : '';
$needgrade = (!empty($data['needgrade'])) ? $needstring . implode('<br>', $data['needgrade']) . "\n" : '';

$zoomid = $data['zoomid'];
$itemid = $data['itemid'];
Expand Down Expand Up @@ -974,7 +973,6 @@ public function get_users_clicked_join($zoomrecord) {
foreach ($events as $event) {
if ($event->other['meetingid'] == $zoomrecord->meeting_id &&
!in_array($event->userid, $userids)) {

$userids[] = $event->userid;
}
}
Expand Down
4 changes: 2 additions & 2 deletions tests/get_meeting_reports_test.php
Original file line number Diff line number Diff line change
Expand Up @@ -438,7 +438,7 @@ public function test_grading_method() {
$context = \context_course::instance($course->id);
$graders = get_users_by_capability($context, 'moodle/grade:edit');
$this->assertEquals(1, count($graders));
$firstkey = array_key_first($graders);
$firstkey = key($graders);
$this->assertEquals($graders[$firstkey]->id, $teacher->id);
// Now fake the meeting details.
$meeting = new stdClass();
Expand Down Expand Up @@ -684,7 +684,7 @@ public function test_grading_method() {
// The user need grading.
$needgradestr = get_string('grading_needgrade', 'mod_zoom');
$needgrade[] = '(Name: Farouk, grade: 55)';
$needgrade = $needgradestr.implode('<br>', $needgrade)."\n";
$needgrade = $needgradestr . implode('<br>', $needgrade) . "\n";

$a = (object)[
'name' => $zoomrecord->name,
Expand Down

0 comments on commit 7983941

Please sign in to comment.