|
|
|
|
222
|
// Log::info($annual_plans);
|
222
|
// Log::info($annual_plans);
|
223
|
$outcomes = array();
|
223
|
$outcomes = array();
|
224
|
$allSemesterOrder = array();
|
224
|
$allSemesterOrder = array();
|
225
|
- Log::info($annual_plans);
|
|
|
|
|
225
|
+// Log::info($annual_plans);
|
226
|
/*foreach ($annual_plans as $an_plan) {
|
226
|
/*foreach ($annual_plans as $an_plan) {
|
227
|
Log::info($an_plan->id);
|
227
|
Log::info($an_plan->id);
|
228
|
$outcomes[$an_plan->id]["first"] = DB::select("select * from outcomes where id in (select outcome_id from typ_semester_outcome where semester_id = {$an_plan->semester_start} and typ_program_id in (select id from typ_program where program_id ={$an_plan->program_id} and three_year_plan_id ={$current_typ->id} ))");
|
228
|
$outcomes[$an_plan->id]["first"] = DB::select("select * from outcomes where id in (select outcome_id from typ_semester_outcome where semester_id = {$an_plan->semester_start} and typ_program_id in (select id from typ_program where program_id ={$an_plan->program_id} and three_year_plan_id ={$current_typ->id} ))");
|
|
|
|
|
238
|
|
238
|
|
239
|
public function fetchInfo()
|
239
|
public function fetchInfo()
|
240
|
{
|
240
|
{
|
241
|
- Log::info(Input::get('id'));
|
|
|
|
|
241
|
+// Log::info(Input::get('id'));
|
242
|
$an_plan = DB::table("annual_plans")
|
242
|
$an_plan = DB::table("annual_plans")
|
243
|
->join('annual_cycle', 'annual_cycle.id', '=', 'annual_plans.annual_cycle_id')
|
243
|
->join('annual_cycle', 'annual_cycle.id', '=', 'annual_plans.annual_cycle_id')
|
244
|
->where('annual_plans.id', '=', Input::get('id'))
|
244
|
->where('annual_plans.id', '=', Input::get('id'))
|
|
|
|
|
257
|
})
|
257
|
})
|
258
|
->select('typ_program.*')
|
258
|
->select('typ_program.*')
|
259
|
->first();
|
259
|
->first();
|
260
|
- Log::info(array($an_plan));
|
|
|
261
|
- Log::info(array($current_typ_program));
|
|
|
|
|
260
|
+// Log::info(array($an_plan));
|
|
|
261
|
+// Log::info(array($current_typ_program));
|
262
|
|
262
|
|
263
|
//DB::select("select * from typ_program where program_id = {$an_plan->program_id} and three_year_plan_id in (select id from three_year_plan where year_start <= {$years[0]} and year_end>= {$years[1]})")[0];
|
263
|
//DB::select("select * from typ_program where program_id = {$an_plan->program_id} and three_year_plan_id in (select id from three_year_plan where year_start <= {$years[0]} and year_end>= {$years[1]})")[0];
|
264
|
|
264
|
|
|
|
|
|
354
|
$typ_info['courses'][$objective->id] = DB::select("select c.id, c.number, c.name, c.code, typ.id typ_course_id from courses c, typ_semester_courses typ, (select course_id, id from typ_semester_courses where typ_semester_objective_id in (select id from typ_semester_objectives where objective_id ={$objective->id} and typ_semester_outcome_id in (select id from typ_semester_outcome where outcome_id =? and semester_id ={$semester->id} and typ_program_id in(select id from typ_program where program_id ={$program_id})))) rel where typ.course_id =c.id and rel.course_id = c.id and typ.id = rel.id ", array(Input::get('id')));
|
354
|
$typ_info['courses'][$objective->id] = DB::select("select c.id, c.number, c.name, c.code, typ.id typ_course_id from courses c, typ_semester_courses typ, (select course_id, id from typ_semester_courses where typ_semester_objective_id in (select id from typ_semester_objectives where objective_id ={$objective->id} and typ_semester_outcome_id in (select id from typ_semester_outcome where outcome_id =? and semester_id ={$semester->id} and typ_program_id in(select id from typ_program where program_id ={$program_id})))) rel where typ.course_id =c.id and rel.course_id = c.id and typ.id = rel.id ", array(Input::get('id')));
|
355
|
|
355
|
|
356
|
$typ_info['criteria'][$objective->id] = DB::select("select * from criteria where deleted_at IS NULL and id in (select criterion_id from criterion_objective_outcome join program_criterion_objective_outcome on program_criterion_objective_outcome.cri_obj_out_id = criterion_objective_outcome.id where outcome_id = ? and program_id = {$program_id} and objective_id = {$objective->id})", array(Input::get('id')));
|
356
|
$typ_info['criteria'][$objective->id] = DB::select("select * from criteria where deleted_at IS NULL and id in (select criterion_id from criterion_objective_outcome join program_criterion_objective_outcome on program_criterion_objective_outcome.cri_obj_out_id = criterion_objective_outcome.id where outcome_id = ? and program_id = {$program_id} and objective_id = {$objective->id})", array(Input::get('id')));
|
357
|
- Log::info($typ_info['criteria'][$objective->id]);
|
|
|
|
|
357
|
+// Log::info($typ_info['criteria'][$objective->id]);
|
358
|
$typ_info['typ_objective_id'][$objective->id] = DB::select("select id from typ_semester_objectives where objective_id = {$objective->id} and typ_semester_outcome_id in (select id from typ_semester_outcome where outcome_id =? and semester_id ={$semester->id} and typ_program_id in (select id from typ_program where program_id ={$program_id}))", array(Input::get('id')));
|
358
|
$typ_info['typ_objective_id'][$objective->id] = DB::select("select id from typ_semester_objectives where objective_id = {$objective->id} and typ_semester_outcome_id in (select id from typ_semester_outcome where outcome_id =? and semester_id ={$semester->id} and typ_program_id in (select id from typ_program where program_id ={$program_id}))", array(Input::get('id')));
|
359
|
- Log::info($typ_info['typ_objective_id'][$objective->id]);
|
|
|
|
|
359
|
+// Log::info($typ_info['typ_objective_id'][$objective->id]);
|
360
|
$typ_info['typ_objective_id'][$objective->id] = $typ_info['typ_objective_id'][$objective->id][0];
|
360
|
$typ_info['typ_objective_id'][$objective->id] = $typ_info['typ_objective_id'][$objective->id][0];
|
361
|
|
361
|
|
362
|
- Log::info($typ_info['typ_objective_id'][$objective->id]->id);
|
|
|
363
|
- Log::info($annual_plan->id);
|
|
|
|
|
362
|
+// Log::info($typ_info['typ_objective_id'][$objective->id]->id);
|
|
|
363
|
+// Log::info($annual_plan->id);
|
364
|
// $typ_info['annual_plans_transformative'][$objective->id] = DB::select(
|
364
|
// $typ_info['annual_plans_transformative'][$objective->id] = DB::select(
|
365
|
// "select trans_id from annual_plan_transformative
|
365
|
// "select trans_id from annual_plan_transformative
|
366
|
// where annual_plan_id={$annual_plan->id}
|
366
|
// where annual_plan_id={$annual_plan->id}
|
|
|
|
|
386
|
}
|
386
|
}
|
387
|
}
|
387
|
}
|
388
|
$typ_info['annual_plan'] = $annual_plan;
|
388
|
$typ_info['annual_plan'] = $annual_plan;
|
389
|
- Log::info($typ_info);
|
|
|
|
|
389
|
+// Log::info($typ_info);
|
390
|
|
390
|
|
391
|
$typ_info['transformative_actions_for_outcome'] = DB::table('transformative_actions')
|
391
|
$typ_info['transformative_actions_for_outcome'] = DB::table('transformative_actions')
|
392
|
->join('transformative_typ_outcome', 'transformative_typ_outcome.trans_id', '=', 'transformative_actions.id')
|
392
|
->join('transformative_typ_outcome', 'transformative_typ_outcome.trans_id', '=', 'transformative_actions.id')
|
|
|
|
|
533
|
foreach ($annual_plan['first']['outcomes'] as $outcomes) {
|
533
|
foreach ($annual_plan['first']['outcomes'] as $outcomes) {
|
534
|
|
534
|
|
535
|
$annual_plan['first']['objectives'][$outcomes->id] = DB::select("select * from objectives where id in (select objective_id from typ_semester_objectives where typ_semester_outcome_id in(select id from typ_semester_outcome where outcome_id = {$outcomes->id} and semester_id = {$an_semesters->semester_start} and typ_program_id in (select id from typ_program where program_id ={$an_semesters->program_id})))");
|
535
|
$annual_plan['first']['objectives'][$outcomes->id] = DB::select("select * from objectives where id in (select objective_id from typ_semester_objectives where typ_semester_outcome_id in(select id from typ_semester_outcome where outcome_id = {$outcomes->id} and semester_id = {$an_semesters->semester_start} and typ_program_id in (select id from typ_program where program_id ={$an_semesters->program_id})))");
|
536
|
- Log::info($outcomes->id);
|
|
|
537
|
- Log::info($annual_plan['first']['objectives'][$outcomes->id]);
|
|
|
|
|
536
|
+ //Log::info($outcomes->id);
|
|
|
537
|
+// Log::info($annual_plan['first']['objectives'][$outcomes->id]);
|
538
|
foreach ($annual_plan['first']['objectives'][$outcomes->id] as $objective) {
|
538
|
foreach ($annual_plan['first']['objectives'][$outcomes->id] as $objective) {
|
539
|
$annual_plan['first']['typ_objective_id'][$objective->id] = DB::select("select id from typ_semester_objectives where objective_id = {$objective->id} and typ_semester_outcome_id in (select id from typ_semester_outcome where outcome_id ={$outcomes->id} and semester_id ={$an_semesters->semester_start} and typ_program_id in(select id from typ_program where program_id ={$an_semesters->program_id})) ")[0];
|
539
|
$annual_plan['first']['typ_objective_id'][$objective->id] = DB::select("select id from typ_semester_objectives where objective_id = {$objective->id} and typ_semester_outcome_id in (select id from typ_semester_outcome where outcome_id ={$outcomes->id} and semester_id ={$an_semesters->semester_start} and typ_program_id in(select id from typ_program where program_id ={$an_semesters->program_id})) ")[0];
|
540
|
$annual_plan['first']['courses'][$objective->id] = DB::select("select typ.id typ_course_id, typ.course_id, c.code, c.number, c.name from (select course_id, id from typ_semester_courses where typ_semester_objective_id = {$annual_plan['first']['typ_objective_id'][$objective->id]->id}) typ, courses c where c.id = typ.course_id");
|
540
|
$annual_plan['first']['courses'][$objective->id] = DB::select("select typ.id typ_course_id, typ.course_id, c.code, c.number, c.name from (select course_id, id from typ_semester_courses where typ_semester_objective_id = {$annual_plan['first']['typ_objective_id'][$objective->id]->id}) typ, courses c where c.id = typ.course_id");
|
|
|
|
|
543
|
$annual_plan['first']['trans_actions'][$objective->id][$course->typ_course_id] = DB::select("select * from transformative_actions where id in (select trans_id from annual_plan_transformative where typ_semester_course_id = {$course->typ_course_id})");
|
543
|
$annual_plan['first']['trans_actions'][$objective->id][$course->typ_course_id] = DB::select("select * from transformative_actions where id in (select trans_id from annual_plan_transformative where typ_semester_course_id = {$course->typ_course_id})");
|
544
|
}
|
544
|
}
|
545
|
|
545
|
|
546
|
- Log::info($objective->id);
|
|
|
|
|
546
|
+// Log::info($objective->id);
|
547
|
/*$annual_plan['first']['trans_actions'][$objective->id] = DB::select("select * from transformative_actions where id in (select trans_id from annual_plan_transformative where typ_semester_objective_id ={$annual_plan['first']['typ_objective_id'][$objective->id]->id})");
|
547
|
/*$annual_plan['first']['trans_actions'][$objective->id] = DB::select("select * from transformative_actions where id in (select trans_id from annual_plan_transformative where typ_semester_objective_id ={$annual_plan['first']['typ_objective_id'][$objective->id]->id})");
|
548
|
foreach ($annual_plan['first']['trans_actions'][$objective->id] as $trans) {
|
548
|
foreach ($annual_plan['first']['trans_actions'][$objective->id] as $trans) {
|
549
|
Log::info($annual_plan['first']['typ_objective_id'][$objective->id]->id);
|
549
|
Log::info($annual_plan['first']['typ_objective_id'][$objective->id]->id);
|
|
|
|
|
658
|
->select('courses.code', 'courses.number')
|
658
|
->select('courses.code', 'courses.number')
|
659
|
->distinct()
|
659
|
->distinct()
|
660
|
->get();
|
660
|
->get();
|
661
|
- Log::info($course_codes);
|
|
|
|
|
661
|
+// Log::info($course_codes);
|
662
|
$all_courses_info = [];
|
662
|
$all_courses_info = [];
|
663
|
|
663
|
|
664
|
foreach ($course_codes as $index => $course_code) {
|
664
|
foreach ($course_codes as $index => $course_code) {
|
|
|
|
|
671
|
->where('number', $course_code->number)
|
671
|
->where('number', $course_code->number)
|
672
|
->where('program_id', $program_id)
|
672
|
->where('program_id', $program_id)
|
673
|
->get();
|
673
|
->get();
|
674
|
- Log::info("run number " . $index);
|
|
|
675
|
- Log::info($courses);
|
|
|
|
|
674
|
+ //Log::info("run number " . $index);
|
|
|
675
|
+// Log::info($courses);
|
676
|
foreach ($courses as $course) {
|
676
|
foreach ($courses as $course) {
|
677
|
$all_courses_info[$course_code->code . '_' . $course_code->number][] = $course->getReportObject();
|
677
|
$all_courses_info[$course_code->code . '_' . $course_code->number][] = $course->getReportObject();
|
678
|
}
|
678
|
}
|
|
|
|
|
751
|
$outcome->semester_info = DB::table('semesters')
|
751
|
$outcome->semester_info = DB::table('semesters')
|
752
|
->where('id', $semester_id)
|
752
|
->where('id', $semester_id)
|
753
|
->first();
|
753
|
->first();
|
754
|
- Log::info($typ_semester_outcome_id);
|
|
|
|
|
754
|
+// Log::info($typ_semester_outcome_id);
|
755
|
$outcome->comments = $outcome->getCommentsAttribute();
|
755
|
$outcome->comments = $outcome->getCommentsAttribute();
|
756
|
// $outcome->comments = "COMMENT";
|
756
|
// $outcome->comments = "COMMENT";
|
757
|
//Log::info("Comments");
|
757
|
//Log::info("Comments");
|
|
|
|
|
765
|
|
765
|
|
766
|
|
766
|
|
767
|
foreach ($outcome->objectives as $index => $objective) {
|
767
|
foreach ($outcome->objectives as $index => $objective) {
|
768
|
- Log::info("Ella son besties");
|
|
|
769
|
- Log::info(array($objective));
|
|
|
|
|
768
|
+// Log::info("Ella son besties");
|
|
|
769
|
+// Log::info(array($objective));
|
770
|
$objective->courses = Objective::getPlanReport($objective);
|
770
|
$objective->courses = Objective::getPlanReport($objective);
|
771
|
}
|
771
|
}
|
772
|
|
772
|
|
|
|
|
|
976
|
$typ_semester_outcome_id = Input::get('typ_outcome_semester_id');
|
976
|
$typ_semester_outcome_id = Input::get('typ_outcome_semester_id');
|
977
|
$comments = Input::get('comments');
|
977
|
$comments = Input::get('comments');
|
978
|
|
978
|
|
979
|
- Log::info(Input::all());
|
|
|
|
|
979
|
+// Log::info(Input::all());
|
980
|
|
980
|
|
981
|
if ($edit_id) {
|
981
|
if ($edit_id) {
|
982
|
DB::table('typ_outcome_report_comments')
|
982
|
DB::table('typ_outcome_report_comments')
|
|
|
|
|
1021
|
$pdf->save(app_path() . '/storage/annual_pdfs/' . date('d-m-Y') . '-for-' . $annualPlan->program->id . '.pdf');
|
1021
|
$pdf->save(app_path() . '/storage/annual_pdfs/' . date('d-m-Y') . '-for-' . $annualPlan->program->id . '.pdf');
|
1022
|
return $pdf->download(date('d-m-Y') . '-for-' . $annualPlan->program->id . '.pdf');
|
1022
|
return $pdf->download(date('d-m-Y') . '-for-' . $annualPlan->program->id . '.pdf');
|
1023
|
*/ //pdf = $pdf->setOrientation("landscape");
|
1023
|
*/ //pdf = $pdf->setOrientation("landscape");
|
1024
|
- Log::info("submit");
|
|
|
1025
|
- Log::info($submit);
|
|
|
|
|
1024
|
+// Log::info("submit");
|
|
|
1025
|
+// Log::info($submit);
|
1026
|
return View::make('local.managers.shared.print_annual_report', compact('annualPlan', 'submit'));
|
1026
|
return View::make('local.managers.shared.print_annual_report', compact('annualPlan', 'submit'));
|
1027
|
}
|
1027
|
}
|
1028
|
|
1028
|
|
|
|
|
|
1037
|
// ->setOrientation("landscape")
|
1037
|
// ->setOrientation("landscape")
|
1038
|
|
1038
|
|
1039
|
// ->setPaper('legal', 'landscape');
|
1039
|
// ->setPaper('legal', 'landscape');
|
1040
|
- $path = app_path() . '/views/annual_htmls/report-on-' . date('d-m-Y') . '-for-' . $annualPlan->program->id . '-by-' . $user_id . '.blade.php';
|
|
|
|
|
1040
|
+ $path = app_path() . '/views/annual_htmls/report-on-' . date('d-m-Y') .'ac'.$annualPlan->annual_cycle_id . '-for-' . $annualPlan->program->id . '-by-' . $user_id . '.blade.php';
|
1041
|
//$pdf->save($path);
|
1041
|
//$pdf->save($path);
|
1042
|
//$name = date('d-m-Y') . '-for-' . $annualPlan->program->id . '.pdf';
|
1042
|
//$name = date('d-m-Y') . '-for-' . $annualPlan->program->id . '.pdf';
|
1043
|
//$pdf->download($name);
|
1043
|
//$pdf->download($name);
|
|
|
|
|
1120
|
$path = DB::table('paths_for_annual_plans')->where('id', $path_id)->first();
|
1120
|
$path = DB::table('paths_for_annual_plans')->where('id', $path_id)->first();
|
1121
|
|
1121
|
|
1122
|
if (isset($path)) {
|
1122
|
if (isset($path)) {
|
1123
|
- Log::info($path->path_to_pdf);
|
|
|
1124
|
- Log::info(app_path()); //. "/views/annual_htmls/");
|
|
|
|
|
1123
|
+// Log::info($path->path_to_pdf);
|
|
|
1124
|
+// Log::info(app_path()); //. "/views/annual_htmls/");
|
1125
|
|
1125
|
|
1126
|
|
1126
|
|
1127
|
//FALTA COMO HACER PAl REPORT.
|
1127
|
//FALTA COMO HACER PAl REPORT.
|
|
|
|
|
1141
|
$path = str_replace(app_path() . '/views/annual_htmls/', '', $path->path_to_pdf);
|
1141
|
$path = str_replace(app_path() . '/views/annual_htmls/', '', $path->path_to_pdf);
|
1142
|
|
1142
|
|
1143
|
|
1143
|
|
1144
|
-
|
|
|
1145
|
-
|
|
|
1146
|
-
|
|
|
1147
|
$path = trim($path, ".blade.php");
|
1144
|
$path = trim($path, ".blade.php");
|
1148
|
$dir = '';
|
1145
|
$dir = '';
|
1149
|
|
1146
|
|
|
|
|
|
1218
|
public function checkIfPlanReady()
|
1215
|
public function checkIfPlanReady()
|
1219
|
{
|
1216
|
{
|
1220
|
$annual_plan = AnnualPlan::findOrFail(Input::get("annual_id"));
|
1217
|
$annual_plan = AnnualPlan::findOrFail(Input::get("annual_id"));
|
1221
|
- Log::info('annual_plan' . $annual_plan->courses);
|
|
|
|
|
1218
|
+// Log::info('annual_plan' . $annual_plan->courses);
|
1222
|
|
1219
|
|
1223
|
/*
|
1220
|
/*
|
1224
|
error = [
|
1221
|
error = [
|
|
|
|
|
1229
|
*/
|
1226
|
*/
|
1230
|
$error_array = [];
|
1227
|
$error_array = [];
|
1231
|
|
1228
|
|
1232
|
- Log::info("Esto devuelve?");
|
|
|
|
|
1229
|
+// Log::info("Esto devuelve?");
|
1233
|
|
1230
|
|
1234
|
- Log::info($annual_plan->courses);
|
|
|
|
|
1231
|
+// Log::info($annual_plan->courses);
|
1235
|
|
1232
|
|
1236
|
foreach ($annual_plan->courses as $index => $course) {
|
1233
|
foreach ($annual_plan->courses as $index => $course) {
|
1237
|
|
1234
|
|
1238
|
- Log::info('paired Criteria');
|
|
|
1239
|
- Log::info($course->paired_criteria);
|
|
|
|
|
1235
|
+// Log::info('paired Criteria');
|
|
|
1236
|
+// Log::info($course->paired_criteria);
|
1240
|
if (count($course->paired_criteria) <= 0) {
|
1237
|
if (count($course->paired_criteria) <= 0) {
|
1241
|
$outcome = $course->paired_objective->paired_outcome;
|
1238
|
$outcome = $course->paired_objective->paired_outcome;
|
1242
|
$objective = $course->paired_objective;
|
1239
|
$objective = $course->paired_objective;
|
|
|
|
|
1283
|
'courses' => [],
|
1280
|
'courses' => [],
|
1284
|
'outcomes' => []
|
1281
|
'outcomes' => []
|
1285
|
];
|
1282
|
];
|
1286
|
- Log::info($annual_plan->courses_with_transformative_actions);
|
|
|
|
|
1283
|
+// Log::info($annual_plan->courses_with_transformative_actions);
|
1287
|
foreach ($annual_plan->courses_with_transformative_actions as $course) {
|
1284
|
foreach ($annual_plan->courses_with_transformative_actions as $course) {
|
1288
|
|
1285
|
|
1289
|
foreach ($course->proposed_transformative_actions as $ta) {
|
1286
|
foreach ($course->proposed_transformative_actions as $ta) {
|
|
|
|
|
1331
|
{
|
1328
|
{
|
1332
|
$alphabet = range("A", "Z");
|
1329
|
$alphabet = range("A", "Z");
|
1333
|
$annualPlan = AnnualPlan::findOrFail($annual_id);
|
1330
|
$annualPlan = AnnualPlan::findOrFail($annual_id);
|
|
|
1331
|
+ Log::info(json_encode($annualPlan));
|
|
|
1332
|
+ $temp=$annualPlan->getCoursesAttribute();
|
|
|
1333
|
+ Log::info("cursos plan");
|
|
|
1334
|
+ Log::info(json_encode($temp));
|
|
|
1335
|
+ Log::info("termina cursos plan");
|
|
|
1336
|
+
|
1334
|
$small_alphabet = range('a', 'z');
|
1337
|
$small_alphabet = range('a', 'z');
|
1335
|
return View::make('local.managers.shared.print_annual_plan', compact('annualPlan', 'alphabet', 'small_alphabet', 'submit'));
|
1338
|
return View::make('local.managers.shared.print_annual_plan', compact('annualPlan', 'alphabet', 'small_alphabet', 'submit'));
|
1336
|
}
|
1339
|
}
|
|
|
|
|
1340
|
$alphabet = range("A", "Z");
|
1343
|
$alphabet = range("A", "Z");
|
1341
|
$small_alphabet = range('a', 'z');
|
1344
|
$small_alphabet = range('a', 'z');
|
1342
|
$annualPlan = AnnualPlan::findOrFail($annual_id);
|
1345
|
$annualPlan = AnnualPlan::findOrFail($annual_id);
|
|
|
1346
|
+// Log::info(json_encode($annualPlan));
|
|
|
1347
|
+// Log::info($annualPlan->annual_cycle_id);
|
1343
|
$user_id = Auth::user()->id;
|
1348
|
$user_id = Auth::user()->id;
|
1344
|
//$pdf = new PDF(app('config'), app("Filesystem"), app('view'), '/storage/plan_pdf');
|
1349
|
//$pdf = new PDF(app('config'), app("Filesystem"), app('view'), '/storage/plan_pdf');
|
1345
|
//$pdf = $pdf->loadView('local.managers.shared.print_annual_plan', compact('annualPlan', 'alphabet', 'small_alphabet'))
|
1350
|
//$pdf = $pdf->loadView('local.managers.shared.print_annual_plan', compact('annualPlan', 'alphabet', 'small_alphabet'))
|
1346
|
// ->setOrientation("landscape")
|
1351
|
// ->setOrientation("landscape")
|
1347
|
|
1352
|
|
1348
|
// ->setPaper('legal', 'landscape');
|
1353
|
// ->setPaper('legal', 'landscape');
|
1349
|
- $path = app_path() . '/views/annual_htmls/plan-on-' . date('d-m-Y') . '-for-' . $annualPlan->program->id . '-by-' . $user_id . '.blade.php';
|
|
|
|
|
1354
|
+ $path = app_path() . '/views/annual_htmls/plan-on-' . date('d-m-Y') .'ac'.$annualPlan->annual_cycle_id . '-for-' . $annualPlan->program->id . '-by-' . $user_id . '.blade.php';
|
1350
|
//$pdf->save($path);
|
1355
|
//$pdf->save($path);
|
1351
|
- $name = "plan-on-" . date('d-m-Y') . '-for-' . $annualPlan->program->id . '.blade.php';
|
|
|
|
|
1356
|
+ $name = "plan-on-" . date('d-m-Y') .'ac'.$annualPlan->annual_cycle_id .'-for-' . $annualPlan->program->id . '.blade.php';
|
1352
|
//$pdf->download($name);
|
1357
|
//$pdf->download($name);
|
1353
|
|
1358
|
|
1354
|
//is a path already there
|
1359
|
//is a path already there
|
|
|
|
|
1356
|
$it_exists = DB::table("paths_for_annual_plans")
|
1361
|
$it_exists = DB::table("paths_for_annual_plans")
|
1357
|
->where('path_to_pdf', $path)
|
1362
|
->where('path_to_pdf', $path)
|
1358
|
->first();
|
1363
|
->first();
|
1359
|
-
|
|
|
|
|
1364
|
+// Log::info(
|
1360
|
if (isset($it_exists)) {
|
1365
|
if (isset($it_exists)) {
|
1361
|
return '200';
|
1366
|
return '200';
|
1362
|
}
|
1367
|
}
|