@@ -23,16 +23,15 @@ discard block |
||
| 23 | 23 | |
| 24 | 24 | if($diff_in_hours >= 2 && $data->is_processed == 3){ |
| 25 | 25 | return "Terminated"; |
| 26 | - } |
|
| 27 | - elseif ($data->is_processed === 1) { |
|
| 26 | + } elseif ($data->is_processed === 1) { |
|
| 28 | 27 | return "Success"; |
| 29 | - }elseif ($data->is_processed === 2){ |
|
| 28 | + } elseif ($data->is_processed === 2){ |
|
| 30 | 29 | return "Failed"; |
| 31 | - }elseif($diff_in_hours < 2 && $data->is_processed == 3){ |
|
| 30 | + } elseif($diff_in_hours < 2 && $data->is_processed == 3){ |
|
| 32 | 31 | return "Processing"; |
| 33 | - }elseif ($data->is_processed == 4){ |
|
| 32 | + } elseif ($data->is_processed == 4){ |
|
| 34 | 33 | return "Process Paused"; |
| 35 | - }else{ |
|
| 34 | + } else{ |
|
| 36 | 35 | return 'Pending'; |
| 37 | 36 | }; |
| 38 | 37 | |
@@ -40,9 +39,9 @@ discard block |
||
| 40 | 39 | ->editColumn('is_email_sent', function ($data) { |
| 41 | 40 | if ($data->is_email_sent === 1) { |
| 42 | 41 | return "Success"; |
| 43 | - }elseif($data->is_email_sent === 2 ){ |
|
| 42 | + } elseif($data->is_email_sent === 2 ){ |
|
| 44 | 43 | return 'Failed'; |
| 45 | - }else{ |
|
| 44 | + } else{ |
|
| 46 | 45 | return 'Pending'; |
| 47 | 46 | }; |
| 48 | 47 | |
@@ -50,11 +49,11 @@ discard block |
||
| 50 | 49 | ->editColumn('update', function ($data) { |
| 51 | 50 | if ($data->update === 0) { |
| 52 | 51 | return "No Processes"; |
| 53 | - }elseif($data->update === 1 ){ |
|
| 52 | + } elseif($data->update === 1 ){ |
|
| 54 | 53 | return 'Success'; |
| 55 | - }elseif($data->update === 3 ){ |
|
| 54 | + } elseif($data->update === 3 ){ |
|
| 56 | 55 | return 'Partial Success'; |
| 57 | - }else{ |
|
| 56 | + } else{ |
|
| 58 | 57 | return 'Failed'; |
| 59 | 58 | }; |
| 60 | 59 | |
@@ -62,11 +61,11 @@ discard block |
||
| 62 | 61 | ->editColumn('insert', function ($data) { |
| 63 | 62 | if ($data->insert === 0) { |
| 64 | 63 | return "No Processes"; |
| 65 | - }elseif($data->insert === 1 ){ |
|
| 64 | + } elseif($data->insert === 1 ){ |
|
| 66 | 65 | return 'Success'; |
| 67 | - }elseif($data->insert === 3 ){ |
|
| 66 | + } elseif($data->insert === 3 ){ |
|
| 68 | 67 | return 'Partial Success'; |
| 69 | - }else{ |
|
| 68 | + } else{ |
|
| 70 | 69 | return 'Failed'; |
| 71 | 70 | }; |
| 72 | 71 | |
@@ -75,7 +74,7 @@ discard block |
||
| 75 | 74 | if(\App::environment('local') || \App::environment('stage')){ |
| 76 | 75 | return '<a href="/download_file/'.$data->filename.'">'.$data->classRoom->name.'</a>'; |
| 77 | 76 | |
| 78 | - }else{ |
|
| 77 | + } else{ |
|
| 79 | 78 | return '<a href="/bulk-upload/download_file/'.$data->filename.'">'.$data->classRoom->name.'</a>'; |
| 80 | 79 | } |
| 81 | 80 | |
@@ -84,7 +83,7 @@ discard block |
||
| 84 | 83 | if(\App::environment('local') || \App::environment('stage')){ |
| 85 | 84 | return '<a href="/download/'.$data->filename.'">'.$data->classRoom->name.'</a>'; |
| 86 | 85 | |
| 87 | - }else{ |
|
| 86 | + } else{ |
|
| 88 | 87 | return '<a href="/bulk-upload/download/'.$data->filename.'">'.$data->classRoom->name.'</a>'; |
| 89 | 88 | } |
| 90 | 89 | |
@@ -97,13 +96,13 @@ discard block |
||
| 97 | 96 | |
| 98 | 97 | if($diff_in_hours >= 2 && $data->is_processed == 3){ |
| 99 | 98 | return '<button onclick="updateProcess('.($data->id).',100)" class="btn btn-primary text-uppercase">reprocess</button>'; |
| 100 | - }elseif ($data->is_processed == 1){ |
|
| 99 | + } elseif ($data->is_processed == 1){ |
|
| 101 | 100 | return '<div><h6>Processing <span class="badge badge-success text-uppercase">Successful</span></h6></div>'; |
| 102 | - }elseif ($data->is_processed == 2){ |
|
| 101 | + } elseif ($data->is_processed == 2){ |
|
| 103 | 102 | return '<div><h6>Processing <span class="badge badge-danger text-uppercase">Failed</span></h6></div>'; |
| 104 | - }elseif ($data->is_processed == 0){ |
|
| 103 | + } elseif ($data->is_processed == 0){ |
|
| 105 | 104 | return '<button onclick="updateProcess('.($data->id).',200)" class="btn btn-block btn-warning text-uppercase">pause</button>'; |
| 106 | - }elseif ($data->is_processed == 4){ |
|
| 105 | + } elseif ($data->is_processed == 4){ |
|
| 107 | 106 | return '<button onclick="updateProcess('.($data->id).',100)" class="btn btn-block btn-success text-uppercase">resume</button>'; |
| 108 | 107 | } |
| 109 | 108 | }) |
@@ -64,7 +64,7 @@ |
||
| 64 | 64 | } |
| 65 | 65 | $date = date_format($date, 'Y-m-d'); |
| 66 | 66 | return $date; |
| 67 | - }catch(\Exception $e){ |
|
| 67 | + } catch(\Exception $e){ |
|
| 68 | 68 | $error = \Illuminate\Validation\ValidationException::withMessages([]); |
| 69 | 69 | $failure = new Failure(2, 'remark', [0 => 'The given date is wrong']); |
| 70 | 70 | $failures = [0 => $failure]; |
@@ -36,7 +36,7 @@ |
||
| 36 | 36 | (new ExportReady($this->user)) |
| 37 | 37 | ]); |
| 38 | 38 | |
| 39 | - }catch(\Exception $e){ |
|
| 39 | + } catch(\Exception $e){ |
|
| 40 | 40 | $output = new \Symfony\Component\Console\Output\ConsoleOutput(); |
| 41 | 41 | $output->writeln($e->getMessage()); |
| 42 | 42 | } |
@@ -54,7 +54,7 @@ |
||
| 54 | 54 | |
| 55 | 55 | if($year <= 2019){ |
| 56 | 56 | die('Academic Year 2019 or earlier can`t be deleted'); |
| 57 | - }else{ |
|
| 57 | + } else{ |
|
| 58 | 58 | $this->clone->cleanConfig($params); |
| 59 | 59 | } |
| 60 | 60 | } |
@@ -306,7 +306,7 @@ |
||
| 306 | 306 | // if the same gender same DOE has more than one |
| 307 | 307 | if(($doe_students > 1) || ($count > 1)){ |
| 308 | 308 | $studentData = $this->searchSimilarName($student, $sis_users,false); |
| 309 | - }else{ |
|
| 309 | + } else{ |
|
| 310 | 310 | $studentData = $this->searchSimilarName($student, $sis_users); |
| 311 | 311 | } |
| 312 | 312 | return $studentData; |
@@ -53,7 +53,7 @@ discard block |
||
| 53 | 53 | $func = array($this,'updateCount'); |
| 54 | 54 | array_walk($subjects,array($this,'process')); |
| 55 | 55 | $this->output->writeln('start updating:'. count($classes)); |
| 56 | - }elseif($this->argument('entity') == 'subject'){ |
|
| 56 | + } elseif($this->argument('entity') == 'subject'){ |
|
| 57 | 57 | $subjects = Institution_subject::get()->toArray(); |
| 58 | 58 | $subjects = array_chunk($subjects,10000); |
| 59 | 59 | $this->output->writeln('start updating:'. count($subjects)); |
@@ -68,7 +68,7 @@ discard block |
||
| 68 | 68 | $func = array($this,'updateCount'); |
| 69 | 69 | processParallel($func,$data,$this->argument('max')); |
| 70 | 70 | $this->output->writeln('start updating calss count:'. count($data)); |
| 71 | - }elseif($this->argument('entity') == 'subject'){ |
|
| 71 | + } elseif($this->argument('entity') == 'subject'){ |
|
| 72 | 72 | $this->output->writeln('start updating subject count:'. count($data)); |
| 73 | 73 | $func_subject = array($this,'updateSubjectCount'); |
| 74 | 74 | processParallel($func_subject,$data,$this->argument('max')); |
@@ -53,7 +53,7 @@ discard block |
||
| 53 | 53 | ->whereRaw('CHAR_LENGTH(nsid) > 11') |
| 54 | 54 | ->get() |
| 55 | 55 | ->toArray(); |
| 56 | - }elseif($type == 'duplicate'){ |
|
| 56 | + } elseif($type == 'duplicate'){ |
|
| 57 | 57 | $students = DB::table('institution_students as is') |
| 58 | 58 | ->join('security_users as su', 'su.id', 'is.student_id') |
| 59 | 59 | ->where('is.updated_from', 'doe') |
@@ -63,7 +63,7 @@ discard block |
||
| 63 | 63 | ->get() |
| 64 | 64 | ->toArray(); |
| 65 | 65 | |
| 66 | - }elseif('all'){ |
|
| 66 | + } elseif('all'){ |
|
| 67 | 67 | $students = DB::table('examination_students') |
| 68 | 68 | ->where('nsid','<>','') |
| 69 | 69 | ->whereNotNull('nsid') |
@@ -77,7 +77,7 @@ discard block |
||
| 77 | 77 | $students = array_chunk($students, $this->argument('chunk')); |
| 78 | 78 | $function = array($this, 'process'); |
| 79 | 79 | processParallel($function,$students, $this->argument('max')); |
| 80 | - }else{ |
|
| 80 | + } else{ |
|
| 81 | 81 | $this->output->writeln('nothing to process, all are cleaned'); |
| 82 | 82 | } |
| 83 | 83 | $this->output->writeln('###########################################------Finished cleaning exam records------###########################################'); |
@@ -87,7 +87,7 @@ discard block |
||
| 87 | 87 | $type = $this->argument('type'); |
| 88 | 88 | if($type == 'duplication'){ |
| 89 | 89 | array_walk($students,array($this,'cleanData')); |
| 90 | - }elseif($type == 'invalid' || 'all'){ |
|
| 90 | + } elseif($type == 'invalid' || 'all'){ |
|
| 91 | 91 | array_walk($students,array($this,'cleanInvalidData')); |
| 92 | 92 | } |
| 93 | 93 | } |