Index: lams_tool_lamc/src/java/org/lamsfoundation/lams/tool/mc/McUtils.java =================================================================== RCS file: /usr/local/cvsroot/lams_tool_lamc/src/java/org/lamsfoundation/lams/tool/mc/McUtils.java,v diff -u -r1.61 -r1.61.2.1 --- lams_tool_lamc/src/java/org/lamsfoundation/lams/tool/mc/McUtils.java 17 May 2014 19:54:42 -0000 1.61 +++ lams_tool_lamc/src/java/org/lamsfoundation/lams/tool/mc/McUtils.java 12 Sep 2014 22:43:47 -0000 1.61.2.1 @@ -181,34 +181,7 @@ /** * - * @param request - * @param defaultMcContent - * @param mcGeneralAuthoringDTO */ - public static void populateAuthoringDTO(HttpServletRequest request, McContent defaultMcContent, - McGeneralAuthoringDTO mcGeneralAuthoringDTO) { - mcGeneralAuthoringDTO.setActivityTitle(defaultMcContent.getTitle()); - mcGeneralAuthoringDTO.setActivityInstructions(defaultMcContent.getInstructions()); - } - - /** - * @param request - * @param value - * @param toolContentID - */ - public static void setDefineLater(HttpServletRequest request, boolean value, String strToolContentID, - IMcService mcService) { - - McContent mcContent = mcService.getMcContent(new Long(strToolContentID)); - if (mcContent != null) { - mcContent.setDefineLater(value); - mcService.updateMc(mcContent); - } - } - - /** - * - */ public static void setFormProperties(HttpServletRequest request, McAuthoringForm mcAuthoringForm, McGeneralAuthoringDTO mcGeneralAuthoringDTO, String strToolContentID, String httpSessionID) { Index: lams_tool_lamc/src/java/org/lamsfoundation/lams/tool/mc/mcApplicationContext.xml =================================================================== RCS file: /usr/local/cvsroot/lams_tool_lamc/src/java/org/lamsfoundation/lams/tool/mc/mcApplicationContext.xml,v diff -u -r1.23.2.1 -r1.23.2.2 --- lams_tool_lamc/src/java/org/lamsfoundation/lams/tool/mc/mcApplicationContext.xml 16 Aug 2014 11:20:29 -0000 1.23.2.1 +++ lams_tool_lamc/src/java/org/lamsfoundation/lams/tool/mc/mcApplicationContext.xml 12 Sep 2014 22:43:47 -0000 1.23.2.2 @@ -98,6 +98,7 @@ PROPAGATION_REQUIRED,-McApplicationException PROPAGATION_REQUIRED,-McApplicationException PROPAGATION_REQUIRED,-McApplicationException + PROPAGATION_REQUIRED,-McApplicationException PROPAGATION_REQUIRED,-McApplicationException Index: lams_tool_lamc/src/java/org/lamsfoundation/lams/tool/mc/dao/IMcContentDAO.java =================================================================== RCS file: /usr/local/cvsroot/lams_tool_lamc/src/java/org/lamsfoundation/lams/tool/mc/dao/IMcContentDAO.java,v diff -u -r1.14 -r1.14.2.1 --- lams_tool_lamc/src/java/org/lamsfoundation/lams/tool/mc/dao/IMcContentDAO.java 17 May 2014 19:54:43 -0000 1.14 +++ lams_tool_lamc/src/java/org/lamsfoundation/lams/tool/mc/dao/IMcContentDAO.java 12 Sep 2014 22:43:46 -0000 1.14.2.1 @@ -81,16 +81,6 @@ /** *

- * Delete the given instance of McContent - *

- * - * @param mcContent - * The instance of McContent to delete. - */ - public void removeMc(McContent mcContent); - - /** - *

* Delete the given instance of McContent with the given tool content id mcContentId * * @param mcContentId Index: lams_tool_lamc/src/java/org/lamsfoundation/lams/tool/mc/dao/IMcOptionsContentDAO.java =================================================================== RCS file: /usr/local/cvsroot/lams_tool_lamc/src/java/org/lamsfoundation/lams/tool/mc/dao/IMcOptionsContentDAO.java,v diff -u -r1.24 -r1.24.2.1 --- lams_tool_lamc/src/java/org/lamsfoundation/lams/tool/mc/dao/IMcOptionsContentDAO.java 17 May 2014 19:54:42 -0000 1.24 +++ lams_tool_lamc/src/java/org/lamsfoundation/lams/tool/mc/dao/IMcOptionsContentDAO.java 12 Sep 2014 22:43:46 -0000 1.24.2.1 @@ -33,17 +33,6 @@ * @author Ozgur Demirtas */ public interface IMcOptionsContentDAO { - /** - * * - *

- * Return the persistent instance of a McOptsContent with the given identifier uid, returns null if not - * found. - *

- * - * @param uid - * @return McOptsContent - */ - McOptsContent getMcOptionsContentByUID(Long uid); /** *

@@ -56,55 +45,14 @@ */ List findMcOptionsContentByQueId(Long mcQueContentId); - /** - *

- * Return the persistent instance of a McOptsContent with the given identifiers option, - * mcQueContentUid returns null if not found. - *

- * - * @param option - * @param mcQueContentUid - * @return McOptsContent - */ - McOptsContent getOptionContentByOptionText(final String option, final Long mcQueContentUid); - - List findMcOptionCorrectByQueId(Long mcQueContentId); - List getOptionDtos(Long mcQueContentId); /** *

- * saves McOptsContent - *

- * - * @param mcOptionsContent - */ - void saveMcOptionsContent(McOptsContent mcOptionsContent); - - /** - *

* updates McOptsContent *

* * @param mcOptionsContent */ void updateMcOptionsContent(McOptsContent mcOptionsContent); - - /** - *

- * removes McOptsContent - *

- * - * @param mcOptionsContent - */ - void removeMcOptionsContentByUID(Long uid); - - /** - *

- * removes McOptsContent - *

- * - * @param mcOptionsContent - */ - void removeMcOptionsContent(McOptsContent mcOptsContent); } Index: lams_tool_lamc/src/java/org/lamsfoundation/lams/tool/mc/dao/IMcQueContentDAO.java =================================================================== RCS file: /usr/local/cvsroot/lams_tool_lamc/src/java/org/lamsfoundation/lams/tool/mc/dao/IMcQueContentDAO.java,v diff -u -r1.24 -r1.24.2.1 --- lams_tool_lamc/src/java/org/lamsfoundation/lams/tool/mc/dao/IMcQueContentDAO.java 17 May 2014 19:54:42 -0000 1.24 +++ lams_tool_lamc/src/java/org/lamsfoundation/lams/tool/mc/dao/IMcQueContentDAO.java 12 Sep 2014 22:43:46 -0000 1.24.2.1 @@ -32,32 +32,9 @@ * @author Ozgur Demirtas */ public interface IMcQueContentDAO { - - /** - *

- * Return the persistent instance of a McQueContent with the given identifier uid, returns null if not - * found. - *

- * - * @param uid - * @return McQueContent - */ - McQueContent getMcQueContentByUID(Long uid); /** *

- * Return the persistent instance of a McQueContent with the given identifier question and - * mcContentUid, returns null if not found. - *

- * - * @param question - * @param mcContentUid - * @return McQueContent - */ - McQueContent getQuestionContentByQuestionText(final String question, final Long mcContentUid); - - /** - *

* Return the persistent instance of a McQueContent with the given identifier displayOrder and * mcContentUid, returns null if not found. *

@@ -92,33 +69,6 @@ /** *

- * resets McQueContent with the given identifier mcContentUid - *

- * - * @param mcContentUid - */ - void resetAllQuestions(final Long mcContentUid); - - /** - *

- * removes McQueContent with the given identifier mcContentUid - *

- * - * @param mcContentUid - */ - void removeQuestionContentByMcUid(final Long mcContentUid); - - /** - *

- * saves McQueContent with the given identifier mcQueContent - *

- * - * @param mcQueContent - */ - void saveMcQueContent(McQueContent mcQueContent); - - /** - *

* updates McQueContent with the given identifier mcQueContent *

* @@ -137,15 +87,6 @@ /** *

- * removes McQueContent with the given identifier uid - *

- * - * @param uid - */ - void removeMcQueContentByUID(Long uid); - - /** - *

* removes McQueContent with the given identifier mcQueContent *

* @@ -154,16 +95,6 @@ */ void removeMcQueContent(McQueContent mcQueContent); - /** - *

- * used to get the next available display order with the given identifier mcContentId - *

- * - * @param mcQueContent - * @return - */ - List getNextAvailableDisplayOrder(final long mcContentId); - McQueContent findMcQuestionContentByUid(Long uid); List getAllQuestionEntriesSorted(final long qaContentId); Index: lams_tool_lamc/src/java/org/lamsfoundation/lams/tool/mc/dao/IMcSessionDAO.java =================================================================== RCS file: /usr/local/cvsroot/lams_tool_lamc/src/java/org/lamsfoundation/lams/tool/mc/dao/IMcSessionDAO.java,v diff -u -r1.14 -r1.14.2.1 --- lams_tool_lamc/src/java/org/lamsfoundation/lams/tool/mc/dao/IMcSessionDAO.java 12 Aug 2013 16:29:03 -0000 1.14 +++ lams_tool_lamc/src/java/org/lamsfoundation/lams/tool/mc/dao/IMcSessionDAO.java 12 Sep 2014 22:43:46 -0000 1.14.2.1 @@ -35,19 +35,6 @@ /** *

- * Return the persistent instance of a McSession with the given identifier uid, returns null if not - * found. - *

- * - * @param uid - * an identifier for the McSession object. - * @return the persistent instance of a McSession or null if not found - */ - - public McSession getMcSessionByUID(Long uid); - - /** - *

* Return the persistent instance of a McSession with the given tool session id mcSessionId, returns * null if not found. *

Index: lams_tool_lamc/src/java/org/lamsfoundation/lams/tool/mc/dao/hibernate/McContentDAO.java =================================================================== RCS file: /usr/local/cvsroot/lams_tool_lamc/src/java/org/lamsfoundation/lams/tool/mc/dao/hibernate/McContentDAO.java,v diff -u -r1.23.2.1 -r1.23.2.2 --- lams_tool_lamc/src/java/org/lamsfoundation/lams/tool/mc/dao/hibernate/McContentDAO.java 15 Aug 2014 09:58:12 -0000 1.23.2.1 +++ lams_tool_lamc/src/java/org/lamsfoundation/lams/tool/mc/dao/hibernate/McContentDAO.java 12 Sep 2014 22:43:48 -0000 1.23.2.2 @@ -90,10 +90,6 @@ } } - public void removeMc(McContent mcContent) { - this.getHibernateTemplate().delete(mcContent); - } - public void removeMcSessions(McContent mcContent) { this.getHibernateTemplate().deleteAll(mcContent.getMcSessions()); } Index: lams_tool_lamc/src/java/org/lamsfoundation/lams/tool/mc/dao/hibernate/McOptionsContentDAO.java =================================================================== RCS file: /usr/local/cvsroot/lams_tool_lamc/src/java/org/lamsfoundation/lams/tool/mc/dao/hibernate/McOptionsContentDAO.java,v diff -u -r1.28.2.1 -r1.28.2.2 --- lams_tool_lamc/src/java/org/lamsfoundation/lams/tool/mc/dao/hibernate/McOptionsContentDAO.java 15 Aug 2014 09:58:12 -0000 1.28.2.1 +++ lams_tool_lamc/src/java/org/lamsfoundation/lams/tool/mc/dao/hibernate/McOptionsContentDAO.java 12 Sep 2014 22:43:48 -0000 1.28.2.2 @@ -43,12 +43,7 @@ private static Logger logger = Logger.getLogger(McOptionsContentDAO.class.getName()); private static final String FIND_OPTIONS_BY_QUESTION_UID = "from mcOptsContent in class McOptsContent where mcOptsContent.mcQueContentId=:mcQueContentUid order by mcOptsContent.displayOrder"; - private static final String FIND_OPTIONS_BY_OPTION_TEXT = "from mcOptsContent in class McOptsContent where mcOptsContent.mcQueOptionText=:option and mcOptsContent.mcQueContentId=:mcQueContentUid"; - public McOptsContent getMcOptionsContentByUID(Long uid) { - return (McOptsContent) this.getHibernateTemplate().get(McOptsContent.class, uid); - } - public List findMcOptionsContentByQueId(Long questionUid) { if (questionUid != null) { List list = getSessionFactory().getCurrentSession().createQuery(FIND_OPTIONS_BY_QUESTION_UID) @@ -75,52 +70,10 @@ return optionDtos; } - public List findMcOptionCorrectByQueId(Long questionUid) { - - List listOptionCorrect = new LinkedList(); - - if (questionUid != null) { - List options = getSessionFactory().getCurrentSession().createQuery(FIND_OPTIONS_BY_QUESTION_UID) - .setLong("mcQueContentUid", questionUid.longValue()).list(); - - if (options != null && options.size() > 0) { - for (McOptsContent option : options) { - listOptionCorrect.add(new Boolean(option.isCorrectOption()).toString()); - } - } - } - return listOptionCorrect; - } - - public McOptsContent getOptionContentByOptionText(final String option, final Long questionUid) { - List list = getSessionFactory().getCurrentSession().createQuery(FIND_OPTIONS_BY_OPTION_TEXT).setString("option", option) - .setLong("mcQueContentUid", questionUid.longValue()).list(); - - if (list != null && list.size() > 0) { - McOptsContent mcq = (McOptsContent) list.get(0); - return mcq; - } - return null; - } - - public void saveMcOptionsContent(McOptsContent mcOptsContent) { - this.getHibernateTemplate().saveOrUpdate(mcOptsContent); - } - public void updateMcOptionsContent(McOptsContent mcOptsContent) { this.getHibernateTemplate().update(mcOptsContent); } - public void removeMcOptionsContentByUID(Long uid) { - McOptsContent mco = (McOptsContent) getHibernateTemplate().get(McOptsContent.class, uid); - this.getHibernateTemplate().delete(mco); - } - - public void removeMcOptionsContent(McOptsContent mcOptsContent) { - getSessionFactory().getCurrentSession().setFlushMode(FlushMode.AUTO); - this.getHibernateTemplate().delete(mcOptsContent); - } - public void flush() { this.getHibernateTemplate().flush(); } Index: lams_tool_lamc/src/java/org/lamsfoundation/lams/tool/mc/dao/hibernate/McQueContentDAO.java =================================================================== RCS file: /usr/local/cvsroot/lams_tool_lamc/src/java/org/lamsfoundation/lams/tool/mc/dao/hibernate/McQueContentDAO.java,v diff -u -r1.34.2.1 -r1.34.2.2 --- lams_tool_lamc/src/java/org/lamsfoundation/lams/tool/mc/dao/hibernate/McQueContentDAO.java 15 Aug 2014 09:58:12 -0000 1.34.2.1 +++ lams_tool_lamc/src/java/org/lamsfoundation/lams/tool/mc/dao/hibernate/McQueContentDAO.java 12 Sep 2014 22:43:48 -0000 1.34.2.2 @@ -44,12 +44,8 @@ private static final String REFRESH_QUESTION_CONTENT = "from mcQueContent in class McQueContent where mcQueContent.mcContentId=:mcContentId order by mcQueContent.displayOrder"; - private static final String LOAD_QUESTION_CONTENT_BY_QUESTION_TEXT = "from mcQueContent in class McQueContent where mcQueContent.question=:question and mcQueContent.mcContentId=:mcContentUid"; - private static final String LOAD_QUESTION_CONTENT_BY_DISPLAY_ORDER = "from mcQueContent in class McQueContent where mcQueContent.displayOrder=:displayOrder and mcQueContent.mcContentId=:mcContentUid"; - private static final String GET_NEXT_AVAILABLE_DISPLAY_ORDER = "from mcQueContent in class McQueContent where mcQueContent.mcContentId=:mcContentId"; - private static final String SORT_QUESTION_CONTENT_BY_DISPLAY_ORDER = "from mcQueContent in class McQueContent where mcQueContent.mcContentId=:mcContentId order by mcQueContent.displayOrder"; @Override @@ -67,11 +63,6 @@ } @Override - public McQueContent getMcQueContentByUID(Long uid) { - return (McQueContent) this.getHibernateTemplate().get(McQueContent.class, uid); - } - - @Override public List getQuestionsByContentUid(final long contentUid) { HibernateTemplate templ = this.getHibernateTemplate(); List list = getSessionFactory().getCurrentSession().createQuery(LOAD_QUESTION_CONTENT_BY_CONTENT_ID).setLong("mcContentId", contentUid) @@ -90,19 +81,6 @@ } @Override - public McQueContent getQuestionContentByQuestionText(final String question, final Long mcContentUid) { - HibernateTemplate templ = this.getHibernateTemplate(); - List list = getSessionFactory().getCurrentSession().createQuery(LOAD_QUESTION_CONTENT_BY_QUESTION_TEXT).setString("question", question) - .setLong("mcContentUid", mcContentUid.longValue()).list(); - - if (list != null && list.size() > 0) { - McQueContent mcq = (McQueContent) list.get(0); - return mcq; - } - return null; - } - - @Override public McQueContent getQuestionContentByDisplayOrder(final Long displayOrder, final Long mcContentUid) { HibernateTemplate templ = this.getHibernateTemplate(); List list = getSessionFactory().getCurrentSession().createQuery(LOAD_QUESTION_CONTENT_BY_DISPLAY_ORDER) @@ -117,65 +95,11 @@ } @Override - public void removeQuestionContentByMcUid(final Long mcContentUid) { - HibernateTemplate templ = this.getHibernateTemplate(); - List list = getSessionFactory().getCurrentSession().createQuery(LOAD_QUESTION_CONTENT_BY_CONTENT_ID) - .setLong("mcContentId", mcContentUid.longValue()).list(); - - if (list != null && list.size() > 0) { - Iterator listIterator = list.iterator(); - while (listIterator.hasNext()) { - McQueContent mcQueContent = (McQueContent) listIterator.next(); - getSessionFactory().getCurrentSession().setFlushMode(FlushMode.AUTO); - templ.delete(mcQueContent); - templ.flush(); - } - } - } - - @Override - public void resetAllQuestions(final Long mcContentUid) { - HibernateTemplate templ = this.getHibernateTemplate(); - List list = getSessionFactory().getCurrentSession().createQuery(LOAD_QUESTION_CONTENT_BY_CONTENT_ID) - .setLong("mcContentId", mcContentUid.longValue()).list(); - - if (list != null && list.size() > 0) { - Iterator listIterator = list.iterator(); - while (listIterator.hasNext()) { - McQueContent mcQueContent = (McQueContent) listIterator.next(); - getSessionFactory().getCurrentSession().setFlushMode(FlushMode.AUTO); - templ.update(mcQueContent); - } - } - } - - @Override - public List getNextAvailableDisplayOrder(final long mcContentId) { - HibernateTemplate templ = this.getHibernateTemplate(); - List list = getSessionFactory().getCurrentSession().createQuery(GET_NEXT_AVAILABLE_DISPLAY_ORDER).setLong("mcContentId", mcContentId) - .list(); - - return list; - } - - @Override - public void saveMcQueContent(McQueContent mcQueContent) { - this.getHibernateTemplate().save(mcQueContent); - } - - @Override public void saveOrUpdateMcQueContent(McQueContent mcQueContent) { this.getHibernateTemplate().saveOrUpdate(mcQueContent); } @Override - public void removeMcQueContentByUID(Long uid) { - McQueContent mcq = (McQueContent) getHibernateTemplate().get(McQueContent.class, uid); - getSessionFactory().getCurrentSession().setFlushMode(FlushMode.AUTO); - this.getHibernateTemplate().delete(mcq); - } - - @Override public void updateMcQueContent(McQueContent mcQueContent) { getSessionFactory().getCurrentSession().setFlushMode(FlushMode.AUTO); this.getHibernateTemplate().saveOrUpdate(mcQueContent); Index: lams_tool_lamc/src/java/org/lamsfoundation/lams/tool/mc/dao/hibernate/McSessionDAO.java =================================================================== RCS file: /usr/local/cvsroot/lams_tool_lamc/src/java/org/lamsfoundation/lams/tool/mc/dao/hibernate/McSessionDAO.java,v diff -u -r1.19.2.1 -r1.19.2.2 --- lams_tool_lamc/src/java/org/lamsfoundation/lams/tool/mc/dao/hibernate/McSessionDAO.java 15 Aug 2014 09:58:12 -0000 1.19.2.1 +++ lams_tool_lamc/src/java/org/lamsfoundation/lams/tool/mc/dao/hibernate/McSessionDAO.java 12 Sep 2014 22:43:48 -0000 1.19.2.2 @@ -46,10 +46,6 @@ private static final String LOAD_MCSESSION_BY_MCSESSIONID = "from McSession mcs where mcs.mcSessionId=?"; - public McSession getMcSessionByUID(Long uid) { - return (McSession) this.getHibernateTemplate().get(McSession.class, uid); - } - public McSession getMcSessionById(Long mcSessionId) { List list = getSessionFactory().getCurrentSession().createQuery(LOAD_MCSESSION_BY_MCSESSIONID).setLong(0, mcSessionId.longValue()).list(); Index: lams_tool_lamc/src/java/org/lamsfoundation/lams/tool/mc/service/IMcService.java =================================================================== RCS file: /usr/local/cvsroot/lams_tool_lamc/src/java/org/lamsfoundation/lams/tool/mc/service/IMcService.java,v diff -u -r1.77 -r1.77.2.1 --- lams_tool_lamc/src/java/org/lamsfoundation/lams/tool/mc/service/IMcService.java 6 Jun 2014 16:41:24 -0000 1.77 +++ lams_tool_lamc/src/java/org/lamsfoundation/lams/tool/mc/service/IMcService.java 12 Sep 2014 22:43:45 -0000 1.77.2.1 @@ -72,16 +72,14 @@ void createMc(McContent mcContent) throws McApplicationException; McContent getMcContent(Long toolContentId) throws McApplicationException; + + void setDefineLater(String strToolContentID, boolean value); - void createQuestion(McQueContent mcQueContent) throws McApplicationException; - void updateQuestion(McQueContent mcQueContent) throws McApplicationException; McQueContent getQuestionByDisplayOrder(final Long displayOrder, final Long mcContentUid) throws McApplicationException; - void createMcSession(McSession mcSession) throws McApplicationException; - McQueUsr createMcUser(Long toolSessionId) throws McApplicationException; McQueUsr getMcUserBySession(final Long queUsrId, final Long mcSessionUid) throws McApplicationException; @@ -92,30 +90,21 @@ void removeMcQueContent(McQueContent mcQueContent) throws McApplicationException; - McQueContent getMcQueContentByUID(Long uid) throws McApplicationException; - void saveOrUpdateMcQueContent(McQueContent mcQueContent) throws McApplicationException; + /** + * persists the questions + */ + McContent createQuestions(List questionDTOs, McContent content); + void releaseQuestionsFromCache(McContent content); - void removeQuestionContentByMcUid(final Long mcContentUid) throws McApplicationException; - - McOptsContent getMcOptionsContentByUID(Long uid) throws McApplicationException; - - void resetAllQuestions(final Long mcContentUid) throws McApplicationException; - List refreshQuestionContent(final Long mcContentId) throws McApplicationException; List getAllQuestionsSorted(final long mcContentId) throws McApplicationException; McQueContent getQuestionByUid(Long uid); - void removeMcOptionsContent(McOptsContent mcOptsContent); - - McQueContent getQuestionByQuestionText(final String question, final Long mcContentUid); - - void removeMcQueContentByUID(Long uid) throws McApplicationException; - McQueUsr getMcUserByUID(Long uid) throws McApplicationException; List getQuestionsByContentUid(final Long mcContentId) throws McApplicationException; @@ -124,38 +113,16 @@ void updateMc(McContent mc) throws McApplicationException; - void updateMcSession(McSession mcSession) throws McApplicationException; - void updateMcQueUsr(McQueUsr mcQueUsr) throws McApplicationException; List getOptionDtos(Long mcQueContentId) throws McApplicationException; - - McSession getMcSessionByUID(Long uid) throws McApplicationException; - + List getFinalizedUserAttempts(final McQueUsr user) throws McApplicationException; - void deleteMc(McContent mc) throws McApplicationException; - - void deleteMcById(Long mcId) throws McApplicationException; - - void deleteMcQueUsr(McQueUsr mcQueUsr) throws McApplicationException; - List findOptionsByQuestionUid(Long mcQueContentId) throws McApplicationException; - void saveOption(McOptsContent mcOptsContent) throws McApplicationException; - - McOptsContent getOptionContentByOptionText(final String option, final Long mcQueContentUid); - void updateMcOptionsContent(McOptsContent mcOptsContent) throws McApplicationException; - void deleteMcOptionsContent(McOptsContent mcOptsContent) throws McApplicationException; - - void deleteMcOptionsContentByUID(Long uid) throws McApplicationException; - - void saveMcContent(McContent mc) throws McApplicationException; - - boolean studentActivityOccurredGlobal(McContent mcContent) throws McApplicationException; - McUsrAttempt getUserAttemptByQuestion(Long queUsrUid, Long mcQueContentId) throws McApplicationException; @@ -181,10 +148,6 @@ long getToolDefaultContentIdBySignature(String toolSignature) throws McApplicationException; - List getNextAvailableDisplayOrder(final long mcContentId) throws McApplicationException; - - List findMcOptionCorrectByQueId(Long mcQueContentId) throws McApplicationException; - Long createNotebookEntry(Long id, Integer idType, String signature, Integer userID, String entry); NotebookEntry getEntry(Long id, Integer idType, String signature, Integer userID); Index: lams_tool_lamc/src/java/org/lamsfoundation/lams/tool/mc/service/McServicePOJO.java =================================================================== RCS file: /usr/local/cvsroot/lams_tool_lamc/src/java/org/lamsfoundation/lams/tool/mc/service/McServicePOJO.java,v diff -u -r1.128 -r1.128.2.1 --- lams_tool_lamc/src/java/org/lamsfoundation/lams/tool/mc/service/McServicePOJO.java 6 Jun 2014 16:41:24 -0000 1.128 +++ lams_tool_lamc/src/java/org/lamsfoundation/lams/tool/mc/service/McServicePOJO.java 12 Sep 2014 22:43:45 -0000 1.128.2.1 @@ -28,6 +28,7 @@ import java.util.Arrays; import java.util.Collections; import java.util.Date; +import java.util.HashSet; import java.util.Hashtable; import java.util.Iterator; import java.util.LinkedList; @@ -39,6 +40,7 @@ import java.util.TreeSet; import java.util.Vector; +import javax.servlet.http.HttpServletRequest; import javax.servlet.http.HttpSession; import org.apache.commons.lang.StringUtils; @@ -169,7 +171,7 @@ // set group leader mcSession.setGroupLeader(leader); - this.updateMcSession(mcSession); + mcSessionDAO.updateMcSession(mcSession); } } @@ -209,6 +211,7 @@ } } + @Override public void createMc(McContent mcContent) throws McApplicationException { try { mcContentDAO.saveMcContent(mcContent); @@ -217,31 +220,26 @@ } } + @Override public McContent getMcContent(Long toolContentId) throws McApplicationException { try { return mcContentDAO.findMcContentById(toolContentId); } catch (DataAccessException e) { throw new McApplicationException("Exception occured when lams is loading mc content: " + e.getMessage(), e); } } + + @Override + public void setDefineLater(String strToolContentID, boolean value) { - public void updateMcContent(McContent mcContent) throws McApplicationException { - try { - mcContentDAO.updateMcContent(mcContent); - } catch (DataAccessException e) { - throw new McApplicationException("Exception occured when lams is updating mc content: " + e.getMessage(), e); + McContent mcContent = getMcContent(new Long(strToolContentID)); + if (mcContent != null) { + mcContent.setDefineLater(value); + updateMc(mcContent); } } - public void createQuestion(McQueContent mcQueContent) throws McApplicationException { - try { - mcQueContentDAO.saveMcQueContent(mcQueContent); - } catch (DataAccessException e) { - throw new McApplicationException("Exception occured when lams is creating mc que content: " - + e.getMessage(), e); - } - } - + @Override public void updateQuestion(McQueContent mcQueContent) throws McApplicationException { try { mcQueContentDAO.updateMcQueContent(mcQueContent); @@ -252,6 +250,7 @@ } + @Override public McQueContent getQuestionByDisplayOrder(final Long displayOrder, final Long mcContentUid) throws McApplicationException { try { @@ -262,15 +261,7 @@ } } - public McQueContent getMcQueContentByUID(Long uid) throws McApplicationException { - try { - return mcQueContentDAO.getMcQueContentByUID(uid); - } catch (DataAccessException e) { - throw new McApplicationException("Exception occured when lams is getting mc que content by uid: " - + e.getMessage(), e); - } - } - + @Override public List getAllQuestionsSorted(final long mcContentId) throws McApplicationException { try { return mcQueContentDAO.getAllQuestionEntriesSorted(mcContentId); @@ -280,6 +271,7 @@ } } + @Override public void saveOrUpdateMcQueContent(McQueContent mcQueContent) throws McApplicationException { try { mcQueContentDAO.saveOrUpdateMcQueContent(mcQueContent); @@ -290,56 +282,90 @@ } @Override - public void releaseQuestionsFromCache(McContent content) { - for (McQueContent question : (Set)content.getMcQueContents()) { - mcQueContentDAO.releaseQuestionFromCache(question); - } - } + public McContent createQuestions(List questionDTOs, McContent content) { - public void removeQuestionContentByMcUid(final Long mcContentUid) throws McApplicationException { - try { - mcQueContentDAO.removeQuestionContentByMcUid(mcContentUid); - } catch (DataAccessException e) { - throw new McApplicationException( - "Exception occured when lams is removing mc que content by mc content id: " + e.getMessage(), e); - } - } + int displayOrder = 0; + for (McQuestionDTO questionDTO : questionDTOs) { + String currentQuestionText = questionDTO.getQuestion(); - public void resetAllQuestions(final Long mcContentUid) throws McApplicationException { - try { - mcQueContentDAO.resetAllQuestions(mcContentUid); - } catch (DataAccessException e) { - throw new McApplicationException("Exception occured when lams is resetting all questions: " - + e.getMessage(), e); - } - } + // skip empty questions + if (currentQuestionText.isEmpty()) { + continue; + } - public List getNextAvailableDisplayOrder(final long mcContentId) throws McApplicationException { - try { - return mcQueContentDAO.getNextAvailableDisplayOrder(mcContentId); - } catch (DataAccessException e) { - throw new McApplicationException( - "Exception occured when lams is getting the next available display order: " + e.getMessage(), e); - } - } + ++displayOrder; + String currentFeedback = questionDTO.getFeedback(); + String currentMark = questionDTO.getMark(); + /* set the default mark in case it is not provided */ + if (currentMark == null) { + currentMark = "1"; + } - public void createMcSession(McSession mcSession) throws McApplicationException { - try { - mcSessionDAO.saveMcSession(mcSession); - } catch (DataAccessException e) { - throw new McApplicationException("Exception occured when lams is creating mc session: " + e.getMessage(), e); + McQueContent question = getQuestionByUid(questionDTO.getUid()); + + // in case question doesn't exist + if (question == null) { + question = new McQueContent(currentQuestionText, new Integer(displayOrder), new Integer(currentMark), + currentFeedback, content, null, null); + + // adding a new question to content + content.getMcQueContents().add(question); + question.setMcContent(content); + + // in case question exists already + } else { + + question.setQuestion(currentQuestionText); + question.setFeedback(currentFeedback); + question.setDisplayOrder(new Integer(displayOrder)); + question.setMark(new Integer(currentMark)); + } + + // persist candidate answers + List optionDTOs = questionDTO.getListCandidateAnswersDTO(); + Set oldOptions = question.getMcOptionsContents(); + Set newOptions = new HashSet(); + int displayOrderOption = 1; + for (McOptionDTO optionDTO : optionDTOs) { + + Long optionUid = optionDTO.getUid(); + String optionText = optionDTO.getCandidateAnswer(); + boolean isCorrectOption = "Correct".equals(optionDTO.getCorrect()); + + //find persisted option if it exists + McOptsContent option = new McOptsContent(); + for (McOptsContent oldOption: oldOptions) { + if (oldOption.getUid().equals(optionUid)) { + option = oldOption; + } + } + + option.setDisplayOrder(displayOrderOption); + option.setCorrectOption(isCorrectOption); + option.setMcQueOptionText(optionText); + option.setMcQueContent(question); + + newOptions.add(option); + displayOrderOption++; + } + + question.setMcOptionsContents(newOptions); + + // updating the existing question content + updateQuestion(question); + } + return content; } - - public McSession getMcSessionByUID(Long uid) throws McApplicationException { - try { - return mcSessionDAO.getMcSessionByUID(uid); - } catch (DataAccessException e) { - throw new McApplicationException("Exception occured when lams is getting mcSession my uid: " - + e.getMessage(), e); + + @Override + public void releaseQuestionsFromCache(McContent content) { + for (McQueContent question : (Set)content.getMcQueContents()) { + mcQueContentDAO.releaseQuestionFromCache(question); } } + @Override public McQueUsr createMcUser(Long toolSessionID) throws McApplicationException { try { HttpSession ss = SessionManager.getSession(); @@ -358,6 +384,7 @@ } } + @Override public void updateMcQueUsr(McQueUsr mcQueUsr) throws McApplicationException { try { mcUserDAO.updateMcUser(mcQueUsr); @@ -366,6 +393,7 @@ } } + @Override public McQueUsr getMcUserBySession(final Long queUsrId, final Long mcSessionUid) throws McApplicationException { try { return mcUserDAO.getMcUserBySession(queUsrId, mcSessionUid); @@ -374,6 +402,7 @@ } } + @Override public McQueUsr getMcUserByUID(Long uid) throws McApplicationException { try { return mcUserDAO.getMcUserByUID(uid); @@ -433,6 +462,7 @@ } } + @Override public void updateMcUsrAttempt(McUsrAttempt mcUsrAttempt) throws McApplicationException { try { mcUsrAttemptDAO.updateMcUsrAttempt(mcUsrAttempt); @@ -591,6 +621,7 @@ return listMonitoredMarksContainerDTO; } + @Override public List getFinalizedUserAttempts(final McQueUsr user) throws McApplicationException { try { return mcUsrAttemptDAO.getFinalizedUserAttempts(user.getUid()); @@ -601,6 +632,7 @@ } } + @Override public McUsrAttempt getUserAttemptByQuestion(Long queUsrUid, Long mcQueContentId) throws McApplicationException { try { @@ -612,6 +644,7 @@ } } + @Override public List getQuestionsByContentUid(final Long contentUid) throws McApplicationException { try { return mcQueContentDAO.getQuestionsByContentUid(contentUid.longValue()); @@ -621,15 +654,7 @@ } } - public void removeMcQueContentByUID(Long uid) throws McApplicationException { - try { - mcQueContentDAO.removeMcQueContentByUID(uid); - } catch (DataAccessException e) { - throw new McApplicationException("Exception occured when lams is removing by uid mc question content: " - + e.getMessage(), e); - } - } - + @Override public List refreshQuestionContent(final Long mcContentId) throws McApplicationException { try { return mcQueContentDAO.refreshQuestionContent(mcContentId); @@ -640,6 +665,7 @@ } + @Override public void removeMcQueContent(McQueContent mcQueContent) throws McApplicationException { try { mcQueContentDAO.removeMcQueContent(mcQueContent); @@ -649,15 +675,7 @@ } } - public void removeMcOptionsContent(McOptsContent mcOptsContent) throws McApplicationException { - try { - mcOptionsContentDAO.removeMcOptionsContent(mcOptsContent); - } catch (DataAccessException e) { - throw new McApplicationException("Exception occured when lams is removing" + " the mc options content: " - + e.getMessage(), e); - } - } - + @Override public List getOptionDtos(Long mcQueContentId) throws McApplicationException { try { return mcOptionsContentDAO.getOptionDtos(mcQueContentId); @@ -667,15 +685,7 @@ } } - public McQueContent getQuestionByQuestionText(final String question, final Long mcContentId) { - try { - return mcQueContentDAO.getQuestionContentByQuestionText(question, mcContentId); - } catch (DataAccessException e) { - throw new McApplicationException( - "Exception occured when lams is retrieving question content by question text: " + e.getMessage(), e); - } - } - + @Override public McSession getMcSessionById(Long mcSessionId) throws McApplicationException { try { return mcSessionDAO.getMcSessionById(mcSessionId); @@ -685,6 +695,7 @@ } } + @Override public void updateMc(McContent mc) throws McApplicationException { try { mcContentDAO.updateMcContent(mc); @@ -694,61 +705,12 @@ } } - public void updateMcSession(McSession mcSession) throws McApplicationException { - try { - mcSessionDAO.updateMcSession(mcSession); - } catch (DataAccessException e) { - throw new McApplicationException("Exception occured when lams is updating mc session : " + e.getMessage(), - e); - } - } - - public void deleteMc(McContent mc) throws McApplicationException { - try { - mcContentDAO.removeMc(mc); - } catch (DataAccessException e) { - throw new McApplicationException("Exception occured when lams is removing" + " the mc content: " - + e.getMessage(), e); - } - } - - public void deleteMcById(Long mcId) throws McApplicationException { - try { - mcContentDAO.removeMcById(mcId); - } catch (DataAccessException e) { - throw new McApplicationException("Exception occured when lams is removing by id" + " the mc content: " - + e.getMessage(), e); - } - } - - /** - * Return the top, lowest and average mark for all learners for one particular tool session. - * - * @param request - * @return top mark, lowest mark, average mark in that order - */ + @Override public Integer[] getMarkStatistics(McSession mcSession) { return mcUserDAO.getMarkStatisticsForSession(mcSession.getUid()); } - public void deleteMcQueUsr(McQueUsr mcQueUsr) throws McApplicationException { - try { - mcUserDAO.removeMcUser(mcQueUsr); - } catch (DataAccessException e) { - throw new McApplicationException( - "Exception occured when lams is removing" + " the user: " + e.getMessage(), e); - } - } - - public void saveMcContent(McContent mc) throws McApplicationException { - try { - mcContentDAO.saveMcContent(mc); - } catch (DataAccessException e) { - throw new McApplicationException("Exception occured when lams is saving" + " the mc content: " - + e.getMessage(), e); - } - } - + @Override public List findOptionsByQuestionUid(Long mcQueContentId) throws McApplicationException { try { return mcOptionsContentDAO.findMcOptionsContentByQueId(mcQueContentId); @@ -758,15 +720,7 @@ } } - public McOptsContent getMcOptionsContentByUID(Long uid) throws McApplicationException { - try { - return mcOptionsContentDAO.getMcOptionsContentByUID(uid); - } catch (DataAccessException e) { - throw new McApplicationException("Exception occured when lams is getting opt content by uid" - + e.getMessage(), e); - } - } - + @Override public McQueContent getQuestionByUid(Long uid) { if (uid == null) { return null; @@ -775,24 +729,7 @@ return mcQueContentDAO.findMcQuestionContentByUid(uid); } - public void saveOption(McOptsContent mcOptsContent) throws McApplicationException { - try { - mcOptionsContentDAO.saveMcOptionsContent(mcOptsContent); - } catch (DataAccessException e) { - throw new McApplicationException("Exception occured when lams is saving" + " the mc options content: " - + e.getMessage(), e); - } - } - - public McOptsContent getOptionContentByOptionText(final String option, final Long mcQueContentUid) { - try { - return mcOptionsContentDAO.getOptionContentByOptionText(option, mcQueContentUid); - } catch (DataAccessException e) { - throw new McApplicationException("Exception occured when lams is returning the" - + " option by option text: " + e.getMessage(), e); - } - } - + @Override public void updateMcOptionsContent(McOptsContent mcOptsContent) throws McApplicationException { try { mcOptionsContentDAO.updateMcOptionsContent(mcOptsContent); @@ -801,45 +738,6 @@ + e.getMessage(), e); } } - - public List findMcOptionCorrectByQueId(Long mcQueContentId) throws McApplicationException { - try { - return mcOptionsContentDAO.findMcOptionCorrectByQueId(mcQueContentId); - } catch (DataAccessException e) { - throw new McApplicationException("Exception occured when lams is getting correct/incorrect options list" - + " the mc options content: " + e.getMessage(), e); - } - - } - - public void deleteMcOptionsContent(McOptsContent mcOptsContent) throws McApplicationException { - try { - mcOptionsContentDAO.removeMcOptionsContent(mcOptsContent); - } catch (DataAccessException e) { - throw new McApplicationException("Exception occured when lams is removing" + " the mc options content: " - + e.getMessage(), e); - } - } - - public void deleteMcOptionsContentByUID(Long uid) throws McApplicationException { - try { - mcOptionsContentDAO.removeMcOptionsContentByUID(uid); - } catch (DataAccessException e) { - throw new McApplicationException("Exception occured when lams is removing by uid" - + " the mc options content: " + e.getMessage(), e); - } - } - - /** - * checks the parameter content in the user responses table - * - * @param mcContent - * @return boolean - * @throws McApplicationException - */ - public boolean studentActivityOccurredGlobal(McContent mcContent) throws McApplicationException { - return !mcContent.getMcSessions().isEmpty(); - } @Override public void changeUserAttemptMark(Long userAttemptUid, Integer newMark) { @@ -1387,7 +1285,7 @@ throw new DataMissingException("mcContent is missing"); } mcContent.setDefineLater(false); - saveMcContent(mcContent); + mcContentDAO.saveMcContent(mcContent); } @SuppressWarnings("unchecked") Index: lams_tool_lamc/src/java/org/lamsfoundation/lams/tool/mc/web/AuthoringUtil.java =================================================================== RCS file: /usr/local/cvsroot/lams_tool_lamc/src/java/org/lamsfoundation/lams/tool/mc/web/AuthoringUtil.java,v diff -u -r1.71 -r1.71.2.1 --- lams_tool_lamc/src/java/org/lamsfoundation/lams/tool/mc/web/AuthoringUtil.java 17 May 2014 19:54:42 -0000 1.71 +++ lams_tool_lamc/src/java/org/lamsfoundation/lams/tool/mc/web/AuthoringUtil.java 12 Sep 2014 22:43:47 -0000 1.71.2.1 @@ -503,85 +503,6 @@ return mcContent; } - /** - * persists the questions - */ - public static McContent createQuestions(List questionDTOs, IMcService mcService, McContent content) { - - int displayOrder = 0; - for (McQuestionDTO questionDTO : questionDTOs) { - String currentQuestionText = questionDTO.getQuestion(); - - // skip empty questions - if (currentQuestionText.isEmpty()) { - continue; - } - - ++displayOrder; - String currentFeedback = questionDTO.getFeedback(); - String currentMark = questionDTO.getMark(); - /* set the default mark in case it is not provided */ - if (currentMark == null) { - currentMark = "1"; - } - - McQueContent question = mcService.getQuestionByUid(questionDTO.getUid()); - - // in case question doesn't exist - if (question == null) { - question = new McQueContent(currentQuestionText, new Integer(displayOrder), new Integer(currentMark), - currentFeedback, content, null, null); - - // adding a new question to content - content.getMcQueContents().add(question); - question.setMcContent(content); - - // in case question exists already - } else { - - question.setQuestion(currentQuestionText); - question.setFeedback(currentFeedback); - question.setDisplayOrder(new Integer(displayOrder)); - question.setMark(new Integer(currentMark)); - } - - // persist candidate answers - List optionDTOs = questionDTO.getListCandidateAnswersDTO(); - Set oldOptions = question.getMcOptionsContents(); - Set newOptions = new HashSet(); - int displayOrderOption = 1; - for (McOptionDTO optionDTO : optionDTOs) { - - Long optionUid = optionDTO.getUid(); - String optionText = optionDTO.getCandidateAnswer(); - boolean isCorrectOption = "Correct".equals(optionDTO.getCorrect()); - - //find persisted option if it exists - McOptsContent option = new McOptsContent(); - for (McOptsContent oldOption: oldOptions) { - if (oldOption.getUid().equals(optionUid)) { - option = oldOption; - } - } - - option.setDisplayOrder(displayOrderOption); - option.setCorrectOption(isCorrectOption); - option.setMcQueOptionText(optionText); - option.setMcQueContent(question); - - newOptions.add(option); - displayOrderOption++; - } - - question.setMcOptionsContents(newOptions); - - // updating the existing question content - mcService.updateQuestion(question); - - } - return content; - } - public static Map buildDynamicPassMarkMap(List questionDTOs, boolean initialScreen) { Map map = new TreeMap(new McComparator()); @@ -637,53 +558,9 @@ } /** - * repopulateOptionsBox - */ - public static List repopulateOptionDTOs(HttpServletRequest request, boolean isAddBlankOptions) { - - String correct = request.getParameter("correct"); - - /* check this logic again */ - int intCorrect = 0; - if (correct != null) { - intCorrect = new Integer(correct).intValue(); - } - - List optionDtos = new LinkedList(); - - for (int i = 0; i < McAppConstants.MAX_OPTION_COUNT; i++) { - String optionText = request.getParameter("ca" + i); - Long optionUid = WebUtil.readLongParam(request, "caUid" + i, true); - - String isCorrect = "Incorrect"; - - if (i == intCorrect) { - isCorrect = "Correct"; - } - - if (optionText != null) { - McOptionDTO optionDTO = new McOptionDTO(); - optionDTO.setUid(optionUid); - optionDTO.setCandidateAnswer(optionText); - optionDTO.setCorrect(isCorrect); - optionDtos.add(optionDTO); - } - } - - if (isAddBlankOptions) { - McOptionDTO optionDTO = new McOptionDTO(); - optionDTO.setCandidateAnswer(""); - optionDTO.setCorrect("Incorrect"); - optionDtos.add(optionDTO); - } - - return optionDtos; - } - - /** * generates a list for holding default questions and their candidate answers */ - public static List buildDefaultQuestions(McContent mcContent, IMcService mcService) { + public static List buildDefaultQuestions(McContent mcContent) { List questionDTOs = new LinkedList(); Long mapIndex = new Long(1); Index: lams_tool_lamc/src/java/org/lamsfoundation/lams/tool/mc/web/McAction.java =================================================================== RCS file: /usr/local/cvsroot/lams_tool_lamc/src/java/org/lamsfoundation/lams/tool/mc/web/McAction.java,v diff -u -r1.143 -r1.143.2.1 --- lams_tool_lamc/src/java/org/lamsfoundation/lams/tool/mc/web/McAction.java 6 Jun 2014 16:41:24 -0000 1.143 +++ lams_tool_lamc/src/java/org/lamsfoundation/lams/tool/mc/web/McAction.java 12 Sep 2014 22:43:47 -0000 1.143.2.1 @@ -144,7 +144,7 @@ if (mode.isTeacher()) { Set oldQuestions = mcContent.getMcQueContents(); mcService.releaseQuestionsFromCache(mcContent); - McUtils.setDefineLater(request, false, strToolContentID, mcService); + mcService.setDefineLater(strToolContentID, false); // recalculate User Answers mcService.recalculateUserAnswers(mcContent, oldQuestions, questionDTOs, deletedQuestionDTOs); @@ -170,7 +170,7 @@ mcContent = AuthoringUtil.saveOrUpdateMcContent(mcService, request, mcContentTest, strToolContentID); //store questions - mcContent = AuthoringUtil.createQuestions(questionDTOs, mcService, mcContent); + mcContent = mcService.createQuestions(questionDTOs, mcContent); if (mcContent != null) { @@ -253,7 +253,7 @@ String passmark = request.getParameter("passmark"); - List options = AuthoringUtil.repopulateOptionDTOs(request, false); + List options = repopulateOptionDTOs(request, false); options = AuthoringUtil.removeBlankOptions(options); List questionDTOs = (List) sessionMap @@ -583,7 +583,7 @@ String passmark = request.getParameter("passmark"); mcGeneralAuthoringDTO.setPassMarkValue(passmark); - List optionDtos = AuthoringUtil.repopulateOptionDTOs(request, false); + List optionDtos = repopulateOptionDTOs(request, false); optionDtos = AuthoringUtil.removeBlankOptions(optionDtos); if ((newQuestionParam != null) && (newQuestionParam.length() > 0)) { @@ -1132,7 +1132,7 @@ String candidateIndex = request.getParameter("candidateIndex"); request.setAttribute("candidateIndex", candidateIndex); - List optionDtos = AuthoringUtil.repopulateOptionDTOs(request, false); + List optionDtos = repopulateOptionDTOs(request, false); List questionDTOs = (List) sessionMap.get(McAppConstants.LIST_QUESTION_DTOS); @@ -1251,7 +1251,7 @@ String candidateIndex = request.getParameter("candidateIndex"); request.setAttribute("candidateIndex", candidateIndex); - List optionDtos = AuthoringUtil.repopulateOptionDTOs(request, false); + List optionDtos = repopulateOptionDTOs(request, false); List questionDTOs = (List) sessionMap.get(McAppConstants.LIST_QUESTION_DTOS); @@ -1382,7 +1382,7 @@ } //update options - List optionDtos = AuthoringUtil.repopulateOptionDTOs(request, false); + List optionDtos = repopulateOptionDTOs(request, false); List listFinalCandidatesDTO = new LinkedList(); McOptionDTO mcOptionDTO = null; Iterator listCaIterator = optionDtos.iterator(); @@ -1486,7 +1486,7 @@ List questionDTOs = (List) sessionMap.get(McAppConstants.LIST_QUESTION_DTOS); - List optionDtos = AuthoringUtil.repopulateOptionDTOs(request, true); + List optionDtos = repopulateOptionDTOs(request, true); String newQuestion = request.getParameter("newQuestion"); @@ -1658,7 +1658,7 @@ String candidateIndex = request.getParameter("candidateIndex"); request.setAttribute("candidateIndex", candidateIndex); - List optionDtos = AuthoringUtil.repopulateOptionDTOs(request, false); + List optionDtos = repopulateOptionDTOs(request, false); List questionDTOs = (List) sessionMap.get(McAppConstants.LIST_QUESTION_DTOS); @@ -1743,7 +1743,7 @@ String candidateIndex = request.getParameter("candidateIndex"); request.setAttribute("candidateIndex", candidateIndex); - List optionDtos = AuthoringUtil.repopulateOptionDTOs(request, false); + List optionDtos = repopulateOptionDTOs(request, false); List questionDTOs = (List) sessionMap.get(McAppConstants.LIST_QUESTION_DTOS); sessionMap.put(McAppConstants.LIST_QUESTION_DTOS, questionDTOs); @@ -1827,7 +1827,7 @@ // removeAddedCandidate McQuestionDTO newQuestionDTO = (McQuestionDTO) sessionMap.get(McAppConstants.NEW_QUESTION_DTO); - List optionDtos = AuthoringUtil.repopulateOptionDTOs(request, false); + List optionDtos = repopulateOptionDTOs(request, false); List listFinalCandidatesDTO = new LinkedList(); int caIndex = 0; for (McOptionDTO mcOptionDTO : optionDtos) { @@ -1915,7 +1915,7 @@ List questionDTOs = (List) sessionMap.get(McAppConstants.LIST_QUESTION_DTOS); - List optionDtos = AuthoringUtil.repopulateOptionDTOs(request, true); + List optionDtos = repopulateOptionDTOs(request, true); String newQuestion = request.getParameter("newQuestion"); @@ -2012,4 +2012,48 @@ return mode; } + /** + * repopulateOptionsBox + */ + private static List repopulateOptionDTOs(HttpServletRequest request, boolean isAddBlankOptions) { + + String correct = request.getParameter("correct"); + + /* check this logic again */ + int intCorrect = 0; + if (correct != null) { + intCorrect = new Integer(correct).intValue(); + } + + List optionDtos = new LinkedList(); + + for (int i = 0; i < McAppConstants.MAX_OPTION_COUNT; i++) { + String optionText = request.getParameter("ca" + i); + Long optionUid = WebUtil.readLongParam(request, "caUid" + i, true); + + String isCorrect = "Incorrect"; + + if (i == intCorrect) { + isCorrect = "Correct"; + } + + if (optionText != null) { + McOptionDTO optionDTO = new McOptionDTO(); + optionDTO.setUid(optionUid); + optionDTO.setCandidateAnswer(optionText); + optionDTO.setCorrect(isCorrect); + optionDtos.add(optionDTO); + } + } + + if (isAddBlankOptions) { + McOptionDTO optionDTO = new McOptionDTO(); + optionDTO.setCandidateAnswer(""); + optionDTO.setCorrect("Incorrect"); + optionDtos.add(optionDTO); + } + + return optionDtos; + } + } Index: lams_tool_lamc/src/java/org/lamsfoundation/lams/tool/mc/web/McMonitoringAction.java =================================================================== RCS file: /usr/local/cvsroot/lams_tool_lamc/src/java/org/lamsfoundation/lams/tool/mc/web/McMonitoringAction.java,v diff -u -r1.58 -r1.58.2.1 --- lams_tool_lamc/src/java/org/lamsfoundation/lams/tool/mc/web/McMonitoringAction.java 17 May 2014 19:54:42 -0000 1.58 +++ lams_tool_lamc/src/java/org/lamsfoundation/lams/tool/mc/web/McMonitoringAction.java 12 Sep 2014 22:43:48 -0000 1.58.2.1 @@ -125,7 +125,7 @@ List reflectionsContainerDTO = mcService.getReflectionList(mcContent, null); request.setAttribute(REFLECTIONS_CONTAINER_DTO, reflectionsContainerDTO); - if (mcService.studentActivityOccurredGlobal(mcContent)) { + if (!mcContent.getMcSessions().isEmpty()) { // USER_EXCEPTION_NO_TOOL_SESSIONS is set to false mcGeneralMonitoringDTO.setUserExceptionNoToolSessions(new Boolean(false).toString()); } else { Index: lams_tool_lamc/src/java/org/lamsfoundation/lams/tool/mc/web/McMonitoringStarterAction.java =================================================================== RCS file: /usr/local/cvsroot/lams_tool_lamc/src/java/org/lamsfoundation/lams/tool/mc/web/McMonitoringStarterAction.java,v diff -u -r1.52 -r1.52.2.1 --- lams_tool_lamc/src/java/org/lamsfoundation/lams/tool/mc/web/McMonitoringStarterAction.java 17 May 2014 19:54:42 -0000 1.52 +++ lams_tool_lamc/src/java/org/lamsfoundation/lams/tool/mc/web/McMonitoringStarterAction.java 12 Sep 2014 22:43:48 -0000 1.52.2.1 @@ -146,7 +146,7 @@ List reflectionsContainerDTO = service.getReflectionList(mcContent, null); request.setAttribute(REFLECTIONS_CONTAINER_DTO, reflectionsContainerDTO); - if (service.studentActivityOccurredGlobal(mcContent)) { + if (!mcContent.getMcSessions().isEmpty()) { // USER_EXCEPTION_NO_TOOL_SESSIONS is set to false mcGeneralMonitoringDTO.setUserExceptionNoToolSessions(new Boolean(false).toString()); } else { Index: lams_tool_lamc/src/java/org/lamsfoundation/lams/tool/mc/web/McPedagogicalPlannerForm.java =================================================================== RCS file: /usr/local/cvsroot/lams_tool_lamc/src/java/org/lamsfoundation/lams/tool/mc/web/McPedagogicalPlannerForm.java,v diff -u -r1.5.2.1 -r1.5.2.2 --- lams_tool_lamc/src/java/org/lamsfoundation/lams/tool/mc/web/McPedagogicalPlannerForm.java 30 Jul 2014 16:39:56 -0000 1.5.2.1 +++ lams_tool_lamc/src/java/org/lamsfoundation/lams/tool/mc/web/McPedagogicalPlannerForm.java 12 Sep 2014 22:43:48 -0000 1.5.2.2 @@ -127,7 +127,7 @@ if (mcContent != null) { setToolContentID(mcContent.getMcContentId()); - List questionDtos = AuthoringUtil.buildDefaultQuestions(mcContent, mcService); + List questionDtos = AuthoringUtil.buildDefaultQuestions(mcContent); StringBuilder candidateAnswersBuilder = new StringBuilder(); setCandidateAnswerCount(new ArrayList(questionDtos.size())); Index: lams_tool_lamc/src/java/org/lamsfoundation/lams/tool/mc/web/McStarterAction.java =================================================================== RCS file: /usr/local/cvsroot/lams_tool_lamc/src/java/org/lamsfoundation/lams/tool/mc/web/McStarterAction.java,v diff -u -r1.99 -r1.99.2.1 --- lams_tool_lamc/src/java/org/lamsfoundation/lams/tool/mc/web/McStarterAction.java 17 May 2014 19:54:42 -0000 1.99 +++ lams_tool_lamc/src/java/org/lamsfoundation/lams/tool/mc/web/McStarterAction.java 12 Sep 2014 22:43:48 -0000 1.99.2.1 @@ -102,7 +102,7 @@ ToolAccessMode mode = getAccessMode(request); // request is from monitoring module if (mode.isTeacher()) { - McUtils.setDefineLater(request, true, strToolContentID, mcService); + mcService.setDefineLater(strToolContentID, true); } request.setAttribute(AttributeNames.ATTR_MODE, mode.toString()); @@ -132,7 +132,7 @@ prepareDTOandForm(request, mapping, mcAuthoringForm, new Long(strToolContentID).longValue(), mcContent, mcGeneralAuthoringDTO, sessionMap); - List questionDtos = AuthoringUtil.buildDefaultQuestions(mcContent, mcService); + List questionDtos = AuthoringUtil.buildDefaultQuestions(mcContent); request.setAttribute(TOTAL_QUESTION_COUNT, new Integer(questionDtos.size())); request.setAttribute(LIST_QUESTION_DTOS, questionDtos); sessionMap.put(LIST_QUESTION_DTOS, questionDtos); @@ -180,7 +180,8 @@ McAuthoringForm mcAuthoringForm, long toolContentID, McContent mcContent, McGeneralAuthoringDTO mcGeneralAuthoringDTO, SessionMap sessionMap) { - McUtils.populateAuthoringDTO(request, mcContent, mcGeneralAuthoringDTO); + mcGeneralAuthoringDTO.setActivityTitle(mcContent.getTitle()); + mcGeneralAuthoringDTO.setActivityInstructions(mcContent.getInstructions()); mcAuthoringForm.setSln(mcContent.isShowReport() ? "1" : "0"); mcAuthoringForm.setQuestionsSequenced(mcContent.isQuestionsSequenced() ? "1" : "0"); Index: lams_tool_lamc/web/authoring/AuthoringTabsHolder.jsp =================================================================== RCS file: /usr/local/cvsroot/lams_tool_lamc/web/authoring/AuthoringTabsHolder.jsp,v diff -u -r1.14 -r1.14.2.1 --- lams_tool_lamc/web/authoring/AuthoringTabsHolder.jsp 17 May 2014 19:54:43 -0000 1.14 +++ lams_tool_lamc/web/authoring/AuthoringTabsHolder.jsp 12 Sep 2014 22:43:46 -0000 1.14.2.1 @@ -84,8 +84,6 @@ } - -
@@ -125,6 +123,5 @@
- \ No newline at end of file Index: lams_tool_lamc/web/authoring/BasicContent.jsp =================================================================== RCS file: /usr/local/cvsroot/lams_tool_lamc/web/authoring/BasicContent.jsp,v diff -u -r1.50 -r1.50.2.1 --- lams_tool_lamc/web/authoring/BasicContent.jsp 17 May 2014 19:54:43 -0000 1.50 +++ lams_tool_lamc/web/authoring/BasicContent.jsp 12 Sep 2014 22:43:46 -0000 1.50.2.1 @@ -64,7 +64,7 @@ form.submit(); } - function exportQTI(){ + function exportQTI() { var frame = document.getElementById("downloadFileDummyIframe"), title = encodeURIComponent(document.getElementsByName("title")[0].value); frame.src = '' Index: lams_tool_lamc/web/authoring/candidateAnswersList.jsp =================================================================== RCS file: /usr/local/cvsroot/lams_tool_lamc/web/authoring/candidateAnswersList.jsp,v diff -u -r1.9 -r1.9.2.1 --- lams_tool_lamc/web/authoring/candidateAnswersList.jsp 17 May 2014 19:54:43 -0000 1.9 +++ lams_tool_lamc/web/authoring/candidateAnswersList.jsp 12 Sep 2014 22:43:46 -0000 1.9.2.1 @@ -83,18 +83,18 @@ - - - + + + - - - - + + + + - " > + " > - + Index: lams_tool_lamc/web/authoring/newQuestionBox.jsp =================================================================== RCS file: /usr/local/cvsroot/lams_tool_lamc/web/authoring/newQuestionBox.jsp,v diff -u -r1.18 -r1.18.2.1 --- lams_tool_lamc/web/authoring/newQuestionBox.jsp 17 May 2014 19:54:43 -0000 1.18 +++ lams_tool_lamc/web/authoring/newQuestionBox.jsp 12 Sep 2014 22:43:46 -0000 1.18.2.1 @@ -147,8 +147,7 @@
- + @@ -178,22 +177,20 @@
- - - + + +
@@ -203,8 +200,7 @@ - + Index: lams_tool_lamc/web/export/class.jsp =================================================================== RCS file: /usr/local/cvsroot/lams_tool_lamc/web/export/class.jsp,v diff -u -r1.5 -r1.5.12.1 --- lams_tool_lamc/web/export/class.jsp 16 May 2008 04:08:29 -0000 1.5 +++ lams_tool_lamc/web/export/class.jsp 12 Sep 2014 22:43:46 -0000 1.5.12.1 @@ -1,114 +1,124 @@ <%@ include file="/common/taglibs.jsp"%> - - - - +
- -
+ + + - - - + + - - - - - - - - - + - + - - - + + + -
+ +
 
: -   ( - ) -
- - - - + + + + + + + + + - + +   () + + + + +
- + + +
 
: +   ( + ) +
+ + + + - - -
+ - -   () - -
-
+
- -
+ +
+ - -

- -

-
- +

+ + +

+
+ +
- - - + + + - - - + + + - - - - - - - - + + + + + + + + - - + + - - - + + + - - - + + + - - - + + + - - - + + + - - + - - - - - - - -
: -
: +
-
+ + + +
+ +
- -
+ + - - + + - -
+ +

+ + + + +
+ + + + + + \ No newline at end of file Index: lams_tool_lamc/web/export/exportportfolio.jsp =================================================================== RCS file: /usr/local/cvsroot/lams_tool_lamc/web/export/exportportfolio.jsp,v diff -u -r1.22 -r1.22.2.1 --- lams_tool_lamc/web/export/exportportfolio.jsp 12 Aug 2013 16:29:02 -0000 1.22 +++ lams_tool_lamc/web/export/exportportfolio.jsp 12 Sep 2014 22:43:46 -0000 1.22.2.1 @@ -1,5 +1,4 @@ - + <%@ include file="/common/taglibs.jsp"%> @@ -18,41 +17,34 @@

- - + +

- - -

+ +

-
- + - - + + - + - + -
+ + - - - - - Index: lams_tool_lamc/web/export/learner.jsp =================================================================== RCS file: /usr/local/cvsroot/lams_tool_lamc/web/export/learner.jsp,v diff -u -r1.2 -r1.2.2.1 --- lams_tool_lamc/web/export/learner.jsp 12 Aug 2013 16:29:02 -0000 1.2 +++ lams_tool_lamc/web/export/learner.jsp 12 Sep 2014 22:43:46 -0000 1.2.2.1 @@ -1,70 +1,72 @@ <%@ include file="/common/taglibs.jsp"%> - +
- - - - - - - - - + - - <%-- only expect one entry for the following two maps as it is one entry per session and then one per user --%> - + + +
 
: -   ( - ) -
- - - - + + + + + + + + + - + +   () + + + + +
- + +
 
+ : +   ( + ) +
+ + + + - - -
+ - -   () - -
-
+
- - - - - - + + <%-- only expect one entry for the following two maps as it is one entry per session and then one per user --%> + - + - + - - - + + + - - - - -
()
+ + + + + + - + - + - +
()
- : -
+ : +
- : -
\ No newline at end of file +
+ : +
\ No newline at end of file Index: lams_tool_lamc/web/export/reflections.jsp =================================================================== RCS file: /usr/local/cvsroot/lams_tool_lamc/web/export/reflections.jsp,v diff -u -r1.1 -r1.1.14.1 --- lams_tool_lamc/web/export/reflections.jsp 15 Aug 2007 03:56:16 -0000 1.1 +++ lams_tool_lamc/web/export/reflections.jsp 12 Sep 2014 22:43:46 -0000 1.1.14.1 @@ -1,45 +1,45 @@ <%@ include file="/common/taglibs.jsp"%> - +
+ + + + + + + + +
+   +
+ + - - - - - -
-   + +
- - - - - - - - - - - - - - + + + + + + + + + - + - - - -
- -
- : -
+ : + - - + + - -
-
\ No newline at end of file +
+ +
+ + + \ No newline at end of file Index: lams_tool_lamc/web/learning/AnswersContent.jsp =================================================================== RCS file: /usr/local/cvsroot/lams_tool_lamc/web/learning/AnswersContent.jsp,v diff -u -r1.36 -r1.36.2.1 --- lams_tool_lamc/web/learning/AnswersContent.jsp 29 Mar 2014 02:16:23 -0000 1.36 +++ lams_tool_lamc/web/learning/AnswersContent.jsp 12 Sep 2014 22:43:47 -0000 1.36.2.1 @@ -1,5 +1,4 @@ - + <%@ include file="/common/taglibs.jsp"%> @@ -31,47 +30,49 @@ - + + + + @@ -160,5 +161,4 @@ - - + Index: lams_tool_lamc/web/learning/IndividualLearnerResults.jsp =================================================================== RCS file: /usr/local/cvsroot/lams_tool_lamc/web/learning/Attic/IndividualLearnerResults.jsp,v diff -u -r1.57 -r1.57.2.1 --- lams_tool_lamc/web/learning/IndividualLearnerResults.jsp 29 Mar 2014 02:16:23 -0000 1.57 +++ lams_tool_lamc/web/learning/IndividualLearnerResults.jsp 12 Sep 2014 22:43:47 -0000 1.57.2.1 @@ -1,5 +1,4 @@ - + <%@ include file="/common/taglibs.jsp"%> @@ -38,8 +37,7 @@ - + @@ -50,22 +48,18 @@ - - - -

- -

- -
- - -

- -

- -
+ +

+ +

+
+ + +

+ +

+
@@ -78,22 +72,21 @@

- - + - - - - - - - - - - - - + + + + + + + + + + +

@@ -120,24 +113,25 @@ -

- +

+ - - - images/tick.gif" border="0" class="middle"> - - - images/cross.gif" border="0" class="middle"> - + + + images/tick.gif" border="0" class="middle"> -

+ + images/cross.gif" border="0" class="middle"> + + +

- -
- -
-
+ +
+ + +
+
@@ -147,28 +141,26 @@ - - - - + + + + - - - - + + + +
- - - -
+ + + +
- - - -
+ + + +
- - + -

@@ -180,38 +172,11 @@ - -

- - - - - - - - - - - - - - - - - - - - - - - - -
-
- +
Index: lams_tool_lamc/web/learning/Notebook.jsp =================================================================== RCS file: /usr/local/cvsroot/lams_tool_lamc/web/learning/Notebook.jsp,v diff -u -r1.19 -r1.19.2.1 --- lams_tool_lamc/web/learning/Notebook.jsp 29 Mar 2014 02:16:23 -0000 1.19 +++ lams_tool_lamc/web/learning/Notebook.jsp 12 Sep 2014 22:43:46 -0000 1.19.2.1 @@ -20,8 +20,7 @@ - + @@ -33,39 +32,25 @@ - -

- +
- + onclick="javascript:document.McLearningForm.submit();return false"> +
-
- - - - - - - - - - Index: lams_tool_lamc/web/learning/SimpleLearnerError.jsp =================================================================== RCS file: /usr/local/cvsroot/lams_tool_lamc/web/learning/SimpleLearnerError.jsp,v diff -u -r1.3 -r1.3.2.1 --- lams_tool_lamc/web/learning/SimpleLearnerError.jsp 12 Aug 2013 16:29:02 -0000 1.3 +++ lams_tool_lamc/web/learning/SimpleLearnerError.jsp 12 Sep 2014 22:43:47 -0000 1.3.2.1 @@ -26,12 +26,4 @@ - - - - - - - - - + \ No newline at end of file Index: lams_tool_lamc/web/learning/SingleQuestionAnswersContent.jsp =================================================================== RCS file: /usr/local/cvsroot/lams_tool_lamc/web/learning/SingleQuestionAnswersContent.jsp,v diff -u -r1.34 -r1.34.2.1 --- lams_tool_lamc/web/learning/SingleQuestionAnswersContent.jsp 8 Jan 2014 17:49:42 -0000 1.34 +++ lams_tool_lamc/web/learning/SingleQuestionAnswersContent.jsp 12 Sep 2014 22:43:46 -0000 1.34.2.1 @@ -33,6 +33,7 @@ +
Index: lams_tool_lamc/web/learning/ViewAnswers.jsp =================================================================== RCS file: /usr/local/cvsroot/lams_tool_lamc/web/learning/ViewAnswers.jsp,v diff -u -r1.69 -r1.69.2.1 --- lams_tool_lamc/web/learning/ViewAnswers.jsp 29 Mar 2014 02:16:23 -0000 1.69 +++ lams_tool_lamc/web/learning/ViewAnswers.jsp 12 Sep 2014 22:43:47 -0000 1.69.2.1 @@ -1,5 +1,4 @@ - + <%@ include file="/common/taglibs.jsp"%> @@ -27,10 +26,11 @@ elem.disabled = true; } } - function submitForm(methodName){ - var f = document.getElementById('Form1'); - f.submit(); - } + + function submitForm(methodName) { + var f = document.getElementById('Form1'); + f.submit(); + } @@ -49,8 +49,7 @@ - + @@ -73,8 +72,7 @@ - +
@@ -83,23 +81,21 @@ ${status.count}) -
+
- - + -
    - -
  • - -
  • -
    -
