本文整理汇总了PHP中Url::Contextualize方法的典型用法代码示例。如果您正苦于以下问题:PHP Url::Contextualize方法的具体用法?PHP Url::Contextualize怎么用?PHP Url::Contextualize使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类Url
的用法示例。
在下文中一共展示了Url::Contextualize方法的15个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的PHP代码示例。
示例1: renderContent
public function renderContent()
{
global $platformLanguage;
$out = '';
// Last user action
$lastUserAction = isset($_SESSION['last_action']) && $_SESSION['last_action'] != '1970-01-01 00:00:00' ? $_SESSION['last_action'] : date('Y-m-d H:i:s');
$userCommands = array();
// User commands
// 'Create Course Site' command. Only available for teacher.
if (claro_is_allowed_to_create_course()) {
$userCommands[] = '<a href="' . claro_htmlspecialchars(Url::Contextualize(get_path('clarolineRepositoryWeb') . 'course/create.php')) . '" class="userCommandsItem">' . '<img src="' . get_icon_url('courseadd') . '" alt="" /> ' . get_lang('Create a course site') . '</a>' . "\n";
} elseif ($GLOBALS['currentUser']->isCourseCreator) {
$userCommands[] = '<span class="userCommandsItemDisabled">' . '<img src="' . get_icon_url('courseadd') . '" alt="" /> ' . get_lang('Create a course site') . '</span>' . "\n";
}
if (get_conf('allowToSelfEnroll', true)) {
$userCommands[] = '<a href="' . claro_htmlspecialchars(Url::Contextualize(get_path('clarolineRepositoryWeb') . 'auth/courses.php?cmd=rqReg&categoryId=0')) . '" class="userCommandsItem">' . '<img src="' . get_icon_url('enroll') . '" alt="" /> ' . get_lang('Enrol on a new course') . '</a>' . "\n";
$userCommands[] = '<a href="' . claro_htmlspecialchars(Url::Contextualize(get_path('clarolineRepositoryWeb') . 'auth/courses.php?cmd=rqUnreg')) . '" class="userCommandsItem">' . '<img src="' . get_icon_url('unenroll') . '" alt="" /> ' . get_lang('Remove course enrolment') . '</a>' . "\n";
}
$userCommands[] = '<a href="' . claro_htmlspecialchars(Url::Contextualize(get_path('clarolineRepositoryWeb') . 'course/platform_courses.php')) . '" class="userCommandsItem">' . '<img src="' . get_icon_url('course') . '" alt="" /> ' . get_lang('All platform courses') . '</a>' . "\n";
$userCommands[] = '<a href="' . claro_htmlspecialchars(Url::Contextualize(get_path('clarolineRepositoryWeb') . 'notification_date.php')) . '" class="userCommandsItem">' . '<img class="iconDefinitionList" src="' . get_icon_url('hot') . '" alt="' . get_lang('New items') . '" />' . ' ' . get_lang('New items') . ' ' . get_lang('to another date') . (substr($lastUserAction, strlen($lastUserAction) - 8) == '00:00:00' ? ' [' . claro_html_localised_date(get_locale('dateFormatNumeric'), strtotime($lastUserAction)) . ']' : '') . '</a>' . "\n";
$userCourseList = render_user_course_list();
$userCourseListDesactivated = render_user_course_list_desactivated();
$out .= '<div class="userCommands">' . '<h2>' . get_lang('Manage my courses') . '</h2>' . claro_html_list($userCommands) . '</div>' . '<div class="userCourseList">' . '<h2>' . get_lang('My course list') . '</h2>' . $userCourseList;
if (!empty($userCourseListDesactivated)) {
$out .= '<h4>' . get_lang('Deactivated course list') . '</h4>' . $userCourseListDesactivated;
}
$out .= '</div>';
/*'</td>'
. '</tr>'
. '</tbody>'
. '</table>'*/
$this->content = $out;
return $this->content;
}
示例2: renderContent
public function renderContent()
{
$personnalCourseList = get_user_course_list(claro_get_current_user_id());
$announcementEventList = announcement_get_items_portlet($personnalCourseList);
$output = '';
if ($announcementEventList) {
$output .= '<dl id="portletMyAnnouncements">';
foreach ($announcementEventList as $announcementItem) {
// Hide hidden and expired elements
$isVisible = (bool) ($announcementItem['visibility'] == 'SHOW') ? 1 : 0;
$isOffDeadline = (bool) (isset($announcementItem['visibleFrom']) && strtotime($announcementItem['visibleFrom']) > time() || isset($announcementItem['visibleUntil']) && time() >= strtotime($announcementItem['visibleUntil'])) ? 1 : 0;
if ($isVisible && !$isOffDeadline) {
$output .= '<dt>' . "\n" . '<img class="iconDefinitionList" src="' . get_icon_url('announcement', 'CLANN') . '" alt="" />' . ' <a href="' . $announcementItem['url'] . '">' . $announcementItem['title'] . '</a>' . "\n" . '</dt>' . "\n";
foreach ($announcementItem['eventList'] as $announcementEvent) {
// Prepare the render
$displayChar = 250;
if (strlen($announcementEvent['content']) > $displayChar) {
$content = substr($announcementEvent['content'], 0, $displayChar) . '... <a href="' . claro_htmlspecialchars(Url::Contextualize($announcementEvent['url'])) . '">' . '<b>' . get_lang('Read more »') . '</b></a>';
} else {
$content = $announcementEvent['content'];
}
$output .= '<dd>' . '<a href="' . $announcementEvent['url'] . '">' . $announcementItem['courseOfficialCode'] . '</a> : ' . "\n" . (!empty($announcementEvent['title']) ? $announcementEvent['title'] : get_lang('No title')) . "\n" . ' - ' . $content . "\n" . '</dd>' . "\n";
}
}
}
$output .= '</dl>';
} else {
$output .= "\n" . '<dl>' . "\n" . '<dt>' . "\n" . '<img class="iconDefinitionList" src="' . get_icon_url('announcement', 'CLANN') . '" alt="" />' . ' ' . get_lang('No announcement to display') . "\n" . '</dt>' . "\n" . '</dl>' . "\n";
}
return $output;
}
示例3: renderTitle
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;
}
示例4: renderTitle
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;
}
示例5: renderFooter
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=' . $this->userId)) . '">' . get_lang('View all user\'s posts') . '</a>' . "\n";
}
示例6: renderContent
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;
}
示例7: get_lang
} 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);
/*
* enable multiple question selection
*/
if (!is_null($exId)) {
$out .= '<form method="post" name="QCMEncode" action="' . $_SERVER['PHP_SELF'] . '?cmd=recupMultipleQuestions">' . "\n";
$out .= '<input type="hidden" name="exId" value="' . $exId . '" />' . "\n";
}
示例8: claro_get_current_user_id
}
// check in DB if user has already browsed this module
$sql = "SELECT `contentType`,\n `total_time`,\n `session_time`,\n `scoreMax`,\n `raw`,\n `lesson_status`\n FROM `" . $TABLEUSERMODULEPROGRESS . "` AS UMP,\n `" . $TABLELEARNPATHMODULE . "` AS LPM,\n `" . $TABLEMODULE . "` AS M\n WHERE UMP.`user_id` = '" . (int) claro_get_current_user_id() . "'\n AND UMP.`learnPath_module_id` = LPM.`learnPath_module_id`\n AND LPM.`learnPath_id` = " . (int) $_SESSION['path_id'] . "\n AND LPM.`module_id` = " . (int) $_SESSION['module_id'] . "\n AND LPM.`module_id` = M.`module_id`\n ";
$resultBrowsed = claro_sql_query_get_single_row($sql);
// redirect user to the path browser if needed
if (!$is_allowedToEdit && (!is_array($resultBrowsed) || !$resultBrowsed || count($resultBrowsed) <= 0) && $noModuleComment && $noModuleSpecificComment && !$noStartAsset) {
header("Location: " . Url::Contextualize("./navigation/viewer.php"));
exit;
}
// Back button
if (!empty($_SESSION['returnToTrackingUserId'])) {
$pathBack = Url::Contextualize(get_path('clarolineRepositoryWeb') . 'tracking/lp_modules_details.php?' . 'uInfo=' . (int) $_SESSION['returnToTrackingUserId'] . '&path_id=' . (int) $_SESSION['path_id']);
} elseif ($is_allowedToEdit) {
$pathBack = Url::Contextualize("./learningPathAdmin.php");
} else {
$pathBack = Url::Contextualize("./learningPath.php");
}
// Command list
$cmdList = array();
$cmdList[] = array('img' => 'back', 'name' => get_lang('Back to module list'), 'url' => $pathBack);
// Display
$out = '';
if (!empty($dialogBox)) {
$out .= $dialogBox->render();
}
$out .= claro_html_tool_title(get_lang('Module edition'), null, $cmdList);
//####################################################################################\\
//################################## MODULE NAME BOX #################################\\
//####################################################################################\\
$cmd = isset($_REQUEST['cmd']) ? $_REQUEST['cmd'] : '';
if ($cmd == "updateName") {
示例9: get_icon_url
$icon = get_icon_url('tool');
}
$style = '';
// patchy
if (claro_is_platform_admin() || claro_is_course_manager()) {
if (!$_groupProperties['tools'][$thisTool['label']]) {
$style = 'invisible ';
}
}
// see if tool name must be displayed 'as containing new items' (a red ball by default) or not
$classItem = '';
if (in_array($thisTool['id'], $modified_tools)) {
$classItem = " hot";
}
if (!empty($url)) {
$toolLinkList[] = '<a class="' . trim($style . ' item' . $classItem) . '" href="' . claro_htmlspecialchars(Url::Contextualize($url)) . '">' . '<img src="' . $icon . '" alt="" /> ' . $toolName . '</a>' . "\n";
} else {
$toolLinkList[] = '<span ' . trim($style) . '>' . '<img src="' . $icon . '" alt="" /> ' . $toolName . '</span>' . "\n";
}
}
/*****************
* DISPLAY SECTION
******************/
Claroline::getDisplay()->body->appendContent(claro_html_tool_title(array('supraTitle' => get_lang("Groups"), 'mainTitle' => claro_get_current_group_data('name') . ' <img src="' . get_icon_url('group') . '" alt="" />')));
$groupSpaceTemplate = new CoreTemplate('group_space.tpl.php');
$groupSpaceTemplate->assign('dialogBox', $dialogBox);
$groupSpaceTemplate->assign('displayRegistrationLink', $is_allowedToSelfRegInGroup && !array_key_exists('registration', $_REQUEST));
$groupSpaceTemplate->assign('displayUnregistrationLink', $is_allowedToSelfUnregInGroup && !array_key_exists('unregistration', $_REQUEST));
$groupSpaceTemplate->assign('displayTutorRegistrationLink', $isTutorRegAllowed && !array_key_exists('tutorRegistration', $_REQUEST));
$groupSpaceTemplate->assign('displayTutorUnregistrationLink', $isTutorUnregAllowed && !array_key_exists('tutorUnregistration', $_REQUEST));
$groupSpaceTemplate->assign('toolLinkList', $toolLinkList);
示例10: get_lang
" />
</a>
<?php
} else {
?>
<?php
}
?>
</td>
<td align="center">
<?php
if ($forumIterator < $thisCategory['forum_count']) {
?>
<a href="<?php
echo get_lang(claro_htmlspecialchars(Url::Contextualize($_SERVER['PHP_SELF'] . '?cmd=exMvDownForum&forumId=' . $thisForum['forum_id'])));
?>
">
<img src="<?php
echo get_icon_url('move_down');
?>
" alt="<?php
echo get_lang('Move down');
?>
" />
</a>
<?php
} else {
?>
<?php
示例11: claro_htmlspecialchars
} else {
$classItem = "";
}
$out .= '<td style="text-align: left;">';
// display direct link to main page
$out .= '<a class="item' . $classItem . '" href="' . claro_htmlspecialchars(Url::Contextualize('page.php?wikiId=' . (int) $entry['id'] . '&action=show')) . '">' . '<img src="' . get_icon_url('wiki') . '" alt="' . get_lang("Wiki") . '" /> ' . $entry['title'] . '</a>' . '</td>' . "\n" . '<td style="text-align: center;">' . '<a href="' . claro_htmlspecialchars(Url::Contextualize('page.php?wikiId=' . (int) $entry['id'] . '&action=all')) . '">' . $wikiStore->getNumberOfPagesInWiki($entry['id']) . '</a>' . '</td>' . "\n" . '<td style="text-align: center;">';
// display direct link to main page
$out .= '<a href="' . claro_htmlspecialchars(Url::Contextualize('page.php?wikiId=' . (int) $entry['id'] . '&action=recent')) . '">' . '<img src="' . get_icon_url('history') . '" alt="' . get_lang("Recent changes") . '" />' . '</a>' . '</td>' . "\n";
// if admin, display edit and delete links
if ($groupId && claro_is_group_member() || $is_allowedToAdmin) {
// edit link
$out .= '<td style="text-align:center;">' . '<a href="' . claro_htmlspecialchars(Url::Contextualize($_SERVER['PHP_SELF'] . '?wikiId=' . (int) $entry['id'] . '&action=rqEdit')) . '">' . '<img src="' . get_icon_url('settings') . '" alt="' . get_lang("Edit properties") . '" />' . '</a>' . '</td>' . "\n";
// delete link
$out .= '<td style="text-align:center;">' . '<a href="' . claro_htmlspecialchars(Url::Contextualize($_SERVER['PHP_SELF'] . '?wikiId=' . (int) $entry['id'] . '&action=rqDelete')) . '">' . '<img src="' . get_icon_url('delete') . '" alt="' . get_lang("Delete") . '" />' . '</a>' . '</td>' . "\n";
if (true === $is_allowedToAdmin) {
$out .= '<td style="text-align:center;">' . '<a href="' . claro_htmlspecialchars(Url::Contextualize($_SERVER['PHP_SELF'] . '?wikiId=' . (int) $entry['id'] . '&action=exExport')) . '">' . '<img src="' . get_icon_url('export') . '" alt="' . get_lang("Export") . '" />' . '</a>' . '</td>' . "\n";
}
}
$out .= '</tr>' . "\n";
if (!empty($entry['description'])) {
$out .= '<tr>' . "\n";
if ($groupId && claro_is_group_member()) {
$colspan = 5;
} elseif ($is_allowedToAdmin) {
$colspan = 6;
} else {
$colspan = 3;
}
$out .= '<td colspan="' . $colspan . '"><div class="comment">' . $entry['description'] . '</div></td>' . "\n" . '</tr>' . "\n";
}
}
示例12: claro_htmlspecialchars
?>
" name="bottomFrame" />
</frameset>
<?php
} else {
?>
<frameset cols="*" border="0">
<frame src="<?php
echo claro_htmlspecialchars(Url::Contextualize('startModule.php'));
?>
" name="mainFrame" />
</frameset>
<?php
}
?>
<noframes>
<body>
<?php
echo get_lang('Your browser cannot see frames.');
?>
<br />
<a href="<?php
echo claro_htmlspecialchars(Url::Contextualize('../module.php'));
?>
"><?php
echo get_lang('Back');
?>
</a>
</body>
</noframes>
</html>
示例13: claro_htmlspecialchars
/* DELETE COMMAND */
$out .= '<td>' . '<a href="' . claro_htmlspecialchars(Url::Contextualize($_SERVER['PHP_SELF'] . '?cmd=exRm&file=' . $cmdFileName)) . '" ' . 'onclick="return CLDOC.confirmation(\'' . clean_str_for_javascript($dspFileName) . '\');">' . '<img src="' . get_icon_url('delete') . '" alt="' . get_lang('Delete') . '" />' . '</a>' . '</td>' . "\n";
/* MOVE COMMAND */
$out .= '<td>' . '<a href="' . claro_htmlspecialchars(Url::Contextualize($_SERVER['PHP_SELF'] . '?cmd=rqMv&file=' . $cmdFileName)) . '">' . '<img src="' . get_icon_url('move') . '" alt="' . get_lang('Move') . '" />' . '</a>' . '</td>' . "\n" . '<td>';
if ($groupContext) {
/* PUBLISH COMMAND */
if ($thisFile['type'] == A_FILE) {
$out .= '<a href="' . claro_htmlspecialchars(Url::Contextualize(get_module_url('CLWRK') . '/work.php?' . 'submitGroupWorkUrl=' . urlencode($thisFile['path']))) . '">' . '<small>' . get_lang('Publish') . '</small>' . '</a>';
}
// else noop
} elseif ($courseContext) {
/* VISIBILITY COMMAND */
if ($thisFile['visibility'] == "i") {
$out .= '<a href="' . claro_htmlspecialchars(Url::Contextualize($_SERVER['PHP_SELF'] . '?cmd=exChVis&file=' . $cmdFileName . '&vis=v')) . '">' . '<img src="' . get_icon_url('invisible') . '" alt="' . get_lang('Make visible') . '" />' . '</a>';
} else {
$out .= '<a href="' . claro_htmlspecialchars(Url::Contextualize($_SERVER['PHP_SELF'] . '?cmd=exChVis&file=' . $cmdFileName . '&vis=i')) . '">' . '<img src="' . get_icon_url('visible') . '" alt="' . get_lang('Make invisible') . '" />' . '</a>';
}
}
$out .= '</td>' . "\n";
}
// end if($is_allowedToEdit)
$out .= '</tr>' . "\n";
/* COMMENTS */
if ($thisFile['comment'] != '') {
$thisFile['comment'] = claro_htmlspecialchars($thisFile['comment']);
$thisFile['comment'] = claro_parse_user_text($thisFile['comment']);
$out .= '<tr align="left">' . "\n" . '<td colspan="' . $colspan . '">' . '<div class="comment">' . $thisFile['comment'] . '</div>' . '</td>' . "\n" . '</tr>' . "\n";
}
}
// end each ($fileList)
} else {
示例14: uniqid
?>
" method="post">
<input type="hidden" name="claroFormId" value="<?php
echo uniqid('');
?>
" />
<input type="hidden" name="cmd" value="<?php
echo $this->nextCommand;
?>
" />
<input type="hidden" name="catId" value="<?php
echo $this->catId;
?>
" />
<label for="catName"><?php
echo get_lang('Name');
?>
: </label><br />
<input type="text" name="catName" id="catName" value="<?php
echo $this->catName;
?>
" /><br /><br />
<input type="submit" value="<?php
echo get_lang('Ok');
?>
" />
<?php
echo claro_html_button(claro_htmlspecialchars(Url::Contextualize($_SERVER['PHP_SELF'])), get_lang('Cancel'));
?>
</form>
示例15: get_lang
$output .= '<table class="claroTable emphaseLine" ' . 'width="100%" border="0" cellspacing="2">' . "\n" . '<thead>' . "\n" . '<tr align="center" valign="top">' . "\n" . '<th>' . get_lang('Title') . '</th>' . "\n" . '<th>' . get_lang('Visibility') . '</th>' . "\n" . '<th colspan="2">' . get_lang('Order') . '</th>' . "\n" . '</tr>' . "\n" . '</thead>' . "\n" . '<tbody>' . "\n";
if (is_array($portletList) && !empty($portletList)) {
// only used to hide first up and last down commands
$portletListSize = count($portletList);
$i = 0;
foreach ($portletList as $portlet) {
$i++;
$output .= "\n" . '<tr>' . "\n" . '<td>' . claro_htmlspecialchars(get_lang($portlet['name'])) . '</td>' . "\n";
if ($portlet['visibility'] == 'visible') {
$output .= "\n" . '<td align="center">' . "\n" . '<a href="' . claro_htmlspecialchars(Url::Contextualize($_SERVER['PHP_SELF'] . '?cmd=exInvisible&label=' . claro_htmlspecialchars($portlet['label']))) . '">' . claro_html_icon('visible') . '</a>' . "\n" . '</td>' . "\n";
} else {
$output .= "\n" . '<td align="center">' . "\n" . '<a href="' . claro_htmlspecialchars(Url::Contextualize($_SERVER['PHP_SELF'] . '?cmd=exVisible&label=' . claro_htmlspecialchars($portlet['label']))) . '">' . claro_html_icon('invisible') . '</a>' . "\n" . '</td>' . "\n";
}
if ($i > 1) {
$output .= '<td align="center">' . '<a href="' . claro_htmlspecialchars(Url::Contextualize($_SERVER['PHP_SELF'] . '?label=' . claro_htmlspecialchars($portlet['label']) . '&cmd=exUp')) . '">' . '<img src="' . get_icon_url('move_up') . '" alt="' . get_lang('Move up') . '" />' . '</a>' . '</td>' . "\n";
} else {
$output .= '<td> </td>' . "\n";
}
if ($i < $portletListSize) {
$output .= '<td align="center">' . '<a href="' . claro_htmlspecialchars(Url::Contextualize($_SERVER['PHP_SELF'] . '?label=' . claro_htmlspecialchars($portlet['label']) . '&cmd=exDown')) . '">' . '<img src="' . get_icon_url('move_down') . '" alt="' . get_lang('Move down') . '" />' . '</a>' . '</td>' . "\n";
} else {
$output .= '<td> </td>' . "\n";
}
$output .= '</tr>' . "\n";
}
} else {
$output .= '<tr><td colspan="4">' . get_lang('Empty') . '</tr></td>' . "\n";
}
$output .= "\n" . '</tbody>' . "\n" . '</table>' . "\n";
$claroline->display->body->appendContent($output);
echo $claroline->display->render();