/** * Collaborate course module info - meeting times. * * @param cm_info $cm */ function collaborate_cm_info_view(cm_info $cm) { global $PAGE; $renderer = $PAGE->get_renderer('mod_collaborate'); $times = local::get_times($cm->instance); $o = html_writer::tag('span', $renderer->meeting_times($times), ['class' => 'label label-info']); $cm->set_after_link($o); }
/** * Handle testing api. * * @return string * @throws \coding_exception */ public function handle_testapi() { return $this->renderer->connection_verified(local::api_verified(true)); }
/** * @param view_action $actionview * @return string * @throws coding_exception */ public function render_view_action(view_action $viewaction) { global $OUTPUT; $o = $OUTPUT->header(); $collaborate = $viewaction->get_collaborate(); $cm = $viewaction->get_cm(); $canmoderate = $viewaction->get_canmoderate(); $canparticipate = $viewaction->get_canparticipate(); $unrestored = $collaborate->sessionid == null && $canparticipate; $o .= '<h2 class="activity-title">' . format_string($collaborate->name) . '</h2>'; $times = local::get_times($collaborate, true); $o .= self::meeting_status($times, $cm, $canmoderate, $canparticipate, $unrestored); $o .= '<hr />'; // Conditions to show the intro can change to look for own settings or whatever. if ($collaborate->intro) { $o .= $OUTPUT->box(format_module_intro('collaborate', $collaborate, $cm->id), 'generalbox mod_introbox', 'collaborateintro'); } if ($canparticipate) { $recordings = local::get_recordings($collaborate); $o .= '<hr />'; $o .= $this->render_recordings($recordings); } $o .= $OUTPUT->footer(); return $o; }