本文整理匯總了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;