@@ -137,7 +137,7 @@ |
||
| 137 | 137 | * Sign a string with a given key and algorithm. |
| 138 | 138 | * |
| 139 | 139 | * @param string $msg The message to sign |
| 140 | - * @param string|resource $key The secret key |
|
| 140 | + * @param string $key The secret key |
|
| 141 | 141 | * @param string $alg The signing algorithm. Supported algorithms |
| 142 | 142 | * are 'HS256', 'HS384', 'HS512' and 'RS256' |
| 143 | 143 | * |
@@ -66,7 +66,6 @@ discard block |
||
| 66 | 66 | * will create a new instance and return the id number |
| 67 | 67 | * of the new instance. |
| 68 | 68 | * |
| 69 | - * @param object $bigbluebuttonbn An object from the form in mod_form.php |
|
| 70 | 69 | * @return int The id of the newly inserted bigbluebuttonbn record |
| 71 | 70 | */ |
| 72 | 71 | function bigbluebuttonbn_add_instance($data, $mform) { |
@@ -93,7 +92,6 @@ discard block |
||
| 93 | 92 | * (defined by the form in mod_form.php) this function |
| 94 | 93 | * will update an existing instance with new data. |
| 95 | 94 | * |
| 96 | - * @param object $bigbluebuttonbn An object from the form in mod_form.php |
|
| 97 | 95 | * @return boolean Success/Fail |
| 98 | 96 | */ |
| 99 | 97 | function bigbluebuttonbn_update_instance($data, $mform) { |
@@ -162,7 +160,7 @@ discard block |
||
| 162 | 160 | * $return->time = the time they did it |
| 163 | 161 | * $return->info = a short text description |
| 164 | 162 | * |
| 165 | - * @return null |
|
| 163 | + * @return boolean |
|
| 166 | 164 | */ |
| 167 | 165 | function bigbluebuttonbn_user_outline($course, $user, $mod, $bigbluebuttonbn) { |
| 168 | 166 | return true; |
@@ -230,7 +228,7 @@ discard block |
||
| 230 | 228 | * See other modules as example. |
| 231 | 229 | * |
| 232 | 230 | * @param int $bigbluebuttonbnid ID of an instance of this module |
| 233 | - * @return mixed boolean/array of students |
|
| 231 | + * @return boolean boolean/array of students |
|
| 234 | 232 | */ |
| 235 | 233 | function bigbluebuttonbn_get_participants($bigbluebuttonbnid) { |
| 236 | 234 | return false; |
@@ -238,7 +236,7 @@ discard block |
||
| 238 | 236 | |
| 239 | 237 | /** |
| 240 | 238 | * Returns all other caps used in module |
| 241 | - * @return array |
|
| 239 | + * @return string[] |
|
| 242 | 240 | */ |
| 243 | 241 | function bigbluebuttonbn_get_extra_capabilities() { |
| 244 | 242 | return array('moodle/site:accessallgroups'); |
@@ -255,7 +253,7 @@ discard block |
||
| 255 | 253 | * as reference. |
| 256 | 254 | * |
| 257 | 255 | * @param int $bigbluebuttonbnid ID of an instance of this module |
| 258 | - * @return mixed |
|
| 256 | + * @return boolean |
|
| 259 | 257 | */ |
| 260 | 258 | function bigbluebuttonbn_scale_used($bigbluebuttonbnid, $scaleid) { |
| 261 | 259 | $return = false; |
@@ -288,7 +286,7 @@ discard block |
||
| 288 | 286 | |
| 289 | 287 | /** |
| 290 | 288 | * List of view style log actions |
| 291 | - * @return array |
|
| 289 | + * @return string[] |
|
| 292 | 290 | */ |
| 293 | 291 | function bigbluebuttonbn_get_view_actions() { |
| 294 | 292 | return array('view', 'view all'); |
@@ -296,7 +294,7 @@ discard block |
||
| 296 | 294 | |
| 297 | 295 | /** |
| 298 | 296 | * List of update style log actions |
| 299 | - * @return array |
|
| 297 | + * @return string[] |
|
| 300 | 298 | */ |
| 301 | 299 | function bigbluebuttonbn_get_post_actions() { |
| 302 | 300 | return array('update', 'add', 'create', 'join', 'end', 'left', 'publish', 'unpublish', 'delete'); |
@@ -310,7 +308,7 @@ discard block |
||
| 310 | 308 | * |
| 311 | 309 | * @global object |
| 312 | 310 | * @param object $coursemodule |
| 313 | - * @return object|null |
|
| 311 | + * @return null|cached_cm_info |
|
| 314 | 312 | */ |
| 315 | 313 | function bigbluebuttonbn_get_coursemodule_info($coursemodule) { |
| 316 | 314 | global $CFG, $DB; |
@@ -502,7 +500,7 @@ discard block |
||
| 502 | 500 | * @param array $args extra arguments |
| 503 | 501 | * @param bool $forcedownload whether or not force download |
| 504 | 502 | * @param array $options additional options affecting the file serving |
| 505 | - * @return bool false if file not found, does not return if found - justsend the file |
|
| 503 | + * @return false|null false if file not found, does not return if found - justsend the file |
|
| 506 | 504 | */ |
| 507 | 505 | function bigbluebuttonbn_pluginfile($course, $cm, $context, $filearea, $args, $forcedownload, array $options=array()) { |
| 508 | 506 | global $CFG, $DB; |
@@ -189,6 +189,9 @@ discard block |
||
| 189 | 189 | return $xml; |
| 190 | 190 | } |
| 191 | 191 | |
| 192 | +/** |
|
| 193 | + * @param string $meetingID |
|
| 194 | + */ |
|
| 192 | 195 | function bigbluebuttonbn_getMeetingInfoArray( $meetingID, $modPW, $URL, $SALT ) { |
| 193 | 196 | $xml = bigbluebuttonbn_wrap_xml_load_file( bigbluebuttonbn_getMeetingInfoURL( $meetingID, $modPW, $URL, $SALT ) ); |
| 194 | 197 | |
@@ -206,6 +209,9 @@ discard block |
||
| 206 | 209 | } |
| 207 | 210 | } |
| 208 | 211 | |
| 212 | +/** |
|
| 213 | + * @param string $meetingIDs |
|
| 214 | + */ |
|
| 209 | 215 | function bigbluebuttonbn_getRecordingsArray( $meetingIDs, $URL, $SALT ) { |
| 210 | 216 | $recordings = array(); |
| 211 | 217 | |
@@ -287,6 +293,10 @@ discard block |
||
| 287 | 293 | else return 1; |
| 288 | 294 | } |
| 289 | 295 | |
| 296 | +/** |
|
| 297 | + * @param string $URL |
|
| 298 | + * @param string $SALT |
|
| 299 | + */ |
|
| 290 | 300 | function bigbluebuttonbn_doDeleteRecordings( $recordIDs, $URL, $SALT ) { |
| 291 | 301 | $ids = explode(",", $recordIDs); |
| 292 | 302 | foreach( $ids as $id){ |
@@ -297,6 +307,11 @@ discard block |
||
| 297 | 307 | return true; |
| 298 | 308 | } |
| 299 | 309 | |
| 310 | +/** |
|
| 311 | + * @param string $set |
|
| 312 | + * @param string $URL |
|
| 313 | + * @param string $SALT |
|
| 314 | + */ |
|
| 300 | 315 | function bigbluebuttonbn_doPublishRecordings( $recordIDs, $set, $URL, $SALT ) { |
| 301 | 316 | $ids = explode(",", $recordIDs); |
| 302 | 317 | foreach( $ids as $id){ |
@@ -307,6 +322,10 @@ discard block |
||
| 307 | 322 | return true; |
| 308 | 323 | } |
| 309 | 324 | |
| 325 | +/** |
|
| 326 | + * @param string $URL |
|
| 327 | + * @param string $SALT |
|
| 328 | + */ |
|
| 310 | 329 | function bigbluebuttonbn_doEndMeeting( $meetingID, $modPW, $URL, $SALT ) { |
| 311 | 330 | $xml = bigbluebuttonbn_wrap_xml_load_file( bigbluebuttonbn_getEndMeetingURL( $meetingID, $modPW, $URL, $SALT ) ); |
| 312 | 331 | |
@@ -328,6 +347,9 @@ discard block |
||
| 328 | 347 | } |
| 329 | 348 | |
| 330 | 349 | |
| 350 | +/** |
|
| 351 | + * @param string $URL |
|
| 352 | + */ |
|
| 331 | 353 | function bigbluebuttonbn_getServerVersion( $URL ){ |
| 332 | 354 | $xml = bigbluebuttonbn_wrap_xml_load_file( $URL."api" ); |
| 333 | 355 | if ( $xml && $xml->returncode == 'SUCCESS' ) { |
@@ -346,6 +368,9 @@ discard block |
||
| 346 | 368 | } |
| 347 | 369 | } |
| 348 | 370 | |
| 371 | +/** |
|
| 372 | + * @param string $url |
|
| 373 | + */ |
|
| 349 | 374 | function bigbluebuttonbn_wrap_xml_load_file($url, $method=BIGBLUEBUTTONBN_METHOD_GET, $data=null) { |
| 350 | 375 | if ( bigbluebuttonbn_debugdisplay() ) error_log("Request to: ".$url); |
| 351 | 376 | |
@@ -781,6 +806,9 @@ discard block |
||
| 781 | 806 | $cache = cache::make_from_params(cache_store::MODE_APPLICATION, 'mod_bigbluebuttonbn', 'meetings_cache'); |
| 782 | 807 | } |
| 783 | 808 | |
| 809 | +/** |
|
| 810 | + * @param boolean $is_moderator |
|
| 811 | + */ |
|
| 784 | 812 | function bigbluebuttonbn_bbb_broker_participant_joined($meetingid, $is_moderator) { |
| 785 | 813 | $cache = cache::make_from_params(cache_store::MODE_APPLICATION, 'mod_bigbluebuttonbn', 'meetings_cache'); |
| 786 | 814 | $result = $cache->get($meetingid); |
@@ -1365,6 +1393,9 @@ discard block |
||
| 1365 | 1393 | return (isset($BIGBLUEBUTTONBN_CFG->bigbluebuttonbn_recordingready_enabled)? $BIGBLUEBUTTONBN_CFG->bigbluebuttonbn_recordingready_enabled: (isset($CFG->bigbluebuttonbn_recordingready_enabled)? $CFG->bigbluebuttonbn_recordingready_enabled: false)); |
| 1366 | 1394 | } |
| 1367 | 1395 | |
| 1396 | +/** |
|
| 1397 | + * @return string |
|
| 1398 | + */ |
|
| 1368 | 1399 | function bigbluebuttonbn_get_cfg_moderator_default() { |
| 1369 | 1400 | global $BIGBLUEBUTTONBN_CFG, $CFG; |
| 1370 | 1401 | return (isset($BIGBLUEBUTTONBN_CFG->bigbluebuttonbn_moderator_default)? $BIGBLUEBUTTONBN_CFG->bigbluebuttonbn_moderator_default: (isset($CFG->bigbluebuttonbn_moderator_default)? $CFG->bigbluebuttonbn_moderator_default: 'owner')); |