if (Database::num_rows($student_list) > 0) { while ($row_student_list = Database::fetch_array($student_list)) { if ($counter_stdlist % 2 == 0) { $class_stdlist = 'row_odd'; } else { $class_stdlist = 'row_even'; } $name_user_theme = api_get_person_name($row_student_list['firstname'], $row_student_list['lastname']); $table_list .= '<tr class="' . $class_stdlist . '"><td> <a href="' . api_get_path(WEB_CODE_PATH) . 'user/userInfo.php?uInfo=' . $row_student_list['user_id'] . '&tipo=sdtlist&' . api_get_cidreq() . '&forum=' . Security::remove_XSS($my_forum) . $origin_string . '"> ' . $name_user_theme . '</a></td>'; if ($_GET['list'] == 'qualify') { $table_list .= '<td>' . $row_student_list['qualify'] . '/' . $max_qualify . '</td>'; } if (api_is_allowed_to_edit(null, true)) { $current_qualify_thread = show_qualify('1', $row_student_list['user_id'], $_GET['id']); $table_list .= '<td><a href="' . $forumUrl . 'forumqualify.php?' . api_get_cidreq() . '&forum=' . Security::remove_XSS($my_forum) . '&thread=' . Security::remove_XSS($_GET['id']) . '&user='******'user_id'] . '&user_id=' . $row_student_list['user_id'] . '&idtextqualify=' . $current_qualify_thread . '&origin=' . $origin . '">' . Display::return_icon($icon_qualify, get_lang('Qualify')) . '</a></td></tr>'; } $counter_stdlist++; } } else { if ($_GET['list'] == 'qualify') { $table_list .= '<tr><td colspan="2">' . get_lang('ThereIsNotQualifiedLearners') . '</td></tr>'; } else { $table_list .= '<tr><td colspan="2">' . get_lang('ThereIsNotUnqualifiedLearners') . '</td></tr>'; } } $table_list .= '</table></center>'; $table_list .= '<br />'; } else { $table_list .= Display::return_message(get_lang('NoParticipation'), 'warning');
echo ' "> ' . $user_filename . ' </a>'; echo '<span class="forum_attach_comment" >' . $attachment['comment'] . '</span><br />'; echo '</td></tr>'; } } // The post has been displayed => it can be removed from the what's new array unset($whatsnew_post_info[$current_forum['forum_id']][$current_thread['thread_id']][$row['post_id']]); unset($whatsnew_post_info[$current_forum['forum_id']][$current_thread['thread_id']]); unset($_SESSION['whatsnew_post_info'][$current_forum['forum_id']][$current_thread['thread_id']][$row['post_id']]); unset($_SESSION['whatsnew_post_info'][$current_forum['forum_id']][$current_thread['thread_id']]); echo "</table></div>"; $counter++; } } $userid = (int) $_GET['user_id']; $userinf = api_get_user_info($userid); $current_thread = get_thread_information($_GET['thread']); $threadid = $current_thread['thread_id']; $qualify = (int) $_POST['idtextqualify']; //return Max qualify thread $max_qualify = show_qualify('2', $userid, $threadid); $current_qualify_thread = show_qualify('1', $userid, $threadid); if (isset($_POST['idtextqualify'])) { store_theme_qualify($userid, $threadid, $qualify, $_SESSION['_user']['user_id'], date('Y-m-d H:i:s'), ''); } $result = get_statistical_information($current_thread['thread_id'], $_GET['user_id'], $_GET['cidReq']); if ($userinf['status'] != '1') { echo '<div class="forum-qualification-input-box">'; require_once 'forumbody.inc.php'; echo '</div>'; }
if ($origin != 'learnpath') { if (GroupManager::is_tutor_of_group(api_get_user_id(), $group_id) or api_is_allowed_to_edit(false, true) && !(api_is_course_coach() && $current_forum['session_id'] != $_SESSION['id_session'])) { if ($locked == false) { echo "<a href=\"" . api_get_self() . "?" . api_get_cidreq() . "&forum=" . $clean_forum_id . "&thread=" . $clean_thread_id . "&action=delete&content=post&id=" . $row['post_id'] . "&origin=" . $origin . "\" onclick=\"javascript:if(!confirm('" . addslashes(api_htmlentities(get_lang('DeletePost'), ENT_QUOTES)) . "')) return false;\">" . Display::return_icon('delete.png', get_lang('Delete'), array(), ICON_SIZE_SMALL) . "</a>"; } } if (api_is_allowed_to_edit(false, true) && !(api_is_course_coach() && $current_forum['session_id'] != $_SESSION['id_session'])) { display_visible_invisible_icon('post', $row['post_id'], $row['visible'], array('forum' => $clean_forum_id, 'thread' => $clean_thread_id, 'origin' => $origin)); echo ""; if ($increment > 0) { echo "<a href=\"viewthread.php?" . api_get_cidreq() . "&forum=" . $clean_forum_id . "&thread=" . $clean_thread_id . "&action=move&post=" . $row['post_id'] . "&origin=" . $origin . "\">" . Display::return_icon('move.png', get_lang('MovePost'), array(), ICON_SIZE_SMALL) . "</a>"; } } } $user_status = api_get_status_of_user_in_course($row['user_id'], api_get_course_int_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'])) { $info_thread = get_thread_information($clean_thread_id); $my_forum_id = $info_thread['forum_id']; } if ($increment > 0 && $locked == false) { echo "<a href=\"forumqualify.php?" . api_get_cidreq() . "&forum=" . $my_forum_id . "&thread=" . $clean_thread_id . "&action=list&post=" . $row['post_id'] . "&user="******"&user_id=" . $row['poster_id'] . "&origin=" . $origin . "&idtextqualify=" . $current_qualify_thread . "&gradebook=" . Security::remove_XSS($_GET['gradebook']) . "\" >" . Display::return_icon('quiz.gif', get_lang('Qualify')) . "</a> "; } } 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)) { echo '<a href="reply.php?' . api_get_cidreq() . '&forum=' . $clean_forum_id . '&thread=' . $clean_thread_id . '&post=' . $row['post_id'] . '&action=replymessage&origin=' . $origin . '">' . Display::return_icon('message_reply_forum.png', get_lang('ReplyToMessage')) . "</a>"; echo '<a href="reply.php?' . api_get_cidreq() . '&forum=' . $clean_forum_id . '&thread=' . $clean_thread_id . '&post=' . $row['post_id'] . '&action=quote&origin=' . $origin . '">' . Display::return_icon('quote.gif', get_lang('QuoteMessage')) . "</a>";
if ($locked == false) { echo "<a href=\"" . api_get_self() . "?" . api_get_cidreq() . "&gidReq=" . Security::remove_XSS($_GET['gidReq']) . "&forum=" . $clean_forum_id . "&thread=" . $clean_thread_id . "&action=delete&content=post&id=" . $post['post_id'] . "\" onclick=\"javascript:if(!confirm('" . addslashes(api_htmlentities(get_lang('DeletePost'), ENT_QUOTES)) . "')) return false;\">" . Display::return_icon('delete.png', get_lang('Delete'), array(), ICON_SIZE_SMALL) . "</a>"; } } if (api_is_allowed_to_edit(false, true) && !(api_is_course_coach() && $current_forum['session_id'] != $_SESSION['id_session'])) { display_visible_invisible_icon('post', $post['post_id'], $post['visible'], array('forum' => $clean_forum_id, 'thread' => $clean_thread_id)); if ($count > 0) { echo "<a href=\"viewthread.php?" . api_get_cidreq() . "&gidReq=" . Security::remove_XSS($_GET['gidReq']) . "&forum=" . $clean_forum_id . "&thread=" . $clean_thread_id . "&action=move&origin=" . $origin . "&post=" . $post['post_id'] . "\">" . Display::return_icon('move.png', get_lang('MovePost'), array(), ICON_SIZE_SMALL) . "</a>"; } } $userinf = api_get_user_info($post['user_id']); $user_status = api_get_status_of_user_in_course($post['user_id'], api_get_course_id()); if (api_is_allowed_to_edit(null, true)) { //if ($count>0 && $user_status!=1) { if ($count > 0) { $current_qualify_thread = show_qualify('1', $post['user_id'], $_GET['thread']); if ($locked == false) { echo "<a href=\"forumqualify.php?" . api_get_cidreq() . "&forum=" . $clean_forum_id . "&thread=" . $clean_thread_id . "&action=list&post=" . $post['post_id'] . "&user="******"&user_id=" . $post['user_id'] . "&origin=" . $origin . "&idtextqualify=" . $current_qualify_thread . "\" >" . Display::return_icon('new_test_small.gif', get_lang('Qualify')) . "</a>"; } } } 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)) { echo '<a href="reply.php?' . api_get_cidreq() . '&forum=' . $clean_forum_id . '&thread=' . $clean_thread_id . '&post=' . $post['post_id'] . '&action=replymessage&origin=' . $origin . '">' . Display::return_icon('message_reply_forum.png', get_lang('ReplyToMessage')) . "</a>"; echo '<a href="reply.php?' . api_get_cidreq() . '&forum=' . $clean_forum_id . '&thread=' . $clean_thread_id . '&post=' . $post['post_id'] . '&action=quote&origin=' . $origin . '">' . Display::return_icon('quote.gif', get_lang('QuoteMessage')) . "</a>"; } } } else { if ($current_forum_category && $current_forum_category['locked'] == 1) { echo get_lang('ForumcategoryLocked') . '<br />';
} sort($id_posts, SORT_NUMERIC); reset($id_posts); // The post minor $post_minor = (int) $id_posts[0]; $post_id = isset($_GET['post']) ? (int) $_GET['post'] : 0; if (!isset($_GET['id']) && $post_id > $post_minor) { echo "<a href=\"viewthread.php?" . api_get_cidreq() . "&gidReq=" . Security::remove_XSS($_GET['gidReq']) . "&forum=" . $forumId . "&thread=" . $threadId . "&origin=" . $origin . "&action=move&post=" . $rows[$display_post_id]['post_id'] . "\">" . Display::return_icon('move.png', get_lang('MovePost'), array(), ICON_SIZE_SMALL) . "</a>"; } } } $userinf = api_get_user_info($rows[$display_post_id]['user_id']); $user_status = api_get_status_of_user_in_course($rows[$display_post_id]['user_id'], api_get_course_id()); if (api_is_allowed_to_edit(null, true)) { if ($post_id > $post_minor) { $current_qualify_thread = show_qualify('1', $rows[$display_post_id]['user_id'], $_GET['thread']); if ($locked == false) { echo "<a href=\"forumqualify.php?" . api_get_cidreq() . "&forum=" . $forumId . "&thread=" . $threadId . "&action=list&post=" . $rows[$display_post_id]['post_id'] . "&user="******"&user_id=" . $rows[$display_post_id]['user_id'] . "&origin=" . $origin . "&idtextqualify=" . $current_qualify_thread . "\" >" . Display::return_icon('new_test_small.gif', get_lang('Qualify')) . "</a>"; } } } 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)) { echo '<a href="reply.php?' . api_get_cidreq() . '&forum=' . $forumId . '&thread=' . $threadId . '&post=' . $rows[$display_post_id]['post_id'] . '&action=replymessage&origin=' . $origin . '">' . Display::return_icon('message_reply_forum.png', get_lang('ReplyToMessage')) . "</a>"; echo '<a href="reply.php?' . api_get_cidreq() . '&forum=' . $forumId . '&thread=' . $threadId . '&post=' . $rows[$display_post_id]['post_id'] . '&action=quote&origin=' . $origin . '">' . Display::return_icon('quote.gif', get_lang('QuoteMessage')) . "</a>"; } } } else { if ($current_forum_category && $current_forum_category['locked'] == 1) { echo get_lang('ForumcategoryLocked') . '<br />';