/** * 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(); }
/** * Display form * * @param $cancelUrl string url of the cancel button * @return string html output of form */ public function displayForm($cancelUrl = null) { JavascriptLoader::getInstance()->load('course_form'); $languageList = get_language_to_display_list('availableLanguagesForCourses'); $categoriesList = claroCategory::getAllCategoriesFlat(); $linkedCategoriesListHtml = ''; // Categories linked to the course $unlinkedCategoriesListHtml = ''; // Other categories (not linked to the course) foreach ($categoriesList as $category) { // Is that category linked to the current course or not ? $match = false; foreach ($this->categories as $searchCategory) { if ($category['id'] == (int) $searchCategory->id) { $match = true; break; } else { $match = false; } } // Dispatch in the lists if ($match) { $linkedCategoriesListHtml .= '<option ' . (!$category['visible'] ? 'class="hidden" ' : '') . 'value="' . $category['id'] . '">' . $category['path'] . '</option>' . "\n"; } else { if ($category['canHaveCoursesChild'] || claro_is_platform_admin()) { $unlinkedCategoriesListHtml .= '<option ' . (!$category['visible'] ? 'class="hidden" ' : '') . 'value="' . $category['id'] . '">' . $category['path'] . '</option>' . "\n"; } } } $publicDisabled = !(get_conf('allowPublicCourses', true) || claro_is_platform_admin()) ? ' disabled="disabled"' : ''; $publicCssClass = !(get_conf('allowPublicCourses', true) || claro_is_platform_admin()) ? ' class="notice"' : ''; $publicMessage = $this->access != 'public' && !(get_conf('allowPublicCourses', true) || claro_is_platform_admin()) ? '<br /><span class="notice">' . get_lang('If you need to create a public course, please contact the platform administrator') . '</span>' : ''; $cancelUrl = is_null($cancelUrl) ? get_path('clarolineRepositoryWeb') . 'course/index.php?cid=' . claro_htmlspecialchars($this->courseId) : $cancelUrl; $template = new CoreTemplate('course_form.tpl.php'); $template->assign('formAction', $_SERVER['PHP_SELF']); $template->assign('relayContext', claro_form_relay_context()); $template->assign('course', $this); $template->assign('linkedCategoriesListHtml', $linkedCategoriesListHtml); $template->assign('unlinkedCategoriesListHtml', $unlinkedCategoriesListHtml); $template->assign('languageList', $languageList); $template->assign('publicDisabled', $publicDisabled); $template->assign('publicCssClass', $publicCssClass); $template->assign('publicMessage', $publicMessage); $template->assign('cancelUrl', $cancelUrl); $template->assign('nonRootCategoryRequired', !get_conf('clcrs_rootCategoryAllowed', true)); return $template->render(); }
// $Id: index.php 12441 2010-06-11 14:34:16Z abourguignon $ /** * CLAROLINE * * @version 1.10 $Revision: 12441 $ * @copyright (c) 2001-2011, Universite catholique de Louvain (UCL) * @license http://www.gnu.org/copyleft/gpl.html (GPL) GENERAL PUBLIC LICENSE * @package CLHOME * @author Claro Team <*****@*****.**> */ require '../inc/claro_init_global.inc.php'; require_once get_path('incRepositorySys') . '/lib/claroCourse.class.php'; include claro_get_conf_repository() . 'rss.conf.php'; $cid = isset($_REQUEST['cid']) ? $_REQUEST['cid'] : ''; $nameTools = get_lang('Manage session courses'); if (!claro_is_in_a_course() || !claro_is_course_allowed()) { claro_disp_auth_form(true); } $toolRepository = get_path('clarolineRepositoryWeb'); claro_set_display_mode_available(TRUE); if (!empty($cid)) { $course = new ClaroCourse(); $course->load(ClaroCourse::getCodeFromId($cid)); } $sessionCourses = $course->getSessionCourses(); // Display header $template = new CoreTemplate('session_courses.tpl.php'); $template->assign('sessionCourses', $sessionCourses); $template->assign('courseId', $course->id); $claroline->display->body->setContent($template->render()); echo $claroline->display->render();
} if (isset($_REQUEST['officialCode'])) { $userName = $_REQUEST['officialCode']; } else { $officialCode = ''; } if (isset($_REQUEST['mail'])) { $mail = $_REQUEST['mail']; } else { $mail = ''; } $action_list[get_lang('All')] = 'all'; $action_list[get_lang('Student')] = 'followcourse'; $action_list[get_lang('Course creator')] = 'createcourse'; $action_list[get_lang('Platform administrator')] = 'plateformadmin'; //header and bredcrump display ///////////// // OUTPUT $out = ''; $out .= claro_html_tool_title($nameTools . ' : '); $tpl = new CoreTemplate('advanced_user_search.tpl.php'); $tpl->assign('lastName', $lastName); $tpl->assign('firstName', $firstName); $tpl->assign('userName', $userName); $tpl->assign('officialCode', $officialCode); $tpl->assign('mail', $mail); $tpl->assign('action', $action); $tpl->assign('action_list', $action_list); $out .= $tpl->render(); $claroline->display->body->appendContent($out); echo $claroline->display->render();
$template->assign('dialogBox', $dialogBox); $template->assign('formAction', $formAction); $template->assign('sourceUrl', $sourceUrl); $template->assign('sourceCid', $sourceCid); $template->assign('sourceGid', $sourceGid); $template->assign('cidRequired', $cidRequired); $template->assign('defaultLoginValue', $defaultLoginValue); $template->assign('sourceUrl', $sourceUrl); $claroline->display->body->appendContent($template->render()); echo $claroline->display->render(); } elseif (!claro_is_in_a_course() && $cidRequired) { $tbl = claro_sql_get_main_tbl(); $sql = "\n SELECT c.code AS `value`,\n CONCAT(c.intitule,' (',c.administrativeNumber,')') AS `name`\n FROM `" . $tbl['course'] . "` AS c ,\n `" . $tbl['rel_course_user'] . "` AS cu\n WHERE c.code = cu.code_cours\n AND cu.user_id = " . (int) claro_get_current_user_id(); $courseList = claro_sql_query_fetch_all($sql); $template = new CoreTemplate('select_course_form.tpl.php'); $template->assign('formAction', $_SERVER['PHP_SELF']); $template->assign('sourceUrl', $sourceUrl); $template->assign('sourceCid', $sourceCid); $template->assign('sourceGid', $sourceGid); $template->assign('cidRequired', $cidRequired); $template->assign('courseList', $courseList); $claroline->display->body->appendContent($template->render()); echo $claroline->display->render(); } else { if (!isset($userLoggedOnCas)) { $userLoggedOnCas = false; } $claroline->notifier->event('user_login', array('data' => array('ip' => $_SERVER['REMOTE_ADDR']))); if (claro_is_in_a_course() && !claro_is_course_allowed()) { $out = ''; if ($_course['registrationAllowed']) {
} if ($portlet['label'] == 'mycourselist') { continue; } $plabel = $portlet['label']; $portlet = new $plabel($plabel); if (!$portlet instanceof UserDesktopPortlet) { pushClaroMessage("{$portlet['label']} is not a valid user desktop portlet !"); continue; } $outPortlet .= $portlet->render(); } catch (Exception $e) { $portletDialog = new DialogBox(); $portletDialog->error(get_lang('An error occured while loading the portlet : %error%', array('%error%' => $e->getMessage()))); $outPortlet .= '<div class="claroBlock portlet">' . '<h3 class="blockHeader">' . "\n" . $portlet->renderTitle() . '</h3>' . "\n" . '<div class="claroBlockContent">' . "\n" . $portletDialog->render() . '</div>' . "\n" . '</div>' . "\n\n"; } } } else { $dialogBox->error(get_lang('Cannot load portlet list')); } // Generate Script Output CssLoader::getInstance()->load('desktop', 'all'); $template = new CoreTemplate('user_desktop.tpl.php'); $userProfileBox = new UserProfileBox(false); $myCourseList = new MyCourseList(); $template->assign('dialogBox', $dialogBox); $template->assign('userProfileBox', $userProfileBox); $template->assign('outPortlet', $outPortlet); $template->assign('mycourselist', $myCourseList->render()); $claroline->display->body->appendContent($template->render()); echo $claroline->display->render();
public function render() { $tpl = new CoreTemplate('course_tree_node_deactivated.tpl.php'); $tpl->assign('node', $this->courseTreeNode); $tpl->assign('courseUserPrivilegesList', $this->courseUserPrivilegesList); $tpl->assign('notifiedCourseList', $this->notifiedCourseList); $tpl->assign('viewOptions', $this->viewOptions); return $tpl->render(); }
/** * @return template object * @since 1.10 */ function getTemplate() { $currentCategory = $this->get_current_category_settings(); $categoriesList = $this->get_sub_category_list(); $coursesList = !is_null(claro_get_current_user_id()) ? $this->getCoursesWithoutSourceCourses() : $this->getCoursesWithoutSessionCourses(); $template = new CoreTemplate('platform_courses.tpl.php'); $template->assign('currentCategory', $currentCategory); $template->assign('categoryBrowser', $this); $template->assign('categoriesList', $categoriesList); $template->assign('coursesList', $coursesList); return $template; }
$result = Claroline::getDatabase()->query($sql); $result->setFetchMode(Database_ResultSet::FETCH_ASSOC); // Create html options lists $userNotInGroupListHtml = ''; foreach ($result as $member) { $label = claro_htmlspecialchars(ucwords(strtolower($member['lastName'])) . ' ' . ucwords(strtolower($member['firstName'])) . ($member['role'] != '' ? ' (' . $member['role'] . ')' : '')) . ($nbMaxGroupPerUser > 1 ? ' (' . $member['nbg'] . ')' : ''); $userNotInGroupListHtml .= '<option value="' . $member['user_id'] . '">' . $label . '</option>' . "\n"; } $usersInGroupList = get_group_member_list(); $usersInGroupListHtml = ''; foreach ($usersInGroupList as $key => $val) { $usersInGroupListHtml .= '<option value="' . $key . '">' . $val . '</option>' . "\n"; } $thisGroupMaxMember = is_null($myStudentGroup['maxMember']) ? '-' : $myStudentGroup['maxMember']; $template = new CoreTemplate('group_form.tpl.php'); $template->assign('formAction', claro_htmlspecialchars($_SERVER['PHP_SELF'] . '?edit=yes&gidReq=' . claro_get_current_group_id())); $template->assign('relayContext', claro_form_relay_context()); $template->assign('groupName', claro_htmlspecialchars($myStudentGroup['name'])); $template->assign('groupId', claro_get_current_group_id()); $template->assign('groupDescription', claro_htmlspecialchars($myStudentGroup['description'])); $template->assign('groupTutorId', $myStudentGroup['tutorId']); $template->assign('groupUserLimit', claro_htmlspecialchars($thisGroupMaxMember)); $template->assign('tutorList', $tutor_list); $template->assign('usersInGroupListHtml', $usersInGroupListHtml); $template->assign('userNotInGroupListHtml', $userNotInGroupListHtml); $out = ''; $out .= claro_html_tool_title(array('supraTitle' => get_lang("Groups"), 'mainTitle' => $nameTools)); $out .= $dialogBox->render(); $out .= $template->render(); $claroline->display->body->appendContent($out); echo $claroline->display->render();
break; /*--------------------------------------------------------------------- Display user courses in order to unenroll (default display) ---------------------------------------------------------------------*/ /*--------------------------------------------------------------------- Display user courses in order to unenroll (default display) ---------------------------------------------------------------------*/ case DISPLAY_USER_COURSES: $out .= claro_html_tool_title(array('mainTitle' => get_lang('User\'s course') . ' : ' . $userInfo['firstname'] . ' ' . $userInfo['lastname'], 'subTitle' => get_lang('Remove course from your personal course list'))) . $dialogBox->render() . $courseListView->render(); break; case DISPLAY_REGISTRATION_KEY_FORM: $courseData = claro_get_course_data($_REQUEST['course']); $courseName = $courseData['name']; $out .= claro_html_tool_title(array('mainTitle' => get_lang('User\'s course') . ' : ' . $userInfo['firstname'] . ' ' . $userInfo['lastname'], 'subTitle' => get_lang('Enrol to %course', array('%course' => $courseName)))); $template = new CoreTemplate('course_registration_key_form.tpl.php'); $template->assign('formAction', Url::Contextualize($_SERVER['PHP_SELF'])); $template->assign('courseCode', $courseCode); $dialogBox->form($template->render()); $out .= $dialogBox->render(); break; case DISPLAY_REGISTRATION_DISABLED_FORM: if (empty($courseData['email'])) { $courseData['email'] = get_conf('administrator_email'); } if (empty($courseData['titular'])) { $courseData['titular'] = get_conf('administrator_name'); } $out .= $dialogBox->render(); break; } // end of switch ($displayMode)
// Communication's administration menu $menu['Communication'][] = '<a href="../messaging/admin.php">' . get_lang('Internal messaging') . '</a>'; $adminModuleList = get_admin_module_list(true); if (count($adminModuleList) > 0) { foreach ($adminModuleList as $module) { language::load_module_translation($module['label']); $menu['ExtraTools'][] = '<a href="' . get_module_entry_url($module['label']) . '">' . get_lang($module['name']) . '</a>'; } } // Deal with interbreadcrumbs and title variable $nameTools = get_lang('Administration'); // No sense because not allowed with claro_is_platform_admin(), // but claro_is_platform_admin() should be later replaced by // get_user_property ('can view admin menu') $is_allowedToAdmin = claro_is_platform_admin(); // Is our installation system accessible ? if (file_exists('../install/index.php') && !file_exists('../install/.htaccess')) { // If yes, warn the administrator $dialogBox->warning(get_block('blockWarningRemoveInstallDirectory')); } $register_globals_value = ini_get('register_globals'); // Is the php 'register_globals' param enable ? if (!empty($register_globals_value) && strtolower($register_globals_value) != 'off') { // If yes, warn the administrator $dialogBox->warning(get_lang('<b>Security :</b> We recommend to set register_globals to off in php.ini')); } $template = new CoreTemplate('admin_panel.tpl.php'); $template->assign('dialogBox', $dialogBox); $template->assign('menu', $menu); $claroline->display->body->appendContent($template->render()); echo $claroline->display->render();
case 'exVisibility': $category = new claroCategory(null, null, null, null, null, null, null, null); if ($category->load($id)) { if ($category->swapVisibility()) { $dialogBox->success(get_lang('Category\'s visibility modified')); } else { switch (claro_failure::get_last_failure()) { case 'category_not_found': $dialogBox->error(get_lang('Error : Category not found')); break; } } } else { $dialogBox->error(get_lang('Category not found')); } break; } // Get categories $categories = claroCategory::getAllCategories(); // Command list $cmdList = array(); $cmdList[] = array('img' => 'category_new', 'name' => get_lang('Create a category'), 'url' => $_SERVER['PHP_SELF'] . '?cmd=rqAdd'); // Display $template = new CoreTemplate('admin_category.tpl.php'); $template->assign('title', claro_html_tool_title($nameTools, null, $cmdList)); $template->assign('dialogBox', $dialogBox); $template->assign('categories', $categories); // Append output Claroline::getDisplay()->body->appendContent($template->render()); // Generate output echo Claroline::getDisplay()->render();
$language_list = claro_get_lang_flat_list(); $language_list = array_merge(array(get_lang('All') => ''), $language_list); // Structure the categories array as follow: array(category_label => category_value) $structuredCatArray = array(get_lang('All') => ''); // Default choice foreach ($category_array as $category) { $structuredCatArray[$category['path']] = $category['id']; } //---------------------------------- // DISPLAY //---------------------------------- $out = ''; //tool title $out .= claro_html_tool_title($nameTools . ' : '); $tpl = new CoreTemplate('advanced_course_search.tpl.php'); $tpl->assign('code', $code); $tpl->assign('intitule', $intitule); $tpl->assign('category_array', $structuredCatArray); $tpl->assign('language_list', $language_list); $tpl->assign('access', $access); $tpl->assign('subscription', $subscription); $tpl->assign('visibility', $visibility); $out .= $tpl->render(); $claroline->display->body->appendContent($out); echo $claroline->display->render(); //NEEDED FUNCTION (to be moved in libraries) /** *This function create de select box to choose categories * * @author - < Benoît Muret > * @param - elem array : the faculties
/** * Display form to edit or add user to the platform. * * @param $userId int */ function user_html_form($userId = null) { // If the user exists (given user id) if (!empty($userId)) { // Get user's general informations $userData = user_get_properties($userId); // Get user's skype account $userData['skype'] = get_user_property($userId, 'skype'); // Get user's picture $picturePath = user_get_picture_path($userData); if ($picturePath && file_exists($picturePath)) { $pictureUrl = user_get_picture_url($userData); } else { $pictureUrl = ''; } // Get current language $currentLanguage = !empty($userData['language']) ? $userData['language'] : language::current_language(); // A few javascript $htmlHeadXtra[] = '<script type="text/javascript"> function confirmation (name) { if (confirm("' . clean_str_for_javascript(get_lang('Are you sure to delete')) . '"+ name + "?")) {return true;} else {return false;} } $(document).ready(function(){ $("#delete").click(function(){ return confirmation("' . $userData['firstname'] . " " . $userData['lastname'] . '"); }).attr("href","adminuserdeleted.php?uidToEdit=' . $userId . '&cmd=exDelete"); }); </script>'; } else { // Initialize user's data $userData = user_initialise(); // No user's picture $pictureUrl = ''; // Prefered language $currentLanguage = language::current_language(); } // Editable fields if (empty($userId) || claro_is_platform_admin()) { $editableFields = array('name', 'official_code', 'login', 'password', 'email', 'phone', 'language', 'picture', 'skype'); if (claro_is_platform_admin()) { $editableFields[] = 'authSource'; } } else { $editableFields = AuthProfileManager::getUserAuthProfile($userId)->getEditableProfileFields(); // get_conf('profile_editable'); // pushClaroMessage(var_export($editableFields,true), 'debug'); } if (!empty($_SERVER['HTTP_REFERER'])) { $cancelUrl = $_SERVER['HTTP_REFERER']; } else { $cancelUrl = $_SERVER['PHP_SELF']; } // Hack to prevent autocompletion of password fields from browser $htmlHeadXtra[] = '<script type="text/javascript"> $(document).ready( function() { $("#password").val(""); } ); </script>'; $template = new CoreTemplate('user_form.tpl.php'); $template->assign('formAction', $_SERVER['PHP_SELF']); $template->assign('relayContext', claro_form_relay_context()); $template->assign('cancelUrl', claro_htmlspecialchars(Url::Contextualize($cancelUrl))); $template->assign('editableFields', $editableFields); $template->assign('data', $userData); $template->assign('pictureUrl', $pictureUrl); $template->assign('currentLanguage', $currentLanguage); $template->assign('languages', get_language_to_display_list()); return $template->render(); }
// Flag forcing the 'current course' reset, as we're not anymore inside a course $cidReset = true; $tidReset = true; $_SESSION['courseSessionCode'] = null; // Include Library and configuration files require './claroline/inc/claro_init_global.inc.php'; // main init include claro_get_conf_repository() . 'CLHOME.conf.php'; // conf file require_once dirname(__FILE__) . '/claroline/inc/lib/coursesearchbox.class.php'; require_once dirname(__FILE__) . '/claroline/inc/lib/course/courselist.lib.php'; if (get_conf('display_former_homepage', false) || !claro_is_user_authenticated()) { // Main template $template = new CoreTemplate('platform_index.tpl.php'); // Languages $template->assign('languages', get_language_to_display_list()); $template->assign('currentLanguage', language::current_language()); // 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'); $template->assign('lastUserAction', $lastUserAction); // Manage the search box and search results $searchBox = new CourseSearchBox($_SERVER['REQUEST_URI']); $template->assign('searchBox', $searchBox); if (claro_is_user_authenticated()) { // User course (activated and deactivated) lists and search results (if any) if (empty($_REQUEST['viewCategory'])) { $courseTreeView = CourseTreeNodeViewFactory::getUserCourseTreeView(claro_get_current_user_id()); } else { $courseTreeView = CourseTreeNodeViewFactory::getUserCategoryCourseTreeView(claro_get_current_user_id(), $_REQUEST['viewCategory']); } $template->assign('templateMyCourses', $courseTreeView);
/** * @return template object * @since 1.10 * @todo write a CategoryBrowserView class (implementing Display) */ public function getTemplate() { $currentCategory = $this->getCurrentCategorySettings(); $categoryList = $this->getSubCategoryList(); $navigationUrl = new Url($_SERVER['PHP_SELF'] . '#categoryContent'); /* * Build url param list * @todo find a better way to do that */ if (isset($_REQUEST['cmd'])) { $navigationUrl->addParam('cmd', $_REQUEST['cmd']); } if (isset($_REQUEST['fromAdmin'])) { $navigationUrl->addParam('fromAdmin', $_REQUEST['fromAdmin']); } if (isset($_REQUEST['uidToEdit'])) { $navigationUrl->addParam('uidToEdit', $_REQUEST['uidToEdit']); } if (isset($_REQUEST['asTeacher'])) { $navigationUrl->addParam('asTeacher', $_REQUEST['asTeacher']); } $courseTreeView = CourseTreeNodeViewFactory::getCategoryCourseTreeView($this->categoryId, $this->userId); $courseTreeView->setViewOptions($this->viewOptions); $template = new CoreTemplate('categorybrowser.tpl.php'); $template->assign('currentCategory', $currentCategory); $template->assign('categoryBrowser', $this); $template->assign('categoryList', $categoryList); $template->assign('courseTreeView', $courseTreeView); $template->assign('navigationUrl', $navigationUrl->toUrl()); return $template; }
} } else { $dialogBox->warning(get_lang('Statistics in progress, please don\'t refresh until further instructions ! ') . '<br />' . get_lang('Course actually treated : ') . $course['title'] . '<br />' . get_lang(' Number of course treated : ') . count($stats)); $claroline->display->body->appendContent($dialogBox->render()); echo $claroline->display->render(); } } else { $dialogBox = new DialogBox(); $dialogBox->warning(get_lang('Caution: building files\' statistics is a pretty heavy work. It might take a while and a lot of resources, depending of the size of your campus.')); if (!empty($extensions)) { $dialogBox->info(get_lang('You\'ve chosen to isolate the following extensions: %types. If you wish to modify these extensions, check the advanced platform settings', array('%types' => implode(', ', $extensions)))); } else { $dialogBox->info(get_lang('You don\'t have chosen any extension to isolate. If you wish to isolate extensions in your statistics, check the advanced platform settings')); } $template = new CoreTemplate('admin_files_stats.tpl.php'); $template->assign('dialogBox', $dialogBox); $template->assign('extensions', $extensions); $template->assign('formAction', $_SERVER['PHP_SELF']); $template->assign('cancelUrl', get_path('rootAdminWeb')); $claroline->display->body->appendContent($template->render()); echo $claroline->display->render(); } /** * Convert a size (Bytes) to KiB/MiB/GiB/TiB * @param int $size * @return string * * @todo move it where it should be (wherever it is) */ function format_bytes($size) {
/** * @return CoreTemplate */ public function getTemplate() { if (!empty($this->keyword)) { $this->fetchResults(); $this->searchResults->setViewOptions($this->viewOptions); } $template = new CoreTemplate('course_search_box.tpl.php'); $template->assign('formAction', $this->formAction); $template->assign('courseTree', $this->searchResults); $template->assign('keyword', $this->keyword); return $template; }
if (claro_is_allowed_to_edit()) { if ($thisCourse->status == 'pending') { $dialogBox->warning(get_lang('This course is deactivated: you can reactive it from your course list')); } elseif ($thisCourse->status == 'date') { if (!empty($thisCourse->publicationDate) && $thisCourse->publicationDate > claro_mktime()) { $dialogBox->warning(get_lang('This course will be enabled on the %date', array('%date' => claro_date('d/m/Y', $thisCourse->publicationDate)))); } if (!empty($thisCourse->expirationDate) && $thisCourse->expirationDate > claro_mktime()) { $dialogBox->warning(get_lang('This course will be disable on the %date', array('%date' => claro_date('d/m/Y', $thisCourse->expirationDate)))); } } if ($thisCourse->userLimit > 0) { $dialogBox->warning(get_lang('This course is limited to %userLimit users', array('%userLimit' => $thisCourse->userLimit))); } if ($thisCourse->registration == 'validation') { $courseUserList = new Claro_CourseUserList(claro_get_current_course_id()); if ($courseUserList->has_registrationPending()) { $usersPanelUrl = claro_htmlspecialchars(Url::Contextualize($toolRepository . 'user/user.php')); $dialogBox->warning(get_lang('You have to validate users to give them access to this course through the <a href="%url">course user list</a>', array('%url' => $usersPanelUrl))); } } } // Get the portlets buttons $activablePortlets = claro_is_course_manager() ? CourseHomePagePortlet::getActivablePortlets() : array(); // Display $template = new CoreTemplate('course_index.tpl.php'); $template->assign('dialogBox', $dialogBox); $template->assign('activablePortlets', $activablePortlets); $template->assign('portletIterator', $portletiterator); $claroline->display->body->setContent($template->render()); echo $claroline->display->render();
<?php // $Id: index.php 13718 2011-10-20 09:24:38Z ffervaille $ require '../inc/claro_init_global.inc.php'; FromKernel::uses('utils/input.lib', 'utils/validator.lib'); $module = Claro_UserInput::getInstance()->get('module'); $block = Claro_UserInput::getInstance()->get('block'); if (!empty($module) && $module != 'platform' && file_exists(get_module_path($module) . '/templates/help.tpl.php')) { $tpl = new ModuleTemplate($module, 'help.tpl.php '); } else { $tpl = new CoreTemplate('help.tpl.php'); } if ($moduleName = get_module_data($module, 'moduleName')) { load_module_language($module); $tpl->assign('module', $moduleName); } else { $tpl->assign('module', $module); } $tpl->assign('block', $block); $claroline->setDisplayType(Claroline::POPUP); $claroline->display->header->setTitle(get_lang('Claroline help')); $claroline->display->body->appendContent($tpl->render()); echo $claroline->display->render();
$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)")); } /*---------------------------------------------------------------------------- DISPLAY GROUP TUTOR INFORMATION
* @package CLGRP * @author Claro Team <*****@*****.**> */ $tlabelReq = 'CLGRP'; require '../inc/claro_init_global.inc.php'; // $_groupProperties = claro_get_main_group_properties(claro_get_current_course_id()); include_once get_path('incRepositorySys') . '/lib/group.lib.inc.php'; // display login form if (!claro_is_in_a_course() || !claro_is_course_allowed()) { claro_disp_auth_form(true); } // check user right if (!claro_is_allowed_to_edit()) { claro_die(get_lang("Not allowed")); } $nameTools = get_lang("Groups settings"); ClaroBreadCrumbs::getInstance()->prepend(get_lang('Groups'), Url::Contextualize('group.php')); $_groupProperties = claro_get_main_group_properties(claro_get_current_course_id()); // session_register('_groupProperties'); $_SESSION['_groupProperties'] =& $_groupProperties; $claroline->display->body->appendContent(claro_html_tool_title(array('supraTitle' => get_lang("Groups"), 'mainTitle' => $nameTools))); $tpl = new CoreTemplate('group_properties.tpl.php'); $tpl->assign('groupToolList', get_group_tool_list()); $tpl->assign('nbGroupPerUser', $_groupProperties['nbGroupPerUser']); $tpl->assign('registrationAllowedInGroup', $_groupProperties['registrationAllowed']); $tpl->assign('unregistrationAllowedInGroup', isset($_groupProperties['unregistrationAllowed']) ? $_groupProperties['unregistrationAllowed'] : false); $tpl->assign('tutorRegistrationAllowedInGroup', isset($_groupProperties['tutorRegistrationAllowed']) ? $_groupProperties['tutorRegistrationAllowed'] : false); $tpl->assign('groupPrivate', $_groupProperties['private']); $tpl->assign('tools', $_groupProperties['tools']); $claroline->display->body->appendContent($tpl->render()); echo $claroline->display->render();