Prechádzať zdrojové kódy

Minor - format code.

jmontoyaa 7 rokov pred
rodič
commit
7652716cca

+ 14 - 9
custompages/language.inc.php

@@ -2,7 +2,8 @@
 /* For licensing terms, see /license.txt */
 /**
  * CustomPages : Browser language detection
- * Include this file in your custom page if you want to set the language variable of the Chamilo session to the best pick according to the visitor's browser's options.
+ * Include this file in your custom page if you want to set the language variable of the Chamilo session
+ * to the best pick according to the visitor's browser's options.
  * 2011, Jean-Karim Bockstael, CBlue <jeankarim@cblue.be>
  * This requires the Chamilo system to be initialized
  * (note that it's easier to do the following include in the parent page)
@@ -12,12 +13,13 @@
  * Returns the best match between available languages and visitor preferences
  * @return string the best match as 2-chars code, null when none match
 */
-function get_preferred_language($available_langs) {
+function get_preferred_language($available_langs)
+{
     // Parsing the Accept-languages HTTP header
     $langs = array();
     foreach (explode(',', $_SERVER['HTTP_ACCEPT_LANGUAGE']) as $httplang) {
         $rawlang = explode(';q=', $httplang);
-        if (strpos($rawlang[0], '-') !== FALSE) {
+        if (strpos($rawlang[0], '-') !== false) {
             // We ignore the locale part, as in en-GB vs en-US
             $rawlang[0] = substr($rawlang[0], 0, strpos($rawlang[0], '-'));
         }
@@ -29,18 +31,21 @@ function get_preferred_language($available_langs) {
     krsort($langs, SORT_NUMERIC);
     // Choosing the best match
     foreach ($langs as $weight => $codes) {
-		foreach ($codes as $code) {
-        	if (in_array($code, $available_langs)) {
-            	return $code;
-        	}
-		}
+        foreach ($codes as $code) {
+            if (in_array($code, $available_langs)) {
+                return $code;
+            }
+        }
     }
+
     // No match
     return null;
 }
+
 /**
  * Get a language variable in a specific language
  */
-function custompages_get_lang($variable) {
+function custompages_get_lang($variable)
+{
     return get_lang($variable, null, $_SESSION['user_language_choice']);
 }

+ 3 - 3
main/admin/dashboard_add_courses_to_user.php

@@ -2,9 +2,9 @@
 /* For licensing terms, see /license.txt */
 
 /**
-*	Interface for assigning courses to Human Resources Manager
-*	@package chamilo.admin
-*/
+ * Interface for assigning courses to Human Resources Manager
+ * @package chamilo.admin
+ */
 // resetting the course id
 $cidReset = true;
 

+ 9 - 11
main/admin/sub_language_ajax.inc.php

@@ -15,18 +15,16 @@ api_protect_admin_script();
 $new_language = Security::remove_XSS($_REQUEST['new_language']);
 $language_variable = Security::remove_XSS($_REQUEST['variable_language']);
 $file_id = intval($_REQUEST['file_id']);
-/**
- * Code
- */
+
 if (isset($new_language) && isset($language_variable) && isset($file_id)) {
-    $file_language           = $language_files_to_load[$file_id].'.inc.php';
-    $id_language             = intval($_REQUEST['id']);
-    $sub_language_id         = intval($_REQUEST['sub']);
-    $all_data_of_language    = SubLanguageManager::get_all_information_of_sub_language($id_language, $sub_language_id);
+    $file_language = $language_files_to_load[$file_id].'.inc.php';
+    $id_language = intval($_REQUEST['id']);
+    $sub_language_id = intval($_REQUEST['sub']);
+    $all_data_of_language = SubLanguageManager::get_all_information_of_sub_language($id_language, $sub_language_id);
 
-    $path_folder             = api_get_path(SYS_LANG_PATH).$all_data_of_language['dokeos_folder'].'/'.$file_language;
-    $all_file_of_directory   = SubLanguageManager::get_all_language_variable_in_file($path_folder);
-    $return_value            = SubLanguageManager::add_file_in_language_directory($path_folder);
+    $path_folder = api_get_path(SYS_LANG_PATH).$all_data_of_language['dokeos_folder'].'/'.$file_language;
+    $all_file_of_directory = SubLanguageManager::get_all_language_variable_in_file($path_folder);
+    $return_value = SubLanguageManager::add_file_in_language_directory($path_folder);
 
     //update variable language
     // Replace double quotes to avoid parse errors
@@ -36,7 +34,7 @@ if (isset($new_language) && isset($language_variable) && isset($file_id)) {
     $all_file_of_directory[$language_variable] = "\"".$new_language."\";";
     $result_array = array();
 
-    foreach ($all_file_of_directory as $key_value=>$value_info) {
+    foreach ($all_file_of_directory as $key_value => $value_info) {
         $result_array[$key_value] = SubLanguageManager::write_data_in_file($path_folder, $value_info, $key_value);
     }
     $variables_with_problems = '';

+ 12 - 12
main/group/tutor_settings.php

@@ -2,13 +2,13 @@
 /* For licensing terms, see /license.txt */
 
 /**
- *	This script displays an area where teachers can edit the group properties and member list.
- *	Groups are also often called "teams" in the Dokeos code.
+ * This script displays an area where teachers can edit the group properties and member list.
+ * Groups are also often called "teams" in the Dokeos code.
  *
- *	@author various contributors
- *	@author Roan Embrechts (VUB), partial code cleanup, initial virtual course support
- *	@package chamilo.group
- *	@todo course admin functionality to create groups based on who is in which course (or class).
+ * @author various contributors
+ * @author Roan Embrechts (VUB), partial code cleanup, initial virtual course support
+ * @package chamilo.group
+ * @todo course admin functionality to create groups based on who is in which course (or class).
  */
 
 require_once __DIR__.'/../inc/global.inc.php';
@@ -146,16 +146,16 @@ if (!empty($complete_user_list)) {
             }
 
             $name = api_get_person_name(
-                    $user['firstname'],
-                    $user['lastname']
-                ).' ('.$user['username'].')'.$officialCode;
+                $user['firstname'],
+                $user['lastname']
+            ).' ('.$user['username'].')'.$officialCode;
 
             if ($orderUserListByOfficialCode === 'true') {
                 $officialCode = !empty($user['official_code']) ? $user['official_code']." - " : '? - ';
                 $name = $officialCode.' '.api_get_person_name(
-                        $user['firstname'],
-                        $user['lastname']
-                    ).' ('.$user['username'].')';
+                    $user['firstname'],
+                    $user['lastname']
+                ).' ('.$user['username'].')';
             }
 
             $possible_users[$user['user_id']] = $name.$groupNameListToString;

+ 3 - 3
main/help/faq.php

@@ -2,15 +2,15 @@
 /* For licensing terms, see /license.txt */
 
 /**
- *	This script displays a help window.
+ * This script displays a help window.
  *
- *	@package chamilo.help
+ * @package chamilo.help
  */
 
 require_once __DIR__.'/../inc/global.inc.php';
 $help_name = isset($_GET['open']) ? Security::remove_XSS($_GET['open']) : null;
 
-Display :: display_header(get_lang('Faq'));
+Display::display_header(get_lang('Faq'));
 
 if (api_is_platform_admin()) {
     echo '&nbsp;<a href="faq.php?edit=true">'.Display::return_icon('edit.png').'</a>';

+ 0 - 3
main/inc/ajax/lp.ajax.php

@@ -296,7 +296,6 @@ switch ($action) {
 }
 exit;
 
-
 /*
  * Classes to create a special data structure to manipulate LP Items
  * used only in this file
@@ -351,7 +350,6 @@ class LP_item_order_list
             }
         }
     }
-
 }
 
 class LP_item_order_item
@@ -367,5 +365,4 @@ class LP_item_order_item
         $this->id = $in_id;
         $this->parent_item_id = $in_parent_id;
     }
-
 }

+ 22 - 23
main/inc/lib/array.lib.php

@@ -1,12 +1,11 @@
 <?php
 /* For licensing terms, see /license.txt */
 /**
-*	This is the array library for Chamilo.
-*	Include/require it in your code to use its functionality.
-*
-*	@package chamilo.library
-*/
-
+ * This is the array library for Chamilo.
+ * Include/require it in your code to use its functionality.
+ *
+ * @package chamilo.library
+ */
 
 /**
  * Removes duplicate values from a dimensional array
@@ -108,24 +107,24 @@ function array_walk_recursive_limited(
  */
 function utf8_sort($array)
 {
-	$old_locale = setlocale(LC_ALL, null);
-	$code = api_get_language_isocode();
-	$locale_list = array($code.'.utf8', 'en.utf8', 'en_US.utf8', 'en_GB.utf8');
-	$try_sort = false;
+    $old_locale = setlocale(LC_ALL, null);
+    $code = api_get_language_isocode();
+    $locale_list = array($code.'.utf8', 'en.utf8', 'en_US.utf8', 'en_GB.utf8');
+    $try_sort = false;
 
-	foreach ($locale_list as $locale) {
-		$my_local = setlocale(LC_COLLATE, $locale);
-		if ($my_local) {
-			$try_sort = true;
-			break;
-		}
-	}
+    foreach ($locale_list as $locale) {
+        $my_local = setlocale(LC_COLLATE, $locale);
+        if ($my_local) {
+            $try_sort = true;
+            break;
+        }
+    }
 
-	if ($try_sort) {
-		uasort($array, 'strcoll');
-	}
-	setlocale(LC_COLLATE, $old_locale);
-	return $array;
+    if ($try_sort) {
+        uasort($array, 'strcoll');
+    }
+    setlocale(LC_COLLATE, $old_locale);
+    return $array;
 }
 
 /**
@@ -151,7 +150,7 @@ function array_flatten(array $array)
     $flatten = array();
     array_walk_recursive(
         $array,
-        function($value) use (&$flatten) {
+        function ($value) use (&$flatten) {
             $flatten[] = $value;
         }
     );

+ 3 - 2
main/webservices/cm_webservice_inbox.php

@@ -188,7 +188,7 @@ class WSCMInbox extends WSCM
             $table_message = Database::get_main_table(TABLE_MESSAGE);
 
             $query = "INSERT INTO $table_message(user_sender_id, user_receiver_id, msg_status, send_date, title, content, group_id, parent_id, update_date ) ".
-                           " VALUES ('$user_sender_id', '$receiver_user_id', '1', '".api_get_utc_datetime()."','$subject','$content','$group_id','$parent_id', '".api_get_utc_datetime()."')";
+                     " VALUES ('$user_sender_id', '$receiver_user_id', '1', '".api_get_utc_datetime()."','$subject','$content','$group_id','$parent_id', '".api_get_utc_datetime()."')";
             Database::query($query);
 
             $query = "INSERT INTO $table_message(user_sender_id, user_receiver_id, msg_status, send_date, title, content, group_id, parent_id, update_date ) ".
@@ -207,7 +207,8 @@ class WSCMInbox extends WSCM
     protected function set_message_as_read($user_id, $message_id)
     {
         $table_message = Database::get_main_table(TABLE_MESSAGE);
-        $query = "UPDATE $table_message SET msg_status = '".MESSAGE_STATUS_NEW."' WHERE user_receiver_id=".$user_id." AND id='".$message_id."';";
+        $query = "UPDATE $table_message SET msg_status = '".MESSAGE_STATUS_NEW."' 
+                  WHERE user_receiver_id=".$user_id." AND id='".$message_id."';";
         Database::query($query);
     }
 }

+ 36 - 28
main/wiki/diff.inc.php

@@ -15,9 +15,7 @@
  *
  * @package Wiki
  */
-/**
- * Code
- */
+
 define("DIFF_EQUAL", "=");
 define("DIFF_ADDED", "+");
 define("DIFF_DELETED", "-");
@@ -69,28 +67,21 @@ function diff(
 
     for ($i = 0; $i < $max; $i++) {
         // line changed
-        if (isset ($deleted[$i]) && isset($added[$i])) {
+        if (isset($deleted[$i]) && isset($added[$i])) {
             $output .= $format_line_function($i, DIFF_DELETED, $deleted[$i]);
             $output .= $format_line_function($i, DIFF_ADDED, $added[$i]);
-
-        } // line deleted
-        elseif (isset ($deleted[$i]) && !isset ($added[$i])) {
+        } elseif (isset($deleted[$i]) && !isset($added[$i])) {
+            // line deleted
             $output .= $format_line_function($i, DIFF_DELETED, $deleted[$i]);
-
-        } // line added
-        elseif (isset ($added[$i]) && !isset ($deleted[$i])) {
+        } elseif (isset($added[$i]) && !isset($deleted[$i])) {
+            // line added
             $output .= $format_line_function($i, DIFF_ADDED, $added[$i]);
-
-        } // line moved
-        elseif (isset ($moved[$i])) {
+        } elseif (isset($moved[$i])) {
+            // line moved
             $output .= $format_line_function($i, DIFF_MOVED, $newArr[$i]);
-
-        } // line unchanged
-        elseif ($show_equals) {
+        } elseif ($show_equals) {
+            // line unchanged
             $output .= $format_line_function($i, DIFF_EQUAL, $newArr[$i]);
-
-        } else {
-            // skip
         }
     }
 
@@ -168,20 +159,37 @@ function format_table_line($line, $type, $value, $skip_empty = false)
 
     switch ($type) {
         case DIFF_EQUAL:
-            //return '<tr><td>' . $line. '&nbsp;:&nbsp;' . '&nbsp;=</td><td><span class="diffEqual" >'                    . $value . '</span></td></tr>' . "\n"; //juan carlos comentado
-            return '<tr><td></td><td bgcolor="#FFFFFF">'.$value.'</td></tr>'."\n"; //juan carlos muestra solo color (no tambi�n la l�nea). Adem�s EN IEXPLORER VA BIEN PERO EN FIREFOX 3 la etiqueta span no muestra el color de fondo que est� definido en la hoja de estilos como background-color, aceptando s�lo la propiedad color pero esta solo da color al texto con lo cual los cambios quedan poco resaltados, adem�s los cambios de otros objetos que no sean texto no se indican por ej. a�adir una imagen, por esta raz�n doy el color de fondo al td directamente.
+            return '<tr><td></td><td bgcolor="#FFFFFF">'.$value.'</td></tr>'."\n";
+            //juan carlos muestra solo color (no tambi�n la l�nea).
+            // Adem�s EN IEXPLORER VA BIEN PERO EN FIREFOX 3 la etiqueta span no muestra el color de fondo que
+            // est� definido en la hoja de estilos como background-color, aceptando s�lo la propiedad color
+            // pero esta solo da color al texto con lo cual los cambios quedan poco resaltados, adem�s
+            // los cambios de otros objetos que no sean texto no se indican por ej. a�adir una imagen,
+            // por esta raz�n doy el color de fondo al td directamente.
             break;
         case DIFF_MOVED:
-            // return '<tr><td>' . $line. '&nbsp;:&nbsp;' . '&nbsp;M</td><td><span class="diffMoved" >'                    . $value . '</span></td></tr>' . "\n" //juan carlos comenta
-
-            return '<tr><td></td><td bgcolor="#FFFFAA">'.$value.'</td></tr>'."\n"; //juan carlos muestra solo color (no tambi�n la l�nea). Adem�s EN IEXPLORER VA BIEN PERO EN FIREFOX 3 la etiqueta span no muestra el color de fondo que est� definido en la hoja de estilos como background-color, aceptando s�lo la propiedad color pero esta solo da color al texto con lo cual los cambios quedan poco resaltados, adem�s los cambios de otros objetos que no sean texto no se indican por ej. a�adir una imagen, por esta raz�n doy el color de fondo al td directamente.
+            return '<tr><td></td><td bgcolor="#FFFFAA">'.$value.'</td></tr>'."\n";
+            //juan carlos muestra solo color (no tambi�n la l�nea). Adem�s EN IEXPLORER VA BIEN PERO EN FIREFOX 3
+            // la etiqueta span no muestra el color de fondo que est� definido en la hoja de estilos como
+            // background-color, aceptando s�lo la propiedad color pero esta solo da color al texto con lo cual
+            // los cambios quedan poco resaltados, adem�s los cambios de otros objetos que no sean texto no se indican
+            // por ej. a�adir una imagen, por esta raz�n doy el color de fondo al td directamente.
             break;
         case DIFF_ADDED:
-            // return '<tr><td>' . $line. '&nbsp;:&nbsp;' . '&nbsp;+</td><td><span class="diffAdded" >'                    . $value . '</span></td></tr>' . "\n" ; //juan carlos comentado
-            return '<tr><td></td><td bgcolor="#CCFFCC">'.$value.'</td></tr>'."\n"; //juan carlos muestra solo color (no tambi�n la l�nea). Adem�s EN IEXPLORER VA BIEN PERO EN FIREFOX 3 la etiqueta span no muestra el color de fondo que est� definido en la hoja de estilos como background-color, aceptando s�lo la propiedad color pero esta solo da color al texto con lo cual los cambios quedan poco resaltados, adem�s los cambios de otros objetos que no sean texto no se indican por ej. a�adir una imagen, por esta raz�n doy el color de fondo al td directamente.
+            return '<tr><td></td><td bgcolor="#CCFFCC">'.$value.'</td></tr>'."\n";
+            //juan carlos muestra solo color (no tambi�n la l�nea). Adem�s EN IEXPLORER VA BIEN
+            // PERO EN FIREFOX 3 la etiqueta span no muestra el color de fondo que est� definido en la
+            // hoja de estilos como background-color, aceptando s�lo la propiedad color pero esta solo
+            // da color al texto con lo cual los cambios quedan poco resaltados, adem�s los cambios de
+            // otros objetos que no sean texto no se indican por ej. a�adir una imagen, por esta raz�n
+            // doy el color de fondo al td directamente.
             break;
         case DIFF_DELETED:
-            // return '<tr><td>' . $line. '&nbsp;:&nbsp;' . '&nbsp;-</td><td><span class="diffDeleted" >'                    . $value . '</span></td></tr>' . "\n" ; //juan carlos comentado
-            return '<tr><td></td><td bgcolor="#FFAAAA">'.$value.'</td></tr>'."\n"; //juan carlos muestra solo color (no tambi�n la l�nea). Adem�s EN IEXPLORER VA BIEN PERO EN FIREFOX 3 la etiqueta span no muestra el color de fondo que est� definido en la hoja de estilos como background-color, aceptando s�lo la propiedad color pero esta solo da color al texto con lo cual los cambios quedan poco resaltados, adem�s los cambios de otros objetos que no sean texto no se indican por ej. a�adir una imagen, por esta raz�n doy el color de fondo al td directamente.
+            return '<tr><td></td><td bgcolor="#FFAAAA">'.$value.'</td></tr>'."\n";
+            //juan carlos muestra solo color (no tambi�n la l�nea). Adem�s EN IEXPLORER VA BIEN PERO EN FIREFOX 3
+        // la etiqueta span no muestra el color de fondo que est� definido en la hoja de estilos como background-color,
+        // aceptando s�lo la propiedad color pero esta solo da color al texto con lo cual los cambios quedan poco
+        // resaltados, adem�s los cambios de otros objetos que no sean texto no se indican por ej. a�adir una imagen,
+        // por esta raz�n doy el color de fondo al td directamente.
     }
 }

+ 16 - 38
main/wiki/wiki.inc.php

@@ -129,8 +129,8 @@ class Wiki
                 unset($input_array[$key + 1]);
                 //replace blank spaces by _ within the links. But to remove links at the end add a blank space
                 $all_links[] = Database::escape_string(
-                        str_replace(' ', '_', $link)
-                    ).' ';
+                    str_replace(' ', '_', $link)
+                ).' ';
             }
         }
         $output = implode($all_links);
@@ -263,19 +263,9 @@ class Wiki
                     strtolower(str_replace(' ', '_', $link))
                 )) {
                     $link = api_html_entity_decode($link);
-                    $input_array[$key] = '<a href="'.api_get_path(
-                            WEB_PATH
-                        ).'main/wiki/index.php?'.api_get_cidreq(
-                        ).'&action=addnew&amp;title='.Security::remove_XSS(
-                            $link
-                        ).'&group_id='.$groupId.'" class="new_wiki_link">'.$title.'</a>';
+                    $input_array[$key] = '<a href="'.api_get_path(WEB_PATH).'main/wiki/index.php?'.api_get_cidreq().'&action=addnew&amp;title='.Security::remove_XSS($link).'&group_id='.$groupId.'" class="new_wiki_link">'.$title.'</a>';
                 } else {
-                    $input_array[$key] = '<a href="'.api_get_path(
-                            WEB_PATH
-                        ).'main/wiki/index.php?'.api_get_cidreq(
-                        ).'&action=showpage&amp;title='.urlencode(
-                            strtolower(str_replace(' ', '_', $link))
-                        ).'&group_id='.$groupId.'" class="wiki_link">'.$title.'</a>';
+                    $input_array[$key] = '<a href="'.api_get_path(WEB_PATH).'main/wiki/index.php?'.api_get_cidreq().'&action=showpage&amp;title='.urlencode(strtolower(str_replace(' ', '_', $link))).'&group_id='.$groupId.'" class="wiki_link">'.$title.'</a>';
                 }
                 unset($input_array[$key - 1]);
                 unset($input_array[$key + 1]);
@@ -1248,8 +1238,7 @@ class Wiki
                     )
                 ) {
                     // menu discuss page
-                    $actionsRight .= '<a href="index.php?'.api_get_cidreq(
-                        ).'&action=discuss&title='.api_htmlentities(
+                    $actionsRight .= '<a href="index.php?'.api_get_cidreq().'&action=discuss&title='.api_htmlentities(
                             urlencode($page)
                         ).'" '.self::is_active_navigation_tab('discuss').'>'.
                         Display::return_icon(
@@ -1261,8 +1250,7 @@ class Wiki
                 }
 
                 //menu history
-                $actionsRight .= '<a href="index.php?'.api_get_cidreq(
-                    ).'&action=history&title='.api_htmlentities(
+                $actionsRight .= '<a href="index.php?'.api_get_cidreq().'&action=history&title='.api_htmlentities(
                         urlencode($page)
                     ).'" '.self::is_active_navigation_tab('history').'>'.
                     Display::return_icon(
@@ -1272,8 +1260,7 @@ class Wiki
                         ICON_SIZE_MEDIUM
                     ).'</a>';
                 //menu linkspages
-                $actionsRight .= '<a href="index.php?'.api_get_cidreq(
-                    ).'action=links&title='.api_htmlentities(
+                $actionsRight .= '<a href="index.php?'.api_get_cidreq().'action=links&title='.api_htmlentities(
                         urlencode($page)
                     ).'" '.self::is_active_navigation_tab('links').'>'.
                     Display::return_icon(
@@ -1287,8 +1274,7 @@ class Wiki
                 if (api_is_allowed_to_edit(false, true) ||
                     api_is_platform_admin()
                 ) {
-                    $actionsRight .= '<a href="index.php?action=delete&'.api_get_cidreq(
-                        ).'&title='.api_htmlentities(
+                    $actionsRight .= '<a href="index.php?action=delete&'.api_get_cidreq().'&title='.api_htmlentities(
                             urlencode($page)
                         ).'"'.self::is_active_navigation_tab('delete').'>'.
                         Display::return_icon(
@@ -1299,8 +1285,7 @@ class Wiki
                         ).'</a>';
                 }
 
-                $actionsRight .= '<a href="index.php?'.api_get_cidreq(
-                    ).'&action=showpage&actionpage='.$lock_unlock_notify_page.'&title='.api_htmlentities(
+                $actionsRight .= '<a href="index.php?'.api_get_cidreq().'&action=showpage&actionpage='.$lock_unlock_notify_page.'&title='.api_htmlentities(
                         urlencode($page)
                     ).'">'.
                     $notify_page.'</a>';
@@ -1309,8 +1294,7 @@ class Wiki
                 if (api_is_allowed_to_edit(false, true) ||
                     api_is_platform_admin()
                 ) {
-                    $actionsRight .= '<a href="index.php?'.api_get_cidreq(
-                        ).'&action=export2doc&wiki_id='.$row['id'].'">'.
+                    $actionsRight .= '<a href="index.php?'.api_get_cidreq().'&action=export2doc&wiki_id='.$row['id'].'">'.
                         Display::return_icon(
                             'export_to_documents.png',
                             get_lang('ExportToDocArea'),
@@ -1319,8 +1303,7 @@ class Wiki
                         ).'</a>';
                 }
 
-                $actionsRight .= '<a href="index.php?'.api_get_cidreq(
-                    ).'&action=export_to_pdf&wiki_id='.$row['id'].'">'.
+                $actionsRight .= '<a href="index.php?'.api_get_cidreq().'&action=export_to_pdf&wiki_id='.$row['id'].'">'.
                     Display::return_icon(
                         'pdf.png',
                         get_lang('ExportToPDF'),
@@ -1393,13 +1376,10 @@ class Wiki
                 )
             );
 
-            $footerWiki = get_lang(
-                    'Progress'
-                ).': '.($row['progress'] * 10).'%&nbsp;&nbsp;&nbsp;'.get_lang(
-                    'Rating'
-                ).': '.$row['score'].'&nbsp;&nbsp;&nbsp;'.get_lang(
-                    'Words'
-                ).': '.self::word_count($content);
+            $footerWiki =
+                get_lang('Progress').': '.($row['progress'] * 10).'%&nbsp;&nbsp;&nbsp;'.
+                get_lang('Rating').': '.$row['score'].'&nbsp;&nbsp;&nbsp;'.
+                get_lang('Words').': '.self::word_count($content);
 
             echo Display::panel($pageWiki, $pageTitle, $footerWiki);
         } //end filter visibility
@@ -1771,9 +1751,7 @@ class Wiki
             }
 
             $sql = 'UPDATE '.$tbl_wiki.' SET
-                    addlock_disc="'.Database::escape_string(
-                    $status_addlock_disc
-                ).'"
+                    addlock_disc="'.Database::escape_string($status_addlock_disc).'"
                     WHERE
                         c_id = '.$course_id.' AND
                         reflink = "'.Database::escape_string($page).'" AND

+ 14 - 4
main/work/work.lib.php

@@ -34,7 +34,8 @@ function display_action_links($id, $cur_dir_path, $action)
 
     if (!empty($id)) {
         $display_output .= '<a href="'.api_get_self().'?'.api_get_cidreq().'&id='.$my_back_id.'">'.
-            Display::return_icon('back.png', get_lang('BackToWorksList'), '', ICON_SIZE_MEDIUM).'</a>';
+            Display::return_icon('back.png', get_lang('BackToWorksList'), '', ICON_SIZE_MEDIUM).
+            '</a>';
     }
 
     if (api_is_allowed_to_edit(null, true) && $origin != 'learnpath') {
@@ -3643,7 +3644,12 @@ function setWorkUploadForm($form, $uploadFormType = 0)
     switch ($uploadFormType) {
         case 0:
             // File and text.
-            $form->addElement('file', 'file', get_lang('UploadADocument'), 'size="40" onchange="updateDocumentTitle(this.value)"');
+            $form->addElement(
+                'file',
+                'file',
+                get_lang('UploadADocument'),
+                'size="40" onchange="updateDocumentTitle(this.value)"'
+            );
             $form->addProgress();
             $form->addHtmlEditor('description', get_lang('Description'), false, false, getWorkDescriptionToolbar());
             break;
@@ -3654,7 +3660,12 @@ function setWorkUploadForm($form, $uploadFormType = 0)
             break;
         case 2:
             // Only file.
-            $form->addElement('file', 'file', get_lang('UploadADocument'), 'size="40" onchange="updateDocumentTitle(this.value)"');
+            $form->addElement(
+                'file',
+                'file',
+                get_lang('UploadADocument'),
+                'size="40" onchange="updateDocumentTitle(this.value)"'
+            );
             $form->addProgress();
             $form->addRule('file', get_lang('ThisFieldIsRequired'), 'required');
             break;
@@ -4513,7 +4524,6 @@ function deleteWorkItem($item_id, $courseInfo)
         $count = Database::num_rows($result);
 
         if ($count > 0) {
-
             // If the "considered_working_time" option is enabled, check
             // whether some time should be removed from track_e_course_access
             $consideredWorkingTime = api_get_configuration_value('considered_working_time');

+ 4 - 4
plugin/openmeetings/lib/openmeetings.class.php

@@ -42,10 +42,10 @@ class OpenMeetings
         // initialize video server settings from global settings
         $plugin = \OpenMeetingsPlugin::create();
 
-        $om_plugin = (bool) $plugin->get('tool_enable');
-        $om_host   = $plugin->get('host');
-        $om_user   = $plugin->get('user');
-        $om_pass   = $plugin->get('pass');
+        $om_plugin = (bool)$plugin->get('tool_enable');
+        $om_host = $plugin->get('host');
+        $om_user = $plugin->get('user');
+        $om_pass = $plugin->get('pass');
         $accessUrl = api_get_access_url($_configuration['access_url']);
         $this->externalType = substr($accessUrl['url'], strpos($accessUrl['url'], '://') + 3, -1);
         if (strcmp($this->externalType, 'localhost') == 0) {