Index: lams_tool_scratchie/conf/language/lams/ApplicationResources_en_AU.properties
===================================================================
RCS file: /usr/local/cvsroot/lams_tool_scratchie/conf/language/lams/ApplicationResources_en_AU.properties,v
diff -u -r1.1 -r1.2
--- lams_tool_scratchie/conf/language/lams/ApplicationResources_en_AU.properties 19 Jul 2012 19:20:13 -0000 1.1
+++ lams_tool_scratchie/conf/language/lams/ApplicationResources_en_AU.properties 9 Aug 2012 21:55:37 -0000 1.2
@@ -91,5 +91,15 @@
label.monitoring.summary.choose =Choose...
label.monitoring.item.summary.group =Group:
output.desc.learner.number.of.attempts =Number of attempts made by user
+warning.msg.authoring.do.you.want.to.delete =Do you really want to delete this question?
+warning.msg.are.you.sure.you.want.to.finish =Are you sure you want to finish?
+label.authoring.add.blank.answer =Add Blank Answer
+label.authoring.title.required =Title is required.
+label.authoring.numerical.error.answer =You should provide at least one possible answer.
+error.form.validation.error =You have 1 error in a form. It has been highlighted
+error.form.validation.errors =You have {0} errors in a form. They have been highlighted
+label.edit.question =Add/Edit Question
+label.authoring.basic.question.name =Question title
+label.authoring.basic.question.text =Question description
#======= End labels: Exported 176 labels for en AU =====
Index: lams_tool_scratchie/conf/xdoclet/struts-actions.xml
===================================================================
RCS file: /usr/local/cvsroot/lams_tool_scratchie/conf/xdoclet/struts-actions.xml,v
diff -u -r1.1 -r1.2
--- lams_tool_scratchie/conf/xdoclet/struts-actions.xml 19 Jul 2012 19:20:09 -0000 1.1
+++ lams_tool_scratchie/conf/xdoclet/struts-actions.xml 9 Aug 2012 21:55:37 -0000 1.2
@@ -72,9 +72,28 @@
+
+
+
+
+
+
+
+
@@ -99,6 +118,36 @@
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
-
+
@@ -63,8 +63,8 @@
-
-
+
+
@@ -125,7 +125,7 @@
PROPAGATION_REQUIRED,-java.lang.ExceptionPROPAGATION_REQUIRED,-java.lang.ExceptionPROPAGATION_REQUIRED,-java.lang.Exception
- PROPAGATION_REQUIRED,-java.lang.Exception
+ PROPAGATION_REQUIRED,-java.lang.ExceptionPROPAGATION_REQUIRED,-java.lang.ExceptionPROPAGATION_REQUIRED,-java.lang.ExceptionPROPAGATION_REQUIRED,-java.lang.Exception
Index: lams_tool_scratchie/src/java/org/lamsfoundation/lams/tool/scratchie/dao/ScratchieAnswerVisitDAO.java
===================================================================
RCS file: /usr/local/cvsroot/lams_tool_scratchie/src/java/org/lamsfoundation/lams/tool/scratchie/dao/ScratchieAnswerVisitDAO.java,v
diff -u
--- /dev/null 1 Jan 1970 00:00:00 -0000
+++ lams_tool_scratchie/src/java/org/lamsfoundation/lams/tool/scratchie/dao/ScratchieAnswerVisitDAO.java 9 Aug 2012 21:55:36 -0000 1.1
@@ -0,0 +1,47 @@
+/****************************************************************
+ * 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 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
+ * ****************************************************************
+ */
+/* $$Id: ScratchieAnswerVisitDAO.java,v 1.1 2012/08/09 21:55:36 andreyb Exp $$ */
+package org.lamsfoundation.lams.tool.scratchie.dao;
+
+import java.util.List;
+import java.util.Map;
+
+import org.lamsfoundation.lams.tool.scratchie.model.ScratchieAnswerVisitLog;
+
+public interface ScratchieAnswerVisitDAO extends DAO {
+
+ public ScratchieAnswerVisitLog getScratchieAnswerLog(Long itemUid, Long userId);
+
+ public int getUserViewLogCount(Long sessionId, Long userId);
+
+ /**
+ * Return list which contains key pair which key is scratchie item uid, value is number view.
+ *
+ * @param contentId
+ * @return
+ */
+ public Map getSummary(Long contentId);
+
+ public List getLogsBySessionAndUser(Long sessionId, Long userId);
+
+}
Fisheye: Tag 1.2 refers to a dead (removed) revision in file `lams_tool_scratchie/src/java/org/lamsfoundation/lams/tool/scratchie/dao/ScratchieItemVisitDAO.java'.
Fisheye: No comparison available. Pass `N' to diff?
Index: lams_tool_scratchie/src/java/org/lamsfoundation/lams/tool/scratchie/dao/hibernate/ScratchieAnswerVisitDAOHibernate.java
===================================================================
RCS file: /usr/local/cvsroot/lams_tool_scratchie/src/java/org/lamsfoundation/lams/tool/scratchie/dao/hibernate/ScratchieAnswerVisitDAOHibernate.java,v
diff -u
--- /dev/null 1 Jan 1970 00:00:00 -0000
+++ lams_tool_scratchie/src/java/org/lamsfoundation/lams/tool/scratchie/dao/hibernate/ScratchieAnswerVisitDAOHibernate.java 9 Aug 2012 21:55:37 -0000 1.1
@@ -0,0 +1,83 @@
+/****************************************************************
+ * 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 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
+ * ****************************************************************
+ */
+/* $$Id: ScratchieAnswerVisitDAOHibernate.java,v 1.1 2012/08/09 21:55:37 andreyb Exp $$ */
+package org.lamsfoundation.lams.tool.scratchie.dao.hibernate;
+
+import java.util.HashMap;
+import java.util.List;
+import java.util.Map;
+
+import org.lamsfoundation.lams.tool.scratchie.dao.ScratchieAnswerVisitDAO;
+import org.lamsfoundation.lams.tool.scratchie.model.Scratchie;
+import org.lamsfoundation.lams.tool.scratchie.model.ScratchieAnswerVisitLog;
+import org.lamsfoundation.lams.tool.scratchie.model.ScratchieSession;
+
+public class ScratchieAnswerVisitDAOHibernate extends BaseDAOHibernate implements ScratchieAnswerVisitDAO {
+
+ private static final String FIND_BY_ITEM_AND_USER = "from " + ScratchieAnswerVisitLog.class.getName()
+ + " as r where r.user.userId = ? and r.scratchieAnswer.uid=?";
+
+ private static final String FIND_BY_SESSION_AND_USER = "from " + ScratchieAnswerVisitLog.class.getName()
+ + " as r where r.sessionId = ? and r.user.userId=? order by r.accessDate asc";
+
+ private static final String FIND_VIEW_COUNT_BY_USER = "select count(*) from "
+ + ScratchieAnswerVisitLog.class.getName() + " as r where r.sessionId=? and r.user.userId =?";
+
+ private static final String FIND_SUMMARY = "select v.scratchieAnswer.uid, count(v.scratchieAnswer) from "
+ + ScratchieAnswerVisitLog.class.getName() + " as v , " + ScratchieSession.class.getName() + " as s, "
+ + Scratchie.class.getName() + " as r " + " where v.sessionId = s.sessionId "
+ + " and s.scratchie.uid = r.uid " + " and r.contentId =? " + " group by v.sessionId, v.scratchieAnswer.uid ";
+
+ public ScratchieAnswerVisitLog getScratchieAnswerLog(Long answerUid, Long userId) {
+ List list = getHibernateTemplate().find(FIND_BY_ITEM_AND_USER, new Object[] { userId, answerUid });
+ if (list == null || list.size() == 0)
+ return null;
+ return (ScratchieAnswerVisitLog) list.get(0);
+ }
+
+ public int getUserViewLogCount(Long toolSessionId, Long userId) {
+ List list = getHibernateTemplate().find(FIND_VIEW_COUNT_BY_USER, new Object[] { toolSessionId, userId });
+ if (list == null || list.size() == 0)
+ return 0;
+ return ((Number) list.get(0)).intValue();
+ }
+
+ public Map getSummary(Long contentId) {
+
+ // Note: Hibernate 3.1 query.uniqueResult() returns Integer, Hibernate 3.2 query.uniqueResult() returns Long
+ List