No Description

print_annual_plan.blade.php 8.5KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312
  1. <?php
  2. echo '<html>';
  3. echo '<body>';
  4. //Inline styles (only for printing)
  5. echo '<style type="text/css">
  6. body
  7. {
  8. font-family: "Arial", sans-serif;
  9. width:90%;
  10. margin: 0 auto;
  11. }
  12. .header-text
  13. {
  14. text-align:center;
  15. font-weight: bold;
  16. margin:0;
  17. }
  18. .outcome-text
  19. {
  20. text-align:left;
  21. font-weight: bold;
  22. margin:0;
  23. }
  24. h1.header-text
  25. {
  26. margin: 15px auto;
  27. width:75%;
  28. font-size: 25px;
  29. }
  30. table
  31. {
  32. border-collapse: collapse;
  33. border: 1px solid black;
  34. width: 100%;
  35. margin: 30px auto;
  36. font-size:1.5vw;
  37. }
  38. td, th
  39. {
  40. border: 1px solid black;
  41. padding: 5px;
  42. }
  43. .activity-name-row
  44. {
  45. background:black;
  46. color:white;
  47. }
  48. .activity-headers-row
  49. {
  50. background:lightgrey;
  51. font-weight:bold;
  52. }
  53. .report-info
  54. {
  55. margin:5px 0;
  56. font-size: 16px;
  57. }
  58. .criterion-field
  59. {
  60. text-align:left;
  61. }
  62. .score-field, .total, .percentage
  63. {
  64. text-align:center;
  65. }
  66. .header
  67. {
  68. margin: 30px 0;
  69. }
  70. .content
  71. {
  72. font-size: 12px;
  73. }
  74. .logo
  75. {
  76. position:absolute;
  77. right:0;
  78. top: 30px;
  79. width: 100px;
  80. }
  81. ul{
  82. list-style-type:none;
  83. }
  84. @media print{@page {size: landscape}}
  85. .outcome-header{
  86. text-align:left
  87. }
  88. hr{
  89. border-block-color: black
  90. }
  91. .course-title {
  92. text-align:center;
  93. font-weight:bold;
  94. }
  95. </style>';
  96. echo '<style type="text/css" media="print">
  97. @page { size: landscape; }
  98. </style>';
  99. ?>
  100. <img class="logo" src="{{ asset('images/logo_uprrp_bw.png') }}" alt="UPRRP Logo">
  101. <div class="header">
  102. <p class="header-text">University of Puerto Rico, Río Piedras Campus</p>
  103. <p class="header-text">Online Learning Assessment System</p>
  104. <p class="header-text">{{ $annualPlan->program->name }} Program Report</p>
  105. <h1 class="header-text">Academic Year {{ $annualPlan->annual_cycle->academic_year }} </h1>
  106. </div>
  107. @foreach ($annualPlan->outcomes as $outcome)
  108. <h1 class="outcome-header">{{ $outcome->name }} <sub>(Semester
  109. {{ Semester::find($outcome->semester_id)->code }})</sub></h1>
  110. <hr>
  111. <p class="outcome-text">Target to achieve the learning outcome: {{ $outcome->expected_outcome }} or more of
  112. the
  113. attempts</p>
  114. <p class="outcome-text">Expected percent of students achieving the target by learning outcome:
  115. {{ $outcome->expected_target }}%
  116. <hr>
  117. <table class="table table-striped table-condensed">
  118. <thead>
  119. <tr>
  120. <th>
  121. Objectives for Courses
  122. </th>
  123. <th>
  124. Courses and Criteria
  125. </th>
  126. <th>
  127. Transformative Actions to be Implemented
  128. </th>
  129. </tr>
  130. </thead>
  131. <tbody>
  132. @foreach ($outcome->annual_objectives as $index => $objective)
  133. <tr>
  134. <td>
  135. {{ $alphabet[$index] }}. {{ $objective->text }}
  136. </td>
  137. <td>
  138. <ol type="1">
  139. @foreach ($objective->grouped_annual_course as $index2 => $course_code)
  140. <li>
  141. <p>{{ $course_code->code }}-{{ $course_code->number }}</p>
  142. <ol type="a">
  143. @foreach ($course_code->paired_criteria as $index3 => $criterion)
  144. <li>
  145. {{ $criterion->name }}
  146. </li>
  147. @endforeach
  148. </ol>
  149. @if (count($objective->grouped_annual_course) > $index2 + 1)
  150. <hr style="margin-left:-40px">
  151. @endif
  152. </li>
  153. @endforeach
  154. </ol>
  155. </td>
  156. <td>
  157. <ol type="1">
  158. @foreach ($objective->grouped_annual_course as $index2 => $course_code)
  159. @if (count($course_code->proposed_transformative_actions) > 0)
  160. <li>
  161. <p>{{ $course_code->code }}-{{ $course_code->number }}</p>
  162. <ol type="a">
  163. @foreach ($course_code->proposed_transformative_actions as $index3 => $trans)
  164. <li>
  165. <p><strong>{{ $trans->at_text }}:
  166. </strong>{{ $trans->description }}</p>
  167. </li>
  168. @endforeach
  169. </ol>
  170. <hr style="margin-left:-40px">
  171. @if (count($objective->grouped_annual_course) != $index2 + 1)
  172. <hr style="margin-left:-40px">
  173. @endif
  174. @endif
  175. @endforeach
  176. </ol>
  177. </td>
  178. </tr>
  179. @endforeach
  180. </tbody>
  181. </table>
  182. @if (count($outcome->program_transformative_actions) > 0)
  183. <h2>Program Transformative Actions</h2>
  184. <hr>
  185. <table class="table table-striped table-condensed">
  186. <thead>
  187. <tr>
  188. <th></th>
  189. <th>Transformative Action</th>
  190. <th>Category</th>
  191. </tr>
  192. </thead>
  193. <tbody>
  194. @foreach ($outcome->program_transformative_actions as $index => $ta)
  195. <tr>
  196. <td>{{ $index + 1 }}.</td>
  197. <td>
  198. <strong>{{ $ta->at_text }}: </strong>{{ $ta->description }}
  199. </td>
  200. <td>
  201. {{ $ta->type_of_TA }}
  202. </td>
  203. </tr>
  204. @endforeach
  205. </tbody>
  206. </table>
  207. <hr>
  208. @endif
  209. @endforeach
  210. {{-- @foreach ($outcome->program_transformative_actions as $trans)
  211. <li>
  212. <h2><strong>{{ $trans->at_text }}: {{ $trans->description }}</strong></h2>
  213. @if (isset($trans->status))
  214. <p><strong>Results: </strong>{{ $trans->status->results }}</p>
  215. <p><strong>Was this helpful to achieve the learning expectation? </strong>
  216. @if ($trans->status->it_was_useful == 1)
  217. Yes
  218. @else
  219. No
  220. @endif
  221. </p>
  222. <p><strong>Explain briefly details about the implementation: </strong>
  223. {{ $trans->status->comments }}
  224. </p>
  225. @else
  226. <p><strong>Please submit the results </strong>
  227. @endif
  228. </li>
  229. @endforeach
  230. </ol> --}}
  231. <?php
  232. echo '</body>';
  233. echo '</html>';
  234. ?>
  235. <script type="text/javascript">
  236. @if(!isset($submit))
  237. window.print();
  238. </script>
  239. @else
  240. window.close();
  241. </script>
  242. <?php
  243. $path = app_path() . '/views/annual_htmls/plan-on-' . date('d-m-Y') .'ac'.$annualPlan->annual_cycle_id . '-for-' . $annualPlan->program->id . '-by-' . Auth::user()->id . '.blade.php';
  244. $ob = ob_get_contents();
  245. $ob = str_replace("window.close();", '', $ob);
  246. file_put_contents($path, $ob);
  247. ob_end_flush();
  248. ?>
  249. @endif