Completed
Push — 1.10.x ( e335cf...7cec8d )
by Angel Fernando Quiroz
44:59 queued 03:29
created
main/admin/teachers_time_by_session_report.php 1 patch
Spacing   +15 added lines, -15 removed lines patch added patch discarded remove patch
@@ -12,7 +12,7 @@  discard block
 block discarded – undo
12 12
 $cidReset = true;
13 13
 
14 14
 require_once '../inc/global.inc.php';
15
-require_once api_get_path(SYS_CODE_PATH) . 'work/work.lib.php';
15
+require_once api_get_path(SYS_CODE_PATH).'work/work.lib.php';
16 16
 
17 17
 if (!api_is_platform_admin(true) && !api_is_teacher()) {
18 18
     api_not_allowed(true);
@@ -47,7 +47,7 @@  discard block
 block discarded – undo
47 47
 
48 48
     foreach ($sessionCourses as $sessionCourse) {
49 49
         $course = $sessionCourse->getCourse();
50
-        $coursesInfo[$course->getId()] =  $course->getCode();
50
+        $coursesInfo[$course->getId()] = $course->getCode();
51 51
         $criteria = Criteria::create()->where(
52 52
             Criteria::expr()->eq("status", Session::COACH)
53 53
         );
@@ -70,10 +70,10 @@  discard block
 block discarded – undo
70 70
                 ];
71 71
             }
72 72
 
73
-            $usersInfo[$user->getId()][$course->getId() . '_number_of_students'] = null;
74
-            $usersInfo[$user->getId()][$course->getId() . '_number_of_works'] = null;
75
-            $usersInfo[$user->getId()][$course->getId() . '_last_work'] = null;
76
-            $usersInfo[$user->getId()][$course->getId() . '_time_spent_of_course'] = null;
73
+            $usersInfo[$user->getId()][$course->getId().'_number_of_students'] = null;
74
+            $usersInfo[$user->getId()][$course->getId().'_number_of_works'] = null;
75
+            $usersInfo[$user->getId()][$course->getId().'_last_work'] = null;
76
+            $usersInfo[$user->getId()][$course->getId().'_time_spent_of_course'] = null;
77 77
 
78 78
             if (!$session->hasCoachInCourseWithStatus($user, $course)) {
79 79
                 continue;
@@ -83,9 +83,9 @@  discard block
 block discarded – undo
83 83
                 ->getRepository('ChamiloCourseBundle:CStudentPublication')
84 84
                 ->findByTeacher($user, $course, $session->getId());
85 85
 
86
-            $usersInfo[$user->getId()][$course->getId() . '_number_of_students'] = $sessionCourse->getNbrUsers();
87
-            $usersInfo[$user->getId()][$course->getId() . '_number_of_works'] = count($works);
88
-            $usersInfo[$user->getId()][$course->getId() . '_time_spent_of_course'] = api_time_to_hms(
86
+            $usersInfo[$user->getId()][$course->getId().'_number_of_students'] = $sessionCourse->getNbrUsers();
87
+            $usersInfo[$user->getId()][$course->getId().'_number_of_works'] = count($works);
88
+            $usersInfo[$user->getId()][$course->getId().'_time_spent_of_course'] = api_time_to_hms(
89 89
                 Tracking::get_time_spent_on_the_course($user->getId(), $course->getId(), $session->getId())
90 90
             );
91 91
 
@@ -97,7 +97,7 @@  discard block
 block discarded – undo
97 97
 
98 98
             $lastFormattedDate = api_format_date($lastWork->getSentDate()->getTimestamp(), DATE_TIME_FORMAT_SHORT);
99 99
 
100
-            $usersInfo[$user->getId()][$course->getId() . '_last_work'] = api_format_date(
100
+            $usersInfo[$user->getId()][$course->getId().'_last_work'] = api_format_date(
101 101
                 $lastWork->getSentDate()->getTimestamp(),
102 102
                 DATE_TIME_FORMAT_SHORT
103 103
             );
@@ -106,7 +106,7 @@  discard block
 block discarded – undo
106 106
 }
107 107
 
108 108
 if (isset($_GET['export']) && $session && ($coursesInfo && $usersInfo)) {
109
-    $fileName = get_lang('TeacherTimeReport') . ' ' . api_get_local_time();
109
+    $fileName = get_lang('TeacherTimeReport').' '.api_get_local_time();
110 110
 
111 111
     $dataToExport = [];
112 112
     $dataToExport[] = [$toolName, $session->getName()];
@@ -167,9 +167,9 @@  discard block
 block discarded – undo
167 167
 }
168 168
 
169 169
 $this_section = SECTION_PLATFORM_ADMIN;
170
-$interbreadcrumb[] = ['url' => api_get_path(WEB_CODE_PATH) . 'mySpace/', 'name' => get_lang('Reporting')];
170
+$interbreadcrumb[] = ['url' => api_get_path(WEB_CODE_PATH).'mySpace/', 'name' => get_lang('Reporting')];
171 171
 $interbreadcrumb[] = [
172
-    'url' => api_get_path(WEB_CODE_PATH) . 'mySpace/session.php',
172
+    'url' => api_get_path(WEB_CODE_PATH).'mySpace/session.php',
173 173
     'name' => get_lang('FollowedSessions')
174 174
 ];
175 175
 
@@ -179,11 +179,11 @@  discard block
 block discarded – undo
179 179
     $actions = [
180 180
         Display::url(
181 181
             Display::return_icon('export_csv.png', get_lang('ExportAsCSV'), [], ICON_SIZE_MEDIUM),
182
-            api_get_self() . '?' . http_build_query(['export' => 'csv', 'session' => $session->getId()])
182
+            api_get_self().'?'.http_build_query(['export' => 'csv', 'session' => $session->getId()])
183 183
         ),
184 184
         Display::url(
185 185
             Display::return_icon('export_excel.png', get_lang('ExportAsXLS'), [], ICON_SIZE_MEDIUM),
186
-            api_get_self() . '?' . http_build_query(['export' => 'xls', 'session' => $session->getId()])
186
+            api_get_self().'?'.http_build_query(['export' => 'xls', 'session' => $session->getId()])
187 187
         )
188 188
     ];
189 189
 }
Please login to merge, or discard this patch.