@@ -181,7 +181,7 @@ discard block |
||
181 | 181 | $studentData['id'] = $id; |
182 | 182 | $this->uniqueUserId->updateOrInsertRecord($studentData); |
183 | 183 | return $studentData; |
184 | - } catch (\Exception $th) { |
|
184 | + }catch (\Exception $th) { |
|
185 | 185 | Log::error($th->getMessage()); |
186 | 186 | // in case of duplication of the Unique ID this will recursive. |
187 | 187 | $this->insertExaminationStudent($student); |
@@ -201,7 +201,7 @@ discard block |
||
201 | 201 | $this->uniqueUserId = new Unique_user_id(); |
202 | 202 | $this->uniqueUId = new UniqueUid(); |
203 | 203 | // regenerate unique id if it's not available |
204 | - $uniqueId = ($this->uniqueUId::isValidUniqueId($sis_student['openemis_no'],9)) ? $sis_student['openemis_no'] : $this->uniqueUId::getUniqueAlphanumeric(); |
|
204 | + $uniqueId = ($this->uniqueUId::isValidUniqueId($sis_student['openemis_no'], 9)) ? $sis_student['openemis_no'] : $this->uniqueUId::getUniqueAlphanumeric(); |
|
205 | 205 | |
206 | 206 | $studentData = [ |
207 | 207 | 'username' => str_replace('-', '', $uniqueId), |
@@ -215,12 +215,12 @@ discard block |
||
215 | 215 | ]; |
216 | 216 | |
217 | 217 | try { |
218 | - self::where( 'id' , $sis_student['student_id'])->update($studentData); |
|
218 | + self::where('id', $sis_student['student_id'])->update($studentData); |
|
219 | 219 | $studentData['id'] = $sis_student['student_id']; |
220 | 220 | unset($studentData['examination_students']); |
221 | 221 | $this->uniqueUserId->updateOrInsertRecord($studentData); |
222 | 222 | return $studentData; |
223 | - } catch (\Exception $th) { |
|
223 | + }catch (\Exception $th) { |
|
224 | 224 | Log::error($th); |
225 | 225 | // in case of duplication of the Unique ID this will recursive. |
226 | 226 | $this->updateExaminationStudent($student, $sis_student); |