@@ -109,7 +109,7 @@ discard block |
||
| 109 | 109 | 'logoutURL' => $logouturl, |
| 110 | 110 | ]; |
| 111 | 111 | // Choose between Adobe Flash or HTML5 Client. |
| 112 | - if ( $clienttype == BIGBLUEBUTTON_CLIENTTYPE_HTML5 ) { |
|
| 112 | + if ($clienttype == BIGBLUEBUTTON_CLIENTTYPE_HTML5) { |
|
| 113 | 113 | $data['joinViaHtml5'] = 'true'; |
| 114 | 114 | } |
| 115 | 115 | if (!is_null($configtoken)) { |
@@ -182,7 +182,7 @@ discard block |
||
| 182 | 182 | } |
| 183 | 183 | if ($xml) { |
| 184 | 184 | // Either failure or success without meeting info. |
| 185 | - return (array)$xml; |
|
| 185 | + return (array) $xml; |
|
| 186 | 186 | } |
| 187 | 187 | // If the server is unreachable, then prompts the user of the necessary action. |
| 188 | 188 | return array('returncode' => 'FAILED', 'message' => 'unreachable', 'messageKey' => 'Server is unreachable'); |
@@ -615,7 +615,7 @@ discard block |
||
| 615 | 615 | if ($userroles) { |
| 616 | 616 | $where = ''; |
| 617 | 617 | foreach ($userroles as $userrole) { |
| 618 | - $where .= (empty($where) ? ' WHERE' : ' OR').' id=' . $userrole->roleid; |
|
| 618 | + $where .= (empty($where) ? ' WHERE' : ' OR').' id='.$userrole->roleid; |
|
| 619 | 619 | } |
| 620 | 620 | $userroles = $DB->get_records_sql('SELECT * FROM {role}'.$where); |
| 621 | 621 | } |
@@ -702,7 +702,7 @@ discard block |
||
| 702 | 702 | function bigbluebuttonbn_get_role($id) { |
| 703 | 703 | $roles = (array) role_get_names(); |
| 704 | 704 | if (is_numeric($id) && isset($roles[$id])) { |
| 705 | - return (object)$roles[$id]; |
|
| 705 | + return (object) $roles[$id]; |
|
| 706 | 706 | } |
| 707 | 707 | foreach ($roles as $role) { |
| 708 | 708 | if ($role->shortname == $id) { |
@@ -782,7 +782,7 @@ discard block |
||
| 782 | 782 | if (!empty($ownerid) && is_enrolled($context, $ownerid)) { |
| 783 | 783 | $participantlist[] = array( |
| 784 | 784 | 'selectiontype' => 'user', |
| 785 | - 'selectionid' => (string)$ownerid, |
|
| 785 | + 'selectionid' => (string) $ownerid, |
|
| 786 | 786 | 'role' => BIGBLUEBUTTONBN_ROLE_MODERATOR); |
| 787 | 787 | } |
| 788 | 788 | continue; |
@@ -857,7 +857,7 @@ discard block |
||
| 857 | 857 | if (!isguestuser()) { |
| 858 | 858 | $userroles = bigbluebuttonbn_get_user_roles($context, $userid); |
| 859 | 859 | } |
| 860 | - return bigbluebuttonbn_is_moderator_validator($participantlist, $userid , $userroles); |
|
| 860 | + return bigbluebuttonbn_is_moderator_validator($participantlist, $userid, $userroles); |
|
| 861 | 861 | } |
| 862 | 862 | |
| 863 | 863 | /** |
@@ -942,9 +942,9 @@ discard block |
||
| 942 | 942 | if ($voicebridge == 0) { |
| 943 | 943 | return true; |
| 944 | 944 | } |
| 945 | - $select = 'voicebridge = ' . $voicebridge; |
|
| 945 | + $select = 'voicebridge = '.$voicebridge; |
|
| 946 | 946 | if ($instance != 0) { |
| 947 | - $select .= ' AND id <>' . $instance; |
|
| 947 | + $select .= ' AND id <>'.$instance; |
|
| 948 | 948 | } |
| 949 | 949 | if (!$DB->get_records_select('bigbluebuttonbn', $select)) { |
| 950 | 950 | return true; |
@@ -964,7 +964,7 @@ discard block |
||
| 964 | 964 | $now = time(); |
| 965 | 965 | if ($closingtime > 0 && $now < $closingtime) { |
| 966 | 966 | $duration = ceil(($closingtime - $now) / 60); |
| 967 | - $compensationtime = intval((int)\mod_bigbluebuttonbn\locallib\config::get('scheduled_duration_compensation')); |
|
| 967 | + $compensationtime = intval((int) \mod_bigbluebuttonbn\locallib\config::get('scheduled_duration_compensation')); |
|
| 968 | 968 | $duration = intval($duration) + $compensationtime; |
| 969 | 969 | } |
| 970 | 970 | return $duration; |
@@ -1104,7 +1104,7 @@ discard block |
||
| 1104 | 1104 | if (array_key_exists('other', $options)) { |
| 1105 | 1105 | $params['other'] = $options['other']; |
| 1106 | 1106 | } |
| 1107 | - $event = call_user_func_array('\mod_bigbluebuttonbn\event\\' . $type . '::create', |
|
| 1107 | + $event = call_user_func_array('\mod_bigbluebuttonbn\event\\'.$type.'::create', |
|
| 1108 | 1108 | array($params)); |
| 1109 | 1109 | $event->add_record_snapshot('course_modules', $cm); |
| 1110 | 1110 | $event->add_record_snapshot('course', $course); |
@@ -1141,7 +1141,7 @@ discard block |
||
| 1141 | 1141 | * @return array |
| 1142 | 1142 | */ |
| 1143 | 1143 | function bigbluebuttonbn_get_meeting_info($meetingid, $updatecache = false) { |
| 1144 | - $cachettl = (int)\mod_bigbluebuttonbn\locallib\config::get('waitformoderator_cache_ttl'); |
|
| 1144 | + $cachettl = (int) \mod_bigbluebuttonbn\locallib\config::get('waitformoderator_cache_ttl'); |
|
| 1145 | 1145 | $cache = cache::make_from_params(cache_store::MODE_APPLICATION, 'mod_bigbluebuttonbn', 'meetings_cache'); |
| 1146 | 1146 | $result = $cache->get($meetingid); |
| 1147 | 1147 | $now = time(); |
@@ -1347,7 +1347,7 @@ discard block |
||
| 1347 | 1347 | * @return boolean |
| 1348 | 1348 | */ |
| 1349 | 1349 | function bigbluebuttonbn_get_recording_data_row_editable($bbbsession) { |
| 1350 | - return ($bbbsession['managerecordings'] && ((double)$bbbsession['serverversion'] >= 1.0 || $bbbsession['bnserver'])); |
|
| 1350 | + return ($bbbsession['managerecordings'] && ((double) $bbbsession['serverversion'] >= 1.0 || $bbbsession['bnserver'])); |
|
| 1351 | 1351 | } |
| 1352 | 1352 | |
| 1353 | 1353 | /** |
@@ -1358,7 +1358,7 @@ discard block |
||
| 1358 | 1358 | * @return boolean |
| 1359 | 1359 | */ |
| 1360 | 1360 | function bigbluebuttonbn_get_recording_data_preview_enabled($bbbsession) { |
| 1361 | - return ((double)$bbbsession['serverversion'] >= 1.0 && $bbbsession['bigbluebuttonbn']->recordings_preview == '1'); |
|
| 1361 | + return ((double) $bbbsession['serverversion'] >= 1.0 && $bbbsession['bigbluebuttonbn']->recordings_preview == '1'); |
|
| 1362 | 1362 | } |
| 1363 | 1363 | |
| 1364 | 1364 | /** |
@@ -1434,11 +1434,11 @@ discard block |
||
| 1434 | 1434 | $actionbar .= bigbluebuttonbn_actionbar_render_button($recording, $buttonpayload); |
| 1435 | 1435 | } |
| 1436 | 1436 | $head = html_writer::start_tag('div', array( |
| 1437 | - 'id' => 'recording-actionbar-' . $recording['recordID'], |
|
| 1437 | + 'id' => 'recording-actionbar-'.$recording['recordID'], |
|
| 1438 | 1438 | 'data-recordingid' => $recording['recordID'], |
| 1439 | 1439 | 'data-meetingid' => $recording['meetingID'])); |
| 1440 | 1440 | $tail = html_writer::end_tag('div'); |
| 1441 | - return $head . $actionbar . $tail; |
|
| 1441 | + return $head.$actionbar.$tail; |
|
| 1442 | 1442 | } |
| 1443 | 1443 | |
| 1444 | 1444 | /** |
@@ -1533,7 +1533,7 @@ discard block |
||
| 1533 | 1533 | } |
| 1534 | 1534 | $recordingpreview .= html_writer::start_tag('div', array('class' => '')); |
| 1535 | 1535 | $recordingpreview .= html_writer::empty_tag('img', |
| 1536 | - array('src' => trim($image['url']) . '?' . time(), 'class' => 'recording-thumbnail pull-left')); |
|
| 1536 | + array('src' => trim($image['url']).'?'.time(), 'class' => 'recording-thumbnail pull-left')); |
|
| 1537 | 1537 | $recordingpreview .= html_writer::end_tag('div'); |
| 1538 | 1538 | } |
| 1539 | 1539 | $recordingpreview .= html_writer::end_tag('div'); |
@@ -1590,13 +1590,13 @@ discard block |
||
| 1590 | 1590 | return ''; |
| 1591 | 1591 | } |
| 1592 | 1592 | $text = get_string('view_recording_format_'.$playback['type'], 'bigbluebuttonbn'); |
| 1593 | - $href = $CFG->wwwroot . '/mod/bigbluebuttonbn/bbb_view.php?action=play&bn=' . $bbbsession['bigbluebuttonbn']->id . |
|
| 1594 | - '&mid='.$recording['meetingID'] . '&rid=' . $recording['recordID'] . '&rtype=' . $playback['type']; |
|
| 1593 | + $href = $CFG->wwwroot.'/mod/bigbluebuttonbn/bbb_view.php?action=play&bn='.$bbbsession['bigbluebuttonbn']->id. |
|
| 1594 | + '&mid='.$recording['meetingID'].'&rid='.$recording['recordID'].'&rtype='.$playback['type']; |
|
| 1595 | 1595 | if (!isset($recording['imported']) || !isset($recording['protected']) || $recording['protected'] === 'false') { |
| 1596 | 1596 | $href .= '&href='.urlencode(trim($playback['url'])); |
| 1597 | 1597 | } |
| 1598 | 1598 | $linkattributes = array( |
| 1599 | - 'id' => 'recording-play-' . $playback['type'] . '-' . $recording['recordID'], |
|
| 1599 | + 'id' => 'recording-play-'.$playback['type'].'-'.$recording['recordID'], |
|
| 1600 | 1600 | 'class' => 'btn btn-sm btn-default', |
| 1601 | 1601 | 'onclick' => 'M.mod_bigbluebuttonbn.recordings.recordingPlay(this);', |
| 1602 | 1602 | 'data-action' => 'play', |
@@ -1608,7 +1608,7 @@ discard block |
||
| 1608 | 1608 | $linkattributes['title'] = get_string('view_recording_format_errror_unreachable', 'bigbluebuttonbn'); |
| 1609 | 1609 | unset($linkattributes['data-href']); |
| 1610 | 1610 | } |
| 1611 | - return $OUTPUT->action_link('#', $text, null, $linkattributes) . ' '; |
|
| 1611 | + return $OUTPUT->action_link('#', $text, null, $linkattributes).' '; |
|
| 1612 | 1612 | } |
| 1613 | 1613 | |
| 1614 | 1614 | /** |
@@ -1634,7 +1634,7 @@ discard block |
||
| 1634 | 1634 | $validatedurls[$urlhost] = true; |
| 1635 | 1635 | $curlinfo = bigbluebuttonbn_wrap_xml_load_file_curl_request($url, 'HEAD'); |
| 1636 | 1636 | if (!isset($curlinfo['http_code']) || $curlinfo['http_code'] != 200) { |
| 1637 | - $error = "Resources hosted by " . $urlhost . " are unreachable. Server responded with code " . $curlinfo['http_code']; |
|
| 1637 | + $error = "Resources hosted by ".$urlhost." are unreachable. Server responded with code ".$curlinfo['http_code']; |
|
| 1638 | 1638 | debugging($error, DEBUG_DEVELOPER); |
| 1639 | 1639 | $validatedurls[$urlhost] = false; |
| 1640 | 1640 | } |
@@ -1725,12 +1725,12 @@ discard block |
||
| 1725 | 1725 | * @return string |
| 1726 | 1726 | */ |
| 1727 | 1727 | function bigbluebuttonbn_get_recording_data_row_text($recording, $text, $source, $data) { |
| 1728 | - $htmltext = '<span>' . htmlentities($text) . '</span>'; |
|
| 1728 | + $htmltext = '<span>'.htmlentities($text).'</span>'; |
|
| 1729 | 1729 | if (empty($data)) { |
| 1730 | 1730 | return $htmltext; |
| 1731 | 1731 | } |
| 1732 | - $target = $data['action'] . '-' . $data['target']; |
|
| 1733 | - $id = 'recording-' . $target . '-' . $data['recordingid']; |
|
| 1732 | + $target = $data['action'].'-'.$data['target']; |
|
| 1733 | + $id = 'recording-'.$target.'-'.$data['recordingid']; |
|
| 1734 | 1734 | $attributes = array('id' => $id, 'class' => 'quickeditlink col-md-20', |
| 1735 | 1735 | 'data-recordingid' => $data['recordingid'], 'data-meetingid' => $data['meetingid'], |
| 1736 | 1736 | 'data-target' => $data['target'], 'data-source' => $source); |
@@ -1738,7 +1738,7 @@ discard block |
||
| 1738 | 1738 | $tail = html_writer::end_tag('div'); |
| 1739 | 1739 | $payload = array('action' => $data['action'], 'tag' => $data['tag'], 'target' => $data['target']); |
| 1740 | 1740 | $htmllink = bigbluebuttonbn_actionbar_render_button($recording, $payload); |
| 1741 | - return $head . $htmltext . $htmllink . $tail; |
|
| 1741 | + return $head.$htmltext.$htmllink.$tail; |
|
| 1742 | 1742 | } |
| 1743 | 1743 | |
| 1744 | 1744 | /** |
@@ -1756,11 +1756,11 @@ discard block |
||
| 1756 | 1756 | } |
| 1757 | 1757 | $target = $data['action']; |
| 1758 | 1758 | if (isset($data['target'])) { |
| 1759 | - $target .= '-' . $data['target']; |
|
| 1759 | + $target .= '-'.$data['target']; |
|
| 1760 | 1760 | } |
| 1761 | - $id = 'recording-' . $target . '-' . $recording['recordID']; |
|
| 1762 | - $onclick = 'M.mod_bigbluebuttonbn.recordings.recording' . ucfirst($data['action']) . '(this);'; |
|
| 1763 | - if ((boolean)\mod_bigbluebuttonbn\locallib\config::get('recording_icons_enabled')) { |
|
| 1761 | + $id = 'recording-'.$target.'-'.$recording['recordID']; |
|
| 1762 | + $onclick = 'M.mod_bigbluebuttonbn.recordings.recording'.ucfirst($data['action']).'(this);'; |
|
| 1763 | + if ((boolean) \mod_bigbluebuttonbn\locallib\config::get('recording_icons_enabled')) { |
|
| 1764 | 1764 | // With icon for $manageaction. |
| 1765 | 1765 | $iconattributes = array('id' => $id, 'class' => 'iconsmall'); |
| 1766 | 1766 | $linkattributes = array( |
@@ -1773,12 +1773,12 @@ discard block |
||
| 1773 | 1773 | $recording['recordID']); |
| 1774 | 1774 | } |
| 1775 | 1775 | if (isset($data['disabled'])) { |
| 1776 | - $iconattributes['class'] .= ' fa-' . $data['disabled']; |
|
| 1776 | + $iconattributes['class'] .= ' fa-'.$data['disabled']; |
|
| 1777 | 1777 | $linkattributes['class'] = 'disabled'; |
| 1778 | 1778 | unset($linkattributes['onclick']); |
| 1779 | 1779 | } |
| 1780 | 1780 | $icon = new pix_icon('i/'.$data['tag'], |
| 1781 | - get_string('view_recording_list_actionbar_' . $data['action'], 'bigbluebuttonbn'), |
|
| 1781 | + get_string('view_recording_list_actionbar_'.$data['action'], 'bigbluebuttonbn'), |
|
| 1782 | 1782 | 'moodle', $iconattributes); |
| 1783 | 1783 | return $OUTPUT->action_icon('#', $icon, null, $linkattributes, false); |
| 1784 | 1784 | } |
@@ -1874,7 +1874,7 @@ discard block |
||
| 1874 | 1874 | if ($bbbsession['managerecordings']) { |
| 1875 | 1875 | $table->head[] = get_string('view_recording_actionbar', 'bigbluebuttonbn'); |
| 1876 | 1876 | $table->align[] = 'left'; |
| 1877 | - $table->size[] = (count($tools) * 40) . 'px'; |
|
| 1877 | + $table->size[] = (count($tools) * 40).'px'; |
|
| 1878 | 1878 | } |
| 1879 | 1879 | // Get the groups of the user. |
| 1880 | 1880 | $usergroups = groups_get_all_groups($bbbsession['course']->id, $bbbsession['userID']); |
@@ -1901,7 +1901,7 @@ discard block |
||
| 1901 | 1901 | $groupmode = $DB->get_record_sql($sql, $params, IGNORE_MULTIPLE); |
| 1902 | 1902 | |
| 1903 | 1903 | $displayrow = true; |
| 1904 | - if ((isset($groupmode->groupmode) && (int)$groupmode->groupmode != VISIBLEGROUPS) |
|
| 1904 | + if ((isset($groupmode->groupmode) && (int) $groupmode->groupmode != VISIBLEGROUPS) |
|
| 1905 | 1905 | && !$bbbsession['administrator'] && !$bbbsession['moderator']) { |
| 1906 | 1906 | $groupid = explode('[', $recording['meetingID']); |
| 1907 | 1907 | if (isset($groupid[1])) { |
@@ -1952,14 +1952,14 @@ discard block |
||
| 1952 | 1952 | } |
| 1953 | 1953 | $rowdata->date_formatted = str_replace(' ', ' ', $rowdata->date_formatted); |
| 1954 | 1954 | $row->cells = array(); |
| 1955 | - $row->cells[] = $texthead . $rowdata->recording . $texttail; |
|
| 1956 | - $row->cells[] = $texthead . $rowdata->meeting . $texttail;; |
|
| 1957 | - $row->cells[] = $texthead . $rowdata->activity . $texttail; |
|
| 1958 | - $row->cells[] = $texthead . $rowdata->description . $texttail; |
|
| 1955 | + $row->cells[] = $texthead.$rowdata->recording.$texttail; |
|
| 1956 | + $row->cells[] = $texthead.$rowdata->meeting.$texttail; ; |
|
| 1957 | + $row->cells[] = $texthead.$rowdata->activity.$texttail; |
|
| 1958 | + $row->cells[] = $texthead.$rowdata->description.$texttail; |
|
| 1959 | 1959 | if (bigbluebuttonbn_get_recording_data_preview_enabled($bbbsession)) { |
| 1960 | 1960 | $row->cells[] = $rowdata->preview; |
| 1961 | 1961 | } |
| 1962 | - $row->cells[] = $texthead . $rowdata->date_formatted . $texttail; |
|
| 1962 | + $row->cells[] = $texthead.$rowdata->date_formatted.$texttail; |
|
| 1963 | 1963 | $row->cells[] = $rowdata->duration_formatted; |
| 1964 | 1964 | if ($bbbsession['managerecordings']) { |
| 1965 | 1965 | $row->cells[] = $rowdata->actionbar; |
@@ -2002,7 +2002,7 @@ discard block |
||
| 2002 | 2002 | $sender = get_admin(); |
| 2003 | 2003 | // Prepare message. |
| 2004 | 2004 | $messagetext = '<p>'.get_string('email_body_recording_ready_for', 'bigbluebuttonbn'). |
| 2005 | - ' "' . $bigbluebuttonbn->name . '" '. |
|
| 2005 | + ' "'.$bigbluebuttonbn->name.'" '. |
|
| 2006 | 2006 | get_string('email_body_recording_ready_is_ready', 'bigbluebuttonbn').'.</p>'; |
| 2007 | 2007 | \mod_bigbluebuttonbn\locallib\notifier::notification_send($sender, $bigbluebuttonbn, $messagetext); |
| 2008 | 2008 | } |
@@ -2055,7 +2055,7 @@ discard block |
||
| 2055 | 2055 | // Enqueue it. |
| 2056 | 2056 | \core\task\manager::queue_adhoc_task($task); |
| 2057 | 2057 | } catch (Exception $e) { |
| 2058 | - mtrace("Error while enqueuing completion_update_state task. " . (string)$e); |
|
| 2058 | + mtrace("Error while enqueuing completion_update_state task. ".(string) $e); |
|
| 2059 | 2059 | } |
| 2060 | 2060 | } |
| 2061 | 2061 | |
@@ -2218,17 +2218,17 @@ discard block |
||
| 2218 | 2218 | * @return string containing the sql used for getting the target bigbluebuttonbn instances |
| 2219 | 2219 | */ |
| 2220 | 2220 | function bigbluebuttonbn_get_recordings_deleted_sql_select($courseid = 0, $bigbluebuttonbnid = null, $subset = true) { |
| 2221 | - $sql = "log = '" . BIGBLUEBUTTONBN_LOG_EVENT_DELETE . "' AND meta like '%has_recordings%' AND meta like '%true%'"; |
|
| 2221 | + $sql = "log = '".BIGBLUEBUTTONBN_LOG_EVENT_DELETE."' AND meta like '%has_recordings%' AND meta like '%true%'"; |
|
| 2222 | 2222 | if (empty($courseid)) { |
| 2223 | 2223 | $courseid = 0; |
| 2224 | 2224 | } |
| 2225 | 2225 | if (empty($bigbluebuttonbnid)) { |
| 2226 | - return $sql . " AND courseid = {$courseid}"; |
|
| 2226 | + return $sql." AND courseid = {$courseid}"; |
|
| 2227 | 2227 | } |
| 2228 | 2228 | if ($subset) { |
| 2229 | - return $sql . " AND bigbluebuttonbnid = '{$bigbluebuttonbnid}'"; |
|
| 2229 | + return $sql." AND bigbluebuttonbnid = '{$bigbluebuttonbnid}'"; |
|
| 2230 | 2230 | } |
| 2231 | - return $sql . " AND courseid = {$courseid} AND bigbluebuttonbnid <> '{$bigbluebuttonbnid}'"; |
|
| 2231 | + return $sql." AND courseid = {$courseid} AND bigbluebuttonbnid <> '{$bigbluebuttonbnid}'"; |
|
| 2232 | 2232 | } |
| 2233 | 2233 | |
| 2234 | 2234 | /** |
@@ -2242,17 +2242,17 @@ discard block |
||
| 2242 | 2242 | * @return string containing the sql used for getting the target bigbluebuttonbn instances |
| 2243 | 2243 | */ |
| 2244 | 2244 | function bigbluebuttonbn_get_recordings_imported_sql_select($courseid = 0, $bigbluebuttonbnid = null, $subset = true) { |
| 2245 | - $sql = "log = '" . BIGBLUEBUTTONBN_LOG_EVENT_IMPORT . "'"; |
|
| 2245 | + $sql = "log = '".BIGBLUEBUTTONBN_LOG_EVENT_IMPORT."'"; |
|
| 2246 | 2246 | if (empty($courseid)) { |
| 2247 | 2247 | $courseid = 0; |
| 2248 | 2248 | } |
| 2249 | 2249 | if (empty($bigbluebuttonbnid)) { |
| 2250 | - return $sql . " AND courseid = '{$courseid}'"; |
|
| 2250 | + return $sql." AND courseid = '{$courseid}'"; |
|
| 2251 | 2251 | } |
| 2252 | 2252 | if ($subset) { |
| 2253 | - return $sql . " AND bigbluebuttonbnid = '{$bigbluebuttonbnid}'"; |
|
| 2253 | + return $sql." AND bigbluebuttonbnid = '{$bigbluebuttonbnid}'"; |
|
| 2254 | 2254 | } |
| 2255 | - return $sql . " AND courseid = '{$courseid}' AND bigbluebuttonbnid <> '{$bigbluebuttonbnid}'"; |
|
| 2255 | + return $sql." AND courseid = '{$courseid}' AND bigbluebuttonbnid <> '{$bigbluebuttonbnid}'"; |
|
| 2256 | 2256 | } |
| 2257 | 2257 | |
| 2258 | 2258 | /** |
@@ -2586,7 +2586,7 @@ discard block |
||
| 2586 | 2586 | */ |
| 2587 | 2587 | function bigbluebuttonbn_settings_general(&$renderer) { |
| 2588 | 2588 | // Configuration for BigBlueButton. |
| 2589 | - if ((boolean)\mod_bigbluebuttonbn\settings\validator::section_general_shown()) { |
|
| 2589 | + if ((boolean) \mod_bigbluebuttonbn\settings\validator::section_general_shown()) { |
|
| 2590 | 2590 | $renderer->render_group_header('general'); |
| 2591 | 2591 | $renderer->render_group_element('server_url', |
| 2592 | 2592 | $renderer->render_group_element_text('server_url', BIGBLUEBUTTONBN_DEFAULT_SERVER_URL)); |
@@ -2604,7 +2604,7 @@ discard block |
||
| 2604 | 2604 | */ |
| 2605 | 2605 | function bigbluebuttonbn_settings_record(&$renderer) { |
| 2606 | 2606 | // Configuration for 'recording' feature. |
| 2607 | - if ((boolean)\mod_bigbluebuttonbn\settings\validator::section_record_meeting_shown()) { |
|
| 2607 | + if ((boolean) \mod_bigbluebuttonbn\settings\validator::section_record_meeting_shown()) { |
|
| 2608 | 2608 | $renderer->render_group_header('recording'); |
| 2609 | 2609 | $renderer->render_group_element('recording_default', |
| 2610 | 2610 | $renderer->render_group_element_checkbox('recording_default', 1)); |
@@ -2634,7 +2634,7 @@ discard block |
||
| 2634 | 2634 | */ |
| 2635 | 2635 | function bigbluebuttonbn_settings_importrecordings(&$renderer) { |
| 2636 | 2636 | // Configuration for 'import recordings' feature. |
| 2637 | - if ((boolean)\mod_bigbluebuttonbn\settings\validator::section_import_recordings_shown()) { |
|
| 2637 | + if ((boolean) \mod_bigbluebuttonbn\settings\validator::section_import_recordings_shown()) { |
|
| 2638 | 2638 | $renderer->render_group_header('importrecordings'); |
| 2639 | 2639 | $renderer->render_group_element('importrecordings_enabled', |
| 2640 | 2640 | $renderer->render_group_element_checkbox('importrecordings_enabled', 0)); |
@@ -2652,7 +2652,7 @@ discard block |
||
| 2652 | 2652 | */ |
| 2653 | 2653 | function bigbluebuttonbn_settings_showrecordings(&$renderer) { |
| 2654 | 2654 | // Configuration for 'show recordings' feature. |
| 2655 | - if ((boolean)\mod_bigbluebuttonbn\settings\validator::section_show_recordings_shown()) { |
|
| 2655 | + if ((boolean) \mod_bigbluebuttonbn\settings\validator::section_show_recordings_shown()) { |
|
| 2656 | 2656 | $renderer->render_group_header('recordings'); |
| 2657 | 2657 | $renderer->render_group_element('recordings_html_default', |
| 2658 | 2658 | $renderer->render_group_element_checkbox('recordings_html_default', 1)); |
@@ -2684,7 +2684,7 @@ discard block |
||
| 2684 | 2684 | */ |
| 2685 | 2685 | function bigbluebuttonbn_settings_waitmoderator(&$renderer) { |
| 2686 | 2686 | // Configuration for wait for moderator feature. |
| 2687 | - if ((boolean)\mod_bigbluebuttonbn\settings\validator::section_wait_moderator_shown()) { |
|
| 2687 | + if ((boolean) \mod_bigbluebuttonbn\settings\validator::section_wait_moderator_shown()) { |
|
| 2688 | 2688 | $renderer->render_group_header('waitformoderator'); |
| 2689 | 2689 | $renderer->render_group_element('waitformoderator_default', |
| 2690 | 2690 | $renderer->render_group_element_checkbox('waitformoderator_default', 0)); |
@@ -2706,7 +2706,7 @@ discard block |
||
| 2706 | 2706 | */ |
| 2707 | 2707 | function bigbluebuttonbn_settings_voicebridge(&$renderer) { |
| 2708 | 2708 | // Configuration for "static voice bridge" feature. |
| 2709 | - if ((boolean)\mod_bigbluebuttonbn\settings\validator::section_static_voice_bridge_shown()) { |
|
| 2709 | + if ((boolean) \mod_bigbluebuttonbn\settings\validator::section_static_voice_bridge_shown()) { |
|
| 2710 | 2710 | $renderer->render_group_header('voicebridge'); |
| 2711 | 2711 | $renderer->render_group_element('voicebridge_editable', |
| 2712 | 2712 | $renderer->render_group_element_checkbox('voicebridge_editable', 0)); |
@@ -2722,7 +2722,7 @@ discard block |
||
| 2722 | 2722 | */ |
| 2723 | 2723 | function bigbluebuttonbn_settings_preupload(&$renderer) { |
| 2724 | 2724 | // Configuration for "preupload presentation" feature. |
| 2725 | - if ((boolean)\mod_bigbluebuttonbn\settings\validator::section_preupload_presentation_shown()) { |
|
| 2725 | + if ((boolean) \mod_bigbluebuttonbn\settings\validator::section_preupload_presentation_shown()) { |
|
| 2726 | 2726 | // This feature only works if curl is installed. |
| 2727 | 2727 | $preuploaddescripion = get_string('config_preuploadpresentation_description', 'bigbluebuttonbn'); |
| 2728 | 2728 | if (!extension_loaded('curl')) { |
@@ -2748,7 +2748,7 @@ discard block |
||
| 2748 | 2748 | */ |
| 2749 | 2749 | function bigbluebuttonbn_settings_preupload_manage_default_file(&$renderer) { |
| 2750 | 2750 | // Configuration for "preupload presentation" feature. |
| 2751 | - if ((boolean)\mod_bigbluebuttonbn\settings\validator::section_preupload_presentation_shown()) { |
|
| 2751 | + if ((boolean) \mod_bigbluebuttonbn\settings\validator::section_preupload_presentation_shown()) { |
|
| 2752 | 2752 | if (extension_loaded('curl')) { |
| 2753 | 2753 | // This feature only works if curl is installed. |
| 2754 | 2754 | $renderer->render_filemanager_default_file_presentation("presentation_default"); |
@@ -2765,7 +2765,7 @@ discard block |
||
| 2765 | 2765 | */ |
| 2766 | 2766 | function bigbluebuttonbn_settings_userlimit(&$renderer) { |
| 2767 | 2767 | // Configuration for "user limit" feature. |
| 2768 | - if ((boolean)\mod_bigbluebuttonbn\settings\validator::section_user_limit_shown()) { |
|
| 2768 | + if ((boolean) \mod_bigbluebuttonbn\settings\validator::section_user_limit_shown()) { |
|
| 2769 | 2769 | $renderer->render_group_header('userlimit'); |
| 2770 | 2770 | $renderer->render_group_element('userlimit_default', |
| 2771 | 2771 | $renderer->render_group_element_text('userlimit_default', 0, PARAM_INT)); |
@@ -2783,7 +2783,7 @@ discard block |
||
| 2783 | 2783 | */ |
| 2784 | 2784 | function bigbluebuttonbn_settings_duration(&$renderer) { |
| 2785 | 2785 | // Configuration for "scheduled duration" feature. |
| 2786 | - if ((boolean)\mod_bigbluebuttonbn\settings\validator::section_scheduled_duration_shown()) { |
|
| 2786 | + if ((boolean) \mod_bigbluebuttonbn\settings\validator::section_scheduled_duration_shown()) { |
|
| 2787 | 2787 | $renderer->render_group_header('scheduled'); |
| 2788 | 2788 | $renderer->render_group_element('scheduled_duration_enabled', |
| 2789 | 2789 | $renderer->render_group_element_checkbox('scheduled_duration_enabled', 1)); |
@@ -2803,7 +2803,7 @@ discard block |
||
| 2803 | 2803 | */ |
| 2804 | 2804 | function bigbluebuttonbn_settings_participants(&$renderer) { |
| 2805 | 2805 | // Configuration for defining the default role/user that will be moderator on new activities. |
| 2806 | - if ((boolean)\mod_bigbluebuttonbn\settings\validator::section_moderator_default_shown()) { |
|
| 2806 | + if ((boolean) \mod_bigbluebuttonbn\settings\validator::section_moderator_default_shown()) { |
|
| 2807 | 2807 | $renderer->render_group_header('participant'); |
| 2808 | 2808 | // UI for 'participants' feature. |
| 2809 | 2809 | $roles = bigbluebuttonbn_get_roles(); |
@@ -2824,7 +2824,7 @@ discard block |
||
| 2824 | 2824 | */ |
| 2825 | 2825 | function bigbluebuttonbn_settings_notifications(&$renderer) { |
| 2826 | 2826 | // Configuration for "send notifications" feature. |
| 2827 | - if ((boolean)\mod_bigbluebuttonbn\settings\validator::section_send_notifications_shown()) { |
|
| 2827 | + if ((boolean) \mod_bigbluebuttonbn\settings\validator::section_send_notifications_shown()) { |
|
| 2828 | 2828 | $renderer->render_group_header('sendnotifications'); |
| 2829 | 2829 | $renderer->render_group_element('sendnotifications_enabled', |
| 2830 | 2830 | $renderer->render_group_element_checkbox('sendnotifications_enabled', 1)); |
@@ -2840,12 +2840,12 @@ discard block |
||
| 2840 | 2840 | */ |
| 2841 | 2841 | function bigbluebuttonbn_settings_clienttype(&$renderer) { |
| 2842 | 2842 | // Configuration for "clienttype" feature. |
| 2843 | - if ((boolean)\mod_bigbluebuttonbn\settings\validator::section_clienttype_shown()) { |
|
| 2843 | + if ((boolean) \mod_bigbluebuttonbn\settings\validator::section_clienttype_shown()) { |
|
| 2844 | 2844 | $renderer->render_group_header('clienttype'); |
| 2845 | 2845 | $renderer->render_group_element('clienttype_editable', |
| 2846 | 2846 | $renderer->render_group_element_checkbox('clienttype_editable', 0)); |
| 2847 | 2847 | // Web Client default. |
| 2848 | - $default = intval((int)\mod_bigbluebuttonbn\locallib\config::get('clienttype_default')); |
|
| 2848 | + $default = intval((int) \mod_bigbluebuttonbn\locallib\config::get('clienttype_default')); |
|
| 2849 | 2849 | $choices = array(BIGBLUEBUTTON_CLIENTTYPE_FLASH => get_string('mod_form_block_clienttype_flash', 'bigbluebuttonbn'), |
| 2850 | 2850 | BIGBLUEBUTTON_CLIENTTYPE_HTML5 => get_string('mod_form_block_clienttype_html5', 'bigbluebuttonbn')); |
| 2851 | 2851 | $renderer->render_group_element('clienttype_default', |
@@ -2863,7 +2863,7 @@ discard block |
||
| 2863 | 2863 | */ |
| 2864 | 2864 | function bigbluebuttonbn_settings_muteonstart(&$renderer) { |
| 2865 | 2865 | // Configuration for BigBlueButton. |
| 2866 | - if ((boolean)\mod_bigbluebuttonbn\settings\validator::section_muteonstart_shown()) { |
|
| 2866 | + if ((boolean) \mod_bigbluebuttonbn\settings\validator::section_muteonstart_shown()) { |
|
| 2867 | 2867 | $renderer->render_group_header('muteonstart'); |
| 2868 | 2868 | $renderer->render_group_element('muteonstart_default', |
| 2869 | 2869 | $renderer->render_group_element_checkbox('muteonstart_default', 0)); |
@@ -2881,7 +2881,7 @@ discard block |
||
| 2881 | 2881 | */ |
| 2882 | 2882 | function bigbluebuttonbn_settings_extended(&$renderer) { |
| 2883 | 2883 | // Configuration for 'notify users when recording ready' feature. |
| 2884 | - if (!(boolean)\mod_bigbluebuttonbn\settings\validator::section_settings_extended_shown()) { |
|
| 2884 | + if (!(boolean) \mod_bigbluebuttonbn\settings\validator::section_settings_extended_shown()) { |
|
| 2885 | 2885 | return; |
| 2886 | 2886 | } |
| 2887 | 2887 | $renderer->render_group_header('extended_capabilities'); |
@@ -2905,7 +2905,7 @@ discard block |
||
| 2905 | 2905 | global $DB; |
| 2906 | 2906 | do { |
| 2907 | 2907 | $encodedseed = sha1(bigbluebuttonbn_random_password(12)); |
| 2908 | - $meetingid = (string)$DB->get_field('bigbluebuttonbn', 'meetingid', array('meetingid' => $encodedseed)); |
|
| 2908 | + $meetingid = (string) $DB->get_field('bigbluebuttonbn', 'meetingid', array('meetingid' => $encodedseed)); |
|
| 2909 | 2909 | } while ($meetingid == $encodedseed); |
| 2910 | 2910 | return $encodedseed; |
| 2911 | 2911 | } |
@@ -2950,22 +2950,22 @@ discard block |
||
| 2950 | 2950 | * |
| 2951 | 2951 | * @return string |
| 2952 | 2952 | */ |
| 2953 | -function bigbluebuttonbn_render_warning($message, $type='info', $href='', $text='', $class='') { |
|
| 2953 | +function bigbluebuttonbn_render_warning($message, $type = 'info', $href = '', $text = '', $class = '') { |
|
| 2954 | 2954 | global $OUTPUT; |
| 2955 | 2955 | $output = "\n"; |
| 2956 | 2956 | // Evaluates if config_warning is enabled. |
| 2957 | 2957 | if (empty($message)) { |
| 2958 | 2958 | return $output; |
| 2959 | 2959 | } |
| 2960 | - $output .= $OUTPUT->box_start('box boxalignleft adminerror alert alert-' . $type . ' alert-block fade in', |
|
| 2961 | - 'bigbluebuttonbn_view_general_warning') . "\n"; |
|
| 2962 | - $output .= ' ' . $message . "\n"; |
|
| 2963 | - $output .= ' <div class="singlebutton pull-right">' . "\n"; |
|
| 2960 | + $output .= $OUTPUT->box_start('box boxalignleft adminerror alert alert-'.$type.' alert-block fade in', |
|
| 2961 | + 'bigbluebuttonbn_view_general_warning')."\n"; |
|
| 2962 | + $output .= ' '.$message."\n"; |
|
| 2963 | + $output .= ' <div class="singlebutton pull-right">'."\n"; |
|
| 2964 | 2964 | if (!empty($href)) { |
| 2965 | 2965 | $output .= bigbluebuttonbn_render_warning_button($href, $text, $class); |
| 2966 | 2966 | } |
| 2967 | - $output .= ' </div>' . "\n"; |
|
| 2968 | - $output .= $OUTPUT->box_end() . "\n"; |
|
| 2967 | + $output .= ' </div>'."\n"; |
|
| 2968 | + $output .= $OUTPUT->box_end()."\n"; |
|
| 2969 | 2969 | return $output; |
| 2970 | 2970 | } |
| 2971 | 2971 | |
@@ -2989,10 +2989,10 @@ discard block |
||
| 2989 | 2989 | if ($class == '') { |
| 2990 | 2990 | $class = 'btn btn-secondary'; |
| 2991 | 2991 | } |
| 2992 | - $output = ' <form method="post" action="' . $href . '" class="form-inline">'."\n"; |
|
| 2993 | - $output .= ' <button type="submit" class="' . $class . '"'."\n"; |
|
| 2994 | - $output .= ' title="' . $title . '"'."\n"; |
|
| 2995 | - $output .= ' >' . $text . '</button>'."\n"; |
|
| 2992 | + $output = ' <form method="post" action="'.$href.'" class="form-inline">'."\n"; |
|
| 2993 | + $output .= ' <button type="submit" class="'.$class.'"'."\n"; |
|
| 2994 | + $output .= ' title="'.$title.'"'."\n"; |
|
| 2995 | + $output .= ' >'.$text.'</button>'."\n"; |
|
| 2996 | 2996 | $output .= ' </form>'."\n"; |
| 2997 | 2997 | return $output; |
| 2998 | 2998 | } |
@@ -3059,7 +3059,7 @@ discard block |
||
| 3059 | 3059 | |
| 3060 | 3060 | // By default, use a meetingid without groups. |
| 3061 | 3061 | if (empty($mid)) { |
| 3062 | - $mid = $bigbluebuttonbn->meetingid . '-' . $bigbluebuttonbn->course . '-' . $bigbluebuttonbn->id; |
|
| 3062 | + $mid = $bigbluebuttonbn->meetingid.'-'.$bigbluebuttonbn->course.'-'.$bigbluebuttonbn->id; |
|
| 3063 | 3063 | } |
| 3064 | 3064 | |
| 3065 | 3065 | // When meeting is running, all authorized users can join right in. |
@@ -3120,7 +3120,7 @@ discard block |
||
| 3120 | 3120 | function bigbluebuttonbn_instance_ownerid($bigbluebuttonbn) { |
| 3121 | 3121 | global $DB; |
| 3122 | 3122 | $filters = array('bigbluebuttonbnid' => $bigbluebuttonbn->id, 'log' => 'Add'); |
| 3123 | - $ownerid = (integer)$DB->get_field('bigbluebuttonbn_logs', 'userid', $filters); |
|
| 3123 | + $ownerid = (integer) $DB->get_field('bigbluebuttonbn_logs', 'userid', $filters); |
|
| 3124 | 3124 | return $ownerid; |
| 3125 | 3125 | } |
| 3126 | 3126 | |
@@ -3130,7 +3130,7 @@ discard block |
||
| 3130 | 3130 | * @return boolean |
| 3131 | 3131 | */ |
| 3132 | 3132 | function bigbluebuttonbn_has_html5_client() { |
| 3133 | - $checkurl = \mod_bigbluebuttonbn\locallib\bigbluebutton::root() . "html5client/check"; |
|
| 3133 | + $checkurl = \mod_bigbluebuttonbn\locallib\bigbluebutton::root()."html5client/check"; |
|
| 3134 | 3134 | $curlinfo = bigbluebuttonbn_wrap_xml_load_file_curl_request($checkurl, 'HEAD'); |
| 3135 | 3135 | return (isset($curlinfo['http_code']) && $curlinfo['http_code'] == 200); |
| 3136 | 3136 | } |
@@ -3163,8 +3163,8 @@ discard block |
||
| 3163 | 3163 | $bbbsession['meetingname'] = $bbbsession['bigbluebuttonbn']->name; |
| 3164 | 3164 | $bbbsession['meetingdescription'] = $bbbsession['bigbluebuttonbn']->intro; |
| 3165 | 3165 | // Extra data for setting up the Meeting. |
| 3166 | - $bbbsession['userlimit'] = intval((int)\mod_bigbluebuttonbn\locallib\config::get('userlimit_default')); |
|
| 3167 | - if ((boolean)\mod_bigbluebuttonbn\locallib\config::get('userlimit_editable')) { |
|
| 3166 | + $bbbsession['userlimit'] = intval((int) \mod_bigbluebuttonbn\locallib\config::get('userlimit_default')); |
|
| 3167 | + if ((boolean) \mod_bigbluebuttonbn\locallib\config::get('userlimit_editable')) { |
|
| 3168 | 3168 | $bbbsession['userlimit'] = intval($bbbsession['bigbluebuttonbn']->userlimit); |
| 3169 | 3169 | } |
| 3170 | 3170 | $bbbsession['voicebridge'] = $bbbsession['bigbluebuttonbn']->voicebridge; |
@@ -3270,7 +3270,7 @@ discard block |
||
| 3270 | 3270 | ); |
| 3271 | 3271 | |
| 3272 | 3272 | // Check status and set extra values. |
| 3273 | - $activitystatus = bigbluebuttonbn_view_get_activity_status($bbbsession); // In locallib. |
|
| 3273 | + $activitystatus = bigbluebuttonbn_view_get_activity_status($bbbsession); // In locallib. |
|
| 3274 | 3274 | if ($activitystatus == 'ended') { |
| 3275 | 3275 | $bbbsession['presentation'] = bigbluebuttonbn_get_presentation_array( |
| 3276 | 3276 | $bbbsession['context'], $bbbsession['bigbluebuttonbn']->presentation); |
@@ -3306,18 +3306,18 @@ discard block |
||
| 3306 | 3306 | 'bbb-recording-tags' => bigbluebuttonbn_get_tags($bbbsession['cm']->id), // Same as $id. |
| 3307 | 3307 | ]; |
| 3308 | 3308 | // Special metadata for recording processing. |
| 3309 | - if ((boolean)\mod_bigbluebuttonbn\locallib\config::get('recordingstatus_enabled')) { |
|
| 3309 | + if ((boolean) \mod_bigbluebuttonbn\locallib\config::get('recordingstatus_enabled')) { |
|
| 3310 | 3310 | $metadata["bn-recording-status"] = json_encode( |
| 3311 | 3311 | array( |
| 3312 | - 'email' => array('"' . fullname($USER) . '" <' . $USER->email . '>'), |
|
| 3312 | + 'email' => array('"'.fullname($USER).'" <'.$USER->email.'>'), |
|
| 3313 | 3313 | 'context' => $bbbsession['bigbluebuttonbnURL'] |
| 3314 | 3314 | ) |
| 3315 | 3315 | ); |
| 3316 | 3316 | } |
| 3317 | - if ((boolean)\mod_bigbluebuttonbn\locallib\config::get('recordingready_enabled')) { |
|
| 3317 | + if ((boolean) \mod_bigbluebuttonbn\locallib\config::get('recordingready_enabled')) { |
|
| 3318 | 3318 | $metadata['bn-recording-ready-url'] = $bbbsession['recordingReadyURL']; |
| 3319 | 3319 | } |
| 3320 | - if ((boolean)\mod_bigbluebuttonbn\locallib\config::get('meetingevents_enabled')) { |
|
| 3320 | + if ((boolean) \mod_bigbluebuttonbn\locallib\config::get('meetingevents_enabled')) { |
|
| 3321 | 3321 | $metadata['analytics-callback-url'] = $bbbsession['meetingEventsURL']; |
| 3322 | 3322 | } |
| 3323 | 3323 | return $metadata; |
@@ -59,7 +59,7 @@ |
||
| 59 | 59 | $logs = new backup_nested_element('logs'); |
| 60 | 60 | |
| 61 | 61 | $log = new backup_nested_element('log', array('id'), array( |
| 62 | - 'courseid', 'bigbluebuttonbnid', 'userid', 'timecreated', 'meetingid', 'log', 'meta', )); |
|
| 62 | + 'courseid', 'bigbluebuttonbnid', 'userid', 'timecreated', 'meetingid', 'log', 'meta',)); |
|
| 63 | 63 | |
| 64 | 64 | // Build the tree. |
| 65 | 65 | $bigbluebuttonbn->add_child($logs); |
@@ -126,7 +126,7 @@ |
||
| 126 | 126 | echo $completionvalidate; |
| 127 | 127 | return; |
| 128 | 128 | } |
| 129 | - header('HTTP/1.0 400 Bad request. The action '. $a . ' doesn\'t exist'); |
|
| 129 | + header('HTTP/1.0 400 Bad request. The action '.$a.' doesn\'t exist'); |
|
| 130 | 130 | } catch (Exception $e) { |
| 131 | 131 | header('HTTP/1.0 500 Internal Server Error. '.$e->getMessage()); |
| 132 | 132 | } |
@@ -261,7 +261,7 @@ discard block |
||
| 261 | 261 | // Update a record. |
| 262 | 262 | $DB->update_record('bigbluebuttonbn', $bigbluebuttonbn); |
| 263 | 263 | // Get the meetingid column in the bigbluebuttonbn table. |
| 264 | - $bigbluebuttonbn->meetingid = (string)$DB->get_field('bigbluebuttonbn', 'meetingid', array('id' => $bigbluebuttonbn->id)); |
|
| 264 | + $bigbluebuttonbn->meetingid = (string) $DB->get_field('bigbluebuttonbn', 'meetingid', array('id' => $bigbluebuttonbn->id)); |
|
| 265 | 265 | // Log update action. |
| 266 | 266 | bigbluebuttonbn_log($bigbluebuttonbn, BIGBLUEBUTTONBN_LOG_EVENT_EDIT); |
| 267 | 267 | // Complete the process. |
@@ -315,9 +315,9 @@ discard block |
||
| 315 | 315 | function bigbluebuttonbn_delete_instance_log($bigbluebuttonbn) { |
| 316 | 316 | global $DB; |
| 317 | 317 | $sql = "SELECT * FROM {bigbluebuttonbn_logs} "; |
| 318 | - $sql .= "WHERE bigbluebuttonbnid = ? AND log = ? AND ". $DB->sql_compare_text('meta') . " = ?"; |
|
| 318 | + $sql .= "WHERE bigbluebuttonbnid = ? AND log = ? AND ".$DB->sql_compare_text('meta')." = ?"; |
|
| 319 | 319 | $logs = $DB->get_records_sql($sql, array($bigbluebuttonbn->id, BIGBLUEBUTTONBN_LOG_EVENT_CREATE, "{\"record\":true}")); |
| 320 | - $meta = "{\"has_recordings\":" . empty($logs) ? "true" : "false" . "}"; |
|
| 320 | + $meta = "{\"has_recordings\":".empty($logs) ? "true" : "false"."}"; |
|
| 321 | 321 | bigbluebuttonbn_log($bigbluebuttonbn, BIGBLUEBUTTONBN_LOG_EVENT_DELETE, [], $meta); |
| 322 | 322 | } |
| 323 | 323 | |
@@ -335,8 +335,8 @@ discard block |
||
| 335 | 335 | */ |
| 336 | 336 | function bigbluebuttonbn_user_outline($course, $user, $mod, $bigbluebuttonbn) { |
| 337 | 337 | if ($completed = bigbluebuttonbn_user_complete($course, $user, $bigbluebuttonbn)) { |
| 338 | - return fullname($user) . ' ' . get_string('view_message_has_joined', 'bigbluebuttonbn') . ' ' . |
|
| 339 | - get_string('view_message_session_for', 'bigbluebuttonbn') . ' ' . (string) $completed . ' ' . |
|
| 338 | + return fullname($user).' '.get_string('view_message_has_joined', 'bigbluebuttonbn').' '. |
|
| 339 | + get_string('view_message_session_for', 'bigbluebuttonbn').' '.(string) $completed.' '. |
|
| 340 | 340 | get_string('view_message_times', 'bigbluebuttonbn'); |
| 341 | 341 | } |
| 342 | 342 | return ''; |
@@ -357,12 +357,12 @@ discard block |
||
| 357 | 357 | if (is_object($courseorid)) { |
| 358 | 358 | $course = $courseorid; |
| 359 | 359 | } else { |
| 360 | - $course = (object)array('id' => $courseorid); |
|
| 360 | + $course = (object) array('id' => $courseorid); |
|
| 361 | 361 | } |
| 362 | 362 | if (is_object($userorid)) { |
| 363 | 363 | $user = $userorid; |
| 364 | 364 | } else { |
| 365 | - $user = (object)array('id' => $userorid); |
|
| 365 | + $user = (object) array('id' => $userorid); |
|
| 366 | 366 | } |
| 367 | 367 | $sql = "SELECT COUNT(*) FROM {bigbluebuttonbn_logs} "; |
| 368 | 368 | $sql .= "WHERE courseid = ? AND bigbluebuttonbnid = ? AND userid = ? AND (log = ? OR log = ?)"; |
@@ -388,7 +388,7 @@ discard block |
||
| 388 | 388 | function bigbluebuttonbn_reset_course_items() { |
| 389 | 389 | $items = array("events" => 0, "tags" => 0, "logs" => 0); |
| 390 | 390 | // Include recordings only if enabled. |
| 391 | - if ((boolean)\mod_bigbluebuttonbn\locallib\config::recordings_enabled()) { |
|
| 391 | + if ((boolean) \mod_bigbluebuttonbn\locallib\config::recordings_enabled()) { |
|
| 392 | 392 | $items["recordings"] = 0; |
| 393 | 393 | } |
| 394 | 394 | return $items; |
@@ -692,7 +692,7 @@ discard block |
||
| 692 | 692 | function bigbluebuttonbn_process_pre_save_instance(&$bigbluebuttonbn) { |
| 693 | 693 | require_once(__DIR__.'/locallib.php'); |
| 694 | 694 | $bigbluebuttonbn->timemodified = time(); |
| 695 | - if ((integer)$bigbluebuttonbn->instance == 0) { |
|
| 695 | + if ((integer) $bigbluebuttonbn->instance == 0) { |
|
| 696 | 696 | $bigbluebuttonbn->meetingid = 0; |
| 697 | 697 | $bigbluebuttonbn->timecreated = time(); |
| 698 | 698 | $bigbluebuttonbn->timemodified = 0; |
@@ -1117,7 +1117,7 @@ discard block |
||
| 1117 | 1117 | \core_calendar\action_factory $factory) { |
| 1118 | 1118 | global $CFG, $DB; |
| 1119 | 1119 | |
| 1120 | - require_once($CFG->dirroot . '/mod/bigbluebuttonbn/locallib.php'); |
|
| 1120 | + require_once($CFG->dirroot.'/mod/bigbluebuttonbn/locallib.php'); |
|
| 1121 | 1121 | |
| 1122 | 1122 | // Get mod info. |
| 1123 | 1123 | $cm = get_fast_modinfo($event->courseid)->instances['bigbluebuttonbn'][$event->instance]; |
@@ -1195,7 +1195,7 @@ discard block |
||
| 1195 | 1195 | function bigbluebuttonbn_extend_settings_navigation(settings_navigation $settingsnav, navigation_node $nodenav) { |
| 1196 | 1196 | global $PAGE, $USER; |
| 1197 | 1197 | // Don't add validate completion if the callback for meetingevents is NOT enabled. |
| 1198 | - if (!(boolean)\mod_bigbluebuttonbn\locallib\config::get('meetingevents_enabled')) { |
|
| 1198 | + if (!(boolean) \mod_bigbluebuttonbn\locallib\config::get('meetingevents_enabled')) { |
|
| 1199 | 1199 | return; |
| 1200 | 1200 | } |
| 1201 | 1201 | // Don't add validate completion if user is not allowed to edit the activity. |
@@ -1203,7 +1203,7 @@ discard block |
||
| 1203 | 1203 | if (!has_capability('moodle/course:manageactivities', $context, $USER->id)) { |
| 1204 | 1204 | return; |
| 1205 | 1205 | } |
| 1206 | - $completionvalidate = '#action=completion_validate&bigbluebuttonbn=' . $PAGE->cm->instance; |
|
| 1206 | + $completionvalidate = '#action=completion_validate&bigbluebuttonbn='.$PAGE->cm->instance; |
|
| 1207 | 1207 | $nodenav->add(get_string('completionvalidatestate', 'bigbluebuttonbn'), |
| 1208 | 1208 | $completionvalidate, navigation_node::TYPE_CONTAINER); |
| 1209 | 1209 | } |
@@ -626,7 +626,7 @@ discard block |
||
| 626 | 626 | // Pull the Bearer from the headers. |
| 627 | 627 | if (!array_key_exists('Authorization', $headers)) { |
| 628 | 628 | $msg = 'Authorization failed'; |
| 629 | - header('HTTP/1.0 400 Bad Request. ' . $msg); |
|
| 629 | + header('HTTP/1.0 400 Bad Request. '.$msg); |
|
| 630 | 630 | return; |
| 631 | 631 | } |
| 632 | 632 | $authorization = explode(" ", $headers['Authorization']); |
@@ -641,8 +641,8 @@ discard block |
||
| 641 | 641 | // Convert JSON string to a JSON object. |
| 642 | 642 | $jsonobj = json_decode($jsonstr); |
| 643 | 643 | } catch (Exception $e) { |
| 644 | - $msg = 'Caught exception: ' . $e->getMessage(); |
|
| 645 | - header('HTTP/1.0 400 Bad Request. ' . $msg); |
|
| 644 | + $msg = 'Caught exception: '.$e->getMessage(); |
|
| 645 | + header('HTTP/1.0 400 Bad Request. '.$msg); |
|
| 646 | 646 | return; |
| 647 | 647 | } |
| 648 | 648 | |
@@ -651,7 +651,7 @@ discard block |
||
| 651 | 651 | $meetingidelements = explode('-', $meetingidelements[0]); |
| 652 | 652 | if (!isset($bigbluebuttonbn) || $bigbluebuttonbn->meetingid != $meetingidelements[0]) { |
| 653 | 653 | $msg = 'The activity may have been deleted'; |
| 654 | - header('HTTP/1.0 410 Gone. ' . $msg); |
|
| 654 | + header('HTTP/1.0 410 Gone. '.$msg); |
|
| 655 | 655 | return; |
| 656 | 656 | } |
| 657 | 657 | |
@@ -664,11 +664,11 @@ discard block |
||
| 664 | 664 | // Process the events. |
| 665 | 665 | bigbluebuttonbn_process_meeting_events($bigbluebuttonbn, $jsonobj); |
| 666 | 666 | $msg = 'Enqueued.'; |
| 667 | - header('HTTP/1.0 202 Accepted. ' . $msg); |
|
| 667 | + header('HTTP/1.0 202 Accepted. '.$msg); |
|
| 668 | 668 | return; |
| 669 | 669 | } |
| 670 | 670 | $msg = 'Already processed.'; |
| 671 | - header('HTTP/1.0 202 Accepted. ' . $msg); |
|
| 671 | + header('HTTP/1.0 202 Accepted. '.$msg); |
|
| 672 | 672 | } |
| 673 | 673 | |
| 674 | 674 | /** |
@@ -47,7 +47,7 @@ |
||
| 47 | 47 | print_error('view_error_invalid_session', plugin::COMPONENT); |
| 48 | 48 | } |
| 49 | 49 | |
| 50 | -if (!(boolean)\mod_bigbluebuttonbn\locallib\config::importrecordings_enabled()) { |
|
| 50 | +if (!(boolean) \mod_bigbluebuttonbn\locallib\config::importrecordings_enabled()) { |
|
| 51 | 51 | print_error('view_message_importrecordings_disabled', plugin::COMPONENT); |
| 52 | 52 | } |
| 53 | 53 | |
@@ -106,8 +106,8 @@ discard block |
||
| 106 | 106 | $PAGE->requires->strings_for_js(array_keys(bigbluebuttonbn_get_strings_for_js()), 'bigbluebuttonbn'); |
| 107 | 107 | $jsvars['participantData'] = bigbluebuttonbn_get_participant_data($context); |
| 108 | 108 | $jsvars['participantList'] = $participantlist; |
| 109 | - $jsvars['iconsEnabled'] = (boolean)$cfg['recording_icons_enabled']; |
|
| 110 | - $jsvars['pixIconDelete'] = (string)$OUTPUT->pix_icon('t/delete', get_string('delete'), 'moodle'); |
|
| 109 | + $jsvars['iconsEnabled'] = (boolean) $cfg['recording_icons_enabled']; |
|
| 110 | + $jsvars['pixIconDelete'] = (string) $OUTPUT->pix_icon('t/delete', get_string('delete'), 'moodle'); |
|
| 111 | 111 | $PAGE->requires->yui_module('moodle-mod_bigbluebuttonbn-modform', |
| 112 | 112 | 'M.mod_bigbluebuttonbn.modform.init', array($jsvars)); |
| 113 | 113 | } |
@@ -178,7 +178,7 @@ discard block |
||
| 178 | 178 | */ |
| 179 | 179 | public function add_completion_rules() { |
| 180 | 180 | $mform = $this->_form; |
| 181 | - if (!bigbluebuttonbn_is_bn_server() || !(boolean)\mod_bigbluebuttonbn\locallib\config::get('meetingevents_enabled')) { |
|
| 181 | + if (!bigbluebuttonbn_is_bn_server() || !(boolean) \mod_bigbluebuttonbn\locallib\config::get('meetingevents_enabled')) { |
|
| 182 | 182 | return []; |
| 183 | 183 | } |
| 184 | 184 | |
@@ -186,7 +186,7 @@ discard block |
||
| 186 | 186 | $attendance['grouplabel'] = get_string('completionattendancegroup', 'bigbluebuttonbn'); |
| 187 | 187 | $attendance['rulelabel'] = get_string('completionattendance', 'bigbluebuttonbn'); |
| 188 | 188 | $attendance['group'] = [ |
| 189 | - $mform->createElement('checkbox', 'completionattendanceenabled', '', $attendance['rulelabel'] . ' '), |
|
| 189 | + $mform->createElement('checkbox', 'completionattendanceenabled', '', $attendance['rulelabel'].' '), |
|
| 190 | 190 | $mform->createElement('text', 'completionattendance', '', ['size' => 3]), |
| 191 | 191 | $mform->createElement('static', 'completionattendanceunit', ' ', get_string('minutes', 'bigbluebuttonbn')) |
| 192 | 192 | ]; |
@@ -204,11 +204,11 @@ discard block |
||
| 204 | 204 | $engagement['pollvotes'] = get_string('completionengagementpollvotes', 'bigbluebuttonbn'); |
| 205 | 205 | $engagement['emojis'] = get_string('completionengagementemojis', 'bigbluebuttonbn'); |
| 206 | 206 | $engagement['group'] = [ |
| 207 | - $mform->createElement('checkbox', 'completionengagementchats', '', $engagement['chatlabel'] . ' '), |
|
| 208 | - $mform->createElement('checkbox', 'completionengagementtalks', '', $engagement['talklabel'] . ' '), |
|
| 209 | - $mform->createElement('checkbox', 'completionengagementraisehand', '', $engagement['raisehand'] . ' '), |
|
| 210 | - $mform->createElement('checkbox', 'completionengagementpollvotes', '', $engagement['pollvotes'] . ' '), |
|
| 211 | - $mform->createElement('checkbox', 'completionengagementemojis', '', $engagement['emojis'] . ' '), |
|
| 207 | + $mform->createElement('checkbox', 'completionengagementchats', '', $engagement['chatlabel'].' '), |
|
| 208 | + $mform->createElement('checkbox', 'completionengagementtalks', '', $engagement['talklabel'].' '), |
|
| 209 | + $mform->createElement('checkbox', 'completionengagementraisehand', '', $engagement['raisehand'].' '), |
|
| 210 | + $mform->createElement('checkbox', 'completionengagementpollvotes', '', $engagement['pollvotes'].' '), |
|
| 211 | + $mform->createElement('checkbox', 'completionengagementemojis', '', $engagement['emojis'].' '), |
|
| 212 | 212 | ]; |
| 213 | 213 | $mform->addGroup($engagement['group'], 'completionengagementgroup', $engagement['grouplabel'], [' '], false); |
| 214 | 214 | $mform->addHelpButton('completionengagementgroup', 'completionengagementgroup', 'bigbluebuttonbn'); |
@@ -255,7 +255,7 @@ discard block |
||
| 255 | 255 | * @return void |
| 256 | 256 | */ |
| 257 | 257 | private function bigbluebuttonbn_mform_add_block_profiles(&$mform, $profiles) { |
| 258 | - if ((boolean)\mod_bigbluebuttonbn\locallib\config::recordings_enabled()) { |
|
| 258 | + if ((boolean) \mod_bigbluebuttonbn\locallib\config::recordings_enabled()) { |
|
| 259 | 259 | $mform->addElement('select', 'type', get_string('mod_form_field_instanceprofiles', 'bigbluebuttonbn'), |
| 260 | 260 | bigbluebuttonbn_get_instance_profiles_array($profiles), |
| 261 | 261 | array('onchange' => 'M.mod_bigbluebuttonbn.modform.updateInstanceTypeProfile(this);')); |
@@ -494,7 +494,7 @@ discard block |
||
| 494 | 494 | 'onclick' => 'M.mod_bigbluebuttonbn.modform.participantAdd(); return 0;' |
| 495 | 495 | )); |
| 496 | 496 | $htmladdparticipant = html_writer::tag('div', |
| 497 | - $htmlselectiontype . ' ' . $htmlselectionoptions . ' ' . $htmlselectioninput, null); |
|
| 497 | + $htmlselectiontype.' '.$htmlselectionoptions.' '.$htmlselectioninput, null); |
|
| 498 | 498 | $mform->addElement('html', "\n\n"); |
| 499 | 499 | $mform->addElement('static', 'static_add_participant', |
| 500 | 500 | get_string('mod_form_field_participant_add', 'bigbluebuttonbn'), $htmladdparticipant); |
@@ -58,7 +58,7 @@ |
||
| 58 | 58 | bigbluebuttonbn_view_bbbsession_set($PAGE->context, $bbbsession); |
| 59 | 59 | |
| 60 | 60 | // Validates if the BigBlueButton server is working. |
| 61 | -$serverversion = bigbluebuttonbn_get_server_version(); // In locallib. |
|
| 61 | +$serverversion = bigbluebuttonbn_get_server_version(); // In locallib. |
|
| 62 | 62 | if ($serverversion === null) { |
| 63 | 63 | $errmsg = 'view_error_unable_join_student'; |
| 64 | 64 | $errurl = '/course/view.php'; |
@@ -31,7 +31,7 @@ |
||
| 31 | 31 | 'coursebigbluebuttonbn' => array( // Handler unique name (can be anything). |
| 32 | 32 | 'displaydata' => array( |
| 33 | 33 | 'title' => 'pluginname', |
| 34 | - 'icon' => $CFG->wwwroot . '/mod/bigbluebuttonbn/pix/icon.gif', |
|
| 34 | + 'icon' => $CFG->wwwroot.'/mod/bigbluebuttonbn/pix/icon.gif', |
|
| 35 | 35 | 'class' => '', |
| 36 | 36 | ), |
| 37 | 37 | 'delegate' => 'CoreCourseModuleDelegate', // Delegate (where to display the link to the add-on). |