|
@@ -108,7 +108,7 @@ discard block |
|
|
block discarded – undo |
|
108
|
108
|
'logoutURL' => $logouturl, |
|
109
|
109
|
]; |
|
110
|
110
|
// Choose between Adobe Flash or HTML5 Client. |
|
111
|
|
- if ( $clienttype == BIGBLUEBUTTON_CLIENTTYPE_HTML5 ) { |
|
|
111
|
+ if ($clienttype == BIGBLUEBUTTON_CLIENTTYPE_HTML5) { |
|
112
|
112
|
$data['joinViaHtml5'] = 'true'; |
|
113
|
113
|
} |
|
114
|
114
|
if (!is_null($configtoken)) { |
|
@@ -181,7 +181,7 @@ discard block |
|
|
block discarded – undo |
|
181
|
181
|
} |
|
182
|
182
|
if ($xml) { |
|
183
|
183
|
// Either failure or success without meeting info. |
|
184
|
|
- return (array)$xml; |
|
|
184
|
+ return (array) $xml; |
|
185
|
185
|
} |
|
186
|
186
|
// If the server is unreachable, then prompts the user of the necessary action. |
|
187
|
187
|
return array('returncode' => 'FAILED', 'message' => 'unreachable', 'messageKey' => 'Server is unreachable'); |
|
@@ -565,7 +565,7 @@ discard block |
|
|
block discarded – undo |
|
565
|
565
|
*/ |
|
566
|
566
|
function bigbluebuttonbn_wrap_xml_load_file_curl_request($url, $method = 'GET', $data = null, $contenttype = 'text/xml') { |
|
567
|
567
|
global $CFG; |
|
568
|
|
- require_once($CFG->libdir . '/filelib.php'); |
|
|
568
|
+ require_once($CFG->libdir.'/filelib.php'); |
|
569
|
569
|
$c = new curl(); |
|
570
|
570
|
$c->setopt(array('SSL_VERIFYPEER' => true)); |
|
571
|
571
|
if ($method == 'POST') { |
|
@@ -616,7 +616,7 @@ discard block |
|
|
block discarded – undo |
|
616
|
616
|
if ($userroles) { |
|
617
|
617
|
$where = ''; |
|
618
|
618
|
foreach ($userroles as $userrole) { |
|
619
|
|
- $where .= (empty($where) ? ' WHERE' : ' OR').' id=' . $userrole->roleid; |
|
|
619
|
+ $where .= (empty($where) ? ' WHERE' : ' OR').' id='.$userrole->roleid; |
|
620
|
620
|
} |
|
621
|
621
|
$userroles = $DB->get_records_sql('SELECT * FROM {role}'.$where); |
|
622
|
622
|
} |
|
@@ -723,7 +723,7 @@ discard block |
|
|
block discarded – undo |
|
723
|
723
|
function bigbluebuttonbn_get_role($id) { |
|
724
|
724
|
$roles = (array) role_get_names(); |
|
725
|
725
|
if (is_numeric($id) && isset($roles[$id])) { |
|
726
|
|
- return (object)$roles[$id]; |
|
|
726
|
+ return (object) $roles[$id]; |
|
727
|
727
|
} |
|
728
|
728
|
foreach ($roles as $role) { |
|
729
|
729
|
if ($role->shortname == $id) { |
|
@@ -803,7 +803,7 @@ discard block |
|
|
block discarded – undo |
|
803
|
803
|
if (!empty($ownerid) && is_enrolled($context, $ownerid)) { |
|
804
|
804
|
$participantlist[] = array( |
|
805
|
805
|
'selectiontype' => 'user', |
|
806
|
|
- 'selectionid' => (string)$ownerid, |
|
|
806
|
+ 'selectionid' => (string) $ownerid, |
|
807
|
807
|
'role' => BIGBLUEBUTTONBN_ROLE_MODERATOR); |
|
808
|
808
|
} |
|
809
|
809
|
continue; |
|
@@ -878,7 +878,7 @@ discard block |
|
|
block discarded – undo |
|
878
|
878
|
if (!isguestuser()) { |
|
879
|
879
|
$userroles = bigbluebuttonbn_get_user_roles($context, $userid); |
|
880
|
880
|
} |
|
881
|
|
- return bigbluebuttonbn_is_moderator_validator($participantlist, $userid , $userroles); |
|
|
881
|
+ return bigbluebuttonbn_is_moderator_validator($participantlist, $userid, $userroles); |
|
882
|
882
|
} |
|
883
|
883
|
|
|
884
|
884
|
/** |
|
@@ -963,9 +963,9 @@ discard block |
|
|
block discarded – undo |
|
963
|
963
|
if ($voicebridge == 0) { |
|
964
|
964
|
return true; |
|
965
|
965
|
} |
|
966
|
|
- $select = 'voicebridge = ' . $voicebridge; |
|
|
966
|
+ $select = 'voicebridge = '.$voicebridge; |
|
967
|
967
|
if ($instance != 0) { |
|
968
|
|
- $select .= ' AND id <>' . $instance; |
|
|
968
|
+ $select .= ' AND id <>'.$instance; |
|
969
|
969
|
} |
|
970
|
970
|
if (!$DB->get_records_select('bigbluebuttonbn', $select)) { |
|
971
|
971
|
return true; |
|
@@ -985,7 +985,7 @@ discard block |
|
|
block discarded – undo |
|
985
|
985
|
$now = time(); |
|
986
|
986
|
if ($closingtime > 0 && $now < $closingtime) { |
|
987
|
987
|
$duration = ceil(($closingtime - $now) / 60); |
|
988
|
|
- $compensationtime = intval((int)\mod_bigbluebuttonbn\locallib\config::get('scheduled_duration_compensation')); |
|
|
988
|
+ $compensationtime = intval((int) \mod_bigbluebuttonbn\locallib\config::get('scheduled_duration_compensation')); |
|
989
|
989
|
$duration = intval($duration) + $compensationtime; |
|
990
|
990
|
} |
|
991
|
991
|
return $duration; |
|
@@ -1125,7 +1125,7 @@ discard block |
|
|
block discarded – undo |
|
1125
|
1125
|
if (array_key_exists('other', $options)) { |
|
1126
|
1126
|
$params['other'] = $options['other']; |
|
1127
|
1127
|
} |
|
1128
|
|
- $event = call_user_func_array('\mod_bigbluebuttonbn\event\\' . $type . '::create', |
|
|
1128
|
+ $event = call_user_func_array('\mod_bigbluebuttonbn\event\\'.$type.'::create', |
|
1129
|
1129
|
array($params)); |
|
1130
|
1130
|
$event->add_record_snapshot('course_modules', $cm); |
|
1131
|
1131
|
$event->add_record_snapshot('course', $course); |
|
@@ -1162,7 +1162,7 @@ discard block |
|
|
block discarded – undo |
|
1162
|
1162
|
* @return array |
|
1163
|
1163
|
*/ |
|
1164
|
1164
|
function bigbluebuttonbn_get_meeting_info($meetingid, $updatecache = false) { |
|
1165
|
|
- $cachettl = (int)\mod_bigbluebuttonbn\locallib\config::get('waitformoderator_cache_ttl'); |
|
|
1165
|
+ $cachettl = (int) \mod_bigbluebuttonbn\locallib\config::get('waitformoderator_cache_ttl'); |
|
1166
|
1166
|
$cache = cache::make_from_params(cache_store::MODE_APPLICATION, 'mod_bigbluebuttonbn', 'meetings_cache'); |
|
1167
|
1167
|
$result = $cache->get($meetingid); |
|
1168
|
1168
|
$now = time(); |
|
@@ -1368,7 +1368,7 @@ discard block |
|
|
block discarded – undo |
|
1368
|
1368
|
* @return boolean |
|
1369
|
1369
|
*/ |
|
1370
|
1370
|
function bigbluebuttonbn_get_recording_data_row_editable($bbbsession) { |
|
1371
|
|
- return ($bbbsession['managerecordings'] && ((double)$bbbsession['serverversion'] >= 1.0 || $bbbsession['bnserver'])); |
|
|
1371
|
+ return ($bbbsession['managerecordings'] && ((double) $bbbsession['serverversion'] >= 1.0 || $bbbsession['bnserver'])); |
|
1372
|
1372
|
} |
|
1373
|
1373
|
|
|
1374
|
1374
|
/** |
|
@@ -1379,7 +1379,7 @@ discard block |
|
|
block discarded – undo |
|
1379
|
1379
|
* @return boolean |
|
1380
|
1380
|
*/ |
|
1381
|
1381
|
function bigbluebuttonbn_get_recording_data_preview_enabled($bbbsession) { |
|
1382
|
|
- return ((double)$bbbsession['serverversion'] >= 1.0 && $bbbsession['bigbluebuttonbn']->recordings_preview == '1'); |
|
|
1382
|
+ return ((double) $bbbsession['serverversion'] >= 1.0 && $bbbsession['bigbluebuttonbn']->recordings_preview == '1'); |
|
1383
|
1383
|
} |
|
1384
|
1384
|
|
|
1385
|
1385
|
/** |
|
@@ -1455,11 +1455,11 @@ discard block |
|
|
block discarded – undo |
|
1455
|
1455
|
$actionbar .= bigbluebuttonbn_actionbar_render_button($recording, $buttonpayload); |
|
1456
|
1456
|
} |
|
1457
|
1457
|
$head = html_writer::start_tag('div', array( |
|
1458
|
|
- 'id' => 'recording-actionbar-' . $recording['recordID'], |
|
|
1458
|
+ 'id' => 'recording-actionbar-'.$recording['recordID'], |
|
1459
|
1459
|
'data-recordingid' => $recording['recordID'], |
|
1460
|
1460
|
'data-meetingid' => $recording['meetingID'])); |
|
1461
|
1461
|
$tail = html_writer::end_tag('div'); |
|
1462
|
|
- return $head . $actionbar . $tail; |
|
|
1462
|
+ return $head.$actionbar.$tail; |
|
1463
|
1463
|
} |
|
1464
|
1464
|
|
|
1465
|
1465
|
/** |
|
@@ -1554,7 +1554,7 @@ discard block |
|
|
block discarded – undo |
|
1554
|
1554
|
} |
|
1555
|
1555
|
$recordingpreview .= html_writer::start_tag('div', array('class' => '')); |
|
1556
|
1556
|
$recordingpreview .= html_writer::empty_tag('img', |
|
1557
|
|
- array('src' => trim($image['url']) . '?' . time(), 'class' => 'recording-thumbnail pull-left')); |
|
|
1557
|
+ array('src' => trim($image['url']).'?'.time(), 'class' => 'recording-thumbnail pull-left')); |
|
1558
|
1558
|
$recordingpreview .= html_writer::end_tag('div'); |
|
1559
|
1559
|
} |
|
1560
|
1560
|
$recordingpreview .= html_writer::end_tag('div'); |
|
@@ -1611,13 +1611,13 @@ discard block |
|
|
block discarded – undo |
|
1611
|
1611
|
return ''; |
|
1612
|
1612
|
} |
|
1613
|
1613
|
$text = bigbluebuttonbn_get_recording_type_text($playback['type']); |
|
1614
|
|
- $href = $CFG->wwwroot . '/mod/bigbluebuttonbn/bbb_view.php?action=play&bn=' . $bbbsession['bigbluebuttonbn']->id . |
|
1615
|
|
- '&mid=' . $recording['meetingID'] . '&rid=' . $recording['recordID'] . '&rtype=' . $playback['type']; |
|
|
1614
|
+ $href = $CFG->wwwroot.'/mod/bigbluebuttonbn/bbb_view.php?action=play&bn='.$bbbsession['bigbluebuttonbn']->id. |
|
|
1615
|
+ '&mid='.$recording['meetingID'].'&rid='.$recording['recordID'].'&rtype='.$playback['type']; |
|
1616
|
1616
|
if (!isset($recording['imported']) || !isset($recording['protected']) || $recording['protected'] === 'false') { |
|
1617
|
|
- $href .= '&href=' . urlencode(trim($playback['url'])); |
|
|
1617
|
+ $href .= '&href='.urlencode(trim($playback['url'])); |
|
1618
|
1618
|
} |
|
1619
|
1619
|
$linkattributes = array( |
|
1620
|
|
- 'id' => 'recording-play-' . $playback['type'] . '-' . $recording['recordID'], |
|
|
1620
|
+ 'id' => 'recording-play-'.$playback['type'].'-'.$recording['recordID'], |
|
1621
|
1621
|
'class' => 'btn btn-sm btn-default', |
|
1622
|
1622
|
'onclick' => 'M.mod_bigbluebuttonbn.recordings.recordingPlay(this);', |
|
1623
|
1623
|
'data-action' => 'play', |
|
@@ -1629,7 +1629,7 @@ discard block |
|
|
block discarded – undo |
|
1629
|
1629
|
$linkattributes['title'] = get_string('view_recording_format_errror_unreachable', 'bigbluebuttonbn'); |
|
1630
|
1630
|
unset($linkattributes['data-href']); |
|
1631
|
1631
|
} |
|
1632
|
|
- return $OUTPUT->action_link('#', $text, null, $linkattributes) . ' '; |
|
|
1632
|
+ return $OUTPUT->action_link('#', $text, null, $linkattributes).' '; |
|
1633
|
1633
|
} |
|
1634
|
1634
|
|
|
1635
|
1635
|
/** |
|
@@ -1642,7 +1642,7 @@ discard block |
|
|
block discarded – undo |
|
1642
|
1642
|
function bigbluebuttonbn_get_recording_type_text($playbacktype) { |
|
1643
|
1643
|
// Check first if string exists, and if it does'nt just default to the capitalised version of the string. |
|
1644
|
1644
|
$text = ucwords($playbacktype); |
|
1645
|
|
- $typestringid = 'view_recording_format_' . $playbacktype; |
|
|
1645
|
+ $typestringid = 'view_recording_format_'.$playbacktype; |
|
1646
|
1646
|
if (get_string_manager()->string_exists($typestringid, 'bigbluebuttonbn')) { |
|
1647
|
1647
|
$text = get_string($typestringid, 'bigbluebuttonbn'); |
|
1648
|
1648
|
} |
|
@@ -1672,7 +1672,7 @@ discard block |
|
|
block discarded – undo |
|
1672
|
1672
|
$validatedurls[$urlhost] = true; |
|
1673
|
1673
|
$curlinfo = bigbluebuttonbn_wrap_xml_load_file_curl_request($url, 'HEAD'); |
|
1674
|
1674
|
if (!isset($curlinfo['http_code']) || $curlinfo['http_code'] != 200) { |
|
1675
|
|
- $error = "Resources hosted by " . $urlhost . " are unreachable. Server responded with code " . $curlinfo['http_code']; |
|
|
1675
|
+ $error = "Resources hosted by ".$urlhost." are unreachable. Server responded with code ".$curlinfo['http_code']; |
|
1676
|
1676
|
debugging($error, DEBUG_DEVELOPER); |
|
1677
|
1677
|
$validatedurls[$urlhost] = false; |
|
1678
|
1678
|
} |
|
@@ -1763,12 +1763,12 @@ discard block |
|
|
block discarded – undo |
|
1763
|
1763
|
* @return string |
|
1764
|
1764
|
*/ |
|
1765
|
1765
|
function bigbluebuttonbn_get_recording_data_row_text($recording, $text, $source, $data) { |
|
1766
|
|
- $htmltext = '<span>' . htmlentities($text) . '</span>'; |
|
|
1766
|
+ $htmltext = '<span>'.htmlentities($text).'</span>'; |
|
1767
|
1767
|
if (empty($data)) { |
|
1768
|
1768
|
return $htmltext; |
|
1769
|
1769
|
} |
|
1770
|
|
- $target = $data['action'] . '-' . $data['target']; |
|
1771
|
|
- $id = 'recording-' . $target . '-' . $data['recordingid']; |
|
|
1770
|
+ $target = $data['action'].'-'.$data['target']; |
|
|
1771
|
+ $id = 'recording-'.$target.'-'.$data['recordingid']; |
|
1772
|
1772
|
$attributes = array('id' => $id, 'class' => 'quickeditlink col-md-20', |
|
1773
|
1773
|
'data-recordingid' => $data['recordingid'], 'data-meetingid' => $data['meetingid'], |
|
1774
|
1774
|
'data-target' => $data['target'], 'data-source' => $source); |
|
@@ -1776,7 +1776,7 @@ discard block |
|
|
block discarded – undo |
|
1776
|
1776
|
$tail = html_writer::end_tag('div'); |
|
1777
|
1777
|
$payload = array('action' => $data['action'], 'tag' => $data['tag'], 'target' => $data['target']); |
|
1778
|
1778
|
$htmllink = bigbluebuttonbn_actionbar_render_button($recording, $payload); |
|
1779
|
|
- return $head . $htmltext . $htmllink . $tail; |
|
|
1779
|
+ return $head.$htmltext.$htmllink.$tail; |
|
1780
|
1780
|
} |
|
1781
|
1781
|
|
|
1782
|
1782
|
/** |
|
@@ -1794,10 +1794,10 @@ discard block |
|
|
block discarded – undo |
|
1794
|
1794
|
} |
|
1795
|
1795
|
$target = $data['action']; |
|
1796
|
1796
|
if (isset($data['target'])) { |
|
1797
|
|
- $target .= '-' . $data['target']; |
|
|
1797
|
+ $target .= '-'.$data['target']; |
|
1798
|
1798
|
} |
|
1799
|
|
- $id = 'recording-' . $target . '-' . $recording['recordID']; |
|
1800
|
|
- $onclick = 'M.mod_bigbluebuttonbn.recordings.recording' . ucfirst($data['action']) . '(this); return false;'; |
|
|
1799
|
+ $id = 'recording-'.$target.'-'.$recording['recordID']; |
|
|
1800
|
+ $onclick = 'M.mod_bigbluebuttonbn.recordings.recording'.ucfirst($data['action']).'(this); return false;'; |
|
1801
|
1801
|
if ((boolean) \mod_bigbluebuttonbn\locallib\config::get('recording_icons_enabled')) { |
|
1802
|
1802
|
// With icon for $manageaction. |
|
1803
|
1803
|
$iconattributes = array('id' => $id, 'class' => 'iconsmall'); |
|
@@ -1811,12 +1811,12 @@ discard block |
|
|
block discarded – undo |
|
1811
|
1811
|
$recording['recordID']); |
|
1812
|
1812
|
} |
|
1813
|
1813
|
if (isset($data['disabled'])) { |
|
1814
|
|
- $iconattributes['class'] .= ' fa-' . $data['disabled']; |
|
|
1814
|
+ $iconattributes['class'] .= ' fa-'.$data['disabled']; |
|
1815
|
1815
|
$linkattributes['class'] = 'disabled'; |
|
1816
|
1816
|
unset($linkattributes['onclick']); |
|
1817
|
1817
|
} |
|
1818
|
1818
|
$icon = new pix_icon('i/'.$data['tag'], |
|
1819
|
|
- get_string('view_recording_list_actionbar_' . $data['action'], 'bigbluebuttonbn'), |
|
|
1819
|
+ get_string('view_recording_list_actionbar_'.$data['action'], 'bigbluebuttonbn'), |
|
1820
|
1820
|
'moodle', $iconattributes); |
|
1821
|
1821
|
return $OUTPUT->action_icon('#', $icon, null, $linkattributes, false); |
|
1822
|
1822
|
} |
|
@@ -1912,7 +1912,7 @@ discard block |
|
|
block discarded – undo |
|
1912
|
1912
|
if ($bbbsession['managerecordings']) { |
|
1913
|
1913
|
$table->head[] = get_string('view_recording_actionbar', 'bigbluebuttonbn'); |
|
1914
|
1914
|
$table->align[] = 'left'; |
|
1915
|
|
- $table->size[] = (count($tools) * 40) . 'px'; |
|
|
1915
|
+ $table->size[] = (count($tools) * 40).'px'; |
|
1916
|
1916
|
} |
|
1917
|
1917
|
// Get the groups of the user. |
|
1918
|
1918
|
$usergroups = groups_get_all_groups($bbbsession['course']->id, $bbbsession['userID']); |
|
@@ -1980,14 +1980,14 @@ discard block |
|
|
block discarded – undo |
|
1980
|
1980
|
} |
|
1981
|
1981
|
$rowdata->date_formatted = str_replace(' ', ' ', $rowdata->date_formatted); |
|
1982
|
1982
|
$row->cells = array(); |
|
1983
|
|
- $row->cells[] = $texthead . $rowdata->recording . $texttail; |
|
1984
|
|
- $row->cells[] = $texthead . $rowdata->meeting . $texttail;; |
|
1985
|
|
- $row->cells[] = $texthead . $rowdata->activity . $texttail; |
|
1986
|
|
- $row->cells[] = $texthead . $rowdata->description . $texttail; |
|
|
1983
|
+ $row->cells[] = $texthead.$rowdata->recording.$texttail; |
|
|
1984
|
+ $row->cells[] = $texthead.$rowdata->meeting.$texttail; ; |
|
|
1985
|
+ $row->cells[] = $texthead.$rowdata->activity.$texttail; |
|
|
1986
|
+ $row->cells[] = $texthead.$rowdata->description.$texttail; |
|
1987
|
1987
|
if (bigbluebuttonbn_get_recording_data_preview_enabled($bbbsession)) { |
|
1988
|
1988
|
$row->cells[] = $rowdata->preview; |
|
1989
|
1989
|
} |
|
1990
|
|
- $row->cells[] = $texthead . $rowdata->date_formatted . $texttail; |
|
|
1990
|
+ $row->cells[] = $texthead.$rowdata->date_formatted.$texttail; |
|
1991
|
1991
|
$row->cells[] = $rowdata->duration_formatted; |
|
1992
|
1992
|
if ($bbbsession['managerecordings']) { |
|
1993
|
1993
|
$row->cells[] = $rowdata->actionbar; |
|
@@ -2030,7 +2030,7 @@ discard block |
|
|
block discarded – undo |
|
2030
|
2030
|
$sender = get_admin(); |
|
2031
|
2031
|
// Prepare message. |
|
2032
|
2032
|
$messagetext = '<p>'.get_string('email_body_recording_ready_for', 'bigbluebuttonbn'). |
|
2033
|
|
- ' "' . $bigbluebuttonbn->name . '" '. |
|
|
2033
|
+ ' "'.$bigbluebuttonbn->name.'" '. |
|
2034
|
2034
|
get_string('email_body_recording_ready_is_ready', 'bigbluebuttonbn').'.</p>'; |
|
2035
|
2035
|
$context = context_course::instance($bigbluebuttonbn->course); |
|
2036
|
2036
|
\mod_bigbluebuttonbn\locallib\notifier::notification_send($sender, $bigbluebuttonbn, $messagetext); |
|
@@ -2165,17 +2165,17 @@ discard block |
|
|
block discarded – undo |
|
2165
|
2165
|
* @return string containing the sql used for getting the target bigbluebuttonbn instances |
|
2166
|
2166
|
*/ |
|
2167
|
2167
|
function bigbluebuttonbn_get_recordings_deleted_sql_select($courseid = 0, $bigbluebuttonbnid = null, $subset = true) { |
|
2168
|
|
- $sql = "log = '" . BIGBLUEBUTTONBN_LOG_EVENT_DELETE . "' AND meta like '%has_recordings%' AND meta like '%true%'"; |
|
|
2168
|
+ $sql = "log = '".BIGBLUEBUTTONBN_LOG_EVENT_DELETE."' AND meta like '%has_recordings%' AND meta like '%true%'"; |
|
2169
|
2169
|
if (empty($courseid)) { |
|
2170
|
2170
|
$courseid = 0; |
|
2171
|
2171
|
} |
|
2172
|
2172
|
if (empty($bigbluebuttonbnid)) { |
|
2173
|
|
- return $sql . " AND courseid = {$courseid}"; |
|
|
2173
|
+ return $sql." AND courseid = {$courseid}"; |
|
2174
|
2174
|
} |
|
2175
|
2175
|
if ($subset) { |
|
2176
|
|
- return $sql . " AND bigbluebuttonbnid = '{$bigbluebuttonbnid}'"; |
|
|
2176
|
+ return $sql." AND bigbluebuttonbnid = '{$bigbluebuttonbnid}'"; |
|
2177
|
2177
|
} |
|
2178
|
|
- return $sql . " AND courseid = {$courseid} AND bigbluebuttonbnid <> '{$bigbluebuttonbnid}'"; |
|
|
2178
|
+ return $sql." AND courseid = {$courseid} AND bigbluebuttonbnid <> '{$bigbluebuttonbnid}'"; |
|
2179
|
2179
|
} |
|
2180
|
2180
|
|
|
2181
|
2181
|
/** |
|
@@ -2189,17 +2189,17 @@ discard block |
|
|
block discarded – undo |
|
2189
|
2189
|
* @return string containing the sql used for getting the target bigbluebuttonbn instances |
|
2190
|
2190
|
*/ |
|
2191
|
2191
|
function bigbluebuttonbn_get_recordings_imported_sql_select($courseid = 0, $bigbluebuttonbnid = null, $subset = true) { |
|
2192
|
|
- $sql = "log = '" . BIGBLUEBUTTONBN_LOG_EVENT_IMPORT . "'"; |
|
|
2192
|
+ $sql = "log = '".BIGBLUEBUTTONBN_LOG_EVENT_IMPORT."'"; |
|
2193
|
2193
|
if (empty($courseid)) { |
|
2194
|
2194
|
$courseid = 0; |
|
2195
|
2195
|
} |
|
2196
|
2196
|
if (empty($bigbluebuttonbnid)) { |
|
2197
|
|
- return $sql . " AND courseid = '{$courseid}'"; |
|
|
2197
|
+ return $sql." AND courseid = '{$courseid}'"; |
|
2198
|
2198
|
} |
|
2199
|
2199
|
if ($subset) { |
|
2200
|
|
- return $sql . " AND bigbluebuttonbnid = '{$bigbluebuttonbnid}'"; |
|
|
2200
|
+ return $sql." AND bigbluebuttonbnid = '{$bigbluebuttonbnid}'"; |
|
2201
|
2201
|
} |
|
2202
|
|
- return $sql . " AND courseid = '{$courseid}' AND bigbluebuttonbnid <> '{$bigbluebuttonbnid}'"; |
|
|
2202
|
+ return $sql." AND courseid = '{$courseid}' AND bigbluebuttonbnid <> '{$bigbluebuttonbnid}'"; |
|
2203
|
2203
|
} |
|
2204
|
2204
|
|
|
2205
|
2205
|
/** |
|
@@ -2525,7 +2525,7 @@ discard block |
|
|
block discarded – undo |
|
2525
|
2525
|
*/ |
|
2526
|
2526
|
function bigbluebuttonbn_settings_general(&$renderer) { |
|
2527
|
2527
|
// Configuration for BigBlueButton. |
|
2528
|
|
- if ((boolean)\mod_bigbluebuttonbn\settings\validator::section_general_shown()) { |
|
|
2528
|
+ if ((boolean) \mod_bigbluebuttonbn\settings\validator::section_general_shown()) { |
|
2529
|
2529
|
$renderer->render_group_header('general'); |
|
2530
|
2530
|
$renderer->render_group_element('server_url', |
|
2531
|
2531
|
$renderer->render_group_element_text('server_url', BIGBLUEBUTTONBN_DEFAULT_SERVER_URL)); |
|
@@ -2543,7 +2543,7 @@ discard block |
|
|
block discarded – undo |
|
2543
|
2543
|
*/ |
|
2544
|
2544
|
function bigbluebuttonbn_settings_record(&$renderer) { |
|
2545
|
2545
|
// Configuration for 'recording' feature. |
|
2546
|
|
- if ((boolean)\mod_bigbluebuttonbn\settings\validator::section_record_meeting_shown()) { |
|
|
2546
|
+ if ((boolean) \mod_bigbluebuttonbn\settings\validator::section_record_meeting_shown()) { |
|
2547
|
2547
|
$renderer->render_group_header('recording'); |
|
2548
|
2548
|
$renderer->render_group_element('recording_default', |
|
2549
|
2549
|
$renderer->render_group_element_checkbox('recording_default', 1)); |
|
@@ -2573,7 +2573,7 @@ discard block |
|
|
block discarded – undo |
|
2573
|
2573
|
*/ |
|
2574
|
2574
|
function bigbluebuttonbn_settings_importrecordings(&$renderer) { |
|
2575
|
2575
|
// Configuration for 'import recordings' feature. |
|
2576
|
|
- if ((boolean)\mod_bigbluebuttonbn\settings\validator::section_import_recordings_shown()) { |
|
|
2576
|
+ if ((boolean) \mod_bigbluebuttonbn\settings\validator::section_import_recordings_shown()) { |
|
2577
|
2577
|
$renderer->render_group_header('importrecordings'); |
|
2578
|
2578
|
$renderer->render_group_element('importrecordings_enabled', |
|
2579
|
2579
|
$renderer->render_group_element_checkbox('importrecordings_enabled', 0)); |
|
@@ -2591,7 +2591,7 @@ discard block |
|
|
block discarded – undo |
|
2591
|
2591
|
*/ |
|
2592
|
2592
|
function bigbluebuttonbn_settings_showrecordings(&$renderer) { |
|
2593
|
2593
|
// Configuration for 'show recordings' feature. |
|
2594
|
|
- if ((boolean)\mod_bigbluebuttonbn\settings\validator::section_show_recordings_shown()) { |
|
|
2594
|
+ if ((boolean) \mod_bigbluebuttonbn\settings\validator::section_show_recordings_shown()) { |
|
2595
|
2595
|
$renderer->render_group_header('recordings'); |
|
2596
|
2596
|
$renderer->render_group_element('recordings_html_default', |
|
2597
|
2597
|
$renderer->render_group_element_checkbox('recordings_html_default', 1)); |
|
@@ -2623,7 +2623,7 @@ discard block |
|
|
block discarded – undo |
|
2623
|
2623
|
*/ |
|
2624
|
2624
|
function bigbluebuttonbn_settings_waitmoderator(&$renderer) { |
|
2625
|
2625
|
// Configuration for wait for moderator feature. |
|
2626
|
|
- if ((boolean)\mod_bigbluebuttonbn\settings\validator::section_wait_moderator_shown()) { |
|
|
2626
|
+ if ((boolean) \mod_bigbluebuttonbn\settings\validator::section_wait_moderator_shown()) { |
|
2627
|
2627
|
$renderer->render_group_header('waitformoderator'); |
|
2628
|
2628
|
$renderer->render_group_element('waitformoderator_default', |
|
2629
|
2629
|
$renderer->render_group_element_checkbox('waitformoderator_default', 0)); |
|
@@ -2645,7 +2645,7 @@ discard block |
|
|
block discarded – undo |
|
2645
|
2645
|
*/ |
|
2646
|
2646
|
function bigbluebuttonbn_settings_voicebridge(&$renderer) { |
|
2647
|
2647
|
// Configuration for "static voice bridge" feature. |
|
2648
|
|
- if ((boolean)\mod_bigbluebuttonbn\settings\validator::section_static_voice_bridge_shown()) { |
|
|
2648
|
+ if ((boolean) \mod_bigbluebuttonbn\settings\validator::section_static_voice_bridge_shown()) { |
|
2649
|
2649
|
$renderer->render_group_header('voicebridge'); |
|
2650
|
2650
|
$renderer->render_group_element('voicebridge_editable', |
|
2651
|
2651
|
$renderer->render_group_element_checkbox('voicebridge_editable', 0)); |
|
@@ -2661,7 +2661,7 @@ discard block |
|
|
block discarded – undo |
|
2661
|
2661
|
*/ |
|
2662
|
2662
|
function bigbluebuttonbn_settings_preupload(&$renderer) { |
|
2663
|
2663
|
// Configuration for "preupload presentation" feature. |
|
2664
|
|
- if ((boolean)\mod_bigbluebuttonbn\settings\validator::section_preupload_presentation_shown()) { |
|
|
2664
|
+ if ((boolean) \mod_bigbluebuttonbn\settings\validator::section_preupload_presentation_shown()) { |
|
2665
|
2665
|
// This feature only works if curl is installed. |
|
2666
|
2666
|
$preuploaddescripion = get_string('config_preuploadpresentation_description', 'bigbluebuttonbn'); |
|
2667
|
2667
|
if (!extension_loaded('curl')) { |
|
@@ -2687,7 +2687,7 @@ discard block |
|
|
block discarded – undo |
|
2687
|
2687
|
*/ |
|
2688
|
2688
|
function bigbluebuttonbn_settings_preupload_manage_default_file(&$renderer) { |
|
2689
|
2689
|
// Configuration for "preupload presentation" feature. |
|
2690
|
|
- if ((boolean)\mod_bigbluebuttonbn\settings\validator::section_preupload_presentation_shown()) { |
|
|
2690
|
+ if ((boolean) \mod_bigbluebuttonbn\settings\validator::section_preupload_presentation_shown()) { |
|
2691
|
2691
|
if (extension_loaded('curl')) { |
|
2692
|
2692
|
// This feature only works if curl is installed. |
|
2693
|
2693
|
$renderer->render_filemanager_default_file_presentation("presentation_default"); |
|
@@ -2704,7 +2704,7 @@ discard block |
|
|
block discarded – undo |
|
2704
|
2704
|
*/ |
|
2705
|
2705
|
function bigbluebuttonbn_settings_userlimit(&$renderer) { |
|
2706
|
2706
|
// Configuration for "user limit" feature. |
|
2707
|
|
- if ((boolean)\mod_bigbluebuttonbn\settings\validator::section_user_limit_shown()) { |
|
|
2707
|
+ if ((boolean) \mod_bigbluebuttonbn\settings\validator::section_user_limit_shown()) { |
|
2708
|
2708
|
$renderer->render_group_header('userlimit'); |
|
2709
|
2709
|
$renderer->render_group_element('userlimit_default', |
|
2710
|
2710
|
$renderer->render_group_element_text('userlimit_default', 0, PARAM_INT)); |
|
@@ -2722,7 +2722,7 @@ discard block |
|
|
block discarded – undo |
|
2722
|
2722
|
*/ |
|
2723
|
2723
|
function bigbluebuttonbn_settings_duration(&$renderer) { |
|
2724
|
2724
|
// Configuration for "scheduled duration" feature. |
|
2725
|
|
- if ((boolean)\mod_bigbluebuttonbn\settings\validator::section_scheduled_duration_shown()) { |
|
|
2725
|
+ if ((boolean) \mod_bigbluebuttonbn\settings\validator::section_scheduled_duration_shown()) { |
|
2726
|
2726
|
$renderer->render_group_header('scheduled'); |
|
2727
|
2727
|
$renderer->render_group_element('scheduled_duration_enabled', |
|
2728
|
2728
|
$renderer->render_group_element_checkbox('scheduled_duration_enabled', 1)); |
|
@@ -2742,7 +2742,7 @@ discard block |
|
|
block discarded – undo |
|
2742
|
2742
|
*/ |
|
2743
|
2743
|
function bigbluebuttonbn_settings_participants(&$renderer) { |
|
2744
|
2744
|
// Configuration for defining the default role/user that will be moderator on new activities. |
|
2745
|
|
- if ((boolean)\mod_bigbluebuttonbn\settings\validator::section_moderator_default_shown()) { |
|
|
2745
|
+ if ((boolean) \mod_bigbluebuttonbn\settings\validator::section_moderator_default_shown()) { |
|
2746
|
2746
|
$renderer->render_group_header('participant'); |
|
2747
|
2747
|
// UI for 'participants' feature. |
|
2748
|
2748
|
$roles = bigbluebuttonbn_get_roles(); |
|
@@ -2763,7 +2763,7 @@ discard block |
|
|
block discarded – undo |
|
2763
|
2763
|
*/ |
|
2764
|
2764
|
function bigbluebuttonbn_settings_notifications(&$renderer) { |
|
2765
|
2765
|
// Configuration for "send notifications" feature. |
|
2766
|
|
- if ((boolean)\mod_bigbluebuttonbn\settings\validator::section_send_notifications_shown()) { |
|
|
2766
|
+ if ((boolean) \mod_bigbluebuttonbn\settings\validator::section_send_notifications_shown()) { |
|
2767
|
2767
|
$renderer->render_group_header('sendnotifications'); |
|
2768
|
2768
|
$renderer->render_group_element('sendnotifications_enabled', |
|
2769
|
2769
|
$renderer->render_group_element_checkbox('sendnotifications_enabled', 1)); |
|
@@ -2779,12 +2779,12 @@ discard block |
|
|
block discarded – undo |
|
2779
|
2779
|
*/ |
|
2780
|
2780
|
function bigbluebuttonbn_settings_clienttype(&$renderer) { |
|
2781
|
2781
|
// Configuration for "clienttype" feature. |
|
2782
|
|
- if ((boolean)\mod_bigbluebuttonbn\settings\validator::section_clienttype_shown()) { |
|
|
2782
|
+ if ((boolean) \mod_bigbluebuttonbn\settings\validator::section_clienttype_shown()) { |
|
2783
|
2783
|
$renderer->render_group_header('clienttype'); |
|
2784
|
2784
|
$renderer->render_group_element('clienttype_editable', |
|
2785
|
2785
|
$renderer->render_group_element_checkbox('clienttype_editable', 0)); |
|
2786
|
2786
|
// Web Client default. |
|
2787
|
|
- $default = intval((int)\mod_bigbluebuttonbn\locallib\config::get('clienttype_default')); |
|
|
2787
|
+ $default = intval((int) \mod_bigbluebuttonbn\locallib\config::get('clienttype_default')); |
|
2788
|
2788
|
$choices = array(BIGBLUEBUTTON_CLIENTTYPE_FLASH => get_string('mod_form_block_clienttype_flash', 'bigbluebuttonbn'), |
|
2789
|
2789
|
BIGBLUEBUTTON_CLIENTTYPE_HTML5 => get_string('mod_form_block_clienttype_html5', 'bigbluebuttonbn')); |
|
2790
|
2790
|
$renderer->render_group_element('clienttype_default', |
|
@@ -2802,7 +2802,7 @@ discard block |
|
|
block discarded – undo |
|
2802
|
2802
|
*/ |
|
2803
|
2803
|
function bigbluebuttonbn_settings_muteonstart(&$renderer) { |
|
2804
|
2804
|
// Configuration for BigBlueButton. |
|
2805
|
|
- if ((boolean)\mod_bigbluebuttonbn\settings\validator::section_muteonstart_shown()) { |
|
|
2805
|
+ if ((boolean) \mod_bigbluebuttonbn\settings\validator::section_muteonstart_shown()) { |
|
2806
|
2806
|
$renderer->render_group_header('muteonstart'); |
|
2807
|
2807
|
$renderer->render_group_element('muteonstart_default', |
|
2808
|
2808
|
$renderer->render_group_element_checkbox('muteonstart_default', 0)); |
|
@@ -2824,7 +2824,7 @@ discard block |
|
|
block discarded – undo |
|
2824
|
2824
|
return; |
|
2825
|
2825
|
} |
|
2826
|
2826
|
// Configuration for 'notify users when recording ready' feature. |
|
2827
|
|
- if ((boolean)\mod_bigbluebuttonbn\settings\validator::section_settings_extended_shown()) { |
|
|
2827
|
+ if ((boolean) \mod_bigbluebuttonbn\settings\validator::section_settings_extended_shown()) { |
|
2828
|
2828
|
$renderer->render_group_header('extended_capabilities'); |
|
2829
|
2829
|
// UI for 'notify users when recording ready' feature. |
|
2830
|
2830
|
$renderer->render_group_element('recordingready_enabled', |
|
@@ -2844,7 +2844,7 @@ discard block |
|
|
block discarded – undo |
|
2844
|
2844
|
global $DB; |
|
2845
|
2845
|
do { |
|
2846
|
2846
|
$encodedseed = sha1(bigbluebuttonbn_random_password(12)); |
|
2847
|
|
- $meetingid = (string)$DB->get_field('bigbluebuttonbn', 'meetingid', array('meetingid' => $encodedseed)); |
|
|
2847
|
+ $meetingid = (string) $DB->get_field('bigbluebuttonbn', 'meetingid', array('meetingid' => $encodedseed)); |
|
2848
|
2848
|
} while ($meetingid == $encodedseed); |
|
2849
|
2849
|
return $encodedseed; |
|
2850
|
2850
|
} |
|
@@ -2889,22 +2889,22 @@ discard block |
|
|
block discarded – undo |
|
2889
|
2889
|
* |
|
2890
|
2890
|
* @return string |
|
2891
|
2891
|
*/ |
|
2892
|
|
-function bigbluebuttonbn_render_warning($message, $type='info', $href='', $text='', $class='') { |
|
|
2892
|
+function bigbluebuttonbn_render_warning($message, $type = 'info', $href = '', $text = '', $class = '') { |
|
2893
|
2893
|
global $OUTPUT; |
|
2894
|
2894
|
$output = "\n"; |
|
2895
|
2895
|
// Evaluates if config_warning is enabled. |
|
2896
|
2896
|
if (empty($message)) { |
|
2897
|
2897
|
return $output; |
|
2898
|
2898
|
} |
|
2899
|
|
- $output .= $OUTPUT->box_start('box boxalignleft adminerror alert alert-' . $type . ' alert-block fade in', |
|
2900
|
|
- 'bigbluebuttonbn_view_general_warning') . "\n"; |
|
2901
|
|
- $output .= ' ' . $message . "\n"; |
|
2902
|
|
- $output .= ' <div class="singlebutton pull-right">' . "\n"; |
|
|
2899
|
+ $output .= $OUTPUT->box_start('box boxalignleft adminerror alert alert-'.$type.' alert-block fade in', |
|
|
2900
|
+ 'bigbluebuttonbn_view_general_warning')."\n"; |
|
|
2901
|
+ $output .= ' '.$message."\n"; |
|
|
2902
|
+ $output .= ' <div class="singlebutton pull-right">'."\n"; |
|
2903
|
2903
|
if (!empty($href)) { |
|
2904
|
2904
|
$output .= bigbluebuttonbn_render_warning_button($href, $text, $class); |
|
2905
|
2905
|
} |
|
2906
|
|
- $output .= ' </div>' . "\n"; |
|
2907
|
|
- $output .= $OUTPUT->box_end() . "\n"; |
|
|
2906
|
+ $output .= ' </div>'."\n"; |
|
|
2907
|
+ $output .= $OUTPUT->box_end()."\n"; |
|
2908
|
2908
|
return $output; |
|
2909
|
2909
|
} |
|
2910
|
2910
|
|
|
@@ -2928,10 +2928,10 @@ discard block |
|
|
block discarded – undo |
|
2928
|
2928
|
if ($class == '') { |
|
2929
|
2929
|
$class = 'btn btn-secondary'; |
|
2930
|
2930
|
} |
|
2931
|
|
- $output = ' <form method="post" action="' . $href . '" class="form-inline">'."\n"; |
|
2932
|
|
- $output .= ' <button type="submit" class="' . $class . '"'."\n"; |
|
2933
|
|
- $output .= ' title="' . $title . '"'."\n"; |
|
2934
|
|
- $output .= ' >' . $text . '</button>'."\n"; |
|
|
2931
|
+ $output = ' <form method="post" action="'.$href.'" class="form-inline">'."\n"; |
|
|
2932
|
+ $output .= ' <button type="submit" class="'.$class.'"'."\n"; |
|
|
2933
|
+ $output .= ' title="'.$title.'"'."\n"; |
|
|
2934
|
+ $output .= ' >'.$text.'</button>'."\n"; |
|
2935
|
2935
|
$output .= ' </form>'."\n"; |
|
2936
|
2936
|
return $output; |
|
2937
|
2937
|
} |
|
@@ -2998,7 +2998,7 @@ discard block |
|
|
block discarded – undo |
|
2998
|
2998
|
|
|
2999
|
2999
|
// By default, use a meetingid without groups. |
|
3000
|
3000
|
if (empty($mid)) { |
|
3001
|
|
- $mid = $bigbluebuttonbn->meetingid . '-' . $bigbluebuttonbn->course . '-' . $bigbluebuttonbn->id; |
|
|
3001
|
+ $mid = $bigbluebuttonbn->meetingid.'-'.$bigbluebuttonbn->course.'-'.$bigbluebuttonbn->id; |
|
3002
|
3002
|
} |
|
3003
|
3003
|
|
|
3004
|
3004
|
// When meeting is running, all authorized users can join right in. |
|
@@ -3059,7 +3059,7 @@ discard block |
|
|
block discarded – undo |
|
3059
|
3059
|
function bigbluebuttonbn_instance_ownerid($bigbluebuttonbn) { |
|
3060
|
3060
|
global $DB; |
|
3061
|
3061
|
$filters = array('bigbluebuttonbnid' => $bigbluebuttonbn->id, 'log' => 'Add'); |
|
3062
|
|
- $ownerid = (integer)$DB->get_field('bigbluebuttonbn_logs', 'userid', $filters); |
|
|
3062
|
+ $ownerid = (integer) $DB->get_field('bigbluebuttonbn_logs', 'userid', $filters); |
|
3063
|
3063
|
return $ownerid; |
|
3064
|
3064
|
} |
|
3065
|
3065
|
|
|
@@ -3069,7 +3069,7 @@ discard block |
|
|
block discarded – undo |
|
3069
|
3069
|
* @return boolean |
|
3070
|
3070
|
*/ |
|
3071
|
3071
|
function bigbluebuttonbn_has_html5_client() { |
|
3072
|
|
- $checkurl = \mod_bigbluebuttonbn\locallib\bigbluebutton::root() . "html5client/check"; |
|
|
3072
|
+ $checkurl = \mod_bigbluebuttonbn\locallib\bigbluebutton::root()."html5client/check"; |
|
3073
|
3073
|
$curlinfo = bigbluebuttonbn_wrap_xml_load_file_curl_request($checkurl, 'HEAD'); |
|
3074
|
3074
|
return (isset($curlinfo['http_code']) && $curlinfo['http_code'] == 200); |
|
3075
|
3075
|
} |
|
@@ -3102,8 +3102,8 @@ discard block |
|
|
block discarded – undo |
|
3102
|
3102
|
$bbbsession['meetingname'] = $bbbsession['bigbluebuttonbn']->name; |
|
3103
|
3103
|
$bbbsession['meetingdescription'] = $bbbsession['bigbluebuttonbn']->intro; |
|
3104
|
3104
|
// Extra data for setting up the Meeting. |
|
3105
|
|
- $bbbsession['userlimit'] = intval((int)\mod_bigbluebuttonbn\locallib\config::get('userlimit_default')); |
|
3106
|
|
- if ((boolean)\mod_bigbluebuttonbn\locallib\config::get('userlimit_editable')) { |
|
|
3105
|
+ $bbbsession['userlimit'] = intval((int) \mod_bigbluebuttonbn\locallib\config::get('userlimit_default')); |
|
|
3106
|
+ if ((boolean) \mod_bigbluebuttonbn\locallib\config::get('userlimit_editable')) { |
|
3107
|
3107
|
$bbbsession['userlimit'] = intval($bbbsession['bigbluebuttonbn']->userlimit); |
|
3108
|
3108
|
} |
|
3109
|
3109
|
$bbbsession['voicebridge'] = $bbbsession['bigbluebuttonbn']->voicebridge; |
|
@@ -3209,7 +3209,7 @@ discard block |
|
|
block discarded – undo |
|
3209
|
3209
|
); |
|
3210
|
3210
|
|
|
3211
|
3211
|
// Check status and set extra values. |
|
3212
|
|
- $activitystatus = bigbluebuttonbn_view_get_activity_status($bbbsession); // In locallib. |
|
|
3212
|
+ $activitystatus = bigbluebuttonbn_view_get_activity_status($bbbsession); // In locallib. |
|
3213
|
3213
|
if ($activitystatus == 'ended') { |
|
3214
|
3214
|
$bbbsession['presentation'] = bigbluebuttonbn_get_presentation_array( |
|
3215
|
3215
|
$bbbsession['context'], $bbbsession['bigbluebuttonbn']->presentation); |