当前位置: 首页>>代码示例>>PHP>>正文


PHP Docebo类代码示例

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


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

示例1: __construct

 public function __construct($mvc_name)
 {
     parent::__construct($mvc_name);
     require_once _base_ . '/lib/lib.json.php';
     $this->json = new Services_JSON();
     $this->acl_man =& Docebo::user()->getAclManager();
 }
开发者ID:abhinay100,项目名称:forma_app,代码行数:7,代码来源:EditionLmsController.php

示例2: drawCalendar

function drawCalendar()
{
    checkPerm('view');
    $size = importVar('size', false, 'max');
    $width = "90%";
    if ($size == "min") {
        $width = "200px";
    }
    addCss('calendar_' . $size);
    YuiLib::load('base,dragdrop');
    Util::get_js(Get::rel_path('lms') . '/modules/calendar/calendar.js', true, true);
    Util::get_js(Get::rel_path('lms') . '/modules/calendar/calendar_helper.js', true, true);
    //permissions = permissions granted to the logged user according to his/her level and role
    //	2 => can create/delete/modify all events
    //	1 => can create/delete/modify only own events
    //	0 => can view only
    $permissions = 0;
    if (checkPerm('mod', true)) {
        $permissions = 2;
    } elseif (checkPerm('personal', true)) {
        $permissions = 1;
    }
    //mode="edit" => events can be added and edited according to given permissions
    //mode="view" => events can only be viewed regardless the permissions
    $GLOBALS['page']->add('<script type="text/javascript">' . '	setup_cal(	null, ' . '\'lms\', ' . '\'lms\', ' . '\'edit\', ' . '\'' . $permissions . '\', ' . '\'' . Docebo::user()->getIdSt() . '\' ' . ');' . '</script>', 'page_head');
    $GLOBALS['page']->add("\n" . getTitleArea(Lang::t('_CALENDAR', 'calendar'), 'calendar') . '<div class="std_block">' . '<div id="displayCalendar" style="clear: both; width:' . $width . '"></div>' . '<div class="nofloat"></div>' . '</div>', 'content');
}
开发者ID:abhinay100,项目名称:forma_app,代码行数:27,代码来源:calendar.php

示例3: connectedToUser

 public function connectedToUser($network_code, $user_idst = false)
 {
     $res = false;
     $user_idst = $user_idst > 0 ? $user_idst : getLogUserId();
     if (!isset($this->_userinfo[$user_idst])) {
         $acl_man = Docebo::user()->getAclManager();
         $this->_userinfo[$user_idst] = $acl_man->getUser($user_idst, false);
     }
     switch ($network_code) {
         case 'twitter':
             $res = !empty($this->_userinfo[$user_idst][ACL_INFO_TWITTER_ID]);
             break;
         case 'linkedin':
             $res = !empty($this->_userinfo[$user_idst][ACL_INFO_LINKEDIN_ID]);
             break;
         case 'facebook':
             $res = !empty($this->_userinfo[$user_idst][ACL_INFO_FACEBOOK_ID]);
             break;
         case 'google':
             $res = !empty($this->_userinfo[$user_idst][ACL_INFO_GOOGLE_ID]);
             break;
         case 'google_apps':
             $res = true;
             break;
     }
     return $res;
 }
开发者ID:abhinay100,项目名称:forma_app,代码行数:27,代码来源:lib.social.php

示例4: getTemplate

/**
 * @return string the actual template name
 */
function getTemplate()
{
    // If saved in session use this one
    if (isset($_SESSION['template']) && $_SESSION['template'] != false) {
        return $_SESSION['template'];
    }
    //search for a template associated to the current host
    $plat_templ = parseTemplateDomain($_SERVER['HTTP_HOST']);
    if ($plat_templ != false) {
        $_SESSION['template'] = $plat_templ;
        return $plat_templ;
    }
    // search template according to the org_chart_tree option
    if (!Docebo::user()->isAnonymous()) {
        $qtxt = "SELECT associated_template FROM\r\n\t\t\t%adm_org_chart_tree\r\n\t\t\tWHERE associated_template IS NOT NULL AND\r\n\t\t\tidst_oc IN (" . implode(',', Docebo::user()->getArrSt()) . ")\r\n\t\t\tORDER BY iLeft DESC\r\n\t\t\tLIMIT 0,1";
        $re = sql_query($qtxt);
        if (mysql_num_rows($re) > 0) {
            list($template_code) = sql_fetch_row($re);
            setTemplate($template_code);
            return $_SESSION['template'];
        }
    }
    // search for the default template
    $_SESSION['template'] = getDefaultTemplate();
    return $_SESSION['template'];
}
开发者ID:abhinay100,项目名称:forma_app,代码行数:29,代码来源:lib.template.php

