@@ -27,10 +27,10 @@ discard block |
||
27 | 27 | /** |
28 | 28 | * Controller |
29 | 29 | */ |
30 | - public function __construct ($user_id) |
|
30 | + public function __construct($user_id) |
|
31 | 31 | { |
32 | - $this->user_id = $user_id; |
|
33 | - $this->path = 'block_teacher'; |
|
32 | + $this->user_id = $user_id; |
|
33 | + $this->path = 'block_teacher'; |
|
34 | 34 | if ($this->is_block_visible_for_user($user_id)) { |
35 | 35 | $this->teachers = UserManager::get_users_followed_by_drh($user_id, COURSEMANAGER); |
36 | 36 | } |
@@ -69,7 +69,7 @@ discard block |
||
69 | 69 | <div class="panel panel-default" id="intro"> |
70 | 70 | <div class="panel-heading"> |
71 | 71 | '.get_lang('TeachersInformationsList').' |
72 | - <div class="pull-right"><a class="btn btn-danger btn-xs" onclick="javascript:if(!confirm(\''.addslashes(api_htmlentities(get_lang('ConfirmYourChoice'),ENT_QUOTES,$charset)).'\')) return false;" href="index.php?action=disable_block&path='.$this->path.'"> |
|
72 | + <div class="pull-right"><a class="btn btn-danger btn-xs" onclick="javascript:if(!confirm(\''.addslashes(api_htmlentities(get_lang('ConfirmYourChoice'), ENT_QUOTES, $charset)).'\')) return false;" href="index.php?action=disable_block&path='.$this->path.'"> |
|
73 | 73 | <em class="fa fa-times"></em> |
74 | 74 | </a></div> |
75 | 75 | </div> |
@@ -112,18 +112,18 @@ discard block |
||
112 | 112 | |
113 | 113 | $teacher_id = $teacher['user_id']; |
114 | 114 | $firstname = $teacher['firstname']; |
115 | - $lastname = $teacher['lastname']; |
|
116 | - $username = $teacher['username']; |
|
115 | + $lastname = $teacher['lastname']; |
|
116 | + $username = $teacher['username']; |
|
117 | 117 | |
118 | 118 | $time_on_platform = api_time_to_hms(Tracking :: get_time_spent_on_the_platform($teacher_id)); |
119 | 119 | $last_connection = Tracking :: get_last_connection_date($teacher_id); |
120 | 120 | |
121 | - if ($i%2 == 0) $class_tr = 'row_odd'; |
|
121 | + if ($i % 2 == 0) $class_tr = 'row_odd'; |
|
122 | 122 | else $class_tr = 'row_even'; |
123 | 123 | |
124 | 124 | $teachers_table .= ' |
125 | 125 | <tr class="'.$class_tr.'"> |
126 | - <td>'.api_get_person_name($firstname,$lastname).' ('.$username.')</td> |
|
126 | + <td>'.api_get_person_name($firstname, $lastname).' ('.$username.')</td> |
|
127 | 127 | <td align="right">'.$time_on_platform.'</td> |
128 | 128 | <td align="right">'.$last_connection.'</td> |
129 | 129 | </tr> |
@@ -155,7 +155,7 @@ discard block |
||
155 | 155 | $teachers_table = null; |
156 | 156 | if (count($teachers) > 0) { |
157 | 157 | $a_last_week = get_last_week(); |
158 | - $last_week = date('Y-m-d',$a_last_week[0]).' '.get_lang('To').' '.date('Y-m-d', $a_last_week[6]); |
|
158 | + $last_week = date('Y-m-d', $a_last_week[0]).' '.get_lang('To').' '.date('Y-m-d', $a_last_week[6]); |
|
159 | 159 | |
160 | 160 | $teachers_table .= '<table class="data_table" width:"95%">'; |
161 | 161 | $teachers_table .= ' |
@@ -171,13 +171,13 @@ discard block |
||
171 | 171 | $teacher_id = $teacher['user_id']; |
172 | 172 | $firstname = $teacher['firstname']; |
173 | 173 | $lastname = $teacher['lastname']; |
174 | - $username = $teacher['username']; |
|
175 | - $time_on_platform = api_time_to_hms(Tracking :: get_time_spent_on_the_platform($teacher_id,true)); |
|
174 | + $username = $teacher['username']; |
|
175 | + $time_on_platform = api_time_to_hms(Tracking :: get_time_spent_on_the_platform($teacher_id, true)); |
|
176 | 176 | |
177 | - if ($i%2 == 0) $class_tr = 'row_odd'; |
|
177 | + if ($i % 2 == 0) $class_tr = 'row_odd'; |
|
178 | 178 | else $class_tr = 'row_even'; |
179 | 179 | $teachers_table .= '<tr class="'.$class_tr.'"> |
180 | - <td>'.api_get_person_name($firstname,$lastname).' ('.$username.')</td> |
|
180 | + <td>'.api_get_person_name($firstname, $lastname).' ('.$username.')</td> |
|
181 | 181 | <td align="right">'.$time_on_platform.'</td> |
182 | 182 | </tr>'; |
183 | 183 |
@@ -21,12 +21,12 @@ discard block |
||
21 | 21 | /** |
22 | 22 | * Constructor |
23 | 23 | */ |
24 | - public function __construct ($user_id) |
|
24 | + public function __construct($user_id) |
|
25 | 25 | { |
26 | - $this->user_id = $user_id; |
|
27 | - $this->path = 'block_student'; |
|
26 | + $this->user_id = $user_id; |
|
27 | + $this->path = 'block_student'; |
|
28 | 28 | if ($this->is_block_visible_for_user($user_id)) { |
29 | - $this->students = UserManager::get_users_followed_by_drh($user_id, STUDENT); |
|
29 | + $this->students = UserManager::get_users_followed_by_drh($user_id, STUDENT); |
|
30 | 30 | } |
31 | 31 | } |
32 | 32 | |
@@ -61,7 +61,7 @@ discard block |
||
61 | 61 | $html = '<div class="panel panel-default" id="intro"> |
62 | 62 | <div class="panel-heading"> |
63 | 63 | '.get_lang('StudentsInformationsList').' |
64 | - <div class="pull-right"><a class="btn btn-danger btn-xs" onclick="javascript:if(!confirm(\''.addslashes(api_htmlentities(get_lang('ConfirmYourChoice'),ENT_QUOTES,$charset)).'\')) return false;" href="index.php?action=disable_block&path='.$this->path.'"> |
|
64 | + <div class="pull-right"><a class="btn btn-danger btn-xs" onclick="javascript:if(!confirm(\''.addslashes(api_htmlentities(get_lang('ConfirmYourChoice'), ENT_QUOTES, $charset)).'\')) return false;" href="index.php?action=disable_block&path='.$this->path.'"> |
|
65 | 65 | <em class="fa fa-times"></em> |
66 | 66 | </a> |
67 | 67 | </div> |
@@ -102,9 +102,9 @@ discard block |
||
102 | 102 | |
103 | 103 | $courses_by_user = CourseManager::get_courses_list_by_user_id($student['user_id'], true); |
104 | 104 | $count_courses = count($courses_by_user); |
105 | - $rowspan = $count_courses?$count_courses+1:2; |
|
105 | + $rowspan = $count_courses ? $count_courses + 1 : 2; |
|
106 | 106 | |
107 | - if ($i%2 == 0) { |
|
107 | + if ($i % 2 == 0) { |
|
108 | 108 | $style = ' style="background-color:#F2F2F2" '; |
109 | 109 | } else { |
110 | 110 | $style = ' style="background-color:#FFF" '; |
@@ -169,7 +169,7 @@ discard block |
||
169 | 169 | $student_id = $student['user_id']; |
170 | 170 | $firstname = $student['firstname']; |
171 | 171 | $lastname = $student['lastname']; |
172 | - $username = $student['username']; |
|
172 | + $username = $student['username']; |
|
173 | 173 | |
174 | 174 | |
175 | 175 | // get average of faults in attendances by student |
@@ -188,7 +188,7 @@ discard block |
||
188 | 188 | $cats = Category::load(null, null, $course_code, null, null, null, false); |
189 | 189 | $scoretotal = array(); |
190 | 190 | if (isset($cats) && isset($cats[0])) { |
191 | - $scoretotal= $cats[0]->calc_score($student_id, null, $course_code); |
|
191 | + $scoretotal = $cats[0]->calc_score($student_id, null, $course_code); |
|
192 | 192 | } |
193 | 193 | |
194 | 194 | if (!empty($scoretotal)) { |
@@ -198,10 +198,10 @@ discard block |
||
198 | 198 | } |
199 | 199 | |
200 | 200 | if (!empty($weight)) { |
201 | - $evaluations_avg = '<a title="'.get_lang('GoToStudentDetails').'" href="'.api_get_path(WEB_CODE_PATH).'mySpace/myStudents.php?student='.$student_id.'">'.round($score,2).'/'.round($weight,2).'('.round(($score / $weight) * 100,2) . ' %)</a>'; |
|
201 | + $evaluations_avg = '<a title="'.get_lang('GoToStudentDetails').'" href="'.api_get_path(WEB_CODE_PATH).'mySpace/myStudents.php?student='.$student_id.'">'.round($score, 2).'/'.round($weight, 2).'('.round(($score / $weight) * 100, 2).' %)</a>'; |
|
202 | 202 | } |
203 | 203 | |
204 | - if ($i%2 == 0) { |
|
204 | + if ($i % 2 == 0) { |
|
205 | 205 | $class_tr = 'row_odd'; |
206 | 206 | } else { |
207 | 207 | $class_tr = 'row_even'; |
@@ -39,7 +39,7 @@ discard block |
||
39 | 39 | $this->bg_height = 350; |
40 | 40 | if ($this->is_block_visible_for_user($user_id)) { |
41 | 41 | if (!api_is_session_admin()) { |
42 | - $this->courses = CourseManager::get_courses_followed_by_drh($user_id); |
|
42 | + $this->courses = CourseManager::get_courses_followed_by_drh($user_id); |
|
43 | 43 | } |
44 | 44 | $this->sessions = SessionManager::get_sessions_followed_by_drh($user_id); |
45 | 45 | } |
@@ -78,13 +78,13 @@ discard block |
||
78 | 78 | $html = '<div class="panel panel-default" id="intro"> |
79 | 79 | <div class="panel-heading"> |
80 | 80 | '.get_lang('EvaluationsGraph').' |
81 | - <div class="pull-right"><a class="btn btn-danger btn-xs" onclick="javascript:if(!confirm(\''.addslashes(api_htmlentities(get_lang('ConfirmYourChoice'),ENT_QUOTES,$charset)).'\')) return false;" href="index.php?action=disable_block&path='.$this->path.'"> |
|
81 | + <div class="pull-right"><a class="btn btn-danger btn-xs" onclick="javascript:if(!confirm(\''.addslashes(api_htmlentities(get_lang('ConfirmYourChoice'), ENT_QUOTES, $charset)).'\')) return false;" href="index.php?action=disable_block&path='.$this->path.'"> |
|
82 | 82 | <em class="fa fa-times"></em> |
83 | 83 | </a></div> |
84 | 84 | </div> |
85 | 85 | <div class="panel-body">'; |
86 | 86 | if (empty($evaluations_base_courses_graph) && empty($evaluations_courses_in_sessions_graph)) { |
87 | - $html .= '<p>'.api_convert_encoding(get_lang('GraphicNotAvailable'),'UTF-8').'</p>'; |
|
87 | + $html .= '<p>'.api_convert_encoding(get_lang('GraphicNotAvailable'), 'UTF-8').'</p>'; |
|
88 | 88 | } else { |
89 | 89 | // display evaluations base courses graph |
90 | 90 | if (!empty($evaluations_base_courses_graph)) { |
@@ -132,7 +132,7 @@ discard block |
||
132 | 132 | $alleval = $cats[0]->get_evaluations(null, true, $course_code); |
133 | 133 | $alllinks = $cats[0]->get_links(null, true); |
134 | 134 | $users = GradebookUtils::get_all_users($alleval, $alllinks); |
135 | - $datagen = new FlatViewDataGenerator ($users, $alleval, $alllinks); |
|
135 | + $datagen = new FlatViewDataGenerator($users, $alleval, $alllinks); |
|
136 | 136 | $evaluation_sumary = $datagen->get_evaluation_sumary_results(); |
137 | 137 | if (!empty($evaluation_sumary)) { |
138 | 138 | $items = array_keys($evaluation_sumary); |
@@ -158,16 +158,16 @@ discard block |
||
158 | 158 | |
159 | 159 | $dataSet->normalize(100, '%'); |
160 | 160 | |
161 | - $dataSet->loadPalette(api_get_path(SYS_CODE_PATH) . 'palettes/pchart/default.color', true); |
|
161 | + $dataSet->loadPalette(api_get_path(SYS_CODE_PATH).'palettes/pchart/default.color', true); |
|
162 | 162 | |
163 | 163 | // Cache definition |
164 | 164 | $cachePath = api_get_path(SYS_ARCHIVE_PATH); |
165 | 165 | $myCache = new pCache(array('CacheFolder' => substr($cachePath, 0, strlen($cachePath) - 1))); |
166 | 166 | $chartHash = $myCache->getHash($dataSet); |
167 | 167 | if ($myCache->isInCache($chartHash)) { |
168 | - $imgPath = api_get_path(SYS_ARCHIVE_PATH) . $chartHash; |
|
168 | + $imgPath = api_get_path(SYS_ARCHIVE_PATH).$chartHash; |
|
169 | 169 | $myCache->saveFromCache($chartHash, $imgPath); |
170 | - $imgPath = api_get_path(WEB_ARCHIVE_PATH) . $chartHash; |
|
170 | + $imgPath = api_get_path(WEB_ARCHIVE_PATH).$chartHash; |
|
171 | 171 | } else { |
172 | 172 | /* Create the pChart object */ |
173 | 173 | $widthSize = $this->bg_width; |
@@ -196,7 +196,7 @@ discard block |
||
196 | 196 | /* Set the default font */ |
197 | 197 | $myPicture->setFontProperties( |
198 | 198 | array( |
199 | - 'FontName' => api_get_path(SYS_FONTS_PATH) . 'opensans/OpenSans-Regular.ttf', |
|
199 | + 'FontName' => api_get_path(SYS_FONTS_PATH).'opensans/OpenSans-Regular.ttf', |
|
200 | 200 | 'FontSize' => 10 |
201 | 201 | ) |
202 | 202 | ); |
@@ -276,12 +276,12 @@ discard block |
||
276 | 276 | /* Write and save into cache */ |
277 | 277 | |
278 | 278 | $myCache->writeToCache($chartHash, $myPicture); |
279 | - $imgPath = api_get_path(SYS_ARCHIVE_PATH) . $chartHash; |
|
279 | + $imgPath = api_get_path(SYS_ARCHIVE_PATH).$chartHash; |
|
280 | 280 | $myCache->saveFromCache($chartHash, $imgPath); |
281 | - $imgPath = api_get_path(WEB_ARCHIVE_PATH) . $chartHash; |
|
281 | + $imgPath = api_get_path(WEB_ARCHIVE_PATH).$chartHash; |
|
282 | 282 | } |
283 | 283 | if (!empty($imgPath)) { |
284 | - $courses_graph[$course_code] = '<img src="' . $imgPath . '">'; |
|
284 | + $courses_graph[$course_code] = '<img src="'.$imgPath.'">'; |
|
285 | 285 | } |
286 | 286 | } |
287 | 287 | } |
@@ -310,7 +310,7 @@ discard block |
||
310 | 310 | $alleval = $cats[0]->get_evaluations(null, true, $course_code); |
311 | 311 | $alllinks = $cats[0]->get_links(null, true); |
312 | 312 | $users = GradebookUtils::get_all_users($alleval, $alllinks); |
313 | - $datagen = new FlatViewDataGenerator ($users, $alleval, $alllinks); |
|
313 | + $datagen = new FlatViewDataGenerator($users, $alleval, $alllinks); |
|
314 | 314 | $evaluation_sumary = $datagen->get_evaluation_sumary_results(); |
315 | 315 | if (!empty($evaluation_sumary)) { |
316 | 316 | $items = array_keys($evaluation_sumary); |
@@ -336,16 +336,16 @@ discard block |
||
336 | 336 | |
337 | 337 | $dataSet->normalize(100, '%'); |
338 | 338 | |
339 | - $dataSet->loadPalette(api_get_path(SYS_CODE_PATH) . 'palettes/pchart/default.color', true); |
|
339 | + $dataSet->loadPalette(api_get_path(SYS_CODE_PATH).'palettes/pchart/default.color', true); |
|
340 | 340 | |
341 | 341 | // Cache definition |
342 | 342 | $cachePath = api_get_path(SYS_ARCHIVE_PATH); |
343 | 343 | $myCache = new pCache(array('CacheFolder' => substr($cachePath, 0, strlen($cachePath) - 1))); |
344 | 344 | $chartHash = $myCache->getHash($dataSet); |
345 | 345 | if ($myCache->isInCache($chartHash)) { |
346 | - $imgPath = api_get_path(SYS_ARCHIVE_PATH) . $chartHash; |
|
346 | + $imgPath = api_get_path(SYS_ARCHIVE_PATH).$chartHash; |
|
347 | 347 | $myCache->saveFromCache($chartHash, $imgPath); |
348 | - $imgPath = api_get_path(WEB_ARCHIVE_PATH) . $chartHash; |
|
348 | + $imgPath = api_get_path(WEB_ARCHIVE_PATH).$chartHash; |
|
349 | 349 | } else { |
350 | 350 | /* Create the pChart object */ |
351 | 351 | $widthSize = $this->bg_width; |
@@ -374,7 +374,7 @@ discard block |
||
374 | 374 | /* Set the default font */ |
375 | 375 | $myPicture->setFontProperties( |
376 | 376 | array( |
377 | - 'FontName' => api_get_path(SYS_FONTS_PATH) . 'opensans/OpenSans-Regular.ttf', |
|
377 | + 'FontName' => api_get_path(SYS_FONTS_PATH).'opensans/OpenSans-Regular.ttf', |
|
378 | 378 | 'FontSize' => 10 |
379 | 379 | ) |
380 | 380 | ); |
@@ -448,12 +448,12 @@ discard block |
||
448 | 448 | |
449 | 449 | /* Write and save into cache */ |
450 | 450 | $myCache->writeToCache($chartHash, $myPicture); |
451 | - $imgPath = api_get_path(SYS_ARCHIVE_PATH) . $chartHash; |
|
451 | + $imgPath = api_get_path(SYS_ARCHIVE_PATH).$chartHash; |
|
452 | 452 | $myCache->saveFromCache($chartHash, $imgPath); |
453 | - $imgPath = api_get_path(WEB_ARCHIVE_PATH) . $chartHash; |
|
453 | + $imgPath = api_get_path(WEB_ARCHIVE_PATH).$chartHash; |
|
454 | 454 | } |
455 | 455 | if (!empty($imgPath)) { |
456 | - $courses_graph[$course_code] = '<img src="' . $imgPath . '">'; |
|
456 | + $courses_graph[$course_code] = '<img src="'.$imgPath.'">'; |
|
457 | 457 | } |
458 | 458 | } |
459 | 459 | } |
@@ -22,9 +22,9 @@ discard block |
||
22 | 22 | /** |
23 | 23 | * Constructor |
24 | 24 | */ |
25 | - public function __construct ($user_id) |
|
25 | + public function __construct($user_id) |
|
26 | 26 | { |
27 | - $this->user_id = $user_id; |
|
27 | + $this->user_id = $user_id; |
|
28 | 28 | $this->path = 'block_session'; |
29 | 29 | if ($this->is_block_visible_for_user($user_id)) { |
30 | 30 | $this->sessions = SessionManager::get_sessions_followed_by_drh($user_id); |
@@ -66,7 +66,7 @@ discard block |
||
66 | 66 | <div class="panel panel-default" id="intro"> |
67 | 67 | <div class="panel-heading"> |
68 | 68 | '.get_lang('SessionsInformation').' |
69 | - <div class="pull-right"><a class="btn btn-danger btn-xs" onclick="javascript:if(!confirm(\''.addslashes(api_htmlentities(get_lang('ConfirmYourChoice'),ENT_QUOTES,$charset)).'\')) return false;" href="index.php?action=disable_block&path='.$this->path.'"> |
|
69 | + <div class="pull-right"><a class="btn btn-danger btn-xs" onclick="javascript:if(!confirm(\''.addslashes(api_htmlentities(get_lang('ConfirmYourChoice'), ENT_QUOTES, $charset)).'\')) return false;" href="index.php?action=disable_block&path='.$this->path.'"> |
|
70 | 70 | <em class="fa fa-times"></em> |
71 | 71 | </a></div> |
72 | 72 | </div> |
@@ -116,7 +116,7 @@ discard block |
||
116 | 116 | |
117 | 117 | $count_courses_in_session = count(Tracking::get_courses_list_from_session($session_id)); |
118 | 118 | |
119 | - if ($i%2 == 0) $class_tr = 'row_odd'; |
|
119 | + if ($i % 2 == 0) $class_tr = 'row_odd'; |
|
120 | 120 | else $class_tr = 'row_even'; |
121 | 121 | |
122 | 122 | $sessions_table .= '<tr class="'.$class_tr.'"> |
@@ -29,10 +29,10 @@ discard block |
||
29 | 29 | /** |
30 | 30 | * Constructor |
31 | 31 | */ |
32 | - public function __construct ($user_id) |
|
32 | + public function __construct($user_id) |
|
33 | 33 | { |
34 | - $this->user_id = $user_id; |
|
35 | - $this->path = 'block_global_info'; |
|
34 | + $this->user_id = $user_id; |
|
35 | + $this->path = 'block_global_info'; |
|
36 | 36 | if ($this->is_block_visible_for_user($user_id)) { |
37 | 37 | //$this->courses = CourseManager::get_courses_followed_by_drh($user_id); |
38 | 38 | } |
@@ -69,7 +69,7 @@ discard block |
||
69 | 69 | $html = ' |
70 | 70 | <div class="panel panel-default" id="intro"> |
71 | 71 | <div class="panel-heading">'.get_lang('GlobalPlatformInformation').' |
72 | - <div class="pull-right"><a class="btn btn-danger btn-xs" onclick="javascript:if(!confirm(\''.addslashes(api_htmlentities(get_lang('ConfirmYourChoice'),ENT_QUOTES,$charset)).'\')) return false;" href="index.php?action=disable_block&path='.$this->path.'"> |
|
72 | + <div class="pull-right"><a class="btn btn-danger btn-xs" onclick="javascript:if(!confirm(\''.addslashes(api_htmlentities(get_lang('ConfirmYourChoice'), ENT_QUOTES, $charset)).'\')) return false;" href="index.php?action=disable_block&path='.$this->path.'"> |
|
73 | 73 | <em class="fa fa-times"></em> |
74 | 74 | </a></div> |
75 | 75 | </div> |
@@ -98,7 +98,7 @@ discard block |
||
98 | 98 | $data_table = '<table class="table table-bordered" width:"95%">'; |
99 | 99 | $i = 1; |
100 | 100 | foreach ($global_data as $data) { |
101 | - if ($i%2 == 0) { |
|
101 | + if ($i % 2 == 0) { |
|
102 | 102 | $class_tr = 'row_odd'; |
103 | 103 | } else { |
104 | 104 | $class_tr = 'row_even'; |
@@ -29,10 +29,10 @@ discard block |
||
29 | 29 | /** |
30 | 30 | * Controller |
31 | 31 | */ |
32 | - public function __construct ($user_id) |
|
32 | + public function __construct($user_id) |
|
33 | 33 | { |
34 | - $this->user_id = $user_id; |
|
35 | - $this->path = 'block_teacher_graph'; |
|
34 | + $this->user_id = $user_id; |
|
35 | + $this->path = 'block_teacher_graph'; |
|
36 | 36 | if ($this->is_block_visible_for_user($user_id)) { |
37 | 37 | $this->teachers = UserManager::get_users_followed_by_drh($user_id, COURSEMANAGER); |
38 | 38 | } |
@@ -68,7 +68,7 @@ discard block |
||
68 | 68 | $html = ' |
69 | 69 | <div class="panel panel-default" id="intro"> |
70 | 70 | <div class="panel-heading">'.get_lang('TeachersInformationsGraph').' |
71 | - <div class="pull-right"><a class="btn btn-danger btn-xs" onclick="javascript:if(!confirm(\''.addslashes(api_htmlentities(get_lang('ConfirmYourChoice'),ENT_QUOTES,$charset)).'\')) return false;" href="index.php?action=disable_block&path='.$this->path.'"> |
|
71 | + <div class="pull-right"><a class="btn btn-danger btn-xs" onclick="javascript:if(!confirm(\''.addslashes(api_htmlentities(get_lang('ConfirmYourChoice'), ENT_QUOTES, $charset)).'\')) return false;" href="index.php?action=disable_block&path='.$this->path.'"> |
|
72 | 72 | <em class="fa fa-times"></em> |
73 | 73 | </a></div> |
74 | 74 | </div> |
@@ -107,7 +107,7 @@ discard block |
||
107 | 107 | foreach ($a_last_week as $day) { |
108 | 108 | // day is received as y-m-d 12:00:00 |
109 | 109 | $start_date = api_get_utc_datetime($day); |
110 | - $end_date = api_get_utc_datetime($day+(3600*24-1)); |
|
110 | + $end_date = api_get_utc_datetime($day + (3600 * 24 - 1)); |
|
111 | 111 | |
112 | 112 | $time_on_platform_by_day = Tracking::get_time_spent_on_the_platform($user_id, 'custom', $start_date, $end_date); |
113 | 113 | $hours = floor($time_on_platform_by_day / 3600); |
@@ -117,26 +117,26 @@ discard block |
||
117 | 117 | $dataSet->addPoints($time_by_days, $username); |
118 | 118 | } |
119 | 119 | |
120 | - $last_week = date('Y-m-d',$a_last_week[0]).' '.get_lang('To').' '.date('Y-m-d', $a_last_week[6]); |
|
120 | + $last_week = date('Y-m-d', $a_last_week[0]).' '.get_lang('To').' '.date('Y-m-d', $a_last_week[6]); |
|
121 | 121 | $days_on_week = array(); |
122 | 122 | foreach ($a_last_week as $weekday) { |
123 | - $days_on_week[] = date('d/m',$weekday); |
|
123 | + $days_on_week[] = date('d/m', $weekday); |
|
124 | 124 | } |
125 | 125 | |
126 | 126 | $dataSet->addPoints($days_on_week, 'Days'); |
127 | 127 | $dataSet->setAbscissaName($last_week); |
128 | 128 | $dataSet->setAxisName(0, get_lang('Minutes')); |
129 | 129 | $dataSet->setAbscissa('Days'); |
130 | - $dataSet->loadPalette(api_get_path(SYS_CODE_PATH) . 'palettes/pchart/default.color', true); |
|
130 | + $dataSet->loadPalette(api_get_path(SYS_CODE_PATH).'palettes/pchart/default.color', true); |
|
131 | 131 | |
132 | 132 | // Cache definition |
133 | 133 | $cachePath = api_get_path(SYS_ARCHIVE_PATH); |
134 | 134 | $myCache = new pCache(array('CacheFolder' => substr($cachePath, 0, strlen($cachePath) - 1))); |
135 | 135 | $chartHash = $myCache->getHash($dataSet); |
136 | 136 | if ($myCache->isInCache($chartHash)) { |
137 | - $imgPath = api_get_path(SYS_ARCHIVE_PATH) . $chartHash; |
|
137 | + $imgPath = api_get_path(SYS_ARCHIVE_PATH).$chartHash; |
|
138 | 138 | $myCache->saveFromCache($chartHash, $imgPath); |
139 | - $imgPath = api_get_path(WEB_ARCHIVE_PATH) . $chartHash; |
|
139 | + $imgPath = api_get_path(WEB_ARCHIVE_PATH).$chartHash; |
|
140 | 140 | } else { |
141 | 141 | |
142 | 142 | /* Create the pChart object */ |
@@ -153,7 +153,7 @@ discard block |
||
153 | 153 | $myPicture->drawRectangle(0, 0, $widthSize - 1, $heightSize - 1, array('R' => 0, 'G' => 0, 'B' => 0)); |
154 | 154 | |
155 | 155 | /* Set the default font */ |
156 | - $myPicture->setFontProperties(array('FontName' => api_get_path(SYS_FONTS_PATH) . 'opensans/OpenSans-Regular.ttf', 'FontSize' => 10)); |
|
156 | + $myPicture->setFontProperties(array('FontName' => api_get_path(SYS_FONTS_PATH).'opensans/OpenSans-Regular.ttf', 'FontSize' => 10)); |
|
157 | 157 | |
158 | 158 | /* Do NOT Write the chart title */ |
159 | 159 | |
@@ -189,11 +189,11 @@ discard block |
||
189 | 189 | |
190 | 190 | /* Write and save into cache */ |
191 | 191 | $myCache->writeToCache($chartHash, $myPicture); |
192 | - $imgPath = api_get_path(SYS_ARCHIVE_PATH) . $chartHash; |
|
192 | + $imgPath = api_get_path(SYS_ARCHIVE_PATH).$chartHash; |
|
193 | 193 | $myCache->saveFromCache($chartHash, $imgPath); |
194 | - $imgPath = api_get_path(WEB_ARCHIVE_PATH) . $chartHash; |
|
194 | + $imgPath = api_get_path(WEB_ARCHIVE_PATH).$chartHash; |
|
195 | 195 | } |
196 | - $graph = '<img src="' . $imgPath . '" >'; |
|
196 | + $graph = '<img src="'.$imgPath.'" >'; |
|
197 | 197 | } else { |
198 | 198 | $graph = '<p>'.api_convert_encoding(get_lang('GraphicNotAvailable'), 'UTF-8').'</p>'; |
199 | 199 | } |
@@ -1,11 +1,11 @@ |
||
1 | 1 | <?php |
2 | 2 | // Show the FACEBOOK login button |
3 | -$_template['show_message'] = false; |
|
3 | +$_template['show_message'] = false; |
|
4 | 4 | |
5 | 5 | //if (api_is_anonymous() && api_get_setting('facebook_login_activate') == 'true') { |
6 | 6 | if (api_is_anonymous()) { |
7 | 7 | require_once api_get_path(SYS_CODE_PATH)."auth/external_login/facebook.inc.php"; |
8 | - $_template['show_message'] = true; |
|
8 | + $_template['show_message'] = true; |
|
9 | 9 | // the default title |
10 | 10 | $button_url = api_get_path(WEB_PLUGIN_PATH)."add_facebook_login_button/img/cnx_fb.png"; |
11 | 11 | $href_link = facebookGetLoginUrl(); |
@@ -6,15 +6,15 @@ discard block |
||
6 | 6 | */ |
7 | 7 | |
8 | 8 | if (!defined('DOKU_INC')) die(); |
9 | -if (!defined('DOKU_PLUGIN')) define('DOKU_PLUGIN', DOKU_INC . 'lib/plugins/'); |
|
10 | -require_once (DOKU_PLUGIN . 'action.php'); |
|
9 | +if (!defined('DOKU_PLUGIN')) define('DOKU_PLUGIN', DOKU_INC.'lib/plugins/'); |
|
10 | +require_once (DOKU_PLUGIN.'action.php'); |
|
11 | 11 | |
12 | 12 | class action_plugin_jcapture extends DokuWiki_Action_Plugin { |
13 | 13 | |
14 | 14 | /** |
15 | 15 | * return some info |
16 | 16 | */ |
17 | - function getInfo(){ |
|
17 | + function getInfo() { |
|
18 | 18 | return array( |
19 | 19 | 'author' => 'Pavel Vlasov', |
20 | 20 | 'email' => '[email protected]', |
@@ -28,14 +28,14 @@ discard block |
||
28 | 28 | * Register the eventhandlers |
29 | 29 | */ |
30 | 30 | function register(&$controller) { |
31 | - $controller->register_hook('TOOLBAR_DEFINE', 'AFTER', $this, 'insert_button', array ()); |
|
31 | + $controller->register_hook('TOOLBAR_DEFINE', 'AFTER', $this, 'insert_button', array()); |
|
32 | 32 | } |
33 | 33 | |
34 | 34 | /** |
35 | 35 | * Inserts the toolbar button |
36 | 36 | */ |
37 | 37 | function insert_button(& $event, $param) { |
38 | - $event->data[] = array ( |
|
38 | + $event->data[] = array( |
|
39 | 39 | 'type' => 'JCapture', |
40 | 40 | 'title' => 'Screen capture', |
41 | 41 | 'icon' => '../../plugins/jcapture/camera.png', |
@@ -21,9 +21,9 @@ |
||
21 | 21 | $documentId = DocumentManager::get_document_id($courseInfo, '/'.$folderName); |
22 | 22 | $path = null; |
23 | 23 | if (empty($documentId)) { |
24 | - $course_dir = $courseInfo['path'] . '/document'; |
|
24 | + $course_dir = $courseInfo['path'].'/document'; |
|
25 | 25 | $sys_course_path = api_get_path(SYS_COURSE_PATH); |
26 | - $dir = $sys_course_path . $course_dir; |
|
26 | + $dir = $sys_course_path.$course_dir; |
|
27 | 27 | $createdDir = create_unexisting_directory( |
28 | 28 | $courseInfo, |
29 | 29 | api_get_user_id(), |