No Description

print_student_report.blade.php 4.5KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190
  1. <?php
  2. echo '<html>';
  3. echo '<body>';
  4. //Inline styles (only for printing)
  5. echo
  6. '<style>
  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 0;
  22. }
  23. table
  24. {
  25. border-collapse: collapse;
  26. border: 1px solid black;
  27. width: 100%;
  28. margin: 30px auto;
  29. }
  30. td, th
  31. {
  32. border: 1px solid black;
  33. padding: 5px;
  34. }
  35. .activity-name-row
  36. {
  37. background:black;
  38. color:white;
  39. }
  40. .activity-headers-row
  41. {
  42. background:lightgrey;
  43. font-weight:bold;
  44. }
  45. .active
  46. {
  47. background:lightgrey;
  48. }
  49. .report-info
  50. {
  51. margin:5px 0;
  52. font-size: 16px;
  53. }
  54. .criterion
  55. {
  56. width:45%;
  57. }
  58. .score
  59. {
  60. width:10%;
  61. text-align:center;
  62. }
  63. .reason
  64. {
  65. width:45%;
  66. }
  67. .header
  68. {
  69. margin: 30px 0;
  70. }
  71. .content
  72. {
  73. font-size: 12px;
  74. }
  75. .logo
  76. {
  77. position:absolute;
  78. right:0;
  79. top: 30px;
  80. width: 100px;
  81. }
  82. </style>';
  83. ?>
  84. <img class="logo" src="{{ asset('images/logo_uprrp_bw.png') }}" alt="UPRRP Logo">
  85. <div class="header">
  86. <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. <h1 class="header-text">Student Report </h1>
  90. </div>
  91. <div class="content">
  92. <p class="student-name report-info">Student Name: {{{ $student->name}}}</p>
  93. <p class="report-info">Number: {{{ substr($student->number, 0, 3)}}}-{{{substr($student->number, 3, 2)}}}-{{{substr($student->number, 5, 4)}}}</p>
  94. <p class="report-info">Course: {{{ $course->code }}} {{{ $course->number }}}-{{{ $course->section }}} - {{$course->name}}</p>
  95. <p class="report-info">Professor: {{{ $course->user->surnames }}}, {{{ $course->user->first_name }}} </p>
  96. <p class="report-info">Report Date: {{ date('M/d/Y')}}</p>
  97. </div>
  98. @if($assessments!=NULL)
  99. @foreach($assessments as $activity_id => $activity)
  100. <?php
  101. //$activity = Activity::find($assessment->activity_id);
  102. // Used to get custom rubric criterion indicators
  103. // $rubric_contents = json_decode(Rubric::find($activity->rubric_id)->contents, true);
  104. ?>
  105. <div class="panel panel-default">
  106. <div class="panel-heading">
  107. <h3 class="panel-title">{{ $assessments[$activity_id]['activity'] }}</h3>
  108. </div>
  109. <div class="panel-body">
  110. <table class="table table-striped table-condensed">
  111. <thead>
  112. <tr>
  113. <th class="col-md-4">Criterion</th>
  114. <th class="col-md-2">Score</th>
  115. <th class="col-md-6">Reason</th>
  116. </tr>
  117. </thead>
  118. <tbody>
  119. <?php
  120. //$scores = json_decode($assessment->scores, true);
  121. ?>
  122. @foreach($assessments[$activity_id]["criteria"] as $activity_criterion_id => $criteria)
  123. <tr>
  124. <td>{{{ $criteria->name }}}</td>
  125. <td>{{{$assessments[$activity_id]["score"][$activity_criterion_id]}}}</td>
  126. <td>
  127. @if($assessments[$activity_id]['score'][$activity_criterion_id] != 0 || $assessments[$activity_id]['score'][$activity_criterion_id] !="N/A")
  128. {{ $assessments[$activity_id]['explication'][$activity_criterion_id] }}
  129. @else
  130. There is not enough information to assess this criterion, or the student did not complete the required work.
  131. @endif
  132. </td>
  133. </tr>
  134. @endforeach
  135. </tbody>
  136. </table>
  137. <p class="lead"><strong>Percentage:</strong> {{ $assessments[$activity_id]['percentage'] }}%</p>
  138. <p class="lead"><strong>Comments:</strong> {{ $assessments[$activity_id]['comments']}}</p>
  139. </div>
  140. </div>
  141. @endforeach
  142. @else
  143. <p class="lead">No activities have been assessed.</p>
  144. @endif
  145. <?php
  146. echo '</body>';
  147. echo '</html>';
  148. ?>
  149. <script type="text/javascript">
  150. window.print();
  151. </script>