<% /****************************************************************************** * Copyright (c) 2000-2004 e-Deal * * e-Deal S.A. * 55 rue Brillat Savarin * 75013 Paris * France * * T: +33 (0)1 53 80 80 30 * F: +33 (0)1 73 01 69 77 * http://www.e-deal.com * * La diffusion de ce code source sous quelque forme que ce soit sans * l'autorisation de E-DEAL est interdite. * * Vous êtes autorisés à modifier ce code source uniquement pour votre usage * propre et sous réserve que les mentions de copyright demeurent intactes. * * Ce code est fourni en l'état. Aucune garantie d'aucune sorte, explicite ou * implicite n'est donnée. En aucun cas E-DEAL ne pourra être tenu pour * responsable des dommages pouvant résulter de l'utilisation de ce code * source. * * ******************************************************************************/ %><%@page session="true" import="com.edeal.frontline.*,java.util.*,java.text.*,java.lang.reflect.*"%> <%@taglib uri="http://www.e-deal.com/taglib/fl" prefix="fl" %> <% final org.apache.commons.logging.Log logger = org.apache.commons.logging.LogFactory.getLog(getClass()); String contextPath = (String) session.getAttribute("contextPath"); FlContext context = null; if (contextPath!=null) { context = Frontline.getContext(contextPath); } else { context = Frontline.getContext(request.getContextPath()); } DataDictionary dico = context.getDataDictionary(); String scriptID = Utils.getRequestParameter(context, request, "scriptID"); String perID = Utils.getRequestParameter(context, request, "perID"); String notes = ""; String[][] querySrp = {{"SrpScriptID = " + Utils.formatToSQL(context, scriptID) , "SrpPersonID = " + Utils.formatToSQL(context, perID)}}; Vector listSrp = ScriptResponseBean.list(session , querySrp); if (listSrp != null && listSrp.size() > 0 ) { ScriptResponseBean scriptResponse = (ScriptResponseBean) listSrp.elementAt(0); try { notes = scriptResponse.getSrpNotes(); } catch (FieldNotInitializedException e) {} } ScriptBean script = new ScriptBean(scriptID, session); int duration = -1; try { duration = script.getScrAverageDuration(); } catch (FieldNotInitializedException e) {} int durationMin = duration / 60; int durationSec = duration - durationMin * 60; String durationStr = ((durationMin < 10) ? "0" + new Integer(durationMin).toString() : new Integer(durationMin).toString()) + ":" + ((durationSec < 10) ? "0" + new Integer(durationSec).toString() : new Integer(durationSec).toString()); //IF WE ALREADY HAVE THIS PERSON'S ANSWER TO THIS SCRIPT, WE WANT TO DISPLAY THE NOTES String timer = (String)request.getAttribute("timer"); if (timer == null){ timer = new Long(new Date().getTime()).toString(); } %> <%-- Raccourcis --%>
<%= (duration != -1) ? " / " + durationStr : "" %>
')">   ')">   ')">