|
|
|
|
@ -33,6 +33,9 @@ if (isset($current_thread['thread_id'])) { |
|
|
|
|
$closedPost = null; |
|
|
|
|
|
|
|
|
|
if (!empty($rows)) { |
|
|
|
|
|
|
|
|
|
if ($origin != 'learnpath') { |
|
|
|
|
/* start foreach forum normal */ |
|
|
|
|
foreach ($rows as $row) { |
|
|
|
|
if ($row['user_id'] == '0') { |
|
|
|
|
$name = prepare4display($row['poster_name']); |
|
|
|
|
@ -292,7 +295,8 @@ if (isset($current_thread['thread_id'])) { |
|
|
|
|
$html .= '<a href="download.php?file=' . $realname . '"> ' . $user_filename . ' </a>'; |
|
|
|
|
|
|
|
|
|
if (($current_forum['allow_edit'] == 1 && $row['user_id'] == $_user['user_id']) || |
|
|
|
|
(api_is_allowed_to_edit(false, true) && !(api_is_course_coach() && $current_forum['session_id'] != $sessionId)) |
|
|
|
|
(api_is_allowed_to_edit(false, |
|
|
|
|
true) && !(api_is_course_coach() && $current_forum['session_id'] != $sessionId)) |
|
|
|
|
) { |
|
|
|
|
$html .= ' <a href="' . api_get_self() . '?' . api_get_cidreq() . '&origin=' |
|
|
|
|
. Security::remove_XSS($_GET['origin']) . '&action=delete_attach&id_attach=' |
|
|
|
|
@ -326,4 +330,33 @@ if (isset($current_thread['thread_id'])) { |
|
|
|
|
echo $html; |
|
|
|
|
} |
|
|
|
|
} |
|
|
|
|
/* end foreach*/ |
|
|
|
|
if ($origin == 'learnpath') { |
|
|
|
|
/* start foreach type disqus*/ |
|
|
|
|
$html = ''; |
|
|
|
|
$html .= '<div class="forum-disqus">'; |
|
|
|
|
foreach ($rows as $row) { |
|
|
|
|
$name = api_get_person_name($row['firstname'], $row['lastname']); |
|
|
|
|
$username = sprintf(get_lang('LoginX'), $row['username']); |
|
|
|
|
$date = api_get_local_time($row['post_date']); |
|
|
|
|
$html .= '<div class="row">'; |
|
|
|
|
$html .= '<div class="col-xs-1 col-md-2">'; |
|
|
|
|
$html .= '<div class="thumbnail">' . display_user_image($row['user_id'], $name) . '</div>'; |
|
|
|
|
$html .= '</div>'; |
|
|
|
|
$html .= '<div class="col-xs-11 col-md-10">'; |
|
|
|
|
$html .= '<h5>'.$name.'</h5>'; |
|
|
|
|
|
|
|
|
|
$html .= '<div class="time timeago" title="'.$date.'">'.$date.'</div>'; |
|
|
|
|
$html .= '<div class="description-disqus">'.$row['post_text'].'</div>'; |
|
|
|
|
$html .= '</div>'; |
|
|
|
|
|
|
|
|
|
$html .= '</div>'; |
|
|
|
|
|
|
|
|
|
} |
|
|
|
|
$html .= '</div>'; |
|
|
|
|
echo $html; |
|
|
|
|
/* end foreach type disqus */ |
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
} |
|
|
|
|
} |
|
|
|
|
|