Display the action messages */ if (!empty($message)) { Display::display_confirmation_message(get_lang($message)); } if ($allowToQualify) { $currentThread = get_thread_information($_GET['thread']); $threadId = $currentThread['thread_id']; // Show max qualify in my form $maxQualify = showQualify('2', $userIdToQualify, $threadId); $score = isset($_POST['idtextqualify']) ? $_POST['idtextqualify'] : ''; if ($score > $maxQualify) { Display::display_error_message(get_lang('QualificationCanNotBeGreaterThanMaxScore'), false); } if (!empty($score)) { $saveResult = saveThreadScore($currentThread, $userIdToQualify, $threadId, $score, api_get_utc_datetime(), api_get_session_id()); } // show qualifications history $type = isset($_GET['type']) ? $_GET['type'] : ''; $historyList = getThreadScoreHistory($userIdToQualify, $threadId, $type); $counter = count($historyList); // Show current qualify in my form $qualify = current_qualify_of_thread($threadId, api_get_session_id(), $_GET['user']); $result = get_statistical_information($threadId, $_GET['user_id'], api_get_course_int_id()); $url = api_get_path(WEB_CODE_PATH) . 'forum/forumqualify.php?' . api_get_cidreq() . '&forum=' . intval($_GET['forum']) . '&thread=' . $threadId . '&user='******'user']) . '&user_id=' . intval($_GET['user']); $userToQualifyInfo = api_get_user_info($userIdToQualify); $form = new FormValidator('forum-thread-qualify', 'post', $url); $form->addHeader($userToQualifyInfo['complete_name']); $form->addLabel(get_lang('Thread'), $currentThread['thread_title']); $form->addLabel(get_lang('CourseUsers'), $result['user_course']); $form->addLabel(get_lang('PostsNumber'), $result['post']);
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 if (isset($whatsnew_post_info)) { unset($whatsnew_post_info[$currentForum['forum_id']][$current_thread['thread_id']][$row['post_id']]); unset($whatsnew_post_info[$currentForum['forum_id']][$current_thread['thread_id']]); } if (isset($_SESSION['whatsnew_post_info'])) { unset($_SESSION['whatsnew_post_info'][$currentForum['forum_id']][$current_thread['thread_id']][$row['post_id']]); unset($_SESSION['whatsnew_post_info'][$currentForum['forum_id']][$current_thread['thread_id']]); } echo "</table></div>"; $counter++; } } //return Max qualify thread $max_qualify = showQualify('2', $userid, $threadid); $current_qualify_thread = showQualify('1', $userid, $threadid); if (isset($_POST['idtextqualify'])) { saveThreadScore($current_thread, $userid, $threadid, $_POST['idtextqualify'], api_get_user_id(), date('Y-m-d H:i:s'), ''); } $result = get_statistical_information($current_thread['thread_id'], $_GET['user_id'], api_get_course_int_id()); /* if ($userInfo['status']!='1') { echo '<div class="forum-qualification-input-box">'; require_once 'forumbody.inc.php'; echo '</div>'; } */