本文整理汇总了PHP中ExerciseLib::update_attempt_date方法的典型用法代码示例。如果您正苦于以下问题:PHP ExerciseLib::update_attempt_date方法的具体用法?PHP ExerciseLib::update_attempt_date怎么用?PHP ExerciseLib::update_attempt_date使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类ExerciseLib
的用法示例。
在下文中一共展示了ExerciseLib::update_attempt_date方法的1个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的PHP代码示例。
示例1: api_strtotime
//New expired time - it is due to the possible closure of session
$new_expired_time_in_seconds = api_strtotime($expired_time_of_this_attempt, 'UTC') - api_strtotime($last_attempt_date, 'UTC');
if ($debug) {
error_log('7.7. $new_expired_time_in_seconds: ' . $new_expired_time_in_seconds);
}
$expected_time = $current_timestamp + $new_expired_time_in_seconds;
if ($debug) {
error_log('7.8. $expected_time: ' . $expected_time);
}
$clock_expired_time = api_get_utc_datetime($expected_time);
if ($debug) {
error_log('7.9. $clock_expired_time: ' . $clock_expired_time);
}
// First we update the attempt to today
// How the expired time is changed into "track_e_exercices" table,then the last attempt for this student should be changed too,so
ExerciseLib::update_attempt_date($exercise_stat_info['exe_id'], $last_attempt_date);
// Sessions that contain the expired time
$expiredTimeInSession[$current_expired_time_key] = $clock_expired_time;
Session::write('expired_time', $expiredTimeInSession);
if ($debug) {
error_log('7.11. Setting the $expiredTimeInSession: ' . $expiredTimeInSession[$current_expired_time_key]);
}
}
} else {
if ($debug) {
error_log('7.3. $expiredTimeInSession[$current_expired_time_key]: ' . $expiredTimeInSession[$current_expired_time_key]);
}
$clock_expired_time = $expiredTimeInSession[$current_expired_time_key];
}
} else {
if ($debug) {