@@ -27,11 +27,11 @@ |
||
| 27 | 27 | */ |
| 28 | 28 | protected $description = 'Update the students count male/female'; |
| 29 | 29 | |
| 30 | - /** |
|
| 31 | - * Create a new command instance. |
|
| 32 | - * |
|
| 33 | - * @return void |
|
| 34 | - */ |
|
| 30 | + /** |
|
| 31 | + * Create a new command instance. |
|
| 32 | + * |
|
| 33 | + * @return void |
|
| 34 | + */ |
|
| 35 | 35 | public function __construct() |
| 36 | 36 | { |
| 37 | 37 | parent::__construct(); |
@@ -137,9 +137,9 @@ |
||
| 137 | 137 | ->join('user_contacts', 'uploads.security_user_id', '=', 'user_contacts.security_user_id') |
| 138 | 138 | ->join('contact_types', 'user_contacts.contact_type_id', '=', 'contact_types.id') |
| 139 | 139 | //only for UAT |
| 140 | - ->where('contact_types.contact_option_id', '=', 5) |
|
| 140 | + ->where('contact_types.contact_option_id', '=', 5) |
|
| 141 | 141 | // ->where('contact_types.contact_option_id', '!=', 5) |
| 142 | - ->where('contact_types.name', '=', 'TestEmail') |
|
| 142 | + ->where('contact_types.name', '=', 'TestEmail') |
|
| 143 | 143 | ->limit(1) |
| 144 | 144 | ->get()->toArray(); |
| 145 | 145 | $node = $this->argument('node'); |
@@ -39,7 +39,7 @@ |
||
| 39 | 39 | */ |
| 40 | 40 | public function handle() |
| 41 | 41 | { |
| 42 | - $views = new DashboardViewsController(); |
|
| 43 | - $views->callback(); |
|
| 42 | + $views = new DashboardViewsController(); |
|
| 43 | + $views->callback(); |
|
| 44 | 44 | } |
| 45 | 45 | } |
@@ -152,12 +152,12 @@ |
||
| 152 | 152 | ->get()->toArray(); |
| 153 | 153 | } |
| 154 | 154 | |
| 155 | - /** |
|
| 156 | - * First level search for students |
|
| 157 | - * |
|
| 158 | - * @param array $student |
|
| 159 | - * @return array |
|
| 160 | - */ |
|
| 155 | + /** |
|
| 156 | + * First level search for students |
|
| 157 | + * |
|
| 158 | + * @param array $student |
|
| 159 | + * @return array |
|
| 160 | + */ |
|
| 161 | 161 | public function getStudentCount($student) |
| 162 | 162 | { |
| 163 | 163 | return $this |
@@ -54,7 +54,7 @@ discard block |
||
| 54 | 54 | |
| 55 | 55 | public function updateOrInsertRecord($user) |
| 56 | 56 | { |
| 57 | - try { |
|
| 57 | + try { |
|
| 58 | 58 | // regenerate unique id if it's not available |
| 59 | 59 | $uniqueId = $this->uniqueUserId::isValidUniqueId($user['openemis_no'],9) ? $this->uniqueUserId::getUniqueAlphanumeric() : $user['openemis_no']; |
| 60 | 60 | |
@@ -69,10 +69,10 @@ discard block |
||
| 69 | 69 | ]); |
| 70 | 70 | } |
| 71 | 71 | return $user; |
| 72 | - } catch (\Exception $th) { |
|
| 73 | - $user['openemis_no'] = $this->uniqueUserId::getUniqueAlphanumeric(); |
|
| 74 | - $this->updateOrInsertRecord($user); |
|
| 75 | - Log::error($th->getMessage()); |
|
| 76 | - } |
|
| 72 | + } catch (\Exception $th) { |
|
| 73 | + $user['openemis_no'] = $this->uniqueUserId::getUniqueAlphanumeric(); |
|
| 74 | + $this->updateOrInsertRecord($user); |
|
| 75 | + Log::error($th->getMessage()); |
|
| 76 | + } |
|
| 77 | 77 | } |
| 78 | 78 | } |
@@ -40,12 +40,12 @@ |
||
| 40 | 40 | */ |
| 41 | 41 | public function handle() |
| 42 | 42 | { |
| 43 | - $students = DB::table('examination_students as es') |
|
| 44 | - ->select(DB::raw('count(*) as total'),'e2.*') |
|
| 45 | - ->join('examination_students as e2','es.nsid','e2.nsid') |
|
| 46 | - ->having('total','>',1) |
|
| 47 | - ->groupBy('e2.st_no') |
|
| 48 | - ->orderBy('e2.st_no') |
|
| 43 | + $students = DB::table('examination_students as es') |
|
| 44 | + ->select(DB::raw('count(*) as total'),'e2.*') |
|
| 45 | + ->join('examination_students as e2','es.nsid','e2.nsid') |
|
| 46 | + ->having('total','>',1) |
|
| 47 | + ->groupBy('e2.st_no') |
|
| 48 | + ->orderBy('e2.st_no') |
|
| 49 | 49 | ->get(); |
| 50 | 50 | $this->output->writeln(count($students).'entries found'); |
| 51 | 51 | |