|
@@ -720,6 +720,80 @@ class OutcomesController extends \BaseController
|
720
|
720
|
return View::make('local.managers.admins.assessment_report', compact('title', 'outcome', 'schools'));
|
721
|
721
|
}
|
722
|
722
|
|
|
723
|
+ public function totalAssessmentReport()
|
|
724
|
+ {
|
|
725
|
+ //SELECT sm.name, s.name, p.name, p.code, a.outcomes_attempted, stu.number, ass.scores, c.code, c.number, r.expected_points
|
|
726
|
+// FROM students stu, schools s, programs p, courses c, activities a, assessments ass, rubrics r, semesters sm
|
|
727
|
+// where stu.id=ass.student_id and sm.id=c.semester_id and s.id=p.school_id and p.id=c.program_id and a.course_id=c.id and ass.activity_id=a.id and a.rubric_id=r.id
|
|
728
|
+// and c.semester_id in (12,13) and a.outcomes_attempted is not null
|
|
729
|
+ ini_set('memory_limit', -1);
|
|
730
|
+ ini_set('max_execution_time', 300);
|
|
731
|
+// $total_assessments_temp = DB::table('assessments')
|
|
732
|
+// ->join('students', 'students.id', '=', 'assessments.student_id')
|
|
733
|
+// ->join('activities', 'activities.id', '=', 'assessments.activity_id')
|
|
734
|
+// ->join('rubrics', 'rubrics.id', '=', 'activities.rubric_id')
|
|
735
|
+// ->join('courses', 'courses.id', '=', 'activities.course_id')
|
|
736
|
+// ->join('programs', 'programs.id', '=', 'courses.program_id')
|
|
737
|
+// ->join('schools', 'schools.id', '=', 'programs.school_id')
|
|
738
|
+// ->join('semesters', 'semesters.id', '=', 'courses.semester_id')
|
|
739
|
+// ->whereIn('courses.semester_id', Session::get('semesters_ids'))
|
|
740
|
+// ->whereRaw('activities.outcomes_attempted is not null')
|
|
741
|
+// ->select('activities.id as activity_id','semesters.name as semester','schools.name as school','programs.name as program','programs.id as program_id','programs.code as program_code','students.number as student_number','students.conc_code as student_conc_code','assessments.scores as results','courses.name as course','courses.code as course_code','courses.number as course_number','rubrics.expected_points as expected_result')
|
|
742
|
+// ->orderBy('semesters.id','school','program','course','student_number')
|
|
743
|
+// ->distinct()
|
|
744
|
+// ->get();
|
|
745
|
+//
|
|
746
|
+// $total_assessments=array();
|
|
747
|
+// foreach($total_assessments_temp as $total_assessment)
|
|
748
|
+// {
|
|
749
|
+// $results=json_decode($total_assessment->results, TRUE);
|
|
750
|
+// $total_assessment->course=$total_assessment->course_code.$total_assessment->course_number." ".$total_assessment->course;
|
|
751
|
+// foreach($results as $criterion_id => $result)
|
|
752
|
+// {
|
|
753
|
+// if($result and $result!="N/A")
|
|
754
|
+// {
|
|
755
|
+// $trans_temp=clone $total_assessment;
|
|
756
|
+// $criterion=Criterion::find($criterion_id);
|
|
757
|
+// if($criterion)
|
|
758
|
+// {
|
|
759
|
+// // var_dump($total_assessment->activity_id);
|
|
760
|
+// // var_dump($criterion_id);
|
|
761
|
+// if($criterion_id==1398)var_dump($criterion);
|
|
762
|
+// // exit();
|
|
763
|
+// $trans_temp->result=$result;
|
|
764
|
+// $trans_temp->criterion=$criterion->name;
|
|
765
|
+// $trans_temp->outcome=Outcome::find($criterion->outcome_id)->name;
|
|
766
|
+// $total_assessments[]=$trans_temp;
|
|
767
|
+// }
|
|
768
|
+// }
|
|
769
|
+// }
|
|
770
|
+//
|
|
771
|
+// }
|
|
772
|
+ $total_assessments = DB::table('assessments')
|
|
773
|
+ ->join('students', 'students.id', '=', 'assessments.student_id')
|
|
774
|
+ ->join('activity_criterion', 'activity_criterion.id', '=', 'assessments.activity_criterion_id')
|
|
775
|
+ ->join('activities', 'activities.id', '=', 'activity_criterion.activity_id')
|
|
776
|
+ ->join('criteria', 'criteria.id', '=', 'activity_criterion.criterion_id')
|
|
777
|
+ ->join('criterion_objective_outcome', 'criteria.id', '=', 'criterion_objective_outcome.criterion_id')
|
|
778
|
+ ->join('outcomes', 'outcomes.id', '=', 'criterion_objective_outcome.outcome_id')
|
|
779
|
+ ->join('rubric_activity', 'rubric_activity.activity_id', '=', 'activities.id')
|
|
780
|
+ ->join('rubrics', 'rubrics.id', '=', 'rubric_activity.rubric_id')
|
|
781
|
+ ->join('courses', 'courses.id', '=', 'activities.course_id')
|
|
782
|
+ ->join('programs', 'programs.id', '=', 'courses.program_id')
|
|
783
|
+ ->join('schools', 'schools.id', '=', 'programs.school_id')
|
|
784
|
+ ->join('semesters', 'semesters.id', '=', 'courses.semester_id')
|
|
785
|
+ ->whereIn('courses.semester_id', Session::get('semesters_ids'))
|
|
786
|
+ ->select('criteria.name as criterion','outcomes.name as outcome','activities.id as activity_id','semesters.name as semester','schools.name as school','programs.name as program','programs.id as program_id','programs.code as program_code','students.number as student_number','students.conc_code as student_conc_code','assessments.score as result','courses.name as course','courses.code as course_code','courses.number as course_number','rubrics.expected_points as expected_result')
|
|
787
|
+ ->orderBy('semesters.id','school','program','course','student_number')
|
|
788
|
+ ->distinct()
|
|
789
|
+ ->get();
|
|
790
|
+
|
|
791
|
+
|
|
792
|
+ $title = "Total Assessment Report";
|
|
793
|
+
|
|
794
|
+ return View::make('local.managers.admins.total_assessment', compact('title', 'total_assessments'));
|
|
795
|
+ }
|
|
796
|
+
|
723
|
797
|
// TODO: Change later
|
724
|
798
|
public function newAssessmentReport($outcome_id)
|
725
|
799
|
{
|