Materia | name_prd; ?> | Promedio | Recuperación | Supletorio | Remedial | Gracia | Final | Cualitativa |
---|---|---|---|---|---|---|---|---|
name_csb); ?> | where('serial_prd', '=', $itemPrd->serial_prd) ->where('serial_lvl', '=', $serial_lvl) ->where('serial_std', '=', $serial_std); if ($itemSbj->subject_typ == 'mandatory') { $student_subject_period_average = $student_subject_period_average->where('serial_sbc', '=', $itemSbj->serial_sbc); } if ($itemSbj->subject_typ == 'optional') { $group_optional_subject = GroupOptionalSubject::where('serial_osb', '=', $itemSbj->serial_sbc)->where('status_gos', '=', 'ACTIVE')->first(); $student_subject_period_average = $student_subject_period_average->where('serial_lop', '=', $group_optional_subject->serial_lop); } $lockViewGradesSubperiod=LockViewGrades::where('serial_prd','=',$itemPrd->serial_prd)->where('serial_crs','=',$studentInfo->serial_crs)->where('serial_scy','=',$serial_scy)->first(); $student_subject_period_average = $student_subject_period_average->first(); $avg = ($student_subject_period_average && $student_subject_period_average->average_ssa) ? $student_subject_period_average->average_ssa : "--"; $viewGradesPeriod=true; if($lockViewGradesSubperiod && $lockViewGradesSubperiod->show_grades_period_lvg=='LOCKED'){ $avg = '--'; $viewGradesPeriod=false; } if ($avg != '--') { $avg = number_format(Global_Functions::truncate($avg, $precision), $precision); if ($itemSbj->grade_type_sbc == "QUALITATIVE") { $qualitative_equivalence = new QualitativeEquivalence(); $aux_avg = $qualitative_equivalence->convertQuantitativeToQualitativeGrade($avg, $serial_scy); $avg = $aux_avg->code_qeq ? $aux_avg->code_qeq : '--'; } } ?>where('serial_lvl', '=', $serial_lvl) ->where('serial_crs', '=', $studentInfo->serial_crs) ->where('serial_std', '=', $serial_std); if ($itemSbj->subject_typ == 'mandatory') { $student_subject_year_average = $student_subject_year_average->where('serial_sbc', '=', $itemSbj->serial_sbc); } if ($itemSbj->subject_typ == 'optional') { $group_optional_subject = GroupOptionalSubject::where('serial_osb', '=', $itemSbj->serial_sbc)->where('status_gos', '=', 'ACTIVE')->first(); $student_subject_year_average = $student_subject_year_average->where('serial_lop', '=', $group_optional_subject->serial_lop); } $student_subject_year_average = $student_subject_year_average->first(); $avgYear = ($student_subject_year_average && $student_subject_year_average->average_sya) ? $student_subject_year_average->average_sya : "--"; $recoveryExamGradeSya = ($student_subject_year_average && $student_subject_year_average->recovery_exam_grade_sya) ? $student_subject_year_average->recovery_exam_grade_sya : "--"; $resit_exam_grade_sya = ($student_subject_year_average && $student_subject_year_average->resit_exam_grade_sya) ? $student_subject_year_average->resit_exam_grade_sya : "--"; $remedy_exam_grade_sya = ($student_subject_year_average && $student_subject_year_average->remedy_exam_grade_sya) ? $student_subject_year_average->remedy_exam_grade_sya : "--"; $grace_exam_grade_sya = ($student_subject_year_average && $student_subject_year_average->grace_exam_grade_sya) ? $student_subject_year_average->grace_exam_grade_sya : "--"; $final_grade_sya = ($student_subject_year_average && $student_subject_year_average->final_grade_sya) ? $student_subject_year_average->final_grade_sya : "--"; $lockViewGradesExam=LockViewGrades::where('serial_crs','=',$studentInfo->serial_crs)->where('serial_scy','=',$serial_scy)->first(); if($lockViewGradesExam && $lockViewGradesExam->show_grades_annual_lvg=='LOCKED'){ $avgYear = '--'; } if ($avgYear != '--') { $avgYear = number_format(Global_Functions::truncate($avgYear, $precision), $precision); if ($itemSbj->grade_type_sbc == "QUALITATIVE") { $qualitative_equivalence = new QualitativeEquivalence(); $aux_avg_year = $qualitative_equivalence->convertQuantitativeToQualitativeGrade($avgYear, $serial_scy); $avgYear = $aux_avg_year->code_qeq ? $aux_avg_year->code_qeq : '--'; } } if ($recoveryExamGradeSya != '--') { $recoveryExamGradeSya = number_format(Global_Functions::truncate($recoveryExamGradeSya, $precision), $precision); if ($itemSbj->grade_type_sbc == "QUALITATIVE") { $qualitative_equivalence = new QualitativeEquivalence(); $recoveryExamGradeSya = $qualitative_equivalence->convertQuantitativeToQualitativeGrade($recoveryExamGradeSya, $serial_scy); $recoveryExamGradeSya = $recoveryExamGradeSya->code_qeq ? $recoveryExamGradeSya->code_qeq : '--'; } } if ($resit_exam_grade_sya != '--') { $resit_exam_grade_sya = number_format(Global_Functions::truncate($resit_exam_grade_sya, $precision), $precision); if ($itemSbj->grade_type_sbc == "QUALITATIVE") { $qualitative_equivalence = new QualitativeEquivalence(); $resit_exam_grade_sya = $qualitative_equivalence->convertQuantitativeToQualitativeGrade($resit_exam_grade_sya, $serial_scy); $resit_exam_grade_sya = $resit_exam_grade_sya->code_qeq ? $resit_exam_grade_sya->code_qeq : '--'; } } if ($remedy_exam_grade_sya != '--') { $remedy_exam_grade_sya = number_format(Global_Functions::truncate($remedy_exam_grade_sya, $precision), $precision); if ($itemSbj->grade_type_sbc == "QUALITATIVE") { $qualitative_equivalence = new QualitativeEquivalence(); $remedy_exam_grade_sya = $qualitative_equivalence->convertQuantitativeToQualitativeGrade($remedy_exam_grade_sya, $serial_scy); $remedy_exam_grade_sya = $remedy_exam_grade_sya->code_qeq ? $remedy_exam_grade_sya->code_qeq : '--'; } } if ($grace_exam_grade_sya != '--') { $grace_exam_grade_sya = number_format(Global_Functions::truncate($grace_exam_grade_sya, $precision), $precision); if ($itemSbj->grade_type_sbc == "QUALITATIVE") { $qualitative_equivalence = new QualitativeEquivalence(); $grace_exam_grade_sya = $qualitative_equivalence->convertQuantitativeToQualitativeGrade($grace_exam_grade_sya, $serial_scy); $grace_exam_grade_sya = $grace_exam_grade_sya->code_qeq ? $grace_exam_grade_sya->code_qeq : '--'; } } $final_grade_sya_quantitative="--"; if ($final_grade_sya != '--') { $final_grade_sya = number_format(Global_Functions::truncate($final_grade_sya, $precision), $precision); if ($itemSbj->grade_type_sbc == "QUALITATIVE") { $qualitative_equivalence = new QualitativeEquivalence(); $final_grade_sya = $qualitative_equivalence->convertQuantitativeToQualitativeGrade($final_grade_sya, $serial_scy); $final_grade_sya = $final_grade_sya->code_qeq ? $final_grade_sya->code_qeq : '--'; $final_grade_sya_quantitative = $final_grade_sya; }elseif($itemSbj->grade_type_sbc == "QUANTITATIVE"){ $scale_quantitative_grades=new ScaleQuantitativeGrades(); $final_grade_sya_quantitative=$scale_quantitative_grades->getScaleQuantitativeEquivalences( $final_grade_sya*$school_year->school_max_grade_scy,$serial_scy); $final_grade_sya_quantitative=($final_grade_sya_quantitative!='')?$final_grade_sya_quantitative->code_sqg:'--'; } } if($lockViewGradesExam && $lockViewGradesExam->show_grades_annual_lvg=='LOCKED'){ $recoveryExamGradeSya = '--'; $resit_exam_grade_sya = '--'; $remedy_exam_grade_sya = '--'; $grace_exam_grade_sya = '--'; $final_grade_sya = '--'; $final_grade_sya_quantitative = '--'; } ?> |