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


PHP grading_manager::tokenize方法代碼示例

本文整理匯總了PHP中grading_manager::tokenize方法的典型用法代碼示例。如果您正苦於以下問題:PHP grading_manager::tokenize方法的具體用法?PHP grading_manager::tokenize怎麽用?PHP grading_manager::tokenize使用的例子?那麽, 這裏精選的方法代碼示例或許可以為您提供幫助。您也可以進一步了解該方法所在grading_manager的用法示例。


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

示例1: s

    }
    if (!$confirmed) {
        echo $output->header();
        echo $output->confirm(get_string('templatedeleteconfirm', 'core_grading', s($definition->name)), new moodle_url($PAGE->url, array('remove' => $remove, 'confirmed' => 1)), $PAGE->url);
        echo $output->box($sourcecontroller->render_preview($PAGE), 'template-preview-confirm');
        echo $output->footer();
        die;
    } else {
        require_sesskey();
        $sourcecontroller->delete_definition();
        redirect($PAGE->url);
    }
}
$searchform = new grading_search_template_form($PAGE->url, null, 'GET', '', array('class' => 'templatesearchform'));
if ($searchdata = $searchform->get_data()) {
    $tokens = grading_manager::tokenize($searchdata->needle);
    $includeownforms = !empty($searchdata->mode);
} else {
    $tokens = array();
    $includeownforms = false;
}
// construct the SQL to find all matching templates
$sql = "SELECT DISTINCT gd.id, gd.areaid, gd.name, gd.usercreated\n          FROM {grading_definitions} gd\n          JOIN {grading_areas} ga ON (gd.areaid = ga.id)\n          JOIN {context} cx ON (ga.contextid = cx.id)";
// join method-specific tables from the plugin scope
$sql .= $targetcontrollerclass::sql_search_from_tables('gd.id');
$sql .= " WHERE gd.method = ?";
$params = array($method);
if (!$includeownforms) {
    // search for public templates only
    $sql .= " AND ga.contextid = ? AND ga.component = 'core_grading'";
    $params[] = context_system::instance()->id;
開發者ID:JP-Git,項目名稱:moodle,代碼行數:31,代碼來源:pick.php


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