?> <a href="<?php echo claro_htmlspecialchars(Url::Contextualize('../user/userInfo.php?uInfo=' . $thisGroupMember['id'], $this->urlContext)); ?> " class="item"> <?php echo claro_htmlspecialchars($thisGroupMember['lastName'] . ' ' . $thisGroupMember['firstName']); ?> </a> <?php if (current_user_is_allowed_to_send_message_to_user($thisGroupMember['id'])) { ?> - <a href="<?php echo claro_htmlspecialchars(Url::Contextualize('../messaging/sendmessage.php?cmd=rqMessageToUser&userId=' . (int) $thisGroupMember['id'])); ?> "> <?php echo get_lang('Send a message'); ?> </a> <?php } ?>
/** * diplay a received message * * @param ReceivedMessage $message Message to display * @param string $action list of action autorised on the message * @return string HTML source */ private static function displayReceivedMessage($message, $action) { $content = '<div id="im_message">' . "\n" . '<h4 class="header">' . claro_htmlspecialchars($message->getSubject()) . '</h4>' . "\n" . '<div class="imInfoBlock">' . "\n" . '<div class="imCmdList">' . $action . '</div>' . "\n\n" . '<div class="imInfo">' . "\n" . ' <span class="imInfoTitle">' . get_lang('Sender') . ' : </span>' . "\n" . ' <span class="imInfoValue">'; $isAllowed = current_user_is_allowed_to_send_message_to_user($message->getSender()); if ($isAllowed) { $content .= '<a href="sendmessage.php?cmd=rqMessageToUser&userId=' . $message->getSender() . '">'; } $content .= get_lang('%firstName %lastName', array('%firstName' => claro_htmlspecialchars($message->getSenderFirstName()), '%lastName' => claro_htmlspecialchars($message->getSenderLastName()))); if ($isAllowed) { $content .= "</a>"; } $isManager = FALSE; $isAdmin = claro_is_user_platform_admin($message->getSender()); if (!is_null($message->getCourseCode())) { $isManager = claro_is_user_course_manager($message->getSender(), $message->getCourseCode()); } if ($isManager) { $content .= ' <img src="' . get_icon_url('manager') . '" alt="" />'; } elseif ($isAdmin) { $content .= ' <img src="' . get_icon_url('platformadmin') . '" alt="" />'; } else { $content .= ' <img src="' . get_icon_url('user') . '" alt="" />'; } $content .= '' . ' </span>' . "\n" . '</div>' . "\n\n" . '<div class="imInfo">' . "\n" . '<span class="imInfoTitle">' . get_lang('Date') . ' : </span>' . "\n" . '<span class="imInfoValue">' . claro_html_localised_date(get_locale('dateTimeFormatLong'), strtotime($message->getSendTime())) . '</span>' . "\n" . '</div>' . "\n\n"; if (!is_null($message->getCourseCode())) { $content .= '<div class="imInfo">' . "\n" . ' <span class="imInfoTitle">' . get_lang('Course') . '</span>' . "\n" . ' <span class="imInfoValue">' . "\n"; $courseData = claro_get_course_data($message->getCourseCode()); if ($courseData) { $content .= claro_htmlspecialchars($courseData['officialCode']) . ' - ' . claro_htmlspecialchars($courseData['name']); } else { $content .= '?'; } $content .= ' </span>' . "\n" . '</div>' . "\n\n"; if (!is_null($message->getGroupId())) { $content .= '<div class="imInfo">' . "\n" . ' <span class="imInfoTitle">' . get_lang('Group') . ' : </span>' . "\n" . ' <span class="imInfoValue">' . "\n"; $groupData = claro_get_group_data(array(CLARO_CONTEXT_COURSE => $message->getCourseCode(), CLARO_CONTEXT_GROUP => $message->getGroupId())); if ($groupData) { $content .= $groupData['name']; } else { $content .= '?'; } $content .= ' </span>' . "\n" . '</div>' . "\n\n"; } if (!is_null($message->getToolsLabel())) { $content .= '<div class="imInfo">' . "\n" . ' <span class="imInfoTitle">' . get_lang('Tool') . ' : </span>' . "\n" . ' <span class="imInfoValue">' . "\n"; $md = get_module_data($message->getToolsLabel()); if ($md) { $content .= get_lang($md['moduleName']); } else { $content .= '?'; } $content .= ' </span>' . "\n" . '</div>' . "\n\n"; } } $body = $message->getMessage(); $body = claro_html_sanitize_all($body); $content .= '</div>' . "\n" . '<div class="imContent">' . claro_parse_user_text($body) . '</div>' . "\n" . '</div>' . "\n\n"; return $content; }
if ($mainUserInfo) { $mainUserInfo['role'] = !empty($mainUserInfo['role']) ? $mainUserInfo['role'] : ' - '; $mainUserInfo['tutor'] = $mainUserInfo['isTutor'] == 1 ? get_lang('Group Tutor') : ' - '; $mainUserInfo['isCourseManager'] = $mainUserInfo['isCourseManager'] == 1 ? get_lang('Course manager') : ' - '; $out .= '<table class="claroTable" width="80%" border="0">' . "\n" . '<thead>' . "\n" . '<tr class="headerX">' . "\n" . '<th align="left">' . get_lang('Name') . '</th>' . "\n" . '<th align="left">' . get_lang('Profile') . '</th>' . "\n" . '<th aling="left">' . get_lang('Skype account') . '</th>' . "\n" . '<th align="left">' . get_lang('Role') . '</th>' . "\n" . '<th>' . get_lang('Group Tutor') . '</th>' . "\n" . '<th>' . get_lang('Course manager') . '</th>' . "\n" . ($allowedToEditDef ? '<th>' . get_lang('Edit') . '</th>' . "\n" : '') . ($is_allowedToTrack ? "<th>" . get_lang('Tracking') . '</th>' . "\n" : '') . '</tr>' . "\n" . '</thead>' . "\n" . '<tbody>' . "\n" . '<tr align="center">' . "\n" . '<td align="left"><b>' . htmlize($mainUserInfo['firstName']) . ' ' . htmlize($mainUserInfo['lastName']) . '</b></td>' . "\n" . '<td align="left">' . htmlize(claro_get_profile_name($mainUserInfo['profileId'])) . '</td>' . "\n" . '<td align="center">' . $skypeStatus . '</td>' . "\n" . '<td>' . htmlize($mainUserInfo['role']) . '</td>' . "\n" . '<td>' . $mainUserInfo['tutor'] . '</td>' . '<td>' . $mainUserInfo['isCourseManager'] . '</td>'; if ($allowedToEditDef) { $out .= '<td>' . '<a href="' . claro_htmlspecialchars(Url::Contextualize($_SERVER['PHP_SELF'] . '?editMainUserInfo=' . $userIdViewed)) . '">' . '<img alt="' . get_lang('Edit') . '" src="' . get_icon_url('edit') . '" />' . '</a>' . '</td>' . "\n"; } if ($is_allowedToTrack) { $out .= '<td>' . '<a href="' . claro_htmlspecialchars(Url::Contextualize(get_path('clarolineRepositoryWeb') . 'tracking/userReport.php' . '?userId=' . $userIdViewed)) . '">' . '<img alt="' . get_lang('Tracking') . '" src="' . get_icon_url('statistics') . '" />' . '</a>' . '</td>' . "\n"; } $out .= '</tr>' . "\n" . '</tbody>' . "\n" . '</table>' . "\n\n"; if (claro_is_user_authenticated() || !get_conf('user_email_hidden_to_anonymous')) { $out .= '<p><a href="mailto:' . claro_htmlspecialchars($mainUserInfo['email']) . '">' . $mainUserInfo['email'] . '</a></p>'; } if (current_user_is_allowed_to_send_message_to_user($userIdViewed)) { $out .= '<p><a href="' . claro_htmlspecialchars(Url::Contextualize(get_path('clarolineRepositoryWeb') . '/messaging/sendmessage.php?cmd=rqMessageToUser&userId=' . $userIdViewed)) . '">' . get_lang('Send a message') . '</a></p>'; } $out .= '<hr noshade="noshade" size="1" />' . "\n"; } if ($allowedToEditDef) { $out .= "\n\n" . '<div align="right">' . "\n" . '<form method="post" action="' . claro_htmlspecialchars($_SERVER['PHP_SELF'] . '?uInfo=' . $userIdViewed) . '">' . "\n" . claro_form_relay_context() . get_lang('Course administrator only') . ' : ' . '<input type="submit" name="viewDefList" value="' . get_lang('Define Headings') . '" />' . "\n" . '</form>' . "\n" . '<hr noshade="noshade" size="1" />' . "\n" . '</div>'; } $catList = claro_user_info_get_course_user_info($userIdViewed); if ($catList) { foreach ($catList as $thisCat) { // Category title $out .= '<p>' . "\n" . '<b>' . $thisCat['title'] . '</b>' . "\n" . '</p>' . "\n" . '<blockquote>' . "\n"; // Category content if ($thisCat['content']) { $out .= htmlize($thisCat['content']) . "\n";
if ($message->isDeleted()) { header('Location:./messagebox.php?box=trashbox'); } else { header('Location:./messagebox.php?box=inbox'); } } } // ------------ Prepare display -------------------- $content = ""; if ($displayConfirmation) { $dialogBox->question(get_lang('Are you sure to delete') . '<br/><br/>' . "\n" . '<a href="' . $_SERVER['PHP_SELF'] . '?cmd=exDelete&messageId=' . $messageId . '&type=' . $type . '&userId=' . $userId . '">' . get_lang('Yes') . '</a>' . ' | ' . '<a href="' . $_SERVER['PHP_SELF'] . '?messageId=' . $messageId . '&type=' . $type . '&userId=' . $userId . '">' . get_lang('No') . '</a>' . "\n"); } $content .= $dialogBox->render(); $action = array(); if ($type == "received") { if (current_user_is_allowed_to_send_message_to_user($message->getSender())) { $action[] = '<a href="sendmessage.php?cmd=rqMessageToUser&messageId=' . $message->getId() . '&userId=' . $message->getSender() . '">' . '<img src="' . get_icon_url('replymessage') . '" alt="" />' . get_lang('Reply') . '</a>'; } if ($message->getRecipient() > 0 || claro_is_platform_admin()) { if ($message->isDeleted()) { if ($message->getRecipient() == $userId || claro_is_platform_admin()) { $action[] = ' <a href="' . $_SERVER['PHP_SELF'] . '?cmd=exRestore&messageId=' . $messageId . '&type=' . $type . '&userId=' . $userId . '">' . get_lang('Restore') . '</a>'; } } else { $javascriptDelete = ' <script type="text/javascript"> function deleteMessage ( localPath ) { if (confirm("' . get_lang('Are you sure to delete') . '")) { window.location=localPath;
<?php $tutor = $myGroup->getTutor(); ?> <a href="<?php echo claro_htmlspecialchars(Url::Contextualize(get_module_url('CLUSR') . '/userInfo.php?uInfo=' . $tutor->userId)); ?> "> <?php echo get_lang('%firstName %lastName', array('%firstName' => $tutor->firstName, '%lastName' => $tutor->lastName)); ?> </a> <?php if (current_user_is_allowed_to_send_message_to_user($tutor->id)) { ?> - <a href="<?php echo claro_htmlspecialchars(Url::Contextualize('../messaging/sendmessage.php?cmd=rqMessageToUser&userId=' . (int) $tutor->id)); ?> "> <?php echo get_lang('Send a message'); ?> </a> <?php } // allowed to send message