示例5: assignVar

 function assignVar()
 {
     $this->id = importVar("id");
     $this->calEventClass = importVar("calEventClass");
     $this->start_year = importVar("start_year");
     $this->start_month = importVar("start_month");
     $this->start_day = importVar("start_day");
     $this->_year = $this->start_year;
     $this->_month = $this->start_month;
     $this->_day = $this->start_day;
     $this->start_hour = importVar("start_hour");
     $this->start_min = importVar("start_min");
     $this->start_sec = importVar("start_sec");
     $this->end_year = importVar("end_year");
     $this->end_month = importVar("end_month");
     $this->end_day = importVar("end_day");
     $this->end_hour = importVar("end_hour");
     $this->end_min = importVar("end_min");
     $this->end_sec = importVar("end_sec");
     $this->title = importVar("title");
     $this->description = importVar("description");
     $this->_owner = importVar("_owner");
     if (!$this->_owner) {
         $this->_owner == Docebo::user()->getIdSt();
     }
     $this->category = importVar("category");
     $this->private = importVar("private");
 }
开发者ID:abhinay100,项目名称:forma_app,代码行数:28,代码来源:lib.calevent_core.php

示例6: organization_categorize_save

function organization_categorize_save(&$treeView, $idItem)
{
    require_once _lms_ . '/lib/lib.kbres.php';
    $folder = $treeView->tdb->getFolderById($idItem);
    $data = $folder->otherValues;
    $res_id = Get::req('res_id', DOTY_INT, 0);
    $name = Get::req('r_name', DOTY_STRING, "");
    $original_name = Get::req('original_name', DOTY_STRING, "");
    $desc = Get::req('r_desc', DOTY_STRING, "");
    $r_item_id = Get::req('r_item_id', DOTY_INT, 0);
    $type = Get::req('r_type', DOTY_STRING, "");
    $env = Get::req('r_env', DOTY_STRING, "");
    $env_parent_id = Get::req('r_env_parent_id', DOTY_INT, 0);
    $param = '';
    //Get::req('', DOTY_STRING, "");
    $alt_desc = '';
    $lang_id = Get::req('r_lang', DOTY_INT, "");
    $lang_arr = Docebo::langManager()->getAllLangCode();
    $lang = $lang_arr[$lang_id];
    $force_visible = Get::req('force_visible', DOTY_INT, 0);
    $is_mobile = Get::req('is_mobile', DOTY_INT, 0);
    $folders = Get::req('h_selected_folders', DOTY_STRING, "");
    $json_tags = Util::strip_slashes(Get::req('tag_list', DOTY_STRING, "[]"));
    $kbres = new KbRes();
    $res_id = $kbres->saveResource($res_id, $name, $original_name, $desc, $r_item_id, $type, $env, $env_parent_id, $param, $alt_desc, $lang, $force_visible, $is_mobile);
    $json_tags = str_replace("[", "", $json_tags);
    $json_tags = str_replace("]", "", $json_tags);
    $json_tags = str_replace('"', "", $json_tags);
    $json_tags = str_replace("\\", "", $json_tags);
    $tags_arr = explode(",", $json_tags);
    if ($res_id > 0) {
        $kbres->setResourceTags($res_id, $tags_arr);
        $kbres->assignToFolders($res_id, explode(',', $folders));
    }
}
开发者ID:abhinay100,项目名称:forma_app,代码行数:35,代码来源:orgcategorize.php

示例7: init

 public function init()
 {
     parent::init();
     require_once _base_ . '/lib/lib.json.php';
     $this->model = new AdminrulesAdm();
     $this->json = new Services_JSON();
     $this->acl_man =& Docebo::user()->getAclManager();
 }
开发者ID:abhinay100,项目名称:forma_app,代码行数:8,代码来源:AdminrulesAdmController.php

示例8: init

 public function init()
 {
     YuiLib::load('base,tabview');
     Lang::init('course');
     $this->model = new VideoconferenceLms(Docebo::user()->getIdSt());
     $upd = new UpdatesLms();
     $this->info = $upd->videoconferenceCounterUpdates();
 }
开发者ID:abhinay100,项目名称:forma_app,代码行数:8,代码来源:VideoconferenceLmsController.php

