Index: lams_tool_vote/src/java/org/lamsfoundation/lams/tool/vote/VoteStringComparator.java
===================================================================
diff -u -r08950e1090443c3423a3d1c587416a2fccd8bbdf -r601fd92095193321a6b2286ef55108fbe5f9dfc4
--- lams_tool_vote/src/java/org/lamsfoundation/lams/tool/vote/VoteStringComparator.java (.../VoteStringComparator.java) (revision 08950e1090443c3423a3d1c587416a2fccd8bbdf)
+++ lams_tool_vote/src/java/org/lamsfoundation/lams/tool/vote/VoteStringComparator.java (.../VoteStringComparator.java) (revision 601fd92095193321a6b2286ef55108fbe5f9dfc4)
@@ -25,16 +25,13 @@
import java.io.Serializable;
import java.util.Comparator;
-import org.apache.log4j.Logger;
-
/**
* @author Ozgur Demirtas
* * A comparator implementation that can be used as a constructor to collections.
* The TreeMap in the web layer makes use of it.
*
*/
public class VoteStringComparator implements Comparator, Serializable {
- static Logger logger = Logger.getLogger(VoteStringComparator.class.getName());
public int compare(Object o1, Object o2) {
String s1 = (String)o1;
Index: lams_tool_vote/src/java/org/lamsfoundation/lams/tool/vote/VoteUtils.java
===================================================================
diff -u -r618abc7cca98f08ef288878ab371a3693492d835 -r601fd92095193321a6b2286ef55108fbe5f9dfc4
--- lams_tool_vote/src/java/org/lamsfoundation/lams/tool/vote/VoteUtils.java (.../VoteUtils.java) (revision 618abc7cca98f08ef288878ab371a3693492d835)
+++ lams_tool_vote/src/java/org/lamsfoundation/lams/tool/vote/VoteUtils.java (.../VoteUtils.java) (revision 601fd92095193321a6b2286ef55108fbe5f9dfc4)
@@ -34,7 +34,6 @@
import javax.servlet.http.HttpServletRequest;
import javax.servlet.http.HttpSession;
-import org.apache.log4j.Logger;
import org.lamsfoundation.lams.tool.vote.pojos.VoteContent;
import org.lamsfoundation.lams.tool.vote.pojos.VoteSession;
import org.lamsfoundation.lams.tool.vote.pojos.VoteUploadedFile;
@@ -53,17 +52,13 @@
* @author Ozgur Demirtas
*/
public abstract class VoteUtils implements VoteAppConstants {
-
- static Logger logger = Logger.getLogger(VoteUtils.class.getName());
public static String replaceNewLines(String text)
{
- logger.debug("using text: " + text);
String newText = "";
if (text != null)
{
newText = text.replaceAll("\n","
");
- logger.debug("newText: " + newText);
}
return newText;
@@ -73,15 +68,13 @@
{
String userID = "";
HttpSession ss = SessionManager.getSession();
- logger.debug("ss: " + ss);
if (ss != null)
{
UserDTO user = (UserDTO) ss.getAttribute(AttributeNames.USER);
if ((user != null) && (user.getUserID() != null))
{
userID = user.getUserID().toString();
- logger.debug("retrieved userId: " + userID);
}
}
return userID;
@@ -100,7 +93,6 @@
public static Date getGMTDateTime()
{
Date date=new Date(System.currentTimeMillis());
- logger.debug("date: " + date);
return date;
}
@@ -112,7 +104,6 @@
HttpSession ss = SessionManager.getSession();
/* get back login user DTO */
UserDTO toolUser = (UserDTO) ss.getAttribute(AttributeNames.USER);
- logger.debug("retrieving toolUser: " + toolUser);
return toolUser;
}
@@ -121,7 +112,6 @@
{
UserDTO toolUser=getToolUser();
long userId=toolUser.getUserID().longValue();
- logger.debug("userId: " + userId);
return new Long(userId);
}
@@ -130,36 +120,29 @@
/* double check if username and login is the same */
UserDTO toolUser=getToolUser();
String userName=toolUser.getLogin();
- logger.debug("userName: " + userName);
return userName;
}
public static String getUserFullName()
{
UserDTO toolUser=getToolUser();
- String fullName=toolUser.getFirstName() + " " + toolUser.getLastName();
- logger.debug("fullName: " + fullName);
+ String fullName=toolUser.getFirstName() + " " + toolUser.getLastName();
return fullName;
}
public static String getFormattedDateString(Date date)
{
- logger.debug("getFormattedDateString: " +
- DateFormat.getDateTimeInstance(DateFormat.LONG, DateFormat.LONG).format(date));
return (DateFormat.getDateTimeInstance(DateFormat.LONG, DateFormat.LONG).format(date));
}
public static void saveTimeZone(HttpServletRequest request)
{
TimeZone timeZone=TimeZone.getDefault();
- logger.debug("current timezone: " + timeZone.getDisplayName());
- logger.debug("current timezone id: " + timeZone.getID());
}
public static String getCurrentTimeZone()
{
TimeZone timeZone=TimeZone.getDefault();
- logger.debug("current timezone: " + timeZone.getDisplayName());
return timeZone.getDisplayName();
}
@@ -172,10 +155,8 @@
*/
public static boolean existsContent(Long toolContentId, HttpServletRequest request, IVoteService voteService)
{
- logger.debug("voteService: " + voteService);
VoteContent voteContent=voteService.retrieveVote(toolContentId);
- logger.debug("retrieving voteContent: " + voteContent);
if (voteContent == null)
return false;
@@ -191,10 +172,8 @@
*/
public static boolean existsSession(Long toolSessionId, HttpServletRequest request, IVoteService voteService)
{
- logger.debug("voteService: " + voteService);
VoteSession voteSession=voteService.retrieveVoteSession(toolSessionId);
- logger.debug("voteSession:" + voteSession);
if (voteSession == null)
return false;
@@ -206,7 +185,6 @@
public static void readContentValues(HttpServletRequest request, VoteContent defaultVoteContent,
VoteAuthoringForm voteAuthoringForm, VoteGeneralAuthoringDTO voteGeneralAuthoringDTO)
{
- logger.debug("setting authoring screen properties");
/*should never be null anyway as default content MUST exist in the db*/
if(defaultVoteContent == null)
throw new NullPointerException("Default VoteContent cannot be null");
@@ -235,14 +213,12 @@
String maxNomcount= defaultVoteContent.getMaxNominationCount();
- logger.debug("maxNomcount: " + maxNomcount);
if (maxNomcount.equals(""))
maxNomcount="0";
voteAuthoringForm.setMaxNominationCount(maxNomcount);
voteGeneralAuthoringDTO.setMaxNominationCount(maxNomcount);
String minNomcount= defaultVoteContent.getMinNominationCount();
- logger.debug("minNomcount: " + minNomcount);
if ((minNomcount == null) || minNomcount.equals(""))
minNomcount="0";
voteAuthoringForm.setMinNominationCount(minNomcount);
@@ -263,10 +239,9 @@
}
}
- logger.debug("trimmed noHtmlNoNewLineStr: " + noHtmlNoNewLineStr.trim());
if (noHtmlNoNewLineStr.trim().length()==0)
{
- logger.debug("nomination text is just composed of html markup, try getting just a src entry for a picture otherwise give up.");
+ //nomination text is just composed of html markup, try getting just a src entry for a picture otherwise give up
htmlText = htmlText.toLowerCase();
int index = htmlText.indexOf("src");
if ( index > -1 ) {
@@ -302,20 +277,16 @@
public static void saveRichText(HttpServletRequest request, VoteGeneralAuthoringDTO voteGeneralAuthoringDTO,
SessionMap sessionMap)
{
- logger.debug("doing saveRichText, sessionMap: " + sessionMap);
String richTextTitle = request.getParameter(TITLE);
String richTextInstructions = request.getParameter(INSTRUCTIONS);
- logger.debug("richTextTitle: " + richTextTitle);
- logger.debug("richTextInstructions: " + richTextInstructions);
if (richTextTitle != null)
{
voteGeneralAuthoringDTO.setActivityTitle(richTextTitle);
}
String noHTMLTitle = stripHTML(richTextTitle);
- logger.debug("noHTMLTitle: " + noHTMLTitle);
if (richTextInstructions != null)
@@ -324,7 +295,6 @@
}
String richTextOfflineInstructions=request.getParameter(RICHTEXT_OFFLINEINSTRUCTIONS);
- logger.debug("read parameter richTextOfflineInstructions: " + richTextOfflineInstructions);
if ((richTextOfflineInstructions != null) && (richTextOfflineInstructions.length() > 0))
{
@@ -333,7 +303,6 @@
}
String richTextOnlineInstructions=request.getParameter(RICHTEXT_ONLINEINSTRUCTIONS);
- logger.debug("read parameter richTextOnlineInstructions: " + richTextOnlineInstructions);
if ((richTextOnlineInstructions != null) && (richTextOnlineInstructions.length() > 0))
{
@@ -345,9 +314,7 @@
public static void configureContentRepository(HttpServletRequest request, IVoteService voteService)
{
- logger.debug("attempt configureContentRepository");
voteService.configureContentRepository();
- logger.debug("configureContentRepository ran successfully");
}
@@ -360,7 +327,6 @@
{
HttpSession ss = SessionManager.getSession();
UserDTO user = (UserDTO) ss.getAttribute(AttributeNames.USER);
- logger.debug(logger + " " + "VoteUtils" + " Current user is: " + user + " with id: " + user.getUserID());
return user.getUserID().intValue();
}
@@ -396,7 +362,6 @@
public static Map convertToMap(List sessionsList, String listType)
{
Map map= new TreeMap(new VoteComparator());
- logger.debug("listType: " + listType);
Iterator listIterator=sessionsList.iterator();
Long mapIndex=new Long(1);
@@ -430,7 +395,6 @@
public static Map convertToStringMap(List sessionsList, String listType)
{
Map map= new TreeMap(new VoteComparator());
- logger.debug("listType: " + listType);
Iterator listIterator=sessionsList.iterator();
Long mapIndex=new Long(1);
@@ -440,13 +404,11 @@
{
if (listType.equals("String"))
{
- logger.debug("listType String");
String text=(String)listIterator.next();
map.put(mapIndex.toString(), text);
}
else if (listType.equals("Long"))
{
- logger.debug("listType Long");
Long LongValue=(Long)listIterator.next();
map.put(mapIndex.toString(), LongValue.toString());
}
@@ -467,7 +429,6 @@
*/
public static boolean isContentInUse(VoteContent voteContent)
{
- logger.debug("is content inuse: " + voteContent.isContentInUse());
return voteContent.isContentInUse();
}
@@ -481,7 +442,6 @@
*/
public static boolean isDefineLater(VoteContent voteContent)
{
- logger.debug("is define later: " + voteContent.isDefineLater());
return voteContent.isDefineLater();
}
@@ -495,43 +455,38 @@
*/
public static boolean isRunOffline(VoteContent voteContent)
{
- logger.debug("is run offline: " + voteContent.isRunOffline());
return voteContent.isRunOffline();
}
public static String getDestination(String sourceVoteStarter)
{
- logger.debug("sourceVoteStarter: " + sourceVoteStarter);
if ((sourceVoteStarter != null) && !sourceVoteStarter.equals("monitoring"))
{
- logger.debug("request is from authoring or define Later url. return to: " + LOAD_QUESTIONS);
+ //request is from authoring or define Later url. return to: LOAD_QUESTIONS
return LOAD_QUESTIONS;
}
else if (sourceVoteStarter == null)
{
- logger.debug("request is from authoring url. return to: " + LOAD_QUESTIONS);
+ //request is from authoring url. return to: LOAD_QUESTIONS
return LOAD_QUESTIONS;
}
else
{
- logger.debug("request is from monitoring url. return to: " + LOAD_MONITORING_CONTENT_EDITACTIVITY);
+ //request is from monitoring url. return to: LOAD_MONITORING_CONTENT_EDITACTIVITY
return LOAD_MONITORING_CONTENT_EDITACTIVITY;
}
}
public static void setDefineLater(HttpServletRequest request, boolean value, IVoteService voteService, String toolContentID)
{
- logger.debug("toolContentID:" + toolContentID);
VoteContent voteContent=voteService.retrieveVote(new Long(toolContentID));
- logger.debug("voteContent:" + voteContent);
if (voteContent != null)
{
voteContent.setDefineLater(value);
- logger.debug("defineLater has been set to value: " + value);
voteService.updateVote(voteContent);
}
}
@@ -545,7 +500,6 @@
public static void cleanUpSessionAbsolute(HttpServletRequest request)
{
cleanUpUserExceptions(request);
- logger.debug("completely cleaned the session.");
}
/**
@@ -597,11 +551,6 @@
VoteAuthoringForm voteAuthoringForm, VoteGeneralAuthoringDTO voteGeneralAuthoringDTO, String strToolContentID,
String defaultContentIdStr, String activeModule, SessionMap sessionMap, String httpSessionID)
{
- logger.debug("setFormProperties: ");
- logger.debug("using strToolContentID: " + strToolContentID);
- logger.debug("using defaultContentIdStr: " + defaultContentIdStr);
- logger.debug("using activeModule: " + activeModule);
- logger.debug("using httpSessionID: " + httpSessionID);
voteAuthoringForm.setHttpSessionID(httpSessionID);
voteGeneralAuthoringDTO.setHttpSessionID(httpSessionID);
@@ -615,12 +564,10 @@
voteGeneralAuthoringDTO.setActiveModule(activeModule);
String lockOnFinish=request.getParameter("lockOnFinish");
- logger.debug("lockOnFinish: " + lockOnFinish);
voteAuthoringForm.setLockOnFinish(lockOnFinish);
voteGeneralAuthoringDTO.setLockOnFinish(lockOnFinish);
String allowText=request.getParameter("allowText");
- logger.debug("allowText: " + allowText);
voteAuthoringForm.setAllowText(allowText);
voteGeneralAuthoringDTO.setAllowText(allowText);
@@ -629,49 +576,36 @@
voteGeneralAuthoringDTO.setShowResults(showResults);
String maxNominationCount=request.getParameter("maxNominationCount");
- logger.debug("maxNominationCount: " + maxNominationCount);
voteAuthoringForm.setMaxNominationCount(maxNominationCount);
voteGeneralAuthoringDTO.setMaxNominationCount(maxNominationCount);
String reflect=request.getParameter("reflect");
- logger.debug("reflect: " + maxNominationCount);
voteAuthoringForm.setReflect(reflect);
voteGeneralAuthoringDTO.setReflect(reflect);
String reflectionSubject=request.getParameter("reflectionSubject");
- logger.debug("reflectionSubject: " + reflectionSubject);
voteAuthoringForm.setReflectionSubject(reflectionSubject);
voteGeneralAuthoringDTO.setReflectionSubject(reflectionSubject);
String offlineInstructions=request.getParameter(OFFLINE_INSTRUCTIONS);
- logger.debug("offlineInstructions: " + offlineInstructions);
voteAuthoringForm.setOfflineInstructions(offlineInstructions);
voteGeneralAuthoringDTO.setOfflineInstructions(offlineInstructions);
String onlineInstructions=request.getParameter(ONLINE_INSTRUCTIONS);
- logger.debug("onlineInstructions: " + onlineInstructions);
voteAuthoringForm.setOnlineInstructions(onlineInstructions);
voteGeneralAuthoringDTO.setOnlineInstructions(onlineInstructions);
-
- logger.debug("ending setFormProperties with voteAuthoringForm: " + voteAuthoringForm);
- logger.debug("ending setFormProperties with voteGeneralAuthoringDTO: " + voteGeneralAuthoringDTO);
}
public static void setDefineLater(HttpServletRequest request, boolean value, String strToolContentID, IVoteService voteService)
{
- logger.debug("voteService: " + voteService);
- logger.debug("value:" + value);
- logger.debug("strToolContentID:" + strToolContentID);
VoteContent voteContent=voteService.retrieveVote(new Long(strToolContentID));
- logger.debug("voteContent:" + voteContent);
if (voteContent != null)
{
voteContent.setDefineLater(value);
- logger.debug("defineLater has been set to:" + value);
voteService.updateVote(voteContent);
}
}
@@ -683,35 +617,25 @@
* then tries to match on that, otherwise uses filename and isOnline. */
public static List moveToDelete(String uuid, List attachmentsList, List deletedAttachmentsList ) {
- logger.debug("doing moveToDelete: " + attachmentsList);
- logger.debug("doing moveToDelete: " + deletedAttachmentsList);
List deletedList = deletedAttachmentsList != null ? deletedAttachmentsList : new ArrayList();
- logger.debug("deletedList: " + deletedList);
-
if ( attachmentsList != null ) {
- logger.debug("attachmentsList not null: " + attachmentsList);
Iterator iter = attachmentsList.iterator();
VoteUploadedFile attachment = null;
while ( iter.hasNext() && attachment == null ) {
VoteUploadedFile value = (VoteUploadedFile) iter.next();
- logger.debug("value: " + value);
if ( uuid.equals(value.getUuid()) ) {
- logger.debug("value made attachment:");
attachment = value;
}
}
- if ( attachment != null ) {
- logger.debug("attachment not null");
+ if ( attachment != null ) {
deletedList.add(attachment);
attachmentsList.remove(attachment);
}
}
- logger.debug("final attachmentsList: " + attachmentsList);
- logger.debug("final deletedAttachmentsList: " + deletedAttachmentsList);
return deletedList;
}
Index: lams_tool_vote/src/java/org/lamsfoundation/lams/tool/vote/dao/hibernate/VoteContentDAO.java
===================================================================
diff -u -r2ed86809be97c2553630665e20d6cc21b57c531c -r601fd92095193321a6b2286ef55108fbe5f9dfc4
--- lams_tool_vote/src/java/org/lamsfoundation/lams/tool/vote/dao/hibernate/VoteContentDAO.java (.../VoteContentDAO.java) (revision 2ed86809be97c2553630665e20d6cc21b57c531c)
+++ lams_tool_vote/src/java/org/lamsfoundation/lams/tool/vote/dao/hibernate/VoteContentDAO.java (.../VoteContentDAO.java) (revision 601fd92095193321a6b2286ef55108fbe5f9dfc4)
@@ -25,7 +25,6 @@
import java.util.List;
import java.util.Set;
-import org.apache.log4j.Logger;
import org.hibernate.FlushMode;
import org.hibernate.HibernateException;
import org.hibernate.Session;
@@ -46,7 +45,6 @@
*/
public class VoteContentDAO extends HibernateDaoSupport implements IVoteContentDAO {
- static Logger logger = Logger.getLogger(VoteContentDAO.class.getName());
private static final String FIND_VOTE_CONTENT = "from " + VoteContent.class.getName()
+ " as vote where content_id=?";
@@ -60,7 +58,6 @@
public void saveOrUpdateVote(VoteContent vote) {
this.getSession().setFlushMode(FlushMode.AUTO);
- VoteContentDAO.logger.debug("before saveOrUpdateVote: " + vote);
this.getHibernateTemplate().saveOrUpdate(vote);
}
@@ -88,9 +85,7 @@
public void saveVoteContent(VoteContent voteContent) {
this.getSession().setFlushMode(FlushMode.AUTO);
- VoteContentDAO.logger.debug("before saveOrUpdate");
this.getHibernateTemplate().saveOrUpdate(voteContent);
- VoteContentDAO.logger.debug("after saveOrUpdate");
}
public void updateVoteContent(VoteContent voteContent) {
Index: lams_tool_vote/src/java/org/lamsfoundation/lams/tool/vote/dao/hibernate/VoteQueContentDAO.java
===================================================================
diff -u -r2ed86809be97c2553630665e20d6cc21b57c531c -r601fd92095193321a6b2286ef55108fbe5f9dfc4
--- lams_tool_vote/src/java/org/lamsfoundation/lams/tool/vote/dao/hibernate/VoteQueContentDAO.java (.../VoteQueContentDAO.java) (revision 2ed86809be97c2553630665e20d6cc21b57c531c)
+++ lams_tool_vote/src/java/org/lamsfoundation/lams/tool/vote/dao/hibernate/VoteQueContentDAO.java (.../VoteQueContentDAO.java) (revision 601fd92095193321a6b2286ef55108fbe5f9dfc4)
@@ -24,7 +24,6 @@
import java.util.Iterator;
import java.util.List;
-import org.apache.log4j.Logger;
import org.hibernate.FlushMode;
import org.lamsfoundation.lams.tool.vote.dao.IVoteQueContentDAO;
import org.lamsfoundation.lams.tool.vote.pojos.VoteQueContent;
@@ -40,7 +39,6 @@
*
- * Action class that controls the logic of tool behavior. - *
- * - *- * Note that Struts action class only has the responsibility to navigate page flow. All database operation should go to - * service layer and data transformation from domain model to struts form bean should go to form bean class. This ensure - * clean and maintainable code. - *
- * - *SystemException
is thrown whenever an known error condition is identified. No system exception error
- * handling code should appear in the Struts action class as all of them are handled in
- * CustomStrutsExceptionHandler.
- *
- *
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
- *
*/
public class VoteAction extends LamsDispatchAction implements VoteAppConstants {
static Logger logger = Logger.getLogger(VoteAction.class.getName());
private VoteToolContentHandler toolContentHandler;
/**
- *
- * Default struts dispatch method.
- *
*
- *
- * It is assuming that progress engine should pass in the tool access mode and the tool session id as http
- * parameters.
- *
- *
- * @param mapping
- * An ActionMapping class that will be used by the Action class to tell the ActionServlet where to
- * send the end-user.
- *
- * @param form
- * The ActionForm class that will contain any data submitted by the end-user via a form.
- * @param request
- * A standard Servlet HttpServletRequest class.
- * @param response
- * A standard Servlet HttpServletResponse class.
- * @return An ActionForward class that will be returned to the ActionServlet indicating where the user is to go
- * next.
- * @throws IOException
- * @throws ServletException
- * @throws VoteApplicationException
- * the known runtime exception
- *
- * unspecified(ActionMapping mapping, ActionForm form, HttpServletRequest request, HttpServletResponse response)
- * throws IOException, ServletException
- *
* main content/question content management and workflow logic
*
* if the passed toolContentID exists in the db, we need to get the relevant data into the Map if not, create the
@@ -209,71 +110,51 @@
public ActionForward submitOfflineFiles(ActionMapping mapping, ActionForm form, HttpServletRequest request,
HttpServletResponse response) throws IOException, ServletException, RepositoryCheckedException {
VoteUtils.cleanUpUserExceptions(request);
- VoteAction.logger.debug("dispatching submitOfflineFile...");
IVoteService voteService = VoteServiceProxy.getVoteService(getServlet().getServletContext());
- VoteAction.logger.debug("voteService: " + voteService);
VoteAuthoringForm voteAuthoringForm = (VoteAuthoringForm) form;
- VoteAction.logger.debug("voteAuthoringForm :" + voteAuthoringForm);
VoteGeneralAuthoringDTO voteGeneralAuthoringDTO = new VoteGeneralAuthoringDTO();
String contentFolderID = WebUtil.readStrParam(request, AttributeNames.PARAM_CONTENT_FOLDER_ID);
- VoteAction.logger.debug("contentFolderID: " + contentFolderID);
voteAuthoringForm.setContentFolderID(contentFolderID);
repopulateRequestParameters(request, voteAuthoringForm, voteGeneralAuthoringDTO);
String httpSessionID = voteAuthoringForm.getHttpSessionID();
- VoteAction.logger.debug("httpSessionID: " + httpSessionID);
SessionMap sessionMap = (SessionMap) request.getSession().getAttribute(httpSessionID);
- VoteAction.logger.debug("sessionMap: " + sessionMap);
Map mapOptionsContent = (Map) sessionMap.get(VoteAppConstants.MAP_OPTIONS_CONTENT_KEY);
- VoteAction.logger.debug("mapOptionsContent: " + mapOptionsContent);
voteGeneralAuthoringDTO.setMapOptionsContent(mapOptionsContent);
int maxIndex = mapOptionsContent.size();
- VoteAction.logger.debug("maxIndex: " + maxIndex);
voteGeneralAuthoringDTO.setMaxOptionIndex(maxIndex);
String firstEntry = (String) mapOptionsContent.get("1");
- VoteAction.logger.debug("firstEntry: " + firstEntry);
voteGeneralAuthoringDTO.setDefaultOptionContent(firstEntry);
voteAuthoringForm.setSubmissionAttempt(new Boolean(false).toString());
voteGeneralAuthoringDTO.setSubmissionAttempt(new Boolean(false).toString());
/* determine whether the request is from Monitoring url Edit Activity */
String sourceVoteStarter = (String) request.getAttribute(VoteAppConstants.SOURCE_VOTE_STARTER);
- VoteAction.logger.debug("sourceVoteStarter: " + sourceVoteStarter);
String destination = VoteUtils.getDestination(sourceVoteStarter);
- VoteAction.logger.debug("destination: " + destination);
VoteUtils.saveRichText(request, voteGeneralAuthoringDTO, sessionMap);
- VoteAction.logger.debug("will uploadFile for offline file:");
VoteAttachmentDTO voteAttachmentDTO = AuthoringUtil.uploadFile(request, voteService, voteAuthoringForm, true,
sessionMap);
- VoteAction.logger.debug("returned voteAttachmentDTO:" + voteAttachmentDTO);
- VoteAction.logger.debug("returned sessionMap:" + sessionMap);
-
List listOfflineFilesMetaData = (List) sessionMap.get(VoteAppConstants.LIST_OFFLINEFILES_METADATA_KEY);
- VoteAction.logger.debug("listOfflineFilesMetaData:" + listOfflineFilesMetaData);
if (voteAttachmentDTO != null) {
listOfflineFilesMetaData.add(voteAttachmentDTO);
}
- VoteAction.logger.debug("listOfflineFilesMetaData after add:" + listOfflineFilesMetaData);
sessionMap.put(VoteAppConstants.LIST_OFFLINEFILES_METADATA_KEY, listOfflineFilesMetaData);
voteGeneralAuthoringDTO.setListOfflineFilesMetadata(listOfflineFilesMetaData);
- VoteAction.logger.debug("active module is: " + voteAuthoringForm.getActiveModule());
-
List listOnlineFilesMetaData = (List) sessionMap.get(VoteAppConstants.LIST_ONLINEFILES_METADATA_KEY);
- VoteAction.logger.debug("listOnlineFilesMetaData:" + listOnlineFilesMetaData);
voteGeneralAuthoringDTO.setListOnlineFilesMetadata(listOnlineFilesMetaData);
if (voteAttachmentDTO == null) {
@@ -285,16 +166,11 @@
voteAuthoringForm.resetUserAction();
persistInRequestError(request, "error.fileName.empty");
- VoteAction.logger.debug("voteGeneralAuthoringDTO: " + voteGeneralAuthoringDTO);
request.setAttribute(VoteAppConstants.VOTE_GENERAL_AUTHORING_DTO, voteGeneralAuthoringDTO);
-
return mapping.findForward(destination);
}
- VoteAction.logger.debug("voteGeneralAuthoringDTO: " + voteGeneralAuthoringDTO);
request.setAttribute(VoteAppConstants.VOTE_GENERAL_AUTHORING_DTO, voteGeneralAuthoringDTO);
-
- VoteAction.logger.debug("persisting sessionMap into session: " + sessionMap);
request.getSession().setAttribute(httpSessionID, sessionMap);
voteAuthoringForm.resetUserAction();
@@ -316,71 +192,49 @@
public ActionForward submitOnlineFiles(ActionMapping mapping, ActionForm form, HttpServletRequest request,
HttpServletResponse response) throws IOException, ServletException, RepositoryCheckedException {
VoteUtils.cleanUpUserExceptions(request);
- VoteAction.logger.debug("dispatching submitOnlineFiles...");
IVoteService voteService = VoteServiceProxy.getVoteService(getServlet().getServletContext());
- VoteAction.logger.debug("voteService: " + voteService);
-
VoteAuthoringForm voteAuthoringForm = (VoteAuthoringForm) form;
- VoteAction.logger.debug("voteAuthoringForm :" + voteAuthoringForm);
VoteGeneralAuthoringDTO voteGeneralAuthoringDTO = new VoteGeneralAuthoringDTO();
repopulateRequestParameters(request, voteAuthoringForm, voteGeneralAuthoringDTO);
String contentFolderID = WebUtil.readStrParam(request, AttributeNames.PARAM_CONTENT_FOLDER_ID);
- VoteAction.logger.debug("contentFolderID: " + contentFolderID);
voteAuthoringForm.setContentFolderID(contentFolderID);
String httpSessionID = voteAuthoringForm.getHttpSessionID();
- VoteAction.logger.debug("httpSessionID: " + httpSessionID);
-
SessionMap sessionMap = (SessionMap) request.getSession().getAttribute(httpSessionID);
- VoteAction.logger.debug("sessionMap: " + sessionMap);
Map mapOptionsContent = (Map) sessionMap.get(VoteAppConstants.MAP_OPTIONS_CONTENT_KEY);
- VoteAction.logger.debug("mapOptionsContent: " + mapOptionsContent);
voteGeneralAuthoringDTO.setMapOptionsContent(mapOptionsContent);
int maxIndex = mapOptionsContent.size();
- VoteAction.logger.debug("maxIndex: " + maxIndex);
voteGeneralAuthoringDTO.setMaxOptionIndex(maxIndex);
String firstEntry = (String) mapOptionsContent.get("1");
- VoteAction.logger.debug("firstEntry: " + firstEntry);
voteGeneralAuthoringDTO.setDefaultOptionContent(firstEntry);
voteAuthoringForm.setSubmissionAttempt(new Boolean(false).toString());
voteGeneralAuthoringDTO.setSubmissionAttempt(new Boolean(false).toString());
/* determine whether the request is from Monitoring url Edit Activity */
String sourceVoteStarter = (String) request.getAttribute(VoteAppConstants.SOURCE_VOTE_STARTER);
- VoteAction.logger.debug("sourceVoteStarter: " + sourceVoteStarter);
String destination = VoteUtils.getDestination(sourceVoteStarter);
- VoteAction.logger.debug("destination: " + destination);
VoteUtils.saveRichText(request, voteGeneralAuthoringDTO, sessionMap);
- VoteAction.logger.debug("will uploadFile for online file:");
VoteAttachmentDTO voteAttachmentDTO = AuthoringUtil.uploadFile(request, voteService, voteAuthoringForm, false,
sessionMap);
- VoteAction.logger.debug("returned voteAttachmentDTO:" + voteAttachmentDTO);
- VoteAction.logger.debug("returned sessionMap:" + sessionMap);
-
List listOnlineFilesMetaData = (List) sessionMap.get(VoteAppConstants.LIST_ONLINEFILES_METADATA_KEY);
- VoteAction.logger.debug("listOnlineFilesMetaData:" + listOnlineFilesMetaData);
if (voteAttachmentDTO != null) {
listOnlineFilesMetaData.add(voteAttachmentDTO);
}
- VoteAction.logger.debug("listOnlineFilesMetaData after add:" + listOnlineFilesMetaData);
sessionMap.put(VoteAppConstants.LIST_ONLINEFILES_METADATA_KEY, listOnlineFilesMetaData);
voteGeneralAuthoringDTO.setListOnlineFilesMetadata(listOnlineFilesMetaData);
- VoteAction.logger.debug("active module is: " + voteAuthoringForm.getActiveModule());
-
List listOfflineFilesMetaData = (List) sessionMap.get(VoteAppConstants.LIST_OFFLINEFILES_METADATA_KEY);
- VoteAction.logger.debug("listOfflineFilesMetaData:" + listOfflineFilesMetaData);
voteGeneralAuthoringDTO.setListOfflineFilesMetadata(listOfflineFilesMetaData);
if (voteAttachmentDTO == null) {
@@ -392,16 +246,12 @@
voteAuthoringForm.resetUserAction();
persistInRequestError(request, "error.fileName.empty");
- VoteAction.logger.debug("voteGeneralAuthoringDTO: " + voteGeneralAuthoringDTO);
request.setAttribute(VoteAppConstants.VOTE_GENERAL_AUTHORING_DTO, voteGeneralAuthoringDTO);
return mapping.findForward(destination);
}
- VoteAction.logger.debug("voteGeneralAuthoringDTO: " + voteGeneralAuthoringDTO);
request.setAttribute(VoteAppConstants.VOTE_GENERAL_AUTHORING_DTO, voteGeneralAuthoringDTO);
-
- VoteAction.logger.debug("persisting sessionMap into session: " + sessionMap);
request.getSession().setAttribute(httpSessionID, sessionMap);
voteAuthoringForm.resetUserAction();
@@ -424,71 +274,52 @@
{
VoteUtils.cleanUpUserExceptions(request);
- VoteAction.logger.debug("dispatching deleteOfflineFile...");
IVoteService voteService = VoteServiceProxy.getVoteService(getServlet().getServletContext());
- VoteAction.logger.debug("voteService: " + voteService);
VoteAuthoringForm voteAuthoringForm = (VoteAuthoringForm) form;
- VoteAction.logger.debug("voteAuthoringForm :" + voteAuthoringForm);
VoteGeneralAuthoringDTO voteGeneralAuthoringDTO = new VoteGeneralAuthoringDTO();
String contentFolderID = WebUtil.readStrParam(request, AttributeNames.PARAM_CONTENT_FOLDER_ID);
- VoteAction.logger.debug("contentFolderID: " + contentFolderID);
voteAuthoringForm.setContentFolderID(contentFolderID);
repopulateRequestParameters(request, voteAuthoringForm, voteGeneralAuthoringDTO);
String httpSessionID = voteAuthoringForm.getHttpSessionID();
- VoteAction.logger.debug("httpSessionID: " + httpSessionID);
SessionMap sessionMap = (SessionMap) request.getSession().getAttribute(httpSessionID);
- VoteAction.logger.debug("sessionMap: " + sessionMap);
Map mapOptionsContent = (Map) sessionMap.get(VoteAppConstants.MAP_OPTIONS_CONTENT_KEY);
- VoteAction.logger.debug("mapOptionsContent: " + mapOptionsContent);
voteGeneralAuthoringDTO.setMapOptionsContent(mapOptionsContent);
int maxIndex = mapOptionsContent.size();
- VoteAction.logger.debug("maxIndex: " + maxIndex);
voteGeneralAuthoringDTO.setMaxOptionIndex(maxIndex);
String firstEntry = (String) mapOptionsContent.get("1");
- VoteAction.logger.debug("firstEntry: " + firstEntry);
voteGeneralAuthoringDTO.setDefaultOptionContent(firstEntry);
voteAuthoringForm.setSubmissionAttempt(new Boolean(false).toString());
voteGeneralAuthoringDTO.setSubmissionAttempt(new Boolean(false).toString());
/* determine whether the request is from Monitoring url Edit Activity */
String sourceVoteStarter = (String) request.getAttribute(VoteAppConstants.SOURCE_VOTE_STARTER);
- VoteAction.logger.debug("sourceVoteStarter: " + sourceVoteStarter);
String destination = VoteUtils.getDestination(sourceVoteStarter);
- VoteAction.logger.debug("destination: " + destination);
VoteUtils.saveRichText(request, voteGeneralAuthoringDTO, sessionMap);
String uuid = voteAuthoringForm.getUuid();
- VoteAction.logger.debug("uuid:" + uuid);
List listOfflineFilesMetaData = (List) sessionMap.get(VoteAppConstants.LIST_OFFLINEFILES_METADATA_KEY);
- VoteAction.logger.debug("listOfflineFilesMetaData:" + listOfflineFilesMetaData);
listOfflineFilesMetaData = AuthoringUtil.removeFileItem(listOfflineFilesMetaData, uuid);
- VoteAction.logger.debug("listOfflineFilesMetaData after remove:" + listOfflineFilesMetaData);
sessionMap.put(VoteAppConstants.LIST_OFFLINEFILES_METADATA_KEY, listOfflineFilesMetaData);
voteGeneralAuthoringDTO.setListOfflineFilesMetadata(listOfflineFilesMetaData);
- VoteAction.logger.debug("active module is: " + voteAuthoringForm.getActiveModule());
-
List listOnlineFilesMetaData = (List) sessionMap.get(VoteAppConstants.LIST_ONLINEFILES_METADATA_KEY);
- VoteAction.logger.debug("listOnlineFilesMetaData:" + listOnlineFilesMetaData);
voteGeneralAuthoringDTO.setListOnlineFilesMetadata(listOnlineFilesMetaData);
- VoteAction.logger.debug("voteGeneralAuthoringDTO: " + voteGeneralAuthoringDTO);
request.setAttribute(VoteAppConstants.VOTE_GENERAL_AUTHORING_DTO, voteGeneralAuthoringDTO);
- VoteAction.logger.debug("persisting sessionMap into session: " + sessionMap);
request.getSession().setAttribute(httpSessionID, sessionMap);
voteAuthoringForm.resetUserAction();
@@ -512,71 +343,52 @@
{
VoteUtils.cleanUpUserExceptions(request);
- VoteAction.logger.debug("dispatching deleteOnlineFile...");
IVoteService voteService = VoteServiceProxy.getVoteService(getServlet().getServletContext());
- VoteAction.logger.debug("voteService: " + voteService);
VoteAuthoringForm voteAuthoringForm = (VoteAuthoringForm) form;
- VoteAction.logger.debug("voteAuthoringForm :" + voteAuthoringForm);
VoteGeneralAuthoringDTO voteGeneralAuthoringDTO = new VoteGeneralAuthoringDTO();
String contentFolderID = WebUtil.readStrParam(request, AttributeNames.PARAM_CONTENT_FOLDER_ID);
- VoteAction.logger.debug("contentFolderID: " + contentFolderID);
voteAuthoringForm.setContentFolderID(contentFolderID);
repopulateRequestParameters(request, voteAuthoringForm, voteGeneralAuthoringDTO);
String httpSessionID = voteAuthoringForm.getHttpSessionID();
- VoteAction.logger.debug("httpSessionID: " + httpSessionID);
SessionMap sessionMap = (SessionMap) request.getSession().getAttribute(httpSessionID);
- VoteAction.logger.debug("sessionMap: " + sessionMap);
Map mapOptionsContent = (Map) sessionMap.get(VoteAppConstants.MAP_OPTIONS_CONTENT_KEY);
- VoteAction.logger.debug("mapOptionsContent: " + mapOptionsContent);
voteGeneralAuthoringDTO.setMapOptionsContent(mapOptionsContent);
int maxIndex = mapOptionsContent.size();
- VoteAction.logger.debug("maxIndex: " + maxIndex);
voteGeneralAuthoringDTO.setMaxOptionIndex(maxIndex);
String firstEntry = (String) mapOptionsContent.get("1");
- VoteAction.logger.debug("firstEntry: " + firstEntry);
voteGeneralAuthoringDTO.setDefaultOptionContent(firstEntry);
voteAuthoringForm.setSubmissionAttempt(new Boolean(false).toString());
voteGeneralAuthoringDTO.setSubmissionAttempt(new Boolean(false).toString());
/* determine whether the request is from Monitoring url Edit Activity */
String sourceVoteStarter = (String) request.getAttribute(VoteAppConstants.SOURCE_VOTE_STARTER);
- VoteAction.logger.debug("sourceVoteStarter: " + sourceVoteStarter);
String destination = VoteUtils.getDestination(sourceVoteStarter);
- VoteAction.logger.debug("destination: " + destination);
VoteUtils.saveRichText(request, voteGeneralAuthoringDTO, sessionMap);
String uuid = voteAuthoringForm.getUuid();
- VoteAction.logger.debug("uuid:" + uuid);
List listOnlineFilesMetaData = (List) sessionMap.get(VoteAppConstants.LIST_ONLINEFILES_METADATA_KEY);
- VoteAction.logger.debug("listOnlineFilesMetaData:" + listOnlineFilesMetaData);
listOnlineFilesMetaData = AuthoringUtil.removeFileItem(listOnlineFilesMetaData, uuid);
- VoteAction.logger.debug("listOnlineFilesMetaData after remove:" + listOnlineFilesMetaData);
sessionMap.put(VoteAppConstants.LIST_ONLINEFILES_METADATA_KEY, listOnlineFilesMetaData);
voteGeneralAuthoringDTO.setListOnlineFilesMetadata(listOnlineFilesMetaData);
- VoteAction.logger.debug("active module is: " + voteAuthoringForm.getActiveModule());
-
List listOfflineFilesMetaData = (List) sessionMap.get(VoteAppConstants.LIST_OFFLINEFILES_METADATA_KEY);
- VoteAction.logger.debug("listOfflineFilesMetaData:" + listOfflineFilesMetaData);
voteGeneralAuthoringDTO.setListOfflineFilesMetadata(listOfflineFilesMetaData);
- VoteAction.logger.debug("voteGeneralAuthoringDTO: " + voteGeneralAuthoringDTO);
request.setAttribute(VoteAppConstants.VOTE_GENERAL_AUTHORING_DTO, voteGeneralAuthoringDTO);
- VoteAction.logger.debug("persisting sessionMap into session: " + sessionMap);
request.getSession().setAttribute(httpSessionID, sessionMap);
voteAuthoringForm.resetUserAction();
@@ -598,41 +410,29 @@
*/
public ActionForward editActivityQuestions(ActionMapping mapping, ActionForm form, HttpServletRequest request,
HttpServletResponse response) throws IOException, ServletException, ToolException {
- VoteAction.logger.debug("dispatching editActivityQuestions...");
VoteAuthoringForm voteAuthoringForm = (VoteAuthoringForm) form;
- VoteAction.logger.debug("voteAuthoringForm: " + voteAuthoringForm);
IVoteService voteService = VoteServiceProxy.getVoteService(getServlet().getServletContext());
- VoteAction.logger.debug("voteService: " + voteService);
String httpSessionID = voteAuthoringForm.getHttpSessionID();
- VoteAction.logger.debug("httpSessionID: " + httpSessionID);
voteAuthoringForm.setHttpSessionID(httpSessionID);
SessionMap sessionMap = (SessionMap) request.getSession().getAttribute(httpSessionID);
- VoteAction.logger.debug("sessionMap: " + sessionMap);
String contentFolderID = WebUtil.readStrParam(request, AttributeNames.PARAM_CONTENT_FOLDER_ID);
- VoteAction.logger.debug("contentFolderID: " + contentFolderID);
voteAuthoringForm.setContentFolderID(contentFolderID);
String activeModule = VoteAppConstants.DEFINE_LATER;
String strToolContentID = request.getParameter(AttributeNames.PARAM_TOOL_CONTENT_ID);
- VoteAction.logger.debug("strToolContentID: " + strToolContentID);
VoteContent voteContent = voteService.retrieveVote(new Long(strToolContentID));
- VoteAction.logger.debug("voteContent: " + voteContent);
VoteGeneralAuthoringDTO voteGeneralAuthoringDTO = new VoteGeneralAuthoringDTO();
- VoteAction.logger.debug("voteGeneralAuthoringDTO: " + voteGeneralAuthoringDTO);
voteGeneralAuthoringDTO.setContentFolderID(contentFolderID);
voteGeneralAuthoringDTO.setHttpSessionID(httpSessionID);
- VoteAction.logger.debug("title: " + voteContent.getTitle());
- VoteAction.logger.debug("instructions: " + voteContent.getInstructions());
-
voteGeneralAuthoringDTO.setActivityTitle(voteContent.getTitle());
voteAuthoringForm.setTitle(voteContent.getTitle());
@@ -645,8 +445,6 @@
voteGeneralAuthoringDTO.setDefineLaterInEditMode(new Boolean(true).toString());
boolean isContentInUse = VoteUtils.isContentInUse(voteContent);
- VoteAction.logger.debug("isContentInUse:" + isContentInUse);
-
VoteUtils.setDefineLater(request, true, strToolContentID, voteService);
voteGeneralAuthoringDTO.setToolContentID(strToolContentID);
@@ -663,27 +461,21 @@
VoteQueContent voteQueContent = (VoteQueContent) queIterator.next();
if (voteQueContent != null) {
- VoteAction.logger.debug("question: " + voteQueContent.getQuestion());
- VoteAction.logger.debug("displayorder: " + new Integer(voteQueContent.getDisplayOrder()).toString());
voteNominationContentDTO.setQuestion(voteQueContent.getQuestion());
voteNominationContentDTO.setDisplayOrder(new Integer(voteQueContent.getDisplayOrder()).toString());
// voteNominationContentDTO.setFeedback(voteQueContent.getFeedback());
listNominationContentDTO.add(voteNominationContentDTO);
}
}
- VoteAction.logger.debug("listNominationContentDTO: " + listNominationContentDTO);
request.setAttribute(VoteAppConstants.LIST_NOMINATION_CONTENT_DTO, listNominationContentDTO);
sessionMap.put(VoteAppConstants.LIST_NOMINATION_CONTENT_DTO_KEY, listNominationContentDTO);
request.setAttribute(VoteAppConstants.TOTAL_NOMINATION_COUNT, new Integer(listNominationContentDTO.size()));
request.getSession().setAttribute(httpSessionID, sessionMap);
- VoteAction.logger.debug("before fwding to jsp, voteAuthoringForm: " + voteAuthoringForm);
- VoteAction.logger.debug("before saving final voteGeneralAuthoringDTO: " + voteGeneralAuthoringDTO);
request.setAttribute(VoteAppConstants.VOTE_GENERAL_AUTHORING_DTO, voteGeneralAuthoringDTO);
- VoteAction.logger.debug("forwarding to : " + VoteAppConstants.LOAD_QUESTIONS);
return mapping.findForward(VoteAppConstants.LOAD_QUESTIONS);
}
@@ -696,75 +488,60 @@
*/
protected void repopulateRequestParameters(HttpServletRequest request, VoteAuthoringForm voteAuthoringForm,
VoteGeneralAuthoringDTO voteGeneralAuthoringDTO) {
- VoteAction.logger.debug("starting repopulateRequestParameters");
String toolContentID = request.getParameter(VoteAppConstants.TOOL_CONTENT_ID);
- VoteAction.logger.debug("toolContentID: " + toolContentID);
voteAuthoringForm.setToolContentID(toolContentID);
voteGeneralAuthoringDTO.setToolContentID(toolContentID);
String activeModule = request.getParameter(VoteAppConstants.ACTIVE_MODULE);
- VoteAction.logger.debug("activeModule: " + activeModule);
voteAuthoringForm.setActiveModule(activeModule);
voteGeneralAuthoringDTO.setActiveModule(activeModule);
String httpSessionID = request.getParameter(VoteAppConstants.HTTP_SESSION_ID);
- VoteAction.logger.debug("httpSessionID: " + httpSessionID);
voteAuthoringForm.setHttpSessionID(httpSessionID);
voteGeneralAuthoringDTO.setHttpSessionID(httpSessionID);
String defineLaterInEditMode = request.getParameter(VoteAppConstants.DEFINE_LATER_IN_EDIT_MODE);
- VoteAction.logger.debug("defineLaterInEditMode: " + defineLaterInEditMode);
voteAuthoringForm.setDefineLaterInEditMode(defineLaterInEditMode);
voteGeneralAuthoringDTO.setDefineLaterInEditMode(defineLaterInEditMode);
String lockOnFinish = request.getParameter(VoteAppConstants.LOCK_ON_FINISH);
- VoteAction.logger.debug("lockOnFinish: " + lockOnFinish);
voteAuthoringForm.setLockOnFinish(lockOnFinish);
voteGeneralAuthoringDTO.setLockOnFinish(lockOnFinish);
String allowText = request.getParameter(VoteAppConstants.ALLOW_TEXT);
- VoteAction.logger.debug("allowText: " + allowText);
voteAuthoringForm.setAllowText(allowText);
voteGeneralAuthoringDTO.setAllowText(allowText);
String showResults = request.getParameter(VoteAppConstants.SHOW_RESULTS);
- VoteAction.logger.debug("showResults: " + showResults);
voteAuthoringForm.setShowResults(showResults);
voteGeneralAuthoringDTO.setShowResults(showResults);
String maxNominationCount = request.getParameter(VoteAppConstants.MAX_NOMINATION_COUNT);
- VoteAction.logger.debug("maxNominationCount: " + maxNominationCount);
voteAuthoringForm.setMaxNominationCount(maxNominationCount);
voteGeneralAuthoringDTO.setMaxNominationCount(maxNominationCount);
String minNominationCount=request.getParameter(MIN_NOMINATION_COUNT);
- logger.debug("minNominationCount: " + minNominationCount);
voteAuthoringForm.setMinNominationCount(minNominationCount);
voteGeneralAuthoringDTO.setMinNominationCount(minNominationCount);
String reflect = request.getParameter("reflect");
- VoteAction.logger.debug("reflect: " + reflect);
voteAuthoringForm.setReflect(reflect);
voteGeneralAuthoringDTO.setReflect(reflect);
String reflectionSubject = request.getParameter("reflectionSubject");
- VoteAction.logger.debug("reflectionSubject: " + reflectionSubject);
voteAuthoringForm.setReflectionSubject(reflectionSubject);
voteGeneralAuthoringDTO.setReflectionSubject(reflectionSubject);
String offlineInstructions = request.getParameter(VoteAppConstants.OFFLINE_INSTRUCTIONS);
- VoteAction.logger.debug("offlineInstructions: " + offlineInstructions);
voteAuthoringForm.setOfflineInstructions(offlineInstructions);
voteGeneralAuthoringDTO.setOfflineInstructions(offlineInstructions);
String onlineInstructions = request.getParameter(VoteAppConstants.ONLINE_INSTRUCTIONS);
- VoteAction.logger.debug("onlineInstructions: " + onlineInstructions);
voteAuthoringForm.setOnlineInstructions(onlineInstructions);
voteGeneralAuthoringDTO.setOnlineInstructions(onlineInstructions);
String maxInputs = request.getParameter(VoteAppConstants.MAX_INPUTS);
- VoteAction.logger.debug("maxInputs: " + maxInputs);
if (maxInputs == null) {
maxInputs = "0";
}
@@ -780,7 +557,6 @@
public void persistInRequestError(HttpServletRequest request, String message) {
ActionMessages errors = new ActionMessages();
errors.add(Globals.ERROR_KEY, new ActionMessage(message));
- VoteAction.logger.debug("add " + message + " to ActionMessages:");
saveErrors(request, errors);
}
@@ -799,56 +575,36 @@
*/
public ActionForward moveNominationDown(ActionMapping mapping, ActionForm form, HttpServletRequest request,
HttpServletResponse response) throws IOException, ServletException {
- VoteAction.logger.debug("dispatching moveNominationDown");
VoteAuthoringForm voteAuthoringForm = (VoteAuthoringForm) form;
IVoteService voteService = VoteServiceProxy.getVoteService(getServlet().getServletContext());
- VoteAction.logger.debug("voteService: " + voteService);
String httpSessionID = voteAuthoringForm.getHttpSessionID();
- VoteAction.logger.debug("httpSessionID: " + httpSessionID);
-
SessionMap sessionMap = (SessionMap) request.getSession().getAttribute(httpSessionID);
- VoteAction.logger.debug("sessionMap: " + sessionMap);
String questionIndex = request.getParameter("questionIndex");
- VoteAction.logger.debug("questionIndex: " + questionIndex);
List listNominationContentDTO = (List) sessionMap.get(VoteAppConstants.LIST_NOMINATION_CONTENT_DTO_KEY);
- VoteAction.logger.debug("listNominationContentDTO: " + listNominationContentDTO);
listNominationContentDTO = AuthoringUtil.swapNodes(listNominationContentDTO, questionIndex, "down");
- VoteAction.logger.debug("listNominationContentDTO after swap: " + listNominationContentDTO);
-
listNominationContentDTO = AuthoringUtil.reorderSimpleListNominationContentDTO(listNominationContentDTO);
- VoteAction.logger.debug("listNominationContentDTO after reordersimple: " + listNominationContentDTO);
-
sessionMap.put(VoteAppConstants.LIST_NOMINATION_CONTENT_DTO_KEY, listNominationContentDTO);
String contentFolderID = WebUtil.readStrParam(request, AttributeNames.PARAM_CONTENT_FOLDER_ID);
- VoteAction.logger.debug("contentFolderID: " + contentFolderID);
voteAuthoringForm.setContentFolderID(contentFolderID);
String activeModule = request.getParameter(VoteAppConstants.ACTIVE_MODULE);
- VoteAction.logger.debug("activeModule: " + activeModule);
String richTextTitle = request.getParameter(VoteAppConstants.TITLE);
- VoteAction.logger.debug("richTextTitle: " + richTextTitle);
String richTextInstructions = request.getParameter(VoteAppConstants.INSTRUCTIONS);
- VoteAction.logger.debug("richTextInstructions: " + richTextInstructions);
sessionMap.put(VoteAppConstants.ACTIVITY_TITLE_KEY, richTextTitle);
sessionMap.put(VoteAppConstants.ACTIVITY_INSTRUCTIONS_KEY, richTextInstructions);
String strToolContentID = request.getParameter(AttributeNames.PARAM_TOOL_CONTENT_ID);
- VoteAction.logger.debug("strToolContentID: " + strToolContentID);
- VoteContent voteContent = voteService.retrieveVote(new Long(strToolContentID));
- VoteAction.logger.debug("voteContent: " + voteContent);
-
VoteGeneralAuthoringDTO voteGeneralAuthoringDTO = new VoteGeneralAuthoringDTO();
- VoteAction.logger.debug("voteGeneralAuthoringDTO: " + voteGeneralAuthoringDTO);
voteGeneralAuthoringDTO.setContentFolderID(contentFolderID);
repopulateRequestParameters(request, voteAuthoringForm, voteGeneralAuthoringDTO);
@@ -858,33 +614,25 @@
voteGeneralAuthoringDTO.setActivityInstructions(richTextInstructions);
- VoteAction.logger.debug("activeModule: " + activeModule);
if (activeModule.equals(VoteAppConstants.AUTHORING)) {
String onlineInstructions = (String) sessionMap.get(VoteAppConstants.ONLINE_INSTRUCTIONS_KEY);
- VoteAction.logger.debug("onlineInstructions: " + onlineInstructions);
voteGeneralAuthoringDTO.setOnlineInstructions(onlineInstructions);
String offlineInstructions = (String) sessionMap.get(VoteAppConstants.OFFLINE_INSTRUCTIONS_KEY);
- VoteAction.logger.debug("offlineInstructions: " + offlineInstructions);
voteGeneralAuthoringDTO.setOfflineInstructions(offlineInstructions);
List attachmentList = (List) sessionMap.get(VoteAppConstants.ATTACHMENT_LIST_KEY);
- VoteAction.logger.debug("attachmentList: " + attachmentList);
List deletedAttachmentList = (List) sessionMap.get(VoteAppConstants.DELETED_ATTACHMENT_LIST_KEY);
- VoteAction.logger.debug("deletedAttachmentList: " + deletedAttachmentList);
voteGeneralAuthoringDTO.setAttachmentList(attachmentList);
voteGeneralAuthoringDTO.setDeletedAttachmentList(deletedAttachmentList);
String strOnlineInstructions = request.getParameter("onlineInstructions");
String strOfflineInstructions = request.getParameter("offlineInstructions");
- VoteAction.logger.debug("onlineInstructions: " + strOnlineInstructions);
- VoteAction.logger.debug("offlineInstructions: " + strOnlineInstructions);
voteAuthoringForm.setOnlineInstructions(strOnlineInstructions);
voteAuthoringForm.setOfflineInstructions(strOfflineInstructions);
}
- AuthoringUtil authoringUtil = new AuthoringUtil();
voteGeneralAuthoringDTO.setEditActivityEditMode(new Boolean(true).toString());
request.getSession().setAttribute(httpSessionID, sessionMap);
@@ -898,16 +646,13 @@
voteAuthoringForm.setCurrentTab("1");
request.setAttribute(VoteAppConstants.LIST_NOMINATION_CONTENT_DTO, listNominationContentDTO);
- VoteAction.logger.debug("listNominationContentDTO now: " + listNominationContentDTO);
voteGeneralAuthoringDTO.setDefineLaterInEditMode(new Boolean(true).toString());
- VoteAction.logger.debug("before saving final voteGeneralAuthoringDTO: " + voteGeneralAuthoringDTO);
request.setAttribute(VoteAppConstants.VOTE_GENERAL_AUTHORING_DTO, voteGeneralAuthoringDTO);
request.setAttribute(VoteAppConstants.TOTAL_NOMINATION_COUNT, new Integer(listNominationContentDTO.size()));
- VoteAction.logger.debug("fwd ing to LOAD_NOMINATIONS: " + VoteAppConstants.LOAD_QUESTIONS);
return mapping.findForward(VoteAppConstants.LOAD_QUESTIONS);
}
@@ -926,56 +671,38 @@
*/
public ActionForward moveNominationUp(ActionMapping mapping, ActionForm form, HttpServletRequest request,
HttpServletResponse response) throws IOException, ServletException {
- VoteAction.logger.debug("dispatching moveNominationUp");
VoteAuthoringForm voteAuthoringForm = (VoteAuthoringForm) form;
IVoteService voteService = VoteServiceProxy.getVoteService(getServlet().getServletContext());
- VoteAction.logger.debug("voteService: " + voteService);
String httpSessionID = voteAuthoringForm.getHttpSessionID();
- VoteAction.logger.debug("httpSessionID: " + httpSessionID);
-
SessionMap sessionMap = (SessionMap) request.getSession().getAttribute(httpSessionID);
- VoteAction.logger.debug("sessionMap: " + sessionMap);
String questionIndex = request.getParameter("questionIndex");
- VoteAction.logger.debug("questionIndex: " + questionIndex);
List listNominationContentDTO = (List) sessionMap.get(VoteAppConstants.LIST_NOMINATION_CONTENT_DTO_KEY);
- VoteAction.logger.debug("listNominationContentDTO: " + listNominationContentDTO);
listNominationContentDTO = AuthoringUtil.swapNodes(listNominationContentDTO, questionIndex, "up");
- VoteAction.logger.debug("listNominationContentDTO after swap: " + listNominationContentDTO);
listNominationContentDTO = AuthoringUtil.reorderSimpleListNominationContentDTO(listNominationContentDTO);
- VoteAction.logger.debug("listNominationContentDTO after reordersimple: " + listNominationContentDTO);
sessionMap.put(VoteAppConstants.LIST_NOMINATION_CONTENT_DTO_KEY, listNominationContentDTO);
String contentFolderID = WebUtil.readStrParam(request, AttributeNames.PARAM_CONTENT_FOLDER_ID);
- VoteAction.logger.debug("contentFolderID: " + contentFolderID);
voteAuthoringForm.setContentFolderID(contentFolderID);
String activeModule = request.getParameter(VoteAppConstants.ACTIVE_MODULE);
- VoteAction.logger.debug("activeModule: " + activeModule);
String richTextTitle = request.getParameter(VoteAppConstants.TITLE);
- VoteAction.logger.debug("richTextTitle: " + richTextTitle);
String richTextInstructions = request.getParameter(VoteAppConstants.INSTRUCTIONS);
- VoteAction.logger.debug("richTextInstructions: " + richTextInstructions);
sessionMap.put(VoteAppConstants.ACTIVITY_TITLE_KEY, richTextTitle);
sessionMap.put(VoteAppConstants.ACTIVITY_INSTRUCTIONS_KEY, richTextInstructions);
String strToolContentID = request.getParameter(AttributeNames.PARAM_TOOL_CONTENT_ID);
- VoteAction.logger.debug("strToolContentID: " + strToolContentID);
- VoteContent voteContent = voteService.retrieveVote(new Long(strToolContentID));
- VoteAction.logger.debug("voteContent: " + voteContent);
-
VoteGeneralAuthoringDTO voteGeneralAuthoringDTO = new VoteGeneralAuthoringDTO();
- VoteAction.logger.debug("voteGeneralAuthoringDTO: " + voteGeneralAuthoringDTO);
voteGeneralAuthoringDTO.setContentFolderID(contentFolderID);
repopulateRequestParameters(request, voteAuthoringForm, voteGeneralAuthoringDTO);
@@ -985,33 +712,25 @@
voteGeneralAuthoringDTO.setActivityInstructions(richTextInstructions);
- VoteAction.logger.debug("activeModule: " + activeModule);
if (activeModule.equals(VoteAppConstants.AUTHORING)) {
String onlineInstructions = (String) sessionMap.get(VoteAppConstants.ONLINE_INSTRUCTIONS_KEY);
- VoteAction.logger.debug("onlineInstructions: " + onlineInstructions);
voteGeneralAuthoringDTO.setOnlineInstructions(onlineInstructions);
String offlineInstructions = (String) sessionMap.get(VoteAppConstants.OFFLINE_INSTRUCTIONS_KEY);
- VoteAction.logger.debug("offlineInstructions: " + offlineInstructions);
voteGeneralAuthoringDTO.setOfflineInstructions(offlineInstructions);
List attachmentList = (List) sessionMap.get(VoteAppConstants.ATTACHMENT_LIST_KEY);
- VoteAction.logger.debug("attachmentList: " + attachmentList);
List deletedAttachmentList = (List) sessionMap.get(VoteAppConstants.DELETED_ATTACHMENT_LIST_KEY);
- VoteAction.logger.debug("deletedAttachmentList: " + deletedAttachmentList);
voteGeneralAuthoringDTO.setAttachmentList(attachmentList);
voteGeneralAuthoringDTO.setDeletedAttachmentList(deletedAttachmentList);
String strOnlineInstructions = request.getParameter("onlineInstructions");
String strOfflineInstructions = request.getParameter("offlineInstructions");
- VoteAction.logger.debug("onlineInstructions: " + strOnlineInstructions);
- VoteAction.logger.debug("offlineInstructions: " + strOnlineInstructions);
voteAuthoringForm.setOnlineInstructions(strOnlineInstructions);
voteAuthoringForm.setOfflineInstructions(strOfflineInstructions);
}
- AuthoringUtil authoringUtil = new AuthoringUtil();
voteGeneralAuthoringDTO.setEditActivityEditMode(new Boolean(true).toString());
request.getSession().setAttribute(httpSessionID, sessionMap);
@@ -1025,16 +744,10 @@
voteAuthoringForm.setCurrentTab("1");
request.setAttribute(VoteAppConstants.LIST_NOMINATION_CONTENT_DTO, listNominationContentDTO);
- VoteAction.logger.debug("listNominationContentDTO now: " + listNominationContentDTO);
-
voteGeneralAuthoringDTO.setDefineLaterInEditMode(new Boolean(true).toString());
- VoteAction.logger.debug("before saving final voteGeneralAuthoringDTO: " + voteGeneralAuthoringDTO);
request.setAttribute(VoteAppConstants.VOTE_GENERAL_AUTHORING_DTO, voteGeneralAuthoringDTO);
-
request.setAttribute(VoteAppConstants.TOTAL_NOMINATION_COUNT, new Integer(listNominationContentDTO.size()));
-
- VoteAction.logger.debug("fwd ing to LOAD_NOMINATIONS: " + VoteAppConstants.LOAD_QUESTIONS);
return mapping.findForward(VoteAppConstants.LOAD_QUESTIONS);
}
@@ -1053,34 +766,20 @@
*/
public ActionForward removeNomination(ActionMapping mapping, ActionForm form, HttpServletRequest request,
HttpServletResponse response) throws IOException, ServletException {
- VoteAction.logger.debug("dispatching removeNomination");
VoteAuthoringForm voteAuthoringForm = (VoteAuthoringForm) form;
- IVoteService voteService = VoteServiceProxy.getVoteService(getServlet().getServletContext());
- VoteAction.logger.debug("voteService: " + voteService);
-
String httpSessionID = voteAuthoringForm.getHttpSessionID();
- VoteAction.logger.debug("httpSessionID: " + httpSessionID);
-
SessionMap sessionMap = (SessionMap) request.getSession().getAttribute(httpSessionID);
- VoteAction.logger.debug("sessionMap: " + sessionMap);
String questionIndex = request.getParameter("questionIndex");
- VoteAction.logger.debug("questionIndex: " + questionIndex);
-
List listNominationContentDTO = (List) sessionMap.get(VoteAppConstants.LIST_NOMINATION_CONTENT_DTO_KEY);
- VoteAction.logger.debug("listNominationContentDTO: " + listNominationContentDTO);
VoteNominationContentDTO voteNominationContentDTO = null;
Iterator listIterator = listNominationContentDTO.iterator();
while (listIterator.hasNext()) {
voteNominationContentDTO = (VoteNominationContentDTO) listIterator.next();
- VoteAction.logger.debug("voteNominationContentDTO:" + voteNominationContentDTO);
- VoteAction.logger.debug("voteNominationContentDTO question:" + voteNominationContentDTO.getNomination());
- String question = voteNominationContentDTO.getNomination();
String displayOrder = voteNominationContentDTO.getDisplayOrder();
- VoteAction.logger.debug("displayOrder:" + displayOrder);
if (displayOrder != null && !displayOrder.equals("")) {
if (displayOrder.equals(questionIndex)) {
@@ -1090,37 +789,27 @@
}
}
- VoteAction.logger.debug("voteNominationContentDTO found:" + voteNominationContentDTO);
voteNominationContentDTO.setNomination("");
- VoteAction.logger.debug("listNominationContentDTO after remove:" + listNominationContentDTO);
listNominationContentDTO = AuthoringUtil.reorderListNominationContentDTO(listNominationContentDTO,
questionIndex);
- VoteAction.logger.debug("listNominationContentDTO reordered:" + listNominationContentDTO);
sessionMap.put(VoteAppConstants.LIST_NOMINATION_CONTENT_DTO_KEY, listNominationContentDTO);
String contentFolderID = WebUtil.readStrParam(request, AttributeNames.PARAM_CONTENT_FOLDER_ID);
- VoteAction.logger.debug("contentFolderID: " + contentFolderID);
voteAuthoringForm.setContentFolderID(contentFolderID);
String activeModule = request.getParameter(VoteAppConstants.ACTIVE_MODULE);
- VoteAction.logger.debug("activeModule: " + activeModule);
String richTextTitle = request.getParameter(VoteAppConstants.TITLE);
- VoteAction.logger.debug("richTextTitle: " + richTextTitle);
-
String richTextInstructions = request.getParameter(VoteAppConstants.INSTRUCTIONS);
- VoteAction.logger.debug("richTextInstructions: " + richTextInstructions);
sessionMap.put(VoteAppConstants.ACTIVITY_TITLE_KEY, richTextTitle);
sessionMap.put(VoteAppConstants.ACTIVITY_INSTRUCTIONS_KEY, richTextInstructions);
String strToolContentID = request.getParameter(AttributeNames.PARAM_TOOL_CONTENT_ID);
- VoteAction.logger.debug("strToolContentID: " + strToolContentID);
VoteGeneralAuthoringDTO voteGeneralAuthoringDTO = new VoteGeneralAuthoringDTO();
- VoteAction.logger.debug("voteGeneralAuthoringDTO: " + voteGeneralAuthoringDTO);
voteGeneralAuthoringDTO.setContentFolderID(contentFolderID);
repopulateRequestParameters(request, voteAuthoringForm, voteGeneralAuthoringDTO);
@@ -1130,34 +819,25 @@
voteGeneralAuthoringDTO.setActivityInstructions(richTextInstructions);
- VoteAction.logger.debug("activeModule: " + activeModule);
if (activeModule.equals(VoteAppConstants.AUTHORING)) {
String onlineInstructions = (String) sessionMap.get(VoteAppConstants.ONLINE_INSTRUCTIONS_KEY);
- VoteAction.logger.debug("onlineInstructions: " + onlineInstructions);
voteGeneralAuthoringDTO.setOnlineInstructions(onlineInstructions);
String offlineInstructions = (String) sessionMap.get(VoteAppConstants.OFFLINE_INSTRUCTIONS_KEY);
- VoteAction.logger.debug("offlineInstructions: " + offlineInstructions);
voteGeneralAuthoringDTO.setOfflineInstructions(offlineInstructions);
List attachmentList = (List) sessionMap.get(VoteAppConstants.ATTACHMENT_LIST_KEY);
- VoteAction.logger.debug("attachmentList: " + attachmentList);
List deletedAttachmentList = (List) sessionMap.get(VoteAppConstants.DELETED_ATTACHMENT_LIST_KEY);
- VoteAction.logger.debug("deletedAttachmentList: " + deletedAttachmentList);
voteGeneralAuthoringDTO.setAttachmentList(attachmentList);
voteGeneralAuthoringDTO.setDeletedAttachmentList(deletedAttachmentList);
String strOnlineInstructions = request.getParameter("onlineInstructions");
String strOfflineInstructions = request.getParameter("offlineInstructions");
- VoteAction.logger.debug("onlineInstructions: " + strOnlineInstructions);
- VoteAction.logger.debug("offlineInstructions: " + strOnlineInstructions);
voteAuthoringForm.setOnlineInstructions(strOnlineInstructions);
voteAuthoringForm.setOfflineInstructions(strOfflineInstructions);
}
- AuthoringUtil authoringUtil = new AuthoringUtil();
-
voteGeneralAuthoringDTO.setEditActivityEditMode(new Boolean(true).toString());
request.getSession().setAttribute(httpSessionID, sessionMap);
@@ -1170,17 +850,13 @@
voteAuthoringForm.setCurrentTab("1");
request.setAttribute(VoteAppConstants.LIST_NOMINATION_CONTENT_DTO, listNominationContentDTO);
- VoteAction.logger.debug("voteNominationContentDTO now: " + voteNominationContentDTO);
- VoteAction.logger.debug("listNominationContentDTO now: " + listNominationContentDTO);
voteGeneralAuthoringDTO.setDefineLaterInEditMode(new Boolean(true).toString());
- VoteAction.logger.debug("before saving final voteGeneralAuthoringDTO: " + voteGeneralAuthoringDTO);
request.setAttribute(VoteAppConstants.VOTE_GENERAL_AUTHORING_DTO, voteGeneralAuthoringDTO);
request.setAttribute(VoteAppConstants.TOTAL_NOMINATION_COUNT, new Integer(listNominationContentDTO.size()));
- VoteAction.logger.debug("fwd ing to LOAD_QUESTIONS: " + VoteAppConstants.LOAD_QUESTIONS);
return mapping.findForward(VoteAppConstants.LOAD_QUESTIONS);
}
@@ -1199,73 +875,49 @@
*/
public ActionForward newEditableNominationBox(ActionMapping mapping, ActionForm form, HttpServletRequest request,
HttpServletResponse response) throws IOException, ServletException {
- VoteAction.logger.debug("dispathcing newEditableNominationBox");
VoteAuthoringForm voteAuthoringForm = (VoteAuthoringForm) form;
IVoteService voteService = VoteServiceProxy.getVoteService(getServlet().getServletContext());
- VoteAction.logger.debug("voteService: " + voteService);
String httpSessionID = voteAuthoringForm.getHttpSessionID();
- VoteAction.logger.debug("httpSessionID: " + httpSessionID);
SessionMap sessionMap = (SessionMap) request.getSession().getAttribute(httpSessionID);
- VoteAction.logger.debug("sessionMap: " + sessionMap);
String questionIndex = request.getParameter("questionIndex");
- VoteAction.logger.debug("questionIndex: " + questionIndex);
voteAuthoringForm.setEditableNominationIndex(questionIndex);
List listNominationContentDTO = (List) sessionMap.get(VoteAppConstants.LIST_NOMINATION_CONTENT_DTO_KEY);
- VoteAction.logger.debug("listNominationContentDTO: " + listNominationContentDTO);
String editableNomination = "";
String editableFeedback = "";
Iterator listIterator = listNominationContentDTO.iterator();
while (listIterator.hasNext()) {
VoteNominationContentDTO voteNominationContentDTO = (VoteNominationContentDTO) listIterator.next();
- VoteAction.logger.debug("voteNominationContentDTO:" + voteNominationContentDTO);
- VoteAction.logger.debug("voteNominationContentDTO question:" + voteNominationContentDTO.getNomination());
String question = voteNominationContentDTO.getNomination();
String displayOrder = voteNominationContentDTO.getDisplayOrder();
if (displayOrder != null && !displayOrder.equals("")) {
if (displayOrder.equals(questionIndex)) {
editableFeedback = voteNominationContentDTO.getFeedback();
editableNomination = voteNominationContentDTO.getNomination();
- VoteAction.logger.debug("editableFeedback found :" + editableFeedback);
break;
}
}
}
- VoteAction.logger.debug("editableFeedback found :" + editableFeedback);
- VoteAction.logger.debug("editableNomination found :" + editableNomination);
-
String contentFolderID = WebUtil.readStrParam(request, AttributeNames.PARAM_CONTENT_FOLDER_ID);
- VoteAction.logger.debug("contentFolderID: " + contentFolderID);
voteAuthoringForm.setContentFolderID(contentFolderID);
String activeModule = request.getParameter(VoteAppConstants.ACTIVE_MODULE);
- VoteAction.logger.debug("activeModule: " + activeModule);
-
- String strToolContentID = request.getParameter(AttributeNames.PARAM_TOOL_CONTENT_ID);
- VoteAction.logger.debug("strToolContentID: " + strToolContentID);
-
- VoteContent voteContent = voteService.retrieveVote(new Long(strToolContentID));
- VoteAction.logger.debug("voteContent: " + voteContent);
-
VoteGeneralAuthoringDTO voteGeneralAuthoringDTO = new VoteGeneralAuthoringDTO();
- VoteAction.logger.debug("voteGeneralAuthoringDTO: " + voteGeneralAuthoringDTO);
voteGeneralAuthoringDTO.setContentFolderID(contentFolderID);
repopulateRequestParameters(request, voteAuthoringForm, voteGeneralAuthoringDTO);
String richTextTitle = request.getParameter(VoteAppConstants.TITLE);
String richTextInstructions = request.getParameter(VoteAppConstants.INSTRUCTIONS);
- VoteAction.logger.debug("richTextTitle: " + richTextTitle);
- VoteAction.logger.debug("richTextInstructions: " + richTextInstructions);
voteGeneralAuthoringDTO.setActivityTitle(richTextTitle);
voteAuthoringForm.setTitle(richTextTitle);
voteGeneralAuthoringDTO.setActivityInstructions(richTextInstructions);
@@ -1276,22 +928,17 @@
voteGeneralAuthoringDTO.setDefineLaterInEditMode(new Boolean(true).toString());
- VoteAction.logger.debug("voteGeneralAuthoringDTO now: " + voteGeneralAuthoringDTO);
request.setAttribute(VoteAppConstants.VOTE_GENERAL_AUTHORING_DTO, voteGeneralAuthoringDTO);
request.setAttribute(VoteAppConstants.TOTAL_NOMINATION_COUNT, new Integer(listNominationContentDTO.size()));
- VoteAction.logger.debug("activeModule: " + activeModule);
if (activeModule.equals(VoteAppConstants.AUTHORING)) {
String strOnlineInstructions = request.getParameter("onlineInstructions");
String strOfflineInstructions = request.getParameter("offlineInstructions");
- VoteAction.logger.debug("onlineInstructions: " + strOnlineInstructions);
- VoteAction.logger.debug("offlineInstructions: " + strOnlineInstructions);
voteAuthoringForm.setOnlineInstructions(strOnlineInstructions);
voteAuthoringForm.setOfflineInstructions(strOfflineInstructions);
}
- VoteAction.logger.debug("fwd ing to editNominationBox: ");
return mapping.findForward("editNominationBox");
}
@@ -1310,68 +957,44 @@
*/
public ActionForward newNominationBox(ActionMapping mapping, ActionForm form, HttpServletRequest request,
HttpServletResponse response) throws IOException, ServletException {
- VoteAction.logger.debug("dispathcing newNominationBox");
VoteAuthoringForm voteAuthoringForm = (VoteAuthoringForm) form;
- IVoteService voteService = VoteServiceProxy.getVoteService(getServlet().getServletContext());
- VoteAction.logger.debug("voteService: " + voteService);
-
String httpSessionID = voteAuthoringForm.getHttpSessionID();
- VoteAction.logger.debug("httpSessionID: " + httpSessionID);
SessionMap sessionMap = (SessionMap) request.getSession().getAttribute(httpSessionID);
- VoteAction.logger.debug("sessionMap: " + sessionMap);
String contentFolderID = WebUtil.readStrParam(request, AttributeNames.PARAM_CONTENT_FOLDER_ID);
- VoteAction.logger.debug("contentFolderID: " + contentFolderID);
voteAuthoringForm.setContentFolderID(contentFolderID);
String activeModule = request.getParameter(VoteAppConstants.ACTIVE_MODULE);
- VoteAction.logger.debug("activeModule: " + activeModule);
- String strToolContentID = request.getParameter(AttributeNames.PARAM_TOOL_CONTENT_ID);
- VoteAction.logger.debug("strToolContentID: " + strToolContentID);
-
- VoteContent voteContent = voteService.retrieveVote(new Long(strToolContentID));
- VoteAction.logger.debug("voteContent: " + voteContent);
-
VoteGeneralAuthoringDTO voteGeneralAuthoringDTO = new VoteGeneralAuthoringDTO();
- VoteAction.logger.debug("voteGeneralAuthoringDTO: " + voteGeneralAuthoringDTO);
voteGeneralAuthoringDTO.setContentFolderID(contentFolderID);
repopulateRequestParameters(request, voteAuthoringForm, voteGeneralAuthoringDTO);
String richTextTitle = request.getParameter(VoteAppConstants.TITLE);
String richTextInstructions = request.getParameter(VoteAppConstants.INSTRUCTIONS);
- VoteAction.logger.debug("richTextTitle: " + richTextTitle);
- VoteAction.logger.debug("richTextInstructions: " + richTextInstructions);
voteGeneralAuthoringDTO.setActivityTitle(richTextTitle);
voteAuthoringForm.setTitle(richTextTitle);
voteGeneralAuthoringDTO.setActivityInstructions(richTextInstructions);
- VoteAction.logger.debug("activeModule: " + activeModule);
if (activeModule.equals(VoteAppConstants.AUTHORING)) {
String strOnlineInstructions = request.getParameter("onlineInstructions");
String strOfflineInstructions = request.getParameter("offlineInstructions");
- VoteAction.logger.debug("onlineInstructions: " + strOnlineInstructions);
- VoteAction.logger.debug("offlineInstructions: " + strOnlineInstructions);
voteAuthoringForm.setOnlineInstructions(strOnlineInstructions);
voteAuthoringForm.setOfflineInstructions(strOfflineInstructions);
}
voteGeneralAuthoringDTO.setDefineLaterInEditMode(new Boolean(true).toString());
- VoteAction.logger.debug("voteGeneralAuthoringDTO now: " + voteGeneralAuthoringDTO);
request.setAttribute(VoteAppConstants.VOTE_GENERAL_AUTHORING_DTO, voteGeneralAuthoringDTO);
List listNominationContentDTO = (List) sessionMap.get(VoteAppConstants.LIST_NOMINATION_CONTENT_DTO_KEY);
- VoteAction.logger.debug("listNominationContentDTO: " + listNominationContentDTO);
request.setAttribute(VoteAppConstants.TOTAL_NOMINATION_COUNT, new Integer(listNominationContentDTO.size()));
-
- VoteAction.logger.debug("fwd ing to newNominationBox: ");
return mapping.findForward("newNominationBox");
}
@@ -1390,33 +1013,22 @@
*/
public ActionForward addSingleNomination(ActionMapping mapping, ActionForm form, HttpServletRequest request,
HttpServletResponse response) throws IOException, ServletException {
- VoteAction.logger.debug("dispathcing addSingleNomination");
VoteAuthoringForm voteAuthoringForm = (VoteAuthoringForm) form;
IVoteService voteService = VoteServiceProxy.getVoteService(getServlet().getServletContext());
- VoteAction.logger.debug("voteService: " + voteService);
String httpSessionID = voteAuthoringForm.getHttpSessionID();
- VoteAction.logger.debug("httpSessionID: " + httpSessionID);
SessionMap sessionMap = (SessionMap) request.getSession().getAttribute(httpSessionID);
- VoteAction.logger.debug("sessionMap: " + sessionMap);
-
String contentFolderID = WebUtil.readStrParam(request, AttributeNames.PARAM_CONTENT_FOLDER_ID);
- VoteAction.logger.debug("contentFolderID: " + contentFolderID);
voteAuthoringForm.setContentFolderID(contentFolderID);
String activeModule = request.getParameter(VoteAppConstants.ACTIVE_MODULE);
- VoteAction.logger.debug("activeModule: " + activeModule);
-
String strToolContentID = request.getParameter(AttributeNames.PARAM_TOOL_CONTENT_ID);
- VoteAction.logger.debug("strToolContentID: " + strToolContentID);
VoteContent voteContent = voteService.retrieveVote(new Long(strToolContentID));
- VoteAction.logger.debug("voteContent: " + voteContent);
VoteGeneralAuthoringDTO voteGeneralAuthoringDTO = new VoteGeneralAuthoringDTO();
- VoteAction.logger.debug("voteGeneralAuthoringDTO: " + voteGeneralAuthoringDTO);
voteGeneralAuthoringDTO.setContentFolderID(contentFolderID);
repopulateRequestParameters(request, voteAuthoringForm, voteGeneralAuthoringDTO);
@@ -1426,20 +1038,15 @@
AuthoringUtil authoringUtil = new AuthoringUtil();
List listNominationContentDTO = (List) sessionMap.get(VoteAppConstants.LIST_NOMINATION_CONTENT_DTO_KEY);
- VoteAction.logger.debug("listNominationContentDTO: " + listNominationContentDTO);
String newNomination = request.getParameter("newNomination");
- VoteAction.logger.debug("newNomination: " + newNomination);
String feedback = request.getParameter("feedback");
- VoteAction.logger.debug("feedback: " + feedback);
int listSize = listNominationContentDTO.size();
- VoteAction.logger.debug("listSize: " + listSize);
if (newNomination != null && newNomination.length() > 0) {
boolean duplicates = AuthoringUtil.checkDuplicateNominations(listNominationContentDTO, newNomination);
- VoteAction.logger.debug("duplicates: " + duplicates);
if (!duplicates) {
VoteNominationContentDTO voteNominationContentDTO = new VoteNominationContentDTO();
@@ -1448,53 +1055,35 @@
voteNominationContentDTO.setNomination(newNomination);
listNominationContentDTO.add(voteNominationContentDTO);
- VoteAction.logger.debug("updated listNominationContentDTO: " + listNominationContentDTO);
- } else {
- VoteAction.logger.debug("entry duplicate, not adding");
-
}
- } else {
- VoteAction.logger.debug("entry blank, not adding");
-
}
-
+
request.setAttribute(VoteAppConstants.LIST_NOMINATION_CONTENT_DTO, listNominationContentDTO);
sessionMap.put(VoteAppConstants.LIST_NOMINATION_CONTENT_DTO_KEY, listNominationContentDTO);
String richTextTitle = (String) sessionMap.get(VoteAppConstants.ACTIVITY_TITLE_KEY);
- VoteAction.logger.debug("richTextTitle: " + richTextTitle);
String richTextInstructions = (String) sessionMap.get(VoteAppConstants.ACTIVITY_INSTRUCTIONS_KEY);
- VoteAction.logger.debug("richTextInstructions: " + richTextInstructions);
- VoteAction.logger.debug("richTextTitle: " + richTextTitle);
- VoteAction.logger.debug("richTextInstructions: " + richTextInstructions);
voteGeneralAuthoringDTO.setActivityTitle(richTextTitle);
voteAuthoringForm.setTitle(richTextTitle);
voteGeneralAuthoringDTO.setActivityInstructions(richTextInstructions);
- VoteAction.logger.debug("activeModule: " + activeModule);
if (activeModule.equals(VoteAppConstants.AUTHORING)) {
String onlineInstructions = (String) sessionMap.get(VoteAppConstants.ONLINE_INSTRUCTIONS_KEY);
- VoteAction.logger.debug("onlineInstructions: " + onlineInstructions);
voteGeneralAuthoringDTO.setOnlineInstructions(onlineInstructions);
String offlineInstructions = (String) sessionMap.get(VoteAppConstants.OFFLINE_INSTRUCTIONS_KEY);
- VoteAction.logger.debug("offlineInstructions: " + offlineInstructions);
voteGeneralAuthoringDTO.setOfflineInstructions(offlineInstructions);
List attachmentList = (List) sessionMap.get(VoteAppConstants.ATTACHMENT_LIST_KEY);
- VoteAction.logger.debug("attachmentList: " + attachmentList);
List deletedAttachmentList = (List) sessionMap.get(VoteAppConstants.DELETED_ATTACHMENT_LIST_KEY);
- VoteAction.logger.debug("deletedAttachmentList: " + deletedAttachmentList);
voteGeneralAuthoringDTO.setAttachmentList(attachmentList);
voteGeneralAuthoringDTO.setDeletedAttachmentList(deletedAttachmentList);
String strOnlineInstructions = request.getParameter("onlineInstructions");
String strOfflineInstructions = request.getParameter("offlineInstructions");
- VoteAction.logger.debug("onlineInstructions: " + strOnlineInstructions);
- VoteAction.logger.debug("offlineInstructions: " + strOfflineInstructions);
voteAuthoringForm.setOnlineInstructions(strOnlineInstructions);
voteAuthoringForm.setOfflineInstructions(strOfflineInstructions);
}
@@ -1513,20 +1102,12 @@
voteGeneralAuthoringDTO.setDefineLaterInEditMode(new Boolean(true).toString());
- VoteAction.logger.debug("voteGeneralAuthoringDTO now: " + voteGeneralAuthoringDTO);
request.setAttribute(VoteAppConstants.VOTE_GENERAL_AUTHORING_DTO, voteGeneralAuthoringDTO);
- VoteAction.logger.debug("httpSessionID: " + httpSessionID);
- VoteAction.logger.debug("sessionMap: " + sessionMap);
-
request.getSession().setAttribute(httpSessionID, sessionMap);
- VoteAction.logger.debug("voteGeneralAuthoringDTO.getMapNominationContent(); "
- + voteGeneralAuthoringDTO.getMapNominationContent());
-
request.setAttribute(VoteAppConstants.TOTAL_NOMINATION_COUNT, new Integer(listNominationContentDTO.size()));
- VoteAction.logger.debug("fwd ing to LOAD_QUESTIONS: " + VoteAppConstants.LOAD_QUESTIONS);
return mapping.findForward(VoteAppConstants.LOAD_QUESTIONS);
}
@@ -1544,37 +1125,27 @@
public ActionForward saveSingleNomination(ActionMapping mapping, ActionForm form, HttpServletRequest request,
HttpServletResponse response) throws IOException, ServletException {
- VoteAction.logger.debug("dispathcing saveSingleNomination");
VoteAuthoringForm voteAuthoringForm = (VoteAuthoringForm) form;
IVoteService voteService = VoteServiceProxy.getVoteService(getServlet().getServletContext());
- VoteAction.logger.debug("voteService: " + voteService);
String httpSessionID = voteAuthoringForm.getHttpSessionID();
- VoteAction.logger.debug("httpSessionID: " + httpSessionID);
SessionMap sessionMap = (SessionMap) request.getSession().getAttribute(httpSessionID);
- VoteAction.logger.debug("sessionMap: " + sessionMap);
String contentFolderID = WebUtil.readStrParam(request, AttributeNames.PARAM_CONTENT_FOLDER_ID);
- VoteAction.logger.debug("contentFolderID: " + contentFolderID);
voteAuthoringForm.setContentFolderID(contentFolderID);
String activeModule = request.getParameter(VoteAppConstants.ACTIVE_MODULE);
- VoteAction.logger.debug("activeModule: " + activeModule);
String strToolContentID = request.getParameter(AttributeNames.PARAM_TOOL_CONTENT_ID);
- VoteAction.logger.debug("strToolContentID: " + strToolContentID);
String editNominationBoxRequest = request.getParameter("editNominationBoxRequest");
- VoteAction.logger.debug("editNominationBoxRequest: " + editNominationBoxRequest);
VoteContent voteContent = voteService.retrieveVote(new Long(strToolContentID));
- VoteAction.logger.debug("voteContent: " + voteContent);
VoteGeneralAuthoringDTO voteGeneralAuthoringDTO = new VoteGeneralAuthoringDTO();
- VoteAction.logger.debug("voteGeneralAuthoringDTO: " + voteGeneralAuthoringDTO);
voteGeneralAuthoringDTO.setContentFolderID(contentFolderID);
repopulateRequestParameters(request, voteAuthoringForm, voteGeneralAuthoringDTO);
@@ -1584,35 +1155,25 @@
AuthoringUtil authoringUtil = new AuthoringUtil();
List listNominationContentDTO = (List) sessionMap.get(VoteAppConstants.LIST_NOMINATION_CONTENT_DTO_KEY);
- VoteAction.logger.debug("listNominationContentDTO: " + listNominationContentDTO);
String newNomination = request.getParameter("newNomination");
- VoteAction.logger.debug("newNomination: " + newNomination);
String feedback = request.getParameter("feedback");
- VoteAction.logger.debug("feedback: " + feedback);
String editableNominationIndex = request.getParameter("editableNominationIndex");
- VoteAction.logger.debug("editableNominationIndex: " + editableNominationIndex);
if (newNomination != null && newNomination.length() > 0) {
if (editNominationBoxRequest != null && editNominationBoxRequest.equals("false")) {
- VoteAction.logger.debug("request for add and save");
boolean duplicates = AuthoringUtil.checkDuplicateNominations(listNominationContentDTO, newNomination);
- VoteAction.logger.debug("duplicates: " + duplicates);
if (!duplicates) {
VoteNominationContentDTO voteNominationContentDTO = null;
Iterator listIterator = listNominationContentDTO.iterator();
while (listIterator.hasNext()) {
voteNominationContentDTO = (VoteNominationContentDTO) listIterator.next();
- VoteAction.logger.debug("voteNominationContentDTO:" + voteNominationContentDTO);
- VoteAction.logger.debug("voteNominationContentDTO question:"
- + voteNominationContentDTO.getQuestion());
String question = voteNominationContentDTO.getNomination();
String displayOrder = voteNominationContentDTO.getDisplayOrder();
- VoteAction.logger.debug("displayOrder:" + displayOrder);
if (displayOrder != null && !displayOrder.equals("")) {
if (displayOrder.equals(editableNominationIndex)) {
@@ -1621,32 +1182,25 @@
}
}
- VoteAction.logger.debug("voteNominationContentDTO found:" + voteNominationContentDTO);
voteNominationContentDTO.setQuestion(newNomination);
voteNominationContentDTO.setFeedback(feedback);
voteNominationContentDTO.setDisplayOrder(editableNominationIndex);
listNominationContentDTO = AuthoringUtil.reorderUpdateListNominationContentDTO(
listNominationContentDTO, voteNominationContentDTO, editableNominationIndex);
- VoteAction.logger.debug("post reorderUpdateListNominationContentDTO listNominationContentDTO: "
- + listNominationContentDTO);
} else {
- VoteAction.logger.debug("duplicate question entry, not adding");
+ //duplicate question entry, not adding
}
} else {
- VoteAction.logger.debug("request for edit and save.");
+ //request for edit and save
VoteNominationContentDTO voteNominationContentDTO = null;
Iterator listIterator = listNominationContentDTO.iterator();
while (listIterator.hasNext()) {
voteNominationContentDTO = (VoteNominationContentDTO) listIterator.next();
- VoteAction.logger.debug("voteNominationContentDTO:" + voteNominationContentDTO);
- VoteAction.logger.debug("voteNominationContentDTO question:"
- + voteNominationContentDTO.getNomination());
String question = voteNominationContentDTO.getNomination();
String displayOrder = voteNominationContentDTO.getDisplayOrder();
- VoteAction.logger.debug("displayOrder:" + displayOrder);
if (displayOrder != null && !displayOrder.equals("")) {
if (displayOrder.equals(editableNominationIndex)) {
@@ -1655,59 +1209,44 @@
}
}
- VoteAction.logger.debug("voteNominationContentDTO found:" + voteNominationContentDTO);
voteNominationContentDTO.setNomination(newNomination);
voteNominationContentDTO.setFeedback(feedback);
voteNominationContentDTO.setDisplayOrder(editableNominationIndex);
listNominationContentDTO = AuthoringUtil.reorderUpdateListNominationContentDTO(
listNominationContentDTO, voteNominationContentDTO, editableNominationIndex);
- VoteAction.logger.debug("post reorderUpdateListNominationContentDTO listNominationContentDTO: "
- + listNominationContentDTO);
}
} else {
- VoteAction.logger.debug("entry blank, not adding");
+ //entry blank, not adding
}
request.setAttribute(VoteAppConstants.LIST_NOMINATION_CONTENT_DTO, listNominationContentDTO);
sessionMap.put(VoteAppConstants.LIST_NOMINATION_CONTENT_DTO_KEY, listNominationContentDTO);
- VoteAction.logger.debug("listNominationContentDTO now: " + listNominationContentDTO);
String richTextTitle = (String) sessionMap.get(VoteAppConstants.ACTIVITY_TITLE_KEY);
- VoteAction.logger.debug("richTextTitle: " + richTextTitle);
String richTextInstructions = (String) sessionMap.get(VoteAppConstants.ACTIVITY_INSTRUCTIONS_KEY);
- VoteAction.logger.debug("richTextInstructions: " + richTextInstructions);
- VoteAction.logger.debug("richTextTitle: " + richTextTitle);
- VoteAction.logger.debug("richTextInstructions: " + richTextInstructions);
voteGeneralAuthoringDTO.setActivityTitle(richTextTitle);
voteAuthoringForm.setTitle(richTextTitle);
voteGeneralAuthoringDTO.setActivityInstructions(richTextInstructions);
- VoteAction.logger.debug("activeModule: " + activeModule);
if (activeModule.equals(VoteAppConstants.AUTHORING)) {
String onlineInstructions = (String) sessionMap.get(VoteAppConstants.ONLINE_INSTRUCTIONS_KEY);
- VoteAction.logger.debug("onlineInstructions: " + onlineInstructions);
voteGeneralAuthoringDTO.setOnlineInstructions(onlineInstructions);
String offlineInstructions = (String) sessionMap.get(VoteAppConstants.OFFLINE_INSTRUCTIONS_KEY);
- VoteAction.logger.debug("offlineInstructions: " + offlineInstructions);
voteGeneralAuthoringDTO.setOfflineInstructions(offlineInstructions);
List attachmentList = (List) sessionMap.get(VoteAppConstants.ATTACHMENT_LIST_KEY);
- VoteAction.logger.debug("attachmentList: " + attachmentList);
List deletedAttachmentList = (List) sessionMap.get(VoteAppConstants.DELETED_ATTACHMENT_LIST_KEY);
- VoteAction.logger.debug("deletedAttachmentList: " + deletedAttachmentList);
voteGeneralAuthoringDTO.setAttachmentList(attachmentList);
voteGeneralAuthoringDTO.setDeletedAttachmentList(deletedAttachmentList);
String strOnlineInstructions = request.getParameter("onlineInstructions");
String strOfflineInstructions = request.getParameter("offlineInstructions");
- VoteAction.logger.debug("onlineInstructions: " + strOnlineInstructions);
- VoteAction.logger.debug("offlineInstructions: " + strOfflineInstructions);
voteAuthoringForm.setOnlineInstructions(strOnlineInstructions);
voteAuthoringForm.setOfflineInstructions(strOfflineInstructions);
@@ -1729,19 +1268,12 @@
voteGeneralAuthoringDTO.setDefineLaterInEditMode(new Boolean(true).toString());
- VoteAction.logger.debug("voteGeneralAuthoringDTO now: " + voteGeneralAuthoringDTO);
request.setAttribute(VoteAppConstants.VOTE_GENERAL_AUTHORING_DTO, voteGeneralAuthoringDTO);
- VoteAction.logger.debug("httpSessionID: " + httpSessionID);
- VoteAction.logger.debug("sessionMap: " + sessionMap);
-
request.getSession().setAttribute(httpSessionID, sessionMap);
- VoteAction.logger.debug("voteGeneralAuthoringDTO.getMapNominationContent(); "
- + voteGeneralAuthoringDTO.getMapNominationContent());
request.setAttribute(VoteAppConstants.TOTAL_NOMINATION_COUNT, new Integer(listNominationContentDTO.size()));
- VoteAction.logger.debug("fwd ing to LOAD_QUESTIONS: " + VoteAppConstants.LOAD_QUESTIONS);
return mapping.findForward(VoteAppConstants.LOAD_QUESTIONS);
}
@@ -1760,40 +1292,29 @@
*/
public ActionForward submitAllContent(ActionMapping mapping, ActionForm form, HttpServletRequest request,
HttpServletResponse response) throws IOException, ServletException {
- VoteAction.logger.debug("dispathcing submitAllContent :" + form);
VoteAuthoringForm voteAuthoringForm = (VoteAuthoringForm) form;
IVoteService voteService = VoteServiceProxy.getVoteService(getServlet().getServletContext());
- VoteAction.logger.debug("voteService: " + voteService);
String httpSessionID = voteAuthoringForm.getHttpSessionID();
- VoteAction.logger.debug("httpSessionID: " + httpSessionID);
SessionMap sessionMap = (SessionMap) request.getSession().getAttribute(httpSessionID);
- VoteAction.logger.debug("sessionMap: " + sessionMap);
String contentFolderID = WebUtil.readStrParam(request, AttributeNames.PARAM_CONTENT_FOLDER_ID);
- VoteAction.logger.debug("contentFolderID: " + contentFolderID);
voteAuthoringForm.setContentFolderID(contentFolderID);
String activeModule = request.getParameter(VoteAppConstants.ACTIVE_MODULE);
- VoteAction.logger.debug("activeModule: " + activeModule);
String strToolContentID = request.getParameter(AttributeNames.PARAM_TOOL_CONTENT_ID);
- VoteAction.logger.debug("strToolContentID: " + strToolContentID);
List listNominationContentDTO = (List) sessionMap.get(VoteAppConstants.LIST_NOMINATION_CONTENT_DTO_KEY);
- VoteAction.logger.debug("listNominationContentDTO: " + listNominationContentDTO);
Map mapNominationContent = AuthoringUtil.extractMapNominationContent(listNominationContentDTO);
- VoteAction.logger.debug("extracted mapNominationContent: " + mapNominationContent);
Map mapFeedback = AuthoringUtil.extractMapFeedback(listNominationContentDTO);
- VoteAction.logger.debug("extracted mapFeedback: " + mapFeedback);
ActionMessages errors = new ActionMessages();
- VoteAction.logger.debug("mapNominationContent size: " + mapNominationContent.size());
if (mapNominationContent.size() == 0
&& (voteAuthoringForm.getAssignedDataFlowObject() == null || voteAuthoringForm
@@ -1803,7 +1324,6 @@
}
String maxNomCount = voteAuthoringForm.getMaxNominationCount();
- VoteAction.logger.debug("maxNomCount:" + maxNomCount);
if (activeModule != null) {
if (activeModule.equals(VoteAppConstants.AUTHORING)) {
@@ -1815,7 +1335,6 @@
try {
int intMaxNomCount = new Integer(maxNomCount).intValue();
- VoteAction.logger.debug("intMaxNomCount : " + intMaxNomCount);
} catch (NumberFormatException e) {
ActionMessage error = new ActionMessage("maxNomination.invalid");
errors.add(ActionMessages.GLOBAL_MESSAGE, error);
@@ -1825,49 +1344,39 @@
}
boolean nominationsDuplicate = AuthoringUtil.verifyDuplicateNominations(mapNominationContent);
- VoteAction.logger.debug("nominationsDuplicate :" + nominationsDuplicate);
if (nominationsDuplicate == true) {
ActionMessage error = new ActionMessage("nominations.duplicate");
errors.add(ActionMessages.GLOBAL_MESSAGE, error);
}
- VoteAction.logger.debug("errors: " + errors);
-
AuthoringUtil authoringUtil = new AuthoringUtil();
VoteGeneralAuthoringDTO voteGeneralAuthoringDTO = new VoteGeneralAuthoringDTO();
repopulateRequestParameters(request, voteAuthoringForm, voteGeneralAuthoringDTO);
DataFlowObject assignedDataFlowObject = null;
- VoteAction.logger.debug("activeModule: " + activeModule);
if (activeModule.equals(VoteAppConstants.AUTHORING)) {
List attachmentListBackup = new ArrayList();
List attachmentList = (List) sessionMap.get(VoteAppConstants.ATTACHMENT_LIST_KEY);
- VoteAction.logger.debug("attachmentList: " + attachmentList);
attachmentListBackup = attachmentList;
List deletedAttachmentListBackup = new ArrayList();
List deletedAttachmentList = (List) sessionMap.get(VoteAppConstants.DELETED_ATTACHMENT_LIST_KEY);
- VoteAction.logger.debug("deletedAttachmentList: " + deletedAttachmentList);
deletedAttachmentListBackup = deletedAttachmentList;
String onlineInstructions = (String) sessionMap.get(VoteAppConstants.ONLINE_INSTRUCTIONS_KEY);
- VoteAction.logger.debug("onlineInstructions: " + onlineInstructions);
voteGeneralAuthoringDTO.setOnlineInstructions(onlineInstructions);
String offlineInstructions = (String) sessionMap.get(VoteAppConstants.OFFLINE_INSTRUCTIONS_KEY);
- VoteAction.logger.debug("offlineInstructions: " + offlineInstructions);
voteGeneralAuthoringDTO.setOfflineInstructions(offlineInstructions);
voteGeneralAuthoringDTO.setAttachmentList(attachmentList);
voteGeneralAuthoringDTO.setDeletedAttachmentList(deletedAttachmentList);
String strOnlineInstructions = request.getParameter("onlineInstructions");
String strOfflineInstructions = request.getParameter("offlineInstructions");
- VoteAction.logger.debug("onlineInstructions: " + strOnlineInstructions);
- VoteAction.logger.debug("offlineInstructions: " + strOfflineInstructions);
voteAuthoringForm.setOfflineInstructions(strOfflineInstructions);
voteAuthoringForm.setOnlineInstructions(strOnlineInstructions);
@@ -1900,9 +1409,6 @@
String richTextTitle = request.getParameter(VoteAppConstants.TITLE);
String richTextInstructions = request.getParameter(VoteAppConstants.INSTRUCTIONS);
- VoteAction.logger.debug("richTextTitle: " + richTextTitle);
- VoteAction.logger.debug("richTextInstructions: " + richTextInstructions);
-
voteGeneralAuthoringDTO.setActivityTitle(richTextTitle);
voteAuthoringForm.setTitle(richTextTitle);
@@ -1912,80 +1418,57 @@
sessionMap.put(VoteAppConstants.ACTIVITY_INSTRUCTIONS_KEY, richTextInstructions);
voteGeneralAuthoringDTO.setMapNominationContent(mapNominationContent);
- VoteAction.logger.debug("voteGeneralAuthoringDTO: " + voteGeneralAuthoringDTO);
-
- VoteAction.logger.debug("voteGeneralAuthoringDTO now: " + voteGeneralAuthoringDTO);
request.setAttribute(VoteAppConstants.VOTE_GENERAL_AUTHORING_DTO, voteGeneralAuthoringDTO);
- VoteAction.logger.debug("there are no issues with input, continue and submit data");
-
VoteContent voteContentTest = voteService.retrieveVote(new Long(strToolContentID));
- VoteAction.logger.debug("voteContentTest: " + voteContentTest);
-
- VoteAction.logger.debug("errors: " + errors);
if (!errors.isEmpty()) {
saveErrors(request, errors);
- VoteAction.logger.debug("errors saved: " + errors);
+ VoteAction.logger.error("errors saved: " + errors);
}
VoteContent voteContent = voteContentTest;
if (errors.isEmpty()) {
- VoteAction.logger.debug("errors is empty: " + errors);
/* to remove deleted entries in the questions table based on mapNominationContent */
authoringUtil.removeRedundantNominations(mapNominationContent, voteService, voteAuthoringForm, request,
strToolContentID);
- VoteAction.logger.debug("end of removing unused entries... ");
voteContent = authoringUtil.saveOrUpdateVoteContent(mapNominationContent, mapFeedback, voteService,
voteAuthoringForm, request, voteContentTest, strToolContentID, assignedDataFlowObject);
- VoteAction.logger.debug("voteContent: " + voteContent);
long defaultContentID = 0;
- VoteAction.logger.debug("attempt retrieving tool with signatute : " + VoteAppConstants.MY_SIGNATURE);
defaultContentID = voteService.getToolDefaultContentIdBySignature(VoteAppConstants.MY_SIGNATURE);
- VoteAction.logger.debug("retrieved tool default contentId: " + defaultContentID);
if (voteContent != null) {
voteGeneralAuthoringDTO.setDefaultContentIdStr(new Long(defaultContentID).toString());
}
- VoteAction.logger.debug("updated voteGeneralAuthoringDTO to: " + voteGeneralAuthoringDTO);
authoringUtil.reOrganizeDisplayOrder(mapNominationContent, voteService, voteAuthoringForm, voteContent);
- VoteAction.logger.debug("activeModule: " + activeModule);
if (activeModule.equals(VoteAppConstants.AUTHORING)) {
- VoteAction.logger.debug("since it is authoring save the attachments: ");
+ //since it is authoring save the attachments
List attachmentList = (List) sessionMap.get(VoteAppConstants.ATTACHMENT_LIST_KEY);
- VoteAction.logger.debug("attachmentList: " + attachmentList);
-
List deletedAttachmentList = (List) sessionMap.get(VoteAppConstants.DELETED_ATTACHMENT_LIST_KEY);
List attachments = saveAttachments(voteContent, attachmentList, deletedAttachmentList, mapping, request);
- VoteAction.logger.debug("attachments: " + attachments);
}
- VoteAction.logger.debug("strToolContentID: " + strToolContentID);
VoteUtils.setDefineLater(request, false, strToolContentID, voteService);
- VoteAction.logger.debug("define later set to false");
if (activeModule.equals(VoteAppConstants.AUTHORING)) {
- VoteAction.logger.debug("standard authoring close");
+ //standard authoring close
request.setAttribute(AuthoringConstants.LAMS_AUTHORING_SUCCESS_FLAG, Boolean.TRUE);
voteGeneralAuthoringDTO.setDefineLaterInEditMode(new Boolean(true).toString());
} else {
- VoteAction.logger.debug("go back to view only screen");
+ //go back to view only screen
voteGeneralAuthoringDTO.setDefineLaterInEditMode(new Boolean(false).toString());
}
} else {
- VoteAction.logger.debug("errors is not empty: " + errors);
if (voteContent != null) {
long defaultContentID = 0;
- VoteAction.logger.debug("attempt retrieving tool with signatute : " + VoteAppConstants.MY_SIGNATURE);
defaultContentID = voteService.getToolDefaultContentIdBySignature(VoteAppConstants.MY_SIGNATURE);
- VoteAction.logger.debug("retrieved tool default contentId: " + defaultContentID);
if (voteContent != null) {
voteGeneralAuthoringDTO.setDefaultContentIdStr(new Long(defaultContentID).toString());
@@ -1999,7 +1482,6 @@
voteAuthoringForm.resetUserAction();
voteGeneralAuthoringDTO.setMapNominationContent(mapNominationContent);
- VoteAction.logger.debug("before saving final voteGeneralAuthoringDTO: " + voteGeneralAuthoringDTO);
request.setAttribute(VoteAppConstants.VOTE_GENERAL_AUTHORING_DTO, voteGeneralAuthoringDTO);
request.setAttribute(VoteAppConstants.LIST_NOMINATION_CONTENT_DTO, listNominationContentDTO);
@@ -2017,7 +1499,6 @@
voteAuthoringForm.setActiveModule(activeModule);
voteAuthoringForm.setCurrentTab("1");
- VoteAction.logger.debug("forwarding to :" + VoteAppConstants.LOAD_QUESTIONS);
return mapping.findForward(VoteAppConstants.LOAD_QUESTIONS);
}
@@ -2045,42 +1526,31 @@
private List saveAttachments(VoteContent voteContent, List attachmentList, List deletedAttachmentList,
ActionMapping mapping, HttpServletRequest request) {
- VoteAction.logger.debug("start saveAttachments, attachmentList " + attachmentList);
- VoteAction.logger.debug("start deletedAttachmentList, deletedAttachmentList " + deletedAttachmentList);
-
if (attachmentList == null || deletedAttachmentList == null) {
return null;
}
IVoteService voteService = VoteServiceProxy.getVoteService(getServlet().getServletContext());
- VoteAction.logger.debug("voteService: " + voteService);
if (deletedAttachmentList != null) {
- VoteAction.logger.debug("deletedAttachmentList is iterated...");
Iterator iter = deletedAttachmentList.iterator();
while (iter.hasNext()) {
VoteUploadedFile attachment = (VoteUploadedFile) iter.next();
- VoteAction.logger.debug("attachment: " + attachment);
if (attachment.getSubmissionId() != null) {
voteService.removeFile(attachment.getSubmissionId());
}
}
deletedAttachmentList.clear();
- VoteAction.logger.error("cleared attachment list.");
}
if (attachmentList != null) {
- VoteAction.logger.debug("attachmentList is iterated...");
Iterator iter = attachmentList.iterator();
while (iter.hasNext()) {
VoteUploadedFile attachment = (VoteUploadedFile) iter.next();
- VoteAction.logger.debug("attachment: " + attachment);
- VoteAction.logger.debug("attachment submission id: " + attachment.getSubmissionId());
if (attachment.getSubmissionId() == null) {
/* add entry to tool table - file already in content repository */
- VoteAction.logger.debug("calling persistFile with attachment: " + attachment);
voteService.persistFile(voteContent, attachment);
}
}
@@ -2104,39 +1574,29 @@
*/
public ActionForward deleteFile(ActionMapping mapping, ActionForm form, HttpServletRequest request,
HttpServletResponse response) throws IOException, ServletException {
- VoteAction.logger.debug("dispatching deleteFile");
VoteAuthoringForm voteAuthoringForm = (VoteAuthoringForm) form;
IVoteService voteService = VoteServiceProxy.getVoteService(getServlet().getServletContext());
- VoteAction.logger.debug("voteService: " + voteService);
String httpSessionID = request.getParameter(VoteAppConstants.HTTP_SESSION_ID);
- VoteAction.logger.debug("httpSessionID: " + httpSessionID);
voteAuthoringForm.setHttpSessionID(httpSessionID);
SessionMap sessionMap = (SessionMap) request.getSession().getAttribute(httpSessionID);
- VoteAction.logger.debug("sessionMap: " + sessionMap);
String contentFolderID = WebUtil.readStrParam(request, AttributeNames.PARAM_CONTENT_FOLDER_ID);
- VoteAction.logger.debug("contentFolderID: " + contentFolderID);
voteAuthoringForm.setContentFolderID(contentFolderID);
String activeModule = request.getParameter(VoteAppConstants.ACTIVE_MODULE);
- VoteAction.logger.debug("activeModule: " + activeModule);
String strToolContentID = request.getParameter(AttributeNames.PARAM_TOOL_CONTENT_ID);
- VoteAction.logger.debug("strToolContentID: " + strToolContentID);
List listQuestionContentDTO = (List) sessionMap.get(VoteAppConstants.LIST_NOMINATION_CONTENT_DTO_KEY);
- VoteAction.logger.debug("listQuestionContentDTO: " + listQuestionContentDTO);
request.setAttribute(VoteAppConstants.LIST_NOMINATION_CONTENT_DTO, listQuestionContentDTO);
VoteContent voteContent = voteService.retrieveVote(new Long(strToolContentID));
- VoteAction.logger.debug("voteContent: " + voteContent);
VoteGeneralAuthoringDTO voteGeneralAuthoringDTO = new VoteGeneralAuthoringDTO();
- VoteAction.logger.debug("voteGeneralAuthoringDTO: " + voteGeneralAuthoringDTO);
voteGeneralAuthoringDTO.setContentFolderID(contentFolderID);
voteGeneralAuthoringDTO.setHttpSessionID(httpSessionID);
@@ -2145,13 +1605,7 @@
voteGeneralAuthoringDTO.setSbmtSuccess(new Integer(0).toString());
String onlineInstructions = (String) sessionMap.get(VoteAppConstants.ONLINE_INSTRUCTIONS_KEY);
- VoteAction.logger.debug("onlineInstructions: " + onlineInstructions);
-
String offlineInstructions = (String) sessionMap.get(VoteAppConstants.OFFLINE_INSTRUCTIONS_KEY);
- VoteAction.logger.debug("offlineInstructions: " + offlineInstructions);
-
- VoteAction.logger.debug("onlineInstructions: " + onlineInstructions);
- VoteAction.logger.debug("offlineInstructions: " + offlineInstructions);
voteAuthoringForm.setOnlineInstructions(onlineInstructions);
voteAuthoringForm.setOfflineInstructions(offlineInstructions);
voteGeneralAuthoringDTO.setOnlineInstructions(onlineInstructions);
@@ -2160,8 +1614,6 @@
String richTextTitle = (String) sessionMap.get(VoteAppConstants.ACTIVITY_TITLE_KEY);
String richTextInstructions = (String) sessionMap.get(VoteAppConstants.ACTIVITY_INSTRUCTIONS_KEY);
- VoteAction.logger.debug("richTextTitle: " + richTextTitle);
- VoteAction.logger.debug("richTextInstructions: " + richTextInstructions);
voteGeneralAuthoringDTO.setActivityTitle(richTextTitle);
voteAuthoringForm.setTitle(richTextTitle);
voteGeneralAuthoringDTO.setActivityInstructions(richTextInstructions);
@@ -2172,15 +1624,11 @@
long uuid = WebUtil.readLongParam(request, VoteAppConstants.UUID);
List attachmentList = (List) sessionMap.get(VoteAppConstants.ATTACHMENT_LIST_KEY);
- VoteAction.logger.debug("attachmentList: " + attachmentList);
-
if (attachmentList == null) {
attachmentList = new ArrayList();
}
List deletedAttachmentList = (List) sessionMap.get(VoteAppConstants.DELETED_ATTACHMENT_LIST_KEY);
- VoteAction.logger.debug("deletedAttachmentList: " + deletedAttachmentList);
-
if (deletedAttachmentList == null) {
deletedAttachmentList = new ArrayList();
}
@@ -2191,9 +1639,6 @@
*/
deletedAttachmentList = VoteUtils.moveToDelete(Long.toString(uuid), attachmentList, deletedAttachmentList);
- VoteAction.logger.debug("post moveToDelete, attachmentList: " + attachmentList);
- VoteAction.logger.debug("post moveToDelete, deletedAttachmentList: " + deletedAttachmentList);
-
sessionMap.put(VoteAppConstants.ATTACHMENT_LIST_KEY, attachmentList);
sessionMap.put(VoteAppConstants.DELETED_ATTACHMENT_LIST_KEY, deletedAttachmentList);
@@ -2210,14 +1655,11 @@
voteAuthoringForm.setActiveModule(activeModule);
voteAuthoringForm.setCurrentTab("3");
- VoteAction.logger.debug("before saving final voteGeneralAuthoringDTO: " + voteGeneralAuthoringDTO);
request.setAttribute(VoteAppConstants.VOTE_GENERAL_AUTHORING_DTO, voteGeneralAuthoringDTO);
request.setAttribute(VoteAppConstants.TOTAL_NOMINATION_COUNT, new Integer(listQuestionContentDTO.size()));
voteAuthoringForm.resetUserAction();
- VoteAction.logger.debug("fwd ing to LOAD_QUESTIONS: " + VoteAppConstants.LOAD_QUESTIONS);
-
return mapping.findForward(VoteAppConstants.LOAD_QUESTIONS);
}
@@ -2236,47 +1678,30 @@
*/
public ActionForward addNewFile(ActionMapping mapping, ActionForm form, HttpServletRequest request,
HttpServletResponse response) throws IOException, ServletException {
- VoteAction.logger.debug("dispathching addNewFile");
VoteAuthoringForm voteAuthoringForm = (VoteAuthoringForm) form;
IVoteService voteService = VoteServiceProxy.getVoteService(getServlet().getServletContext());
- VoteAction.logger.debug("voteService: " + voteService);
-
String httpSessionID = voteAuthoringForm.getHttpSessionID();
- VoteAction.logger.debug("httpSessionID: " + httpSessionID);
-
SessionMap sessionMap = (SessionMap) request.getSession().getAttribute(httpSessionID);
- VoteAction.logger.debug("sessionMap: " + sessionMap);
-
String contentFolderID = WebUtil.readStrParam(request, AttributeNames.PARAM_CONTENT_FOLDER_ID);
- VoteAction.logger.debug("contentFolderID: " + contentFolderID);
voteAuthoringForm.setContentFolderID(contentFolderID);
String activeModule = request.getParameter(VoteAppConstants.ACTIVE_MODULE);
- VoteAction.logger.debug("activeModule: " + activeModule);
String onlineInstructions = request.getParameter(VoteAppConstants.ONLINE_INSTRUCTIONS);
- VoteAction.logger.debug("onlineInstructions: " + onlineInstructions);
String offlineInstructions = request.getParameter(VoteAppConstants.OFFLINE_INSTRUCTIONS);
- VoteAction.logger.debug("offlineInstructions: " + offlineInstructions);
sessionMap.put(VoteAppConstants.ONLINE_INSTRUCTIONS_KEY, onlineInstructions);
sessionMap.put(VoteAppConstants.OFFLINE_INSTRUCTIONS, offlineInstructions);
List listNominationContentDTO = (List) sessionMap.get(VoteAppConstants.LIST_NOMINATION_CONTENT_DTO_KEY);
- VoteAction.logger.debug("listNominationContentDTO: " + listNominationContentDTO);
-
request.setAttribute(VoteAppConstants.LIST_NOMINATION_CONTENT_DTO, listNominationContentDTO);
String strToolContentID = request.getParameter(AttributeNames.PARAM_TOOL_CONTENT_ID);
- VoteAction.logger.debug("strToolContentID: " + strToolContentID);
-
VoteContent voteContent = voteService.retrieveVote(new Long(strToolContentID));
- VoteAction.logger.debug("voteContent: " + voteContent);
VoteGeneralAuthoringDTO voteGeneralAuthoringDTO = new VoteGeneralAuthoringDTO();
- VoteAction.logger.debug("voteGeneralAuthoringDTO: " + voteGeneralAuthoringDTO);
voteGeneralAuthoringDTO.setContentFolderID(contentFolderID);
voteGeneralAuthoringDTO.setOnlineInstructions(onlineInstructions);
@@ -2289,8 +1714,6 @@
String richTextTitle = request.getParameter(VoteAppConstants.TITLE);
String richTextInstructions = request.getParameter(VoteAppConstants.INSTRUCTIONS);
- VoteAction.logger.debug("richTextTitle: " + richTextTitle);
- VoteAction.logger.debug("richTextInstructions: " + richTextInstructions);
voteGeneralAuthoringDTO.setActivityTitle(richTextTitle);
voteAuthoringForm.setTitle(richTextTitle);
@@ -2300,14 +1723,10 @@
sessionMap.put(VoteAppConstants.ACTIVITY_INSTRUCTIONS_KEY, richTextInstructions);
List attachmentList = (List) sessionMap.get(VoteAppConstants.ATTACHMENT_LIST_KEY);
- VoteAction.logger.debug("attachmentList: " + attachmentList);
List deletedAttachmentList = (List) sessionMap.get(VoteAppConstants.DELETED_ATTACHMENT_LIST_KEY);
- VoteAction.logger.debug("deletedAttachmentList: " + deletedAttachmentList);
addFileToContentRepository(request, voteAuthoringForm, attachmentList, deletedAttachmentList, sessionMap,
voteGeneralAuthoringDTO);
- VoteAction.logger.debug("post addFileToContentRepository, attachmentList: " + attachmentList);
- VoteAction.logger.debug("post addFileToContentRepository, deletedAttachmentList: " + deletedAttachmentList);
sessionMap.put(VoteAppConstants.ATTACHMENT_LIST_KEY, attachmentList);
sessionMap.put(VoteAppConstants.DELETED_ATTACHMENT_LIST_KEY, deletedAttachmentList);
@@ -2325,27 +1744,20 @@
voteAuthoringForm.setActiveModule(activeModule);
voteAuthoringForm.setCurrentTab("3");
- VoteAction.logger.debug("before saving final voteGeneralAuthoringDTO: " + voteGeneralAuthoringDTO);
request.setAttribute(VoteAppConstants.VOTE_GENERAL_AUTHORING_DTO, voteGeneralAuthoringDTO);
voteAuthoringForm.resetUserAction();
String strOnlineInstructions = request.getParameter("onlineInstructions");
String strOfflineInstructions = request.getParameter("offlineInstructions");
- VoteAction.logger.debug("onlineInstructions: " + strOnlineInstructions);
- VoteAction.logger.debug("offlineInstructions: " + strOnlineInstructions);
voteAuthoringForm.setOnlineInstructions(strOnlineInstructions);
voteAuthoringForm.setOfflineInstructions(strOfflineInstructions);
request.setAttribute(VoteAppConstants.TOTAL_NOMINATION_COUNT, new Integer(listNominationContentDTO.size()));
-
- VoteAction.logger.debug("fwd ing to LOAD_QUESTIONS: " + VoteAppConstants.LOAD_QUESTIONS);
return mapping.findForward(VoteAppConstants.LOAD_QUESTIONS);
}
/**
- * addFileToContentRepository
- *
* persists files data in the content repository
*
* @param request
@@ -2358,11 +1770,7 @@
public void addFileToContentRepository(HttpServletRequest request, VoteAuthoringForm voteAuthoringForm,
List attachmentList, List deletedAttachmentList, SessionMap sessionMap,
VoteGeneralAuthoringDTO voteGeneralAuthoringDTO) {
- VoteAction.logger.debug("attempt addFileToContentRepository");
- VoteAction.logger.debug("attachmentList: " + attachmentList);
- VoteAction.logger.debug("deletedAttachmentList: " + deletedAttachmentList);
IVoteService voteService = VoteServiceProxy.getVoteService(getServlet().getServletContext());
- VoteAction.logger.debug("voteService: " + voteService);
if (attachmentList == null) {
attachmentList = new ArrayList();
@@ -2376,15 +1784,11 @@
boolean isOnlineFile = false;
String fileType = null;
if (voteAuthoringForm.getTheOfflineFile() != null && voteAuthoringForm.getTheOfflineFile().getFileSize() > 0) {
- VoteAction.logger.debug("theOfflineFile is available: ");
uploadedFile = voteAuthoringForm.getTheOfflineFile();
- VoteAction.logger.debug("uploadedFile: " + uploadedFile);
fileType = IToolContentHandler.TYPE_OFFLINE;
} else if (voteAuthoringForm.getTheOnlineFile() != null
&& voteAuthoringForm.getTheOnlineFile().getFileSize() > 0) {
- VoteAction.logger.debug("theOnlineFile is available: ");
uploadedFile = voteAuthoringForm.getTheOnlineFile();
- VoteAction.logger.debug("uploadedFile: " + uploadedFile);
isOnlineFile = true;
fileType = IToolContentHandler.TYPE_ONLINE;
} else {
@@ -2400,12 +1804,9 @@
return;
}
- VoteAction.logger.debug("uploadedFile.getFileName(): " + uploadedFile.getFileName());
-
/* if a file with the same name already exists then move the old one to deleted */
deletedAttachmentList = VoteUtils.moveToDelete(uploadedFile.getFileName(), isOnlineFile, attachmentList,
deletedAttachmentList);
- VoteAction.logger.debug("deletedAttachmentList: " + deletedAttachmentList);
try {
/*
@@ -2416,12 +1817,9 @@
uploadedFile.getFileName(), uploadedFile.getContentType(), fileType);
VoteUploadedFile file = new VoteUploadedFile();
String fileName = uploadedFile.getFileName();
- VoteAction.logger.debug("fileName: " + fileName);
- VoteAction.logger.debug("fileName length: " + fileName.length());
if (fileName != null && fileName.length() > 30) {
fileName = fileName.substring(0, 31);
- VoteAction.logger.debug("shortened fileName: " + fileName);
}
file.setFileName(fileName);
Index: lams_tool_vote/src/java/org/lamsfoundation/lams/tool/vote/web/VoteChartGeneratorAction.java
===================================================================
diff -u -rd25b9e0ce0aa1cc320186300d26c05ef385b780c -r601fd92095193321a6b2286ef55108fbe5f9dfc4
--- lams_tool_vote/src/java/org/lamsfoundation/lams/tool/vote/web/VoteChartGeneratorAction.java (.../VoteChartGeneratorAction.java) (revision d25b9e0ce0aa1cc320186300d26c05ef385b780c)
+++ lams_tool_vote/src/java/org/lamsfoundation/lams/tool/vote/web/VoteChartGeneratorAction.java (.../VoteChartGeneratorAction.java) (revision 601fd92095193321a6b2286ef55108fbe5f9dfc4)
@@ -29,7 +29,6 @@
import javax.servlet.http.HttpServletResponse;
import org.apache.commons.lang.StringUtils;
-import org.apache.log4j.Logger;
import org.apache.struts.action.ActionForm;
import org.apache.struts.action.ActionForward;
import org.apache.struts.action.ActionMapping;
@@ -50,7 +49,6 @@
* @author Marcin Cieslak
*/
public class VoteChartGeneratorAction extends LamsDispatchAction {
- private static final Logger logger = Logger.getLogger(VoteChartGeneratorAction.class.getName());
private static IVoteService voteService;
private static MessageService messageService;
Index: lams_tool_vote/src/java/org/lamsfoundation/lams/tool/vote/web/VoteDLStarterAction.java
===================================================================
diff -u -r00759d7592ccc90e8769763524afb69546f641d4 -r601fd92095193321a6b2286ef55108fbe5f9dfc4
--- lams_tool_vote/src/java/org/lamsfoundation/lams/tool/vote/web/VoteDLStarterAction.java (.../VoteDLStarterAction.java) (revision 00759d7592ccc90e8769763524afb69546f641d4)
+++ lams_tool_vote/src/java/org/lamsfoundation/lams/tool/vote/web/VoteDLStarterAction.java (.../VoteDLStarterAction.java) (revision 601fd92095193321a6b2286ef55108fbe5f9dfc4)
@@ -57,7 +57,6 @@
import javax.servlet.http.HttpServletRequest;
import javax.servlet.http.HttpServletResponse;
-import org.apache.log4j.Logger;
import org.apache.struts.action.Action;
import org.apache.struts.action.ActionForm;
import org.apache.struts.action.ActionForward;
@@ -70,17 +69,14 @@
public class VoteDLStarterAction extends Action implements VoteAppConstants {
- static Logger logger = Logger.getLogger(VoteDLStarterAction.class.getName());
public ActionForward execute(ActionMapping mapping, ActionForm form, HttpServletRequest request, HttpServletResponse response)
throws IOException, ServletException, VoteApplicationException {
VoteUtils.cleanUpSessionAbsolute(request);
- logger.debug("init defineLater mode. removed attributes...");
VoteAuthoringForm voteAuthoringForm = (VoteAuthoringForm) form;
IVoteService voteService = VoteServiceProxy.getVoteService(getServlet().getServletContext());
- logger.debug("voteService: " + voteService);
voteAuthoringForm.setVoteService(voteService);
VoteStarterAction voteStarterAction= new VoteStarterAction();
Index: lams_tool_vote/src/java/org/lamsfoundation/lams/tool/vote/web/VoteLearningAction.java
===================================================================
diff -u -r8aded0b18a5a7712622ae56f38923fa297449977 -r601fd92095193321a6b2286ef55108fbe5f9dfc4
--- lams_tool_vote/src/java/org/lamsfoundation/lams/tool/vote/web/VoteLearningAction.java (.../VoteLearningAction.java) (revision 8aded0b18a5a7712622ae56f38923fa297449977)
+++ lams_tool_vote/src/java/org/lamsfoundation/lams/tool/vote/web/VoteLearningAction.java (.../VoteLearningAction.java) (revision 601fd92095193321a6b2286ef55108fbe5f9dfc4)
@@ -49,7 +49,6 @@
import org.lamsfoundation.lams.tool.exception.DataMissingException;
import org.lamsfoundation.lams.tool.exception.ToolException;
import org.lamsfoundation.lams.tool.vote.VoteAppConstants;
-import org.lamsfoundation.lams.tool.vote.VoteApplicationException;
import org.lamsfoundation.lams.tool.vote.VoteComparator;
import org.lamsfoundation.lams.tool.vote.VoteGeneralLearnerFlowDTO;
import org.lamsfoundation.lams.tool.vote.VoteGeneralMonitoringDTO;
@@ -68,143 +67,13 @@
import org.lamsfoundation.lams.web.util.AttributeNames;
/**
- *
- * Action class that controls the logic of tool behavior.
- *
- *
- *
- * Note that Struts action class only has the responsibility to navigate page
- * flow. All database operation should go to service layer and data
- * transformation from domain model to struts form bean should go to form bean
- * class. This ensure clean and maintainable code.
- *
- *
- * SystemException
is thrown whenever an known error condition is
- * identified. No system exception error handling code should appear in the
- * Struts action class as all of them are handled in
- * CustomStrutsExceptionHandler.
- *
* @author Ozgur Demirtas
- *
- *
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
- *
*/
public class VoteLearningAction extends LamsDispatchAction implements VoteAppConstants {
static Logger logger = Logger.getLogger(VoteLearningAction.class.getName());
/**
- *
- * Default struts dispatch method.
- *
*
- *
- * It is assuming that progress engine should pass in the tool access mode
- * and the tool session id as http parameters.
- *
- *
- * @param mapping
- * An ActionMapping class that will be used by the Action
- * class to tell the ActionServlet where to send the
- * end-user.
- *
- * @param form
- * The ActionForm class that will contain any data submitted
- * by the end-user via a form.
- * @param request
- * A standard Servlet HttpServletRequest class.
- * @param response
- * A standard Servlet HttpServletResponse class.
- * @return An ActionForward class that will be returned to the ActionServlet
- * indicating where the user is to go next.
- * @throws IOException
- * @throws ServletException
- * @throws VoteApplicationException
- * the known runtime exception
- *
- * unspecified(ActionMapping mapping, ActionForm form, HttpServletRequest
- * request, HttpServletResponse response) throws IOException,
- * ServletException
- *
* main content/question content management and workflow logic
*
* if the passed toolContentID exists in the db, we need to get the relevant
@@ -226,7 +95,6 @@
public ActionForward viewAllResults(ActionMapping mapping, ActionForm form, HttpServletRequest request,
HttpServletResponse response) throws IOException, ServletException {
VoteUtils.cleanUpUserExceptions(request);
- logger.debug("dispatching viewAllResults...");
VoteLearningForm voteLearningForm = (VoteLearningForm) form;
VoteGeneralLearnerFlowDTO voteGeneralLearnerFlowDTO = new VoteGeneralLearnerFlowDTO();
@@ -239,78 +107,59 @@
voteGeneralLearnerFlowDTO.setMinNominationCountReached(new Boolean(false).toString());
IVoteService voteService = VoteServiceProxy.getVoteService(getServlet().getServletContext());
- logger.debug("retrieving voteService from session: " + voteService);
-
repopulateRequestParameters(request, voteLearningForm);
String toolSessionID = request.getParameter(TOOL_SESSION_ID);
- logger.debug("toolSessionID: " + toolSessionID);
voteLearningForm.setToolSessionID(toolSessionID);
String userID = request.getParameter(USER_ID);
- logger.debug("userID: " + userID);
voteLearningForm.setUserID(userID);
VoteSession voteSession = voteService.retrieveVoteSession(new Long(toolSessionID));
- logger.debug("retrieving voteSession: " + voteSession);
-
VoteContent voteContent = voteSession.getVoteContent();
- logger.debug("retrieving voteContent: " + voteContent);
voteGeneralLearnerFlowDTO.setActivityTitle(voteContent.getTitle());
voteGeneralLearnerFlowDTO.setActivityInstructions(voteContent.getInstructions());
Long toolContentID = voteContent.getVoteContentId();
- logger.debug("toolContentID: " + toolContentID);
setContentInUse(request, voteService, toolContentID);
Long toolSessionUid = voteSession.getUid();
- logger.debug("toolSessionUid: " + toolSessionUid);
VoteQueUsr existingVoteQueUsr = voteService.getVoteUserBySession(new Long(userID), voteSession.getUid());
- logger.debug("existingVoteQueUsr: " + existingVoteQueUsr);
existingVoteQueUsr.setFinalScreenRequested(true);
voteService.updateVoteUser(existingVoteQueUsr);
- logger.debug("final screen requested by: " + existingVoteQueUsr);
Set userAttempts = voteService.getAttemptsForUserAndSession(existingVoteQueUsr.getUid(), toolSessionUid);
- logger.debug("userAttempts: " + userAttempts);
request.setAttribute(LIST_GENERAL_CHECKED_OPTIONS_CONTENT, userAttempts);
request.setAttribute(LIST_GENERAL_CHECKED_OPTIONS_CONTENT, userAttempts);
- logger.debug("voteSession uid:" + voteSession.getUid());
- logger.debug("calling prepareChartData:" + voteContent.getVoteContentId() + " " + voteSession.getUid());
-
VoteGeneralMonitoringDTO voteGeneralMonitoringDTO = new VoteGeneralMonitoringDTO();
MonitoringUtil.prepareChartData(request, voteService, null, voteContent.getVoteContentId().toString(),
voteSession.getUid().toString(), voteGeneralLearnerFlowDTO, voteGeneralMonitoringDTO,
getMessageService());
- logger.debug("end of prepareChartData:" + voteContent.getVoteContentId() + " " + voteSession.getUid());
voteGeneralLearnerFlowDTO.setReflection(new Boolean(voteContent.isReflect()).toString());
String reflectionSubject = VoteUtils.replaceNewLines(voteContent.getReflectionSubject());
voteGeneralLearnerFlowDTO.setReflectionSubject(reflectionSubject);
voteLearningForm.resetCommands();
- logger.debug("view-only voteGeneralLearnerFlowDTO: " + voteGeneralLearnerFlowDTO);
request.setAttribute(VOTE_GENERAL_LEARNER_FLOW_DTO, voteGeneralLearnerFlowDTO);
LearningWebUtil.putActivityPositionInRequestByToolSessionId(new Long(toolSessionID), request, getServlet()
.getServletContext());
- logger.debug("fwding to ALL_NOMINATIONS: " + ALL_NOMINATIONS);
return (mapping.findForward(ALL_NOMINATIONS));
}
public ActionForward viewAnswers(ActionMapping mapping, ActionForm form, HttpServletRequest request,
HttpServletResponse response) throws IOException, ServletException {
VoteUtils.cleanUpUserExceptions(request);
- logger.debug("dispatching viewAnswers...");
VoteLearningForm voteLearningForm = (VoteLearningForm) form;
VoteGeneralLearnerFlowDTO voteGeneralLearnerFlowDTO = new VoteGeneralLearnerFlowDTO();
@@ -324,100 +173,74 @@
voteGeneralLearnerFlowDTO.setMinNominationCountReached(new Boolean(false).toString());
IVoteService voteService = VoteServiceProxy.getVoteService(getServlet().getServletContext());
- logger.debug("retrieving voteService from session: " + voteService);
repopulateRequestParameters(request, voteLearningForm);
String toolSessionID = request.getParameter(TOOL_SESSION_ID);
- logger.debug("toolSessionID: " + toolSessionID);
voteLearningForm.setToolSessionID(toolSessionID);
String userID = request.getParameter(USER_ID);
- logger.debug("userID: " + userID);
voteLearningForm.setUserID(userID);
String revisitingUser = request.getParameter(REVISITING_USER);
- logger.debug("revisitingUser: " + revisitingUser);
voteLearningForm.setRevisitingUser(revisitingUser);
VoteSession voteSession = voteService.retrieveVoteSession(new Long(toolSessionID));
- logger.debug("retrieving voteSession: " + voteSession);
-
VoteContent voteContent = voteSession.getVoteContent();
- logger.debug("retrieving voteContent: " + voteContent);
voteGeneralLearnerFlowDTO.setActivityTitle(voteContent.getTitle());
voteGeneralLearnerFlowDTO.setActivityInstructions(voteContent.getInstructions());
Long toolContentID = voteContent.getVoteContentId();
- logger.debug("toolContentID: " + toolContentID);
-
setContentInUse(request, voteService, toolContentID);
if (revisitingUser.equals("true")) {
- logger.debug("this is a revisiting user, get the nominations from the db: " + revisitingUser);
- logger.debug("toolContentID: " + toolContentID);
-
VoteQueUsr voteQueUsr = LearningUtil.getUser(request, voteService);
- logger.debug("voteQueUsr: " + voteQueUsr);
List attempts = voteService.getAttemptsForUser(voteQueUsr.getUid());
- logger.debug("attempts: " + attempts);
Map mapQuestionsContent = new TreeMap(new VoteComparator());
Iterator listIterator = attempts.iterator();
int order = 0;
while (listIterator.hasNext()) {
VoteUsrAttempt attempt = (VoteUsrAttempt) listIterator.next();
- logger.debug("attempt: " + attempt);
VoteQueContent voteQueContent = attempt.getVoteQueContent();
- logger.debug("voteQueContent: " + voteQueContent);
order++;
if (voteQueContent != null) {
mapQuestionsContent.put(new Integer(order).toString(), voteQueContent.getQuestion());
}
}
request.setAttribute(MAP_GENERAL_CHECKED_OPTIONS_CONTENT, mapQuestionsContent);
} else {
- logger.debug("this is not a revisiting user: " + revisitingUser);
+ //this is not a revisiting user
}
voteLearningForm.resetCommands();
- logger.debug("final voteGeneralLearnerFlowDTO: " + voteGeneralLearnerFlowDTO);
request.setAttribute(VOTE_GENERAL_LEARNER_FLOW_DTO, voteGeneralLearnerFlowDTO);
-
-
LearningWebUtil.putActivityPositionInRequestByToolSessionId(new Long(toolSessionID), request, getServlet()
.getServletContext());
-
- logger.debug("fwd'ing to : " + VIEW_ANSWERS);
return (mapping.findForward(VIEW_ANSWERS));
}
public ActionForward redoQuestionsOk(ActionMapping mapping, ActionForm form, HttpServletRequest request,
HttpServletResponse response) throws IOException, ServletException {
VoteUtils.cleanUpUserExceptions(request);
- logger.debug("dispatching redoQuestionsOk...");
IVoteService voteService = VoteServiceProxy.getVoteService(getServlet().getServletContext());
- logger.debug("retrieving voteService from session: " + voteService);
VoteLearningForm voteLearningForm = (VoteLearningForm) form;
VoteGeneralLearnerFlowDTO voteGeneralLearnerFlowDTO = new VoteGeneralLearnerFlowDTO();
repopulateRequestParameters(request, voteLearningForm);
String toolSessionID = request.getParameter(TOOL_SESSION_ID);
- logger.debug("toolSessionID: " + toolSessionID);
voteLearningForm.setToolSessionID(toolSessionID);
String userID = request.getParameter(USER_ID);
- logger.debug("userID: " + userID);
voteLearningForm.setUserID(userID);
String revisitingUser = request.getParameter(REVISITING_USER);
- logger.debug("revisitingUser: " + revisitingUser);
voteLearningForm.setRevisitingUser(revisitingUser);
voteLearningForm.setNominationsSubmited(new Boolean(false).toString());
@@ -429,36 +252,25 @@
voteGeneralLearnerFlowDTO.setMinNominationCountReached(new Boolean(false).toString());
VoteSession voteSession = voteService.retrieveVoteSession(new Long(toolSessionID));
- logger.debug("retrieving voteSession: " + voteSession);
-
VoteContent voteContent = voteSession.getVoteContent();
- logger.debug("retrieving voteContent: " + voteContent);
-
voteGeneralLearnerFlowDTO.setActivityTitle(voteContent.getTitle());
voteGeneralLearnerFlowDTO.setActivityInstructions(voteContent.getInstructions());
Long toolContentID = voteContent.getVoteContentId();
- logger.debug("toolContentID: " + toolContentID);
-
setContentInUse(request, voteService, toolContentID);
- logger.debug("requested redoQuestionsOk, user is sure to redo the questions.");
voteGeneralLearnerFlowDTO.setReflection(new Boolean(voteContent.isReflect()).toString());
String reflectionSubject = VoteUtils.replaceNewLines(voteContent.getReflectionSubject());
voteGeneralLearnerFlowDTO.setReflectionSubject(reflectionSubject);
voteLearningForm.resetCommands();
- logger.debug("final voteGeneralLearnerFlowDTO: " + voteGeneralLearnerFlowDTO);
request.setAttribute(VOTE_GENERAL_LEARNER_FLOW_DTO, voteGeneralLearnerFlowDTO);
return redoQuestions(mapping, form, request, response);
}
public ActionForward learnerFinished(ActionMapping mapping, ActionForm form, HttpServletRequest request,
HttpServletResponse response) throws IOException, ServletException {
- logger.debug("dispatching learnerFinished");
- logger.debug("requested learner finished, the learner should be directed to next activity.");
-
VoteGeneralLearnerFlowDTO voteGeneralLearnerFlowDTO = new VoteGeneralLearnerFlowDTO();
VoteLearningForm voteLearningForm = (VoteLearningForm) form;
@@ -471,45 +283,30 @@
voteGeneralLearnerFlowDTO.setMinNominationCountReached(new Boolean(false).toString());
IVoteService voteService = VoteServiceProxy.getVoteService(getServlet().getServletContext());
- logger.debug("retrieving voteService from session: " + voteService);
repopulateRequestParameters(request, voteLearningForm);
String toolSessionID = request.getParameter(TOOL_SESSION_ID);
- logger.debug("toolSessionID: " + toolSessionID);
voteLearningForm.setToolSessionID(toolSessionID);
VoteSession voteSession = voteService.retrieveVoteSession(new Long(toolSessionID));
- logger.debug("retrieving voteSession: " + voteSession);
-
String userID = request.getParameter(USER_ID);
- logger.debug("userID: " + userID);
voteLearningForm.setUserID(userID);
VoteQueUsr voteQueUsr = voteService.getVoteUserBySession(new Long(userID), voteSession.getUid());
- logger.debug("voteQueUsr:" + voteQueUsr);
-
/* it is possible that voteQueUsr can be null if the content is set as runoffline and reflection is on*/
if (voteQueUsr == null) {
- logger.debug("attempt creating user record since it must exist for the runOffline + reflection screens");
+ //attempt creating user record since it must exist for the runOffline + reflection screens
HttpSession ss = SessionManager.getSession();
UserDTO toolUser = (UserDTO) ss.getAttribute(AttributeNames.USER);
- logger.debug("retrieving toolUser: " + toolUser);
- logger.debug("retrieving toolUser userId: " + toolUser.getUserID());
- logger.debug("retrieving toolUser username: " + toolUser.getLogin());
String userName = toolUser.getLogin();
String fullName = toolUser.getFirstName() + " " + toolUser.getLastName();
- logger.debug("retrieving toolUser fullname: " + fullName);
Long userId = new Long(toolUser.getUserID().longValue());
- logger.debug("retrieving toolUser fullname: " + fullName);
-
voteQueUsr = new VoteQueUsr(new Long(userID), userName, fullName, voteSession, new TreeSet());
voteService.createVoteQueUsr(voteQueUsr);
- logger.debug("createVoteQueUsr - voteQueUsr: " + voteQueUsr);
- logger.debug("session uid: " + voteSession.getUid());
}
voteQueUsr.setResponseFinalised(true);
@@ -518,56 +315,46 @@
voteQueUsr.setFinalScreenRequested(true);
}
voteService.updateVoteUser(voteQueUsr);
- logger.debug("user's response is finalised:" + voteQueUsr);
String revisitingUser = request.getParameter(REVISITING_USER);
- logger.debug("revisitingUser: " + revisitingUser);
voteLearningForm.setRevisitingUser(revisitingUser);
VoteContent voteContent = voteSession.getVoteContent();
- logger.debug("retrieving voteContent: " + voteContent);
voteGeneralLearnerFlowDTO.setActivityTitle(voteContent.getTitle());
voteGeneralLearnerFlowDTO.setActivityInstructions(voteContent.getInstructions());
- logger.debug("attempting to leave/complete session with toolSessionID:" + toolSessionID + " and userID:"
- + userID);
-
voteGeneralLearnerFlowDTO.setReflection(new Boolean(voteContent.isReflect()).toString());
String reflectionSubject = VoteUtils.replaceNewLines(voteContent.getReflectionSubject());
voteGeneralLearnerFlowDTO.setReflectionSubject(reflectionSubject);
- logger.debug("final voteGeneralLearnerFlowDTO: " + voteGeneralLearnerFlowDTO);
request.setAttribute(VOTE_GENERAL_LEARNER_FLOW_DTO, voteGeneralLearnerFlowDTO);
VoteUtils.cleanUpSessionAbsolute(request);
String nextUrl = null;
try {
nextUrl = voteService.leaveToolSession(new Long(toolSessionID), new Long(userID));
- logger.debug("nextUrl: " + nextUrl);
} catch (DataMissingException e) {
- logger.debug("failure getting nextUrl: " + e);
+ logger.error("failure getting nextUrl: " + e);
voteLearningForm.resetCommands();
//throw new ServletException(e);
return (mapping.findForward(LEARNING_STARTER));
} catch (ToolException e) {
- logger.debug("failure getting nextUrl: " + e);
+ logger.error("failure getting nextUrl: " + e);
voteLearningForm.resetCommands();
//throw new ServletException(e);
return (mapping.findForward(LEARNING_STARTER));
} catch (Exception e) {
- logger.debug("unknown exception getting nextUrl: " + e);
+ logger.error("unknown exception getting nextUrl: " + e);
voteLearningForm.resetCommands();
//throw new ServletException(e);
return (mapping.findForward(LEARNING_STARTER));
}
- logger.debug("success getting nextUrl: " + nextUrl);
voteLearningForm.resetCommands();
/* pay attention here*/
- logger.debug("redirecting to the nextUrl: " + nextUrl);
response.sendRedirect(nextUrl);
return null;
@@ -577,39 +364,28 @@
public ActionForward continueOptionsCombined(ActionMapping mapping, ActionForm form, HttpServletRequest request,
HttpServletResponse response) throws IOException, ServletException {
VoteUtils.cleanUpUserExceptions(request);
- logger.debug("dispatching continueOptionsCombined...");
-
VoteGeneralLearnerFlowDTO voteGeneralLearnerFlowDTO = new VoteGeneralLearnerFlowDTO();
VoteLearningForm voteLearningForm = (VoteLearningForm) form;
IVoteService voteService = VoteServiceProxy.getVoteService(getServlet().getServletContext());
- logger.debug("retrieving voteService from session: " + voteService);
-
repopulateRequestParameters(request, voteLearningForm);
String toolSessionID = request.getParameter(TOOL_SESSION_ID);
- logger.debug("toolSessionID: " + toolSessionID);
voteLearningForm.setToolSessionID(toolSessionID);
String userID = request.getParameter(USER_ID);
- logger.debug("userID: " + userID);
voteLearningForm.setUserID(userID);
String maxNominationCount = request.getParameter(MAX_NOMINATION_COUNT);
- logger.debug("maxNominationCount: " + maxNominationCount);
voteLearningForm.setMaxNominationCount(maxNominationCount);
String minNominationCount = request.getParameter(MIN_NOMINATION_COUNT);
- logger.debug("minNominationCount: " + minNominationCount);
voteLearningForm.setMinNominationCount(minNominationCount);
String userEntry = request.getParameter(USER_ENTRY);
- logger.debug("userEntry: " + userEntry);
voteLearningForm.setUserEntry(userEntry);
VoteSession voteSession = voteService.retrieveVoteSession(new Long(toolSessionID));
- logger.debug("retrieving voteSession: " + voteSession);
-
voteLearningForm.setNominationsSubmited(new Boolean(false).toString());
voteLearningForm.setMaxNominationCountReached(new Boolean(false).toString());
voteLearningForm.setMinNominationCountReached(new Boolean(false).toString());
@@ -619,182 +395,130 @@
voteGeneralLearnerFlowDTO.setMinNominationCountReached(new Boolean(false).toString());
Collection voteDisplayOrderIds = voteLearningForm.votesAsCollection();
- logger.debug("Checkbox votes " + voteDisplayOrderIds);
// check number of votes
int castVoteCount = voteDisplayOrderIds != null ? voteDisplayOrderIds.size() : 0;
- logger.debug("userEntry: " + userEntry);
-
if ((userEntry != null) && (userEntry.length() > 0)) {
- logger.debug("userEntry available: " + userEntry);
++castVoteCount;
}
- logger.debug("castVoteCount post user entry count: " + castVoteCount);
- logger.debug("maxNominationCount: " + maxNominationCount);
int intMaxNominationCount = 0;
if (maxNominationCount != null)
intMaxNominationCount = new Integer(maxNominationCount).intValue();
- logger.debug("intMaxNominationCount: " + intMaxNominationCount);
- logger.debug("intMaxNominationCount versus current voting count: " + intMaxNominationCount + " versus "
- + castVoteCount);
if (castVoteCount > intMaxNominationCount) {
voteLearningForm.setMaxNominationCountReached(new Boolean(true).toString());
voteGeneralLearnerFlowDTO.setMaxNominationCountReached(new Boolean(true).toString());
persistInRequestError(request, "error.maxNominationCount.reached");
- logger.debug("give warning, max nom count reached...");
- logger.debug("fwd'ing to: " + LOAD_LEARNER);
return (mapping.findForward(LOAD_LEARNER));
}
VoteContent voteContent = voteSession.getVoteContent();
- logger.debug("retrieving voteContent: " + voteContent);
voteGeneralLearnerFlowDTO.setActivityTitle(voteContent.getTitle());
voteGeneralLearnerFlowDTO.setActivityInstructions(voteContent.getInstructions());
Long toolContentID = voteContent.getVoteContentId();
- logger.debug("toolContentID: " + toolContentID);
Long toolContentUID = voteContent.getUid();
- logger.debug("toolContentUID: " + toolContentUID);
- logger.debug("userEntry: " + userEntry);
setContentInUse(request, voteService, toolContentID);
boolean userEntryAvailable = false;
if ((userEntry != null) && (userEntry.length() > 0)) {
- logger.debug("userEntry available: " + userEntry);
userEntryAvailable = true;
}
- logger.debug("userEntryAvailable " + userEntryAvailable);
Long toolSessionUid = voteSession.getUid();
- logger.debug("toolSessionUid: " + toolSessionUid);
boolean isUserDefined = false;
- logger.debug("userID: " + userID);
VoteQueUsr existingVoteQueUsr = voteService.getVoteUserBySession(new Long(userID), voteSession.getUid());
- logger.debug("existingVoteQueUsr: " + existingVoteQueUsr);
if (existingVoteQueUsr != null)
isUserDefined = true;
- logger.debug("isUserDefined: " + isUserDefined);
-
VoteQueUsr voteQueUsr = null;
if (isUserDefined == false) {
voteQueUsr = LearningUtil.createUser(request, voteService, new Long(toolSessionID));
- logger.debug("created user in the db");
- logger.debug("new create");
} else {
voteQueUsr = existingVoteQueUsr;
- logger.debug("assign");
}
- logger.debug("voteQueUsr: " + voteQueUsr);
- logger.debug("voteQueUsr is : " + voteQueUsr);
-
if (existingVoteQueUsr != null) {
- logger.debug("attempt removing attempts for user id and session id:" + existingVoteQueUsr.getUid() + " "
- + voteSession.getUid());
voteService.removeAttemptsForUserandSession(existingVoteQueUsr.getUid(), voteSession.getUid());
- logger.debug("votes deleted for user: " + voteQueUsr.getUid());
}
/* to mimize changes to working code, convert the String[] array to the mapGeneralCheckedOptionsContent structure */
Map mapGeneralCheckedOptionsContent = LearningUtil.buildQuestionContentMap(request, voteService, voteContent,
voteDisplayOrderIds);
- logger.debug("mapGeneralCheckedOptionsContent size: " + mapGeneralCheckedOptionsContent.size());
if (mapGeneralCheckedOptionsContent.size() > 0) {
LearningUtil.createAttempt(request, voteService, voteQueUsr, mapGeneralCheckedOptionsContent, "",
false, voteSession, toolContentUID);
}
if ((mapGeneralCheckedOptionsContent.size() == 0 && (userEntryAvailable == true))) {
- logger.debug("mapGeneralCheckedOptionsContent size is 0");
Map mapLeanerCheckedOptionsContent = new TreeMap(new VoteComparator());
- logger.debug("after mapsize check mapLeanerCheckedOptionsContent " + mapLeanerCheckedOptionsContent);
if (userEntry.length() > 0) {
- logger.debug("creating entry for: " + userEntry);
LearningUtil.createAttempt(request, voteService, voteQueUsr, mapLeanerCheckedOptionsContent, userEntry,
true, voteSession, toolContentUID);
}
}
if ((mapGeneralCheckedOptionsContent.size() > 0) && (userEntryAvailable == true)) {
- logger.debug("mapGeneralCheckedOptionsContent size is > 0" + userEntry);
Map mapLeanerCheckedOptionsContent = new TreeMap(new VoteComparator());
- logger.debug("after mapsize check mapLeanerCheckedOptionsContent " + mapLeanerCheckedOptionsContent);
if (userEntry.length() > 0) {
- logger.debug("creating entry for: " + userEntry);
LearningUtil.createAttempt(request, voteService, voteQueUsr, mapLeanerCheckedOptionsContent, userEntry,
false, voteSession, toolContentUID);
}
}
- logger.debug("created user attempt in the db");
-
/* put the map in the request ready for the next screen */
request.setAttribute(MAP_GENERAL_CHECKED_OPTIONS_CONTENT, mapGeneralCheckedOptionsContent);
- logger.debug("final mapGeneralCheckedOptionsContent: " + mapGeneralCheckedOptionsContent);
voteLearningForm.setMapGeneralCheckedOptionsContent(mapGeneralCheckedOptionsContent);
voteGeneralLearnerFlowDTO.setMapGeneralCheckedOptionsContent(mapGeneralCheckedOptionsContent);
voteLearningForm.setNominationsSubmited(new Boolean(true).toString());
voteGeneralLearnerFlowDTO.setNominationsSubmited(new Boolean(true).toString());
VoteGeneralMonitoringDTO voteGeneralMonitoringDTO = new VoteGeneralMonitoringDTO();
- logger.debug("calling prepareChartData: " + toolContentID);
MonitoringUtil.prepareChartData(request, voteService, null, toolContentID.toString(),
toolSessionUid.toString(), voteGeneralLearnerFlowDTO, voteGeneralMonitoringDTO, getMessageService());
voteGeneralLearnerFlowDTO.setReflection(new Boolean(voteContent.isReflect()).toString());
voteGeneralLearnerFlowDTO.setReflectionSubject(voteContent.getReflectionSubject());
- logger.debug("fwding to INDIVIDUAL_REPORT: " + INDIVIDUAL_REPORT);
voteLearningForm.resetCommands();
-
- logger.debug("final voteGeneralLearnerFlowDTO: " + voteGeneralLearnerFlowDTO);
request.setAttribute(VOTE_GENERAL_LEARNER_FLOW_DTO, voteGeneralLearnerFlowDTO);
return (mapping.findForward(INDIVIDUAL_REPORT));
}
public ActionForward redoQuestions(ActionMapping mapping, ActionForm form, HttpServletRequest request,
HttpServletResponse response) throws IOException, ServletException {
- logger.debug("dispatching redoQuestions...");
VoteUtils.cleanUpUserExceptions(request);
VoteGeneralLearnerFlowDTO voteGeneralLearnerFlowDTO = new VoteGeneralLearnerFlowDTO();
VoteLearningForm voteLearningForm = (VoteLearningForm) form;
IVoteService voteService = VoteServiceProxy.getVoteService(getServlet().getServletContext());
- logger.debug("retrieving voteService from session: " + voteService);
repopulateRequestParameters(request, voteLearningForm);
String toolSessionID = request.getParameter(TOOL_SESSION_ID);
- logger.debug("toolSessionID: " + toolSessionID);
voteLearningForm.setToolSessionID(toolSessionID);
String userID = request.getParameter(USER_ID);
- logger.debug("userID: " + userID);
voteLearningForm.setUserID(userID);
String revisitingUser = request.getParameter(REVISITING_USER);
- logger.debug("revisitingUser: " + revisitingUser);
voteLearningForm.setRevisitingUser(revisitingUser);
VoteSession voteSession = voteService.retrieveVoteSession(new Long(toolSessionID));
- logger.debug("retrieving voteSession: " + voteSession);
VoteContent voteContent = voteSession.getVoteContent();
- logger.debug("retrieving voteContent: " + voteContent);
voteGeneralLearnerFlowDTO.setActivityTitle(voteContent.getTitle());
voteGeneralLearnerFlowDTO.setActivityInstructions(voteContent.getInstructions());
@@ -806,15 +530,10 @@
voteGeneralLearnerFlowDTO.setMaxNominationCountReached(new Boolean(false).toString());
Long toolContentID = voteContent.getVoteContentId();
- logger.debug("toolContentID:" + toolContentID);
-
Map mapQuestionsContent = new TreeMap(new VoteComparator());
mapQuestionsContent = LearningUtil.buildQuestionContentMap(request, voteService, voteContent, null);
- logger.debug("mapQuestionsContent: " + mapQuestionsContent);
request.setAttribute(MAP_QUESTION_CONTENT_LEARNER, mapQuestionsContent);
- logger.debug("MAP_QUESTION_CONTENT_LEARNER: " + request.getAttribute(MAP_QUESTION_CONTENT_LEARNER));
- logger.debug("voteContent has : " + mapQuestionsContent.size() + " entries.");
Map mapGeneralCheckedOptionsContent = new TreeMap(new VoteComparator());
request.setAttribute(MAP_GENERAL_CHECKED_OPTIONS_CONTENT, mapGeneralCheckedOptionsContent);
@@ -823,23 +542,15 @@
voteGeneralLearnerFlowDTO.setReflection(new Boolean(voteContent.isReflect()).toString());
voteGeneralLearnerFlowDTO.setReflectionSubject(voteContent.getReflectionSubject());
-
- logger.debug("fwd'ing to LOAD_LEARNER : " + LOAD_LEARNER);
voteLearningForm.resetCommands();
-
- logger.debug("final voteGeneralLearnerFlowDTO: " + voteGeneralLearnerFlowDTO);
request.setAttribute(VOTE_GENERAL_LEARNER_FLOW_DTO, voteGeneralLearnerFlowDTO);
return (mapping.findForward(LOAD_LEARNER));
}
protected void setContentInUse(HttpServletRequest request, IVoteService voteService, Long toolContentID) {
- logger.debug("toolContentID:" + toolContentID);
-
VoteContent voteContent = voteService.retrieveVote(toolContentID);
- logger.debug("voteContent:" + voteContent);
voteContent.setContentInUse(true);
- logger.debug("content has been set to inuse");
voteService.saveVoteContent(voteContent);
}
@@ -852,67 +563,40 @@
public void persistInRequestError(HttpServletRequest request, String message) {
ActionMessages errors = new ActionMessages();
errors.add(Globals.ERROR_KEY, new ActionMessage(message));
- logger.debug("add " + message + " to ActionMessages:");
saveErrors(request, errors);
}
public ActionForward submitReflection(ActionMapping mapping, ActionForm form, HttpServletRequest request,
HttpServletResponse response) throws IOException, ServletException, ToolException {
- logger.debug("dispatching submitReflection...");
VoteLearningForm voteLearningForm = (VoteLearningForm) form;
repopulateRequestParameters(request, voteLearningForm);
IVoteService voteService = VoteServiceProxy.getVoteService(getServlet().getServletContext());
- logger.debug("voteService: " + voteService);
-
String toolSessionID = request.getParameter(AttributeNames.PARAM_TOOL_SESSION_ID);
- logger.debug("toolSessionID: " + toolSessionID);
voteLearningForm.setToolSessionID(toolSessionID);
String userID = request.getParameter("userID");
- logger.debug("userID: " + userID);
voteLearningForm.setUserID(userID);
String reflectionEntry = request.getParameter(ENTRY_TEXT);
- logger.debug("reflectionEntry: " + reflectionEntry);
-
VoteSession voteSession = voteService.retrieveVoteSession(new Long(toolSessionID));
- logger.debug("retrieving voteSession: " + voteSession);
-
VoteQueUsr voteQueUsr = voteService.getVoteUserBySession(new Long(userID), voteSession.getUid());
- logger.debug("voteQueUsr:" + voteQueUsr);
/* it is possible that voteQueUsr can be null if the content is set as runoffline and reflection is on*/
if (voteQueUsr == null) {
- logger.debug("attempt creating user record since it must exist for the runOffline + reflection screens");
HttpSession ss = SessionManager.getSession();
UserDTO toolUser = (UserDTO) ss.getAttribute(AttributeNames.USER);
- logger.debug("retrieving toolUser: " + toolUser);
- logger.debug("retrieving toolUser userId: " + toolUser.getUserID());
- logger.debug("retrieving toolUser username: " + toolUser.getLogin());
-
String userName = toolUser.getLogin();
String fullName = toolUser.getFirstName() + " " + toolUser.getLastName();
- logger.debug("retrieving toolUser fullname: " + fullName);
Long userId = new Long(toolUser.getUserID().longValue());
- logger.debug("retrieving toolUser fullname: " + fullName);
voteQueUsr = new VoteQueUsr(new Long(userID), userName, fullName, voteSession, new TreeSet());
voteService.createVoteQueUsr(voteQueUsr);
- logger.debug("createVoteQueUsr - voteQueUsr: " + voteQueUsr);
- logger.debug("session uid: " + voteSession.getUid());
}
- logger.debug("voteQueUsr:" + voteQueUsr);
- logger.debug("toolSessionID:" + toolSessionID);
- logger.debug("CoreNotebookConstants.NOTEBOOK_TOOL:" + CoreNotebookConstants.NOTEBOOK_TOOL);
- logger.debug("MY_SIGNATURE:" + MY_SIGNATURE);
- logger.debug("userID:" + userID);
- logger.debug("reflectionEntry:" + reflectionEntry);
-
voteService.createNotebookEntry(new Long(toolSessionID), CoreNotebookConstants.NOTEBOOK_TOOL, MY_SIGNATURE,
new Integer(userID), reflectionEntry);
@@ -922,20 +606,13 @@
public ActionForward forwardtoReflection(ActionMapping mapping, ActionForm form, HttpServletRequest request,
HttpServletResponse response) throws IOException, ServletException, ToolException {
- logger.debug("dispatching forwardtoReflection...");
VoteLearningForm voteLearningForm = (VoteLearningForm) form;
IVoteService voteService = VoteServiceProxy.getVoteService(getServlet().getServletContext());
- logger.debug("voteService: " + voteService);
String toolSessionID = request.getParameter(AttributeNames.PARAM_TOOL_SESSION_ID);
- logger.debug("toolSessionID: " + toolSessionID);
-
VoteSession voteSession = voteService.retrieveVoteSession(new Long(toolSessionID));
- logger.debug("retrieving voteSession: " + voteSession);
VoteContent voteContent = voteSession.getVoteContent();
- logger.debug("using voteContent: " + voteContent);
-
VoteGeneralLearnerFlowDTO voteGeneralLearnerFlowDTO = new VoteGeneralLearnerFlowDTO();
voteGeneralLearnerFlowDTO.setActivityTitle(voteContent.getTitle());
@@ -945,78 +622,59 @@
voteGeneralLearnerFlowDTO.setReflectionSubject(reflectionSubject);
String userID = request.getParameter("userID");
- logger.debug("userID: " + userID);
voteLearningForm.setUserID(userID);
- logger.debug("attempt getting notebookEntry: ");
NotebookEntry notebookEntry = voteService.getEntry(new Long(toolSessionID),
CoreNotebookConstants.NOTEBOOK_TOOL, MY_SIGNATURE, new Integer(userID));
- logger.debug("notebookEntry: " + notebookEntry);
-
if (notebookEntry != null) {
String notebookEntryPresentable = notebookEntry.getEntry();
- logger.debug("notebookEntryPresentable: " + notebookEntryPresentable);
voteGeneralLearnerFlowDTO.setNotebookEntry(notebookEntryPresentable);
voteLearningForm.setEntryText(notebookEntryPresentable);
}
request.setAttribute(VOTE_GENERAL_LEARNER_FLOW_DTO, voteGeneralLearnerFlowDTO);
- logger.debug("final voteGeneralLearnerFlowDTO: " + voteGeneralLearnerFlowDTO);
voteLearningForm.resetCommands();
LearningWebUtil.putActivityPositionInRequestByToolSessionId(new Long(toolSessionID), request, getServlet()
.getServletContext());
- logger.debug("fwd'ing to: " + NOTEBOOK);
return (mapping.findForward(NOTEBOOK));
}
protected void repopulateRequestParameters(HttpServletRequest request, VoteLearningForm voteLearningForm) {
- logger.debug("starting repopulateRequestParameters");
-
String toolSessionID = request.getParameter(TOOL_SESSION_ID);
- logger.debug("toolSessionID: " + toolSessionID);
voteLearningForm.setToolSessionID(toolSessionID);
String userID = request.getParameter(USER_ID);
- logger.debug("userID: " + userID);
voteLearningForm.setUserID(userID);
String revisitingUser = request.getParameter(REVISITING_USER);
- logger.debug("revisitingUser: " + revisitingUser);
voteLearningForm.setRevisitingUser(revisitingUser);
String previewOnly = request.getParameter(PREVIEW_ONLY);
- logger.debug("previewOnly: " + previewOnly);
voteLearningForm.setPreviewOnly(previewOnly);
String maxNominationCount = request.getParameter(MAX_NOMINATION_COUNT);
- logger.debug("maxNominationCount: " + maxNominationCount);
voteLearningForm.setMaxNominationCount(maxNominationCount);
String minNominationCount = request.getParameter(MIN_NOMINATION_COUNT);
- logger.debug("minNominationCount: " + minNominationCount);
voteLearningForm.setMinNominationCount(minNominationCount);
String allowTextEntry = request.getParameter(ALLOW_TEXT_ENTRY);
- logger.debug("allowTextEntry: " + allowTextEntry);
voteLearningForm.setAllowTextEntry(allowTextEntry);
String showResults = request.getParameter(SHOW_RESULTS);
voteLearningForm.setShowResults(showResults);
String lockOnFinish = request.getParameter(LOCK_ON_FINISH);
- logger.debug("lockOnFinish: " + lockOnFinish);
voteLearningForm.setLockOnFinish(lockOnFinish);
String reportViewOnly = request.getParameter(REPORT_VIEW_ONLY);
- logger.debug("reportViewOnly: " + reportViewOnly);
voteLearningForm.setReportViewOnly(reportViewOnly);
String userEntry = request.getParameter(USER_ENTRY);
- logger.debug("userEntry: " + userEntry);
voteLearningForm.setUserEntry(userEntry);
}
Index: lams_tool_vote/src/java/org/lamsfoundation/lams/tool/vote/web/VoteLearningStarterAction.java
===================================================================
diff -u -r8aded0b18a5a7712622ae56f38923fa297449977 -r601fd92095193321a6b2286ef55108fbe5f9dfc4
--- lams_tool_vote/src/java/org/lamsfoundation/lams/tool/vote/web/VoteLearningStarterAction.java (.../VoteLearningStarterAction.java) (revision 8aded0b18a5a7712622ae56f38923fa297449977)
+++ lams_tool_vote/src/java/org/lamsfoundation/lams/tool/vote/web/VoteLearningStarterAction.java (.../VoteLearningStarterAction.java) (revision 601fd92095193321a6b2286ef55108fbe5f9dfc4)
@@ -153,14 +153,14 @@
package org.lamsfoundation.lams.tool.vote.web;
import java.io.IOException;
+import java.util.Date;
import java.util.HashSet;
import java.util.Iterator;
import java.util.List;
import java.util.Map;
import java.util.Set;
-import java.util.TreeMap;
import java.util.TimeZone;
-import java.util.Date;
+import java.util.TreeMap;
import javax.servlet.ServletException;
import javax.servlet.http.HttpServletRequest;
@@ -217,8 +217,6 @@
Map mapAnswers = new TreeMap(new VoteComparator());
IVoteService voteService = VoteServiceProxy.getVoteService(getServlet().getServletContext());
- VoteLearningStarterAction.logger.debug("retrieving voteService from session: " + voteService);
-
VoteGeneralLearnerFlowDTO voteGeneralLearnerFlowDTO = new VoteGeneralLearnerFlowDTO();
VoteLearningForm voteLearningForm = (VoteLearningForm) form;
@@ -239,25 +237,22 @@
*/
VoteUtils.saveTimeZone(request);
ActionForward validateParameters = validateParameters(request, mapping, voteLearningForm);
- VoteLearningStarterAction.logger.debug("validateParameters: " + validateParameters);
if (validateParameters != null) {
return validateParameters;
}
String toolSessionID = voteLearningForm.getToolSessionID();
- VoteLearningStarterAction.logger.debug("retrieved toolSessionID: " + toolSessionID);
/*
* by now, we made sure that the passed tool session id exists in the db as a new record Make sure we can
* retrieve it and the relavent content
*/
VoteSession voteSession = voteService.retrieveVoteSession(new Long(toolSessionID));
- VoteLearningStarterAction.logger.debug("retrieving voteSession: " + voteSession);
if (voteSession == null) {
VoteUtils.cleanUpSessionAbsolute(request);
- VoteLearningStarterAction.logger.debug("error: The tool expects voteSession.");
+ VoteLearningStarterAction.logger.error("error: The tool expects voteSession.");
return mapping.findForward(VoteAppConstants.ERROR_LIST);
}
@@ -266,11 +261,9 @@
* tool session id points to a particular content. Many to one mapping.
*/
VoteContent voteContent = voteSession.getVoteContent();
- VoteLearningStarterAction.logger.debug("using voteContent: " + voteContent);
-
if (voteContent == null) {
VoteUtils.cleanUpSessionAbsolute(request);
- VoteLearningStarterAction.logger.debug("error: The tool expects voteContent.");
+ VoteLearningStarterAction.logger.error("error: The tool expects voteContent.");
persistInRequestError(request, "error.content.doesNotExist");
return mapping.findForward(VoteAppConstants.ERROR_LIST);
}
@@ -281,46 +274,30 @@
*/
setupAttributes(request, voteContent, voteLearningForm, voteGeneralLearnerFlowDTO);
- VoteLearningStarterAction.logger.debug("using TOOL_CONTENT_ID: " + voteContent.getVoteContentId());
voteLearningForm.setToolContentID(voteContent.getVoteContentId().toString());
voteGeneralLearnerFlowDTO.setToolContentID(voteContent.getVoteContentId().toString());
- VoteLearningStarterAction.logger.debug("using TOOL_CONTENT_UID: " + voteContent.getUid());
voteLearningForm.setToolContentUID(voteContent.getUid().toString());
voteGeneralLearnerFlowDTO.setToolContentUID(voteContent.getUid().toString());
String userID = voteLearningForm.getUserID();
- VoteLearningStarterAction.logger.debug("userID: " + userID);
-
- VoteLearningStarterAction.logger.debug("is tool reflective: " + voteContent.isReflect());
voteGeneralLearnerFlowDTO.setReflection(new Boolean(voteContent.isReflect()).toString());
- VoteLearningStarterAction.logger.debug("reflection subject: " + voteContent.getReflectionSubject());
String reflectionSubject = VoteUtils.replaceNewLines(voteContent.getReflectionSubject());
voteGeneralLearnerFlowDTO.setReflectionSubject(reflectionSubject);
- VoteLearningStarterAction.logger.debug("is vote lockOnFinish: " + voteContent.isLockOnFinish());
-
/*
* Is the request for a preview by the author? Preview The tool must be able to show the specified content as if
* it was running in a lesson. It will be the learner url with tool access mode set to ToolAccessMode.AUTHOR 3
* modes are: author teacher learner
*/
/* ? CHECK THIS: how do we determine whether preview is requested? Mode is not enough on its own. */
- VoteLearningStarterAction.logger.debug("before checking for preview voteGeneralLearnerFlowDTO: "
- + voteGeneralLearnerFlowDTO);
request.setAttribute(VoteAppConstants.VOTE_GENERAL_LEARNER_FLOW_DTO, voteGeneralLearnerFlowDTO);
/* handle PREVIEW mode */
String mode = voteLearningForm.getLearningMode();
- VoteLearningStarterAction.logger.debug("mode: " + mode);
if (mode != null && mode.equals("author")) {
- VoteLearningStarterAction.logger.debug("Author requests for a preview of the content.");
- VoteLearningStarterAction.logger.debug("existing voteContent:" + voteContent);
-
commonContentSetup(request, voteService, voteContent, voteGeneralLearnerFlowDTO);
-
- VoteLearningStarterAction.logger.debug("preview voteGeneralLearnerFlowDTO: " + voteGeneralLearnerFlowDTO);
request.setAttribute(VoteAppConstants.VOTE_GENERAL_LEARNER_FLOW_DTO, voteGeneralLearnerFlowDTO);
}
@@ -330,7 +307,6 @@
*/
String learnerProgressUserId = request.getParameter(VoteAppConstants.USER_ID);
- VoteLearningStarterAction.logger.debug("learnerProgressUserId: " + learnerProgressUserId);
if (learnerProgressUserId != null && mode.equals("teacher")) {
VoteQueUsr voteQueUsr = voteService.getVoteUserBySession(new Long(learnerProgressUserId), voteSession
@@ -340,17 +316,10 @@
Long sessionUid = voteQueUsr.getVoteSessionId();
- VoteLearningStarterAction.logger.debug("start building MAP_GENERAL_CHECKED_OPTIONS_CONTENT");
String toolContentId = voteLearningForm.getToolContentID();
- VoteLearningStarterAction.logger.debug("toolContentId: " + toolContentId);
-
putMapQuestionsContentIntoRequest(request, voteService, voteQueUsr);
-
- VoteLearningStarterAction.logger.debug("geting user answers for user uid and sessionUid"
- + voteQueUsr.getUid() + " " + sessionUid);
Set userAttempts = voteService.getAttemptsForUserAndSessionUseOpenAnswer(voteQueUsr.getUid(),
sessionUid);
- VoteLearningStarterAction.logger.debug("userAttempts: " + userAttempts);
request.setAttribute(VoteAppConstants.LIST_GENERAL_CHECKED_OPTIONS_CONTENT, userAttempts);
} else {
@@ -359,8 +328,7 @@
request.setAttribute(VoteAppConstants.LIST_GENERAL_CHECKED_OPTIONS_CONTENT, new HashSet());
}
- VoteLearningStarterAction.logger
- .debug("since this is progress view, present a screen which can not be edited");
+ //since this is progress view, present a screen which can not be edited
voteLearningForm.setReportViewOnly(new Boolean(true).toString());
voteGeneralLearnerFlowDTO.setReportViewOnly(new Boolean(true).toString());
voteGeneralLearnerFlowDTO.setLearningMode(mode);
@@ -375,7 +343,6 @@
boolean isGroupedActivity = voteService.isGroupedActivity(new Long(voteLearningForm.getToolContentID()));
request.setAttribute("isGroupedActivity", isGroupedActivity);
- VoteLearningStarterAction.logger.debug("fwd'ing to: " + VoteAppConstants.EXIT_PAGE);
return mapping.findForward(VoteAppConstants.EXIT_PAGE);
}
@@ -390,24 +357,19 @@
* informed about that.
*/
boolean isRunOffline = VoteUtils.isRunOffline(voteContent);
- VoteLearningStarterAction.logger.debug("isRunOffline: " + isRunOffline);
if (isRunOffline == true) {
VoteUtils.cleanUpSessionAbsolute(request);
- VoteLearningStarterAction.logger.debug("warning to learner: the activity is offline.");
+ //warning to learner: the activity is offline
voteLearningForm.setActivityRunOffline(new Boolean(true).toString());
voteGeneralLearnerFlowDTO.setActivityRunOffline(new Boolean(true).toString());
- VoteLearningStarterAction.logger
- .debug("runOffline voteGeneralLearnerFlowDTO: " + voteGeneralLearnerFlowDTO);
request.setAttribute(VoteAppConstants.VOTE_GENERAL_LEARNER_FLOW_DTO, voteGeneralLearnerFlowDTO);
// return (mapping.findForward(ERROR_LIST));
- VoteLearningStarterAction.logger.debug("fwding to :" + VoteAppConstants.RUN_OFFLINE);
return mapping.findForward(VoteAppConstants.RUN_OFFLINE);
}
/* find out if the content is being modified at the moment. */
boolean isDefineLater = VoteUtils.isDefineLater(voteContent);
- VoteLearningStarterAction.logger.debug("isDefineLater: " + isDefineLater);
if (isDefineLater == true) {
VoteUtils.cleanUpSessionAbsolute(request);
return mapping.findForward(VoteAppConstants.DEFINE_LATER);
@@ -439,73 +401,46 @@
* fetch question content from content
*/
mapQuestionsContent = LearningUtil.buildQuestionContentMap(request, voteService, voteContent, null);
- VoteLearningStarterAction.logger.debug("mapQuestionsContent: " + mapQuestionsContent);
-
request.setAttribute(VoteAppConstants.MAP_QUESTION_CONTENT_LEARNER, mapQuestionsContent);
- VoteLearningStarterAction.logger.debug("MAP_QUESTION_CONTENT_LEARNER: "
- + request.getAttribute(VoteAppConstants.MAP_QUESTION_CONTENT_LEARNER));
request.setAttribute(VoteAppConstants.MAP_OPTIONS_CONTENT, mapQuestionsContent);
/*
* verify that userId does not already exist in the db. If it does exist, that means, that user already
* responded to the content and his answers must be displayed read-only
*
*/
-
- VoteLearningStarterAction.logger.debug("userID:" + userID);
-
- VoteLearningStarterAction.logger.debug("voteSession uid :" + voteSession.getUid());
VoteQueUsr voteQueUsr = voteService.getVoteUserBySession(new Long(userID), voteSession.getUid());
- VoteLearningStarterAction.logger.debug("voteQueUsr:" + voteQueUsr);
-
if (voteQueUsr != null) {
- VoteLearningStarterAction.logger.debug("voteQueUsr is available in the db:" + voteQueUsr);
Long queUsrId = voteQueUsr.getUid();
- VoteLearningStarterAction.logger.debug("queUsrId: " + queUsrId);
} else {
- VoteLearningStarterAction.logger.debug("voteQueUsr is not available in the db:" + voteQueUsr);
+ //voteQueUsr is not available in the db
}
String learningMode = voteLearningForm.getLearningMode();
- VoteLearningStarterAction.logger.debug("users learning mode is: " + learningMode);
/*
* the user's session id AND user id exists in the tool tables goto this screen if the OverAll Results scren has
* been already called up by this user
*/
if (voteQueUsr != null && voteQueUsr.isFinalScreenRequested()) {
Long sessionUid = voteQueUsr.getVoteSessionId();
- VoteLearningStarterAction.logger.debug("users sessionUid: " + sessionUid);
VoteSession voteUserSession = voteService.getVoteSessionByUID(sessionUid);
- VoteLearningStarterAction.logger.debug("voteUserSession: " + voteUserSession);
String userSessionId = voteUserSession.getVoteSessionId().toString();
- VoteLearningStarterAction.logger.debug("userSessionId: " + userSessionId);
- VoteLearningStarterAction.logger.debug("current toolSessionID: " + toolSessionID);
if (toolSessionID.toString().equals(userSessionId)) {
- VoteLearningStarterAction.logger
- .debug("the learner has already responsed to this content, just generate a read-only report. Use redo questions for this.");
-
- VoteLearningStarterAction.logger.debug("start building MAP_GENERAL_CHECKED_OPTIONS_CONTENT");
+ //the learner has already responsed to this content, just generate a read-only report. Use redo questions for this
String toolContentId = voteLearningForm.getToolContentID();
- VoteLearningStarterAction.logger.debug("toolContentId: " + toolContentId);
-
putMapQuestionsContentIntoRequest(request, voteService, voteQueUsr);
boolean isResponseFinalised = voteQueUsr.isResponseFinalised();
- VoteLearningStarterAction.logger.debug("isResponseFinalised: " + isResponseFinalised);
if (isResponseFinalised) {
- VoteLearningStarterAction.logger
- .debug("since the response is finalised present a screen which can not be edited");
+ //since the response is finalised present a screen which can not be edited
voteLearningForm.setReportViewOnly(new Boolean(true).toString());
voteGeneralLearnerFlowDTO.setReportViewOnly(new Boolean(true).toString());
}
- VoteLearningStarterAction.logger.debug("geting user answers for user uid and sessionUid"
- + voteQueUsr.getUid() + " " + sessionUid);
Set userAttempts = voteService.getAttemptsForUserAndSessionUseOpenAnswer(voteQueUsr.getUid(),
sessionUid);
- VoteLearningStarterAction.logger.debug("userAttempts: " + userAttempts);
request.setAttribute(VoteAppConstants.LIST_GENERAL_CHECKED_OPTIONS_CONTENT, userAttempts);
VoteGeneralMonitoringDTO voteGeneralMonitoringDTO = new VoteGeneralMonitoringDTO();
@@ -514,48 +449,32 @@
getMessageService());
String isContentLockOnFinish = voteLearningForm.getLockOnFinish();
- VoteLearningStarterAction.logger.debug("isContentLockOnFinish: " + isContentLockOnFinish);
if (isContentLockOnFinish.equals(new Boolean(true).toString()) && isResponseFinalised == true) {
- VoteLearningStarterAction.logger.debug("user with session id: " + userSessionId
- + " should not redo votes. session is locked.");
- VoteLearningStarterAction.logger.debug("fwd'ing to: " + VoteAppConstants.EXIT_PAGE);
+ //user with session id: userSessionId should not redo votes. session is locked
return mapping.findForward(VoteAppConstants.EXIT_PAGE);
}
- VoteLearningStarterAction.logger
- .debug("the user's session id AND user id exists in the tool tables go to redo questions. "
- + toolSessionID + " voteQueUsr: " + voteQueUsr + " user id: "
- + voteQueUsr.getQueUsrId());
voteLearningForm.setRevisitingUser(new Boolean(true).toString());
voteGeneralLearnerFlowDTO.setRevisitingUser(new Boolean(true).toString());
- VoteLearningStarterAction.logger.debug("preparing chart data for readonly mode");
-
- VoteLearningStarterAction.logger.debug("view-only voteGeneralLearnerFlowDTO: "
- + voteGeneralLearnerFlowDTO);
request.setAttribute(VoteAppConstants.VOTE_GENERAL_LEARNER_FLOW_DTO, voteGeneralLearnerFlowDTO);
if (isContentLockOnFinish.equals(new Boolean(false).toString()) && isResponseFinalised == true) {
- VoteLearningStarterAction.logger.debug("isContentLockOnFinish is false, enable redo of votes : ");
- VoteLearningStarterAction.logger.debug("fwd'ing to: " + VoteAppConstants.REVISITED_ALL_NOMINATIONS);
+ //isContentLockOnFinish is false, enable redo of votes
return mapping.findForward(VoteAppConstants.REVISITED_ALL_NOMINATIONS);
}
- VoteLearningStarterAction.logger.debug("fwd'ing to: " + VoteAppConstants.ALL_NOMINATIONS);
return mapping.findForward(VoteAppConstants.ALL_NOMINATIONS);
}
}
- VoteLearningStarterAction.logger.debug("presenting standard learner screen..");
+ //presenting standard learner screen..
return mapping.findForward(VoteAppConstants.LOAD_LEARNER);
}
private void putNotebookEntryIntoVoteGeneralLearnerFlowDTO(IVoteService voteService,
VoteGeneralLearnerFlowDTO voteGeneralLearnerFlowDTO, String toolSessionID, String userID) {
- VoteLearningStarterAction.logger.debug("attempt getting notebookEntry: ");
NotebookEntry notebookEntry = voteService.getEntry(new Long(toolSessionID),
CoreNotebookConstants.NOTEBOOK_TOOL, VoteAppConstants.MY_SIGNATURE, new Integer(userID));
- VoteLearningStarterAction.logger.debug("notebookEntry: " + notebookEntry);
-
if (notebookEntry != null) {
String notebookEntryPresentable = VoteUtils.replaceNewLines(notebookEntry.getEntry());
voteGeneralLearnerFlowDTO.setNotebookEntry(notebookEntryPresentable);
@@ -572,8 +491,6 @@
if (voteQueUsr != null) {
attempts = voteService.getAttemptsForUser(voteQueUsr.getUid());
}
- VoteLearningStarterAction.logger.debug("attempts: " + attempts);
-
Map localMapQuestionsContent = new TreeMap(new VoteComparator());
if (attempts != null) {
@@ -582,26 +499,16 @@
int order = 0;
while (listIterator.hasNext()) {
VoteUsrAttempt attempt = (VoteUsrAttempt) listIterator.next();
- VoteLearningStarterAction.logger.debug("attempt: " + attempt);
VoteQueContent voteQueContent = attempt.getVoteQueContent();
- VoteLearningStarterAction.logger.debug("voteQueContent: " + voteQueContent);
order++;
if (voteQueContent != null) {
String entry = voteQueContent.getQuestion();
- VoteLearningStarterAction.logger.debug("entry: " + entry);
String voteQueContentId = attempt.getVoteQueContentId().toString();
- VoteLearningStarterAction.logger.debug("voteQueContentId: " + voteQueContentId);
if (entry != null) {
if (entry.equals("sample nomination") && voteQueContentId.equals("1")) {
- VoteLearningStarterAction.logger
- .debug("this nomination entry points to a user entered nomination: "
- + attempt.getUserEntry());
localMapQuestionsContent.put(new Integer(order).toString(), attempt.getUserEntry());
} else {
- VoteLearningStarterAction.logger
- .debug("this nomination entry points to a standard nomination: "
- + voteQueContent.getQuestion());
localMapQuestionsContent.put(new Integer(order).toString(), voteQueContent.getQuestion());
}
}
@@ -610,8 +517,6 @@
}
request.setAttribute(VoteAppConstants.MAP_GENERAL_CHECKED_OPTIONS_CONTENT, localMapQuestionsContent);
- VoteLearningStarterAction.logger.debug("end building MAP_GENERAL_CHECKED_OPTIONS_CONTENT: "
- + localMapQuestionsContent);
}
/**
@@ -624,12 +529,8 @@
protected void commonContentSetup(HttpServletRequest request, IVoteService voteService, VoteContent voteContent,
VoteGeneralLearnerFlowDTO voteGeneralLearnerFlowDTO) {
Map mapQuestionsContent = LearningUtil.buildQuestionContentMap(request, voteService, voteContent, null);
- VoteLearningStarterAction.logger.debug("mapQuestionsContent: " + mapQuestionsContent);
request.setAttribute(VoteAppConstants.MAP_QUESTION_CONTENT_LEARNER, mapQuestionsContent);
- VoteLearningStarterAction.logger.debug("MAP_QUESTION_CONTENT_LEARNER: "
- + request.getAttribute(VoteAppConstants.MAP_QUESTION_CONTENT_LEARNER));
- VoteLearningStarterAction.logger.debug("voteContent has : " + mapQuestionsContent.size() + " entries.");
voteGeneralLearnerFlowDTO.setTotalQuestionCount(new Long(mapQuestionsContent.size()).toString());
}
@@ -643,24 +544,12 @@
protected void setupAttributes(HttpServletRequest request, VoteContent voteContent,
VoteLearningForm voteLearningForm, VoteGeneralLearnerFlowDTO voteGeneralLearnerFlowDTO) {
- VoteLearningStarterAction.logger.debug("IS_CONTENT_IN_USE: " + voteContent.isContentInUse());
-
Map mapGeneralCheckedOptionsContent = new TreeMap(new VoteComparator());
request.setAttribute(VoteAppConstants.MAP_GENERAL_CHECKED_OPTIONS_CONTENT, mapGeneralCheckedOptionsContent);
/*
* Is the tool activity been checked as Run Offline in the property inspector?
*/
- VoteLearningStarterAction.logger.debug("IS_TOOL_ACTIVITY_OFFLINE: " + voteContent.isRunOffline());
- VoteLearningStarterAction.logger.debug("advanced properties maxNominationCount: "
- + voteContent.getMaxNominationCount());
- VoteLearningStarterAction.logger.debug("advanced properties isAllowText(): "
- + new Boolean(voteContent.isAllowText()).toString());
- VoteLearningStarterAction.logger.debug("advanced properties isRunOffline(): "
- + new Boolean(voteContent.isRunOffline()).toString());
- VoteLearningStarterAction.logger.debug("advanced properties isLockOnFinish(): "
- + new Boolean(voteContent.isLockOnFinish()).toString());
-
voteLearningForm.setActivityTitle(voteContent.getTitle());
voteLearningForm.setActivityInstructions(voteContent.getInstructions());
voteLearningForm.setActivityRunOffline(new Boolean(voteContent.isRunOffline()).toString());
@@ -689,13 +578,11 @@
String userID = "";
HttpSession ss = SessionManager.getSession();
- VoteLearningStarterAction.logger.debug("ss: " + ss);
if (ss != null) {
UserDTO user = (UserDTO) ss.getAttribute(AttributeNames.USER);
if (user != null && user.getUserID() != null) {
userID = user.getUserID().toString();
- VoteLearningStarterAction.logger.debug("retrieved userId: " + userID);
voteLearningForm.setUserID(userID);
}
}
@@ -712,19 +599,17 @@
} else {
try {
toolSessionID = new Long(strToolSessionId).longValue();
- VoteLearningStarterAction.logger.debug("passed TOOL_SESSION_ID : " + new Long(toolSessionID));
voteLearningForm.setToolSessionID(new Long(toolSessionID).toString());
} catch (NumberFormatException e) {
VoteUtils.cleanUpSessionAbsolute(request);
// persistInRequestError(request, "error.sessionId.numberFormatException");
- VoteLearningStarterAction.logger.debug("add error.sessionId.numberFormatException to ActionMessages.");
+ VoteLearningStarterAction.logger.error("add error.sessionId.numberFormatException to ActionMessages.");
return mapping.findForward(VoteAppConstants.ERROR_LIST);
}
}
/* mode can be learner, teacher or author */
String mode = request.getParameter(VoteAppConstants.MODE);
- VoteLearningStarterAction.logger.debug("mode: " + mode);
if (mode == null || mode.length() == 0) {
VoteUtils.cleanUpSessionAbsolute(request);
@@ -737,20 +622,14 @@
VoteLearningStarterAction.logger.error("mode invalid: ");
return mapping.findForward(VoteAppConstants.ERROR_LIST);
}
- VoteLearningStarterAction.logger.debug("session LEARNING_MODE set to:" + mode);
voteLearningForm.setLearningMode(mode);
return null;
}
boolean isSessionCompleted(String userSessionId, IVoteService voteService) {
- VoteLearningStarterAction.logger.debug("userSessionId:" + userSessionId);
VoteSession voteSession = voteService.retrieveVoteSession(new Long(userSessionId));
- VoteLearningStarterAction.logger.debug("retrieving voteSession: " + voteSession);
- VoteLearningStarterAction.logger.debug("voteSession status : " + voteSession.getSessionStatus());
if (voteSession.getSessionStatus() != null && voteSession.getSessionStatus().equals(VoteAppConstants.COMPLETED)) {
- VoteLearningStarterAction.logger.debug("this session is COMPLETED voteSession status : " + userSessionId
- + "->" + voteSession.getSessionStatus());
return true;
}
return false;
@@ -765,7 +644,6 @@
public void persistInRequestError(HttpServletRequest request, String message) {
ActionMessages errors = new ActionMessages();
errors.add(Globals.ERROR_KEY, new ActionMessage(message));
- VoteLearningStarterAction.logger.debug("add " + message + " to ActionMessages:");
saveErrors(request, errors);
}
Index: lams_tool_vote/src/java/org/lamsfoundation/lams/tool/vote/web/VoteMonitoringAction.java
===================================================================
diff -u -rddc0da3d278fb12ac8374ad59146a8990ea2f3a2 -r601fd92095193321a6b2286ef55108fbe5f9dfc4
--- lams_tool_vote/src/java/org/lamsfoundation/lams/tool/vote/web/VoteMonitoringAction.java (.../VoteMonitoringAction.java) (revision ddc0da3d278fb12ac8374ad59146a8990ea2f3a2)
+++ lams_tool_vote/src/java/org/lamsfoundation/lams/tool/vote/web/VoteMonitoringAction.java (.../VoteMonitoringAction.java) (revision 601fd92095193321a6b2286ef55108fbe5f9dfc4)
@@ -24,21 +24,20 @@
import java.io.IOException;
import java.util.ArrayList;
+import java.util.Date;
import java.util.Iterator;
import java.util.LinkedList;
import java.util.List;
import java.util.Map;
import java.util.Set;
-import java.util.TreeMap;
-import java.util.Date;
import java.util.TimeZone;
+import java.util.TreeMap;
import javax.servlet.ServletException;
import javax.servlet.http.HttpServletRequest;
import javax.servlet.http.HttpServletResponse;
import javax.servlet.http.HttpSession;
-import org.apache.log4j.Logger;
import org.apache.struts.action.ActionForm;
import org.apache.struts.action.ActionForward;
import org.apache.struts.action.ActionMapping;
@@ -51,7 +50,6 @@
import org.lamsfoundation.lams.tool.vote.ExportPortfolioDTO;
import org.lamsfoundation.lams.tool.vote.ReflectionDTO;
import org.lamsfoundation.lams.tool.vote.VoteAppConstants;
-import org.lamsfoundation.lams.tool.vote.VoteApplicationException;
import org.lamsfoundation.lams.tool.vote.VoteComparator;
import org.lamsfoundation.lams.tool.vote.VoteGeneralAuthoringDTO;
import org.lamsfoundation.lams.tool.vote.VoteGeneralLearnerFlowDTO;
@@ -67,7 +65,6 @@
import org.lamsfoundation.lams.tool.vote.pojos.VoteUsrAttempt;
import org.lamsfoundation.lams.tool.vote.service.IVoteService;
import org.lamsfoundation.lams.tool.vote.service.VoteServiceProxy;
-import org.lamsfoundation.lams.usermanagement.dto.UserDTO;
import org.lamsfoundation.lams.util.DateUtil;
import org.lamsfoundation.lams.util.MessageService;
import org.lamsfoundation.lams.util.WebUtil;
@@ -77,194 +74,54 @@
import org.lamsfoundation.lams.web.util.SessionMap;
/**
- *
- * Action class that controls the logic of tool behavior.
- *
- *
- *
- * Note that Struts action class only has the responsibility to navigate page flow. All database operation should go to
- * service layer and data transformation from domain model to struts form bean should go to form bean class. This ensure
- * clean and maintainable code.
- *
- *
- * SystemException
is thrown whenever an known error condition is identified. No system exception error
- * handling code should appear in the Struts action class as all of them are handled in
- * CustomStrutsExceptionHandler.
- *
* @author Ozgur Demirtas
- *
- *
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
- *
*/
public class VoteMonitoringAction extends LamsDispatchAction implements VoteAppConstants {
- static Logger logger = Logger.getLogger(VoteMonitoringAction.class.getName());
/**
- *
- * Default struts dispatch method.
- *
- *
- *
- * It is assuming that progress engine should pass in the tool access mode and the tool session id as http
- * parameters.
- *
- *
- * @param mapping
- * An ActionMapping class that will be used by the Action class to tell the ActionServlet where to
- * send the end-user.
- *
- * @param form
- * The ActionForm class that will contain any data submitted by the end-user via a form.
- * @param request
- * A standard Servlet HttpServletRequest class.
- * @param response
- * A standard Servlet HttpServletResponse class.
- * @return An ActionForward class that will be returned to the ActionServlet indicating where the user is to go
- * next.
- * @throws IOException
- * @throws ServletException
- * @throws VoteApplicationException
- * the known runtime exception
- *
- * unspecified(ActionMapping mapping, ActionForm form, HttpServletRequest request, HttpServletResponse response)
- * throws IOException, ServletException
- *
* main content/question content management and workflow logic
- *
*/
- @Override
public ActionForward unspecified(ActionMapping mapping, ActionForm form, HttpServletRequest request,
HttpServletResponse response) throws IOException, ServletException {
VoteUtils.cleanUpUserExceptions(request);
- VoteMonitoringAction.logger.debug("dispatching unspecified...");
return null;
}
public ActionForward submitSession(ActionMapping mapping, ActionForm form, HttpServletRequest request,
HttpServletResponse response, IVoteService voteService, MessageService messageService,
VoteGeneralMonitoringDTO voteGeneralMonitoringDTO) throws IOException, ServletException {
- VoteMonitoringAction.logger.debug("calling submitSession...voteGeneralMonitoringDTO:"
- + voteGeneralMonitoringDTO);
commonSubmitSessionCode(form, request, voteService, messageService, voteGeneralMonitoringDTO);
- VoteMonitoringAction.logger.debug("post commonSubmitSessionCode: " + voteGeneralMonitoringDTO);
return mapping.findForward(VoteAppConstants.LOAD_MONITORING);
}
protected void commonSubmitSessionCode(ActionForm form, HttpServletRequest request, IVoteService voteService,
MessageService messageService, VoteGeneralMonitoringDTO voteGeneralMonitoringDTO) throws IOException,
ServletException {
- VoteMonitoringAction.logger.debug("starting commonSubmitSessionCode...voteGeneralMonitoringDTO:"
- + voteGeneralMonitoringDTO);
-
- VoteMonitoringAction.logger.debug("voteService:" + voteService);
VoteMonitoringForm voteMonitoringForm = (VoteMonitoringForm) form;
repopulateRequestParameters(request, voteMonitoringForm, voteGeneralMonitoringDTO);
- VoteMonitoringAction.logger.debug("done repopulateRequestParameters");
-
String currentMonitoredToolSession = voteMonitoringForm.getSelectedToolSessionId();
- VoteMonitoringAction.logger.debug("currentMonitoredToolSession: " + currentMonitoredToolSession);
-
String toolContentID = voteMonitoringForm.getToolContentID();
- VoteMonitoringAction.logger.debug("toolContentID: " + toolContentID);
-
VoteContent voteContent = voteService.retrieveVote(new Long(toolContentID));
- VoteMonitoringAction.logger.debug("existing voteContent:" + voteContent);
-
if (currentMonitoredToolSession.equals("All")) {
voteGeneralMonitoringDTO.setSelectionCase(new Long(2));
request.setAttribute(VoteAppConstants.SELECTION_CASE, new Long(2));
- VoteMonitoringAction.logger.debug("generate DTO for All sessions: ");
List listVoteAllSessionsDTO = MonitoringUtil.prepareChartDTO(request, voteService, voteMonitoringForm,
voteContent.getVoteContentId(), messageService);
- VoteMonitoringAction.logger.debug("listVoteAllSessionsDTO: " + listVoteAllSessionsDTO);
voteGeneralMonitoringDTO.setListVoteAllSessionsDTO(listVoteAllSessionsDTO);
} else {
- VoteMonitoringAction.logger.debug("preparing chart data for content id: " + voteContent.getVoteContentId());
- VoteMonitoringAction.logger.debug("preparing chart data for currentMonitoredToolSession: "
- + currentMonitoredToolSession);
request.setAttribute(VoteAppConstants.SELECTION_CASE, new Long(1));
VoteSession voteSession = voteService.retrieveVoteSession(new Long(currentMonitoredToolSession));
- VoteMonitoringAction.logger.debug("voteSession uid:" + voteSession.getUid());
MonitoringUtil.prepareChartData(request, voteService, voteMonitoringForm, voteContent.getVoteContentId()
.toString(), voteSession.getUid().toString(), null, voteGeneralMonitoringDTO, getMessageService());
- VoteMonitoringAction.logger.debug("post prepareChartData, voteGeneralMonitoringDTO:"
- + voteGeneralMonitoringDTO);
-
refreshSummaryData(request, voteContent, voteService, true, false, currentMonitoredToolSession, null, true,
null, voteGeneralMonitoringDTO, null);
- VoteMonitoringAction.logger.debug("session_name: " + voteSession.getSession_name());
voteGeneralMonitoringDTO.setGroupName(voteSession.getSession_name());
- VoteMonitoringAction.logger.debug("post refreshSummaryData, voteGeneralMonitoringDTO:"
- + voteGeneralMonitoringDTO);
voteGeneralMonitoringDTO.setSelectionCase(new Long(1));
}
- VoteMonitoringAction.logger.debug("SELECTION_CASE: " + voteGeneralMonitoringDTO.getSelectionCase());
-
- VoteMonitoringAction.logger.debug("SELECTION_CASE: " + request.getAttribute(VoteAppConstants.SELECTION_CASE));
request.setAttribute(VoteAppConstants.CURRENT_MONITORED_TOOL_SESSION, currentMonitoredToolSession);
boolean isGroupedActivity = voteService.isGroupedActivity(new Long(toolContentID));
@@ -276,23 +133,13 @@
voteGeneralMonitoringDTO.setRequestLearningReport(new Boolean(false).toString());
Map summaryToolSessions = MonitoringUtil.populateToolSessions(request, voteContent, voteService);
- VoteMonitoringAction.logger.debug("summaryToolSessions: " + summaryToolSessions);
voteGeneralMonitoringDTO.setSummaryToolSessions(summaryToolSessions);
Map summaryToolSessionsId = MonitoringUtil.populateToolSessionsId(request, voteContent, voteService);
- VoteMonitoringAction.logger.debug("summaryToolSessionsId: " + summaryToolSessionsId);
voteGeneralMonitoringDTO.setSummaryToolSessionsId(summaryToolSessionsId);
- VoteMonitoringAction.logger.debug("calling initInstructionsContent.");
// initInstructionsContent(toolContentID, request, voteService, voteGeneralMonitoringDTO);
- VoteMonitoringAction.logger.debug("post initInstructionsContent, voteGeneralMonitoringDTO: "
- + voteGeneralMonitoringDTO);
-
- VoteMonitoringAction.logger.debug("calling initStatsContent.");
initStatsContent(toolContentID, request, voteService, voteGeneralMonitoringDTO);
- VoteMonitoringAction.logger.debug("post initStatsContent, voteGeneralMonitoringDTO: "
- + voteGeneralMonitoringDTO);
-
/* setting editable screen properties */
VoteGeneralAuthoringDTO voteGeneralAuthoringDTO = new VoteGeneralAuthoringDTO();
voteGeneralAuthoringDTO.setActivityTitle(voteContent.getTitle());
@@ -301,11 +148,9 @@
Map mapOptionsContent = new TreeMap(new VoteComparator());
Iterator queIterator = voteContent.getVoteQueContents().iterator();
Long mapIndex = new Long(1);
- VoteMonitoringAction.logger.debug("mapOptionsContent: " + mapOptionsContent);
while (queIterator.hasNext()) {
VoteQueContent voteQueContent = (VoteQueContent) queIterator.next();
if (voteQueContent != null) {
- VoteMonitoringAction.logger.debug("question: " + voteQueContent.getQuestion());
mapOptionsContent.put(mapIndex.toString(), voteQueContent.getQuestion());
/**
* make the first entry the default(first) one for jsp
@@ -318,33 +163,26 @@
}
}
- VoteMonitoringAction.logger.debug("mapOptionsContent: " + mapOptionsContent);
int maxIndex = mapOptionsContent.size();
- VoteMonitoringAction.logger.debug("maxIndex: " + maxIndex);
voteGeneralAuthoringDTO.setMaxOptionIndex(maxIndex);
voteGeneralAuthoringDTO.setMapOptionsContent(mapOptionsContent);
boolean isContentInUse = VoteUtils.isContentInUse(voteContent);
- VoteMonitoringAction.logger.debug("isContentInUse:" + isContentInUse);
voteGeneralMonitoringDTO.setIsMonitoredContentInUse(new Boolean(false).toString());
if (isContentInUse == true) {
- VoteMonitoringAction.logger
- .debug("monitoring url does not allow editActivity since the content is in use.");
+ //monitoring url does not allow editActivity since the content is in use
voteGeneralMonitoringDTO.setIsMonitoredContentInUse(new Boolean(true).toString());
}
- VoteMonitoringAction.logger.debug("voteGeneralAuthoringDTO: " + voteGeneralAuthoringDTO);
request.setAttribute(VoteAppConstants.VOTE_GENERAL_AUTHORING_DTO, voteGeneralAuthoringDTO);
// prepareReflectionData(request, voteContent, voteService, null,false);
prepareReflectionData(request, voteContent, voteService, null, false, "All");
if (voteService.studentActivityOccurredGlobal(voteContent)) {
- VoteMonitoringAction.logger.debug("USER_EXCEPTION_NO_TOOL_SESSIONS is set to false");
voteGeneralMonitoringDTO.setUserExceptionNoToolSessions(new Boolean(false).toString());
} else {
- VoteMonitoringAction.logger.debug("USER_EXCEPTION_NO_TOOL_SESSIONS is set to true");
voteGeneralMonitoringDTO.setUserExceptionNoToolSessions(new Boolean(true).toString());
}
@@ -353,34 +191,27 @@
voteGeneralMonitoringDTO.setOfflineInstructions(voteContent.getOfflineInstructions());
List attachmentList = voteService.retrieveVoteUploadedFiles(voteContent);
- VoteMonitoringAction.logger.debug("attachmentList: " + attachmentList);
voteGeneralMonitoringDTO.setAttachmentList(attachmentList);
voteGeneralMonitoringDTO.setDeletedAttachmentList(new ArrayList());
/** ...till here * */
- VoteMonitoringAction.logger.debug("end of commonSubmitSessionCode, voteGeneralMonitoringDTO: "
- + voteGeneralMonitoringDTO);
request.setAttribute(VoteAppConstants.VOTE_GENERAL_MONITORING_DTO, voteGeneralMonitoringDTO);
EditActivityDTO editActivityDTO = new EditActivityDTO();
- VoteMonitoringAction.logger.debug("isContentInUse:" + isContentInUse);
if (isContentInUse == true) {
editActivityDTO.setMonitoredContentInUse(new Boolean(true).toString());
}
request.setAttribute(VoteAppConstants.EDIT_ACTIVITY_DTO, editActivityDTO);
/* find out if there are any reflection entries, from here */
boolean notebookEntriesExist = MonitoringUtil.notebookEntriesExist(voteService, voteContent);
- VoteMonitoringAction.logger.debug("notebookEntriesExist : " + notebookEntriesExist);
-
if (notebookEntriesExist) {
request.setAttribute(VoteAppConstants.NOTEBOOK_ENTRIES_EXIST, new Boolean(true).toString());
String userExceptionNoToolSessions = voteGeneralMonitoringDTO.getUserExceptionNoToolSessions();
- VoteMonitoringAction.logger.debug("userExceptionNoToolSessions : " + userExceptionNoToolSessions);
if (userExceptionNoToolSessions.equals("true")) {
- VoteMonitoringAction.logger.debug("there are no online student activity but there are reflections : ");
+ //there are no online student activity but there are reflections
request.setAttribute(VoteAppConstants.NO_SESSIONS_NOTEBOOK_ENTRIES_EXIST, new Boolean(true).toString());
}
} else {
@@ -394,14 +225,10 @@
public ActionForward submitSession(ActionMapping mapping, ActionForm form, HttpServletRequest request,
HttpServletResponse response) throws IOException, ServletException {
- VoteMonitoringAction.logger.debug("dispathcing submitSession..");
IVoteService voteService = VoteServiceProxy.getVoteService(getServlet().getServletContext());
- VoteMonitoringAction.logger.debug("voteService: " + voteService);
-
VoteGeneralMonitoringDTO voteGeneralMonitoringDTO = new VoteGeneralMonitoringDTO();
commonSubmitSessionCode(form, request, voteService, getMessageService(), voteGeneralMonitoringDTO);
- VoteMonitoringAction.logger.debug("post commonSubmitSessionCode: " + voteGeneralMonitoringDTO);
return mapping.findForward(VoteAppConstants.LOAD_MONITORING);
}
@@ -410,81 +237,55 @@
boolean isUserNamesVisible, boolean isLearnerRequest, String currentSessionId, String userId,
boolean showUserEntriesBySession, VoteGeneralLearnerFlowDTO voteGeneralLearnerFlowDTO,
VoteGeneralMonitoringDTO voteGeneralMonitoringDTO, ExportPortfolioDTO exportPortfolioDTO) {
- VoteMonitoringAction.logger.debug("doing refreshSummaryData." + voteGeneralLearnerFlowDTO);
- VoteMonitoringAction.logger.debug("voteGeneralMonitoringDTO:" + voteGeneralMonitoringDTO);
- VoteMonitoringAction.logger.debug("exportPortfolioDTO:" + exportPortfolioDTO);
if (voteService == null) {
- VoteMonitoringAction.logger.debug("will retrieve voteService");
voteService = VoteServiceProxy.getVoteService(getServlet().getServletContext());
- VoteMonitoringAction.logger.debug("retrieving voteService from session: " + voteService);
}
- VoteMonitoringAction.logger.debug("voteService: " + voteService);
- VoteMonitoringAction.logger.debug("isUserNamesVisible: " + isUserNamesVisible);
- VoteMonitoringAction.logger.debug("isLearnerRequest: " + isLearnerRequest);
-
/* this section is related to summary tab. Starts here. */
Map summaryToolSessions = MonitoringUtil.populateToolSessions(request, voteContent, voteService);
- VoteMonitoringAction.logger.debug("summaryToolSessions: " + summaryToolSessions);
if (voteService.studentActivityOccurredStandardAndOpen(voteContent)) {
if (voteGeneralMonitoringDTO != null) {
voteGeneralMonitoringDTO.setUserExceptionNoToolSessions(new Boolean(false).toString());
}
- VoteMonitoringAction.logger.debug("USER_EXCEPTION_NO_TOOL_SESSIONS is set to false");
} else {
if (voteGeneralMonitoringDTO != null) {
voteGeneralMonitoringDTO.setUserExceptionNoToolSessions(new Boolean(true).toString());
}
- VoteMonitoringAction.logger.debug("USER_EXCEPTION_NO_TOOL_SESSIONS is set to true");
}
String userExceptionNoToolSessions = voteGeneralMonitoringDTO.getUserExceptionNoToolSessions();
- VoteMonitoringAction.logger.debug("userExceptionNoToolSessions: " + userExceptionNoToolSessions);
if (exportPortfolioDTO != null) {
exportPortfolioDTO.setUserExceptionNoToolSessions(userExceptionNoToolSessions);
}
Map summaryToolSessionsId = MonitoringUtil.populateToolSessionsId(request, voteContent, voteService);
- VoteMonitoringAction.logger.debug("summaryToolSessionsId: " + summaryToolSessionsId);
- VoteMonitoringAction.logger.debug("currentSessionId: " + currentSessionId);
if (currentSessionId != null && !currentSessionId.equals("All")) {
VoteSession voteSession = voteService.retrieveVoteSession(new Long(currentSessionId));
- VoteMonitoringAction.logger.debug("voteSession:" + voteSession);
if (voteGeneralMonitoringDTO != null) {
voteGeneralMonitoringDTO.setGroupName(voteSession.getSession_name());
}
} else {
voteGeneralMonitoringDTO.setGroupName("All Groups");
}
- VoteMonitoringAction.logger.debug("using allUsersData to retrieve data: " + isUserNamesVisible);
List listMonitoredAnswersContainerDTO = MonitoringUtil.buildGroupsQuestionData(request, voteContent,
isUserNamesVisible, isLearnerRequest, currentSessionId, userId, voteService);
- VoteMonitoringAction.logger.debug("listMonitoredAnswersContainerDTO: " + listMonitoredAnswersContainerDTO);
/* ends here. */
- VoteMonitoringAction.logger.debug("decide processing user entered values based on isLearnerRequest: "
- + isLearnerRequest);
-
List listUserEntries = processUserEnteredNominations(voteService, voteContent, currentSessionId,
showUserEntriesBySession, userId, isLearnerRequest);
- VoteMonitoringAction.logger.debug("listUserEntries: " + listUserEntries);
if (voteGeneralLearnerFlowDTO != null) {
- VoteMonitoringAction.logger.debug("placing dtos within the voteGeneralLearnerFlowDTO: ");
voteGeneralLearnerFlowDTO.setListMonitoredAnswersContainerDto(listMonitoredAnswersContainerDTO);
voteGeneralLearnerFlowDTO.setListUserEntries(listUserEntries);
- ;
}
if (exportPortfolioDTO != null) {
- VoteMonitoringAction.logger.debug("placing dtos within the exportPortfolioDTO: ");
exportPortfolioDTO.setListMonitoredAnswersContainerDto(listMonitoredAnswersContainerDTO);
exportPortfolioDTO.setListUserEntries(listUserEntries);
- ;
}
if (voteGeneralMonitoringDTO != null) {
@@ -501,26 +302,19 @@
}
}
- VoteMonitoringAction.logger.debug("final voteGeneralLearnerFlowDTO: " + voteGeneralLearnerFlowDTO);
- VoteMonitoringAction.logger.debug("final voteGeneralMonitoringDTO: " + voteGeneralMonitoringDTO);
-
boolean isContentInUse = VoteUtils.isContentInUse(voteContent);
- VoteMonitoringAction.logger.debug("isContentInUse:" + isContentInUse);
voteGeneralMonitoringDTO.setIsMonitoredContentInUse(new Boolean(false).toString());
if (isContentInUse == true) {
- VoteMonitoringAction.logger
- .debug("monitoring url does not allow editActivity since the content is in use.");
+ //monitoring url does not allow editActivity since the content is in use
voteGeneralMonitoringDTO.setIsMonitoredContentInUse(new Boolean(true).toString());
}
// prepareReflectionData(request, voteContent, voteService, null,false);
prepareReflectionData(request, voteContent, voteService, null, false, "All");
if (voteService.studentActivityOccurredGlobal(voteContent)) {
- VoteMonitoringAction.logger.debug("USER_EXCEPTION_NO_TOOL_SESSIONS is set to false");
voteGeneralMonitoringDTO.setUserExceptionNoToolSessions(new Boolean(false).toString());
} else {
- VoteMonitoringAction.logger.debug("USER_EXCEPTION_NO_TOOL_SESSIONS is set to true");
voteGeneralMonitoringDTO.setUserExceptionNoToolSessions(new Boolean(true).toString());
}
@@ -529,35 +323,29 @@
voteGeneralMonitoringDTO.setOfflineInstructions(voteContent.getOfflineInstructions());
List attachmentList = voteService.retrieveVoteUploadedFiles(voteContent);
- VoteMonitoringAction.logger.debug("attachmentList: " + attachmentList);
voteGeneralMonitoringDTO.setAttachmentList(attachmentList);
voteGeneralMonitoringDTO.setDeletedAttachmentList(new ArrayList());
/** ...till here * */
- VoteMonitoringAction.logger.debug("end of refreshSummaryData, voteGeneralMonitoringDTO"
- + voteGeneralMonitoringDTO);
request.setAttribute(VoteAppConstants.VOTE_GENERAL_MONITORING_DTO, voteGeneralMonitoringDTO);
EditActivityDTO editActivityDTO = new EditActivityDTO();
isContentInUse = VoteUtils.isContentInUse(voteContent);
- VoteMonitoringAction.logger.debug("isContentInUse:" + isContentInUse);
if (isContentInUse == true) {
editActivityDTO.setMonitoredContentInUse(new Boolean(true).toString());
}
request.setAttribute(VoteAppConstants.EDIT_ACTIVITY_DTO, editActivityDTO);
/* find out if there are any reflection entries, from here */
boolean notebookEntriesExist = MonitoringUtil.notebookEntriesExist(voteService, voteContent);
- VoteMonitoringAction.logger.debug("notebookEntriesExist : " + notebookEntriesExist);
if (notebookEntriesExist) {
request.setAttribute(VoteAppConstants.NOTEBOOK_ENTRIES_EXIST, new Boolean(true).toString());
userExceptionNoToolSessions = voteGeneralMonitoringDTO.getUserExceptionNoToolSessions();
- VoteMonitoringAction.logger.debug("userExceptionNoToolSessions : " + userExceptionNoToolSessions);
if (userExceptionNoToolSessions.equals("true")) {
- VoteMonitoringAction.logger.debug("there are no online student activity but there are reflections : ");
+ //there are no online student activity but there are reflections
request.setAttribute(VoteAppConstants.NO_SESSIONS_NOTEBOOK_ENTRIES_EXIST, new Boolean(true).toString());
}
} else {
@@ -571,55 +359,29 @@
public List processUserEnteredNominations(IVoteService voteService, VoteContent voteContent,
String currentSessionId, boolean showUserEntriesBySession, String userId, boolean showUserEntriesByUserId) {
- VoteMonitoringAction.logger.debug("start getting user entries, showUserEntriesBySession: "
- + showUserEntriesBySession);
- VoteMonitoringAction.logger.debug("start getting user entries, currentSessionId: " + currentSessionId);
- VoteMonitoringAction.logger.debug("start getting user entries, showUserEntriesByUserId: "
- + showUserEntriesByUserId);
- VoteMonitoringAction.logger.debug("start getting user entries, userId: " + userId);
- VoteMonitoringAction.logger.debug("start getting user entries, voteContent: " + voteContent);
- VoteMonitoringAction.logger.debug("start getting user entries, voteContent id: "
- + voteContent.getVoteContentId());
-
Set userEntries = voteService.getUserEntries();
- VoteMonitoringAction.logger.debug("userEntries: " + userEntries);
List listUserEntries = new LinkedList();
Iterator itListNominations = userEntries.iterator();
while (itListNominations.hasNext()) {
String userEntry = (String) itListNominations.next();
- VoteMonitoringAction.logger.debug("userEntry:..." + userEntry);
if (userEntry != null && userEntry.length() > 0) {
VoteMonitoredAnswersDTO voteMonitoredAnswersDTO = new VoteMonitoredAnswersDTO();
- VoteMonitoringAction.logger.debug("adding user entry : " + userEntry);
voteMonitoredAnswersDTO.setQuestion(userEntry);
List userRecords = voteService.getUserRecords(userEntry);
- VoteMonitoringAction.logger.debug("userRecords: " + userRecords);
-
- VoteMonitoringAction.logger.debug("start processing user records: ");
-
List listMonitoredUserContainerDTO = new LinkedList();
Iterator itUserRecords = userRecords.iterator();
while (itUserRecords.hasNext()) {
VoteMonitoredUserDTO voteMonitoredUserDTO = new VoteMonitoredUserDTO();
- VoteMonitoringAction.logger.debug("new DTO created");
VoteUsrAttempt voteUsrAttempt = (VoteUsrAttempt) itUserRecords.next();
- VoteMonitoringAction.logger.debug("voteUsrAttempt: " + voteUsrAttempt);
VoteSession localUserSession = voteUsrAttempt.getVoteQueUsr().getVoteSession();
- VoteMonitoringAction.logger.debug("localUserSession: " + localUserSession);
- VoteMonitoringAction.logger.debug("localUserSession's content id: "
- + localUserSession.getVoteContentId());
- VoteMonitoringAction.logger.debug("incoming content uid versus localUserSession's content id: "
- + voteContent.getUid() + " versus " + localUserSession.getVoteContentId());
if (showUserEntriesBySession == false) {
- VoteMonitoringAction.logger.debug("showUserEntriesBySession is false");
- VoteMonitoringAction.logger.debug("show user entries by same content only");
if (voteContent.getUid().toString().equals(localUserSession.getVoteContentId().toString())) {
voteMonitoredUserDTO.setAttemptTime(voteUsrAttempt.getAttemptTime());
voteMonitoredUserDTO.setTimeZone(voteUsrAttempt.getTimeZone());
@@ -631,22 +393,16 @@
listMonitoredUserContainerDTO.add(voteMonitoredUserDTO);
}
} else {
- VoteMonitoringAction.logger
- .debug("showUserEntriesBySession is true: the case with learner export portfolio");
- VoteMonitoringAction.logger
- .debug("show user entries by same content and same session and same user");
+ //showUserEntriesBySession is true: the case with learner export portfolio
+ //show user entries by same content and same session and same user
String userSessionId = voteUsrAttempt.getVoteQueUsr().getVoteSession().getVoteSessionId()
.toString();
- VoteMonitoringAction.logger.debug("userSessionId versus currentSessionId: " + userSessionId
- + " versus " + currentSessionId);
if (showUserEntriesByUserId == true) {
if (voteContent.getUid().toString().equals(localUserSession.getVoteContentId().toString())) {
- VoteMonitoringAction.logger.debug("showUserEntriesByUserId is true");
if (userSessionId.equals(currentSessionId)) {
String localUserId = voteUsrAttempt.getVoteQueUsr().getQueUsrId().toString();
if (userId.equals(localUserId)) {
- VoteMonitoringAction.logger.debug("this is requested by user id: " + userId);
voteMonitoredUserDTO.setAttemptTime(voteUsrAttempt.getAttemptTime());
voteMonitoredUserDTO.setTimeZone(voteUsrAttempt.getTimeZone());
voteMonitoredUserDTO.setUserName(voteUsrAttempt.getVoteQueUsr().getFullname());
@@ -657,30 +413,18 @@
voteMonitoredUserDTO.setUid(voteUsrAttempt.getUid().toString());
voteMonitoredUserDTO.setVisible(new Boolean(voteUsrAttempt.isVisible())
.toString());
- VoteMonitoringAction.logger
- .debug("overriding the nomination text with 'Nomination Hidden' if needed");
- VoteMonitoringAction.logger.debug("is entry visible: "
- + voteUsrAttempt.isVisible());
if (voteUsrAttempt.isVisible() == false) {
voteMonitoredAnswersDTO.setQuestion("Nomination Hidden");
- VoteMonitoringAction.logger.debug("overwrote the nomination text");
}
}
}
}
} else {
- VoteMonitoringAction.logger.debug("showUserEntriesByUserId is false");
- VoteMonitoringAction.logger.debug("show user entries by same content and same session");
- VoteMonitoringAction.logger
- .debug("voteContent.getVoteContentId() versus localUserSession.getVoteContentId().toString(): "
- + voteContent.getVoteContentId()
- + " versus "
- + localUserSession.getVoteContentId());
+ //showUserEntriesByUserId is false
+ //show user entries by same content and same session
if (voteContent.getUid().toString().equals(localUserSession.getVoteContentId().toString())) {
if (userSessionId.equals(currentSessionId)) {
- VoteMonitoringAction.logger.debug("this is requested by session id: "
- + currentSessionId);
voteMonitoredUserDTO.setAttemptTime(voteUsrAttempt.getAttemptTime());
voteMonitoredUserDTO.setTimeZone(voteUsrAttempt.getTimeZone());
voteMonitoredUserDTO.setUserName(voteUsrAttempt.getVoteQueUsr().getFullname());
@@ -697,65 +441,43 @@
}
- VoteMonitoringAction.logger.debug("final listMonitoredUserContainerDTO: "
- + listMonitoredUserContainerDTO);
-
- VoteMonitoringAction.logger.debug("final listMonitoredUserContainerDTO size: "
- + listMonitoredUserContainerDTO.size());
if (listMonitoredUserContainerDTO.size() > 0) {
- VoteMonitoringAction.logger.debug("adding user entry's data");
Map mapMonitoredUserContainerDTO = MonitoringUtil
.convertToVoteMonitoredUserDTOMap(listMonitoredUserContainerDTO);
- VoteMonitoringAction.logger.debug("final user entry mapMonitoredUserContainerDTO:..."
- + mapMonitoredUserContainerDTO);
voteMonitoredAnswersDTO.setQuestionAttempts(mapMonitoredUserContainerDTO);
listUserEntries.add(voteMonitoredAnswersDTO);
}
}
}
- VoteMonitoringAction.logger.debug("finish getting user entries: " + listUserEntries);
return listUserEntries;
}
public void initSummaryContent(String toolContentID, HttpServletRequest request, IVoteService voteService,
VoteGeneralMonitoringDTO voteGeneralMonitoringDTO) throws IOException, ServletException {
- VoteMonitoringAction.logger.debug("start initSummaryContent...toolContentID: " + toolContentID);
- VoteMonitoringAction.logger.debug("dispatching getSummary...voteGeneralMonitoringDTO:"
- + voteGeneralMonitoringDTO);
-
- VoteMonitoringAction.logger.debug("voteService: " + voteService);
- VoteMonitoringAction.logger.debug("toolContentID: " + toolContentID);
-
VoteContent voteContent = voteService.retrieveVote(new Long(toolContentID));
- VoteMonitoringAction.logger.debug("existing voteContent:" + voteContent);
/* this section is related to summary tab. Starts here. */
Map summaryToolSessions = MonitoringUtil.populateToolSessions(request, voteContent, voteService);
- VoteMonitoringAction.logger.debug("summaryToolSessions: " + summaryToolSessions);
voteGeneralMonitoringDTO.setSummaryToolSessions(summaryToolSessions);
Map summaryToolSessionsId = MonitoringUtil.populateToolSessionsId(request, voteContent, voteService);
- VoteMonitoringAction.logger.debug("summaryToolSessionsId: " + summaryToolSessionsId);
voteGeneralMonitoringDTO.setSummaryToolSessionsId(summaryToolSessionsId);
/* ends here. */
/* true means there is at least 1 response */
if (voteService.studentActivityOccurredStandardAndOpen(voteContent)) {
voteGeneralMonitoringDTO.setUserExceptionNoToolSessions(new Boolean(false).toString());
- VoteMonitoringAction.logger.debug("USER_EXCEPTION_NO_TOOL_SESSIONS is set to false");
} else {
voteGeneralMonitoringDTO.setUserExceptionNoToolSessions(new Boolean(true).toString());
- VoteMonitoringAction.logger.debug("USER_EXCEPTION_NO_TOOL_SESSIONS is set to true");
}
// prepareReflectionData(request, voteContent, voteService, null,false);
prepareReflectionData(request, voteContent, voteService, null, false, "All");
EditActivityDTO editActivityDTO = new EditActivityDTO();
boolean isContentInUse = VoteUtils.isContentInUse(voteContent);
- VoteMonitoringAction.logger.debug("isContentInUse:" + isContentInUse);
if (isContentInUse == true) {
editActivityDTO.setMonitoredContentInUse(new Boolean(true).toString());
}
@@ -766,29 +488,24 @@
voteGeneralMonitoringDTO.setOfflineInstructions(voteContent.getOfflineInstructions());
List attachmentList = voteService.retrieveVoteUploadedFiles(voteContent);
- VoteMonitoringAction.logger.debug("attachmentList: " + attachmentList);
voteGeneralMonitoringDTO.setAttachmentList(attachmentList);
voteGeneralMonitoringDTO.setDeletedAttachmentList(new ArrayList());
/** ...till here * */
voteGeneralMonitoringDTO.setCurrentMonitoringTab("summary");
- VoteMonitoringAction.logger.debug("end of refreshSummaryData, voteGeneralMonitoringDTO"
- + voteGeneralMonitoringDTO);
request.setAttribute(VoteAppConstants.VOTE_GENERAL_MONITORING_DTO, voteGeneralMonitoringDTO);
/* find out if there are any reflection entries, from here */
boolean notebookEntriesExist = MonitoringUtil.notebookEntriesExist(voteService, voteContent);
- VoteMonitoringAction.logger.debug("notebookEntriesExist : " + notebookEntriesExist);
if (notebookEntriesExist) {
request.setAttribute(VoteAppConstants.NOTEBOOK_ENTRIES_EXIST, new Boolean(true).toString());
String userExceptionNoToolSessions = voteGeneralMonitoringDTO.getUserExceptionNoToolSessions();
- VoteMonitoringAction.logger.debug("userExceptionNoToolSessions : " + userExceptionNoToolSessions);
if (userExceptionNoToolSessions.equals("true")) {
- VoteMonitoringAction.logger.debug("there are no online student activity but there are reflections : ");
+ //there are no online student activity but there are reflections
request.setAttribute(VoteAppConstants.NO_SESSIONS_NOTEBOOK_ENTRIES_EXIST, new Boolean(true).toString());
}
} else {
@@ -798,36 +515,25 @@
MonitoringUtil.buildVoteStatsDTO(request, voteService, voteContent);
- VoteMonitoringAction.logger.debug("end initSummaryContent...");
}
public void initStatsContent(String toolContentID, HttpServletRequest request, IVoteService voteService,
VoteGeneralMonitoringDTO voteGeneralMonitoringDTO) throws IOException, ServletException {
- VoteMonitoringAction.logger.debug("starting initStatsContent...:" + toolContentID);
- VoteMonitoringAction.logger.debug("dispatching getStats..." + request);
- VoteMonitoringAction.logger.debug("voteService: " + voteService);
-
VoteContent voteContent = voteService.retrieveVote(new Long(toolContentID));
- VoteMonitoringAction.logger.debug("existing voteContent:" + voteContent);
if (voteService.studentActivityOccurredStandardAndOpen(voteContent)) {
voteGeneralMonitoringDTO.setUserExceptionNoToolSessions(new Boolean(false).toString());
- VoteMonitoringAction.logger.debug("USER_EXCEPTION_NO_TOOL_SESSIONS is set to false");
} else {
voteGeneralMonitoringDTO.setUserExceptionNoToolSessions(new Boolean(true).toString());
- VoteMonitoringAction.logger.debug("USER_EXCEPTION_NO_TOOL_SESSIONS is set to true");
}
refreshStatsData(request, voteService, voteGeneralMonitoringDTO);
- VoteMonitoringAction.logger.debug("post refreshStatsData, voteGeneralMonitoringDTO: "
- + voteGeneralMonitoringDTO);
// prepareReflectionData(request, voteContent, voteService, null,false);
prepareReflectionData(request, voteContent, voteService, null, false, "All");
EditActivityDTO editActivityDTO = new EditActivityDTO();
boolean isContentInUse = VoteUtils.isContentInUse(voteContent);
- VoteMonitoringAction.logger.debug("isContentInUse:" + isContentInUse);
if (isContentInUse == true) {
editActivityDTO.setMonitoredContentInUse(new Boolean(true).toString());
}
@@ -838,29 +544,24 @@
voteGeneralMonitoringDTO.setOfflineInstructions(voteContent.getOfflineInstructions());
List attachmentList = voteService.retrieveVoteUploadedFiles(voteContent);
- VoteMonitoringAction.logger.debug("attachmentList: " + attachmentList);
voteGeneralMonitoringDTO.setAttachmentList(attachmentList);
voteGeneralMonitoringDTO.setDeletedAttachmentList(new ArrayList());
/** ...till here * */
voteGeneralMonitoringDTO.setCurrentMonitoringTab("stats");
- VoteMonitoringAction.logger.debug("end of refreshSummaryData, voteGeneralMonitoringDTO"
- + voteGeneralMonitoringDTO);
request.setAttribute(VoteAppConstants.VOTE_GENERAL_MONITORING_DTO, voteGeneralMonitoringDTO);
/* find out if there are any reflection entries, from here */
boolean notebookEntriesExist = MonitoringUtil.notebookEntriesExist(voteService, voteContent);
- VoteMonitoringAction.logger.debug("notebookEntriesExist : " + notebookEntriesExist);
if (notebookEntriesExist) {
request.setAttribute(VoteAppConstants.NOTEBOOK_ENTRIES_EXIST, new Boolean(true).toString());
String userExceptionNoToolSessions = voteGeneralMonitoringDTO.getUserExceptionNoToolSessions();
- VoteMonitoringAction.logger.debug("userExceptionNoToolSessions : " + userExceptionNoToolSessions);
if (userExceptionNoToolSessions.equals("true")) {
- VoteMonitoringAction.logger.debug("there are no online student activity but there are reflections : ");
+ //there are no online student activity but there are reflections
request.setAttribute(VoteAppConstants.NO_SESSIONS_NOTEBOOK_ENTRIES_EXIST, new Boolean(true).toString());
}
} else {
@@ -869,42 +570,30 @@
/* ... till here */
MonitoringUtil.buildVoteStatsDTO(request, voteService, voteContent);
-
- VoteMonitoringAction.logger.debug("ending initStatsContent...");
}
public void refreshStatsData(HttpServletRequest request, IVoteService voteService,
VoteGeneralMonitoringDTO voteGeneralMonitoringDTO) {
- VoteMonitoringAction.logger.debug("starting refreshStatsData: " + voteService);
/* it is possible that no users has ever logged in for the activity yet */
if (voteService == null) {
- VoteMonitoringAction.logger.debug("will retrieve voteService");
voteService = VoteServiceProxy.getVoteService(getServlet().getServletContext());
- VoteMonitoringAction.logger.debug("retrieving voteService from session: " + voteService);
}
int countAllUsers = voteService.getTotalNumberOfUsers();
- VoteMonitoringAction.logger.debug("countAllUsers: " + countAllUsers);
-
if (countAllUsers == 0) {
- VoteMonitoringAction.logger.debug("error: countAllUsers is 0");
voteGeneralMonitoringDTO.setUserExceptionNoStudentActivity(new Boolean(true).toString());
}
voteGeneralMonitoringDTO.setCountAllUsers(new Integer(countAllUsers).toString());
int countSessionComplete = voteService.countSessionComplete();
- VoteMonitoringAction.logger.debug("countSessionComplete: " + countSessionComplete);
voteGeneralMonitoringDTO.setCountSessionComplete(new Integer(countSessionComplete).toString());
- VoteMonitoringAction.logger.debug("end of refreshStatsData, voteGeneralMonitoringDTO"
- + voteGeneralMonitoringDTO);
request.setAttribute(VoteAppConstants.VOTE_GENERAL_MONITORING_DTO, voteGeneralMonitoringDTO);
}
/**
- * calls learning action endLearning functionality ActionForward endLearning(ActionMapping mapping, ActionForm form,
- * HttpServletRequest request, HttpServletResponse response) throws IOException, ServletException, ToolException
+ * calls learning action endLearning functionality
*
* @param mapping
* @param form
@@ -917,13 +606,8 @@
*/
public ActionForward endLearning(ActionMapping mapping, ActionForm form, HttpServletRequest request,
HttpServletResponse response) throws IOException, ServletException, ToolException {
- VoteMonitoringAction.logger.debug("dispatching proxy endLearning to learning module...");
-
IVoteService voteService = VoteServiceProxy.getVoteService(getServlet().getServletContext());
- VoteMonitoringAction.logger.debug("voteService :" + voteService);
-
VoteMonitoringForm voteMonitoringForm = (VoteMonitoringForm) form;
- VoteMonitoringAction.logger.debug("voteMonitoringForm :" + voteMonitoringForm);
voteMonitoringForm.setVoteService(voteService);
VoteGeneralMonitoringDTO voteGeneralMonitoringDTO = new VoteGeneralMonitoringDTO();
@@ -936,64 +620,35 @@
public ActionForward viewOpenVotes(ActionMapping mapping, ActionForm form, HttpServletRequest request,
HttpServletResponse response) throws IOException, ServletException, ToolException {
- VoteMonitoringAction.logger.debug("dispatching viewOpenVotes...");
-
IVoteService voteService = VoteServiceProxy.getVoteService(getServlet().getServletContext());
- VoteMonitoringAction.logger.debug("voteService :" + voteService);
-
VoteMonitoringForm voteMonitoringForm = (VoteMonitoringForm) form;
- VoteMonitoringAction.logger.debug("voteMonitoringForm :" + voteMonitoringForm);
voteMonitoringForm.setVoteService(voteService);
VoteGeneralMonitoringDTO voteGeneralMonitoringDTO = new VoteGeneralMonitoringDTO();
repopulateRequestParameters(request, voteMonitoringForm, voteGeneralMonitoringDTO);
if (voteService == null) {
- VoteMonitoringAction.logger.debug("will retrieve voteService");
voteService = VoteServiceProxy.getVoteService(getServlet().getServletContext());
}
- VoteMonitoringAction.logger.debug("voteService: " + voteService);
voteMonitoringForm.setShowOpenVotesSection(new Boolean(true).toString());
voteGeneralMonitoringDTO.setShowOpenVotesSection(new Boolean(true).toString());
- VoteMonitoringAction.logger.debug("showOpen votes set to true: ");
-
String toolContentID = voteMonitoringForm.getToolContentID();
- VoteMonitoringAction.logger.debug("toolContentID: " + toolContentID);
-
VoteContent voteContent = voteService.retrieveVote(new Long(toolContentID));
- VoteMonitoringAction.logger.debug("existing voteContent:" + voteContent);
-
String currentMonitoredToolSession = voteMonitoringForm.getSelectedToolSessionId();
- VoteMonitoringAction.logger.debug("currentMonitoredToolSession: " + currentMonitoredToolSession);
-
refreshSummaryData(request, voteContent, voteService, true, false, currentMonitoredToolSession, null, true,
null, voteGeneralMonitoringDTO, null);
initSummaryContent(toolContentID, request, voteService, voteGeneralMonitoringDTO);
- VoteMonitoringAction.logger.debug("post initSummaryContent, voteGeneralMonitoringDTO: "
- + voteGeneralMonitoringDTO);
- VoteMonitoringAction.logger.debug("calling initInstructionsContent.");
- VoteMonitoringAction.logger.debug("post initInstructionsContent, voteGeneralMonitoringDTO: "
- + voteGeneralMonitoringDTO);
-
- VoteMonitoringAction.logger.debug("calling initStatsContent.");
initStatsContent(toolContentID, request, voteService, voteGeneralMonitoringDTO);
- VoteMonitoringAction.logger.debug("post initStatsContent, voteGeneralMonitoringDTO: "
- + voteGeneralMonitoringDTO);
-
if (voteService.studentActivityOccurredGlobal(voteContent)) {
- VoteMonitoringAction.logger.debug("USER_EXCEPTION_NO_TOOL_SESSIONS is set to false");
voteGeneralMonitoringDTO.setUserExceptionNoToolSessions(new Boolean(false).toString());
} else {
- VoteMonitoringAction.logger.debug("USER_EXCEPTION_NO_TOOL_SESSIONS is set to true");
voteGeneralMonitoringDTO.setUserExceptionNoToolSessions(new Boolean(true).toString());
}
-
- VoteMonitoringAction.logger.debug("voteGeneralMonitoringDTO: " + voteGeneralMonitoringDTO);
request.setAttribute(VoteAppConstants.VOTE_GENERAL_MONITORING_DTO, voteGeneralMonitoringDTO);
if (currentMonitoredToolSession.equals("All")) {
@@ -1010,13 +665,10 @@
voteGeneralMonitoringDTO.setOfflineInstructions(voteContent.getOfflineInstructions());
List attachmentList = voteService.retrieveVoteUploadedFiles(voteContent);
- VoteMonitoringAction.logger.debug("attachmentList: " + attachmentList);
voteGeneralMonitoringDTO.setAttachmentList(attachmentList);
voteGeneralMonitoringDTO.setDeletedAttachmentList(new ArrayList());
/** ...till here * */
- VoteMonitoringAction.logger.debug("ending editActivityQuestions, voteGeneralMonitoringDTO: "
- + voteGeneralMonitoringDTO);
request.setAttribute(VoteAppConstants.VOTE_GENERAL_MONITORING_DTO, voteGeneralMonitoringDTO);
if (voteContent != null) {
@@ -1025,7 +677,6 @@
EditActivityDTO editActivityDTO = new EditActivityDTO();
boolean isContentInUse = VoteUtils.isContentInUse(voteContent);
- VoteMonitoringAction.logger.debug("isContentInUse:" + isContentInUse);
if (isContentInUse == true) {
editActivityDTO.setMonitoredContentInUse(new Boolean(true).toString());
}
@@ -1034,24 +685,20 @@
EditActivityDTO editActivityDTO = new EditActivityDTO();
boolean isContentInUse = VoteUtils.isContentInUse(voteContent);
- VoteMonitoringAction.logger.debug("isContentInUse:" + isContentInUse);
if (isContentInUse == true) {
editActivityDTO.setMonitoredContentInUse(new Boolean(true).toString());
}
request.setAttribute(VoteAppConstants.EDIT_ACTIVITY_DTO, editActivityDTO);
/* find out if there are any reflection entries, from here */
boolean notebookEntriesExist = MonitoringUtil.notebookEntriesExist(voteService, voteContent);
- VoteMonitoringAction.logger.debug("notebookEntriesExist : " + notebookEntriesExist);
if (notebookEntriesExist) {
request.setAttribute(VoteAppConstants.NOTEBOOK_ENTRIES_EXIST, new Boolean(true).toString());
String userExceptionNoToolSessions = voteGeneralMonitoringDTO.getUserExceptionNoToolSessions();
- VoteMonitoringAction.logger.debug("userExceptionNoToolSessions : " + userExceptionNoToolSessions);
-
if (userExceptionNoToolSessions.equals("true")) {
- VoteMonitoringAction.logger.debug("there are no online student activity but there are reflections : ");
+ //there are no online student activity but there are reflections
request.setAttribute(VoteAppConstants.NO_SESSIONS_NOTEBOOK_ENTRIES_EXIST, new Boolean(true).toString());
}
} else {
@@ -1061,8 +708,6 @@
MonitoringUtil.buildVoteStatsDTO(request, voteService, voteContent);
- VoteMonitoringAction.logger.debug("currentMonitoredToolSession: " + currentMonitoredToolSession);
-
if (currentMonitoredToolSession.equals("")) {
currentMonitoredToolSession = "All";
}
@@ -1073,22 +718,14 @@
request.setAttribute(VoteAppConstants.SELECTION_CASE, new Long(1));
}
- VoteMonitoringAction.logger.debug("SELECTION_CASE: " + request.getAttribute(VoteAppConstants.SELECTION_CASE));
-
- VoteMonitoringAction.logger
- .debug("ending viewOpenVotes, voteGeneralMonitoringDTO: " + voteGeneralMonitoringDTO);
- VoteMonitoringAction.logger.debug("fwd'ing to LOAD_MONITORING: " + VoteAppConstants.LOAD_MONITORING);
return mapping.findForward(VoteAppConstants.LOAD_MONITORING);
}
public ActionForward closeOpenVotes(ActionMapping mapping, ActionForm form, HttpServletRequest request,
HttpServletResponse response) throws IOException, ServletException, ToolException {
- VoteMonitoringAction.logger.debug("dispatching closeOpenVotes...");
IVoteService voteService = VoteServiceProxy.getVoteService(getServlet().getServletContext());
- VoteMonitoringAction.logger.debug("voteService :" + voteService);
VoteMonitoringForm voteMonitoringForm = (VoteMonitoringForm) form;
- VoteMonitoringAction.logger.debug("voteMonitoringForm :" + voteMonitoringForm);
voteMonitoringForm.setVoteService(voteService);
VoteGeneralMonitoringDTO voteGeneralMonitoringDTO = new VoteGeneralMonitoringDTO();
@@ -1098,35 +735,16 @@
voteMonitoringForm.setShowOpenVotesSection(new Boolean(false).toString());
voteGeneralMonitoringDTO.setShowOpenVotesSection(new Boolean(false).toString());
- VoteMonitoringAction.logger.debug("showOpen votes set to false: ");
-
String toolContentID = voteMonitoringForm.getToolContentID();
- VoteMonitoringAction.logger.debug("toolContentID: " + toolContentID);
-
initSummaryContent(toolContentID, request, voteService, voteGeneralMonitoringDTO);
- VoteMonitoringAction.logger.debug("post initSummaryContent, voteGeneralMonitoringDTO: "
- + voteGeneralMonitoringDTO);
-
- VoteMonitoringAction.logger.debug("calling initInstructionsContent.");
- VoteMonitoringAction.logger.debug("post initInstructionsContent, voteGeneralMonitoringDTO: "
- + voteGeneralMonitoringDTO);
-
- VoteMonitoringAction.logger.debug("calling initStatsContent.");
initStatsContent(toolContentID, request, voteService, voteGeneralMonitoringDTO);
- VoteMonitoringAction.logger.debug("post initStatsContent, voteGeneralMonitoringDTO: "
- + voteGeneralMonitoringDTO);
-
voteGeneralMonitoringDTO.setIsMonitoredContentInUse(new Boolean(true).toString());
VoteContent voteContent = voteService.retrieveVote(new Long(toolContentID));
- VoteMonitoringAction.logger.debug("existing voteContent:" + voteContent);
-
if (voteContent != null) {
if (voteService.studentActivityOccurredGlobal(voteContent)) {
- VoteMonitoringAction.logger.debug("USER_EXCEPTION_NO_TOOL_SESSIONS is set to false");
voteGeneralMonitoringDTO.setUserExceptionNoToolSessions(new Boolean(false).toString());
} else {
- VoteMonitoringAction.logger.debug("USER_EXCEPTION_NO_TOOL_SESSIONS is set to true");
voteGeneralMonitoringDTO.setUserExceptionNoToolSessions(new Boolean(true).toString());
}
}
@@ -1136,12 +754,10 @@
voteGeneralMonitoringDTO.setOfflineInstructions(voteContent.getOfflineInstructions());
List attachmentList = voteService.retrieveVoteUploadedFiles(voteContent);
- VoteMonitoringAction.logger.debug("attachmentList: " + attachmentList);
voteGeneralMonitoringDTO.setAttachmentList(attachmentList);
voteGeneralMonitoringDTO.setDeletedAttachmentList(new ArrayList());
/** ...till here * */
- VoteMonitoringAction.logger.debug("voteGeneralMonitoringDTO: " + voteGeneralMonitoringDTO);
request.setAttribute(VoteAppConstants.VOTE_GENERAL_MONITORING_DTO, voteGeneralMonitoringDTO);
if (voteContent != null) {
@@ -1150,7 +766,6 @@
EditActivityDTO editActivityDTO = new EditActivityDTO();
boolean isContentInUse = VoteUtils.isContentInUse(voteContent);
- VoteMonitoringAction.logger.debug("isContentInUse:" + isContentInUse);
if (isContentInUse == true) {
editActivityDTO.setMonitoredContentInUse(new Boolean(true).toString());
}
@@ -1159,24 +774,20 @@
EditActivityDTO editActivityDTO = new EditActivityDTO();
boolean isContentInUse = VoteUtils.isContentInUse(voteContent);
- VoteMonitoringAction.logger.debug("isContentInUse:" + isContentInUse);
if (isContentInUse == true) {
editActivityDTO.setMonitoredContentInUse(new Boolean(true).toString());
}
request.setAttribute(VoteAppConstants.EDIT_ACTIVITY_DTO, editActivityDTO);
/* find out if there are any reflection entries, from here */
boolean notebookEntriesExist = MonitoringUtil.notebookEntriesExist(voteService, voteContent);
- VoteMonitoringAction.logger.debug("notebookEntriesExist : " + notebookEntriesExist);
if (notebookEntriesExist) {
request.setAttribute(VoteAppConstants.NOTEBOOK_ENTRIES_EXIST, new Boolean(true).toString());
String userExceptionNoToolSessions = voteGeneralMonitoringDTO.getUserExceptionNoToolSessions();
- VoteMonitoringAction.logger.debug("userExceptionNoToolSessions : " + userExceptionNoToolSessions);
if (userExceptionNoToolSessions.equals("true")) {
- VoteMonitoringAction.logger.debug("there are no online student activity but there are reflections : ");
request.setAttribute(VoteAppConstants.NO_SESSIONS_NOTEBOOK_ENTRIES_EXIST, new Boolean(true).toString());
}
} else {
@@ -1185,9 +796,6 @@
/* ... till here */
MonitoringUtil.buildVoteStatsDTO(request, voteService, voteContent);
- VoteMonitoringAction.logger.debug("ending closeOpenVotes, voteGeneralMonitoringDTO: "
- + voteGeneralMonitoringDTO);
-
String currentMonitoredToolSession = voteMonitoringForm.getSelectedToolSessionId();
if (currentMonitoredToolSession.equals("")) {
currentMonitoredToolSession = "All";
@@ -1199,58 +807,33 @@
request.setAttribute(VoteAppConstants.SELECTION_CASE, new Long(1));
}
- VoteMonitoringAction.logger.debug("SELECTION_CASE: " + request.getAttribute(VoteAppConstants.SELECTION_CASE));
-
return mapping.findForward(VoteAppConstants.LOAD_MONITORING);
}
public ActionForward hideOpenVote(ActionMapping mapping, ActionForm form, HttpServletRequest request,
HttpServletResponse response) throws IOException, ServletException, ToolException {
- VoteMonitoringAction.logger.debug("dispatching hideOpenVote...");
IVoteService voteService = VoteServiceProxy.getVoteService(getServlet().getServletContext());
- VoteMonitoringAction.logger.debug("voteService :" + voteService);
VoteMonitoringForm voteMonitoringForm = (VoteMonitoringForm) form;
- VoteMonitoringAction.logger.debug("voteMonitoringForm :" + voteMonitoringForm);
voteMonitoringForm.setVoteService(voteService);
VoteGeneralMonitoringDTO voteGeneralMonitoringDTO = new VoteGeneralMonitoringDTO();
repopulateRequestParameters(request, voteMonitoringForm, voteGeneralMonitoringDTO);
String currentUid = voteMonitoringForm.getCurrentUid();
- VoteMonitoringAction.logger.debug("currentUid: " + currentUid);
VoteUsrAttempt voteUsrAttempt = voteService.getAttemptByUID(new Long(currentUid));
- VoteMonitoringAction.logger.debug("voteUsrAttempt: " + voteUsrAttempt);
voteUsrAttempt.setVisible(false);
voteService.updateVoteUsrAttempt(voteUsrAttempt);
- VoteMonitoringAction.logger.debug("hiding the user entry : " + voteUsrAttempt.getUserEntry());
voteService.hideOpenVote(voteUsrAttempt);
String toolContentID = voteMonitoringForm.getToolContentID();
- VoteMonitoringAction.logger.debug("toolContentID: " + toolContentID);
-
VoteContent voteContent = voteService.retrieveVote(new Long(toolContentID));
- VoteMonitoringAction.logger.debug("existing voteContent:" + voteContent);
-
initSummaryContent(toolContentID, request, voteService, voteGeneralMonitoringDTO);
- VoteMonitoringAction.logger.debug("post initSummaryContent, voteGeneralMonitoringDTO: "
- + voteGeneralMonitoringDTO);
-
- VoteMonitoringAction.logger.debug("calling initInstructionsContent.");
- VoteMonitoringAction.logger.debug("post initInstructionsContent, voteGeneralMonitoringDTO: "
- + voteGeneralMonitoringDTO);
-
- VoteMonitoringAction.logger.debug("calling initStatsContent.");
initStatsContent(toolContentID, request, voteService, voteGeneralMonitoringDTO);
- VoteMonitoringAction.logger.debug("post initStatsContent, voteGeneralMonitoringDTO: "
- + voteGeneralMonitoringDTO);
-
String currentMonitoredToolSession = voteMonitoringForm.getSelectedToolSessionId();
- VoteMonitoringAction.logger.debug("currentMonitoredToolSession: " + currentMonitoredToolSession);
-
refreshSummaryData(request, voteContent, voteService, true, false, currentMonitoredToolSession, null, true,
null, voteGeneralMonitoringDTO, null);
@@ -1271,10 +854,8 @@
voteGeneralMonitoringDTO.setIsMonitoredContentInUse(new Boolean(true).toString());
if (voteService.studentActivityOccurredGlobal(voteContent)) {
- VoteMonitoringAction.logger.debug("USER_EXCEPTION_NO_TOOL_SESSIONS is set to false");
voteGeneralMonitoringDTO.setUserExceptionNoToolSessions(new Boolean(false).toString());
} else {
- VoteMonitoringAction.logger.debug("USER_EXCEPTION_NO_TOOL_SESSIONS is set to true");
voteGeneralMonitoringDTO.setUserExceptionNoToolSessions(new Boolean(true).toString());
}
@@ -1283,16 +864,12 @@
voteGeneralMonitoringDTO.setOfflineInstructions(voteContent.getOfflineInstructions());
List attachmentList = voteService.retrieveVoteUploadedFiles(voteContent);
- VoteMonitoringAction.logger.debug("attachmentList: " + attachmentList);
voteGeneralMonitoringDTO.setAttachmentList(attachmentList);
voteGeneralMonitoringDTO.setDeletedAttachmentList(new ArrayList());
/** ...till here * */
- VoteMonitoringAction.logger.debug("ending editActivityQuestions, voteGeneralMonitoringDTO: "
- + voteGeneralMonitoringDTO);
request.setAttribute(VoteAppConstants.VOTE_GENERAL_MONITORING_DTO, voteGeneralMonitoringDTO);
- VoteMonitoringAction.logger.debug("voteGeneralMonitoringDTO: " + voteGeneralMonitoringDTO);
request.setAttribute(VoteAppConstants.VOTE_GENERAL_MONITORING_DTO, voteGeneralMonitoringDTO);
if (voteContent != null) {
@@ -1301,7 +878,6 @@
EditActivityDTO editActivityDTO = new EditActivityDTO();
boolean isContentInUse = VoteUtils.isContentInUse(voteContent);
- VoteMonitoringAction.logger.debug("isContentInUse:" + isContentInUse);
if (isContentInUse == true) {
editActivityDTO.setMonitoredContentInUse(new Boolean(true).toString());
}
@@ -1310,16 +886,13 @@
/* find out if there are any reflection entries, from here */
boolean notebookEntriesExist = MonitoringUtil.notebookEntriesExist(voteService, voteContent);
- VoteMonitoringAction.logger.debug("notebookEntriesExist : " + notebookEntriesExist);
if (notebookEntriesExist) {
request.setAttribute(VoteAppConstants.NOTEBOOK_ENTRIES_EXIST, new Boolean(true).toString());
String userExceptionNoToolSessions = voteGeneralMonitoringDTO.getUserExceptionNoToolSessions();
- VoteMonitoringAction.logger.debug("userExceptionNoToolSessions : " + userExceptionNoToolSessions);
if (userExceptionNoToolSessions.equals("true")) {
- VoteMonitoringAction.logger.debug("there are no online student activity but there are reflections : ");
request.setAttribute(VoteAppConstants.NO_SESSIONS_NOTEBOOK_ENTRIES_EXIST, new Boolean(true).toString());
}
} else {
@@ -1329,57 +902,37 @@
MonitoringUtil.buildVoteStatsDTO(request, voteService, voteContent);
- VoteMonitoringAction.logger.debug("submitting session to refresh the data from the database: ");
return submitSession(mapping, form, request, response, voteService, getMessageService(),
voteGeneralMonitoringDTO);
}
public ActionForward showOpenVote(ActionMapping mapping, ActionForm form, HttpServletRequest request,
HttpServletResponse response) throws IOException, ServletException, ToolException {
- VoteMonitoringAction.logger.debug("dispatching showOpenVote...");
IVoteService voteService = VoteServiceProxy.getVoteService(getServlet().getServletContext());
- VoteMonitoringAction.logger.debug("voteService :" + voteService);
VoteMonitoringForm voteMonitoringForm = (VoteMonitoringForm) form;
- VoteMonitoringAction.logger.debug("voteMonitoringForm :" + voteMonitoringForm);
voteMonitoringForm.setVoteService(voteService);
VoteGeneralMonitoringDTO voteGeneralMonitoringDTO = new VoteGeneralMonitoringDTO();
repopulateRequestParameters(request, voteMonitoringForm, voteGeneralMonitoringDTO);
String currentUid = voteMonitoringForm.getCurrentUid();
- VoteMonitoringAction.logger.debug("currentUid: " + currentUid);
VoteUsrAttempt voteUsrAttempt = voteService.getAttemptByUID(new Long(currentUid));
- VoteMonitoringAction.logger.debug("voteUsrAttempt: " + voteUsrAttempt);
voteUsrAttempt.setVisible(true);
voteService.updateVoteUsrAttempt(voteUsrAttempt);
voteService.showOpenVote(voteUsrAttempt);
- VoteMonitoringAction.logger.debug("voteUsrAttempt: " + voteUsrAttempt);
String toolContentID = voteMonitoringForm.getToolContentID();
- VoteMonitoringAction.logger.debug("toolContentID: " + toolContentID);
VoteContent voteContent = voteService.retrieveVote(new Long(toolContentID));
- VoteMonitoringAction.logger.debug("existing voteContent:" + voteContent);
initSummaryContent(toolContentID, request, voteService, voteGeneralMonitoringDTO);
- VoteMonitoringAction.logger.debug("post initSummaryContent, voteGeneralMonitoringDTO: "
- + voteGeneralMonitoringDTO);
- VoteMonitoringAction.logger.debug("calling initInstructionsContent.");
- VoteMonitoringAction.logger.debug("post initInstructionsContent, voteGeneralMonitoringDTO: "
- + voteGeneralMonitoringDTO);
-
- VoteMonitoringAction.logger.debug("calling initStatsContent.");
initStatsContent(toolContentID, request, voteService, voteGeneralMonitoringDTO);
- VoteMonitoringAction.logger.debug("post initStatsContent, voteGeneralMonitoringDTO: "
- + voteGeneralMonitoringDTO);
-
String currentMonitoredToolSession = voteMonitoringForm.getSelectedToolSessionId();
- VoteMonitoringAction.logger.debug("currentMonitoredToolSession: " + currentMonitoredToolSession);
refreshSummaryData(request, voteContent, voteService, true, false, currentMonitoredToolSession, null, true,
null, voteGeneralMonitoringDTO, null);
@@ -1396,16 +949,12 @@
request.setAttribute(VoteAppConstants.SELECTION_CASE, new Long(1));
}
- VoteMonitoringAction.logger.debug("SELECTION_CASE: " + request.getAttribute(VoteAppConstants.SELECTION_CASE));
-
voteGeneralMonitoringDTO.setCurrentMonitoredToolSession(currentMonitoredToolSession);
voteGeneralMonitoringDTO.setIsMonitoredContentInUse(new Boolean(true).toString());
if (voteService.studentActivityOccurredGlobal(voteContent)) {
- VoteMonitoringAction.logger.debug("USER_EXCEPTION_NO_TOOL_SESSIONS is set to false");
voteGeneralMonitoringDTO.setUserExceptionNoToolSessions(new Boolean(false).toString());
} else {
- VoteMonitoringAction.logger.debug("USER_EXCEPTION_NO_TOOL_SESSIONS is set to true");
voteGeneralMonitoringDTO.setUserExceptionNoToolSessions(new Boolean(true).toString());
}
@@ -1414,12 +963,10 @@
voteGeneralMonitoringDTO.setOfflineInstructions(voteContent.getOfflineInstructions());
List attachmentList = voteService.retrieveVoteUploadedFiles(voteContent);
- VoteMonitoringAction.logger.debug("attachmentList: " + attachmentList);
voteGeneralMonitoringDTO.setAttachmentList(attachmentList);
voteGeneralMonitoringDTO.setDeletedAttachmentList(new ArrayList());
/** ...till here * */
- VoteMonitoringAction.logger.debug("voteGeneralMonitoringDTO: " + voteGeneralMonitoringDTO);
request.setAttribute(VoteAppConstants.VOTE_GENERAL_MONITORING_DTO, voteGeneralMonitoringDTO);
if (voteContent != null) {
@@ -1428,7 +975,6 @@
EditActivityDTO editActivityDTO = new EditActivityDTO();
boolean isContentInUse = VoteUtils.isContentInUse(voteContent);
- VoteMonitoringAction.logger.debug("isContentInUse:" + isContentInUse);
if (isContentInUse == true) {
editActivityDTO.setMonitoredContentInUse(new Boolean(true).toString());
}
@@ -1437,16 +983,12 @@
/* find out if there are any reflection entries, from here */
boolean notebookEntriesExist = MonitoringUtil.notebookEntriesExist(voteService, voteContent);
- VoteMonitoringAction.logger.debug("notebookEntriesExist : " + notebookEntriesExist);
-
if (notebookEntriesExist) {
request.setAttribute(VoteAppConstants.NOTEBOOK_ENTRIES_EXIST, new Boolean(true).toString());
String userExceptionNoToolSessions = voteGeneralMonitoringDTO.getUserExceptionNoToolSessions();
- VoteMonitoringAction.logger.debug("userExceptionNoToolSessions : " + userExceptionNoToolSessions);
if (userExceptionNoToolSessions.equals("true")) {
- VoteMonitoringAction.logger.debug("there are no online student activity but there are reflections : ");
request.setAttribute(VoteAppConstants.NO_SESSIONS_NOTEBOOK_ENTRIES_EXIST, new Boolean(true).toString());
}
} else {
@@ -1455,21 +997,16 @@
/* ... till here */
MonitoringUtil.buildVoteStatsDTO(request, voteService, voteContent);
-
- VoteMonitoringAction.logger.debug("submitting session to refresh the data from the database: ");
return submitSession(mapping, form, request, response, voteService, getMessageService(),
voteGeneralMonitoringDTO);
}
public ActionForward getVoteNomination(ActionMapping mapping, ActionForm form, HttpServletRequest request,
HttpServletResponse response) throws IOException, ServletException, ToolException {
- VoteMonitoringAction.logger.debug("dispatching getVoteNomination...");
IVoteService voteService = VoteServiceProxy.getVoteService(getServlet().getServletContext());
- VoteMonitoringAction.logger.debug("voteService :" + voteService);
VoteMonitoringForm voteMonitoringForm = (VoteMonitoringForm) form;
- VoteMonitoringAction.logger.debug("voteMonitoringForm :" + voteMonitoringForm);
voteMonitoringForm.setVoteService(voteService);
VoteGeneralMonitoringDTO voteGeneralMonitoringDTO = new VoteGeneralMonitoringDTO();
@@ -1478,12 +1015,8 @@
String questionUid = request.getParameter("questionUid");
String sessionUid = request.getParameter("sessionUid");
- VoteMonitoringAction.logger.debug("questionUid: " + questionUid);
- VoteMonitoringAction.logger.debug("sessionUid: " + sessionUid);
-
List userNames = voteService.getStandardAttemptUsersForQuestionContentAndSessionUid(new Long(questionUid),
new Long(sessionUid));
- VoteMonitoringAction.logger.debug("userNames: " + userNames);
List listVotedLearnersDTO = new LinkedList();
VoteContent voteContent = null;
@@ -1492,7 +1025,6 @@
VoteUsrAttempt voteUsrAttempt = (VoteUsrAttempt) userIterator.next();
if (voteUsrAttempt != null) {
- VoteMonitoringAction.logger.debug("used voteContent is: ");
voteContent = voteUsrAttempt.getVoteQueContent().getVoteContent();
}
@@ -1501,120 +1033,90 @@
voteMonitoredUserDTO.setAttemptTime(voteUsrAttempt.getAttemptTime());
listVotedLearnersDTO.add(voteMonitoredUserDTO);
}
- VoteMonitoringAction.logger.debug("listVoteAllSessionsDTO: " + listVotedLearnersDTO);
- VoteMonitoringAction.logger.debug("voteContent: " + voteContent);
-
EditActivityDTO editActivityDTO = new EditActivityDTO();
boolean isContentInUse = VoteUtils.isContentInUse(voteContent);
- VoteMonitoringAction.logger.debug("isContentInUse:" + isContentInUse);
if (isContentInUse == true) {
editActivityDTO.setMonitoredContentInUse(new Boolean(true).toString());
}
request.setAttribute(VoteAppConstants.EDIT_ACTIVITY_DTO, editActivityDTO);
voteGeneralMonitoringDTO.setMapStudentsVoted(listVotedLearnersDTO);
voteGeneralMonitoringDTO.setIsMonitoredContentInUse(new Boolean(true).toString());
- VoteMonitoringAction.logger.debug("ending getVoteNomination, voteGeneralMonitoringDTO: "
- + voteGeneralMonitoringDTO);
request.setAttribute(VoteAppConstants.VOTE_GENERAL_MONITORING_DTO, voteGeneralMonitoringDTO);
- VoteMonitoringAction.logger.debug("fdwing to: " + VoteAppConstants.VOTE_NOMINATION_VIEWER);
return mapping.findForward(VoteAppConstants.VOTE_NOMINATION_VIEWER);
}
public ActionForward openNotebook(ActionMapping mapping, ActionForm form, HttpServletRequest request,
HttpServletResponse response) throws IOException, ServletException, ToolException {
- VoteMonitoringAction.logger.debug("dispatching openNotebook...");
IVoteService VoteService = VoteServiceProxy.getVoteService(getServlet().getServletContext());
- VoteMonitoringAction.logger.debug("VoteService: " + VoteService);
String uid = request.getParameter("uid");
- VoteMonitoringAction.logger.debug("uid: " + uid);
String userId = request.getParameter("userId");
- VoteMonitoringAction.logger.debug("userId: " + userId);
String userName = request.getParameter("userName");
- VoteMonitoringAction.logger.debug("userName: " + userName);
String sessionId = request.getParameter("sessionId");
- VoteMonitoringAction.logger.debug("sessionId: " + sessionId);
NotebookEntry notebookEntry = VoteService.getEntry(new Long(sessionId), CoreNotebookConstants.NOTEBOOK_TOOL,
VoteAppConstants.MY_SIGNATURE, new Integer(userId));
- VoteMonitoringAction.logger.debug("notebookEntry: " + notebookEntry);
-
VoteGeneralLearnerFlowDTO voteGeneralLearnerFlowDTO = new VoteGeneralLearnerFlowDTO();
if (notebookEntry != null) {
String notebookEntryPresentable = VoteUtils.replaceNewLines(notebookEntry.getEntry());
voteGeneralLearnerFlowDTO.setNotebookEntry(notebookEntryPresentable);
voteGeneralLearnerFlowDTO.setUserName(userName);
}
-
- VoteMonitoringAction.logger.debug("voteGeneralLearnerFlowDTO: " + voteGeneralLearnerFlowDTO);
request.setAttribute(VoteAppConstants.VOTE_GENERAL_LEARNER_FLOW_DTO, voteGeneralLearnerFlowDTO);
- VoteMonitoringAction.logger.debug("fwding to : " + VoteAppConstants.LEARNER_NOTEBOOK);
return mapping.findForward(VoteAppConstants.LEARNER_NOTEBOOK);
}
protected void repopulateRequestParameters(HttpServletRequest request, VoteMonitoringForm voteMonitoringForm,
VoteGeneralMonitoringDTO voteGeneralMonitoringDTO) {
- VoteMonitoringAction.logger.debug("starting repopulateRequestParameters");
String toolContentID = request.getParameter(VoteAppConstants.TOOL_CONTENT_ID);
- VoteMonitoringAction.logger.debug("toolContentID: " + toolContentID);
voteMonitoringForm.setToolContentID(toolContentID);
voteGeneralMonitoringDTO.setToolContentID(toolContentID);
String activeModule = request.getParameter(VoteAppConstants.ACTIVE_MODULE);
- VoteMonitoringAction.logger.debug("activeModule: " + activeModule);
voteMonitoringForm.setActiveModule(activeModule);
voteGeneralMonitoringDTO.setActiveModule(activeModule);
String defineLaterInEditMode = request.getParameter(VoteAppConstants.DEFINE_LATER_IN_EDIT_MODE);
- VoteMonitoringAction.logger.debug("defineLaterInEditMode: " + defineLaterInEditMode);
voteMonitoringForm.setDefineLaterInEditMode(defineLaterInEditMode);
voteGeneralMonitoringDTO.setDefineLaterInEditMode(defineLaterInEditMode);
String isToolSessionChanged = request.getParameter(VoteAppConstants.IS_TOOL_SESSION_CHANGED);
- VoteMonitoringAction.logger.debug("isToolSessionChanged: " + isToolSessionChanged);
voteMonitoringForm.setIsToolSessionChanged(isToolSessionChanged);
voteGeneralMonitoringDTO.setIsToolSessionChanged(isToolSessionChanged);
String responseId = request.getParameter(VoteAppConstants.RESPONSE_ID);
- VoteMonitoringAction.logger.debug("responseId: " + responseId);
voteMonitoringForm.setResponseId(responseId);
voteGeneralMonitoringDTO.setResponseId(responseId);
String currentUid = request.getParameter(VoteAppConstants.CURRENT_UID);
- VoteMonitoringAction.logger.debug("currentUid: " + currentUid);
voteMonitoringForm.setCurrentUid(currentUid);
voteGeneralMonitoringDTO.setCurrentUid(currentUid);
}
protected void repopulateRequestParameters(HttpServletRequest request, VoteMonitoringForm voteMonitoringForm,
VoteGeneralAuthoringDTO voteGeneralAuthoringDTO) {
- VoteMonitoringAction.logger.debug("starting repopulateRequestParameters");
String contentFolderID = WebUtil.readStrParam(request, AttributeNames.PARAM_CONTENT_FOLDER_ID);
- VoteMonitoringAction.logger.debug("contentFolderID: " + contentFolderID);
voteMonitoringForm.setContentFolderID(contentFolderID);
voteGeneralAuthoringDTO.setContentFolderID(contentFolderID);
String toolContentID = request.getParameter(VoteAppConstants.TOOL_CONTENT_ID);
- VoteMonitoringAction.logger.debug("toolContentID: " + toolContentID);
voteMonitoringForm.setToolContentID(toolContentID);
voteGeneralAuthoringDTO.setToolContentID(toolContentID);
String activeModule = request.getParameter(VoteAppConstants.ACTIVE_MODULE);
- VoteMonitoringAction.logger.debug("activeModule: " + activeModule);
voteMonitoringForm.setActiveModule(activeModule);
voteGeneralAuthoringDTO.setActiveModule(activeModule);
String defineLaterInEditMode = request.getParameter(VoteAppConstants.DEFINE_LATER_IN_EDIT_MODE);
- VoteMonitoringAction.logger.debug("defineLaterInEditMode: " + defineLaterInEditMode);
voteMonitoringForm.setDefineLaterInEditMode(defineLaterInEditMode);
voteGeneralAuthoringDTO.setDefineLaterInEditMode(defineLaterInEditMode);
@@ -1634,13 +1136,10 @@
*/
public ActionForward editActivityQuestions(ActionMapping mapping, ActionForm form, HttpServletRequest request,
HttpServletResponse response) throws IOException, ServletException, ToolException {
- VoteMonitoringAction.logger.debug("dispatching editActivityQuestions...");
VoteMonitoringForm VoteMonitoringForm = (VoteMonitoringForm) form;
- VoteMonitoringAction.logger.debug("VoteMonitoringForm: " + VoteMonitoringForm);
IVoteService voteService = VoteServiceProxy.getVoteService(getServlet().getServletContext());
- VoteMonitoringAction.logger.debug("voteService: " + voteService);
VoteGeneralMonitoringDTO generalMonitoringDTO = new VoteGeneralMonitoringDTO();
@@ -1652,23 +1151,18 @@
generalMonitoringDTO.setDefineLaterInEditMode(new Boolean(true).toString());
- VoteMonitoringAction.logger.debug("final generalMonitoringDTO: " + generalMonitoringDTO);
request.setAttribute(VoteAppConstants.VOTE_GENERAL_MONITORING_DTO, generalMonitoringDTO);
String strToolContentID = request.getParameter(AttributeNames.PARAM_TOOL_CONTENT_ID);
- VoteMonitoringAction.logger.debug("strToolContentID: " + strToolContentID);
VoteMonitoringForm.setToolContentID(strToolContentID);
String contentFolderID = WebUtil.readStrParam(request, AttributeNames.PARAM_CONTENT_FOLDER_ID);
- VoteMonitoringAction.logger.debug("contentFolderID: " + contentFolderID);
VoteMonitoringForm.setContentFolderID(contentFolderID);
String httpSessionID = request.getParameter("httpSessionID");
- VoteMonitoringAction.logger.debug("httpSessionID: " + httpSessionID);
VoteMonitoringForm.setHttpSessionID(httpSessionID);
VoteContent voteContent = voteService.retrieveVote(new Long(strToolContentID));
- VoteMonitoringAction.logger.debug("existing voteContent:" + voteContent);
VoteMonitoringForm.setTitle(voteContent.getTitle());
@@ -1680,10 +1174,8 @@
prepareReflectionData(request, voteContent, voteService, null, false, "All");
if (voteService.studentActivityOccurredGlobal(voteContent)) {
- VoteMonitoringAction.logger.debug("USER_EXCEPTION_NO_TOOL_SESSIONS is set to false");
generalMonitoringDTO.setUserExceptionNoToolSessions(new Boolean(false).toString());
} else {
- VoteMonitoringAction.logger.debug("USER_EXCEPTION_NO_TOOL_SESSIONS is set to true");
generalMonitoringDTO.setUserExceptionNoToolSessions(new Boolean(true).toString());
}
@@ -1692,12 +1184,10 @@
generalMonitoringDTO.setOfflineInstructions(voteContent.getOfflineInstructions());
List attachmentList = voteService.retrieveVoteUploadedFiles(voteContent);
- VoteMonitoringAction.logger.debug("attachmentList: " + attachmentList);
generalMonitoringDTO.setAttachmentList(attachmentList);
generalMonitoringDTO.setDeletedAttachmentList(new ArrayList());
/** ...till here * */
- VoteMonitoringAction.logger.debug("final generalMonitoringDTO: " + generalMonitoringDTO);
request.setAttribute(VoteAppConstants.VOTE_GENERAL_MONITORING_DTO, generalMonitoringDTO);
List listNominationContentDTO = new LinkedList();
@@ -1708,16 +1198,11 @@
VoteQueContent voteQueContent = (VoteQueContent) queIterator.next();
if (voteQueContent != null) {
- VoteMonitoringAction.logger.debug("question: " + voteQueContent.getQuestion());
- VoteMonitoringAction.logger.debug("displayorder: "
- + new Integer(voteQueContent.getDisplayOrder()).toString());
-
voteNominationContentDTO.setQuestion(voteQueContent.getQuestion());
voteNominationContentDTO.setDisplayOrder(new Integer(voteQueContent.getDisplayOrder()).toString());
listNominationContentDTO.add(voteNominationContentDTO);
}
}
- VoteMonitoringAction.logger.debug("listNominationContentDTO: " + listNominationContentDTO);
request.setAttribute(VoteAppConstants.LIST_NOMINATION_CONTENT_DTO, listNominationContentDTO);
request.setAttribute(VoteAppConstants.TOTAL_NOMINATION_COUNT, new Integer(listNominationContentDTO.size()));
@@ -1734,16 +1219,12 @@
/* find out if there are any reflection entries, from here */
boolean notebookEntriesExist = MonitoringUtil.notebookEntriesExist(voteService, voteContent);
- VoteMonitoringAction.logger.debug("notebookEntriesExist : " + notebookEntriesExist);
-
if (notebookEntriesExist) {
request.setAttribute(VoteAppConstants.NOTEBOOK_ENTRIES_EXIST, new Boolean(true).toString());
String userExceptionNoToolSessions = generalMonitoringDTO.getUserExceptionNoToolSessions();
- VoteMonitoringAction.logger.debug(": " + userExceptionNoToolSessions);
if (userExceptionNoToolSessions.equals("true")) {
- VoteMonitoringAction.logger.debug("there are no online student activity but there are reflections : ");
request.setAttribute(VoteAppConstants.NO_SESSIONS_NOTEBOOK_ENTRIES_EXIST, new Boolean(true).toString());
}
} else {
@@ -1758,7 +1239,6 @@
}
public void prepareEditActivityScreenData(HttpServletRequest request, VoteContent voteContent) {
- VoteMonitoringAction.logger.debug("starting prepareEditActivityScreenData: " + voteContent);
VoteGeneralAuthoringDTO voteGeneralAuthoringDTO = new VoteGeneralAuthoringDTO();
if (voteContent.getTitle() == null) {
@@ -1773,13 +1253,11 @@
voteGeneralAuthoringDTO.setActivityInstructions(voteContent.getInstructions());
}
- VoteMonitoringAction.logger.debug("final voteGeneralAuthoringDTO: " + voteGeneralAuthoringDTO);
request.setAttribute(VoteAppConstants.VOTE_GENERAL_AUTHORING_DTO, voteGeneralAuthoringDTO);
}
/**
- * submits content into the tool database ActionForward submitAllContent(ActionMapping mapping, ActionForm form,
- * HttpServletRequest request, HttpServletResponse response) throws IOException, ServletException
+ * submits content into the tool database
*
* @param mapping
* @param form
@@ -1791,64 +1269,42 @@
*/
public ActionForward submitAllContent(ActionMapping mapping, ActionForm form, HttpServletRequest request,
HttpServletResponse response) throws IOException, ServletException {
-
- VoteMonitoringAction.logger.debug("dispathcing submitAllContent :" + form);
-
VoteMonitoringForm voteAuthoringForm = (VoteMonitoringForm) form;
IVoteService voteService = VoteServiceProxy.getVoteService(getServlet().getServletContext());
- VoteMonitoringAction.logger.debug("voteService: " + voteService);
String httpSessionID = voteAuthoringForm.getHttpSessionID();
- VoteMonitoringAction.logger.debug("httpSessionID: " + httpSessionID);
SessionMap sessionMap = (SessionMap) request.getSession().getAttribute(httpSessionID);
- VoteMonitoringAction.logger.debug("sessionMap: " + sessionMap);
String contentFolderID = WebUtil.readStrParam(request, AttributeNames.PARAM_CONTENT_FOLDER_ID);
- VoteMonitoringAction.logger.debug("contentFolderID: " + contentFolderID);
voteAuthoringForm.setContentFolderID(contentFolderID);
String activeModule = request.getParameter(VoteAppConstants.ACTIVE_MODULE);
- VoteMonitoringAction.logger.debug("activeModule: " + activeModule);
String strToolContentID = request.getParameter(AttributeNames.PARAM_TOOL_CONTENT_ID);
- VoteMonitoringAction.logger.debug("strToolContentID: " + strToolContentID);
-
String defaultContentIdStr = request.getParameter(VoteAppConstants.DEFAULT_CONTENT_ID_STR);
- VoteMonitoringAction.logger.debug("defaultContentIdStr: " + defaultContentIdStr);
-
List listNominationContentDTO = (List) sessionMap.get(VoteAppConstants.LIST_NOMINATION_CONTENT_DTO_KEY);
- VoteMonitoringAction.logger.debug("listNominationContentDTO: " + listNominationContentDTO);
-
Map mapNominationContent = AuthoringUtil.extractMapNominationContent(listNominationContentDTO);
- VoteMonitoringAction.logger.debug("extracted mapNominationContent: " + mapNominationContent);
Map mapFeedback = AuthoringUtil.extractMapFeedback(listNominationContentDTO);
- VoteMonitoringAction.logger.debug("extracted mapFeedback: " + mapFeedback);
ActionMessages errors = new ActionMessages();
- VoteMonitoringAction.logger.debug("mapNominationContent size: " + mapNominationContent.size());
if (mapNominationContent.size() == 0) {
ActionMessage error = new ActionMessage("nominations.none.submitted");
errors.add(ActionMessages.GLOBAL_MESSAGE, error);
}
- VoteMonitoringAction.logger.debug("errors: " + errors);
AuthoringUtil authoringUtil = new AuthoringUtil();
VoteGeneralAuthoringDTO voteGeneralAuthoringDTO = new VoteGeneralAuthoringDTO();
- VoteMonitoringAction.logger.debug("activeModule: " + activeModule);
voteGeneralAuthoringDTO.setContentFolderID(contentFolderID);
String richTextTitle = request.getParameter(VoteAppConstants.TITLE);
String richTextInstructions = request.getParameter(VoteAppConstants.INSTRUCTIONS);
- VoteMonitoringAction.logger.debug("richTextTitle: " + richTextTitle);
- VoteMonitoringAction.logger.debug("richTextInstructions: " + richTextInstructions);
-
voteGeneralAuthoringDTO.setActivityTitle(richTextTitle);
voteAuthoringForm.setTitle(richTextTitle);
@@ -1858,20 +1314,10 @@
sessionMap.put(VoteAppConstants.ACTIVITY_INSTRUCTIONS_KEY, richTextInstructions);
voteGeneralAuthoringDTO.setMapNominationContent(mapNominationContent);
- VoteMonitoringAction.logger.debug("voteGeneralAuthoringDTO: " + voteGeneralAuthoringDTO);
-
- VoteMonitoringAction.logger.debug("voteGeneralAuthoringDTO now: " + voteGeneralAuthoringDTO);
request.setAttribute(VoteAppConstants.VOTE_GENERAL_AUTHORING_DTO, voteGeneralAuthoringDTO);
-
- VoteMonitoringAction.logger.debug("there are no issues with input, continue and submit data");
-
VoteContent voteContentTest = voteService.retrieveVote(new Long(strToolContentID));
- VoteMonitoringAction.logger.debug("voteContentTest: " + voteContentTest);
-
- VoteMonitoringAction.logger.debug("errors: " + errors);
if (!errors.isEmpty()) {
saveErrors(request, errors);
- VoteMonitoringAction.logger.debug("errors saved: " + errors);
}
repopulateRequestParameters(request, voteAuthoringForm, voteGeneralAuthoringDTO);
@@ -1880,56 +1326,36 @@
VoteContent voteContent = voteContentTest;
if (errors.isEmpty()) {
- VoteMonitoringAction.logger.debug("errors is empty: " + errors);
/* to remove deleted entries in the questions table based on mapNominationContent */
authoringUtil.removeRedundantNominations(mapNominationContent, voteService, voteAuthoringForm, request,
strToolContentID);
- VoteMonitoringAction.logger.debug("end of removing unused entries... ");
voteContent = authoringUtil.saveOrUpdateVoteContent(mapNominationContent, mapFeedback, voteService,
voteAuthoringForm, request, voteContentTest, strToolContentID, null);
- VoteMonitoringAction.logger.debug("voteContent: " + voteContent);
long defaultContentID = 0;
- VoteMonitoringAction.logger.debug("attempt retrieving tool with signatute : "
- + VoteAppConstants.MY_SIGNATURE);
defaultContentID = voteService.getToolDefaultContentIdBySignature(VoteAppConstants.MY_SIGNATURE);
- VoteMonitoringAction.logger.debug("retrieved tool default contentId: " + defaultContentID);
-
if (voteContent != null) {
voteGeneralAuthoringDTO.setDefaultContentIdStr(new Long(defaultContentID).toString());
}
- VoteMonitoringAction.logger.debug("updated voteGeneralAuthoringDTO to: " + voteGeneralAuthoringDTO);
authoringUtil.reOrganizeDisplayOrder(mapNominationContent, voteService, voteAuthoringForm, voteContent);
- VoteMonitoringAction.logger.debug("strToolContentID: " + strToolContentID);
VoteUtils.setDefineLater(request, false, strToolContentID, voteService);
- VoteMonitoringAction.logger.debug("define later set to false");
// VoteUtils.setFormProperties(request, voteService,
// voteAuthoringForm, voteGeneralAuthoringDTO, strToolContentID, defaultContentIdStr, activeModule,
// sessionMap, httpSessionID);
voteGeneralMonitoringDTO.setDefineLaterInEditMode(new Boolean(false).toString());
} else {
- VoteMonitoringAction.logger.debug("errors is not empty: " + errors);
-
if (voteContent != null) {
long defaultContentID = 0;
- VoteMonitoringAction.logger.debug("attempt retrieving tool with signatute : "
- + VoteAppConstants.MY_SIGNATURE);
defaultContentID = voteService.getToolDefaultContentIdBySignature(VoteAppConstants.MY_SIGNATURE);
- VoteMonitoringAction.logger.debug("retrieved tool default contentId: " + defaultContentID);
-
if (voteContent != null) {
voteGeneralAuthoringDTO.setDefaultContentIdStr(new Long(defaultContentID).toString());
}
- // VoteUtils.setFormProperties(request, voteService,
- // voteAuthoringForm, voteGeneralAuthoringDTO, strToolContentID, defaultContentIdStr, activeModule,
- // sessionMap, httpSessionID);
-
}
voteGeneralMonitoringDTO.setDefineLaterInEditMode(new Boolean(true).toString());
@@ -1957,14 +1383,11 @@
voteAuthoringForm.setDefaultContentIdStr(defaultContentIdStr);
voteAuthoringForm.setCurrentTab("3");
- VoteMonitoringAction.logger.debug("before saving final voteGeneralAuthoringDTO: " + voteGeneralAuthoringDTO);
request.setAttribute(VoteAppConstants.VOTE_GENERAL_AUTHORING_DTO, voteGeneralAuthoringDTO);
if (voteService.studentActivityOccurredGlobal(voteContent)) {
- VoteMonitoringAction.logger.debug("USER_EXCEPTION_NO_TOOL_SESSIONS is set to false");
voteGeneralMonitoringDTO.setUserExceptionNoToolSessions(new Boolean(false).toString());
} else {
- VoteMonitoringAction.logger.debug("USER_EXCEPTION_NO_TOOL_SESSIONS is set to true");
voteGeneralMonitoringDTO.setUserExceptionNoToolSessions(new Boolean(true).toString());
}
@@ -1973,13 +1396,10 @@
voteGeneralMonitoringDTO.setOfflineInstructions(voteContent.getOfflineInstructions());
List attachmentList = voteService.retrieveVoteUploadedFiles(voteContent);
- VoteMonitoringAction.logger.debug("attachmentList: " + attachmentList);
voteGeneralMonitoringDTO.setAttachmentList(attachmentList);
voteGeneralMonitoringDTO.setDeletedAttachmentList(new ArrayList());
/** ...till here * */
- VoteMonitoringAction.logger.debug("end of refreshSummaryData, voteGeneralMonitoringDTO"
- + voteGeneralMonitoringDTO);
request.setAttribute(VoteAppConstants.VOTE_GENERAL_MONITORING_DTO, voteGeneralMonitoringDTO);
if (voteContent != null) {
@@ -1988,7 +1408,6 @@
EditActivityDTO editActivityDTO = new EditActivityDTO();
boolean isContentInUse = VoteUtils.isContentInUse(voteContent);
- VoteMonitoringAction.logger.debug("isContentInUse:" + isContentInUse);
if (isContentInUse == true) {
editActivityDTO.setMonitoredContentInUse(new Boolean(false).toString());
}
@@ -1997,16 +1416,12 @@
/* find out if there are any reflection entries, from here */
boolean notebookEntriesExist = MonitoringUtil.notebookEntriesExist(voteService, voteContent);
- VoteMonitoringAction.logger.debug("notebookEntriesExist : " + notebookEntriesExist);
-
if (notebookEntriesExist) {
request.setAttribute(VoteAppConstants.NOTEBOOK_ENTRIES_EXIST, new Boolean(true).toString());
String userExceptionNoToolSessions = voteGeneralMonitoringDTO.getUserExceptionNoToolSessions();
- VoteMonitoringAction.logger.debug("userExceptionNoToolSessions : " + userExceptionNoToolSessions);
if (userExceptionNoToolSessions.equals("true")) {
- VoteMonitoringAction.logger.debug("there are no online student activity but there are reflections : ");
request.setAttribute(VoteAppConstants.NO_SESSIONS_NOTEBOOK_ENTRIES_EXIST, new Boolean(true).toString());
}
} else {
@@ -2015,8 +1430,6 @@
/* ... till here */
MonitoringUtil.buildVoteStatsDTO(request, voteService, voteContent);
-
- VoteMonitoringAction.logger.debug("forwarding to :" + VoteAppConstants.LOAD_MONITORING);
return mapping.findForward(VoteAppConstants.LOAD_MONITORING);
}
@@ -2034,73 +1447,49 @@
public ActionForward saveSingleNomination(ActionMapping mapping, ActionForm form, HttpServletRequest request,
HttpServletResponse response) throws IOException, ServletException {
- VoteMonitoringAction.logger.debug("dispathcing saveSingleNomination");
VoteMonitoringForm voteAuthoringForm = (VoteMonitoringForm) form;
-
IVoteService voteService = VoteServiceProxy.getVoteService(getServlet().getServletContext());
- VoteMonitoringAction.logger.debug("voteService: " + voteService);
-
String httpSessionID = voteAuthoringForm.getHttpSessionID();
- VoteMonitoringAction.logger.debug("httpSessionID: " + httpSessionID);
-
SessionMap sessionMap = (SessionMap) request.getSession().getAttribute(httpSessionID);
- VoteMonitoringAction.logger.debug("sessionMap: " + sessionMap);
-
String contentFolderID = WebUtil.readStrParam(request, AttributeNames.PARAM_CONTENT_FOLDER_ID);
- VoteMonitoringAction.logger.debug("contentFolderID: " + contentFolderID);
voteAuthoringForm.setContentFolderID(contentFolderID);
String activeModule = request.getParameter(VoteAppConstants.ACTIVE_MODULE);
- VoteMonitoringAction.logger.debug("activeModule: " + activeModule);
String strToolContentID = request.getParameter(AttributeNames.PARAM_TOOL_CONTENT_ID);
- VoteMonitoringAction.logger.debug("strToolContentID: " + strToolContentID);
String defaultContentIdStr = request.getParameter(VoteAppConstants.DEFAULT_CONTENT_ID_STR);
- VoteMonitoringAction.logger.debug("defaultContentIdStr: " + defaultContentIdStr);
String editNominationBoxRequest = request.getParameter("editNominationBoxRequest");
- VoteMonitoringAction.logger.debug("editNominationBoxRequest: " + editNominationBoxRequest);
VoteContent voteContent = voteService.retrieveVote(new Long(strToolContentID));
- VoteMonitoringAction.logger.debug("voteContent: " + voteContent);
VoteGeneralAuthoringDTO voteGeneralAuthoringDTO = new VoteGeneralAuthoringDTO();
- VoteMonitoringAction.logger.debug("voteGeneralAuthoringDTO: " + voteGeneralAuthoringDTO);
voteGeneralAuthoringDTO.setContentFolderID(contentFolderID);
voteGeneralAuthoringDTO.setSbmtSuccess(new Integer(0).toString());
AuthoringUtil authoringUtil = new AuthoringUtil();
List listNominationContentDTO = (List) sessionMap.get(VoteAppConstants.LIST_NOMINATION_CONTENT_DTO_KEY);
- VoteMonitoringAction.logger.debug("listNominationContentDTO: " + listNominationContentDTO);
String newNomination = request.getParameter("newNomination");
- VoteMonitoringAction.logger.debug("newNomination: " + newNomination);
String editableNominationIndex = request.getParameter("editableNominationIndex");
- VoteMonitoringAction.logger.debug("editableNominationIndex: " + editableNominationIndex);
if (newNomination != null && newNomination.length() > 0) {
if (editNominationBoxRequest != null && editNominationBoxRequest.equals("false")) {
- VoteMonitoringAction.logger.debug("request for add and save");
boolean duplicates = AuthoringUtil.checkDuplicateNominations(listNominationContentDTO, newNomination);
- VoteMonitoringAction.logger.debug("duplicates: " + duplicates);
if (!duplicates) {
VoteNominationContentDTO voteNominationContentDTO = null;
Iterator listIterator = listNominationContentDTO.iterator();
while (listIterator.hasNext()) {
voteNominationContentDTO = (VoteNominationContentDTO) listIterator.next();
- VoteMonitoringAction.logger.debug("voteNominationContentDTO:" + voteNominationContentDTO);
- VoteMonitoringAction.logger.debug("voteNominationContentDTO question:"
- + voteNominationContentDTO.getQuestion());
String question = voteNominationContentDTO.getQuestion();
String displayOrder = voteNominationContentDTO.getDisplayOrder();
- VoteMonitoringAction.logger.debug("displayOrder:" + displayOrder);
if (displayOrder != null && !displayOrder.equals("")) {
if (displayOrder.equals(editableNominationIndex)) {
@@ -2109,32 +1498,23 @@
}
}
- VoteMonitoringAction.logger.debug("voteNominationContentDTO found:" + voteNominationContentDTO);
voteNominationContentDTO.setQuestion(newNomination);
voteNominationContentDTO.setDisplayOrder(editableNominationIndex);
listNominationContentDTO = AuthoringUtil.reorderUpdateListNominationContentDTO(
listNominationContentDTO, voteNominationContentDTO, editableNominationIndex);
- VoteMonitoringAction.logger
- .debug("post reorderUpdateListNominationContentDTO listNominationContentDTO: "
- + listNominationContentDTO);
} else {
- VoteMonitoringAction.logger.debug("duplicate question entry, not adding");
+ //duplicate question entry, not adding
}
} else {
- VoteMonitoringAction.logger.debug("request for edit and save.");
VoteNominationContentDTO voteNominationContentDTO = null;
Iterator listIterator = listNominationContentDTO.iterator();
while (listIterator.hasNext()) {
voteNominationContentDTO = (VoteNominationContentDTO) listIterator.next();
- VoteMonitoringAction.logger.debug("voteNominationContentDTO:" + voteNominationContentDTO);
- VoteMonitoringAction.logger.debug("voteNominationContentDTO question:"
- + voteNominationContentDTO.getQuestion());
String question = voteNominationContentDTO.getQuestion();
String displayOrder = voteNominationContentDTO.getDisplayOrder();
- VoteMonitoringAction.logger.debug("displayOrder:" + displayOrder);
if (displayOrder != null && !displayOrder.equals("")) {
if (displayOrder.equals(editableNominationIndex)) {
@@ -2143,29 +1523,23 @@
}
}
- VoteMonitoringAction.logger.debug("voteNominationContentDTO found:" + voteNominationContentDTO);
voteNominationContentDTO.setQuestion(newNomination);
voteNominationContentDTO.setDisplayOrder(editableNominationIndex);
listNominationContentDTO = AuthoringUtil.reorderUpdateListNominationContentDTO(
listNominationContentDTO, voteNominationContentDTO, editableNominationIndex);
- VoteMonitoringAction.logger.debug("post reorderUpdateListQuestionContentDTO listQuestionContentDTO: "
- + listNominationContentDTO);
}
} else {
- VoteMonitoringAction.logger.debug("entry blank, not adding");
+ //entry blank, not adding
}
request.setAttribute(VoteAppConstants.LIST_NOMINATION_CONTENT_DTO, listNominationContentDTO);
sessionMap.put(VoteAppConstants.LIST_NOMINATION_CONTENT_DTO_KEY, listNominationContentDTO);
- VoteMonitoringAction.logger.debug("listNominationContentDTO now: " + listNominationContentDTO);
String richTextTitle = request.getParameter(VoteAppConstants.TITLE);
String richTextInstructions = request.getParameter(VoteAppConstants.INSTRUCTIONS);
- VoteMonitoringAction.logger.debug("richTextTitle: " + richTextTitle);
- VoteMonitoringAction.logger.debug("richTextInstructions: " + richTextInstructions);
voteGeneralAuthoringDTO.setActivityTitle(richTextTitle);
voteAuthoringForm.setTitle(richTextTitle);
@@ -2174,7 +1548,6 @@
sessionMap.put(VoteAppConstants.ACTIVITY_TITLE_KEY, richTextTitle);
sessionMap.put(VoteAppConstants.ACTIVITY_INSTRUCTIONS_KEY, richTextInstructions);
- VoteMonitoringAction.logger.debug("activeModule: " + activeModule);
voteGeneralAuthoringDTO.setEditActivityEditMode(new Boolean(true).toString());
request.getSession().setAttribute(httpSessionID, sessionMap);
@@ -2198,16 +1571,9 @@
voteGeneralAuthoringDTO.setDefineLaterInEditMode(new Boolean(true).toString());
repopulateRequestParameters(request, voteAuthoringForm, voteGeneralAuthoringDTO);
- VoteMonitoringAction.logger.debug("voteGeneralAuthoringDTO now: " + voteGeneralAuthoringDTO);
request.setAttribute(VoteAppConstants.VOTE_GENERAL_AUTHORING_DTO, voteGeneralAuthoringDTO);
- VoteMonitoringAction.logger.debug("httpSessionID: " + httpSessionID);
- VoteMonitoringAction.logger.debug("sessionMap: " + sessionMap);
-
request.getSession().setAttribute(httpSessionID, sessionMap);
- VoteMonitoringAction.logger.debug("voteGeneralAuthoringDTO.getMapNominationContent(); "
- + voteGeneralAuthoringDTO.getMapNominationContent());
-
request.setAttribute(VoteAppConstants.TOTAL_NOMINATION_COUNT, new Integer(listNominationContentDTO.size()));
if (voteContent != null) {
@@ -2216,7 +1582,6 @@
EditActivityDTO editActivityDTO = new EditActivityDTO();
boolean isContentInUse = VoteUtils.isContentInUse(voteContent);
- VoteMonitoringAction.logger.debug("isContentInUse:" + isContentInUse);
if (isContentInUse == true) {
editActivityDTO.setMonitoredContentInUse(new Boolean(false).toString());
}
@@ -2227,10 +1592,8 @@
voteGeneralMonitoringDTO.setDefineLaterInEditMode(new Boolean(true).toString());
if (voteService.studentActivityOccurredGlobal(voteContent)) {
- VoteMonitoringAction.logger.debug("USER_EXCEPTION_NO_TOOL_SESSIONS is set to false");
voteGeneralMonitoringDTO.setUserExceptionNoToolSessions(new Boolean(false).toString());
} else {
- VoteMonitoringAction.logger.debug("USER_EXCEPTION_NO_TOOL_SESSIONS is set to true");
voteGeneralMonitoringDTO.setUserExceptionNoToolSessions(new Boolean(true).toString());
}
@@ -2239,27 +1602,21 @@
voteGeneralMonitoringDTO.setOfflineInstructions(voteContent.getOfflineInstructions());
List attachmentList = voteService.retrieveVoteUploadedFiles(voteContent);
- VoteMonitoringAction.logger.debug("attachmentList: " + attachmentList);
voteGeneralMonitoringDTO.setAttachmentList(attachmentList);
voteGeneralMonitoringDTO.setDeletedAttachmentList(new ArrayList());
/** ...till here * */
- VoteMonitoringAction.logger.debug("end of refreshSummaryData, voteGeneralMonitoringDTO"
- + voteGeneralMonitoringDTO);
request.setAttribute(VoteAppConstants.VOTE_GENERAL_MONITORING_DTO, voteGeneralMonitoringDTO);
/* find out if there are any reflection entries, from here */
boolean notebookEntriesExist = MonitoringUtil.notebookEntriesExist(voteService, voteContent);
- VoteMonitoringAction.logger.debug("notebookEntriesExist : " + notebookEntriesExist);
if (notebookEntriesExist) {
request.setAttribute(VoteAppConstants.NOTEBOOK_ENTRIES_EXIST, new Boolean(true).toString());
String userExceptionNoToolSessions = voteGeneralAuthoringDTO.getUserExceptionNoToolSessions();
- VoteMonitoringAction.logger.debug("userExceptionNoToolSessions : " + userExceptionNoToolSessions);
if (userExceptionNoToolSessions.equals("true")) {
- VoteMonitoringAction.logger.debug("there are no online student activity but there are reflections : ");
request.setAttribute(VoteAppConstants.NO_SESSIONS_NOTEBOOK_ENTRIES_EXIST, new Boolean(true).toString());
}
} else {
@@ -2269,7 +1626,6 @@
MonitoringUtil.buildVoteStatsDTO(request, voteService, voteContent);
- VoteMonitoringAction.logger.debug("fwd ing to LOAD_MONITORING: " + VoteAppConstants.LOAD_MONITORING);
return mapping.findForward(VoteAppConstants.LOAD_MONITORING);
}
@@ -2287,68 +1643,48 @@
public ActionForward addSingleNomination(ActionMapping mapping, ActionForm form, HttpServletRequest request,
HttpServletResponse response) throws IOException, ServletException {
- VoteMonitoringAction.logger.debug("dispathcing addSingleNomination");
VoteMonitoringForm voteAuthoringForm = (VoteMonitoringForm) form;
IVoteService voteService = VoteServiceProxy.getVoteService(getServlet().getServletContext());
- VoteMonitoringAction.logger.debug("voteService: " + voteService);
String httpSessionID = voteAuthoringForm.getHttpSessionID();
- VoteMonitoringAction.logger.debug("httpSessionID: " + httpSessionID);
SessionMap sessionMap = (SessionMap) request.getSession().getAttribute(httpSessionID);
- VoteMonitoringAction.logger.debug("sessionMap: " + sessionMap);
String contentFolderID = WebUtil.readStrParam(request, AttributeNames.PARAM_CONTENT_FOLDER_ID);
- VoteMonitoringAction.logger.debug("contentFolderID: " + contentFolderID);
voteAuthoringForm.setContentFolderID(contentFolderID);
String activeModule = request.getParameter(VoteAppConstants.ACTIVE_MODULE);
- VoteMonitoringAction.logger.debug("activeModule: " + activeModule);
String strToolContentID = request.getParameter(AttributeNames.PARAM_TOOL_CONTENT_ID);
- VoteMonitoringAction.logger.debug("strToolContentID: " + strToolContentID);
String defaultContentIdStr = request.getParameter(VoteAppConstants.DEFAULT_CONTENT_ID_STR);
- VoteMonitoringAction.logger.debug("defaultContentIdStr: " + defaultContentIdStr);
VoteContent voteContent = voteService.retrieveVote(new Long(strToolContentID));
- VoteMonitoringAction.logger.debug("voteContent: " + voteContent);
VoteGeneralAuthoringDTO voteGeneralAuthoringDTO = new VoteGeneralAuthoringDTO();
- VoteMonitoringAction.logger.debug("voteGeneralAuthoringDTO: " + voteGeneralAuthoringDTO);
voteGeneralAuthoringDTO.setContentFolderID(contentFolderID);
voteGeneralAuthoringDTO.setSbmtSuccess(new Integer(0).toString());
AuthoringUtil authoringUtil = new AuthoringUtil();
List listNominationContentDTO = (List) sessionMap.get(VoteAppConstants.LIST_NOMINATION_CONTENT_DTO_KEY);
- VoteMonitoringAction.logger.debug("listNominationContentDTO: " + listNominationContentDTO);
String newNomination = request.getParameter("newNomination");
- VoteMonitoringAction.logger.debug("newNomination: " + newNomination);
int listSize = listNominationContentDTO.size();
- VoteMonitoringAction.logger.debug("listSize: " + listSize);
if (newNomination != null && newNomination.length() > 0) {
boolean duplicates = AuthoringUtil.checkDuplicateNominations(listNominationContentDTO, newNomination);
- VoteMonitoringAction.logger.debug("duplicates: " + duplicates);
if (!duplicates) {
VoteNominationContentDTO voteNominationContentDTO = new VoteNominationContentDTO();
voteNominationContentDTO.setDisplayOrder(new Long(listSize + 1).toString());
voteNominationContentDTO.setNomination(newNomination);
listNominationContentDTO.add(voteNominationContentDTO);
- VoteMonitoringAction.logger.debug("updated listNominationContentDTO: " + listNominationContentDTO);
- } else {
- VoteMonitoringAction.logger.debug("entry duplicate, not adding");
-
}
- } else {
- VoteMonitoringAction.logger.debug("entry blank, not adding");
}
request.setAttribute(VoteAppConstants.LIST_NOMINATION_CONTENT_DTO, listNominationContentDTO);
@@ -2357,8 +1693,6 @@
String richTextTitle = request.getParameter(VoteAppConstants.TITLE);
String richTextInstructions = request.getParameter(VoteAppConstants.INSTRUCTIONS);
- VoteMonitoringAction.logger.debug("richTextTitle: " + richTextTitle);
- VoteMonitoringAction.logger.debug("richTextInstructions: " + richTextInstructions);
voteGeneralAuthoringDTO.setActivityTitle(richTextTitle);
voteAuthoringForm.setTitle(richTextTitle);
@@ -2367,8 +1701,6 @@
sessionMap.put(VoteAppConstants.ACTIVITY_TITLE_KEY, richTextTitle);
sessionMap.put(VoteAppConstants.ACTIVITY_INSTRUCTIONS_KEY, richTextInstructions);
- VoteMonitoringAction.logger.debug("activeModule: " + activeModule);
-
voteGeneralAuthoringDTO.setEditActivityEditMode(new Boolean(true).toString());
request.getSession().setAttribute(httpSessionID, sessionMap);
@@ -2386,16 +1718,10 @@
voteGeneralAuthoringDTO.setDefineLaterInEditMode(new Boolean(true).toString());
repopulateRequestParameters(request, voteAuthoringForm, voteGeneralAuthoringDTO);
- VoteMonitoringAction.logger.debug("voteGeneralAuthoringDTO now: " + voteGeneralAuthoringDTO);
request.setAttribute(VoteAppConstants.VOTE_GENERAL_AUTHORING_DTO, voteGeneralAuthoringDTO);
- VoteMonitoringAction.logger.debug("httpSessionID: " + httpSessionID);
- VoteMonitoringAction.logger.debug("sessionMap: " + sessionMap);
-
request.getSession().setAttribute(httpSessionID, sessionMap);
- VoteMonitoringAction.logger.debug("voteGeneralAuthoringDTO.getMapNominationContent(); "
- + voteGeneralAuthoringDTO.getMapNominationContent());
request.setAttribute(VoteAppConstants.TOTAL_NOMINATION_COUNT, new Integer(listNominationContentDTO.size()));
if (voteContent != null) {
@@ -2407,10 +1733,8 @@
voteGeneralMonitoringDTO.setDefineLaterInEditMode(new Boolean(true).toString());
if (voteService.studentActivityOccurredGlobal(voteContent)) {
- VoteMonitoringAction.logger.debug("USER_EXCEPTION_NO_TOOL_SESSIONS is set to false");
voteGeneralMonitoringDTO.setUserExceptionNoToolSessions(new Boolean(false).toString());
} else {
- VoteMonitoringAction.logger.debug("USER_EXCEPTION_NO_TOOL_SESSIONS is set to true");
voteGeneralMonitoringDTO.setUserExceptionNoToolSessions(new Boolean(true).toString());
}
@@ -2419,27 +1743,21 @@
voteGeneralMonitoringDTO.setOfflineInstructions(voteContent.getOfflineInstructions());
List attachmentList = voteService.retrieveVoteUploadedFiles(voteContent);
- VoteMonitoringAction.logger.debug("attachmentList: " + attachmentList);
voteGeneralMonitoringDTO.setAttachmentList(attachmentList);
voteGeneralMonitoringDTO.setDeletedAttachmentList(new ArrayList());
/** ...till here * */
- VoteMonitoringAction.logger.debug("end of refreshSummaryData, voteGeneralMonitoringDTO"
- + voteGeneralMonitoringDTO);
request.setAttribute(VoteAppConstants.VOTE_GENERAL_MONITORING_DTO, voteGeneralMonitoringDTO);
/* find out if there are any reflection entries, from here */
boolean notebookEntriesExist = MonitoringUtil.notebookEntriesExist(voteService, voteContent);
- VoteMonitoringAction.logger.debug("notebookEntriesExist : " + notebookEntriesExist);
if (notebookEntriesExist) {
request.setAttribute(VoteAppConstants.NOTEBOOK_ENTRIES_EXIST, new Boolean(true).toString());
String userExceptionNoToolSessions = voteGeneralAuthoringDTO.getUserExceptionNoToolSessions();
- VoteMonitoringAction.logger.debug("userExceptionNoToolSessions : " + userExceptionNoToolSessions);
if (userExceptionNoToolSessions.equals("true")) {
- VoteMonitoringAction.logger.debug("there are no online student activity but there are reflections : ");
request.setAttribute(VoteAppConstants.NO_SESSIONS_NOTEBOOK_ENTRIES_EXIST, new Boolean(true).toString());
}
} else {
@@ -2449,7 +1767,6 @@
MonitoringUtil.buildVoteStatsDTO(request, voteService, voteContent);
- VoteMonitoringAction.logger.debug("fwd ing to LOAD_MONITORING: " + VoteAppConstants.LOAD_MONITORING);
return mapping.findForward(VoteAppConstants.LOAD_MONITORING);
}
@@ -2468,58 +1785,42 @@
*/
public ActionForward newNominationBox(ActionMapping mapping, ActionForm form, HttpServletRequest request,
HttpServletResponse response) throws IOException, ServletException {
- VoteMonitoringAction.logger.debug("dispathcing newNominationBox");
VoteMonitoringForm voteAuthoringForm = (VoteMonitoringForm) form;
IVoteService voteService = VoteServiceProxy.getVoteService(getServlet().getServletContext());
- VoteMonitoringAction.logger.debug("voteService: " + voteService);
String httpSessionID = voteAuthoringForm.getHttpSessionID();
- VoteMonitoringAction.logger.debug("httpSessionID: " + httpSessionID);
SessionMap sessionMap = (SessionMap) request.getSession().getAttribute(httpSessionID);
- VoteMonitoringAction.logger.debug("sessionMap: " + sessionMap);
String contentFolderID = WebUtil.readStrParam(request, AttributeNames.PARAM_CONTENT_FOLDER_ID);
- VoteMonitoringAction.logger.debug("contentFolderID: " + contentFolderID);
voteAuthoringForm.setContentFolderID(contentFolderID);
String activeModule = request.getParameter(VoteAppConstants.ACTIVE_MODULE);
- VoteMonitoringAction.logger.debug("activeModule: " + activeModule);
String strToolContentID = request.getParameter(AttributeNames.PARAM_TOOL_CONTENT_ID);
- VoteMonitoringAction.logger.debug("strToolContentID: " + strToolContentID);
String defaultContentIdStr = request.getParameter(VoteAppConstants.DEFAULT_CONTENT_ID_STR);
- VoteMonitoringAction.logger.debug("defaultContentIdStr: " + defaultContentIdStr);
VoteContent voteContent = voteService.retrieveVote(new Long(strToolContentID));
- VoteMonitoringAction.logger.debug("voteContent: " + voteContent);
VoteGeneralAuthoringDTO voteGeneralAuthoringDTO = new VoteGeneralAuthoringDTO();
- VoteMonitoringAction.logger.debug("voteGeneralAuthoringDTO: " + voteGeneralAuthoringDTO);
voteGeneralAuthoringDTO.setContentFolderID(contentFolderID);
String richTextTitle = request.getParameter(VoteAppConstants.TITLE);
String richTextInstructions = request.getParameter(VoteAppConstants.INSTRUCTIONS);
- VoteMonitoringAction.logger.debug("richTextTitle: " + richTextTitle);
- VoteMonitoringAction.logger.debug("richTextInstructions: " + richTextInstructions);
voteGeneralAuthoringDTO.setActivityTitle(richTextTitle);
voteAuthoringForm.setTitle(richTextTitle);
voteGeneralAuthoringDTO.setActivityInstructions(richTextInstructions);
- VoteMonitoringAction.logger.debug("activeModule: " + activeModule);
-
voteGeneralAuthoringDTO.setDefineLaterInEditMode(new Boolean(true).toString());
repopulateRequestParameters(request, voteAuthoringForm, voteGeneralAuthoringDTO);
- VoteMonitoringAction.logger.debug("voteGeneralAuthoringDTO now: " + voteGeneralAuthoringDTO);
request.setAttribute(VoteAppConstants.VOTE_GENERAL_AUTHORING_DTO, voteGeneralAuthoringDTO);
List listNominationContentDTO = (List) sessionMap.get(VoteAppConstants.LIST_NOMINATION_CONTENT_DTO_KEY);
- VoteMonitoringAction.logger.debug("listNominationContentDTO: " + listNominationContentDTO);
request.setAttribute(VoteAppConstants.TOTAL_NOMINATION_COUNT, new Integer(listNominationContentDTO.size()));
if (voteContent != null) {
@@ -2528,7 +1829,6 @@
EditActivityDTO editActivityDTO = new EditActivityDTO();
boolean isContentInUse = VoteUtils.isContentInUse(voteContent);
- VoteMonitoringAction.logger.debug("isContentInUse:" + isContentInUse);
if (isContentInUse == true) {
editActivityDTO.setMonitoredContentInUse(new Boolean(false).toString());
}
@@ -2539,10 +1839,8 @@
voteGeneralMonitoringDTO.setDefineLaterInEditMode(new Boolean(true).toString());
if (voteService.studentActivityOccurredGlobal(voteContent)) {
- VoteMonitoringAction.logger.debug("USER_EXCEPTION_NO_TOOL_SESSIONS is set to false");
voteGeneralMonitoringDTO.setUserExceptionNoToolSessions(new Boolean(false).toString());
} else {
- VoteMonitoringAction.logger.debug("USER_EXCEPTION_NO_TOOL_SESSIONS is set to true");
voteGeneralMonitoringDTO.setUserExceptionNoToolSessions(new Boolean(true).toString());
}
@@ -2551,27 +1849,21 @@
voteGeneralMonitoringDTO.setOfflineInstructions(voteContent.getOfflineInstructions());
List attachmentList = voteService.retrieveVoteUploadedFiles(voteContent);
- VoteMonitoringAction.logger.debug("attachmentList: " + attachmentList);
voteGeneralMonitoringDTO.setAttachmentList(attachmentList);
voteGeneralMonitoringDTO.setDeletedAttachmentList(new ArrayList());
/** ...till here * */
- VoteMonitoringAction.logger.debug("end of refreshSummaryData, voteGeneralMonitoringDTO"
- + voteGeneralMonitoringDTO);
request.setAttribute(VoteAppConstants.VOTE_GENERAL_MONITORING_DTO, voteGeneralMonitoringDTO);
/* find out if there are any reflection entries, from here */
boolean notebookEntriesExist = MonitoringUtil.notebookEntriesExist(voteService, voteContent);
- VoteMonitoringAction.logger.debug("notebookEntriesExist : " + notebookEntriesExist);
if (notebookEntriesExist) {
request.setAttribute(VoteAppConstants.NOTEBOOK_ENTRIES_EXIST, new Boolean(true).toString());
String userExceptionNoToolSessions = voteGeneralAuthoringDTO.getUserExceptionNoToolSessions();
- VoteMonitoringAction.logger.debug("userExceptionNoToolSessions : " + userExceptionNoToolSessions);
if (userExceptionNoToolSessions.equals("true")) {
- VoteMonitoringAction.logger.debug("there are no online student activity but there are reflections : ");
request.setAttribute(VoteAppConstants.NO_SESSIONS_NOTEBOOK_ENTRIES_EXIST, new Boolean(true).toString());
}
} else {
@@ -2580,8 +1872,6 @@
/* ... till here */
MonitoringUtil.buildVoteStatsDTO(request, voteService, voteContent);
-
- VoteMonitoringAction.logger.debug("fwd ing to newNominationBox: ");
return mapping.findForward("newNominationBox");
}
@@ -2598,72 +1888,52 @@
*/
public ActionForward newEditableNominationBox(ActionMapping mapping, ActionForm form, HttpServletRequest request,
HttpServletResponse response) throws IOException, ServletException {
- VoteMonitoringAction.logger.debug("dispathcing newEditableNominationBox");
VoteMonitoringForm voteAuthoringForm = (VoteMonitoringForm) form;
IVoteService voteService = VoteServiceProxy.getVoteService(getServlet().getServletContext());
- VoteMonitoringAction.logger.debug("voteService: " + voteService);
-
String httpSessionID = voteAuthoringForm.getHttpSessionID();
- VoteMonitoringAction.logger.debug("httpSessionID: " + httpSessionID);
SessionMap sessionMap = (SessionMap) request.getSession().getAttribute(httpSessionID);
- VoteMonitoringAction.logger.debug("sessionMap: " + sessionMap);
String questionIndex = request.getParameter("questionIndex");
- VoteMonitoringAction.logger.debug("questionIndex: " + questionIndex);
voteAuthoringForm.setEditableNominationIndex(questionIndex);
List listNominationContentDTO = (List) sessionMap.get(VoteAppConstants.LIST_NOMINATION_CONTENT_DTO_KEY);
- VoteMonitoringAction.logger.debug("listNominationContentDTO: " + listNominationContentDTO);
String editableNomination = "";
Iterator listIterator = listNominationContentDTO.iterator();
while (listIterator.hasNext()) {
VoteNominationContentDTO voteNominationContentDTO = (VoteNominationContentDTO) listIterator.next();
- VoteMonitoringAction.logger.debug("voteNominationContentDTO:" + voteNominationContentDTO);
- VoteMonitoringAction.logger.debug("voteNominationContentDTO question:"
- + voteNominationContentDTO.getNomination());
String question = voteNominationContentDTO.getNomination();
String displayOrder = voteNominationContentDTO.getDisplayOrder();
if (displayOrder != null && !displayOrder.equals("")) {
if (displayOrder.equals(questionIndex)) {
editableNomination = voteNominationContentDTO.getNomination();
- VoteMonitoringAction.logger.debug("editableNomination found :" + editableNomination);
break;
}
}
}
- VoteMonitoringAction.logger.debug("editableNomination found :" + editableNomination);
String contentFolderID = WebUtil.readStrParam(request, AttributeNames.PARAM_CONTENT_FOLDER_ID);
- VoteMonitoringAction.logger.debug("contentFolderID: " + contentFolderID);
voteAuthoringForm.setContentFolderID(contentFolderID);
String activeModule = request.getParameter(VoteAppConstants.ACTIVE_MODULE);
- VoteMonitoringAction.logger.debug("activeModule: " + activeModule);
String strToolContentID = request.getParameter(AttributeNames.PARAM_TOOL_CONTENT_ID);
- VoteMonitoringAction.logger.debug("strToolContentID: " + strToolContentID);
String defaultContentIdStr = request.getParameter(VoteAppConstants.DEFAULT_CONTENT_ID_STR);
- VoteMonitoringAction.logger.debug("defaultContentIdStr: " + defaultContentIdStr);
VoteContent voteContent = voteService.retrieveVote(new Long(strToolContentID));
- VoteMonitoringAction.logger.debug("voteContent: " + voteContent);
VoteGeneralAuthoringDTO voteGeneralAuthoringDTO = new VoteGeneralAuthoringDTO();
- VoteMonitoringAction.logger.debug("voteGeneralAuthoringDTO: " + voteGeneralAuthoringDTO);
voteGeneralAuthoringDTO.setContentFolderID(contentFolderID);
String richTextTitle = request.getParameter(VoteAppConstants.TITLE);
String richTextInstructions = request.getParameter(VoteAppConstants.INSTRUCTIONS);
- VoteMonitoringAction.logger.debug("richTextTitle: " + richTextTitle);
- VoteMonitoringAction.logger.debug("richTextInstructions: " + richTextInstructions);
voteGeneralAuthoringDTO.setActivityTitle(richTextTitle);
voteAuthoringForm.setTitle(richTextTitle);
@@ -2672,7 +1942,6 @@
voteGeneralAuthoringDTO.setDefineLaterInEditMode(new Boolean(true).toString());
repopulateRequestParameters(request, voteAuthoringForm, voteGeneralAuthoringDTO);
- VoteMonitoringAction.logger.debug("voteGeneralAuthoringDTO now: " + voteGeneralAuthoringDTO);
request.setAttribute(VoteAppConstants.VOTE_GENERAL_AUTHORING_DTO, voteGeneralAuthoringDTO);
request.setAttribute(VoteAppConstants.TOTAL_NOMINATION_COUNT, new Integer(listNominationContentDTO.size()));
@@ -2682,7 +1951,6 @@
EditActivityDTO editActivityDTO = new EditActivityDTO();
boolean isContentInUse = VoteUtils.isContentInUse(voteContent);
- VoteMonitoringAction.logger.debug("isContentInUse:" + isContentInUse);
if (isContentInUse == true) {
editActivityDTO.setMonitoredContentInUse(new Boolean(false).toString());
}
@@ -2693,10 +1961,8 @@
voteGeneralMonitoringDTO.setDefineLaterInEditMode(new Boolean(true).toString());
if (voteService.studentActivityOccurredGlobal(voteContent)) {
- VoteMonitoringAction.logger.debug("USER_EXCEPTION_NO_TOOL_SESSIONS is set to false");
voteGeneralMonitoringDTO.setUserExceptionNoToolSessions(new Boolean(false).toString());
} else {
- VoteMonitoringAction.logger.debug("USER_EXCEPTION_NO_TOOL_SESSIONS is set to true");
voteGeneralMonitoringDTO.setUserExceptionNoToolSessions(new Boolean(true).toString());
}
@@ -2705,27 +1971,20 @@
voteGeneralMonitoringDTO.setOfflineInstructions(voteContent.getOfflineInstructions());
List attachmentList = voteService.retrieveVoteUploadedFiles(voteContent);
- VoteMonitoringAction.logger.debug("attachmentList: " + attachmentList);
voteGeneralMonitoringDTO.setAttachmentList(attachmentList);
voteGeneralMonitoringDTO.setDeletedAttachmentList(new ArrayList());
/** ...till here * */
- VoteMonitoringAction.logger.debug("end of refreshSummaryData, voteGeneralMonitoringDTO"
- + voteGeneralMonitoringDTO);
request.setAttribute(VoteAppConstants.VOTE_GENERAL_MONITORING_DTO, voteGeneralMonitoringDTO);
/* find out if there are any reflection entries, from here */
boolean notebookEntriesExist = MonitoringUtil.notebookEntriesExist(voteService, voteContent);
- VoteMonitoringAction.logger.debug("notebookEntriesExist : " + notebookEntriesExist);
if (notebookEntriesExist) {
request.setAttribute(VoteAppConstants.NOTEBOOK_ENTRIES_EXIST, new Boolean(true).toString());
String userExceptionNoToolSessions = voteGeneralAuthoringDTO.getUserExceptionNoToolSessions();
- VoteMonitoringAction.logger.debug("userExceptionNoToolSessions : " + userExceptionNoToolSessions);
-
if (userExceptionNoToolSessions.equals("true")) {
- VoteMonitoringAction.logger.debug("there are no online student activity but there are reflections : ");
request.setAttribute(VoteAppConstants.NO_SESSIONS_NOTEBOOK_ENTRIES_EXIST, new Boolean(true).toString());
}
} else {
@@ -2734,14 +1993,11 @@
/* ... till here */
MonitoringUtil.buildVoteStatsDTO(request, voteService, voteContent);
-
- VoteMonitoringAction.logger.debug("fwd ing to editNominationBox: ");
return mapping.findForward("editNominationBox");
}
/**
- * removes a question from the questions map ActionForward removeNomination(ActionMapping mapping, ActionForm form,
- * HttpServletRequest request, HttpServletResponse response) throws IOException, ServletException
+ * removes a question from the questions map
*
* @param mapping
* @param form
@@ -2753,35 +2009,24 @@
*/
public ActionForward removeNomination(ActionMapping mapping, ActionForm form, HttpServletRequest request,
HttpServletResponse response) throws IOException, ServletException {
- VoteMonitoringAction.logger.debug("dispatching removeNomination");
VoteMonitoringForm voteAuthoringForm = (VoteMonitoringForm) form;
IVoteService voteService = VoteServiceProxy.getVoteService(getServlet().getServletContext());
- VoteMonitoringAction.logger.debug("voteService: " + voteService);
-
String httpSessionID = voteAuthoringForm.getHttpSessionID();
- VoteMonitoringAction.logger.debug("httpSessionID: " + httpSessionID);
SessionMap sessionMap = (SessionMap) request.getSession().getAttribute(httpSessionID);
- VoteMonitoringAction.logger.debug("sessionMap: " + sessionMap);
String questionIndex = request.getParameter("questionIndex");
- VoteMonitoringAction.logger.debug("questionIndex: " + questionIndex);
List listNominationContentDTO = (List) sessionMap.get(VoteAppConstants.LIST_NOMINATION_CONTENT_DTO_KEY);
- VoteMonitoringAction.logger.debug("listNominationContentDTO: " + listNominationContentDTO);
VoteNominationContentDTO voteNominationContentDTO = null;
Iterator listIterator = listNominationContentDTO.iterator();
while (listIterator.hasNext()) {
voteNominationContentDTO = (VoteNominationContentDTO) listIterator.next();
- VoteMonitoringAction.logger.debug("voteNominationContentDTO:" + voteNominationContentDTO);
- VoteMonitoringAction.logger.debug("voteNominationContentDTO question:"
- + voteNominationContentDTO.getNomination());
String question = voteNominationContentDTO.getNomination();
String displayOrder = voteNominationContentDTO.getDisplayOrder();
- VoteMonitoringAction.logger.debug("displayOrder:" + displayOrder);
if (displayOrder != null && !displayOrder.equals("")) {
if (displayOrder.equals(questionIndex)) {
@@ -2791,50 +2036,36 @@
}
}
- VoteMonitoringAction.logger.debug("voteNominationContentDTO found:" + voteNominationContentDTO);
voteNominationContentDTO.setNomination("");
- VoteMonitoringAction.logger.debug("listNominationContentDTO after remove:" + listNominationContentDTO);
listNominationContentDTO = AuthoringUtil.reorderListNominationContentDTO(listNominationContentDTO,
questionIndex);
- VoteMonitoringAction.logger.debug("listNominationContentDTO reordered:" + listNominationContentDTO);
sessionMap.put(VoteAppConstants.LIST_NOMINATION_CONTENT_DTO_KEY, listNominationContentDTO);
String contentFolderID = WebUtil.readStrParam(request, AttributeNames.PARAM_CONTENT_FOLDER_ID);
- VoteMonitoringAction.logger.debug("contentFolderID: " + contentFolderID);
voteAuthoringForm.setContentFolderID(contentFolderID);
String activeModule = request.getParameter(VoteAppConstants.ACTIVE_MODULE);
- VoteMonitoringAction.logger.debug("activeModule: " + activeModule);
String richTextTitle = request.getParameter(VoteAppConstants.TITLE);
- VoteMonitoringAction.logger.debug("richTextTitle: " + richTextTitle);
String richTextInstructions = request.getParameter(VoteAppConstants.INSTRUCTIONS);
- VoteMonitoringAction.logger.debug("richTextInstructions: " + richTextInstructions);
sessionMap.put(VoteAppConstants.ACTIVITY_TITLE_KEY, richTextTitle);
sessionMap.put(VoteAppConstants.ACTIVITY_INSTRUCTIONS_KEY, richTextInstructions);
String strToolContentID = request.getParameter(AttributeNames.PARAM_TOOL_CONTENT_ID);
- VoteMonitoringAction.logger.debug("strToolContentID: " + strToolContentID);
String defaultContentIdStr = request.getParameter(VoteAppConstants.DEFAULT_CONTENT_ID_STR);
- VoteMonitoringAction.logger.debug("defaultContentIdStr: " + defaultContentIdStr);
VoteContent voteContent = voteService.retrieveVote(new Long(strToolContentID));
- VoteMonitoringAction.logger.debug("voteContent: " + voteContent);
if (voteContent == null) {
- VoteMonitoringAction.logger.debug("using defaultContentIdStr: " + defaultContentIdStr);
voteContent = voteService.retrieveVote(new Long(defaultContentIdStr));
-
}
- VoteMonitoringAction.logger.debug("final voteContent: " + voteContent);
VoteGeneralAuthoringDTO voteGeneralAuthoringDTO = new VoteGeneralAuthoringDTO();
- VoteMonitoringAction.logger.debug("voteGeneralAuthoringDTO: " + voteGeneralAuthoringDTO);
voteGeneralAuthoringDTO.setContentFolderID(contentFolderID);
voteGeneralAuthoringDTO.setActivityTitle(richTextTitle);
@@ -2859,13 +2090,10 @@
voteAuthoringForm.setCurrentTab("3");
request.setAttribute(VoteAppConstants.LIST_NOMINATION_CONTENT_DTO, listNominationContentDTO);
- VoteMonitoringAction.logger.debug("voteNominationContentDTO now: " + voteNominationContentDTO);
- VoteMonitoringAction.logger.debug("listNominationContentDTO now: " + listNominationContentDTO);
voteGeneralAuthoringDTO.setDefineLaterInEditMode(new Boolean(true).toString());
repopulateRequestParameters(request, voteAuthoringForm, voteGeneralAuthoringDTO);
- VoteMonitoringAction.logger.debug("before saving final voteGeneralAuthoringDTO: " + voteGeneralAuthoringDTO);
request.setAttribute(VoteAppConstants.VOTE_GENERAL_AUTHORING_DTO, voteGeneralAuthoringDTO);
request.setAttribute(VoteAppConstants.TOTAL_NOMINATION_COUNT, new Integer(listNominationContentDTO.size()));
@@ -2875,7 +2103,6 @@
EditActivityDTO editActivityDTO = new EditActivityDTO();
boolean isContentInUse = VoteUtils.isContentInUse(voteContent);
- VoteMonitoringAction.logger.debug("isContentInUse:" + isContentInUse);
if (isContentInUse == true) {
editActivityDTO.setMonitoredContentInUse(new Boolean(false).toString());
}
@@ -2884,16 +2111,13 @@
/* find out if there are any reflection entries, from here */
boolean notebookEntriesExist = MonitoringUtil.notebookEntriesExist(voteService, voteContent);
- VoteMonitoringAction.logger.debug("notebookEntriesExist : " + notebookEntriesExist);
VoteGeneralMonitoringDTO voteGeneralMonitoringDTO = new VoteGeneralMonitoringDTO();
voteGeneralMonitoringDTO.setDefineLaterInEditMode(new Boolean(true).toString());
if (voteService.studentActivityOccurredGlobal(voteContent)) {
- VoteMonitoringAction.logger.debug("USER_EXCEPTION_NO_TOOL_SESSIONS is set to false");
voteGeneralMonitoringDTO.setUserExceptionNoToolSessions(new Boolean(false).toString());
} else {
- VoteMonitoringAction.logger.debug("USER_EXCEPTION_NO_TOOL_SESSIONS is set to true");
voteGeneralMonitoringDTO.setUserExceptionNoToolSessions(new Boolean(true).toString());
}
@@ -2902,23 +2126,18 @@
voteGeneralMonitoringDTO.setOfflineInstructions(voteContent.getOfflineInstructions());
List attachmentList = voteService.retrieveVoteUploadedFiles(voteContent);
- VoteMonitoringAction.logger.debug("attachmentList: " + attachmentList);
voteGeneralMonitoringDTO.setAttachmentList(attachmentList);
voteGeneralMonitoringDTO.setDeletedAttachmentList(new ArrayList());
/** ...till here * */
- VoteMonitoringAction.logger.debug("end of refreshSummaryData, voteGeneralMonitoringDTO"
- + voteGeneralMonitoringDTO);
request.setAttribute(VoteAppConstants.VOTE_GENERAL_MONITORING_DTO, voteGeneralMonitoringDTO);
if (notebookEntriesExist) {
request.setAttribute(VoteAppConstants.NOTEBOOK_ENTRIES_EXIST, new Boolean(true).toString());
String userExceptionNoToolSessions = voteGeneralAuthoringDTO.getUserExceptionNoToolSessions();
- VoteMonitoringAction.logger.debug("userExceptionNoToolSessions : " + userExceptionNoToolSessions);
if (userExceptionNoToolSessions.equals("true")) {
- VoteMonitoringAction.logger.debug("there are no online student activity but there are reflections : ");
request.setAttribute(VoteAppConstants.NO_SESSIONS_NOTEBOOK_ENTRIES_EXIST, new Boolean(true).toString());
}
} else {
@@ -2928,7 +2147,6 @@
MonitoringUtil.buildVoteStatsDTO(request, voteService, voteContent);
- VoteMonitoringAction.logger.debug("fwd ing to LOAD_MONITORING: " + VoteAppConstants.LOAD_MONITORING);
return mapping.findForward(VoteAppConstants.LOAD_MONITORING);
}
@@ -2945,59 +2163,43 @@
*/
public ActionForward moveNominationDown(ActionMapping mapping, ActionForm form, HttpServletRequest request,
HttpServletResponse response) throws IOException, ServletException {
- VoteMonitoringAction.logger.debug("dispatching moveNominationDown");
VoteMonitoringForm voteAuthoringForm = (VoteMonitoringForm) form;
IVoteService voteService = VoteServiceProxy.getVoteService(getServlet().getServletContext());
- VoteMonitoringAction.logger.debug("voteService: " + voteService);
String httpSessionID = voteAuthoringForm.getHttpSessionID();
- VoteMonitoringAction.logger.debug("httpSessionID: " + httpSessionID);
SessionMap sessionMap = (SessionMap) request.getSession().getAttribute(httpSessionID);
- VoteMonitoringAction.logger.debug("sessionMap: " + sessionMap);
String questionIndex = request.getParameter("questionIndex");
- VoteMonitoringAction.logger.debug("questionIndex: " + questionIndex);
List listNominationContentDTO = (List) sessionMap.get(VoteAppConstants.LIST_NOMINATION_CONTENT_DTO_KEY);
- VoteMonitoringAction.logger.debug("listNominationContentDTO: " + listNominationContentDTO);
listNominationContentDTO = AuthoringUtil.swapNodes(listNominationContentDTO, questionIndex, "down");
- VoteMonitoringAction.logger.debug("listNominationContentDTO after swap: " + listNominationContentDTO);
listNominationContentDTO = AuthoringUtil.reorderSimpleListNominationContentDTO(listNominationContentDTO);
- VoteMonitoringAction.logger.debug("listNominationContentDTO after reordersimple: " + listNominationContentDTO);
sessionMap.put(VoteAppConstants.LIST_NOMINATION_CONTENT_DTO_KEY, listNominationContentDTO);
String contentFolderID = WebUtil.readStrParam(request, AttributeNames.PARAM_CONTENT_FOLDER_ID);
- VoteMonitoringAction.logger.debug("contentFolderID: " + contentFolderID);
voteAuthoringForm.setContentFolderID(contentFolderID);
String activeModule = request.getParameter(VoteAppConstants.ACTIVE_MODULE);
- VoteMonitoringAction.logger.debug("activeModule: " + activeModule);
String richTextTitle = request.getParameter(VoteAppConstants.TITLE);
- VoteMonitoringAction.logger.debug("richTextTitle: " + richTextTitle);
String richTextInstructions = request.getParameter(VoteAppConstants.INSTRUCTIONS);
- VoteMonitoringAction.logger.debug("richTextInstructions: " + richTextInstructions);
sessionMap.put(VoteAppConstants.ACTIVITY_TITLE_KEY, richTextTitle);
sessionMap.put(VoteAppConstants.ACTIVITY_INSTRUCTIONS_KEY, richTextInstructions);
String strToolContentID = request.getParameter(AttributeNames.PARAM_TOOL_CONTENT_ID);
- VoteMonitoringAction.logger.debug("strToolContentID: " + strToolContentID);
String defaultContentIdStr = request.getParameter(VoteAppConstants.DEFAULT_CONTENT_ID_STR);
- VoteMonitoringAction.logger.debug("defaultContentIdStr: " + defaultContentIdStr);
VoteContent voteContent = voteService.retrieveVote(new Long(strToolContentID));
- VoteMonitoringAction.logger.debug("voteContent: " + voteContent);
VoteGeneralAuthoringDTO voteGeneralAuthoringDTO = new VoteGeneralAuthoringDTO();
- VoteMonitoringAction.logger.debug("voteGeneralAuthoringDTO: " + voteGeneralAuthoringDTO);
voteGeneralAuthoringDTO.setContentFolderID(contentFolderID);
voteGeneralAuthoringDTO.setActivityTitle(richTextTitle);
@@ -3022,12 +2224,10 @@
voteAuthoringForm.setCurrentTab("3");
request.setAttribute(VoteAppConstants.LIST_NOMINATION_CONTENT_DTO, listNominationContentDTO);
- VoteMonitoringAction.logger.debug("listNominationContentDTO now: " + listNominationContentDTO);
voteGeneralAuthoringDTO.setDefineLaterInEditMode(new Boolean(true).toString());
repopulateRequestParameters(request, voteAuthoringForm, voteGeneralAuthoringDTO);
- VoteMonitoringAction.logger.debug("before saving final voteGeneralAuthoringDTO: " + voteGeneralAuthoringDTO);
request.setAttribute(VoteAppConstants.VOTE_GENERAL_AUTHORING_DTO, voteGeneralAuthoringDTO);
request.setAttribute(VoteAppConstants.TOTAL_NOMINATION_COUNT, new Integer(listNominationContentDTO.size()));
@@ -3037,7 +2237,6 @@
EditActivityDTO editActivityDTO = new EditActivityDTO();
boolean isContentInUse = VoteUtils.isContentInUse(voteContent);
- VoteMonitoringAction.logger.debug("isContentInUse:" + isContentInUse);
if (isContentInUse == true) {
editActivityDTO.setMonitoredContentInUse(new Boolean(false).toString());
}
@@ -3046,16 +2245,13 @@
/* find out if there are any reflection entries, from here */
boolean notebookEntriesExist = MonitoringUtil.notebookEntriesExist(voteService, voteContent);
- VoteMonitoringAction.logger.debug("notebookEntriesExist : " + notebookEntriesExist);
VoteGeneralMonitoringDTO voteGeneralMonitoringDTO = new VoteGeneralMonitoringDTO();
voteGeneralMonitoringDTO.setDefineLaterInEditMode(new Boolean(true).toString());
if (voteService.studentActivityOccurredGlobal(voteContent)) {
- VoteMonitoringAction.logger.debug("USER_EXCEPTION_NO_TOOL_SESSIONS is set to false");
voteGeneralMonitoringDTO.setUserExceptionNoToolSessions(new Boolean(false).toString());
} else {
- VoteMonitoringAction.logger.debug("USER_EXCEPTION_NO_TOOL_SESSIONS is set to true");
voteGeneralMonitoringDTO.setUserExceptionNoToolSessions(new Boolean(true).toString());
}
@@ -3064,23 +2260,18 @@
voteGeneralMonitoringDTO.setOfflineInstructions(voteContent.getOfflineInstructions());
List attachmentList = voteService.retrieveVoteUploadedFiles(voteContent);
- VoteMonitoringAction.logger.debug("attachmentList: " + attachmentList);
voteGeneralMonitoringDTO.setAttachmentList(attachmentList);
voteGeneralMonitoringDTO.setDeletedAttachmentList(new ArrayList());
/** ...till here * */
- VoteMonitoringAction.logger.debug("end of refreshSummaryData, voteGeneralMonitoringDTO"
- + voteGeneralMonitoringDTO);
request.setAttribute(VoteAppConstants.VOTE_GENERAL_MONITORING_DTO, voteGeneralMonitoringDTO);
if (notebookEntriesExist) {
request.setAttribute(VoteAppConstants.NOTEBOOK_ENTRIES_EXIST, new Boolean(true).toString());
String userExceptionNoToolSessions = voteGeneralAuthoringDTO.getUserExceptionNoToolSessions();
- VoteMonitoringAction.logger.debug("userExceptionNoToolSessions : " + userExceptionNoToolSessions);
if (userExceptionNoToolSessions.equals("true")) {
- VoteMonitoringAction.logger.debug("there are no online student activity but there are reflections : ");
request.setAttribute(VoteAppConstants.NO_SESSIONS_NOTEBOOK_ENTRIES_EXIST, new Boolean(true).toString());
}
} else {
@@ -3090,7 +2281,6 @@
MonitoringUtil.buildVoteStatsDTO(request, voteService, voteContent);
- VoteMonitoringAction.logger.debug("fwd ing to LOAD_MONITORING: " + VoteAppConstants.LOAD_MONITORING);
return mapping.findForward(VoteAppConstants.LOAD_MONITORING);
}
@@ -3107,59 +2297,43 @@
*/
public ActionForward moveNominationUp(ActionMapping mapping, ActionForm form, HttpServletRequest request,
HttpServletResponse response) throws IOException, ServletException {
- VoteMonitoringAction.logger.debug("dispatching moveNominationUp");
VoteMonitoringForm voteAuthoringForm = (VoteMonitoringForm) form;
IVoteService voteService = VoteServiceProxy.getVoteService(getServlet().getServletContext());
- VoteMonitoringAction.logger.debug("voteService: " + voteService);
String httpSessionID = voteAuthoringForm.getHttpSessionID();
- VoteMonitoringAction.logger.debug("httpSessionID: " + httpSessionID);
SessionMap sessionMap = (SessionMap) request.getSession().getAttribute(httpSessionID);
- VoteMonitoringAction.logger.debug("sessionMap: " + sessionMap);
String questionIndex = request.getParameter("questionIndex");
- VoteMonitoringAction.logger.debug("questionIndex: " + questionIndex);
List listNominationContentDTO = (List) sessionMap.get(VoteAppConstants.LIST_NOMINATION_CONTENT_DTO_KEY);
- VoteMonitoringAction.logger.debug("listNominationContentDTO: " + listNominationContentDTO);
listNominationContentDTO = AuthoringUtil.swapNodes(listNominationContentDTO, questionIndex, "up");
- VoteMonitoringAction.logger.debug("listNominationContentDTO after swap: " + listNominationContentDTO);
listNominationContentDTO = AuthoringUtil.reorderSimpleListNominationContentDTO(listNominationContentDTO);
- VoteMonitoringAction.logger.debug("listNominationContentDTO after reordersimple: " + listNominationContentDTO);
sessionMap.put(VoteAppConstants.LIST_NOMINATION_CONTENT_DTO_KEY, listNominationContentDTO);
String contentFolderID = WebUtil.readStrParam(request, AttributeNames.PARAM_CONTENT_FOLDER_ID);
- VoteMonitoringAction.logger.debug("contentFolderID: " + contentFolderID);
voteAuthoringForm.setContentFolderID(contentFolderID);
String activeModule = request.getParameter(VoteAppConstants.ACTIVE_MODULE);
- VoteMonitoringAction.logger.debug("activeModule: " + activeModule);
String richTextTitle = request.getParameter(VoteAppConstants.TITLE);
- VoteMonitoringAction.logger.debug("richTextTitle: " + richTextTitle);
String richTextInstructions = request.getParameter(VoteAppConstants.INSTRUCTIONS);
- VoteMonitoringAction.logger.debug("richTextInstructions: " + richTextInstructions);
sessionMap.put(VoteAppConstants.ACTIVITY_TITLE_KEY, richTextTitle);
sessionMap.put(VoteAppConstants.ACTIVITY_INSTRUCTIONS_KEY, richTextInstructions);
String strToolContentID = request.getParameter(AttributeNames.PARAM_TOOL_CONTENT_ID);
- VoteMonitoringAction.logger.debug("strToolContentID: " + strToolContentID);
String defaultContentIdStr = request.getParameter(VoteAppConstants.DEFAULT_CONTENT_ID_STR);
- VoteMonitoringAction.logger.debug("defaultContentIdStr: " + defaultContentIdStr);
VoteContent voteContent = voteService.retrieveVote(new Long(strToolContentID));
- VoteMonitoringAction.logger.debug("voteContent: " + voteContent);
VoteGeneralAuthoringDTO voteGeneralAuthoringDTO = new VoteGeneralAuthoringDTO();
- VoteMonitoringAction.logger.debug("voteGeneralAuthoringDTO: " + voteGeneralAuthoringDTO);
voteGeneralAuthoringDTO.setContentFolderID(contentFolderID);
voteGeneralAuthoringDTO.setActivityTitle(richTextTitle);
@@ -3184,12 +2358,10 @@
voteAuthoringForm.setCurrentTab("3");
request.setAttribute(VoteAppConstants.LIST_NOMINATION_CONTENT_DTO, listNominationContentDTO);
- VoteMonitoringAction.logger.debug("listNominationContentDTO now: " + listNominationContentDTO);
voteGeneralAuthoringDTO.setDefineLaterInEditMode(new Boolean(true).toString());
repopulateRequestParameters(request, voteAuthoringForm, voteGeneralAuthoringDTO);
- VoteMonitoringAction.logger.debug("before saving final voteGeneralAuthoringDTO: " + voteGeneralAuthoringDTO);
request.setAttribute(VoteAppConstants.VOTE_GENERAL_AUTHORING_DTO, voteGeneralAuthoringDTO);
request.setAttribute(VoteAppConstants.TOTAL_NOMINATION_COUNT, new Integer(listNominationContentDTO.size()));
@@ -3200,7 +2372,6 @@
EditActivityDTO editActivityDTO = new EditActivityDTO();
boolean isContentInUse = VoteUtils.isContentInUse(voteContent);
- VoteMonitoringAction.logger.debug("isContentInUse:" + isContentInUse);
if (isContentInUse == true) {
editActivityDTO.setMonitoredContentInUse(new Boolean(false).toString());
}
@@ -3209,16 +2380,12 @@
/* find out if there are any reflection entries, from here */
boolean notebookEntriesExist = MonitoringUtil.notebookEntriesExist(voteService, voteContent);
- VoteMonitoringAction.logger.debug("notebookEntriesExist : " + notebookEntriesExist);
-
VoteGeneralMonitoringDTO voteGeneralMonitoringDTO = new VoteGeneralMonitoringDTO();
voteGeneralMonitoringDTO.setDefineLaterInEditMode(new Boolean(true).toString());
if (voteService.studentActivityOccurredGlobal(voteContent)) {
- VoteMonitoringAction.logger.debug("USER_EXCEPTION_NO_TOOL_SESSIONS is set to false");
voteGeneralMonitoringDTO.setUserExceptionNoToolSessions(new Boolean(false).toString());
} else {
- VoteMonitoringAction.logger.debug("USER_EXCEPTION_NO_TOOL_SESSIONS is set to true");
voteGeneralMonitoringDTO.setUserExceptionNoToolSessions(new Boolean(true).toString());
}
@@ -3227,23 +2394,17 @@
voteGeneralMonitoringDTO.setOfflineInstructions(voteContent.getOfflineInstructions());
List attachmentList = voteService.retrieveVoteUploadedFiles(voteContent);
- VoteMonitoringAction.logger.debug("attachmentList: " + attachmentList);
voteGeneralMonitoringDTO.setAttachmentList(attachmentList);
voteGeneralMonitoringDTO.setDeletedAttachmentList(new ArrayList());
/** ...till here * */
- VoteMonitoringAction.logger.debug("end of refreshSummaryData, voteGeneralMonitoringDTO"
- + voteGeneralMonitoringDTO);
request.setAttribute(VoteAppConstants.VOTE_GENERAL_MONITORING_DTO, voteGeneralMonitoringDTO);
if (notebookEntriesExist) {
request.setAttribute(VoteAppConstants.NOTEBOOK_ENTRIES_EXIST, new Boolean(true).toString());
String userExceptionNoToolSessions = voteGeneralAuthoringDTO.getUserExceptionNoToolSessions();
- VoteMonitoringAction.logger.debug("userExceptionNoToolSessions : " + userExceptionNoToolSessions);
-
if (userExceptionNoToolSessions.equals("true")) {
- VoteMonitoringAction.logger.debug("there are no online student activity but there are reflections : ");
request.setAttribute(VoteAppConstants.NO_SESSIONS_NOTEBOOK_ENTRIES_EXIST, new Boolean(true).toString());
}
} else {
@@ -3253,22 +2414,14 @@
MonitoringUtil.buildVoteStatsDTO(request, voteService, voteContent);
- VoteMonitoringAction.logger.debug("fwd ing to LOAD_MONITORING: " + VoteAppConstants.LOAD_MONITORING);
return mapping.findForward(VoteAppConstants.LOAD_MONITORING);
}
public void prepareReflectionData(HttpServletRequest request, VoteContent voteContent, IVoteService voteService,
String userID, boolean exportMode, String currentSessionId) {
- VoteMonitoringAction.logger.debug("starting prepareReflectionData: " + voteContent);
- VoteMonitoringAction.logger.debug("currentSessionId: " + currentSessionId);
- VoteMonitoringAction.logger.debug("userID: " + userID);
- VoteMonitoringAction.logger.debug("exportMode: " + exportMode);
-
List reflectionsContainerDTO = new LinkedList();
reflectionsContainerDTO = getReflectionList(voteContent, userID, voteService);
-
- VoteMonitoringAction.logger.debug("reflectionsContainerDTO: " + reflectionsContainerDTO);
request.setAttribute(VoteAppConstants.REFLECTIONS_CONTAINER_DTO, reflectionsContainerDTO);
if (exportMode) {
@@ -3287,25 +2440,18 @@
* @return
*/
public List getReflectionList(VoteContent voteContent, String userID, IVoteService voteService) {
- VoteMonitoringAction.logger.debug("getting reflections for all sessions");
List reflectionsContainerDTO = new LinkedList();
if (userID == null) {
- VoteMonitoringAction.logger.debug("all users mode");
for (Iterator sessionIter = voteContent.getVoteSessions().iterator(); sessionIter.hasNext();) {
VoteSession voteSession = (VoteSession) sessionIter.next();
- VoteMonitoringAction.logger.debug("voteSession: " + voteSession);
- VoteMonitoringAction.logger.debug("voteSession sessionId: " + voteSession.getVoteSessionId());
for (Iterator userIter = voteSession.getVoteQueUsers().iterator(); userIter.hasNext();) {
VoteQueUsr user = (VoteQueUsr) userIter.next();
- VoteMonitoringAction.logger.debug("user: " + user);
NotebookEntry notebookEntry = voteService.getEntry(voteSession.getVoteSessionId(),
CoreNotebookConstants.NOTEBOOK_TOOL, VoteAppConstants.MY_SIGNATURE, new Integer(user
.getQueUsrId().toString()));
- VoteMonitoringAction.logger.debug("notebookEntry: " + notebookEntry);
-
if (notebookEntry != null) {
ReflectionDTO reflectionDTO = new ReflectionDTO();
reflectionDTO.setUserId(user.getQueUsrId().toString());
@@ -3319,22 +2465,15 @@
}
}
} else {
- VoteMonitoringAction.logger.debug("single user mode");
for (Iterator sessionIter = voteContent.getVoteSessions().iterator(); sessionIter.hasNext();) {
VoteSession voteSession = (VoteSession) sessionIter.next();
- VoteMonitoringAction.logger.debug("voteSession: " + voteSession);
for (Iterator userIter = voteSession.getVoteQueUsers().iterator(); userIter.hasNext();) {
VoteQueUsr user = (VoteQueUsr) userIter.next();
- VoteMonitoringAction.logger.debug("user: " + user);
-
if (user.getQueUsrId().toString().equals(userID)) {
- VoteMonitoringAction.logger.debug("getting reflection for user with userID: " + userID);
NotebookEntry notebookEntry = voteService.getEntry(voteSession.getVoteSessionId(),
CoreNotebookConstants.NOTEBOOK_TOOL, VoteAppConstants.MY_SIGNATURE, new Integer(user
.getQueUsrId().toString()));
- VoteMonitoringAction.logger.debug("notebookEntry: " + notebookEntry);
-
if (notebookEntry != null) {
ReflectionDTO reflectionDTO = new ReflectionDTO();
reflectionDTO.setUserId(user.getQueUsrId().toString());
@@ -3356,9 +2495,6 @@
/**
* returns reflection data for a specific session
*
- * getReflectionListForSession(VoteContent voteContent, String userID, IVoteService voteService, String
- * currentSessionId)
- *
* @param voteContent
* @param userID
* @param voteService
@@ -3367,29 +2503,21 @@
*/
public List getReflectionListForSession(VoteContent voteContent, String userID, IVoteService voteService,
String currentSessionId) {
- VoteMonitoringAction.logger.debug("getting reflections for a specific session");
- VoteMonitoringAction.logger.debug("currentSessionId: " + currentSessionId);
List reflectionsContainerDTO = new LinkedList();
if (userID == null) {
- VoteMonitoringAction.logger.debug("all users mode");
for (Iterator sessionIter = voteContent.getVoteSessions().iterator(); sessionIter.hasNext();) {
VoteSession voteSession = (VoteSession) sessionIter.next();
- VoteMonitoringAction.logger.debug("voteSession: " + voteSession);
- VoteMonitoringAction.logger.debug("voteSession sessionId: " + voteSession.getVoteSessionId());
if (currentSessionId.equals(voteSession.getVoteSessionId())) {
for (Iterator userIter = voteSession.getVoteQueUsers().iterator(); userIter.hasNext();) {
VoteQueUsr user = (VoteQueUsr) userIter.next();
- VoteMonitoringAction.logger.debug("user: " + user);
NotebookEntry notebookEntry = voteService.getEntry(voteSession.getVoteSessionId(),
CoreNotebookConstants.NOTEBOOK_TOOL, VoteAppConstants.MY_SIGNATURE, new Integer(user
.getQueUsrId().toString()));
- VoteMonitoringAction.logger.debug("notebookEntry: " + notebookEntry);
-
if (notebookEntry != null) {
ReflectionDTO reflectionDTO = new ReflectionDTO();
reflectionDTO.setUserId(user.getQueUsrId().toString());
@@ -3404,24 +2532,18 @@
}
}
} else {
- VoteMonitoringAction.logger.debug("single user mode");
for (Iterator sessionIter = voteContent.getVoteSessions().iterator(); sessionIter.hasNext();) {
VoteSession voteSession = (VoteSession) sessionIter.next();
- VoteMonitoringAction.logger.debug("voteSession: " + voteSession);
if (currentSessionId.equals(voteSession.getVoteSessionId())) {
for (Iterator userIter = voteSession.getVoteQueUsers().iterator(); userIter.hasNext();) {
VoteQueUsr user = (VoteQueUsr) userIter.next();
- VoteMonitoringAction.logger.debug("user: " + user);
if (user.getQueUsrId().toString().equals(userID)) {
- VoteMonitoringAction.logger.debug("getting reflection for user with userID: " + userID);
NotebookEntry notebookEntry = voteService.getEntry(voteSession.getVoteSessionId(),
CoreNotebookConstants.NOTEBOOK_TOOL, VoteAppConstants.MY_SIGNATURE, new Integer(
user.getQueUsrId().toString()));
- VoteMonitoringAction.logger.debug("notebookEntry: " + notebookEntry);
-
if (notebookEntry != null) {
ReflectionDTO reflectionDTO = new ReflectionDTO();
reflectionDTO.setUserId(user.getQueUsrId().toString());
Index: lams_tool_vote/src/java/org/lamsfoundation/lams/tool/vote/web/VoteMonitoringStarterAction.java
===================================================================
diff -u -rddc0da3d278fb12ac8374ad59146a8990ea2f3a2 -r601fd92095193321a6b2286ef55108fbe5f9dfc4
--- lams_tool_vote/src/java/org/lamsfoundation/lams/tool/vote/web/VoteMonitoringStarterAction.java (.../VoteMonitoringStarterAction.java) (revision ddc0da3d278fb12ac8374ad59146a8990ea2f3a2)
+++ lams_tool_vote/src/java/org/lamsfoundation/lams/tool/vote/web/VoteMonitoringStarterAction.java (.../VoteMonitoringStarterAction.java) (revision 601fd92095193321a6b2286ef55108fbe5f9dfc4)
@@ -64,61 +64,25 @@
* Starts up the monitoring module
*
* @author Ozgur Demirtas
- *
-
-
-
-
-
-
-
-
-
-
-
- *
*/
-
public class VoteMonitoringStarterAction extends Action implements VoteAppConstants {
static Logger logger = Logger.getLogger(VoteMonitoringStarterAction.class.getName());
public ActionForward execute(ActionMapping mapping, ActionForm form, HttpServletRequest request, HttpServletResponse response)
throws IOException, ServletException, VoteApplicationException
{
- logger.debug("init VoteMonitoringStarterAction...");
VoteUtils.cleanUpSessionAbsolute(request);
IVoteService voteService = VoteServiceProxy.getVoteService(getServlet().getServletContext());
- logger.debug("voteService: " + voteService);
MessageService messageService = VoteServiceProxy.getMessageService(getServlet().getServletContext());
VoteMonitoringForm voteMonitoringForm = (VoteMonitoringForm) form;
- logger.debug("voteMonitoringForm: " + voteMonitoringForm);
VoteGeneralAuthoringDTO voteGeneralAuthoringDTO= new VoteGeneralAuthoringDTO();
VoteGeneralMonitoringDTO voteGeneralMonitoringDTO=new VoteGeneralMonitoringDTO();
ActionForward validateParameters=validateParameters(request, mapping, voteMonitoringForm);
- logger.debug("validateParamaters: " + validateParameters);
if (validateParameters != null)
{
@@ -127,16 +91,13 @@
boolean initData=initialiseMonitoringData(mapping, form, request, response,
voteService, voteGeneralMonitoringDTO);
- logger.debug("initData: " + initData);
if (initData == false)
return (mapping.findForward(ERROR_LIST));
voteMonitoringForm.setCurrentTab("1");
voteGeneralMonitoringDTO.setCurrentTab("1");
- logger.debug("setting current tab to 1: ");
String toolContentID=voteMonitoringForm.getToolContentID();
- logger.debug("toolContentID: " + toolContentID);
voteGeneralMonitoringDTO.setUserExceptionNoToolSessions(new Boolean(true).toString());
//Come back to fix here
@@ -145,30 +106,19 @@
VoteMonitoringAction voteMonitoringAction= new VoteMonitoringAction();
- logger.debug("calling initSummaryContent.");
voteMonitoringAction.initSummaryContent(toolContentID , request, voteService, voteGeneralMonitoringDTO);
- logger.debug("post initSummaryContent, voteGeneralMonitoringDTO: " + voteGeneralMonitoringDTO);
-
- logger.debug("calling initInstructionsContent.");
- logger.debug("post initInstructionsContent, voteGeneralMonitoringDTO: " + voteGeneralMonitoringDTO);
-
- logger.debug("calling initStatsContent.");
voteMonitoringAction.initStatsContent(toolContentID, request, voteService, voteGeneralMonitoringDTO);
- logger.debug("post initStatsContent, voteGeneralMonitoringDTO: " + voteGeneralMonitoringDTO);
VoteContent voteContent=voteService.retrieveVote(new Long(toolContentID));
- logger.debug("voteContent: " + voteContent);
/*true means there is at least 1 response*/
if (voteService.studentActivityOccurredStandardAndOpen(voteContent))
{
voteGeneralMonitoringDTO.setUserExceptionNoToolSessions(new Boolean(false).toString());
- logger.debug("USER_EXCEPTION_NO_TOOL_SESSIONS is set to false");
}
else
{
voteGeneralMonitoringDTO.setUserExceptionNoToolSessions(new Boolean(true).toString());
- logger.debug("USER_EXCEPTION_NO_TOOL_SESSIONS is set to true");
}
voteMonitoringForm.setActiveModule(MONITORING);
@@ -184,38 +134,31 @@
voteMonitoringForm.setShowOpenVotesSection(new Boolean(false).toString());
voteGeneralMonitoringDTO.setIsPortfolioExport(new Boolean(false).toString());
- logger.debug("calling submitSession:" + toolContentID);
request.setAttribute(VOTE_GENERAL_MONITORING_DTO, voteGeneralMonitoringDTO);
/*this section is needed for Edit Activity screen, from here... */
- logger.debug("for copy using voteGeneralMonitoringDTO: " + voteGeneralMonitoringDTO);
voteGeneralAuthoringDTO.setActivityTitle(voteGeneralMonitoringDTO.getActivityTitle());
voteGeneralAuthoringDTO.setActivityInstructions(voteGeneralMonitoringDTO.getActivityInstructions());
voteGeneralAuthoringDTO.setDefaultOptionContent(voteGeneralMonitoringDTO.getDefaultOptionContent());
voteGeneralAuthoringDTO.setMapOptionsContent(voteGeneralMonitoringDTO.getMapOptionsContent());
voteGeneralAuthoringDTO.setActiveModule(MONITORING);
Map mapOptionsContent=voteGeneralMonitoringDTO.getMapOptionsContent();
- logger.debug("mapOptionsContent: " + mapOptionsContent);
int maxIndex=mapOptionsContent.size();
- logger.debug("maxIndex: " + maxIndex);
voteGeneralAuthoringDTO.setMaxOptionIndex(maxIndex);
- logger.debug("voteGeneralAuthoringDTO: " + voteGeneralAuthoringDTO);
request.setAttribute(VOTE_GENERAL_AUTHORING_DTO, voteGeneralAuthoringDTO);
/*...till here */
//voteMonitoringAction.prepareReflectionData(request, voteContent, voteService, null, false);
- logger.debug("calling submitSession with selectedToolSessionId" + voteMonitoringForm.getSelectedToolSessionId());
return voteMonitoringAction.submitSession(mapping, voteMonitoringForm, request, response, voteService, messageService, voteGeneralMonitoringDTO);
}
public boolean initialiseMonitoringData(ActionMapping mapping, ActionForm form, HttpServletRequest request, HttpServletResponse response,
IVoteService voteService, VoteGeneralMonitoringDTO voteGeneralMonitoringDTO)
{
- logger.debug("start initializing monitoring data...voteService: " + voteService);
VoteMonitoringForm voteMonitoringForm = (VoteMonitoringForm) form;
voteMonitoringForm.setSbmtSuccess(new Boolean(false).toString());
@@ -229,10 +172,7 @@
/* we have made sure TOOL_CONTENT_ID is passed */
String toolContentID=voteMonitoringForm.getToolContentID();
- logger.debug("toolContentID: " + toolContentID);
-
VoteContent voteContent=voteService.retrieveVote(new Long(toolContentID));
- logger.debug("existing voteContent:" + voteContent);
if (voteContent == null)
{
@@ -243,31 +183,24 @@
boolean isContentInUse=VoteUtils.isContentInUse(voteContent);
- logger.debug("isContentInUse:" + isContentInUse);
voteGeneralMonitoringDTO.setIsMonitoredContentInUse(new Boolean(false).toString());
if (isContentInUse == true)
{
- logger.debug("monitoring url does not allow editActivity since the content is in use.");
voteGeneralMonitoringDTO.setIsMonitoredContentInUse(new Boolean(true).toString());
}
voteGeneralMonitoringDTO.setActivityTitle(voteContent.getTitle());
voteGeneralMonitoringDTO.setActivityInstructions(voteContent.getInstructions());
- logger.debug("checking student activity on the standard nominations:" + voteContent);
if (voteService.studentActivityOccurredStandardAndOpen(voteContent))
{
VoteUtils.cleanUpSessionAbsolute(request);
- logger.debug("student activity occurred on this content:" + voteContent);
voteGeneralMonitoringDTO.setUserExceptionContentInUse(new Boolean(true).toString());
voteGeneralMonitoringDTO.setUserExceptionNoToolSessions(new Boolean(false).toString());
- logger.debug("USER_EXCEPTION_NO_TOOL_SESSIONS is set to false");
}
else
{
voteGeneralMonitoringDTO.setUserExceptionNoToolSessions(new Boolean(true).toString());
- logger.debug("USER_EXCEPTION_NO_TOOL_SESSIONS is set to true");
- logger.debug("error.noLearnerActivity must be displayed");
}
/*
@@ -286,19 +219,16 @@
List listNominationContentDTO= new LinkedList();
Map mapOptionsContent= new TreeMap(new VoteComparator());
- logger.debug("setting existing content data from the db");
mapOptionsContent.clear();
Iterator queIterator=voteContent.getVoteQueContents().iterator();
Long mapIndex=new Long(1);
- logger.debug("mapOptionsContent: " + mapOptionsContent);
while (queIterator.hasNext())
{
VoteNominationContentDTO voteNominationContentDTO=new VoteNominationContentDTO();
VoteQueContent voteQueContent=(VoteQueContent) queIterator.next();
if (voteQueContent != null)
{
- logger.debug("question: " + voteQueContent.getQuestion());
mapOptionsContent.put(mapIndex.toString(),voteQueContent.getQuestion());
voteNominationContentDTO.setQuestion(voteQueContent.getQuestion());
@@ -308,40 +238,26 @@
mapIndex=new Long(mapIndex.longValue()+1);
}
}
- logger.debug("Map initialized with existing contentid to: " + mapOptionsContent);
voteGeneralMonitoringDTO.setMapOptionsContent(mapOptionsContent);
/* ends here*/
- logger.debug("listNominationContentDTO: " + listNominationContentDTO);
request.setAttribute(LIST_NOMINATION_CONTENT_DTO,listNominationContentDTO);
sessionMap.put(LIST_NOMINATION_CONTENT_DTO_KEY, listNominationContentDTO);
request.setAttribute(TOTAL_NOMINATION_COUNT, new Integer(listNominationContentDTO.size()));
VoteMonitoringAction voteMonitoringAction= new VoteMonitoringAction();
- logger.debug("refreshing summary data...");
voteMonitoringAction.refreshSummaryData(request, voteContent, voteService, true, false,
null, null, false, null, voteGeneralMonitoringDTO, null);
- logger.debug("post refreshSummaryData, voteGeneralMonitoringDTO: " + voteGeneralMonitoringDTO);
- logger.debug("refreshing stats data...");
voteMonitoringAction.refreshStatsData(request, voteService, voteGeneralMonitoringDTO);
- logger.debug("post refreshStatsData, voteGeneralMonitoringDTO: " + voteGeneralMonitoringDTO);
- logger.debug("refreshing instructions data...");
- //voteMonitoringAction.refreshInstructionsData(request, voteContent, voteService, voteGeneralMonitoringDTO);
-
- logger.debug("end initializing monitoring data...");
voteGeneralMonitoringDTO.setExistsOpenVotes(new Boolean(false).toString());
- logger.debug("post refreshes, voteGeneralMonitoringDTO: " + voteGeneralMonitoringDTO);
-
-
EditActivityDTO editActivityDTO = new EditActivityDTO();
isContentInUse=VoteUtils.isContentInUse(voteContent);
- logger.debug("isContentInUse:" + isContentInUse);
if (isContentInUse == true)
{
editActivityDTO.setMonitoredContentInUse(new Boolean(true).toString());
@@ -353,18 +269,15 @@
boolean notebookEntriesExist=MonitoringUtil.notebookEntriesExist(voteService, voteContent);
- logger.debug("notebookEntriesExist : " + notebookEntriesExist);
if (notebookEntriesExist)
{
request.setAttribute(NOTEBOOK_ENTRIES_EXIST, new Boolean(true).toString());
String userExceptionNoToolSessions=(String)voteGeneralMonitoringDTO.getUserExceptionNoToolSessions();
- logger.debug("userExceptionNoToolSessions : " + userExceptionNoToolSessions);
if (userExceptionNoToolSessions.equals("true"))
{
- logger.debug("there are no online student activity but there are reflections : ");
request.setAttribute(NO_SESSIONS_NOTEBOOK_ENTRIES_EXIST, new Boolean(true).toString());
}
@@ -392,10 +305,8 @@
protected ActionForward validateParameters(HttpServletRequest request, ActionMapping mapping, VoteMonitoringForm voteMonitoringForm)
{
- logger.debug("start validating monitoring parameters...");
String strToolContentId=request.getParameter(AttributeNames.PARAM_TOOL_CONTENT_ID);
- logger.debug("strToolContentId: " + strToolContentId);
if ((strToolContentId == null) || (strToolContentId.length() == 0))
{
@@ -407,12 +318,11 @@
try
{
long toolContentID=new Long(strToolContentId).longValue();
- logger.debug("passed TOOL_CONTENT_ID : " + new Long(toolContentID));
voteMonitoringForm.setToolContentID(strToolContentId);
}
catch(NumberFormatException e)
{
- logger.debug("add error.numberFormatException to ActionMessages.");
+ logger.error("add error.numberFormatException to ActionMessages.");
VoteUtils.cleanUpSessionAbsolute(request);
return (mapping.findForward(ERROR_LIST));
}
@@ -430,7 +340,7 @@
{
ActionMessages errors= new ActionMessages();
errors.add(Globals.ERROR_KEY, new ActionMessage(message));
- logger.debug("add " + message +" to ActionMessages:");
+ logger.error("add " + message +" to ActionMessages:");
saveErrors(request,errors);
}
}
Index: lams_tool_vote/src/java/org/lamsfoundation/lams/tool/vote/web/VotePedagogicalPlannerAction.java
===================================================================
diff -u -rfd8292deb95c595b3d948e003dd9ff1807f7b569 -r601fd92095193321a6b2286ef55108fbe5f9dfc4
--- lams_tool_vote/src/java/org/lamsfoundation/lams/tool/vote/web/VotePedagogicalPlannerAction.java (.../VotePedagogicalPlannerAction.java) (revision fd8292deb95c595b3d948e003dd9ff1807f7b569)
+++ lams_tool_vote/src/java/org/lamsfoundation/lams/tool/vote/web/VotePedagogicalPlannerAction.java (.../VotePedagogicalPlannerAction.java) (revision 601fd92095193321a6b2286ef55108fbe5f9dfc4)
@@ -30,7 +30,6 @@
import javax.servlet.http.HttpServletResponse;
import org.apache.commons.lang.StringUtils;
-import org.apache.log4j.Logger;
import org.apache.struts.action.ActionForm;
import org.apache.struts.action.ActionForward;
import org.apache.struts.action.ActionMapping;
@@ -48,8 +47,6 @@
public class VotePedagogicalPlannerAction extends LamsDispatchAction {
- private static Logger logger = Logger.getLogger(VotePedagogicalPlannerAction.class);
-
@Override
protected ActionForward unspecified(ActionMapping mapping, ActionForm form, HttpServletRequest request,
HttpServletResponse response) {
Index: lams_tool_vote/src/java/org/lamsfoundation/lams/tool/vote/web/VoteStarterAction.java
===================================================================
diff -u -r25187e73d76504fc9d29a21440750230e35f00fb -r601fd92095193321a6b2286ef55108fbe5f9dfc4
--- lams_tool_vote/src/java/org/lamsfoundation/lams/tool/vote/web/VoteStarterAction.java (.../VoteStarterAction.java) (revision 25187e73d76504fc9d29a21440750230e35f00fb)
+++ lams_tool_vote/src/java/org/lamsfoundation/lams/tool/vote/web/VoteStarterAction.java (.../VoteStarterAction.java) (revision 601fd92095193321a6b2286ef55108fbe5f9dfc4)
@@ -171,28 +171,23 @@
HttpServletResponse response) throws IOException, ServletException, VoteApplicationException {
VoteUtils.cleanUpSessionAbsolute(request);
- VoteStarterAction.logger.debug("init authoring mode. removed attributes...");
VoteAuthoringForm voteAuthoringForm = (VoteAuthoringForm) form;
VoteGeneralAuthoringDTO voteGeneralAuthoringDTO = new VoteGeneralAuthoringDTO();
String contentFolderID = WebUtil.readStrParam(request, AttributeNames.PARAM_CONTENT_FOLDER_ID);
- VoteStarterAction.logger.debug("contentFolderID: " + contentFolderID);
voteAuthoringForm.setContentFolderID(contentFolderID);
VoteAction voteAction = new VoteAction();
voteAction.repopulateRequestParameters(request, voteAuthoringForm, voteGeneralAuthoringDTO);
- VoteStarterAction.logger.debug("getting voteService now: servlet is: " + getServlet());
IVoteService voteService = null;
if (getServlet() != null) {
voteService = VoteServiceProxy.getVoteService(getServlet().getServletContext());
} else {
voteService = voteAuthoringForm.getVoteService();
}
- VoteStarterAction.logger.debug("final voteService: " + voteService);
-
voteAuthoringForm.setSubmissionAttempt(new Boolean(false).toString());
voteAuthoringForm.setSbmtSuccess(new Boolean(false).toString());
@@ -201,16 +196,14 @@
voteGeneralAuthoringDTO.setContentFolderID(contentFolderID);
String servletPath = request.getServletPath();
- VoteStarterAction.logger.debug("getServletPath: " + servletPath);
if (servletPath.indexOf("authoringStarter") > 0) {
- VoteStarterAction.logger.debug("request is for authoring module");
voteAuthoringForm.setActiveModule(VoteAppConstants.AUTHORING);
voteGeneralAuthoringDTO.setActiveModule(VoteAppConstants.AUTHORING);
voteAuthoringForm.setDefineLaterInEditMode(new Boolean(true).toString());
voteGeneralAuthoringDTO.setDefineLaterInEditMode(new Boolean(true).toString());
} else {
- VoteStarterAction.logger.debug("request is for define later module. either direct or by monitoring module");
+ //request is for define later module. either direct or by monitoring module
voteAuthoringForm.setActiveModule(VoteAppConstants.DEFINE_LATER);
voteGeneralAuthoringDTO.setActiveModule(VoteAppConstants.DEFINE_LATER);
@@ -234,44 +227,36 @@
*/
String sourceVoteStarter = (String) request.getAttribute(VoteAppConstants.SOURCE_VOTE_STARTER);
- VoteStarterAction.logger.debug("sourceVoteStarter: " + sourceVoteStarter);
voteAuthoringForm.resetRadioBoxes();
voteAuthoringForm.setExceptionMaxNominationInvalid(new Boolean(false).toString());
voteGeneralAuthoringDTO.setExceptionMaxNominationInvalid(new Boolean(false).toString());
ActionForward validateSignature = readSignature(request, mapping, voteService, voteAuthoringForm);
- VoteStarterAction.logger.debug("validateSignature: " + validateSignature);
if (validateSignature != null) {
- VoteStarterAction.logger.debug("validateSignature not null : " + validateSignature);
return validateSignature;
} else {
- VoteStarterAction.logger.debug("no problems getting the default content, will render authoring screen");
+ //no problems getting the default content, will render authoring screen
String strToolContentId = "";
/* the authoring url must be passed a tool content id */
strToolContentId = request.getParameter(AttributeNames.PARAM_TOOL_CONTENT_ID);
- VoteStarterAction.logger.debug("strToolContentId: " + strToolContentId);
/* this will be fixed when making changes to Monitoring module */
if (strToolContentId == null) {
/*
* watch out for a possibility that the original request for authoring module is coming from monitoring
* url
*/
- VoteStarterAction.logger
- .debug("we should IDEALLY not arrive here. The TOOL_CONTENT_ID is NOT available.");
+ //we should IDEALLY not arrive here. The TOOL_CONTENT_ID is NOT available
/* use default content instead of giving a warning */
String defaultContentId = voteAuthoringForm.getDefaultContentId();
- VoteStarterAction.logger.debug("using Voting defaultContentId: " + defaultContentId);
strToolContentId = defaultContentId;
}
- VoteStarterAction.logger.debug("final strToolContentId: " + strToolContentId);
if (strToolContentId == null || strToolContentId.equals("")) {
VoteUtils.cleanUpSessionAbsolute(request);
// saveInRequestError(request,"error.contentId.required");
VoteUtils.cleanUpSessionAbsolute(request);
- VoteStarterAction.logger.debug("forwarding to: " + VoteAppConstants.ERROR_LIST);
return mapping.findForward(VoteAppConstants.ERROR_LIST);
}
@@ -282,13 +267,12 @@
long toolContentID = 0;
try {
toolContentID = new Long(strToolContentId).longValue();
- VoteStarterAction.logger.debug("passed TOOL_CONTENT_ID : " + toolContentID);
voteAuthoringForm.setToolContentID(new Long(strToolContentId).toString());
voteGeneralAuthoringDTO.setToolContentID(new Long(strToolContentId).toString());
} catch (NumberFormatException e) {
VoteUtils.cleanUpSessionAbsolute(request);
saveInRequestError(request, "error.numberFormatException");
- VoteStarterAction.logger.debug("forwarding to: " + VoteAppConstants.ERROR_LIST);
+ VoteStarterAction.logger.error("forwarding to: " + VoteAppConstants.ERROR_LIST);
return mapping.findForward(VoteAppConstants.ERROR_LIST);
}
@@ -300,41 +284,32 @@
* content is in use in this case. It is always unlocked -> not in use since it is the default content.
*/
Map mapOptionsContent = new TreeMap(new VoteComparator());
- VoteStarterAction.logger.debug("mapOptionsContent: " + mapOptionsContent);
-
if (!existsContent(toolContentID, request, voteService)) {
- VoteStarterAction.logger.debug("getting default content");
/* fetch default content */
String defaultContentIdStr = voteAuthoringForm.getDefaultContentIdStr();
- VoteStarterAction.logger.debug("will get content for defaultContentIdStr:" + defaultContentIdStr);
retrieveContent(request, voteService, voteAuthoringForm, voteGeneralAuthoringDTO, mapOptionsContent,
new Long(defaultContentIdStr).longValue(), sessionMap);
} else {
- VoteStarterAction.logger.debug("getting existing content");
/* it is possible that the content is in use by learners. */
VoteContent voteContent = voteService.retrieveVote(new Long(strToolContentId));
- VoteStarterAction.logger.debug("voteContent: " + voteContent);
if (voteService.studentActivityOccurredStandardAndOpen(voteContent)) {
VoteUtils.cleanUpSessionAbsolute(request);
- VoteStarterAction.logger.debug("student activity occurred on this content:" + voteContent);
saveInRequestError(request, "error.content.inUse");
return mapping.findForward(VoteAppConstants.ERROR_LIST);
}
if (servletPath.indexOf("authoringStarter") > 0) {
boolean isDefineLater = VoteUtils.isDefineLater(voteContent);
- VoteStarterAction.logger.debug("isDefineLater:" + isDefineLater);
if (isDefineLater == true) {
VoteUtils.cleanUpSessionAbsolute(request);
- VoteStarterAction.logger.debug("student activity occurred on this content:" + voteContent);
+ VoteStarterAction.logger.error("student activity occurred on this content:" + voteContent);
saveInRequestError(request, "error.content.inUse");
return mapping.findForward(VoteAppConstants.ERROR_LIST);
}
}
- VoteStarterAction.logger.debug("will get content for strToolContentId:" + strToolContentId);
retrieveContent(request, voteService, voteAuthoringForm, voteGeneralAuthoringDTO, mapOptionsContent,
new Long(strToolContentId).longValue(), sessionMap);
}
@@ -346,22 +321,15 @@
voteAuthoringForm.setCurrentTab("1");
}
- VoteStarterAction.logger.debug("will return to jsp with: " + sourceVoteStarter);
String destination = VoteUtils.getDestination(sourceVoteStarter);
- VoteStarterAction.logger.debug("destination: " + destination);
- VoteStarterAction.logger.debug("active module is: " + voteAuthoringForm.getActiveModule());
-
- VoteStarterAction.logger.debug("voteGeneralAuthoringDTO: " + voteGeneralAuthoringDTO);
request.setAttribute(VoteAppConstants.VOTE_GENERAL_AUTHORING_DTO, voteGeneralAuthoringDTO);
- VoteStarterAction.logger.debug("persisting sessionMap into session: " + sessionMap);
request.getSession().setAttribute(sessionMap.getSessionID(), sessionMap);
return mapping.findForward(destination);
}
protected void initialiseAttributes(HttpServletRequest request, VoteGeneralAuthoringDTO voteGeneralAuthoringDTO,
IVoteService voteService) {
- VoteStarterAction.logger.debug("starting initialiseAttributes...");
/* for development: needs to run only once per tool */
/* VoteUtils.configureContentRepository(request, voteService); */
@@ -385,66 +353,50 @@
* other depending content ids are obtained in this method. if all the default content has been setup properly the
* method saves DEFAULT_CONTENT_ID in the session.
*
- * readSignature(HttpServletRequest request, ActionMapping mapping)
- *
* @param request
* @param mapping
* @return ActionForward
*/
public ActionForward readSignature(HttpServletRequest request, ActionMapping mapping, IVoteService voteService,
VoteAuthoringForm voteAuthoringForm) {
- VoteStarterAction.logger.debug("start reading tool signature: " + voteService);
/*
* retrieve the default content id based on tool signature
*/
long defaultContentID = 0;
try {
- VoteStarterAction.logger.debug("attempt retrieving tool with signatute : " + VoteAppConstants.MY_SIGNATURE);
defaultContentID = voteService.getToolDefaultContentIdBySignature(VoteAppConstants.MY_SIGNATURE);
- VoteStarterAction.logger.debug("retrieved tool default contentId: " + defaultContentID);
if (defaultContentID == 0) {
VoteUtils.cleanUpSessionAbsolute(request);
- VoteStarterAction.logger.debug("default content id has not been setup");
saveInRequestError(request, "error.defaultContent.notSetup");
return mapping.findForward(VoteAppConstants.ERROR_LIST);
}
} catch (Exception e) {
VoteUtils.cleanUpSessionAbsolute(request);
- VoteStarterAction.logger.debug("error getting the default content id: " + e.getMessage());
+ VoteStarterAction.logger.error("error getting the default content id: " + e.getMessage());
saveInRequestError(request, "error.defaultContent.notSetup");
- VoteStarterAction.logger.debug("forwarding to: " + VoteAppConstants.ERROR_LIST);
return mapping.findForward(VoteAppConstants.ERROR_LIST);
}
/* retrieve uid of the content based on default content id determined above */
long contentUID = 0;
try {
- VoteStarterAction.logger.debug("retrieve uid of the content based on default content id determined above: "
- + defaultContentID);
+ //retrieve uid of the content based on default content id determined above defaultContentID
VoteContent voteContent = voteService.retrieveVote(new Long(defaultContentID));
- VoteStarterAction.logger.debug("voteContent: " + voteContent);
if (voteContent == null) {
- VoteStarterAction.logger.debug("voteContent is null: " + voteContent);
VoteUtils.cleanUpSessionAbsolute(request);
- VoteStarterAction.logger.debug("Exception occured: No default content");
+ VoteStarterAction.logger.error("Exception occured: No default content");
saveInRequestError(request, "error.defaultContent.notSetup");
return mapping.findForward(VoteAppConstants.ERROR_LIST);
}
- VoteStarterAction.logger.debug("using voteContent: " + voteContent);
- VoteStarterAction.logger.debug("using mcContent uid: " + voteContent.getUid());
contentUID = voteContent.getUid().longValue();
- VoteStarterAction.logger.debug("contentUID: " + contentUID);
} catch (Exception e) {
- VoteStarterAction.logger.debug("other problems: " + e);
+ VoteStarterAction.logger.error("other problems: " + e);
VoteUtils.cleanUpSessionAbsolute(request);
- VoteStarterAction.logger.debug("Exception occured: No default question content");
+ VoteStarterAction.logger.error("Exception occured: No default question content");
saveInRequestError(request, "error.defaultContent.notSetup");
- VoteStarterAction.logger.debug("forwarding to: " + VoteAppConstants.ERROR_LIST);
return mapping.findForward(VoteAppConstants.ERROR_LIST);
}
- VoteStarterAction.logger.debug("Voting tool has the default content id: " + defaultContentID);
-
voteAuthoringForm.setDefaultContentId(new Long(defaultContentID).toString());
voteAuthoringForm.setDefaultContentIdStr(new Long(defaultContentID).toString());
return null;
@@ -453,15 +405,10 @@
protected void retrieveContent(HttpServletRequest request, IVoteService voteService,
VoteAuthoringForm voteAuthoringForm, VoteGeneralAuthoringDTO voteGeneralAuthoringDTO,
Map mapOptionsContent, long toolContentID, SessionMap sessionMap) {
- VoteStarterAction.logger.debug("starting retrieve content for toolContentID: " + toolContentID);
- VoteStarterAction.logger.debug("voteService: " + voteService);
- VoteStarterAction.logger.debug("getting existing content with id:" + toolContentID);
VoteContent voteContent = voteService.retrieveVote(new Long(toolContentID));
- VoteStarterAction.logger.debug("voteContent: " + voteContent);
VoteUtils.readContentValues(request, voteContent, voteAuthoringForm, voteGeneralAuthoringDTO);
- VoteStarterAction.logger.debug("form title is: : " + voteAuthoringForm.getTitle());
voteAuthoringForm.setIsDefineLater(new Boolean(voteContent.isDefineLater()).toString());
voteGeneralAuthoringDTO.setIsDefineLater(new Boolean(voteContent.isDefineLater()).toString());
@@ -509,17 +456,14 @@
/*
* get the nominations
*/
- VoteStarterAction.logger.debug("setting existing content data from the db");
mapOptionsContent.clear();
Iterator queIterator = voteContent.getVoteQueContents().iterator();
Long mapIndex = new Long(1);
- VoteStarterAction.logger.debug("mapOptionsContent: " + mapOptionsContent);
while (queIterator.hasNext()) {
VoteNominationContentDTO voteNominationContentDTO = new VoteNominationContentDTO();
VoteQueContent voteQueContent = (VoteQueContent) queIterator.next();
if (voteQueContent != null) {
- VoteStarterAction.logger.debug("question: " + voteQueContent.getQuestion());
mapOptionsContent.put(mapIndex.toString(), voteQueContent.getQuestion());
voteNominationContentDTO.setQuestion(voteQueContent.getQuestion());
@@ -531,11 +475,9 @@
}
request.setAttribute(VoteAppConstants.TOTAL_NOMINATION_COUNT, new Integer(mapOptionsContent.size()));
- VoteStarterAction.logger.debug("listNominationContentDTO: " + listNominationContentDTO);
request.setAttribute(VoteAppConstants.LIST_NOMINATION_CONTENT_DTO, listNominationContentDTO);
sessionMap.put(VoteAppConstants.LIST_NOMINATION_CONTENT_DTO_KEY, listNominationContentDTO);
- VoteStarterAction.logger.debug("Map initialized with existing contentid to: " + mapOptionsContent);
voteGeneralAuthoringDTO.setMapOptionsContent(mapOptionsContent);
sessionMap.put(VoteAppConstants.MAP_OPTIONS_CONTENT_KEY, mapOptionsContent);
@@ -582,7 +524,6 @@
public ActionForward executeDefineLater(ActionMapping mapping, VoteAuthoringForm voteAuthoringForm,
HttpServletRequest request, HttpServletResponse response) throws IOException, ServletException,
VoteApplicationException {
- VoteStarterAction.logger.debug("calling execute..." + voteAuthoringForm);
return execute(mapping, voteAuthoringForm, request, response);
}
@@ -604,7 +545,7 @@
public void saveInRequestError(HttpServletRequest request, String message) {
ActionMessages errors = new ActionMessages();
errors.add(Globals.ERROR_KEY, new ActionMessage(message));
- VoteStarterAction.logger.debug("add " + message + " to ActionMessages:");
+ VoteStarterAction.logger.error("add " + message + " to ActionMessages:");
saveErrors(request, errors);
}
}