Browse Source

Minor - Format code

Julio Montoya 6 years ago
parent
commit
e05c96d093

+ 0 - 2
main/admin/add_users_to_usergroup.php

@@ -27,8 +27,6 @@ $interbreadcrumb[] = ['url' => 'usergroups.php', 'name' => get_lang('Classes')];
 // setting the name of the tool
 $tool_name = get_lang('SubscribeUsersToClass');
 
-
-
 $htmlHeadXtra[] = '
 <script>
 

+ 8 - 8
main/inc/lib/course.lib.php

@@ -143,14 +143,14 @@ class CourseManager
     /**
      * Returns a list of courses. Should work with quickform syntax.
      *
-     * @param int    $from           Offset (from the 7th = '6'). Optional.
-     * @param int    $howmany        Number of results we want. Optional.
-     * @param int    $orderby        The column we want to order it by. Optional, defaults to first column.
-     * @param string $orderdirection The direction of the order (ASC or DESC). Optional, defaults to ASC.
-     * @param int    $visibility     the visibility of the course, or all by default
-     * @param string $startwith      If defined, only return results for which the course *title* begins with this string
-     * @param string $urlId          The Access URL ID, if using multiple URLs
-     * @param bool   $alsoSearchCode An extension option to indicate that we also want to search for course codes (not *only* titles)
+     * @param int    $from               Offset (from the 7th = '6'). Optional.
+     * @param int    $howmany            Number of results we want. Optional.
+     * @param int    $orderby            The column we want to order it by. Optional, defaults to first column.
+     * @param string $orderdirection     The direction of the order (ASC or DESC). Optional, defaults to ASC.
+     * @param int    $visibility         the visibility of the course, or all by default
+     * @param string $startwith          If defined, only return results for which the course *title* begins with this string
+     * @param string $urlId              The Access URL ID, if using multiple URLs
+     * @param bool   $alsoSearchCode     An extension option to indicate that we also want to search for course codes (not *only* titles)
      * @param array  $conditionsLike
      * @param array  $onlyThisCourseList
      *

+ 5 - 6
main/inc/lib/sessionmanager.lib.php

@@ -3149,10 +3149,10 @@ class SessionManager
     /**
      * Get a list of sessions of which the given conditions match with an = 'cond'.
      *
-     * @param array $conditions a list of condition example :
-     *                          array('status' => STUDENT) or
-     *                          array('s.name' => array('operator' => 'LIKE', value = '%$needle%'))
-     * @param array $order_by   a list of fields on which sort
+     * @param array $conditions          a list of condition example :
+     *                                   array('status' => STUDENT) or
+     *                                   array('s.name' => array('operator' => 'LIKE', value = '%$needle%'))
+     * @param array $order_by            a list of fields on which sort
      * @param int   $urlId
      * @param array $onlyThisSessionList
      *
@@ -3222,8 +3222,7 @@ class SessionManager
         if (!empty($onlyThisSessionList)) {
             $onlyThisSessionList = array_map('intval', $onlyThisSessionList);
             $onlyThisSessionList = implode("','", $onlyThisSessionList);
-            $sql_query .=" AND s.id IN ('$onlyThisSessionList') ";
-
+            $sql_query .= " AND s.id IN ('$onlyThisSessionList') ";
         }
 
         $orderAvailableList = ['name'];

+ 2 - 3
main/inc/lib/usergroup.lib.php

@@ -1062,7 +1062,6 @@ class UserGroup extends Model
             $sql = "SELECT * FROM $this->table WHERE name = '".$name."'";
         }
 
-
         $res = Database::query($sql);
 
         return Database::num_rows($res) != 0;
@@ -1170,12 +1169,12 @@ class UserGroup extends Model
                     ON (u.id = a.usergroup_id)";
             $options = ['where' => ['access_url_id = ? ' => $urlId]];
             if ($this->allowTeachers()) {
-                $options['where'] = [ ' author_id = ? ' => api_get_user_id()];
+                $options['where'] = [' author_id = ? ' => api_get_user_id()];
             }
             $classes = Database::select('a.id, name, description', $from, $options);
         } else {
             if ($this->allowTeachers()) {
-                $options['where'] = [ ' author_id = ? ' => api_get_user_id()];
+                $options['where'] = [' author_id = ? ' => api_get_user_id()];
             }
             $classes = Database::select('id, name, description', $this->table, $options);
         }

+ 4 - 4
main/inc/lib/usermanager.lib.php

@@ -1651,10 +1651,10 @@ class UserManager
     /**
      * Get a list of users of which the given conditions match with a LIKE '%cond%'.
      *
-     * @param array  $conditions  a list of condition (exemple : status=>STUDENT)
-     * @param array  $order_by    a list of fields on which sort
-     * @param bool   $simple_like Whether we want a simple LIKE 'abc' or a LIKE '%abc%'
-     * @param string $condition   Whether we want the filters to be combined by AND or OR
+     * @param array  $conditions       a list of condition (exemple : status=>STUDENT)
+     * @param array  $order_by         a list of fields on which sort
+     * @param bool   $simple_like      Whether we want a simple LIKE 'abc' or a LIKE '%abc%'
+     * @param string $condition        Whether we want the filters to be combined by AND or OR
      * @param array  $onlyThisUserList
      *
      * @return array an array with all users of the platform

+ 2 - 3
plugin/lp_calendar/LpCalendarPlugin.php

@@ -36,7 +36,6 @@ class LpCalendarPlugin extends Plugin
     }
 
     /**
-     *
      * @return array
      */
     public function getEventTypeColorList()
@@ -732,7 +731,7 @@ class LpCalendarPlugin extends Plugin
         if (!empty($courseAndSessionList)) {
             $completed = $this->getItemCountChecked($userId, $courseAndSessionList);
             //if ($takenCount > $completed) {
-                $diff = $takenCount - $completed;
+            $diff = $takenCount - $completed;
             //}
         }
 
@@ -803,7 +802,7 @@ class LpCalendarPlugin extends Plugin
     }
 
     /**
-     * @param int $calendarId
+     * @param int    $calendarId
      * @param string $startDate
      */
     public function toogleDayType($calendarId, $startDate)

+ 1 - 1
plugin/lp_calendar/calendar_users.php

@@ -46,7 +46,7 @@ $column_model = [
         'index' => 'exam',
         'width' => '20',
         'align' => 'center',
-        'sortable' => 'false'
+        'sortable' => 'false',
     ],
 ];
 

+ 0 - 1
plugin/lp_calendar/lang/english.php

@@ -13,4 +13,3 @@ $strings['DifferenceOfDaysAndCalendar'] = 'Difference of days and calendar';
 $strings['EventTypeTaken'] = 'Taken';
 $strings['EventTypeExam'] = 'Exam';
 $strings['EventTypeFree'] = 'Free';
-

+ 1 - 1
plugin/lp_calendar/lang/french.php

@@ -11,4 +11,4 @@ $strings['NumberDaysInRetard'] = "Nombre de jour de retard ou d'avance à la dat
 $strings['DifferenceOfDaysAndCalendar'] = 'Différence de nombre de jours avec le plan issu du learning_calendar';
 $strings['EventTypeTaken'] = 'Occupé';
 $strings['EventTypeExam'] = 'Examen';
-$strings['EventTypeFree'] = 'Libre';
+$strings['EventTypeFree'] = 'Libre';