Completed
Branch master (3d5dc9)
by Jesus
02:45 queued 30s
created
bbb_broker.php 1 patch
Spacing   +11 added lines, -11 removed lines patch added patch discarded remove patch
@@ -81,49 +81,49 @@
 block discarded – undo
81 81
                             $can_join = false;
82 82
                         }
83 83
 
84
-                        if( $bbbsession['administrator'] || $bbbsession['moderator'] ) {
84
+                        if ($bbbsession['administrator'] || $bbbsession['moderator']) {
85 85
                             $end_button_text = get_string('view_conference_action_end', 'bigbluebuttonbn');
86 86
                             $can_end = true;
87
-                            $status_can_end = '"can_end": true, "end_button_text": "'.$end_button_text.'", ';
87
+                            $status_can_end = '"can_end": true, "end_button_text": "' . $end_button_text . '", ';
88 88
                         }
89 89
 
90 90
                     } else {
91 91
                         // If user is administrator, moderator or if is viewer and no waiting is required
92 92
                         $join_button_text = get_string('view_conference_action_join', 'bigbluebuttonbn');
93
-                        if ( $bbbsession['administrator'] || $bbbsession['moderator'] || !$bbbsession['wait'] ) {
93
+                        if ($bbbsession['administrator'] || $bbbsession['moderator'] || !$bbbsession['wait']) {
94 94
                             $initial_message = get_string('view_message_conference_room_ready', 'bigbluebuttonbn');
95 95
                             $can_join = true;
96 96
 
97 97
                         } else {
98 98
                             $initial_message = get_string('view_message_conference_not_started', 'bigbluebuttonbn');
99
-                            if ( $bbbsession['wait'] ) {
100
-                                $initial_message .= ' '.get_string('view_message_conference_wait_for_moderator', 'bigbluebuttonbn');
99
+                            if ($bbbsession['wait']) {
100
+                                $initial_message .= ' ' . get_string('view_message_conference_wait_for_moderator', 'bigbluebuttonbn');
101 101
                             }
102 102
                             $can_join = false;
103 103
                         }
104 104
 
105
-                        if( $bbbsession['tagging'] && ($bbbsession['administrator'] || $bbbsession['moderator']) ) {
105
+                        if ($bbbsession['tagging'] && ($bbbsession['administrator'] || $bbbsession['moderator'])) {
106 106
                             $can_tag = true;
107 107
 
108 108
                         } else {
109 109
                             $can_tag = false;
110 110
                         }
111
-                        $status_can_end = '"can_tag": '.($can_tag? 'true': 'false').', ';
111
+                        $status_can_end = '"can_tag": ' . ($can_tag ? 'true' : 'false') . ', ';
112 112
                     }
113 113
 
114
-                    echo $params['callback'].'({ "running": '.($meeting_running? 'true':'false').', "info": '.json_encode($meeting_info).', "status": {"can_join": '.($can_join? 'true':'false').',"join_url": "'.$bbbsession['joinURL'].'","join_button_text": "'.$join_button_text.'", '.$status_can_end.$status_can_tag.'"message": "'.$initial_message.'"} });';
114
+                    echo $params['callback'] . '({ "running": ' . ($meeting_running ? 'true' : 'false') . ', "info": ' . json_encode($meeting_info) . ', "status": {"can_join": ' . ($can_join ? 'true' : 'false') . ',"join_url": "' . $bbbsession['joinURL'] . '","join_button_text": "' . $join_button_text . '", ' . $status_can_end . $status_can_tag . '"message": "' . $initial_message . '"} });';
115 115
                     break;
116 116
                 case 'meeting_end':
117
-                    if( $bbbsession['administrator'] || $bbbsession['moderator'] ) {
117
+                    if ($bbbsession['administrator'] || $bbbsession['moderator']) {
118 118
                         //Execute the end command
119 119
                         $meeting_info = bigbluebuttonbn_bbb_broker_do_end_meeting($params['id'], $bbbsession['modPW']);
120 120
                         // Moodle event logger: Create an event for meeting ended
121
-                        if( isset($bigbluebuttonbn) )
121
+                        if (isset($bigbluebuttonbn))
122 122
                             bigbluebuttonbn_event_log(BIGBLUEBUTTON_EVENT_MEETING_ENDED, $bigbluebuttonbn, $context, $cm);
123 123
                         // Update the cache
124 124
                         $meeting_info = bigbluebuttonbn_bbb_broker_get_meeting_info($params['id'], $bbbsession['modPW'], true);
125 125
 
126
-                        echo $params['callback'].'({ "status": true });';
126
+                        echo $params['callback'] . '({ "status": true });';
127 127
                     } else {
128 128
                         error_log("ERROR: User not authorized to execute end command");
129 129
                         header("HTTP/1.0 401 Unauthorized. User not authorized to execute end command");
Please login to merge, or discard this patch.