mirror of
https://github.com/lkddi/nexusphp.git
synced 2026-04-14 12:30:49 +08:00
user exam update end think about status
This commit is contained in:
@@ -842,6 +842,9 @@ class ExamRepository extends BaseRepository
|
||||
if ($end->isBefore($examUser->begin)) {
|
||||
throw new \InvalidArgumentException(nexus_trans("exam-user.end_can_not_before_begin", ['begin' => $examUser->begin, 'end' => $end]));
|
||||
}
|
||||
if ($examUser->status != ExamUser::STATUS_NORMAL) {
|
||||
throw new \LogicException(nexus_trans("exam-user.status_not_allow_update_end", ['status_text' => nexus_trans('exam-user.status.' . ExamUser::STATUS_NORMAL)]));
|
||||
}
|
||||
$oldEndTime = $examUser->end;
|
||||
$locale = $examUser->user->locale;
|
||||
$examName = $examUser->exam->name;
|
||||
|
||||
@@ -12,4 +12,5 @@ return [
|
||||
\App\Models\ExamUser::STATUS_NORMAL => 'Normal',
|
||||
],
|
||||
'end_can_not_before_begin' => "End time: :end can't be before begin time: :begin",
|
||||
'status_not_allow_update_end' => 'Current status is not::status_text, unable to change end time',
|
||||
];
|
||||
|
||||
@@ -12,4 +12,5 @@ return [
|
||||
\App\Models\ExamUser::STATUS_NORMAL => '考核中',
|
||||
],
|
||||
'end_can_not_before_begin' => '结束时间::end 不能在开始时间::begin 之前',
|
||||
'status_not_allow_update_end' => '当前状态不为::status_text,无法变更结束时间',
|
||||
];
|
||||
|
||||
@@ -12,4 +12,5 @@ return [
|
||||
\App\Models\ExamUser::STATUS_NORMAL => '考核中',
|
||||
],
|
||||
'end_can_not_before_begin' => '結束時間::end 不能在開始時間::begin 之前',
|
||||
'status_not_allow_update_end' => '當前狀態不為::status_text,無法變更結束時間',
|
||||
];
|
||||
|
||||
Reference in New Issue
Block a user