|
@@ -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', |
|
@@ -1655,7 +1655,7 @@ discard block |
|
|
block discarded – undo |
|
1655
|
1655
|
$linkattributes['title'] = get_string('view_recording_format_errror_unreachable', 'bigbluebuttonbn'); |
|
1656
|
1656
|
unset($linkattributes['data-href']); |
|
1657
|
1657
|
} |
|
1658
|
|
- return $OUTPUT->action_link('#', $text, null, $linkattributes) . ' '; |
|
|
1658
|
+ return $OUTPUT->action_link('#', $text, null, $linkattributes).' '; |
|
1659
|
1659
|
} |
|
1660
|
1660
|
|
|
1661
|
1661
|
/** |
|
@@ -1668,7 +1668,7 @@ discard block |
|
|
block discarded – undo |
|
1668
|
1668
|
function bigbluebuttonbn_get_recording_type_text($playbacktype) { |
|
1669
|
1669
|
// Check first if string exists, and if it does'nt just default to the capitalised version of the string. |
|
1670
|
1670
|
$text = ucwords($playbacktype); |
|
1671
|
|
- $typestringid = 'view_recording_format_' . $playbacktype; |
|
|
1671
|
+ $typestringid = 'view_recording_format_'.$playbacktype; |
|
1672
|
1672
|
if (get_string_manager()->string_exists($typestringid, 'bigbluebuttonbn')) { |
|
1673
|
1673
|
$text = get_string($typestringid, 'bigbluebuttonbn'); |
|
1674
|
1674
|
} |
|
@@ -1698,7 +1698,7 @@ discard block |
|
|
block discarded – undo |
|
1698
|
1698
|
$validatedurls[$urlhost] = true; |
|
1699
|
1699
|
$curlinfo = bigbluebuttonbn_wrap_xml_load_file_curl_request($url, 'HEAD'); |
|
1700
|
1700
|
if (!isset($curlinfo['http_code']) || $curlinfo['http_code'] != 200) { |
|
1701
|
|
- $error = "Resources hosted by " . $urlhost . " are unreachable. Server responded with code " . $curlinfo['http_code']; |
|
|
1701
|
+ $error = "Resources hosted by ".$urlhost." are unreachable. Server responded with code ".$curlinfo['http_code']; |
|
1702
|
1702
|
debugging($error, DEBUG_DEVELOPER); |
|
1703
|
1703
|
$validatedurls[$urlhost] = false; |
|
1704
|
1704
|
} |
|
@@ -1789,12 +1789,12 @@ discard block |
|
|
block discarded – undo |
|
1789
|
1789
|
* @return string |
|
1790
|
1790
|
*/ |
|
1791
|
1791
|
function bigbluebuttonbn_get_recording_data_row_text($recording, $text, $source, $data) { |
|
1792
|
|
- $htmltext = '<span>' . htmlentities($text) . '</span>'; |
|
|
1792
|
+ $htmltext = '<span>'.htmlentities($text).'</span>'; |
|
1793
|
1793
|
if (empty($data)) { |
|
1794
|
1794
|
return $htmltext; |
|
1795
|
1795
|
} |
|
1796
|
|
- $target = $data['action'] . '-' . $data['target']; |
|
1797
|
|
- $id = 'recording-' . $target . '-' . $data['recordingid']; |
|
|
1796
|
+ $target = $data['action'].'-'.$data['target']; |
|
|
1797
|
+ $id = 'recording-'.$target.'-'.$data['recordingid']; |
|
1798
|
1798
|
$attributes = array('id' => $id, 'class' => 'quickeditlink col-md-20', |
|
1799
|
1799
|
'data-recordingid' => $data['recordingid'], 'data-meetingid' => $data['meetingid'], |
|
1800
|
1800
|
'data-target' => $data['target'], 'data-source' => $source); |
|
@@ -1802,7 +1802,7 @@ discard block |
|
|
block discarded – undo |
|
1802
|
1802
|
$tail = html_writer::end_tag('div'); |
|
1803
|
1803
|
$payload = array('action' => $data['action'], 'tag' => $data['tag'], 'target' => $data['target']); |
|
1804
|
1804
|
$htmllink = bigbluebuttonbn_actionbar_render_button($recording, $payload); |
|
1805
|
|
- return $head . $htmltext . $htmllink . $tail; |
|
|
1805
|
+ return $head.$htmltext.$htmllink.$tail; |
|
1806
|
1806
|
} |
|
1807
|
1807
|
|
|
1808
|
1808
|
/** |
|
@@ -1820,10 +1820,10 @@ discard block |
|
|
block discarded – undo |
|
1820
|
1820
|
} |
|
1821
|
1821
|
$target = $data['action']; |
|
1822
|
1822
|
if (isset($data['target'])) { |
|
1823
|
|
- $target .= '-' . $data['target']; |
|
|
1823
|
+ $target .= '-'.$data['target']; |
|
1824
|
1824
|
} |
|
1825
|
|
- $id = 'recording-' . $target . '-' . $recording['recordID']; |
|
1826
|
|
- $onclick = 'M.mod_bigbluebuttonbn.recordings.recording' . ucfirst($data['action']) . '(this); return false;'; |
|
|
1825
|
+ $id = 'recording-'.$target.'-'.$recording['recordID']; |
|
|
1826
|
+ $onclick = 'M.mod_bigbluebuttonbn.recordings.recording'.ucfirst($data['action']).'(this); return false;'; |
|
1827
|
1827
|
if ((boolean) \mod_bigbluebuttonbn\locallib\config::get('recording_icons_enabled')) { |
|
1828
|
1828
|
// With icon for $manageaction. |
|
1829
|
1829
|
$iconattributes = array('id' => $id, 'class' => 'iconsmall'); |
|
@@ -1837,12 +1837,12 @@ discard block |
|
|
block discarded – undo |
|
1837
|
1837
|
$recording['recordID']); |
|
1838
|
1838
|
} |
|
1839
|
1839
|
if (isset($data['disabled'])) { |
|
1840
|
|
- $iconattributes['class'] .= ' fa-' . $data['disabled']; |
|
|
1840
|
+ $iconattributes['class'] .= ' fa-'.$data['disabled']; |
|
1841
|
1841
|
$linkattributes['class'] = 'disabled'; |
|
1842
|
1842
|
unset($linkattributes['onclick']); |
|
1843
|
1843
|
} |
|
1844
|
1844
|
$icon = new pix_icon('i/'.$data['tag'], |
|
1845
|
|
- get_string('view_recording_list_actionbar_' . $data['action'], 'bigbluebuttonbn'), |
|
|
1845
|
+ get_string('view_recording_list_actionbar_'.$data['action'], 'bigbluebuttonbn'), |
|
1846
|
1846
|
'moodle', $iconattributes); |
|
1847
|
1847
|
return $OUTPUT->action_icon('#', $icon, null, $linkattributes, false); |
|
1848
|
1848
|
} |
|
@@ -1935,7 +1935,7 @@ discard block |
|
|
block discarded – undo |
|
1935
|
1935
|
if ($bbbsession['managerecordings']) { |
|
1936
|
1936
|
$table->head[] = get_string('view_recording_actionbar', 'bigbluebuttonbn'); |
|
1937
|
1937
|
$table->align[] = 'left'; |
|
1938
|
|
- $table->size[] = (count($tools) * 40) . 'px'; |
|
|
1938
|
+ $table->size[] = (count($tools) * 40).'px'; |
|
1939
|
1939
|
} |
|
1940
|
1940
|
// Get the groups of the user. |
|
1941
|
1941
|
$usergroups = groups_get_all_groups($bbbsession['course']->id, $bbbsession['userID']); |
|
@@ -2003,13 +2003,13 @@ discard block |
|
|
block discarded – undo |
|
2003
|
2003
|
} |
|
2004
|
2004
|
$rowdata->date_formatted = str_replace(' ', ' ', $rowdata->date_formatted); |
|
2005
|
2005
|
$row->cells = array(); |
|
2006
|
|
- $row->cells[] = $texthead . $rowdata->playback . $texttail; |
|
2007
|
|
- $row->cells[] = $texthead . $rowdata->recording . $texttail; |
|
2008
|
|
- $row->cells[] = $texthead . $rowdata->description . $texttail; |
|
|
2006
|
+ $row->cells[] = $texthead.$rowdata->playback.$texttail; |
|
|
2007
|
+ $row->cells[] = $texthead.$rowdata->recording.$texttail; |
|
|
2008
|
+ $row->cells[] = $texthead.$rowdata->description.$texttail; |
|
2009
|
2009
|
if (bigbluebuttonbn_get_recording_data_preview_enabled($bbbsession)) { |
|
2010
|
2010
|
$row->cells[] = $rowdata->preview; |
|
2011
|
2011
|
} |
|
2012
|
|
- $row->cells[] = $texthead . $rowdata->date_formatted . $texttail; |
|
|
2012
|
+ $row->cells[] = $texthead.$rowdata->date_formatted.$texttail; |
|
2013
|
2013
|
$row->cells[] = $rowdata->duration_formatted; |
|
2014
|
2014
|
if ($bbbsession['managerecordings']) { |
|
2015
|
2015
|
$row->cells[] = $rowdata->actionbar; |
|
@@ -2056,7 +2056,7 @@ discard block |
|
|
block discarded – undo |
|
2056
|
2056
|
$sender = get_admin(); |
|
2057
|
2057
|
// Prepare message. |
|
2058
|
2058
|
$messagetext = '<p>'.get_string('email_body_recording_ready_for', 'bigbluebuttonbn'). |
|
2059
|
|
- ' "' . $bigbluebuttonbn->name . '" '. |
|
|
2059
|
+ ' "'.$bigbluebuttonbn->name.'" '. |
|
2060
|
2060
|
get_string('email_body_recording_ready_is_ready', 'bigbluebuttonbn').'.</p>'; |
|
2061
|
2061
|
$context = context_course::instance($bigbluebuttonbn->course); |
|
2062
|
2062
|
\mod_bigbluebuttonbn\locallib\notifier::notification_send($sender, $bigbluebuttonbn, $messagetext); |
|
@@ -2099,7 +2099,7 @@ discard block |
|
|
block discarded – undo |
|
2099
|
2099
|
} |
|
2100
|
2100
|
$coursesforselect = []; |
|
2101
|
2101
|
foreach ($courses as $course) { |
|
2102
|
|
- $coursesforselect[$course->id] = $course->fullname . " (" . $course->shortname . ")"; |
|
|
2102
|
+ $coursesforselect[$course->id] = $course->fullname." (".$course->shortname.")"; |
|
2103
|
2103
|
} |
|
2104
|
2104
|
return $coursesforselect; |
|
2105
|
2105
|
} |
|
@@ -2194,17 +2194,17 @@ discard block |
|
|
block discarded – undo |
|
2194
|
2194
|
* @return string containing the sql used for getting the target bigbluebuttonbn instances |
|
2195
|
2195
|
*/ |
|
2196
|
2196
|
function bigbluebuttonbn_get_recordings_deleted_sql_select($courseid = 0, $bigbluebuttonbnid = null, $subset = true) { |
|
2197
|
|
- $sql = "log = '" . BIGBLUEBUTTONBN_LOG_EVENT_DELETE . "' AND meta like '%has_recordings%' AND meta like '%true%'"; |
|
|
2197
|
+ $sql = "log = '".BIGBLUEBUTTONBN_LOG_EVENT_DELETE."' AND meta like '%has_recordings%' AND meta like '%true%'"; |
|
2198
|
2198
|
if (empty($courseid)) { |
|
2199
|
2199
|
$courseid = 0; |
|
2200
|
2200
|
} |
|
2201
|
2201
|
if (empty($bigbluebuttonbnid)) { |
|
2202
|
|
- return $sql . " AND courseid = {$courseid}"; |
|
|
2202
|
+ return $sql." AND courseid = {$courseid}"; |
|
2203
|
2203
|
} |
|
2204
|
2204
|
if ($subset) { |
|
2205
|
|
- return $sql . " AND bigbluebuttonbnid = '{$bigbluebuttonbnid}'"; |
|
|
2205
|
+ return $sql." AND bigbluebuttonbnid = '{$bigbluebuttonbnid}'"; |
|
2206
|
2206
|
} |
|
2207
|
|
- return $sql . " AND courseid = {$courseid} AND bigbluebuttonbnid <> '{$bigbluebuttonbnid}'"; |
|
|
2207
|
+ return $sql." AND courseid = {$courseid} AND bigbluebuttonbnid <> '{$bigbluebuttonbnid}'"; |
|
2208
|
2208
|
} |
|
2209
|
2209
|
|
|
2210
|
2210
|
/** |
|
@@ -2218,17 +2218,17 @@ discard block |
|
|
block discarded – undo |
|
2218
|
2218
|
* @return string containing the sql used for getting the target bigbluebuttonbn instances |
|
2219
|
2219
|
*/ |
|
2220
|
2220
|
function bigbluebuttonbn_get_recordings_imported_sql_select($courseid = 0, $bigbluebuttonbnid = null, $subset = true) { |
|
2221
|
|
- $sql = "log = '" . BIGBLUEBUTTONBN_LOG_EVENT_IMPORT . "'"; |
|
|
2221
|
+ $sql = "log = '".BIGBLUEBUTTONBN_LOG_EVENT_IMPORT."'"; |
|
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
|
/** |
|
@@ -2554,7 +2554,7 @@ discard block |
|
|
block discarded – undo |
|
2554
|
2554
|
*/ |
|
2555
|
2555
|
function bigbluebuttonbn_settings_general(&$renderer) { |
|
2556
|
2556
|
// Configuration for BigBlueButton. |
|
2557
|
|
- if ((boolean)\mod_bigbluebuttonbn\settings\validator::section_general_shown()) { |
|
|
2557
|
+ if ((boolean) \mod_bigbluebuttonbn\settings\validator::section_general_shown()) { |
|
2558
|
2558
|
$renderer->render_group_header('general'); |
|
2559
|
2559
|
$renderer->render_group_element('server_url', |
|
2560
|
2560
|
$renderer->render_group_element_text('server_url', BIGBLUEBUTTONBN_DEFAULT_SERVER_URL)); |
|
@@ -2572,7 +2572,7 @@ discard block |
|
|
block discarded – undo |
|
2572
|
2572
|
*/ |
|
2573
|
2573
|
function bigbluebuttonbn_settings_record(&$renderer) { |
|
2574
|
2574
|
// Configuration for 'recording' feature. |
|
2575
|
|
- if ((boolean)\mod_bigbluebuttonbn\settings\validator::section_record_meeting_shown()) { |
|
|
2575
|
+ if ((boolean) \mod_bigbluebuttonbn\settings\validator::section_record_meeting_shown()) { |
|
2576
|
2576
|
$renderer->render_group_header('recording'); |
|
2577
|
2577
|
$renderer->render_group_element('recording_default', |
|
2578
|
2578
|
$renderer->render_group_element_checkbox('recording_default', 1)); |
|
@@ -2602,7 +2602,7 @@ discard block |
|
|
block discarded – undo |
|
2602
|
2602
|
*/ |
|
2603
|
2603
|
function bigbluebuttonbn_settings_importrecordings(&$renderer) { |
|
2604
|
2604
|
// Configuration for 'import recordings' feature. |
|
2605
|
|
- if ((boolean)\mod_bigbluebuttonbn\settings\validator::section_import_recordings_shown()) { |
|
|
2605
|
+ if ((boolean) \mod_bigbluebuttonbn\settings\validator::section_import_recordings_shown()) { |
|
2606
|
2606
|
$renderer->render_group_header('importrecordings'); |
|
2607
|
2607
|
$renderer->render_group_element('importrecordings_enabled', |
|
2608
|
2608
|
$renderer->render_group_element_checkbox('importrecordings_enabled', 0)); |
|
@@ -2620,7 +2620,7 @@ discard block |
|
|
block discarded – undo |
|
2620
|
2620
|
*/ |
|
2621
|
2621
|
function bigbluebuttonbn_settings_showrecordings(&$renderer) { |
|
2622
|
2622
|
// Configuration for 'show recordings' feature. |
|
2623
|
|
- if ((boolean)\mod_bigbluebuttonbn\settings\validator::section_show_recordings_shown()) { |
|
|
2623
|
+ if ((boolean) \mod_bigbluebuttonbn\settings\validator::section_show_recordings_shown()) { |
|
2624
|
2624
|
$renderer->render_group_header('recordings'); |
|
2625
|
2625
|
$renderer->render_group_element('recordings_html_default', |
|
2626
|
2626
|
$renderer->render_group_element_checkbox('recordings_html_default', 1)); |
|
@@ -2654,7 +2654,7 @@ discard block |
|
|
block discarded – undo |
|
2654
|
2654
|
*/ |
|
2655
|
2655
|
function bigbluebuttonbn_settings_waitmoderator(&$renderer) { |
|
2656
|
2656
|
// Configuration for wait for moderator feature. |
|
2657
|
|
- if ((boolean)\mod_bigbluebuttonbn\settings\validator::section_wait_moderator_shown()) { |
|
|
2657
|
+ if ((boolean) \mod_bigbluebuttonbn\settings\validator::section_wait_moderator_shown()) { |
|
2658
|
2658
|
$renderer->render_group_header('waitformoderator'); |
|
2659
|
2659
|
$renderer->render_group_element('waitformoderator_default', |
|
2660
|
2660
|
$renderer->render_group_element_checkbox('waitformoderator_default', 0)); |
|
@@ -2676,7 +2676,7 @@ discard block |
|
|
block discarded – undo |
|
2676
|
2676
|
*/ |
|
2677
|
2677
|
function bigbluebuttonbn_settings_voicebridge(&$renderer) { |
|
2678
|
2678
|
// Configuration for "static voice bridge" feature. |
|
2679
|
|
- if ((boolean)\mod_bigbluebuttonbn\settings\validator::section_static_voice_bridge_shown()) { |
|
|
2679
|
+ if ((boolean) \mod_bigbluebuttonbn\settings\validator::section_static_voice_bridge_shown()) { |
|
2680
|
2680
|
$renderer->render_group_header('voicebridge'); |
|
2681
|
2681
|
$renderer->render_group_element('voicebridge_editable', |
|
2682
|
2682
|
$renderer->render_group_element_checkbox('voicebridge_editable', 0)); |
|
@@ -2692,7 +2692,7 @@ discard block |
|
|
block discarded – undo |
|
2692
|
2692
|
*/ |
|
2693
|
2693
|
function bigbluebuttonbn_settings_preupload(&$renderer) { |
|
2694
|
2694
|
// Configuration for "preupload presentation" feature. |
|
2695
|
|
- if ((boolean)\mod_bigbluebuttonbn\settings\validator::section_preupload_presentation_shown()) { |
|
|
2695
|
+ if ((boolean) \mod_bigbluebuttonbn\settings\validator::section_preupload_presentation_shown()) { |
|
2696
|
2696
|
// This feature only works if curl is installed. |
|
2697
|
2697
|
$preuploaddescripion = get_string('config_preuploadpresentation_description', 'bigbluebuttonbn'); |
|
2698
|
2698
|
if (!extension_loaded('curl')) { |
|
@@ -2718,7 +2718,7 @@ discard block |
|
|
block discarded – undo |
|
2718
|
2718
|
*/ |
|
2719
|
2719
|
function bigbluebuttonbn_settings_preupload_manage_default_file(&$renderer) { |
|
2720
|
2720
|
// Configuration for "preupload presentation" feature. |
|
2721
|
|
- if ((boolean)\mod_bigbluebuttonbn\settings\validator::section_preupload_presentation_shown()) { |
|
|
2721
|
+ if ((boolean) \mod_bigbluebuttonbn\settings\validator::section_preupload_presentation_shown()) { |
|
2722
|
2722
|
if (extension_loaded('curl')) { |
|
2723
|
2723
|
// This feature only works if curl is installed. |
|
2724
|
2724
|
$renderer->render_filemanager_default_file_presentation("presentation_default"); |
|
@@ -2735,7 +2735,7 @@ discard block |
|
|
block discarded – undo |
|
2735
|
2735
|
*/ |
|
2736
|
2736
|
function bigbluebuttonbn_settings_userlimit(&$renderer) { |
|
2737
|
2737
|
// Configuration for "user limit" feature. |
|
2738
|
|
- if ((boolean)\mod_bigbluebuttonbn\settings\validator::section_user_limit_shown()) { |
|
|
2738
|
+ if ((boolean) \mod_bigbluebuttonbn\settings\validator::section_user_limit_shown()) { |
|
2739
|
2739
|
$renderer->render_group_header('userlimit'); |
|
2740
|
2740
|
$renderer->render_group_element('userlimit_default', |
|
2741
|
2741
|
$renderer->render_group_element_text('userlimit_default', 0, PARAM_INT)); |
|
@@ -2753,7 +2753,7 @@ discard block |
|
|
block discarded – undo |
|
2753
|
2753
|
*/ |
|
2754
|
2754
|
function bigbluebuttonbn_settings_duration(&$renderer) { |
|
2755
|
2755
|
// Configuration for "scheduled duration" feature. |
|
2756
|
|
- if ((boolean)\mod_bigbluebuttonbn\settings\validator::section_scheduled_duration_shown()) { |
|
|
2756
|
+ if ((boolean) \mod_bigbluebuttonbn\settings\validator::section_scheduled_duration_shown()) { |
|
2757
|
2757
|
$renderer->render_group_header('scheduled'); |
|
2758
|
2758
|
$renderer->render_group_element('scheduled_duration_enabled', |
|
2759
|
2759
|
$renderer->render_group_element_checkbox('scheduled_duration_enabled', 1)); |
|
@@ -2773,7 +2773,7 @@ discard block |
|
|
block discarded – undo |
|
2773
|
2773
|
*/ |
|
2774
|
2774
|
function bigbluebuttonbn_settings_participants(&$renderer) { |
|
2775
|
2775
|
// Configuration for defining the default role/user that will be moderator on new activities. |
|
2776
|
|
- if ((boolean)\mod_bigbluebuttonbn\settings\validator::section_moderator_default_shown()) { |
|
|
2776
|
+ if ((boolean) \mod_bigbluebuttonbn\settings\validator::section_moderator_default_shown()) { |
|
2777
|
2777
|
$renderer->render_group_header('participant'); |
|
2778
|
2778
|
// UI for 'participants' feature. |
|
2779
|
2779
|
$roles = bigbluebuttonbn_get_roles(null, false); |
|
@@ -2796,7 +2796,7 @@ discard block |
|
|
block discarded – undo |
|
2796
|
2796
|
*/ |
|
2797
|
2797
|
function bigbluebuttonbn_settings_notifications(&$renderer) { |
|
2798
|
2798
|
// Configuration for "send notifications" feature. |
|
2799
|
|
- if ((boolean)\mod_bigbluebuttonbn\settings\validator::section_send_notifications_shown()) { |
|
|
2799
|
+ if ((boolean) \mod_bigbluebuttonbn\settings\validator::section_send_notifications_shown()) { |
|
2800
|
2800
|
$renderer->render_group_header('sendnotifications'); |
|
2801
|
2801
|
$renderer->render_group_element('sendnotifications_enabled', |
|
2802
|
2802
|
$renderer->render_group_element_checkbox('sendnotifications_enabled', 1)); |
|
@@ -2812,12 +2812,12 @@ discard block |
|
|
block discarded – undo |
|
2812
|
2812
|
*/ |
|
2813
|
2813
|
function bigbluebuttonbn_settings_clienttype(&$renderer) { |
|
2814
|
2814
|
// Configuration for "clienttype" feature. |
|
2815
|
|
- if ((boolean)\mod_bigbluebuttonbn\settings\validator::section_clienttype_shown()) { |
|
|
2815
|
+ if ((boolean) \mod_bigbluebuttonbn\settings\validator::section_clienttype_shown()) { |
|
2816
|
2816
|
$renderer->render_group_header('clienttype'); |
|
2817
|
2817
|
$renderer->render_group_element('clienttype_editable', |
|
2818
|
2818
|
$renderer->render_group_element_checkbox('clienttype_editable', 0)); |
|
2819
|
2819
|
// Web Client default. |
|
2820
|
|
- $default = intval((int)\mod_bigbluebuttonbn\locallib\config::get('clienttype_default')); |
|
|
2820
|
+ $default = intval((int) \mod_bigbluebuttonbn\locallib\config::get('clienttype_default')); |
|
2821
|
2821
|
$choices = array(BIGBLUEBUTTON_CLIENTTYPE_FLASH => get_string('mod_form_block_clienttype_flash', 'bigbluebuttonbn'), |
|
2822
|
2822
|
BIGBLUEBUTTON_CLIENTTYPE_HTML5 => get_string('mod_form_block_clienttype_html5', 'bigbluebuttonbn')); |
|
2823
|
2823
|
$renderer->render_group_element('clienttype_default', |
|
@@ -2835,7 +2835,7 @@ discard block |
|
|
block discarded – undo |
|
2835
|
2835
|
*/ |
|
2836
|
2836
|
function bigbluebuttonbn_settings_muteonstart(&$renderer) { |
|
2837
|
2837
|
// Configuration for BigBlueButton. |
|
2838
|
|
- if ((boolean)\mod_bigbluebuttonbn\settings\validator::section_muteonstart_shown()) { |
|
|
2838
|
+ if ((boolean) \mod_bigbluebuttonbn\settings\validator::section_muteonstart_shown()) { |
|
2839
|
2839
|
$renderer->render_group_header('muteonstart'); |
|
2840
|
2840
|
$renderer->render_group_element('muteonstart_default', |
|
2841
|
2841
|
$renderer->render_group_element_checkbox('muteonstart_default', 0)); |
|
@@ -2853,7 +2853,7 @@ discard block |
|
|
block discarded – undo |
|
2853
|
2853
|
*/ |
|
2854
|
2854
|
function bigbluebuttonbn_settings_extended(&$renderer) { |
|
2855
|
2855
|
// Configuration for 'notify users when recording ready' feature. |
|
2856
|
|
- if ((boolean)\mod_bigbluebuttonbn\settings\validator::section_settings_extended_shown()) { |
|
|
2856
|
+ if ((boolean) \mod_bigbluebuttonbn\settings\validator::section_settings_extended_shown()) { |
|
2857
|
2857
|
$renderer->render_group_header('extended_capabilities'); |
|
2858
|
2858
|
// UI for 'notify users when recording ready' feature. |
|
2859
|
2859
|
$renderer->render_group_element('recordingready_enabled', |
|
@@ -2876,7 +2876,7 @@ discard block |
|
|
block discarded – undo |
|
2876
|
2876
|
global $DB; |
|
2877
|
2877
|
do { |
|
2878
|
2878
|
$encodedseed = sha1(bigbluebuttonbn_random_password(12)); |
|
2879
|
|
- $meetingid = (string)$DB->get_field('bigbluebuttonbn', 'meetingid', array('meetingid' => $encodedseed)); |
|
|
2879
|
+ $meetingid = (string) $DB->get_field('bigbluebuttonbn', 'meetingid', array('meetingid' => $encodedseed)); |
|
2880
|
2880
|
} while ($meetingid == $encodedseed); |
|
2881
|
2881
|
return $encodedseed; |
|
2882
|
2882
|
} |
|
@@ -2921,22 +2921,22 @@ discard block |
|
|
block discarded – undo |
|
2921
|
2921
|
* |
|
2922
|
2922
|
* @return string |
|
2923
|
2923
|
*/ |
|
2924
|
|
-function bigbluebuttonbn_render_warning($message, $type='info', $href='', $text='', $class='') { |
|
|
2924
|
+function bigbluebuttonbn_render_warning($message, $type = 'info', $href = '', $text = '', $class = '') { |
|
2925
|
2925
|
global $OUTPUT; |
|
2926
|
2926
|
$output = "\n"; |
|
2927
|
2927
|
// Evaluates if config_warning is enabled. |
|
2928
|
2928
|
if (empty($message)) { |
|
2929
|
2929
|
return $output; |
|
2930
|
2930
|
} |
|
2931
|
|
- $output .= $OUTPUT->box_start('box boxalignleft adminerror alert alert-' . $type . ' alert-block fade in', |
|
2932
|
|
- 'bigbluebuttonbn_view_general_warning') . "\n"; |
|
2933
|
|
- $output .= ' ' . $message . "\n"; |
|
2934
|
|
- $output .= ' <div class="singlebutton pull-right">' . "\n"; |
|
|
2931
|
+ $output .= $OUTPUT->box_start('box boxalignleft adminerror alert alert-'.$type.' alert-block fade in', |
|
|
2932
|
+ 'bigbluebuttonbn_view_general_warning')."\n"; |
|
|
2933
|
+ $output .= ' '.$message."\n"; |
|
|
2934
|
+ $output .= ' <div class="singlebutton pull-right">'."\n"; |
|
2935
|
2935
|
if (!empty($href)) { |
|
2936
|
2936
|
$output .= bigbluebuttonbn_render_warning_button($href, $text, $class); |
|
2937
|
2937
|
} |
|
2938
|
|
- $output .= ' </div>' . "\n"; |
|
2939
|
|
- $output .= $OUTPUT->box_end() . "\n"; |
|
|
2938
|
+ $output .= ' </div>'."\n"; |
|
|
2939
|
+ $output .= $OUTPUT->box_end()."\n"; |
|
2940
|
2940
|
return $output; |
|
2941
|
2941
|
} |
|
2942
|
2942
|
|
|
@@ -2960,10 +2960,10 @@ discard block |
|
|
block discarded – undo |
|
2960
|
2960
|
if ($class == '') { |
|
2961
|
2961
|
$class = 'btn btn-secondary'; |
|
2962
|
2962
|
} |
|
2963
|
|
- $output = ' <form method="post" action="' . $href . '" class="form-inline">'."\n"; |
|
2964
|
|
- $output .= ' <button type="submit" class="' . $class . '"'."\n"; |
|
2965
|
|
- $output .= ' title="' . $title . '"'."\n"; |
|
2966
|
|
- $output .= ' >' . $text . '</button>'."\n"; |
|
|
2963
|
+ $output = ' <form method="post" action="'.$href.'" class="form-inline">'."\n"; |
|
|
2964
|
+ $output .= ' <button type="submit" class="'.$class.'"'."\n"; |
|
|
2965
|
+ $output .= ' title="'.$title.'"'."\n"; |
|
|
2966
|
+ $output .= ' >'.$text.'</button>'."\n"; |
|
2967
|
2967
|
$output .= ' </form>'."\n"; |
|
2968
|
2968
|
return $output; |
|
2969
|
2969
|
} |
|
@@ -3030,7 +3030,7 @@ discard block |
|
|
block discarded – undo |
|
3030
|
3030
|
|
|
3031
|
3031
|
// By default, use a meetingid without groups. |
|
3032
|
3032
|
if (empty($mid)) { |
|
3033
|
|
- $mid = $bigbluebuttonbn->meetingid . '-' . $bigbluebuttonbn->course . '-' . $bigbluebuttonbn->id; |
|
|
3033
|
+ $mid = $bigbluebuttonbn->meetingid.'-'.$bigbluebuttonbn->course.'-'.$bigbluebuttonbn->id; |
|
3034
|
3034
|
} |
|
3035
|
3035
|
|
|
3036
|
3036
|
// When meeting is running, all authorized users can join right in. |
|
@@ -3091,7 +3091,7 @@ discard block |
|
|
block discarded – undo |
|
3091
|
3091
|
function bigbluebuttonbn_instance_ownerid($bigbluebuttonbn) { |
|
3092
|
3092
|
global $DB; |
|
3093
|
3093
|
$filters = array('bigbluebuttonbnid' => $bigbluebuttonbn->id, 'log' => 'Add'); |
|
3094
|
|
- $ownerid = (integer)$DB->get_field('bigbluebuttonbn_logs', 'userid', $filters); |
|
|
3094
|
+ $ownerid = (integer) $DB->get_field('bigbluebuttonbn_logs', 'userid', $filters); |
|
3095
|
3095
|
return $ownerid; |
|
3096
|
3096
|
} |
|
3097
|
3097
|
|
|
@@ -3101,7 +3101,7 @@ discard block |
|
|
block discarded – undo |
|
3101
|
3101
|
* @return boolean |
|
3102
|
3102
|
*/ |
|
3103
|
3103
|
function bigbluebuttonbn_has_html5_client() { |
|
3104
|
|
- $checkurl = \mod_bigbluebuttonbn\locallib\bigbluebutton::root() . "html5client/check"; |
|
|
3104
|
+ $checkurl = \mod_bigbluebuttonbn\locallib\bigbluebutton::root()."html5client/check"; |
|
3105
|
3105
|
$curlinfo = bigbluebuttonbn_wrap_xml_load_file_curl_request($checkurl, 'HEAD'); |
|
3106
|
3106
|
return (isset($curlinfo['http_code']) && $curlinfo['http_code'] == 200); |
|
3107
|
3107
|
} |
|
@@ -3134,8 +3134,8 @@ discard block |
|
|
block discarded – undo |
|
3134
|
3134
|
$bbbsession['meetingname'] = $bbbsession['bigbluebuttonbn']->name; |
|
3135
|
3135
|
$bbbsession['meetingdescription'] = $bbbsession['bigbluebuttonbn']->intro; |
|
3136
|
3136
|
// Extra data for setting up the Meeting. |
|
3137
|
|
- $bbbsession['userlimit'] = intval((int)\mod_bigbluebuttonbn\locallib\config::get('userlimit_default')); |
|
3138
|
|
- if ((boolean)\mod_bigbluebuttonbn\locallib\config::get('userlimit_editable')) { |
|
|
3137
|
+ $bbbsession['userlimit'] = intval((int) \mod_bigbluebuttonbn\locallib\config::get('userlimit_default')); |
|
|
3138
|
+ if ((boolean) \mod_bigbluebuttonbn\locallib\config::get('userlimit_editable')) { |
|
3139
|
3139
|
$bbbsession['userlimit'] = intval($bbbsession['bigbluebuttonbn']->userlimit); |
|
3140
|
3140
|
} |
|
3141
|
3141
|
$bbbsession['voicebridge'] = $bbbsession['bigbluebuttonbn']->voicebridge; |
|
@@ -3241,7 +3241,7 @@ discard block |
|
|
block discarded – undo |
|
3241
|
3241
|
); |
|
3242
|
3242
|
|
|
3243
|
3243
|
// Check status and set extra values. |
|
3244
|
|
- $activitystatus = bigbluebuttonbn_view_get_activity_status($bbbsession); // In locallib. |
|
|
3244
|
+ $activitystatus = bigbluebuttonbn_view_get_activity_status($bbbsession); // In locallib. |
|
3245
|
3245
|
if ($activitystatus == 'ended') { |
|
3246
|
3246
|
$bbbsession['presentation'] = bigbluebuttonbn_get_presentation_array( |
|
3247
|
3247
|
$bbbsession['context'], $bbbsession['bigbluebuttonbn']->presentation); |