暫無描述

print_rubric.blade.php 3.5KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185
  1. <?php
  2. echo '<html>';
  3. echo '<body>';
  4. //Inline styles (only for printing)
  5. echo
  6. '<style type="text/css">
  7. body
  8. {
  9. font-family: "Arial", sans-serif;
  10. width:90%;
  11. margin: 0 auto;
  12. }
  13. .header-text
  14. {
  15. text-align:center;
  16. font-weight: bold;
  17. margin:0;
  18. }
  19. h1.header-text
  20. {
  21. margin: 15px auto;
  22. width:75%;
  23. font-size: 25px;
  24. }
  25. table
  26. {
  27. border-collapse: collapse;
  28. border: 1px solid black;
  29. width: 100%;
  30. margin: 30px auto;
  31. font-size:1.5vw;
  32. }
  33. td, th
  34. {
  35. border: 1px solid black;
  36. padding: 5px;
  37. }
  38. .activity-name-row
  39. {
  40. background:black;
  41. color:white;
  42. }
  43. .activity-headers-row
  44. {
  45. background:lightgrey;
  46. font-weight:bold;
  47. }
  48. .report-info
  49. {
  50. margin:5px 0;
  51. font-size: 16px;
  52. }
  53. .criterion-field
  54. {
  55. text-align:left;
  56. }
  57. .score-field, .total, .percentage
  58. {
  59. text-align:center;
  60. }
  61. .header
  62. {
  63. margin: 30px 0;
  64. }
  65. .content
  66. {
  67. font-size: 12px;
  68. }
  69. .logo
  70. {
  71. position:absolute;
  72. right:0;
  73. top: 30px;
  74. width: 100px;
  75. }
  76. ul{
  77. list-style-type:none;
  78. }
  79. @media print{@page {size: landscape}}
  80. </style>';
  81. ?>
  82. <img class="logo" src="{{ asset('images/logo_uprrp_bw.png') }}" alt="UPRRP Logo">
  83. <div class="header">
  84. <p class="header-text">University of Puerto Rico, Río Piedras Campus</p>
  85. <p class="header-text">Online Learning Assessment System</p>
  86. <h1 class="header-text">{{{ $template->name}}}</h1>
  87. </div>
  88. <div class="content">
  89. <p class="report-info">School: {{ $school }}</p>
  90. <p class="report-info">Program: {{ $program }}</p>
  91. <p class="report-info">Passing Criteria:
  92. <span id="expected_percentage">{{{ $template->expected_percentage }}}% of students must obtain at least </span>
  93. <span id="expected_points">{{{$template->expected_points}}}</span> points
  94. </p>
  95. <p class="report-info">Last modified on: {{ date('F d, Y h:i:s a', strtotime($template->updated_at)) }}</p>
  96. </div>
  97. <table class="table table-striped table-condensed">
  98. <thead>
  99. <tr>
  100. <th></th>
  101. <th>Criterion</th>
  102. @foreach($template->titles as $i=>$title)
  103. <th>{{$title}} ({{1+($i*($template->max_score/$template->num_scales))}}-{{(1+$i)*($template->max_score/$template->num_scales)}})</th>
  104. @endforeach
  105. <th>Learning Outcome</th>
  106. <th>Copyright</th>
  107. <th>Notes</th>
  108. </tr>
  109. </thead>
  110. <tbody>
  111. @foreach($template_criterion as $index => $criterion)
  112. <tr>
  113. <td>{{ $index + 1 }}.</td>
  114. <td>
  115. {{{ $criterion->name }}}
  116. @if($criterion->subcriteria)
  117. <ul class="list-unstyled">
  118. @foreach(json_decode($criterion->subcriteria) as $subcriterion)
  119. <li>{{ $subcriterion }}</li>
  120. @endforeach
  121. </ol>
  122. @endif
  123. </td>
  124. @foreach($criterion->scales as $index=>$description)
  125. <td>{{{ $description }}}</td>
  126. @endforeach
  127. <td>
  128. <ol>
  129. @foreach($criterion->outcomes as $outcome)
  130. <li>{{$outcome}}</li>
  131. @endforeach
  132. </ol>
  133. </td>
  134. <td>
  135. @if($criterion->copyright)
  136. {{{ $criterion->copyright }}}
  137. @endif
  138. </td>
  139. <td>
  140. @if($criterion->notes)
  141. {{{ $criterion->notes }}}
  142. @endif
  143. </td>
  144. </tr>
  145. @endforeach
  146. </tbody>
  147. </table>
  148. <?php
  149. echo '</body>';
  150. echo '</html>';
  151. ?>
  152. <script type="text/javascript">
  153. window.print();
  154. </script>