• 设为首页
  • 点击收藏
  • 手机版
    手机扫一扫访问
    迪恩网络手机版
  • 关注官方公众号
    微信扫一扫关注
    迪恩网络公众号

PHP lti_delete_type函数代码示例

原作者: [db:作者] 来自: [db:来源] 收藏 邀请

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



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

示例1: if

} else if ($form->is_cancelled()) {
    $script = "
        <html>
            <script type=\"text/javascript\">
                window.close();
            </script>
        </html>
    ";

    echo $script;
    die;
}

// Delete action is called via ajax.
if ($action == 'delete') {
    lti_delete_type($typeid);
    die;
}

echo $OUTPUT->header();

echo $OUTPUT->heading(get_string('toolsetup', 'lti'));

if ($action == 'add') {
    $form->display();
} else if ($action == 'edit') {
    $type = lti_get_type_type_config($typeid);
    $form->set_data($type);
    $form->display();
}
开发者ID:jtibbetts,项目名称:moodle,代码行数:30,代码来源:instructor_edit_tool_type.php


示例2: redirect

        redirect($redirect);
    }

} else if (isset($data->cancel)) {
    redirect($redirect);

} else if ($action == 'accept') {
    lti_set_state_for_type($id, LTI_TOOL_STATE_CONFIGURED);
    redirect($redirect);

} else if ($action == 'reject') {
    lti_set_state_for_type($id, LTI_TOOL_STATE_REJECTED);
    redirect($redirect);

} else if ($action == 'delete') {
    lti_delete_type($id);
    redirect($redirect);
}

// print header stuff
$PAGE->set_focuscontrol($focus);
if (empty($SITE->fullname)) {
    $PAGE->set_title($settingspage->visiblename);
    $PAGE->set_heading($settingspage->visiblename);

    $PAGE->navbar->add(get_string('lti_administration', 'lti'), $CFG->wwwroot.'/admin/settings.php?section=modsettinglti');

    echo $OUTPUT->header();

    echo $OUTPUT->box(get_string('configintrosite', 'admin'));
开发者ID:nicusX,项目名称:moodle,代码行数:30,代码来源:typessettings.php


示例3: delete_tool_type

 /**
  * Delete a tool type.
  *
  * @param int $id The id of the tool type to be deleted
  * @return array deleted tool type
  * @since Moodle 3.1
  * @throws moodle_exception
  */
 public static function delete_tool_type($id)
 {
     $params = self::validate_parameters(self::delete_tool_type_parameters(), array('id' => $id));
     $id = $params['id'];
     $context = context_system::instance();
     self::validate_context($context);
     require_capability('moodle/site:config', $context);
     $type = lti_get_type($id);
     if (!empty($type)) {
         lti_delete_type($id);
         // If this is the last type for this proxy then remove the proxy
         // as well so that it isn't orphaned.
         $types = lti_get_lti_types_from_proxy_id($type->toolproxyid);
         if (empty($types)) {
             lti_delete_tool_proxy($type->toolproxyid);
         }
     }
     return array('id' => $id);
 }
开发者ID:evltuma,项目名称:moodle,代码行数:27,代码来源:external.php


示例4: lti_delete_tool_proxy

/**
 * Delete a Tool Proxy
 *
 * @param int $id   Tool Proxy id
 */
function lti_delete_tool_proxy($id)
{
    global $DB;
    $DB->delete_records('lti_tool_settings', array('toolproxyid' => $id));
    $tools = $DB->get_records('lti_types', array('toolproxyid' => $id));
    foreach ($tools as $tool) {
        lti_delete_type($tool->id);
    }
    $DB->delete_records('lti_tool_proxies', array('id' => $id));
}
开发者ID:reconnectmedia,项目名称:moodle,代码行数:15,代码来源:locallib.php


示例5: pearsondirect_handle_code_change

function pearsondirect_handle_code_change($courseconfig, $newcode, $newparams)
{
    global $DB, $CFG;
    require_once $CFG->dirroot . '/mod/lti/locallib.php';
    require_once $CFG->dirroot . '/course/lib.php';
    $types = $DB->get_records('lti_types', array('course' => $courseconfig->course));
    if ($types) {
        foreach ($types as $type) {
            if (!strncmp($type->tooldomain, 'pearson:', strlen('pearson:'))) {
                lti_delete_type($type->id);
            }
        }
    }
    $coursemodules = $DB->get_records('course_modules', array('course' => $courseconfig->course, 'module' => pearsondirect_get_lti_module()));
    if ($coursemodules) {
        foreach ($coursemodules as $cm) {
            if (!strncmp($cm->idnumber, 'pearson:', strlen('pearson:'))) {
                course_delete_module($cm->id);
            }
        }
    }
}
开发者ID:MoodleMetaData,项目名称:MoodleMetaData,代码行数:22,代码来源:locallib.php



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


鲜花

握手

雷人

路过

鸡蛋
该文章已有0人参与评论

请发表评论

全部评论

专题导读
上一篇:
PHP lti_ensure_url_is_https函数代码示例发布时间:2022-05-15
下一篇:
PHP lti_build_sourcedid函数代码示例发布时间:2022-05-15
热门推荐
阅读排行榜

扫描微信二维码

查看手机版网站

随时了解更新最新资讯

139-2527-9053

在线客服(服务时间 9:00~18:00)

在线QQ客服
地址:深圳市南山区西丽大学城创智工业园
电邮:jeky_zhao#qq.com
移动电话:139-2527-9053

Powered by 互联科技 X3.4© 2001-2213 极客世界.|Sitemap