@@ -28,29 +28,29 @@ discard block |
||
| 28 | 28 | |
| 29 | 29 | global $CFG; |
| 30 | 30 | |
| 31 | -require_once($CFG->dirroot.'/calendar/lib.php'); |
|
| 32 | -require_once($CFG->dirroot.'/message/lib.php'); |
|
| 33 | -require_once($CFG->dirroot.'/mod/lti/OAuth.php'); |
|
| 34 | -require_once($CFG->dirroot.'/tag/lib.php'); |
|
| 35 | -require_once($CFG->libdir.'/accesslib.php'); |
|
| 36 | -require_once($CFG->libdir.'/completionlib.php'); |
|
| 37 | -require_once($CFG->libdir.'/datalib.php'); |
|
| 38 | -require_once($CFG->libdir.'/coursecatlib.php'); |
|
| 39 | -require_once($CFG->libdir.'/enrollib.php'); |
|
| 40 | -require_once($CFG->libdir.'/filelib.php'); |
|
| 41 | -require_once($CFG->libdir.'/formslib.php'); |
|
| 31 | +require_once($CFG->dirroot . '/calendar/lib.php'); |
|
| 32 | +require_once($CFG->dirroot . '/message/lib.php'); |
|
| 33 | +require_once($CFG->dirroot . '/mod/lti/OAuth.php'); |
|
| 34 | +require_once($CFG->dirroot . '/tag/lib.php'); |
|
| 35 | +require_once($CFG->libdir . '/accesslib.php'); |
|
| 36 | +require_once($CFG->libdir . '/completionlib.php'); |
|
| 37 | +require_once($CFG->libdir . '/datalib.php'); |
|
| 38 | +require_once($CFG->libdir . '/coursecatlib.php'); |
|
| 39 | +require_once($CFG->libdir . '/enrollib.php'); |
|
| 40 | +require_once($CFG->libdir . '/filelib.php'); |
|
| 41 | +require_once($CFG->libdir . '/formslib.php'); |
|
| 42 | 42 | |
| 43 | 43 | |
| 44 | -if (file_exists(dirname(__FILE__).'/vendor/firebase/php-jwt/src/JWT.php')) { |
|
| 45 | - require_once(dirname(__FILE__).'/vendor/firebase/php-jwt/src/JWT.php'); |
|
| 44 | +if (file_exists(dirname(__FILE__) . '/vendor/firebase/php-jwt/src/JWT.php')) { |
|
| 45 | + require_once(dirname(__FILE__) . '/vendor/firebase/php-jwt/src/JWT.php'); |
|
| 46 | 46 | } |
| 47 | 47 | |
| 48 | 48 | if (!isset($CFG->bigbluebuttonbn)) { |
| 49 | 49 | $CFG->bigbluebuttonbn = array(); |
| 50 | 50 | } |
| 51 | 51 | |
| 52 | -if (file_exists(dirname(__FILE__).'/config.php')) { |
|
| 53 | - require_once(dirname(__FILE__).'/config.php'); |
|
| 52 | +if (file_exists(dirname(__FILE__) . '/config.php')) { |
|
| 53 | + require_once(dirname(__FILE__) . '/config.php'); |
|
| 54 | 54 | } |
| 55 | 55 | |
| 56 | 56 | /* |
@@ -97,18 +97,18 @@ discard block |
||
| 97 | 97 | return null; |
| 98 | 98 | } |
| 99 | 99 | $features = array( |
| 100 | - (string) FEATURE_IDNUMBER => true, |
|
| 101 | - (string) FEATURE_GROUPS => true, |
|
| 102 | - (string) FEATURE_GROUPINGS => true, |
|
| 103 | - (string) FEATURE_GROUPMEMBERSONLY => true, |
|
| 104 | - (string) FEATURE_MOD_INTRO => true, |
|
| 105 | - (string) FEATURE_BACKUP_MOODLE2 => true, |
|
| 106 | - (string) FEATURE_COMPLETION_TRACKS_VIEWS => true, |
|
| 107 | - (string) FEATURE_GRADE_HAS_GRADE => false, |
|
| 108 | - (string) FEATURE_GRADE_OUTCOMES => false, |
|
| 109 | - (string) FEATURE_SHOW_DESCRIPTION => true, |
|
| 100 | + (string)FEATURE_IDNUMBER => true, |
|
| 101 | + (string)FEATURE_GROUPS => true, |
|
| 102 | + (string)FEATURE_GROUPINGS => true, |
|
| 103 | + (string)FEATURE_GROUPMEMBERSONLY => true, |
|
| 104 | + (string)FEATURE_MOD_INTRO => true, |
|
| 105 | + (string)FEATURE_BACKUP_MOODLE2 => true, |
|
| 106 | + (string)FEATURE_COMPLETION_TRACKS_VIEWS => true, |
|
| 107 | + (string)FEATURE_GRADE_HAS_GRADE => false, |
|
| 108 | + (string)FEATURE_GRADE_OUTCOMES => false, |
|
| 109 | + (string)FEATURE_SHOW_DESCRIPTION => true, |
|
| 110 | 110 | ); |
| 111 | - if (isset($features[(string) $feature])) { |
|
| 111 | + if (isset($features[(string)$feature])) { |
|
| 112 | 112 | return $features[$feature]; |
| 113 | 113 | } |
| 114 | 114 | return null; |
@@ -208,7 +208,7 @@ discard block |
||
| 208 | 208 | $log->timecreated = time(); |
| 209 | 209 | $log->log = BIGBLUEBUTTONBN_LOG_EVENT_DELETE; |
| 210 | 210 | $sql = "SELECT * FROM {bigbluebuttonbn_logs} "; |
| 211 | - $sql .= "WHERE bigbluebuttonbnid = ? AND log = ? AND ". $DB->sql_compare_text('meta') . " = ?"; |
|
| 211 | + $sql .= "WHERE bigbluebuttonbnid = ? AND log = ? AND " . $DB->sql_compare_text('meta') . " = ?"; |
|
| 212 | 212 | $logs = $DB->get_records_sql($sql, array($bigbluebuttonbn->id, BIGBLUEBUTTONBN_LOG_EVENT_CREATE, "{\"record\":true}")); |
| 213 | 213 | $log->meta = "{\"has_recordings\":false}"; |
| 214 | 214 | if (!empty($logs)) { |
@@ -237,10 +237,10 @@ discard block |
||
| 237 | 237 | function bigbluebuttonbn_user_outline($course, $user, $mod, $bigbluebuttonbn) { |
| 238 | 238 | global $DB; |
| 239 | 239 | $completed = $DB->count_records('bigbluebuttonbn_logs', array('courseid' => $course->id, |
| 240 | - 'bigbluebuttonbnid' => $bigbluebuttonbn->id, 'userid' => $user->id, 'log' => 'Join', ), '*'); |
|
| 240 | + 'bigbluebuttonbnid' => $bigbluebuttonbn->id, 'userid' => $user->id, 'log' => 'Join',), '*'); |
|
| 241 | 241 | if ($completed > 0) { |
| 242 | - return fullname($user).' '.get_string('view_message_has_joined', 'bigbluebuttonbn').' '. |
|
| 243 | - get_string('view_message_session_for', 'bigbluebuttonbn').' '.(string) $completed.' '. |
|
| 242 | + return fullname($user) . ' ' . get_string('view_message_has_joined', 'bigbluebuttonbn') . ' ' . |
|
| 243 | + get_string('view_message_session_for', 'bigbluebuttonbn') . ' ' . (string)$completed . ' ' . |
|
| 244 | 244 | get_string('view_message_times', 'bigbluebuttonbn'); |
| 245 | 245 | } |
| 246 | 246 | return ''; |
@@ -260,7 +260,7 @@ discard block |
||
| 260 | 260 | function bigbluebuttonbn_user_complete($course, $user, $mod, $bigbluebuttonbn) { |
| 261 | 261 | global $DB; |
| 262 | 262 | $completed = $DB->count_records('bigbluebuttonbn_logs', array('courseid' => $course->id, |
| 263 | - 'bigbluebuttonbnid' => $bigbluebuttonbn->id, 'userid' => $user->id, 'log' => 'Join', ), |
|
| 263 | + 'bigbluebuttonbnid' => $bigbluebuttonbn->id, 'userid' => $user->id, 'log' => 'Join',), |
|
| 264 | 264 | '*', IGNORE_MULTIPLE); |
| 265 | 265 | return $completed > 0; |
| 266 | 266 | } |
@@ -335,16 +335,16 @@ discard block |
||
| 335 | 335 | if ($bigbluebuttonbn->visible) { |
| 336 | 336 | $classes = 'class="dimmed" '; |
| 337 | 337 | } |
| 338 | - $str = '<div class="bigbluebuttonbn overview">'."\n"; |
|
| 339 | - $str .= ' <div class="name">'.get_string('modulename', 'bigbluebuttonbn').': '."\n"; |
|
| 340 | - $str .= ' <a '.$classes.'href="'.$CFG->wwwroot.'/mod/bigbluebuttonbn/view.php?id='.$bigbluebuttonbn->coursemodule. |
|
| 341 | - '">'.$bigbluebuttonbn->name.'</a>'."\n"; |
|
| 342 | - $str .= ' </div>'."\n"; |
|
| 343 | - $str .= ' <div class="info">'.get_string($start, 'bigbluebuttonbn').': '.userdate($bigbluebuttonbn->openingtime). |
|
| 344 | - '</div>'."\n"; |
|
| 345 | - $str .= ' <div class="info">'.get_string('ends_at', 'bigbluebuttonbn').': '.userdate($bigbluebuttonbn->closingtime) |
|
| 346 | - .'</div>'."\n"; |
|
| 347 | - $str .= '</div>'."\n"; |
|
| 338 | + $str = '<div class="bigbluebuttonbn overview">' . "\n"; |
|
| 339 | + $str .= ' <div class="name">' . get_string('modulename', 'bigbluebuttonbn') . ': ' . "\n"; |
|
| 340 | + $str .= ' <a ' . $classes . 'href="' . $CFG->wwwroot . '/mod/bigbluebuttonbn/view.php?id=' . $bigbluebuttonbn->coursemodule . |
|
| 341 | + '">' . $bigbluebuttonbn->name . '</a>' . "\n"; |
|
| 342 | + $str .= ' </div>' . "\n"; |
|
| 343 | + $str .= ' <div class="info">' . get_string($start, 'bigbluebuttonbn') . ': ' . userdate($bigbluebuttonbn->openingtime) . |
|
| 344 | + '</div>' . "\n"; |
|
| 345 | + $str .= ' <div class="info">' . get_string('ends_at', 'bigbluebuttonbn') . ': ' . userdate($bigbluebuttonbn->closingtime) |
|
| 346 | + .'</div>' . "\n"; |
|
| 347 | + $str .= '</div>' . "\n"; |
|
| 348 | 348 | return $str; |
| 349 | 349 | } |
| 350 | 350 | |
@@ -544,7 +544,7 @@ discard block |
||
| 544 | 544 | if (count($files) == 1) { |
| 545 | 545 | // Get the first (and only) file. |
| 546 | 546 | $file = reset($files); |
| 547 | - $filesrc = '/'.$file->get_filename(); |
|
| 547 | + $filesrc = '/' . $file->get_filename(); |
|
| 548 | 548 | } |
| 549 | 549 | return $filesrc; |
| 550 | 550 | } |
@@ -612,7 +612,7 @@ discard block |
||
| 612 | 612 | if (!$filename) { |
| 613 | 613 | return false; |
| 614 | 614 | } |
| 615 | - $fullpath = "/$context->id/mod_bigbluebuttonbn/$filearea/0/".$filename; |
|
| 615 | + $fullpath = "/$context->id/mod_bigbluebuttonbn/$filearea/0/" . $filename; |
|
| 616 | 616 | $fs = get_file_storage(); |
| 617 | 617 | $file = $fs->get_file_by_hash(sha1($fullpath)); |
| 618 | 618 | if (!$file || $file->is_directory()) { |
@@ -61,7 +61,7 @@ discard block |
||
| 61 | 61 | * Remove this block when restored |
| 62 | 62 | */ |
| 63 | 63 | |
| 64 | - /** @var BIGBLUEBUTTONBN_DEFAULT_SERVER_URL string of default bigbluebutton server url */ |
|
| 64 | + /** @var BIGBLUEBUTTONBN_DEFAULT_SERVER_URL string of default bigbluebutton server url */ |
|
| 65 | 65 | const BIGBLUEBUTTONBN_DEFAULT_SERVER_URL = 'http://test-install.blindsidenetworks.com/bigbluebutton/'; |
| 66 | 66 | /** @var BIGBLUEBUTTONBN_DEFAULT_SHARED_SECRET string of default bigbluebutton server shared secret */ |
| 67 | 67 | const BIGBLUEBUTTONBN_DEFAULT_SHARED_SECRET = '8cd8ef52e8e101574e400365b55e11a6'; |
@@ -350,12 +350,12 @@ discard block |
||
| 350 | 350 | $str = '<div class="bigbluebuttonbn overview">'."\n"; |
| 351 | 351 | $str .= ' <div class="name">'.get_string('modulename', 'bigbluebuttonbn').': '."\n"; |
| 352 | 352 | $str .= ' <a '.$classes.'href="'.$CFG->wwwroot.'/mod/bigbluebuttonbn/view.php?id='.$bigbluebuttonbn->coursemodule. |
| 353 | - '">'.$bigbluebuttonbn->name.'</a>'."\n"; |
|
| 353 | + '">'.$bigbluebuttonbn->name.'</a>'."\n"; |
|
| 354 | 354 | $str .= ' </div>'."\n"; |
| 355 | 355 | $str .= ' <div class="info">'.get_string($start, 'bigbluebuttonbn').': '.userdate($bigbluebuttonbn->openingtime). |
| 356 | 356 | '</div>'."\n"; |
| 357 | 357 | $str .= ' <div class="info">'.get_string('ends_at', 'bigbluebuttonbn').': '.userdate($bigbluebuttonbn->closingtime) |
| 358 | - .'</div>'."\n"; |
|
| 358 | + .'</div>'."\n"; |
|
| 359 | 359 | $str .= '</div>'."\n"; |
| 360 | 360 | return $str; |
| 361 | 361 | } |
@@ -540,7 +540,7 @@ discard block |
||
| 540 | 540 | $bigbluebuttonbn->coursemodule, |
| 541 | 541 | 'bigbluebuttonbn', |
| 542 | 542 | $bigbluebuttonbn->id, $bigbluebuttonbn->completionexpected |
| 543 | - ); |
|
| 543 | + ); |
|
| 544 | 544 | } |
| 545 | 545 | } |
| 546 | 546 | /** |
@@ -748,7 +748,7 @@ discard block |
||
| 748 | 748 | * @return \core_calendar\local\event\entities\action_interface|null |
| 749 | 749 | */ |
| 750 | 750 | function mod_bigbluebuttonbn_core_calendar_provide_event_action(calendar_event $event, |
| 751 | - \core_calendar\action_factory $factory) { |
|
| 751 | + \core_calendar\action_factory $factory) { |
|
| 752 | 752 | $cm = get_fast_modinfo($event->courseid)->instances['bigbluebuttonbn'][$event->instance]; |
| 753 | 753 | |
| 754 | 754 | $completion = new \completion_info($cm->get_course()); |
@@ -109,7 +109,7 @@ |
||
| 109 | 109 | * @since Moodle 3.3 |
| 110 | 110 | */ |
| 111 | 111 | public static function get_bigbluebuttonbns_by_courses_parameters() { |
| 112 | - return new external_function_parameters ( |
|
| 112 | + return new external_function_parameters( |
|
| 113 | 113 | array( |
| 114 | 114 | 'courseids' => new external_multiple_structure( |
| 115 | 115 | new external_value(PARAM_INT, 'Course id'), 'Array of course ids', VALUE_DEFAULT, array() |