@@ -35,8 +35,8 @@ discard block |
||
| 35 | 35 | $CFG->bigbluebuttonbn = array(); |
| 36 | 36 | } |
| 37 | 37 | |
| 38 | - if (file_exists(dirname(__FILE__).'/config.php')) { |
|
| 39 | - require_once(dirname(__FILE__).'/config.php'); |
|
| 38 | + if (file_exists(dirname(__FILE__) . '/config.php')) { |
|
| 39 | + require_once(dirname(__FILE__) . '/config.php'); |
|
| 40 | 40 | } |
| 41 | 41 | |
| 42 | 42 | /* |
@@ -94,19 +94,19 @@ discard block |
||
| 94 | 94 | return null; |
| 95 | 95 | } |
| 96 | 96 | $features = array( |
| 97 | - (string) FEATURE_IDNUMBER => true, |
|
| 98 | - (string) FEATURE_GROUPS => true, |
|
| 99 | - (string) FEATURE_GROUPINGS => true, |
|
| 100 | - (string) FEATURE_GROUPMEMBERSONLY => true, |
|
| 101 | - (string) FEATURE_MOD_INTRO => true, |
|
| 102 | - (string) FEATURE_BACKUP_MOODLE2 => true, |
|
| 103 | - (string) FEATURE_COMPLETION_TRACKS_VIEWS => true, |
|
| 104 | - (string) FEATURE_COMPLETION_HAS_RULES => true, |
|
| 105 | - (string) FEATURE_GRADE_HAS_GRADE => false, |
|
| 106 | - (string) FEATURE_GRADE_OUTCOMES => false, |
|
| 107 | - (string) FEATURE_SHOW_DESCRIPTION => true, |
|
| 97 | + (string)FEATURE_IDNUMBER => true, |
|
| 98 | + (string)FEATURE_GROUPS => true, |
|
| 99 | + (string)FEATURE_GROUPINGS => true, |
|
| 100 | + (string)FEATURE_GROUPMEMBERSONLY => true, |
|
| 101 | + (string)FEATURE_MOD_INTRO => true, |
|
| 102 | + (string)FEATURE_BACKUP_MOODLE2 => true, |
|
| 103 | + (string)FEATURE_COMPLETION_TRACKS_VIEWS => true, |
|
| 104 | + (string)FEATURE_COMPLETION_HAS_RULES => true, |
|
| 105 | + (string)FEATURE_GRADE_HAS_GRADE => false, |
|
| 106 | + (string)FEATURE_GRADE_OUTCOMES => false, |
|
| 107 | + (string)FEATURE_SHOW_DESCRIPTION => true, |
|
| 108 | 108 | ); |
| 109 | - if (isset($features[(string) $feature])) { |
|
| 109 | + if (isset($features[(string)$feature])) { |
|
| 110 | 110 | return $features[$feature]; |
| 111 | 111 | } |
| 112 | 112 | return null; |
@@ -299,7 +299,7 @@ discard block |
||
| 299 | 299 | function bigbluebuttonbn_delete_instance_log($bigbluebuttonbn) { |
| 300 | 300 | global $DB; |
| 301 | 301 | $sql = "SELECT * FROM {bigbluebuttonbn_logs} "; |
| 302 | - $sql .= "WHERE bigbluebuttonbnid = ? AND log = ? AND ". $DB->sql_compare_text('meta') . " = ?"; |
|
| 302 | + $sql .= "WHERE bigbluebuttonbnid = ? AND log = ? AND " . $DB->sql_compare_text('meta') . " = ?"; |
|
| 303 | 303 | $logs = $DB->get_records_sql($sql, array($bigbluebuttonbn->id, BIGBLUEBUTTONBN_LOG_EVENT_CREATE, "{\"record\":true}")); |
| 304 | 304 | $meta = "{\"has_recordings\":" . empty($logs) ? "true" : "false" . "}"; |
| 305 | 305 | bigbluebuttonbn_log($bigbluebuttonbn, BIGBLUEBUTTONBN_LOG_EVENT_DELETE, [], $meta); |
@@ -320,7 +320,7 @@ discard block |
||
| 320 | 320 | function bigbluebuttonbn_user_outline($course, $user, $mod, $bigbluebuttonbn) { |
| 321 | 321 | if ($completed = bigbluebuttonbn_user_complete($course, $user, $bigbluebuttonbn)) { |
| 322 | 322 | return fullname($user) . ' ' . get_string('view_message_has_joined', 'bigbluebuttonbn') . ' ' . |
| 323 | - get_string('view_message_session_for', 'bigbluebuttonbn') . ' ' . (string) $completed . ' ' . |
|
| 323 | + get_string('view_message_session_for', 'bigbluebuttonbn') . ' ' . (string)$completed . ' ' . |
|
| 324 | 324 | get_string('view_message_times', 'bigbluebuttonbn'); |
| 325 | 325 | } |
| 326 | 326 | return ''; |
@@ -512,7 +512,7 @@ discard block |
||
| 512 | 512 | * @return array status array |
| 513 | 513 | */ |
| 514 | 514 | function bigbluebuttonbn_reset_recordings($courseid) { |
| 515 | - require_once(__DIR__.'/locallib.php'); |
|
| 515 | + require_once(__DIR__ . '/locallib.php'); |
|
| 516 | 516 | // Criteria for search [courseid | bigbluebuttonbn=null | subset=false | includedeleted=true]. |
| 517 | 517 | $recordings = bigbluebuttonbn_get_recordings($courseid, null, false, true); |
| 518 | 518 | // Remove all the recordings. |
@@ -581,18 +581,18 @@ discard block |
||
| 581 | 581 | if ($bigbluebuttonbn->visible) { |
| 582 | 582 | $classes = 'class="dimmed" '; |
| 583 | 583 | } |
| 584 | - $str = '<div class="bigbluebuttonbn overview">'."\n"; |
|
| 585 | - $str .= ' <div class="name">'.get_string('modulename', 'bigbluebuttonbn').': '."\n"; |
|
| 586 | - $str .= ' <a '.$classes.'href="'.$CFG->wwwroot.'/mod/bigbluebuttonbn/view.php?id='.$bigbluebuttonbn->coursemodule. |
|
| 587 | - '">'.$bigbluebuttonbn->name.'</a>'."\n"; |
|
| 588 | - $str .= ' </div>'."\n"; |
|
| 589 | - $str .= ' <div class="info">'.get_string($start, 'bigbluebuttonbn').': '.userdate($bigbluebuttonbn->openingtime). |
|
| 590 | - '</div>'."\n"; |
|
| 584 | + $str = '<div class="bigbluebuttonbn overview">' . "\n"; |
|
| 585 | + $str .= ' <div class="name">' . get_string('modulename', 'bigbluebuttonbn') . ': ' . "\n"; |
|
| 586 | + $str .= ' <a ' . $classes . 'href="' . $CFG->wwwroot . '/mod/bigbluebuttonbn/view.php?id=' . $bigbluebuttonbn->coursemodule . |
|
| 587 | + '">' . $bigbluebuttonbn->name . '</a>' . "\n"; |
|
| 588 | + $str .= ' </div>' . "\n"; |
|
| 589 | + $str .= ' <div class="info">' . get_string($start, 'bigbluebuttonbn') . ': ' . userdate($bigbluebuttonbn->openingtime) . |
|
| 590 | + '</div>' . "\n"; |
|
| 591 | 591 | if (!empty($bigbluebuttonbn->closingtime)) { |
| 592 | - $str .= ' <div class="info">'.get_string('ends_at', 'bigbluebuttonbn').': '.userdate($bigbluebuttonbn->closingtime) |
|
| 593 | - .'</div>'."\n"; |
|
| 592 | + $str .= ' <div class="info">' . get_string('ends_at', 'bigbluebuttonbn') . ': ' . userdate($bigbluebuttonbn->closingtime) |
|
| 593 | + .'</div>' . "\n"; |
|
| 594 | 594 | } |
| 595 | - $str .= '</div>'."\n"; |
|
| 595 | + $str .= '</div>' . "\n"; |
|
| 596 | 596 | return $str; |
| 597 | 597 | } |
| 598 | 598 | |
@@ -680,7 +680,7 @@ discard block |
||
| 680 | 680 | * @return void |
| 681 | 681 | **/ |
| 682 | 682 | function bigbluebuttonbn_process_pre_save_instance(&$bigbluebuttonbn) { |
| 683 | - require_once(__DIR__.'/locallib.php'); |
|
| 683 | + require_once(__DIR__ . '/locallib.php'); |
|
| 684 | 684 | $bigbluebuttonbn->timemodified = time(); |
| 685 | 685 | if ((integer)$bigbluebuttonbn->instance == 0) { |
| 686 | 686 | $bigbluebuttonbn->meetingid = 0; |
@@ -813,7 +813,7 @@ discard block |
||
| 813 | 813 | **/ |
| 814 | 814 | function bigbluebuttonbn_process_post_save_event(&$bigbluebuttonbn) { |
| 815 | 815 | global $CFG, $DB; |
| 816 | - require_once($CFG->dirroot.'/calendar/lib.php'); |
|
| 816 | + require_once($CFG->dirroot . '/calendar/lib.php'); |
|
| 817 | 817 | $eventid = $DB->get_field('event', 'id', array('modulename' => 'bigbluebuttonbn', |
| 818 | 818 | 'instance' => $bigbluebuttonbn->id)); |
| 819 | 819 | // Delete the event from calendar when/if openingtime is NOT set. |
@@ -900,7 +900,7 @@ discard block |
||
| 900 | 900 | if (count($files) == 1) { |
| 901 | 901 | // Get the first (and only) file. |
| 902 | 902 | $file = reset($files); |
| 903 | - $filesrc = '/'.$file->get_filename(); |
|
| 903 | + $filesrc = '/' . $file->get_filename(); |
|
| 904 | 904 | } |
| 905 | 905 | return $filesrc; |
| 906 | 906 | } |
@@ -969,7 +969,7 @@ discard block |
||
| 969 | 969 | if (!$filename) { |
| 970 | 970 | return false; |
| 971 | 971 | } |
| 972 | - $fullpath = "/$context->id/mod_bigbluebuttonbn/$filearea/0/".$filename; |
|
| 972 | + $fullpath = "/$context->id/mod_bigbluebuttonbn/$filearea/0/" . $filename; |
|
| 973 | 973 | $fs = get_file_storage(); |
| 974 | 974 | $file = $fs->get_file_by_hash(sha1($fullpath)); |
| 975 | 975 | if (!$file || $file->is_directory()) { |