Skip to content

Commit

Permalink
Merge branch 'MDL-80869-403' of https://github.com/paulholden/moodle
Browse files Browse the repository at this point in the history
…into MOODLE_403_STABLE
  • Loading branch information
HuongNV13 committed Feb 13, 2024
2 parents b83ed42 + 71b2e36 commit 5ac04b4
Showing 1 changed file with 8 additions and 6 deletions.
14 changes: 8 additions & 6 deletions mod/bigbluebuttonbn/tests/instance_test.php
Expand Up @@ -174,13 +174,15 @@ public function test_get_from_meetingid_from_log(): void {
$instance = instance::get_from_cmid($cm->id);
$instance->set_group_id(1);
logger::log_meeting_joined_event($instance, 1);
$logs = $DB->get_records('bigbluebuttonbn_logs',
['courseid' => $course->id, 'bigbluebuttonbnid' => $instance->get_instance_id()], 'timecreated DESC');
$log = end($logs);
$retrievedinstance = instance::get_from_meetingid(
$log->meetingid
);

// Get the meeting ID from the logged "join" event.
$meetingid = $DB->get_field('bigbluebuttonbn_logs', 'meetingid', [
'courseid' => $course->id,
'bigbluebuttonbnid' => $instance->get_instance_id(),
'log' => 'Join',
], MUST_EXIST);

$retrievedinstance = instance::get_from_meetingid($meetingid);
$this->assertEquals($cm->instance, $retrievedinstance->get_instance_id());
$this->assertEquals($cm->id, $retrievedinstance->get_cm_id());
}
Expand Down

0 comments on commit 5ac04b4

Please sign in to comment.