Nav apraksta

printrubric.blade.php 3.5KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176
  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. echo '<style type="text/css" media="print">
  82. @page { size: landscape; }
  83. </style>';
  84. ?>
  85. <img class="logo" src="{{ asset('images/logo_uprrp_bw.png') }}" alt="UPRRP Logo">
  86. <div class="header"><p class="header-text">University of Puerto Rico, Río Piedras Campus</p>
  87. <p class="header-text">Online Learning Assessment System</p>
  88. <p class="header-text">{{$course->program->name}} Program</p>
  89. <p class="header-text">{{{ $course->code }}} {{{ $course->number }}} - {{$course->name}}</p>
  90. <h1 class="header-text">Assessment Rubric </h1></div>
  91. <span>Rubric: {{{ $rubric->name}}}</span><br>
  92. <span>Activity: {{{ $activity->name}}} </span><br>
  93. <span>Passing Criteria:
  94. <span id="expected_percentage">{{{ $rubric->expected_percentage }}}% of students must obtain at least </span>
  95. <span id="expected_points">{{{$rubric->expected_points}}}</span> points
  96. </span><br><br>
  97. <table class="table table-striped table-condensed">
  98. <thead>
  99. <tr>
  100. <th></th>
  101. <th>Criterion</th>
  102. <th>Beginning (1-2)</th>
  103. <th>In Progress (3-4)</th>
  104. <th>Good (5-6)</th>
  105. <th>Excellent (7-8)</th>
  106. <th>Learning Outcome</th>
  107. <th>Copyright</th>
  108. <th>Notes</th>
  109. </tr>
  110. </thead>
  111. <tbody>
  112. @foreach(json_decode($rubric->contents) as $index => $criterion)
  113. <tr>
  114. <td>{{ $index + 1 }}.</td>
  115. <td>
  116. {{{ $criterion->name }}}
  117. @if(property_exists($criterion, 'subcriteria'))
  118. <ul class="list-unstyled">
  119. @foreach($criterion->subcriteria as $subcriterion)
  120. <li>{{ $subcriterion }}</li>
  121. @endforeach
  122. </ul>
  123. @endif
  124. </td>
  125. <td>{{ nl2br($criterion->description12) }}</td>
  126. <td>{{ nl2br($criterion->description34) }}</td>
  127. <td>{{ nl2br($criterion->description56) }}</td>
  128. <td>{{ nl2br($criterion->description78) }}</td>
  129. <td>{{ Outcome::where('id', $criterion->outcome_id)->first()->name }}</td>
  130. <td>
  131. @if($criterion->copyright)
  132. {{{ $criterion->copyright }}}
  133. @endif
  134. </td>
  135. <td>
  136. @if($criterion->notes)
  137. {{{ $criterion->notes }}}
  138. @endif
  139. </td>
  140. </tr>
  141. @endforeach
  142. </tbody>
  143. </table>
  144. <?
  145. echo '</body>';
  146. echo '</html>';
  147. ?>
  148. <script type="text/javascript">
  149. window.print();
  150. </script>