Completed
Pull Request — 1.11.x (#1599)
by José
28:19
created
main/auth/shibboleth/lib/store.class.php 1 patch
Spacing   +3 added lines, -3 removed lines patch added patch discarded remove patch
@@ -246,9 +246,9 @@  discard block
 block discarded – undo
246 246
 
247 247
         $db_name = $this->get_db_name($object);
248 248
         $sql = "INSERT INTO `{$db_name}`.`{$this->table_name}` ";
249
-        $sql .= ' (' . join(', ', $keys) . ') ';
249
+        $sql .= ' ('.join(', ', $keys).') ';
250 250
         $sql .= 'VALUES';
251
-        $sql .= ' (' . join(', ', $values) . ') ';
251
+        $sql .= ' ('.join(', ', $values).') ';
252 252
 
253 253
         $result = $this->execute($sql);
254 254
         if ($result)
@@ -295,7 +295,7 @@  discard block
 block discarded – undo
295 295
         $items = array();
296 296
         foreach ($args as $key => $val)
297 297
         {
298
-            $items[] = $key . ' = ' . $this->format_value($val);
298
+            $items[] = $key.' = '.$this->format_value($val);
299 299
         }
300 300
         return implode(' AND ', $items);
301 301
     }
Please login to merge, or discard this patch.
main/badge/assertion.php 1 patch
Spacing   +2 added lines, -2 removed lines patch added patch discarded remove patch
@@ -41,10 +41,10 @@
 block discarded – undo
41 41
         'identity' => $user['email']
42 42
     ),
43 43
     'issuedOn' => strtotime($userSkill['acquired_skill_at']),
