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


PHP lti_get_config函数代码示例

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


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

示例1: lti_accepts_grades

function lti_accepts_grades($ltiinstance)
{
    global $DB;
    $acceptsgrades = true;
    $ltitype = $DB->get_record('lti_types', array('id' => $ltiinstance->typeid));
    if (empty($ltitype->toolproxyid)) {
        $typeconfig = lti_get_config($ltiinstance);
        $typeacceptgrades = isset($typeconfig['acceptgrades']) ? $typeconfig['acceptgrades'] : LTI_SETTING_DELEGATE;
        if (!($typeacceptgrades == LTI_SETTING_ALWAYS || $typeacceptgrades == LTI_SETTING_DELEGATE && $ltiinstance->instructorchoiceacceptgrades == LTI_SETTING_ALWAYS)) {
            $acceptsgrades = false;
        }
    } else {
        $enabledcapabilities = explode("\n", $ltitype->enabledcapability);
        $acceptsgrades = in_array('Result.autocreate', $enabledcapabilities);
    }
    return $acceptsgrades;
}
开发者ID:evltuma,项目名称:moodle,代码行数:17,代码来源:servicelib.php

示例2: lti_get_type_config_from_instance

/**
 *
 * Generates some of the tool configuration based on the instance details
 *
 * @param int $id
 *
 * @return Instance configuration
 *
 */
function lti_get_type_config_from_instance($id) {
    global $DB;

    $instance = $DB->get_record('lti', array('id' => $id));
    $config = lti_get_config($instance);

    $type = new stdClass();
    $type->lti_fix = $id;
    if (isset($config['toolurl'])) {
        $type->lti_toolurl = $config['toolurl'];
    }
    if (isset($config['instructorchoicesendname'])) {
        $type->lti_sendname = $config['instructorchoicesendname'];
    }
    if (isset($config['instructorchoicesendemailaddr'])) {
        $type->lti_sendemailaddr = $config['instructorchoicesendemailaddr'];
    }
    if (isset($config['instructorchoiceacceptgrades'])) {
        $type->lti_acceptgrades = $config['instructorchoiceacceptgrades'];
    }
    if (isset($config['instructorchoiceallowroster'])) {
        $type->lti_allowroster = $config['instructorchoiceallowroster'];
    }

    if (isset($config['instructorcustomparameters'])) {
        $type->lti_allowsetting = $config['instructorcustomparameters'];
    }
    return $type;
}
开发者ID:numbas,项目名称:moodle,代码行数:38,代码来源:locallib.php

示例3: lti_accepts_grades

function lti_accepts_grades($ltiinstance)
{
    $acceptsgrades = true;
    $typeconfig = lti_get_config($ltiinstance);
    $typeacceptgrades = isset($typeconfig['acceptgrades']) ? $typeconfig['acceptgrades'] : LTI_SETTING_DELEGATE;
    if (!($typeacceptgrades == LTI_SETTING_ALWAYS || $typeacceptgrades == LTI_SETTING_DELEGATE && $ltiinstance->instructorchoiceacceptgrades == LTI_SETTING_ALWAYS)) {
        $acceptsgrades = false;
    }
    return $acceptsgrades;
}
开发者ID:abhilash1994,项目名称:moodle,代码行数:10,代码来源:servicelib.php


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