本文整理匯總了PHP中Docebo::inc方法的典型用法代碼示例。如果您正苦於以下問題:PHP Docebo::inc方法的具體用法?PHP Docebo::inc怎麽用?PHP Docebo::inc使用的例子?那麽, 這裏精選的方法代碼示例或許可以為您提供幫助。您也可以進一步了解該方法所在類Docebo
的用法示例。
在下文中一共展示了Docebo::inc方法的14個代碼示例,這些例子默認根據受歡迎程度排序。您可以為喜歡或者感覺有用的代碼點讚,您的評價將有助於係統推薦出更棒的PHP代碼示例。
示例1: loadBody
function loadBody()
{
//global $op, $modname, $prefix;
if (file_exists('modules/' . $this->module_name . '/' . $this->module_name . '.php')) {
//include('modules/'.$this->module_name.'/'.$this->module_name.'.php');
include Docebo::inc(_adm_ . '/modules/' . $this->module_name . '/' . $this->module_name . '.php');
} else {
//include('../appLms/admin/modules/'.$this->module_name.'/'.$this->module_name.'.php');
include Docebo::inc(_lms_ . '/admin/modules/' . $this->module_name . '/' . $this->module_name . '.php');
}
}
示例2: loadBody
function loadBody()
{
//include(dirname(__FILE__).'/../modules/'.$this->module_name.'/'.$this->module_name.'.php');
include Docebo::inc(_lms_ . '/admin/modules/' . $this->module_name . '/' . $this->module_name . '.php');
}
示例3: loadBody
function loadBody()
{
//EFFECTS: include module language and module main file
//include($GLOBALS['where_lms'].'/modules/'.$this->module_name.'/'.$this->module_name.'.php');
if (file_exists(_base_ . '/customscripts/' . _folder_lms_ . '/modules/' . $this->module_name . '/' . $this->module_name . '.php') && Get::cfg('enable_customscripts', false) == true) {
include Docebo::inc(_base_ . '/customscripts/' . _folder_lms_ . '/modules/' . $this->module_name . '/' . $this->module_name . '.php');
} else {
include Docebo::inc(_lms_ . '/modules/' . $this->module_name . '/' . $this->module_name . '.php');
}
}
示例4: _setCourseCompleted
function _setCourseCompleted()
{
if ($this->environment != 'course_lo') {
return;
}
if ($this->status == 'completed' || $this->status == 'passed') {
//update complete dates in DB
$query = "SELECT first_complete, last_complete FROM %lms_commontrack WHERE idTrack=" . (int) $this->idTrack;
$res = sql_query($query);
if ($res && sql_num_rows($res) > 0) {
$now = date("Y-m-d H:i:s");
list($first_complete, $last_complete) = sql_fetch_row($res);
$query = "UPDATE %lms_commontrack SET last_complete='" . $now . "'";
if (!$first_complete || $first_complete > $now) {
$query .= ", first_complete='" . $now . "'";
}
$query .= " WHERE idTrack=" . (int) $this->idTrack;
$res = sql_query($query);
}
//---
/*
if(isset($_SESSION['idCourse'])) {
$idCourse = $_SESSION['idCourse'];
} else {
*/
// the only way is a direct query :(, or else if more than one course is open only the last one will complete
$query = "SELECT idCourse " . "FROM %lms_organization " . "WHERE idOrg = '" . (int) $this->idReference . "' ";
list($idCourse) = sql_fetch_row(sql_query($query));
//}
$useridst = $this->idUser;
require_once Docebo::inc(_lms_ . '/modules/organization/orglib.php');
$repoDb = new OrgDirDb($idCourse);
$item = $repoDb->getFolderById($this->idReference);
$values = $item->otherValues;
$isTerminator = isset($values[ORGFIELDISTERMINATOR]) && $values[ORGFIELDISTERMINATOR];
if ($isTerminator) {
require_once $GLOBALS['where_lms'] . '/lib/lib.course.php';
require_once $GLOBALS['where_lms'] . '/lib/lib.stats.php';
saveTrackStatusChange((int) $useridst, (int) $idCourse, _CUS_END);
}
}
}
示例5: copy
/**
* function copy( $id, $back_url )
* @param int $id contains the resource id
* @param string $back_url contain the back url (not used yet)
* @return int $id if success FALSE if fail
**/
function copy($id, $back_url = NULL)
{
require_once Docebo::inc(_lms_ . '/modules/scorm/scorm.php');
list($idscorm_package) = sql_fetch_row(sql_query("\r\n\t\tSELECT idscorm_package \r\n\t\tFROM " . $GLOBALS['prefix_lms'] . "_scorm_organizations\r\n\t\tWHERE idscorm_organization = '" . (int) $id . "'"));
return _scorm_copyitem($idscorm_package, $id);
}
示例6: docebo_autoload
/**
* Definition of php magic __autoload() method
* @param <string> $classname the classname that php are tring to istanciate
* @return not used
*/
function docebo_autoload($classname)
{
// purify the request
$classname = preg_replace('/[^a-zA-Z0-9\\-\\_]+/', '', $classname);
// fixed bases classes
$fixed = array('Layout' => _lib_ . '/layout/lib.layout.php', 'CmsLayout' => _lib_ . '/layout/lib.cmslayout.php', 'LoginLayout' => _lib_ . '/layout/lib.loginlayout.php', 'Model' => _lib_ . '/mvc/lib.model.php', 'TreeModel' => _lib_ . '/mvc/lib.treemodel.php', 'Controller' => _lib_ . '/mvc/lib.controller.php', 'LmsController' => _lib_ . '/mvc/lib.lmscontroller.php', 'CmsController' => _lib_ . '/mvc/lib.cmscontroller.php', 'AdmController' => _lib_ . '/mvc/lib.admcontroller.php', 'AlmsController' => _lib_ . '/mvc/lib.almscontroller.php', 'AcmsController' => _lib_ . '/mvc/lib.acmscontroller.php', 'MobileController' => _lib_ . '/mvc/lib.mobilecontroller.php', 'LobjLmsController' => _lms_ . '/controllers/LobjLmsController.php', 'DbConn' => _base_ . '/db/lib.docebodb.php', 'Mysql_DbConn' => _base_ . '/db/drivers/docebodb.mysql.php', 'Mysqli_DbConn' => _base_ . '/db/drivers/docebodb.mysqli.php', 'Lang' => _i18n_ . '/lib.lang.php', 'DoceboLanguage' => _i18n_ . '/lib.lang.php', 'Format' => _i18n_ . '/lib.format.php', 'ICache' => _lib_ . '/cache/icache.php', 'DCache' => _lib_ . '/cache/dcache.php', 'DApcCache' => _lib_ . '/cache/dapccache.php', 'DDummyCache' => _lib_ . '/cache/ddummycache.php', 'DFileCache' => _lib_ . '/cache/dfilecache.php', 'DMemcache' => _lib_ . '/cache/dmemcache.php', 'Form' => _lib_ . '/lib.form.php', 'DForm' => _lib_ . '/forms/lib.dform.php', 'DoceboACL' => _lib_ . '/lib.acl.php', 'DoceboACLManager' => _lib_ . '/lib.aclmanager.php', 'Widget' => _base_ . '/widget/lib.widget.php', 'DoceboException' => _lib_ . '/error/doceboexception.php', 'MvcException' => _lib_ . '/error/mvcexception.php', 'Plugin' => _lib_ . '/lib.plugin.php', 'PluginManager' => _lib_ . '/lib.pluginmanager.php');
$tplengine = Get::cfg('template_engine', array());
foreach ($tplengine as $tplkey => $tpleng) {
switch ($tplkey) {
case 'twig':
$fixed['TwigManager'] = _lib_ . '/lib.twigmanager.php';
break;
default:
//$fixed[$tpleng['class']] = _lib_.'/'.$tpleng['lib'];
break;
}
}
if (Get::cfg('enable_plugins', false)) {
$fixed['PluginController'] = _lib_ . '/mvc/lib.plugincontroller.php';
}
//search for a base class and include the file if found
if (isset($fixed[$classname])) {
if (file_exists($fixed[$classname])) {
include_once $fixed[$classname];
}
return;
}
//possibile path for autoloading classes
$path = array('adm' => array(_adm_ . '/models', _adm_ . '/controllers'), 'alms' => array(_lms_ . '/admin/models', _lms_ . '/admin/controllers'), 'lms' => array(_lms_ . '/models', _lms_ . '/controllers'), 'acms' => array(_cms_ . '/admin/models', _cms_ . '/admin/controllers'), 'cms' => array(_cms_ . '/models', _cms_ . '/controllers'), 'lobj' => array(_lms_ . '/models', _lms_ . '/controllers'));
//possibile path for autoloading classes custom
$pathCustomscripts = array('adm' => array(_base_ . '/customscripts' . '/' . _folder_adm_ . '/models', _base_ . '/customscripts' . '/' . _folder_adm_ . '/controllers'), 'alms' => array(_base_ . '/customscripts' . '/' . _folder_lms_ . '/admin/models', _base_ . '/customscripts' . '/' . _folder_lms_ . '/admin/controllers'), 'lms' => array(_base_ . '/customscripts' . '/' . _folder_lms_ . '/models', _base_ . '/customscripts' . '/' . _folder_lms_ . '/controllers'), 'acms' => array(_base_ . '/customscripts' . '/' . _folder_cms_ . '/admin/models', _base_ . '/customscripts' . '/' . _folder_cms_ . '/admin/controllers'), 'cms' => array(_base_ . '/customscripts' . '/' . _folder_cms_ . '/models', _base_ . '/customscripts' . '/' . _folder_cms_ . '/controllers'), 'lobj' => array(_base_ . '/customscripts' . '/' . _folder_lms_ . '/models', _base_ . '/customscripts' . '/' . _folder_lms_ . '/controllers'));
//parse classname for info and path
$location = array();
if (preg_match('/(Mobile|Adm|Alms|Lms|Acms|Cms|Lobj)Controller$/', $classname, $location)) {
// include controller file
$loc = isset($location[1]) ? strtolower($location[1]) : 'adm';
if (file_exists($pathCustomscripts[$loc][1] . '/' . $classname . '.php') && Get::cfg('enable_customscripts', false) == true) {
$c_file = $pathCustomscripts[$loc][1] . '/' . $classname . '.php';
} else {
$c_file = $path[$loc][1] . '/' . $classname . '.php';
}
//if(file_exists($c_file))
include_once Docebo::inc($c_file);
return;
} else {
if (preg_match('/(Mobile|Adm|Alms|Lms|Acms|Cms|Lobj)$/', $classname, $location)) {
// include model file
$loc = isset($location[1]) ? strtolower($location[1]) : 'adm';
if (file_exists($pathCustomscripts[$loc][0] . '/' . $classname . '.php') && Get::cfg('enable_customscripts', false) == true) {
$c_file = $pathCustomscripts[$loc][0] . '/' . $classname . '.php';
} else {
$c_file = $path[$loc][0] . '/' . $classname . '.php';
}
//if(file_exists($c_file))
include_once Docebo::inc($c_file);
return;
}
}
// manage widgets classnames
if (preg_match('/(Widget)/', $classname, $location)) {
$loc = _base_ . '/widget/' . strtolower(str_replace(array('WidgetController', 'Widget'), array('', ''), $classname));
if (strpos($classname, 'Controller') !== false) {
// include controller file
$c_file = $loc . '/controller/' . $classname . '.php';
if (file_exists($c_file)) {
include_once Docebo::inc($c_file);
}
return;
} else {
//if(strpos($classname, 'Model') !== false) {
// include model file
$c_file = $loc . '/model/' . $classname . '.php';
if (file_exists($c_file)) {
include_once Docebo::inc($c_file);
}
return;
}
}
// search for a standard filename in the library
if (file_exists(_lib_ . '/lib.' . strtolower($classname) . '.php')) {
if (!class_exists('Docebo', false)) {
include_once _lib_ . '/lib.' . strtolower($classname) . '.php';
} else {
include_once Docebo::inc(_lib_ . '/lib.' . strtolower($classname) . '.php');
}
return;
}
// unable to autoload
}
示例7: defined
defined("IN_FORMA") or die('Direct access is forbidden.');
/* ======================================================================== \
| FORMA - The E-Learning Suite |
| |
| Copyright (c) 2013 (Forma) |
| http://www.formalms.org |
| License http://www.gnu.org/licenses/old-licenses/gpl-2.0.txt |
| |
| from docebo 4.0.5 CE 2008-2012 (c) docebo |
| License http://www.gnu.org/licenses/old-licenses/gpl-2.0.txt |
\ ======================================================================== */
if (Docebo::user()->isAnonymous() || !isset($_SESSION['idCourse'])) {
die("You can't access to oragnization");
}
require_once Docebo::inc(_lms_ . '/modules/organization/orglib.php');
function organization(&$treeView)
{
//getTitleArea('organizations');
// contruct and initialize TreeView to manage organization
/*$orgDb = new OrgDirDb();
if( !checkPerm('lesson') ) {
$treeView->tdb->setFilterVisibility( TRUE );
$treeView->tdb->setFilterAccess( Docebo::user()-> );
}
$treeView = new Org_TreeView($orgDb, $_SESSION['idCourse']);
$treeView->parsePositionData($_POST, $_POST, $_POST);*/
// manage items addition
if (isset($_GET['replay'])) {
示例8: render
/**
* This method will render a specific view for this mvc
* @param string $view_name the name of the view, must be equal to a php file inside the view folder for this mvc without the .php extension
* @param array $data_for_view an array of data that will be passed to the view.
* @param bool $return if true the rendering will be returned instead of printed as an echo
* The view php scope will be the controller ($this) but you can pass data that will be extracted into the view scope. For example if you pass
* array(
* 'bar' => 'foo'
* ) you will have a $bar var inside the view with the value setted to 'foo'
*/
public function render($view_name, $data_for_view = false, $return = false)
{
if (is_array($data_for_view)) {
extract($data_for_view, EXTR_SKIP);
}
$paths = array();
$extensions = array();
if (Get::cfg('enable_customscripts', false) == true) {
$paths[] = $this->viewCustomscriptsPath();
}
$paths[] = $this->viewPath();
$tplengine = Get::cfg('template_engine', array());
foreach ($tplengine as $tplkey => $tpleng) {
$extensions[$tplkey] = $tpleng['ext'];
}
$extensions['php'] = ".php";
$extension = "";
$path = "";
$tplkey = "";
foreach ($paths as $p) {
foreach ($extensions as $k => $e) {
$fullpath = $p . '/' . $this->_mvc_name . '/' . $view_name . $e;
if (file_exists($fullpath)) {
$extension = $e;
$path = $p;
$tplkey = $k;
break;
}
}
if ($extension != "") {
break;
}
}
switch ($tplkey) {
case "php":
include Docebo::inc($path . '/' . $this->_mvc_name . '/' . $view_name . $extension);
break;
case "twig":
echo TwigManager::getInstance()->render($view_name . $extension, $data_for_view, $path . '/' . $this->_mvc_name);
//$classname = 'TwigManager';
//echo $classname::getInstance()->render($view_name.$extension, $data_for_view, $path. '/' . $this->_mvc_name);
break;
default:
//die( 'FILENOTFOUND');
include Docebo::inc($this->viewPath() . '/' . $this->_mvc_name . '/' . $view_name . $extension);
break;
}
if ($return) {
$content = ob_get_contents();
@ob_clean();
return $content;
}
}
示例9: getPdf
function getPdf($html, $name, $img = false, $orientation = 'P', $download = true, $facs_simile = false, $for_saving = false)
{
require_once Docebo::inc(_base_ . '/lib/pdf/lib.pdf.php');
$pdf = new PDF($orientation);
$pdf->setEncrypted(Get::cfg('certificate_encryption', true));
$pdf->setPassword(Get::cfg('certificate_password', null));
if ($for_saving) {
return $pdf->getPdf($html, $name, $img, $download, $facs_simile, $for_saving);
} else {
$pdf->getPdf($html, $name, $img, $download, $facs_simile, $for_saving);
}
}
示例10: Execute
public static function Execute($auth_code, $module, $function, $params)
{
$class_name = $module . '_API';
//require_once(_base_.'/api/lib/api.'.$module.'.php');
require_once Docebo::inc(_base_ . '/api/lib/api.' . $module . '.php');
$api_obj = new $class_name();
$result = false;
if ($api_obj->checkAuthentication($auth_code)) {
$result = $api_obj->call($function, $params);
}
return $result;
}
示例11: loadBody
function loadBody()
{
include Docebo::inc(_lms_ . '/modules/scorm/scorm.php');
}
示例12: language
/**
* - load language from source
* - set the system language looking at ( user preference, browser detect, user force )
* @return array
*/
private static function language()
{
self::log("Loading session language functions");
require_once Docebo::inc(_i18n_ . '/lib.lang.php');
$sop = Get::req('sop', DOTY_ALPHANUM, false);
if (!$sop) {
$sop = Get::req('special', DOTY_ALPHANUM, false);
}
switch ($sop) {
case "changelang":
$new_lang = Get::req('new_lang', DOTY_ALPHANUM, false);
self::log("Sop 'changelang' intercepted, changing lang to : {$new_lang}");
Lang::set($new_lang, isset($_GET['logout']));
break;
}
//$glang =& DoceboLanguage::createInstance( 'standard', 'framework');
//$glang->setGlobal();
}
示例13: defined
<?php
defined("IN_FORMA") or die('Direct access is forbidden.');
/* ======================================================================== \
| FORMA - The E-Learning Suite |
| |
| Copyright (c) 2013 (Forma) |
| http://www.formalms.org |
| License http://www.gnu.org/licenses/old-licenses/gpl-2.0.txt |
| |
| from docebo 4.0.5 CE 2008-2012 (c) docebo |
| License http://www.gnu.org/licenses/old-licenses/gpl-2.0.txt |
\ ======================================================================== */
require_once Docebo::inc(_base_ . '/lib/lib.aclmanager.php');
/**
* Acl common tasks class
* This class is only for check permissions
* To manage ACLs we must use DoceboACLManager
*
* NOTE: ST means Security Token
*
* @package admin-core
* @subpackage user
* @category ACL
* @author Emanuele Sandri <esandri @ tiscali . it>
* @version $Id: lib.acl.php 852 2006-12-16 14:04:44Z giovanni $
*/
class DoceboACL
{
/** Instance of DoceboACLManager */
var $aclManager = NULL;
示例14: ucfirst
$mvc = ucfirst($r[0]) . (count($r) == 2 ? 'Lms' : '') . 'Controller';
$action = $r[1];
$controller = new $mvc(strtolower($r[0]));
ob_clean();
$controller->request($action);
aout(ob_get_contents());
ob_clean();
} else {
$mn = Get::req('mn', DOTY_ALPHANUM, '');
$plf = Get::req('plf', DOTY_ALPHANUM, !empty($_SESSION['current_action_platform']) ? $_SESSION['current_action_platform'] : Get::cur_plat());
if ($mn == '') {
$fl = Get::req('file', DOTY_ALPHANUM, '');
$sf = Get::req('sf', DOTY_ALPHANUM, '');
$aj_file = $GLOBALS['where_' . $plf] . '/lib/' . ($sf ? $sf . '/' : '') . 'ajax.' . $fl . '.php';
} else {
if ($plf == 'framework') {
$aj_file = $GLOBALS['where_' . $plf] . '/modules/' . $mn . '/ajax.' . $mn . '.php';
} else {
$aj_file = $GLOBALS['where_' . $plf] . '/modules/' . $mn . '/ajax.' . $mn . '.php';
}
}
include Docebo::inc($aj_file);
}
// finalize
Boot::finalize();
// remove all the echo
ob_clean();
// Print out the page
echo $GLOBALS['operation_result'];
// flush buffer
ob_end_flush();