+
    + +
  • + +
  • +
    +

@@ -111,14 +107,16 @@ + images/tick.gif" border="0" class="middle"> images/cross.gif" border="0" class="middle"> - + + @@ -127,47 +125,46 @@ - - - -

- -
-
+ + + +
+ +
+
- - + -

- -

+

+ +

- - - - - +
- - - -
+ + + + - - + + - -
+ + + +
- -
+ + - +
-
+ + + @@ -225,7 +222,7 @@

- +

Index: lams_tool_lamc/web/learning/submissionDeadline.jsp =================================================================== RCS file: /usr/local/cvsroot/lams_tool_lamc/web/learning/submissionDeadline.jsp,v diff -u -r1.1 -r1.1.2.1 --- lams_tool_lamc/web/learning/submissionDeadline.jsp 17 Jan 2014 22:04:49 -0000 1.1 +++ lams_tool_lamc/web/learning/submissionDeadline.jsp 12 Sep 2014 22:43:46 -0000 1.1.2.1 @@ -1,5 +1,4 @@ - + <%@ include file="/common/taglibs.jsp"%> @@ -24,23 +23,22 @@ elem.disabled = true; } } - function submitForm(methodName){ - var f = document.getElementById('messageForm'); - f.submit(); - } + + function submitForm(methodName){ + var f = document.getElementById('messageForm'); + f.submit(); + } - + -

