/** * Render content */ public function render() { CssLoader::getInstance()->load('profile', 'all'); load_kernel_config('user_profile'); $userData = user_get_properties($this->userId); $pictureUrl = ''; if (get_conf('allow_profile_picture')) { $picturePath = user_get_picture_path($userData); if ($picturePath && file_exists($picturePath)) { $pictureUrl = user_get_picture_url($userData); } else { $pictureUrl = get_icon_url('nopicture'); } } $userFullName = claro_htmlspecialchars(get_lang('%firstName %lastName', array('%firstName' => $userData['firstname'], '%lastName' => $userData['lastname']))); $dock = new ClaroDock('userProfileBox'); $template = new CoreTemplate('user_profilebox.tpl.php'); $template->assign('userId', $this->userId); $template->assign('pictureUrl', $pictureUrl); $template->assign('userFullName', $userFullName); $template->assign('dock', $dock); $template->assign('condensedMode', $this->condensedMode); $template->assign('userData', $userData); return $template->render(); }
public function renderContent() { $personnalCourseList = get_user_course_list(claro_get_current_user_id()); $announcementEventList = announcement_get_items_portlet($personnalCourseList); $output = ''; if ($announcementEventList) { $output .= '<dl id="portletMyAnnouncements">'; foreach ($announcementEventList as $announcementItem) { // Hide hidden and expired elements $isVisible = (bool) ($announcementItem['visibility'] == 'SHOW') ? 1 : 0; $isOffDeadline = (bool) (isset($announcementItem['visibleFrom']) && strtotime($announcementItem['visibleFrom']) > time() || isset($announcementItem['visibleUntil']) && time() >= strtotime($announcementItem['visibleUntil'])) ? 1 : 0; if ($isVisible && !$isOffDeadline) { $output .= '<dt>' . "\n" . '<img class="iconDefinitionList" src="' . get_icon_url('announcement', 'CLANN') . '" alt="" />' . ' <a href="' . $announcementItem['url'] . '">' . $announcementItem['title'] . '</a>' . "\n" . '</dt>' . "\n"; foreach ($announcementItem['eventList'] as $announcementEvent) { // Prepare the render $displayChar = 250; if (strlen($announcementEvent['content']) > $displayChar) { $content = substr($announcementEvent['content'], 0, $displayChar) . '... <a href="' . claro_htmlspecialchars(Url::Contextualize($announcementEvent['url'])) . '">' . '<b>' . get_lang('Read more »') . '</b></a>'; } else { $content = $announcementEvent['content']; } $output .= '<dd>' . '<a href="' . $announcementEvent['url'] . '">' . $announcementItem['courseOfficialCode'] . '</a> : ' . "\n" . (!empty($announcementEvent['title']) ? $announcementEvent['title'] : get_lang('No title')) . "\n" . ' - ' . $content . "\n" . '</dd>' . "\n"; } } } $output .= '</dl>'; } else { $output .= "\n" . '<dl>' . "\n" . '<dt>' . "\n" . '<img class="iconDefinitionList" src="' . get_icon_url('announcement', 'CLANN') . '" alt="" />' . ' ' . get_lang('No announcement to display') . "\n" . '</dt>' . "\n" . '</dl>' . "\n"; } return $output; }
public function renderContent() { global $platformLanguage; $out = ''; // Last user action $lastUserAction = isset($_SESSION['last_action']) && $_SESSION['last_action'] != '1970-01-01 00:00:00' ? $_SESSION['last_action'] : date('Y-m-d H:i:s'); $userCommands = array(); // User commands // 'Create Course Site' command. Only available for teacher. if (claro_is_allowed_to_create_course()) { $userCommands[] = '<a href="' . claro_htmlspecialchars(Url::Contextualize(get_path('clarolineRepositoryWeb') . 'course/create.php')) . '" class="userCommandsItem">' . '<img src="' . get_icon_url('courseadd') . '" alt="" /> ' . get_lang('Create a course site') . '</a>' . "\n"; } elseif ($GLOBALS['currentUser']->isCourseCreator) { $userCommands[] = '<span class="userCommandsItemDisabled">' . '<img src="' . get_icon_url('courseadd') . '" alt="" /> ' . get_lang('Create a course site') . '</span>' . "\n"; } if (get_conf('allowToSelfEnroll', true)) { $userCommands[] = '<a href="' . claro_htmlspecialchars(Url::Contextualize(get_path('clarolineRepositoryWeb') . 'auth/courses.php?cmd=rqReg&categoryId=0')) . '" class="userCommandsItem">' . '<img src="' . get_icon_url('enroll') . '" alt="" /> ' . get_lang('Enrol on a new course') . '</a>' . "\n"; $userCommands[] = '<a href="' . claro_htmlspecialchars(Url::Contextualize(get_path('clarolineRepositoryWeb') . 'auth/courses.php?cmd=rqUnreg')) . '" class="userCommandsItem">' . '<img src="' . get_icon_url('unenroll') . '" alt="" /> ' . get_lang('Remove course enrolment') . '</a>' . "\n"; } $userCommands[] = '<a href="' . claro_htmlspecialchars(Url::Contextualize(get_path('clarolineRepositoryWeb') . 'course/platform_courses.php')) . '" class="userCommandsItem">' . '<img src="' . get_icon_url('course') . '" alt="" /> ' . get_lang('All platform courses') . '</a>' . "\n"; $userCommands[] = '<a href="' . claro_htmlspecialchars(Url::Contextualize(get_path('clarolineRepositoryWeb') . 'notification_date.php')) . '" class="userCommandsItem">' . '<img class="iconDefinitionList" src="' . get_icon_url('hot') . '" alt="' . get_lang('New items') . '" />' . ' ' . get_lang('New items') . ' ' . get_lang('to another date') . (substr($lastUserAction, strlen($lastUserAction) - 8) == '00:00:00' ? ' [' . claro_html_localised_date(get_locale('dateFormatNumeric'), strtotime($lastUserAction)) . ']' : '') . '</a>' . "\n"; $userCourseList = render_user_course_list(); $userCourseListDesactivated = render_user_course_list_desactivated(); $out .= '<div class="userCommands">' . '<h2>' . get_lang('Manage my courses') . '</h2>' . claro_html_list($userCommands) . '</div>' . '<div class="userCourseList">' . '<h2>' . get_lang('My course list') . '</h2>' . $userCourseList; if (!empty($userCourseListDesactivated)) { $out .= '<h4>' . get_lang('Deactivated course list') . '</h4>' . $userCourseListDesactivated; } $out .= '</div>'; /*'</td>' . '</tr>' . '</tbody>' . '</table>'*/ $this->content = $out; return $this->content; }
public function renderTitle() { $output = '<img ' . 'src="' . get_icon_url('announcement', 'CLANN') . '" ' . 'alt="Announcement icon" /> ' . get_lang('Latest announcements'); if (claro_is_allowed_to_edit()) { $output .= ' <span class="separator">|</span> <a href="' . claro_htmlspecialchars(Url::Contextualize(get_module_url('CLANN') . '/announcements.php')) . '">' . '<img src="' . get_icon_url('settings') . '" alt="' . get_lang('Settings') . '" /> ' . get_lang('Manage') . '</a>'; } return $output; }
public function renderTitle() { $output = '<img ' . 'src="' . get_icon_url('headline', 'CLTI') . '"' . 'alt="' . get_lang('Headline') . '" /> ' . get_lang('Headlines'); if (claro_is_allowed_to_edit()) { $output .= ' <span class="separator">|</span> <a href="' . claro_htmlspecialchars(Url::Contextualize(get_module_url('CLTI') . '/index.php')) . '">' . '<img src="' . get_icon_url('settings') . '" alt="' . get_lang('Settings') . '" /> ' . get_lang('Manage') . '</a>'; } return $output; }
/** * return the content * * @param coursecode $key * @param array $context * @return string : html content */ public static function get_block($key, $isadmin, $context = null, $right = null) { $out = self::get_content($key, $context, $right); if ($isadmin) { $out .= '<p>' . "\n" . '<a href="' . get_path('rootAdminWeb') . 'managing/editFile.php?cmd=rqEdit&file=textzone_messaging_top.inc.html">' . "\n" . '<img src="' . get_icon_url('edit') . '" alt="" />' . get_lang('Edit text zone') . "\n" . '</a>' . "\n" . '</p>'; } return $out; }
public function render() { $out = ''; if (!claro_is_user_authenticated()) { if (get_conf('claro_displayLocalAuthForm', true) == true) { $out .= $this->renderLoginLink(); } } elseif (!claro_is_platform_admin() && (claro_is_in_a_course() && !claro_is_course_member()) && claro_get_current_course_data('registrationAllowed')) { if (claro_is_current_user_enrolment_pending()) { $out .= '<img src="' . get_icon_url('warning') . '" alt="off" /> ' . '<b>' . get_lang('Enrolment pending') . '</b>'; } else { $out .= $this->renderRegistrationLink(); } } elseif (claro_is_display_mode_available()) { $out .= $this->renderViewModeSwitch(); } return $out; }
public function renderContent() { $output = ''; $output .= '<table class="claroTable emphaseLine" width="99%" border="0" cellspacing="2">' . "\n" . '<thead>' . "\n" . '<tr align="center" valign="top">' . "\n" . '<th> </th>' . "\n" . '<th>' . get_lang('Subject') . '</th>' . "\n" . '<th>' . get_lang('Sender') . '</th>' . "\n" . '<th>' . get_lang('Date') . '</th>' . "\n" . '</tr>' . "\n" . '</thead>' . "\n" . '<tbody>' . "\n"; if ($this->inbox->getNumberOfMessage() > 0) { foreach ($this->inbox as $message) { if ($message->isPlatformMessage()) { $classMessage = 'class="platformMessage"'; $iconMessage = '<img src="' . get_icon_url('important') . '" alt="' . get_lang('Important') . '" />'; } else { $classMessage = $message->isRead() ? 'class="readMessage"' : 'class="unreadMessage"'; $iconMessage = $message->isRead() ? '<img src="' . get_icon_url('mail_open') . '" alt="" />' : '<img src="' . get_icon_url('mail_close') . '" alt="" />'; } $output .= "\n" . '<tr ' . $classMessage . '>' . "\n" . '<td>' . $iconMessage . '</td>' . "\n" . '<td>' . '<a href="' . get_path('clarolineRepositoryWeb') . 'messaging/readmessage.php?messageId=' . $message->getId() . '&type=received">' . claro_htmlspecialchars($message->getSubject()) . '</a>' . "\n" . '</td>' . "\n" . '<td>' . claro_htmlspecialchars($message->getSenderLastName()) . ' ' . claro_htmlspecialchars($message->getSenderFirstName()) . '</td>' . "\n" . '<td align="center">' . claro_html_localised_date(get_locale('dateFormatLong'), strtotime($message->getSendTime())) . '</td>' . "\n" . '</tr>' . "\n"; } } else { $output .= "\n" . '<tr>' . "\n" . '<td colspan="4" align="center">' . get_lang('Empty') . '</td>' . "\n" . '</tr>' . "\n"; } $output .= "\n" . '</tbody>' . "\n" . '</table>' . "\n" . '<a href="' . get_path('clarolineRepositoryWeb') . 'messaging/index.php' . '">' . get_lang('View all my messages') . '</a>'; return $output; }
/** * CLAROLINE * * @version $Revision: 14314 $ * @copyright (c) 2001-2011, Universite catholique de Louvain (UCL) * @license http://www.gnu.org/copyleft/gpl.html (GPL) GENERAL PUBLIC LICENSE * @author Piraux Sebastien <*****@*****.**> * @author Lederer Guillaume <*****@*****.**> * @package CLLNP * @since 1.8 */ function lp_display_exercise($cmd, $TABLELEARNPATHMODULE, $TABLEMODULE, $TABLEASSET, $tbl_quiz_exercise) { $out = ''; if (isset($cmd) && ($cmd = "raw")) { // change raw if value is a number between 0 and 100 if (isset($_POST['newRaw']) && is_num($_POST['newRaw']) && $_POST['newRaw'] <= 100 && $_POST['newRaw'] >= 0) { $sql = "UPDATE `" . $TABLELEARNPATHMODULE . "`\n SET `raw_to_pass` = " . (int) $_POST['newRaw'] . "\n WHERE `module_id` = " . (int) $_SESSION['module_id'] . "\n AND `learnPath_id` = " . (int) $_SESSION['path_id']; claro_sql_query($sql); $dialogBoxContent = get_lang('Minimum raw to pass has been changed'); } } $out .= '<hr noshade="noshade" size="1" />'; //####################################################################################\\ //############################### DIALOG BOX SECTION #################################\\ //####################################################################################\\ if (!empty($dialogBoxContent)) { $dialogBox = new DialogBox(); $dialogBox->success($dialogBoxContent); $out .= $dialogBox->render(); } // form to change raw needed to pass the exercise $sql = "SELECT `lock`, `raw_to_pass`\n FROM `" . $TABLELEARNPATHMODULE . "` AS LPM\n WHERE LPM.`module_id` = " . (int) $_SESSION['module_id'] . "\n AND LPM.`learnPath_id` = " . (int) $_SESSION['path_id']; $learningPath_module = claro_sql_query_get_single_row($sql); // if this module blocks the user if he doesn't complete if (isset($learningPath_module['lock']) && $learningPath_module['lock'] == 'CLOSE' && isset($learningPath_module['raw_to_pass'])) { $out .= '<form method="post" action="' . $_SERVER['PHP_SELF'] . '">' . "\n" . claro_form_relay_context() . '<label for="newRaw">' . get_lang('Change minimum raw mark to pass this module (percentage) :') . ' </label>' . "\n" . '<input type="text" value="' . claro_htmlspecialchars($learningPath_module['raw_to_pass']) . '" name="newRaw" id="newRaw" size="3" maxlength="3" /> % ' . "\n" . '<input type="hidden" name="cmd" value="raw" />' . "\n" . '<input type="submit" value="' . get_lang('Ok') . '" />' . "\n" . '</form>' . "\n\n"; } // display current exercise info and change comment link $sql = "SELECT `E`.`id` AS `exerciseId`, `M`.`name`\n FROM `" . $TABLEMODULE . "` AS `M`,\n `" . $TABLEASSET . "` AS `A`,\n `" . $tbl_quiz_exercise . "` AS `E`\n WHERE `A`.`module_id` = M.`module_id`\n AND `M`.`module_id` = " . (int) $_SESSION['module_id'] . "\n AND `E`.`id` = `A`.`path`"; $module = claro_sql_query_get_single_row($sql); if ($module) { $out .= "\n\n" . '<h4>' . get_lang('Exercise in module') . ' :</h4>' . "\n" . '<p>' . "\n" . claro_htmlspecialchars($module['name']) . '<a href="../exercise/admin/edit_exercise.php?exId=' . $module['exerciseId'] . '">' . '<img src="' . get_icon_url('edit') . '" alt="' . get_lang('Modify') . '" />' . '</a>' . "\n" . '</p>' . "\n"; } // else sql error, do nothing except in debug mode, where claro_sql_query_fetch_all will show the error return $out; }
$cmdList[] = array('name' => get_lang('Full review'), 'url' => claro_htmlspecialchars(Url::Contextualize($viewallUrl))); } } } $out .= $postLister->disp_pager_tool_bar($pagerUrl); try { $display = new ModuleTemplate('CLFRM', 'forum_viewtopic.tpl.php'); $display->assign('forum_id', $forumId); $display->assign('topic_id', $topicId); $display->assign('topic_subject', $topicSettingList['topic_title']); $display->assign('postList', $postList); $display->assign('is_allowedToEdit', $is_allowedToEdit); $display->assign('anonymity', $anonymityStatus); $display->assign('claro_notifier', $claro_notifier); $display->assign('is_post_allowed', $is_postAllowed); $out .= $display->render(); } catch (Exception $ex) { $dialogBox->error($ex); } if ($is_postAllowed) { $replyUrl = Url::Contextualize($_SERVER['PHP_SELF'] . '?topic=' . $topicId . '&cmd=rqPost' . '&mode=reply'); $toolBar[] = claro_html_cmd_link(claro_htmlspecialchars($replyUrl), '<img src="' . get_icon_url('reply') . '" alt="" />' . ' ' . get_lang('Reply')); $out .= '<p>' . claro_html_menu_horizontal($toolBar) . '</p>'; } $out .= $postLister->disp_pager_tool_bar($pagerUrl); } // Page title $out = claro_html_tool_title($nameTools, $is_allowedToEdit ? get_help_page_url('blockForumsHelp', 'CLFRM') : false, $cmdList) . $out; ClaroBreadCrumbs::getInstance()->setCurrent(get_lang('Forums'), 'index.php'); $claroline->display->body->appendContent($out); echo $claroline->display->render();
$addToURL = '&order_crit=' . $_REQUEST['order_crit']; } if (isset($_REQUEST['offset'])) { $addToURL = '&offset=' . $_REQUEST['offset']; } foreach ($userList as $user) { if (isset($_REQUEST['search']) && $_REQUEST['search'] != '') { $user['nom'] = preg_replace("/^(" . $_REQUEST['search'] . ")/i", '<b>\\1</b>', $user['nom']); $user['prenom'] = preg_replace("/^(" . $_REQUEST['search'] . ")/i", "<b>\\1</b>", $user['prenom']); } $out .= '<tr>' . "\n" . '<td align="center">' . $user['ID'] . '</td>' . "\n" . '<td align="left">' . $user['nom'] . '</td>' . '<td align="left">' . $user['prenom'] . '</td>'; if (!is_null($user['isCourseManager']) && $user['isCourseManager'] == 0) { // already enrolled as student $out .= '<td align="center" >' . "\n" . '<small>' . get_lang('Already enroled') . '</small>' . '</td>' . "\n"; } else { // Register as user $out .= '<td align="center">' . "\n" . '<a href="' . $_SERVER['PHP_SELF'] . '?cidToEdit=' . $cidToEdit . '&cmd=sub&search=' . $search . '&user_id=' . $user['ID'] . '&isCourseManager=0' . $addToURL . '">' . '<img src="' . get_icon_url('enroll') . '" alt="' . get_lang('Register user') . '" />' . "\n" . '</a>' . '</td>' . "\n"; } if (!is_null($user['isCourseManager']) && $user['isCourseManager'] == 1) { // already enrolled as teacher $out .= '<td align="center" >' . "\n" . '<small>' . get_lang('Already enroled') . '</small>' . '</td>' . "\n"; } else { //register as teacher $out .= '<td align="center">' . "\n" . '<a href="' . $_SERVER['PHP_SELF'] . '?cidToEdit=' . $cidToEdit . '&cmd=sub&search=' . $search . '&user_id=' . $user['ID'] . '&isCourseManager=1' . $addToURL . '">' . '<img src="' . get_icon_url('enroll') . '" alt="' . get_lang('Register user') . '" />' . '</a>' . "\n" . '</td>' . "\n"; } $out .= '</tr>'; } // end display users table $out .= '</tbody></table>' . $myPager->disp_pager_tool_bar($_SERVER['PHP_SELF'] . '?cidToEdit=' . $cidToEdit . $addToURL); $claroline->display->body->appendContent($out); echo $claroline->display->render();
$template->assign('templateMyCourses', $courseTreeView); // User commands $userCommands = array(); $userCommands[] = '<a href="' . $_SERVER['PHP_SELF'] . '" class="userCommandsItem">' . '<img src="' . get_icon_url('mycourses') . '" alt="" /> ' . get_lang('My course list') . '</a>' . "\n"; // 'Create Course Site' command. Only available for teacher. if (claro_is_allowed_to_create_course()) { $userCommands[] = '<a href="claroline/course/create.php" class="userCommandsItem">' . '<img src="' . get_icon_url('courseadd') . '" alt="" /> ' . get_lang('Create a course site') . '</a>' . "\n"; } elseif ($GLOBALS['currentUser']->isCourseCreator) { $userCommands[] = '<span class="userCommandsItemDisabled">' . '<img src="' . get_icon_url('courseadd') . '" alt="" /> ' . get_lang('Create a course site') . '</span>' . "\n"; } if (get_conf('allowToSelfEnroll', true)) { $userCommands[] = '<a href="claroline/auth/courses.php?cmd=rqReg&categoryId=0" class="userCommandsItem">' . '<img src="' . get_icon_url('enroll') . '" alt="" /> ' . get_lang('Enrol on a new course') . '</a>' . "\n"; $userCommands[] = '<a href="claroline/auth/courses.php?cmd=rqUnreg" class="userCommandsItem">' . '<img src="' . get_icon_url('unenroll') . '" alt="" /> ' . get_lang('Remove course enrolment') . '</a>' . "\n"; } $userCommands[] = '<a href="claroline/course/platform_courses.php" class="userCommandsItem">' . '<img src="' . get_icon_url('course') . '" alt="" /> ' . get_lang('All platform courses') . '</a>' . "\n"; $userCommands[] = '<img class="iconDefinitionList" src="' . get_icon_url('hot') . '" alt="' . get_lang('New items') . '" />' . ' ' . get_lang('New items') . ' ' . '(<a href="' . claro_htmlspecialchars(Url::Contextualize(get_path('clarolineRepositoryWeb') . 'notification_date.php')) . '" class="userCommandsItem">' . get_lang('to another date') . '</a>)' . (substr($lastUserAction, strlen($lastUserAction) - 8) == '00:00:00' ? ' <br />[' . claro_html_localised_date(get_locale('dateFormatNumeric'), strtotime($lastUserAction)) . ']' : '') . "\n"; $template->assign('userCommands', $userCommands); // User profilebox FromKernel::uses('display/userprofilebox.lib'); $userProfileBox = new UserProfileBox(false); $template->assign('userProfileBox', $userProfileBox); } else { // Category browser $categoryId = !empty($_REQUEST['categoryId']) ? (int) $_REQUEST['categoryId'] : 0; $categoryBrowser = new CategoryBrowser($categoryId); $templateCategoryBrowser = $categoryBrowser->getTemplate(); $template->assign('templateCategoryBrowser', $templateCategoryBrowser); } // Render $claroline->display->body->setContent($template->render()); if (!(isset($_REQUEST['logout']) && isset($_SESSION['isVirtualUser']))) {
print $target == "_self" ? ' selected="selected"' : ""; ?> >_self</option> <option value="_top"<?php print $target == "_top" ? ' selected="selected"' : ""; ?> >_top</option> </select> </div> <div class="form-item file-upload form-menuitemicon"> <div class="image-preview"> <?php if (isset($parameters["a_icon"])) { ?> <img src="<?php print get_icon_url($parameters["a_icon"]); ?> " /> <?php } ?> </div> <a href="#" class="choose-image-link">Choose icon image</a> <input type="hidden" name="a_icon" class="form-text" value="<?php print isset($parameters["a_icon"]) ? $parameters["a_icon"] : ''; ?> " /> </div> <div class="form-item form-cssclasses"> <label for="img_class">CSS Classes</label> <input type="text" name="class" id="img_class" class="form-text" value="<?php
$output .= '<table class="claroTable emphaseLine" ' . 'width="100%" border="0" cellspacing="2">' . "\n" . '<thead>' . "\n" . '<tr align="center" valign="top">' . "\n" . '<th>' . get_lang('Title') . '</th>' . "\n" . '<th>' . get_lang('Visibility') . '</th>' . "\n" . '<th colspan="2">' . get_lang('Order') . '</th>' . "\n" . '</tr>' . "\n" . '</thead>' . "\n" . '<tbody>' . "\n"; if (is_array($portletList) && !empty($portletList)) { // only used to hide first up and last down commands $portletListSize = count($portletList); $i = 0; foreach ($portletList as $portlet) { $i++; $output .= "\n" . '<tr>' . "\n" . '<td>' . claro_htmlspecialchars(get_lang($portlet['name'])) . '</td>' . "\n"; if ($portlet['visibility'] == 'visible') { $output .= "\n" . '<td align="center">' . "\n" . '<a href="' . claro_htmlspecialchars(Url::Contextualize($_SERVER['PHP_SELF'] . '?cmd=exInvisible&label=' . claro_htmlspecialchars($portlet['label']))) . '">' . claro_html_icon('visible') . '</a>' . "\n" . '</td>' . "\n"; } else { $output .= "\n" . '<td align="center">' . "\n" . '<a href="' . claro_htmlspecialchars(Url::Contextualize($_SERVER['PHP_SELF'] . '?cmd=exVisible&label=' . claro_htmlspecialchars($portlet['label']))) . '">' . claro_html_icon('invisible') . '</a>' . "\n" . '</td>' . "\n"; } if ($i > 1) { $output .= '<td align="center">' . '<a href="' . claro_htmlspecialchars(Url::Contextualize($_SERVER['PHP_SELF'] . '?label=' . claro_htmlspecialchars($portlet['label']) . '&cmd=exUp')) . '">' . '<img src="' . get_icon_url('move_up') . '" alt="' . get_lang('Move up') . '" />' . '</a>' . '</td>' . "\n"; } else { $output .= '<td> </td>' . "\n"; } if ($i < $portletListSize) { $output .= '<td align="center">' . '<a href="' . claro_htmlspecialchars(Url::Contextualize($_SERVER['PHP_SELF'] . '?label=' . claro_htmlspecialchars($portlet['label']) . '&cmd=exDown')) . '">' . '<img src="' . get_icon_url('move_down') . '" alt="' . get_lang('Move down') . '" />' . '</a>' . '</td>' . "\n"; } else { $output .= '<td> </td>' . "\n"; } $output .= '</tr>' . "\n"; } } else { $output .= '<tr><td colspan="4">' . get_lang('Empty') . '</tr></td>' . "\n"; } $output .= "\n" . '</tbody>' . "\n" . '</table>' . "\n"; $claroline->display->body->appendContent($output); echo $claroline->display->render();
} else { $out .= '<td align="left" class="' . $class_css . '" >' . $module['name'] . '</td>' . "\n"; } //reorder column //up $out .= '<td align="center">' . "\n"; if (!($iteration == 1)) { $out .= '<a href="module_dock.php?cmd=up&module_id=' . $module['id'] . '&dock=' . urlencode($dock) . '">' . '<img src="' . get_icon_url('move_up') . '" alt="' . get_lang('Move up') . '" />' . '</a>' . "\n"; } else { $out .= ' '; } $out .= '</td>' . "\n"; //down $out .= '<td align="center">' . "\n"; if ($iteration != $enditeration) { $out .= '<a href="module_dock.php?cmd=down&module_id=' . $module['id'] . '&dock=' . urlencode($dock) . '">' . '<img src="' . get_icon_url('move_down') . '" alt="' . get_lang('Move down') . '" />' . '</a>'; } else { $out .= ' '; } $out .= '</td>' . "\n"; //remove links $out .= '<td align="center">' . "\n" . '<a href="module_dock.php?cmd=remove&module_id=' . $module['id'] . '&dock=' . urlencode($dock) . '">' . '<img src="' . get_icon_url('delete') . '" alt="' . get_lang('Delete') . '" />' . '</a>' . '</td>' . "\n"; $iteration++; } //end table... $out .= '</tbody>' . '</table>'; //Display BOTTOM Pager list $out .= $myPager->disp_pager_tool_bar('module_dock.php?dock=' . $dock); } $claroline->display->body->appendContent($out); echo $claroline->display->render();
?> <img src="<?php echo get_icon_url('visible'); ?> " alt="" /> <input type="hidden" id="visibility_show" name="course_visibility" value="1" /> <label for="visibility_show" class="invisible"> <?php echo get_lang('The course is shown in the courses listing'); ?> </label> <?php } else { ?> <img src="<?php echo get_icon_url('invisible'); ?> " alt="" /> <input type="hidden" id="visibility_show" name="course_visibility" value="0" /> <label for="visibility_show" class="invisible"> <?php echo get_lang('Visible only to people on the user list'); ?> </label> <?php } ?> <br /> <span class="notice">
} // see if tool name must be displayed 'as containing new items' (a red ball by default) or not $classItem = ''; if (in_array($thisTool['id'], $modified_tools)) { $classItem = " hot"; } if (!empty($url)) { $toolLinkList[] = '<a class="' . trim($style . ' item' . $classItem) . '" href="' . claro_htmlspecialchars(Url::Contextualize($url)) . '">' . '<img src="' . $icon . '" alt="" /> ' . $toolName . '</a>' . "\n"; } else { $toolLinkList[] = '<span ' . trim($style) . '>' . '<img src="' . $icon . '" alt="" /> ' . $toolName . '</span>' . "\n"; } } /***************** * DISPLAY SECTION ******************/ Claroline::getDisplay()->body->appendContent(claro_html_tool_title(array('supraTitle' => get_lang("Groups"), 'mainTitle' => claro_get_current_group_data('name') . ' <img src="' . get_icon_url('group') . '" alt="" />'))); $groupSpaceTemplate = new CoreTemplate('group_space.tpl.php'); $groupSpaceTemplate->assign('dialogBox', $dialogBox); $groupSpaceTemplate->assign('displayRegistrationLink', $is_allowedToSelfRegInGroup && !array_key_exists('registration', $_REQUEST)); $groupSpaceTemplate->assign('displayUnregistrationLink', $is_allowedToSelfUnregInGroup && !array_key_exists('unregistration', $_REQUEST)); $groupSpaceTemplate->assign('displayTutorRegistrationLink', $isTutorRegAllowed && !array_key_exists('tutorRegistration', $_REQUEST)); $groupSpaceTemplate->assign('displayTutorUnregistrationLink', $isTutorUnregAllowed && !array_key_exists('tutorUnregistration', $_REQUEST)); $groupSpaceTemplate->assign('toolLinkList', $toolLinkList); /*---------------------------------------------------------------------------- DISPLAY GROUP DESCRIPTION ----------------------------------------------------------------------------*/ if (strlen(claro_get_current_group_data('description')) > 0) { $groupSpaceTemplate->assign('groupDescription', claro_get_current_group_data('description')); } else { $groupSpaceTemplate->assign('groupDescription', get_lang("(none)")); }
<div class="panel_wrapper"> <div id="general_panel" class="panel current"> <fieldset> <legend><?php echo get_lang('Available images'); ?> </legend> <div id="displayedPath"><?php echo get_lang('Path'); ?> : <span id="path"></span></div> <div id="image_list"> </div> <div> <div id="processing"><img src="<?php echo get_icon_url('loading'); ?> " /></div> <?php if ($is_allowedToEdit) { ?> <label for="sentfile"><?php echo get_lang('Add an image'); ?> </label><br /> <input type="hidden" id="relativePath" name="relativePath" value="<?php echo $relativePath; ?> " /> <input id="sentFile" type="file" name="sentFile" size="25" value="" /> <input id="upload" type="submit" name="upload" value="<?php
/** * Render the tool title and command list * @return string */ public function render() { // We'll need some js JavascriptLoader::getInstance()->load('tooltitle'); // Command list and help $commandList = ''; $help = ''; if (!empty($this->helpUrl)) { $help .= '<li><a class="help" href="#" ' . "onclick=\"MyWindow=window.open('" . $this->helpUrl . "'," . "'MyWindow','toolbar=no,location=no,directories=no,status=yes,menubar=no,scrollbars=yes,resizable=yes,width=350,height=450,left=300,top=10'); return false;\">" . ' </a></li>' . "\n"; } if (!empty($this->commandList)) { $commands = ''; foreach ($this->commandList as $command) { $styleA = ''; if (!empty($command['img'])) { $styleA = ' style="background-image: url(' . get_icon_url($command['img']) . '); background-repeat: no-repeat; background-position: left center; padding-left: 20px;"'; } $params = ''; if (!empty($command['params'])) { foreach ($command['params'] as $key => $value) { $params .= ' ' . $key . '="' . $value . '"'; } } $commands .= '<li>' . '<a' . $styleA . $params . ' href="' . $command['url'] . '">' . $command['name'] . '</a></li>' . "\n"; } foreach ($this->advancedCommandList as $command) { $styleA = ''; if (!empty($command['img'])) { $styleA = ' style="background-image: url(' . get_icon_url($command['img']) . '); background-repeat: no-repeat; background-position: left center; padding-left: 20px;"'; } $params = ''; if (!empty($command['params'])) { foreach ($command['params'] as $key => $value) { $params .= ' ' . $key . '="' . $value . '"'; } } $commands .= '<li class="hidden">' . '<a' . $styleA . $params . ' href="' . $command['url'] . '">' . $command['name'] . '</a></li>' . "\n"; } $more = ''; if (!empty($this->advancedCommandList)) { $more = '<li><a class="more" title="' . get_lang('Show/hide %nbr more commands', array('%nbr' => count($this->advancedCommandList))) . '" href="#">»</a></li>'; } $commandList .= '<ul class="commandList">' . "\n" . $help . $commands . $more . '</ul>' . "\n"; } else { $commandList .= '<ul class="commandList">' . "\n" . $help . '</ul>' . "\n"; } $out = '<div class="toolTitleBlock">'; // Title parts if (!empty($this->superTitle)) { $out .= '<span class="toolTitle superTitle">' . $this->superTitle . '</span>' . "\n"; } if (empty($commandList)) { $style = ' style="border-right: 0"'; } else { $style = ''; } $out .= '<table><tr><td>' . '<h1 class="toolTitle mainTitle"' . $style . '>' . $this->mainTitle . '</h1>' . "\n" . '</td><td>' . $commandList . '</td></tr></table>'; if (!empty($this->subTitle)) { $out .= '<span class="toolTitle subTitle">' . $this->subTitle . '</span>' . "\n"; } $out .= '</div>' . "\n"; return $out; }
} else { $classItem = ""; } $out .= '<td style="text-align: left;">'; // display direct link to main page $out .= '<a class="item' . $classItem . '" href="' . claro_htmlspecialchars(Url::Contextualize('page.php?wikiId=' . (int) $entry['id'] . '&action=show')) . '">' . '<img src="' . get_icon_url('wiki') . '" alt="' . get_lang("Wiki") . '" /> ' . $entry['title'] . '</a>' . '</td>' . "\n" . '<td style="text-align: center;">' . '<a href="' . claro_htmlspecialchars(Url::Contextualize('page.php?wikiId=' . (int) $entry['id'] . '&action=all')) . '">' . $wikiStore->getNumberOfPagesInWiki($entry['id']) . '</a>' . '</td>' . "\n" . '<td style="text-align: center;">'; // display direct link to main page $out .= '<a href="' . claro_htmlspecialchars(Url::Contextualize('page.php?wikiId=' . (int) $entry['id'] . '&action=recent')) . '">' . '<img src="' . get_icon_url('history') . '" alt="' . get_lang("Recent changes") . '" />' . '</a>' . '</td>' . "\n"; // if admin, display edit and delete links if ($groupId && claro_is_group_member() || $is_allowedToAdmin) { // edit link $out .= '<td style="text-align:center;">' . '<a href="' . claro_htmlspecialchars(Url::Contextualize($_SERVER['PHP_SELF'] . '?wikiId=' . (int) $entry['id'] . '&action=rqEdit')) . '">' . '<img src="' . get_icon_url('settings') . '" alt="' . get_lang("Edit properties") . '" />' . '</a>' . '</td>' . "\n"; // delete link $out .= '<td style="text-align:center;">' . '<a href="' . claro_htmlspecialchars(Url::Contextualize($_SERVER['PHP_SELF'] . '?wikiId=' . (int) $entry['id'] . '&action=rqDelete')) . '">' . '<img src="' . get_icon_url('delete') . '" alt="' . get_lang("Delete") . '" />' . '</a>' . '</td>' . "\n"; if (true === $is_allowedToAdmin) { $out .= '<td style="text-align:center;">' . '<a href="' . claro_htmlspecialchars(Url::Contextualize($_SERVER['PHP_SELF'] . '?wikiId=' . (int) $entry['id'] . '&action=exExport')) . '">' . '<img src="' . get_icon_url('export') . '" alt="' . get_lang("Export") . '" />' . '</a>' . '</td>' . "\n"; } } $out .= '</tr>' . "\n"; if (!empty($entry['description'])) { $out .= '<tr>' . "\n"; if ($groupId && claro_is_group_member()) { $colspan = 5; } elseif ($is_allowedToAdmin) { $colspan = 6; } else { $colspan = 3; } $out .= '<td colspan="' . $colspan . '"><div class="comment">' . $entry['description'] . '</div></td>' . "\n" . '</tr>' . "\n"; } }
/* DELETE COMMAND */ $out .= '<td>' . '<a href="' . claro_htmlspecialchars(Url::Contextualize($_SERVER['PHP_SELF'] . '?cmd=exRm&file=' . $cmdFileName)) . '" ' . 'onclick="return CLDOC.confirmation(\'' . clean_str_for_javascript($dspFileName) . '\');">' . '<img src="' . get_icon_url('delete') . '" alt="' . get_lang('Delete') . '" />' . '</a>' . '</td>' . "\n"; /* MOVE COMMAND */ $out .= '<td>' . '<a href="' . claro_htmlspecialchars(Url::Contextualize($_SERVER['PHP_SELF'] . '?cmd=rqMv&file=' . $cmdFileName)) . '">' . '<img src="' . get_icon_url('move') . '" alt="' . get_lang('Move') . '" />' . '</a>' . '</td>' . "\n" . '<td>'; if ($groupContext) { /* PUBLISH COMMAND */ if ($thisFile['type'] == A_FILE) { $out .= '<a href="' . claro_htmlspecialchars(Url::Contextualize(get_module_url('CLWRK') . '/work.php?' . 'submitGroupWorkUrl=' . urlencode($thisFile['path']))) . '">' . '<small>' . get_lang('Publish') . '</small>' . '</a>'; } // else noop } elseif ($courseContext) { /* VISIBILITY COMMAND */ if ($thisFile['visibility'] == "i") { $out .= '<a href="' . claro_htmlspecialchars(Url::Contextualize($_SERVER['PHP_SELF'] . '?cmd=exChVis&file=' . $cmdFileName . '&vis=v')) . '">' . '<img src="' . get_icon_url('invisible') . '" alt="' . get_lang('Make visible') . '" />' . '</a>'; } else { $out .= '<a href="' . claro_htmlspecialchars(Url::Contextualize($_SERVER['PHP_SELF'] . '?cmd=exChVis&file=' . $cmdFileName . '&vis=i')) . '">' . '<img src="' . get_icon_url('visible') . '" alt="' . get_lang('Make invisible') . '" />' . '</a>'; } } $out .= '</td>' . "\n"; } // end if($is_allowedToEdit) $out .= '</tr>' . "\n"; /* COMMENTS */ if ($thisFile['comment'] != '') { $thisFile['comment'] = claro_htmlspecialchars($thisFile['comment']); $thisFile['comment'] = claro_parse_user_text($thisFile['comment']); $out .= '<tr align="left">' . "\n" . '<td colspan="' . $colspan . '">' . '<div class="comment">' . $thisFile['comment'] . '</div>' . '</td>' . "\n" . '</tr>' . "\n"; } } // end each ($fileList) } else {
/** * Display the tree of classes * * @author Guillaume Lederer * @param list of all the classes informations of the platform * @param list of the classes that must be visible * @return * * @see * */ function display_tree_class_in_user($class_list, $course_code, $parent_class = null, $deep = 0) { $tbl_mdb_names = claro_sql_get_main_tbl(); $tbl_course = $tbl_mdb_names['course']; $html_form = ''; // Get the course id with cours code $sql = "SELECT `C`.`cours_id`\n FROM `" . $tbl_course . "` as C\n WHERE `code` = '" . $course_code . "'"; claro_sql_query_get_single_value($sql); foreach ($class_list as $cur_class) { if ($parent_class == $cur_class['class_parent_id']) { // Set space characters to add in name display $blankspace = ' '; for ($i = 0; $i < $deep; $i++) { $blankspace .= ' '; } // See if current class to display has children $has_children = FALSE; foreach ($class_list as $search_parent) { if ($cur_class['id'] == $search_parent['class_parent_id']) { $has_children = TRUE; break; } } // Set link to open or close current class if ($has_children) { if (isset($_SESSION['class_add_visible_class'][$cur_class['id']]) && $_SESSION['class_add_visible_class'][$cur_class['id']] == "open") { $open_close_link = '<a href="' . $_SERVER['PHP_SELF'] . '?cmd=exClose&class_id=' . $cur_class['id'] . '">' . "\n" . '<img src="' . get_icon_url('collapse') . '" alt="" />' . "\n" . '</a>' . "\n"; } else { $open_close_link = '<a href="' . $_SERVER['PHP_SELF'] . '?cmd=exOpen&class_id=' . $cur_class['id'] . '">' . "\n" . '<img src="' . get_icon_url('expand') . '" alt="" />' . "\n" . '</a>' . "\n"; } } else { $open_close_link = ' ° '; } // Display current class $qty_user = get_class_user_number($cur_class['id']); // Need some optimisation here ... $html_form .= '<tr>' . "\n" . '<td>' . "\n" . $blankspace . $open_close_link . " " . $cur_class['name'] . '</td>' . "\n" . '<td align="center">' . "\n" . $qty_user . ' ' . get_lang('UsersMin') . '</td>' . "\n" . '<td align="center">' . "\n"; if (empty($cur_class['course_id'])) { $html_form .= '<a href="' . $_SERVER['PHP_SELF'] . '?cmd=exEnrol&class_id=' . $cur_class['id'] . '"' . ' onclick="return confirmation_enrol(\'' . clean_str_for_javascript($cur_class['name']) . '\');">' . '<img src="' . get_icon_url('enroll') . '" alt="' . get_lang('Enrol to course') . '" />' . "\n" . '</a>' . "\n"; } else { $html_form .= '<a href="' . $_SERVER['PHP_SELF'] . '?cmd=exUnenrol&class_id=' . $cur_class['id'] . '"' . ' onclick="return confirmation_unenrol(\'' . clean_str_for_javascript($cur_class['name']) . '\');">' . '<img src="' . get_icon_url('unenroll') . '" alt="' . get_lang('Unenrol from course') . '" />' . "\n" . '</a>' . "\n"; } $html_form .= '</td>' . "\n" . '</tr>' . "\n"; // RECURSIVE CALL TO DISPLAY CHILDREN if (isset($_SESSION['class_add_visible_class'][$cur_class['id']]) && $_SESSION['class_add_visible_class'][$cur_class['id']] == 'open') { $html_form .= display_tree_class_in_user($class_list, $course_code, $cur_class['id'], $deep + 1); } } } return $html_form; }
{ if (confirm("' . get_lang('Are you sure to delete the message?') . '")) { window.location=localPath; return false; } else { return false; } } </script>'; $claroline->display->header->addHtmlHeader($javascriptDelete); foreach ($box as $key => $message) { $userData = user_get_properties($message->getSender()); $content .= '<tr>' . "\n" . '<td class="im_list_selection"><input type="checkbox" name="msg[]" value="' . $message->getId() . '" /></td>' . "\n" . '<td><a href="readmessage.php?messageId=' . $message->getId() . '&type=received">' . claro_htmlspecialchars($message->getSubject()) . '</a></td>' . "\n" . '<td><a href="sendmessage.php?cmd=rqMessageToUser&userId=' . $message->getSender() . '">' . get_lang('%firstName %lastName', array('%firstName' => claro_htmlspecialchars($message->getSenderFirstName()), '%lastName' => claro_htmlspecialchars($message->getSenderLastName()))) . '</a>' . '</td>' . '<td>' . claro_htmlspecialchars($userData['username']) . '</td>' . "\n" . '<td>' . claro_html_localised_date(get_locale('dateTimeFormatLong'), strtotime($message->getSendTime())) . '</td>' . "\n" . '<td class="im_list_action"><a href="' . $linkDelete . 'cmd=rqDeleteMessage&message_id=' . $message->getId() . '" ' . 'onclick="return deleteMessage(\'' . $linkDelete . 'cmd=exDeleteMessage&message_id=' . $message->getId() . '\')"' . '><img src="' . get_icon_url('delete') . '" alt="" /></a></td>' . "\n" . '</tr>' . "\n\n"; } $content .= '</table>' . '<input type="submit" value="' . get_lang('Delete selected message(s)') . '" />' . "\n\n"; } $content .= '</form>'; // prepare the link to change of page if ($box->getNumberOfPage() > 1) { // number of page to display in the page before and after thecurrent page $nbPageToDisplayBeforeAndAfterCurrentPage = 1; $content .= '<div id="im_paging">'; $arg_paging = makeArgLink($arguments, array('page')); if ($arg_paging == "") { $linkPaging = $_SERVER['PHP_SELF'] . "?page="; } else { $linkPaging = $_SERVER['PHP_SELF'] . "?" . $arg_paging . "&page="; }
} else { foreach ($searchResultList as $thisPost) { // PREVENT USER TO CONSULT POST FROM A GROUP THEY ARE NOT ALLOWED if (!is_null($thisPost['group_id']) && $is_groupPrivate && !(in_array($thisPost['group_id'], $userGroupList) || in_array($thisPost['group_id'], $tutorGroupList) || claro_is_course_manager())) { continue; } else { // notify if is new message $post_time = datetime_to_timestamp($thisPost['post_time']); if ($post_time < $last_visit) { $class = ' class="item"'; } else { $class = ' class="item hot"'; } // get user picture $userData = user_get_properties($thisPost['poster_id']); $picturePath = user_get_picture_path($userData); if ($picturePath && file_exists($picturePath)) { $pictureUrl = user_get_picture_url($userData); } else { $pictureUrl = null; } $out .= '<div id="post' . $thisPost['post_id'] . '" class="threadPost">' . '<div class="threadPostInfo">' . (!is_null($pictureUrl) ? '<div class="threadPosterPicture"><img src="' . $pictureUrl . '" alt=" " /></div>' : '') . "\n" . '<b>' . $thisPost['firstname'] . ' ' . $thisPost['lastname'] . '</b> ' . '<br />' . '<small>' . claro_html_localised_date(get_locale('dateTimeFormatLong'), $post_time) . '</small>' . "\n"; $out .= ' </div>' . "\n" . '<div class="threadPostContent">' . "\n" . '<img src="' . get_icon_url('topic') . '" alt="" />' . '<a href="' . claro_htmlspecialchars(Url::Contextualize(get_module_url('CLFRM') . '/viewtopic.php?topic=' . $thisPost['topic_id'])) . '">' . claro_htmlspecialchars($thisPost['topic_title']) . '</a>' . "\n" . '<span class="threadPostIcon ' . $class . '"><img src="' . get_icon_url('post') . '" alt="" /></span><br />' . "\n" . claro_parse_user_text($thisPost['post_text']) . "\n"; $out .= '</div>' . "\n" . '<div class="spacer"></div>' . "\n\n" . '</div>' . "\n"; } // end else if ( ! is_null($thisPost['group_id']) } } // end for each $claroline->display->body->appendContent($out); echo $claroline->display->render();
/** * Display table with tool/right of the profile */ public function displayProfileToolRightList() { $html = ''; $html_table_header_list = array(); $html_table_row_list = array(); foreach ($this->rightProfileToolRightList as $profile_id => $rightProfileToolRight) { $isLocked = $rightProfileToolRight->profile->isLocked(); $className = get_class($rightProfileToolRight); // use strtolower for PHP4 : get_class returns class name in lowercase $className = strtolower($className); $html_table_header_list[$profile_id] = claro_get_profile_name($profile_id); if ($isLocked && $className == strtolower('RightCourseProfileToolRight')) { $displayMode = claro_is_platform_admin() ? $this->displayMode : 'read'; $html_table_header_list[$profile_id] .= ' <img src="' . get_icon_url('locked') . '" alt="' . get_lang('Profile locked') . '" />'; } else { $displayMode = $this->displayMode; } foreach ($rightProfileToolRight->toolActionList as $tool_id => $action_list) { $action_right = $rightProfileToolRight->getToolRight($tool_id); $html_right = ''; if ($displayMode == 'edit') { $param_append = '?profile_id=' . urlencode($profile_id) . '&tool_id=' . urlencode($tool_id) . '&cmd=set_right'; foreach ($this->urlParamAppendList as $name => $value) { $param_append .= '&' . $name . '=' . $value; } } if (claro_get_profile_label($profile_id) != ANONYMOUS_PROFILE && claro_get_profile_label($profile_id) != GUEST_PROFILE) { if ($action_right == 'none') { $action_param_value = 'user'; $html_right = '<img src="' . get_icon_url('forbidden') . '" alt="' . get_lang('No access') . '" /> <span style="font-size: smaller;">' . get_lang('No access') . "</span>\n"; } elseif ($action_right == 'user') { $action_param_value = 'manager'; $html_right = '<img src="' . get_icon_url('user') . '" alt="' . get_lang('Access allowed') . '" /> <span style="font-size: smaller;">' . get_lang('Access allowed') . "</span>\n"; } else { $action_param_value = 'none'; $html_right = '<img src="' . get_icon_url('manager') . '" alt="' . get_lang('Edition allowed') . '" /> <span style="font-size: smaller;">' . get_lang('Edition allowed') . "</span>\n"; } } else { if ($action_right == 'none') { $action_param_value = 'user'; $html_right = '<img src="' . get_icon_url('forbidden') . '" alt="' . get_lang('No access') . '" /> <span style="font-size: smaller;">' . get_lang('No access') . "</span>\n"; } else { $action_param_value = 'none'; $html_right = '<img src="' . get_icon_url('user') . '" alt="' . get_lang('Access allowed') . '" /> <span style="font-size: smaller;">' . get_lang('Access allowed') . "</span>\n"; } } if ($displayMode == 'edit') { $html_right = '<a href="' . $_SERVER['PHP_SELF'] . $param_append . '&right_value=' . $action_param_value . '">' . $html_right . '</a>'; } $html_table_row_list[$tool_id][$profile_id] = $html_right; } } // build table $html .= '<table class="claroTable emphaseLine" >' . "\n" . '<thead>' . "\n" . '<tr class="headerX">' . "\n" . '<th>' . get_lang('Tools') . '</th>' . "\n"; // visibility column if ($this->isSetCourseToolInfo()) { $html .= '<th style="text-align:center; width:100px;" >' . get_lang('Visibility') . '</th>' . "\n"; } foreach ($html_table_header_list as $html_table_header) { $html .= '<th style="text-align:center; width:100px;" >' . $html_table_header . '</th>' . "\n"; } $html .= '</tr>' . "\n" . '</thead>' . "\n" . '<tbody>'; foreach ($html_table_row_list as $tool_id => $html_table_row) { if (claro_is_in_a_course() && (!$this->isSetCourseToolInfo() || !isset($this->courseToolInfo[$tool_id]))) { // Not activated in course ! continue; } $html .= '<tr>' . "\n"; if ($this->isSetCourseToolInfo()) { // Add visibility and icon from courseToolInfo $html .= '<td ' . ($this->courseToolInfo[$tool_id]['visibility'] == true ? '' : 'class="invisible"') . '>' . '<img src="' . $this->courseToolInfo[$tool_id]['icon'] . '" alt="" />' . get_lang(claro_get_tool_name($tool_id)) . '</td>'; } else { $html .= '<td>' . get_lang(claro_get_tool_name($tool_id)) . '</td>' . "\n"; } // visibility column if ($this->isSetCourseToolInfo()) { if ($this->courseToolInfo[$tool_id]['visibility'] == true) { $html .= '<td align="center">' . '<a href="' . $_SERVER['PHP_SELF'] . '?cmd=exInvisible&tool_id=' . $this->courseToolInfo[$tool_id]['tid'] . '" >' . '<img src="' . get_icon_url('visible') . '" alt="' . get_lang('Visible') . '" />' . '</a>' . '</td>' . "\n"; } else { $html .= '<td align="center">' . '<a href="' . $_SERVER['PHP_SELF'] . '?cmd=exVisible&tool_id=' . $this->courseToolInfo[$tool_id]['tid'] . '" >' . '<img src="' . get_icon_url('invisible') . '" alt="' . get_lang('Invisible') . '" />' . '</a></td>' . "\n"; } } // profile colums foreach ($html_table_row as $html_table_row_cell) { $html .= '<td align="center">' . $html_table_row_cell . '</td>'; } $html .= '</tr>' . "\n"; } $html .= '</tbody></table>'; return $html; }
?> <?php } ?> </td> <td align="center"> <?php if ($questionIterator < count($this->questionList)) { ?> <a href="<?php echo claro_htmlspecialchars(Url::Contextualize('edit_exercise.php?exId=' . $this->exId . '&cmd=mvDown&quId=' . $question['id'])); ?> "> <img src="<?php echo get_icon_url('move_down'); ?> " alt="<?php echo get_lang('Move down'); ?> " /> </a> <?php } else { ?> <?php } ?> </td> <?php
/** * Return the breadcrumb to display in the header * * @global string $nameTools * @global array $interbredcrump * @global boolean $noPHP_SELF * @global boolean $noQUERY_STRING * * @return string html content */ function claro_html_breadcrumb() { // dirty global to keep value (waiting a refactoring) global $nameTools, $interbredcrump, $noPHP_SELF, $noQUERY_STRING; /****************************************************************************** BREADCRUMB LINE ******************************************************************************/ $htmlBC = ''; if (claro_is_in_a_course() || isset($nameTools) || isset($interbredcrump) && is_array($interbredcrump)) { $htmlBC .= '<div id="breadcrumbLine">' . "\n\n" . '<hr />' . "\n"; $breadcrumbUrlList = array(); $breadcrumbNameList = array(); $breadcrumbUrlList[] = get_path('url') . '/index.php'; $breadcrumbNameList[] = get_conf('siteName'); if (claro_is_in_a_course()) { $breadcrumbUrlList[] = get_path('clarolineRepositoryWeb') . 'course/index.php?cid=' . claro_htmlspecialchars(claro_get_current_course_id()); $breadcrumbNameList[] = claro_get_current_course_data('officialCode'); } if (claro_is_in_a_group()) { $breadcrumbUrlList[] = get_module_url('CLGRP') . '/index.php?cidReq=' . claro_htmlspecialchars(claro_get_current_course_id()); $breadcrumbNameList[] = get_lang('Groups'); $breadcrumbUrlList[] = get_module_url('CLGRP') . '/group_space.php?cidReq=' . claro_htmlspecialchars(claro_get_current_course_id()) . '&gidReq=' . (int) claro_get_current_group_id(); $breadcrumbNameList[] = claro_get_current_group_data('name'); } if (isset($interbredcrump) && is_array($interbredcrump)) { while (list(, $bredcrumpStep) = each($interbredcrump)) { $breadcrumbUrlList[] = $bredcrumpStep['url']; $breadcrumbNameList[] = $bredcrumpStep['name']; } } if (isset($nameTools)) { $breadcrumbNameList[] = $nameTools; if (isset($noPHP_SELF) && $noPHP_SELF) { $breadcrumbUrlList[] = null; } elseif (isset($noQUERY_STRING) && $noQUERY_STRING) { $breadcrumbUrlList[] = $_SERVER['PHP_SELF']; } else { // set Query string to empty if not exists if (!isset($_SERVER['QUERY_STRING'])) { $_SERVER['QUERY_STRING'] = ''; } $breadcrumbUrlList[] = $_SERVER['PHP_SELF'] . '?' . $_SERVER['QUERY_STRING']; } } $htmlBC .= claro_html_breadcrumbtrail($breadcrumbNameList, $breadcrumbUrlList, ' > ', get_icon_url('home')); if (!claro_is_user_authenticated()) { $htmlBC .= "\n" . '<div id="toolViewOption" style="padding-right:10px">' . '<a href="' . get_path('clarolineRepositoryWeb') . 'auth/login.php' . '?sourceUrl=' . urlencode(base64_encode((isset($_SERVER['HTTPS']) && ($_SERVER['HTTPS'] == 'on' || $_SERVER['HTTPS'] == 1) ? 'https://' : 'http://') . $_SERVER['HTTP_HOST'] . $_SERVER['REQUEST_URI'])) . '" target="_top">' . get_lang('Login') . '</a>' . '</div>' . "\n"; } elseif (claro_is_in_a_course() && !claro_is_course_member() && claro_get_current_course_data('registrationAllowed') && !claro_is_platform_admin()) { $htmlBC .= '<div id="toolViewOption">' . '<a href="' . get_path('clarolineRepositoryWeb') . 'auth/courses.php?cmd=exReg&course=' . claro_get_current_course_id() . '">' . '<img src="' . get_icon_url('enroll') . '" alt="" /> ' . '<b>' . get_lang('Enrolment') . '</b>' . '</a>' . '</div>' . "\n"; } elseif (claro_is_display_mode_available()) { $htmlBC .= "\n" . '<div id="toolViewOption">' . "\n"; if (isset($_REQUEST['View mode'])) { $htmlBC .= claro_html_tool_view_option($_REQUEST['View mode']); } else { $htmlBC .= claro_html_tool_view_option(); } if (claro_is_platform_admin() && !claro_is_course_member()) { $htmlBC .= ' | <a href="' . get_path('clarolineRepositoryWeb') . 'auth/courses.php?cmd=exReg&course=' . claro_get_current_course_id() . '">'; $htmlBC .= '<img src="' . get_icon_url('enroll') . '" alt="" /> '; $htmlBC .= '<b>' . get_lang('Enrolment') . '</b>'; $htmlBC .= '</a>'; } $htmlBC .= "\n" . '</div>' . "\n"; } $htmlBC .= '<div class="spacer"></div>' . "\n" . '<hr />' . "\n" . '</div>' . "\n"; } else { // $htmlBC .= '<div style="height:1em"></div>'; } return $htmlBC; }
<div class="coursePortletList"> <?php echo $this->dialogBox->render(); ?> <?php if (claro_is_allowed_to_edit() && !empty($this->activablePortlets)) { ?> <ul class="commandList"> <?php foreach ($this->activablePortlets as $portlet) { ?> <li> <a style="background-image: url(<?php echo get_icon_url('add'); ?> ); background-repeat: no-repeat; background-position: left center; padding-left: 20px;" href="<?php echo claro_htmlspecialchars(Url::Contextualize($_SERVER['PHP_SELF'] . '?portletCmd=exAdd&portletLabel=' . $portlet['label'])) . '&courseId=' . ClaroCourse::getIdFromCode(claro_get_current_course_id()); ?> "> <?php echo get_lang('Add a new portlet'); ?> : <?php echo get_lang($portlet['name']); ?> </a> </li> <?php
?> >_parent</option> <option value="_self"<?php print $target == "_self" ? ' selected="selected"' : ""; ?> >_self</option> <option value="_top"<?php print $target == "_top" ? ' selected="selected"' : ""; ?> >_top</option> </select> </div> <div class="form-item file-upload form-menuitemicon clearfix"> <div class="image-preview"> <?php if (isset($parameters["a_icon"]) && ($icon_url = get_icon_url($parameters["a_icon"]))) { ?> <img src="<?php print $icon_url; ?> " /> <?php } ?> </div> <a href="#" class="select-image-button choose-image-link">Choose icon image</a> <input type="hidden" name="a_icon" class="form-text" value="<?php print isset($parameters["a_icon"]) ? $parameters["a_icon"] : ''; ?> " /> </div>
if (is_array($this->toolLinkList)) { echo claro_html_list($this->toolLinkList, array('id' => 'groupToolList')); } ?> <br /> <?php if (claro_is_allowed_to_edit()) { echo claro_html_cmd_link(claro_htmlspecialchars(Url::Contextualize('group_edit.php')), '<img src="' . get_icon_url('edit') . '"' . ' alt="' . get_lang("Edit this group") . '" />' . get_lang("Edit this group")); } ?> <?php if (current_user_is_allowed_to_send_message_to_current_group()) { echo '<br />' . claro_html_cmd_link(claro_htmlspecialchars(Url::Contextualize('../messaging/sendmessage.php?cmd=rqMessageToGroup&')), '<img src="' . get_icon_url('mail_send') . '" alt="" />' . get_lang("Send a message to group")); } ?> </div> <div id="rightContent" class="groupSpaceContents"> <fieldset> <dl> <dt><?php echo get_lang("Description"); ?> </dt> <dd><?php echo claro_htmlspecialchars($this->groupDescription); ?> </dd> <dt><?php