示例9: __construct

 /**
  * This constructor require the source file name
  * @param array $params the array of params
  *		- 'filename' => name of the file (required)
  *		- 'first_row_header' => bool TRUE if first row is header (Optional, default = TRUE )
  *		- 'separator' => string a char with the fields separator (Optional, default = ,)
  **/
 function __construct($params)
 {
     if ($params !== NULL) {
         $this->set_config($params);
     }
     $this->aclm = Docebo::aclm();
     $this->cols_descriptor = array(array(DOCEBOIMPORT_COLNAME => Lang::t('_TYPE'), DOCEBOIMPORT_COLID => 'admin_type', DOCEBOIMPORT_COLMANDATORY => true, DOCEBOIMPORT_DATATYPE => 'text', DOCEBOIMPORT_DEFAULT => ''), array(DOCEBOIMPORT_COLNAME => Lang::t('_PROFILE'), DOCEBOIMPORT_COLID => 'profile', DOCEBOIMPORT_COLMANDATORY => true, DOCEBOIMPORT_DATATYPE => 'text', DOCEBOIMPORT_DEFAULT => ''), array(DOCEBOIMPORT_COLNAME => Lang::t('_USERNAME'), DOCEBOIMPORT_COLID => 'username', DOCEBOIMPORT_COLMANDATORY => true, DOCEBOIMPORT_DATATYPE => 'text', DOCEBOIMPORT_DEFAULT => ''), array(DOCEBOIMPORT_COLNAME => Lang::t('_FOLDER_NAME'), DOCEBOIMPORT_COLID => 'folder_name', DOCEBOIMPORT_COLMANDATORY => false, DOCEBOIMPORT_DATATYPE => 'text', DOCEBOIMPORT_DEFAULT => 'root'), array(DOCEBOIMPORT_COLNAME => Lang::t('courses'), DOCEBOIMPORT_COLID => 'courses', DOCEBOIMPORT_COLMANDATORY => false, DOCEBOIMPORT_DATATYPE => 'text', DOCEBOIMPORT_DEFAULT => 'root'));
 }
开发者ID:abhinay100,项目名称:forma_app,代码行数:15,代码来源:connector.doceboadmin.php

示例10: logout

 /**
  * Return the link for the logout
  * @return <type>
  */
 public static function logout()
 {
     $res = "";
     if (!Docebo::user()->isAnonymous()) {
         $res .= '<a href="index.php?action=logout">' . Get::img('standard/exit.png', Lang::t('_LOG_LOGOUT')) . Lang::t('_LOG_LOGOUT') . '</a>';
     }
     return $res;
 }
开发者ID:abhinay100,项目名称:forma_app,代码行数:12,代码来源:lib.cmslayout.php

示例11: __construct

 public function __construct()
 {
     require_once _base_ . '/lib/lib.preference.php';
     $this->preference = new AdminPreference();
     $this->acl_man =& Docebo::user()->getAclManager();
     $this->rules_path = '/framework/adminrules/';
     $this->rules_cache = NULL;
 }
开发者ID:abhinay100,项目名称:forma_app,代码行数:8,代码来源:AdminrulesAdm.php

示例12: init

 public function init()
 {
     parent::init();
     require_once _base_ . '/lib/lib.json.php';
     $this->json = new Services_JSON();
     $this->acl_man =& Docebo::user()->getAclManager();
     $this->model = new TransactionAlms();
     $this->permissions = array('view' => checkPerm('view', true, 'transaction', 'lms'), 'mod' => checkPerm('mod', true, 'transaction', 'lms'), 'del' => checkPerm('mod', true, 'transaction', 'lms'));
 }
开发者ID:abhinay100,项目名称:forma_app,代码行数:9,代码来源:TransactionAlmsController.php

示例13: __construct

 public function __construct()
 {
     require_once _base_ . '/lib/lib.preference.php';
     $this->preference = new AdminPreference();
     $this->acl_man =& Docebo::user()->getAclManager();
     list($idst) = each($this->acl_man->getGroupsIdstFromBasePath('/framework/level/admin'));
     $this->idst_admin_group = $idst;
     $this->model_adminrules = new AdminrulesAdm();
 }
开发者ID:abhinay100,项目名称:forma_app,代码行数:9,代码来源:AdminmanagerAdm.php

示例14: sl_sal_getUserName

function sl_sal_getUserName()
{
    /*$dbconn = $GLOBALS['dbConn'];
    	$result = sql_query("SELECT surname,name FROM ".$GLOBALS['prefix_lms']."_user WHERE idUser=".$_SESSION['sesUser']."");
    	list($surname, $name) = mysql_fetch_array($result);*/
    $aclManager = Docebo::user()->getACLManager();
    $arr_result = $aclManager->getUser(Docebo::user()->getIdSt(), FALSE);
    return $arr_result[ACL_INFO_LASTNAME] . ',' . $arr_result[ACL_INFO_FIRSTNAME];
}
开发者ID:abhinay100,项目名称:forma_app,代码行数:9,代码来源:config.scorm.php

示例15: init

 public function init()
 {
     require_once _base_ . '/lib/lib.json.php';
     $this->db = DbConn::getInstance();
     $this->model = new MessageLms();
     $this->json = new Services_JSON();
     $this->aclManager = Docebo::user()->getAClManager();
     $this->can_send = true;
     //checkPerm('send_all', true) || checkPerm('send_upper', true);
 }
开发者ID:abhinay100,项目名称:forma_app,代码行数:10,代码来源:MessageLmsController.php


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