@@ -78,16 +76,10 @@

+
+ - - - - - - - - Index: lams_tool_lamc/web/learning/mobile/AnswersContent.jsp =================================================================== RCS file: /usr/local/cvsroot/lams_tool_lamc/web/learning/mobile/AnswersContent.jsp,v diff -u -r1.8.2.1 -r1.8.2.2 --- lams_tool_lamc/web/learning/mobile/AnswersContent.jsp 2 Sep 2014 20:48:20 -0000 1.8.2.1 +++ lams_tool_lamc/web/learning/mobile/AnswersContent.jsp 12 Sep 2014 22:43:47 -0000 1.8.2.2 @@ -14,6 +14,7 @@ <fmt:message key="activity.title" /> <%@ include file="/common/mobileheader.jsp"%> + + + + - - +
Index: lams_tool_lamc/web/monitoring/Edit.jsp =================================================================== RCS file: /usr/local/cvsroot/lams_tool_lamc/web/monitoring/Edit.jsp,v diff -u -r1.12 -r1.12.2.1 --- lams_tool_lamc/web/monitoring/Edit.jsp 17 May 2014 19:54:41 -0000 1.12 +++ lams_tool_lamc/web/monitoring/Edit.jsp 12 Sep 2014 22:43:46 -0000 1.12.2.1 @@ -83,10 +83,5 @@ - - - - - + - Index: lams_tool_lamc/web/monitoring/LearnerNotebook.jsp =================================================================== RCS file: /usr/local/cvsroot/lams_tool_lamc/web/monitoring/LearnerNotebook.jsp,v diff -u -r1.11 -r1.11.2.1 --- lams_tool_lamc/web/monitoring/LearnerNotebook.jsp 29 Mar 2014 02:16:23 -0000 1.11 +++ lams_tool_lamc/web/monitoring/LearnerNotebook.jsp 12 Sep 2014 22:43:46 -0000 1.11.2.1 @@ -21,53 +21,44 @@ - -
+

