Index: lams_tool_scratchie/conf/language/lams/ApplicationResources_en_AU.properties
===================================================================
diff -u -r6aaee4b2fe2caa08b0c63a0de11f05042d5a3e18 -r0ef117e7eca05b962210cb3b18eab1e39a6c57d1
--- lams_tool_scratchie/conf/language/lams/ApplicationResources_en_AU.properties (.../ApplicationResources_en_AU.properties) (revision 6aaee4b2fe2caa08b0c63a0de11f05042d5a3e18)
+++ lams_tool_scratchie/conf/language/lams/ApplicationResources_en_AU.properties (.../ApplicationResources_en_AU.properties) (revision 0ef117e7eca05b962210cb3b18eab1e39a6c57d1)
@@ -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
===================================================================
diff -u -r6aaee4b2fe2caa08b0c63a0de11f05042d5a3e18 -r0ef117e7eca05b962210cb3b18eab1e39a6c57d1
--- lams_tool_scratchie/conf/xdoclet/struts-actions.xml (.../struts-actions.xml) (revision 6aaee4b2fe2caa08b0c63a0de11f05042d5a3e18)
+++ lams_tool_scratchie/conf/xdoclet/struts-actions.xml (.../struts-actions.xml) (revision 0ef117e7eca05b962210cb3b18eab1e39a6c57d1)
@@ -72,9 +72,28 @@
+
+
+
+
+
+
+
+
@@ -99,6 +118,36 @@
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
getSummary(Long contentId);
+
+ public List getLogsBySessionAndUser(Long sessionId, Long userId);
+
+}
Fisheye: Tag 0ef117e7eca05b962210cb3b18eab1e39a6c57d1 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
===================================================================
diff -u
--- lams_tool_scratchie/src/java/org/lamsfoundation/lams/tool/scratchie/dao/hibernate/ScratchieAnswerVisitDAOHibernate.java (revision 0)
+++ lams_tool_scratchie/src/java/org/lamsfoundation/lams/tool/scratchie/dao/hibernate/ScratchieAnswerVisitDAOHibernate.java (revision 0ef117e7eca05b962210cb3b18eab1e39a6c57d1)
@@ -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$$ */
+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