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