- - - - - - - - -
-

- -

-
-

-
+ + + + + + + + +
+

+ +

+
+

+ +

+
- - - - -
- - -
- + + + + +
+ + + +
-
+
- -
- - - - - - - - Index: lams_tool_lamc/web/monitoring/Reflections.jsp =================================================================== RCS file: /usr/local/cvsroot/lams_tool_lamc/web/monitoring/Reflections.jsp,v diff -u -r1.7 -r1.7.2.1 --- lams_tool_lamc/web/monitoring/Reflections.jsp 6 Apr 2014 20:06:50 -0000 1.7 +++ lams_tool_lamc/web/monitoring/Reflections.jsp 12 Sep 2014 22:43:46 -0000 1.7.2.1 @@ -1,41 +1,40 @@ <%@ include file="/common/taglibs.jsp"%> - - + +
- - - + + + - - - - - - - - + + + + + + + + - - - -
- -
+ +
- -
+ + - - - - - - - - + + + + + + + + + - - - - -
-
+ + + + + + + + Index: lams_tool_lamc/web/monitoring/Stats.jsp =================================================================== RCS file: /usr/local/cvsroot/lams_tool_lamc/web/monitoring/Stats.jsp,v diff -u -r1.24 -r1.24.2.1 --- lams_tool_lamc/web/monitoring/Stats.jsp 3 Apr 2014 03:56:58 -0000 1.24 +++ lams_tool_lamc/web/monitoring/Stats.jsp 12 Sep 2014 22:43:46 -0000 1.24.2.1 @@ -3,24 +3,22 @@ - - - - - +
- - - -
+ + + + - - - - -
+ + + +
- - - -
- - + + + + + + + + + \ No newline at end of file Index: lams_tool_lamc/web/monitoring/parts/advanceOptions.jsp =================================================================== RCS file: /usr/local/cvsroot/lams_tool_lamc/web/monitoring/parts/advanceOptions.jsp,v diff -u -r1.4 -r1.4.2.1 --- lams_tool_lamc/web/monitoring/parts/advanceOptions.jsp 29 Mar 2014 02:16:23 -0000 1.4 +++ lams_tool_lamc/web/monitoring/parts/advanceOptions.jsp 12 Sep 2014 22:43:48 -0000 1.4.2.1 @@ -165,21 +165,23 @@ - - -

