Advertisement
sarjona

mod/bigbluebuttonbn/lib.php

Dec 28th, 2021
1,017
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
PHP 1.25 KB | None | 0 0
  1. function bigbluebuttonbn_print_recent_activity(object $course, bool $viewfullnames, int $timestart): bool {
  2.     global $OUTPUT;
  3.  
  4.     $modinfo = get_fast_modinfo($course);
  5.     if (empty($modinfo->instances['bigbluebuttonbn'])) {
  6.         return true;
  7.     }
  8.  
  9.     foreach ($modinfo->instances['bigbluebuttonbn'] as $cm) {
  10.         if (!$cm->uservisible) {
  11.             continue;
  12.         }
  13.  
  14.         $instance = instance::get_from_cmid($cm->id);
  15.         $logs = logger::get_user_completion_logs_with_userfields($instance,
  16.             null,
  17.             [logger::EVENT_JOIN, logger::EVENT_PLAYED],
  18.             $timestart);
  19.         if ($logs) {
  20.             echo $OUTPUT->heading(get_string('new_bigblubuttonbn_activities', 'bigbluebuttonbn') . ':', 6);
  21.             foreach ($logs as $log) {
  22.                 $activityurl = new moodle_url('/mod/bigbluebuttonbn/index.php', ['id' => $instance->get_instance_id()]);
  23.                 print_recent_activity_note($log->timecreated,
  24.                     $log,
  25.                     logger::get_printable_event_name($log) . ' - '. $instance->get_meeting_name(),
  26.                     $activityurl->out(),
  27.                     false,
  28.                     $viewfullnames);
  29.             }
  30.         }
  31.     }
  32.  
  33.     return true;
  34. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement