暂无描述

printrubric.blade.php 3.6KB

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. 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. @foreach($rubric->titles as $position => $text)
  103. <th>{{$text}} ({{1+ ($position*($rubric->max_score/$rubric->num_scales))}}-{{(1+$position)*($rubric->max_score/$rubric->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($rubric_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. </ul>
  122. @endif
  123. </td>
  124. @foreach(json_decode($criterion->scales) as $index2 => $description)
  125. <td>{{ nl2br($description) }}</td>
  126. @endforeach
  127. <td>
  128. <ol>
  129. @foreach(json_decode($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>