@@ -13,23 +13,23 @@ discard block |
||
| 13 | 13 | |
| 14 | 14 | global $BIGBLUEBUTTONBN_CFG, $CFG; |
| 15 | 15 | |
| 16 | -require_once($CFG->dirroot.'/calendar/lib.php'); |
|
| 17 | -require_once($CFG->dirroot.'/message/lib.php'); |
|
| 18 | -require_once($CFG->dirroot.'/mod/lti/OAuth.php'); |
|
| 19 | -require_once($CFG->libdir.'/accesslib.php'); |
|
| 20 | -require_once($CFG->libdir.'/completionlib.php'); |
|
| 21 | -require_once($CFG->libdir.'/datalib.php'); |
|
| 22 | -require_once($CFG->libdir.'/coursecatlib.php'); |
|
| 23 | -require_once($CFG->libdir.'/enrollib.php'); |
|
| 24 | -require_once($CFG->libdir.'/filelib.php'); |
|
| 25 | -require_once($CFG->libdir.'/formslib.php'); |
|
| 26 | - |
|
| 27 | -require_once(dirname(__FILE__).'/JWT.php'); |
|
| 28 | - |
|
| 29 | -if( file_exists(dirname(__FILE__).'/config.php') ) { |
|
| 30 | - require_once(dirname(__FILE__).'/config.php'); |
|
| 31 | - if( isset($BIGBLUEBUTTONBN_CFG) ) { |
|
| 32 | - $CFG = (object) array_merge((array)$CFG, (array)$BIGBLUEBUTTONBN_CFG); |
|
| 16 | +require_once($CFG->dirroot . '/calendar/lib.php'); |
|
| 17 | +require_once($CFG->dirroot . '/message/lib.php'); |
|
| 18 | +require_once($CFG->dirroot . '/mod/lti/OAuth.php'); |
|
| 19 | +require_once($CFG->libdir . '/accesslib.php'); |
|
| 20 | +require_once($CFG->libdir . '/completionlib.php'); |
|
| 21 | +require_once($CFG->libdir . '/datalib.php'); |
|
| 22 | +require_once($CFG->libdir . '/coursecatlib.php'); |
|
| 23 | +require_once($CFG->libdir . '/enrollib.php'); |
|
| 24 | +require_once($CFG->libdir . '/filelib.php'); |
|
| 25 | +require_once($CFG->libdir . '/formslib.php'); |
|
| 26 | + |
|
| 27 | +require_once(dirname(__FILE__) . '/JWT.php'); |
|
| 28 | + |
|
| 29 | +if (file_exists(dirname(__FILE__) . '/config.php')) { |
|
| 30 | + require_once(dirname(__FILE__) . '/config.php'); |
|
| 31 | + if (isset($BIGBLUEBUTTONBN_CFG)) { |
|
| 32 | + $CFG = (object)array_merge((array)$CFG, (array)$BIGBLUEBUTTONBN_CFG); |
|
| 33 | 33 | } |
| 34 | 34 | } else { |
| 35 | 35 | $BIGBLUEBUTTONBN_CFG = new stdClass(); |
@@ -50,7 +50,7 @@ discard block |
||
| 50 | 50 | const BIGBLUEBUTTONBN_LOG_EVENT_DELETE = "Delete"; |
| 51 | 51 | |
| 52 | 52 | function bigbluebuttonbn_supports($feature) { |
| 53 | - switch($feature) { |
|
| 53 | + switch ($feature) { |
|
| 54 | 54 | case FEATURE_IDNUMBER: return true; |
| 55 | 55 | case FEATURE_GROUPS: return true; |
| 56 | 56 | case FEATURE_GROUPINGS: return true; |
@@ -79,7 +79,7 @@ discard block |
||
| 79 | 79 | function bigbluebuttonbn_add_instance($data, $mform) { |
| 80 | 80 | global $DB, $CFG; |
| 81 | 81 | |
| 82 | - $draftitemid = isset($data->presentation)? $data->presentation: null; |
|
| 82 | + $draftitemid = isset($data->presentation) ? $data->presentation : null; |
|
| 83 | 83 | $context = bigbluebuttonbn_get_context_module($data->coursemodule); |
| 84 | 84 | |
| 85 | 85 | bigbluebuttonbn_process_pre_save($data); |
@@ -107,7 +107,7 @@ discard block |
||
| 107 | 107 | global $DB, $CFG; |
| 108 | 108 | |
| 109 | 109 | $data->id = $data->instance; |
| 110 | - $draftitemid = isset($data->presentation)? $data->presentation: null; |
|
| 110 | + $draftitemid = isset($data->presentation) ? $data->presentation : null; |
|
| 111 | 111 | $context = bigbluebuttonbn_get_context_module($data->coursemodule); |
| 112 | 112 | |
| 113 | 113 | bigbluebuttonbn_process_pre_save($data); |
@@ -133,7 +133,7 @@ discard block |
||
| 133 | 133 | function bigbluebuttonbn_delete_instance($id) { |
| 134 | 134 | global $CFG, $DB, $USER; |
| 135 | 135 | |
| 136 | - if (! $bigbluebuttonbn = $DB->get_record('bigbluebuttonbn', array('id' => $id))) { |
|
| 136 | + if (!$bigbluebuttonbn = $DB->get_record('bigbluebuttonbn', array('id' => $id))) { |
|
| 137 | 137 | return false; |
| 138 | 138 | } |
| 139 | 139 | |
@@ -151,11 +151,11 @@ discard block |
||
| 151 | 151 | //if( bigbluebuttonbn_isMeetingRunning($meetingID, $url, $shared_secret) ) |
| 152 | 152 | // $getArray = bigbluebuttonbn_doEndMeeting( $meetingID, $modPW, $url, $shared_secret ); |
| 153 | 153 | |
| 154 | - if (! $DB->delete_records('bigbluebuttonbn', array('id' => $bigbluebuttonbn->id))) { |
|
| 154 | + if (!$DB->delete_records('bigbluebuttonbn', array('id' => $bigbluebuttonbn->id))) { |
|
| 155 | 155 | $result = false; |
| 156 | 156 | } |
| 157 | 157 | |
| 158 | - if (! $DB->delete_records('event', array('modulename'=>'bigbluebuttonbn', 'instance'=>$bigbluebuttonbn->id))) { |
|
| 158 | + if (!$DB->delete_records('event', array('modulename'=>'bigbluebuttonbn', 'instance'=>$bigbluebuttonbn->id))) { |
|
| 159 | 159 | $result = false; |
| 160 | 160 | } |
| 161 | 161 | |
@@ -171,19 +171,19 @@ discard block |
||
| 171 | 171 | $logs = $DB->get_records('bigbluebuttonbn_logs', array('bigbluebuttonbnid' => $bigbluebuttonbn->id, 'log' => BIGBLUEBUTTONBN_LOG_EVENT_CREATE)); |
| 172 | 172 | error_log(json_encode($logs)); |
| 173 | 173 | $has_recordings = 'false'; |
| 174 | - if (! empty($logs) ) { |
|
| 174 | + if (!empty($logs)) { |
|
| 175 | 175 | error_log("IS not empty"); |
| 176 | - foreach ( $logs as $l ) { |
|
| 176 | + foreach ($logs as $l) { |
|
| 177 | 177 | error_log(json_encode($l)); |
| 178 | 178 | $meta = json_decode($l->meta); |
| 179 | - if ( $meta->record ) { |
|
| 179 | + if ($meta->record) { |
|
| 180 | 180 | $has_recordings = 'true'; |
| 181 | 181 | } |
| 182 | 182 | } |
| 183 | 183 | } |
| 184 | 184 | $log->meta = "{\"has_recordings\":{$has_recordings}}"; |
| 185 | 185 | |
| 186 | - if (! $returnid = $DB->insert_record('bigbluebuttonbn_logs', $log)) { |
|
| 186 | + if (!$returnid = $DB->insert_record('bigbluebuttonbn_logs', $log)) { |
|
| 187 | 187 | $result = false; |
| 188 | 188 | } |
| 189 | 189 | |
@@ -221,7 +221,7 @@ discard block |
||
| 221 | 221 | * @return boolean |
| 222 | 222 | */ |
| 223 | 223 | function bigbluebuttonbn_print_recent_activity($course, $isteacher, $timestart) { |
| 224 | - return false; // True if anything was printed, otherwise false |
|
| 224 | + return false; // True if anything was printed, otherwise false |
|
| 225 | 225 | } |
| 226 | 226 | |
| 227 | 227 | /** |
@@ -236,7 +236,7 @@ discard block |
||
| 236 | 236 | * @param int $groupid defaults to 0 |
| 237 | 237 | * @return void adds items into $activities and increases $index |
| 238 | 238 | */ |
| 239 | -function bigbluebuttonbn_get_recent_mod_activity(&$activities, &$index, $timestart, $courseid, $cmid, $userid=0, $groupid=0) { |
|
| 239 | +function bigbluebuttonbn_get_recent_mod_activity(&$activities, &$index, $timestart, $courseid, $cmid, $userid = 0, $groupid = 0) { |
|
| 240 | 240 | } |
| 241 | 241 | |
| 242 | 242 | /** |
@@ -254,7 +254,7 @@ discard block |
||
| 254 | 254 | * |
| 255 | 255 | * @return boolean |
| 256 | 256 | **/ |
| 257 | -function bigbluebuttonbn_cron () { |
|
| 257 | +function bigbluebuttonbn_cron() { |
|
| 258 | 258 | return true; |
| 259 | 259 | } |
| 260 | 260 | |
@@ -356,15 +356,15 @@ discard block |
||
| 356 | 356 | } |
| 357 | 357 | |
| 358 | 358 | $strbigbluebuttonbn = get_string('modulename', 'bigbluebuttonbn'); |
| 359 | - $strnextsession = get_string('nextsession', 'bigbluebuttonbn'); |
|
| 359 | + $strnextsession = get_string('nextsession', 'bigbluebuttonbn'); |
|
| 360 | 360 | |
| 361 | 361 | foreach ($bigbluebuttonbns as $bigbluebuttonbn) { |
| 362 | 362 | if ($bigbluebuttonbn->openingtime and $bigbluebuttonbn->closingtime) { // A bigbluebuttonbn is scheduled. |
| 363 | - $str = '<div class="bigbluebuttonbn overview"><div class="name">'. |
|
| 364 | - $strbigbluebuttonbn.': <a '.($bigbluebuttonbn->visible ? '' : ' class="dimmed"'). |
|
| 365 | - ' href="'.$CFG->wwwroot.'/mod/bigbluebuttonbn/view.php?id='.$bigbluebuttonbn->coursemodule.'">'. |
|
| 366 | - $bigbluebuttonbn->name.'</a></div>'; |
|
| 367 | - $str .= '<div class="info">'.$strnextsession.': '.userdate($bigbluebuttonbn->openingtime).'</div></div>'; |
|
| 363 | + $str = '<div class="bigbluebuttonbn overview"><div class="name">' . |
|
| 364 | + $strbigbluebuttonbn . ': <a ' . ($bigbluebuttonbn->visible ? '' : ' class="dimmed"') . |
|
| 365 | + ' href="' . $CFG->wwwroot . '/mod/bigbluebuttonbn/view.php?id=' . $bigbluebuttonbn->coursemodule . '">' . |
|
| 366 | + $bigbluebuttonbn->name . '</a></div>'; |
|
| 367 | + $str .= '<div class="info">' . $strnextsession . ': ' . userdate($bigbluebuttonbn->openingtime) . '</div></div>'; |
|
| 368 | 368 | |
| 369 | 369 | if (empty($htmlarray[$bigbluebuttonbn->course]['bigbluebuttonbn'])) { |
| 370 | 370 | $htmlarray[$bigbluebuttonbn->course]['bigbluebuttonbn'] = $str; |
@@ -389,7 +389,7 @@ discard block |
||
| 389 | 389 | function bigbluebuttonbn_get_coursemodule_info($coursemodule) { |
| 390 | 390 | global $CFG, $DB; |
| 391 | 391 | |
| 392 | - if ( !$bigbluebuttonbn = $DB->get_record('bigbluebuttonbn', array('id'=>$coursemodule->instance), 'id, name, intro, introformat, newwindow')) { |
|
| 392 | + if (!$bigbluebuttonbn = $DB->get_record('bigbluebuttonbn', array('id'=>$coursemodule->instance), 'id, name, intro, introformat, newwindow')) { |
|
| 393 | 393 | return NULL; |
| 394 | 394 | } |
| 395 | 395 | |
@@ -415,10 +415,10 @@ discard block |
||
| 415 | 415 | function bigbluebuttonbn_process_pre_save(&$bigbluebuttonbn) { |
| 416 | 416 | global $DB, $CFG; |
| 417 | 417 | |
| 418 | - if ( !isset($bigbluebuttonbn->timecreated) || !$bigbluebuttonbn->timecreated ) { |
|
| 418 | + if (!isset($bigbluebuttonbn->timecreated) || !$bigbluebuttonbn->timecreated) { |
|
| 419 | 419 | $bigbluebuttonbn->timecreated = time(); |
| 420 | 420 | //Assign password only if it is a new activity |
| 421 | - if( isset($bigbluebuttonbn->add) && !empty($bigbluebuttonbn->add) ) { |
|
| 421 | + if (isset($bigbluebuttonbn->add) && !empty($bigbluebuttonbn->add)) { |
|
| 422 | 422 | $bigbluebuttonbn->moderatorpass = bigbluebuttonbn_random_password(12); |
| 423 | 423 | $bigbluebuttonbn->viewerpass = bigbluebuttonbn_random_password(12); |
| 424 | 424 | } |
@@ -427,13 +427,13 @@ discard block |
||
| 427 | 427 | $bigbluebuttonbn->timemodified = time(); |
| 428 | 428 | } |
| 429 | 429 | |
| 430 | - if (! isset($bigbluebuttonbn->newwindow)) |
|
| 430 | + if (!isset($bigbluebuttonbn->newwindow)) |
|
| 431 | 431 | $bigbluebuttonbn->newwindow = 0; |
| 432 | - if (! isset($bigbluebuttonbn->wait)) |
|
| 432 | + if (!isset($bigbluebuttonbn->wait)) |
|
| 433 | 433 | $bigbluebuttonbn->wait = 0; |
| 434 | - if (! isset($bigbluebuttonbn->record)) |
|
| 434 | + if (!isset($bigbluebuttonbn->record)) |
|
| 435 | 435 | $bigbluebuttonbn->record = 0; |
| 436 | - if (! isset($bigbluebuttonbn->tagging)) |
|
| 436 | + if (!isset($bigbluebuttonbn->tagging)) |
|
| 437 | 437 | $bigbluebuttonbn->tagging = 0; |
| 438 | 438 | |
| 439 | 439 | $bigbluebuttonbn->participants = htmlspecialchars_decode($bigbluebuttonbn->participants); |
@@ -452,8 +452,8 @@ discard block |
||
| 452 | 452 | |
| 453 | 453 | // Now that an id was assigned, generate and set the meetingid property based on |
| 454 | 454 | // [Moodle Instance + Activity ID + BBB Secret] (but only for new activities) |
| 455 | - if( isset($bigbluebuttonbn->add) && !empty($bigbluebuttonbn->add) ) { |
|
| 456 | - $bigbluebuttonbn_meetingid = sha1($CFG->wwwroot.$bigbluebuttonbn->id.bigbluebuttonbn_get_cfg_shared_secret()); |
|
| 455 | + if (isset($bigbluebuttonbn->add) && !empty($bigbluebuttonbn->add)) { |
|
| 456 | + $bigbluebuttonbn_meetingid = sha1($CFG->wwwroot . $bigbluebuttonbn->id . bigbluebuttonbn_get_cfg_shared_secret()); |
|
| 457 | 457 | $DB->set_field('bigbluebuttonbn', 'meetingid', $bigbluebuttonbn_meetingid, array('id' => $bigbluebuttonbn->id)); |
| 458 | 458 | $action = get_string('mod_form_field_notification_msg_created', 'bigbluebuttonbn'); |
| 459 | 459 | } else { |
@@ -461,7 +461,7 @@ discard block |
||
| 461 | 461 | } |
| 462 | 462 | |
| 463 | 463 | // Add evento to the calendar when if openingtime is set |
| 464 | - if ( isset($bigbluebuttonbn->openingtime) && $bigbluebuttonbn->openingtime ){ |
|
| 464 | + if (isset($bigbluebuttonbn->openingtime) && $bigbluebuttonbn->openingtime) { |
|
| 465 | 465 | $event = new stdClass(); |
| 466 | 466 | $event->name = $bigbluebuttonbn->name; |
| 467 | 467 | $event->courseid = $bigbluebuttonbn->course; |
@@ -471,13 +471,13 @@ discard block |
||
| 471 | 471 | $event->instance = $bigbluebuttonbn->id; |
| 472 | 472 | $event->timestart = $bigbluebuttonbn->openingtime; |
| 473 | 473 | |
| 474 | - if ( $bigbluebuttonbn->closingtime ){ |
|
| 474 | + if ($bigbluebuttonbn->closingtime) { |
|
| 475 | 475 | $event->durationtime = $bigbluebuttonbn->closingtime - $bigbluebuttonbn->openingtime; |
| 476 | 476 | } else { |
| 477 | 477 | $event->durationtime = 0; |
| 478 | 478 | } |
| 479 | 479 | |
| 480 | - if ( $event->id = $DB->get_field('event', 'id', array('modulename'=>'bigbluebuttonbn', 'instance'=>$bigbluebuttonbn->id)) ) { |
|
| 480 | + if ($event->id = $DB->get_field('event', 'id', array('modulename'=>'bigbluebuttonbn', 'instance'=>$bigbluebuttonbn->id))) { |
|
| 481 | 481 | $calendarevent = calendar_event::load($event->id); |
| 482 | 482 | $calendarevent->update($event); |
| 483 | 483 | } else { |
@@ -488,7 +488,7 @@ discard block |
||
| 488 | 488 | $DB->delete_records('event', array('modulename'=>'bigbluebuttonbn', 'instance'=>$bigbluebuttonbn->id)); |
| 489 | 489 | } |
| 490 | 490 | |
| 491 | - if( isset($bigbluebuttonbn->notification) && $bigbluebuttonbn->notification ) { |
|
| 491 | + if (isset($bigbluebuttonbn->notification) && $bigbluebuttonbn->notification) { |
|
| 492 | 492 | // Prepare message |
| 493 | 493 | $msg = new stdClass(); |
| 494 | 494 | |
@@ -500,7 +500,7 @@ discard block |
||
| 500 | 500 | /// Add the meeting details to the message_body |
| 501 | 501 | $msg->action = ucfirst($action); |
| 502 | 502 | $msg->activity_description = ""; |
| 503 | - if( !empty($bigbluebuttonbn->intro) ) |
|
| 503 | + if (!empty($bigbluebuttonbn->intro)) |
|
| 504 | 504 | $msg->activity_description = trim($bigbluebuttonbn->intro); |
| 505 | 505 | $msg->activity_openingtime = ""; |
| 506 | 506 | if ($bigbluebuttonbn->openingtime) { |
@@ -510,7 +510,7 @@ discard block |
||
| 510 | 510 | $msg->activity_openingtime = get_string('email_date', 'bigbluebuttonbn', $date); |
| 511 | 511 | } |
| 512 | 512 | $msg->activity_closingtime = ""; |
| 513 | - if ($bigbluebuttonbn->closingtime ) { |
|
| 513 | + if ($bigbluebuttonbn->closingtime) { |
|
| 514 | 514 | $date = new stdClass(); |
| 515 | 515 | $date->day = calendar_day_representation($bigbluebuttonbn->closingtime); |
| 516 | 516 | $date->time = calendar_time_representation($bigbluebuttonbn->closingtime); |
@@ -569,7 +569,7 @@ discard block |
||
| 569 | 569 | * @param array $options additional options affecting the file serving |
| 570 | 570 | * @return bool false if file not found, does not return if found - justsend the file |
| 571 | 571 | */ |
| 572 | -function bigbluebuttonbn_pluginfile($course, $cm, $context, $filearea, $args, $forcedownload, array $options=array()) { |
|
| 572 | +function bigbluebuttonbn_pluginfile($course, $cm, $context, $filearea, $args, $forcedownload, array $options = array()) { |
|
| 573 | 573 | global $CFG, $DB; |
| 574 | 574 | |
| 575 | 575 | if ($context->contextlevel != CONTEXT_MODULE) { |
@@ -585,21 +585,21 @@ discard block |
||
| 585 | 585 | return false; |
| 586 | 586 | } |
| 587 | 587 | |
| 588 | - if( sizeof($args) > 1 ) { |
|
| 588 | + if (sizeof($args) > 1) { |
|
| 589 | 589 | $cache = cache::make_from_params(cache_store::MODE_APPLICATION, 'mod_bigbluebuttonbn', 'presentation_cache'); |
| 590 | 590 | $presentation_nonce_key = sha1($bigbluebuttonbn->id); |
| 591 | 591 | $presentation_nonce = $cache->get($presentation_nonce_key); |
| 592 | 592 | $presentation_nonce_value = $presentation_nonce['value']; |
| 593 | 593 | $presentation_nonce_counter = $presentation_nonce['counter']; |
| 594 | 594 | |
| 595 | - if( $args["0"] != $presentation_nonce_value ) { |
|
| 595 | + if ($args["0"] != $presentation_nonce_value) { |
|
| 596 | 596 | return false; |
| 597 | 597 | } |
| 598 | 598 | |
| 599 | 599 | //The nonce value is actually used twice because BigBlueButton reads the file two times |
| 600 | 600 | $presentation_nonce_counter += 1; |
| 601 | - if( $presentation_nonce_counter < 2 ) { |
|
| 602 | - $cache->set($presentation_nonce_key, array( "value" => $presentation_nonce_value, "counter" => $presentation_nonce_counter )); |
|
| 601 | + if ($presentation_nonce_counter < 2) { |
|
| 602 | + $cache->set($presentation_nonce_key, array("value" => $presentation_nonce_value, "counter" => $presentation_nonce_counter)); |
|
| 603 | 603 | } else { |
| 604 | 604 | $cache->delete($presentation_nonce_key); |
| 605 | 605 | } |
@@ -617,7 +617,7 @@ discard block |
||
| 617 | 617 | } |
| 618 | 618 | |
| 619 | 619 | if ($filearea === 'presentation') { |
| 620 | - $fullpath = "/$context->id/mod_bigbluebuttonbn/$filearea/0/".$filename; |
|
| 620 | + $fullpath = "/$context->id/mod_bigbluebuttonbn/$filearea/0/" . $filename; |
|
| 621 | 621 | } else { |
| 622 | 622 | return false; |
| 623 | 623 | } |
@@ -651,10 +651,10 @@ discard block |
||
| 651 | 651 | * @package mod_bigbluebuttonbn |
| 652 | 652 | * @return array a list of available roles |
| 653 | 653 | */ |
| 654 | -function bigbluebuttonbn_get_db_moodle_roles($rolename='all') { |
|
| 654 | +function bigbluebuttonbn_get_db_moodle_roles($rolename = 'all') { |
|
| 655 | 655 | global $DB; |
| 656 | 656 | |
| 657 | - if( $rolename != 'all') |
|
| 657 | + if ($rolename != 'all') |
|
| 658 | 658 | $roles = $DB->get_record('role', array('shortname' => $rolename)); |
| 659 | 659 | else |
| 660 | 660 | $roles = $DB->get_records('role', array()); |
@@ -673,22 +673,22 @@ discard block |
||
| 673 | 673 | |
| 674 | 674 | $roles = bigbluebuttonbn_get_db_moodle_roles(); |
| 675 | 675 | $sqluserids = array(); |
| 676 | - foreach($roles as $role){ |
|
| 676 | + foreach ($roles as $role) { |
|
| 677 | 677 | $users = get_role_users($role->id, $context); |
| 678 | - foreach($users as $user) { |
|
| 678 | + foreach ($users as $user) { |
|
| 679 | 679 | array_push($sqluserids, $user->id); |
| 680 | 680 | } |
| 681 | 681 | } |
| 682 | 682 | |
| 683 | 683 | $users_array = array(); |
| 684 | - if( !empty($sqluserids) ) { |
|
| 684 | + if (!empty($sqluserids)) { |
|
| 685 | 685 | $users_array = $DB->get_records_select("user", "id IN (" . implode(', ', $sqluserids) . ") AND deleted = 0"); |
| 686 | 686 | } |
| 687 | 687 | |
| 688 | 688 | return $users_array; |
| 689 | 689 | } |
| 690 | 690 | |
| 691 | -function bigbluebuttonbn_send_notification($sender, $bigbluebuttonbn, $message="") { |
|
| 691 | +function bigbluebuttonbn_send_notification($sender, $bigbluebuttonbn, $message = "") { |
|
| 692 | 692 | global $CFG, $DB; |
| 693 | 693 | |
| 694 | 694 | $context = bigbluebuttonbn_get_context_course($bigbluebuttonbn->course); |
@@ -702,13 +702,13 @@ discard block |
||
| 702 | 702 | $message .= get_string('email_footer', 'bigbluebuttonbn', $msg); |
| 703 | 703 | |
| 704 | 704 | $users = bigbluebuttonbn_get_users($context); |
| 705 | - foreach( $users as $user ) { |
|
| 706 | - if( $user->id != $sender->id ){ |
|
| 705 | + foreach ($users as $user) { |
|
| 706 | + if ($user->id != $sender->id) { |
|
| 707 | 707 | $messageid = message_post_message($sender, $user, $message, FORMAT_HTML); |
| 708 | 708 | if (!empty($messageid)) { |
| 709 | - error_log("Msg to ".$msg->user_name." was sent."); |
|
| 709 | + error_log("Msg to " . $msg->user_name . " was sent."); |
|
| 710 | 710 | } else { |
| 711 | - error_log("Msg to ".$msg->user_name." was NOT sent."); |
|
| 711 | + error_log("Msg to " . $msg->user_name . " was NOT sent."); |
|
| 712 | 712 | } |
| 713 | 713 | } |
| 714 | 714 | } |
@@ -718,7 +718,7 @@ discard block |
||
| 718 | 718 | global $CFG; |
| 719 | 719 | |
| 720 | 720 | $version_major = bigbluebuttonbn_get_moodle_version_major(); |
| 721 | - if ( $version_major < '2013111800' ) { |
|
| 721 | + if ($version_major < '2013111800') { |
|
| 722 | 722 | //This is valid before v2.6 |
| 723 | 723 | $context = get_context_instance(CONTEXT_MODULE, $id); |
| 724 | 724 | } else { |
@@ -733,7 +733,7 @@ discard block |
||
| 733 | 733 | global $CFG; |
| 734 | 734 | |
| 735 | 735 | $version_major = bigbluebuttonbn_get_moodle_version_major(); |
| 736 | - if ( $version_major < '2013111800' ) { |
|
| 736 | + if ($version_major < '2013111800') { |
|
| 737 | 737 | //This is valid before v2.6 |
| 738 | 738 | $context = get_context_instance(CONTEXT_COURSE, $id); |
| 739 | 739 | } else { |
@@ -746,11 +746,11 @@ discard block |
||
| 746 | 746 | |
| 747 | 747 | function bigbluebuttonbn_get_cfg_server_url() { |
| 748 | 748 | global $BIGBLUEBUTTONBN_CFG, $CFG; |
| 749 | - return (isset($BIGBLUEBUTTONBN_CFG->bigbluebuttonbn_server_url)? trim(trim($BIGBLUEBUTTONBN_CFG->bigbluebuttonbn_server_url),'/').'/': (isset($CFG->bigbluebuttonbn_server_url)? trim(trim($CFG->bigbluebuttonbn_server_url),'/').'/': 'http://test-install.blindsidenetworks.com/bigbluebutton/')); |
|
| 749 | + return (isset($BIGBLUEBUTTONBN_CFG->bigbluebuttonbn_server_url) ? trim(trim($BIGBLUEBUTTONBN_CFG->bigbluebuttonbn_server_url), '/') . '/' : (isset($CFG->bigbluebuttonbn_server_url) ? trim(trim($CFG->bigbluebuttonbn_server_url), '/') . '/' : 'http://test-install.blindsidenetworks.com/bigbluebutton/')); |
|
| 750 | 750 | } |
| 751 | 751 | |
| 752 | 752 | function bigbluebuttonbn_get_cfg_shared_secret() { |
| 753 | 753 | global $BIGBLUEBUTTONBN_CFG, $CFG; |
| 754 | - return (isset($BIGBLUEBUTTONBN_CFG->bigbluebuttonbn_shared_secret)? trim($BIGBLUEBUTTONBN_CFG->bigbluebuttonbn_shared_secret): (isset($CFG->bigbluebuttonbn_shared_secret)? trim($CFG->bigbluebuttonbn_shared_secret): '8cd8ef52e8e101574e400365b55e11a6')); |
|
| 754 | + return (isset($BIGBLUEBUTTONBN_CFG->bigbluebuttonbn_shared_secret) ? trim($BIGBLUEBUTTONBN_CFG->bigbluebuttonbn_shared_secret) : (isset($CFG->bigbluebuttonbn_shared_secret) ? trim($CFG->bigbluebuttonbn_shared_secret) : '8cd8ef52e8e101574e400365b55e11a6')); |
|
| 755 | 755 | } |
| 756 | 756 | |