本文整理汇总了PHP中claro_get_conf_repository函数的典型用法代码示例。如果您正苦于以下问题:PHP claro_get_conf_repository函数的具体用法?PHP claro_get_conf_repository怎么用?PHP claro_get_conf_repository使用的例子?那么, 这里精选的函数代码示例或许可以为您提供帮助。
在下文中一共展示了claro_get_conf_repository函数的15个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的PHP代码示例。
示例1: Config
/**
* constructor, build a config object
*
* @param string $config_code
*/
function Config($config_code)
{
$this->config_code = $config_code;
$this->conf_dirname = claro_get_conf_repository();
// in 1.8 is 'platform/conf' folder
$this->def_dirname = claro_get_conf_def_file($config_code);
$this->backlog = new Backlog();
$this->def_loaded = false;
}
示例2: __construct
public function __construct()
{
if (file_exists(claro_get_conf_repository() . 'CLCAL.conf.php')) {
include claro_get_conf_repository() . 'CLCAL.conf.php';
}
$today = getdate();
$this->month = $today['mon'];
$this->year = $today['year'];
}
示例3: __construct
public function __construct($label)
{
parent::__construct($label);
$this->name = 'Latest announcements';
$this->label = 'CLANN_Portlet';
if (file_exists(claro_get_conf_repository() . 'CLANN.conf.php')) {
include claro_get_conf_repository() . 'CLANN.conf.php';
}
}
示例4: claro_disp_auth_form
$gidReset = true;
require '../inc/claro_init_global.inc.php';
if (!claro_is_in_a_course() || !claro_is_course_allowed()) {
claro_disp_auth_form(true);
}
$context = claro_get_current_context(CLARO_CONTEXT_COURSE);
// Local lib
require_once './lib/announcement.lib.php';
// get some shared lib
require_once get_path('incRepositorySys') . '/lib/sendmail.lib.php';
// require_once get_path('clarolineRepositorySys') . '/linker/linker.inc.php';
FromKernel::uses('core/linker.lib');
ResourceLinker::init();
// Get specific conf file
require claro_get_conf_repository() . 'ical.conf.php';
require claro_get_conf_repository() . 'rss.conf.php';
claro_set_display_mode_available(true);
// Set flag following depending on settings
$is_allowedToEdit = claro_is_allowed_to_edit();
$courseId = claro_get_current_course_id();
$userLastLogin = claro_get_current_user_data('lastLogin');
// DB tables definition
$tbl_cdb_names = claro_sql_get_main_tbl();
$tbl_course_user = $tbl_cdb_names['rel_course_user'];
$tbl_user = $tbl_cdb_names['user'];
// Default display
$displayForm = false;
$displayList = true;
$subTitle = '';
$dialogBox = new DialogBox();
// avoid executing commands twice when switching view mode
示例5: claro_disp_auth_form
if (!claro_is_in_a_course() || !claro_is_course_allowed()) {
claro_disp_auth_form(true);
}
if (empty($cidReq)) {
claro_die(get_lang('Cannot find course'));
}
// Fetch this course's portlets
$portletiterator = new CourseHomePagePortletIterator(ClaroCourse::getIdFromCode($cidReq));
// Include specific CSS if any
if (file_exists(get_conf('coursesRepositorySys') . $_course['path'] . '/css/course.css')) {
$claroline->display->header->addHtmlHeader('<link rel="stylesheet" media="screen" type="text/css" href="' . get_path('url') . '/' . get_path('coursesRepositoryAppend') . $_course['path'] . '/css/course.css" />');
}
// Instantiate course
$thisCourse = new ClaroCourse();
$thisCourse->load($cidReq);
include claro_get_conf_repository() . 'rss.conf.php';
// Include the course home page special CSS
CssLoader::getInstance()->load('coursehomepage', 'all');
$toolRepository = get_path('clarolineRepositoryWeb');
claro_set_display_mode_available(true);
// Manage portlets
if (claro_is_course_manager() && !empty($portletClass)) {
// Require the right class
$portletPath = get_module_path($portletLabel) . '/connector/coursehomepage.cnr.php';
if (file_exists($portletPath)) {
require_once $portletPath;
} else {
throw new Exception(get_lang('Cannot find this portlet'));
}
if ($portletCmd == 'exAdd') {
$portlet = new $portletClass();
示例6: get_lang
echo '</ol>';
} else {
echo get_lang('No function in this extension') . '<br />';
}
}
}
} elseif ($cmd == 'phpinfo') {
echo '<div class="center">';
echo phpinfoNoHtml();
echo '</div>';
} elseif ($cmd == 'secinfo') {
require_once dirname(__FILE__) . '/../../inc/lib/thirdparty/PhpSecInfo/PhpSecInfo.lib.php';
phpsecinfo();
} elseif ($cmd == 'claroconf') {
echo '<div style="background-color: #dfdfff;">';
highlight_file(claro_get_conf_repository() . 'claro_main.conf.php');
echo '<hr /></div>';
} else {
?>
<table class="claroTable">
<thead>
<tr>
<th scope="col"><?php
echo get_lang('Software');
?>
</th>
<th scope="col"><?php
echo get_lang('Version');
?>
</th>
</tr>
示例7: claro_get_conf_repository
}
/**
* CLAROLINE
*
* User desktop : course list portlet.
*
* @version $Revision: 14314 $
* @copyright (c) 2001-2011, Universite catholique de Louvain (UCL)
* @license http://www.gnu.org/copyleft/gpl.html (GPL) GENERAL PUBLIC LICENSE
* @package DESKTOP
* @author Claroline Team <info@claroline.net>
* @fixme should not be a portlet anymore
*/
FromKernel::uses('courselist.lib');
// we need CLHOME conf file for render_user_course_list function
include claro_get_conf_repository() . 'CLHOME.conf.php';
// conf file
class MyCourseList extends UserDesktopPortlet
{
public function __construct()
{
$this->name = 'My course list';
$this->label = 'mycourselist';
}
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();
示例8: array
*
* Build iCal file for user in given course
*
* @version $Revision: 13707 $
* @copyright (c) 2001-2011, Universite catholique de Louvain (UCL)
* @author Claroline Team <info@claroline.net>
* @author Christophe Gesche <moosh@claroline.net>
* @license http://www.gnu.org/copyleft/gpl.html
* GNU GENERAL PUBLIC LICENSE version 2.0
* @package KERNEL
*/
$_course = array();
$siteName = '';
$is_courseAllowed = false;
require dirname(__FILE__) . '/../inc/claro_init_global.inc.php';
include_once claro_get_conf_repository() . 'ical.conf.php';
include_once get_path('includePath') . '/lib/ical.write.lib.php';
$formatList = array('ics' => 'iCalendar', 'xcs' => 'xCalendar (xml)', 'rdf' => 'rdf');
if (!get_conf('enableICalInCourse')) {
// Codes Status HTTP 404 for rss feeder
header('HTTP/1.0 404 Not Found');
exit;
}
$calType = array_key_exists('calFormat', $_REQUEST) && array_key_exists($_REQUEST['calFormat'], $formatList) ? $_REQUEST['calFormat'] : get_conf('calType', 'ics');
// need to be in a course
if (!claro_is_in_a_course()) {
die('<form >cidReq = <input name="cidReq" type="text" /><input type="submit" /></form>');
}
if (!$_course['visibility'] && !claro_is_course_allowed()) {
if (!isset($_SERVER['PHP_AUTH_USER'])) {
header('WWW-Authenticate: Basic realm="' . get_lang('iCal feed for %course', array('%course' => $_course['name'])) . '"');
示例9: claro_is_allowed_to_edit
/*
* Permissions
*/
if (claro_is_in_a_course() && !claro_is_in_a_group()) {
// course context
$is_allowedToEdit = claro_is_allowed_to_edit();
$pathSys = get_path('coursesRepositorySys') . claro_get_course_path() . '/document/';
$pathWeb = get_path('coursesRepositoryWeb') . claro_get_course_path() . '/document/';
require claro_get_conf_repository() . 'CLDOC.conf.php';
$maxFilledSpace = get_conf('maxFilledSpace_for_course');
} elseif (claro_is_in_a_group()) {
// course context
$is_allowedToEdit = claro_is_allowed_to_edit();
$pathSys = get_path('coursesRepositorySys') . claro_get_course_path() . '/group/' . claro_get_current_group_data('directory');
$pathWeb = get_path('coursesRepositoryWeb') . claro_get_course_path() . '/group/' . claro_get_current_group_data('directory');
require claro_get_conf_repository() . 'CLDOC.conf.php';
$maxFilledSpace = get_conf('maxFilledSpace_for_course');
} else {
// platform context
$is_allowedToEdit = claro_is_platform_admin();
$pathSys = get_path('rootSys') . 'platform/document/';
$pathWeb = get_path('rootWeb') . 'platform/document/';
}
/*
* Libraries
*/
include_once $includePath . '/lib/fileUpload.lib.php';
include_once $includePath . '/lib/fileManage.lib.php';
/*
* Init directory
*/
示例10: dirname
* @license http://www.gnu.org/copyleft/gpl.html
* GNU GENERAL PUBLIC LICENSE version 2 or later
* @package CLWORK
* @since 1.9.5
*/
$tlabelReq = 'CLWRK';
require_once dirname(__FILE__) . '/../../claroline/inc/claro_init_global.inc.php';
//Security checks
if (!claro_is_user_authenticated()) {
claro_disp_auth_form(true);
}
if (!claro_is_allowed_to_edit()) {
claro_die(get_lang('Not allowed'));
}
//Loading tool config file and required libraries
require_once claro_get_conf_repository() . 'CLWRK.conf.php';
require_once get_path('incRepositorySys') . '/lib/course_utils.lib.php';
//init DialogBox object
$dialogBox = new DialogBox();
try {
//init user input handler
$userInput = Claro_UserInput::getInstance();
$userInput->setValidatorForAll(new Claro_Validator_ValueType('string'));
$cmd = $userInput->get('cmd');
if ('savePrefs' == $cmd) {
$errorCount = 0;
$notifySubmissions = $userInput->getMandatory('submission');
$notifyFeedbacks = $userInput->getMandatory('feedback');
if (false === save_course_property('notify_submissions', $notifySubmissions, claro_get_current_course_id())) {
$errorsCount++;
}
示例11: dirname
// $Id: platform_courses.php 14288 2012-10-17 08:02:02Z jrm_ $
/**
* CLAROLINE
*
* @version $Revision: 14288 $
* @license http://www.gnu.org/licenses/agpl-3.0-standalone.html AGPL Affero General Public License
* @copyright Copyright 2010 Claroline Consortium
* @author Claro Team <cvs@claroline.net>
* @author Antonin Bourguignon <antonin.bourguignon@claroline.net>
* @since 1.10
*/
require '../inc/claro_init_global.inc.php';
require '../inc/lib/courselist.lib.php';
require_once dirname(__FILE__) . '/../inc/lib/coursesearchbox.class.php';
//load home page config file
require claro_get_conf_repository() . 'CLHOME.conf.php';
// Build the breadcrumb
$nameTools = get_lang('Platform courses');
$categoryId = !empty($_REQUEST['categoryId']) ? (int) $_REQUEST['categoryId'] : 0;
$categoryBrowser = new CategoryBrowser($categoryId, claro_get_current_user_id());
if (isset($_REQUEST['cmd']) && $_REQUEST['cmd'] == 'search') {
$categoriesList = array();
$coursesList = search_course($_REQUEST['keyword']);
}
// Display
$template = $categoryBrowser->getTemplate();
$claroline->display->body->appendContent($template->render());
$searchbox = new CourseSearchBox($_SERVER['REQUEST_URI']);
$claroline->display->body->appendContent($searchbox->render());
echo $claroline->display->render();
示例12: define
* @todo separate checking and output
* @todo protect "showall" when there is nothing in cache
*/
define('DISP_RESULT', __LINE__);
define('DISP_NOT_ALLOWED', __LINE__);
require '../inc/claro_init_global.inc.php';
// Security check
if (!claro_is_user_authenticated()) {
claro_disp_auth_form();
}
if (!claro_is_platform_admin()) {
claro_die(get_lang('Not allowed'));
}
include_once get_path('incRepositorySys') . '/lib/statsUtils.lib.inc.php';
include_once get_path('incRepositorySys') . '/lib/thirdparty/pear/Lite.php';
include_once claro_get_conf_repository() . 'CLKCACHE.conf.php';
// right
$is_allowedToCheckProblems = claro_is_platform_admin();
// Cache_lite setting & init
$cache_options = array('cacheDir' => get_path('rootSys') . 'tmp/cache/campusProblem/', 'lifeTime' => get_conf('cache_lifeTime', 10), 'automaticCleaningFactor' => get_conf('cache_automaticCleaningFactor', 50));
if (claro_debug_mode()) {
$cache_options['pearErrorMode'] = CACHE_LITE_ERROR_DIE;
}
if (claro_debug_mode()) {
$cache_options['lifeTime'] = 3;
}
if (!file_exists($cache_options['cacheDir'])) {
include_once get_path('incRepositorySys') . '/lib/fileManage.lib.php';
claro_mkdir($cache_options['cacheDir'], CLARO_FILE_PERMISSIONS, true);
}
$Cache_Lite = new Cache_Lite($cache_options);
示例13: load_module_config
/**
* Load configuration file for a module
* @param $module module label (default null for current module)
*/
function load_module_config($moduleLabel = null)
{
if (!$moduleLabel) {
$moduleLabel = get_current_module_label();
}
// load main config file
$mainConfigFile = claro_get_conf_repository() . $moduleLabel . '.conf.php';
if (file_exists($mainConfigFile)) {
include $mainConfigFile;
}
// check if config overwritten in course and load config file
if (claro_is_in_a_course()) {
$courseConfigFile = get_conf('coursesRepositorySys') . claro_get_current_course_data('path') . '/conf/' . $moduleLabel . '.conf.php';
if (file_exists($courseConfigFile)) {
include $courseConfigFile;
}
}
}
示例14: get_lang
echo '<br />' . get_lang('%path is missing', array('%path' => $coursesRepositorySys)) . "\n";
}
if ($coursesRepositorySysWriteProtected) {
echo '<br />' . get_lang('Claroline cannot write to %path', array('%path' => $coursesRepositorySys)) . "\n";
}
if ($garbageRepositorySysMissing) {
echo '<br />' . get_lang('%path is missing', array('%path' => $garbageRepositorySys)) . "\n";
}
if ($garbageRepositorySysWriteProtected) {
echo '<br />' . get_lang('Claroline cannot write to %path', array('%path' => $garbageRepositorySys)) . "\n";
}
if ($platformConfigRepositorySysMissing) {
echo '<br />' . get_lang('%path is missing', array('%path' => claro_get_conf_repository())) . "\n";
}
if ($platformConfigRepositorySysWriteProtected) {
echo '<br />' . get_lang('Claroline cannot write to %path', array('%path' => claro_get_conf_repository())) . "\n";
}
echo get_lang('Write problems can come from two possible causes') . ' :<br />' . "\n" . '<ul>' . "\n" . '<li>' . "\n" . get_lang('Permission problems.') . '<br />' . "\n" . get_lang('Try initially with <em>chmod 777 -R</em> and increase restrictions gradually.') . "\n" . '</li>' . "\n" . '<li>' . "\n" . get_lang('PHP is running in <a href="http://www.php.net/manual/en/features.safe-mode.php" target="_phpman">SAFE MODE</a>.') . '<br />' . "\n" . get_lang('If possible, try to switch it off.') . "\n" . '</li>' . "\n" . '</ul>' . "\n";
echo '<p align="right">' . '<input type="submit" name="alreadyVisited" value="' . get_lang('Start again from the beginning') . '" />' . "\n" . '<input type="submit" name="cmdDoInstall" value="' . get_lang('Retry') . '" />' . "\n" . '</p>';
} elseif (DISP_RUN_INSTALL_COMPLETE == $display) {
echo '<h2>' . $panelTitle[DISP_RUN_INSTALL_COMPLETE] . '</h2>' . "\n" . '<div class="claroDialogBox boxWarning">' . '<p>' . '<strong>' . get_lang('Warning') . '</strong>' . "\n" . ' : ' . get_lang('We highly recommend that you <strong>protect or remove the <em>/claroline/install/</em> directory</strong>.') . "\n" . '</p>' . '</div>' . "\n" . '<fieldset>' . "\n" . '<legend>' . get_lang('Do not forget to') . '</legend>' . '<ul>' . '<li>' . get_lang('Tune your platform configuration in %administration | %configuration', array('%administration' => get_lang('Administration'), '%configuration' => get_lang('Configuration'))) . "\n" . '</li>' . '<li>' . get_lang('Build your course category tree in %administration | %manage course categories', array('%administration' => get_lang('Administration'), '%manage course categories' => get_lang('Manage course categories'))) . "\n" . '</li>' . '<li>' . get_lang('Edit or clear text zones in %administration | %edit text zones', array('%administration' => get_lang('Administration'), '%edit text zones' => get_lang('Edit text zones'))) . "\n" . '</li>' . '</ul>' . "\n" . '</fieldset>' . "\n" . '<div id="goToCampusLink">' . "\n" . '<a href="../../index.php">' . get_lang('Go to your brand new campus') . '</a>' . "\n" . '</div>' . "\n";
} else {
echo get_lang('Unhandled error') . '<br />' . "\n" . '<br />' . "\n" . get_lang('Please report and explain this issue on <a href="%forumUrl">Claroline\'s support forums</a>', array('%forumUrl' => 'http://forum.claroline.net'));
}
// navigation buttons
$htmlNextPrevButton = '<div id="navigation">' . "\n" . '<div id="navToNext">' . "\n";
if (!is_null($stepPos) && $stepPos !== false && $stepPos + 1 < count($panelSequence)) {
$htmlNextPrevButton .= '<input type="submit" name="' . $cmdName[$panelSequence[$stepPos + 1]] . '" value="' . get_lang('Next') . ' > " ' . ($nextStepDisable ? 'disabled="disabled"' : '') . ' />' . "\n";
} elseif (DISP_LAST_CHECK_BEFORE_INSTALL == $display) {
$htmlNextPrevButton .= '<input type="submit" name="cmdDoInstall" value="' . get_lang('Install Claroline') . '" />' . "\n";
}
示例15:
}
} else {
$coursesRepositorySysMissing = TRUE;
$display = DISP_RUN_INSTALL_NOT_COMPLETE;
}
if (file_exists($garbageRepositorySys)) {
if (!is_writable($garbageRepositorySys)) {
$garbageRepositorySysWriteProtected = TRUE;
$display = DISP_RUN_INSTALL_NOT_COMPLETE;
}
} else {
$garbageRepositorySysMissing = TRUE;
$display = DISP_RUN_INSTALL_NOT_COMPLETE;
}
if (file_exists(claro_get_conf_repository())) {
if (!is_writable(claro_get_conf_repository())) {
$platformConfigRepositorySysWriteProtected = TRUE;
$display = DISP_RUN_INSTALL_NOT_COMPLETE;
}
} else {
$platformConfigRepositorySysMissing = TRUE;
$display = DISP_RUN_INSTALL_NOT_COMPLETE;
}
/**
* Initialise right profile
*/
include_once 'init_profile_right.lib.php';
create_required_profile();
/**
* ADD MODULES
*/