@@ -85,12 +85,12 @@ discard block |
||
85 | 85 | * |
86 | 86 | * @return Response |
87 | 87 | */ |
88 | - public function analysis($gcode){ |
|
89 | - $groupModel = new GroupModel(); |
|
88 | + public function analysis($gcode) { |
|
89 | + $groupModel=new GroupModel(); |
|
90 | 90 | $basic_info=$groupModel->details($gcode); |
91 | 91 | $clearance=$groupModel->judgeClearance($basic_info["gid"], Auth::user()->id); |
92 | - if($clearance < 1) return Redirect::route('group.detail',['gcode' => $gcode]); |
|
93 | - $group_info = $groupModel->details($gcode); |
|
92 | + if ($clearance<1) return Redirect::route('group.detail', ['gcode' => $gcode]); |
|
93 | + $group_info=$groupModel->details($gcode); |
|
94 | 94 | return view('group.settings.analysis', [ |
95 | 95 | 'page_title'=>"Group Analysis", |
96 | 96 | 'site_title'=>"NOJ", |
@@ -100,13 +100,13 @@ discard block |
||
100 | 100 | ]); |
101 | 101 | } |
102 | 102 | |
103 | - public function analysisDownload($gcode,Request $request){ |
|
104 | - $all_data = $request->all(); |
|
105 | - $groupModel = new GroupModel(); |
|
106 | - $group_info = $groupModel->details($gcode); |
|
107 | - $mode = $all_data['mode'] ?? 'contest'; |
|
108 | - if($mode == 'contest'){ |
|
109 | - $data = $groupModel->groupMemberPracticeContestStat($group_info['gid']); |
|
103 | + public function analysisDownload($gcode, Request $request) { |
|
104 | + $all_data=$request->all(); |
|
105 | + $groupModel=new GroupModel(); |
|
106 | + $group_info=$groupModel->details($gcode); |
|
107 | + $mode=$all_data['mode'] ?? 'contest'; |
|
108 | + if ($mode=='contest') { |
|
109 | + $data=$groupModel->groupMemberPracticeContestStat($group_info['gid']); |
|
110 | 110 | return Excel::download( |
111 | 111 | new GroupAnalysisExport( |
112 | 112 | [ |
@@ -119,10 +119,10 @@ discard block |
||
119 | 119 | 'percent' => $all_data['percent'] ?? false, |
120 | 120 | ] |
121 | 121 | ), |
122 | - $gcode . '_Group_Contest_Analysis.xlsx' |
|
122 | + $gcode.'_Group_Contest_Analysis.xlsx' |
|
123 | 123 | ); |
124 | - }else{ |
|
125 | - $data = $groupModel->groupMemberPracticeTagStat($group_info['gid']); |
|
124 | + } else { |
|
125 | + $data=$groupModel->groupMemberPracticeTagStat($group_info['gid']); |
|
126 | 126 | return Excel::download( |
127 | 127 | new GroupAnalysisExport( |
128 | 128 | [ |
@@ -135,7 +135,7 @@ discard block |
||
135 | 135 | 'percent' => $all_data['percent'] ?? false, |
136 | 136 | ] |
137 | 137 | ), |
138 | - $gcode . '_Group_Tag_Analysis.xlsx' |
|
138 | + $gcode.'_Group_Tag_Analysis.xlsx' |
|
139 | 139 | ); |
140 | 140 | } |
141 | 141 | } |
@@ -89,7 +89,9 @@ discard block |
||
89 | 89 | $groupModel = new GroupModel(); |
90 | 90 | $basic_info=$groupModel->details($gcode); |
91 | 91 | $clearance=$groupModel->judgeClearance($basic_info["gid"], Auth::user()->id); |
92 | - if($clearance < 1) return Redirect::route('group.detail',['gcode' => $gcode]); |
|
92 | + if($clearance < 1) { |
|
93 | + return Redirect::route('group.detail',['gcode' => $gcode]); |
|
94 | + } |
|
93 | 95 | $group_info = $groupModel->details($gcode); |
94 | 96 | return view('group.settings.analysis', [ |
95 | 97 | 'page_title'=>"Group Analysis", |
@@ -121,7 +123,7 @@ discard block |
||
121 | 123 | ), |
122 | 124 | $gcode . '_Group_Contest_Analysis.xlsx' |
123 | 125 | ); |
124 | - }else{ |
|
126 | + } else{ |
|
125 | 127 | $data = $groupModel->groupMemberPracticeTagStat($group_info['gid']); |
126 | 128 | return Excel::download( |
127 | 129 | new GroupAnalysisExport( |
@@ -21,7 +21,7 @@ discard block |
||
21 | 21 | */ |
22 | 22 | public function settings($gcode) |
23 | 23 | { |
24 | - return Redirect::route('group.settings.general', ['gcode' => $gcode]);; |
|
24 | + return Redirect::route('group.settings.general', ['gcode' => $gcode]); ; |
|
25 | 25 | } |
26 | 26 | |
27 | 27 | /** |
@@ -31,7 +31,7 @@ discard block |
||
31 | 31 | */ |
32 | 32 | public function settingsReturn($gcode) |
33 | 33 | { |
34 | - return Redirect::route('group.detail', ['gcode' => $gcode]);; |
|
34 | + return Redirect::route('group.detail', ['gcode' => $gcode]); ; |
|
35 | 35 | } |
36 | 36 | |
37 | 37 | /** |
@@ -60,10 +60,10 @@ discard block |
||
60 | 60 | * |
61 | 61 | * @return Response |
62 | 62 | */ |
63 | - public function problems($gcode){ |
|
64 | - $groupModel = new GroupModel(); |
|
65 | - $group_info = $groupModel->details($gcode); |
|
66 | - $problems = $groupModel->problems($group_info['gid']); |
|
63 | + public function problems($gcode) { |
|
64 | + $groupModel=new GroupModel(); |
|
65 | + $group_info=$groupModel->details($gcode); |
|
66 | + $problems=$groupModel->problems($group_info['gid']); |
|
67 | 67 | $basic_info=$groupModel->details($gcode); |
68 | 68 | return view('group.settings.problems', [ |
69 | 69 | 'page_title'=>"Group Problems", |
@@ -17,25 +17,25 @@ |
||
17 | 17 | public function handle($request, Closure $next) |
18 | 18 | { |
19 | 19 | //check login |
20 | - if(!Auth::check()){ |
|
20 | + if (!Auth::check()) { |
|
21 | 21 | return $next($request); |
22 | 22 | } |
23 | - $user = Auth::user(); |
|
24 | - $banned = $user->banneds()->orderBy('removed_at', 'desc')->first(); |
|
23 | + $user=Auth::user(); |
|
24 | + $banned=$user->banneds()->orderBy('removed_at', 'desc')->first(); |
|
25 | 25 | //check if there are any banned records |
26 | - if(empty($banned)) { |
|
26 | + if (empty($banned)) { |
|
27 | 27 | return $next($request); |
28 | 28 | } |
29 | 29 | //check the time of the last record |
30 | - if(strtotime($banned->removed_at) <= time()){ |
|
30 | + if (strtotime($banned->removed_at)<=time()) { |
|
31 | 31 | return $next($request); |
32 | 32 | } |
33 | 33 | //return error page |
34 | - if($request->method() == 'GET'){ |
|
35 | - return response()->view('errors.451',[ |
|
34 | + if ($request->method()=='GET') { |
|
35 | + return response()->view('errors.451', [ |
|
36 | 36 | 'description' => "Your account is currently blocked and will remain so until {$banned->removed_at}. Here's why: {$banned->reason}", |
37 | 37 | ]); |
38 | - }else{ |
|
38 | + } else { |
|
39 | 39 | return response()->json([ |
40 | 40 | 'ret' => 451, |
41 | 41 | 'desc' => 'Unavailable For Legal Reasons', |
@@ -35,7 +35,7 @@ |
||
35 | 35 | return response()->view('errors.451',[ |
36 | 36 | 'description' => "Your account is currently blocked and will remain so until {$banned->removed_at}. Here's why: {$banned->reason}", |
37 | 37 | ]); |
38 | - }else{ |
|
38 | + } else{ |
|
39 | 39 | return response()->json([ |
40 | 40 | 'ret' => 451, |
41 | 41 | 'desc' => 'Unavailable For Legal Reasons', |
@@ -17,12 +17,12 @@ |
||
17 | 17 | */ |
18 | 18 | public function handle($request, Closure $next) |
19 | 19 | { |
20 | - $gcode = $request->gcode; |
|
21 | - $group = Group::where('gcode',$gcode)->first(); |
|
22 | - $banneds = $group->banneds()->where('removed_at','>',date('Y-m-d H:i:s'))->first(); |
|
23 | - $user = Auth::user(); |
|
24 | - if(!empty($banneds) && $user->id != $group->leader->id) { |
|
25 | - return response()->view('errors.451',[ |
|
20 | + $gcode=$request->gcode; |
|
21 | + $group=Group::where('gcode', $gcode)->first(); |
|
22 | + $banneds=$group->banneds()->where('removed_at', '>', date('Y-m-d H:i:s'))->first(); |
|
23 | + $user=Auth::user(); |
|
24 | + if (!empty($banneds) && $user->id!=$group->leader->id) { |
|
25 | + return response()->view('errors.451', [ |
|
26 | 26 | 'description' => 'This group is currently banned. Please contact the group administrator.' |
27 | 27 | ]); |
28 | 28 | } |
@@ -16,11 +16,11 @@ |
||
16 | 16 | */ |
17 | 17 | public function handle($request, Closure $next) |
18 | 18 | { |
19 | - $gcode = $request->gcode; |
|
20 | - $group = Group::where('gcode',$gcode)->first(); |
|
21 | - if(!empty($group)){ |
|
19 | + $gcode=$request->gcode; |
|
20 | + $group=Group::where('gcode', $gcode)->first(); |
|
21 | + if (!empty($group)) { |
|
22 | 22 | return $next($request); |
23 | - }else{ |
|
23 | + } else { |
|
24 | 24 | return redirect('/group'); |
25 | 25 | } |
26 | 26 |
@@ -20,7 +20,7 @@ |
||
20 | 20 | $group = Group::where('gcode',$gcode)->first(); |
21 | 21 | if(!empty($group)){ |
22 | 22 | return $next($request); |
23 | - }else{ |
|
23 | + } else{ |
|
24 | 24 | return redirect('/group'); |
25 | 25 | } |
26 | 26 |
@@ -13,15 +13,15 @@ |
||
13 | 13 | { |
14 | 14 | $version=UpdateModel::checkUpdate(); |
15 | 15 | |
16 | - $status = [ |
|
17 | - ['name' => 'NOJ Version', 'value' => version()], |
|
18 | - ['name' => 'Lastest Version', 'value' => is_null($version)?'Failed to fetch latest version':$version["name"]], |
|
19 | - ['name' => 'Problems', 'value' => \App\Models\Eloquent\ProblemModel::count()], |
|
20 | - ['name' => 'Solutions', 'value' => \App\Models\Eloquent\ProblemSolutionModel::count()], |
|
21 | - ['name' => 'Submissions', 'value' => \App\Models\Eloquent\SubmissionModel::count()], |
|
22 | - ['name' => 'Contests', 'value' => \App\Models\Eloquent\ContestModel::count()], |
|
23 | - ['name' => 'Users', 'value' => \App\Models\Eloquent\UserModel::count()], |
|
24 | - ['name' => 'Groups', 'value' => \App\Models\Eloquent\Group::count()], |
|
16 | + $status=[ |
|
17 | + ['name' => 'NOJ Version', 'value' => version()], |
|
18 | + ['name' => 'Lastest Version', 'value' => is_null($version) ? 'Failed to fetch latest version' : $version["name"]], |
|
19 | + ['name' => 'Problems', 'value' => \App\Models\Eloquent\ProblemModel::count()], |
|
20 | + ['name' => 'Solutions', 'value' => \App\Models\Eloquent\ProblemSolutionModel::count()], |
|
21 | + ['name' => 'Submissions', 'value' => \App\Models\Eloquent\SubmissionModel::count()], |
|
22 | + ['name' => 'Contests', 'value' => \App\Models\Eloquent\ContestModel::count()], |
|
23 | + ['name' => 'Users', 'value' => \App\Models\Eloquent\UserModel::count()], |
|
24 | + ['name' => 'Groups', 'value' => \App\Models\Eloquent\Group::count()], |
|
25 | 25 | ]; |
26 | 26 | |
27 | 27 | return view('admin::dashboard.general', [ |
@@ -23,7 +23,7 @@ discard block |
||
23 | 23 | * |
24 | 24 | * @var string |
25 | 25 | */ |
26 | - protected $title = 'Abuses'; |
|
26 | + protected $title='Abuses'; |
|
27 | 27 | |
28 | 28 | /** |
29 | 29 | * Make a grid builder. |
@@ -32,7 +32,7 @@ discard block |
||
32 | 32 | */ |
33 | 33 | protected function grid() |
34 | 34 | { |
35 | - $grid = new Grid(new Abuse); |
|
35 | + $grid=new Grid(new Abuse); |
|
36 | 36 | |
37 | 37 | $grid->column('id', __('Id')); |
38 | 38 | $grid->column('title', __('Title')); |
@@ -58,7 +58,7 @@ discard block |
||
58 | 58 | */ |
59 | 59 | protected function detail($id) |
60 | 60 | { |
61 | - $show = new Show(Abuse::findOrFail($id)); |
|
61 | + $show=new Show(Abuse::findOrFail($id)); |
|
62 | 62 | |
63 | 63 | $show->field('id', __('Id')); |
64 | 64 | $show->field('title', __('Title')); |
@@ -81,7 +81,7 @@ discard block |
||
81 | 81 | */ |
82 | 82 | protected function form() |
83 | 83 | { |
84 | - $form = new Form(new Abuse); |
|
84 | + $form=new Form(new Abuse); |
|
85 | 85 | |
86 | 86 | $form->text('title', __('Title')); |
87 | 87 | $form->number('cause', __('Cause')); |
@@ -92,23 +92,23 @@ discard block |
||
92 | 92 | |
93 | 93 | $form->ignore(['created_at']); |
94 | 94 | |
95 | - $form->saving(function (Form $form) { |
|
96 | - $abuse = $form->model(); |
|
95 | + $form->saving(function(Form $form) { |
|
96 | + $abuse=$form->model(); |
|
97 | 97 | //get gategory and subject id |
98 | - $regex = '/^([A-Za-z]+) #(\d+)/'; |
|
99 | - $matches = []; |
|
100 | - preg_match($regex,$abuse->title,$matches); |
|
101 | - $category = array_search(strtolower($matches[1]),Abuse::$supportCategory); |
|
102 | - $subject_id = (int)$matches[2]; |
|
103 | - switch($abuse->category) { |
|
98 | + $regex='/^([A-Za-z]+) #(\d+)/'; |
|
99 | + $matches=[]; |
|
100 | + preg_match($regex, $abuse->title, $matches); |
|
101 | + $category=array_search(strtolower($matches[1]), Abuse::$supportCategory); |
|
102 | + $subject_id=(int) $matches[2]; |
|
103 | + switch ($abuse->category) { |
|
104 | 104 | case 0: |
105 | - $gid = $subject_id; |
|
106 | - $group = Group::find($gid); |
|
107 | - if(empty($group)) { |
|
108 | - return ; |
|
105 | + $gid=$subject_id; |
|
106 | + $group=Group::find($gid); |
|
107 | + if (empty($group)) { |
|
108 | + return; |
|
109 | 109 | } |
110 | - if($form->audit) { |
|
111 | - $ban_time = request()->created_at; |
|
110 | + if ($form->audit) { |
|
111 | + $ban_time=request()->created_at; |
|
112 | 112 | sendMessage([ |
113 | 113 | 'sender' => 1, |
114 | 114 | 'receiver' => $abuse->user_id, |
@@ -128,8 +128,8 @@ discard block |
||
128 | 128 | 'reason' => $abuse->supplement, |
129 | 129 | 'removed_at' => $ban_time |
130 | 130 | ]); |
131 | - return ; |
|
132 | - }else{ |
|
131 | + return; |
|
132 | + } else { |
|
133 | 133 | sendMessage([ |
134 | 134 | 'sender' => 1, |
135 | 135 | 'receiver' => $abuse->user_id, |
@@ -137,11 +137,11 @@ discard block |
||
137 | 137 | 'content' => "Hi, Dear **{$abuse->user->name}**,\n\n We have checked your Abuse report about group **[{$group->name}]({$group->link})**.\n\n However, we regret to say that the information you submitted is not sufficient for us to take action.\n\n Of course, we will continue to follow up the investigation.\n\n Thank you for your contribution to our community environment.\n\n Sincerely, NOJ" |
138 | 138 | ]); |
139 | 139 | $abuse->delete(); |
140 | - return ; |
|
140 | + return; |
|
141 | 141 | } |
142 | 142 | return; |
143 | 143 | case 1: |
144 | - $ban_time = request()->created_at; |
|
144 | + $ban_time=request()->created_at; |
|
145 | 145 | UserBanned::create([ |
146 | 146 | 'abuse_id' => $abuse->id, |
147 | 147 | 'user_id' => $subject_id, |
@@ -170,15 +170,15 @@ discard block |
||
170 | 170 | |
171 | 171 | protected function check_form() |
172 | 172 | { |
173 | - $form = new Form(new Abuse); |
|
174 | - $form->display('id',__('Abuse id')); |
|
173 | + $form=new Form(new Abuse); |
|
174 | + $form->display('id', __('Abuse id')); |
|
175 | 175 | $form->display('title', __('Title')); |
176 | 176 | $form->display('cause', __('Cause')); |
177 | 177 | $form->display('supplement', __('Supplement')); |
178 | 178 | $form->display('link', __('Group Link')); |
179 | 179 | $form->display('user_id', __('Submitter')); |
180 | - $form->radio('audit','result')->options(['0' => 'Reject', '1'=> 'Pass']); |
|
181 | - $form->datetime('created_at','ban until'); |
|
180 | + $form->radio('audit', 'result')->options(['0' => 'Reject', '1'=> 'Pass']); |
|
181 | + $form->datetime('created_at', 'ban until'); |
|
182 | 182 | |
183 | 183 | return $form; |
184 | 184 | } |
@@ -129,7 +129,7 @@ |
||
129 | 129 | 'removed_at' => $ban_time |
130 | 130 | ]); |
131 | 131 | return ; |
132 | - }else{ |
|
132 | + } else{ |
|
133 | 133 | sendMessage([ |
134 | 134 | 'sender' => 1, |
135 | 135 | 'receiver' => $abuse->user_id, |
@@ -142,19 +142,19 @@ discard block |
||
142 | 142 | * |
143 | 143 | * @return Form |
144 | 144 | */ |
145 | - protected function form($create = false) |
|
145 | + protected function form($create=false) |
|
146 | 146 | { |
147 | 147 | $form=new Form(new EloquentProblemModel); |
148 | 148 | $form->model()->makeVisible('password'); |
149 | - $form->tab('Basic', function(Form $form){ |
|
149 | + $form->tab('Basic', function(Form $form) { |
|
150 | 150 | $form->text('pid')->readonly(); |
151 | 151 | $form->text('pcode')->rules('required'); |
152 | 152 | $form->text('title')->rules('required'); |
153 | 153 | $form->text('time_limit')->rules('required'); |
154 | 154 | $form->text('memory_limit')->rules('required'); |
155 | 155 | $form->textarea('description')->rows(5); |
156 | - $form->textarea('input','Sample Input')->rows(3); |
|
157 | - $form->textarea('output','Sample Output')->rows(3); |
|
156 | + $form->textarea('input', 'Sample Input')->rows(3); |
|
157 | + $form->textarea('output', 'Sample Output')->rows(3); |
|
158 | 158 | $form->textarea('note')->rows(2); |
159 | 159 | $form->display('OJ'); |
160 | 160 | $form->display('update_date'); |
@@ -170,64 +170,64 @@ discard block |
||
170 | 170 | $form->file('test_case'); |
171 | 171 | $form->ignore(['test_case']); |
172 | 172 | }); |
173 | - if($create){ |
|
174 | - $form->tools(function (Form\Tools $tools) { |
|
173 | + if ($create) { |
|
174 | + $form->tools(function(Form\Tools $tools) { |
|
175 | 175 | $tools->add('<a href="/'.config('admin.route.prefix').'/problems/import" class="btn btn-sm btn-success" style="margin-right:1rem"><i class="MDI file-powerpoint-box"></i> Import from file</a>'); |
176 | 176 | }); |
177 | 177 | } |
178 | - $form->saving(function (Form $form){ |
|
179 | - $err = function ($msg) { |
|
180 | - $error = new MessageBag([ |
|
178 | + $form->saving(function(Form $form) { |
|
179 | + $err=function($msg) { |
|
180 | + $error=new MessageBag([ |
|
181 | 181 | 'title' => 'Test case file parse faild.', |
182 | 182 | 'message' => $msg, |
183 | 183 | ]); |
184 | 184 | return back()->with(compact('error')); |
185 | 185 | }; |
186 | - $pcode = $form->pcode; |
|
187 | - $p = EloquentProblemModel::where('pcode',$pcode)->first(); |
|
188 | - $pid = $form->pid ?? null; |
|
189 | - if(!empty($p) && $p->pid != $pid){ |
|
190 | - $error = new MessageBag([ |
|
186 | + $pcode=$form->pcode; |
|
187 | + $p=EloquentProblemModel::where('pcode', $pcode)->first(); |
|
188 | + $pid=$form->pid ?? null; |
|
189 | + if (!empty($p) && $p->pid!=$pid) { |
|
190 | + $error=new MessageBag([ |
|
191 | 191 | 'title' => 'Error occur.', |
192 | 192 | 'message' => 'Pcode has been token', |
193 | 193 | ]); |
194 | 194 | return back()->with(compact('error')); |
195 | 195 | } |
196 | - $test_case = \request()->file('test_case'); |
|
197 | - if(!empty($test_case)){ |
|
198 | - if($test_case->extension() != 'zip'){ |
|
196 | + $test_case=\request()->file('test_case'); |
|
197 | + if (!empty($test_case)) { |
|
198 | + if ($test_case->extension()!='zip') { |
|
199 | 199 | $err('You must upload a zip file iuclude test case info and content.'); |
200 | 200 | } |
201 | - $path = $test_case->path(); |
|
202 | - $zip = new ZipArchive; |
|
203 | - if($zip->open($path) !== true) { |
|
201 | + $path=$test_case->path(); |
|
202 | + $zip=new ZipArchive; |
|
203 | + if ($zip->open($path)!==true) { |
|
204 | 204 | $err('You must upload a zip file without encrypt and can open successfully.'); |
205 | 205 | }; |
206 | - if(($zip->getFromName('info')) === false){ |
|
206 | + if (($zip->getFromName('info'))===false) { |
|
207 | 207 | $err('The zip files must include a file named info including info of test cases, and the format can see ZsgsDesign/NOJ wiki.'); |
208 | 208 | }; |
209 | - $test_case_info = json_decode($zip->getFromName('info'),true); |
|
210 | - $test_cases = $test_case_info['test_cases']; |
|
211 | - foreach($test_cases as $index => $case) { |
|
212 | - if(!isset($case['input_name']) || !isset($case['output_name'])) { |
|
209 | + $test_case_info=json_decode($zip->getFromName('info'), true); |
|
210 | + $test_cases=$test_case_info['test_cases']; |
|
211 | + foreach ($test_cases as $index => $case) { |
|
212 | + if (!isset($case['input_name']) || !isset($case['output_name'])) { |
|
213 | 213 | $err("Test case index {$index}: configuration missing input/output files name."); |
214 | 214 | } |
215 | - if($zip->getFromName($case['input_name']) === false || $zip->getFromName($case['output_name']) === false ) { |
|
215 | + if ($zip->getFromName($case['input_name'])===false || $zip->getFromName($case['output_name'])===false) { |
|
216 | 216 | $err("Test case index {$index}: missing input/output files that record in the configuration."); |
217 | 217 | } |
218 | 218 | } |
219 | - if(!empty($form->pid)){ |
|
220 | - $problem = EloquentProblemModel::find($form->pid); |
|
221 | - if(!empty($problem)){ |
|
222 | - $pcode = $problem->pcode; |
|
223 | - }else{ |
|
224 | - $pcode = $form->pcode; |
|
219 | + if (!empty($form->pid)) { |
|
220 | + $problem=EloquentProblemModel::find($form->pid); |
|
221 | + if (!empty($problem)) { |
|
222 | + $pcode=$problem->pcode; |
|
223 | + } else { |
|
224 | + $pcode=$form->pcode; |
|
225 | 225 | } |
226 | - }else{ |
|
227 | - $pcode = $form->pcode; |
|
226 | + } else { |
|
227 | + $pcode=$form->pcode; |
|
228 | 228 | } |
229 | 229 | |
230 | - if(Storage::exists(base_path().'/storage/test_case/'.$pcode)){ |
|
230 | + if (Storage::exists(base_path().'/storage/test_case/'.$pcode)) { |
|
231 | 231 | Storage::deleteDirectory(base_path().'/storage/test_case/'.$pcode); |
232 | 232 | } |
233 | 233 | Storage::makeDirectory(base_path().'/storage/test_case/'.$pcode); |
@@ -220,10 +220,10 @@ |
||
220 | 220 | $problem = EloquentProblemModel::find($form->pid); |
221 | 221 | if(!empty($problem)){ |
222 | 222 | $pcode = $problem->pcode; |
223 | - }else{ |
|
223 | + } else{ |
|
224 | 224 | $pcode = $form->pcode; |
225 | 225 | } |
226 | - }else{ |
|
226 | + } else{ |
|
227 | 227 | $pcode = $form->pcode; |
228 | 228 | } |
229 | 229 |
@@ -20,7 +20,7 @@ |
||
20 | 20 | $router->resource('groups', GroupController::class); |
21 | 21 | $router->resource('abuses', AbuseController::class); |
22 | 22 | |
23 | - Route::group(['prefix' => 'babel'], function (Router $router) { |
|
23 | + Route::group(['prefix' => 'babel'], function(Router $router) { |
|
24 | 24 | $router->get('/', 'BabelController@index')->name('admin.babel.index'); |
25 | 25 | $router->get('installed', 'BabelController@installed')->name('admin.babel.installed'); |
26 | 26 | $router->get('marketspace', 'BabelController@marketspace')->name('admin.babel.marketspace'); |