Skip to content

Commit

Permalink
Apply fixes from StyleCI
Browse files Browse the repository at this point in the history
  • Loading branch information
StyleCIBot committed Jan 10, 2024
1 parent c5d4ac5 commit a4b61ad
Show file tree
Hide file tree
Showing 4 changed files with 5 additions and 0 deletions.
1 change: 1 addition & 0 deletions app/Livewire/AcademicYearResultTabulation.php
Original file line number Diff line number Diff line change
Expand Up @@ -106,6 +106,7 @@ public function print()
{
//used pdf class directly
$pdf = Pdf::loadView('pages.exam.print-exam-tabulation', ['tabulatedRecords' => $this->tabulatedRecords, 'totalMarksAttainableInEachSubject' => $this->totalMarksAttainableInEachSubject, 'subjects' => $this->subjects])->output();

//save as pdf
return response()->streamDownload(
fn () => print($pdf),
Expand Down
1 change: 1 addition & 0 deletions app/Livewire/ExamTabulation.php
Original file line number Diff line number Diff line change
Expand Up @@ -123,6 +123,7 @@ public function print()
{
//used pdf class directly
$pdf = Pdf::loadView('pages.exam.print-exam-tabulation', ['tabulatedRecords' => $this->tabulatedRecords, 'totalMarksAttainableInEachSubject' => $this->totalMarksAttainableInEachSubject, 'subjects' => $this->subjects])->output();

//save as pdf
return response()->streamDownload(
fn () => print($pdf),
Expand Down
1 change: 1 addition & 0 deletions app/Livewire/SemesterResultTabulation.php
Original file line number Diff line number Diff line change
Expand Up @@ -104,6 +104,7 @@ public function print()
{
//used pdf class directly
$pdf = Pdf::loadView('pages.exam.print-exam-tabulation', ['tabulatedRecords' => $this->tabulatedRecords, 'totalMarksAttainableInEachSubject' => $this->totalMarksAttainableInEachSubject, 'subjects' => $this->subjects])->output();

//save as pdf
return response()->streamDownload(
fn () => print($pdf),
Expand Down
2 changes: 2 additions & 0 deletions app/Services/Exam/ExamRecordService.php
Original file line number Diff line number Diff line change
Expand Up @@ -58,6 +58,7 @@ public function getAllUserExamRecordInExamForSubject(Exam $exam, int $user, int
{
//get all exam slots in exam
$examSlots = $exam->examSlots->pluck('id');

//get all exam records in for user and subject
return ExamRecord::where(['user_id' => $user, 'subject_id' => $subject])->whereIn('exam_slot_id', $examSlots)->get();
}
Expand All @@ -83,6 +84,7 @@ public function getAllUserExamRecordInSemesterForSubject(Semester $semester, $us
$examSlots[] = $j;
}
}

//get all exam records in for user and subject
return ExamRecord::where(['user_id' => $user, 'subject_id' => $subject])->whereIn('exam_slot_id', $examSlots)->get();
}
Expand Down

0 comments on commit a4b61ad

Please sign in to comment.