|
@@ -80,6 +80,62 @@ class ProgramsController extends \BaseController
|
80
|
80
|
|
81
|
81
|
}
|
82
|
82
|
|
|
83
|
+public function showReport()
|
|
84
|
+{
|
|
85
|
+ //OUTCOMES Join criteria join program
|
|
86
|
+ $programs = DB::table('programs')
|
|
87
|
+ ->select('id')
|
|
88
|
+ ->orderBy('name', 'asc')
|
|
89
|
+ ->get();
|
|
90
|
+
|
|
91
|
+
|
|
92
|
+ $title = "Programs Reports";
|
|
93
|
+ // $title = "Program Report: ".$program->name;
|
|
94
|
+
|
|
95
|
+ $programs_info = array();
|
|
96
|
+ //OUTCOMES Join criteria join program
|
|
97
|
+ foreach ($programs as $program) {
|
|
98
|
+ $info_by_id = Program::find($program->id);
|
|
99
|
+
|
|
100
|
+ $domains = DB::table('outcomes')
|
|
101
|
+ ->join('criteria','criteria.outcome_id','=','outcomes.id')
|
|
102
|
+ ->join('programs','programs.id','=','criteria.program_id')
|
|
103
|
+ ->join('courses','courses.program_id','=','programs.id')
|
|
104
|
+ ->where('programs.id',$program->id)
|
|
105
|
+ ->select('outcomes.name')
|
|
106
|
+ ->distinct()
|
|
107
|
+ ->orderBy('outcomes.name', 'asc')
|
|
108
|
+ ->get();
|
|
109
|
+
|
|
110
|
+ $courses_used = DB::table('outcomes')
|
|
111
|
+ ->join('criteria','criteria.outcome_id','=','outcomes.id')
|
|
112
|
+ ->join('programs','programs.id','=','criteria.program_id')
|
|
113
|
+ ->join('courses','courses.program_id','=','programs.id')
|
|
114
|
+ ->where('programs.id',$program->id)
|
|
115
|
+ ->select('courses.number', 'outcomes.name as domain_name', 'courses.code')
|
|
116
|
+ ->distinct()
|
|
117
|
+ ->orderBy('courses.name', 'asc')
|
|
118
|
+ ->get();
|
|
119
|
+
|
|
120
|
+ $transformative_actions = DB::table('outcomes')
|
|
121
|
+ ->join('criteria','criteria.outcome_id','=','outcomes.id')
|
|
122
|
+ ->join('programs','programs.id','=','criteria.program_id')
|
|
123
|
+ ->join('courses','courses.program_id','=','programs.id')
|
|
124
|
+ ->join('activities','activities.course_id','=','courses.id')
|
|
125
|
+ ->join('activity_criterion','activity_criterion.activity_id','=','activities.id')
|
|
126
|
+ ->where('programs.id',$program->id)
|
|
127
|
+ ->select('activity_criterion.transformative_actions', 'outcomes.name as domain_name')
|
|
128
|
+ ->distinct()
|
|
129
|
+ ->orderBy('activity_criterion.transformative_actions', 'asc')
|
|
130
|
+ ->get();
|
|
131
|
+ $info = array($info_by_id, $domains, $courses_used, $transformative_actions);
|
|
132
|
+ array_push($programs_info, $info);
|
|
133
|
+ }
|
|
134
|
+
|
|
135
|
+
|
|
136
|
+ return View::make('local.managers.shared.program_report', compact('title','programs_info'));
|
|
137
|
+}
|
|
138
|
+
|
83
|
139
|
/**
|
84
|
140
|
* Info to print a program
|
85
|
141
|
*/
|