本文整理汇总了PHP中ClaroBreadCrumbs类的典型用法代码示例。如果您正苦于以下问题:PHP ClaroBreadCrumbs类的具体用法?PHP ClaroBreadCrumbs怎么用?PHP ClaroBreadCrumbs使用的例子?那么恭喜您, 这里精选的类代码示例或许可以为您提供帮助。
在下文中一共展示了ClaroBreadCrumbs类的15个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的PHP代码示例。
示例1: __construct
public function __construct()
{
$this->breadcrumbs = ClaroBreadCrumbs::getInstance();
$this->viewmode = ClaroViewMode::getInstance();
parent::__construct('banner.tpl.php');
$this->breadcrumbLine = true;
}
示例2: getInstance
public static function getInstance()
{
if (!ClaroBreadCrumbs::$instance) {
ClaroBreadCrumbs::$instance = new ClaroBreadCrumbs();
}
return ClaroBreadCrumbs::$instance;
}
示例3: array
/*
* 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);
示例4: foreach
}
}
// build link to submissions page
foreach ($workList as $workId => $thisWrk) {
$thisWrk['is_mine'] = $assignment->getAssignmentType() == 'INDIVIDUAL' && $thisWrk['authId'] == claro_get_current_user_id() || $assignment->getAssignmentType() == 'GROUP' && in_array($thisWrk['authId'], $userGroupList);
if ($thisWrk['is_mine']) {
$workList[$workId]['name'] = '<b>' . $thisWrk['name'] . '</b>';
}
$workList[$workId]['name'] = '<a class="item" href="' . claro_htmlspecialchars(Url::Contextualize('user_work.php' . '?authId=' . $thisWrk['authId'] . '&assigId=' . $req['assignmentId'])) . '">' . $workList[$workId]['name'] . '</a>';
}
/**
* HEADER
*/
$nameTools = get_lang('Assignment');
ClaroBreadCrumbs::getInstance()->setCurrent($nameTools, Url::Contextualize($_SERVER['PHP_SELF'] . '?assigId=' . (int) $req['assignmentId']));
ClaroBreadCrumbs::getInstance()->prepend(get_lang('Assignments'), Url::Contextualize('../work/work.php'));
/**
* TOOL TITLE
*/
$pageTitle['mainTitle'] = $nameTools;
$pageTitle['subTitle'] = $assignment->getTitle();
// SHOW FEEDBACK
// only if :
// - there is a text OR a file in automatic feedback
// AND
// feedback must be shown after end date and end date is past
// OR feedback must be shown directly after a post (from the time a work was uploaded by the student)
// there is a prefill_ file or text, so there is something to show
$textOrFilePresent = (bool) $assignment->getAutoFeedbackText() != '' || $assignment->getAutoFeedbackFilename() != '';
// feedback must be shown after end date and end date is past
$showAfterEndDate = (bool) ($assignment->getAutoFeedbackSubmitMethod() == 'ENDDATE' && $assignment->getEndDate() < time());
示例5: claro_set_display_mode_available
}
// 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";
示例6: realpath
$childPath = realpath($parentPath . $childPath);
if ($childPath !== false) {
// verify if the file exists and if the file is under parent path
return preg_match('|^' . preg_quote($parentPath) . '|', $childPath);
} else {
return false;
}
}
if (claro_is_in_a_group() && claro_is_group_allowed()) {
$_group = claro_get_current_group_data();
$courseDir = claro_get_course_path() . '/group/' . claro_get_current_group_data('directory');
ClaroBreadCrumbs::getInstance()->prepend(get_lang('Documents and Links'), 'document.php');
ClaroBreadCrumbs::getInstance()->prepend(get_lang('Groups'), '../group/group.php');
} else {
$courseDir = claro_get_course_path() . '/document';
ClaroBreadCrumbs::getInstance()->prepend(get_lang('Documents and Links'), 'document.php');
}
$noPHP_SELF = true;
$baseWorkDir = get_path('coursesRepositorySys') . $courseDir;
if (!empty($_REQUEST['cmd'])) {
$cmd = $_REQUEST['cmd'];
} else {
$cmd = null;
}
if (!empty($_REQUEST['cwd'])) {
$cwd = $_REQUEST['cwd'];
} else {
$cwd = '';
}
if (isset($_REQUEST['file'])) {
$file = download_url_decode($_REQUEST['file']);
示例7: dirname
*/
// reset course and groupe
$cidReset = true;
$gidReset = true;
$uidRequired = true;
// load Claroline kernel
require_once dirname(__FILE__) . '/../../claroline/inc/claro_init_global.inc.php';
if (!claro_is_user_authenticated()) {
claro_disp_auth_form();
}
// load libraries
FromKernel::uses('user.lib', 'utils/finder.lib');
require_once dirname(__FILE__) . '/lib/portlet.lib.php';
// Breadcrumb
FromKernel::uses('display/userprofilebox.lib');
ClaroBreadCrumbs::getInstance()->append(get_lang('My desktop'), get_path('clarolineRepositoryWeb') . 'desktop/index.php');
$dialogBox = new DialogBox();
define('KERNEL_PORTLETS_PATH', dirname(__FILE__) . '/lib/portlet');
// Load and register (if needed) portlets
try {
$portletList = new PortletList();
$fileFinder = new Claro_FileFinder_Extension(KERNEL_PORTLETS_PATH, '.class.php', false);
foreach ($fileFinder as $file) {
// Require portlet file
require_once $file->getPathname();
// Compute portlet class name from file name
$pos = strpos($file->getFilename(), '.');
$className = substr($file->getFilename(), '0', $pos);
// Load portlet from database
$portletInDB = $portletList->loadPortlet($className);
// If it's not in DB, add it
示例8: document_web_path
// javascript
if ($action == 'rqEdit') {
$jspath = document_web_path() . '/js';
$htmlHeadXtra[] = '<script type="text/javascript" src="' . $jspath . '/wiki_acl.js"></script>';
$claroBodyOnload[] = 'initBoxes();';
}
// Breadcrumps
$nameTools = get_lang('Wiki');
switch ($action) {
case 'rqEdit':
ClaroBreadCrumbs::getInstance()->append($wikiTitle);
ClaroBreadCrumbs::getInstance()->append(claro_htmlspecialchars('Properties'));
break;
case 'rqDelete':
ClaroBreadCrumbs::getInstance()->append($wikiTitle);
ClaroBreadCrumbs::getInstance()->append(claro_htmlspecialchars('Delete'));
break;
case 'list':
default:
$noQUERY_STRING = true;
}
$out = '';
// --------- Start of display ----------------
// Tool title
$toolTitle = array();
if (claro_is_in_a_group()) {
$toolTitle['supraTitle'] = claro_get_current_group_data('name');
}
switch ($action) {
// edit form
case 'rqEdit':
示例9: get_lang
ClaroBreadCrumbs::getInstance()->append(claro_htmlspecialchars(get_lang('Preview')));
break;
case 'all':
ClaroBreadCrumbs::getInstance()->append(claro_htmlspecialchars(get_lang('All pages')));
break;
case 'recent':
ClaroBreadCrumbs::getInstance()->append(claro_htmlspecialchars(get_lang('Recent changes')));
break;
case 'history':
$dispTitle = '__MainPage__' == $title ? get_lang("Main page") : $title;
ClaroBreadCrumbs::getInstance()->append(claro_htmlspecialchars($dispTitle), claro_htmlspecialchars(Url::Contextualize('page.php?action=show&wikiId=' . $wikiId . '&title=' . $title)));
ClaroBreadCrumbs::getInstance()->append(claro_htmlspecialchars(get_lang("History")));
break;
default:
$pageTitle = '__MainPage__' == $title ? get_lang("Main page") : $title;
ClaroBreadCrumbs::getInstance()->append(claro_htmlspecialchars($pageTitle));
}
$out = '';
// Help URL
$helpUrl = null;
// Tool title
$toolTitle = array();
$toolTitle['mainTitle'] = sprintf(get_lang('Wiki : %s'), $wiki->getTitle());
if (claro_is_in_a_group()) {
$toolTitle['supraTitle'] = claro_get_current_group_data('name');
}
switch ($action) {
case 'all':
$toolTitle['subTitle'] = get_lang("All pages");
break;
case 'recent':
示例10: Exception
$dialogBox->question($question);
}
if ($cmd == 'exMerge') {
$uidToKeep = $userInput->getMandatory('uidToKeep');
$uidToRemove = $userInput->getMandatory('uidToRemove');
if ($uidToKeep == $uidToRemove) {
throw new Exception(get_lang('Cannot merge one user account with itself'));
}
if (!user_get_properties($uidToKeep)) {
throw new Exception(get_lang('User to keep not found'));
}
if (!user_get_properties($uidToRemove)) {
throw new Exception(get_lang('User to remove not found'));
}
$mergeUser = new MergeUser();
$mergeUser->merge($uidToRemove, $uidToKeep);
if ($mergeUser->hasError()) {
$dialogBox->error(get_lang('Some errors have occured while merging those user account, check the log table in the platform main database for more details'));
} else {
$dialogBox->success(get_lang('User accounts merged'));
}
}
} catch (Exception $e) {
$dialogBox->error(get_lang('Cannot perform the requested action') . ' : <br />' . $e->getMessage());
pushClaroMessage('<pre>' . $e->__toString() . '</pre>');
}
ClaroBreadCrumbs::getInstance()->prepend(get_lang('Administration'), get_path('rootAdminWeb'));
ClaroBreadCrumbs::getInstance()->setCurrent(get_lang('Merge user accounts'), php_self());
ClaroBody::getInstance()->appendContent(claro_html_tool_title(get_lang('Merge user accounts')));
ClaroBody::getInstance()->appendContent($dialogBox->render());
echo Claroline::getInstance()->display->render();
示例11: claro_get_current_course_id
} else {
Console::error("Class {$form_data['class_id']} cannot be removed from course " . claro_get_current_course_id() . " by " . claro_get_current_user_id() . " : " . var_export($registration->getErrorLog(), true));
$dialogBox->error(get_lang('Cannot enrol class'));
}
break;
}
/*---------------------------------------------------------------------*/
/*----------------------FIND information SECTION-----------------------*/
/*---------------------------------------------------------------------*/
$classList = get_class_list_by_course(claro_get_current_course_id());
/*---------------------------------------------------------------------*/
/*----------------------DISPLAY SECTION--------------------------------*/
/*---------------------------------------------------------------------*/
// set bredcrump
$nameTools = get_lang('Enrol class');
ClaroBreadCrumbs::getInstance()->prepend(get_lang('Users'), 'user.php' . claro_url_relay_context('?'));
// javascript confirm pop up declaration for header
$htmlHeadXtra[] = '<script type="text/javascript">
function confirmation_enrol (name)
{
if (confirm("' . clean_str_for_javascript(get_lang('Are you sure you want to enrol the whole class on the course ?')) . '"))
{return true;}
else
{return false;}
}
function confirmation_unenrol (name)
{
if (confirm("' . clean_str_for_javascript(get_lang('Are you sure you want to unenrol the whole class on the course ?')) . '"))
{return true;}
else
{return false;}
示例12: mktime
$nextReqDate = mktime(1, 1, 1, date('m', $reqdate) + 1, 1, date('Y', $reqdate));
// prepare displayed date
$displayedDate = claro_html_localised_date(get_locale('dateFormatCompact'), $reqdate);
}
$accessList = claro_sql_query_fetch_all($sqlAccessDates);
/*
* Output
*/
CssLoader::getInstance()->load('tracking', 'screen');
// initialize output
$claroline->setDisplayType(Claroline::PAGE);
// FIXME (link + parameters)
$nameTools = get_lang('User access to course');
ClaroBreadCrumbs::getInstance()->setCurrent($nameTools, $_SERVER['PHP_SELF'] . '?userId=' . $userId);
ClaroBreadCrumbs::getInstance()->prepend(get_lang('Users statistics'), claro_htmlspecialchars(Url::Contextualize('userReport.php?userId=' . $userId)));
ClaroBreadCrumbs::getInstance()->prepend(get_lang('Users'), get_module_url('CLUSR') . '/user.php');
$output = '';
/*
* Output of : user information
*/
$userProfileBox = new UserProfileBox(true);
$userProfileBox->setUserId($userId);
$output .= '<div id="rightSidebar">' . $userProfileBox->render() . '</div>';
$output .= '<div id="leftContent">' . "\n";
$output .= claro_html_tool_title($nameTools);
// menu
$output .= '<small>' . "\n" . '[<a href="' . $_SERVER['PHP_SELF'] . '?userId=' . $userId . '&period=week&reqdate=' . $reqdate . '">' . get_lang('Week') . '</a>]' . "\n" . '[<a href="' . $_SERVER['PHP_SELF'] . '?userId=' . $userId . '&period=month&reqdate=' . $reqdate . '">' . get_lang('Month') . '</a>]' . "\n" . ' || ' . "\n";
if ($period == 'week') {
// previous and next date must be evaluated
$output .= '[<a href="' . $_SERVER['PHP_SELF'] . '?userId=' . $userId . '&period=week&reqdate=' . $previousReqDate . '">' . get_lang('Previous week') . '</a>]' . "\n" . '[<a href="' . $_SERVER['PHP_SELF'] . '?userId=' . $userId . '&period=week&reqdate=' . $nextReqDate . '">' . get_lang('Next week') . '</a>]' . "\n";
} else {
示例13: isset
$item = isset($_REQUEST['item']) ? $_REQUEST['item'] : 'GLOBAL';
$section_selected = isset($_REQUEST['section']) ? $_REQUEST['section'] : null;
$moduleId = isset($_REQUEST['module_id']) ? (int) $_REQUEST['module_id'] : null;
$module = get_module_info($moduleId);
if (!$module) {
claro_die("ERROR: INVALID MODULE ID!!!");
}
language::load_module_translation($module['label']);
$dockList = get_dock_list($module['type']);
$nameTools = get_lang('Module settings');
$noPHP_SELF = true;
// FIXME : BAD use of get_lang !!!!!
ClaroBreadCrumbs::getInstance()->prepend(get_lang($module['module_name']));
ClaroBreadCrumbs::getInstance()->prepend(get_lang('Module list'), get_path('rootAdminWeb') . 'module/module_list.php?typeReq=' . $module['type']);
ClaroBreadCrumbs::getInstance()->prepend(get_lang('Administration'), get_path('rootAdminWeb'));
ClaroBreadCrumbs::getInstance()->setCurrent($nameTools);
$dialogBox = new dialogBox();
//----------------------------------
// EXECUTE COMMAND
//----------------------------------
switch ($cmd) {
case 'activplatformadmin':
if (allow_module_activation_by_course_manager($module['label'], false)) {
$dialogBox->success(get_lang('Only PLATFORM_ADMIN can activate this module'));
$module['accessManager'] = 'PLATFORM_ADMIN';
} else {
$dialogBox->error(get_lang('Cannot change module activation on course creation'));
}
break;
case 'activcoursemanager':
if (allow_module_activation_by_course_manager($module['label'], true)) {
示例14: elseif
} elseif ($thisAttemptDetails['showAnswers'] == 'LASTTRY') {
// we must check that user has at least "max_attempt" results
$sql = "SELECT COUNT(`id`)\n FROM `" . $tbl_qwz_tracking . "`\n WHERE `user_id` = " . (int) claro_get_current_user_id() . "\n AND `exo_id` = " . $thisAttemptDetails['exo_id'];
$userAttempts = claro_sql_query_get_single_value($sql);
if ($userAttempts >= $thisAttemptDetails['attempts']) {
$is_allowedToTrack = true;
} else {
$dialogBox->error(get_lang('You must reach the maximum number of allowed attempts to view these statistics.'));
}
} else {
// user cannot see its full results if show_answer == 'NEVER'
$dialogBox->error(get_lang('Display of detailed answers is not authorized.'));
}
}
}
ClaroBreadCrumbs::getInstance()->prepend(get_lang('Exercises'), './exercise.php');
$nameTools = get_lang('Statistics of exercise attempt');
$out = '';
// display title
$titleTab['mainTitle'] = $nameTools;
// Command list
$cmdList = array();
$cmdList[] = array('img' => 'back', 'name' => get_lang('Back'), 'url' => claro_htmlspecialchars(Url::Contextualize('../tracking/userReport.php?userId=' . $thisAttemptDetails['user_id'] . '&exId=' . $thisAttemptDetails['id'])));
$out .= claro_html_tool_title($titleTab, null, $cmdList);
if ($is_allowedToTrack && get_conf('is_trackingEnabled')) {
// get all question that user get for this attempt
$sql = "SELECT TD.`id` as `trackId`, TD.`question_id`, TD.`result`\n FROM `" . $tbl_qwz_tracking_questions . "` as TD\n WHERE `exercise_track_id` = " . $trackedExId;
$trackedQuestionList = claro_sql_query_fetch_all($sql);
$i = 0;
$totalResult = 0;
$totalGrade = 0;
示例15: define
define('DO_MOVE_UP_EXTRA_FIELD_RANK', 'DO_MOVE_UP_EXTRA_FIELD_RANK');
define('DO_VIEW_EXTRA_FIELD_LIST', 'DO_VIEW_EXTRA_FIELD_LIST');
define('DO_ADD_EXTRA_FIELD', 'DO_ADD_EXTRA_FIELD');
define('DO_EDIT_EXTRA_FIELD', 'DO_EDIT_EXTRA_FIELD');
$tlabelReq = 'CLUSR';
$gidReset = true;
require '../inc/claro_init_global.inc.php';
$messageList = array();
$descSizeToPrupose = array(3, 5, 10, 15, 20);
// size in lines for desc - don't add 1
require_once get_path('incRepositorySys') . '/lib/admin.lib.inc.php';
require_once get_path('incRepositorySys') . '/lib/user.lib.php';
require_once get_path('incRepositorySys') . '/lib/course_user.lib.php';
require_once get_path('incRepositorySys') . '/lib/user_info.lib.php';
require_once dirname(__FILE__) . '/../messaging/lib/permission.lib.php';
ClaroBreadCrumbs::getInstance()->prepend(get_lang('Users'), Url::Contextualize('user.php'));
$nameTools = get_lang('User');
/** OUTPUT **/
claro_set_display_mode_available(TRUE);
if (!claro_is_in_a_course() || !claro_is_course_allowed()) {
claro_disp_auth_form();
}
/*
* data found in settings are :
* $uid
* $isAdmin
* $isAdminOfCourse
*
*/
if (isset($_REQUEST['uInfo'])) {
$userIdViewed = (int) $_REQUEST['uInfo'];