Test Setup Failed
Push — master ( 7e2e55...b97dd0 )
by Angel Fernando Quiroz
431:37 queued 367:13
created
plugin/bbb/lang/english.php 1 patch
Spacing   +2 added lines, -2 removed lines patch added patch discarded remove patch
@@ -20,7 +20,7 @@  discard block
 block discarded – undo
20 20
 $strings['VideoConferenceAddedToTheCalendar']   = "Videoconference added to the calendar";
21 21
 $strings['VideoConferenceAddedToTheLinkTool']   = "Videoconference added to the link tool";
22 22
 
23
-$strings['GoToTheVideoConference']   = "Go to the videoconference";
23
+$strings['GoToTheVideoConference'] = "Go to the videoconference";
24 24
 
25 25
 $strings['Records']             = "Recording";
26 26
 $strings['Meeting']             = "Meeting";
@@ -31,7 +31,7 @@  discard block
 block discarded – undo
31 31
 $strings['EnterConference']     = "Enter the videoconference";
32 32
 $strings['RecordList']          = "Recording list";
33 33
 $strings['ServerIsNotRunning']  = "Videoconference server is not running";
34
-$strings['ServerIsNotConfigured']  = "Videoconference server is not configured";
34
+$strings['ServerIsNotConfigured'] = "Videoconference server is not configured";
35 35
 
36 36
 $strings['XUsersOnLine']        = "%s user(s) online";
37 37
 
Please login to merge, or discard this patch.
plugin/bbb/lang/french.php 1 patch
Spacing   +2 added lines, -2 removed lines patch added patch discarded remove patch
@@ -13,7 +13,7 @@  discard block
 block discarded – undo
13 13
 $strings['VideoConferenceAddedToTheCalendar']   = "Vidéoconférence ajoutée au calendrier";
14 14
 $strings['VideoConferenceAddedToTheLinkTool']   = "Vidéoconférence ajoutée comme lien. Vous pouvez éditer et publier le lien sur la page principale du cours depuis l'outil liens.";
15 15
 
16
-$strings['GoToTheVideoConference']   = "Entrer dans la salle de conférence";
16
+$strings['GoToTheVideoConference'] = "Entrer dans la salle de conférence";
17 17
 
18 18
 $strings['Records']             = "Enregistrement";
19 19
 $strings['Meeting']             = "Salle de conférence";
@@ -24,7 +24,7 @@  discard block
 block discarded – undo
24 24
 $strings['EnterConference']     = "Entrer dans la salle de conférence";
25 25
 $strings['RecordList']          = "Liste des enregistrements";
26 26
 $strings['ServerIsNotRunning']  = "Le serveur de vidéoconférence ne fonctionne pas";
27
-$strings['ServerIsNotConfigured']  = "Le serveur de vidéoconférence n'est pas configuré correctement";
27
+$strings['ServerIsNotConfigured'] = "Le serveur de vidéoconférence n'est pas configuré correctement";
28 28
 
29 29
 $strings['XUsersOnLine']        = "%s utilisateurs dans la salle";
30 30
 
Please login to merge, or discard this patch.
plugin/bbb/lang/spanish.php 1 patch
Spacing   +2 added lines, -2 removed lines patch added patch discarded remove patch
@@ -13,7 +13,7 @@  discard block
 block discarded – undo
13 13
 $strings['VideoConferenceAddedToTheCalendar']   = "Videoconferencia añadida al calendario";
14 14
 $strings['VideoConferenceAddedToTheLinkTool']   = "Videoconferencia añadida como enlace. Puede editar y publicar el enlace en la página principal del curso desde la herramienta de enlace.";
15 15
 
16
-$strings['GoToTheVideoConference']   = "Ir a la videoconferencia";
16
+$strings['GoToTheVideoConference'] = "Ir a la videoconferencia";
17 17
 
18 18
 $strings['Records']             = "Grabación";
19 19
 $strings['Meeting']             = "Sala de conferencia";
