PageRenderTime 5478ms CodeModel.GetById 28ms RepoModel.GetById 2ms app.codeStats 0ms

/WebContent/modules/monitor/monitor.jsp

https://github.com/zigama/ESRMS
JavaServer Pages | 285 lines | 246 code | 38 blank | 1 comment | 4 complexity | 827683950089914d767bd4c33205145b MD5 | raw file
  1. <%@ taglib uri="http://java.sun.com/jsp/jstl/core" prefix="c"%>
  2. <%@ include file="/includes/header.jsp" %>
  3. <script language="javascript">
  4. function deroulement(selection,op,path){
  5. if(confirm("Are you sure you want to "+op+" ?"))
  6. window.location=path;
  7. }
  8. function PassCheck(form1)
  9. {
  10. if(form1.regno.value=="")
  11. {
  12. alert("Error occured please contact the school!.");
  13. window.location.href="localhost:8080/ESRMS";
  14. return false;
  15. }
  16. else
  17. {
  18. form1.submit();
  19. }
  20. }
  21. //User autocomplete
  22. $().ready(function() {
  23. function formatItem(row) {
  24. return "<tr><td width=90>" + row[0] + "</td><td width=90>" + row[1] + "</td><td width=90>" + row[2] + "</td><td width=90>" + row[3] + "</td><td width=90>" + row[4] + "</td></tr>";
  25. }
  26. function formatResult(row) {
  27. return row[0].replace(/(<.+?>)/gi, '');
  28. }
  29. $("#userName,#username").autocomplete('search.user', {
  30. width: 600,
  31. multiple: false,
  32. matchContains: true,
  33. formatItem: formatItem,
  34. formatResult: formatResult
  35. });
  36. }); // end of initialization
  37. </script>
  38. <table width="98%" border="0" cellspacing="0" cellpadding="0" align="center">
  39. <tr><td>
  40. <table width="100%" border="0" cellspacing="0" cellpadding="0">
  41. <tr>
  42. <td width="4%" style="border-bottom:#CCCCCC 1px solid;border-top:#CCCCCC 1px solid;border-left:#CCCCCC 1px solid; padding-left:10px;"><a href="index.htm?mdl=monitor&edit=all&sid" class="Mod"><img src="./images/monitor.jpg" border="0"></a></td>
  43. <td width="60%" height="50" style="border-bottom:#CCCCCC 1px solid;border-top:#CCCCCC 1px solid;"><div align="left" class="ModName">Student performance and developmental progress</div></td>
  44. <td width="30%" style="border-bottom:#CCCCCC 1px solid;border-top:#CCCCCC 1px solid;" valign="middle" >
  45. <b><font color=#f38943><c:if test="${success!=''}"><script language="javascript">
  46. var success='${success}';
  47. if(success!=''){
  48. alert(success);
  49. }
  50. </script></c:if></font></b></td>
  51. <td width="6%" style="border-bottom:#CCCCCC 1px solid;border-right:#CCCCCC 1px solid;border-top:#CCCCCC 1px solid;"><div align="center"><a href="index.htm?mdl=Logged&sid" class="Mod"><img src="./images/cancel.png" border="0"><br>Close</a></div></td>
  52. </tr>
  53. </table>
  54. </td></tr>
  55. <tr><td style="padding-top:2px;">
  56. <%
  57. if(request.getParameter("mdl").equals("monitor")){%>
  58. <div align="center"><table border="0" width="100%" class="listingTable">
  59. <tr><td>
  60. <form name="form1" action="index.htm?mdl=monitor&username=${myLoggedUser.userName }&view=all&sid" method="POST" autocomplete="off">
  61. <table border=0 width="500" cellpadding="0" cellspacing="0" align="center" bgcolor="#FFFCCC" style="border:groove #FFFCCC 2px;">
  62. <tr><td colspan="6" align="center" height="30" bgcolor="#FFEECC"><strong>Specify a period</strong></td>
  63. </tr>
  64. <tr>
  65. <td colspan="2" style="padding-left:5px;">
  66. Academic Year: </td>
  67. <td colspan="4"> <select name="yearname" id="yearname" >
  68. <option selected="selected">Select Academic Year...</option>
  69. <c:forEach items="${years}" var="year" varStatus="optStatus">
  70. <option value="${year.yearName}" >${year.yearName}</option>
  71. </c:forEach>
  72. </select></td>
  73. </tr>
  74. <tr>
  75. <td colspan="2" style="padding-left:5px;">
  76. Session: </td>
  77. <td colspan="4"> <select name="sessions" id="sessions" >
  78. <option selected="selected">Select Session...</option>
  79. <c:forEach items="${sessions}" var="session" varStatus="optStatus">
  80. <option value="${session.sessionID}">${session.sessionName}</option>
  81. </c:forEach>
  82. </select></td>
  83. </tr>
  84. <tr><td colspan="6" align="center"><input type="hidden" name="regno" id="regno" value="${studentRegNO}" /><input name="ViewProgress" type="button" value="Show Now" class="button" onClick="return PassCheck(this.form);">&nbsp;&nbsp;||&nbsp;&nbsp;<input name="rst" type="reset" value="Reset" class="button"></td>
  85. </tr>
  86. </table> </td>
  87. </tr>
  88. </form></td>
  89. </tr>
  90. <%if( request.getParameter("view").equals("all")){ %>
  91. <tr>
  92. <td height="21" colspan="4" align="center">
  93. <div class="TabView" id="TabView">
  94. <!-- *** Tabs ************************************************************** -->
  95. <div class="Tabs" style="width: 700px;">
  96. <a>Score&frasl;Results</a><a>Attendance</a><a>Discipline</a>
  97. </div>
  98. <!-- *** Pages Score/Results ************************************************************* -->
  99. <div class="Pages" style="width: 700px; height: 500px;">
  100. <div class="Page">
  101. <div class="Pad">
  102. <!-- *** Page1 Start *** -->
  103. <table width="675">
  104. <c:forEach items="${enrollment}" var="enrollment" varStatus="optStatus">
  105. <tr>
  106. <td style="vertical-align: top;"><table width="100%" border="0" cellpadding="0" cellspacing="0">
  107. <tr><td >Registration Number:</td><td><b>${enrollment.regNO}</b></td></tr>
  108. <tr><td >Full Name:</td><td><b>${enrollment.fullname}</b></td></tr>
  109. <tr><td> Academic Year:</td><td><b>${enrollment.yearName}</b></td></tr>
  110. <tr><td> Department:</td><td><b>${enrollment.department}</b></td></tr>
  111. <tr><td >Class:</td><td><b>${enrollment.classCode}</b></td></tr>
  112. <tr>
  113. <td colspan="7"><table style=" border: 1px solid silver;">
  114. <tr><td rowspan="2" style=" border: 1px solid silver;"><b>Course Titles</b></td><td colspan="3" style=" border: 1px solid silver;"><b>Maximum Score</b></td><td colspan="3" style=" border: 1px solid silver;"><b>${sessionName }</b></td></tr>
  115. <tr><td style=" border: 1px solid silver;"><b>Max Quiz</b></td>
  116. <td style=" border: 1px solid silver;"><b>Max Exam</b></td>
  117. <td style=" border: 1px solid silver;"><b>Total</b></td>
  118. <td style=" border: 1px solid silver;"><b>Mark Quiz</b></td>
  119. <td style=" border: 1px solid silver;"><b>Mark Exam</b></td>
  120. <td style=" border: 1px solid silver;"><b>Total</b></td> </tr>
  121. <c:forEach items="${marks}" var="marks" varStatus="optStatus">
  122. <tr>
  123. <td style=" border: 1px solid silver;">${marks.course}</td>
  124. <td style=" border: 1px solid silver;">${marks.maxScore/2}</td>
  125. <td style=" border: 1px solid silver;">${marks.maxScore/2}</td>
  126. <td style=" border: 1px solid silver;">${marks.maxScore}</td>
  127. <td style=" border: 1px solid silver;">${marks.markQuiz}</td>
  128. <td style=" border: 1px solid silver;">${marks.markExam}</td>
  129. <td style=" border: 1px solid silver;">${marks.markQuiz+marks.markExam}</td></tr>
  130. </c:forEach>
  131. <tr><td style=" border: 1px solid silver;"><b>Total</b></td>
  132. <td style=" border: 1px solid silver;"><b>${maxQuizTotal }</b></td>
  133. <td style=" border: 1px solid silver;"><b>${maxExamTotal }</b></td>
  134. <td style=" border: 1px solid silver;"><b>${maxTotal }</b></td>
  135. <td style=" border: 1px solid silver;"><b>${markQuizTotal }</b></td>
  136. <td style=" border: 1px solid silver;"><b>${markExamTotal }</b></td>
  137. <td style=" border: 1px solid silver;"><b>${markTotal }</b></td></tr>
  138. <tr><td colspan="4" style=" border: 1px solid silver;">Percentage</td><td colspan="3" style=" border: 1px solid silver;"><b>${percentage }%</b></td></tr>
  139. <tr><td colspan="4" rowspan="5" style=" border: 1px solid silver;">School Stamp</td><td colspan="3" rowspan="5" style=" border: 1px solid silver;"><b></b></td></tr>
  140. </table>
  141. </td>
  142. </tr>
  143. <tr><td colspan="7" align="left"><form action="report?mdl=analysis&view=all&sid" method="post" target="_blank" ><table><tr><td><input type="hidden" name="regno" value="${enrollment.regNO}"/><input type="hidden" name="yearname" value="${enrollment.yearName}" /><input type="hidden" name="sessions" value="${sessionID}"/><input type="submit" name="printbulletin" value="Print Bulletin" class="button"/></td></tr></table></form></td></tr>
  144. </table>
  145. </td>
  146. </tr>
  147. </c:forEach>
  148. </table>
  149. <!-- *** Page1 End ***** -->
  150. </div>
  151. </div>
  152. <div class="Page">
  153. <div class="Pad">
  154. <!-- *** Page2 Start *** -->
  155. <table width="675">
  156. <c:forEach items="${enrollment}" var="enrollment" varStatus="optStatus">
  157. <tr><td style="vertical-align: top;"><table width="100%" border="0" cellpadding="0" cellspacing="0">
  158. <tr><td >Registration Number:</td><td><b>${enrollment.regNO}</b></td></tr>
  159. <tr><td >Full Name:</td><td><b>${enrollment.fullname}</b></td></tr>
  160. <tr><td> Academic Year:</td><td><b>${enrollment.yearName}</b></td></tr>
  161. <tr><td> Department:</td><td><b>${enrollment.department}</b></td></tr>
  162. <tr><td >Class:</td><td><b>${enrollment.classCode}</b></td></tr>
  163. <tr>
  164. <td colspan="6"><table style=" border: 1px solid silver;">
  165. <tr><td rowspan="2" style=" border: 1px solid silver;"><b>Course Titles</b></td>
  166. <td style=" border: 1px solid silver;" rowspan="2"><b>Maximum Attendance(min)</b></td>
  167. <td colspan="4" style=" border: 1px solid silver;"><b>${sessionName }</b></td></tr>
  168. <tr>
  169. <td style=" border: 1px solid silver;" align="center"><b>Unexcused Absence(min)</b></td>
  170. <td style=" border: 1px solid silver;" align="center"><b>Excused Absence(min)</b></td>
  171. <td style=" border: 1px solid silver;" align="center"><b>Total(min)</b></td>
  172. <td style=" border: 1px solid silver;" align="center"><b>Percentage(%)</b></td> </tr>
  173. <c:forEach items="${attendances}" var="attendance" varStatus="optStatus">
  174. <tr>
  175. <td style=" border: 1px solid silver;">${attendance.course}</td>
  176. <td style=" border: 1px solid silver;" align="center">${attendance.maxAttendance}</td>
  177. <td style=" border: 1px solid silver;" align="center">${attendance.abscences}</td>
  178. <td style=" border: 1px solid silver;" align="center">${attendance.execusedAbscences}</td>
  179. <td style=" border: 1px solid silver;" align="center">${attendance.maxAttendance -(attendance.abscences+attendance.execusedAbscences)}</td>
  180. <td style=" border: 1px solid silver;" align="center">${percentageCourseAttendance}</td></tr>
  181. </c:forEach>
  182. <tr><td style=" border: 1px solid silver;" align="center"><b>Total</b></td>
  183. <td style=" border: 1px solid silver;" align="center"><b>${totalAttendance}</b></td>
  184. <td style=" border: 1px solid silver;" align="center"><b>${totalAbscence }</b></td>
  185. <td style=" border: 1px solid silver;" align="center"><b>${totalExecusedAbscence }</b></td>
  186. <td style=" border: 1px solid silver;" align="center"><b>${totalCourseAttendance }</b></td></tr>
  187. <tr><td colspan="2" style=" border: 1px solid silver;">Percentage</td><td colspan="4" style=" border: 1px solid silver;" align="center" ><b>${percentageAttendance }%</b></td></tr>
  188. <tr><td colspan="2" rowspan="5" style=" border: 1px solid silver;" >School Stamp</td><td colspan="4" rowspan="5" style=" border: 1px solid silver;"><b></b></td></tr>
  189. </table>
  190. </td>
  191. </tr>
  192. <tr><td colspan="7" align="left"><form action="report?mdl=analysis&view=all&sid" method="post" target="_blank" ><table><tr><td><input type="hidden" name="regno" value="${enrollment.regNO}"/><input type="hidden" name="yearname" value="${enrollment.yearName}" /><input type="hidden" name="sessions" value="${sessionID}"/><input type="submit" name="printattendance" value="Print Attendance" class="button"/></td></tr></table></form></td></tr>
  193. </table>
  194. </td></tr></c:forEach>
  195. </table>
  196. <!-- *** Page2 End ***** -->
  197. </div>
  198. </div>
  199. <div class="Page">
  200. <div class="Pad">
  201. <!-- *** Page3 Start *** -->
  202. <table width="675">
  203. <c:forEach items="${enrollment}" var="enrollment" varStatus="optStatus">
  204. <tr><td style="vertical-align: top;"><table width="100%" border="0" cellpadding="0" cellspacing="0">
  205. <tr><td >Registration Number:</td><td><b>${enrollment.regNO}</b></td></tr>
  206. <tr><td >Full Name:</td><td><b>${enrollment.fullname}</b></td></tr>
  207. <tr><td> Academic Year:</td><td><b>${enrollment.yearName}</b></td></tr>
  208. <tr><td> Department:</td><td><b>${enrollment.department}</b></td></tr>
  209. <tr><td >Class:</td><td><b>${enrollment.classCode}</b></td></tr>
  210. <tr>
  211. <td colspan="4"><table style=" border: 1px solid silver;">
  212. <tr>
  213. <td style=" border: 1px solid silver;" colspan="4" align="center"><b>${sessionName }</b></td></tr>
  214. <tr>
  215. <td style=" border: 1px solid silver;"><b>Offense Type</b></td>
  216. <td style=" border: 1px solid silver;" ><b>Offense Occurence Date</b></td>
  217. <td style=" border: 1px solid silver;" align="center"><b>Offense Occurence Location</b></td>
  218. <td style=" border: 1px solid silver;" align="center"><b>Disciplinary Action</b></td>
  219. </tr>
  220. <c:forEach items="${discipline}" var="discipline" varStatus="optStatus">
  221. <tr>
  222. <td style=" border: 1px solid silver;" align="center">${discipline.offenseType}</td>
  223. <td style=" border: 1px solid silver;" align="center">${discipline.offenseOccurence}</td>
  224. <td style=" border: 1px solid silver;" align="center">${discipline.offenseLocation}</td>
  225. <td style=" border: 1px solid silver;" align="center">${discipline.disciplinaryAction}</td>
  226. </tr>
  227. </c:forEach></table></td></tr>
  228. <tr><td colspan="7" align="left"><form action="report?mdl=analysis&view=all&sid" method="post" target="_blank" ><table><tr><td><input type="hidden" name="regno" value="${enrollment.regNO}"/><input type="hidden" name="yearname" value="${enrollment.yearName}" /><input type="hidden" name="sessions" value="${sessionID}"/><input type="submit" name="reportdiscipline" value="Report Discipline" class="button"/></td></tr></table></form></td></tr>
  229. </table>
  230. </td></tr></c:forEach>
  231. </table>
  232. <!-- *** Page3 End ***** -->
  233. </div>
  234. </div>
  235. </div>
  236. </div>
  237. </td>
  238. </tr>
  239. <%} %>
  240. </table></div>
  241. <%}%>
  242. </td></tr>
  243. </table>
  244. <script type="text/javascript">
  245. tabview_initialize('TabView');
  246. </script>
  247. <%@ include file="/includes/footer.jsp"%>