@extends('layouts.master') @section('navigation') @if(Auth::user()->role==1) @include('local.managers.admins._navigation') @elseif(Auth::user()->role==2) @include('local.managers.sCoords._navigation') @elseif(Auth::user()->role==3) @include('local.managers.pCoords._navigation') @endif @stop @section('main')
@if(!$plan->is_submitted) @if(date('Y-m-d') <= $plan->quinquennium->five_year_plan_due_date) Note: This plan is saved as a draft. Remember to submit it by {{ date('F d', strtotime($plan->quinquennium->five_year_plan_due_date)) }}. After the due date, unsubmitted drafts will not be considered.

{{ Form::open(array('action'=>'FiveYearPlansController@update', 'class'=>"form-inline")) }} Edit MS Word Back to Five Year Plans {{ Form::close() }}
@else Note: This plan was not submitted on time. @endif @else Note: This plan was submitted on {{ date('F j, Y', strtotime($plan->submitted_on)) }}
@if(date('Y-m-d') < $plan->quinquennium->five_year_plan_due_date)
Revert Submission @endif

@endif
@foreach($plan->fypParts as $mini_plan)
@foreach($mini_plan->fypPartOutcomes as $index => $outcome) @if($index == 0) @else @endif @endforeach
Academic Year Learning Outcome to be assessed Learning Objectives Courses to use for assessment
{{ $mini_plan->year_start }}-{{ $mini_plan->year_end }} {{ $outcome->outcome->name }}
    @foreach(json_decode($outcome->objectives) as $objective)
  • {{ $objective->text }}
  • @endforeach
    @foreach(json_decode($outcome->courses) as $course)
  • {{ $course->code }}{{ $course->number }}: {{ $course->name }}
  • @endforeach

@endforeach

This summary is automatically generated using the information from the Full Plan. Any changes to the plan will be reflected here.

@foreach($plan->fypParts as $mini_plan) @endforeach @foreach($outcomes as $outcome) @foreach($plan->fypParts as $mini_plan) @if($mini_plan->willAssessOutcome($outcome->id)) @else @endif @endforeach @endforeach
Learning Outcome{{ $mini_plan->year_start }}-{{ $mini_plan->year_end }}
{{ $outcome->name }}
@if(!$plan->is_submitted) @if(date('Y-m-d') <= $plan->quinquennium->five_year_plan_due_date)

{{ Form::open(array('action'=>'FiveYearPlansController@update', 'class'=>"form-inline")) }} Edit MS Word Back to Five Year Plans {{ Form::close() }}
@else Note: This plan was not submitted on time. @endif @else Note: This plan was submitted on {{ date('F j, Y', strtotime($plan->submitted_on)) }}
@if(date('Y-m-d') < $plan->quinquennium->five_year_plan_due_date)
Revert Submission @endif

@endif
@stop @section('included-js') @stop @section('javascript') // -------------------------------------------------------------------------- // Page Load // -------------------------------------------------------------------------- $('.datatable').DataTable( { "searching": false, "paging": false, "ordering": false, "info": false }); // -------------------------------------------------------------------------- // Events // -------------------------------------------------------------------------- $('.pdf').on('click', function(e) { e.preventDefault(); console.log('start'); var doc = new jsPDF('l', 'pt'); doc.setFontSize(10); doc.text("From HTML", 40, 50); var columns = ['Academic Year', 'Learning Outcome to be assessed', 'Learning Objectives', 'Courses to use for assessment']; $('table').each(function(index, value) { if(index != 0 ) { doc.addPage(); } console.log('start table'); var rows = new Array(); var table = $(this); var disp_table = new Object(); disp_table.columns = columns; // Iterate tables table.find('tbody tr').each(function(index, value) { console.log('row: '+(index+1)); var tr = $(this); var row = new Array(); var academic_year = tr.find(':nth-child(1)').html(); var outcome = $.trim(tr.find(':nth-child(2)').html()); var objectives_dom = tr.find(':nth-child(3)'); var courses_dom = tr.find(':nth-child(4)'); var objectives = new Array(); var courses = new Array(); objectives_dom.find('.objective').each(function() { objectives.push('• '+$.trim($(this).text())); }); courses_dom.find('.course').each(function() { courses.push('• '+$.trim($(this).text())); }); console.log(academic_year); console.log(outcome); console.log(objectives); console.log(courses); row.push(academic_year); row.push(outcome); row.push(jQuery.extend([], objectives)); row.push(jQuery.extend([], courses)); rows.push(jQuery.extend([], row)); disp_table.rows = jQuery.extend([], rows); console.log('end row: '+(index+1)); }); console.log(disp_table); doc.autoTable(columns, rows, { theme: "grid", styles: { overflow: 'linebreak' }, drawCell: function (cell, data) { console.log('CELL DRAW START'); console.log(cell); if (data.column.index == 2 || data.column.index == 3) { doc.rect(cell.x, cell.y, cell.width, cell.height, 'S'); doc.text(cell.raw, cell.x + 5, cell.y + 12); console.log('CELL DRAW END'); return false; } console.log('CELL DRAW END'); return true; } }); console.log('end table'); }); //doc.save(); return; }); // -------------------------------------------------------------------------- // Functions // -------------------------------------------------------------------------- @stop