mirror of
https://github.com/lkddi/nexusphp.git
synced 2026-04-14 12:30:49 +08:00
exam user detail
This commit is contained in:
@@ -867,6 +867,7 @@ class ExamRepository extends BaseRepository
|
||||
$index['current_value'] = $currentValue;
|
||||
$index['current_value_formatted'] = $currentValueFormatted;
|
||||
$index['passed'] = $currentValue >= $requireValueAtomic;
|
||||
$index['index_result'] = $index['passed'] ? nexus_trans($exam->getPassResultTransKey('pass')) : nexus_trans($exam->getPassResultTransKey('not_pass'));
|
||||
$result[] = $index;
|
||||
}
|
||||
return $result;
|
||||
|
||||
@@ -47,7 +47,7 @@ class TagRepository extends BaseRepository
|
||||
|
||||
public static function createBasicQuery()
|
||||
{
|
||||
return Tag::query()->orderBy('priority', 'desc')->orderBy('id', 'desc');
|
||||
return Tag::query()->orderBy('priority', 'asc')->orderBy('id', 'asc');
|
||||
}
|
||||
|
||||
public function renderCheckbox(int $searchBoxId, array $checked = [], $ignorePermission = false): string
|
||||
|
||||
@@ -21,11 +21,15 @@ class UploadRepository extends BaseRepository
|
||||
'name' => 'required',
|
||||
];
|
||||
$request->validate($rules);
|
||||
$category = Category::query()->firstOrFail($request->type);
|
||||
$category = Category::query()->findOrFail($request->type);
|
||||
$mode = $category->mode;
|
||||
$searchBox = SearchBox::query()->findOrFail($mode);
|
||||
$searchBox->loadSubCategories();
|
||||
$searchBox->loadTags();
|
||||
|
||||
$anonymous = "no";
|
||||
$uploaderUsername = $user->username;
|
||||
if ($request->uplver == 'yes' && user_can('beanonymous')) {
|
||||
if ($request->uplver == 'yes' && Permission::canBeAnonymous()) {
|
||||
$anonymous = "yes";
|
||||
$uploaderUsername = "Anonymous";
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user