|
@@ -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'); |
|
@@ -569,7 +569,7 @@ discard block |
|
|
block discarded – undo |
|
569
|
569
|
*/ |
|
570
|
570
|
function bigbluebuttonbn_wrap_xml_load_file_curl_request($url, $method = 'GET', $data = null, $contenttype = 'text/xml') { |
|
571
|
571
|
global $CFG; |
|
572
|
|
- require_once($CFG->libdir . '/filelib.php'); |
|
|
572
|
+ require_once($CFG->libdir.'/filelib.php'); |
|
573
|
573
|
$c = new curl(); |
|
574
|
574
|
$c->setopt(array('SSL_VERIFYPEER' => true)); |
|
575
|
575
|
if ($method == 'POST') { |
|
@@ -620,7 +620,7 @@ discard block |
|
|
block discarded – undo |
|
620
|
620
|
if ($userroles) { |
|
621
|
621
|
$where = ''; |
|
622
|
622
|
foreach ($userroles as $userrole) { |
|
623
|
|
- $where .= (empty($where) ? ' WHERE' : ' OR').' id=' . $userrole->roleid; |
|
|
623
|
+ $where .= (empty($where) ? ' WHERE' : ' OR').' id='.$userrole->roleid; |
|
624
|
624
|
} |
|
625
|
625
|
$userroles = $DB->get_records_sql('SELECT * FROM {role}'.$where); |
|
626
|
626
|
} |
|
@@ -749,7 +749,7 @@ discard block |
|
|
block discarded – undo |
|
749
|
749
|
function bigbluebuttonbn_get_role($id) { |
|
750
|
750
|
$roles = (array) role_get_names(); |
|
751
|
751
|
if (is_numeric($id) && isset($roles[$id])) { |
|
752
|
|
- return (object)$roles[$id]; |
|
|
752
|
+ return (object) $roles[$id]; |
|
753
|
753
|
} |
|
754
|
754
|
foreach ($roles as $role) { |
|
755
|
755
|
if ($role->shortname == $id) { |
|
@@ -829,7 +829,7 @@ discard block |
|
|
block discarded – undo |
|
829
|
829
|
if (!empty($ownerid) && is_enrolled($context, $ownerid)) { |
|
830
|
830
|
$participantlist[] = array( |
|
831
|
831
|
'selectiontype' => 'user', |
|
832
|
|
- 'selectionid' => (string)$ownerid, |
|
|
832
|
+ 'selectionid' => (string) $ownerid, |
|
833
|
833
|
'role' => BIGBLUEBUTTONBN_ROLE_MODERATOR); |
|
834
|
834
|
} |
|
835
|
835
|
continue; |
|
@@ -904,7 +904,7 @@ discard block |
|
|
block discarded – undo |
|
904
|
904
|
if (!isguestuser()) { |
|
905
|
905
|
$userroles = bigbluebuttonbn_get_user_roles($context, $userid); |
|
906
|
906
|
} |
|
907
|
|
- return bigbluebuttonbn_is_moderator_validator($participantlist, $userid , $userroles); |
|
|
907
|
+ return bigbluebuttonbn_is_moderator_validator($participantlist, $userid, $userroles); |
|
908
|
908
|
} |
|
909
|
909
|
|
|
910
|
910
|
/** |
|
@@ -989,9 +989,9 @@ discard block |
|
|
block discarded – undo |
|
989
|
989
|
if ($voicebridge == 0) { |
|
990
|
990
|
return true; |
|
991
|
991
|
} |
|
992
|
|
- $select = 'voicebridge = ' . $voicebridge; |
|
|
992
|
+ $select = 'voicebridge = '.$voicebridge; |
|
993
|
993
|
if ($instance != 0) { |
|
994
|
|
- $select .= ' AND id <>' . $instance; |
|
|
994
|
+ $select .= ' AND id <>'.$instance; |
|
995
|
995
|
} |
|
996
|
996
|
if (!$DB->get_records_select('bigbluebuttonbn', $select)) { |
|
997
|
997
|
return true; |
|
@@ -1011,7 +1011,7 @@ discard block |
|
|
block discarded – undo |
|
1011
|
1011
|
$now = time(); |
|
1012
|
1012
|
if ($closingtime > 0 && $now < $closingtime) { |
|
1013
|
1013
|
$duration = ceil(($closingtime - $now) / 60); |
|
1014
|
|
- $compensationtime = intval((int)\mod_bigbluebuttonbn\locallib\config::get('scheduled_duration_compensation')); |
|
|
1014
|
+ $compensationtime = intval((int) \mod_bigbluebuttonbn\locallib\config::get('scheduled_duration_compensation')); |
|
1015
|
1015
|
$duration = intval($duration) + $compensationtime; |
|
1016
|
1016
|
} |
|
1017
|
1017
|
return $duration; |
|
@@ -1151,7 +1151,7 @@ discard block |
|
|
block discarded – undo |
|
1151
|
1151
|
if (array_key_exists('other', $options)) { |
|
1152
|
1152
|
$params['other'] = $options['other']; |
|
1153
|
1153
|
} |
|
1154
|
|
- $event = call_user_func_array('\mod_bigbluebuttonbn\event\\' . $type . '::create', |
|
|
1154
|
+ $event = call_user_func_array('\mod_bigbluebuttonbn\event\\'.$type.'::create', |
|
1155
|
1155
|
array($params)); |
|
1156
|
1156
|
$event->add_record_snapshot('course_modules', $cm); |
|
1157
|
1157
|
$event->add_record_snapshot('course', $course); |
|
@@ -1188,7 +1188,7 @@ discard block |
|
|
block discarded – undo |
|
1188
|
1188
|
* @return array |
|
1189
|
1189
|
*/ |
|
1190
|
1190
|
function bigbluebuttonbn_get_meeting_info($meetingid, $updatecache = false) { |
|
1191
|
|
- $cachettl = (int)\mod_bigbluebuttonbn\locallib\config::get('waitformoderator_cache_ttl'); |
|
|
1191
|
+ $cachettl = (int) \mod_bigbluebuttonbn\locallib\config::get('waitformoderator_cache_ttl'); |
|
1192
|
1192
|
$cache = cache::make_from_params(cache_store::MODE_APPLICATION, 'mod_bigbluebuttonbn', 'meetings_cache'); |
|
1193
|
1193
|
$result = $cache->get($meetingid); |
|
1194
|
1194
|
$now = time(); |
|
@@ -1392,7 +1392,7 @@ discard block |
|
|
block discarded – undo |
|
1392
|
1392
|
* @return boolean |
|
1393
|
1393
|
*/ |
|
1394
|
1394
|
function bigbluebuttonbn_get_recording_data_row_editable($bbbsession) { |
|
1395
|
|
- return ($bbbsession['managerecordings'] && ((double)$bbbsession['serverversion'] >= 1.0 || $bbbsession['bnserver'])); |
|
|
1395
|
+ return ($bbbsession['managerecordings'] && ((double) $bbbsession['serverversion'] >= 1.0 || $bbbsession['bnserver'])); |
|
1396
|
1396
|
} |
|
1397
|
1397
|
|
|
1398
|
1398
|
/** |
|
@@ -1403,7 +1403,7 @@ discard block |
|
|
block discarded – undo |
|
1403
|
1403
|
* @return boolean |
|
1404
|
1404
|
*/ |
|
1405
|
1405
|
function bigbluebuttonbn_get_recording_data_preview_enabled($bbbsession) { |
|
1406
|
|
- return ((double)$bbbsession['serverversion'] >= 1.0 && $bbbsession['bigbluebuttonbn']->recordings_preview == '1'); |
|
|
1406
|
+ return ((double) $bbbsession['serverversion'] >= 1.0 && $bbbsession['bigbluebuttonbn']->recordings_preview == '1'); |
|
1407
|
1407
|
} |
|
1408
|
1408
|
|
|
1409
|
1409
|
/** |
|
@@ -1479,11 +1479,11 @@ discard block |
|
|
block discarded – undo |
|
1479
|
1479
|
$actionbar .= bigbluebuttonbn_actionbar_render_button($recording, $buttonpayload); |
|
1480
|
1480
|
} |
|
1481
|
1481
|
$head = html_writer::start_tag('div', array( |
|
1482
|
|
- 'id' => 'recording-actionbar-' . $recording['recordID'], |
|
|
1482
|
+ 'id' => 'recording-actionbar-'.$recording['recordID'], |
|
1483
|
1483
|
'data-recordingid' => $recording['recordID'], |
|
1484
|
1484
|
'data-meetingid' => $recording['meetingID'])); |
|
1485
|
1485
|
$tail = html_writer::end_tag('div'); |
|
1486
|
|
- return $head . $actionbar . $tail; |
|
|
1486
|
+ return $head.$actionbar.$tail; |
|
1487
|
1487
|
} |
|
1488
|
1488
|
|
|
1489
|
1489
|
/** |
|
@@ -1579,7 +1579,7 @@ discard block |
|
|
block discarded – undo |
|
1579
|
1579
|
} |
|
1580
|
1580
|
$recordingpreview .= html_writer::start_tag('div', array('class' => '')); |
|
1581
|
1581
|
$recordingpreview .= html_writer::empty_tag('img', |
|
1582
|
|
- array('src' => trim($image['url']) . '?' . time(), 'class' => 'recording-thumbnail pull-left')); |
|
|
1582
|
+ array('src' => trim($image['url']).'?'.time(), 'class' => 'recording-thumbnail pull-left')); |
|
1583
|
1583
|
$recordingpreview .= html_writer::end_tag('div'); |
|
1584
|
1584
|
} |
|
1585
|
1585
|
$recordingpreview .= html_writer::end_tag('div'); |
|
@@ -1636,13 +1636,13 @@ discard block |
|
|
block discarded – undo |
|
1636
|
1636
|
return ''; |
|
1637
|
1637
|
} |
|
1638
|
1638
|
$text = bigbluebuttonbn_get_recording_type_text($playback['type']); |
|
1639
|
|
- $href = $CFG->wwwroot . '/mod/bigbluebuttonbn/bbb_view.php?action=play&bn=' . $bbbsession['bigbluebuttonbn']->id . |
|
1640
|
|
- '&mid=' . $recording['meetingID'] . '&rid=' . $recording['recordID'] . '&rtype=' . $playback['type']; |
|
|
1639
|
+ $href = $CFG->wwwroot.'/mod/bigbluebuttonbn/bbb_view.php?action=play&bn='.$bbbsession['bigbluebuttonbn']->id. |
|
|
1640
|
+ '&mid='.$recording['meetingID'].'&rid='.$recording['recordID'].'&rtype='.$playback['type']; |
|
1641
|
1641
|
if (!isset($recording['imported']) || !isset($recording['protected']) || $recording['protected'] === 'false') { |
|
1642
|
|
- $href .= '&href=' . urlencode(trim($playback['url'])); |
|
|
1642
|
+ $href .= '&href='.urlencode(trim($playback['url'])); |
|
1643
|
1643
|
} |
|
1644
|
1644
|
$linkattributes = array( |
|
1645
|
|
- 'id' => 'recording-play-' . $playback['type'] . '-' . $recording['recordID'], |
|
|
1645
|
+ 'id' => 'recording-play-'.$playback['type'].'-'.$recording['recordID'], |
|
1646
|
1646
|
'class' => 'btn btn-sm btn-default', |
|
1647
|
1647
|
'onclick' => 'M.mod_bigbluebuttonbn.recordings.recordingPlay(this);', |
|
1648
|
1648
|
'data-action' => 'play', |
|
@@ -1654,7 +1654,7 @@ discard block |
|
|
block discarded – undo |
|
1654
|
1654
|
$linkattributes['title'] = get_string('view_recording_format_errror_unreachable', 'bigbluebuttonbn'); |
|
1655
|
1655
|
unset($linkattributes['data-href']); |
|
1656
|
1656
|
} |
|
1657
|
|
- return $OUTPUT->action_link('#', $text, null, $linkattributes) . ' '; |
|
|
1657
|
+ return $OUTPUT->action_link('#', $text, null, $linkattributes).' '; |
|
1658
|
1658
|
} |
|
1659
|
1659
|
|
|
1660
|
1660
|
/** |
|
@@ -1667,7 +1667,7 @@ discard block |
|
|
block discarded – undo |
|
1667
|
1667
|
function bigbluebuttonbn_get_recording_type_text($playbacktype) { |
|
1668
|
1668
|
// Check first if string exists, and if it does'nt just default to the capitalised version of the string. |
|
1669
|
1669
|
$text = ucwords($playbacktype); |
|
1670
|
|
- $typestringid = 'view_recording_format_' . $playbacktype; |
|
|
1670
|
+ $typestringid = 'view_recording_format_'.$playbacktype; |
|
1671
|
1671
|
if (get_string_manager()->string_exists($typestringid, 'bigbluebuttonbn')) { |
|
1672
|
1672
|
$text = get_string($typestringid, 'bigbluebuttonbn'); |
|
1673
|
1673
|
} |
|
@@ -1697,7 +1697,7 @@ discard block |
|
|
block discarded – undo |
|
1697
|
1697
|
$validatedurls[$urlhost] = true; |
|
1698
|
1698
|
$curlinfo = bigbluebuttonbn_wrap_xml_load_file_curl_request($url, 'HEAD'); |
|
1699
|
1699
|
if (!isset($curlinfo['http_code']) || $curlinfo['http_code'] != 200) { |
|
1700
|
|
- $error = "Resources hosted by " . $urlhost . " are unreachable. Server responded with code " . $curlinfo['http_code']; |
|
|
1700
|
+ $error = "Resources hosted by ".$urlhost." are unreachable. Server responded with code ".$curlinfo['http_code']; |
|
1701
|
1701
|
debugging($error, DEBUG_DEVELOPER); |
|
1702
|
1702
|
$validatedurls[$urlhost] = false; |
|
1703
|
1703
|
} |
|
@@ -1788,12 +1788,12 @@ discard block |
|
|
block discarded – undo |
|
1788
|
1788
|
* @return string |
|
1789
|
1789
|
*/ |
|
1790
|
1790
|
function bigbluebuttonbn_get_recording_data_row_text($recording, $text, $source, $data) { |
|
1791
|
|
- $htmltext = '<span>' . htmlentities($text) . '</span>'; |
|
|
1791
|
+ $htmltext = '<span>'.htmlentities($text).'</span>'; |
|
1792
|
1792
|
if (empty($data)) { |
|
1793
|
1793
|
return $htmltext; |
|
1794
|
1794
|
} |
|
1795
|
|
- $target = $data['action'] . '-' . $data['target']; |
|
1796
|
|
- $id = 'recording-' . $target . '-' . $data['recordingid']; |
|
|
1795
|
+ $target = $data['action'].'-'.$data['target']; |
|
|
1796
|
+ $id = 'recording-'.$target.'-'.$data['recordingid']; |
|
1797
|
1797
|
$attributes = array('id' => $id, 'class' => 'quickeditlink col-md-20', |
|
1798
|
1798
|
'data-recordingid' => $data['recordingid'], 'data-meetingid' => $data['meetingid'], |
|
1799
|
1799
|
'data-target' => $data['target'], 'data-source' => $source); |
|
@@ -1801,7 +1801,7 @@ discard block |
|
|
block discarded – undo |
|
1801
|
1801
|
$tail = html_writer::end_tag('div'); |
|
1802
|
1802
|
$payload = array('action' => $data['action'], 'tag' => $data['tag'], 'target' => $data['target']); |
|
1803
|
1803
|
$htmllink = bigbluebuttonbn_actionbar_render_button($recording, $payload); |
|
1804
|
|
- return $head . $htmltext . $htmllink . $tail; |
|
|
1804
|
+ return $head.$htmltext.$htmllink.$tail; |
|
1805
|
1805
|
} |
|
1806
|
1806
|
|
|
1807
|
1807
|
/** |
|
@@ -1819,10 +1819,10 @@ discard block |
|
|
block discarded – undo |
|
1819
|
1819
|
} |
|
1820
|
1820
|
$target = $data['action']; |
|
1821
|
1821
|
if (isset($data['target'])) { |
|
1822
|
|
- $target .= '-' . $data['target']; |
|
|
1822
|
+ $target .= '-'.$data['target']; |
|
1823
|
1823
|
} |
|
1824
|
|
- $id = 'recording-' . $target . '-' . $recording['recordID']; |
|
1825
|
|
- $onclick = 'M.mod_bigbluebuttonbn.recordings.recording' . ucfirst($data['action']) . '(this); return false;'; |
|
|
1824
|
+ $id = 'recording-'.$target.'-'.$recording['recordID']; |
|
|
1825
|
+ $onclick = 'M.mod_bigbluebuttonbn.recordings.recording'.ucfirst($data['action']).'(this); return false;'; |
|
1826
|
1826
|
if ((boolean) \mod_bigbluebuttonbn\locallib\config::get('recording_icons_enabled')) { |
|
1827
|
1827
|
// With icon for $manageaction. |
|
1828
|
1828
|
$iconattributes = array('id' => $id, 'class' => 'iconsmall'); |
|
@@ -1836,12 +1836,12 @@ discard block |
|
|
block discarded – undo |
|
1836
|
1836
|
$recording['recordID']); |
|
1837
|
1837
|
} |
|
1838
|
1838
|
if (isset($data['disabled'])) { |
|
1839
|
|
- $iconattributes['class'] .= ' fa-' . $data['disabled']; |
|
|
1839
|
+ $iconattributes['class'] .= ' fa-'.$data['disabled']; |
|
1840
|
1840
|
$linkattributes['class'] = 'disabled'; |
|
1841
|
1841
|
unset($linkattributes['onclick']); |
|
1842
|
1842
|
} |
|
1843
|
1843
|
$icon = new pix_icon('i/'.$data['tag'], |
|
1844
|
|
- get_string('view_recording_list_actionbar_' . $data['action'], 'bigbluebuttonbn'), |
|
|
1844
|
+ get_string('view_recording_list_actionbar_'.$data['action'], 'bigbluebuttonbn'), |
|
1845
|
1845
|
'moodle', $iconattributes); |
|
1846
|
1846
|
return $OUTPUT->action_icon('#', $icon, null, $linkattributes, false); |
|
1847
|
1847
|
} |
|
@@ -1934,7 +1934,7 @@ discard block |
|
|
block discarded – undo |
|
1934
|
1934
|
if ($bbbsession['managerecordings']) { |
|
1935
|
1935
|
$table->head[] = get_string('view_recording_actionbar', 'bigbluebuttonbn'); |
|
1936
|
1936
|
$table->align[] = 'left'; |
|
1937
|
|
- $table->size[] = (count($tools) * 40) . 'px'; |
|
|
1937
|
+ $table->size[] = (count($tools) * 40).'px'; |
|
1938
|
1938
|
} |
|
1939
|
1939
|
// Get the groups of the user. |
|
1940
|
1940
|
$usergroups = groups_get_all_groups($bbbsession['course']->id, $bbbsession['userID']); |
|
@@ -2002,13 +2002,13 @@ discard block |
|
|
block discarded – undo |
|
2002
|
2002
|
} |
|
2003
|
2003
|
$rowdata->date_formatted = str_replace(' ', ' ', $rowdata->date_formatted); |
|
2004
|
2004
|
$row->cells = array(); |
|
2005
|
|
- $row->cells[] = $texthead . $rowdata->playback . $texttail; |
|
2006
|
|
- $row->cells[] = $texthead . $rowdata->recording . $texttail; |
|
2007
|
|
- $row->cells[] = $texthead . $rowdata->description . $texttail; |
|
|
2005
|
+ $row->cells[] = $texthead.$rowdata->playback.$texttail; |
|
|
2006
|
+ $row->cells[] = $texthead.$rowdata->recording.$texttail; |
|
|
2007
|
+ $row->cells[] = $texthead.$rowdata->description.$texttail; |
|
2008
|
2008
|
if (bigbluebuttonbn_get_recording_data_preview_enabled($bbbsession)) { |
|
2009
|
2009
|
$row->cells[] = $rowdata->preview; |
|
2010
|
2010
|
} |
|
2011
|
|
- $row->cells[] = $texthead . $rowdata->date_formatted . $texttail; |
|
|
2011
|
+ $row->cells[] = $texthead.$rowdata->date_formatted.$texttail; |
|
2012
|
2012
|
$row->cells[] = $rowdata->duration_formatted; |
|
2013
|
2013
|
if ($bbbsession['managerecordings']) { |
|
2014
|
2014
|
$row->cells[] = $rowdata->actionbar; |
|
@@ -2051,7 +2051,7 @@ discard block |
|
|
block discarded – undo |
|
2051
|
2051
|
$sender = get_admin(); |
|
2052
|
2052
|
// Prepare message. |
|
2053
|
2053
|
$messagetext = '<p>'.get_string('email_body_recording_ready_for', 'bigbluebuttonbn'). |
|
2054
|
|
- ' "' . $bigbluebuttonbn->name . '" '. |
|
|
2054
|
+ ' "'.$bigbluebuttonbn->name.'" '. |
|
2055
|
2055
|
get_string('email_body_recording_ready_is_ready', 'bigbluebuttonbn').'.</p>'; |
|
2056
|
2056
|
$context = context_course::instance($bigbluebuttonbn->course); |
|
2057
|
2057
|
\mod_bigbluebuttonbn\locallib\notifier::notification_send($sender, $bigbluebuttonbn, $messagetext); |
|
@@ -2091,7 +2091,7 @@ discard block |
|
|
block discarded – undo |
|
2091
|
2091
|
} |
|
2092
|
2092
|
$coursesforselect = []; |
|
2093
|
2093
|
foreach ($courses as $course) { |
|
2094
|
|
- $coursesforselect[$course->id] = $course->fullname . " (" . $course->shortname . ")"; |
|
|
2094
|
+ $coursesforselect[$course->id] = $course->fullname." (".$course->shortname.")"; |
|
2095
|
2095
|
} |
|
2096
|
2096
|
return $coursesforselect; |
|
2097
|
2097
|
} |
|
@@ -2186,17 +2186,17 @@ discard block |
|
|
block discarded – undo |
|
2186
|
2186
|
* @return string containing the sql used for getting the target bigbluebuttonbn instances |
|
2187
|
2187
|
*/ |
|
2188
|
2188
|
function bigbluebuttonbn_get_recordings_deleted_sql_select($courseid = 0, $bigbluebuttonbnid = null, $subset = true) { |
|
2189
|
|
- $sql = "log = '" . BIGBLUEBUTTONBN_LOG_EVENT_DELETE . "' AND meta like '%has_recordings%' AND meta like '%true%'"; |
|
|
2189
|
+ $sql = "log = '".BIGBLUEBUTTONBN_LOG_EVENT_DELETE."' AND meta like '%has_recordings%' AND meta like '%true%'"; |
|
2190
|
2190
|
if (empty($courseid)) { |
|
2191
|
2191
|
$courseid = 0; |
|
2192
|
2192
|
} |
|
2193
|
2193
|
if (empty($bigbluebuttonbnid)) { |
|
2194
|
|
- return $sql . " AND courseid = {$courseid}"; |
|
|
2194
|
+ return $sql." AND courseid = {$courseid}"; |
|
2195
|
2195
|
} |
|
2196
|
2196
|
if ($subset) { |
|
2197
|
|
- return $sql . " AND bigbluebuttonbnid = '{$bigbluebuttonbnid}'"; |
|
|
2197
|
+ return $sql." AND bigbluebuttonbnid = '{$bigbluebuttonbnid}'"; |
|
2198
|
2198
|
} |
|
2199
|
|
- return $sql . " AND courseid = {$courseid} AND bigbluebuttonbnid <> '{$bigbluebuttonbnid}'"; |
|
|
2199
|
+ return $sql." AND courseid = {$courseid} AND bigbluebuttonbnid <> '{$bigbluebuttonbnid}'"; |
|
2200
|
2200
|
} |
|
2201
|
2201
|
|
|
2202
|
2202
|
/** |
|
@@ -2210,17 +2210,17 @@ discard block |
|
|
block discarded – undo |
|
2210
|
2210
|
* @return string containing the sql used for getting the target bigbluebuttonbn instances |
|
2211
|
2211
|
*/ |
|
2212
|
2212
|
function bigbluebuttonbn_get_recordings_imported_sql_select($courseid = 0, $bigbluebuttonbnid = null, $subset = true) { |
|
2213
|
|
- $sql = "log = '" . BIGBLUEBUTTONBN_LOG_EVENT_IMPORT . "'"; |
|
|
2213
|
+ $sql = "log = '".BIGBLUEBUTTONBN_LOG_EVENT_IMPORT."'"; |
|
2214
|
2214
|
if (empty($courseid)) { |
|
2215
|
2215
|
$courseid = 0; |
|
2216
|
2216
|
} |
|
2217
|
2217
|
if (empty($bigbluebuttonbnid)) { |
|
2218
|
|
- return $sql . " AND courseid = '{$courseid}'"; |
|
|
2218
|
+ return $sql." AND courseid = '{$courseid}'"; |
|
2219
|
2219
|
} |
|
2220
|
2220
|
if ($subset) { |
|
2221
|
|
- return $sql . " AND bigbluebuttonbnid = '{$bigbluebuttonbnid}'"; |
|
|
2221
|
+ return $sql." AND bigbluebuttonbnid = '{$bigbluebuttonbnid}'"; |
|
2222
|
2222
|
} |
|
2223
|
|
- return $sql . " AND courseid = '{$courseid}' AND bigbluebuttonbnid <> '{$bigbluebuttonbnid}'"; |
|
|
2223
|
+ return $sql." AND courseid = '{$courseid}' AND bigbluebuttonbnid <> '{$bigbluebuttonbnid}'"; |
|
2224
|
2224
|
} |
|
2225
|
2225
|
|
|
2226
|
2226
|
/** |
|
@@ -2546,7 +2546,7 @@ discard block |
|
|
block discarded – undo |
|
2546
|
2546
|
*/ |
|
2547
|
2547
|
function bigbluebuttonbn_settings_general(&$renderer) { |
|
2548
|
2548
|
// Configuration for BigBlueButton. |
|
2549
|
|
- if ((boolean)\mod_bigbluebuttonbn\settings\validator::section_general_shown()) { |
|
|
2549
|
+ if ((boolean) \mod_bigbluebuttonbn\settings\validator::section_general_shown()) { |
|
2550
|
2550
|
$renderer->render_group_header('general'); |
|
2551
|
2551
|
$renderer->render_group_element('server_url', |
|
2552
|
2552
|
$renderer->render_group_element_text('server_url', BIGBLUEBUTTONBN_DEFAULT_SERVER_URL)); |
|
@@ -2564,7 +2564,7 @@ discard block |
|
|
block discarded – undo |
|
2564
|
2564
|
*/ |
|
2565
|
2565
|
function bigbluebuttonbn_settings_record(&$renderer) { |
|
2566
|
2566
|
// Configuration for 'recording' feature. |
|
2567
|
|
- if ((boolean)\mod_bigbluebuttonbn\settings\validator::section_record_meeting_shown()) { |
|
|
2567
|
+ if ((boolean) \mod_bigbluebuttonbn\settings\validator::section_record_meeting_shown()) { |
|
2568
|
2568
|
$renderer->render_group_header('recording'); |
|
2569
|
2569
|
$renderer->render_group_element('recording_default', |
|
2570
|
2570
|
$renderer->render_group_element_checkbox('recording_default', 1)); |
|
@@ -2594,7 +2594,7 @@ discard block |
|
|
block discarded – undo |
|
2594
|
2594
|
*/ |
|
2595
|
2595
|
function bigbluebuttonbn_settings_importrecordings(&$renderer) { |
|
2596
|
2596
|
// Configuration for 'import recordings' feature. |
|
2597
|
|
- if ((boolean)\mod_bigbluebuttonbn\settings\validator::section_import_recordings_shown()) { |
|
|
2597
|
+ if ((boolean) \mod_bigbluebuttonbn\settings\validator::section_import_recordings_shown()) { |
|
2598
|
2598
|
$renderer->render_group_header('importrecordings'); |
|
2599
|
2599
|
$renderer->render_group_element('importrecordings_enabled', |
|
2600
|
2600
|
$renderer->render_group_element_checkbox('importrecordings_enabled', 0)); |
|
@@ -2612,7 +2612,7 @@ discard block |
|
|
block discarded – undo |
|
2612
|
2612
|
*/ |
|
2613
|
2613
|
function bigbluebuttonbn_settings_showrecordings(&$renderer) { |
|
2614
|
2614
|
// Configuration for 'show recordings' feature. |
|
2615
|
|
- if ((boolean)\mod_bigbluebuttonbn\settings\validator::section_show_recordings_shown()) { |
|
|
2615
|
+ if ((boolean) \mod_bigbluebuttonbn\settings\validator::section_show_recordings_shown()) { |
|
2616
|
2616
|
$renderer->render_group_header('recordings'); |
|
2617
|
2617
|
$renderer->render_group_element('recordings_html_default', |
|
2618
|
2618
|
$renderer->render_group_element_checkbox('recordings_html_default', 1)); |
|
@@ -2646,7 +2646,7 @@ discard block |
|
|
block discarded – undo |
|
2646
|
2646
|
*/ |
|
2647
|
2647
|
function bigbluebuttonbn_settings_waitmoderator(&$renderer) { |
|
2648
|
2648
|
// Configuration for wait for moderator feature. |
|
2649
|
|
- if ((boolean)\mod_bigbluebuttonbn\settings\validator::section_wait_moderator_shown()) { |
|
|
2649
|
+ if ((boolean) \mod_bigbluebuttonbn\settings\validator::section_wait_moderator_shown()) { |
|
2650
|
2650
|
$renderer->render_group_header('waitformoderator'); |
|
2651
|
2651
|
$renderer->render_group_element('waitformoderator_default', |
|
2652
|
2652
|
$renderer->render_group_element_checkbox('waitformoderator_default', 0)); |
|
@@ -2668,7 +2668,7 @@ discard block |
|
|
block discarded – undo |
|
2668
|
2668
|
*/ |
|
2669
|
2669
|
function bigbluebuttonbn_settings_voicebridge(&$renderer) { |
|
2670
|
2670
|
// Configuration for "static voice bridge" feature. |
|
2671
|
|
- if ((boolean)\mod_bigbluebuttonbn\settings\validator::section_static_voice_bridge_shown()) { |
|
|
2671
|
+ if ((boolean) \mod_bigbluebuttonbn\settings\validator::section_static_voice_bridge_shown()) { |
|
2672
|
2672
|
$renderer->render_group_header('voicebridge'); |
|
2673
|
2673
|
$renderer->render_group_element('voicebridge_editable', |
|
2674
|
2674
|
$renderer->render_group_element_checkbox('voicebridge_editable', 0)); |
|
@@ -2684,7 +2684,7 @@ discard block |
|
|
block discarded – undo |
|
2684
|
2684
|
*/ |
|
2685
|
2685
|
function bigbluebuttonbn_settings_preupload(&$renderer) { |
|
2686
|
2686
|
// Configuration for "preupload presentation" feature. |
|
2687
|
|
- if ((boolean)\mod_bigbluebuttonbn\settings\validator::section_preupload_presentation_shown()) { |
|
|
2687
|
+ if ((boolean) \mod_bigbluebuttonbn\settings\validator::section_preupload_presentation_shown()) { |
|
2688
|
2688
|
// This feature only works if curl is installed. |
|
2689
|
2689
|
$preuploaddescripion = get_string('config_preuploadpresentation_description', 'bigbluebuttonbn'); |
|
2690
|
2690
|
if (!extension_loaded('curl')) { |
|
@@ -2710,7 +2710,7 @@ discard block |
|
|
block discarded – undo |
|
2710
|
2710
|
*/ |
|
2711
|
2711
|
function bigbluebuttonbn_settings_preupload_manage_default_file(&$renderer) { |
|
2712
|
2712
|
// Configuration for "preupload presentation" feature. |
|
2713
|
|
- if ((boolean)\mod_bigbluebuttonbn\settings\validator::section_preupload_presentation_shown()) { |
|
|
2713
|
+ if ((boolean) \mod_bigbluebuttonbn\settings\validator::section_preupload_presentation_shown()) { |
|
2714
|
2714
|
if (extension_loaded('curl')) { |
|
2715
|
2715
|
// This feature only works if curl is installed. |
|
2716
|
2716
|
$renderer->render_filemanager_default_file_presentation("presentation_default"); |
|
@@ -2727,7 +2727,7 @@ discard block |
|
|
block discarded – undo |
|
2727
|
2727
|
*/ |
|
2728
|
2728
|
function bigbluebuttonbn_settings_userlimit(&$renderer) { |
|
2729
|
2729
|
// Configuration for "user limit" feature. |
|
2730
|
|
- if ((boolean)\mod_bigbluebuttonbn\settings\validator::section_user_limit_shown()) { |
|
|
2730
|
+ if ((boolean) \mod_bigbluebuttonbn\settings\validator::section_user_limit_shown()) { |
|
2731
|
2731
|
$renderer->render_group_header('userlimit'); |
|
2732
|
2732
|
$renderer->render_group_element('userlimit_default', |
|
2733
|
2733
|
$renderer->render_group_element_text('userlimit_default', 0, PARAM_INT)); |
|
@@ -2745,7 +2745,7 @@ discard block |
|
|
block discarded – undo |
|
2745
|
2745
|
*/ |
|
2746
|
2746
|
function bigbluebuttonbn_settings_duration(&$renderer) { |
|
2747
|
2747
|
// Configuration for "scheduled duration" feature. |
|
2748
|
|
- if ((boolean)\mod_bigbluebuttonbn\settings\validator::section_scheduled_duration_shown()) { |
|
|
2748
|
+ if ((boolean) \mod_bigbluebuttonbn\settings\validator::section_scheduled_duration_shown()) { |
|
2749
|
2749
|
$renderer->render_group_header('scheduled'); |
|
2750
|
2750
|
$renderer->render_group_element('scheduled_duration_enabled', |
|
2751
|
2751
|
$renderer->render_group_element_checkbox('scheduled_duration_enabled', 1)); |
|
@@ -2765,7 +2765,7 @@ discard block |
|
|
block discarded – undo |
|
2765
|
2765
|
*/ |
|
2766
|
2766
|
function bigbluebuttonbn_settings_participants(&$renderer) { |
|
2767
|
2767
|
// Configuration for defining the default role/user that will be moderator on new activities. |
|
2768
|
|
- if ((boolean)\mod_bigbluebuttonbn\settings\validator::section_moderator_default_shown()) { |
|
|
2768
|
+ if ((boolean) \mod_bigbluebuttonbn\settings\validator::section_moderator_default_shown()) { |
|
2769
|
2769
|
$renderer->render_group_header('participant'); |
|
2770
|
2770
|
// UI for 'participants' feature. |
|
2771
|
2771
|
$roles = bigbluebuttonbn_get_roles(null, false); |
|
@@ -2788,7 +2788,7 @@ discard block |
|
|
block discarded – undo |
|
2788
|
2788
|
*/ |
|
2789
|
2789
|
function bigbluebuttonbn_settings_notifications(&$renderer) { |
|
2790
|
2790
|
// Configuration for "send notifications" feature. |
|
2791
|
|
- if ((boolean)\mod_bigbluebuttonbn\settings\validator::section_send_notifications_shown()) { |
|
|
2791
|
+ if ((boolean) \mod_bigbluebuttonbn\settings\validator::section_send_notifications_shown()) { |
|
2792
|
2792
|
$renderer->render_group_header('sendnotifications'); |
|
2793
|
2793
|
$renderer->render_group_element('sendnotifications_enabled', |
|
2794
|
2794
|
$renderer->render_group_element_checkbox('sendnotifications_enabled', 1)); |
|
@@ -2804,12 +2804,12 @@ discard block |
|
|
block discarded – undo |
|
2804
|
2804
|
*/ |
|
2805
|
2805
|
function bigbluebuttonbn_settings_clienttype(&$renderer) { |
|
2806
|
2806
|
// Configuration for "clienttype" feature. |
|
2807
|
|
- if ((boolean)\mod_bigbluebuttonbn\settings\validator::section_clienttype_shown()) { |
|
|
2807
|
+ if ((boolean) \mod_bigbluebuttonbn\settings\validator::section_clienttype_shown()) { |
|
2808
|
2808
|
$renderer->render_group_header('clienttype'); |
|
2809
|
2809
|
$renderer->render_group_element('clienttype_editable', |
|
2810
|
2810
|
$renderer->render_group_element_checkbox('clienttype_editable', 0)); |
|
2811
|
2811
|
// Web Client default. |
|
2812
|
|
- $default = intval((int)\mod_bigbluebuttonbn\locallib\config::get('clienttype_default')); |
|
|
2812
|
+ $default = intval((int) \mod_bigbluebuttonbn\locallib\config::get('clienttype_default')); |
|
2813
|
2813
|
$choices = array(BIGBLUEBUTTON_CLIENTTYPE_FLASH => get_string('mod_form_block_clienttype_flash', 'bigbluebuttonbn'), |
|
2814
|
2814
|
BIGBLUEBUTTON_CLIENTTYPE_HTML5 => get_string('mod_form_block_clienttype_html5', 'bigbluebuttonbn')); |
|
2815
|
2815
|
$renderer->render_group_element('clienttype_default', |
|
@@ -2827,7 +2827,7 @@ discard block |
|
|
block discarded – undo |
|
2827
|
2827
|
*/ |
|
2828
|
2828
|
function bigbluebuttonbn_settings_muteonstart(&$renderer) { |
|
2829
|
2829
|
// Configuration for BigBlueButton. |
|
2830
|
|
- if ((boolean)\mod_bigbluebuttonbn\settings\validator::section_muteonstart_shown()) { |
|
|
2830
|
+ if ((boolean) \mod_bigbluebuttonbn\settings\validator::section_muteonstart_shown()) { |
|
2831
|
2831
|
$renderer->render_group_header('muteonstart'); |
|
2832
|
2832
|
$renderer->render_group_element('muteonstart_default', |
|
2833
|
2833
|
$renderer->render_group_element_checkbox('muteonstart_default', 0)); |
|
@@ -2849,7 +2849,7 @@ discard block |
|
|
block discarded – undo |
|
2849
|
2849
|
return; |
|
2850
|
2850
|
} |
|
2851
|
2851
|
// Configuration for 'notify users when recording ready' feature. |
|
2852
|
|
- if ((boolean)\mod_bigbluebuttonbn\settings\validator::section_settings_extended_shown()) { |
|
|
2852
|
+ if ((boolean) \mod_bigbluebuttonbn\settings\validator::section_settings_extended_shown()) { |
|
2853
|
2853
|
$renderer->render_group_header('extended_capabilities'); |
|
2854
|
2854
|
// UI for 'notify users when recording ready' feature. |
|
2855
|
2855
|
$renderer->render_group_element('recordingready_enabled', |
|
@@ -2869,7 +2869,7 @@ discard block |
|
|
block discarded – undo |
|
2869
|
2869
|
global $DB; |
|
2870
|
2870
|
do { |
|
2871
|
2871
|
$encodedseed = sha1(bigbluebuttonbn_random_password(12)); |
|
2872
|
|
- $meetingid = (string)$DB->get_field('bigbluebuttonbn', 'meetingid', array('meetingid' => $encodedseed)); |
|
|
2872
|
+ $meetingid = (string) $DB->get_field('bigbluebuttonbn', 'meetingid', array('meetingid' => $encodedseed)); |
|
2873
|
2873
|
} while ($meetingid == $encodedseed); |
|
2874
|
2874
|
return $encodedseed; |
|
2875
|
2875
|
} |
|
@@ -2914,22 +2914,22 @@ discard block |
|
|
block discarded – undo |
|
2914
|
2914
|
* |
|
2915
|
2915
|
* @return string |
|
2916
|
2916
|
*/ |
|
2917
|
|
-function bigbluebuttonbn_render_warning($message, $type='info', $href='', $text='', $class='') { |
|
|
2917
|
+function bigbluebuttonbn_render_warning($message, $type = 'info', $href = '', $text = '', $class = '') { |
|
2918
|
2918
|
global $OUTPUT; |
|
2919
|
2919
|
$output = "\n"; |
|
2920
|
2920
|
// Evaluates if config_warning is enabled. |
|
2921
|
2921
|
if (empty($message)) { |
|
2922
|
2922
|
return $output; |
|
2923
|
2923
|
} |
|
2924
|
|
- $output .= $OUTPUT->box_start('box boxalignleft adminerror alert alert-' . $type . ' alert-block fade in', |
|
2925
|
|
- 'bigbluebuttonbn_view_general_warning') . "\n"; |
|
2926
|
|
- $output .= ' ' . $message . "\n"; |
|
2927
|
|
- $output .= ' <div class="singlebutton pull-right">' . "\n"; |
|
|
2924
|
+ $output .= $OUTPUT->box_start('box boxalignleft adminerror alert alert-'.$type.' alert-block fade in', |
|
|
2925
|
+ 'bigbluebuttonbn_view_general_warning')."\n"; |
|
|
2926
|
+ $output .= ' '.$message."\n"; |
|
|
2927
|
+ $output .= ' <div class="singlebutton pull-right">'."\n"; |
|
2928
|
2928
|
if (!empty($href)) { |
|
2929
|
2929
|
$output .= bigbluebuttonbn_render_warning_button($href, $text, $class); |
|
2930
|
2930
|
} |
|
2931
|
|
- $output .= ' </div>' . "\n"; |
|
2932
|
|
- $output .= $OUTPUT->box_end() . "\n"; |
|
|
2931
|
+ $output .= ' </div>'."\n"; |
|
|
2932
|
+ $output .= $OUTPUT->box_end()."\n"; |
|
2933
|
2933
|
return $output; |
|
2934
|
2934
|
} |
|
2935
|
2935
|
|
|
@@ -2953,10 +2953,10 @@ discard block |
|
|
block discarded – undo |
|
2953
|
2953
|
if ($class == '') { |
|
2954
|
2954
|
$class = 'btn btn-secondary'; |
|
2955
|
2955
|
} |
|
2956
|
|
- $output = ' <form method="post" action="' . $href . '" class="form-inline">'."\n"; |
|
2957
|
|
- $output .= ' <button type="submit" class="' . $class . '"'."\n"; |
|
2958
|
|
- $output .= ' title="' . $title . '"'."\n"; |
|
2959
|
|
- $output .= ' >' . $text . '</button>'."\n"; |
|
|
2956
|
+ $output = ' <form method="post" action="'.$href.'" class="form-inline">'."\n"; |
|
|
2957
|
+ $output .= ' <button type="submit" class="'.$class.'"'."\n"; |
|
|
2958
|
+ $output .= ' title="'.$title.'"'."\n"; |
|
|
2959
|
+ $output .= ' >'.$text.'</button>'."\n"; |
|
2960
|
2960
|
$output .= ' </form>'."\n"; |
|
2961
|
2961
|
return $output; |
|
2962
|
2962
|
} |
|
@@ -3023,7 +3023,7 @@ discard block |
|
|
block discarded – undo |
|
3023
|
3023
|
|
|
3024
|
3024
|
// By default, use a meetingid without groups. |
|
3025
|
3025
|
if (empty($mid)) { |
|
3026
|
|
- $mid = $bigbluebuttonbn->meetingid . '-' . $bigbluebuttonbn->course . '-' . $bigbluebuttonbn->id; |
|
|
3026
|
+ $mid = $bigbluebuttonbn->meetingid.'-'.$bigbluebuttonbn->course.'-'.$bigbluebuttonbn->id; |
|
3027
|
3027
|
} |
|
3028
|
3028
|
|
|
3029
|
3029
|
// When meeting is running, all authorized users can join right in. |
|
@@ -3084,7 +3084,7 @@ discard block |
|
|
block discarded – undo |
|
3084
|
3084
|
function bigbluebuttonbn_instance_ownerid($bigbluebuttonbn) { |
|
3085
|
3085
|
global $DB; |
|
3086
|
3086
|
$filters = array('bigbluebuttonbnid' => $bigbluebuttonbn->id, 'log' => 'Add'); |
|
3087
|
|
- $ownerid = (integer)$DB->get_field('bigbluebuttonbn_logs', 'userid', $filters); |
|
|
3087
|
+ $ownerid = (integer) $DB->get_field('bigbluebuttonbn_logs', 'userid', $filters); |
|
3088
|
3088
|
return $ownerid; |
|
3089
|
3089
|
} |
|
3090
|
3090
|
|
|
@@ -3094,7 +3094,7 @@ discard block |
|
|
block discarded – undo |
|
3094
|
3094
|
* @return boolean |
|
3095
|
3095
|
*/ |
|
3096
|
3096
|
function bigbluebuttonbn_has_html5_client() { |
|
3097
|
|
- $checkurl = \mod_bigbluebuttonbn\locallib\bigbluebutton::root() . "html5client/check"; |
|
|
3097
|
+ $checkurl = \mod_bigbluebuttonbn\locallib\bigbluebutton::root()."html5client/check"; |
|
3098
|
3098
|
$curlinfo = bigbluebuttonbn_wrap_xml_load_file_curl_request($checkurl, 'HEAD'); |
|
3099
|
3099
|
return (isset($curlinfo['http_code']) && $curlinfo['http_code'] == 200); |
|
3100
|
3100
|
} |
|
@@ -3127,8 +3127,8 @@ discard block |
|
|
block discarded – undo |
|
3127
|
3127
|
$bbbsession['meetingname'] = $bbbsession['bigbluebuttonbn']->name; |
|
3128
|
3128
|
$bbbsession['meetingdescription'] = $bbbsession['bigbluebuttonbn']->intro; |
|
3129
|
3129
|
// Extra data for setting up the Meeting. |
|
3130
|
|
- $bbbsession['userlimit'] = intval((int)\mod_bigbluebuttonbn\locallib\config::get('userlimit_default')); |
|
3131
|
|
- if ((boolean)\mod_bigbluebuttonbn\locallib\config::get('userlimit_editable')) { |
|
|
3130
|
+ $bbbsession['userlimit'] = intval((int) \mod_bigbluebuttonbn\locallib\config::get('userlimit_default')); |
|
|
3131
|
+ if ((boolean) \mod_bigbluebuttonbn\locallib\config::get('userlimit_editable')) { |
|
3132
|
3132
|
$bbbsession['userlimit'] = intval($bbbsession['bigbluebuttonbn']->userlimit); |
|
3133
|
3133
|
} |
|
3134
|
3134
|
$bbbsession['voicebridge'] = $bbbsession['bigbluebuttonbn']->voicebridge; |
|
@@ -3234,7 +3234,7 @@ discard block |
|
|
block discarded – undo |
|
3234
|
3234
|
); |
|
3235
|
3235
|
|
|
3236
|
3236
|
// Check status and set extra values. |
|
3237
|
|
- $activitystatus = bigbluebuttonbn_view_get_activity_status($bbbsession); // In locallib. |
|
|
3237
|
+ $activitystatus = bigbluebuttonbn_view_get_activity_status($bbbsession); // In locallib. |
|
3238
|
3238
|
if ($activitystatus == 'ended') { |
|
3239
|
3239
|
$bbbsession['presentation'] = bigbluebuttonbn_get_presentation_array( |
|
3240
|
3240
|
$bbbsession['context'], $bbbsession['bigbluebuttonbn']->presentation); |