@@ -23,7 +23,7 @@ discard block |
||
| 23 | 23 | |
| 24 | 24 | defined('MOODLE_INTERNAL') || die; |
| 25 | 25 | |
| 26 | -require_once($CFG->dirroot.'/mod/bigbluebuttonbn/backup/moodle2/backup_bigbluebuttonbn_stepslib.php'); |
|
| 26 | +require_once($CFG->dirroot . '/mod/bigbluebuttonbn/backup/moodle2/backup_bigbluebuttonbn_stepslib.php'); |
|
| 27 | 27 | |
| 28 | 28 | /** |
| 29 | 29 | * bigbluebuttonbn backup task that provides all the settings and steps to perform one |
@@ -53,14 +53,14 @@ discard block |
||
| 53 | 53 | public static function encode_content_links($content) { |
| 54 | 54 | global $CFG; |
| 55 | 55 | |
| 56 | - $base = preg_quote($CFG->wwwroot.'/mod/bigbluebuttonbn', '#'); |
|
| 56 | + $base = preg_quote($CFG->wwwroot . '/mod/bigbluebuttonbn', '#'); |
|
| 57 | 57 | |
| 58 | 58 | // Link to the list of bigbluebuttonbns. |
| 59 | - $pattern = '#('.$base."\/index.php\?id\=)([0-9]+)#"; |
|
| 59 | + $pattern = '#(' . $base . "\/index.php\?id\=)([0-9]+)#"; |
|
| 60 | 60 | $content = preg_replace($pattern, '$@BIGBLUEBUTTONBNINDEX*$2@$', $content); |
| 61 | 61 | |
| 62 | 62 | // Link to bigbluebuttonbn view by moduleid. |
| 63 | - $pattern = '#('.$base."\/view.php\?id\=)([0-9]+)#"; |
|
| 63 | + $pattern = '#(' . $base . "\/view.php\?id\=)([0-9]+)#"; |
|
| 64 | 64 | $content = preg_replace($pattern, '$@BIGBLUEBUTTONBNVIEWBYID*$2@$', $content); |
| 65 | 65 | |
| 66 | 66 | return $content; |
@@ -45,7 +45,7 @@ discard block |
||
| 45 | 45 | protected function process_bigbluebuttonbn($data) { |
| 46 | 46 | global $DB; |
| 47 | 47 | |
| 48 | - $data = (object) $data; |
|
| 48 | + $data = (object)$data; |
|
| 49 | 49 | $data->course = $this->get_courseid(); |
| 50 | 50 | |
| 51 | 51 | $data->timemodified = $this->apply_date_offset($data->timemodified); |
@@ -59,7 +59,7 @@ discard block |
||
| 59 | 59 | protected function process_bigbluebuttonbn_logs($data) { |
| 60 | 60 | global $DB; |
| 61 | 61 | |
| 62 | - $data = (object) $data; |
|
| 62 | + $data = (object)$data; |
|
| 63 | 63 | // Apply modifications. |
| 64 | 64 | $data->courseid = $this->get_mappingid('course', $data->courseid); |
| 65 | 65 | $data->bigbluebuttonbnid = $this->get_new_parentid('bigbluebuttonbn'); |
@@ -23,7 +23,7 @@ |
||
| 23 | 23 | |
| 24 | 24 | defined('MOODLE_INTERNAL') || die(); |
| 25 | 25 | |
| 26 | -require_once($CFG->dirroot.'/mod/bigbluebuttonbn/backup/moodle2/restore_bigbluebuttonbn_stepslib.php'); |
|
| 26 | +require_once($CFG->dirroot . '/mod/bigbluebuttonbn/backup/moodle2/restore_bigbluebuttonbn_stepslib.php'); |
|
| 27 | 27 | |
| 28 | 28 | /** |
| 29 | 29 | * bigbluebuttonbn restore task that provides all the settings and steps to perform one |
@@ -40,12 +40,12 @@ |
||
| 40 | 40 | 'moderatorpass', 'viewerpass', 'wait', 'record', 'tagging', |
| 41 | 41 | 'welcome', 'voicebridge', 'openingtime', 'closingtime', |
| 42 | 42 | 'timecreated', 'timemodified', 'presentation', 'participants', |
| 43 | - 'userlimit', )); |
|
| 43 | + 'userlimit',)); |
|
| 44 | 44 | |
| 45 | 45 | $logs = new backup_nested_element('logs'); |
| 46 | 46 | |
| 47 | 47 | $log = new backup_nested_element('log', array('id'), array( |
| 48 | - 'courseid', 'bigbluebuttonbnid', 'userid', 'timecreated', 'meetingid', 'log', 'meta', )); |
|
| 48 | + 'courseid', 'bigbluebuttonbnid', 'userid', 'timecreated', 'meetingid', 'log', 'meta',)); |
|
| 49 | 49 | |
| 50 | 50 | // Build the tree. |
| 51 | 51 | $bigbluebuttonbn->add_child($logs); |
@@ -27,7 +27,7 @@ discard block |
||
| 27 | 27 | |
| 28 | 28 | global $CFG; |
| 29 | 29 | |
| 30 | -require_once(dirname(__FILE__).'/locallib.php'); |
|
| 30 | +require_once(dirname(__FILE__) . '/locallib.php'); |
|
| 31 | 31 | |
| 32 | 32 | if ($ADMIN->fulltree) { |
| 33 | 33 | if (!isset($CFG->bigbluebuttonbn['server_url']) || |
@@ -258,8 +258,8 @@ discard block |
||
| 258 | 258 | } else { |
| 259 | 259 | $settings->add(new admin_setting_heading('bigbluebuttonbn_feature_preuploadpresentation', |
| 260 | 260 | get_string('config_feature_preuploadpresentation', 'bigbluebuttonbn'), |
| 261 | - get_string('config_feature_preuploadpresentation_description', 'bigbluebuttonbn').'<br><br>'. |
|
| 262 | - '<div class="form-defaultinfo">'.get_string('config_warning_curl_not_installed', 'bigbluebuttonbn').'</div><br>' |
|
| 261 | + get_string('config_feature_preuploadpresentation_description', 'bigbluebuttonbn') . '<br><br>' . |
|
| 262 | + '<div class="form-defaultinfo">' . get_string('config_warning_curl_not_installed', 'bigbluebuttonbn') . '</div><br>' |
|
| 263 | 263 | )); |
| 264 | 264 | } |
| 265 | 265 | } |
@@ -94,7 +94,7 @@ discard block |
||
| 94 | 94 | * recordings from a different activity even from a different course. |
| 95 | 95 | **/ |
| 96 | 96 | |
| 97 | - /* |
|
| 97 | + /* |
|
| 98 | 98 | * When the value is set to 1 (checked) the bigbluebuttonbn rooms or |
| 99 | 99 | * activities will have the 'import recordings' capability enabled. |
| 100 | 100 | */ |
@@ -115,7 +115,7 @@ discard block |
||
| 115 | 115 | * 'Join session' button enabled |
| 116 | 116 | **/ |
| 117 | 117 | |
| 118 | - /* |
|
| 118 | + /* |
|
| 119 | 119 | * When the value is set to 1 (checked) the bigbluebuttonbn rooms or |
| 120 | 120 | * activities will have the 'wait for moderator' capability enabled by |
| 121 | 121 | * default. |
@@ -149,7 +149,7 @@ discard block |
||
| 149 | 149 | * 5. CONFIGURATION FOR "STATIC VOICE BRIDGE" FEATURE |
| 150 | 150 | * |
| 151 | 151 | **/ |
| 152 | - /* |
|
| 152 | + /* |
|
| 153 | 153 | * A conference voice bridge number can be permanently assigned to a room |
| 154 | 154 | * or activity. |
| 155 | 155 | */ |
@@ -159,7 +159,7 @@ discard block |
||
| 159 | 159 | * 6. CONFIGURATION FOR "PRE-UPLOAD PRESENTATION" FEATURE |
| 160 | 160 | * |
| 161 | 161 | **/ |
| 162 | - /* |
|
| 162 | + /* |
|
| 163 | 163 | * Since version 0.8, BigBluebutton has an implementation for allowing |
| 164 | 164 | * preuploading presentation. When this feature is enabled, users creating or |
| 165 | 165 | * editing a room or activity can upload a PDF or Office document to the |
@@ -176,7 +176,7 @@ discard block |
||
| 176 | 176 | * applied to each room or activity, or globally. |
| 177 | 177 | **/ |
| 178 | 178 | |
| 179 | - /* |
|
| 179 | + /* |
|
| 180 | 180 | * The number of users allowed in a session by default when a new room or |
| 181 | 181 | * conference is added. If the number is set to 0, no limit is established. |
| 182 | 182 | * $CFG->bigbluebuttonbn['userlimit_default'] = 0; |
@@ -197,7 +197,7 @@ discard block |
||
| 197 | 197 | * By default only the owner is assigned. |
| 198 | 198 | **/ |
| 199 | 199 | |
| 200 | - /* |
|
| 200 | + /* |
|
| 201 | 201 | * The values for this parameter can be 'owner' and/or any of the roles defined in |
| 202 | 202 | * Moodle (including the custom parameters). The value used will be the key for the role. |
| 203 | 203 | * [owner|manager|coursecreator|editingteacher|teacher|student|guest|user|frontpage|ANY_CUSTOM_ROLE] |
@@ -208,7 +208,7 @@ discard block |
||
| 208 | 208 | * 9. CONFIGURATION FOR "NOTIFICATION SENDING" FEATURE |
| 209 | 209 | * |
| 210 | 210 | **/ |
| 211 | - /* |
|
| 211 | + /* |
|
| 212 | 212 | * When the value is set to 1 (checked) the 'notification sending' |
| 213 | 213 | * capability can be used by the user creating or editing the room or |
| 214 | 214 | * activity. |
@@ -222,7 +222,7 @@ discard block |
||
| 222 | 222 | * 10. CONFIGURATION FOR "RECORDING READY" FEATURE |
| 223 | 223 | * |
| 224 | 224 | **/ |
| 225 | - /* |
|
| 225 | + /* |
|
| 226 | 226 | * When the value is set to 1 (checked) the 'notify users when recording ready' |
| 227 | 227 | * capability is enabled, meaning that a message will be sent to all enrolled |
| 228 | 228 | * users in a course when a recording is ready |
@@ -245,7 +245,7 @@ discard block |
||
| 245 | 245 | * 12. GENERAL CONFIGURATION FOR RECORDINGS UI |
| 246 | 246 | * |
| 247 | 247 | **/ |
| 248 | - /* |
|
| 248 | + /* |
|
| 249 | 249 | * When the value is set to 1 (checked) the bigbluebuttonbn resources |
| 250 | 250 | * will show the recodings in an html table by default. |
| 251 | 251 | * $CFG->bigbluebuttonbn['recordings_html_default'] = 0; |
@@ -23,8 +23,8 @@ discard block |
||
| 23 | 23 | * @license http://www.gnu.org/copyleft/gpl.html GNU GPL v2 or later |
| 24 | 24 | */ |
| 25 | 25 | |
| 26 | -require_once(dirname(dirname(dirname(__FILE__))).'/config.php'); |
|
| 27 | -require_once(dirname(__FILE__).'/locallib.php'); |
|
| 26 | +require_once(dirname(dirname(dirname(__FILE__))) . '/config.php'); |
|
| 27 | +require_once(dirname(__FILE__) . '/locallib.php'); |
|
| 28 | 28 | |
| 29 | 29 | $id = required_param('id', PARAM_INT); |
| 30 | 30 | $a = optional_param('a', 0, PARAM_INT); |
@@ -92,12 +92,12 @@ discard block |
||
| 92 | 92 | |
| 93 | 93 | echo get_string('index_ending', 'bigbluebuttonbn'); |
| 94 | 94 | |
| 95 | - $meetingid = $bigbluebuttonbn->meetingid.'-'.$course->id.'-'.$bigbluebuttonbn->id; |
|
| 95 | + $meetingid = $bigbluebuttonbn->meetingid . '-' . $course->id . '-' . $bigbluebuttonbn->id; |
|
| 96 | 96 | if ($g != '0') { |
| 97 | - $meetingid .= '['.$g.']'; |
|
| 97 | + $meetingid .= '[' . $g . ']'; |
|
| 98 | 98 | } |
| 99 | 99 | bigbluebuttonbn_wrap_xml_load_file(bigbluebuttonbn_getEndMeetingURL($meetingid)); |
| 100 | - redirect('index.php?id='.$id); |
|
| 100 | + redirect('index.php?id=' . $id); |
|
| 101 | 101 | } |
| 102 | 102 | } |
| 103 | 103 | |
@@ -114,7 +114,7 @@ discard block |
||
| 114 | 114 | // Add a the data for the bigbluebuttonbn instance. |
| 115 | 115 | $groupobj = null; |
| 116 | 116 | if (groups_get_activity_groupmode($cm) > 0) { |
| 117 | - $groupobj = (object) array('id' => 0, 'name' => get_string('allparticipants')); |
|
| 117 | + $groupobj = (object)array('id' => 0, 'name' => get_string('allparticipants')); |
|
| 118 | 118 | } |
| 119 | 119 | $table->data[] = bigbluebuttonbn_index_display_room($canmoderate, $course, $bigbluebuttonbn, $groupobj); |
| 120 | 120 | |
@@ -135,13 +135,13 @@ discard block |
||
| 135 | 135 | |
| 136 | 136 | // Functions. |
| 137 | 137 | function bigbluebuttonbn_index_display_room($moderator, $course, $bigbluebuttonbn, $groupobj = null) { |
| 138 | - $meetingid = $bigbluebuttonbn->meetingid.'-'.$course->id.'-'.$bigbluebuttonbn->id; |
|
| 138 | + $meetingid = $bigbluebuttonbn->meetingid . '-' . $course->id . '-' . $bigbluebuttonbn->id; |
|
| 139 | 139 | $paramgroup = ''; |
| 140 | 140 | $groupname = ''; |
| 141 | 141 | |
| 142 | 142 | if ($groupobj) { |
| 143 | - $meetingid .= '['.$groupobj->id.']'; |
|
| 144 | - $paramgroup = '&group='.$groupobj->id; |
|
| 143 | + $meetingid .= '[' . $groupobj->id . ']'; |
|
| 144 | + $paramgroup = '&group=' . $groupobj->id; |
|
| 145 | 145 | $groupname = $groupobj->name; |
| 146 | 146 | } |
| 147 | 147 | |
@@ -160,7 +160,7 @@ discard block |
||
| 160 | 160 | } |
| 161 | 161 | |
| 162 | 162 | // Output Users in the meeting. |
| 163 | - $joinurl = '<a href="view.php?id='.$bigbluebuttonbn->coursemodule.$paramgroup.'">'.format_string($bigbluebuttonbn->name).'</a>'; |
|
| 163 | + $joinurl = '<a href="view.php?id=' . $bigbluebuttonbn->coursemodule . $paramgroup . '">' . format_string($bigbluebuttonbn->name) . '</a>'; |
|
| 164 | 164 | $group = $groupname; |
| 165 | 165 | $users = ''; |
| 166 | 166 | $viewerlist = ''; |
@@ -197,7 +197,7 @@ discard block |
||
| 197 | 197 | $attendeecount = 0; |
| 198 | 198 | foreach ($meetinginfo['attendees']->attendee as $attendee) { |
| 199 | 199 | if ($attendee->role == $role) { |
| 200 | - $attendeelist .= ($attendeecount++ > 0 ? ', ' : '').$attendee->fullName; |
|
| 200 | + $attendeelist .= ($attendeecount++ > 0 ? ', ' : '') . $attendee->fullName; |
|
| 201 | 201 | } |
| 202 | 202 | } |
| 203 | 203 | } |
@@ -220,15 +220,15 @@ discard block |
||
| 220 | 220 | $actions = ''; |
| 221 | 221 | |
| 222 | 222 | if ($moderator) { |
| 223 | - $actions .= '<form name="form1" method="post" action="">'.'/n'; |
|
| 224 | - $actions .= ' <INPUT type="hidden" name="id" value="'.$course->id.'">'.'/n'; |
|
| 225 | - $actions .= ' <INPUT type="hidden" name="a" value="'.$bigbluebuttonbn->id.'">'.'/n'; |
|
| 223 | + $actions .= '<form name="form1" method="post" action="">' . '/n'; |
|
| 224 | + $actions .= ' <INPUT type="hidden" name="id" value="' . $course->id . '">' . '/n'; |
|
| 225 | + $actions .= ' <INPUT type="hidden" name="a" value="' . $bigbluebuttonbn->id . '">' . '/n'; |
|
| 226 | 226 | if ($groupobj != null) { |
| 227 | - $actions .= ' <INPUT type="hidden" name="g" value="'.$groupobj->id.'">'.'/n'; |
|
| 227 | + $actions .= ' <INPUT type="hidden" name="g" value="' . $groupobj->id . '">' . '/n'; |
|
| 228 | 228 | } |
| 229 | - $actions .= ' <INPUT type="submit" name="submit" value="end" onclick="return confirm(\''. |
|
| 230 | - get_string('index_confirm_end', 'bigbluebuttonbn').'\')">'.'/n'; |
|
| 231 | - $actions .= '</form>'.'/n'; |
|
| 229 | + $actions .= ' <INPUT type="submit" name="submit" value="end" onclick="return confirm(\'' . |
|
| 230 | + get_string('index_confirm_end', 'bigbluebuttonbn') . '\')">' . '/n'; |
|
| 231 | + $actions .= '</form>' . '/n'; |
|
| 232 | 232 | } |
| 233 | 233 | |
| 234 | 234 | return $actions; |
@@ -36,23 +36,23 @@ discard block |
||
| 36 | 36 | |
| 37 | 37 | // Change welcome, allow null. |
| 38 | 38 | $fielddefinition = array('type' => XMLDB_TYPE_TEXT, |
| 39 | - 'precision' => null, |
|
| 40 | - 'unsigned' => null, |
|
| 41 | - 'notnull' => XMLDB_NOTNULL, |
|
| 42 | - 'sequence' => null, |
|
| 43 | - 'default' => null, |
|
| 44 | - 'previous' => 'type'); |
|
| 39 | + 'precision' => null, |
|
| 40 | + 'unsigned' => null, |
|
| 41 | + 'notnull' => XMLDB_NOTNULL, |
|
| 42 | + 'sequence' => null, |
|
| 43 | + 'default' => null, |
|
| 44 | + 'previous' => 'type'); |
|
| 45 | 45 | xmldb_bigbluebuttonbn_add_change_field($dbman, 'bigbluebuttonbn', 'welcome', |
| 46 | 46 | $fielddefinition); |
| 47 | 47 | |
| 48 | 48 | // Change userid definition in bigbluebuttonbn_log. |
| 49 | 49 | $fielddefinition = array('type' => XMLDB_TYPE_INTEGER, |
| 50 | - 'precision' => '10', |
|
| 51 | - 'unsigned' => null, |
|
| 52 | - 'notnull' => XMLDB_NOTNULL, |
|
| 53 | - 'sequence' => null, |
|
| 54 | - 'default' => null, |
|
| 55 | - 'previous' => 'bigbluebuttonbnid'); |
|
| 50 | + 'precision' => '10', |
|
| 51 | + 'unsigned' => null, |
|
| 52 | + 'notnull' => XMLDB_NOTNULL, |
|
| 53 | + 'sequence' => null, |
|
| 54 | + 'default' => null, |
|
| 55 | + 'previous' => 'bigbluebuttonbnid'); |
|
| 56 | 56 | xmldb_bigbluebuttonbn_add_change_field($dbman, 'bigbluebuttonbn_log', 'userid', |
| 57 | 57 | $fielddefinition); |
| 58 | 58 | |
@@ -78,34 +78,34 @@ discard block |
||
| 78 | 78 | |
| 79 | 79 | // Add field type. |
| 80 | 80 | $fielddefinition = array('type' => XMLDB_TYPE_INTEGER, |
| 81 | - 'precision' => '2', |
|
| 82 | - 'unsigned' => null, |
|
| 83 | - 'notnull' => XMLDB_NOTNULL, |
|
| 84 | - 'sequence' => null, |
|
| 85 | - 'default' => 0, |
|
| 86 | - 'previous' => 'id'); |
|
| 81 | + 'precision' => '2', |
|
| 82 | + 'unsigned' => null, |
|
| 83 | + 'notnull' => XMLDB_NOTNULL, |
|
| 84 | + 'sequence' => null, |
|
| 85 | + 'default' => 0, |
|
| 86 | + 'previous' => 'id'); |
|
| 87 | 87 | xmldb_bigbluebuttonbn_add_change_field($dbman, 'bigbluebuttonbn', 'type', |
| 88 | 88 | $fielddefinition); |
| 89 | 89 | |
| 90 | 90 | // Add field recordings_html. |
| 91 | 91 | $fielddefinition = array('type' => XMLDB_TYPE_INTEGER, |
| 92 | - 'precision' => '1', |
|
| 93 | - 'unsigned' => null, |
|
| 94 | - 'notnull' => XMLDB_NOTNULL, |
|
| 95 | - 'sequence' => null, |
|
| 96 | - 'default' => 0, |
|
| 97 | - 'previous' => null); |
|
| 92 | + 'precision' => '1', |
|
| 93 | + 'unsigned' => null, |
|
| 94 | + 'notnull' => XMLDB_NOTNULL, |
|
| 95 | + 'sequence' => null, |
|
| 96 | + 'default' => 0, |
|
| 97 | + 'previous' => null); |
|
| 98 | 98 | xmldb_bigbluebuttonbn_add_change_field($dbman, 'bigbluebuttonbn', 'recordings_html', |
| 99 | 99 | $fielddefinition); |
| 100 | 100 | |
| 101 | 101 | // Add field recordings_deleted_activities. |
| 102 | 102 | $fielddefinition = array('type' => XMLDB_TYPE_INTEGER, |
| 103 | - 'precision' => '1', |
|
| 104 | - 'unsigned' => null, |
|
| 105 | - 'notnull' => XMLDB_NOTNULL, |
|
| 106 | - 'sequence' => null, |
|
| 107 | - 'default' => 1, |
|
| 108 | - 'previous' => null); |
|
| 103 | + 'precision' => '1', |
|
| 104 | + 'unsigned' => null, |
|
| 105 | + 'notnull' => XMLDB_NOTNULL, |
|
| 106 | + 'sequence' => null, |
|
| 107 | + 'default' => 1, |
|
| 108 | + 'previous' => null); |
|
| 109 | 109 | xmldb_bigbluebuttonbn_add_change_field($dbman, 'bigbluebuttonbn', 'recordings_deleted_activities', |
| 110 | 110 | $fielddefinition); |
| 111 | 111 | |
@@ -122,12 +122,12 @@ discard block |
||
| 122 | 122 | $table = new xmldb_table($tablename); |
| 123 | 123 | $field = new xmldb_field($fieldname); |
| 124 | 124 | $field->set_attributes($fielddefinition['type'], |
| 125 | - $fielddefinition['precision'], |
|
| 126 | - $fielddefinition['unsigned'], |
|
| 127 | - $fielddefinition['notnull'], |
|
| 128 | - $fielddefinition['sequence'], |
|
| 129 | - $fielddefinition['default'], |
|
| 130 | - $fielddefinition['previous']); |
|
| 125 | + $fielddefinition['precision'], |
|
| 126 | + $fielddefinition['unsigned'], |
|
| 127 | + $fielddefinition['notnull'], |
|
| 128 | + $fielddefinition['sequence'], |
|
| 129 | + $fielddefinition['default'], |
|
| 130 | + $fielddefinition['previous']); |
|
| 131 | 131 | if ($dbman->field_exists($table, $field)) { |
| 132 | 132 | $dbman->change_field_type($table, $field, true, true); |
| 133 | 133 | $dbman->change_field_precision($table, $field, true, true); |
@@ -272,11 +272,11 @@ discard block |
||
| 272 | 272 | |
| 273 | 273 | echo $OUTPUT->box_start('generalbox boxaligncenter'); |
| 274 | 274 | echo '<br><div class="alert alert-warning">'.get_string('view_groups_selection_warning', 'bigbluebuttonbn'). |
| 275 | - '</div>'; |
|
| 275 | + '</div>'; |
|
| 276 | 276 | echo $OUTPUT->box_end(); |
| 277 | 277 | |
| 278 | 278 | groups_print_activity_menu( |
| 279 | - $bbbsession['cm'], $CFG->wwwroot.'/mod/bigbluebuttonbn/view.php?id='.$bbbsession['cm']->id, false, $onlyexistentgroups); |
|
| 279 | + $bbbsession['cm'], $CFG->wwwroot.'/mod/bigbluebuttonbn/view.php?id='.$bbbsession['cm']->id, false, $onlyexistentgroups); |
|
| 280 | 280 | echo '<br><br>'; |
| 281 | 281 | } |
| 282 | 282 | |
@@ -388,7 +388,7 @@ discard block |
||
| 388 | 388 | // JavaScript variables for recordings. |
| 389 | 389 | $jsvars += array( |
| 390 | 390 | 'recordings_html' => $bbbsession['bigbluebuttonbn']->recordings_html == '1', |
| 391 | - ); |
|
| 391 | + ); |
|
| 392 | 392 | |
| 393 | 393 | // If there are meetings with recordings load the data to the table. |
| 394 | 394 | if ($bbbsession['bigbluebuttonbn']->recordings_html) { |
@@ -400,7 +400,7 @@ discard block |
||
| 400 | 400 | $jsvars += array( |
| 401 | 401 | 'columns' => bigbluebuttonbn_get_recording_columns($bbbsession), |
| 402 | 402 | 'data' => bigbluebuttonbn_get_recording_data($bbbsession, $recordings), |
| 403 | - ); |
|
| 403 | + ); |
|
| 404 | 404 | |
| 405 | 405 | // Render a YUI table. |
| 406 | 406 | return html_writer::div('', '', array('id' => 'bigbluebuttonbn_yui_table')); |
@@ -411,10 +411,10 @@ discard block |
||
| 411 | 411 | |
| 412 | 412 | $button = html_writer::tag('input', '', |
| 413 | 413 | array('type' => 'button', |
| 414 | - 'value' => get_string('view_recording_button_import', 'bigbluebuttonbn'), |
|
| 415 | - 'class' => 'btn btn-secondary', |
|
| 416 | - 'onclick' => 'window.location=\''.$CFG->wwwroot.'/mod/bigbluebuttonbn/import_view.php?bn='. |
|
| 417 | - $bbbsession['bigbluebuttonbn']->id.'\'')); |
|
| 414 | + 'value' => get_string('view_recording_button_import', 'bigbluebuttonbn'), |
|
| 415 | + 'class' => 'btn btn-secondary', |
|
| 416 | + 'onclick' => 'window.location=\''.$CFG->wwwroot.'/mod/bigbluebuttonbn/import_view.php?bn='. |
|
| 417 | + $bbbsession['bigbluebuttonbn']->id.'\'')); |
|
| 418 | 418 | $output = html_writer::start_tag('br'); |
| 419 | 419 | $output .= html_writer::tag('span', $button, array('id' => 'import_recording_links_button')); |
| 420 | 420 | $output .= html_writer::tag('span', '', array('id' => 'import_recording_links_table')); |
@@ -432,7 +432,7 @@ discard block |
||
| 432 | 432 | return '<h4>'.get_string('view_section_title_presentation', 'bigbluebuttonbn').'</h4>'. |
| 433 | 433 | ''.$OUTPUT->action_icon($bbbsession['presentation']['url'], $icon, null, array(), false).''. |
| 434 | 434 | ''.$OUTPUT->action_link($bbbsession['presentation']['url'], |
| 435 | - $bbbsession['presentation']['name'], null, $attributes).'<br><br>'; |
|
| 435 | + $bbbsession['presentation']['name'], null, $attributes).'<br><br>'; |
|
| 436 | 436 | } |
| 437 | 437 | |
| 438 | 438 | return ''; |
@@ -23,8 +23,8 @@ discard block |
||
| 23 | 23 | * @license http://www.gnu.org/copyleft/gpl.html GNU GPL v2 or later |
| 24 | 24 | */ |
| 25 | 25 | |
| 26 | -require_once(dirname(dirname(dirname(__FILE__))).'/config.php'); |
|
| 27 | -require_once(dirname(__FILE__).'/locallib.php'); |
|
| 26 | +require_once(dirname(dirname(dirname(__FILE__))) . '/config.php'); |
|
| 27 | +require_once(dirname(__FILE__) . '/locallib.php'); |
|
| 28 | 28 | |
| 29 | 29 | $id = required_param('id', PARAM_INT); |
| 30 | 30 | $b = optional_param('n', 0, PARAM_INT); |
@@ -59,18 +59,18 @@ discard block |
||
| 59 | 59 | if (is_null($serverversion)) { |
| 60 | 60 | if ($bbbsession['administrator']) { |
| 61 | 61 | print_error('view_error_unable_join', 'bigbluebuttonbn', |
| 62 | - $CFG->wwwroot.'/admin/settings.php?section=modsettingbigbluebuttonbn'); |
|
| 62 | + $CFG->wwwroot . '/admin/settings.php?section=modsettingbigbluebuttonbn'); |
|
| 63 | 63 | exit; |
| 64 | 64 | } |
| 65 | 65 | |
| 66 | 66 | if ($bbbsession['moderator']) { |
| 67 | 67 | print_error('view_error_unable_join_teacher', 'bigbluebuttonbn', |
| 68 | - $CFG->wwwroot.'/course/view.php?id='.$bigbluebuttonbn->course); |
|
| 68 | + $CFG->wwwroot . '/course/view.php?id=' . $bigbluebuttonbn->course); |
|
| 69 | 69 | exit; |
| 70 | 70 | } |
| 71 | 71 | |
| 72 | 72 | print_error('view_error_unable_join_student', 'bigbluebuttonbn', |
| 73 | - $CFG->wwwroot.'/course/view.php?id='.$bigbluebuttonbn->course); |
|
| 73 | + $CFG->wwwroot . '/course/view.php?id=' . $bigbluebuttonbn->course); |
|
| 74 | 74 | exit; |
| 75 | 75 | } |
| 76 | 76 | |
@@ -80,7 +80,7 @@ discard block |
||
| 80 | 80 | |
| 81 | 81 | // Print the page header. |
| 82 | 82 | $PAGE->set_context($context); |
| 83 | -$PAGE->set_url($CFG->wwwroot.'/mod/bigbluebuttonbn/view.php', array('id' => $cm->id)); |
|
| 83 | +$PAGE->set_url($CFG->wwwroot . '/mod/bigbluebuttonbn/view.php', array('id' => $cm->id)); |
|
| 84 | 84 | $PAGE->set_title(format_string($bigbluebuttonbn->name)); |
| 85 | 85 | $PAGE->set_cacheable(false); |
| 86 | 86 | $PAGE->set_heading($course->fullname); |
@@ -90,11 +90,11 @@ discard block |
||
| 90 | 90 | if (!has_capability('moodle/category:manage', $context) && !has_capability('mod/bigbluebuttonbn:join', $context)) { |
| 91 | 91 | echo $OUTPUT->header(); |
| 92 | 92 | if (isguestuser()) { |
| 93 | - echo $OUTPUT->confirm('<p>'.get_string('view_noguests', 'bigbluebuttonbn').'</p>'.get_string('liketologin'), |
|
| 94 | - get_login_url(), $CFG->wwwroot.'/course/view.php?id='.$course->id); |
|
| 93 | + echo $OUTPUT->confirm('<p>' . get_string('view_noguests', 'bigbluebuttonbn') . '</p>' . get_string('liketologin'), |
|
| 94 | + get_login_url(), $CFG->wwwroot . '/course/view.php?id=' . $course->id); |
|
| 95 | 95 | } else { |
| 96 | - echo $OUTPUT->confirm('<p>'.get_string('view_nojoin', 'bigbluebuttonbn').'</p>'.get_string('liketologin'), |
|
| 97 | - get_login_url(), $CFG->wwwroot.'/course/view.php?id='.$course->id); |
|
| 96 | + echo $OUTPUT->confirm('<p>' . get_string('view_nojoin', 'bigbluebuttonbn') . '</p>' . get_string('liketologin'), |
|
| 97 | + get_login_url(), $CFG->wwwroot . '/course/view.php?id=' . $course->id); |
|
| 98 | 98 | } |
| 99 | 99 | echo $OUTPUT->footer(); |
| 100 | 100 | exit; |
@@ -102,7 +102,7 @@ discard block |
||
| 102 | 102 | |
| 103 | 103 | // Operation URLs. |
| 104 | 104 | $bbbsession['bigbluebuttonbnURL'] = $CFG->wwwroot . '/mod/bigbluebuttonbn/view.php?id=' . $bbbsession['cm']->id; |
| 105 | -$bbbsession['logoutURL'] = $CFG->wwwroot . '/mod/bigbluebuttonbn/bbb_view.php?action=logout&id='.$id . |
|
| 105 | +$bbbsession['logoutURL'] = $CFG->wwwroot . '/mod/bigbluebuttonbn/bbb_view.php?action=logout&id=' . $id . |
|
| 106 | 106 | '&bn=' . $bbbsession['bigbluebuttonbn']->id; |
| 107 | 107 | $bbbsession['recordingReadyURL'] = $CFG->wwwroot . '/mod/bigbluebuttonbn/bbb_broker.php?action=recording_' . |
| 108 | 108 | 'ready&bigbluebuttonbn=' . $bbbsession['bigbluebuttonbn']->id; |
@@ -122,7 +122,7 @@ discard block |
||
| 122 | 122 | echo $OUTPUT->footer(); |
| 123 | 123 | |
| 124 | 124 | // Shows version as a comment. |
| 125 | -echo '<!-- '.$bbbsession['originTag'].' -->'."\n"; |
|
| 125 | +echo '<!-- ' . $bbbsession['originTag'] . ' -->' . "\n"; |
|
| 126 | 126 | |
| 127 | 127 | // Initialize session variable used across views. |
| 128 | 128 | $SESSION->bigbluebuttonbn_bbbsession = $bbbsession; |
@@ -152,7 +152,7 @@ discard block |
||
| 152 | 152 | $bbbsession['viewerPW'] = $bigbluebuttonbn->viewerpass; |
| 153 | 153 | |
| 154 | 154 | // Database info related to the activity. |
| 155 | - $bbbsession['meetingid'] = $bbbsession['bigbluebuttonbn']->meetingid.'-'.$bbbsession['course']->id.'-'. |
|
| 155 | + $bbbsession['meetingid'] = $bbbsession['bigbluebuttonbn']->meetingid . '-' . $bbbsession['course']->id . '-' . |
|
| 156 | 156 | $bbbsession['bigbluebuttonbn']->id; |
| 157 | 157 | $bbbsession['meetingname'] = $bbbsession['bigbluebuttonbn']->name; |
| 158 | 158 | $bbbsession['meetingdescription'] = $bigbluebuttonbn->intro; |
@@ -173,7 +173,7 @@ discard block |
||
| 173 | 173 | $bbbsession['welcome'] = get_string('mod_form_field_welcome_default', 'bigbluebuttonbn'); |
| 174 | 174 | } |
| 175 | 175 | if ($bigbluebuttonbn->record) { |
| 176 | - $bbbsession['welcome'] .= '<br><br>'.get_string('bbbrecordwarning', 'bigbluebuttonbn'); |
|
| 176 | + $bbbsession['welcome'] .= '<br><br>' . get_string('bbbrecordwarning', 'bigbluebuttonbn'); |
|
| 177 | 177 | } |
| 178 | 178 | |
| 179 | 179 | $bbbsession['openingtime'] = $bigbluebuttonbn->openingtime; |
@@ -189,7 +189,7 @@ discard block |
||
| 189 | 189 | $bbbsession['originServerName'] = $parsedurl['host']; |
| 190 | 190 | $bbbsession['originServerUrl'] = $CFG->wwwroot; |
| 191 | 191 | $bbbsession['originServerCommonName'] = ''; |
| 192 | - $bbbsession['originTag'] = 'moodle-mod_bigbluebuttonbn ('.get_config('mod_bigbluebuttonbn', 'version').')'; |
|
| 192 | + $bbbsession['originTag'] = 'moodle-mod_bigbluebuttonbn (' . get_config('mod_bigbluebuttonbn', 'version') . ')'; |
|
| 193 | 193 | } |
| 194 | 194 | |
| 195 | 195 | function bigbluebuttonbn_view_bbbsession_roles($context, $userid) { |
@@ -248,10 +248,10 @@ discard block |
||
| 248 | 248 | $bbbsession['group'] = groups_get_activity_group($bbbsession['cm'], true); |
| 249 | 249 | |
| 250 | 250 | // Assign group default values. |
| 251 | - $bbbsession['meetingid'] = $bbbsession['bigbluebuttonbn']->meetingid.'-'.$bbbsession['course']->id.'-'. |
|
| 252 | - $bbbsession['bigbluebuttonbn']->id.'['.$bbbsession['group'].']'; |
|
| 251 | + $bbbsession['meetingid'] = $bbbsession['bigbluebuttonbn']->meetingid . '-' . $bbbsession['course']->id . '-' . |
|
| 252 | + $bbbsession['bigbluebuttonbn']->id . '[' . $bbbsession['group'] . ']'; |
|
| 253 | 253 | $groupname = get_string('allparticipants'); |
| 254 | - $bbbsession['meetingname'] = $bbbsession['bigbluebuttonbn']->name.' ('.$groupname.')'; |
|
| 254 | + $bbbsession['meetingname'] = $bbbsession['bigbluebuttonbn']->name . ' (' . $groupname . ')'; |
|
| 255 | 255 | |
| 256 | 256 | if (count($groups) == 0) { |
| 257 | 257 | // Only the All participants group exists. |
@@ -262,10 +262,10 @@ discard block |
||
| 262 | 262 | $bbbsession['group'] = array_values($groups)[0]->id; |
| 263 | 263 | } |
| 264 | 264 | |
| 265 | - $bbbsession['meetingid'] = $bbbsession['bigbluebuttonbn']->meetingid.'-'.$bbbsession['course']->id.'-'. |
|
| 266 | - $bbbsession['bigbluebuttonbn']->id.'['.$bbbsession['group'].']'; |
|
| 265 | + $bbbsession['meetingid'] = $bbbsession['bigbluebuttonbn']->meetingid . '-' . $bbbsession['course']->id . '-' . |
|
| 266 | + $bbbsession['bigbluebuttonbn']->id . '[' . $bbbsession['group'] . ']'; |
|
| 267 | 267 | $groupname = groups_get_group_name($bbbsession['group']); |
| 268 | - $bbbsession['meetingname'] = $bbbsession['bigbluebuttonbn']->name.' ('.$groupname.')'; |
|
| 268 | + $bbbsession['meetingname'] = $bbbsession['bigbluebuttonbn']->name . ' (' . $groupname . ')'; |
|
| 269 | 269 | |
| 270 | 270 | if (count($groups) == 1) { |
| 271 | 271 | // There only one group and the user has access to. |
@@ -273,12 +273,12 @@ discard block |
||
| 273 | 273 | } |
| 274 | 274 | |
| 275 | 275 | echo $OUTPUT->box_start('generalbox boxaligncenter'); |
| 276 | - echo '<br><div class="alert alert-warning">'.get_string('view_groups_selection_warning', 'bigbluebuttonbn'). |
|
| 276 | + echo '<br><div class="alert alert-warning">' . get_string('view_groups_selection_warning', 'bigbluebuttonbn') . |
|
| 277 | 277 | '</div>'; |
| 278 | 278 | echo $OUTPUT->box_end(); |
| 279 | 279 | |
| 280 | 280 | groups_print_activity_menu( |
| 281 | - $bbbsession['cm'], $CFG->wwwroot.'/mod/bigbluebuttonbn/view.php?id='.$bbbsession['cm']->id, false, $onlyexistentgroups); |
|
| 281 | + $bbbsession['cm'], $CFG->wwwroot . '/mod/bigbluebuttonbn/view.php?id=' . $bbbsession['cm']->id, false, $onlyexistentgroups); |
|
| 282 | 282 | echo '<br><br>'; |
| 283 | 283 | } |
| 284 | 284 | |
@@ -320,7 +320,7 @@ discard block |
||
| 320 | 320 | 'M.mod_bigbluebuttonbn.recordings.init', array($jsvars)); |
| 321 | 321 | } |
| 322 | 322 | |
| 323 | - echo $output.html_writer::empty_tag('br').html_writer::empty_tag('br').html_writer::empty_tag('br'); |
|
| 323 | + echo $output . html_writer::empty_tag('br') . html_writer::empty_tag('br') . html_writer::empty_tag('br'); |
|
| 324 | 324 | |
| 325 | 325 | $PAGE->requires->yui_module('moodle-mod_bigbluebuttonbn-broker', 'M.mod_bigbluebuttonbn.broker.init', array($jsvars)); |
| 326 | 326 | } |
@@ -331,12 +331,12 @@ discard block |
||
| 331 | 331 | // JavaScript variables for room. |
| 332 | 332 | $openingtime = ''; |
| 333 | 333 | if ($bbbsession['openingtime']) { |
| 334 | - $openingtime = get_string('mod_form_field_openingtime', 'bigbluebuttonbn').': '. |
|
| 334 | + $openingtime = get_string('mod_form_field_openingtime', 'bigbluebuttonbn') . ': ' . |
|
| 335 | 335 | userdate($bbbsession['openingtime']); |
| 336 | 336 | } |
| 337 | 337 | $closingtime = ''; |
| 338 | 338 | if ($bbbsession['closingtime']) { |
| 339 | - $closingtime = get_string('mod_form_field_closingtime', 'bigbluebuttonbn').': '. |
|
| 339 | + $closingtime = get_string('mod_form_field_closingtime', 'bigbluebuttonbn') . ': ' . |
|
| 340 | 340 | userdate($bbbsession['closingtime']); |
| 341 | 341 | } |
| 342 | 342 | $jsvars += array( |
@@ -353,7 +353,7 @@ discard block |
||
| 353 | 353 | $output .= $OUTPUT->box_end(); |
| 354 | 354 | |
| 355 | 355 | $output .= $OUTPUT->box_start('generalbox boxaligncenter', 'bigbluebuttonbn_view_action_button_box'); |
| 356 | - $output .= '<br><br><span id="join_button"></span> <span id="end_button"></span>'."\n"; |
|
| 356 | + $output .= '<br><br><span id="join_button"></span> <span id="end_button"></span>' . "\n"; |
|
| 357 | 357 | $output .= $OUTPUT->box_end(); |
| 358 | 358 | |
| 359 | 359 | if ($activity == 'ended') { |
@@ -389,7 +389,7 @@ discard block |
||
| 389 | 389 | // If there are meetings with recordings load the data to the table. |
| 390 | 390 | if ($bbbsession['bigbluebuttonbn']->recordings_html) { |
| 391 | 391 | // Render a plain html table. |
| 392 | - return bigbluebutton_output_recording_table($bbbsession, $recordings)."\n"; |
|
| 392 | + return bigbluebutton_output_recording_table($bbbsession, $recordings) . "\n"; |
|
| 393 | 393 | } |
| 394 | 394 | |
| 395 | 395 | // JavaScript variables for recordings with YUI. |
@@ -409,8 +409,8 @@ discard block |
||
| 409 | 409 | array('type' => 'button', |
| 410 | 410 | 'value' => get_string('view_recording_button_import', 'bigbluebuttonbn'), |
| 411 | 411 | 'class' => 'btn btn-secondary', |
| 412 | - 'onclick' => 'window.location=\''.$CFG->wwwroot.'/mod/bigbluebuttonbn/import_view.php?bn='. |
|
| 413 | - $bbbsession['bigbluebuttonbn']->id.'\'')); |
|
| 412 | + 'onclick' => 'window.location=\'' . $CFG->wwwroot . '/mod/bigbluebuttonbn/import_view.php?bn=' . |
|
| 413 | + $bbbsession['bigbluebuttonbn']->id . '\'')); |
|
| 414 | 414 | $output = html_writer::start_tag('br'); |
| 415 | 415 | $output .= html_writer::tag('span', $button, array('id' => 'import_recording_links_button')); |
| 416 | 416 | $output .= html_writer::tag('span', '', array('id' => 'import_recording_links_table')); |
@@ -425,10 +425,10 @@ discard block |
||
| 425 | 425 | $attributes = array('title' => $bbbsession['presentation']['name']); |
| 426 | 426 | $icon = new pix_icon($bbbsession['presentation']['icon'], $bbbsession['presentation']['mimetype_description']); |
| 427 | 427 | |
| 428 | - return '<h4>'.get_string('view_section_title_presentation', 'bigbluebuttonbn').'</h4>'. |
|
| 429 | - ''.$OUTPUT->action_icon($bbbsession['presentation']['url'], $icon, null, array(), false).''. |
|
| 430 | - ''.$OUTPUT->action_link($bbbsession['presentation']['url'], |
|
| 431 | - $bbbsession['presentation']['name'], null, $attributes).'<br><br>'; |
|
| 428 | + return '<h4>' . get_string('view_section_title_presentation', 'bigbluebuttonbn') . '</h4>' . |
|
| 429 | + '' . $OUTPUT->action_icon($bbbsession['presentation']['url'], $icon, null, array(), false) . '' . |
|
| 430 | + '' . $OUTPUT->action_link($bbbsession['presentation']['url'], |
|
| 431 | + $bbbsession['presentation']['name'], null, $attributes) . '<br><br>'; |
|
| 432 | 432 | } |
| 433 | 433 | |
| 434 | 434 | return ''; |