@@ -8,11 +8,11 @@ discard block |
||
| 8 | 8 | * @license http://www.gnu.org/copyleft/gpl.html GNU GPL v2 or later |
| 9 | 9 | */ |
| 10 | 10 | |
| 11 | -require_once(dirname(dirname(dirname(__FILE__))).'/config.php'); |
|
| 12 | -require_once(dirname(__FILE__).'/locallib.php'); |
|
| 11 | +require_once(dirname(dirname(dirname(__FILE__))) . '/config.php'); |
|
| 12 | +require_once(dirname(__FILE__) . '/locallib.php'); |
|
| 13 | 13 | |
| 14 | -$bn = required_param('bn', PARAM_INT); // bigbluebuttonbn instance ID |
|
| 15 | -$tc = optional_param('tc', 0, PARAM_INT); // target course ID |
|
| 14 | +$bn = required_param('bn', PARAM_INT); // bigbluebuttonbn instance ID |
|
| 15 | +$tc = optional_param('tc', 0, PARAM_INT); // target course ID |
|
| 16 | 16 | |
| 17 | 17 | if ($bn) { |
| 18 | 18 | $bigbluebuttonbn = $DB->get_record('bigbluebuttonbn', array('id' => $bn), '*', MUST_EXIST); |
@@ -26,7 +26,7 @@ discard block |
||
| 26 | 26 | |
| 27 | 27 | require_login($course, true, $cm); |
| 28 | 28 | |
| 29 | -if ( isset($SESSION) && isset($SESSION->bigbluebuttonbn_bbbsession)) { |
|
| 29 | +if (isset($SESSION) && isset($SESSION->bigbluebuttonbn_bbbsession)) { |
|
| 30 | 30 | $bbbsession = $SESSION->bigbluebuttonbn_bbbsession; |
| 31 | 31 | } |
| 32 | 32 | |
@@ -47,7 +47,7 @@ discard block |
||
| 47 | 47 | |
| 48 | 48 | $options = bigbluebuttonbn_import_get_courses_for_select($bbbsession); |
| 49 | 49 | $selected = bigbluebuttonbn_selected_course($options, $tc); |
| 50 | -if( empty($options) ) { |
|
| 50 | +if (empty($options)) { |
|
| 51 | 51 | $output .= html_writer::tag('div', get_string('view_error_import_no_courses', 'bigbluebuttonbn')); |
| 52 | 52 | |
| 53 | 53 | } else { |
@@ -58,14 +58,14 @@ discard block |
||
| 58 | 58 | $recordings = bigbluebuttonbn_import_exlcude_recordings_already_imported($bbbsession['course']->id, $bbbsession['bigbluebuttonbn']->id, $recordings); |
| 59 | 59 | //store remaining recordings (indexed) in a session variable |
| 60 | 60 | $SESSION->bigbluebuttonbn_importrecordings = bigbluebuttonbn_index_recordings($recordings); |
| 61 | - if( empty($recordings) ) { |
|
| 61 | + if (empty($recordings)) { |
|
| 62 | 62 | $output .= html_writer::tag('div', get_string('view_error_import_no_recordings', 'bigbluebuttonbn')); |
| 63 | 63 | } else { |
| 64 | - $output .= html_writer::tag('span', '', ['id' => 'import_recording_links_table' ,'name'=>'import_recording_links_table']); |
|
| 64 | + $output .= html_writer::tag('span', '', ['id' => 'import_recording_links_table', 'name'=>'import_recording_links_table']); |
|
| 65 | 65 | $output .= bigbluebutton_output_recording_table($bbbsession, $recordings, ['importing']); |
| 66 | 66 | } |
| 67 | 67 | $output .= html_writer::start_tag('br'); |
| 68 | - $output .= html_writer::tag( 'input', '', array('type' => 'button', 'value' => get_string('view_recording_button_return', 'bigbluebuttonbn'), 'onclick' => 'window.location=\''.$CFG->wwwroot.'/mod/bigbluebuttonbn/view.php?id='.$cm->id.'\'') ); |
|
| 68 | + $output .= html_writer::tag('input', '', array('type' => 'button', 'value' => get_string('view_recording_button_return', 'bigbluebuttonbn'), 'onclick' => 'window.location=\'' . $CFG->wwwroot . '/mod/bigbluebuttonbn/view.php?id=' . $cm->id . '\'')); |
|
| 69 | 69 | |
| 70 | 70 | $jsvars = array( |
| 71 | 71 | 'bn' => $bn, |
@@ -87,10 +87,10 @@ discard block |
||
| 87 | 87 | // finally, render the output |
| 88 | 88 | echo $output; |
| 89 | 89 | |
| 90 | -function bigbluebuttonbn_selected_course($options, $tc='') { |
|
| 91 | - if( empty($options) ) { |
|
| 90 | +function bigbluebuttonbn_selected_course($options, $tc = '') { |
|
| 91 | + if (empty($options)) { |
|
| 92 | 92 | $selected = ''; |
| 93 | - } else if(array_key_exists($tc, $options)) { |
|
| 93 | + } else if (array_key_exists($tc, $options)) { |
|
| 94 | 94 | $selected = $tc; |
| 95 | 95 | } else { |
| 96 | 96 | $selected = ''; |
@@ -54,14 +54,14 @@ |
||
| 54 | 54 | static public function encode_content_links($content) { |
| 55 | 55 | global $CFG; |
| 56 | 56 | |
| 57 | - $base = preg_quote($CFG->wwwroot.'/mod/bigbluebuttonbn','#'); |
|
| 57 | + $base = preg_quote($CFG->wwwroot . '/mod/bigbluebuttonbn', '#'); |
|
| 58 | 58 | |
| 59 | 59 | //Link to the list of bigbluebuttonbns |
| 60 | - $pattern = "#(".$base."\/index.php\?id\=)([0-9]+)#"; |
|
| 60 | + $pattern = "#(" . $base . "\/index.php\?id\=)([0-9]+)#"; |
|
| 61 | 61 | $content = preg_replace($pattern, '$@BIGBLUEBUTTONBNINDEX*$2@$', $content); |
| 62 | 62 | |
| 63 | 63 | //Link to bigbluebuttonbn view by moduleid |
| 64 | - $pattern = "#(".$base."\/view.php\?id\=)([0-9]+)#"; |
|
| 64 | + $pattern = "#(" . $base . "\/view.php\?id\=)([0-9]+)#"; |
|
| 65 | 65 | $content = preg_replace($pattern, '$@BIGBLUEBUTTONBNVIEWBYID*$2@$', $content); |
| 66 | 66 | |
| 67 | 67 | return $content; |
@@ -36,11 +36,11 @@ |
||
| 36 | 36 | |
| 37 | 37 | // Define each element separated |
| 38 | 38 | $bigbluebuttonbn = new backup_nested_element('bigbluebuttonbn', array('id'), array( |
| 39 | - 'course', 'name', 'intro', 'introformat', 'meetingid', |
|
| 40 | - 'moderatorpass', 'viewerpass', 'wait', 'record', 'tagging', |
|
| 41 | - 'welcome', 'voicebridge', 'openingtime', 'closingtime', |
|
| 42 | - 'timecreated', 'timemodified', 'presentation', 'participants', |
|
| 43 | - 'userlimit')); |
|
| 39 | + 'course', 'name', 'intro', 'introformat', 'meetingid', |
|
| 40 | + 'moderatorpass', 'viewerpass', 'wait', 'record', 'tagging', |
|
| 41 | + 'welcome', 'voicebridge', 'openingtime', 'closingtime', |
|
| 42 | + 'timecreated', 'timemodified', 'presentation', 'participants', |
|
| 43 | + 'userlimit')); |
|
| 44 | 44 | |
| 45 | 45 | $logs = new backup_nested_element('logs'); |
| 46 | 46 | |
@@ -38,7 +38,7 @@ |
||
| 38 | 38 | * @return string |
| 39 | 39 | */ |
| 40 | 40 | public function get_description() { |
| 41 | - $a = (object) array('userid' => $this->userid, 'bigbluebuttonbnid' => $this->objectid, 'courseid' => $this->contextinstanceid); |
|
| 41 | + $a = (object)array('userid' => $this->userid, 'bigbluebuttonbnid' => $this->objectid, 'courseid' => $this->contextinstanceid); |
|
| 42 | 42 | return get_string('event_meeting_ended_description', 'bigbluebuttonbn', $a); |
| 43 | 43 | } |
| 44 | 44 | |
@@ -38,8 +38,8 @@ |
||
| 38 | 38 | * @return string |
| 39 | 39 | */ |
| 40 | 40 | public function get_description() { |
| 41 | - $rid = isset($this->other['rid'])? $this->other['rid']: ''; |
|
| 42 | - $a = (object) array('userid' => $this->userid, 'recordingid' => $rid, 'courseid' => $this->contextinstanceid); |
|
| 41 | + $rid = isset($this->other['rid']) ? $this->other['rid'] : ''; |
|
| 42 | + $a = (object)array('userid' => $this->userid, 'recordingid' => $rid, 'courseid' => $this->contextinstanceid); |
|
| 43 | 43 | return get_string('event_recording_published_description', 'bigbluebuttonbn', $a); |
| 44 | 44 | } |
| 45 | 45 | |
@@ -38,8 +38,8 @@ |
||
| 38 | 38 | * @return string |
| 39 | 39 | */ |
| 40 | 40 | public function get_description() { |
| 41 | - $rid = isset($this->other['rid'])? $this->other['rid']: ''; |
|
| 42 | - $a = (object) array('userid' => $this->userid, 'recordingid' => $rid, 'courseid' => $this->contextinstanceid); |
|
| 41 | + $rid = isset($this->other['rid']) ? $this->other['rid'] : ''; |
|
| 42 | + $a = (object)array('userid' => $this->userid, 'recordingid' => $rid, 'courseid' => $this->contextinstanceid); |
|
| 43 | 43 | return get_string('event_recording_published_description', 'bigbluebuttonbn', $a); |
| 44 | 44 | } |
| 45 | 45 | |
@@ -38,7 +38,7 @@ |
||
| 38 | 38 | * @return string |
| 39 | 39 | */ |
| 40 | 40 | public function get_description() { |
| 41 | - $a = (object) array('userid' => $this->userid, 'bigbluebuttonbnid' => $this->objectid, 'courseid' => $this->contextinstanceid); |
|
| 41 | + $a = (object)array('userid' => $this->userid, 'bigbluebuttonbnid' => $this->objectid, 'courseid' => $this->contextinstanceid); |
|
| 42 | 42 | return get_string('event_meeting_ended_description', 'bigbluebuttonbn', $a); |
| 43 | 43 | } |
| 44 | 44 | |
@@ -38,8 +38,8 @@ |
||
| 38 | 38 | * @return string |
| 39 | 39 | */ |
| 40 | 40 | public function get_description() { |
| 41 | - $rid = isset($this->other['rid'])? $this->other['rid']: ''; |
|
| 42 | - $a = (object) array('userid' => $this->userid, 'recordingid' => $rid, 'courseid' => $this->contextinstanceid); |
|
| 41 | + $rid = isset($this->other['rid']) ? $this->other['rid'] : ''; |
|
| 42 | + $a = (object)array('userid' => $this->userid, 'recordingid' => $rid, 'courseid' => $this->contextinstanceid); |
|
| 43 | 43 | return get_string('event_recording_published_description', 'bigbluebuttonbn', $a); |
| 44 | 44 | } |
| 45 | 45 | |
@@ -38,8 +38,8 @@ |
||
| 38 | 38 | * @return string |
| 39 | 39 | */ |
| 40 | 40 | public function get_description() { |
| 41 | - $rid = isset($this->other['rid'])? $this->other['rid']: ''; |
|
| 42 | - $a = (object) array('userid' => $this->userid, 'recordingid' => $rid, 'courseid' => $this->contextinstanceid); |
|
| 41 | + $rid = isset($this->other['rid']) ? $this->other['rid'] : ''; |
|
| 42 | + $a = (object)array('userid' => $this->userid, 'recordingid' => $rid, 'courseid' => $this->contextinstanceid); |
|
| 43 | 43 | return get_string('event_recording_published_description', 'bigbluebuttonbn', $a); |
| 44 | 44 | } |
| 45 | 45 | |