Index: lams_tool_lamc/conf/hibernate/mappings/org/lamsfoundation/lams/tool/mc/McContent.hbm.xml =================================================================== RCS file: /usr/local/cvsroot/lams_tool_lamc/conf/hibernate/mappings/org/lamsfoundation/lams/tool/mc/Attic/McContent.hbm.xml,v diff -u -r1.6 -r1.7 --- lams_tool_lamc/conf/hibernate/mappings/org/lamsfoundation/lams/tool/mc/McContent.hbm.xml 7 Oct 2005 20:17:49 -0000 1.6 +++ lams_tool_lamc/conf/hibernate/mappings/org/lamsfoundation/lams/tool/mc/McContent.hbm.xml 10 Oct 2005 14:47:30 -0000 1.7 @@ -20,7 +20,7 @@ Index: lams_tool_lamc/conf/hibernate/mappings/org/lamsfoundation/lams/tool/mc/McOptsContent.hbm.xml =================================================================== RCS file: /usr/local/cvsroot/lams_tool_lamc/conf/hibernate/mappings/org/lamsfoundation/lams/tool/mc/Attic/McOptsContent.hbm.xml,v diff -u -r1.3 -r1.4 --- lams_tool_lamc/conf/hibernate/mappings/org/lamsfoundation/lams/tool/mc/McOptsContent.hbm.xml 7 Oct 2005 20:17:49 -0000 1.3 +++ lams_tool_lamc/conf/hibernate/mappings/org/lamsfoundation/lams/tool/mc/McOptsContent.hbm.xml 10 Oct 2005 14:47:30 -0000 1.4 @@ -23,15 +23,6 @@ - - - - - - - - - - + - + @@ -253,7 +253,7 @@ - + @@ -268,19 +268,6 @@ - - - - - - - - - - - - - @@ -333,7 +320,7 @@
- + @@ -348,19 +335,6 @@ - - - - - - - - - - - - - @@ -566,7 +540,7 @@
- + @@ -581,19 +555,6 @@ - - - - - - - - - - - - - Index: lams_tool_lamc/db/sql/create_lams_tool_lamc.sql =================================================================== RCS file: /usr/local/cvsroot/lams_tool_lamc/db/sql/Attic/create_lams_tool_lamc.sql,v diff -u -r1.8 -r1.9 Binary files differ Index: lams_tool_lamc/src/java/org/lamsfoundation/lams/tool/mc/McAppConstants.java =================================================================== RCS file: /usr/local/cvsroot/lams_tool_lamc/src/java/org/lamsfoundation/lams/tool/mc/McAppConstants.java,v diff -u --- /dev/null 1 Jan 1970 00:00:00 -0000 +++ lams_tool_lamc/src/java/org/lamsfoundation/lams/tool/mc/McAppConstants.java 10 Oct 2005 14:45:20 -0000 1.1 @@ -0,0 +1,274 @@ +/** + * Created on 20/04/2005 + * + * TODO To change the template for this generated file go to + * Window - Preferences - Java - Code Style - Code Templates + */ +package org.lamsfoundation.lams.tool.mc; + +/** + * @author Ozgur Demirtas + * + * TODO: Check back the constants with "Attention" + * Holds constants used throughout the application + * + */ +public interface McAppConstants { + /** + * Currently we are hardcoding the default content id. + * This will be replaced when the deploy logic automatically assigns a default content id in the deploy script. + */ + + public static final String MY_SIGNATURE ="lamc11"; + public static final long DEFAULT_CONTENT_ID =0; + public static final long DEFAULT_QUE_CONTENT_ID =1; + + /** + * temporarily refers to an existing content id for an incoming tool session id, won't need it in deployment environment + */ + public static final long THE_MOCKED_CONTENT_ID =1803739427456570536L; + public static final String TOOL_SERVICE ="tool_service"; + /** + * indicates which mode the tool runs under between Authoring, Learning, Monitoring + */ + public static final String TARGET_MODE ="targetMode"; + public static final String TARGET_MODE_AUTHORING ="Authoring"; + public static final String TARGET_MODE_LEARNING ="Learning"; + public static final String TARGET_MODE_MONITORING ="Monitoring"; + public static final String TARGET_MODE_EXPORT_PORTFOLIO ="ExportPortfolio"; + + public static final String AUTHORING_STARTER ="starter"; + public static final String LEARNING_STARTER ="learningStarter"; + public static final String MONITORING_STARTER ="monitoringStarter"; + + /** + * Mock constants below are temporary until the tool gets a User object from the container. + */ + public static final Integer MOCK_USER_ID = new Integer(111); + public static final String MOCK_USER_NAME ="Ozgur"; + public static final String MOCK_USER_LASTNAME ="Demirtas"; + public static final String MOCK_LOGIN_NAME ="ozgur"; + + /** + * refers to number of questions presented initially, we have a single record for default content + */ + public static final Long INITIAL_QUESTION_COUNT =new Long(1); + + /** + * Struts level constants + */ + public static final String LOAD ="load"; + public static final String LOAD_QUESTIONS ="load"; + public static final String LOAD_STARTER ="starter"; + public static final String AUTHORING_BASIC ="authoringBasic"; + public static final boolean MODE_OPTIONAL = false; + public static final String DISABLE_TOOL ="disabled"; + public static final String IS_DEFINE_LATER ="isDefineLater"; + + /** + * authoring mode controllers + */ + public static final String IS_ADD_QUESTION ="isAddQuestion"; + public static final String IS_REMOVE_QUESTION ="isRemoveQuestion"; + public static final String IS_REMOVE_CONTENT ="isRemoveContent"; + + /** + * tab controllers, constants for authoring page html tabs, used within jsp + */ + public static final String CHOICE ="choice"; + public static final String CHOICE_TYPE_BASIC ="choiceTypeBasic"; + public static final String CHOICE_TYPE_ADVANCED ="choiceTypeAdvanced"; + public static final String CHOICE_TYPE_INSTRUCTIONS ="choiceTypeInstructions"; + + + /** + * authoring mode constants + */ + public static final String MAP_QUESTION_CONTENT ="mapQuestionContent"; + public static final String DEFAULT_QUESTION_CONTENT ="defaultQuestionContent"; + public static final String TITLE ="title"; + public static final String INSTRUCTIONS ="instructions"; + public static final String CREATION_DATE ="creationDate"; + public static final String USERNAME_VISIBLE ="usernameVisible"; + public static final String ONLINE_INSTRUCTIONS ="onlineInstructions"; + public static final String OFFLINE_INSTRUCTIONS ="offlineInstructions"; + public static final String END_LEARNING_MESSSAGE ="endLearningMessage"; + public static final String CONTENT_LOCKED ="contentLocked"; + public static final String ON ="ON"; + public static final String OFF ="OFF"; + public static final String IS_USERNAME_VISIBLE_MONITORING ="isUsernameVisibleMonitoring"; + public static final String IS_SYNCH_INMONITOR_MONITORING ="isSynchInMonitorMonitoring"; + public static final String IS_QUESTIONS_SEQUENCED_MONITORING ="isQuestionsSequencedMonitoring"; + public static final String RICHTEXT_OFFLINEINSTRUCTIONS ="richTextOfflineInstructions"; + public static final String RICHTEXT_ONLINEINSTRUCTIONS ="richTextOnlineInstructions"; + public static final String RICHTEXT_TITLE ="richTextTitle"; + public static final String RICHTEXT_INSTRUCTIONS ="richTextInstructions"; + public static final String RICHTEXT_BLANK ="

 

"; + public static final String THE_OFFLINE_FILE ="theOfflineFile"; + public static final String THE_ONLINE_FILE ="theOnlineFile"; + public static final String THE_OFFLINE_FILENAME ="theOfflineFileName"; + public static final String THE_ONLINE_FILENAME ="theOnlineFileName"; + public static final String SUBMIT_OFFLINE_FILE ="submitOfflineFile"; + public static final String SUBMIT_ONLINE_FILE ="submitOnlineFile"; + public static final String LIST_UPLOADED_OFFLINE_FILES ="listUploadedOfflineFiles"; + public static final String LIST_UPLOADED_ONLINE_FILES ="listUploadedOnlineFiles"; + public static final String LIST_UPLOADED_OFFLINE_FILENAMES ="listUploadedOfflineFileNames"; + public static final String LIST_UPLOADED_ONLINE_FILENAMES ="listUploadedOnlineFileNames"; + public static final String LIST_UPLOADED_OFFLINE_FILES_UUID ="listUploadedOfflineFilesUuid"; + public static final String LIST_UPLOADED_OFFLINE_FILES_NAME ="listUploadedOfflineFilesName"; + public static final String LIST_UPLOADED_ONLINE_FILES_UUID ="listUploadedOnlineFilesUuid"; + public static final String LIST_UPLOADED_ONLINE_FILES_NAME ="listUploadedOnlineFilesName"; + public static final String POPULATED_UPLOADED_FILESDATA ="populateUploadedFilesData"; + + + /** + * the author's current content id + */ + public static final String TOOL_CONTENT_ID ="toolContentId"; + + /** + * the learner or monitoring environment provides toolSessionId + */ + public static final String TOOL_SESSION_ID ="toolSessionId"; + public final long ONE_DAY =60 * 60 * 1000 * 24; + public final static String NOT_ATTEMPTED ="NOT_ATTEMPTED"; + public final static String INCOMPLETE ="INCOMPLETE"; + public static final String COMPLETED ="COMPLETED"; + + public static final String MAP_TOOL_SESSIONS ="mapToolSessions"; + public static final String RESPONSE_INDEX ="responseIndex"; + public static final Integer MAX_TOOL_SESSION_COUNT =new Integer(500); + public static final String IS_TOOL_SESSION_CHANGED ="isToolSessionChanged"; + public static final String USER_EXCEPTION_WRONG_FORMAT ="userExceptionWrongFormat"; + public static final String USER_EXCEPTION_UNCOMPATIBLE_IDS ="userExceptionUncompatibleIds"; + public static final String USER_EXCEPTION_NUMBERFORMAT ="userExceptionNumberFormat"; + public static final String USER_EXCEPTION_CONTENT_DOESNOTEXIST ="userExceptionContentDoesNotExist"; + public static final String USER_EXCEPTION_TOOLSESSION_DOESNOTEXIST ="userExceptionToolSessionDoesNotExist"; + public static final String USER_EXCEPTION_CONTENTID_REQUIRED ="userExceptionContentIdRequired"; + public static final String USER_EXCEPTION_TOOLSESSIONID_REQUIRED ="userExceptionToolSessionIdRequired"; + public static final String USER_EXCEPTION_DEFAULTCONTENT_NOT_AVAILABLE ="userExceptionDefaultContentNotAvailable"; + public static final String USER_EXCEPTION_DEFAULTQUESTIONCONTENT_NOT_AVAILABLE ="userExceptionDefaultQuestionContentNotAvailable"; + public static final String USER_EXCEPTION_USERID_NOTAVAILABLE ="userExceptionUserIdNotAvailable"; + public static final String USER_EXCEPTION_USERID_NOTNUMERIC ="userExceptionUserIdNotNumeric"; + public static final String USER_EXCEPTION_ONLYCONTENT_ANDNOSESSIONS ="userExceptionOnlyContentAndNoSessions"; + public static final String USER_EXCEPTION_USERID_EXISTING ="userExceptionUserIdExisting"; + public static final String USER_EXCEPTION_USER_DOESNOTEXIST ="userExceptionUserDoesNotExist"; + public static final String USER_EXCEPTION_MONITORINGTAB_CONTENTID_REQUIRED ="userExceptionMonitoringTabContentIdRequired"; + public static final String USER_EXCEPTION_DEFAULTCONTENT_NOTSETUP ="userExceptionDefaultContentNotSetup"; + public static final String USER_EXCEPTION_NO_TOOL_SESSIONS ="userExceptionNoToolSessions"; + + /** + * export portfolio constants + */ + public static final String MODE ="mode"; + public static final String LEARNER ="learner"; + public static final String TEACHER ="teacher"; + public static final String USER_EXCEPTION_MODE_REQUIRED ="userExceptionModeRequired"; + public static final String PORTFOLIO_REPORT ="portfolioReport"; + public static final String PORTFOLIO_REQUEST ="portfolioRequest"; + public static final int MAX_GROUPS_COUNT =250; + + /** + * user actions + */ + public static final String ADD_NEW_QUESTION ="addNewQuestion"; + public static final String REMOVE_QUESTION ="removeQuestion"; + public static final String REMOVE_ALL_CONTENT ="removeAllContent"; + public static final String SUBMIT_ALL_CONTENT ="submitAllContent"; + public static final String SUBMIT_TAB_DONE ="submitTabDone"; + + public static final String OPTION_OFF ="false"; + + //LEARNER mode contants + public static final String MAP_QUESTION_CONTENT_LEARNER ="mapQuestionContentLearner"; + public static final String CURRENT_QUESTION_INDEX ="currentQuestionIndex"; + public static final String TOTAL_QUESTION_COUNT ="totalQuestionCount"; + public static final String MAP_ANSWERS ="mapAnswers"; + public static final String CURRENT_ANSWER ="currentAnswer"; + public static final String USER_FEEDBACK ="userFeedback"; + public static final String REPORT_TITLE ="reportTitle"; + public static final String MONITORING_REPORT_TITLE ="monitoringReportTitle"; + public static final String REPORT_TITLE_LEARNER ="reportTitleLearner"; + public static final String END_LEARNING_MESSAGE ="endLearningMessage"; + public static final String IS_TOOL_ACTIVITY_OFFLINE ="isToolActivityOffline"; + public static final String IS_USERNAME_VISIBLE ="isUsernameVisible"; + public static final String IS_ALL_SESSIONS_COMPLETED ="isAllSessionsCompleted"; + public static final String CHECK_ALL_SESSIONS_COMPLETED ="checkAllSessionsCompleted"; + public static final String FROM_TOOL_CONTENT_ID ="fromToolContentId"; + public static final String TO_TOOL_CONTENT_ID ="toToolContentId"; + public static final String LEARNER_REPORT ="learnerReport"; + public static final String MAP_USER_RESPONSES ="mapUserResponses"; + public static final String MAP_MAIN_REPORT ="mapMainReport"; + public static final String MAP_STATS ="mapStats"; + public static final String ACTIVITY_TITLE ="activityTitle"; + public static final String ACTIVITY_INSTRUCTIONS ="activityInstructions"; + + /** + * Monitoring Mode constants + */ + public static final String REPORT_TITLE_MONITOR ="reportTitleMonitor"; + public static final String MONITOR_USER_ID ="userId"; + public static final String MONITORING_REPORT ="monitoringReport"; + public static final String MONITORING_ERROR ="monitoringError"; + public static final String MAP_MONITORING_QUESTIONS ="mapMonitoringQuestions"; + public static final String SUMMARY_TOOL_SESSIONS ="summaryToolSessions"; + public static final String CURRENT_MONITORED_TOOL_SESSION ="currentMonitoredToolSession"; + public static final String CHOICE_MONITORING ="choiceMonitoring"; + public static final String CHOICE_TYPE_MONITORING_SUMMARY ="choiceTypeMonitoringSummary"; + public static final String CHOICE_TYPE_MONITORING_INSTRUCTIONS ="choiceTypeMonitoringInstructions"; + public static final String CHOICE_TYPE_MONITORING_EDITACTIVITY ="choiceTypeMonitoringEditActivity"; + public static final String CHOICE_TYPE_MONITORING_STATS ="choiceTypeMonitoringStats"; + public static final String MONITORING_INSTRUCTIONS_VISITED ="monitoringInstructionsVisited"; + public static final String MONITORING_EDITACTIVITY_VISITED ="monitoringEditActivityVisited"; + public static final String MONITORING_STATS_VISITED ="monitoringStatsVisited"; + public static final String DATAMAP_EDITABLE ="dataMapEditable"; + public static final String DATAMAP_EDITABLE_RESPONSE_ID ="dataMapEditableResponseId"; + public static final String DATAMAP_HIDDEN_RESPONSE_ID ="dataMapHiddenResponseId"; + public static final String MONITORED_CONTENT_ID ="monitoredContentId"; + public static final String START_MONITORING_SUMMARY_REQUEST ="startMonitoringSummaryRequest"; + public static final String STOP_RENDERING_QUESTIONS ="stopRenderingQuestions"; + public static final String EDITACTIVITY_EDITMODE ="editActivityEditMode"; + public static final String FORM_INDEX ="formIndex"; + public static final String RENDER_MONITORING_EDITACTIVITY ="renderMonitoringEditActivity"; + public static final String NO_AVAILABLE_SESSIONS ="noAvailableSessions"; + public static final String INITIAL_MONITORING_TOOL_CONTENT_ID ="initialMonitoringToolContentId"; + public static final String IS_MONITORING_DEFINE_LATER ="isMonitoringDefineLater"; + public static final String NO_TOOL_SESSIONS_AVAILABLE ="noToolSessionAvailable"; + public static final String ORIGINAL_TOOL_SESSIONS ="originalToolSessions"; + + public static final String MONITORED_OFFLINE_INSTRUCTIONS ="monitoredOfflineInstructions"; + public static final String MONITORED_ONLINE_INSTRUCTIONS ="monitoredOnlineInstructions"; + public static final String MONITORING_INSTRUCTIONS_UPDATE_MESSAGE ="monitoringInstructionsUpdateMessage"; + + /** + * Monitor and Learning common constants - used in jsp reporting + */ + public static final String FULLNAME ="fullName"; + public static final String ANSWER ="answer"; + public static final String ATIME ="aTime"; + public static final String FORMATTED_ATIME ="formattedAtime"; + public static final String RESPONSE_ID ="responseId"; + public static final String RESPONSE_HIDDEN ="responseHidden"; + public static final String CURRENTLEARNER_FULLNAME ="currentLearnerFullname"; + public static final String ATTR_USERDATA ="qa_user"; + public static final String TIMEZONE ="timeZone"; + public static final String TIMEZONE_ID ="timeZoneId"; + + /** + * following tell whether author prefers to have the questions listed all in one page or listed sequentially. The default is all in one page. + */ + public static final String QUESTION_LISTING_MODE ="questionListingMode"; + public static final String QUESTION_LISTING_MODE_SEQUENTIAL ="questionListingModeSequential"; + public static final String QUESTION_LISTING_MODE_COMBINED ="questionListingModeCombined"; + + public static final String FEEDBACK_TYPE_SEQUENTIAL ="You will be presented a total of : "; + public static final String FEEDBACK_TYPE_COMBINED ="You are being presented a total of : "; + public static final String QUESTIONS =" questions."; + + /** + * constants redundant for the moment + */ + public static final String DISPLAY_QUESTIONS ="display"; + public static final String SUBMIT_QUESTIONS ="submit"; + public static final String VIEW_INDIVIDUAL_SUMMARY ="view"; +} Index: lams_tool_lamc/src/java/org/lamsfoundation/lams/tool/mc/McApplicationException.java =================================================================== RCS file: /usr/local/cvsroot/lams_tool_lamc/src/java/org/lamsfoundation/lams/tool/mc/McApplicationException.java,v diff -u --- /dev/null 1 Jan 1970 00:00:00 -0000 +++ lams_tool_lamc/src/java/org/lamsfoundation/lams/tool/mc/McApplicationException.java 10 Oct 2005 14:45:20 -0000 1.1 @@ -0,0 +1,71 @@ +/* + *Copyright (C) 2005 LAMS Foundation (http://lamsfoundation.org) + * + *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; either version 2 of the License, or + *(at your option) any later version. + * + *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., 59 Temple Place, Suite 330, Boston, MA 02111-1307 + *USA + * + *http://www.gnu.org/licenses/gpl.txt + */ +package org.lamsfoundation.lams.tool.mc; + + +/** + *

This exception wraps all basic exception occured in the qa tool. It is + * not suppose to be try and catched in any level. The struts should be taking + * care of handling this exception.

+ * +* @author Ozgur Demirtas + * + */ +public class McApplicationException extends RuntimeException +{ + /** + * Default Constructor + */ + public McApplicationException() + { + super(); + } + + /** + * Constructor for customized error message + * @param message + */ + public McApplicationException(String message) + { + super(message); + } + + /** + * Constructor for wrapping the throwable object + * @param cause + */ + public McApplicationException(Throwable cause) + { + super(cause); + } + + /** + * Constructor for wrapping both the customized error message and + * throwable exception object. + * @param message + * @param cause + */ + public McApplicationException(String message, Throwable cause) + { + super(message, cause); + } + +} Index: lams_tool_lamc/src/java/org/lamsfoundation/lams/tool/mc/McComparator.java =================================================================== RCS file: /usr/local/cvsroot/lams_tool_lamc/src/java/org/lamsfoundation/lams/tool/mc/McComparator.java,v diff -u --- /dev/null 1 Jan 1970 00:00:00 -0000 +++ lams_tool_lamc/src/java/org/lamsfoundation/lams/tool/mc/McComparator.java 10 Oct 2005 14:45:20 -0000 1.1 @@ -0,0 +1,40 @@ +/* + * Created on 20/04/2005 + * + * TODO To change the template for this generated file go to + * Window - Preferences - Java - Code Style - Code Templates + */ +package org.lamsfoundation.lams.tool.mc; + +import java.io.Serializable; +import java.util.Comparator; + +/** + * @author Ozgur Demirtas + * + * TODO To change the template for this generated type comment go to + * Window - Preferences - Java - Code Style - Code Templates + */ + +/** + * A comparator implementation that can be used as a constructor to collections. + * The TreeMap in the web layer makes use of it. + * + */ +public class McComparator implements Comparator, Serializable { + + public int compare(Object o1, Object o2) { + String s1 = (String)o1; + String s2 = (String)o2; + + int key1=new Long(s1).intValue(); + int key2=new Long(s2).intValue(); + //logger.debug(logger + " " + this.getClass().getName() + "comparing key1 and key2:" + key1 + " and " + key2); + return key1 - key2; + } + + public boolean equals(Object o) { + String s = (String)o; + return compare(this, o)==0; + } +} Index: lams_tool_lamc/src/java/org/lamsfoundation/lams/tool/mc/McContent.hbm.xml =================================================================== RCS file: /usr/local/cvsroot/lams_tool_lamc/src/java/org/lamsfoundation/lams/tool/mc/Attic/McContent.hbm.xml,v diff -u -r1.6 -r1.7 --- lams_tool_lamc/src/java/org/lamsfoundation/lams/tool/mc/McContent.hbm.xml 7 Oct 2005 20:17:49 -0000 1.6 +++ lams_tool_lamc/src/java/org/lamsfoundation/lams/tool/mc/McContent.hbm.xml 10 Oct 2005 14:45:20 -0000 1.7 @@ -20,7 +20,7 @@ Index: lams_tool_lamc/src/java/org/lamsfoundation/lams/tool/mc/McOptsContent.hbm.xml =================================================================== RCS file: /usr/local/cvsroot/lams_tool_lamc/src/java/org/lamsfoundation/lams/tool/mc/Attic/McOptsContent.hbm.xml,v diff -u -r1.3 -r1.4 --- lams_tool_lamc/src/java/org/lamsfoundation/lams/tool/mc/McOptsContent.hbm.xml 7 Oct 2005 20:17:49 -0000 1.3 +++ lams_tool_lamc/src/java/org/lamsfoundation/lams/tool/mc/McOptsContent.hbm.xml 10 Oct 2005 14:45:20 -0000 1.4 @@ -23,15 +23,6 @@ - - - - - - +error.title =The field "Title" is mandatory.
+error.instructions =The field "Instructions" is mandatory.
+error.reportTitle =The field "Report Title (Advanced)" is mandatory.
+error.defaultquestion.empty =The first question can not be empty.
+submit.successful =The content has been created successfully.
+ +error.content.locked =The content has been locked since it is being used by one mor more learners.
The modification of the content is not allowed. +error.content.inUse =The modification of the content is not allowed since one or more students has attempted the activity. +error.content.beingModified =The content creation is not allowed since the same content is being modified. +error.content.unstableState =The content is in an unstable state since it has been left editable while monitored.
Please use this screen to redefine the content. +error.defaultContent.notAvailable =Tool Activity Error! Can't continue
The the default content for the Tool Activity has not been set up. +error.defaultQuestionContent.notAvailable =Tool Activity Error! Can't continue
The the default question content for the Tool Activity has not been set up. + +#Learning mode resources +label.learning.qa =Answers for Q/A +label.question =Question +label.answers =Answers: +button.endLearning =Finish +label.learning.user =User +label.learning.attemptTime =Attempt Date/Time +label.learning.timezone =Time-Zone +label.learning.response =Response +label.learning.forceOfflineMessage =This is setup to be carried out offline. Plase see your instructor for details. +error.defineLater =Sorry, this activity's content is not ready yet.
Please wait for your teacher to make the content ready. +error.toolSessionId.required =Tool Activity Error! Can't continue
URL is not complete. The Tool Activity requires a toolSession id. +error.contentId.required =Tool Activity Error! Can't continue
URL is not complete. The Tool Activity requires a content id. +error.authoringUser.notAvailable =Tool Activity Error! Can't continue. Tool Activity expects a user id. +error.userId.required =Tool Activity Error! Can't continue
URL is not complete. The Tool Activity requires a user id. +error.userId.notNumeric =Tool Activity Error! Can't continue. The user id passed to the Tool Activity must be numerical. +error.userId.existing =Tool Activity Error! Can't continue. The user id passed to the Tool Activity refers to a student that has already used the activity.
Each learner activity should be associated with a unique userId. +error.defaultContent.notSetup =Tool Activity Error! Can't continue. The default content for the tool has not been setup properly. +error.mode.required =Tool Activity Error! Can't continue
URL is not complete. The Tool Activity requires a mode. + +#Monitoring mode resources +button.startLesson =Start Lesson +button.deleteLesson =Delete Lesson +button.contributeLesson =Contribute -> Report +button.forceComplete =Force Complete +error.synchInMonitor =The report is available only after all the students finish their activities.
+ Some of the students has not completed the activity yet. However, those students may be forced to complete. +error.monitorReportTitle =The field "Monitor Report Title (Advanced)" is mandatory.
+error.noStudentActivity =Sorry, the report can not be generated.
No student has attempted the activity yet. +error.contentAndToolSession.notCompatible =Tool Activity Error! Can't continue. The content id and tool session(s) passed to the tool activity are not compatible with each other.
The Tool Activity expects that each of the passed tool sessions refer to the same passed content id. +error.toolSessions.wrongFormat =Tool Activity Error! Can't continue. No valid tool sessions has been passed to the Tool Activity.
The expected format is: TOOLURL?toolContentId=A&toolSessionId1=B&toolSessionId2=C&toolSessionId3=D&... +error.numberFormatException =Tool Activity Error! Can't continue. The content id and tool session id(s) passed to the Tool Activity must be numerical. +error.contentId.numberFormatException =Tool Activity Error! Can't continue. The content id passed to the Tool Activity must be numerical. +error.sessionId.numberFormatException =Tool Activity Error! Can't continue. The toolSession id passed to the Tool Activity must be numerical. +error.content.doesNotExist =Tool Activity Error! Can't continue. The content id passed to the Tool Activity does not refer to an existing content. +error.toolSessions.doesNotExist =Tool Activity Error! Can't continue. One of the toolsession ids passed to the Tool Activity does not refer to an existing tool session. +error.toolSession.doesNotExist =Tool Activity Error! Can't continue. The toolsession id passed to the Tool Activity does not refer to an existing tool session. +error.content.onlyContentAndNoSessions =A report can not be generated since no tool sessions has been passed to the Tool Activity. +error.content.noToolSessions =A report can not be generated since there has not been any student activity on this content. +error.user.doesNotExist =Tool Activity Error! Can't continue. The user id passed to the Tool Activity does not refer to an existing user. +error.tab.contentId.required =Sorry, the screen is not available. The Tool Activity requires a content id. +monitoring.feedback.instructionUpdate =The content has been updated successfully. + +group.label =Group +button.summary =Summary +button.editActivity =Edit Activity +button.stats =Stats +label.edit =Edit +label.update =Update +label.hide =Hide +label.unHide =UnHide +label.hidden =Hidden +label.stats.totalLearners =Total count of learners: +label.stats.allGroups =All Groups: +label.stats.totalAllGroups =Total count of all learners: + +#=========================Error Messages===========================# +error.system.qa=A system exception has occured. Please contact Lams International technical support at 95806666. The error to report is\:
{0}
+ + Index: lams_tool_lamc/src/java/org/lamsfoundation/lams/tool/mc/McStringComparator.java =================================================================== RCS file: /usr/local/cvsroot/lams_tool_lamc/src/java/org/lamsfoundation/lams/tool/mc/McStringComparator.java,v diff -u --- /dev/null 1 Jan 1970 00:00:00 -0000 +++ lams_tool_lamc/src/java/org/lamsfoundation/lams/tool/mc/McStringComparator.java 10 Oct 2005 14:45:20 -0000 1.1 @@ -0,0 +1,40 @@ +/* + * Created on 20/04/2005 + * + * TODO To change the template for this generated file go to + * Window - Preferences - Java - Code Style - Code Templates + */ +package org.lamsfoundation.lams.tool.mc; + +import java.io.Serializable; +import java.util.Comparator; + +import org.apache.log4j.Logger; + +/** + * @author Ozgur Demirtas + * + * TODO To change the template for this generated type comment go to + * Window - Preferences - Java - Code Style - Code Templates + */ + +/** + * A comparator implementation that can be used as a constructor to collections. + * The TreeMap in the web layer makes use of it. + * + */ +public class McStringComparator implements Comparator, Serializable { + static Logger logger = Logger.getLogger(McStringComparator.class.getName()); + + public int compare(Object o1, Object o2) { + String s1 = (String)o1; + String s2 = (String)o2; + + return s1.compareTo(s2); + } + + public boolean equals(Object o) { + String s = (String)o; + return compare(this, o)==0; + } +} Index: lams_tool_lamc/src/java/org/lamsfoundation/lams/tool/mc/McUsrAttempt.hbm.xml =================================================================== RCS file: /usr/local/cvsroot/lams_tool_lamc/src/java/org/lamsfoundation/lams/tool/mc/Attic/McUsrAttempt.hbm.xml,v diff -u -r1.6 -r1.7 --- lams_tool_lamc/src/java/org/lamsfoundation/lams/tool/mc/McUsrAttempt.hbm.xml 7 Oct 2005 20:17:49 -0000 1.6 +++ lams_tool_lamc/src/java/org/lamsfoundation/lams/tool/mc/McUsrAttempt.hbm.xml 10 Oct 2005 14:45:20 -0000 1.7 @@ -18,15 +18,6 @@ - - - Index: lams_tool_lamc/test/java/org/lamsfoundation/lams/tool/mc/McDataAccessTestCase.java =================================================================== RCS file: /usr/local/cvsroot/lams_tool_lamc/test/java/org/lamsfoundation/lams/tool/mc/Attic/McDataAccessTestCase.java,v diff -u -r1.6 -r1.7 --- lams_tool_lamc/test/java/org/lamsfoundation/lams/tool/mc/McDataAccessTestCase.java 8 Oct 2005 16:12:17 -0000 1.6 +++ lams_tool_lamc/test/java/org/lamsfoundation/lams/tool/mc/McDataAccessTestCase.java 10 Oct 2005 14:47:44 -0000 1.7 @@ -1,8 +1,5 @@ package org.lamsfoundation.lams.tool.mc; -import java.util.Date; -import java.util.HashSet; - import org.lamsfoundation.lams.test.AbstractLamsTestCase; import org.lamsfoundation.lams.tool.mc.dao.hibernate.McContentDAO; import org.lamsfoundation.lams.tool.mc.dao.hibernate.McOptionsContentDAO; @@ -81,87 +78,4 @@ super.tearDown(); } - public void testInitTestData() - { - //create new mc content - McContent mc = new McContent(); - mc.setMcContentId(TEST_CONTENT_ID); - mc.setTitle("New - Put Title Here"); - mc.setInstructions("New - Put instructions here."); - mc.setQuestionsSequenced(false); - mc.setUsernameVisible(false); - mc.setCreatedBy(0); - mc.setMonitoringReportTitle("New-Monitoring Report title"); - mc.setReportTitle("New-Report title"); - mc.setRunOffline(false); - mc.setDefineLater(false); - mc.setSynchInMonitor(false); - mc.setOnlineInstructions("New- online instructions"); - mc.setOfflineInstructions("New- offline instructions"); - mc.setEndLearningMessage("New- endLearningMessage"); - mc.setContentInUse(false); - mc.setRetries(false); - mc.setShowFeedback(false); - mc.setShowTopUsers(false); - mc.setMcQueContents(new HashSet()); - mc.setMcSessions(new HashSet()); - mcContentDAO.saveMcContent(mc); - - McContent mcContent = mcContentDAO.findMcContentById(TEST_CONTENT_ID); - McQueContent mcQueContent= new McQueContent(TEST_QUE_ID1, - "What planet are you from?", - new Integer(444), - mcContent, - new HashSet(), - new HashSet() - ); - mcQueContentDAO.saveOrUpdateMcQueContent(mcQueContent); - - - McQueContent mcExistingQueContent = mcQueContentDAO.findMcQueContentById(TEST_QUE_ID1); - McOptsContent mcOptionsContent= new McOptsContent(new Long(777), true, "red", mcExistingQueContent, new HashSet()); - mcOptionsContentDAO.saveMcOptionsContent(mcOptionsContent); - - McOptsContent mcOptionsContent2= new McOptsContent(new Long(888), false, "blue", mcExistingQueContent, new HashSet()); - mcOptionsContentDAO.saveMcOptionsContent(mcOptionsContent2); - - McOptsContent mcOptionsContent3= new McOptsContent(new Long(999), false, "yellow", mcExistingQueContent, new HashSet()); - mcOptionsContentDAO.saveMcOptionsContent(mcOptionsContent3); - - - McContent mcExistingContent = mcContentDAO.findMcContentById(TEST_CONTENT_ID); - McSession mcSession = new McSession(TEST_SESSION_ID_OTHER, - new Date(System.currentTimeMillis()), - new Date(System.currentTimeMillis()+ ONE_DAY), - this.NOT_ATTEMPTED, - mcExistingContent, - new HashSet()); - mcSessionDAO.saveMcSession(mcSession); - - - McSession mcExistingSession = mcSessionDAO.findMcSessionById(TEST_SESSION_ID_OTHER); - McQueUsr mcQueUsr= new McQueUsr(TEST_NEW_USER_ID, - "ozgur", - "Ozgur Demirtas", - mcExistingSession, - new HashSet()); - mcUserDAO.saveMcUser(mcQueUsr); - - - McQueContent mcExistingQueContent2 = mcQueContentDAO.findMcQueContentById(TEST_QUE_ID1); - McOptsContent mcExistingOptionsContent2=mcOptionsContentDAO.findMcOptionsContentById(new Long(888)); - McQueUsr mcExistingQueUsr2=mcUserDAO.findMcUserById(TEST_NEW_USER_ID); - - McUsrAttempt mcUsrAttempt= new McUsrAttempt(new Long(33), - new Date(System.currentTimeMillis()), - "Sydney", - mcExistingQueContent2, - mcExistingQueUsr2, - mcExistingOptionsContent2 - ); - - mcUsrAttemptDAO.saveMcUsrAttempt(mcUsrAttempt); - - } - } Index: lams_tool_lamc/test/java/org/lamsfoundation/lams/tool/mc/McOptsContent.hbm.xml =================================================================== RCS file: /usr/local/cvsroot/lams_tool_lamc/test/java/org/lamsfoundation/lams/tool/mc/Attic/McOptsContent.hbm.xml,v diff -u -r1.3 -r1.4 --- lams_tool_lamc/test/java/org/lamsfoundation/lams/tool/mc/McOptsContent.hbm.xml 7 Oct 2005 20:19:26 -0000 1.3 +++ lams_tool_lamc/test/java/org/lamsfoundation/lams/tool/mc/McOptsContent.hbm.xml 10 Oct 2005 14:47:44 -0000 1.4 @@ -23,15 +23,6 @@ - - - - - - - - -