- -

-
- -

-
- + + +

+ +

+
+ +

+ +
+ + - -

-
-
+ +

+ +
Index: lams_tool_lamc/web/monitoring/parts/advanceQuestions.jsp =================================================================== RCS file: /usr/local/cvsroot/lams_tool_lamc/web/monitoring/parts/advanceQuestions.jsp,v diff -u -r1.2 -r1.2.2.1 --- lams_tool_lamc/web/monitoring/parts/advanceQuestions.jsp 29 Jan 2014 20:22:12 -0000 1.2 +++ lams_tool_lamc/web/monitoring/parts/advanceQuestions.jsp 12 Sep 2014 22:43:48 -0000 1.2.2.1 @@ -8,45 +8,44 @@ \ No newline at end of file Index: lams_tool_laqa/src/java/org/lamsfoundation/lams/tool/qa/qaApplicationContext.xml =================================================================== RCS file: /usr/local/cvsroot/lams_tool_laqa/src/java/org/lamsfoundation/lams/tool/qa/qaApplicationContext.xml,v diff -u -r1.31.2.1 -r1.31.2.2 --- lams_tool_laqa/src/java/org/lamsfoundation/lams/tool/qa/qaApplicationContext.xml 16 Aug 2014 11:20:45 -0000 1.31.2.1 +++ lams_tool_laqa/src/java/org/lamsfoundation/lams/tool/qa/qaApplicationContext.xml 12 Sep 2014 22:43:07 -0000 1.31.2.2 @@ -99,6 +99,7 @@ PROPAGATION_REQUIRED, -QaApplicationException PROPAGATION_REQUIRED,-QaApplicationException PROPAGATION_REQUIRED,-QaApplicationException + PROPAGATION_REQUIRED,-QaApplicationException PROPAGATION_REQUIRED,-QaApplicationException PROPAGATION_REQUIRED,-QaApplicationException PROPAGATION_REQUIRED,-QaApplicationException Index: lams_tool_laqa/src/java/org/lamsfoundation/lams/tool/qa/dao/IQaQueUsrDAO.java =================================================================== RCS file: /usr/local/cvsroot/lams_tool_laqa/src/java/org/lamsfoundation/lams/tool/qa/dao/IQaQueUsrDAO.java,v diff -u -r1.18 -r1.18.2.1 --- lams_tool_laqa/src/java/org/lamsfoundation/lams/tool/qa/dao/IQaQueUsrDAO.java 3 Jun 2014 16:22:22 -0000 1.18 +++ lams_tool_laqa/src/java/org/lamsfoundation/lams/tool/qa/dao/IQaQueUsrDAO.java 12 Sep 2014 22:43:06 -0000 1.18.2.1 @@ -44,7 +44,5 @@ int countSessionUser(QaSession qaSession); - int getTotalNumberOfUsers(QaContent qa); - List getUserBySessionOnly(final QaSession qaSession); } Index: lams_tool_laqa/src/java/org/lamsfoundation/lams/tool/qa/dao/IQaSessionDAO.java =================================================================== RCS file: /usr/local/cvsroot/lams_tool_laqa/src/java/org/lamsfoundation/lams/tool/qa/dao/IQaSessionDAO.java,v diff -u -r1.16 -r1.16.2.1 --- lams_tool_laqa/src/java/org/lamsfoundation/lams/tool/qa/dao/IQaSessionDAO.java 3 Jun 2014 16:22:22 -0000 1.16 +++ lams_tool_laqa/src/java/org/lamsfoundation/lams/tool/qa/dao/IQaSessionDAO.java 12 Sep 2014 22:43:06 -0000 1.16.2.1 @@ -33,15 +33,11 @@ */ public interface IQaSessionDAO { - int countSessionComplete(QaContent qa); - QaSession getQaSessionById(long qaSessionId); void createSession(QaSession session); void UpdateQaSession(QaSession session); void deleteQaSession(QaSession session); - - List getSessionsFromContent(QaContent qaContent); } Index: lams_tool_laqa/src/java/org/lamsfoundation/lams/tool/qa/dao/hibernate/QaQueUsrDAO.java =================================================================== RCS file: /usr/local/cvsroot/lams_tool_laqa/src/java/org/lamsfoundation/lams/tool/qa/dao/hibernate/QaQueUsrDAO.java,v diff -u -r1.26.2.1 -r1.26.2.2 --- lams_tool_laqa/src/java/org/lamsfoundation/lams/tool/qa/dao/hibernate/QaQueUsrDAO.java 15 Aug 2014 09:58:31 -0000 1.26.2.1 +++ lams_tool_laqa/src/java/org/lamsfoundation/lams/tool/qa/dao/hibernate/QaQueUsrDAO.java 12 Sep 2014 22:43:06 -0000 1.26.2.2 @@ -44,9 +44,6 @@ private static final String COUNT_SESSION_USER = "select qaQueUsr.queUsrId from QaQueUsr qaQueUsr where qaQueUsr.qaSession.qaSessionId= :qaSession"; private static final String LOAD_USER_FOR_SESSION = "from qaQueUsr in class QaQueUsr where qaQueUsr.qaSession.qaSessionId= :qaSessionId"; - private static final String GET_USER_COUNT_FOR_CONTENT = "select count(*) from QaQueUsr quser, QaSession qses, QaQueContent qcon where " - + "quser.qaSession=qses and " + "qses.qaContent=qcon and " + "qcon.uid=:uid"; - public int countSessionUser(QaSession qaSession) { return (getHibernateTemplate().findByNamedParam(COUNT_SESSION_USER, "qaSession", qaSession)).size(); } @@ -87,17 +84,4 @@ this.getHibernateTemplate().delete(qaQueUsr); } - public int getTotalNumberOfUsers(QaContent qa) { - - int returnInt = 0; - if (qa != null && qa.getUid() != null) { - List result = getSessionFactory().getCurrentSession().createQuery(GET_USER_COUNT_FOR_CONTENT).setLong("uid", qa.getUid()).list(); - Long resultLong = (result.get(0) != null) ? (Long) result.get(0) : new Long(0); - returnInt = resultLong.intValue(); - } else { - logger.error("Attempt to count users from null content"); - } - return returnInt; - } - } \ No newline at end of file Index: lams_tool_laqa/src/java/org/lamsfoundation/lams/tool/qa/dao/hibernate/QaSessionDAO.java =================================================================== RCS file: /usr/local/cvsroot/lams_tool_laqa/src/java/org/lamsfoundation/lams/tool/qa/dao/hibernate/QaSessionDAO.java,v diff -u -r1.22.2.1 -r1.22.2.2 --- lams_tool_laqa/src/java/org/lamsfoundation/lams/tool/qa/dao/hibernate/QaSessionDAO.java 15 Aug 2014 09:58:31 -0000 1.22.2.1 +++ lams_tool_laqa/src/java/org/lamsfoundation/lams/tool/qa/dao/hibernate/QaSessionDAO.java 12 Sep 2014 22:43:07 -0000 1.22.2.2 @@ -36,22 +36,7 @@ * */ public class QaSessionDAO extends HibernateDaoSupport implements IQaSessionDAO { - private static final String COUNT_SESSION_COMPLETE = "from qaSession in class QaSession where qaSession.session_status='COMPLETE'"; - private static final String GET_SESSION_IDS_FROM_CONTENT = "select qas.qaSessionId from QaSession qas where qas.qaContent=:qaContent order by qas.session_name asc"; - public int countSessionComplete(QaContent qa) { - List list = getSessionFactory().getCurrentSession().createQuery(COUNT_SESSION_COMPLETE).list(); - - int sessionCount = 0; - if (list != null && list.size() > 0) { - QaSession qaSession = (QaSession) list.get(0); - if (qaSession.getQaContent().getUid().intValue() == qa.getUid().intValue()) { - ++sessionCount; - } - } - return sessionCount; - } - /** * @see org.lamsfoundation.lams.tool.survey.dao.interfaces.ISurveySessionDAO#getSurveySessionById(long) */ @@ -90,8 +75,4 @@ this.getHibernateTemplate().delete(qaSession); } - public List getSessionsFromContent(QaContent qaContent) { - return (getHibernateTemplate().findByNamedParam(GET_SESSION_IDS_FROM_CONTENT, "qaContent", qaContent)); - } - } Index: lams_tool_laqa/src/java/org/lamsfoundation/lams/tool/qa/dao/hibernate/QaUsrRespDAO.java =================================================================== RCS file: /usr/local/cvsroot/lams_tool_laqa/src/java/org/lamsfoundation/lams/tool/qa/dao/hibernate/QaUsrRespDAO.java,v diff -u -r1.18.2.2 -r1.18.2.3 --- lams_tool_laqa/src/java/org/lamsfoundation/lams/tool/qa/dao/hibernate/QaUsrRespDAO.java 2 Sep 2014 20:25:32 -0000 1.18.2.2 +++ lams_tool_laqa/src/java/org/lamsfoundation/lams/tool/qa/dao/hibernate/QaUsrRespDAO.java 12 Sep 2014 22:43:07 -0000 1.18.2.3 @@ -25,9 +25,11 @@ import java.util.List; +import org.apache.poi.ss.formula.functions.Rate; import org.hibernate.FlushMode; import org.lamsfoundation.lams.tool.qa.QaAppConstants; import org.lamsfoundation.lams.tool.qa.QaUsrResp; +import org.lamsfoundation.lams.tool.qa.ResponseRating; import org.lamsfoundation.lams.tool.qa.dao.IQaUsrRespDAO; import org.springframework.orm.hibernate4.support.HibernateDaoSupport; Index: lams_tool_laqa/src/java/org/lamsfoundation/lams/tool/qa/service/IQaService.java =================================================================== RCS file: /usr/local/cvsroot/lams_tool_laqa/src/java/org/lamsfoundation/lams/tool/qa/service/IQaService.java,v diff -u -r1.66.2.1 -r1.66.2.2 --- lams_tool_laqa/src/java/org/lamsfoundation/lams/tool/qa/service/IQaService.java 2 Sep 2014 20:25:32 -0000 1.66.2.1 +++ lams_tool_laqa/src/java/org/lamsfoundation/lams/tool/qa/service/IQaService.java 12 Sep 2014 22:43:06 -0000 1.66.2.2 @@ -45,6 +45,7 @@ import org.lamsfoundation.lams.tool.qa.dto.GroupDTO; import org.lamsfoundation.lams.tool.qa.dto.QaQuestionDTO; import org.lamsfoundation.lams.tool.qa.dto.ReflectionDTO; +import org.lamsfoundation.lams.tool.qa.util.QaApplicationException; import org.lamsfoundation.lams.util.audit.IAuditService; /** @@ -76,6 +77,8 @@ * @param leader */ void copyAnswersFromLeader(QaQueUsr user, QaQueUsr leader); + + void setDefineLater(String strToolContentID, boolean value); /** * Get users by given toolSessionID. @@ -97,10 +100,6 @@ void saveOrUpdateQaContent(QaContent qa); - int getTotalNumberOfUsers(QaContent qa); - - int countSessionComplete(QaContent qa); - void updateUser(QaQueUsr qaQueUsr); List getResponsesByUserUid(final Long userUid); @@ -154,12 +153,8 @@ */ QaSession getSessionById(long qaSessionId); - void createSession(QaSession qaSession); - void removeToolSession(Long toolSessionId) throws DataMissingException, ToolException; - List getSessionsFromContent(QaContent qaContent); - QaQueUsr createUser(Long toolSessionID); void updateSession(QaSession qaSession); @@ -176,8 +171,6 @@ List getAllQuestionEntries(final Long uid); - List getUserBySessionOnly(final QaSession qaSession); - void recalculateUserAnswers(QaContent content, Set oldQuestions, List questionDTOs, List deletedQuestions); @@ -189,6 +182,13 @@ */ void copyToolContent(Long fromContentId, Long toContentId) throws ToolException; + /** + * checks the paramter content in the user responses table + * + * @param qa + * @return boolean + * @throws QaApplicationException + */ boolean isStudentActivityOccurredGlobal(QaContent qaContent); /** Index: lams_tool_laqa/src/java/org/lamsfoundation/lams/tool/qa/service/QaServicePOJO.java =================================================================== RCS file: /usr/local/cvsroot/lams_tool_laqa/src/java/org/lamsfoundation/lams/tool/qa/service/QaServicePOJO.java,v diff -u -r1.111.2.1 -r1.111.2.2 --- lams_tool_laqa/src/java/org/lamsfoundation/lams/tool/qa/service/QaServicePOJO.java 2 Sep 2014 20:25:32 -0000 1.111.2.1 +++ lams_tool_laqa/src/java/org/lamsfoundation/lams/tool/qa/service/QaServicePOJO.java 12 Sep 2014 22:43:06 -0000 1.111.2.2 @@ -39,6 +39,7 @@ import java.util.TreeMap; import java.util.TreeSet; +import javax.servlet.http.HttpServletRequest; import javax.servlet.http.HttpSession; import org.apache.log4j.Logger; @@ -205,29 +206,45 @@ } } } + + @Override + public void setDefineLater(String strToolContentID, boolean value) { + QaContent qaContent = getQaContent(new Long(strToolContentID).longValue()); + + if (qaContent != null) { + qaContent.setDefineLater(value); + updateQaContent(qaContent); + } + } + @Override public List getUsersBySessionId(Long toolSessionID) { QaSession session = qaSessionDAO.getQaSessionById(toolSessionID); return qaQueUsrDAO.getUserBySessionOnly(session); } + @Override public void createQaContent(QaContent qaContent) { qaDAO.saveQa(qaContent); } + @Override public QaContent getQaContent(long toolContentID) { return qaDAO.getQaByContentId(toolContentID); } + @Override public void saveOrUpdateQaContent(QaContent qa) { qaDAO.saveOrUpdateQa(qa); } + @Override public QaQueContent getQuestionByContentAndDisplayOrder(Long displayOrder, Long contentUid) { return qaQuestionDAO.getQuestionByDisplayOrder(displayOrder, contentUid); } + @Override public QaQueContent getQuestionByUid(Long questionUid) { if (questionUid == null) { return null; @@ -236,22 +253,16 @@ return qaQuestionDAO.getQuestionByUid(questionUid); } + @Override public void saveOrUpdateQuestion(QaQueContent question) { qaQuestionDAO.saveOrUpdateQaQueContent(question); } + @Override public void createQuestion(QaQueContent question) { qaQuestionDAO.createQueContent(question); } - public void createSession(QaSession qaSession) { - qaSessionDAO.createSession(qaSession); - } - - public List getSessionsFromContent(QaContent qaContent) { - return qaSessionDAO.getSessionsFromContent(qaContent); - } - public QaQueUsr createUser(Long toolSessionID) { HttpSession ss = SessionManager.getSession(); UserDTO toolUser = (UserDTO) ss.getAttribute(AttributeNames.USER); @@ -307,10 +318,12 @@ return qaResponseRatingDAO.getAverageRatingDTOByUserAndContentId(userUid, contentId); } + @Override public void updateUserResponse(QaUsrResp resp) { qaUsrRespDAO.updateUserResponse(resp); } + @Override public void updateResponseWithNewAnswer(String newAnswer, String toolSessionID, Long questionDisplayOrder) { HttpSession ss = SessionManager.getSession(); UserDTO toolUser = (UserDTO) ss.getAttribute(AttributeNames.USER); @@ -337,38 +350,37 @@ } } - public List getUserBySessionOnly(final QaSession qaSession) { - return qaQueUsrDAO.getUserBySessionOnly(qaSession); - } - + @Override public void createUserResponse(QaUsrResp qaUsrResp) { qaUsrRespDAO.createUserResponse(qaUsrResp); } + @Override public void updateUser(QaQueUsr qaQueUsr) { qaQueUsrDAO.updateUsr(qaQueUsr); } + @Override public QaUsrResp getResponseById(Long responseId) { return qaUsrRespDAO.getResponseById(responseId); } - public int countSessionComplete(QaContent qa) { - return qaSessionDAO.countSessionComplete(qa); - } - + @Override public QaSession getSessionById(long qaSessionId) { return qaSessionDAO.getQaSessionById(qaSessionId); } + @Override public void updateQaContent(QaContent qa) { qaDAO.updateQa(qa); } + @Override public void updateSession(QaSession qaSession) { qaSessionDAO.UpdateQaSession(qaSession); } + @Override public void removeUserResponse(QaUsrResp resp) { auditService.logChange(QaAppConstants.MY_SIGNATURE, resp.getQaQueUser().getQueUsrId(), resp.getQaQueUser() .getUsername(), resp.getAnswer(), null); @@ -397,29 +409,22 @@ } } - public int getTotalNumberOfUsers(QaContent qa) { - return qaQueUsrDAO.getTotalNumberOfUsers(qa); - } - + @Override public List getAllQuestionEntries(final Long uid) { return qaQuestionDAO.getAllQuestionEntries(uid.longValue()); } + @Override public List getAllQuestionEntriesSorted(final long contentUid) { return qaQuestionDAO.getAllQuestionEntriesSorted(contentUid); } + @Override public void removeQuestion(QaQueContent question) { qaQuestionDAO.removeQaQueContent(question); } - /** - * checks the paramter content in the user responses table - * - * @param qa - * @return boolean - * @throws QaApplicationException - */ + @Override public boolean isStudentActivityOccurredGlobal(QaContent qaContent) { int countResponses = 0; if (qaContent != null) { @@ -609,6 +614,7 @@ } } + @Override public AverageRatingDTO rateResponse(Long responseId, Long userId, Long toolSessionID, float rating) { QaQueUsr imageGalleryUser = this.getUserByIdAndSession(userId, toolSessionID); ResponseRating responseRating = qaResponseRatingDAO.getRatingByResponseAndUser(responseId, userId); @@ -627,10 +633,12 @@ return qaResponseRatingDAO.getAverageRatingDTOByResponse(responseId); } + @Override public AverageRatingDTO getAverageRatingDTOByResponse(Long responseId) { return qaResponseRatingDAO.getAverageRatingDTOByResponse(responseId); } + @Override public List getReflectList(QaContent content, String userID) { // reflection data for all sessions @@ -905,15 +913,7 @@ eventNotificationService.notifyLessonMonitors(sessionId, message, true); } - /** - * Export the XML fragment for the tool's content, along with any files needed for the content. - * - * @throws DataMissingException - * if no tool content matches the toolSessionId - * @throws ToolException - * if any other error occurs - */ - + @Override public void exportToolContent(Long toolContentID, String rootPath) { QaContent toolContentObj = qaDAO.getQaByContentId(toolContentID); if (toolContentObj == null) { @@ -946,12 +946,7 @@ } } - /** - * Import the XML fragment for the tool's content, along with any files needed for the content. - * - * @throws ToolException - * if any other error occurs - */ + @Override public void importToolContent(Long toolContentID, Integer newUserUid, String toolContentPath, String fromVersion, String toVersion) throws ToolException { try { @@ -981,14 +976,7 @@ } } - /** - * Get the definitions for possible output for an activity, based on the toolContentId. These may be definitions - * that are always available for the tool (e.g. number of marks for Multiple Choice) or a custom definition created - * for a particular activity such as the answer to the third question contains the word Koala and hence the need for - * the toolContentId - * - * @return SortedMap of ToolOutputDefinitions with the key being the name of each definition - */ + @Override public SortedMap getToolOutputDefinitions(Long toolContentId, int definitionType) throws ToolException { QaContent qaContent = qaDAO.getQaByContentId(toolContentId); @@ -1010,11 +998,7 @@ return qaDAO.getQaByContentId(toolContentId).isDefineLater(); } - /** - * ToolSessionManager CONTRACT : creates a tool session with the incoming toolSessionId in the tool session table - * - * gets called only in the Learner mode. All the learners in the same group have the same toolSessionId. - */ + @Override public void createToolSession(Long toolSessionId, String toolSessionName, Long toolContentID) throws ToolException { if (toolSessionId == null) { @@ -1040,6 +1024,7 @@ } } + @Override public void removeToolSession(Long toolSessionId) throws DataMissingException, ToolException { if (toolSessionId == null) { QaServicePOJO.logger.error("toolSessionId is null"); @@ -1067,13 +1052,7 @@ } } - /** - * Complete the tool session. - * - * Part of the ToolSessionManager contract. Called by controller service to force complete the qa session, or by the - * web front end to complete the qa session - * - */ + @Override public String leaveToolSession(Long toolSessionId, Long learnerId) throws DataMissingException, ToolException { if (toolSessionId == null) { @@ -1102,28 +1081,20 @@ /** * ToolSessionManager CONTRACT - * */ public ToolSessionExportOutputData exportToolSession(Long toolSessionId) throws DataMissingException, ToolException { throw new ToolException("not yet implemented"); } /** * ToolSessionManager CONTRACT - * */ public ToolSessionExportOutputData exportToolSession(List toolSessionIds) throws DataMissingException, ToolException { - throw new ToolException("not yet implemented"); } - /** - * Get the tool output for the given tool output names. - * - * @see org.lamsfoundation.lams.tool.ToolSessionManager#getToolOutput(java.util.List, java.lang.Long, - * java.lang.Long) - */ + @Override public SortedMap getToolOutput(List names, Long toolSessionId, Long learnerId) { return getQaOutputFactory().getToolOutput(names, this, toolSessionId, learnerId); } @@ -1360,9 +1331,7 @@ } - /** - * Set the description, throws away the title value as this is not supported in 2.0 - */ + @Override public void setReflectiveData(Long toolContentId, String title, String description) throws ToolException, DataMissingException { @@ -1431,6 +1400,7 @@ this.qaWizardDAO = qaWizardDAO; } + @Override public QaContent getQaContentBySessionId(Long sessionId) { QaSession session = qaSessionDAO.getQaSessionById(sessionId); // to skip CGLib problem @@ -1439,9 +1409,7 @@ return qaContent; } - /** - * {@inheritDoc} - */ + @Override public String createConditionName(Collection existingConditions) { String uniqueNumber = null; do { @@ -1456,95 +1424,69 @@ return getQaOutputFactory().buildUserAnswersConditionName(uniqueNumber); } + @Override public void deleteCondition(QaCondition condition) { if (condition != null && condition.getConditionId() != null) { qaDAO.deleteCondition(condition); } } + @Override public QaCondition createDefaultComplexCondition(QaContent qaContent) { return getQaOutputFactory().createDefaultComplexUserAnswersCondition(qaContent); } - /** - * Gets the qa config item with the given key - * - * @param configKey - * @return - */ + @Override public QaConfigItem getConfigItem(String configKey) { return qaConfigItemDAO.getConfigItemByKey(configKey); } - /** - * Saves or updates a qa config item - * - * @param configItem - */ + @Override public void saveOrUpdateConfigItem(QaConfigItem configItem) { qaConfigItemDAO.saveOrUpdate(configItem); } - /** - * Gets the set of wizard categories from the database - * - * @return - */ + @Override public SortedSet getWizardCategories() { return qaWizardDAO.getWizardCategories(); } - /** - * Saves the entire set of QaWizardCategories (including the child cognitive skills and questions) - * - * @param categories - */ + @Override public void saveOrUpdateQaWizardCategories(SortedSet categories) { qaWizardDAO.saveOrUpdateCategories(categories); } - /** - * Deletes a wizard category from the db - * - * @param uid - */ + @Override public void deleteWizardCategoryByUID(Long uid) { qaWizardDAO.deleteWizardCategoryByUID(uid); } - /** - * Deletes a wizard cognitive skill from the db - * - * @param uid - */ + @Override public void deleteWizardSkillByUID(Long uid) { qaWizardDAO.deleteWizardSkillByUID(uid); } - /** - * Deletes a wizard question from the db - * - * @param uid - */ + @Override public void deleteWizardQuestionByUID(Long uid) { qaWizardDAO.deleteWizardQuestionByUID(uid); } - /** - * Deletes all categories, sub skills and sub questions - */ + @Override public void deleteAllWizardCategories() { qaWizardDAO.deleteAllWizardCategories(); } + @Override public void removeQuestionsFromCache(QaContent qaContent) { qaDAO.removeQuestionsFromCache(qaContent); } + @Override public void removeQaContentFromCache(QaContent qaContent) { qaDAO.removeQaContentFromCache(qaContent); } + @Override public Class[] getSupportedToolOutputDefinitionClasses(int definitionType) { return getQaOutputFactory().getSupportedDefinitionClasses(definitionType); } Index: lams_tool_laqa/src/java/org/lamsfoundation/lams/tool/qa/util/QaUtils.java =================================================================== RCS file: /usr/local/cvsroot/lams_tool_laqa/src/java/org/lamsfoundation/lams/tool/qa/util/QaUtils.java,v diff -u -r1.11 -r1.11.2.1 --- lams_tool_laqa/src/java/org/lamsfoundation/lams/tool/qa/util/QaUtils.java 3 Jun 2014 16:22:22 -0000 1.11 +++ lams_tool_laqa/src/java/org/lamsfoundation/lams/tool/qa/util/QaUtils.java 12 Sep 2014 22:43:07 -0000 1.11.2.1 @@ -197,21 +197,4 @@ request.getSession().removeAttribute(USER_EXCEPTION_QUESTIONS_DUPLICATE); } - /** - * - * @param request - * @param value - * @param toolContentID - */ - public static void setDefineLater(HttpServletRequest request, boolean value, String strToolContentID, - IQaService qaService) { - - QaContent qaContent = qaService.getQaContent(new Long(strToolContentID).longValue()); - - if (qaContent != null) { - qaContent.setDefineLater(value); - qaService.updateQaContent(qaContent); - } - } - } Index: lams_tool_laqa/src/java/org/lamsfoundation/lams/tool/qa/web/AuthoringUtil.java =================================================================== RCS file: /usr/local/cvsroot/lams_tool_laqa/src/java/org/lamsfoundation/lams/tool/qa/web/AuthoringUtil.java,v diff -u -r1.61 -r1.61.2.1 --- lams_tool_laqa/src/java/org/lamsfoundation/lams/tool/qa/web/AuthoringUtil.java 3 Jun 2014 16:22:22 -0000 1.61 +++ lams_tool_laqa/src/java/org/lamsfoundation/lams/tool/qa/web/AuthoringUtil.java 12 Sep 2014 22:43:04 -0000 1.61.2.1 @@ -56,105 +56,8 @@ */ public class AuthoringUtil implements QaAppConstants { - protected static List swapQuestions(List questionDTOs, String questionIndex, - String direction, Set conditions) { - int intQuestionIndex = new Integer(questionIndex).intValue(); - int intOriginalQuestionIndex = intQuestionIndex; - int replacedQuestionIndex = 0; - if (direction.equals("down")) { - // direction down - replacedQuestionIndex = ++intQuestionIndex; - } else { - // direction up - replacedQuestionIndex = --intQuestionIndex; - } - - QaQuestionDTO mainQuestion = getQuestionAtDisplayOrder(questionDTOs, intOriginalQuestionIndex); - - QaQuestionDTO replacedQuestion = getQuestionAtDisplayOrder(questionDTOs, replacedQuestionIndex); - - List newQuestionDtos = new LinkedList(); - - Iterator iter = questionDTOs.iterator(); - while (iter.hasNext()) { - QaQuestionDTO questionDTO = iter.next(); - QaQuestionDTO tempQuestion = null; - - if (!questionDTO.getDisplayOrder().equals(new Integer(intOriginalQuestionIndex).toString()) - && !questionDTO.getDisplayOrder().equals(new Integer(replacedQuestionIndex).toString())) { - // normal copy - tempQuestion = questionDTO; - - } else if (questionDTO.getDisplayOrder().equals(new Integer(intOriginalQuestionIndex).toString())) { - // move type 1 - tempQuestion = replacedQuestion; - - } else if (questionDTO.getDisplayOrder().equals(new Integer(replacedQuestionIndex).toString())) { - // move type 1 - tempQuestion = mainQuestion; - } - - newQuestionDtos.add(tempQuestion); - } - - // references in conditions also need to be changed - if (conditions != null) { - for (QaCondition condition : conditions) { - SortedSet newQuestionDTOSet = new TreeSet( - new QaQuestionContentDTOComparator()); - for (QaQuestionDTO dto : (List) newQuestionDtos) { - if (condition.temporaryQuestionDTOSet.contains(dto)) { - newQuestionDTOSet.add(dto); - } - } - condition.temporaryQuestionDTOSet = newQuestionDTOSet; - } - } - - return newQuestionDtos; - } - - private static QaQuestionDTO getQuestionAtDisplayOrder(List questionDTOs, - int intOriginalQuestionIndex) { - - Iterator iter = questionDTOs.iterator(); - while (iter.hasNext()) { - QaQuestionDTO qaQuestionDTO = iter.next(); - if (new Integer(intOriginalQuestionIndex).toString().equals(qaQuestionDTO.getDisplayOrder())) { - return qaQuestionDTO; - } - } - return null; - } - - protected static List reorderQuestionDTOs(List questionDTOs) { - List listFinalQuestionDTO = new LinkedList(); - - int queIndex = 0; - Iterator iter = questionDTOs.iterator(); - while (iter.hasNext()) { - QaQuestionDTO qaQuestionDTO = iter.next(); - - String question = qaQuestionDTO.getQuestion(); - String feedback = qaQuestionDTO.getFeedback(); - boolean required = qaQuestionDTO.isRequired(); - - if (question != null && !question.equals("")) { - ++queIndex; - - qaQuestionDTO.setQuestion(question); - qaQuestionDTO.setDisplayOrder(new Integer(queIndex).toString()); - qaQuestionDTO.setFeedback(feedback); - qaQuestionDTO.setRequired(required); - - listFinalQuestionDTO.add(qaQuestionDTO); - } - } - return listFinalQuestionDTO; - } - protected static List reorderUpdateQuestionDTOs(List questionDTOs, QaQuestionDTO qaQuestionContentDTONew, String editableQuestionIndex) { @@ -193,8 +96,7 @@ } public static QaContent saveOrUpdateQaContent(List questionDTOs, IQaService qaService, - HttpServletRequest request, QaContent qaContent, String strToolContentID, - Set conditions) { + HttpServletRequest request, QaContent qaContent, String strToolContentID, Set conditions) { UserDTO toolUser = (UserDTO) SessionManager.getSession().getAttribute(AttributeNames.USER); String richTextTitle = request.getParameter(QaAppConstants.TITLE); @@ -314,8 +216,8 @@ } qaContent.setConditions(conditions); qaService.updateQaContent(qaContent); - - //persist questions + + // persist questions int displayOrder = 0; for (QaQuestionDTO questionDTO : questionDTOs) { @@ -336,19 +238,19 @@ questionDTO.isRequired(), qaContent); qaContent.getQaQueContents().add(question); question.setQaContent(qaContent); - - // in case question exists already + + // in case question exists already } else { question.setQuestion(questionText); question.setFeedback(questionDTO.getFeedback()); question.setDisplayOrder(displayOrder); question.setRequired(questionDTO.isRequired()); } - + qaService.saveOrUpdateQuestion(question); } - + return qaContent; } Index: lams_tool_laqa/src/java/org/lamsfoundation/lams/tool/qa/web/LearningUtil.java =================================================================== RCS file: /usr/local/cvsroot/lams_tool_laqa/src/java/org/lamsfoundation/lams/tool/qa/web/LearningUtil.java,v diff -u -r1.51 -r1.51.2.1 --- lams_tool_laqa/src/java/org/lamsfoundation/lams/tool/qa/web/LearningUtil.java 4 Jun 2014 12:55:45 -0000 1.51 +++ lams_tool_laqa/src/java/org/lamsfoundation/lams/tool/qa/web/LearningUtil.java 12 Sep 2014 22:43:04 -0000 1.51.2.1 @@ -41,11 +41,9 @@ import org.lamsfoundation.lams.web.util.AttributeNames; /** - * * Keeps all operations needed for Learning mode. * * @author Ozgur Demirtas - * */ public class LearningUtil implements QaAppConstants { Index: lams_tool_laqa/src/java/org/lamsfoundation/lams/tool/qa/web/QaAction.java =================================================================== RCS file: /usr/local/cvsroot/lams_tool_laqa/src/java/org/lamsfoundation/lams/tool/qa/web/QaAction.java,v diff -u -r1.39 -r1.39.2.1 --- lams_tool_laqa/src/java/org/lamsfoundation/lams/tool/qa/web/QaAction.java 3 Jun 2014 16:22:21 -0000 1.39 +++ lams_tool_laqa/src/java/org/lamsfoundation/lams/tool/qa/web/QaAction.java 12 Sep 2014 22:43:04 -0000 1.39.2.1 @@ -32,6 +32,7 @@ import java.util.List; import java.util.Set; import java.util.SortedSet; +import java.util.TreeSet; import javax.servlet.ServletException; import javax.servlet.http.HttpServletRequest; @@ -55,6 +56,7 @@ import org.lamsfoundation.lams.tool.qa.dto.QaQuestionDTO; import org.lamsfoundation.lams.tool.qa.service.IQaService; import org.lamsfoundation.lams.tool.qa.service.QaServiceProxy; +import org.lamsfoundation.lams.tool.qa.util.QaQuestionContentDTOComparator; import org.lamsfoundation.lams.tool.qa.util.QaUtils; import org.lamsfoundation.lams.tool.qa.web.form.QaAuthoringForm; import org.lamsfoundation.lams.util.WebUtil; @@ -129,7 +131,7 @@ if (mode.isTeacher()) { Set oldQuestions = qaContent.getQaQueContents(); qaService.removeQuestionsFromCache(qaContent); - QaUtils.setDefineLater(request, false, strToolContentID, qaService); + qaService.setDefineLater(strToolContentID, false); // recalculate User Answers qaService.recalculateUserAnswers(qaContent, oldQuestions, questionDTOs, deletedQuestionDTOs); @@ -616,9 +618,9 @@ SortedSet conditionSet = (SortedSet) sessionMap .get(QaAppConstants.ATTR_CONDITION_SET); - questionDTOs = AuthoringUtil.swapQuestions(questionDTOs, questionIndex, "down", conditionSet); + questionDTOs = swapQuestions(questionDTOs, questionIndex, "down", conditionSet); - questionDTOs = AuthoringUtil.reorderQuestionDTOs(questionDTOs); + questionDTOs = reorderQuestionDTOs(questionDTOs); sessionMap.put(QaAppConstants.LIST_QUESTION_DTOS, questionDTOs); @@ -678,9 +680,9 @@ SortedSet conditionSet = (SortedSet) sessionMap .get(QaAppConstants.ATTR_CONDITION_SET); - questionDTOs = AuthoringUtil.swapQuestions(questionDTOs, questionIndex, "up", conditionSet); + questionDTOs = swapQuestions(questionDTOs, questionIndex, "up", conditionSet); - questionDTOs = AuthoringUtil.reorderQuestionDTOs(questionDTOs); + questionDTOs = reorderQuestionDTOs(questionDTOs); sessionMap.put(QaAppConstants.LIST_QUESTION_DTOS, questionDTOs); @@ -724,7 +726,106 @@ request.setAttribute(QaAppConstants.TOTAL_QUESTION_COUNT, new Integer(questionDTOs.size())); return mapping.findForward(QaAppConstants.LOAD_QUESTIONS); } + + private static List swapQuestions(List questionDTOs, String questionIndex, + String direction, Set conditions) { + int intQuestionIndex = new Integer(questionIndex).intValue(); + int intOriginalQuestionIndex = intQuestionIndex; + + int replacedQuestionIndex = 0; + if (direction.equals("down")) { + // direction down + replacedQuestionIndex = ++intQuestionIndex; + } else { + // direction up + replacedQuestionIndex = --intQuestionIndex; + } + + QaQuestionDTO mainQuestion = getQuestionAtDisplayOrder(questionDTOs, intOriginalQuestionIndex); + + QaQuestionDTO replacedQuestion = getQuestionAtDisplayOrder(questionDTOs, replacedQuestionIndex); + + List newQuestionDtos = new LinkedList(); + + Iterator iter = questionDTOs.iterator(); + while (iter.hasNext()) { + QaQuestionDTO questionDTO = iter.next(); + QaQuestionDTO tempQuestion = null; + + if (!questionDTO.getDisplayOrder().equals(new Integer(intOriginalQuestionIndex).toString()) + && !questionDTO.getDisplayOrder().equals(new Integer(replacedQuestionIndex).toString())) { + // normal copy + tempQuestion = questionDTO; + + } else if (questionDTO.getDisplayOrder().equals(new Integer(intOriginalQuestionIndex).toString())) { + // move type 1 + tempQuestion = replacedQuestion; + + } else if (questionDTO.getDisplayOrder().equals(new Integer(replacedQuestionIndex).toString())) { + // move type 1 + tempQuestion = mainQuestion; + } + + newQuestionDtos.add(tempQuestion); + } + + // references in conditions also need to be changed + if (conditions != null) { + for (QaCondition condition : conditions) { + SortedSet newQuestionDTOSet = new TreeSet( + new QaQuestionContentDTOComparator()); + for (QaQuestionDTO dto : (List) newQuestionDtos) { + if (condition.temporaryQuestionDTOSet.contains(dto)) { + newQuestionDTOSet.add(dto); + } + } + condition.temporaryQuestionDTOSet = newQuestionDTOSet; + } + } + + return newQuestionDtos; + } + + private static QaQuestionDTO getQuestionAtDisplayOrder(List questionDTOs, + int intOriginalQuestionIndex) { + + Iterator iter = questionDTOs.iterator(); + while (iter.hasNext()) { + QaQuestionDTO qaQuestionDTO = iter.next(); + if (new Integer(intOriginalQuestionIndex).toString().equals(qaQuestionDTO.getDisplayOrder())) { + return qaQuestionDTO; + } + } + return null; + } + + private static List reorderQuestionDTOs(List questionDTOs) { + List listFinalQuestionDTO = new LinkedList(); + + int queIndex = 0; + Iterator iter = questionDTOs.iterator(); + while (iter.hasNext()) { + QaQuestionDTO qaQuestionDTO = iter.next(); + + String question = qaQuestionDTO.getQuestion(); + String feedback = qaQuestionDTO.getFeedback(); + boolean required = qaQuestionDTO.isRequired(); + + if (question != null && !question.equals("")) { + ++queIndex; + + qaQuestionDTO.setQuestion(question); + qaQuestionDTO.setDisplayOrder(new Integer(queIndex).toString()); + qaQuestionDTO.setFeedback(feedback); + qaQuestionDTO.setRequired(required); + + listFinalQuestionDTO.add(qaQuestionDTO); + } + } + return listFinalQuestionDTO; + } + /** * Get the deleted condition list, which could be persisted or non-persisted * items. Index: lams_tool_laqa/src/java/org/lamsfoundation/lams/tool/qa/web/QaLearningAction.java =================================================================== RCS file: /usr/local/cvsroot/lams_tool_laqa/src/java/org/lamsfoundation/lams/tool/qa/web/QaLearningAction.java,v diff -u -r1.53.2.1 -r1.53.2.2 --- lams_tool_laqa/src/java/org/lamsfoundation/lams/tool/qa/web/QaLearningAction.java 2 Sep 2014 20:25:32 -0000 1.53.2.1 +++ lams_tool_laqa/src/java/org/lamsfoundation/lams/tool/qa/web/QaLearningAction.java 12 Sep 2014 22:43:04 -0000 1.53.2.2 @@ -331,13 +331,8 @@ String toolSessionID = request.getParameter(AttributeNames.PARAM_TOOL_SESSION_ID); String userID = request.getParameter("userID"); QaSession qaSession = QaLearningAction.qaService.getSessionById(new Long(toolSessionID).longValue()); - Long toolContentID = qaSession.getQaContent().getQaContentId(); QaContent qaContent = qaSession.getQaContent(); - - String httpSessionID = qaLearningForm.getHttpSessionID(); - SessionMap sessionMap = (SessionMap) request.getSession().getAttribute(httpSessionID); - Map mapAnswers = (Map) sessionMap.get(QaAppConstants.MAP_ALL_RESULTS_KEY); - + // LearningUtil.storeResponses(mapAnswers, qaService, toolContentID, new Long(toolSessionID)); // mark response as finalised QaQueUsr qaQueUsr = getCurrentUser(toolSessionID); @@ -349,6 +344,7 @@ if (qaContent.isShowOtherAnswers()) { GeneralLearnerFlowDTO generalLearnerFlowDTO = LearningUtil.buildGeneralLearnerFlowDTO(qaContent); + String httpSessionID = qaLearningForm.getHttpSessionID(); generalLearnerFlowDTO.setHttpSessionID(httpSessionID); String isUserNamesVisibleBoolean = generalLearnerFlowDTO.getUserNameVisible(); boolean isUserNamesVisible = new Boolean(isUserNamesVisibleBoolean).booleanValue(); Index: lams_tool_laqa/src/java/org/lamsfoundation/lams/tool/qa/web/QaLearningStarterAction.java =================================================================== RCS file: /usr/local/cvsroot/lams_tool_laqa/src/java/org/lamsfoundation/lams/tool/qa/web/QaLearningStarterAction.java,v diff -u -r1.86.2.1 -r1.86.2.2 --- lams_tool_laqa/src/java/org/lamsfoundation/lams/tool/qa/web/QaLearningStarterAction.java 2 Sep 2014 20:25:31 -0000 1.86.2.1 +++ lams_tool_laqa/src/java/org/lamsfoundation/lams/tool/qa/web/QaLearningStarterAction.java 12 Sep 2014 22:43:04 -0000 1.86.2.2 @@ -72,20 +72,14 @@ import org.lamsfoundation.lams.web.util.SessionMap; /** + * This class is used to load the default content and initialize the presentation Map for Learner mode. + * It is important that ALL the session attributes created in this action gets removed by: QaUtils.cleanupSession(request) * * @author Ozgur Demirtas * - * This class is used to load the default content and initialize the - * presentation Map for Learner mode - * - * createToolSession will not be called once the tool is deployed. - * - * It is important that ALL the session attributes created in this action gets - * removed by: QaUtils.cleanupSession(request) - * */ public class QaLearningStarterAction extends Action implements QaAppConstants { - static Logger logger = Logger.getLogger(QaLearningStarterAction.class.getName()); + private static Logger logger = Logger.getLogger(QaLearningStarterAction.class.getName()); private static IQaService qaService; Index: lams_tool_laqa/src/java/org/lamsfoundation/lams/tool/qa/web/QaStarterAction.java =================================================================== RCS file: /usr/local/cvsroot/lams_tool_laqa/src/java/org/lamsfoundation/lams/tool/qa/web/QaStarterAction.java,v diff -u -r1.83 -r1.83.2.1 --- lams_tool_laqa/src/java/org/lamsfoundation/lams/tool/qa/web/QaStarterAction.java 3 Jun 2014 16:22:21 -0000 1.83 +++ lams_tool_laqa/src/java/org/lamsfoundation/lams/tool/qa/web/QaStarterAction.java 12 Sep 2014 22:43:04 -0000 1.83.2.1 @@ -132,7 +132,7 @@ ToolAccessMode mode = getAccessMode(request); // request is from monitoring module if (mode.isTeacher()) { - QaUtils.setDefineLater(request, true, strToolContentID, qaService); + qaService.setDefineLater(strToolContentID, true); } request.setAttribute(AttributeNames.ATTR_MODE, mode.toString()); Index: lams_tool_laqa/web/admin/config.jsp =================================================================== RCS file: /usr/local/cvsroot/lams_tool_laqa/web/admin/config.jsp,v diff -u -r1.6 -r1.6.2.1 --- lams_tool_laqa/web/admin/config.jsp 29 Sep 2012 13:57:56 -0000 1.6 +++ lams_tool_laqa/web/admin/config.jsp 12 Sep 2014 22:43:05 -0000 1.6.2.1 @@ -14,7 +14,6 @@ - - - @@ -455,8 +371,6 @@ - -

@@ -489,7 +403,6 @@ - @@ -513,6 +426,7 @@
+ + + +

- + + + +   - + + + + +



- - + + +

- - + - - + \ No newline at end of file Index: lams_tool_laqa/web/export/exportportfolio.jsp =================================================================== RCS file: /usr/local/cvsroot/lams_tool_laqa/web/export/exportportfolio.jsp,v diff -u -r1.30 -r1.30.2.1 --- lams_tool_laqa/web/export/exportportfolio.jsp 29 Mar 2014 20:02:54 -0000 1.30 +++ lams_tool_laqa/web/export/exportportfolio.jsp 12 Sep 2014 22:43:07 -0000 1.30.2.1 @@ -98,7 +98,7 @@ - + @@ -176,7 +176,7 @@ - + Index: lams_tool_laqa/web/includes/jsp/qaWizardCommon.jsp =================================================================== RCS file: /usr/local/cvsroot/lams_tool_laqa/web/includes/jsp/qaWizardCommon.jsp,v diff -u -r1.2 -r1.2.2.1 --- lams_tool_laqa/web/includes/jsp/qaWizardCommon.jsp 13 Nov 2009 03:13:58 -0000 1.2 +++ lams_tool_laqa/web/includes/jsp/qaWizardCommon.jsp 12 Sep 2014 22:43:07 -0000 1.2.2.1 @@ -1,10 +1,8 @@ \ No newline at end of file Index: lams_tool_laqa/web/learning/AnswersContent.jsp =================================================================== RCS file: /usr/local/cvsroot/lams_tool_laqa/web/learning/AnswersContent.jsp,v diff -u -r1.39 -r1.39.2.1 --- lams_tool_laqa/web/learning/AnswersContent.jsp 4 Jun 2014 12:55:45 -0000 1.39 +++ lams_tool_laqa/web/learning/AnswersContent.jsp 12 Sep 2014 22:43:05 -0000 1.39.2.1 @@ -30,7 +30,9 @@ - + + + @@ -90,11 +87,3 @@ - - - - - - - - Index: lams_tool_laqa/web/learning/mobile/AnswersContent.jsp =================================================================== RCS file: /usr/local/cvsroot/lams_tool_laqa/web/learning/mobile/AnswersContent.jsp,v diff -u -r1.5 -r1.5.2.1 --- lams_tool_laqa/web/learning/mobile/AnswersContent.jsp 17 Jan 2014 22:04:44 -0000 1.5 +++ lams_tool_laqa/web/learning/mobile/AnswersContent.jsp 12 Sep 2014 22:43:05 -0000 1.5.2.1 @@ -35,68 +35,15 @@ + @@ -65,8 +42,7 @@

- +

@@ -113,40 +89,39 @@ - -

- -

+ +

+ +

- -
+ +
- +
- - - - - + + + + + -
- - - - - - - - - - +
+ + + + + + + + + + - -
- +
+
+
Index: lams_tool_vote/web/learning/IndividualLearnerResults.jsp =================================================================== RCS file: /usr/local/cvsroot/lams_tool_vote/web/learning/IndividualLearnerResults.jsp,v diff -u -r1.38 -r1.38.2.1 --- lams_tool_vote/web/learning/IndividualLearnerResults.jsp 2 Apr 2014 15:04:58 -0000 1.38 +++ lams_tool_vote/web/learning/IndividualLearnerResults.jsp 12 Sep 2014 22:43:36 -0000 1.38.2.1 @@ -1,24 +1,3 @@ -<%-- -Copyright (C) 2005 LAMS Foundation (http://lamsfoundation.org) -License Information: http://lamsfoundation.org/licensing/lams/2.0/ - - This program is free software; you can redistribute it and/or modify - it under the terms of the GNU General Public License version 2 as - published by the Free Software Foundation. - - This program is distributed in the hope that it will be useful, - but WITHOUT ANY WARRANTY; without even the implied warranty of - MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - GNU General Public License for more details. - - You should have received a copy of the GNU General Public License - along with this program; if not, write to the Free Software - Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 - USA - - http://www.gnu.org/licenses/gpl.txt ---%> - <%@ include file="/common/taglibs.jsp"%> @@ -54,9 +33,9 @@ -
- -
+
+ +
@@ -89,18 +68,14 @@

- - +

    - +
  • - -
    @@ -112,17 +87,14 @@
    - + - - + @@ -158,7 +130,6 @@
    -
Index: lams_tool_vote/web/learning/Notebook.jsp =================================================================== RCS file: /usr/local/cvsroot/lams_tool_vote/web/learning/Notebook.jsp,v diff -u -r1.11 -r1.11.2.1 --- lams_tool_vote/web/learning/Notebook.jsp 2 Apr 2014 15:04:58 -0000 1.11 +++ lams_tool_vote/web/learning/Notebook.jsp 12 Sep 2014 22:43:37 -0000 1.11.2.1 @@ -1,27 +1,5 @@ -<%-- -Copyright (C) 2005 LAMS Foundation (http://lamsfoundation.org) -License Information: http://lamsfoundation.org/licensing/lams/2.0/ + - This program is free software; you can redistribute it and/or modify - it under the terms of the GNU General Public License version 2 as - published by the Free Software Foundation. - - This program is distributed in the hope that it will be useful, - but WITHOUT ANY WARRANTY; without even the implied warranty of - MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - GNU General Public License for more details. - - You should have received a copy of the GNU General Public License - along with this program; if not, write to the Free Software - Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 - USA - - http://www.gnu.org/licenses/gpl.txt ---%> - - - <%@ include file="/common/taglibs.jsp"%> @@ -35,12 +13,10 @@ - <fmt:message key="activity.title" /> - + <fmt:message key="activity.title" /> + @@ -50,8 +27,7 @@