44
-    'badge' => api_get_path(WEB_CODE_PATH) . "badge/class.php?id=$skillId",
44
+    'badge' => api_get_path(WEB_CODE_PATH)."badge/class.php?id=$skillId",
45 45
     'verify' => array(
46 46
         'type' => 'hosted',
47
-        'url' => api_get_path(WEB_CODE_PATH) . "badge/assertion.php?" . http_build_query(array(
47
+        'url' => api_get_path(WEB_CODE_PATH)."badge/assertion.php?".http_build_query(array(
48 48
             'user' => $userId,
49 49
             'skill' => $skillId,
50 50
             'course' => $courseId,
Please login to merge, or discard this patch.
main/badge/class.php 1 patch
Spacing   +3 added lines, -3 removed lines patch added patch discarded remove patch
@@ -17,9 +17,9 @@
 block discarded – undo
17 17
 $json = array(
18 18
     'name' => $skill['name'],
19 19
     'description' => $skill['description'],
20
-    'image' => api_get_path(WEB_UPLOAD_PATH) . "badges/{$skill['icon']}",
21
-    'criteria' => api_get_path(WEB_CODE_PATH) . "badge/criteria.php?id=$skillId",
22
-    'issuer' => api_get_path(WEB_CODE_PATH) . "badge/issuer.php",
20
+    'image' => api_get_path(WEB_UPLOAD_PATH)."badges/{$skill['icon']}",
21
+    'criteria' => api_get_path(WEB_CODE_PATH)."badge/criteria.php?id=$skillId",
22
+    'issuer' => api_get_path(WEB_CODE_PATH)."badge/issuer.php",
23 23
 );
24 24
 
25 25
 echo json_encode($json);
Please login to merge, or discard this patch.
main/badge/criteria.php 1 patch
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -15,7 +15,7 @@
 block discarded – undo
15 15
         Display::return_message(get_lang('SkillNotFound'), 'error')
16 16
     );
17 17
 
18
-    header('Location: ' . api_get_path(WEB_PATH));
18
+    header('Location: '.api_get_path(WEB_PATH));
19 19
     exit;
20 20
 }
21 21
 
Please login to merge, or discard this patch.
main/help/faq.php 1 patch
Spacing   +2 added lines, -2 removed lines patch added patch discarded remove patch
@@ -23,7 +23,7 @@  discard block
 block discarded – undo
23 23
     $form = new FormValidator('set_faq', 'post', 'faq.php?edit=true');
24 24
     $form->addHtmlEditor('faq_content', null, false, false, array('ToolbarSet' => 'FAQ', 'Width' => '100%', 'Height' => '300'));
25 25
     $form->addButtonSave(get_lang('Ok'), 'faq_submit');
26
-    $faq_content = @(string)file_get_contents(api_get_path(SYS_APP_PATH).'home/faq.html');
26
+    $faq_content = @(string) file_get_contents(api_get_path(SYS_APP_PATH).'home/faq.html');
27 27
     $faq_content = api_to_system_encoding($faq_content, api_detect_encoding(strip_tags($faq_content)));
28 28
     $form->setDefaults(array('faq_content' => $faq_content));
29 29
     if ($form->validate()) {
@@ -41,7 +41,7 @@  discard block
 block discarded – undo
41 41
         $form->display();
42 42
     }
43 43
 } else {
44
-	$faq_content = @(string)file_get_contents(api_get_path(SYS_APP_PATH).'home/'.$faq_file);
44
+	$faq_content = @(string) file_get_contents(api_get_path(SYS_APP_PATH).'home/'.$faq_file);
45 45
 	$faq_content = api_to_system_encoding($faq_content, api_detect_encoding(strip_tags($faq_content)));
46 46
 	echo $faq_content;
47 47
 }
Please login to merge, or discard this patch.
main/reports/reports.lib.php 1 patch
Spacing   +3 added lines, -3 removed lines patch added patch discarded remove patch
@@ -3,11 +3,11 @@  discard block
 block discarded – undo
3 3
 require_once '../inc/global.inc.php';
4 4
 
5 5
 
6
-define ('REPORTS_PROGRESS_COMPLETED', 1);
6
+define('REPORTS_PROGRESS_COMPLETED', 1);
7 7
 
8 8
 $reports_modules = array();
9 9
 
10
-$reports_enabled_modules = array('quiz','course','scorm');
10
+$reports_enabled_modules = array('quiz', 'course', 'scorm');
11 11
 
12 12
 $reports_enabled_templates = array('exercicesMultiCourses', 'courseTime', 'courseArticulate');
13 13
 
@@ -158,7 +158,7 @@  discard block
 block discarded – undo
158 158
 
159 159
 // return a sql clause returning triplet of (course, $session, $uid) the
160 160
 // current user is authorized to reed
161
-function reports_getVisibilitySQL () {
161
+function reports_getVisibilitySQL() {
162 162
 	return "select cru.user_id from ".Database::get_main_table(TABLE_MAIN_COURSE_USER).' cru';
163 163
 	// fixme sessions
164 164
 }
Please login to merge, or discard this patch.
main/reports/index.php 1 patch
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -22,7 +22,7 @@
 block discarded – undo
22 22
 $this_section = SECTION_REPORTS;
23 23
 
24 24
 // setting the name of the tool
25
-$tool_name=get_lang('Reports');
25
+$tool_name = get_lang('Reports');
26 26
 
27 27
 // Displaying the header
28 28
 foreach (array('jquery.ba-bbq.min.js', 'jquery.validate.js', 'jquery.form.js', 'jquery.form.wizard.js', 'jquery.dataTables.min.js') as $js)
Please login to merge, or discard this patch.
main/reports/multiquery.lib.php 1 patch
Spacing   +6 added lines, -6 removed lines patch added patch discarded remove patch
@@ -4,20 +4,20 @@  discard block
 block discarded – undo
4 4
 function multiquery_query($array) {
5 5
 	$result = array();
6 6
 	$field = 0;
7
-	for ($i = 0; $i <sizeof($array); $i++) {
7
+	for ($i = 0; $i < sizeof($array); $i++) {
8 8
 		// mysql handler
9 9
 		$result[$i]['mysql'] = mysql_query($array[$i]);
10 10
 
11
-		if (! $result[$i]['mysql'])
11
+		if (!$result[$i]['mysql'])
12 12
 			die("error in query $i : ".$array[$i]);
13 13
 
14 14
 		// fields
15 15
 		$result[$i]['num_fields'] = mysql_num_fields($result[$i]['mysql']);
16 16
 		for ($j = 0; $j < $result[$i]['num_fields']; $j++) {
17 17
 			$name = mysql_field_name($result[$i]['mysql'], $j);
18
-			$result['field'][$field]['query']=$i;
19
-			$result['field'][$field]['name']=$name;
20
-			$result['field'][$field]['id']=$j;
18
+			$result['field'][$field]['query'] = $i;
19
+			$result['field'][$field]['name'] = $name;
20
+			$result['field'][$field]['id'] = $j;
21 21
 			$result['field_assoc'][$name][$field];
22 22
 			$field++;
23 23
 		}
@@ -25,7 +25,7 @@  discard block
 block discarded – undo
25 25
 	$result['num_queries'] = sizeof($array);
26 26
 	// rows
27 27
 	$numberOfResult = mysql_num_rows($result[0]['mysql']);
28
-	for ($i = 1; $i <$result['num_queries']; $i++) 
28
+	for ($i = 1; $i < $result['num_queries']; $i++) 
29 29
 		if ($numberOfResult != mysql_num_rows($result[$i]['mysql']))
30 30
 			die("wrong number of row: $numberOfResult vs ".
31 31
 				mysql_num_rows($result[$i]['mysql'])." on query $i");
Please login to merge, or discard this patch.
main/reports/modules/quiz.php 1 patch
Spacing   +2 added lines, -2 removed lines patch added patch discarded remove patch
@@ -1,6 +1,6 @@  discard block
 block discarded – undo
1 1
 <?php 
2 2
 
3
-$reports_modules['quiz'] = array ();
3
+$reports_modules['quiz'] = array();
4 4
 
5 5
 
6 6
 function reports_modules_quiz_init() {
@@ -28,6 +28,6 @@  discard block
 block discarded – undo
28 28
 			REPORTS_PROGRESS_COMPLETED.' as progress, '.
29 29
 			'exe_duration as time, exe_date as ts from '.
30 30
 			Database::get_main_table(TABLE_STATISTIC_TRACK_E_EXERCISES).
31
-			' where c_id = ' . $courseId .
31
+			' where c_id = '.$courseId.
32 32
 			' and exe_exo_id='.$quiz['child_id']);
33 33
 }
Please login to merge, or discard this patch.