[Ils-source] r1530 - trunk/webapp
scribe at crosswire.org
scribe at crosswire.org
Thu Mar 23 19:41:48 MST 2017
Author: scribe
Date: 2017-03-23 19:41:48 -0700 (Thu, 23 Mar 2017)
New Revision: 1530
Added:
trunk/webapp/certificate_alt.jsp
trunk/webapp/certificate_curriculum_alt.jsp
Log:
added more certificate examples to ils
Added: trunk/webapp/certificate_alt.jsp
===================================================================
--- trunk/webapp/certificate_alt.jsp (rev 0)
+++ trunk/webapp/certificate_alt.jsp 2017-03-24 02:41:48 UTC (rev 1530)
@@ -0,0 +1,201 @@
+<%@ page
+ language="java"
+ contentType="text/html;charset=utf-8"
+%>
+<%@ page import="com.resolutions.ils.*" %>
+<%@ page import="com.resolutions.ils.data.*" %>
+<%@ page import="java.util.Vector" %>
+<%@ page import="java.util.Date" %>
+<%@ page import="java.text.SimpleDateFormat" %>
+
+<%
+ ILSSession ilsSession = (ILSSession)session.getAttribute("ilsSession");
+ if (ilsSession == null) {
+ out.print("<html><head><META HTTP-EQUIV=\"Refresh\" CONTENT=\"0;URL=login.jsp\"></head></html>");
+ return;
+ }
+ int caID = -1;
+ try {
+ caID = Integer.parseInt(request.getParameter("ca"));
+ }
+ catch (Exception e) {}
+
+ if (caID < 0) {
+ out.print("<html><body><h1>Invalid Request</h1></body></html>");
+ return;
+ }
+ CourseAttempt ca = CourseAttempt.getCourseAttempt(ilsSession, caID);
+ Course cc = Course.getCourse(ilsSession, ca.getCourseAttemptCourseID());
+ UserProfile up = UserProfile.getUserProfile(ilsSession, ca.getCourseAttemptUserProfileID());
+
+ SimpleDateFormat df = new SimpleDateFormat("MM/dd/yyyy");
+
+%>
+<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
+<html xmlns="http://www.w3.org/1999/xhtml">
+<head>
+<meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1" />
+<title>Untitled Document</title>
+
+<style type="text/css" media="print">
+<!--
+.noprint {
+ display:none;
+};
+-->
+</style>
+
+<style type="text/css">
+<!--
+.cert_text {
+ font-family: Georgia, "Times New Roman", Times, serif;
+ font-size: 34px;
+ color: #333333;
+ text-align: center;
+ border-bottom-width: thin;
+ border-bottom-style: solid;
+ border-bottom-color: #CCCCCC;
+ font-style: oblique;
+ border-top-width: thin;
+ border-top-style: solid;
+ border-top-color: #CCCCCC;
+ background-color: #F4F4F4;
+}
+.text {
+ font-family: Georgia, "Times New Roman", Times, serif;
+ font-size: 14px;
+ font-style: normal;
+ color: #333333;
+ text-align: center;
+ padding: 15px;
+}
+.nametxt {
+ font-family: Georgia, "Times New Roman", Times, serif;
+ font-style: normal;
+ line-height: 25px;
+ text-transform: uppercase;
+ color: #333333;
+ text-align: center;
+ font-weight: bold;
+ font-size: 18px;
+}
+.coursetxt {
+ font-family: Georgia, "Times New Roman", Times, serif;
+ font-style: normal;
+ line-height: 25px;
+ text-transform: uppercase;
+ color: #333333;
+ text-align: center;
+ font-weight: bold;
+ font-size: 16px;
+}
+.tableoutline {
+ border: thin solid ##333333;
+ background-repeat: repeat;
+}
+.sigline {
+ border-bottom-width: thin;
+ border-bottom-style: solid;
+ border-bottom-color: #999999;
+}
+.siglinetxt {
+ font-family: Georgia, "Times New Roman", Times, serif;
+ font-size: 10px;
+ text-transform: uppercase;
+ color: #333333;
+ text-align: center;
+}
+.formbtn {
+ font-family: Arial, Helvetica, sans-serif;
+ font-size: 12px;
+ text-transform: none;
+ color: #666666;
+ padding: 4px 4px 8px;
+ font-weight: bold;
+ text-decoration: none;
+ border: none;
+}
+
+.formbtn:hover {
+ text-decoration: underline;
+}
+-->
+</style>
+</head>
+
+<body>
+
+<div class="noprint">
+ <table width="100%" border="0">
+ <tr>
+ <td width="75%"><div align="right"><a href="javascript:void(window.print())" target="_top"><img border="0" src="images/print_btn.gif" width="24" height="24" alt=""/></a></div></td>
+ <td width="15%"><a class="formbtn" href="javascript:void(window.print())" target="_top">Print Certificate </a></td>
+ </tr>
+ </table>
+</div>
+
+<table width="600" border="0" align="center">
+ <tr>
+ <td class="tableoutline"><table width="100%" border="0" cellspacing="1">
+ <tr>
+ <td bgcolor="#FFFFFF"><table width="100%" border="0" cellspacing="1" class="tableoutline">
+ <tr>
+ <td colspan="2" bgcolor="#283C7A"> </td>
+ </tr>
+ <tr>
+ <td colspan="2" class="cert_text">Alternate Certificate of Completion </td>
+ </tr>
+ <tr>
+ <td colspan="2" class="text">This Certifies that </td>
+ </tr>
+ <tr>
+ <td colspan="2" class="nametxt"><%=up.getUserProfileFirstName() %> <%=up.getUserProfileLastName()%></td>
+ </tr>
+ <tr>
+ <td colspan="2" class="text">has successfully completed the following course </td>
+ </tr>
+ <tr>
+ <td colspan="2" class="coursetxt"><%=cc.getCourseName() %></td>
+ </tr>
+ <tr>
+ <td colspan="2" class="text">on</td>
+ </tr>
+ <tr>
+ <td colspan="2" class="coursetxt"><%= ca.getCourseAttemptCompleteDate() != null ? df.format(ca.getCourseAttemptCompleteDate()) : "" %></td>
+ </tr>
+ <tr>
+ <td colspan="2" class="coursetxt"> </td>
+ </tr>
+ <tr>
+ <td width="50%"><table width="250" border="0" align="center" cellspacing="1">
+ <tr>
+ <td class="sigline"> </td>
+ </tr>
+ <tr>
+ <td class="siglinetxt">Signature</td>
+ </tr>
+ </table></td>
+ <td width="50%"><div align="center">
+ <table width="250" border="0" cellspacing="1">
+ <tr>
+ <td class="sigline"> </td>
+ </tr>
+ <tr>
+ <td class="siglinetxt">Title</td>
+ </tr>
+ </table>
+ </div></td>
+ </tr>
+ <tr>
+ <td colspan="2" align="right"><img src="<%=ilsSession.getCurrentCompany().getCompanyLogoURL()%>" alt="Company Logo" width="147" height="67" /></td>
+ </tr>
+ <tr>
+ <td colspan="2" align="right" bgcolor="#283C7A"> </td>
+ </tr>
+ </table></td>
+ </tr>
+ </table></td>
+ </tr>
+</table>
+</body>
+</html>
Added: trunk/webapp/certificate_curriculum_alt.jsp
===================================================================
--- trunk/webapp/certificate_curriculum_alt.jsp (rev 0)
+++ trunk/webapp/certificate_curriculum_alt.jsp 2017-03-24 02:41:48 UTC (rev 1530)
@@ -0,0 +1,623 @@
+<%@ page
+ language="java"
+ contentType="text/html;charset=utf-8"
+%>
+<%@ page import="com.resolutions.ils.*" %>
+<%@ page import="com.resolutions.ils.data.*" %>
+<%@ page import="java.util.Vector" %>
+<%@ page import="java.util.HashMap" %>
+<%@ page import="java.util.Date" %>
+<%@ page import="java.text.SimpleDateFormat" %>
+<%
+ ILSSession ilsSession = (ILSSession)session.getAttribute("ilsSession");
+ if (ilsSession == null) {
+ out.print("<html><head><META HTTP-EQUIV=\"Refresh\" CONTENT=\"0;URL=login.jsp\"></head></html>");
+ return;
+ }
+
+// So, this now allows us to get the curriculum and user in a number of ways. Ideally, moving forward,
+// since we are saving a Course Attempt record now when a curriculum is complete, we will get the
+// Curriculum and User from the Course Attempt record.
+//
+// But... so that we can work the old way, we allow the Curriculum to be passed in directly, as before
+// with the 'c' parameter. This has other problems, as this assumes that we want the currently logged
+// in user's information about this curriculum, but this is not true any longer because an admin can
+// ask for a certificate for a specific user now. So, we also allow the User Profile ID to be passed
+// in with the 'up' parameter. I don't think anyone is using this yet and no one ever should because if
+// they are going to change anything to make things work correctly, they should change to use Course
+// Attempt :)
+//
+ int caID = -1; try { caID = Integer.parseInt(request.getParameter("ca")); } catch (Exception e) {}
+ int cID = -1; try { cID = Integer.parseInt(request.getParameter("c")); } catch (Exception e) {}
+ int upID = -1; try { upID = Integer.parseInt(request.getParameter("up")); } catch (Exception e) {}
+
+ if (caID < 0 && cID < 0) {
+ out.print("<html><body><h1>Invalid Request</h1></body></html>");
+ return;
+ }
+ CourseAttempt ca = caID > -1 ? CourseAttempt.getCourseAttempt(ilsSession, caID) : null;
+ Course cc = Course.getCourse(ilsSession, ca != null ? ca.getCourseAttemptCourseID() : cID);
+ UserProfile up = UserProfile.getUserProfile(ilsSession, ca != null ? ca.getCourseAttemptUserProfileID() : upID > -1 ? upID : ilsSession.getCurrentUserProfile().getUserProfileID());
+
+ SimpleDateFormat df = new SimpleDateFormat("MM/dd/yyyy");
+
+%>
+<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
+<html xmlns="http://www.w3.org/1999/xhtml">
+<head>
+<meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1" />
+<title>Untitled Document</title>
+<style type="text/css" media="print">
+<!--
+.noprint {
+ display:none;
+}
+;
+-->
+</style>
+<style type="text/css">
+<!--
+.courseTable {
+ font-size:12px;
+ border-collapse: collapse;
+}
+.courseTable td, .courseTable th {
+ border: solid 1px;
+ padding: 2px;
+ font-family: Arial, Helvetica, sans-serif;
+}
+.cert_text {
+ font-family: Arial, Helvetica, sans-serif;
+ font-size: 1.2em;
+ color: #333333;
+ text-align: center;
+ border-bottom-width: thin;
+ border-bottom-style: solid;
+ border-bottom-color: #CCCCCC;
+ font-style: oblique;
+ border-top-width: thin;
+ border-top-style: solid;
+ border-top-color: #CCCCCC;
+ background-color: #F4F4F4;
+}
+.heading {
+ font-weight: bold;
+ white-space:nowrap;
+}
+.text {
+ font-family: Arial, Helvetica, sans-serif;
+ font-size: 14px;
+ font-style: normal;
+ color: #333333;
+ padding: 10px;
+}
+.SubText {
+ font-family: Arial, Helvetica, sans-serif;
+ font-size: 10px;
+ font-style: normal;
+ color: #333333;
+ text-align: left;
+ padding-left:10px;
+ padding-right:10px;
+ padding-top:15;
+ padding-bottom:5px;
+}
+.nametxt {
+ font-family: Arial, Helvetica, sans-serif;
+ font-style: normal;
+ line-height: 25px;
+ text-transform: uppercase;
+ color: #333333;
+ text-align: center;
+ font-weight: bold;
+ font-size: 18px;
+}
+.coursetxt {
+ font-family: Arial, Helvetica, sans-serif;
+ font-style: normal;
+ line-height: 25px;
+ text-transform: uppercase;
+ color: #333333;
+ text-align: center;
+ font-weight: bold;
+ font-size: 16px;
+}
+.tableoutline {
+ border: thin solid ##333333;
+ background-repeat: repeat;
+}
+.sigline {
+ border-bottom-width: thin;
+ border-bottom-style: solid;
+ border-bottom-color: #999999;
+}
+.siglinetxt {
+ font-family: Arial, Helvetica, sans-serif;
+ font-size: 10px;
+ text-transform: uppercase;
+ color: #333333;
+ text-align: center;
+}
+.formbtn {
+ font-family: Arial, Helvetica, sans-serif;
+ font-size: 12px;
+ text-transform: none;
+ color: #666666;
+ padding: 4px 4px 8px;
+ font-weight: bold;
+ text-decoration: none;
+ border: none;
+}
+.formbtn:hover {
+ text-decoration: underline;
+}
+-->
+</style>
+</head>
+<body>
+<div class="noprint" style="margin-top:0px; padding-top:0px;">
+ <table width="100%" border="0">
+ <tr>
+ <td width="75%"><div align="right"><a href="javascript:void(window.print())" target="_top"><img border="0" src="images/print_btn.gif" width="24" height="24" alt=""/></a></div></td>
+ <td width="15%"><a class="formbtn" href="javascript:void(window.print())" target="_top">Print Alternative Certificate </a></td>
+ </tr>
+ </table>
+</div>
+<!-- Start New Miner Certificate -->
+ <!-- Start Check Full Address -->
+ <%
+ boolean FullAddress = false;
+ String Addr1 = up.getUserProfileAddr1();
+ String Addr2 = up.getUserProfileAddr2();
+ String City = up.getUserProfileCity();
+ String State = up.getUserProfileState();
+ String Zip = up.getUserProfileZip();
+ String Country = up.getUserProfileCountry();
+
+ if (Addr1.equals("") || Addr2.equals("") || City.equals("") || State.equals("") || Zip.equals("") || Country.equals("")) {
+ FullAddress = false;
+ } else {
+ FullAddress = true;
+ }
+
+ boolean FullName = false;
+
+ String FirstName = up.getUserProfileFirstName();
+ String MiddleName = up.getUserProfileMiddleName();
+ String LastName = up.getUserProfileLastName();
+ String SuffixName = up.getUserProfileSuffixName();
+
+ if (FirstName.equals("") || MiddleName.equals("") || LastName.equals("")) {
+ FullName = false;
+ } else {
+ FullName = true;
+ }
+ %>
+ <!-- End Check Full Address -->
+ <!-- Start Get Course End Date -->
+ <%!
+ public static String GetCourseEndDate(HttpSession session, ILSSession ilsSession, UserProfile user, int CourseID)
+ {
+ Vector cas = CourseAttempt.getUserCourseAttempts(ilsSession, user.getUserProfileID(), CourseID, false);
+ CourseAttempt ca = (CourseAttempt)cas.get(0);
+
+ SimpleDateFormat df = new SimpleDateFormat("MM/dd/yyyy");
+
+ Date tDate = ca.getCourseAttemptCompleteDate();
+ String endDate = (tDate != null) ? df.format(tDate) : "";
+
+ return endDate;
+ }
+ %>
+ <!-- End Get Course End Date -->
+ <!-- Start Display New Miner Certificate -->
+ <% if ("12".equals(request.getParameter("c"))) { %>
+ <table width="700" border="0" align="center" style="margin-top:0px; padding-top:0px;">
+ <tr>
+ <td class="tableoutline"><table width="100%" border="0" cellspacing="1">
+ <tr>
+ <td bgcolor="#FFFFFF"><table width="100%" border="0" cellspacing="1" class="tableoutline">
+ <tr>
+ <td colspan="2" class="text" style="padding-top:0px; padding-bottom:0px;"><table style="width:100%;">
+ <tr>
+ <td class="heading" style="text-align:center; font-size:16px;">NEW MINER TRAINING RECORD/CERTIFICATE</td>
+ </tr>
+ </table>
+ </td>
+ </tr>
+ <tr>
+ <td colspan="2" class="text" style="padding-top:0px; padding-bottom:0px;"><table style="width:100%;">
+ <tr>
+ <td class="heading">Miner's Full Name (Print): </td>
+ <td class="sigline" style="width:100%;"><% if (FullName) { %><%= FirstName + " " + MiddleName + " " + LastName + " " + SuffixName %><% } else { %><span style="color: #d9d9d9; font-weight: bold;">Enter Full Name</span><% } %></td>
+ </tr>
+ </table>
+ </td>
+ </tr>
+ <tr>
+ <td colspan="2" class="text" style="padding-top:0px;"><table style="width:100%;">
+ <tr>
+ <td class="heading">Mine or Contractor Name: </td>
+ <td class="sigline" style="width:100%;"> </td>
+ <td class="heading"> I.D.#</td>
+ <td class="sigline"> </td>
+ </tr>
+ </table>
+ </td>
+ </tr>
+ <tr>
+ <td colspan="2"><table class="courseTable" style="width:100%;">
+ <thead>
+ <tr>
+ <th width="210">Subject<br/>30CFR Part 46.5</th>
+ <th width="170">Competent<br/>Person</th>
+ <th>Date</th>
+ <th width="130">Location<br/><span style="font-weight:normal; font-size:10px;">(Name & Address)</span></th>
+ <th>Time</th>
+ <th>Miner's<br/>Initials</th>
+ </tr>
+ </thead>
+ <tbody>
+ <tr>
+ <td colspan="6" style="background:#c0c0c0; font-size: 11px; font-weight: bold;">The minor received no less than 4 hours in the following, before beginning work:</td>
+ </tr>
+ <tr>
+ <td>(b)(1) Introduction to the work environment, mine tour, mining method/operation - On the job training</td>
+ <td></td>
+ <td></td>
+ <td style="text-align:center;"><span style="color: #d9d9d9; font-weight: bold;">Enter Location<br/>Name & Address</span></td>
+ <td></td>
+ <td style="text-align:center;"><span style="color: #d9d9d9; font-weight: bold;">Initial<br/>Here</span></td>
+ </tr>
+ <tr>
+ <td>(b)(1) Introduction to the work environment, mine tour, mining method/operation - Online training</td>
+ <td></td>
+ <td><%= GetCourseEndDate(session, ilsSession, up, 15) %></td>
+ <td style="text-align:center;"><% if (FullAddress) { %><%= Addr1 + "<br/>" + Addr2 + "<br/>" + City + ", " + State + " " + Zip + ", " + Country %><% } else { %><span style="color: #d9d9d9; font-weight: bold;">Enter Location<br/>Name & Address</span><% } %></td>
+ <td>10 Min</td>
+ <td style="text-align:center;"><span style="color: #d9d9d9; font-weight: bold;">Initial<br/>Here</span></td>
+ </tr>
+ <tr>
+ <td>(b)(2) Instruction on recognition and avoidance of electrical and other hazards</td>
+ <td></td>
+ <td><%= GetCourseEndDate(session, ilsSession, up, 28) %></td>
+ <td style="text-align:center;"><% if (FullAddress) { %><%= Addr1 + "<br/>" + Addr2 + "<br/>" + City + ", " + State + " " + Zip + ", " + Country %><% } else { %><span style="color: #d9d9d9; font-weight: bold;">Enter Location<br/>Name & Address</span><% } %></td>
+ <td>4 Hrs<br/>42 Min</td>
+ <td style="text-align:center;"><span style="color: #d9d9d9; font-weight: bold;">Initial<br/>Here</span></td>
+ </tr>
+ <tr>
+ <td>(b)(3) Emergency procedures, escape, and firefighting</td>
+ <td></td>
+ <td><%= GetCourseEndDate(session, ilsSession, up, 6) %></td>
+ <td style="text-align:center;"><% if (FullAddress) { %><%= Addr1 + "<br/>" + Addr2 + "<br/>" + City + ", " + State + " " + Zip + ", " + Country %><% } else { %><span style="color: #d9d9d9; font-weight: bold;">Enter Location<br/>Name & Address</span><% } %></td>
+ <td>18 Min</td>
+ <td style="text-align:center;"><span style="color: #d9d9d9; font-weight: bold;">Initial<br/>Here</span></td>
+ </tr>
+ <tr>
+ <td>(b)(4) Health and Safety aspects<br/>of the tasks assigned - On the job training</td>
+ <td></td>
+ <td></td>
+ <td style="text-align:center;"><span style="color: #d9d9d9; font-weight: bold;">Enter Location<br/>Name & Address</span></td>
+ <td></td>
+ <td style="text-align:center;"><span style="color: #d9d9d9; font-weight: bold;">Initial<br/>Here</span></td>
+ </tr>
+ <tr>
+ <td>(b)(4) Health and Safety aspects of the tasks assigned - Online training</td>
+ <td></td>
+ <td><%= GetCourseEndDate(session, ilsSession, up, 5) %></td>
+ <td style="text-align:center;"><% if (FullAddress) { %><%= Addr1 + "<br/>" + Addr2 + "<br/>" + City + ", " + State + " " + Zip + ", " + Country %><% } else { %><span style="color: #d9d9d9; font-weight: bold;">Enter Location<br/>Name & Address</span><% } %></td>
+ <td>34 Min</td>
+ <td style="text-align:center;"><span style="color: #d9d9d9; font-weight: bold;">Initial<br/>Here</span></td>
+ </tr>
+ <tr>
+ <td>(b)(5) Instruction on statutory rights of miners and their representatives</td>
+ <td></td>
+ <td><%= GetCourseEndDate(session, ilsSession, up, 7) %></td>
+ <td style="text-align:center;"><% if (FullAddress) { %><%= Addr1 + "<br/>" + Addr2 + "<br/>" + City + ", " + State + " " + Zip + ", " + Country %><% } else { %><span style="color: #d9d9d9; font-weight: bold;">Enter Location<br/>Name & Address</span><% } %></td>
+ <td>32 Min</td>
+ <td style="text-align:center;"><span style="color: #d9d9d9; font-weight: bold;">Initial<br/>Here</span></td>
+ </tr>
+ <tr>
+ <td>(b)(6) Authority & responsibility of supervisors and miners' representatives</td>
+ <td></td>
+ <td><%= GetCourseEndDate(session, ilsSession, up, 8) %></td>
+ <td style="text-align:center;"><% if (FullAddress) { %><%= Addr1 + "<br/>" + Addr2 + "<br/>" + City + ", " + State + " " + Zip + ", " + Country %><% } else { %><span style="color: #d9d9d9; font-weight: bold;">Enter Location<br/>Name & Address</span><% } %></td>
+ <td>2 Min</td>
+ <td style="text-align:center;"><span style="color: #d9d9d9; font-weight: bold;">Initial<br/>Here</span></td>
+ </tr>
+ <tr>
+ <td>(b)(7) Introduction to you rules and procedures for reporting hazards</td>
+ <td></td>
+ <td><%= GetCourseEndDate(session, ilsSession, up, 9) %></td>
+ <td style="text-align:center;"><% if (FullAddress) { %><%= Addr1 + "<br/>" + Addr2 + "<br/>" + City + ", " + State + " " + Zip + ", " + Country %><% } else { %><span style="color: #d9d9d9; font-weight: bold;">Enter Location<br/>Name & Address</span><% } %></td>
+ <td>58 Min</td>
+ <td style="text-align:center;"><span style="color: #d9d9d9; font-weight: bold;">Initial<br/>Here</span></td>
+ </tr>
+ <tr>
+ <td colspan="6" style="background:#c0c0c0; font-size: 11px; font-weight: bold;">No later than 60 days:</td>
+ </tr>
+ <tr>
+ <td>(c)(1) Self-rescue, respiratory devices, if used</td>
+ <td style="padding-left:0px; padding-right:0px; text-align:right;"><div style="width:120px; float:right; height:6px; border-bottom:#000 solid 3px;"> </div><div style="float:right; font-weight:bold; padding-right:5px;">N/A</div></td>
+ <td style="padding-left:0px; padding-right:0px;"><div style="width:100%; border-bottom:#000 solid 3px; height:0px;"> </div></td>
+ <td style="padding-left:0px; padding-right:0px;"><div style="width:100%; border-bottom:#000 solid 3px; height:0px;"> </div></td>
+ <td style="padding-left:0px; padding-right:0px;"><div style="width:100%; border-bottom:#000 solid 3px; height:0px;"> </div></td>
+ <td style="padding-left:0px; padding-right:0px; text-align:left;"><div style="width:25px; float:left; height:9px; border-bottom:#000 solid 3px;"> </div><div style="float:left; font-weight:bold; padding-left:0px; font-size: 16px;">></div></td>
+ </tr>
+ <tr>
+ <td>Emergency plans, and firefighting</td>
+ <td></td>
+ <td><%= GetCourseEndDate(session, ilsSession, up, 10) %></td>
+ <td style="text-align:center;"><% if (FullAddress) { %><%= Addr1 + "<br/>" + Addr2 + "<br/>" + City + ", " + State + " " + Zip + ", " + Country %><% } else { %><span style="color: #d9d9d9; font-weight: bold;">Enter Location<br/>Name & Address</span><% } %></td>
+ <td>6 Min</td>
+ <td style="text-align:center;"><span style="color: #d9d9d9; font-weight: bold;">Initial<br/>Here</span></td>
+ </tr>
+ <tr>
+ <td colspan="6" style="background:#c0c0c0; font-size: 11px; font-weight: bold;">No later than 90 days: (the balance of the 24 hours of training)</td>
+ </tr>
+ <tr>
+ <td>Hazcom</td>
+ <td></td>
+ <td><%= GetCourseEndDate(session, ilsSession, up, 11) %></td>
+ <td style="text-align:center;"><% if (FullAddress) { %><%= Addr1 + "<br/>" + Addr2 + "<br/>" + City + ", " + State + " " + Zip + ", " + Country %><% } else { %><span style="color: #d9d9d9; font-weight: bold;">Enter Location<br/>Name & Address</span><% } %></td>
+ <td>44 Min</td>
+ <td style="text-align:center;"><span style="color: #d9d9d9; font-weight: bold;">Initial<br/>Here</span></td>
+ </tr>
+ </tbody>
+ </table>
+ </td>
+ </tr>
+ <tr>
+ <td colspan="2" class="coursetxt"><span style="line-height:10px;"> </span></td>
+ </tr>
+ <tr>
+ <td colspan="2" width="100%" style="border:solid 2px;"><table width="90%" border="0" align="center" cellspacing="1">
+ <tr>
+ <td colspan="2" width="100%;" class="text" style="font-size:12px;"><strong>False certification is punishable under 110 (a) and (f) of the Federal Mine Safety and Health Act</strong><br/>I certify that the above training has been completed.</td>
+ </tr>
+ <tr>
+ <td colspan="2" class="sigline" width="100%;"> </td>
+ </tr>
+ <tr>
+ <td width="70%" class="siglinetxt">(Signature of person responsible for health and safety training)</td>
+ <td class="siglinetxt">(Date)</td>
+ </tr>
+ </table>
+ </td>
+ </tr>
+ </table>
+ </td>
+ </tr>
+ </table>
+ </td>
+ </tr>
+ </table>
+ <% } else if ("43".equals(request.getParameter("c"))) { %>
+ <!-- End Display New Miner Certificate -->
+ <!-- Start Display Annual Refresher Certificate -->
+ <table width="700" border="0" align="center" style="margin-top:0px; padding-top:0px;">
+ <tr>
+ <td class="tableoutline"><table width="100%" border="0" cellspacing="1">
+ <tr>
+ <td bgcolor="#FFFFFF"><table width="100%" border="0" cellspacing="1" class="tableoutline">
+ <tr>
+ <td colspan="2" class="text" style="padding-top:0px; padding-bottom:0px;"><table style="width:100%;">
+ <tr>
+ <td class="heading" style="text-align:center; font-size:14px;">ANNUAL REFRESHER TRAINING RECORD/CERTIFICATE</td>
+ </tr>
+ </table>
+ </td>
+ </tr>
+ <tr>
+ <td colspan="2" class="text" style="padding-top:0px; padding-bottom:0px;"><table style="width:100%;">
+ <tr>
+ <td class="heading">Miner's Full Name (Print): </td>
+ <td class="sigline" style="width:100%;"><% if (FullName) { %><%= FirstName + " " + MiddleName + " " + LastName + " " + SuffixName %><% } else { %><span style="color: #d9d9d9; font-weight: bold;">Enter Full Name</span><% } %></td>
+ </tr>
+ </table>
+ </td>
+ </tr>
+ <tr>
+ <td colspan="2" class="text" style="padding-top:0px; padding-bottom: 0px;"><table style="width:100%;">
+ <tr>
+ <td class="heading">Mine or Contractor Name: </td>
+ <td class="sigline" style="width:100%;"> </td>
+ <td class="heading"> I.D.#</td>
+ <td class="sigline"> </td>
+ </tr>
+ </table>
+ </td>
+ </tr>
+ <tr>
+ <td colspan="2"><table class="courseTable" style="width:100%;">
+ <thead>
+ <tr>
+ <th width="175">Subject<br/>
+ 30CFR Part 46.8</th>
+ <th width="200">Competent<br/>Person</th>
+ <th>Date</th>
+ <th width="130">Location<br/><span style="font-weight:normal; font-size:10px;">(Name & Address)</span></th>
+ <th>Time</th>
+ <th>Miner's<br/>Initials</th>
+ </tr>
+ </thead>
+ <tbody>
+ <tr>
+ <td colspan="6" style="background:#c0c0c0; font-size: 11px; font-weight: bold;">The miner received no less than 8 hours of annual refresher training in the following:</td>
+ </tr>
+ <tr>
+ <td>Instruction on changes at the mine that could adversely affect the miner's health or safety</td>
+ <td></td>
+ <td><%= GetCourseEndDate(session, ilsSession, up, 29) %></td>
+ <td style="text-align:center;"><% if (FullAddress) { %><%= Addr1 + "<br/>" + Addr2 + "<br/>" + City + ", " + State + " " + Zip + ", " + Country %><% } else { %><span style="color: #d9d9d9; font-weight: bold;">Enter Location<br/>Name & Address</span><% } %></td>
+ <td>9 Mins.</td>
+ <td style="text-align:center;"><span style="color: #d9d9d9; font-weight: bold;">Initial<br/>Here</span></td>
+ </tr>
+ <tr>
+ <td>H & S standards and applicable requirements</td>
+ <td></td>
+ <td><%= GetCourseEndDate(session, ilsSession, up, 30) %></td>
+ <td style="text-align:center;"><% if (FullAddress) { %><%= Addr1 + "<br/>" + Addr2 + "<br/>" + City + ", " + State + " " + Zip + ", " + Country %><% } else { %><span style="color: #d9d9d9; font-weight: bold;">Enter Location<br/>Name & Address</span><% } %></td>
+ <td>1 hour<br/>27 Mins.</td>
+ <td style="text-align:center;"><span style="color: #d9d9d9; font-weight: bold;">Initial<br/>Here</span></td>
+ </tr>
+ <tr>
+ <td colspan="6" style="background:#c0c0c0; font-size: 11px; font-weight: bold;">Health and safety subjects relevant to mining operations at the mine</td>
+ </tr>
+ <tr>
+ <td>Transportation controls and communication systems</td>
+ <td></td>
+ <td><%= GetCourseEndDate(session, ilsSession, up, 31) %></td>
+ <td style="text-align:center;"><% if (FullAddress) { %><%= Addr1 + "<br/>" + Addr2 + "<br/>" + City + ", " + State + " " + Zip + ", " + Country %><% } else { %><span style="color: #d9d9d9; font-weight: bold;">Enter Location<br/>Name & Address</span><% } %></td>
+ <td>2 Mins.</td>
+ <td style="text-align:center;"><span style="color: #d9d9d9; font-weight: bold;">Initial<br/>Here</span></td>
+ </tr>
+ <tr>
+ <td>Emergency plans, and firefighting</td>
+ <td></td>
+ <td><%= GetCourseEndDate(session, ilsSession, up, 32) %></td>
+ <td style="text-align:center;"><% if (FullAddress) { %><%= Addr1 + "<br/>" + Addr2 + "<br/>" + City + ", " + State + " " + Zip + ", " + Country %><% } else { %><span style="color: #d9d9d9; font-weight: bold;">Enter Location<br/>Name & Address</span><% } %></td>
+ <td>17 Mins.</td>
+ <td style="text-align:center;"><span style="color: #d9d9d9; font-weight: bold;">Initial<br/>Here</span></td>
+ </tr>
+ <tr>
+ <td>Ground conditions and control</td>
+ <td></td>
+ <td><%= GetCourseEndDate(session, ilsSession, up, 33) %></td>
+ <td style="text-align:center;"><% if (FullAddress) { %><%= Addr1 + "<br/>" + Addr2 + "<br/>" + City + ", " + State + " " + Zip + ", " + Country %><% } else { %><span style="color: #d9d9d9; font-weight: bold;">Enter Location<br/>Name & Address</span><% } %></td>
+ <td>2 Mins.</td>
+ <td style="text-align:center;"><span style="color: #d9d9d9; font-weight: bold;">Initial<br/>Here</span></td>
+ </tr>
+ <tr>
+ <td>Working in areas of highwalls</td>
+ <td></td>
+ <td><%= GetCourseEndDate(session, ilsSession, up, 34) %></td>
+ <td style="text-align:center;"><% if (FullAddress) { %><%= Addr1 + "<br/>" + Addr2 + "<br/>" + City + ", " + State + " " + Zip + ", " + Country %><% } else { %><span style="color: #d9d9d9; font-weight: bold;">Enter Location<br/>Name & Address</span><% } %></td>
+ <td>6 Mins.</td>
+ <td style="text-align:center;"><span style="color: #d9d9d9; font-weight: bold;">Initial<br/>Here</span></td>
+ </tr>
+ <tr>
+ <td>Water hazards, pits, and spoil banks</td>
+ <td></td>
+ <td><%= GetCourseEndDate(session, ilsSession, up, 35) %></td>
+ <td style="text-align:center;"><% if (FullAddress) { %><%= Addr1 + "<br/>" + Addr2 + "<br/>" + City + ", " + State + " " + Zip + ", " + Country %><% } else { %><span style="color: #d9d9d9; font-weight: bold;">Enter Location<br/>Name & Address</span><% } %></td>
+ <td>4 Mins.</td>
+ <td style="text-align:center;"><span style="color: #d9d9d9; font-weight: bold;">Initial<br/>Here</span></td>
+ </tr>
+ <tr>
+ <td>Basic First-aid/ CPR</td>
+ <td></td>
+ <td><%= GetCourseEndDate(session, ilsSession, up, 36) %></td>
+ <td style="text-align:center;"><% if (FullAddress) { %><%= Addr1 + "<br/>" + Addr2 + "<br/>" + City + ", " + State + " " + Zip + ", " + Country %><% } else { %><span style="color: #d9d9d9; font-weight: bold;">Enter Location<br/>Name & Address</span><% } %></td>
+ <td>7 Mins.</td>
+ <td style="text-align:center;"><span style="color: #d9d9d9; font-weight: bold;">Initial<br/>Here</span></td>
+ </tr>
+ <tr>
+ <td>Accident Prevention</td>
+ <td></td>
+ <td><%= GetCourseEndDate(session, ilsSession, up, 37) %></td>
+ <td style="text-align:center;"><% if (FullAddress) { %><%= Addr1 + "<br/>" + Addr2 + "<br/>" + City + ", " + State + " " + Zip + ", " + Country %><% } else { %><span style="color: #d9d9d9; font-weight: bold;">Enter Location<br/>Name & Address</span><% } %></td>
+ <td>3 hours<br/>23 Mins.</td>
+ <td style="text-align:center;"><span style="color: #d9d9d9; font-weight: bold;">Initial<br/>Here</span></td>
+ </tr>
+ <tr>
+ <td>Mobile Equipment</td>
+ <td></td>
+ <td><%= GetCourseEndDate(session, ilsSession, up, 38) %></td>
+ <td style="text-align:center;"><% if (FullAddress) { %><%= Addr1 + "<br/>" + Addr2 + "<br/>" + City + ", " + State + " " + Zip + ", " + Country %><% } else { %><span style="color: #d9d9d9; font-weight: bold;">Enter Location<br/>Name & Address</span><% } %></td>
+ <td>7 Mins.</td>
+ <td style="text-align:center;"><span style="color: #d9d9d9; font-weight: bold;">Initial<br/>Here</span></td>
+ </tr>
+ <tr>
+ <td>Health</td>
+ <td></td>
+ <td><%= GetCourseEndDate(session, ilsSession, up, 39) %></td>
+ <td style="text-align:center;"><% if (FullAddress) { %><%= Addr1 + "<br/>" + Addr2 + "<br/>" + City + ", " + State + " " + Zip + ", " + Country %><% } else { %><span style="color: #d9d9d9; font-weight: bold;">Enter Location<br/>Name & Address</span><% } %></td>
+ <td>35 Mins.</td>
+ <td style="text-align:center;"><span style="color: #d9d9d9; font-weight: bold;">Initial<br/>Here</span></td>
+ </tr>
+ <tr>
+ <td>Maintenance & Repair, Material Handling, Fall protection</td>
+ <td></td>
+ <td><%= GetCourseEndDate(session, ilsSession, up, 40) %></td>
+ <td style="text-align:center;"><% if (FullAddress) { %><%= Addr1 + "<br/>" + Addr2 + "<br/>" + City + ", " + State + " " + Zip + ", " + Country %><% } else { %><span style="color: #d9d9d9; font-weight: bold;">Enter Location<br/>Name & Address</span><% } %></td>
+ <td>31 Mins.</td>
+ <td style="text-align:center;"><span style="color: #d9d9d9; font-weight: bold;">Initial<br/>Here</span></td>
+ </tr>
+ <tr>
+ <td>Electrical hazards</td>
+ <td></td>
+ <td><%= GetCourseEndDate(session, ilsSession, up, 41) %></td>
+ <td style="text-align:center;"><% if (FullAddress) { %><%= Addr1 + "<br/>" + Addr2 + "<br/>" + City + ", " + State + " " + Zip + ", " + Country %><% } else { %><span style="color: #d9d9d9; font-weight: bold;">Enter Location<br/>Name & Address</span><% } %></td>
+ <td>26 Mins.</td>
+ <td style="text-align:center;"><span style="color: #d9d9d9; font-weight: bold;">Initial<br/>Here</span></td>
+ </tr>
+ <tr>
+ <td>Hazcom</td>
+ <td></td>
+ <td><%= GetCourseEndDate(session, ilsSession, up, 42) %></td>
+ <td style="text-align:center;"><% if (FullAddress) { %><%= Addr1 + "<br/>" + Addr2 + "<br/>" + City + ", " + State + " " + Zip + ", " + Country %><% } else { %><span style="color: #d9d9d9; font-weight: bold;">Enter Location<br/>Name & Address</span><% } %></td>
+ <td>44 Mins.</td>
+ <td style="text-align:center;"><span style="color: #d9d9d9; font-weight: bold;">Initial<br/>Here</span></td>
+ </tr>
+ </tbody>
+ </table>
+ </td>
+ </tr>
+ <tr>
+ <td colspan="2" class="coursetxt"><span style="line-height:10px;"> </span></td>
+ </tr>
+ <tr>
+ <td colspan="2" width="100%" style="border:solid 2px;"><table width="90%" border="0" align="center" cellspacing="1">
+ <tr>
+ <td colspan="2" width="100%;" class="text" style="font-size:12px; padding-top:0px; padding-bottom:0px;"><strong>False certification is punishable under 110 (a) and (f) of the Federal Mine Safety and Health Act</strong><br/>I certify that the above training has been completed.</td>
+ </tr>
+ <tr>
+ <td colspan="2" class="sigline" width="100%;"> </td>
+ </tr>
+ <tr>
+ <td width="70%" class="siglinetxt">(Signature of person responsible for health and safety training)</td>
+ <td class="siglinetxt">(Date)</td>
+ </tr>
+ </table>
+ </td>
+ </tr>
+ </table>
+ </td>
+ </tr>
+ </table>
+ </td>
+ </tr>
+ </table>
+ <% } %>
+ <!-- End Display Annual Refresher Certificate -->
+<!-- End New Miner Certificate -->
+</body>
+</html>
+<%!
+public static HashMap<String, Long> processCourseRow(HttpSession session, ILSSession ilsSession, UserProfile user, Course cc) {
+ HashMap<String, Long> values = new HashMap<String, Long>();
+ Vector cas = CourseAttempt.getUserCourseAttempts(ilsSession, user.getUserProfileID(), cc.getCourseID(), false);
+ CourseAttempt ca = null;
+ if (cas.size() == 0) {
+ // see if a past attempt exists
+ cas = CourseAttempt.getUserCourseAttempts(ilsSession, user.getUserProfileID(), cc.getCourseID());
+ ca = new CourseAttempt();
+ }
+ else {
+ ca = (CourseAttempt)cas.get(0);
+ }
+ values.put("timeframe", (long)cc.getCourseSeatMinutes());
+ Date tDate = ca.getCourseAttemptStartDate();
+ values.put("startdate", tDate != null ? tDate.getTime() : 0);
+ tDate = ca.getCourseAttemptCompleteDate();
+ values.put("enddate", tDate != null ? tDate.getTime() : 0);
+ values.put("status", (long)ca.getCourseAttemptStatusID());
+ switch (ca.getCourseAttemptStatusID()) {
+ case CourseAttempt.STATUS_PASSED:
+ values.put("score", (long)ca.getCourseAttemptScore());
+ break;
+ }
+ return values;
+}
+%>
More information about the Ils-source
mailing list