@@ -87,8 +87,8 @@ discard block |
||
87 | 87 | // generate the data to display |
88 | 88 | $sortable_data = array(); |
89 | 89 | foreach ($data_array as $data) { |
90 | - if ($data[2]!="") {//filter by course removed |
|
91 | - $row = array (); |
|
90 | + if ($data[2] != "") {//filter by course removed |
|
91 | + $row = array(); |
|
92 | 92 | $row[] = $this->build_type_column($data[0]); |
93 | 93 | $row[] = $this->build_name_link($data[0]); |
94 | 94 | $row[] = $data[2]; |
@@ -124,15 +124,15 @@ discard block |
||
124 | 124 | // evaluation |
125 | 125 | case 'E': |
126 | 126 | return ' ' |
127 | - . '<a href="gradebook_view_result.php?selecteval=' . $item->get_id() . '">' |
|
127 | + . '<a href="gradebook_view_result.php?selecteval='.$item->get_id().'">' |
|
128 | 128 | . $item->get_name() |
129 | 129 | . '</a>'; |
130 | 130 | // link |
131 | 131 | case 'L': |
132 | - return ' <a href="' . $item->get_link() . '">' |
|
132 | + return ' <a href="'.$item->get_link().'">' |
|
133 | 133 | . $item->get_name() |
134 | 134 | . '</a>' |
135 | - . ' [' . $item->get_type_name() . ']'; |
|
135 | + . ' ['.$item->get_type_name().']'; |
|
136 | 136 | } |
137 | 137 | } |
138 | 138 | } |
@@ -56,7 +56,7 @@ discard block |
||
56 | 56 | |
57 | 57 | protected function build_move() |
58 | 58 | { |
59 | - $renderer =& $this->defaultRenderer(); |
|
59 | + $renderer = & $this->defaultRenderer(); |
|
60 | 60 | $renderer->setCustomElementTemplate('<span>{element}</span> '); |
61 | 61 | $this->addElement( |
62 | 62 | 'static', |
@@ -138,7 +138,7 @@ discard block |
||
138 | 138 | $link = LinkFactory::create($link); |
139 | 139 | if (!empty($courseCode)) { |
140 | 140 | $link->set_course_code($courseCode); |
141 | - } elseif(!empty($_GET['course_code'])) { |
|
141 | + } elseif (!empty($_GET['course_code'])) { |
|
142 | 142 | $link->set_course_code(Database::escape_string($_GET['course_code'], null, false)); |
143 | 143 | } |
144 | 144 |
@@ -50,9 +50,9 @@ discard block |
||
50 | 50 | |
51 | 51 | } |
52 | 52 | if (count($result) == 0) { |
53 | - $evals_filtered=$evals; |
|
53 | + $evals_filtered = $evals; |
|
54 | 54 | } else { |
55 | - $evals_filtered=$evals_filtered_copy; |
|
55 | + $evals_filtered = $evals_filtered_copy; |
|
56 | 56 | } |
57 | 57 | $this->items = array_merge($evals_filtered, $links); |
58 | 58 | |
@@ -85,7 +85,7 @@ discard block |
||
85 | 85 | { |
86 | 86 | // do some checks on count, redefine if invalid value |
87 | 87 | if (!isset($count)) { |
88 | - $count = count ($this->items) - $start; |
|
88 | + $count = count($this->items) - $start; |
|
89 | 89 | } |
90 | 90 | if ($count < 0) { |
91 | 91 | $count = 0; |
@@ -104,20 +104,20 @@ discard block |
||
104 | 104 | } elseif ($sorting & self :: UDG_SORT_AVERAGE) { |
105 | 105 | // if user sorts on average scores, first calculate them and cache them |
106 | 106 | foreach ($allitems as $item) { |
107 | - $this->avgcache[$item->get_item_type() . $item->get_id()]= $item->calc_score(); |
|
107 | + $this->avgcache[$item->get_item_type().$item->get_id()] = $item->calc_score(); |
|
108 | 108 | } |
109 | 109 | usort($allitems, array('UserDataGenerator', 'sort_by_average')); |
110 | 110 | } elseif ($sorting & self :: UDG_SORT_SCORE) { |
111 | 111 | // if user sorts on student's scores, first calculate them and cache them |
112 | 112 | foreach ($allitems as $item) { |
113 | - $this->scorecache[$item->get_item_type() . $item->get_id()] |
|
113 | + $this->scorecache[$item->get_item_type().$item->get_id()] |
|
114 | 114 | = $item->calc_score($this->userid); |
115 | 115 | } |
116 | 116 | usort($allitems, array('UserDataGenerator', 'sort_by_score')); |
117 | 117 | } elseif ($sorting & self :: UDG_SORT_MASK) { |
118 | 118 | // if user sorts on student's masks, first calculate scores and cache them |
119 | 119 | foreach ($allitems as $item) { |
120 | - $this->scorecache[$item->get_item_type() . $item->get_id()] |
|
120 | + $this->scorecache[$item->get_item_type().$item->get_id()] |
|
121 | 121 | = $item->calc_score($this->userid); |
122 | 122 | } |
123 | 123 | usort($allitems, array('UserDataGenerator', 'sort_by_mask')); |
@@ -132,7 +132,7 @@ discard block |
||
132 | 132 | // fill score cache if not done yet |
133 | 133 | if (!isset ($this->scorecache)) { |
134 | 134 | foreach ($visibleitems as $item) { |
135 | - $this->scorecache[$item->get_item_type() . $item->get_id()] |
|
135 | + $this->scorecache[$item->get_item_type().$item->get_id()] |
|
136 | 136 | = $item->calc_score($this->userid); |
137 | 137 | } |
138 | 138 | |
@@ -141,7 +141,7 @@ discard block |
||
141 | 141 | $scoredisplay = ScoreDisplay :: instance(); |
142 | 142 | $data = array(); |
143 | 143 | foreach ($visibleitems as $item) { |
144 | - $row = array (); |
|
144 | + $row = array(); |
|
145 | 145 | $row[] = $item; |
146 | 146 | $row[] = $item->get_name(); |
147 | 147 | $row[] = $this->build_course_name($item); |
@@ -163,7 +163,7 @@ discard block |
||
163 | 163 | function sort_by_type($item1, $item2) |
164 | 164 | { |
165 | 165 | if ($item1->get_item_type() == $item2->get_item_type()) { |
166 | - return $this->sort_by_name($item1,$item2); |
|
166 | + return $this->sort_by_name($item1, $item2); |
|
167 | 167 | } else { |
168 | 168 | return ($item1->get_item_type() < $item2->get_item_type() ? -1 : 1); |
169 | 169 | } |
@@ -203,7 +203,7 @@ discard block |
||
203 | 203 | */ |
204 | 204 | function sort_by_name($item1, $item2) |
205 | 205 | { |
206 | - return api_strnatcmp($item1->get_name(),$item2->get_name()); |
|
206 | + return api_strnatcmp($item1->get_name(), $item2->get_name()); |
|
207 | 207 | } |
208 | 208 | |
209 | 209 | /** |
@@ -213,8 +213,8 @@ discard block |
||
213 | 213 | */ |
214 | 214 | function sort_by_average($item1, $item2) |
215 | 215 | { |
216 | - $score1 = $this->avgcache[$item1->get_item_type() . $item1->get_id()]; |
|
217 | - $score2 = $this->avgcache[$item2->get_item_type() . $item2->get_id()]; |
|
216 | + $score1 = $this->avgcache[$item1->get_item_type().$item1->get_id()]; |
|
217 | + $score2 = $this->avgcache[$item2->get_item_type().$item2->get_id()]; |
|
218 | 218 | |
219 | 219 | return $this->compare_scores($score1, $score2); |
220 | 220 | } |
@@ -226,8 +226,8 @@ discard block |
||
226 | 226 | */ |
227 | 227 | function sort_by_score($item1, $item2) |
228 | 228 | { |
229 | - $score1 = $this->scorecache[$item1->get_item_type() . $item1->get_id()]; |
|
230 | - $score2 = $this->scorecache[$item2->get_item_type() . $item2->get_id()]; |
|
229 | + $score1 = $this->scorecache[$item1->get_item_type().$item1->get_id()]; |
|
230 | + $score2 = $this->scorecache[$item2->get_item_type().$item2->get_id()]; |
|
231 | 231 | |
232 | 232 | return $this->compare_scores($score1, $score2); |
233 | 233 | } |
@@ -239,8 +239,8 @@ discard block |
||
239 | 239 | */ |
240 | 240 | function sort_by_mask($item1, $item2) |
241 | 241 | { |
242 | - $score1 = $this->scorecache[$item1->get_item_type() . $item1->get_id()]; |
|
243 | - $score2 = $this->scorecache[$item2->get_item_type() . $item2->get_id()]; |
|
242 | + $score1 = $this->scorecache[$item1->get_item_type().$item1->get_id()]; |
|
243 | + $score2 = $this->scorecache[$item2->get_item_type().$item2->get_id()]; |
|
244 | 244 | |
245 | 245 | return ScoreDisplay :: compare_scores_by_custom_display($score1, $score2); |
246 | 246 | } |
@@ -256,10 +256,10 @@ discard block |
||
256 | 256 | return (isset($score2) ? 1 : 0); |
257 | 257 | } elseif (!isset($score2)) { |
258 | 258 | return -1; |
259 | - } elseif (($score1[0]/$score1[1]) == ($score2[0]/$score2[1])) { |
|
259 | + } elseif (($score1[0] / $score1[1]) == ($score2[0] / $score2[1])) { |
|
260 | 260 | return 0; |
261 | 261 | } else { |
262 | - return (($score1[0]/$score1[1]) < ($score2[0]/$score2[1]) ? -1 : 1); |
|
262 | + return (($score1[0] / $score1[1]) < ($score2[0] / $score2[1]) ? -1 : 1); |
|
263 | 263 | } |
264 | 264 | } |
265 | 265 | |
@@ -291,7 +291,7 @@ discard block |
||
291 | 291 | private function build_average_column($item, $ignore_score_color) |
292 | 292 | { |
293 | 293 | if (isset($this->avgcache)) { |
294 | - $avgscore = $this->avgcache[$item->get_item_type() . $item->get_id()]; |
|
294 | + $avgscore = $this->avgcache[$item->get_item_type().$item->get_id()]; |
|
295 | 295 | } else { |
296 | 296 | $avgscore = $item->calc_score(); |
297 | 297 | } |
@@ -311,7 +311,7 @@ discard block |
||
311 | 311 | */ |
312 | 312 | private function build_result_column($item, $ignore_score_color) |
313 | 313 | { |
314 | - $studscore = $this->scorecache[$item->get_item_type() . $item->get_id()]; |
|
314 | + $studscore = $this->scorecache[$item->get_item_type().$item->get_id()]; |
|
315 | 315 | $scoredisplay = ScoreDisplay :: instance(); |
316 | 316 | $displaytype = SCORE_DIV_PERCENT; |
317 | 317 | if ($ignore_score_color) { |
@@ -328,7 +328,7 @@ discard block |
||
328 | 328 | */ |
329 | 329 | private function build_mask_column($item, $ignore_score_color) |
330 | 330 | { |
331 | - $studscore = $this->scorecache[$item->get_item_type() . $item->get_id()]; |
|
331 | + $studscore = $this->scorecache[$item->get_item_type().$item->get_id()]; |
|
332 | 332 | $scoredisplay = ScoreDisplay :: instance(); |
333 | 333 | $displaytype = SCORE_DIV_PERCENT; |
334 | 334 | if ($ignore_score_color) { |
@@ -14,7 +14,7 @@ discard block |
||
14 | 14 | /** |
15 | 15 | * constructor of the class |
16 | 16 | */ |
17 | - public function __construct($get_questions=false,$get_answers=false) |
|
17 | + public function __construct($get_questions = false, $get_answers = false) |
|
18 | 18 | { |
19 | 19 | } |
20 | 20 | |
@@ -37,7 +37,7 @@ discard block |
||
37 | 37 | |
38 | 38 | foreach ($dato[0] as $header_col) { |
39 | 39 | if (!empty($header_col)) { |
40 | - $data .= str_replace("\r\n",' ',api_html_entity_decode(strip_tags($header_col))).';'; |
|
40 | + $data .= str_replace("\r\n", ' ', api_html_entity_decode(strip_tags($header_col))).';'; |
|
41 | 41 | } |
42 | 42 | } |
43 | 43 | |
@@ -46,10 +46,10 @@ discard block |
||
46 | 46 | |
47 | 47 | for ($i = 0; $i < $cant_students; $i++) { |
48 | 48 | $column = 0; |
49 | - foreach($dato[1][$i] as $col_name) { |
|
50 | - $data .= str_replace("\r\n",' ',api_html_entity_decode(strip_tags($col_name))).';'; |
|
49 | + foreach ($dato[1][$i] as $col_name) { |
|
50 | + $data .= str_replace("\r\n", ' ', api_html_entity_decode(strip_tags($col_name))).';'; |
|
51 | 51 | } |
52 | - $data .="\r\n"; |
|
52 | + $data .= "\r\n"; |
|
53 | 53 | } |
54 | 54 | |
55 | 55 | //output the results |
@@ -124,7 +124,7 @@ discard block |
||
124 | 124 | */ |
125 | 125 | public function exportCompleteReportDOC($data) |
126 | 126 | { |
127 | - $filename = 'gradebook_results_'.api_get_local_time() . '.docx'; |
|
127 | + $filename = 'gradebook_results_'.api_get_local_time().'.docx'; |
|
128 | 128 | |
129 | 129 | $doc = new \PhpOffice\PhpWord\PhpWord(); |
130 | 130 | $section = $doc->addSection(['orientation' => 'landscape']); |
@@ -143,7 +143,7 @@ discard block |
||
143 | 143 | } |
144 | 144 | } |
145 | 145 | |
146 | - $file = api_get_path(SYS_ARCHIVE_PATH) . api_replace_dangerous_char($filename); |
|
146 | + $file = api_get_path(SYS_ARCHIVE_PATH).api_replace_dangerous_char($filename); |
|
147 | 147 | $doc->save($file, 'Word2007'); |
148 | 148 | |
149 | 149 | DocumentManager::file_send_for_download($file, true, $filename); |
@@ -11,15 +11,15 @@ discard block |
||
11 | 11 | |
12 | 12 | $selectCat = isset($_GET['selectcat']) ? (int) $_GET['selectcat'] : 0; |
13 | 13 | |
14 | -$interbreadcrumb[] = array ( |
|
14 | +$interbreadcrumb[] = array( |
|
15 | 15 | 'url' => $_SESSION['gradebook_dest'].'?', |
16 | 16 | 'name' => get_lang('Gradebook' |
17 | 17 | )); |
18 | -$interbreadcrumb[] = array ( |
|
18 | +$interbreadcrumb[] = array( |
|
19 | 19 | 'url' => $_SESSION['gradebook_dest'].'?selectcat='.$selectCat, |
20 | 20 | 'name' => get_lang('Details' |
21 | 21 | )); |
22 | -$interbreadcrumb[] = array ( |
|
22 | +$interbreadcrumb[] = array( |
|
23 | 23 | 'url' => 'gradebook_showlog_eval.php?visiblelog='.Security::remove_XSS($_GET['visiblelog']).'&selectcat='.$selectCat, |
24 | 24 | 'name' => get_lang('GradebookQualifyLog') |
25 | 25 | ); |
@@ -30,7 +30,7 @@ discard block |
||
30 | 30 | |
31 | 31 | $t_linkeval_log = Database :: get_main_table(TABLE_MAIN_GRADEBOOK_LINKEVAL_LOG); |
32 | 32 | $t_user = Database :: get_main_table(TABLE_MAIN_USER); |
33 | -$visible_log=Security::remove_XSS($_GET['visiblelog']); |
|
33 | +$visible_log = Security::remove_XSS($_GET['visiblelog']); |
|
34 | 34 | |
35 | 35 | $evaledit = Evaluation :: load($visible_log); |
36 | 36 | $sql = "SELECT le.name,le.description,le.weight,le.visible,le.type,le.created_at,us.username |
@@ -45,8 +45,8 @@ discard block |
||
45 | 45 | } |
46 | 46 | |
47 | 47 | foreach ($list_info as $key => $info_log) { |
48 | - $list_info[$key][5]=($info_log[5]) ? api_convert_and_format_date($info_log[5]) : 'N/A'; |
|
49 | - $list_info[$key][3]=($info_log[3]==1) ? get_lang('GradebookVisible') : get_lang('GradebookInvisible'); |
|
48 | + $list_info[$key][5] = ($info_log[5]) ? api_convert_and_format_date($info_log[5]) : 'N/A'; |
|
49 | + $list_info[$key][3] = ($info_log[3] == 1) ? get_lang('GradebookVisible') : get_lang('GradebookInvisible'); |
|
50 | 50 | } |
51 | 51 | |
52 | 52 | $parameters = array( |
@@ -9,21 +9,21 @@ discard block |
||
9 | 9 | |
10 | 10 | api_block_anonymous_users(); |
11 | 11 | |
12 | -$eval= Evaluation :: load($_GET['selecteval']); |
|
12 | +$eval = Evaluation :: load($_GET['selecteval']); |
|
13 | 13 | if ($eval[0]->get_category_id() < 0) { |
14 | 14 | // if category id is negative, then the evaluation's origin is a link |
15 | - $link= LinkFactory :: get_evaluation_link($eval[0]->get_id()); |
|
15 | + $link = LinkFactory :: get_evaluation_link($eval[0]->get_id()); |
|
16 | 16 | $currentcat = Category :: load($link->get_category_id()); |
17 | 17 | } else { |
18 | 18 | $currentcat = Category :: load($eval[0]->get_category_id()); |
19 | 19 | } |
20 | 20 | |
21 | -$interbreadcrumb[]= array ( |
|
22 | - 'url' => $_SESSION['gradebook_dest'].'?selectcat=' . $currentcat[0]->get_id(), 'name' => get_lang('ToolGradebook')); |
|
21 | +$interbreadcrumb[] = array( |
|
22 | + 'url' => $_SESSION['gradebook_dest'].'?selectcat='.$currentcat[0]->get_id(), 'name' => get_lang('ToolGradebook')); |
|
23 | 23 | |
24 | 24 | if (api_is_allowed_to_edit()) { |
25 | - $interbreadcrumb[]= array ( |
|
26 | - 'url' => 'gradebook_view_result.php?selecteval=' . Security::remove_XSS($_GET['selecteval']).'&'.api_get_cidreq(), |
|
25 | + $interbreadcrumb[] = array( |
|
26 | + 'url' => 'gradebook_view_result.php?selecteval='.Security::remove_XSS($_GET['selecteval']).'&'.api_get_cidreq(), |
|
27 | 27 | 'name' => get_lang('ViewResult') |
28 | 28 | ); |
29 | 29 | } |
@@ -45,7 +45,7 @@ discard block |
||
45 | 45 | Display :: display_error_message(get_lang('PleaseEnableScoringSystem'), false); |
46 | 46 | } |
47 | 47 | } else { |
48 | - $allresults = Result::load(null,null,$eval[0]->get_id()); |
|
48 | + $allresults = Result::load(null, null, $eval[0]->get_id()); |
|
49 | 49 | $nr_items = array(); |
50 | 50 | foreach ($displays as $itemsdisplay) { |
51 | 51 | $nr_items[$itemsdisplay['display']] = 0; |
@@ -78,19 +78,19 @@ discard block |
||
78 | 78 | } |
79 | 79 | |
80 | 80 | // Generate table |
81 | - $stattable= '<table class="data_table" cellspacing="0" cellpadding="3">'; |
|
82 | - $stattable .= '<tr><th>' . get_lang('ScoringSystem') . '</th>'; |
|
83 | - $stattable .= '<th>' . get_lang('Percentage') . '</th>'; |
|
84 | - $stattable .= '<th>' . get_lang('CountUsers') . '</th>'; |
|
81 | + $stattable = '<table class="data_table" cellspacing="0" cellpadding="3">'; |
|
82 | + $stattable .= '<tr><th>'.get_lang('ScoringSystem').'</th>'; |
|
83 | + $stattable .= '<th>'.get_lang('Percentage').'</th>'; |
|
84 | + $stattable .= '<th>'.get_lang('CountUsers').'</th>'; |
|
85 | 85 | //$stattable .= '<th>' . get_lang('Statistics') . '</th></tr>'; |
86 | - $counter=0; |
|
86 | + $counter = 0; |
|
87 | 87 | foreach ($keys as $key) { |
88 | - $bar = ($highest_ratio > 0?($nr_items[$key] / $highest_ratio) * 100:0); |
|
89 | - $stattable .= '<tr class="row_' . ($counter % 2 == 0 ? 'odd' : 'even') . '">'; |
|
90 | - $stattable .= '<td width="150">' . $key . '</td>'; |
|
88 | + $bar = ($highest_ratio > 0 ? ($nr_items[$key] / $highest_ratio) * 100 : 0); |
|
89 | + $stattable .= '<tr class="row_'.($counter % 2 == 0 ? 'odd' : 'even').'">'; |
|
90 | + $stattable .= '<td width="150">'.$key.'</td>'; |
|
91 | 91 | |
92 | 92 | $stattable .= '<td width="550">'.Display::bar_progress($bar).'</td>'; |
93 | - $stattable .= '<td align="right">' . $nr_items[$key] . '</td>'; |
|
93 | + $stattable .= '<td align="right">'.$nr_items[$key].'</td>'; |
|
94 | 94 | $counter++; |
95 | 95 | } |
96 | 96 | $stattable .= '</tr></table>'; |
@@ -57,7 +57,7 @@ discard block |
||
57 | 57 | } |
58 | 58 | |
59 | 59 | $c_id = $c_id ? intval($c_id) : api_get_course_int_id(); |
60 | - $table = Database::get_course_table(TABLE_TOOL_LIST); |
|
60 | + $table = Database::get_course_table(TABLE_TOOL_LIST); |
|
61 | 61 | $sql = "SELECT * from $table |
62 | 62 | WHERE c_id = $c_id and name='$name' |
63 | 63 | LIMIT 1"; |
@@ -194,7 +194,7 @@ discard block |
||
194 | 194 | $selected_skills = self::get_skills_by_gradebook($gradebook_id); |
195 | 195 | $clean_selected_skills = array(); |
196 | 196 | if (!empty($selected_skills)) { |
197 | - foreach($selected_skills as $skill) { |
|
197 | + foreach ($selected_skills as $skill) { |
|
198 | 198 | $clean_selected_skills[] = $skill['id']; |
199 | 199 | } |
200 | 200 | } |
@@ -84,7 +84,7 @@ discard block |
||
84 | 84 | foreach ($tab_parents_id as $parent_id) { |
85 | 85 | $Same_parent_LP_item_list = $LP_item_list->get_item_with_same_parent($parent_id); |
86 | 86 | $previous_item_id = 0; |
87 | - for ($i=0; $i < count($Same_parent_LP_item_list->list); $i++) { |
|
87 | + for ($i = 0; $i < count($Same_parent_LP_item_list->list); $i++) { |
|
88 | 88 | $item_id = $Same_parent_LP_item_list->list[$i]->id; |
89 | 89 | // display_order |
90 | 90 | $display_order = $i + 1; |
@@ -95,7 +95,7 @@ discard block |
||
95 | 95 | // next_item_id |
96 | 96 | $next_item_id = 0; |
97 | 97 | if ($i < count($Same_parent_LP_item_list->list) - 1) { |
98 | - $next_item_id = $Same_parent_LP_item_list->list[$i+1]->id; |
|
98 | + $next_item_id = $Same_parent_LP_item_list->list[$i + 1]->id; |
|
99 | 99 | } |
100 | 100 | $LP_item_list->set_parameters_for_id($item_id, $next_item_id, "next_item_id"); |
101 | 101 | } |
@@ -217,23 +217,23 @@ discard block |
||
217 | 217 | |
218 | 218 | if (api_get_session_id() == 0) { |
219 | 219 | echo '<div class="actions">'; |
220 | - if ($view_dropbox_category_received != 0 && api_is_allowed_to_session_edit(false, true)) { |
|
221 | - echo '<a href="'.api_get_self().'?'.api_get_cidreq().'&view_received_category=0&view_sent_category='.$viewSentCategory.'&view='.$view.'">'.Display::return_icon('folder_up.png', get_lang('Up').' '.get_lang('Root'),'',ICON_SIZE_MEDIUM)."</a>"; |
|
220 | + if ($view_dropbox_category_received != 0 && api_is_allowed_to_session_edit(false, true)) { |
|
221 | + echo '<a href="'.api_get_self().'?'.api_get_cidreq().'&view_received_category=0&view_sent_category='.$viewSentCategory.'&view='.$view.'">'.Display::return_icon('folder_up.png', get_lang('Up').' '.get_lang('Root'), '', ICON_SIZE_MEDIUM)."</a>"; |
|
222 | 222 | echo get_lang('Category').': <strong>'.Security::remove_XSS($dropbox_categories[$view_dropbox_category_received]['cat_name']).'</strong> '; |
223 | 223 | $movelist[0] = 'Root'; // move_received selectbox content |
224 | 224 | } else { |
225 | - echo '<a href="'.api_get_self().'?'.api_get_cidreq().'&action=addreceivedcategory&view='.$view.'">'.Display::return_icon('new_folder.png', get_lang('AddNewCategory'),'',ICON_SIZE_MEDIUM).'</a>'; |
|
225 | + echo '<a href="'.api_get_self().'?'.api_get_cidreq().'&action=addreceivedcategory&view='.$view.'">'.Display::return_icon('new_folder.png', get_lang('AddNewCategory'), '', ICON_SIZE_MEDIUM).'</a>'; |
|
226 | 226 | } |
227 | 227 | echo '</div>'; |
228 | 228 | } else { |
229 | 229 | if (api_is_allowed_to_session_edit(false, true)) { |
230 | 230 | echo '<div class="actions">'; |
231 | 231 | if ($view_dropbox_category_received != 0 && api_is_allowed_to_session_edit(false, true)) { |
232 | - echo '<a href="'.api_get_self().'?'.api_get_cidreq().'&view_received_category=0&view_sent_category='.$viewSentCategory.'&view='.$view.'">'.Display::return_icon('folder_up.png', get_lang('Up').' '.get_lang('Root'),'',ICON_SIZE_MEDIUM)."</a>"; |
|
232 | + echo '<a href="'.api_get_self().'?'.api_get_cidreq().'&view_received_category=0&view_sent_category='.$viewSentCategory.'&view='.$view.'">'.Display::return_icon('folder_up.png', get_lang('Up').' '.get_lang('Root'), '', ICON_SIZE_MEDIUM)."</a>"; |
|
233 | 233 | echo get_lang('Category').': <strong>'.Security::remove_XSS($dropbox_categories[$view_dropbox_category_received]['cat_name']).'</strong> '; |
234 | 234 | $movelist[0] = 'Root'; // move_received selectbox content |
235 | 235 | } else { |
236 | - echo '<a href="'.api_get_self().'?'.api_get_cidreq().'&action=addreceivedcategory&view='.$view.'">'.Display::return_icon('new_folder.png', get_lang('AddNewCategory'),'',ICON_SIZE_MEDIUM).'</a>'; |
|
236 | + echo '<a href="'.api_get_self().'?'.api_get_cidreq().'&action=addreceivedcategory&view='.$view.'">'.Display::return_icon('new_folder.png', get_lang('AddNewCategory'), '', ICON_SIZE_MEDIUM).'</a>'; |
|
237 | 237 | } |
238 | 238 | echo '</div>'; |
239 | 239 | } |
@@ -253,13 +253,13 @@ discard block |
||
253 | 253 | if (api_get_session_id() == 0) { |
254 | 254 | echo '<div class="actions">'; |
255 | 255 | if ($view_dropbox_category_sent != 0) { |
256 | - echo '<a href="'.api_get_self().'?'.api_get_cidreq().'&view_received_category='.$viewReceivedCategory.'&view_sent_category=0&view='.$view.'">'.Display::return_icon('folder_up.png', get_lang('Up').' '.get_lang('Root'),'',ICON_SIZE_MEDIUM)."</a>"; |
|
256 | + echo '<a href="'.api_get_self().'?'.api_get_cidreq().'&view_received_category='.$viewReceivedCategory.'&view_sent_category=0&view='.$view.'">'.Display::return_icon('folder_up.png', get_lang('Up').' '.get_lang('Root'), '', ICON_SIZE_MEDIUM)."</a>"; |
|
257 | 257 | echo get_lang('Category').': <strong>'.Security::remove_XSS($dropbox_categories[$view_dropbox_category_sent]['cat_name']).'</strong> '; |
258 | 258 | } else { |
259 | - echo "<a href=\"".api_get_self()."?".api_get_cidreq()."&view=".$view."&action=addsentcategory\">".Display::return_icon('new_folder.png', get_lang('AddNewCategory'),'',ICON_SIZE_MEDIUM)."</a>\n"; |
|
259 | + echo "<a href=\"".api_get_self()."?".api_get_cidreq()."&view=".$view."&action=addsentcategory\">".Display::return_icon('new_folder.png', get_lang('AddNewCategory'), '', ICON_SIZE_MEDIUM)."</a>\n"; |
|
260 | 260 | } |
261 | 261 | if (empty($viewSentCategory)) { |
262 | - echo "<a href=\"".api_get_self()."?".api_get_cidreq()."&view=".$view."&action=add\">".Display::return_icon('upload_file.png', get_lang('UploadNewFile'),'',ICON_SIZE_MEDIUM)."</a>"; |
|
262 | + echo "<a href=\"".api_get_self()."?".api_get_cidreq()."&view=".$view."&action=add\">".Display::return_icon('upload_file.png', get_lang('UploadNewFile'), '', ICON_SIZE_MEDIUM)."</a>"; |
|
263 | 263 | } |
264 | 264 | echo '</div>'; |
265 | 265 | } else { |
@@ -267,12 +267,12 @@ discard block |
||
267 | 267 | echo '<div class="actions">'; |
268 | 268 | if ($view_dropbox_category_sent != 0) { |
269 | 269 | echo get_lang('CurrentlySeeing').': <strong>'.Security::remove_XSS($dropbox_categories[$view_dropbox_category_sent]['cat_name']).'</strong> '; |
270 | - echo '<a href="'.api_get_self().'?'.api_get_cidreq().'&view_received_category='.$viewReceivedCategory.'&view_sent_category=0&view='.$view.'">'.Display::return_icon('folder_up.png', get_lang('Up').' '.get_lang('Root'),'',ICON_SIZE_MEDIUM)."</a>"; |
|
270 | + echo '<a href="'.api_get_self().'?'.api_get_cidreq().'&view_received_category='.$viewReceivedCategory.'&view_sent_category=0&view='.$view.'">'.Display::return_icon('folder_up.png', get_lang('Up').' '.get_lang('Root'), '', ICON_SIZE_MEDIUM)."</a>"; |
|
271 | 271 | } else { |
272 | - echo "<a href=\"".api_get_self()."?".api_get_cidreq()."&view=".$view."&action=addsentcategory\">".Display::return_icon('new_folder.png', get_lang('AddNewCategory'),'',ICON_SIZE_MEDIUM)."</a>\n"; |
|
272 | + echo "<a href=\"".api_get_self()."?".api_get_cidreq()."&view=".$view."&action=addsentcategory\">".Display::return_icon('new_folder.png', get_lang('AddNewCategory'), '', ICON_SIZE_MEDIUM)."</a>\n"; |
|
273 | 273 | } |
274 | 274 | if (empty($viewSentCategory)) { |
275 | - echo "<a href=\"".api_get_self()."?".api_get_cidreq()."&view=".$view."&action=add\">".Display::return_icon('upload_file.png', get_lang('UploadNewFile'),'',ICON_SIZE_MEDIUM)."</a>"; |
|
275 | + echo "<a href=\"".api_get_self()."?".api_get_cidreq()."&view=".$view."&action=add\">".Display::return_icon('upload_file.png', get_lang('UploadNewFile'), '', ICON_SIZE_MEDIUM)."</a>"; |
|
276 | 276 | } |
277 | 277 | echo '</div>'; |
278 | 278 | } |
@@ -325,7 +325,7 @@ discard block |
||
325 | 325 | |
326 | 326 | if (api_get_session_id() == 0) { |
327 | 327 | $column_header[] = array(get_lang('Modify'), false, '', 'nowrap style="text-align: right"'); |
328 | - } elseif (api_is_allowed_to_session_edit(false,true)) { |
|
328 | + } elseif (api_is_allowed_to_session_edit(false, true)) { |
|
329 | 329 | $column_header[] = array(get_lang('Modify'), false, '', 'nowrap style="text-align: right"'); |
330 | 330 | } |
331 | 331 | |
@@ -386,7 +386,7 @@ discard block |
||
386 | 386 | $link_open = '<a href="'.api_get_path(WEB_CODE_PATH).'dropbox/dropbox_download.php?'.api_get_cidreq().'&id='.$dropbox_file->id.'">'; |
387 | 387 | $dropbox_file_data[] = $link_open.DocumentManager::build_document_icon_tag('file', $dropbox_file->title).'</a>'; |
388 | 388 | $dropbox_file_data[] = '<a href="'.api_get_path(WEB_CODE_PATH).'dropbox/dropbox_download.php?'.api_get_cidreq().'&id='.$dropbox_file->id.'&action=download">'. |
389 | - Display::return_icon('save.png', get_lang('Download'), array('style' => 'float:right;'),ICON_SIZE_SMALL).'</a>'.$link_open.$dropbox_file->title.'</a>'.$new_icon.'<br />'.$dropbox_file->description; |
|
389 | + Display::return_icon('save.png', get_lang('Download'), array('style' => 'float:right;'), ICON_SIZE_SMALL).'</a>'.$link_open.$dropbox_file->title.'</a>'.$new_icon.'<br />'.$dropbox_file->description; |
|
390 | 390 | $file_size = $dropbox_file->filesize; |
391 | 391 | $dropbox_file_data[] = format_file_size($file_size); |
392 | 392 | |
@@ -402,10 +402,10 @@ discard block |
||
402 | 402 | api_format_date($last_upload_date).'</span>'; |
403 | 403 | |
404 | 404 | $action_icons = check_number_feedback($dropbox_file->id, $number_feedback).' '.get_lang('Feedback').' |
405 | - <a href="'.api_get_self().'?'.api_get_cidreq().'&view_received_category='.$viewReceivedCategory.'&view_sent_category='.$viewSentCategory.'&view='.$view.'&action=viewfeedback&id='.$dropbox_file->id.'&'.$sort_params.'">'.Display::return_icon('discuss.png', get_lang('Comment'),'',ICON_SIZE_SMALL).'</a> |
|
406 | - <a href="'.api_get_self().'?'.api_get_cidreq().'&view_received_category='.$viewReceivedCategory.'&view_sent_category='.$viewSentCategory.'&view='.$view.'&action=movereceived&move_id='.$dropbox_file->id.'&'.$sort_params.'">'.Display::return_icon('move.png', get_lang('Move'),'',ICON_SIZE_SMALL).'</a> |
|
405 | + <a href="'.api_get_self().'?'.api_get_cidreq().'&view_received_category='.$viewReceivedCategory.'&view_sent_category='.$viewSentCategory.'&view='.$view.'&action=viewfeedback&id='.$dropbox_file->id.'&'.$sort_params.'">'.Display::return_icon('discuss.png', get_lang('Comment'), '', ICON_SIZE_SMALL).'</a> |
|
406 | + <a href="'.api_get_self().'?'.api_get_cidreq().'&view_received_category='.$viewReceivedCategory.'&view_sent_category='.$viewSentCategory.'&view='.$view.'&action=movereceived&move_id='.$dropbox_file->id.'&'.$sort_params.'">'.Display::return_icon('move.png', get_lang('Move'), '', ICON_SIZE_SMALL).'</a> |
|
407 | 407 | <a href="'.api_get_self().'?'.api_get_cidreq().'&view_received_category='.$viewReceivedCategory.'&view_sent_category='.$viewSentCategory.'&view='.$view.'&action=deletereceivedfile&id='.$dropbox_file->id.'&'.$sort_params.'" onclick="javascript: return confirmation(\''.$dropbox_file->title.'\');">'. |
408 | - Display::return_icon('delete.png', get_lang('Delete'),'',ICON_SIZE_SMALL).'</a>'; |
|
408 | + Display::return_icon('delete.png', get_lang('Delete'), '', ICON_SIZE_SMALL).'</a>'; |
|
409 | 409 | |
410 | 410 | // This is a hack to have an additional row in a sortable table |
411 | 411 | |
@@ -439,12 +439,12 @@ discard block |
||
439 | 439 | // The icon of the category |
440 | 440 | $link_open = '<a href="'.api_get_self().'?'.api_get_cidreq().'&view_received_category='.$category['cat_id'].'&view_sent_category='.$viewSentCategory.'&view='.$view.'">'; |
441 | 441 | $dropbox_category_data[] = $link_open.DocumentManager::build_document_icon_tag('folder', $category['cat_name']).'</a>'; |
442 | - $dropbox_category_data[] = '<a href="'.api_get_path(WEB_CODE_PATH).'dropbox/dropbox_download.php?'.api_get_cidreq().'&cat_id='.$category['cat_id'].'&action=downloadcategory&sent_received=received">'.Display::return_icon('save_pack.png', get_lang('Save'), array('style' => 'float:right;'),ICON_SIZE_SMALL).'</a>'.$link_open.$category['cat_name'].'</a>'; |
|
442 | + $dropbox_category_data[] = '<a href="'.api_get_path(WEB_CODE_PATH).'dropbox/dropbox_download.php?'.api_get_cidreq().'&cat_id='.$category['cat_id'].'&action=downloadcategory&sent_received=received">'.Display::return_icon('save_pack.png', get_lang('Save'), array('style' => 'float:right;'), ICON_SIZE_SMALL).'</a>'.$link_open.$category['cat_name'].'</a>'; |
|
443 | 443 | $dropbox_category_data[] = ''; |
444 | 444 | $dropbox_category_data[] = ''; |
445 | 445 | $dropbox_category_data[] = ''; |
446 | - $dropbox_category_data[] = '<a href="'.api_get_self().'?'.api_get_cidreq().'&view_received_category='.$viewReceivedCategory.'&view_sent_category='.$viewSentCategory.'&view='.$view.'&action=editcategory&id='.$category['cat_id'].'">'.Display::return_icon('edit.png',get_lang('Edit'),'',ICON_SIZE_SMALL).'</a> |
|
447 | - <a href="'.api_get_self().'?'.api_get_cidreq().'&view_received_category='.$viewReceivedCategory.'&view_sent_category='.$viewSentCategory.'&view='.$view.'&action=deletereceivedcategory&id='.$category['cat_id'].'" onclick="javascript: return confirmation(\''.Security::remove_XSS($category['cat_name']).'\');">'.Display::return_icon('delete.png', get_lang('Delete'),'',ICON_SIZE_SMALL).'</a>'; |
|
446 | + $dropbox_category_data[] = '<a href="'.api_get_self().'?'.api_get_cidreq().'&view_received_category='.$viewReceivedCategory.'&view_sent_category='.$viewSentCategory.'&view='.$view.'&action=editcategory&id='.$category['cat_id'].'">'.Display::return_icon('edit.png', get_lang('Edit'), '', ICON_SIZE_SMALL).'</a> |
|
447 | + <a href="'.api_get_self().'?'.api_get_cidreq().'&view_received_category='.$viewReceivedCategory.'&view_sent_category='.$viewSentCategory.'&view='.$view.'&action=deletereceivedcategory&id='.$category['cat_id'].'" onclick="javascript: return confirmation(\''.Security::remove_XSS($category['cat_name']).'\');">'.Display::return_icon('delete.png', get_lang('Delete'), '', ICON_SIZE_SMALL).'</a>'; |
|
448 | 448 | } |
449 | 449 | if (is_array($dropbox_category_data) && count($dropbox_category_data) > 0) { |
450 | 450 | $dropbox_data_recieved[] = $dropbox_category_data; |
@@ -464,8 +464,8 @@ discard block |
||
464 | 464 | ); |
465 | 465 | |
466 | 466 | if (is_array($movelist)) { |
467 | - foreach ($movelist as $catid => $catname){ |
|
468 | - $selectlist['move_received_'.$catid] = get_lang('Move') . '->'. Security::remove_XSS($catname); |
|
467 | + foreach ($movelist as $catid => $catname) { |
|
468 | + $selectlist['move_received_'.$catid] = get_lang('Move').'->'.Security::remove_XSS($catname); |
|
469 | 469 | } |
470 | 470 | } |
471 | 471 | |
@@ -559,7 +559,7 @@ discard block |
||
559 | 559 | $link_open = '<a href="'.api_get_path(WEB_CODE_PATH).'dropbox/dropbox_download.php?'.api_get_cidreq().'&id='.$dropbox_file->id.'">'; |
560 | 560 | $dropbox_file_data[] = $link_open.DocumentManager::build_document_icon_tag('file', $dropbox_file->title).'</a>'; |
561 | 561 | $dropbox_file_data[] = '<a href="'.api_get_path(WEB_CODE_PATH).'dropbox/dropbox_download.php?'.api_get_cidreq().'&id='.$dropbox_file->id.'&action=download">'. |
562 | - Display::return_icon('save.png', get_lang('Save'), array('style' => 'float:right;'),ICON_SIZE_SMALL).'</a>'.$link_open.$dropbox_file->title.'</a><br />'.$dropbox_file->description; |
|
562 | + Display::return_icon('save.png', get_lang('Save'), array('style' => 'float:right;'), ICON_SIZE_SMALL).'</a>'.$link_open.$dropbox_file->title.'</a><br />'.$dropbox_file->description; |
|
563 | 563 | $file_size = $dropbox_file->filesize; |
564 | 564 | $dropbox_file_data[] = format_file_size($file_size); |
565 | 565 | $receivers_celldata = null; |
@@ -577,9 +577,9 @@ discard block |
||
577 | 577 | $receivers_celldata = ''; |
578 | 578 | |
579 | 579 | $action_icons = check_number_feedback($dropbox_file->id, $number_feedback).' '.get_lang('Feedback').' |
580 | - <a href="'.api_get_self().'?'.api_get_cidreq().'&view_received_category='.$viewReceivedCategory.'&view_sent_category='.$viewSentCategory.'&view='.$view.'&action=viewfeedback&id='.$dropbox_file->id.'&'.$sort_params.'">'.Display::return_icon('discuss.png', get_lang('Comment'),'',ICON_SIZE_SMALL).'</a> |
|
581 | - <a href="'.api_get_self().'?'.api_get_cidreq().'&view_received_category='.$viewReceivedCategory.'&view_sent_category='.$viewSentCategory.'&view='.$view.'&action=movesent&move_id='.$dropbox_file->id.'&'.$sort_params.'">'.Display::return_icon('move.png', get_lang('Move'),'',ICON_SIZE_SMALL).'</a> |
|
582 | - <a href="'.api_get_self().'?'.api_get_cidreq().'&view_received_category='.$viewReceivedCategory.'&view_sent_category='.$viewSentCategory.'&view='.$view.'&action=deletesentfile&id='.$dropbox_file->id.'&'.$sort_params.'" onclick="javascript: return confirmation(\''.$dropbox_file->title.'\');">'.Display::return_icon('delete.png', get_lang('Delete'),'',ICON_SIZE_SMALL).'</a>'; |
|
580 | + <a href="'.api_get_self().'?'.api_get_cidreq().'&view_received_category='.$viewReceivedCategory.'&view_sent_category='.$viewSentCategory.'&view='.$view.'&action=viewfeedback&id='.$dropbox_file->id.'&'.$sort_params.'">'.Display::return_icon('discuss.png', get_lang('Comment'), '', ICON_SIZE_SMALL).'</a> |
|
581 | + <a href="'.api_get_self().'?'.api_get_cidreq().'&view_received_category='.$viewReceivedCategory.'&view_sent_category='.$viewSentCategory.'&view='.$view.'&action=movesent&move_id='.$dropbox_file->id.'&'.$sort_params.'">'.Display::return_icon('move.png', get_lang('Move'), '', ICON_SIZE_SMALL).'</a> |
|
582 | + <a href="'.api_get_self().'?'.api_get_cidreq().'&view_received_category='.$viewReceivedCategory.'&view_sent_category='.$viewSentCategory.'&view='.$view.'&action=deletesentfile&id='.$dropbox_file->id.'&'.$sort_params.'" onclick="javascript: return confirmation(\''.$dropbox_file->title.'\');">'.Display::return_icon('delete.png', get_lang('Delete'), '', ICON_SIZE_SMALL).'</a>'; |
|
583 | 583 | // This is a hack to have an additional row in a sortable table |
584 | 584 | if ($action == 'viewfeedback' && isset($_GET['id']) && is_numeric($_GET['id']) && $dropbox_file->id == $_GET['id']) { |
585 | 585 | $action_icons .= "</td></tr>\n"; // ending the normal row of the sortable table |
@@ -608,16 +608,16 @@ discard block |
||
608 | 608 | // This is where the checkbox icon for the files appear. |
609 | 609 | $link_open = '<a href="'.api_get_self().'?'.api_get_cidreq().'&view_received_category='.$viewReceivedCategory.'&view_sent_category='.$category['cat_id'].'&view='.$view.'">'; |
610 | 610 | $dropbox_category_data[] = $link_open.DocumentManager::build_document_icon_tag('folder', Security::remove_XSS($category['cat_name'])).'</a>'; |
611 | - $dropbox_category_data[] = '<a href="'.api_get_path(WEB_CODE_PATH).'dropbox/dropbox_download.php?'.api_get_cidreq().'&cat_id='.$category['cat_id'].'&action=downloadcategory&sent_received=sent">'.Display::return_icon('save_pack.png', get_lang('Save'), array('style' => 'float:right;'),ICON_SIZE_SMALL).'</a>'.$link_open.Security::remove_XSS($category['cat_name']).'</a>'; |
|
611 | + $dropbox_category_data[] = '<a href="'.api_get_path(WEB_CODE_PATH).'dropbox/dropbox_download.php?'.api_get_cidreq().'&cat_id='.$category['cat_id'].'&action=downloadcategory&sent_received=sent">'.Display::return_icon('save_pack.png', get_lang('Save'), array('style' => 'float:right;'), ICON_SIZE_SMALL).'</a>'.$link_open.Security::remove_XSS($category['cat_name']).'</a>'; |
|
612 | 612 | //$dropbox_category_data[] = ''; |
613 | 613 | $dropbox_category_data[] = ''; |
614 | 614 | //$dropbox_category_data[] = ''; |
615 | 615 | $dropbox_category_data[] = ''; |
616 | 616 | $dropbox_category_data[] = ''; |
617 | 617 | $dropbox_category_data[] = '<a href="'.api_get_self().'?'.api_get_cidreq().'&view_received_category='.$viewReceivedCategory.'&view_sent_category='.$viewSentCategory.'&view='.$view.'&action=editcategory&id='.$category['cat_id'].'">'. |
618 | - Display::return_icon('edit.png', get_lang('Edit'),'',ICON_SIZE_SMALL).'</a> |
|
618 | + Display::return_icon('edit.png', get_lang('Edit'), '', ICON_SIZE_SMALL).'</a> |
|
619 | 619 | <a href="'.api_get_self().'?'.api_get_cidreq().'&view_received_category='.$viewReceivedCategory.'&view_sent_category='.$viewSentCategory.'&view='.$view.'&action=deletesentcategory&id='.$category['cat_id'].'" onclick="javascript: return confirmation(\''.Security::remove_XSS($category['cat_name']).'\');">'. |
620 | - Display::return_icon('delete.png', get_lang('Delete'),'',ICON_SIZE_SMALL).'</a>'; |
|
620 | + Display::return_icon('delete.png', get_lang('Delete'), '', ICON_SIZE_SMALL).'</a>'; |
|
621 | 621 | } |
622 | 622 | if (is_array($dropbox_category_data) && count($dropbox_category_data) > 0) { |
623 | 623 | $dropbox_data_sent[] = $dropbox_category_data; |
@@ -639,7 +639,7 @@ discard block |
||
639 | 639 | |
640 | 640 | if (!empty($moveList)) { |
641 | 641 | foreach ($moveList as $catid => $catname) { |
642 | - $selectlist['move_sent_'.$catid] = get_lang('Move') . '->'. Security::remove_XSS($catname); |
|
642 | + $selectlist['move_sent_'.$catid] = get_lang('Move').'->'.Security::remove_XSS($catname); |
|
643 | 643 | } |
644 | 644 | } |
645 | 645 |