Browse Source

Minor - flint fixes

Julio Montoya 6 years ago
parent
commit
25df21a598

+ 0 - 2
main/inc/lib/tracking.lib.php

@@ -6866,8 +6866,6 @@ class Tracking
     }
     }
 }
 }
 
 
-
-
 /**
 /**
  * @todo move into a proper file
  * @todo move into a proper file
  *
  *

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

@@ -98,6 +98,7 @@ class UserGroup extends Model
 
 
                 return $row['count'];
                 return $row['count'];
             }
             }
+
             return 0;
             return 0;
         } else {
         } else {
             $list = [];
             $list = [];
@@ -135,7 +136,7 @@ class UserGroup extends Model
                     $totalTime = 0;
                     $totalTime = 0;
                     foreach ($courseAndSessionList as $sessionId => $course) {
                     foreach ($courseAndSessionList as $sessionId => $course) {
                         foreach ($course as $courseId) {
                         foreach ($course as $courseId) {
-                            $totalTime += Tracking::get_time_spent_on_the_course($userId, $courseId,$sessionId);
+                            $totalTime += Tracking::get_time_spent_on_the_course($userId, $courseId, $sessionId);
                         }
                         }
                     }
                     }
 
 
@@ -146,6 +147,7 @@ class UserGroup extends Model
                 $data['id'] = $data['user_id'];
                 $data['id'] = $data['user_id'];
                 $list[] = $data;
                 $list[] = $data;
             }
             }
+
             return $list;
             return $list;
         }
         }
     }
     }
@@ -2723,7 +2725,7 @@ class UserGroup extends Model
     }
     }
 
 
     /**
     /**
-     * Check permissions and blocks the page
+     * Check permissions and blocks the page.
      */
      */
     public function protectScript()
     public function protectScript()
     {
     {

+ 5 - 5
plugin/lp_calendar/LpCalendarPlugin.php

@@ -96,7 +96,7 @@ class LpCalendarPlugin extends Plugin
             'visible_to_self' => 1,
             'visible_to_self' => 1,
             'changeable' => 1,
             'changeable' => 1,
             'visible_to_others' => 1,
             'visible_to_others' => 1,
-            'field_type' => ExtraField::FIELD_TYPE_CHECKBOX
+            'field_type' => ExtraField::FIELD_TYPE_CHECKBOX,
         ];
         ];
 
 
         $extraField->save($params);
         $extraField->save($params);
@@ -107,7 +107,7 @@ class LpCalendarPlugin extends Plugin
             'visible_to_self' => 1,
             'visible_to_self' => 1,
             'changeable' => 1,
             'changeable' => 1,
             'visible_to_others' => 1,
             'visible_to_others' => 1,
-            'field_type' => ExtraField::FIELD_TYPE_TEXT
+            'field_type' => ExtraField::FIELD_TYPE_TEXT,
         ];
         ];
 
 
         $extraField->save($params);
         $extraField->save($params);
@@ -327,7 +327,7 @@ class LpCalendarPlugin extends Plugin
                 $extraField = new ExtraFieldValue('lp_item');
                 $extraField = new ExtraFieldValue('lp_item');
                 $params = [
                 $params = [
                     'id' => $itemInfo['id'],
                     'id' => $itemInfo['id'],
-                    'value' => $newValue
+                    'value' => $newValue,
                 ];
                 ];
                 $extraField->update($params);
                 $extraField->update($params);
             }
             }
@@ -478,7 +478,6 @@ class LpCalendarPlugin extends Plugin
         return true;
         return true;
     }
     }
 
 
-
     /*public static function getUserCalendar($calendarId, $userId)
     /*public static function getUserCalendar($calendarId, $userId)
     {
     {
         $params = [
         $params = [
@@ -647,6 +646,7 @@ class LpCalendarPlugin extends Plugin
         }
         }
 
 
         $html = Display::panel($html, $this->get_lang('LearningCalendar'));
         $html = Display::panel($html, $this->get_lang('LearningCalendar'));
+
         return $html;
         return $html;
     }
     }
 
 
@@ -680,7 +680,7 @@ class LpCalendarPlugin extends Plugin
         return [
         return [
             'user_event_count' => $takenCount,
             'user_event_count' => $takenCount,
             'completed' => $completed,
             'completed' => $completed,
-            'diff' => $diff
+            'diff' => $diff,
         ];
         ];
     }
     }
 }
 }

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

@@ -8,4 +8,4 @@ $strings['LearningCalendar'] = 'Learning calendar';
 $strings['NumberDaysAccumulatedInCalendar'] = 'Number of days accumulated in the calendar: ';
 $strings['NumberDaysAccumulatedInCalendar'] = 'Number of days accumulated in the calendar: ';
 $strings['NumberDaysAccumulatedInLp'] = 'Number of days accumulated in the LP: ';
 $strings['NumberDaysAccumulatedInLp'] = 'Number of days accumulated in the LP: ';
 $strings['NumberDaysInRetard'] = 'Number of days in retard: ';
 $strings['NumberDaysInRetard'] = 'Number of days in retard: ';
-$strings['DifferenceOfDaysAndCalendar'] = 'Difference of days and calendar';
+$strings['DifferenceOfDaysAndCalendar'] = 'Difference of days and calendar';

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

@@ -4,4 +4,4 @@
 $strings['plugin_title'] = 'Learning path calendar';
 $strings['plugin_title'] = 'Learning path calendar';
 $strings['plugin_comment'] = '';
 $strings['plugin_comment'] = '';
 $strings['enabled'] = 'Activado';
 $strings['enabled'] = 'Activado';
-$strings['LearningCalendar'] = 'Learning calendar';
+$strings['LearningCalendar'] = 'Learning calendar';