當前位置: 首頁>>代碼示例>>PHP>>正文


PHP lti_get_domain_from_url函數代碼示例

本文整理匯總了PHP中lti_get_domain_from_url函數的典型用法代碼示例。如果您正苦於以下問題:PHP lti_get_domain_from_url函數的具體用法?PHP lti_get_domain_from_url怎麽用?PHP lti_get_domain_from_url使用的例子?那麽, 這裏精選的函數代碼示例或許可以為您提供幫助。


在下文中一共展示了lti_get_domain_from_url函數的3個代碼示例,這些例子默認根據受歡迎程度排序。您可以為喜歡或者感覺有用的代碼點讚,您的評價將有助於係統推薦出更棒的PHP代碼示例。

示例1: lti_prepare_type_for_save

function lti_prepare_type_for_save($type, $config) {
    $type->baseurl = $config->lti_toolurl;
    $type->tooldomain = lti_get_domain_from_url($config->lti_toolurl);
    $type->name = $config->lti_typename;

    $type->coursevisible = !empty($config->lti_coursevisible) ? $config->lti_coursevisible : 0;
    $config->lti_coursevisible = $type->coursevisible;

    $type->forcessl = !empty($config->lti_forcessl) ? $config->lti_forcessl : 0;
    $config->lti_forcessl = $type->forcessl;

    $type->timemodified = time();

    unset ($config->lti_typename);
    unset ($config->lti_toolurl);
}
開發者ID:numbas,項目名稱:moodle,代碼行數:16,代碼來源:locallib.php

示例2: moodle_url

$url = new moodle_url('/mod/lti/request_tool.php', array('instanceid' => $instanceid));
$PAGE->set_url($url);

$pagetitle = strip_tags($course->shortname);
$PAGE->set_title($pagetitle);
$PAGE->set_heading($course->fullname);

$PAGE->set_pagelayout('incourse');

echo $OUTPUT->header();
echo $OUTPUT->heading(format_string($lti->name, true, array('context' => $context)));

// Add a tool type if one does not exist already.
if (!lti_get_tool_by_url_match($lti->toolurl, $lti->course, LTI_TOOL_STATE_ANY)) {
    // There are no tools (active, pending, or rejected) for the launch URL. Create a new pending tool.
    $tooltype = new stdClass();
    $toolconfig = new stdClass();

    $toolconfig->lti_toolurl = lti_get_domain_from_url($lti->toolurl);
    $toolconfig->lti_typename = $toolconfig->lti_toolurl;

    lti_add_type($tooltype, $toolconfig);

    echo get_string('lti_tool_request_added', 'lti');
} else {
    echo get_string('lti_tool_request_existing', 'lti');
}

echo $OUTPUT->footer();
開發者ID:jtibbetts,項目名稱:moodle,代碼行數:29,代碼來源:request_tool.php

示例3: lti_prepare_type_for_save

function lti_prepare_type_for_save($type, $config)
{
    if (isset($config->lti_toolurl)) {
        $type->baseurl = $config->lti_toolurl;
        $type->tooldomain = lti_get_domain_from_url($config->lti_toolurl);
    }
    if (isset($config->lti_description)) {
        $type->description = $config->lti_description;
    }
    if (isset($config->lti_typename)) {
        $type->name = $config->lti_typename;
    }
    if (isset($config->lti_coursevisible)) {
        $type->coursevisible = !empty($config->lti_coursevisible) ? $config->lti_coursevisible : 0;
        $config->lti_coursevisible = $type->coursevisible;
    }
    if (isset($config->lti_icon)) {
        $type->icon = $config->lti_icon;
    }
    if (isset($config->lti_secureicon)) {
        $type->secureicon = $config->lti_secureicon;
    }
    $type->forcessl = !empty($config->lti_forcessl) ? $config->lti_forcessl : 0;
    $config->lti_forcessl = $type->forcessl;
    $type->timemodified = time();
    unset($config->lti_typename);
    unset($config->lti_toolurl);
    unset($config->lti_description);
    unset($config->lti_icon);
    unset($config->lti_secureicon);
}
開發者ID:reconnectmedia,項目名稱:moodle,代碼行數:31,代碼來源:locallib.php


注:本文中的lti_get_domain_from_url函數示例由純淨天空整理自Github/MSDocs等開源代碼及文檔管理平台,相關代碼片段篩選自各路編程大神貢獻的開源項目,源碼版權歸原作者所有,傳播和使用請參考對應項目的License;未經允許,請勿轉載。