/** * Get area wiki syntax toolbar * @return string toolbar javascript code */ public function getToolbar() { $toolbar = ''; $toolbar .= '<script type="text/javascript" src="' . document_web_path() . '/js/toolbar.js"></script>' . "\n"; $toolbar .= "<script type=\"text/javascript\">if (document.getElementById) {\n var tb = new dcToolBar(document.getElementById('" . $this->attributeList['id'] . "'),\n 'wiki','" . get_module_url('CLWIKI') . "/img/toolbar/');\n\n tb.btStrong('" . get_lang('Bold') . "');\n tb.btEm('" . get_lang('Italic') . "');\n tb.btIns('" . get_lang('Underline') . "');\n tb.btDel('" . get_lang('Strike') . "');\n tb.btQ('" . get_lang('Inline quote') . "');\n tb.btCode('" . get_lang('Code') . "');\n tb.addSpace(10);\n tb.btBr('" . get_lang('Line break') . "');\n tb.addSpace(10);\n tb.btBquote('" . get_lang('Blockquote') . "');\n tb.btPre('" . get_lang('Preformated text') . "');\n tb.btList('" . get_lang('Unordered list') . "','ul');\n tb.btList('" . get_lang('Ordered list') . "','ol');\n tb.addSpace(10);\n tb.btLink('" . get_lang('External link') . "','" . get_lang('URL?') . "','" . get_lang('Language') . "','" . $GLOBALS['iso639_1_code'] . "');\n tb.btImgLink('" . get_lang('External image') . "','" . get_lang('URL') . "');\n tb.draw('');\n}\n</script>\n"; return $toolbar; }
public function resolve(ResourceLocator $locator) { if ($locator->hasResourceId()) { $context = Claro_Context::getCurrentContext(); $context[CLARO_CONTEXT_COURSE] = $locator->getCourseId(); if ($locator->inGroup()) { $context[CLARO_CONTEXT_GROUP] = $locator->getGroupId(); } $path = get_path('coursesRepositorySys') . claro_get_course_path($locator->getCourseId()); // in a group if ($locator->inGroup()) { $groupData = claro_get_group_data($context); $path .= '/group/' . $groupData['directory']; $groupId = $locator->getGroupId(); } else { $path .= '/document'; } $path .= '/' . ltrim($locator->getResourceId(), '/'); $resourcePath = '/' . ltrim($locator->getResourceId(), '/'); $path = secure_file_path($path); if (!file_exists($path)) { throw new Exception("Resource not found {$path}"); } elseif (is_dir($path)) { $url = new Url(get_module_entry_url('CLDOC')); $url->addParam('cmd', 'exChDir'); $url->addParam('file', base64_encode($resourcePath)); return $url->toUrl(); } else { return get_module_url('CLDOC') . '/connector/cllp.frames.cnr.php'; return claro_get_file_download_url($resourcePath, Claro_Context::getUrlContext($context)); } } else { return get_module_entry_url('CLDOC'); } }
/** * CLAROLINE * * @version $Revision: 13708 $ * @copyright (c) 2001-2011, Universite catholique de Louvain (UCL) * @license http://www.gnu.org/copyleft/gpl.html (GPL) GENERAL PUBLIC LICENSE * @package CLANN * @subpackage CLICAL * @author Claro Team <*****@*****.**> */ function CLANN_write_ical($iCal, $context) { if (is_array($context) && count($context) > 0) { $courseId = array_key_exists(CLARO_CONTEXT_COURSE, $context) ? $context[CLARO_CONTEXT_COURSE] : claro_get_current_course_id(); } require_once dirname(__FILE__) . '/../lib/announcement.lib.php'; $courseData = claro_get_course_data($courseId); $toolNameList = claro_get_tool_name_list(); $announcementList = announcement_get_item_list($context, 'DESC'); $organizer = (array) array($courseData['titular'], $courseData['email']); $attendees = array(); $categories = array(get_conf('siteName'), $courseData['officialCode'], trim($toolNameList['CLANN'])); foreach ($announcementList as $announcementItem) { if ('SHOW' == $announcementItem['visibility']) { /* $rssList[] = array( 'title' => trim($announcementItem['title']) , 'category' => trim($toolNameList['CLANN']) , 'guid' => get_module_url('CLANN') . '/announcements.php?cidReq='.claro_get_current_course_id().'&l#ann'.$announcementItem['id'] , 'link' => get_module_url('CLANN') . '/announcements.php?cidReq='.claro_get_current_course_id().'&l#ann'.$announcementItem['id'] , 'description' => trim(str_replace('<!-- content: html -->','',$announcementItem['content'])) , 'pubDate' => date('r', stripslashes(strtotime($announcementItem['time']))) //, 'author' => $_course['email'] ); */ $iCal->addJournal(trim($announcementItem['title']), trim(str_replace('<!-- content: html -->', '', $announcementItem['content'])), strtotime($announcementItem['time']), strtotime($announcementItem['time']), time(), 1, 1, $organizer, $attendees, $categories, 5, 10, 1, array(), 0, '', get_path('rootWeb') . get_module_url('CLANN') . '/announcements.php?cidReq=' . $courseId . '&l#ann' . $announcementItem['id'], get_locale('iso639_1_code'), ''); } } return $iCal; }
public function render() { if ($this->hidden) { return '<!-- footer hidden -->' . "\n"; } $currentCourse = claro_get_current_course_data(); if (claro_is_in_a_course()) { $courseManagerOutput = '<div id="courseManager">' . get_lang('Manager(s) for %course_code', array('%course_code' => $currentCourse['officialCode'])) . ' : '; $currentCourseTitular = empty($currentCourse['titular']) ? get_lang('Course manager') : $currentCourse['titular']; if (empty($currentCourse['email'])) { $courseManagerOutput .= '<a href="' . get_module_url('CLUSR') . '/user.php">' . $currentCourseTitular . '</a>'; } else { $courseManagerOutput .= '<a href="mailto:' . $currentCourse['email'] . '?body=' . $currentCourse['officialCode'] . '&subject=[' . rawurlencode(get_conf('siteName')) . ']' . '">' . $currentCourseTitular . '</a>'; } $courseManagerOutput .= '</div>'; $this->assign('courseManager', $courseManagerOutput); } else { $this->assign('courseManager', ''); } $platformManagerOutput = '<div id="platformManager">' . get_lang('Administrator for %site_name', array('%site_name' => get_conf('siteName'))) . ' : ' . '<a href="mailto:' . get_conf('administrator_email') . '?subject=[' . rawurlencode(get_conf('siteName')) . ']' . '">' . get_conf('administrator_name') . '</a>'; if (get_conf('administrator_phone') != '') { $platformManagerOutput .= '<br />' . "\n" . get_lang('Phone : %phone_number', array('%phone_number' => get_conf('administrator_phone'))); } $platformManagerOutput .= '</div>'; $this->assign('platformManager', $platformManagerOutput); $poweredByOutput = '<span class="poweredBy">' . get_lang('Powered by') . ' <a href="http://www.claroline.net" target="_blank">Claroline</a> ' . '© 2001 - 2013' . '</span>'; $this->assign('poweredBy', $poweredByOutput); return parent::render(); }
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; }
/** * Function called to resolve an URL based on a resourceId. * * @param ResourceLocator $locator The locator of the resource. * @return string the URL of the item */ public function resolve(ResourceLocator $locator) { if ($locator->hasResourceId()) { return get_module_url('CLLNP') . "/learningPath.php?path_id={$locator->getResourceId()}&cidReq={$locator->getCourseId()}"; } else { return get_module_entry_url('CLLNP'); } }
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; }
protected function getModuleLinkList() { //$toolNameList = claro_get_tool_name_list(); $claro_notifier = Claroline::getInstance()->notification; // Get tool id where new events have been recorded since last login if ($this->userId) { $date = $claro_notifier->get_notification_date($this->userId); $modified_tools = $claro_notifier->get_notified_tools($this->courseCode, $date, $this->userId); } else { $modified_tools = array(); } $toolLinkList = array(); $toolName = get_lang('Course homepage'); // Trick to find how to build URL, must be IMPROVED $url = claro_htmlspecialchars(Url::Contextualize(get_path('url') . '/claroline/course/index.php?cid=' . $this->courseCode)); $icon = get_icon_url('coursehome'); $htmlId = 'id="courseHomePage"'; $removableTool = false; $classCurrent = empty($GLOBALS['tlabelReq']) ? ' currentTool' : ''; $toolLinkList[] = '<a ' . $htmlId . 'class="item' . $classCurrent . '" href="' . $url . '">' . '<img class="clItemTool" src="' . $icon . '" alt="" /> ' . $toolName . '</a>' . "\n"; // Generate tool lists $toolListSource = claro_get_course_tool_list($this->courseCode, $this->profileId, true); foreach ($toolListSource as $thisTool) { // Special case when display mode is student and tool invisible doesn't display it if ($this->viewMode == 'STUDENT' && !$thisTool['visibility']) { continue; } if (isset($thisTool['label'])) { $thisToolName = $thisTool['name']; $toolName = get_lang($thisToolName); // Trick to find how to build URL, must be IMPROVED $url = claro_htmlspecialchars(Url::Contextualize(get_module_url($thisTool['label']) . '/' . $thisTool['url'], $this->currentCourseContext)); $icon = get_module_url($thisTool['label']) . '/' . $thisTool['icon']; $htmlId = 'id="' . $thisTool['label'] . '"'; $removableTool = false; } else { if (!empty($thisTool['external_name'])) { $toolName = $thisTool['external_name']; } else { $toolName = '<i>no name</i>'; } $url = claro_htmlspecialchars(trim($thisTool['url'])); $icon = get_icon_url('link'); $htmlId = ''; $removableTool = true; } $style = !$thisTool['visibility'] ? 'invisible ' : ''; $classItem = in_array($thisTool['id'], $modified_tools) ? ' hot' : ''; $classCurrent = isset($thisTool['label']) && $thisTool['label'] == $GLOBALS['tlabelReq'] ? ' currentTool' : ''; if (!empty($url)) { $toolLinkList[] = '<a ' . $htmlId . 'class="' . $style . 'item' . $classItem . $classCurrent . '" href="' . $url . '">' . '<img class="clItemTool" src="' . $icon . '" alt="" /> ' . $toolName . '</a>' . "\n"; } else { $toolLinkList[] = '<span ' . $style . '>' . '<img class="clItemTool" src="' . $icon . '" alt="" /> ' . $toolName . '</span>' . "\n"; } } return $toolLinkList; }
public function resolve(ResourceLocator $locator) { if ($locator->hasResourceId()) { $assignement_id = $locator->getResourceId(); $url = new Url(get_module_url('CLWRK') . '/work_list.php'); $url->addParam('assigId', (int) $assignement_id); return $url->toUrl(); } else { return get_module_entry_url('CLWRK'); } }
/** * Returns the url of the given icon * * @param string $fileName file name with or without extension * @param string $moduleLabel label of the module (optional) * @return string icon url * mixed null if icon not found */ function get_icon_url($fileName, $moduleLabel = null) { $fileInfo = pathinfo($fileName); $currentModuleLabel = get_current_module_label(); $imgPath = array(); // Search kernel first for performance ! // claroline theme iconset $imgPath[get_current_iconset_path()] = get_current_iconset_url(); // claroline web/img <--- is now the default location find using get_current_iconset_url //$imgPath[get_path( 'rootSys' ) . 'web/img/'] = get_path('url') . '/web/img/'; if (!empty($moduleLabel)) { // module img directory $imgPath[get_module_path($moduleLabel) . '/img/'] = get_module_url($moduleLabel) . '/img/'; // module root directory $imgPath[get_module_path($moduleLabel) . '/'] = get_module_url($moduleLabel) . '/'; } if (!empty($currentModuleLabel)) { // module img directory $imgPath[get_module_path($currentModuleLabel) . '/img/'] = get_module_url($currentModuleLabel) . '/img/'; // module root directory $imgPath[get_module_path($currentModuleLabel) . '/'] = get_module_url($currentModuleLabel) . '/'; } // img directory in working directory $imgPath['./img/'] = './img/'; // working directory $imgPath['./'] = './'; if (!empty($fileInfo['extension'])) { $img = array($fileName); } else { $img = array($fileName . '.png', $fileName . '.gif'); } foreach ($imgPath as $tryPath => $tryUrl) { foreach ($img as $tryImg) { if (claro_debug_mode()) { pushClaroMessage("Try " . $tryPath . $tryImg, 'debug'); } if (file_exists($tryPath . $tryImg)) { if (claro_debug_mode()) { pushClaroMessage("Using " . $tryPath . $tryImg, 'debug'); } return $tryUrl . $tryImg . '?' . filemtime($tryPath . $tryImg); } } } if (claro_debug_mode()) { pushClaroMessage("Icon {$fileName} not found", 'error'); } // WORKAROUND : avoid double submission if missing image !!!! return 'image_not_found.png'; }
public function resolve(ResourceLocator $locator) { if ($locator->hasResourceId()) { $parts = explode('/', ltrim($locator->getResourceId(), '/')); if (count($parts) == 1) { $url = new Url(get_module_url('CLWIKI') . '/wiki.php'); $url->addParam('wikiId', (int) $parts[0]); return $url->toUrl(); } elseif (count($parts) == 2) { $url = new Url(get_module_url('CLWIKI') . '/page.php'); $url->addParam('wikiId', (int) $parts[0]); $url->addParam('title', $parts[1]); return $url->toUrl(); } else { return get_module_entry_url('CLWIKI'); } } else { return get_module_entry_url('CLWIKI'); } }
public function resolve(ResourceLocator $locator) { if ($locator->hasResourceId()) { if ($locator->inGroup()) { // $resourceElements = explode( '/', ltrim( $locator->getResourceId(), '/') ); return get_module_url('CLFRM') . "/viewtopic.php?topic=" . (int) ltrim($locator->getResourceId(), '/'); } else { $resourceElements = explode('/', ltrim($locator->getResourceId(), '/')); if (count($resourceElements) == 1) { return get_module_url('CLFRM') . "/viewforum.php?forum=" . (int) $resourceElements[0]; } elseif (count($resourceElements) == 2) { return get_module_url('CLFRM') . "/viewtopic.php?topic=" . (int) $resourceElements[1]; } else { return get_module_entry_url('CLFRM'); } } } else { return get_module_entry_url('CLFRM'); } }
/** * CLAROLINE * * @version $Revision: 13708 $ * @copyright (c) 2001-2011, Universite catholique de Louvain (UCL) * @license http://www.gnu.org/copyleft/gpl.html (GPL) GENERAL PUBLIC LICENSE * @package CLCAL * @subpackage CLRSS * @author Claro Team <*****@*****.**> */ function CLCAL_write_ical($iCal, $context) { if (is_array($context) && count($context) > 0) { $courseId = array_key_exists(CLARO_CONTEXT_COURSE, $context) ? $context[CLARO_CONTEXT_COURSE] : claro_get_current_course_id(); } if (false !== ($courseData = claro_get_course_data($courseId))) { $toolNameList = claro_get_tool_name_list(); require_once dirname(__FILE__) . '/../lib/agenda.lib.php'; $eventList = agenda_get_item_list($context, 'ASC'); $organizer = (array) array($courseData['titular'], $courseData['email']); $attendees = array(); $categories = array(get_conf('siteName'), $courseData['officialCode'], trim($toolNameList['CLCAL'])); foreach ($eventList as $thisEvent) { if ('SHOW' == $thisEvent['visibility']) { $eventDuration = isset($thisEvent['duration']) ? $thisEvent['duration'] : get_conf('defaultEventDuration', '60'); $startDate = strtotime($thisEvent['day'] . ' ' . $thisEvent['hour']); // Start Time (timestamp; for an allday event the startdate has to start at YYYY-mm-dd 00:00:00) $endDate = $startDate + $eventDuration; $iCal->addEvent($organizer, $startDate, $endDate, '', 0, $categories, trim(str_replace('<!-- content: html -->', '', $thisEvent['content'])), trim($thisEvent['title']), 1, $attendees, 5, 0, 0, 0, array(), 1, '', 0, 1, get_path('rootWeb') . get_module_url('CLCAL') . '/agenda.php?cidReq=' . $courseId . '&l#item' . $thisEvent['id'], get_locale('iso639_1_code'), ''); } } } return $iCal; }
public function loadFromModule($moduleLabel, $lib, $media = 'all') { $lib = secure_file_path($lib); $moduleLabel = secure_file_path($moduleLabel); if (!get_module_data($moduleLabel)) { pushClaroMessage(__CLASS__ . "::{$moduleLabel} does not exists", 'error'); return false; } if (claro_debug_mode()) { pushClaroMessage(__CLASS__ . "::Try to find {$lib} for {$moduleLabel}", 'debug'); } $cssPath = array(0 => array('path' => get_path('rootSys') . 'platform/css/' . $moduleLabel . '/' . $lib . '.css', 'url' => get_path('url') . '/platform/css/' . $moduleLabel . '/' . $lib . '.css'), 1 => array('path' => get_module_path($moduleLabel) . '/css/' . $lib . '.css', 'url' => get_module_url($moduleLabel) . '/css/' . $lib . '.css')); /*$path = get_module_path( $moduleLabel ) . '/css/' . $lib . '.css'; $url = get_module_url( $moduleLabel ) . '/css/' . $lib . '.css';*/ foreach ($cssPath as $cssTry) { $path = $cssTry['path']; $url = $cssTry['url']; if (claro_debug_mode()) { pushClaroMessage(__CLASS__ . "::Try {$path}::{$url} for {$moduleLabel}", 'debug'); } if (file_exists($path)) { if (array_key_exists($path, $this->css)) { return false; } $this->css[$path] = array('url' => $url . '?' . filemtime($path), 'media' => $media); if (claro_debug_mode()) { pushClaroMessage(__CLASS__ . "::Use {$path}::{$url} for {$moduleLabel}", 'debug'); } ClaroHeader::getInstance()->addHtmlHeader('<link rel="stylesheet" type="text/css"' . ' href="' . $url . '"' . ' media="' . $media . '" />'); return true; } else { if (claro_debug_mode()) { pushClaroMessage(__CLASS__ . "::Cannot found css {$lib} for {$moduleLabel}", 'error'); } return false; } } }
} // module_id if (isset($_GET['module_id']) && $_GET['module_id'] != '') { $_SESSION['module_id'] = $_GET['module_id']; } // use viewMode claro_set_display_mode_available(true); $is_allowedToEdit = claro_is_allowed_to_edit(); // as teacher //-- breadcrumbs if ($is_allowedToEdit) { ClaroBreadCrumbs::getInstance()->prepend(get_lang('Learning path'), Url::Contextualize(get_module_url('CLLNP') . '/learningPathAdmin.php')); } else { ClaroBreadCrumbs::getInstance()->prepend(get_lang('Learning path'), Url::Contextualize(get_module_url('CLLNP') . '/learningPath.php')); } ClaroBreadCrumbs::getInstance()->prepend(get_lang('Learning path list'), Url::Contextualize(get_module_url('CLLNP') . '/learningPathList.php')); $nameTools = get_lang('Module'); // tables names $tbl_cdb_names = claro_sql_get_course_tbl(); $TABLELEARNPATH = $tbl_cdb_names['lp_learnPath']; $TABLEMODULE = $tbl_cdb_names['lp_module']; $TABLELEARNPATHMODULE = $tbl_cdb_names['lp_rel_learnPath_module']; $TABLEASSET = $tbl_cdb_names['lp_asset']; $TABLEUSERMODULEPROGRESS = $tbl_cdb_names['lp_user_module_progress']; // exercises $tbl_quiz_exercise = $tbl_cdb_names['qwz_exercise']; $dbTable = $TABLEASSET; // for old functions of document tool //lib of this tool require_once get_path('incRepositorySys') . "/lib/learnPath.lib.inc.php"; require_once get_path('incRepositorySys') . "/lib/fileDisplay.lib.php";
foreach ($moduleList as $module) { //display settings... $class_css = $module['activation'] == 'activated' ? 'item' : 'invisible item'; //find icon if (file_exists(get_module_path($module['label']) . '/icon.png')) { $icon = '<img src="' . get_module_url($module['label']) . '/icon.png" />'; } elseif (file_exists(get_module_path($module['label']) . '/icon.gif')) { $icon = '<img src="' . get_module_url($module['label']) . '/icon.gif" />'; } else { $icon = '<small>' . get_lang('No icon') . '</small>'; } //module_id and icon column $out .= '<tr>' . '<td align="center">' . $icon . '</td>' . "\n"; //name column if (file_exists(get_module_path($module['label']) . '/admin.php')) { $out .= '<td align="left" class="' . $class_css . '" ><a href="' . get_module_url($module['label']) . '/admin.php" >' . $module['name'] . '</a></td>' . "\n"; } 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) {
} 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();
?> <small>(<?php echo get_lang('my group'); ?> )</small> <?php } ?> <?php } ?> <?php } else { ?> <a href="<?php echo claro_htmlspecialchars(Url::Contextualize(get_module_url('CLFRM') . '/viewforum.php?forum=' . $thisForum['forum_id'])); ?> "> <?php echo $displayName; ?> </a> <?php } ?> <?php if ($thisForum['forum_access'] == 0) { echo $lockedString; } ?> </span><br />
protected function renderFooter() { return get_lang('Messages posted') . ' : ' . $this->getUserTotalForumPost() . '<br />' . "\n" . get_lang('Topics started') . ' : ' . $this->getUserTotalForumTopics() . '<br />' . "\n" . '<a href="' . claro_htmlspecialchars(Url::Contextualize(get_module_url('CLFRM') . '/viewsearch.php?searchUser='******'">' . get_lang('View all user\'s posts') . '</a>' . "\n"; }
protected function renderContent() { if (isset($_REQUEST['exId']) && is_numeric($_REQUEST['exId'])) { $exId = (int) $_REQUEST['exId']; } else { $exId = null; } $exerciseResults = $this->prepareContent(); $jsloader = JavascriptLoader::getInstance(); $jsloader->load('jquery'); $context = array('cidReq' => $this->courseId, 'cidReset' => true, 'userId' => $this->userId); $html = '<script language="javascript" type="text/javascript">' . "\n" . ' $(document).ready(function() {' . ' $(\'.exerciseDetails\').hide();' . ' $(\'.exerciseDetailsToggle\').click( function()' . ' {' . ' $(this).next(".exerciseDetails").toggle();' . ' return false;' . ' });' . ' });' . '</script>' . "\n\n"; $html .= '<table class="claroTable emphaseLine" cellpadding="2" cellspacing="1" border="0" align="center" style="width: 99%;">' . "\n" . '<thead>' . "\n" . '<tr class="headerX">' . "\n" . '<th>' . get_lang('Exercises') . '</th>' . "\n" . '<th>' . get_lang('Worst score') . '</th>' . "\n" . '<th>' . get_lang('Best score') . '</th>' . "\n" . '<th>' . get_lang('Average score') . '</th>' . "\n" . '<th>' . get_lang('Average Time') . '</th>' . "\n" . '<th>' . get_lang('Attempts') . '</th>' . "\n" . '<th>' . get_lang('Last attempt') . '</th>' . "\n" . '</tr>' . "\n" . '</thead>' . "\n"; if (!empty($exerciseResults) && is_array($exerciseResults)) { $html .= '<tbody>' . "\n"; foreach ($exerciseResults as $result) { $html .= '<tr class="exerciseDetailsToggle">' . "\n" . '<td><a href="#">' . claro_htmlspecialchars($result['title']) . '</td>' . "\n" . '<td>' . (int) $result['minimum'] . '</td>' . "\n" . '<td>' . (int) $result['maximum'] . '</td>' . "\n" . '<td>' . round($result['average'] * 10) / 10 . '</td>' . "\n" . '<td>' . claro_html_duration(floor($result['avgTime'])) . '</td>' . "\n" . '<td>' . (int) $result['attempts'] . '</td>' . "\n" . '<td>' . claro_html_localised_date(get_locale('dateTimeFormatLong'), strtotime($result['lastAttempt'])) . "</td> \n"; $html .= '</tr>' . "\n"; // details $exerciseDetails = $this->getUserExerciceDetails($result['id']); if (is_array($exerciseDetails) && !empty($exerciseDetails)) { $html .= '<tr class="exerciseDetails" >'; if (claro_is_course_manager()) { $html .= '<td><a href="' . claro_htmlspecialchars(Url::Contextualize(get_module_url('CLQWZ') . '/track_exercise_reset.php?cmd=resetAllAttemptsForUser&exId=' . $result['id'], $context)) . '">' . get_lang('delete all') . '</a></td>'; } else { $html .= '<td> </td>' . "\n"; } $html .= '<td colspan="6" class="noHover">' . "\n" . '<table class="claroTable emphaseLine" cellspacing="1" cellpadding="2" border="0" width="100%" style="width: 99%;">' . "\n" . '<thead>' . "\n"; $html .= '' . '<tr>' . "\n" . '<th><small>' . get_lang('Date') . '</small></th>' . "\n" . '<th><small>' . get_lang('Score') . '</small></th>' . "\n" . '<th><small>' . get_lang('Time') . '</small></th>' . "\n" . '<th><small>' . get_lang('Delete') . '</small></th>' . "\n" . '</tr>' . "\n" . '</thead>' . "\n" . '<tbody>' . "\n"; foreach ($exerciseDetails as $details) { $html .= '<tr>' . "\n" . '<td><small>' . "\n" . '<a href="' . get_module_url('CLQWZ') . '/track_exercise_details.php?trackedExId=' . $details['id'] . '">' . claro_html_localised_date(get_locale('dateTimeFormatLong'), strtotime($details['date'])) . '</a></small></td>' . "\n" . '<td><small>' . $details['result'] . '/' . $details['weighting'] . '</small></td>' . "\n" . '<td><small>' . claro_html_duration($details['time']) . '</small></td>' . "\n"; if (claro_is_course_manager()) { $html .= '<td><small><a href="' . claro_htmlspecialchars(Url::Contextualize(get_module_url('CLQWZ') . '/track_exercise_reset.php?cmd=resetAttemptForUser&trackId=' . $details['id'], $context)) . '">' . get_lang('delete') . '</a></small></td>' . "\n"; } else { $html .= '<td><small>-</small></td>'; } $html .= '</tr>' . "\n"; } $html .= '</tbody>' . "\n" . '</table>' . "\n\n" . '</td>' . "\n" . '</tr>' . "\n"; } } $html .= '</tbody>' . "\n"; } else { $html .= '<tbody>' . "\n" . '<tr>' . "\n" . '<td colspan="7" align="center">' . get_lang('No result') . '</td>' . "\n" . '</tr>' . "\n" . '</tbody>' . "\n"; } $html .= '</table>' . "\n\n"; return $html; }
} $toolLinkList = array(); foreach ($toolList as $thisTool) { if (!array_key_exists($thisTool['label'], $_groupProperties['tools'])) { continue; } // special case when display mode is student and tool invisible doesn't display it if (!claro_is_allowed_to_edit()) { if (!$_groupProperties['tools'][$thisTool['label']]) { continue; } } if (!empty($thisTool['label'])) { $label = $toolNameList[$thisTool['label']]; $toolName = get_lang($label); $url = trim(get_module_url($thisTool['label']) . '/' . $thisTool['url']); } elseif (!empty($thisTool['name'])) { $toolName = $thisTool['name']; $url = trim($thisTool['url']); } else { $toolName = '<i>no name</i>'; $url = trim($thisTool['url']); } if (!empty($thisTool['icon'])) { $icon = get_icon_url($thisTool['icon'], $thisTool['label']); } else { $icon = get_icon_url('tool'); } $style = ''; // patchy if (claro_is_platform_admin() || claro_is_course_manager()) {
// end if is_image $out .= '<img src="' . get_icon_url($image) . '" alt="" /> ' . $dspFileName . '</a>' . '</td>' . "\n" . '<td><small>' . $size . '</small></td>' . "\n" . '<td><small>' . $date . '</small></td>' . "\n"; /* NB : Before tracking implementation the url above was simply * "<a href=\"",$urlFileName,"\"",$style,">" */ if ($is_allowedToEdit) { /* EDIT COMMAND */ $out .= '<td>' . '<a href="' . claro_htmlspecialchars(Url::Contextualize($_SERVER['PHP_SELF'] . '?cmd=rqEdit&file=' . $cmdFileName)) . '">' . '<img src="' . get_icon_url('edit') . '" alt="' . get_lang('Modify') . '" />' . '</a>' . '</td>' . "\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 ($textOrFilePresent && ($showAfterEndDate || $showAfterPost)) { $out .= '<fieldset>' . "\n" . '<legend>' . '<b>' . get_lang('Feedback') . '</b>' . '</legend>'; if ($assignment->getAutoFeedbackText() != '') { $out .= claro_parse_user_text($assignment->getAutoFeedbackText()); } if ($assignment->getAutoFeedbackFilename() != '') { $target = get_conf('open_submitted_file_in_new_window') ? 'target="_blank"' : ''; $out .= '<p><a href="' . claro_htmlspecialchars(Url::Contextualize($assignment->getAssigDirWeb() . $assignment->getAutoFeedbackFilename())) . '" ' . $target . '>' . $assignment->getAutoFeedbackFilename() . '</a></p>'; } $out .= '</fieldset>' . '<br />' . "\n"; } if ($is_allowedToEditAll) { // Submission download requested if ($cmd == 'rqDownload' && (claro_is_platform_admin() || get_conf('allow_download_all_submissions'))) { require_once $includePath . '/lib/form.lib.php'; $downloadForm = '<strong>' . get_lang('Download') . '</strong>' . "\n" . '<form action="' . get_module_url('CLWRK') . '/export.php?assigId=' . $req['assignmentId'] . '" method="POST">' . "\n" . claro_form_relay_context() . '<input type="hidden" name="cmd" value="exDownload" />' . "\n" . '<input type="radio" name="downloadMode" id="downloadMode_from" value="from" checked /><label for="downloadMode_from">' . get_lang('Submissions posted or modified after date :') . '</label><br />' . "\n" . claro_html_date_form('day', 'month', 'year', time(), 'long') . ' ' . claro_html_time_form('hour', 'minute', time() - fmod(time(), 86400) - 3600) . '<small>' . get_lang('(d/m/y hh:mm)') . '</small>' . '<br /><br />' . "\n" . '<input type="radio" name="downloadMode" id="downloadMode_all" value="all" /><label for="downloadMode_all">' . get_lang('All submissions') . '</label><br /><br />' . "\n" . '<input type="checkbox" name="downloadOnlyCurrentMembers" id="downloadOnlyCurrentMembers_id" value="yes" checked="checked" /><label for="downloadOnlyCurrentMembers_id">' . get_lang('Download only submissions from current course members') . '</label><br /><br />' . "\n" . '<input type="checkbox" name="downloadScore" id="downloadScore_id" value="yes" checked="checked" /><label for="downloadScore_id">' . get_lang('Download score') . '</label><br /><br />' . "\n" . '<input type="submit" value="' . get_lang('OK') . '" /> ' . "\n" . claro_html_button('work_list.php?assigId=' . $req['assignmentId'], get_lang('Cancel')) . '</form>' . "\n"; $dialogBox->form($downloadForm); } } // Render dialog box $out .= $dialogBox->render(); /** * Submitter (User or group) listing */ $headerUrl = $workPager->get_sort_url_list(Url::Contextualize($_SERVER['PHP_SELF'] . '?assigId=' . $req['assignmentId'])); $out .= $workPager->disp_pager_tool_bar(Url::Contextualize($_SERVER['PHP_SELF'] . "?assigId=" . $req['assignmentId'])) . '<table class="claroTable emphaseLine" width="100%">' . "\n" . '<thead>' . "\n" . '<tr class="headerX">' . "\n" . '<th>' . '<a href="' . $headerUrl['name'] . '">' . get_lang('Author(s)') . '</a>' . '</th>' . "\n" . '<th>' . '<a href="' . $headerUrl['last_edit_date'] . '">' . get_lang('Last submission') . '</a>' . '</th>' . "\n" . '<th>' . '<a href="' . $headerUrl['submissionCount'] . '">' . get_lang('Submissions') . '</a>' . '</th>' . "\n" . '<th>' . '<a href="' . $headerUrl['feedbackCount'] . '">' . get_lang('Feedbacks') . '</a>' . '</th>' . "\n"; if ($is_allowedToEditAll) { $out .= '<th>' . '<a href="' . $headerUrl['maxScore'] . '">' . get_lang('Best score') . '</a>' . '</th>' . "\n"; } $out .= '</tr>' . "\n" . '</thead>' . "\n" . '<tbody>'; foreach ($workList as $thisWrk) {
// list wiki case 'list': $toolTitle['mainTitle'] = sprintf(get_lang("Wiki : %s"), get_lang("List of Wiki")); break; } // Help URL $helpUrl = claro_htmlspecialchars(get_help_page_url('blockWikiHelpAdminContent', 'CLWIKI')); // Command list $cmdList = array(); switch ($action) { // an error occurs case 'error': break; case 'exExport': $out .= '<blockquote>' . get_lang("Wiki %TITLE% exported to course documents. (this file is visible)", array('%TITLE%' => $wikiTitle)) . '</blockquote>'; $cmdList[] = array('name' => get_lang("Go to documents tool"), 'url' => claro_htmlspecialchars(Url::Contextualize(get_module_url('CLDOC') . '/document.php?gidReset=1'))); $cmdList[] = array('name' => get_lang("Go back to Wiki list"), 'url' => claro_htmlspecialchars(Url::Contextualize($_SERVER['PHP_SELF']))); break; // edit form // edit form case 'rqEdit': $out .= claro_disp_wiki_properties_form($wikiId, $wikiTitle, $wikiDesc, $groupId, $wikiACL); break; // delete form // delete form case 'rqDelete': $out .= '<form method="post" action="' . claro_htmlspecialchars(Url::Contextualize($_SERVER['PHP_SELF'])) . '" id="rqDelete">' . "\n" . '<div style="padding: 5px">' . "\n" . '<input type="hidden" name="wikiId" value="' . $wikiId . '" />' . "\n" . claro_form_relay_context() . "\n" . '<input type="submit" name="action[exDelete]" value="' . get_lang("Continue") . '" />' . "\n" . claro_html_button(claro_htmlspecialchars(Url::Contextualize($_SERVER['PHP_SELF'])), get_lang("Cancel")) . '</div>' . "\n" . '</form>' . "\n"; break; // list wiki // list wiki case 'exSearch':
echo $this->is_allowedToEdit ? 9 : 6; ?> " align="center"> <?php echo $this->forumSettings['forum_access'] == 2 ? get_lang('There are no topics for this forum. You can post one') : get_lang('There are no topics for this forum.'); ?> </td> </tr> <?php } else { foreach ($this->topicList as $thisTopic) { ?> <tr> <?php $itemClass = claro_is_user_authenticated() && $this->claro_notifier->is_a_notified_ressource(claro_get_current_course_id(), $this->claro_notifier->get_notification_date(claro_get_current_user_id()), claro_get_current_user_id(), claro_get_current_group_id(), claro_get_current_tool_id(), $this->forumId . "-" . $thisTopic['topic_id'], FALSE) ? 'item hot' : 'item'; $itemLink = claro_htmlspecialchars(Url::Contextualize(get_module_url('CLFRM') . '/viewtopic.php?topic=' . $thisTopic['topic_id'] . (is_null($this->forumSettings['idGroup']) ? '' : '&gidReq =' . $this->forumSettings['idGroup']))); ?> <td> <span class="<?php echo $itemClass; ?> "> <img src="<?php echo get_icon_url('topic'); ?> " alt="" /> <a href="<?php echo $itemLink; ?> "><?php echo $thisTopic['topic_title'];
*/ $tbl_cdb_names = claro_sql_get_course_tbl(); $tbl_mdb_names = claro_sql_get_main_tbl(); $tbl_user = $tbl_mdb_names['user']; $tbl_lp_learnPath = $tbl_cdb_names['lp_learnPath']; $tbl_lp_rel_learnPath_module = $tbl_cdb_names['lp_rel_learnPath_module']; $tbl_lp_user_module_progress = $tbl_cdb_names['lp_user_module_progress']; $tbl_lp_module = $tbl_cdb_names['lp_module']; $tbl_lp_asset = $tbl_cdb_names['lp_asset']; $TABLELEARNPATH = $tbl_lp_learnPath; $TABLEMODULE = $tbl_lp_module; $TABLELEARNPATHMODULE = $tbl_lp_rel_learnPath_module; $TABLEASSET = $tbl_lp_asset; $TABLEUSERMODULEPROGRESS = $tbl_lp_user_module_progress; $TABLEUSERS = $tbl_user; $TOCurl = Url::Contextualize(get_module_url('CLLNP') . '/navigation/tableOfContent.php'); /*********************/ /* HANDLING API FORM */ /*********************/ // handling of the API form if posted by the SCORM API if ($_POST['ump_id']) { // set values for some vars because we are not sure we will change it later $lesson_status_value = strtoupper($_POST['lesson_status']); $credit_value = strtoupper($_POST['credit']); // next visit of the sco will not be the first so entry must be setted to RESUME $entry_value = "RESUME"; // Set lesson status to COMPLETED if the SCO didn't change it itself. if ($lesson_status_value == "NOT ATTEMPTED") { $lesson_status_value = "COMPLETED"; } // set credit if needed
* @author Quentin Devos <*****@*****.**> * * @package MOBILE * */ $tlabelReq = 'MOBILE'; if (count(get_included_files()) == 1) { die('---'); } if (get_conf('activeWebService', true)) { $iOSimg = 'alt="Claroline Mobile on Apple iOS App Store" ' . 'id="ios_bagde" width="150" height="50" />'; $Andimg = 'alt="Claroline Mobile on Android Google Play Store" ' . 'id="and_bagde" width="150" height="52" />'; $WPimg = 'alt="Claroline Mobile on Microsoft WindowsPhone MarketPlace" ' . 'id="wp_bagde" width="150" height="49" />'; if (get_conf('iOSAppReady', true)) { $iOSlink = '<a href="' . get_conf('iOSAppLink', '') . '" alt="Claroline Mobile on Apple iOS App Store" target="_blank">' . '<img src="' . get_module_url('MOBILE') . '/img/ios_badge.png" ' . $iOSimg . '</a>'; } else { $iOSlink = '<img src="' . get_module_url('MOBILE') . '/img/ios_badge_soon.png" ' . $iOSimg; } if (get_conf('AndAppReady', true)) { $Andlink = '<a href="' . get_conf('AndAppLink', '') . '" alt="Claroline Mobile on Android Google Play Store" target="_blank">' . '<img src="' . get_module_url('MOBILE') . '/img/and_badge.png" ' . $Andimg . '</a>'; } else { $Andlink = '<img src="' . get_module_url('MOBILE') . '/img/and_badge_soon.png" ' . $Andimg; } if (get_conf('WPAppReady', true)) { $WPlink = '<a href="' . get_conf('WPAppLink', '') . '" alt="Claroline Mobile on Microsoft WindowsPhone MarketPlace" target="_blank">' . '<img src="' . get_module_url('MOBILE') . '/img/wp_badge.png" ' . $WPimg . '</a>'; } else { $WPlink = '<img src="' . get_module_url('MOBILE') . '/img/wp_badge_soon.png" ' . $WPimg; } $html = "\n\n" . '<div class="header">' . 'Claroline Mobile' . '</div>' . "\n</br>" . get_lang('Get the Claroline application for your smartphone !') . "\n" . '<div style="text-align:center"></br>' . $iOSlink . "\n" . $Andlink . "\n" . $WPlink . "\n" . "</div>\n" . '<button onclick="javascript:window.open(\'' . get_module_url('MOBILE') . '/popup.php\', \'' . addslashes(get_lang('Need help for the configuration ?')) . '\',\'scrollbars=no,toolbar=no,menubar=no,status=no,width=800,height=530\');" >' . get_lang('Need help for the configuration ?') . '</button>' . "\n\n"; $claro_buffer->append($html); }
/** * 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; }
/* * Output */ if (!is_null($exId)) { ClaroBreadCrumbs::getInstance()->prepend(get_lang('Exercise'), Url::Contextualize('./edit_exercise.php?exId=' . $exId)); ClaroBreadCrumbs::getInstance()->setCurrent(get_lang('Question pool'), Url::Contextualize($_SERVER['PHP_SELF'] . '?exId=' . $exId)); $pagerUrl = Url::Contextualize($_SERVER['PHP_SELF'] . '?exId=' . $exId); } else { if (!is_null($categoryId)) { $pagerUrl = Url::Contextualize($_SERVER['PHP_SELF'] . '?filter=' . $filter); } else { ClaroBreadCrumbs::getInstance()->setCurrent(get_lang('Question pool'), Url::Contextualize($_SERVER['PHP_SELF'])); $pagerUrl = Url::Contextualize($_SERVER['PHP_SELF']); } } ClaroBreadCrumbs::getInstance()->prepend(get_lang('Exercises'), Url::Contextualize(get_module_url('CLQWZ') . '/exercise.php')); $nameTools = get_lang('Question pool'); // Tool list $toolList = array(); if (!is_null($exId)) { $toolList[] = array('img' => 'back', 'name' => get_lang('Go back to the exercise'), 'url' => claro_htmlspecialchars(Url::Contextualize('edit_exercise.php?exId=' . $exId))); } $toolList[] = array('img' => 'default_new', 'name' => get_lang('New question'), 'url' => claro_htmlspecialchars(Url::Contextualize('edit_question.php?cmd=rqEdit'))); $out = ''; $out .= claro_html_tool_title($nameTools, null, $toolList); $out .= $dialogBox->render(); //-- filter listbox $attr['onchange'] = 'filterForm.submit()'; $out .= "\n" . '<form method="get" name="filterForm" action="question_pool.php">' . "\n" . '<input type="hidden" name="exId" value="' . $exId . '" />' . "\n" . claro_form_relay_context() . "\n" . '<p align="right">' . "\n" . '<label for="filter">' . get_lang('Filter') . ' : </label>' . "\n" . claro_html_form_select('filter', $filterList, $filter, $attr) . "\n" . '<noscript>' . "\n" . '<input type="submit" value="' . get_lang('Ok') . '" />' . "\n" . '</noscript>' . "\n" . '</p>' . "\n" . '</form>' . "\n\n"; //-- pager $out .= $myPager->disp_pager_tool_bar($pagerUrl);
<label for="email"><?php echo get_lang('Email'); ?> </label> : </dt> <dd class="moreOptions"> <input type="text" size="40" id="email" name="email" value="" /> </dd> <dt> </dt> <dd> <input type="submit" name="applySearch" id="applySearch" value="<?php echo get_lang("Search"); ?> " /> <a href="<?php echo claro_htmlspecialchars(Url::Contextualize(get_module_url('CLUSR'))); ?> "> <input type="button" value="<?php echo get_lang('Cancel'); ?> " /> </a> </dd> </dl> </fieldset> </form>