@@ -31,7 +31,7 @@ discard block |
||
| 31 | 31 | $doc_url = str_replace(' ', '+', $doc_url); |
| 32 | 32 | $doc_url = str_replace('/..', '', $doc_url); //echo $doc_url; |
| 33 | 33 | |
| 34 | -if (! isset($_course)) { |
|
| 34 | +if (!isset($_course)) { |
|
| 35 | 35 | api_not_allowed(true); |
| 36 | 36 | } |
| 37 | 37 | |
@@ -51,11 +51,11 @@ discard block |
||
| 51 | 51 | exit; |
| 52 | 52 | } |
| 53 | 53 | |
| 54 | -$tbl_forum_attachment = Database::get_course_table(TABLE_FORUM_ATTACHMENT); |
|
| 54 | +$tbl_forum_attachment = Database::get_course_table(TABLE_FORUM_ATTACHMENT); |
|
| 55 | 55 | $tbl_forum_post = Database::get_course_table(TABLE_FORUM_POST); |
| 56 | 56 | |
| 57 | 57 | $course_id = api_get_course_int_id(); |
| 58 | -$courseInfo = api_get_course_info_by_id($course_id); |
|
| 58 | +$courseInfo = api_get_course_info_by_id($course_id); |
|
| 59 | 59 | |
| 60 | 60 | // launch event |
| 61 | 61 | Event::event_download($doc_url); |
@@ -85,7 +85,7 @@ discard block |
||
| 85 | 85 | api_get_session_id() |
| 86 | 86 | ); |
| 87 | 87 | |
| 88 | -if ($forum_thread_visibility==1 && $forum_forum_visibility==1) { |
|
| 88 | +if ($forum_thread_visibility == 1 && $forum_forum_visibility == 1) { |
|
| 89 | 89 | if (Security::check_abs_path( |
| 90 | 90 | $full_file_name, |
| 91 | 91 | api_get_path(SYS_COURSE_PATH).$courseInfo['path'].'/upload/forum/') |
@@ -457,8 +457,8 @@ |
||
| 457 | 457 | |
| 458 | 458 | // The post has been displayed => it can be removed from the what's new array |
| 459 | 459 | if (isset($whatsnew_post_info[$forumId][$threadId][$row['post_id']])) { |
| 460 | - unset($whatsnew_post_info[$forumId][$threadId][$row['post_id']]); |
|
| 461 | - unset($_SESSION['whatsnew_post_info'][$forumId][$threadId][$row['post_id']]); |
|
| 460 | + unset($whatsnew_post_info[$forumId][$threadId][$row['post_id']]); |
|
| 461 | + unset($_SESSION['whatsnew_post_info'][$forumId][$threadId][$row['post_id']]); |
|
| 462 | 462 | } |
| 463 | 463 | echo "</table>"; |
| 464 | 464 | |
@@ -21,7 +21,7 @@ discard block |
||
| 21 | 21 | * @package chamilo.forum |
| 22 | 22 | */ |
| 23 | 23 | |
| 24 | -$forumUrl = api_get_path(WEB_CODE_PATH) . 'forum/'; |
|
| 24 | +$forumUrl = api_get_path(WEB_CODE_PATH).'forum/'; |
|
| 25 | 25 | $_user = api_get_user_info(); |
| 26 | 26 | $sortDirection = isset($_GET['posts_order']) && $_GET['posts_order'] === 'desc' ? 'DESC' : 'ASC'; |
| 27 | 27 | $rows = getPosts($_GET['thread'], $sortDirection, true); |
@@ -42,13 +42,13 @@ discard block |
||
| 42 | 42 | // Are we in a lp ? |
| 43 | 43 | $origin = ''; |
| 44 | 44 | if (isset($_GET['origin'])) { |
| 45 | - $origin = Security::remove_XSS($_GET['origin']); |
|
| 45 | + $origin = Security::remove_XSS($_GET['origin']); |
|
| 46 | 46 | } |
| 47 | 47 | |
| 48 | 48 | // Delete attachment file. |
| 49 | 49 | if ( |
| 50 | 50 | isset($_GET['action']) && |
| 51 | - $_GET['action']=='delete_attach' && |
|
| 51 | + $_GET['action'] == 'delete_attach' && |
|
| 52 | 52 | isset($_GET['id_attach']) |
| 53 | 53 | ) { |
| 54 | 54 | delete_attachment(0, $_GET['id_attach']); |
@@ -59,7 +59,7 @@ discard block |
||
| 59 | 59 | |
| 60 | 60 | // Displaying the thread (structure) |
| 61 | 61 | |
| 62 | -$thread_structure = "<div class=\"structure\">" .get_lang('Structure')."</div>"; |
|
| 62 | +$thread_structure = "<div class=\"structure\">".get_lang('Structure')."</div>"; |
|
| 63 | 63 | $counter = 0; |
| 64 | 64 | $count = 0; |
| 65 | 65 | $prev_next_array = array(); |
@@ -71,7 +71,7 @@ discard block |
||
| 71 | 71 | foreach ($rows as $post) { |
| 72 | 72 | $counter++; |
| 73 | 73 | $indent = $post['indent_cnt'] * '20'; |
| 74 | - $thread_structure .= "<div style=\"margin-left: " . $indent . "px;\">"; |
|
| 74 | + $thread_structure .= "<div style=\"margin-left: ".$indent."px;\">"; |
|
| 75 | 75 | |
| 76 | 76 | if ( |
| 77 | 77 | !empty($whatsnew_post_info[$forumId][$post['thread_id']]) && |
@@ -89,7 +89,7 @@ discard block |
||
| 89 | 89 | $counter == 1 AND !isset($_GET['post']) |
| 90 | 90 | ) |
| 91 | 91 | ) { |
| 92 | - $thread_structure .= '<strong>' .prepare4display($post['post_title']) . '</strong></div>'; |
|
| 92 | + $thread_structure .= '<strong>'.prepare4display($post['post_title']).'</strong></div>'; |
|
| 93 | 93 | $prev_next_array[] = $post['post_id']; |
| 94 | 94 | } else { |
| 95 | 95 | if ($post['visible'] == '0') { |
@@ -98,10 +98,10 @@ discard block |
||
| 98 | 98 | $class = ''; |
| 99 | 99 | } |
| 100 | 100 | $count_loop = ($count == 0) ? '&id=1' : ''; |
| 101 | - $thread_structure .= "<a href=\"viewthread.php?" . api_get_cidreq() . |
|
| 102 | - "&forum=" . $forumId . "&thread=" . $threadId . |
|
| 103 | - "&post=" . $post['post_id'] . "&origin=$origin$count_loop\"" . |
|
| 104 | - "$class>" . prepare4display($post['post_title']) . "</a></div>"; |
|
| 101 | + $thread_structure .= "<a href=\"viewthread.php?".api_get_cidreq(). |
|
| 102 | + "&forum=".$forumId."&thread=".$threadId. |
|
| 103 | + "&post=".$post['post_id']."&origin=$origin$count_loop\"". |
|
| 104 | + "$class>".prepare4display($post['post_title'])."</a></div>"; |
|
| 105 | 105 | $prev_next_array[] = $post['post_id']; |
| 106 | 106 | } |
| 107 | 107 | $count++; |
@@ -148,43 +148,43 @@ discard block |
||
| 148 | 148 | $class_next = ''; |
| 149 | 149 | |
| 150 | 150 | // Links |
| 151 | -$first_href = $forumUrl . 'viewthread.php?' . api_get_cidreq() . |
|
| 152 | - '&forum=' . $forumId . '&thread=' . $threadId . |
|
| 153 | - '&gradebook=' . $gradebook . '&id=1&post=' . $prev_next_array[0]; |
|
| 154 | -$last_href = $forumUrl . 'viewthread.php?' . api_get_cidreq() . |
|
| 155 | - '&forum=' . $forumId . '&thread=' . $threadId . |
|
| 156 | - '&gradebook=' . $gradebook . '&post=' . $prev_next_array[$max-1]; |
|
| 157 | -$prev_href = $forumUrl . 'viewthread.php?' . api_get_cidreq() . |
|
| 158 | - '&forum=' . $forumId . '&thread=' . $threadId . |
|
| 159 | - '&gradebook=' . $gradebook . '&post=' . $prev_next_array[$prev_id]; |
|
| 160 | -$next_href = $forumUrl . 'viewthread.php?' . api_get_cidreq() . |
|
| 161 | - '&forum=' . $forumId . '&thread=' . $threadId . |
|
| 162 | - '&post=' . $prev_next_array[$next_id]; |
|
| 151 | +$first_href = $forumUrl.'viewthread.php?'.api_get_cidreq(). |
|
| 152 | + '&forum='.$forumId.'&thread='.$threadId. |
|
| 153 | + '&gradebook='.$gradebook.'&id=1&post='.$prev_next_array[0]; |
|
| 154 | +$last_href = $forumUrl.'viewthread.php?'.api_get_cidreq(). |
|
| 155 | + '&forum='.$forumId.'&thread='.$threadId. |
|
| 156 | + '&gradebook='.$gradebook.'&post='.$prev_next_array[$max - 1]; |
|
| 157 | +$prev_href = $forumUrl.'viewthread.php?'.api_get_cidreq(). |
|
| 158 | + '&forum='.$forumId.'&thread='.$threadId. |
|
| 159 | + '&gradebook='.$gradebook.'&post='.$prev_next_array[$prev_id]; |
|
| 160 | +$next_href = $forumUrl.'viewthread.php?'.api_get_cidreq(). |
|
| 161 | + '&forum='.$forumId.'&thread='.$threadId. |
|
| 162 | + '&post='.$prev_next_array[$next_id]; |
|
| 163 | 163 | |
| 164 | 164 | echo '<center style="margin-top: 10px; margin-bottom: 10px;">'; |
| 165 | 165 | // Go to: first and previous |
| 166 | 166 | if (((int) $current_id) > 0) { |
| 167 | - echo '<a href="' . $first_href . '" ' . $class . ' title=' . |
|
| 168 | - $first_message . '>' . $first_img . ' ' . $first_message .'</a>'; |
|
| 169 | - echo '<a href="' . $prev_href . '" ' . $class_prev . ' title=' . |
|
| 170 | - $prev_message . '>' . $prev_img . ' ' . $prev_message . '</a>'; |
|
| 167 | + echo '<a href="'.$first_href.'" '.$class.' title='. |
|
| 168 | + $first_message.'>'.$first_img.' '.$first_message.'</a>'; |
|
| 169 | + echo '<a href="'.$prev_href.'" '.$class_prev.' title='. |
|
| 170 | + $prev_message.'>'.$prev_img.' '.$prev_message.'</a>'; |
|
| 171 | 171 | } else { |
| 172 | - echo '<b><span class="invisible">' . |
|
| 173 | - $first_img . ' ' . $first_message . '</b></span>'; |
|
| 174 | - echo '<b><span class="invisible">' . |
|
| 175 | - $prev_img . ' ' . $prev_message . '</b></span>'; |
|
| 172 | + echo '<b><span class="invisible">'. |
|
| 173 | + $first_img.' '.$first_message.'</b></span>'; |
|
| 174 | + echo '<b><span class="invisible">'. |
|
| 175 | + $prev_img.' '.$prev_message.'</b></span>'; |
|
| 176 | 176 | } |
| 177 | 177 | |
| 178 | 178 | // Current counter |
| 179 | -echo ' [ ' . ($current_id + 1) . ' / ' . $max . ' ] '; |
|
| 179 | +echo ' [ '.($current_id + 1).' / '.$max.' ] '; |
|
| 180 | 180 | |
| 181 | 181 | // Go to: next and last |
| 182 | 182 | if (($current_id + 1) < $max) { |
| 183 | - echo '<a href="' . $next_href . '" ' . $class_next . ' title=' . $next_message . '>' . $next_message . ' ' . $next_img . '</a>'; |
|
| 184 | - echo '<a href="' . $last_href . '" ' . $class . ' title=' . $last_message . '>' . $last_message . ' ' . $last_img . '</a>'; |
|
| 183 | + echo '<a href="'.$next_href.'" '.$class_next.' title='.$next_message.'>'.$next_message.' '.$next_img.'</a>'; |
|
| 184 | + echo '<a href="'.$last_href.'" '.$class.' title='.$last_message.'>'.$last_message.' '.$last_img.'</a>'; |
|
| 185 | 185 | } else { |
| 186 | - echo '<b><span class="invisible">' . $next_message . ' ' . $next_img . '</b></span>'; |
|
| 187 | - echo '<b><span class="invisible">' . $last_message . ' ' . $last_img . '</b></span>'; |
|
| 186 | + echo '<b><span class="invisible">'.$next_message.' '.$next_img.'</b></span>'; |
|
| 187 | + echo '<b><span class="invisible">'.$last_message.' '.$last_img.'</b></span>'; |
|
| 188 | 188 | } |
| 189 | 189 | echo '</center>'; |
| 190 | 190 | |
@@ -218,18 +218,18 @@ discard block |
||
| 218 | 218 | } |
| 219 | 219 | |
| 220 | 220 | if (api_get_course_setting('allow_user_image_forum')) { |
| 221 | - echo '<br />' . display_user_image($rows[$display_post_id]['user_id'], $name, $origin) . '<br />'; |
|
| 221 | + echo '<br />'.display_user_image($rows[$display_post_id]['user_id'], $name, $origin).'<br />'; |
|
| 222 | 222 | } |
| 223 | 223 | echo display_user_link( |
| 224 | 224 | $rows[$display_post_id]['user_id'], |
| 225 | 225 | $name, |
| 226 | 226 | $origin, |
| 227 | 227 | $username |
| 228 | -) . "<br />"; |
|
| 228 | +)."<br />"; |
|
| 229 | 229 | |
| 230 | 230 | echo api_convert_and_format_date( |
| 231 | 231 | $rows[$display_post_id]['post_date'] |
| 232 | -) . '<br /><br />'; |
|
| 232 | +).'<br /><br />'; |
|
| 233 | 233 | // Get attach id |
| 234 | 234 | $attachment_list = get_attachment($display_post_id); |
| 235 | 235 | $id_attach = !empty($attachment_list) ? $attachment_list['id'] : ''; |
@@ -248,16 +248,16 @@ discard block |
||
| 248 | 248 | ) |
| 249 | 249 | ) { |
| 250 | 250 | if ($locked == false) { |
| 251 | - echo "<a href=\"editpost.php?" . api_get_cidreq() . |
|
| 252 | - "&forum=" . $forumId . "&thread=" . $threadId . |
|
| 253 | - "&post=" . $rows[$display_post_id]['post_id'] . |
|
| 254 | - "&id_attach=" . $id_attach . "\">" . |
|
| 251 | + echo "<a href=\"editpost.php?".api_get_cidreq(). |
|
| 252 | + "&forum=".$forumId."&thread=".$threadId. |
|
| 253 | + "&post=".$rows[$display_post_id]['post_id']. |
|
| 254 | + "&id_attach=".$id_attach."\">". |
|
| 255 | 255 | Display::return_icon( |
| 256 | 256 | 'edit.png', |
| 257 | 257 | get_lang('Edit'), |
| 258 | 258 | array(), |
| 259 | 259 | ICON_SIZE_SMALL |
| 260 | - ) . '</a>'; |
|
| 260 | + ).'</a>'; |
|
| 261 | 261 | } |
| 262 | 262 | } |
| 263 | 263 | |
@@ -273,22 +273,22 @@ discard block |
||
| 273 | 273 | sort($id_posts, SORT_NUMERIC); |
| 274 | 274 | reset($id_posts); |
| 275 | 275 | // The post minor |
| 276 | - $post_minor = (int)$id_posts[0]; |
|
| 276 | + $post_minor = (int) $id_posts[0]; |
|
| 277 | 277 | } |
| 278 | 278 | |
| 279 | 279 | if ( |
| 280 | 280 | GroupManager::is_tutor_of_group(api_get_user_id(), $groupId) || |
| 281 | 281 | api_is_allowed_to_edit(false, true) && |
| 282 | - !(api_is_course_coach() &&$current_forum['session_id'] != $sessionId) |
|
| 282 | + !(api_is_course_coach() && $current_forum['session_id'] != $sessionId) |
|
| 283 | 283 | ) { |
| 284 | 284 | if ($locked == false) { |
| 285 | - echo "<a href=\"" . api_get_self() . "?" . api_get_cidreq() . |
|
| 286 | - "&forum=" . $forumId . "&thread=" . $threadId . |
|
| 287 | - "&action=delete&content=post&id=" . |
|
| 288 | - $rows[$display_post_id]['post_id'] . |
|
| 289 | - "\" onclick=\"javascript:if(!confirm('" . |
|
| 290 | - addslashes(api_htmlentities(get_lang('DeletePost'), ENT_QUOTES)) . |
|
| 291 | - "')) return false;\">" . Display::return_icon( |
|
| 285 | + echo "<a href=\"".api_get_self()."?".api_get_cidreq(). |
|
| 286 | + "&forum=".$forumId."&thread=".$threadId. |
|
| 287 | + "&action=delete&content=post&id=". |
|
| 288 | + $rows[$display_post_id]['post_id']. |
|
| 289 | + "\" onclick=\"javascript:if(!confirm('". |
|
| 290 | + addslashes(api_htmlentities(get_lang('DeletePost'), ENT_QUOTES)). |
|
| 291 | + "')) return false;\">".Display::return_icon( |
|
| 292 | 292 | 'delete.png', |
| 293 | 293 | get_lang('Delete'), |
| 294 | 294 | array(), |
@@ -308,16 +308,16 @@ discard block |
||
| 308 | 308 | ); |
| 309 | 309 | |
| 310 | 310 | if (!isset($_GET['id']) && $post_id > $post_minor) { |
| 311 | - echo "<a href=\"viewthread.php?" . api_get_cidreq() . |
|
| 312 | - "&forum=" . $forumId . "&thread=" . $threadId . |
|
| 313 | - "&origin=" . $origin . "&action=move&post=" . |
|
| 314 | - $rows[$display_post_id]['post_id'] . "\">" . |
|
| 311 | + echo "<a href=\"viewthread.php?".api_get_cidreq(). |
|
| 312 | + "&forum=".$forumId."&thread=".$threadId. |
|
| 313 | + "&origin=".$origin."&action=move&post=". |
|
| 314 | + $rows[$display_post_id]['post_id']."\">". |
|
| 315 | 315 | Display::return_icon( |
| 316 | 316 | 'move.png', |
| 317 | 317 | get_lang('MovePost'), |
| 318 | 318 | array(), |
| 319 | 319 | ICON_SIZE_SMALL |
| 320 | - ) . "</a>"; |
|
| 320 | + )."</a>"; |
|
| 321 | 321 | |
| 322 | 322 | } |
| 323 | 323 | } |
@@ -340,16 +340,16 @@ discard block |
||
| 340 | 340 | ); |
| 341 | 341 | |
| 342 | 342 | if ($locked == false) { |
| 343 | - echo "<a href=\"forumqualify.php?" . api_get_cidreq() . |
|
| 344 | - "&forum=" . $forumId . "&thread=" . $threadId . |
|
| 345 | - "&action=list&post=" . $rows[$display_post_id]['post_id'] . |
|
| 346 | - "&user=" . $rows[$display_post_id]['user_id'] . "&user_id=" . |
|
| 347 | - $rows[$display_post_id]['user_id'] . "&origin=" . $origin . |
|
| 348 | - "&idtextqualify=" . $current_qualify_thread . |
|
| 349 | - "\" >" . Display::return_icon( |
|
| 343 | + echo "<a href=\"forumqualify.php?".api_get_cidreq(). |
|
| 344 | + "&forum=".$forumId."&thread=".$threadId. |
|
| 345 | + "&action=list&post=".$rows[$display_post_id]['post_id']. |
|
| 346 | + "&user=".$rows[$display_post_id]['user_id']."&user_id=". |
|
| 347 | + $rows[$display_post_id]['user_id']."&origin=".$origin. |
|
| 348 | + "&idtextqualify=".$current_qualify_thread. |
|
| 349 | + "\" >".Display::return_icon( |
|
| 350 | 350 | 'quiz.gif', |
| 351 | 351 | get_lang('Qualify') |
| 352 | - ) . "</a>"; |
|
| 352 | + )."</a>"; |
|
| 353 | 353 | } |
| 354 | 354 | } |
| 355 | 355 | } |
@@ -361,33 +361,33 @@ discard block |
||
| 361 | 361 | ($current_forum['allow_anonymous'] == 1 && !$_user['user_id']) |
| 362 | 362 | ) { |
| 363 | 363 | if (!api_is_anonymous() && api_is_allowed_to_session_edit(false, true)) { |
| 364 | - echo '<a href="reply.php?' . api_get_cidreq() . |
|
| 365 | - '&forum=' . $forumId . '&thread=' . $threadId . |
|
| 366 | - '&post=' . $rows[$display_post_id]['post_id'] . |
|
| 367 | - '&action=replymessage&origin=' . $origin . '">' . |
|
| 364 | + echo '<a href="reply.php?'.api_get_cidreq(). |
|
| 365 | + '&forum='.$forumId.'&thread='.$threadId. |
|
| 366 | + '&post='.$rows[$display_post_id]['post_id']. |
|
| 367 | + '&action=replymessage&origin='.$origin.'">'. |
|
| 368 | 368 | Display::return_icon( |
| 369 | 369 | 'message_reply_forum.png', |
| 370 | 370 | get_lang('ReplyToMessage') |
| 371 | - ) . "</a>"; |
|
| 372 | - echo '<a href="reply.php?' . api_get_cidreq() . |
|
| 373 | - '&forum=' . $forumId . '&thread=' . $threadId . |
|
| 374 | - '&post=' . $rows[$display_post_id]['post_id'] . |
|
| 375 | - '&action=quote&origin=' . $origin . '">' . |
|
| 371 | + )."</a>"; |
|
| 372 | + echo '<a href="reply.php?'.api_get_cidreq(). |
|
| 373 | + '&forum='.$forumId.'&thread='.$threadId. |
|
| 374 | + '&post='.$rows[$display_post_id]['post_id']. |
|
| 375 | + '&action=quote&origin='.$origin.'">'. |
|
| 376 | 376 | Display::return_icon( |
| 377 | 377 | 'quote.gif', |
| 378 | 378 | get_lang('QuoteMessage') |
| 379 | - ) . "</a>"; |
|
| 379 | + )."</a>"; |
|
| 380 | 380 | } |
| 381 | 381 | } |
| 382 | 382 | } else { |
| 383 | 383 | if ($current_forum_category && $current_forum_category['locked'] == 1) { |
| 384 | - echo get_lang('ForumcategoryLocked') . '<br />'; |
|
| 384 | + echo get_lang('ForumcategoryLocked').'<br />'; |
|
| 385 | 385 | } |
| 386 | 386 | if ($current_forum['locked'] == 1) { |
| 387 | - echo get_lang('ForumLocked') . '<br />'; |
|
| 387 | + echo get_lang('ForumLocked').'<br />'; |
|
| 388 | 388 | } |
| 389 | 389 | if ($current_thread['locked'] == 1) { |
| 390 | - echo get_lang('ThreadLocked') . '<br />'; |
|
| 390 | + echo get_lang('ThreadLocked').'<br />'; |
|
| 391 | 391 | } |
| 392 | 392 | } |
| 393 | 393 | |
@@ -406,17 +406,17 @@ discard block |
||
| 406 | 406 | $rows[$display_post_id]['post_notification'] == '1' AND |
| 407 | 407 | $rows[$display_post_id]['poster_id'] == $_user['user_id'] |
| 408 | 408 | ) { |
| 409 | - $post_image .= Display::return_icon('forumnotification.gif',get_lang('YouWillBeNotified')); |
|
| 409 | + $post_image .= Display::return_icon('forumnotification.gif', get_lang('YouWillBeNotified')); |
|
| 410 | 410 | } |
| 411 | 411 | // The post title |
| 412 | -echo "<td class=\"$titleclass\">" . |
|
| 413 | - prepare4display($rows[$display_post_id]['post_title']) . "</td>"; |
|
| 412 | +echo "<td class=\"$titleclass\">". |
|
| 413 | + prepare4display($rows[$display_post_id]['post_title'])."</td>"; |
|
| 414 | 414 | echo "</tr>"; |
| 415 | 415 | |
| 416 | 416 | // The post message |
| 417 | 417 | echo "<tr>"; |
| 418 | -echo "<td class=\"$messageclass\">" . |
|
| 419 | - prepare4display($rows[$display_post_id]['post_text']) . "</td>"; |
|
| 418 | +echo "<td class=\"$messageclass\">". |
|
| 419 | + prepare4display($rows[$display_post_id]['post_text'])."</td>"; |
|
| 420 | 420 | echo "</tr>"; |
| 421 | 421 | |
| 422 | 422 | // The check if there is an attachment |
@@ -429,24 +429,24 @@ discard block |
||
| 429 | 429 | echo Display::return_icon('attachment.gif', get_lang('Attachment')); |
| 430 | 430 | echo '<a href="download.php?file='; |
| 431 | 431 | echo $realname; |
| 432 | - echo ' "> ' . $user_filename . ' </a>'; |
|
| 433 | - echo '<span class="forum_attach_comment">' . |
|
| 434 | - Security::remove_XSS($attachment['comment'], STUDENT) . '</span>'; |
|
| 432 | + echo ' "> '.$user_filename.' </a>'; |
|
| 433 | + echo '<span class="forum_attach_comment">'. |
|
| 434 | + Security::remove_XSS($attachment['comment'], STUDENT).'</span>'; |
|
| 435 | 435 | |
| 436 | 436 | if ( |
| 437 | - ($current_forum['allow_edit'] == 1 &&$rows[$display_post_id]['user_id'] == $_user['user_id']) || |
|
| 437 | + ($current_forum['allow_edit'] == 1 && $rows[$display_post_id]['user_id'] == $_user['user_id']) || |
|
| 438 | 438 | (api_is_allowed_to_edit(false, true) && !(api_is_course_coach() && $current_forum['session_id'] != $sessionId)) |
| 439 | 439 | ) { |
| 440 | - echo ' <a href="' . api_get_self() . '?' . |
|
| 441 | - api_get_cidreq() . '&origin=' . |
|
| 442 | - Security::remove_XSS($_GET['origin']) . |
|
| 443 | - '&action=delete_attach&id_attach=' . |
|
| 444 | - $attachment['id'] . '&forum=' . $forumId . |
|
| 445 | - '&thread=' . $threadId . |
|
| 446 | - '" onclick="javascript:if(!confirm(\'' . |
|
| 440 | + echo ' <a href="'.api_get_self().'?'. |
|
| 441 | + api_get_cidreq().'&origin='. |
|
| 442 | + Security::remove_XSS($_GET['origin']). |
|
| 443 | + '&action=delete_attach&id_attach='. |
|
| 444 | + $attachment['id'].'&forum='.$forumId. |
|
| 445 | + '&thread='.$threadId. |
|
| 446 | + '" onclick="javascript:if(!confirm(\''. |
|
| 447 | 447 | addslashes(api_htmlentities( |
| 448 | 448 | get_lang('ConfirmYourChoice'), ENT_QUOTES) |
| 449 | - ) . '\')) return false;">' . Display::return_icon( |
|
| 449 | + ).'\')) return false;">'.Display::return_icon( |
|
| 450 | 450 | 'delete.gif', |
| 451 | 451 | get_lang('Delete') |
| 452 | 452 | ).'</a><br />'; |
@@ -81,7 +81,7 @@ |
||
| 81 | 81 | echo "<tr>"; |
| 82 | 82 | echo "<td rowspan=\"2\" class=\"forum_message_left\">"; |
| 83 | 83 | $username = api_htmlentities(sprintf(get_lang('LoginX'), $row['username']), ENT_QUOTES); |
| 84 | - if ($row['user_id']=='0') { |
|
| 84 | + if ($row['user_id'] == '0') { |
|
| 85 | 85 | $name = $row['poster_name']; |
| 86 | 86 | } else { |
| 87 | 87 | $name = api_get_person_name($row['firstname'], $row['lastname']); |
@@ -500,7 +500,7 @@ |
||
| 500 | 500 | $html .= '</div>'; |
| 501 | 501 | $html .= '</div></div>'; |
| 502 | 502 | } |
| 503 | - echo $html; |
|
| 503 | + echo $html; |
|
| 504 | 504 | } |
| 505 | 505 | } |
| 506 | 506 | if (count($forum_list) == 0) { |
@@ -52,17 +52,17 @@ discard block |
||
| 52 | 52 | $origin = ''; |
| 53 | 53 | |
| 54 | 54 | if (isset($_GET['origin'])) { |
| 55 | - $origin = Security::remove_XSS($_GET['origin']); |
|
| 55 | + $origin = Security::remove_XSS($_GET['origin']); |
|
| 56 | 56 | } |
| 57 | 57 | |
| 58 | 58 | /* Header and Breadcrumbs */ |
| 59 | 59 | $gradebook = null; |
| 60 | 60 | if (isset($_SESSION['gradebook'])) { |
| 61 | - $gradebook= $_SESSION['gradebook']; |
|
| 61 | + $gradebook = $_SESSION['gradebook']; |
|
| 62 | 62 | } |
| 63 | 63 | |
| 64 | 64 | if (!empty($gradebook) && $gradebook == 'view') { |
| 65 | - $interbreadcrumb[] = array ( |
|
| 65 | + $interbreadcrumb[] = array( |
|
| 66 | 66 | 'url' => '../gradebook/'.$_SESSION['gradebook_dest'], |
| 67 | 67 | 'name' => get_lang('ToolGradebook') |
| 68 | 68 | ); |
@@ -72,16 +72,16 @@ discard block |
||
| 72 | 72 | |
| 73 | 73 | $current_forum_category = get_forum_categories($_GET['forumcategory']); |
| 74 | 74 | $interbreadcrumb[] = array( |
| 75 | - 'url' => 'index.php?gradebook=' . $gradebook . '&search=' |
|
| 75 | + 'url' => 'index.php?gradebook='.$gradebook.'&search=' |
|
| 76 | 76 | . Security::remove_XSS(urlencode(isset($_GET['search']) ? $_GET['search'] : '')), |
| 77 | 77 | 'name' => get_lang('Forum') |
| 78 | 78 | ); |
| 79 | 79 | |
| 80 | 80 | if (!empty($_GET['action']) && !empty($_GET['content'])) { |
| 81 | - if ($_GET['action']=='add' && $_GET['content']=='forum' ) { |
|
| 81 | + if ($_GET['action'] == 'add' && $_GET['content'] == 'forum') { |
|
| 82 | 82 | $interbreadcrumb[] = array( |
| 83 | 83 | 'url' => 'viewforumcategory.php?forumcategory=' |
| 84 | - . $current_forum_category['cat_id'] . '&origin=' . $origin, |
|
| 84 | + . $current_forum_category['cat_id'].'&origin='.$origin, |
|
| 85 | 85 | 'name' => $current_forum_category['cat_title'] |
| 86 | 86 | ); |
| 87 | 87 | $interbreadcrumb[] = array( |
@@ -96,7 +96,7 @@ discard block |
||
| 96 | 96 | ); |
| 97 | 97 | } |
| 98 | 98 | |
| 99 | -if ($origin=='learnpath') { |
|
| 99 | +if ($origin == 'learnpath') { |
|
| 100 | 100 | Display::display_reduced_header(); |
| 101 | 101 | } else { |
| 102 | 102 | Display::display_header(null); |
@@ -111,7 +111,7 @@ discard block |
||
| 111 | 111 | // then the user is not allowed here. |
| 112 | 112 | if ( |
| 113 | 113 | !api_is_allowed_to_edit(false, true) AND |
| 114 | - ( $current_forum_category && $current_forum_category['visibility'] == 0) |
|
| 114 | + ($current_forum_category && $current_forum_category['visibility'] == 0) |
|
| 115 | 115 | ) { |
| 116 | 116 | api_not_allowed(); |
| 117 | 117 | } |
@@ -121,10 +121,10 @@ discard block |
||
| 121 | 121 | $html .= '<div class="actions">'; |
| 122 | 122 | $html .= '<a href="index.php?gradebook='.$gradebook.'&'.api_get_cidreq().'">'. |
| 123 | 123 | Display::return_icon('back.png', get_lang('BackToForumOverview'), '', ICON_SIZE_MEDIUM).'</a>'; |
| 124 | -if (api_is_allowed_to_edit(false,true)) { |
|
| 125 | - $html .= '<a href="' . api_get_self() . '?' . api_get_cidreq() . '&forumcategory=' |
|
| 126 | - . $current_forum_category['cat_id'] . '&action=add&content=forum"> ' |
|
| 127 | - . Display::return_icon('new_forum.png', get_lang('AddForum'), '', ICON_SIZE_MEDIUM) . '</a>'; |
|
| 124 | +if (api_is_allowed_to_edit(false, true)) { |
|
| 125 | + $html .= '<a href="'.api_get_self().'?'.api_get_cidreq().'&forumcategory=' |
|
| 126 | + . $current_forum_category['cat_id'].'&action=add&content=forum"> ' |
|
| 127 | + . Display::return_icon('new_forum.png', get_lang('AddForum'), '', ICON_SIZE_MEDIUM).'</a>'; |
|
| 128 | 128 | } |
| 129 | 129 | $html .= search_link(); |
| 130 | 130 | $html .= '</div>'; |
@@ -184,7 +184,7 @@ discard block |
||
| 184 | 184 | $forum_categories_list = ''; |
| 185 | 185 | $forumId = $forum_category['cat_id']; |
| 186 | 186 | $forumTitle = $forum_category['cat_title']; |
| 187 | - $linkForumCategory = 'viewforumcategory.php?' . api_get_cidreq() . '&forumcategory=' . strval(intval($forumId)); |
|
| 187 | + $linkForumCategory = 'viewforumcategory.php?'.api_get_cidreq().'&forumcategory='.strval(intval($forumId)); |
|
| 188 | 188 | $descriptionCategory = $forum_category['cat_comment']; |
| 189 | 189 | $icoCategory = Display::return_icon( |
| 190 | 190 | 'forum_blue.png', |
@@ -195,16 +195,16 @@ discard block |
||
| 195 | 195 | |
| 196 | 196 | if (api_is_allowed_to_edit(false, true) && !($forum_category['session_id'] == 0 && $sessionId != 0)) { |
| 197 | 197 | |
| 198 | - $iconsEdit = '<a href="' . api_get_self() . '?' . api_get_cidreq() . '&forumcategory=' |
|
| 199 | - . Security::remove_XSS($_GET['forumcategory']) . '&action=edit&content=forumcategory&id=' |
|
| 200 | - . '' . $forumId . '">' |
|
| 201 | - . Display::return_icon('edit.png', get_lang('Edit'), array(), ICON_SIZE_SMALL) . '</a>'; |
|
| 202 | - $iconsEdit .= '<a href="' . api_get_self() . '?' . api_get_cidreq() . '&forumcategory=' |
|
| 198 | + $iconsEdit = '<a href="'.api_get_self().'?'.api_get_cidreq().'&forumcategory=' |
|
| 199 | + . Security::remove_XSS($_GET['forumcategory']).'&action=edit&content=forumcategory&id=' |
|
| 200 | + . ''.$forumId.'">' |
|
| 201 | + . Display::return_icon('edit.png', get_lang('Edit'), array(), ICON_SIZE_SMALL).'</a>'; |
|
| 202 | + $iconsEdit .= '<a href="'.api_get_self().'?'.api_get_cidreq().'&forumcategory=' |
|
| 203 | 203 | . Security::remove_XSS($_GET['forumcategory']) |
| 204 | - . '&action=delete&content=forumcategory&id=' . $forumId |
|
| 204 | + . '&action=delete&content=forumcategory&id='.$forumId |
|
| 205 | 205 | . "\" onclick=\"javascript:if(!confirm('" |
| 206 | 206 | . addslashes(api_htmlentities(get_lang('DeleteForumCategory'), ENT_QUOTES)) |
| 207 | - . "')) return false;\">" . Display::return_icon('delete.png', get_lang('Delete'), array(), ICON_SIZE_SMALL) |
|
| 207 | + . "')) return false;\">".Display::return_icon('delete.png', get_lang('Delete'), array(), ICON_SIZE_SMALL) |
|
| 208 | 208 | . '</a>'; |
| 209 | 209 | $iconsEdit .= return_visible_invisible_icon( |
| 210 | 210 | 'forumcategory', $forum_category['cat_id'], |
@@ -244,7 +244,7 @@ discard block |
||
| 244 | 244 | ); |
| 245 | 245 | |
| 246 | 246 | |
| 247 | - if ($descriptionCategory != '' && trim($descriptionCategory)!= ' ') |
|
| 247 | + if ($descriptionCategory != '' && trim($descriptionCategory) != ' ') |
|
| 248 | 248 | { |
| 249 | 249 | $html .= '<div class="forum-description">'.$descriptionCategory.'</div>'; |
| 250 | 250 | } |
@@ -284,7 +284,7 @@ discard block |
||
| 284 | 284 | // SHOULD WE SHOW THIS PARTICULAR FORUM |
| 285 | 285 | // you are teacher => show forum |
| 286 | 286 | |
| 287 | - if (api_is_allowed_to_edit(false,true)) { |
|
| 287 | + if (api_is_allowed_to_edit(false, true)) { |
|
| 288 | 288 | //echo 'teacher'; |
| 289 | 289 | $show_forum = true; |
| 290 | 290 | } else { |
@@ -351,9 +351,9 @@ discard block |
||
| 351 | 351 | ? $all_groups[$forum['forum_of_group']]['id'] |
| 352 | 352 | : null; |
| 353 | 353 | $group_title = api_substr($my_all_groups_forum_name, 0, 30); |
| 354 | - $forum_title_group_addition = ' (<a href="../group/group_space.php?' . api_get_cidreq() |
|
| 355 | - . '&gidReq=' . $my_all_groups_forum_id . '" class="forum_group_link">' |
|
| 356 | - . get_lang('GoTo') . ' ' . $group_title . '</a>)'; |
|
| 354 | + $forum_title_group_addition = ' (<a href="../group/group_space.php?'.api_get_cidreq() |
|
| 355 | + . '&gidReq='.$my_all_groups_forum_id.'" class="forum_group_link">' |
|
| 356 | + . get_lang('GoTo').' '.$group_title.'</a>)'; |
|
| 357 | 357 | } else { |
| 358 | 358 | $forum_title_group_addition = ''; |
| 359 | 359 | } |
@@ -371,7 +371,7 @@ discard block |
||
| 371 | 371 | $html .= '<div class="row">'; |
| 372 | 372 | $html .= '<div class="col-md-6">'; |
| 373 | 373 | $html .= '<div class="col-md-3">'; |
| 374 | - $html .= '<div class="number-post">'.$forum_image .'<p>' . $my_number_threads . ' ' . get_lang('ForumThreads') . '</p></div>'; |
|
| 374 | + $html .= '<div class="number-post">'.$forum_image.'<p>'.$my_number_threads.' '.get_lang('ForumThreads').'</p></div>'; |
|
| 375 | 375 | $html .= '</div>'; |
| 376 | 376 | |
| 377 | 377 | $html .= '<div class="col-md-9">'; |
@@ -386,7 +386,7 @@ discard block |
||
| 386 | 386 | 'a', |
| 387 | 387 | $forum['forum_title'].$session_displayed, |
| 388 | 388 | array( |
| 389 | - 'href' => 'viewforum.php?' . api_get_cidreq() |
|
| 389 | + 'href' => 'viewforum.php?'.api_get_cidreq() |
|
| 390 | 390 | . "&gidReq={$forum['forum_of_group']}&forum={$forum['forum_id']}&origin=$origin&search=" |
| 391 | 391 | . Security::remove_XSS(urlencode(isset($_GET['search']) ? $_GET['search'] : '')), |
| 392 | 392 | 'class' => return_visible_invisible($forum['visibility']) |
@@ -394,7 +394,7 @@ discard block |
||
| 394 | 394 | ); |
| 395 | 395 | $html .= Display::tag( |
| 396 | 396 | 'h3', |
| 397 | - $linkForum . ' ' . $forum_title_group_addition, |
|
| 397 | + $linkForum.' '.$forum_title_group_addition, |
|
| 398 | 398 | array( |
| 399 | 399 | 'class' => 'title' |
| 400 | 400 | ) |
@@ -410,19 +410,19 @@ discard block |
||
| 410 | 410 | $html .= '</div>'; |
| 411 | 411 | $html .= '<div class="col-md-6">'; |
| 412 | 412 | |
| 413 | - $iconEmpty=''; |
|
| 413 | + $iconEmpty = ''; |
|
| 414 | 414 | |
| 415 | 415 | // The number of topics and posts. |
| 416 | 416 | if ($forum['forum_of_group'] !== '0') { |
| 417 | 417 | $newPost = ''; |
| 418 | 418 | if (is_array($my_whatsnew_post_info) && !empty($my_whatsnew_post_info)) { |
| 419 | - $newPost = ' ' . Display::return_icon('alert.png', get_lang('Forum'), null, ICON_SIZE_SMALL); |
|
| 419 | + $newPost = ' '.Display::return_icon('alert.png', get_lang('Forum'), null, ICON_SIZE_SMALL); |
|
| 420 | 420 | } else { |
| 421 | 421 | $newPost = $iconEmpty; |
| 422 | 422 | } |
| 423 | 423 | } else { |
| 424 | 424 | if (is_array($my_whatsnew_post_info) && !empty($my_whatsnew_post_info)) { |
| 425 | - $newPost = ' ' . Display::return_icon('alert.png', get_lang('Forum'), null, ICON_SIZE_SMALL); |
|
| 425 | + $newPost = ' '.Display::return_icon('alert.png', get_lang('Forum'), null, ICON_SIZE_SMALL); |
|
| 426 | 426 | } else { |
| 427 | 427 | $newPost = $iconEmpty; |
| 428 | 428 | } |
@@ -430,7 +430,7 @@ discard block |
||
| 430 | 430 | |
| 431 | 431 | $html .= '<div class="row">'; |
| 432 | 432 | $html .= '<div class="col-md-2">'; |
| 433 | - $html .= $newPost . '</div>'; |
|
| 433 | + $html .= $newPost.'</div>'; |
|
| 434 | 434 | |
| 435 | 435 | // the last post in the forum |
| 436 | 436 | if ($forum['last_poster_name'] != '') { |
@@ -442,9 +442,9 @@ discard block |
||
| 442 | 442 | } |
| 443 | 443 | $html .= '<div class="col-md-6">'; |
| 444 | 444 | if (!empty($forum['last_post_id'])) { |
| 445 | - $html .= Display::return_icon('post-item.png', null, null, ICON_SIZE_TINY) . ' '; |
|
| 445 | + $html .= Display::return_icon('post-item.png', null, null, ICON_SIZE_TINY).' '; |
|
| 446 | 446 | $html .= api_convert_and_format_date($forum['last_post_date']) |
| 447 | - . ' ' . get_lang('By') . ' ' |
|
| 447 | + . ' '.get_lang('By').' ' |
|
| 448 | 448 | . display_user_link($poster_id, $name); |
| 449 | 449 | } |
| 450 | 450 | $html .= '</div>'; |
@@ -454,13 +454,13 @@ discard block |
||
| 454 | 454 | api_is_allowed_to_edit(false, true) && |
| 455 | 455 | !($forum['session_id'] == 0 && $sessionId != 0) |
| 456 | 456 | ) { |
| 457 | - $html .= '<a href="' . api_get_self() . '?' . api_get_cidreq() . '&forumcategory=' |
|
| 457 | + $html .= '<a href="'.api_get_self().'?'.api_get_cidreq().'&forumcategory=' |
|
| 458 | 458 | . Security::remove_XSS($_GET['forumcategory']) |
| 459 | - . '&action=edit&content=forum&id=' . $forum['forum_id'] . '">' |
|
| 460 | - . Display::return_icon('edit.png', get_lang('Edit'), array(), ICON_SIZE_SMALL) . '</a>'; |
|
| 461 | - $html .= '<a href="' . api_get_self() . '?' . api_get_cidreq() . '&forumcategory=' |
|
| 459 | + . '&action=edit&content=forum&id='.$forum['forum_id'].'">' |
|
| 460 | + . Display::return_icon('edit.png', get_lang('Edit'), array(), ICON_SIZE_SMALL).'</a>'; |
|
| 461 | + $html .= '<a href="'.api_get_self().'?'.api_get_cidreq().'&forumcategory=' |
|
| 462 | 462 | . Security::remove_XSS($_GET['forumcategory']) |
| 463 | - . '&action=delete&content=forum&id=' . $forum['forum_id'] |
|
| 463 | + . '&action=delete&content=forum&id='.$forum['forum_id'] |
|
| 464 | 464 | . "\" onclick=\"javascript:if(!confirm('" |
| 465 | 465 | . addslashes(api_htmlentities(get_lang('DeleteForum'), ENT_QUOTES)) |
| 466 | 466 | . "')) return false;\">" |
@@ -484,15 +484,15 @@ discard block |
||
| 484 | 484 | $iconnotify = 'notification_mail_na.png'; |
| 485 | 485 | |
| 486 | 486 | if (is_array(isset($_SESSION['forum_notification']['forum']) ? $_SESSION['forum_notification']['forum'] : null)) { |
| 487 | - if (in_array($forum['forum_id'],$_SESSION['forum_notification']['forum'])) { |
|
| 487 | + if (in_array($forum['forum_id'], $_SESSION['forum_notification']['forum'])) { |
|
| 488 | 488 | $iconnotify = 'notification_mail.png'; |
| 489 | 489 | } |
| 490 | 490 | } |
| 491 | 491 | |
| 492 | 492 | if (!api_is_anonymous()) { |
| 493 | - $html .= '<a href="' . api_get_self() . '?' . api_get_cidreq() . '&forumcategory=' |
|
| 494 | - . Security::remove_XSS($_GET['forumcategory']) . '&action=notify&content=forum&id=' |
|
| 495 | - . $forum['forum_id'] . '">' . Display::return_icon($iconnotify, get_lang('NotifyMe')) . '</a>'; |
|
| 493 | + $html .= '<a href="'.api_get_self().'?'.api_get_cidreq().'&forumcategory=' |
|
| 494 | + . Security::remove_XSS($_GET['forumcategory']).'&action=notify&content=forum&id=' |
|
| 495 | + . $forum['forum_id'].'">'.Display::return_icon($iconnotify, get_lang('NotifyMe')).'</a>'; |
|
| 496 | 496 | } |
| 497 | 497 | $html .= '</div>'; |
| 498 | 498 | $html .= '</div>'; |
@@ -142,7 +142,7 @@ |
||
| 142 | 142 | |
| 143 | 143 | if (!api_is_allowed_to_edit(null, true) && |
| 144 | 144 | ( |
| 145 | - ($current_forum_category && $current_forum_category['locked'] <> 0 ) || |
|
| 145 | + ($current_forum_category && $current_forum_category['locked'] <> 0) || |
|
| 146 | 146 | $current_forum['locked'] <> 0 || |
| 147 | 147 | $current_thread['locked'] <> 0 |
| 148 | 148 | ) |
@@ -28,7 +28,7 @@ discard block |
||
| 28 | 28 | // Are we in a lp ? |
| 29 | 29 | $origin = ''; |
| 30 | 30 | if (isset($_GET['origin'])) { |
| 31 | - $origin = Security::remove_XSS($_GET['origin']); |
|
| 31 | + $origin = Security::remove_XSS($_GET['origin']); |
|
| 32 | 32 | } |
| 33 | 33 | |
| 34 | 34 | /* MAIN DISPLAY SECTION */ |
@@ -45,12 +45,12 @@ discard block |
||
| 45 | 45 | |
| 46 | 46 | /* Header and Breadcrumbs */ |
| 47 | 47 | |
| 48 | -if (isset($_SESSION['gradebook'])){ |
|
| 48 | +if (isset($_SESSION['gradebook'])) { |
|
| 49 | 49 | $gradebook = $_SESSION['gradebook']; |
| 50 | 50 | } |
| 51 | 51 | |
| 52 | 52 | if (!empty($gradebook) && $gradebook == 'view') { |
| 53 | - $interbreadcrumb[] = array ( |
|
| 53 | + $interbreadcrumb[] = array( |
|
| 54 | 54 | 'url' => '../gradebook/'.$_SESSION['gradebook_dest'], |
| 55 | 55 | 'name' => get_lang('ToolGradebook') |
| 56 | 56 | ); |
@@ -183,7 +183,7 @@ discard block |
||
| 183 | 183 | echo "\t<tr>\n\t\t<th style=\"padding-left:5px;\" align=\"left\" colspan=\"6\">"; |
| 184 | 184 | echo '<span class="forum_title">'.prepare4display($current_thread['thread_title']).'</span><br />'; |
| 185 | 185 | |
| 186 | - if ($origin!='learnpath') { |
|
| 186 | + if ($origin != 'learnpath') { |
|
| 187 | 187 | echo '<span class="forum_low_description">'.prepare4display($current_forum_category['cat_title']).' - '; |
| 188 | 188 | } |
| 189 | 189 | |
@@ -15,7 +15,7 @@ discard block |
||
| 15 | 15 | */ |
| 16 | 16 | |
| 17 | 17 | require_once '../inc/global.inc.php'; |
| 18 | -$current_course_tool = TOOL_COURSE_SETTING; |
|
| 18 | +$current_course_tool = TOOL_COURSE_SETTING; |
|
| 19 | 19 | $this_section = SECTION_COURSES; |
| 20 | 20 | |
| 21 | 21 | $nameTools = get_lang('ModifInfo'); |
@@ -46,8 +46,8 @@ discard block |
||
| 46 | 46 | api_not_allowed(true); |
| 47 | 47 | } |
| 48 | 48 | |
| 49 | -$htmlHeadXtra[] = '<link href="'. api_get_path(WEB_PATH) .'web/assets/cropper/dist/cropper.min.css" rel="stylesheet">'; |
|
| 50 | -$htmlHeadXtra[] = '<script src="'. api_get_path(WEB_PATH) .'web/assets/cropper/dist/cropper.min.js"></script>'; |
|
| 49 | +$htmlHeadXtra[] = '<link href="'.api_get_path(WEB_PATH).'web/assets/cropper/dist/cropper.min.css" rel="stylesheet">'; |
|
| 50 | +$htmlHeadXtra[] = '<script src="'.api_get_path(WEB_PATH).'web/assets/cropper/dist/cropper.min.js"></script>'; |
|
| 51 | 51 | $htmlHeadXtra[] = '<script> |
| 52 | 52 | $(document).ready(function() { |
| 53 | 53 | var $image = $("#previewImage"); |
@@ -150,18 +150,18 @@ discard block |
||
| 150 | 150 | $form = new FormValidator('update_course', 'post', api_get_self().'?'.api_get_cidreq()); |
| 151 | 151 | |
| 152 | 152 | // COURSE SETTINGS |
| 153 | -$form->addElement('html', '<div><h3>'.Display::return_icon('settings.png', Security::remove_XSS(get_lang('CourseSettings')),'',ICON_SIZE_SMALL).' '.Security::remove_XSS(get_lang('CourseSettings')).'</h3><div>'); |
|
| 153 | +$form->addElement('html', '<div><h3>'.Display::return_icon('settings.png', Security::remove_XSS(get_lang('CourseSettings')), '', ICON_SIZE_SMALL).' '.Security::remove_XSS(get_lang('CourseSettings')).'</h3><div>'); |
|
| 154 | 154 | |
| 155 | 155 | $image_html = ''; |
| 156 | 156 | |
| 157 | 157 | |
| 158 | 158 | // Display course picture |
| 159 | -$course_path = api_get_path(SYS_COURSE_PATH).$currentCourseRepository; // course path |
|
| 159 | +$course_path = api_get_path(SYS_COURSE_PATH).$currentCourseRepository; // course path |
|
| 160 | 160 | |
| 161 | 161 | if (file_exists($course_path.'/course-pic85x85.png')) { |
| 162 | - $course_web_path = api_get_path(WEB_COURSE_PATH).$currentCourseRepository; // course web path |
|
| 162 | + $course_web_path = api_get_path(WEB_COURSE_PATH).$currentCourseRepository; // course web path |
|
| 163 | 163 | $course_medium_image = $course_web_path.'/course-pic85x85.png?'.rand(1, 1000); // redimensioned image 85x85 |
| 164 | - $image_html = '<div class="row"><label class="col-md-2 control-label">'.get_lang('Image').'</label> <div class="col-md-8"><img src="'.$course_medium_image.'" /></div></div>'; |
|
| 164 | + $image_html = '<div class="row"><label class="col-md-2 control-label">'.get_lang('Image').'</label> <div class="col-md-8"><img src="'.$course_medium_image.'" /></div></div>'; |
|
| 165 | 165 | } |
| 166 | 166 | $form->addElement('html', $image_html); |
| 167 | 167 | |
@@ -201,17 +201,17 @@ discard block |
||
| 201 | 201 | . '</div>' |
| 202 | 202 | . ''); |
| 203 | 203 | $form->addHidden('cropResult', ''); |
| 204 | -$allowed_picture_types = array ('jpg', 'jpeg', 'png', 'gif'); |
|
| 204 | +$allowed_picture_types = array('jpg', 'jpeg', 'png', 'gif'); |
|
| 205 | 205 | $form->addRule('picture', get_lang('OnlyImagesAllowed').' ('.implode(',', $allowed_picture_types).')', 'filetype', $allowed_picture_types); |
| 206 | 206 | //$form->addElement('html', '<div class="form-group "><div class="col-md-2"></div> <div class="col-md-8 help-image">'.get_lang('UniqueAnswerImagePreferredSize200x150').'</div></div>'); |
| 207 | 207 | $form->addElement('checkbox', 'delete_picture', null, get_lang('DeletePicture')); |
| 208 | 208 | |
| 209 | 209 | if (api_get_setting('pdf_export_watermark_by_course') == 'true') { |
| 210 | - $url = PDF::get_watermark($course_code); |
|
| 210 | + $url = PDF::get_watermark($course_code); |
|
| 211 | 211 | $form->addText('pdf_export_watermark_text', get_lang('PDFExportWatermarkTextTitle'), false, array('size' => '60')); |
| 212 | 212 | $form->addElement('file', 'pdf_export_watermark_path', get_lang('AddWaterMark')); |
| 213 | 213 | if ($url != false) { |
| 214 | - $delete_url = '<a href="?delete_watermark">'.Display::return_icon('delete.png',get_lang('DelImage')).'</a>'; |
|
| 214 | + $delete_url = '<a href="?delete_watermark">'.Display::return_icon('delete.png', get_lang('DelImage')).'</a>'; |
|
| 215 | 215 | $form->addElement('html', '<div class="row"><div class="formw"><a href="'.$url.'">'.$url.' '.$delete_url.'</a></div></div>'); |
| 216 | 216 | } |
| 217 | 217 | $form->addRule('pdf_export_watermark_path', get_lang('OnlyImagesAllowed').' ('.implode(',', $allowed_picture_types).')', 'filetype', $allowed_picture_types); |
@@ -229,21 +229,21 @@ discard block |
||
| 229 | 229 | } |
| 230 | 230 | |
| 231 | 231 | $form->addElement('label', get_lang('DocumentQuota'), format_file_size(DocumentManager::get_course_quota())); |
| 232 | -$form->addButtonSave(get_lang('SaveSettings'),'submit_save'); |
|
| 232 | +$form->addButtonSave(get_lang('SaveSettings'), 'submit_save'); |
|
| 233 | 233 | $form->addElement('html', '</div></div>'); |
| 234 | 234 | |
| 235 | 235 | // COURSE ACCESS |
| 236 | 236 | |
| 237 | -$form->addElement('html', '<div> <h3>'.Display::return_icon('course.png', Security::remove_XSS(get_lang('CourseAccess')),'',ICON_SIZE_SMALL).' '.Security::remove_XSS(get_lang('CourseAccess')).'</h3><div>'); |
|
| 237 | +$form->addElement('html', '<div> <h3>'.Display::return_icon('course.png', Security::remove_XSS(get_lang('CourseAccess')), '', ICON_SIZE_SMALL).' '.Security::remove_XSS(get_lang('CourseAccess')).'</h3><div>'); |
|
| 238 | 238 | |
| 239 | 239 | $group = array(); |
| 240 | -$group[]= $form->createElement('radio', 'visibility', get_lang("CourseAccess"), get_lang('OpenToTheWorld'), COURSE_VISIBILITY_OPEN_WORLD); |
|
| 241 | -$group[]= $form->createElement('radio', 'visibility', null, get_lang('OpenToThePlatform'), COURSE_VISIBILITY_OPEN_PLATFORM); |
|
| 242 | -$group[]= $form->createElement('radio', 'visibility', null, get_lang('Private'), COURSE_VISIBILITY_REGISTERED); |
|
| 243 | -$group[]= $form->createElement('radio', 'visibility', null, get_lang('CourseVisibilityClosed'), COURSE_VISIBILITY_CLOSED); |
|
| 240 | +$group[] = $form->createElement('radio', 'visibility', get_lang("CourseAccess"), get_lang('OpenToTheWorld'), COURSE_VISIBILITY_OPEN_WORLD); |
|
| 241 | +$group[] = $form->createElement('radio', 'visibility', null, get_lang('OpenToThePlatform'), COURSE_VISIBILITY_OPEN_PLATFORM); |
|
| 242 | +$group[] = $form->createElement('radio', 'visibility', null, get_lang('Private'), COURSE_VISIBILITY_REGISTERED); |
|
| 243 | +$group[] = $form->createElement('radio', 'visibility', null, get_lang('CourseVisibilityClosed'), COURSE_VISIBILITY_CLOSED); |
|
| 244 | 244 | // The "hidden" visibility is only available to portal admins |
| 245 | 245 | if (api_is_platform_admin()) { |
| 246 | - $group[]= $form->createElement('radio', 'visibility', null, get_lang('CourseVisibilityHidden'), COURSE_VISIBILITY_HIDDEN); |
|
| 246 | + $group[] = $form->createElement('radio', 'visibility', null, get_lang('CourseVisibilityHidden'), COURSE_VISIBILITY_HIDDEN); |
|
| 247 | 247 | } |
| 248 | 248 | $form->addGroup($group, '', array(get_lang("CourseAccess"), get_lang("CourseAccessConfigTip")), ''); |
| 249 | 249 | |
@@ -252,13 +252,13 @@ discard block |
||
| 252 | 252 | $form->addElement('label', get_lang('DirectLink'), sprintf(get_lang('CourseSettingsRegisterDirectLink'), $url)); |
| 253 | 253 | |
| 254 | 254 | $group = array(); |
| 255 | -$group[]=$form->createElement('radio', 'subscribe', get_lang('Subscription'), get_lang('Allowed'), 1); |
|
| 256 | -$group[]=$form->createElement('radio', 'subscribe', null, get_lang('Denied'), 0); |
|
| 255 | +$group[] = $form->createElement('radio', 'subscribe', get_lang('Subscription'), get_lang('Allowed'), 1); |
|
| 256 | +$group[] = $form->createElement('radio', 'subscribe', null, get_lang('Denied'), 0); |
|
| 257 | 257 | $form->addGroup($group, '', array(get_lang("Subscription")), ''); |
| 258 | 258 | |
| 259 | 259 | $group = array(); |
| 260 | -$group[]=$form->createElement('radio', 'unsubscribe', get_lang('Unsubscription'), get_lang('AllowedToUnsubscribe'), 1); |
|
| 261 | -$group[]=$form->createElement('radio', 'unsubscribe', null, get_lang('NotAllowedToUnsubscribe'), 0); |
|
| 260 | +$group[] = $form->createElement('radio', 'unsubscribe', get_lang('Unsubscription'), get_lang('AllowedToUnsubscribe'), 1); |
|
| 261 | +$group[] = $form->createElement('radio', 'unsubscribe', null, get_lang('NotAllowedToUnsubscribe'), 0); |
|
| 262 | 262 | $form->addGroup($group, '', array(get_lang("Unsubscription")), ''); |
| 263 | 263 | |
| 264 | 264 | $form->addText('course_registration_password', get_lang('CourseRegistrationPassword'), false, array('size' => '60')); |
@@ -271,103 +271,103 @@ discard block |
||
| 271 | 271 | |
| 272 | 272 | // Documents |
| 273 | 273 | if (api_get_setting('documents_default_visibility_defined_in_course') == 'true') { |
| 274 | - $form->addElement('html', '<div> <h3>'.Display::return_icon('folder.png', Security::remove_XSS(get_lang('Documents')),'',ICON_SIZE_SMALL).' '.Security::remove_XSS(get_lang('Documents')).'</h3><div>'); |
|
| 274 | + $form->addElement('html', '<div> <h3>'.Display::return_icon('folder.png', Security::remove_XSS(get_lang('Documents')), '', ICON_SIZE_SMALL).' '.Security::remove_XSS(get_lang('Documents')).'</h3><div>'); |
|
| 275 | 275 | |
| 276 | 276 | $group = array( |
| 277 | 277 | $form->createElement('radio', 'documents_default_visibility', null, get_lang('Visible'), 'visible'), |
| 278 | 278 | $form->createElement('radio', 'documents_default_visibility', null, get_lang('Invisible'), 'invisible') |
| 279 | 279 | ); |
| 280 | 280 | $form->addGroup($group, '', array(get_lang("DocumentsDefaultVisibility")), ''); |
| 281 | - $form->addButtonSave(get_lang('SaveSettings'),'submit_save'); |
|
| 281 | + $form->addButtonSave(get_lang('SaveSettings'), 'submit_save'); |
|
| 282 | 282 | |
| 283 | 283 | |
| 284 | 284 | $form->addElement('html', '</div></div>'); |
| 285 | 285 | } |
| 286 | 286 | |
| 287 | 287 | // EMAIL NOTIFICATIONS |
| 288 | -$form->addElement('html', '<div> <h3>'.Display::return_icon('mail.png', Security::remove_XSS(get_lang('EmailNotifications')),'',ICON_SIZE_SMALL).' '.Security::remove_XSS(get_lang('EmailNotifications')).'</h3><div>'); |
|
| 288 | +$form->addElement('html', '<div> <h3>'.Display::return_icon('mail.png', Security::remove_XSS(get_lang('EmailNotifications')), '', ICON_SIZE_SMALL).' '.Security::remove_XSS(get_lang('EmailNotifications')).'</h3><div>'); |
|
| 289 | 289 | |
| 290 | 290 | $group = array(); |
| 291 | -$group[]=$form->createElement('radio', 'email_alert_to_teacher_on_new_user_in_course', get_lang('NewUserEmailAlert'), get_lang('NewUserEmailAlertEnable'), 1); |
|
| 292 | -$group[]=$form->createElement('radio', 'email_alert_to_teacher_on_new_user_in_course', null, get_lang('NewUserEmailAlertToTeacharAndTutor'), 2); |
|
| 293 | -$group[]=$form->createElement('radio', 'email_alert_to_teacher_on_new_user_in_course', null, get_lang('NewUserEmailAlertDisable'), 0); |
|
| 291 | +$group[] = $form->createElement('radio', 'email_alert_to_teacher_on_new_user_in_course', get_lang('NewUserEmailAlert'), get_lang('NewUserEmailAlertEnable'), 1); |
|
| 292 | +$group[] = $form->createElement('radio', 'email_alert_to_teacher_on_new_user_in_course', null, get_lang('NewUserEmailAlertToTeacharAndTutor'), 2); |
|
| 293 | +$group[] = $form->createElement('radio', 'email_alert_to_teacher_on_new_user_in_course', null, get_lang('NewUserEmailAlertDisable'), 0); |
|
| 294 | 294 | $form->addGroup($group, '', array(get_lang("NewUserEmailAlert")), ''); |
| 295 | 295 | |
| 296 | 296 | $group = array(); |
| 297 | -$group[]=$form->createElement('radio', 'email_alert_students_on_new_homework', get_lang('NewHomeworkEmailAlert'), get_lang('NewHomeworkEmailAlertEnable'), 1); |
|
| 298 | -$group[]=$form->createElement('radio', 'email_alert_students_on_new_homework', null, get_lang('NewHomeworkEmailAlertDisable'), 0); |
|
| 297 | +$group[] = $form->createElement('radio', 'email_alert_students_on_new_homework', get_lang('NewHomeworkEmailAlert'), get_lang('NewHomeworkEmailAlertEnable'), 1); |
|
| 298 | +$group[] = $form->createElement('radio', 'email_alert_students_on_new_homework', null, get_lang('NewHomeworkEmailAlertDisable'), 0); |
|
| 299 | 299 | $form->addGroup($group, '', array(get_lang("NewHomeworkEmailAlert")), ''); |
| 300 | 300 | |
| 301 | 301 | $group = array(); |
| 302 | -$group[]=$form->createElement('radio', 'email_alert_manager_on_new_doc', null, get_lang('WorkEmailAlertActivateOnlyForTeachers'), 3); |
|
| 303 | -$group[]=$form->createElement('radio', 'email_alert_manager_on_new_doc', null, get_lang('WorkEmailAlertActivateOnlyForStudents'), 2); |
|
| 304 | -$group[]=$form->createElement('radio', 'email_alert_manager_on_new_doc', get_lang('WorkEmailAlert'), get_lang('WorkEmailAlertActivate'), 1); |
|
| 305 | -$group[]=$form->createElement('radio', 'email_alert_manager_on_new_doc', null, get_lang('WorkEmailAlertDeactivate'), 0); |
|
| 302 | +$group[] = $form->createElement('radio', 'email_alert_manager_on_new_doc', null, get_lang('WorkEmailAlertActivateOnlyForTeachers'), 3); |
|
| 303 | +$group[] = $form->createElement('radio', 'email_alert_manager_on_new_doc', null, get_lang('WorkEmailAlertActivateOnlyForStudents'), 2); |
|
| 304 | +$group[] = $form->createElement('radio', 'email_alert_manager_on_new_doc', get_lang('WorkEmailAlert'), get_lang('WorkEmailAlertActivate'), 1); |
|
| 305 | +$group[] = $form->createElement('radio', 'email_alert_manager_on_new_doc', null, get_lang('WorkEmailAlertDeactivate'), 0); |
|
| 306 | 306 | $form->addGroup($group, '', array(get_lang("WorkEmailAlert")), ''); |
| 307 | 307 | |
| 308 | 308 | $group = array(); |
| 309 | -$group[]=$form->createElement('radio', 'email_alert_on_new_doc_dropbox', get_lang('DropboxEmailAlert'), get_lang('DropboxEmailAlertActivate'), 1); |
|
| 310 | -$group[]=$form->createElement('radio', 'email_alert_on_new_doc_dropbox', null, get_lang('DropboxEmailAlertDeactivate'), 0); |
|
| 309 | +$group[] = $form->createElement('radio', 'email_alert_on_new_doc_dropbox', get_lang('DropboxEmailAlert'), get_lang('DropboxEmailAlertActivate'), 1); |
|
| 310 | +$group[] = $form->createElement('radio', 'email_alert_on_new_doc_dropbox', null, get_lang('DropboxEmailAlertDeactivate'), 0); |
|
| 311 | 311 | $form->addGroup($group, '', array(get_lang("DropboxEmailAlert")), ''); |
| 312 | 312 | |
| 313 | 313 | $group = array(); |
| 314 | -$group[]=$form->createElement('radio', 'email_alert_manager_on_new_quiz', get_lang('QuizEmailAlert'), get_lang('QuizEmailAlertActivate'), 1); |
|
| 315 | -$group[]=$form->createElement('radio', 'email_alert_manager_on_new_quiz', null, get_lang('QuizEmailAlertDeactivate'), 0); |
|
| 314 | +$group[] = $form->createElement('radio', 'email_alert_manager_on_new_quiz', get_lang('QuizEmailAlert'), get_lang('QuizEmailAlertActivate'), 1); |
|
| 315 | +$group[] = $form->createElement('radio', 'email_alert_manager_on_new_quiz', null, get_lang('QuizEmailAlertDeactivate'), 0); |
|
| 316 | 316 | $form->addGroup($group, '', array(get_lang("QuizEmailAlert")), ''); |
| 317 | 317 | $form->addButtonSave(get_lang('SaveSettings'), 'submit_save'); |
| 318 | 318 | |
| 319 | 319 | $form->addElement('html', '</div></div>'); |
| 320 | 320 | |
| 321 | 321 | // USER RIGHTS |
| 322 | -$form->addElement('html', '<div> <h3>'.Display::return_icon('user.png', Security::remove_XSS(get_lang('UserRights')),'',ICON_SIZE_SMALL).' '.Security::remove_XSS(get_lang('UserRights')).'</h3><div>'); |
|
| 322 | +$form->addElement('html', '<div> <h3>'.Display::return_icon('user.png', Security::remove_XSS(get_lang('UserRights')), '', ICON_SIZE_SMALL).' '.Security::remove_XSS(get_lang('UserRights')).'</h3><div>'); |
|
| 323 | 323 | |
| 324 | 324 | $group = array(); |
| 325 | -$group[]=$form->createElement('radio', 'allow_user_edit_agenda', get_lang('AllowUserEditAgenda'), get_lang('AllowUserEditAgendaActivate'), 1); |
|
| 326 | -$group[]=$form->createElement('radio', 'allow_user_edit_agenda', null, get_lang('AllowUserEditAgendaDeactivate'), 0); |
|
| 325 | +$group[] = $form->createElement('radio', 'allow_user_edit_agenda', get_lang('AllowUserEditAgenda'), get_lang('AllowUserEditAgendaActivate'), 1); |
|
| 326 | +$group[] = $form->createElement('radio', 'allow_user_edit_agenda', null, get_lang('AllowUserEditAgendaDeactivate'), 0); |
|
| 327 | 327 | $form->addGroup($group, '', array(get_lang("AllowUserEditAgenda")), ''); |
| 328 | 328 | |
| 329 | 329 | $group = array(); |
| 330 | -$group[]=$form->createElement('radio', 'allow_user_edit_announcement', get_lang('AllowUserEditAnnouncement'), get_lang('AllowUserEditAnnouncementActivate'), 1); |
|
| 331 | -$group[]=$form->createElement('radio', 'allow_user_edit_announcement', null, get_lang('AllowUserEditAnnouncementDeactivate'), 0); |
|
| 330 | +$group[] = $form->createElement('radio', 'allow_user_edit_announcement', get_lang('AllowUserEditAnnouncement'), get_lang('AllowUserEditAnnouncementActivate'), 1); |
|
| 331 | +$group[] = $form->createElement('radio', 'allow_user_edit_announcement', null, get_lang('AllowUserEditAnnouncementDeactivate'), 0); |
|
| 332 | 332 | $form->addGroup($group, '', array(get_lang("AllowUserEditAnnouncement")), ''); |
| 333 | 333 | |
| 334 | 334 | $group = array(); |
| 335 | -$group[]=$form->createElement('radio', 'allow_user_image_forum', get_lang('AllowUserImageForum'), get_lang('AllowUserImageForumActivate'), 1); |
|
| 336 | -$group[]=$form->createElement('radio', 'allow_user_image_forum', null, get_lang('AllowUserImageForumDeactivate'), 0); |
|
| 335 | +$group[] = $form->createElement('radio', 'allow_user_image_forum', get_lang('AllowUserImageForum'), get_lang('AllowUserImageForumActivate'), 1); |
|
| 336 | +$group[] = $form->createElement('radio', 'allow_user_image_forum', null, get_lang('AllowUserImageForumDeactivate'), 0); |
|
| 337 | 337 | $form->addGroup($group, '', array(get_lang("AllowUserImageForum")), ''); |
| 338 | 338 | |
| 339 | 339 | $group = array(); |
| 340 | -$group[]=$form->createElement('radio', 'allow_user_view_user_list', get_lang('AllowUserViewUserList'), get_lang('AllowUserViewUserListActivate'), 1); |
|
| 341 | -$group[]=$form->createElement('radio', 'allow_user_view_user_list', null, get_lang('AllowUserViewUserListDeactivate'), 0); |
|
| 340 | +$group[] = $form->createElement('radio', 'allow_user_view_user_list', get_lang('AllowUserViewUserList'), get_lang('AllowUserViewUserListActivate'), 1); |
|
| 341 | +$group[] = $form->createElement('radio', 'allow_user_view_user_list', null, get_lang('AllowUserViewUserListDeactivate'), 0); |
|
| 342 | 342 | $form->addGroup($group, '', array(get_lang("AllowUserViewUserList")), ''); |
| 343 | 343 | $form->addButtonSave(get_lang('SaveSettings'), 'submit_save'); |
| 344 | 344 | $form->addElement('html', '</div></div>'); |
| 345 | 345 | |
| 346 | 346 | // CHAT SETTINGS |
| 347 | -$form->addElement('html', '<div><h3>'.Display::return_icon('chat.png', Security::remove_XSS(get_lang('ConfigChat')),'',ICON_SIZE_SMALL).' '.Security::remove_XSS(get_lang('ConfigChat')).'</h3><div>'); |
|
| 347 | +$form->addElement('html', '<div><h3>'.Display::return_icon('chat.png', Security::remove_XSS(get_lang('ConfigChat')), '', ICON_SIZE_SMALL).' '.Security::remove_XSS(get_lang('ConfigChat')).'</h3><div>'); |
|
| 348 | 348 | |
| 349 | 349 | $group = array(); |
| 350 | -$group[]=$form->createElement('radio', 'allow_open_chat_window', get_lang('AllowOpenchatWindow'), get_lang('AllowOpenChatWindowActivate'), 1); |
|
| 351 | -$group[]=$form->createElement('radio', 'allow_open_chat_window', null, get_lang('AllowOpenChatWindowDeactivate'), 0); |
|
| 350 | +$group[] = $form->createElement('radio', 'allow_open_chat_window', get_lang('AllowOpenchatWindow'), get_lang('AllowOpenChatWindowActivate'), 1); |
|
| 351 | +$group[] = $form->createElement('radio', 'allow_open_chat_window', null, get_lang('AllowOpenChatWindowDeactivate'), 0); |
|
| 352 | 352 | $form->addGroup($group, '', array(get_lang("AllowOpenchatWindow")), ''); |
| 353 | 353 | $form->addButtonSave(get_lang('SaveSettings'), 'submit_save'); |
| 354 | 354 | $form->addElement('html', '</div></div>'); |
| 355 | 355 | |
| 356 | 356 | // LEARNING PATH |
| 357 | -$form->addElement('html', '<div><h3>'.Display::return_icon('scorms.png', get_lang('ConfigLearnpath'),'',ICON_SIZE_SMALL).' '.Security::remove_XSS(get_lang('ConfigLearnpath')).'</h3><div>'); |
|
| 357 | +$form->addElement('html', '<div><h3>'.Display::return_icon('scorms.png', get_lang('ConfigLearnpath'), '', ICON_SIZE_SMALL).' '.Security::remove_XSS(get_lang('ConfigLearnpath')).'</h3><div>'); |
|
| 358 | 358 | |
| 359 | 359 | // Auto launch LP |
| 360 | 360 | $group = array(); |
| 361 | -$group[]=$form->createElement('radio', 'enable_lp_auto_launch', get_lang('LPAutoLaunch'), get_lang('RedirectToALearningPath'), 1); |
|
| 362 | -$group[]=$form->createElement('radio', 'enable_lp_auto_launch', get_lang('LPAutoLaunch'), get_lang('RedirectToTheLearningPathList'), 2); |
|
| 363 | -$group[]=$form->createElement('radio', 'enable_lp_auto_launch', null, get_lang('Deactivate'), 0); |
|
| 361 | +$group[] = $form->createElement('radio', 'enable_lp_auto_launch', get_lang('LPAutoLaunch'), get_lang('RedirectToALearningPath'), 1); |
|
| 362 | +$group[] = $form->createElement('radio', 'enable_lp_auto_launch', get_lang('LPAutoLaunch'), get_lang('RedirectToTheLearningPathList'), 2); |
|
| 363 | +$group[] = $form->createElement('radio', 'enable_lp_auto_launch', null, get_lang('Deactivate'), 0); |
|
| 364 | 364 | $form->addGroup($group, '', array(get_lang("LPAutoLaunch")), ''); |
| 365 | 365 | |
| 366 | 366 | if (api_get_setting('allow_course_theme') == 'true') { |
| 367 | 367 | // Allow theme into Learning path |
| 368 | 368 | $group = array(); |
| 369 | - $group[]=$form->createElement('radio', 'allow_learning_path_theme', get_lang('AllowLearningPathTheme'), get_lang('AllowLearningPathThemeAllow'), 1); |
|
| 370 | - $group[]=$form->createElement('radio', 'allow_learning_path_theme', null, get_lang('AllowLearningPathThemeDisallow'), 0); |
|
| 369 | + $group[] = $form->createElement('radio', 'allow_learning_path_theme', get_lang('AllowLearningPathTheme'), get_lang('AllowLearningPathThemeAllow'), 1); |
|
| 370 | + $group[] = $form->createElement('radio', 'allow_learning_path_theme', null, get_lang('AllowLearningPathThemeDisallow'), 0); |
|
| 371 | 371 | $form->addGroup($group, '', array(get_lang("AllowLearningPathTheme")), ''); |
| 372 | 372 | } |
| 373 | 373 | |
@@ -408,21 +408,21 @@ discard block |
||
| 408 | 408 | 'html', |
| 409 | 409 | '<div><h3>'.Display::return_icon( |
| 410 | 410 | 'course_progress.png', |
| 411 | - Security::remove_XSS(get_lang('ThematicAdvanceConfiguration')),'',ICON_SIZE_SMALL |
|
| 411 | + Security::remove_XSS(get_lang('ThematicAdvanceConfiguration')), '', ICON_SIZE_SMALL |
|
| 412 | 412 | ).' '.Security::remove_XSS(get_lang('ThematicAdvanceConfiguration')).'</h3><div>' |
| 413 | 413 | ); |
| 414 | 414 | |
| 415 | 415 | $group = array(); |
| 416 | -$group[]=$form->createElement('radio', 'display_info_advance_inside_homecourse', get_lang('InfoAboutAdvanceInsideHomeCourse'), get_lang('DisplayAboutLastDoneAdvance'), 1); |
|
| 417 | -$group[]=$form->createElement('radio', 'display_info_advance_inside_homecourse', null, get_lang('DisplayAboutNextAdvanceNotDone'), 2); |
|
| 418 | -$group[]=$form->createElement('radio', 'display_info_advance_inside_homecourse', null, get_lang('DisplayAboutNextAdvanceNotDoneAndLastDoneAdvance'), 3); |
|
| 419 | -$group[]=$form->createElement('radio', 'display_info_advance_inside_homecourse', null, get_lang('DoNotDisplayAnyAdvance'), 0); |
|
| 416 | +$group[] = $form->createElement('radio', 'display_info_advance_inside_homecourse', get_lang('InfoAboutAdvanceInsideHomeCourse'), get_lang('DisplayAboutLastDoneAdvance'), 1); |
|
| 417 | +$group[] = $form->createElement('radio', 'display_info_advance_inside_homecourse', null, get_lang('DisplayAboutNextAdvanceNotDone'), 2); |
|
| 418 | +$group[] = $form->createElement('radio', 'display_info_advance_inside_homecourse', null, get_lang('DisplayAboutNextAdvanceNotDoneAndLastDoneAdvance'), 3); |
|
| 419 | +$group[] = $form->createElement('radio', 'display_info_advance_inside_homecourse', null, get_lang('DoNotDisplayAnyAdvance'), 0); |
|
| 420 | 420 | $form->addGroup($group, '', array(get_lang("InfoAboutAdvanceInsideHomeCourse")), ''); |
| 421 | 421 | $form->addButtonSave(get_lang('SaveSettings'), 'submit_save'); |
| 422 | 422 | $form->addElement('html', '</div></div>'); |
| 423 | 423 | |
| 424 | 424 | // Document settings |
| 425 | -$form->addElement('html', '<div><h3>'.Display::return_icon('folder.png', Security::remove_XSS(get_lang('Documents')),'',ICON_SIZE_SMALL).' '.Security::remove_XSS(get_lang('Documents')).'</h3><div>'); |
|
| 425 | +$form->addElement('html', '<div><h3>'.Display::return_icon('folder.png', Security::remove_XSS(get_lang('Documents')), '', ICON_SIZE_SMALL).' '.Security::remove_XSS(get_lang('Documents')).'</h3><div>'); |
|
| 426 | 426 | |
| 427 | 427 | $group = array( |
| 428 | 428 | $form->createElement('radio', 'show_system_folders', null, get_lang('Yes'), 1), |
@@ -434,11 +434,11 @@ discard block |
||
| 434 | 434 | $form->addElement('html', '</div></div>'); |
| 435 | 435 | |
| 436 | 436 | // Certificate settings |
| 437 | -if (api_get_setting('allow_public_certificates')=='true') { |
|
| 438 | - $form->addElement('html', '<div><h3>'.Display::return_icon('certificate.png', Security::remove_XSS(get_lang('Certificates')),'',ICON_SIZE_SMALL).' '.Security::remove_XSS(get_lang('Certificates')).'</h3><div>'); |
|
| 437 | +if (api_get_setting('allow_public_certificates') == 'true') { |
|
| 438 | + $form->addElement('html', '<div><h3>'.Display::return_icon('certificate.png', Security::remove_XSS(get_lang('Certificates')), '', ICON_SIZE_SMALL).' '.Security::remove_XSS(get_lang('Certificates')).'</h3><div>'); |
|
| 439 | 439 | $group = array(); |
| 440 | - $group[]=$form->createElement('radio', 'allow_public_certificates', get_lang('AllowPublicCertificates'), get_lang('Yes'), 1); |
|
| 441 | - $group[]=$form->createElement('radio', 'allow_public_certificates', null, get_lang('No'), 0); |
|
| 440 | + $group[] = $form->createElement('radio', 'allow_public_certificates', get_lang('AllowPublicCertificates'), get_lang('Yes'), 1); |
|
| 441 | + $group[] = $form->createElement('radio', 'allow_public_certificates', null, get_lang('No'), 0); |
|
| 442 | 442 | $form->addGroup($group, '', array(get_lang("AllowPublicCertificates")), ''); |
| 443 | 443 | $form->addButtonSave(get_lang('SaveSettings'), 'submit_save'); |
| 444 | 444 | $form->addElement('html', '</div></div>'); |
@@ -10,11 +10,11 @@ discard block |
||
| 10 | 10 | $this_section = SECTION_COURSES; |
| 11 | 11 | |
| 12 | 12 | if (isset($_GET['session']) && $_GET['session']) { |
| 13 | - $archive_path = api_get_path(SYS_ARCHIVE_PATH).'temp/'; |
|
| 14 | - $_cid = true; |
|
| 15 | - $is_courseAdmin = true; |
|
| 13 | + $archive_path = api_get_path(SYS_ARCHIVE_PATH).'temp/'; |
|
| 14 | + $_cid = true; |
|
| 15 | + $is_courseAdmin = true; |
|
| 16 | 16 | } else { |
| 17 | - $archive_path = api_get_path(SYS_ARCHIVE_PATH); |
|
| 17 | + $archive_path = api_get_path(SYS_ARCHIVE_PATH); |
|
| 18 | 18 | } |
| 19 | 19 | |
| 20 | 20 | $archive_file = isset($_GET['archive']) ? $_GET['archive'] : null; |
@@ -23,20 +23,20 @@ discard block |
||
| 23 | 23 | list($extension) = getextension($archive_file); |
| 24 | 24 | |
| 25 | 25 | if (empty($extension) || !file_exists($archive_path.$archive_file)) { |
| 26 | - exit; |
|
| 26 | + exit; |
|
| 27 | 27 | } |
| 28 | 28 | |
| 29 | 29 | $extension = strtolower($extension); |
| 30 | 30 | $content_type = ''; |
| 31 | 31 | |
| 32 | 32 | if (in_array($extension, array('xml', 'csv')) && (api_is_platform_admin(true) || api_is_drh())) { |
| 33 | - $content_type = 'application/force-download'; |
|
| 33 | + $content_type = 'application/force-download'; |
|
| 34 | 34 | } elseif ($extension == 'zip' && $_cid && (api_is_platform_admin(true) || $is_courseAdmin)) { |
| 35 | - $content_type = 'application/force-download'; |
|
| 35 | + $content_type = 'application/force-download'; |
|
| 36 | 36 | } |
| 37 | 37 | |
| 38 | 38 | if (empty($content_type)) { |
| 39 | - api_not_allowed(true); |
|
| 39 | + api_not_allowed(true); |
|
| 40 | 40 | } |
| 41 | 41 | |
| 42 | 42 | if (Security::check_abs_path($archive_path.$archive_file, $archive_path)) { |
@@ -6,7 +6,7 @@ discard block |
||
| 6 | 6 | */ |
| 7 | 7 | |
| 8 | 8 | require_once '../inc/global.inc.php'; |
| 9 | -$current_course_tool = TOOL_COURSE_MAINTENANCE; |
|
| 9 | +$current_course_tool = TOOL_COURSE_MAINTENANCE; |
|
| 10 | 10 | $this_section = SECTION_COURSES; |
| 11 | 11 | |
| 12 | 12 | $nameTools = get_lang('Maintenance'); |
@@ -40,7 +40,7 @@ discard block |
||
| 40 | 40 | <div class="sectioncomment"><?php echo get_lang('DescriptionRecycleCourse'); ?></div> |
| 41 | 41 | |
| 42 | 42 | <div class="sectiontitle"><?php Display::display_icon('delete.gif', get_lang('DelCourse')); ?> <a href="../course_info/delete_course.php?<?php echo api_get_cidreq(); ?>"><?php echo get_lang('DelCourse'); ?></a></div> |
| 43 | -<div class="sectioncomment"><?php echo get_lang('DescriptionDeleteCourse'); ?></div> |
|
| 43 | +<div class="sectioncomment"><?php echo get_lang('DescriptionDeleteCourse'); ?></div> |
|
| 44 | 44 | |
| 45 | 45 | <?php |
| 46 | 46 | // Footer |