本文整理汇总了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;