本文整理汇总了PHP中Exercise::clean_results方法的典型用法代码示例。如果您正苦于以下问题:PHP Exercise::clean_results方法的具体用法?PHP Exercise::clean_results怎么用?PHP Exercise::clean_results使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类Exercise
的用法示例。
在下文中一共展示了Exercise::clean_results方法的2个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的PHP代码示例。
示例1: array
} else {
$interbreadcrumb[] = array("url" => "exercise.php?" . api_get_cidreq(), "name" => get_lang('Exercises'));
$objExerciseTmp = new Exercise();
if ($objExerciseTmp->read($exercise_id)) {
$nameTools = get_lang('Results') . ': ' . $objExerciseTmp->name;
}
}
Display::display_header($nameTools);
// Clean all results for this test before the selected date
if (($is_allowedToEdit || $is_tutor || api_is_coach()) && isset($_GET['delete_before_date']) && $locked == false) {
// ask for the date
$check = Security::check_token('get');
if ($check) {
$objExerciseTmp = new Exercise();
if ($objExerciseTmp->read($exercise_id)) {
$count = $objExerciseTmp->clean_results(true, $_GET['delete_before_date'] . ' 23:59:59');
Display::display_confirmation_message(sprintf(get_lang('XResultsCleaned'), $count));
}
}
}
// Security token to protect deletion
$token = Security::get_token();
$actions = Display::div($actions, array('class' => 'actions'));
$extra = '<script>
$(document).ready(function() {
$( "#dialog:ui-dialog" ).dialog( "destroy" );
$( "#dialog-confirm" ).dialog({
autoOpen: false,
show: "blind",
resizable: false,
height:300,
示例2:
case 'disable_results':
//disable the results for the learners
$objExerciseTmp->disable_results();
$objExerciseTmp->save();
Display::display_confirmation_message(get_lang('ResultsDisabled'));
break;
case 'enable_results':
//disable the results for the learners
$objExerciseTmp->enable_results();
$objExerciseTmp->save();
Display::display_confirmation_message(get_lang('ResultsEnabled'));
break;
case 'clean_results':
//clean student results
if ($exercise_action_locked == false) {
$quantity_results_deleted = $objExerciseTmp->clean_results();
Display::display_confirmation_message(sprintf(get_lang('XResultsCleaned'), $quantity_results_deleted));
}
break;
case 'copy_exercise':
$objExerciseTmp->copy_exercise();
Display::display_confirmation_message(get_lang('ExerciseCopied'));
break;
case 'set_autolaunch':
$objExerciseTmp->set_autolaunch();
Display::display_confirmation_message(get_lang('ItemUpdated'));
break;
}
}
}
// destruction of Exercise