本文整理汇总了PHP中ExerciseLib::get_session_time_control_key方法的典型用法代码示例。如果您正苦于以下问题:PHP ExerciseLib::get_session_time_control_key方法的具体用法?PHP ExerciseLib::get_session_time_control_key怎么用?PHP ExerciseLib::get_session_time_control_key使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类ExerciseLib
的用法示例。
在下文中一共展示了ExerciseLib::get_session_time_control_key方法的1个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的PHP代码示例。
示例1: header
}
if (empty($objExercise)) {
if (!empty($_SESSION['objExercise'])) {
$objExercise = Session::read('objExercise');
} else {
$objExercise = null;
}
}
if (!$objExercise) {
//Redirect to the exercise overview
//Check if the exe_id exists
header("Location: overview.php?exerciseId=" . $exerciseId);
exit;
}
$time_control = false;
$clock_expired_time = ExerciseLib::get_session_time_control_key($objExercise->id, $learnpath_id, $learnpath_item_id);
if ($objExercise->expired_time != 0 && !empty($clock_expired_time)) {
$time_control = true;
}
if ($time_control) {
// Get time left for exipiring time
$time_left = api_strtotime($clock_expired_time, 'UTC') - time();
$htmlHeadXtra[] = api_get_css(api_get_path(WEB_LIBRARY_PATH) . 'javascript/epiclock/stylesheet/jquery.epiclock.css');
$htmlHeadXtra[] = api_get_css(api_get_path(WEB_LIBRARY_PATH) . 'javascript/epiclock/renderers/minute/epiclock.minute.css');
$htmlHeadXtra[] = api_get_js('epiclock/javascript/jquery.dateformat.min.js');
$htmlHeadXtra[] = api_get_js('epiclock/javascript/jquery.epiclock.min.js');
$htmlHeadXtra[] = api_get_js('epiclock/renderers/minute/epiclock.minute.js');
$htmlHeadXtra[] = $objExercise->show_time_control_js($time_left);
}
$exe_id = intval(Session::read('exe_id'));
$exercise_stat_info = $objExercise->get_stat_track_exercise_info_by_exe_id($exe_id);