@@ -24,7 +24,7 @@  discard block
 block discarded – undo
24 24
 $strings['EnterConference']     = "Entrar a la videoconferencia";
25 25
 $strings['RecordList']          = "Lista de grabaciones";
26 26
 $strings['ServerIsNotRunning']  = "El servidor de videoconferencia no está funcionando";
27
-$strings['ServerIsNotConfigured']  = "El servidor de videoconferencia no está configurado correctamente";
27
+$strings['ServerIsNotConfigured'] = "El servidor de videoconferencia no está configurado correctamente";
28 28
 
29 29
 $strings['XUsersOnLine']        = "%s usuario(s) en la sala";
30 30
 
Please login to merge, or discard this patch.
plugin/bbb/cron.php 1 patch
Spacing   +9 added lines, -9 removed lines patch added patch discarded remove patch
@@ -1,16 +1,16 @@  discard block
 block discarded – undo
1 1
 <?php
2 2
 
3
-require __DIR__ . '/../../vendor/autoload.php';
4
-if (file_exists(__DIR__ . '/config.vm.php')) {
3
+require __DIR__.'/../../vendor/autoload.php';
4
+if (file_exists(__DIR__.'/config.vm.php')) {
5 5
 
6
-    require_once dirname(__FILE__) . '/config.php';
6
+    require_once dirname(__FILE__).'/config.php';
7 7
 
8
-    require __DIR__ . '/lib/vm/AbstractVM.php';
9
-    require __DIR__ . '/lib/vm/VMInterface.php';
10
-    require __DIR__ . '/lib/vm/DigitalOceanVM.php';
11
-    require __DIR__ . '/lib/VM.php';
8
+    require __DIR__.'/lib/vm/AbstractVM.php';
9
+    require __DIR__.'/lib/vm/VMInterface.php';
10
+    require __DIR__.'/lib/vm/DigitalOceanVM.php';
11
+    require __DIR__.'/lib/VM.php';
12 12
 
13
-    $config = require __DIR__ . '/config.vm.php';
13
+    $config = require __DIR__.'/config.vm.php';
14 14
 
15 15
     $vm = new VM($config);
16 16
 
@@ -21,7 +21,7 @@  discard block
 block discarded – undo
21 21
             if (empty($activeSessions)) {
22 22
                 $vm->runCron();
23 23
             } else {
24
-                echo "Can't run cron active sessions found: " . $activeSessions;
24
+                echo "Can't run cron active sessions found: ".$activeSessions;
25 25
             }
26 26
         }
27 27
     }
Please login to merge, or discard this patch.
plugin/bbb/lib/bbb_api.php 1 patch
Spacing   +21 added lines, -21 removed lines patch added patch discarded remove patch
@@ -55,25 +55,25 @@  discard block
 block discarded – undo
55 55
 	*/
56 56
 		// BASE CONFIGS - set these for your BBB server in config.php and they will
57 57
 		// simply flow in here via the constants:
58
-		$this->_securitySalt 		= CONFIG_SECURITY_SALT;
59
-		$this->_bbbServerBaseUrl 	= CONFIG_SERVER_BASE_URL;
58
+		$this->_securitySalt = CONFIG_SECURITY_SALT;
59
+		$this->_bbbServerBaseUrl = CONFIG_SERVER_BASE_URL;
60 60
 	}
61 61
 
