[gee-svn] SF.net SVN: gabel: [112] trunk/gee/war
Status: Alpha
Brought to you by:
alllee
|
From: <al...@us...> - 2006-02-26 22:02:57
|
Revision: 112 Author: alllee Date: 2006-02-26 14:02:44 -0800 (Sun, 26 Feb 2006) ViewCVS: http://svn.sourceforge.net/gabel/?rev=112&view=rev Log Message: ----------- fixed consent form validation bug where submitting invalid data to the consent form would cause the form to reappear with null IRB approval dates. Modified Paths: -------------- trunk/gee/src/java/edu/indiana/psych/gee/Experiment.java trunk/gee/src/java/edu/indiana/psych/gee/action/AdminAction.java trunk/gee/src/java/edu/indiana/psych/gee/action/StartExperiment.java trunk/gee/war/WEB-INF/classes/xwork.xml trunk/gee/war/getConsent.jsp trunk/gee/war/includes/footer.jsp trunk/gee/war/index.jsp Added Paths: ----------- trunk/gee/src/java/edu/indiana/psych/gee/action/StartExperiment.properties Modified: trunk/gee/src/java/edu/indiana/psych/gee/Experiment.java =================================================================== --- trunk/gee/src/java/edu/indiana/psych/gee/Experiment.java 2006-02-26 19:20:49 UTC (rev 111) +++ trunk/gee/src/java/edu/indiana/psych/gee/Experiment.java 2006-02-26 22:02:44 UTC (rev 112) @@ -14,7 +14,6 @@ public interface Experiment { - public static final Experiment NULL = new Experiment() { private final Log logger = LogFactory.getLog(getClass()); public void start() { Modified: trunk/gee/src/java/edu/indiana/psych/gee/action/AdminAction.java =================================================================== --- trunk/gee/src/java/edu/indiana/psych/gee/action/AdminAction.java 2006-02-26 19:20:49 UTC (rev 111) +++ trunk/gee/src/java/edu/indiana/psych/gee/action/AdminAction.java 2006-02-26 22:02:44 UTC (rev 112) @@ -16,6 +16,7 @@ private Set<Experiment> experiments; + private Experiment experiment; private String experimentName; public String authenticate() { @@ -23,20 +24,20 @@ return SUCCESS; } - public String execute() { - // load experiments and various pieces of configuration information? - + public String configure() { + // load experiment and various pieces of configuration information? + this.experiment = getExperiment(experimentName); return SUCCESS; } public String start() { getLogger().debug("Starting: " + experimentName); - getExperimentService().find(experimentName).start(); + getExperiment(experimentName).start(); return SUCCESS; } public String stop() { - Experiment experiment = getExperimentService().find(experimentName); + Experiment experiment = getExperiment(experimentName); getLogger().debug("Stopping: " + experimentName + ": " + experiment); experiment.stop(); return SUCCESS; @@ -58,10 +59,17 @@ return experiments; } + public Experiment getExperiment() { + return experiment; + } public void setExperimentName(String experimentName) { this.experimentName = experimentName; } + + private Experiment getExperiment(String experimentName) { + return getExperimentService().find(experimentName); + } } /* * $Log$ Modified: trunk/gee/src/java/edu/indiana/psych/gee/action/StartExperiment.java =================================================================== --- trunk/gee/src/java/edu/indiana/psych/gee/action/StartExperiment.java 2006-02-26 19:20:49 UTC (rev 111) +++ trunk/gee/src/java/edu/indiana/psych/gee/action/StartExperiment.java 2006-02-26 22:02:44 UTC (rev 112) @@ -1,5 +1,6 @@ package edu.indiana.psych.gee.action; +import edu.indiana.psych.gee.ConsentForm; import edu.indiana.psych.gee.Experiment; /** @@ -13,15 +14,14 @@ public class StartExperiment extends GeeAction { private String experimentName; - private Experiment experiment; private int participantAge; private String participantName; - + private ConsentForm consentForm; private String message; public String execute() { - experiment = getExperimentService().find(experimentName); + Experiment experiment = getExperiment(); if (experiment == Experiment.NULL) { // FIXME: this String does not belong here at all, should be // presentation-layer. Could provide a list and link of possible @@ -39,10 +39,20 @@ } public Experiment getExperiment() { - return experiment; + return getExperimentService().find(experimentName); } + public ConsentForm getConsentForm() { + if (consentForm == null) { + consentForm = getExperiment().getConsentForm(); + } + return consentForm; + } + public String getExperimentName() { + return experimentName; + } + public void setExperimentName(String experimentName) { this.experimentName = experimentName; } Added: trunk/gee/src/java/edu/indiana/psych/gee/action/StartExperiment.properties =================================================================== --- trunk/gee/src/java/edu/indiana/psych/gee/action/StartExperiment.properties (rev 0) +++ trunk/gee/src/java/edu/indiana/psych/gee/action/StartExperiment.properties 2006-02-26 22:02:44 UTC (rev 112) @@ -0,0 +1,2 @@ +approval.date = Approval Date: {0, date, MMMMMMMMM dd, yyyy} +approval.expiration.date = Expires: {0, date, MMMMMMMMM dd, yyyy} Modified: trunk/gee/war/WEB-INF/classes/xwork.xml =================================================================== --- trunk/gee/war/WEB-INF/classes/xwork.xml 2006-02-26 19:20:49 UTC (rev 111) +++ trunk/gee/war/WEB-INF/classes/xwork.xml 2006-02-26 22:02:44 UTC (rev 112) @@ -26,7 +26,7 @@ <action name="start" class="edu.indiana.psych.gee.action.StartExperiment"> <result name="success">startExperiment.jsp</result> <result name="error">error.jsp</result> - <result name="input" type="chain">consent</result> + <result name="input">getConsent.jsp</result> </action> <action name="consent" class="edu.indiana.psych.gee.action.PrepareConsentForm"> <result name="success">getConsent.jsp</result> @@ -42,7 +42,8 @@ <result name="success" type="freemarker">listExperiments.jsp</result> <result name="error">error.jsp</result> </action> - <action name="configure" class="edu.indiana.psych.gee.action.AdminAction" method="execute"> + <action name="configure" class="edu.indiana.psych.gee.action.AdminAction" method="configure"> + <result name="error" type="chain">configure</result> <result name="success">configureExperiment.jsp</result> </action> <action name="list" class="edu.indiana.psych.gee.action.AdminAction" method="listExperiments"> Modified: trunk/gee/war/getConsent.jsp =================================================================== --- trunk/gee/war/getConsent.jsp 2006-02-26 19:20:49 UTC (rev 111) +++ trunk/gee/war/getConsent.jsp 2006-02-26 22:02:44 UTC (rev 112) @@ -144,7 +144,7 @@ <small> IRB Approved <br/> -<%-- FIXME: use ConsentForm's dates --%> +<%-- FIXME: date approved is not getting reset appropriately after invalid input --%> <ww:text name="approval.date"> <ww:param name="value" value="consentForm.irbDateApproved"/> </ww:text> Modified: trunk/gee/war/includes/footer.jsp =================================================================== --- trunk/gee/war/includes/footer.jsp 2006-02-26 19:20:49 UTC (rev 111) +++ trunk/gee/war/includes/footer.jsp 2006-02-26 22:02:44 UTC (rev 112) @@ -1,22 +1,22 @@ <hr/> <table> <tr> -<td colspan="2"> -<small> -<A HREF="http://cognitrn.psych.indiana.edu/">Sponsored by the Percepts and Concepts Laboratory </A> -</small> -</td> + <td colspan="2"> + <small> + <a href="http://sourceforge.net/projects/gabel">Source code repository, mailing lists, and other development infrastructure miscellany provided by SourceForge.</a> + </small> + </td> </tr> <tr> -<td colspan="2"> -<small> -<a href="http://sourceforge.net/projects/gabel">Source code repository, mailing lists, and other development infrastructure miscellany provided by SourceForge.</a> -</small> -</td> + <td colspan="2"> + <small> + <A HREF="http://cognitrn.psych.indiana.edu/">Sponsored by the Percepts and Concepts Laboratory </A> + </small> + </td> </tr> <tr> <td> -<small>Last modified: <decorator:getProperty property="meta.lastModifiedDate" default="$Date$"/> </small> +<font size="-2">Last modified: <decorator:getProperty property="meta.lastModifiedDate" default="$Date$"/> </font> </td> <td align="right"> <a href="http://sourceforge.net"><img src="http://sflogo.sourceforge.net/sflogo.php?group_id=104532&type=1" width="88" height="31" border="0" alt="SourceForge.net Logo" /></a> Modified: trunk/gee/war/index.jsp =================================================================== --- trunk/gee/war/index.jsp 2006-02-26 19:20:49 UTC (rev 111) +++ trunk/gee/war/index.jsp 2006-02-26 22:02:44 UTC (rev 112) @@ -1,7 +1,6 @@ <%@ taglib prefix="ww" uri="webwork" %> <head> -<meta name="svnId" content="$Id$"/> <meta name="lastModifiedDate" content="$Date$"/> </head> This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |