Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Apply fixes from StyleCI #371

Merged
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
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