@@ -12,7 +12,7 @@ |
||
12 | 12 | /** |
13 | 13 | * Set the result |
14 | 14 | * @staticvar null $result |
15 | - * @return type |
|
15 | + * @return TicketPlugin |
|
16 | 16 | */ |
17 | 17 | static function create() |
18 | 18 | { |
@@ -35,7 +35,7 @@ discard block |
||
35 | 35 | public function install() |
36 | 36 | { |
37 | 37 | // Create database tables and insert a Tab |
38 | - require_once api_get_path(SYS_PLUGIN_PATH) . PLUGIN_NAME . '/database.php'; |
|
38 | + require_once api_get_path(SYS_PLUGIN_PATH).PLUGIN_NAME.'/database.php'; |
|
39 | 39 | |
40 | 40 | } |
41 | 41 | |
@@ -84,7 +84,7 @@ discard block |
||
84 | 84 | $rsTab = $this->deleteTab($plugSetting['comment']); |
85 | 85 | |
86 | 86 | if ($rsTab) { |
87 | - echo "<script>location.href = '" . $_SERVER['REQUEST_URI'] . "';</script>"; |
|
87 | + echo "<script>location.href = '".$_SERVER['REQUEST_URI']."';</script>"; |
|
88 | 88 | } |
89 | 89 | } |
90 | 90 | } |
@@ -73,7 +73,7 @@ discard block |
||
73 | 73 | |
74 | 74 | /** |
75 | 75 | * @param $courseInfo |
76 | - * @param $weeksCount |
|
76 | + * @param string $weeksCount |
|
77 | 77 | * @param $page |
78 | 78 | * @return array |
79 | 79 | */ |
@@ -182,7 +182,7 @@ discard block |
||
182 | 182 | |
183 | 183 | /** |
184 | 184 | * @param $datos |
185 | - * @param $pagina |
|
185 | + * @param integer $pagina |
|
186 | 186 | * @return string |
187 | 187 | */ |
188 | 188 | function showStudentResult($datos, $pagina) |
@@ -201,8 +201,8 @@ discard block |
||
201 | 201 | |
202 | 202 | /** |
203 | 203 | * @param $data |
204 | - * @param $numero_semanas |
|
205 | - * @return array |
|
204 | + * @param integer $numero_semanas |
|
205 | + * @return string[] |
|
206 | 206 | */ |
207 | 207 | function showStudentResultExport($data, $numero_semanas) |
208 | 208 | { |
@@ -21,7 +21,7 @@ discard block |
||
21 | 21 | $table_post = Database::get_course_table(TABLE_FORUM_POST); |
22 | 22 | $table_work = Database::get_course_table(TABLE_STUDENT_PUBLICATION); |
23 | 23 | $course_code = Database::escape_string($course_code); |
24 | - $res = Database::query("SELECT COUNT(*) as cant FROM $table_reporte_semanas WHERE course_code = '" . $course_code . "'"); |
|
24 | + $res = Database::query("SELECT COUNT(*) as cant FROM $table_reporte_semanas WHERE course_code = '".$course_code."'"); |
|
25 | 25 | $sqlWeeks = "SELECT semanas FROM $table_semanas_curso WHERE course_code = '$course_code'"; |
26 | 26 | $resWeeks = Database::query($sqlWeeks); |
27 | 27 | $weeks = Database::fetch_object($resWeeks); |
@@ -105,52 +105,52 @@ discard block |
||
105 | 105 | $lineHeaderExport = array(null, null); |
106 | 106 | $lineHeaderExport2 = array(null, ull); |
107 | 107 | while ($rowe = Database::fetch_assoc($resultHeader)) { |
108 | - $lineHeaderExport[] = utf8_decode('Work' . $rowe['week_id']); |
|
109 | - $lineHeaderExport[] = utf8_decode('Forum' . $rowe['week_id']); |
|
108 | + $lineHeaderExport[] = utf8_decode('Work'.$rowe['week_id']); |
|
109 | + $lineHeaderExport[] = utf8_decode('Forum'.$rowe['week_id']); |
|
110 | 110 | //$fila_export_encabezado[] = utf8_decode('Eval'.$rowe['week_id']); |
111 | 111 | //$fila_export_encabezado[] = utf8_decode('PC'.$rowe['week_id']); |
112 | 112 | $lineHeaderExport2[] = utf8_decode($rowe['work_title']); |
113 | 113 | $lineHeaderExport2[] = utf8_decode($rowe['thread_title']); |
114 | 114 | //$fila_export_encabezado2[] = utf8_decode($rowe['eval_title']); |
115 | 115 | //$fila_export_encabezado2[] = utf8_decode($rowe['pc_title']); |
116 | - $fila_export = array('Work' . $rowe['week_id'], 'Forum' . $rowe['week_id'], 'Eval' . $rowe['week_id'], 'PC' . $rowe['week_id']); |
|
116 | + $fila_export = array('Work'.$rowe['week_id'], 'Forum'.$rowe['week_id'], 'Eval'.$rowe['week_id'], 'PC'.$rowe['week_id']); |
|
117 | 117 | if ($rowe['week_id'] > (($page - 1) * 7) && $rowe['week_id'] <= (7 * $page)) { |
118 | 118 | $ids[$rowe['week_id']] = $rowe['id']; |
119 | - $line.='<th> |
|
120 | - <a href="#" onClick="showContent(' . "'tarea" . $rowe['week_id'] . "'" . ');">Work' . $rowe['week_id'] . ' |
|
121 | - <div class="blackboard_hide" id="tarea' . $rowe['week_id'] . '">' . $rowe['work_title'] . '</div> |
|
119 | + $line .= '<th> |
|
120 | + <a href="#" onClick="showContent(' . "'tarea".$rowe['week_id']."'".');">Work'.$rowe['week_id'].' |
|
121 | + <div class="blackboard_hide" id="tarea' . $rowe['week_id'].'">'.$rowe['work_title'].'</div> |
|
122 | 122 | </a></th>'; |
123 | - $line.= '<th> |
|
124 | - <a href="#" onClick="showContent(' . "'foro" . $rowe['week_id'] . "'" . ');">Forum' . $rowe['week_id'] . ' |
|
125 | - <div class="blackboard_hide" id="foro' . $rowe['week_id'] . '">' . $rowe['thread_title'] . '</div> |
|
123 | + $line .= '<th> |
|
124 | + <a href="#" onClick="showContent(' . "'foro".$rowe['week_id']."'".');">Forum'.$rowe['week_id'].' |
|
125 | + <div class="blackboard_hide" id="foro' . $rowe['week_id'].'">'.$rowe['thread_title'].'</div> |
|
126 | 126 | </a> |
127 | 127 | </th>'; |
128 | 128 | } |
129 | 129 | } |
130 | 130 | $tableExport[] = $lineHeaderExport; |
131 | 131 | $tableExport[] = $lineHeaderExport2; |
132 | - $line.= '</tr>'; |
|
132 | + $line .= '</tr>'; |
|
133 | 133 | |
134 | 134 | $html = '<form action="tutor.php" name="semanas" id="semanas" method="POST"> |
135 | 135 | <div class="row"> |
136 | - ' . get_lang('SelectWeeksSpan') . ' |
|
136 | + ' . get_lang('SelectWeeksSpan').' |
|
137 | 137 | <select name="weeksNumber" id="weeksNumber" onChange="submit();"> |
138 | - <option value="7" ' . (($weeksCount == 7) ? 'selected="selected"' : "") . '>7 weeks</option> |
|
139 | - <option value="14" ' . (($weeksCount == 14) ? 'selected="selected"' : "") . '>14 weeks</option> |
|
138 | + <option value="7" ' . (($weeksCount == 7) ? 'selected="selected"' : "").'>7 weeks</option> |
|
139 | + <option value="14" ' . (($weeksCount == 14) ? 'selected="selected"' : "").'>14 weeks</option> |
|
140 | 140 | </select>'; |
141 | 141 | |
142 | 142 | |
143 | 143 | if ($weeksCount == 14) { |
144 | - $html .= '<span style="float:right;"><a href="tutor.php?page=' . (($page == 1) ? 2 : 1) . '">' . (($page == 1) ? "Siguiente" : "Anterior") . '</a></span>'; |
|
144 | + $html .= '<span style="float:right;"><a href="tutor.php?page='.(($page == 1) ? 2 : 1).'">'.(($page == 1) ? "Siguiente" : "Anterior").'</a></span>'; |
|
145 | 145 | } |
146 | - $html .= '<span style="float:right;"><a href="' . api_get_self() . '?action=export' . $get_parameter . $get_parameter2 . '">' . Display::return_icon('export_excel.png', get_lang('Export'), '', '32') . '</a></span>'; |
|
146 | + $html .= '<span style="float:right;"><a href="'.api_get_self().'?action=export'.$get_parameter.$get_parameter2.'">'.Display::return_icon('export_excel.png', get_lang('Export'), '', '32').'</a></span>'; |
|
147 | 147 | |
148 | 148 | $html .= '</form>'; |
149 | 149 | $html .= '<table class="reports">'; |
150 | 150 | $html .= '<tr> |
151 | 151 | <th ></th>'; |
152 | 152 | for ($i = (7 * $page - 6); $i <= $page * 7; $i++) { |
153 | - $html .= '<th colspan="2">Week ' . $i . '<a href="assign_tickets.php?id=' . $ids[$i] . '" class="ajax">' . Display::return_icon('edit.png', get_lang('Edit'), array('width' => '16', 'height' => '16'), 22) . '</a></th>'; |
|
153 | + $html .= '<th colspan="2">Week '.$i.'<a href="assign_tickets.php?id='.$ids[$i].'" class="ajax">'.Display::return_icon('edit.png', get_lang('Edit'), array('width' => '16', 'height' => '16'), 22).'</a></th>'; |
|
154 | 154 | } |
155 | 155 | $html .= '</tr>'; |
156 | 156 | $html .= $line; |
@@ -167,7 +167,7 @@ discard block |
||
167 | 167 | if ($row['week_id'] > (($page - 1) * 7) && $row['week_id'] <= (7 * $page)) { |
168 | 168 | $results[$row['username']][$row['week_id']] = $row; |
169 | 169 | if (count($results[$row['username']]) == 7) { |
170 | - $html.= showStudentResult($results[$row['username']], $page); |
|
170 | + $html .= showStudentResult($results[$row['username']], $page); |
|
171 | 171 | } |
172 | 172 | } |
173 | 173 | if (count($resultadose[$row['username']]) == $weeksCount) { |
@@ -190,12 +190,12 @@ discard block |
||
190 | 190 | $inicio = (7 * $pagina - 6); |
191 | 191 | $fila = '<tr>'; |
192 | 192 | |
193 | - $fila.= '<td><a href="' . api_get_path(WEB_CODE_PATH) . 'user/userInfo.php?' . api_get_cidreq() . '&uInfo=' . $datos[$inicio]['user_id'] . '">' . $datos[$inicio]['username'] . '</a></td>'; |
|
193 | + $fila .= '<td><a href="'.api_get_path(WEB_CODE_PATH).'user/userInfo.php?'.api_get_cidreq().'&uInfo='.$datos[$inicio]['user_id'].'">'.$datos[$inicio]['username'].'</a></td>'; |
|
194 | 194 | foreach ($datos as $dato) { |
195 | - $fila.= '<td align="center">' . (($dato['work_ok'] == 1) ? Display::return_icon('check.png') : Display::return_icon('aspa.png')) . '</td>'; |
|
196 | - $fila.= '<td align="center">' . (($dato['thread_ok'] == 1) ? Display::return_icon('check.png') : Display::return_icon('aspa.png')) . '</td>'; |
|
195 | + $fila .= '<td align="center">'.(($dato['work_ok'] == 1) ? Display::return_icon('check.png') : Display::return_icon('aspa.png')).'</td>'; |
|
196 | + $fila .= '<td align="center">'.(($dato['thread_ok'] == 1) ? Display::return_icon('check.png') : Display::return_icon('aspa.png')).'</td>'; |
|
197 | 197 | } |
198 | - $fila.= '</tr>'; |
|
198 | + $fila .= '</tr>'; |
|
199 | 199 | return $fila; |
200 | 200 | } |
201 | 201 |
@@ -94,7 +94,7 @@ |
||
94 | 94 | /** |
95 | 95 | * @param array $templates |
96 | 96 | * |
97 | - * @return null |
|
97 | + * @return null|string |
|
98 | 98 | */ |
99 | 99 | public function formatTemplates($templates) |
100 | 100 | { |
@@ -145,14 +145,14 @@ discard block |
||
145 | 145 | return [[ |
146 | 146 | 'title' => get_lang('EmptyTemplate'), |
147 | 147 | 'description' => null, |
148 | - 'image' => api_get_path(WEB_APP_PATH) . 'home/default_platform_document/template_thumb/empty.gif', |
|
148 | + 'image' => api_get_path(WEB_APP_PATH).'home/default_platform_document/template_thumb/empty.gif', |
|
149 | 149 | 'html' => ' |
150 | 150 | <!DOCYTPE html> |
151 | 151 | <html> |
152 | 152 | <head> |
153 | - <meta charset="' . api_get_system_encoding() . '" /> |
|
153 | + <meta charset="' . api_get_system_encoding().'" /> |
|
154 | 154 | </head> |
155 | - <body dir="' . api_get_text_direction() . '"> |
|
155 | + <body dir="' . api_get_text_direction().'"> |
|
156 | 156 | <p> |
157 | 157 | <br/> |
158 | 158 | </p> |
@@ -175,7 +175,7 @@ discard block |
||
175 | 175 | $search = array('{CSS}', '{IMG_DIR}', '{REL_PATH}', '{COURSE_DIR}'); |
176 | 176 | $replace = array( |
177 | 177 | '', |
178 | - api_get_path(REL_CODE_PATH) . 'img/', |
|
178 | + api_get_path(REL_CODE_PATH).'img/', |
|
179 | 179 | api_get_path(REL_PATH), |
180 | 180 | api_get_path(REL_DEFAULT_COURSE_DOCUMENT_PATH), |
181 | 181 | api_get_path(REL_DEFAULT_COURSE_DOCUMENT_PATH) |
@@ -186,7 +186,7 @@ discard block |
||
186 | 186 | foreach ($systemTemplates as $template) { |
187 | 187 | $image = $template->getImage(); |
188 | 188 | $image = !empty($image) ? $image : 'empty.gif'; |
189 | - $image = api_get_path(WEB_APP_PATH) . 'home/default_platform_document/template_thumb/' . $image; |
|
189 | + $image = api_get_path(WEB_APP_PATH).'home/default_platform_document/template_thumb/'.$image; |
|
190 | 190 | |
191 | 191 | /*$image = $this->urlGenerator->generate( |
192 | 192 | 'get_document_template_action', |
@@ -238,12 +238,12 @@ discard block |
||
238 | 238 | $templateItem['image'] = api_get_path(WEB_APP_PATH) |
239 | 239 | . 'home/default_platform_document/template_thumb/noimage.gif'; |
240 | 240 | $templateItem['html'] = file_get_contents(api_get_path(SYS_COURSE_PATH) |
241 | - . $courseDirectory . '/document' . $templateData['path']); |
|
241 | + . $courseDirectory.'/document'.$templateData['path']); |
|
242 | 242 | |
243 | 243 | $image = $template->getImage(); |
244 | 244 | if (!empty($image)) { |
245 | 245 | $templateItem['image'] = api_get_path(WEB_COURSE_PATH) |
246 | - . $courseDirectory . '/upload/template_thumbnails/' . $template->getImage(); |
|
246 | + . $courseDirectory.'/upload/template_thumbnails/'.$template->getImage(); |
|
247 | 247 | } |
248 | 248 | |
249 | 249 | $templateList[] = $templateItem; |
@@ -84,7 +84,7 @@ |
||
84 | 84 | |
85 | 85 | /** |
86 | 86 | * Available driver list. |
87 | - * @return array |
|
87 | + * @return string[] |
|
88 | 88 | */ |
89 | 89 | private function getDefaultDriverList() |
90 | 90 | { |
@@ -51,7 +51,7 @@ discard block |
||
51 | 51 | 'root_sys' => api_get_path(SYS_PATH), |
52 | 52 | 'sys_root' => api_get_path(SYS_PATH), // just an alias |
53 | 53 | 'sys_course_path' => api_get_path(SYS_COURSE_PATH), |
54 | - // 'sys_config_path' => $app['path.config'], |
|
54 | + // 'sys_config_path' => $app['path.config'], |
|
55 | 55 | 'path.temp' => api_get_path(SYS_ARCHIVE_PATH), |
56 | 56 | //'sys_log_path' => $app['path.logs'] |
57 | 57 | ); |
@@ -325,9 +325,9 @@ discard block |
||
325 | 325 | **/ |
326 | 326 | public function access($attr, $path, $data, $volume) |
327 | 327 | { |
328 | - return strpos(basename($path), '.') === 0 // if file/folder begins with '.' (dot) |
|
329 | - ? !($attr == 'read' || $attr == 'write') // set read+write to false, other (locked+hidden) set to true |
|
330 | - : null; // else elFinder decide it itself |
|
328 | + return strpos(basename($path), '.') === 0 // if file/folder begins with '.' (dot) |
|
329 | + ? !($attr == 'read' || $attr == 'write') // set read+write to false, other (locked+hidden) set to true |
|
330 | + : null; // else elFinder decide it itself |
|
331 | 331 | } |
332 | 332 | |
333 | 333 | /** |
@@ -327,7 +327,7 @@ |
||
327 | 327 | { |
328 | 328 | return strpos(basename($path), '.') === 0 // if file/folder begins with '.' (dot) |
329 | 329 | ? !($attr == 'read' || $attr == 'write') // set read+write to false, other (locked+hidden) set to true |
330 | - : null; // else elFinder decide it itself |
|
330 | + : null; // else elFinder decide it itself |
|
331 | 331 | } |
332 | 332 | |
333 | 333 | /** |
@@ -133,7 +133,7 @@ discard block |
||
133 | 133 | /** |
134 | 134 | * Close connection |
135 | 135 | * |
136 | - * @return void |
|
136 | + * @return boolean |
|
137 | 137 | * @author Dmitry (dio) Levashov |
138 | 138 | **/ |
139 | 139 | public function umount() { |
@@ -488,7 +488,7 @@ discard block |
||
488 | 488 | * Close opened file |
489 | 489 | * |
490 | 490 | * @param resource $fp file pointer |
491 | - * @return bool |
|
491 | + * @return boolean|null |
|
492 | 492 | * @author Dmitry (dio) Levashov |
493 | 493 | **/ |
494 | 494 | protected function _fclose($fp, $path='') { |
@@ -505,7 +505,7 @@ discard block |
||
505 | 505 | * |
506 | 506 | * @param string $path parent dir path |
507 | 507 | * @param string $name new directory name |
508 | - * @return string|bool |
|
508 | + * @return string|false |
|
509 | 509 | * @author Dmitry (dio) Levashov |
510 | 510 | **/ |
511 | 511 | protected function _mkdir($path, $name) { |
@@ -633,8 +633,8 @@ |
||
633 | 633 | } |
634 | 634 | |
635 | 635 | /** |
636 | - * {@inheritdoc} |
|
637 | - */ |
|
636 | + * {@inheritdoc} |
|
637 | + */ |
|
638 | 638 | protected function _archive($dir, $files, $name, $arc) { |
639 | 639 | return false; |
640 | 640 | } |
@@ -464,7 +464,7 @@ discard block |
||
464 | 464 | * @return resource|false |
465 | 465 | * @author Dmitry (dio) Levashov |
466 | 466 | **/ |
467 | - protected function _fopen($path, $mode='rb') { |
|
467 | + protected function _fopen($path, $mode = 'rb') { |
|
468 | 468 | $fp = $this->tmbPath |
469 | 469 | ? @fopen($this->tmpname($path), 'w+') |
470 | 470 | : @tmpfile(); |
@@ -491,7 +491,7 @@ discard block |
||
491 | 491 | * @return bool |
492 | 492 | * @author Dmitry (dio) Levashov |
493 | 493 | **/ |
494 | - protected function _fclose($fp, $path='') { |
|
494 | + protected function _fclose($fp, $path = '') { |
|
495 | 495 | @fclose($fp); |
496 | 496 | if ($path) { |
497 | 497 | @unlink($this->tmpname($path)); |
@@ -116,7 +116,7 @@ |
||
116 | 116 | |
117 | 117 | /** |
118 | 118 | * Create folders |
119 | - * @param array $folderList |
|
119 | + * @param string[] $folderList |
|
120 | 120 | * @param OutputInterface $output |
121 | 121 | * @param string $folderPermissions |
122 | 122 | */ |
@@ -86,13 +86,13 @@ |
||
86 | 86 | return $this->get($file); |
87 | 87 | } |
88 | 88 | |
89 | - /** |
|
90 | - * Gets a file from the data/courses/MATHS/scorm directory |
|
91 | - * @param string $courseCode |
|
92 | - * @param string $file |
|
93 | - * |
|
94 | - * @return SplFileInfo |
|
95 | - */ |
|
89 | + /** |
|
90 | + * Gets a file from the data/courses/MATHS/scorm directory |
|
91 | + * @param string $courseCode |
|
92 | + * @param string $file |
|
93 | + * |
|
94 | + * @return SplFileInfo |
|
95 | + */ |
|
96 | 96 | public function getCourseScormDocument($courseCode, $file) |
97 | 97 | { |
98 | 98 | $file = 'courses/'.$courseCode.'/scorm/'.$file; |
@@ -532,7 +532,6 @@ discard block |
||
532 | 532 | /** |
533 | 533 | * Set sslPubKey |
534 | 534 | * |
535 | - * @param string $sslPubKey |
|
536 | 535 | * @return BranchSync |
537 | 536 | */ |
538 | 537 | public function setBranchType($branchType) |
@@ -714,7 +713,7 @@ discard block |
||
714 | 713 | } |
715 | 714 | |
716 | 715 | /** |
717 | - * @return mixed |
|
716 | + * @return null|BranchSync |
|
718 | 717 | */ |
719 | 718 | public function getParent() |
720 | 719 | { |
@@ -136,11 +136,11 @@ discard block |
||
136 | 136 | */ |
137 | 137 | private $lastSyncType; |
138 | 138 | |
139 | - /** |
|
140 | - * @var string |
|
141 | - * |
|
142 | - * @ORM\Column(name="ssl_pub_key", type="string", length=250, nullable=true, unique=false) |
|
143 | - */ |
|
139 | + /** |
|
140 | + * @var string |
|
141 | + * |
|
142 | + * @ORM\Column(name="ssl_pub_key", type="string", length=250, nullable=true, unique=false) |
|
143 | + */ |
|
144 | 144 | private $sslPubKey; |
145 | 145 | |
146 | 146 | /** |
@@ -529,12 +529,12 @@ discard block |
||
529 | 529 | return $this->sslPubKey; |
530 | 530 | } |
531 | 531 | |
532 | - /** |
|
533 | - * Set sslPubKey |
|
534 | - * |
|
535 | - * @param string $sslPubKey |
|
536 | - * @return BranchSync |
|
537 | - */ |
|
532 | + /** |
|
533 | + * Set sslPubKey |
|
534 | + * |
|
535 | + * @param string $sslPubKey |
|
536 | + * @return BranchSync |
|
537 | + */ |
|
538 | 538 | public function setBranchType($branchType) |
539 | 539 | { |
540 | 540 | $this->branchType = $branchType; |
@@ -318,7 +318,7 @@ discard block |
||
318 | 318 | } |
319 | 319 | |
320 | 320 | /** |
321 | - * @return ArrayCollection |
|
321 | + * @return CTool[] |
|
322 | 322 | */ |
323 | 323 | public function getTools() |
324 | 324 | { |
@@ -1146,7 +1146,7 @@ discard block |
||
1146 | 1146 | } |
1147 | 1147 | |
1148 | 1148 | /** |
1149 | - * @return array |
|
1149 | + * @return string[] |
|
1150 | 1150 | */ |
1151 | 1151 | public static function getStatusList() |
1152 | 1152 | { |
@@ -139,7 +139,7 @@ |
||
139 | 139 | } |
140 | 140 | |
141 | 141 | /** |
142 | - * @param $user |
|
142 | + * @param User $user |
|
143 | 143 | * @return $this |
144 | 144 | */ |
145 | 145 | public function setUser($user) |