diff --git a/main/forum/viewpost.inc.php b/main/forum/viewpost.inc.php index 891ad41de9..6b07116776 100644 --- a/main/forum/viewpost.inc.php +++ b/main/forum/viewpost.inc.php @@ -24,7 +24,7 @@ if (isset($rows)) { if ($counter == 1) { echo Display::page_subheader($name); } - + echo "
| ";
-
+
if ($row['user_id']=='0') {
$name = prepare4display($row['poster_name']);
} else {
$name = api_get_person_name($row['firstname'], $row['lastname']);
}
$username = sprintf(get_lang('LoginX'), $row['username']);
-
+
if ($origin!='learnpath') {
if (api_get_course_setting('allow_user_image_forum')) {
echo ' '.display_user_image($row['user_id'],$name).' '; @@ -52,7 +52,7 @@ if (isset($current_thread['thread_id'])){ } $group_id = api_get_group_id(); - + echo api_convert_and_format_date($row['post_date']).' '; // get attach id $attachment_list=get_attachment($row['post_id']); @@ -84,19 +84,19 @@ if (isset($current_thread['thread_id'])){ $user_status = api_get_status_of_user_in_course($row['user_id'], api_get_course_id()); $current_qualify_thread = show_qualify('1', $row['poster_id'],$_GET['thread']); - + if (api_is_allowed_to_edit(null,true) && $origin != 'learnpath') { $my_forum_id = $clean_forum_id; - if (isset($_GET['gradebook'])) { + if (isset($_GET['gradebook'])) { $info_thread = get_thread_information($clean_thread_id); $my_forum_id = $info_thread['forum_id']; - } - if ($increment > 0 && $locked == false) { + } + if ($increment > 0 && $locked == false) { echo "". Display::return_icon('quiz.gif',get_lang('Qualify'))." "; - } + } } - + if (($current_forum_category && $current_forum_category['locked']==0) AND $current_forum['locked']==0 AND $current_thread['locked']==0 OR api_is_allowed_to_edit(false,true)) { if ($_user['user_id'] OR ($current_forum['allow_anonymous']==1 AND !$_user['user_id'])) { if (!api_is_anonymous() && api_is_allowed_to_session_edit(false,true)) { @@ -128,38 +128,40 @@ if (isset($current_thread['thread_id'])){ // The post title echo " | |
| '; + echo ' | |
| ';
$realname=$attachment_list['path'];
$user_filename=$attachment_list['filename'];
echo Display::return_icon('attachment.gif',get_lang('Attachment'));
- echo ' '.$user_filename.' ';
- echo ''.$attachment_list['comment'].'';
+ echo ' '.$user_filename.' ';
+
if (($current_forum['allow_edit']==1 AND $row['user_id']==$_user['user_id']) or (api_is_allowed_to_edit(false,true) && !(api_is_course_coach() && $current_forum['session_id']!=$_SESSION['id_session']))) {
- echo ' '.Display::return_icon('delete.png',get_lang('Delete'), array(), ICON_SIZE_SMALL).' '; + echo ' '.Display::return_icon('delete.png',get_lang('Delete'), array(), ICON_SIZE_SMALL).' '; } + echo ''.$attachment_list['comment'].''; echo ' | |