• 设为首页
  • 点击收藏
  • 手机版
    手机扫一扫访问
    迪恩网络手机版
  • 关注官方公众号
    微信扫一扫关注
    迪恩网络公众号

PHP get_module_url函数代码示例

原作者: [db:作者] 来自: [db:来源] 收藏 邀请

本文整理汇总了PHP中get_module_url函数的典型用法代码示例。如果您正苦于以下问题:PHP get_module_url函数的具体用法?PHP get_module_url怎么用?PHP get_module_url使用的例子?那么恭喜您, 这里精选的函数代码示例或许可以为您提供帮助。



在下文中一共展示了get_module_url函数的20个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于我们的系统推荐出更棒的PHP代码示例。

示例1: getToolbar

 /**
  * 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;
 }
开发者ID:rhertzog,项目名称:lcs,代码行数:11,代码来源:class.wiki2xhtmlarea.php


示例2: resolve

 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');
     }
 }
开发者ID:rhertzog,项目名称:lcs,代码行数:35,代码来源:cllp.linker.cnr.php


示例3: CLANN_write_ical

/**
 * 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 <[email protected]>
 */
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 . '&amp;l#ann' . $announcementItem['id'], get_locale('iso639_1_code'), '');
        }
    }
    return $iCal;
}
开发者ID:rhertzog,项目名称:lcs,代码行数:39,代码来源:ical.write.cnr.php


示例4: render

 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'] . '&amp;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> ' . '&copy; 2001 - 2013' . '</span>';
     $this->assign('poweredBy', $poweredByOutput);
     return parent::render();
 }
开发者ID:rhertzog,项目名称:lcs,代码行数:29,代码来源:footer.lib.php


示例5: 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;
 }
开发者ID:rhertzog,项目名称:lcs,代码行数:8,代码来源:coursehomepage.cnr.php


示例6: resolve

 /**
  * 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');
     }
 }
开发者ID:rhertzog,项目名称:lcs,代码行数:14,代码来源:linker.cnr.php


示例7: 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;
 }
开发者ID:rhertzog,项目名称:lcs,代码行数:8,代码来源:coursehomepage.cnr.php


示例8: getModuleLinkList

 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="" />&nbsp;' . $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="" />&nbsp;' . $toolName . '</a>' . "\n";
         } else {
             $toolLinkList[] = '<span ' . $style . '>' . '<img class="clItemTool" src="' . $icon . '" alt="" />&nbsp;' . $toolName . '</span>' . "\n";
         }
     }
     return $toolLinkList;
 }
开发者ID:rhertzog,项目名称:lcs,代码行数:57,代码来源:course.lib.php


示例9: resolve

 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');
     }
 }
开发者ID:rhertzog,项目名称:lcs,代码行数:11,代码来源:linker.cnr.php


示例10: get_icon_url

/**
 * 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';
}
开发者ID:rhertzog,项目名称:lcs,代码行数:58,代码来源:icon.lib.php


示例11: resolve

 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');
     }
 }
开发者ID:rhertzog,项目名称:lcs,代码行数:20,代码来源:linker.cnr.php


示例12: resolve

 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');
     }
 }
开发者ID:rhertzog,项目名称:lcs,代码行数:20,代码来源:linker.cnr.php


示例13: CLCAL_write_ical

/**
 * 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 <[email protected]>
 */
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 . '&amp;l#item' . $thisEvent['id'], get_locale('iso639_1_code'), '');
            }
        }
    }
    return $iCal;
}
开发者ID:rhertzog,项目名称:lcs,代码行数:34,代码来源:ical.write.cnr.php


示例14: loadFromModule

 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;
         }
     }
 }
开发者ID:rhertzog,项目名称:lcs,代码行数:38,代码来源:loader.lib.php


示例15: 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";
开发者ID:rhertzog,项目名称:lcs,代码行数:31,代码来源:module.php


示例16: foreach

 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&amp;module_id=' . $module['id'] . '&amp;dock=' . urlencode($dock) . '">' . '<img src="' . get_icon_url('move_up') . '" alt="' . get_lang('Move up') . '" />' . '</a>' . "\n";
     } else {
         $out .= '&nbsp;';
     }
     $out .= '</td>' . "\n";
     //down
     $out .= '<td align="center">' . "\n";
     if ($iteration != $enditeration) {
开发者ID:rhertzog,项目名称:lcs,代码行数:31,代码来源:module_dock.php


示例17: foreach

} 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();
开发者ID:rhertzog,项目名称:lcs,代码行数:31,代码来源:viewsearch.php


示例18: get_lang

                    ?>
                            &nbsp;<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 />
开发者ID:rhertzog,项目名称:lcs,代码行数:31,代码来源:forum_index.tpl.php


示例19: 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";
 }
开发者ID:rhertzog,项目名称:lcs,代码行数:4,代码来源:tracking.cnr.php


示例20: 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>&nbsp;</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;
 }
开发者ID:rhertzog,项目名称:lcs,代码行数:48,代码来源:tracking.cnr.php



注:本文中的get_module_url函数示例整理自Github/MSDocs等源码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。


鲜花

握手

雷人

路过

鸡蛋
该文章已有0人参与评论

请发表评论

全部评论

专题导读
上一篇:
PHP get_module_zone函数代码示例发布时间:2022-05-15
下一篇:
PHP get_module_types_names函数代码示例发布时间:2022-05-15
热门推荐
阅读排行榜

扫描微信二维码

查看手机版网站

随时了解更新最新资讯

139-2527-9053

在线客服(服务时间 9:00~18:00)

在线QQ客服
地址:深圳市南山区西丽大学城创智工业园
电邮:jeky_zhao#qq.com
移动电话:139-2527-9053

Powered by 互联科技 X3.4© 2001-2213 极客世界.|Sitemap