62
-	private function _processXmlResponse($url){
62
+	private function _processXmlResponse($url) {
63 63
 	/*
64 64
 	A private utility method used by other public methods to process XML responses.
65 65
 	*/
66 66
 		if (extension_loaded('curl')) {
67
-			$ch = curl_init() or die ( curl_error($ch) );
67
+			$ch = curl_init() or die (curl_error($ch));
68 68
 			$timeout = 10;
69
-			curl_setopt( $ch, CURLOPT_SSL_VERIFYPEER, false);
70
-			curl_setopt( $ch, CURLOPT_URL, $url );
71
-			curl_setopt( $ch, CURLOPT_RETURNTRANSFER, 1 );
72
-			curl_setopt( $ch, CURLOPT_CONNECTTIMEOUT, $timeout);
73
-			$data = curl_exec( $ch );
74
-			curl_close( $ch );
75
-
76
-			if($data)
69
+			curl_setopt($ch, CURLOPT_SSL_VERIFYPEER, false);
70
+			curl_setopt($ch, CURLOPT_URL, $url);
71
+			curl_setopt($ch, CURLOPT_RETURNTRANSFER, 1);
72
+			curl_setopt($ch, CURLOPT_CONNECTTIMEOUT, $timeout);
73
+			$data = curl_exec($ch);
74
+			curl_close($ch);
75
+
76
+			if ($data)
77 77
 				return (new SimpleXMLElement($data));
78 78
 			else
79 79
 				return false;
@@ -137,10 +137,10 @@  discard block
 block discarded – undo
137 137
 		'&duration='.urlencode($creationParams['duration']);
138 138
 		//'&meta_category='.urlencode($creationParams['meta_category']);
139 139
 		$welcomeMessage = $creationParams['welcomeMsg'];
140
-		if(trim($welcomeMessage))
140
+		if (trim($welcomeMessage))
141 141
 			$params .= '&welcome='.urlencode($welcomeMessage);
142 142
 		// Return the complete URL:
143
-		return ( $creationUrl.$params.'&checksum='.sha1("create".$params.$this->_securitySalt) );
143
+		return ($creationUrl.$params.'&checksum='.sha1("create".$params.$this->_securitySalt));
144 144
 	}
145 145
 
146 146
 	public function createMeetingWithXmlResponseArray($creationParams) {
@@ -165,7 +165,7 @@  discard block
 block discarded – undo
165 165
 		$xml = $this->_processXmlResponse($this->getCreateMeetingURL($creationParams));
166 166
 
167 167
         if ($xml) {
168
-			if($xml->meetingID)
168
+			if ($xml->meetingID)
169 169
 				return array(
170 170
 					'returncode' => $xml->returncode,
171 171
 					'message' => $xml->message,
@@ -283,7 +283,7 @@  discard block
 block discarded – undo
283 283
 		$meetingId = '1234'		-- REQUIRED - The unique id for the meeting
284 284
 		*/
285 285
 		$xml = $this->_processXmlResponse($this->getIsMeetingRunningUrl($meetingId));
286
-		if($xml) {
286
+		if ($xml) {
287 287
 			return array(
288 288
 				'returncode' => $xml->returncode,
289 289
 				'running' => $xml->running 	// -- Returns true/false.
@@ -310,7 +310,7 @@  discard block
 block discarded – undo
310 310
 		and then handle the results that we get in the XML response.
311 311
 		*/
312 312
 		$xml = $this->_processXmlResponse($this->getGetMeetingsUrl());
313
-		if($xml) {
313
+		if ($xml) {
314 314
 			// If we don't get a success code, stop processing and return just the returncode:
315 315
 			if ($xml->returncode != 'SUCCESS') {
316 316
 				$result = array(
@@ -379,7 +379,7 @@  discard block
 block discarded – undo
379 379
 		);
380 380
 		*/
381 381
 		$xml = $this->_processXmlResponse($this->getMeetingInfoUrl($infoParams));
382
-		if($xml) {
382
+		if ($xml) {
383 383
 			// If we don't get a success code or messageKey, find out why:
384 384
 			if (($xml->returncode != 'SUCCESS') || ($xml->messageKey == null)) {
385 385
 				$result = array(
@@ -454,7 +454,7 @@  discard block
 block discarded – undo
454 454
 		probably be required in user code when 'recording' is set to true.
455 455
 		*/
456 456
 		$xml = $this->_processXmlResponse($this->getRecordingsUrl($recordingParams));
457
-		if($xml) {
457
+		if ($xml) {
458 458
 			// If we don't get a success code or messageKey, find out why:
459 459
 			if (($xml->returncode != 'SUCCESS') || ($xml->messageKey == null)) {
460 460
 				$result = array(
@@ -524,7 +524,7 @@  discard block
 block discarded – undo
524 524
 		);
525 525
 		*/
526 526
 		$xml = $this->_processXmlResponse($this->getPublishRecordingsUrl($recordingParams));
527
-		if($xml) {
527
+		if ($xml) {
528 528
 			return array(
529 529
 				'returncode' => $xml->returncode,
530 530
 				'published' => $xml->published 	// -- Returns true/false.
@@ -557,7 +557,7 @@  discard block
 block discarded – undo
557 557
 		*/
558 558
 
559 559
 		$xml = $this->_processXmlResponse($this->getDeleteRecordingsUrl($recordingParams));
560
-		if($xml) {
560
+		if ($xml) {
561 561
 			return array(
562 562
 				'returncode' => $xml->returncode,
563 563
 				'deleted' => $xml->deleted 	// -- Returns true/false.
Please login to merge, or discard this patch.
plugin/bbb/lib/bbb.lib.php 1 patch
Spacing   +32 added lines, -32 removed lines patch added patch discarded remove patch
@@ -122,20 +122,20 @@  discard block
 block discarded – undo
122 122
         $params['session_id'] = api_get_session_id();
123 123
 
124 124
         $params['attendee_pw'] = isset($params['moderator_pw']) ? $params['moderator_pw'] : api_get_course_id();
125
-        $attendeePassword =  $params['attendee_pw'];
125
+        $attendeePassword = $params['attendee_pw'];
126 126
         $params['moderator_pw'] = isset($params['moderator_pw']) ? $params['moderator_pw'] : $this->getModMeetingPassword();
127 127
         $moderatorPassword = $params['moderator_pw'];
128 128
 
129 129
         $params['record'] = api_get_course_setting('big_blue_button_record_and_store', $courseCode) == 1 ? true : false;
130 130
         $max = api_get_course_setting('big_blue_button_max_students_allowed', $courseCode);
131
-        $max =  isset($max) ? $max : -1;
131
+        $max = isset($max) ? $max : -1;
132 132
         $params['status'] = 1;
133 133
         // Generate a pseudo-global-unique-id to avoid clash of conferences on
134 134
         // the same BBB server with several Chamilo portals
135 135
         $params['remote_id'] = uniqid(true, true);
136 136
         // Each simultaneous conference room needs to have a different
137 137
         // voice_bridge composed of a 5 digits number, so generating a random one
138
-        $params['voice_bridge'] = rand(10000,99999);
138
+        $params['voice_bridge'] = rand(10000, 99999);
139 139
 
140 140
         if ($this->debug) {
141 141
             error_log("enter create_meeting ".print_r($params, 1));
@@ -158,23 +158,23 @@  discard block
 block discarded – undo
158 158
             $duration = 300;
159 159
 
160 160
             $bbbParams = array(
161
-                'meetingId' => $params['remote_id'], 					// REQUIRED
162
-                'meetingName' => $meetingName, 	// REQUIRED
163
-                'attendeePw' => $attendeePassword, 					// Match this value in getJoinMeetingURL() to join as attendee.
164
-                'moderatorPw' => $moderatorPassword, 					// Match this value in getJoinMeetingURL() to join as moderator.
165
-                'welcomeMsg' => $welcomeMessage, 					// ''= use default. Change to customize.
166
-                'dialNumber' => '', 					// The main number to call into. Optional.
167
-                'voiceBridge' => $params['voice_bridge'], 					// PIN to join voice. Required.
168
-                'webVoice' => '', 						// Alphanumeric to join voice. Optional.
161
+                'meetingId' => $params['remote_id'], // REQUIRED
162
+                'meetingName' => $meetingName, // REQUIRED
163
+                'attendeePw' => $attendeePassword, // Match this value in getJoinMeetingURL() to join as attendee.
164
+                'moderatorPw' => $moderatorPassword, // Match this value in getJoinMeetingURL() to join as moderator.
165
+                'welcomeMsg' => $welcomeMessage, // ''= use default. Change to customize.
166
+                'dialNumber' => '', // The main number to call into. Optional.
167
+                'voiceBridge' => $params['voice_bridge'], // PIN to join voice. Required.
168
+                'webVoice' => '', // Alphanumeric to join voice. Optional.
169 169
                 'logoutUrl' =>  $this->logout_url,
170
-                'maxParticipants' => $max, 				// Optional. -1 = unlimitted. Not supported in BBB. [number]
171
-                'record' => $record, 					// New. 'true' will tell BBB to record the meeting.
172
-                'duration' => $duration, 				// Default = 0 which means no set duration in minutes. [number]
170
+                'maxParticipants' => $max, // Optional. -1 = unlimitted. Not supported in BBB. [number]
171
+                'record' => $record, // New. 'true' will tell BBB to record the meeting.
172
+                'duration' => $duration, // Default = 0 which means no set duration in minutes. [number]
173 173
                 //'meta_category' => '', 				// Use to pass additional info to BBB server. See API docs.
174 174
             );
175 175
 
176 176
             if ($this->debug) {
177
-                error_log("create_meeting params: ".print_r($bbbParams,1));
177
+                error_log("create_meeting params: ".print_r($bbbParams, 1));
178 178
             }
179 179
 
180 180
             $status = false;
@@ -188,7 +188,7 @@  discard block
 block discarded – undo
188 188
                 ) {
189 189
                     if ($this->debug) {
190 190
                         error_log(
191
-                            "create_meeting result: " . print_r($result, 1)
191
+                            "create_meeting result: ".print_r($result, 1)
192 192
                         );
193 193
                     }
194 194
                     $meeting = $this->joinMeeting($meetingName, true);
@@ -306,7 +306,7 @@  discard block
 block discarded – undo
306 306
 
307 307
             if ($this->debug) {
308 308
                 error_log(
309
-                    "meeting is running: " . intval($meetingInfoExists)
309
+                    "meeting is running: ".intval($meetingInfoExists)
310 310
                 );
311 311
             }
312 312
 
@@ -323,11 +323,11 @@  discard block
 block discarded – undo
323 323
 
324 324
         if ($meetingInfoExists) {
325 325
             $joinParams = array(
326
-                'meetingId' => $meetingData['remote_id'],	//	-- REQUIRED - A unique id for the meeting
327
-                'username' => $this->user_complete_name,	//-- REQUIRED - The name that will display for the user in the meeting
328
-                'password' => $pass,			//-- REQUIRED - The attendee or moderator password, depending on what's passed here
326
+                'meetingId' => $meetingData['remote_id'], //	-- REQUIRED - A unique id for the meeting
327
+                'username' => $this->user_complete_name, //-- REQUIRED - The name that will display for the user in the meeting
328
+                'password' => $pass, //-- REQUIRED - The attendee or moderator password, depending on what's passed here
329 329
                 //'createTime' => api_get_utc_datetime(),			//-- OPTIONAL - string. Leave blank ('') unless you set this correctly.
330
-                'userID' => api_get_user_id(),				//-- OPTIONAL - string
330
+                'userID' => api_get_user_id(), //-- OPTIONAL - string
331 331
                 'webVoiceConf' => ''	//	-- OPTIONAL - string
332 332
             );
333 333
             $url = $this->api->getJoinMeetingURL($joinParams);
@@ -336,7 +336,7 @@  discard block
 block discarded – undo
336 336
             $url = $this->logout_url;
337 337
         }
338 338
         if ($this->debug) {
339
-            error_log("return url :" . $url);
339
+            error_log("return url :".$url);
340 340
         }
341 341
         return $url;
342 342
     }
@@ -397,7 +397,7 @@  discard block
 block discarded – undo
397 397
             }
398 398
             $meetingBBB['end_url'] = api_get_self().'?'.api_get_cidreq().'&action=end&id='.$meetingDB['id'];
399 399
 
400
-            if ((string)$meetingBBB['returncode'] == 'FAILED') {
400
+            if ((string) $meetingBBB['returncode'] == 'FAILED') {
401 401
                 if ($meetingDB['status'] == 1 && $this->isTeacher()) {
402 402
                     $this->endMeeting($meetingDB['id']);
403 403
                 }
@@ -587,7 +587,7 @@  discard block
 block discarded – undo
587 587
                     $item['action_links'] = implode('<br />', $actionLinksArray);
588 588
                 }
589 589
                 //var_dump($recordArray);
590
-                $item['show_links']  = implode('<br />', $recordArray);
590
+                $item['show_links'] = implode('<br />', $recordArray);
591 591
                 $item['action_links'] = implode('<br />', $actionLinksArray);
592 592
             }
593 593
 
@@ -600,11 +600,11 @@  discard block
 block discarded – undo
600 600
 
601 601
             if ($meetingDB['status'] == 1) {
602 602
                 $joinParams = array(
603
-                    'meetingId' => $meetingDB['remote_id'],		//-- REQUIRED - A unique id for the meeting
604
-                    'username' => $this->user_complete_name,	//-- REQUIRED - The name that will display for the user in the meeting
605
-                    'password' => $pass,			//-- REQUIRED - The attendee or moderator password, depending on what's passed here
606
-                    'createTime' => '',			//-- OPTIONAL - string. Leave blank ('') unless you set this correctly.
607
-                    'userID' => '',			//	-- OPTIONAL - string
603
+                    'meetingId' => $meetingDB['remote_id'], //-- REQUIRED - A unique id for the meeting
604
+                    'username' => $this->user_complete_name, //-- REQUIRED - The name that will display for the user in the meeting
605
+                    'password' => $pass, //-- REQUIRED - The attendee or moderator password, depending on what's passed here
606
+                    'createTime' => '', //-- OPTIONAL - string. Leave blank ('') unless you set this correctly.
607
+                    'userID' => '', //	-- OPTIONAL - string
608 608
                     'webVoiceConf' => ''	//	-- OPTIONAL - string
609 609
                 );
610 610
                 $item['go_url'] = $this->protocol.$this->api->getJoinMeetingURL($joinParams);
@@ -659,8 +659,8 @@  discard block
 block discarded – undo
659 659
         $pass = $this->getUserMeetingPassword();
660 660
 
661 661
         $endParams = array(
662
-            'meetingId' => $meetingData['remote_id'],   // REQUIRED - We have to know which meeting to end.
663
-            'password' => $pass,        // REQUIRED - Must match moderator pass for meeting.
662
+            'meetingId' => $meetingData['remote_id'], // REQUIRED - We have to know which meeting to end.
663
+            'password' => $pass, // REQUIRED - Must match moderator pass for meeting.
664 664
         );
665 665
         $this->api->endMeetingWithXmlResponseArray($endParams);
666 666
         Database::update($this->table, array('status' => 0, 'closed_at' => api_get_utc_datetime()), array('id = ? ' => $id));
@@ -842,7 +842,7 @@  discard block
 block discarded – undo
842 842
      */
843 843
     public function redirectToBBB($url)
844 844
     {
845
-        if (file_exists(__DIR__ . '/../config.vm.php')) {
845
+        if (file_exists(__DIR__.'/../config.vm.php')) {
846 846
             // Using VM
847 847
             echo Display::url(get_lang('ClickToContinue'), $url);
848 848
             exit;
Please login to merge, or discard this patch.
plugin/bbb/lib/VM.php 1 patch
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -70,7 +70,7 @@
 block discarded – undo
70 70
 
71 71
         foreach ($vmList as $vm) {
72 72
             if (isset($vm['enabled']) && $vm['enabled'] == true) {
73
-                $className = $vm['name'] . 'VM';
73
+                $className = $vm['name'].'VM';
74 74
 
75 75
                 return new $className($vm);
76 76
                 break;
Please login to merge, or discard this patch.
plugin/bbb/lib/vm/DigitalOceanVM.php 1 patch
Spacing   +5 added lines, -5 removed lines patch added patch discarded remove patch
@@ -100,7 +100,7 @@  discard block
 block discarded – undo
100 100
                         break;
101 101
                 }
102 102
             } else {
103
-                throw new \Exception(" Id " . $this->vmId . " doesn't exists.");
103
+                throw new \Exception(" Id ".$this->vmId." doesn't exists.");
104 104
             }
105 105
         } catch (Exception $e) {
106 106
             die($e->getMessage());
@@ -118,22 +118,22 @@  discard block
 block discarded – undo
118 118
 
119 119
         $powerOff = $droplets->powerOff($this->vmId);
120 120
 
121
-        $this->addMessage('Power off droplet #' . $this->vmId);
121
+        $this->addMessage('Power off droplet #'.$this->vmId);
122 122
 
123 123
         $this->waitForEvent($powerOff->event_id);
124 124
 
125
-        $this->addMessage('Current status: ' . $dropletInfo->droplet->status);
125
+        $this->addMessage('Current status: '.$dropletInfo->droplet->status);
126 126
 
127 127
         $resizeDroplet = $droplets->resize(
128 128
             $this->vmId,
129 129
             array('size_id' => intval($sizeId))
130 130
         );
131
-        $this->addMessage('Resize droplet to size id: ' . $sizeId);
131
+        $this->addMessage('Resize droplet to size id: '.$sizeId);
132 132
         $this->waitForEvent($resizeDroplet->event_id);
133 133
 
134 134
         $powerOn = $droplets->powerOn($this->vmId);
135 135
         $this->waitForEvent($powerOn->event_id);
136
-        $this->addMessage('Power on droplet #' . $this->vmId);
136
+        $this->addMessage('Power on droplet #'.$this->vmId);
137 137
 
138 138
     }
139 139
 
Please login to merge, or discard this patch.
plugin/dashboard/block_course/block_course.class.php 1 patch
Spacing   +14 added lines, -14 removed lines patch added patch discarded remove patch
@@ -63,19 +63,19 @@  discard block
 block discarded – undo
63 63
         $content = $this->get_content_html();
64 64
         $html = '
65 65
 		            <div class="panel panel-default" id="intro">
66
-		                <div class="panel-heading">' . get_lang('CoursesInformation') . '
66
+		                <div class="panel-heading">' . get_lang('CoursesInformation').'
67 67
 		                    <div class="pull-right"><a class="btn btn-danger btn-xs" onclick="javascript:if(!confirm(\'' . addslashes(
68 68
                 api_htmlentities(
69 69
                     get_lang('ConfirmYourChoice'),
70 70
                     ENT_QUOTES,
71 71
                     $charset
72 72
                 )
73
-            ) . '\')) return false;" href="index.php?action=disable_block&path=' . $this->path . '">
73
+            ).'\')) return false;" href="index.php?action=disable_block&path='.$this->path.'">
74 74
                 <em class="fa fa-times"></em>
75 75
                 </a></div>
76 76
 		                </div>
77 77
 		                <div class="panel-body">
78
-		                   ' . $content . '
78
+		                   ' . $content.'
79 79
 		                </div>
80 80
 		            </div>
81 81
 				';
@@ -93,17 +93,17 @@  discard block
 block discarded – undo
93 93
     {
94 94
         $course_data = $this->get_course_information_data();
95 95
         //$content = '<div style="margin:10px;">';
96
-        $content = '<h4>' . get_lang(
96
+        $content = '<h4>'.get_lang(
97 97
                 'YourCourseList'
98
-            ) . '</h4>';
98
+            ).'</h4>';
99 99
         $data_table = null;
100 100
         if (!empty($course_data)) {
101 101
             $data_table .= '<table class="data_table" width:"95%">';
102 102
             $data_table .= '<tr>
103
-	    						<th>' . get_lang('CourseTitle') . '</th>
104
-	    						<th width="20%">' . get_lang('NbStudents') . '</th>
105
-	    						<th width="20%">' . get_lang('AvgTimeSpentInTheCourse') . '</th>
106
-	    						<th width="20%">' . get_lang('ThematicAdvance') . '</th>
103
+	    						<th>' . get_lang('CourseTitle').'</th>
104
+	    						<th width="20%">' . get_lang('NbStudents').'</th>
105
+	    						<th width="20%">' . get_lang('AvgTimeSpentInTheCourse').'</th>
106
+	    						<th width="20%">' . get_lang('ThematicAdvance').'</th>
107 107
 	    					</tr>';
108 108
             $i = 1;
109 109
             foreach ($course_data as $course) {
@@ -112,12 +112,12 @@  discard block
 block discarded – undo
112 112
                 } else {
113 113
                     $class_tr = 'row_even';
114 114
                 }
115
-                $data_table .= '<tr class="' . $class_tr . '">';
115
+                $data_table .= '<tr class="'.$class_tr.'">';
116 116
                 if (!isset($course[2])) {
117 117
                     $course[2] = '0:00:00';
118 118
                 }
119 119
                 foreach ($course as $cell) {
120
-                    $data_table .= '<td align="right">' . $cell . '</td>';
120
+                    $data_table .= '<td align="right">'.$cell.'</td>';
121 121
                 }
122 122
                 $data_table .= '</tr>';
123 123
                 $i++;
@@ -128,7 +128,7 @@  discard block
 block discarded – undo
128 128
         }
129 129
         $content .= $data_table;
130 130
         if (!empty($course_data)) {
131
-            $content .= '<div style="text-align:right;margin-top:10px;"><a href="' . api_get_path(WEB_CODE_PATH) . 'mySpace/course.php?follow">' . get_lang('SeeMore') . '</a></div>';
131
+            $content .= '<div style="text-align:right;margin-top:10px;"><a href="'.api_get_path(WEB_CODE_PATH).'mySpace/course.php?follow">'.get_lang('SeeMore').'</a></div>';
132 132
         }
133 133
         //$content .= '</div>';
134 134
 
@@ -163,7 +163,7 @@  discard block
 block discarded – undo
163 163
 
164 164
             // students directly subscribed to the course
165 165
             $sql = "SELECT user_id FROM $tbl_course_user as course_rel_user
166
-                    WHERE course_rel_user.status=" . STUDENT . " AND course_rel_user.c_id='$courseId'";
166
+                    WHERE course_rel_user.status=".STUDENT." AND course_rel_user.c_id='$courseId'";
167 167
             $rs = Database::query($sql);
168 168
             $users = array();
169 169
             while ($row = Database::fetch_array($rs)) {
@@ -182,7 +182,7 @@  discard block
 block discarded – undo
182 182
             );
183 183
 
184 184
             if (!empty($tematic_advance)) {
185
-                $tematic_advance_progress = '<a title="' . get_lang('GoToThematicAdvance') . '" href="' . api_get_path(WEB_CODE_PATH) . 'course_progress/index.php?cidReq=' . $course_code . '&action=thematic_details">' . $tematic_advance . '%</a>';
185
+                $tematic_advance_progress = '<a title="'.get_lang('GoToThematicAdvance').'" href="'.api_get_path(WEB_CODE_PATH).'course_progress/index.php?cidReq='.$course_code.'&action=thematic_details">'.$tematic_advance.'%</a>';
186 186
             } else {
187 187
                 $tematic_advance_progress = '0%';
188 188
             }
Please login to merge, or discard this patch.