Index: lams_tool_laqa/conf/hibernate/mappings/QaUsrResp.hbm.xml
===================================================================
diff -u -rc2c90fffd84acacd50458727538e2e934e71d03e -rb7c4250adc416462793208c4393c5befc2dc69c7
--- lams_tool_laqa/conf/hibernate/mappings/QaUsrResp.hbm.xml (.../QaUsrResp.hbm.xml) (revision c2c90fffd84acacd50458727538e2e934e71d03e)
+++ lams_tool_laqa/conf/hibernate/mappings/QaUsrResp.hbm.xml (.../QaUsrResp.hbm.xml) (revision b7c4250adc416462793208c4393c5befc2dc69c7)
@@ -43,7 +43,15 @@
>
+
+
+
-
+
@@ -413,8 +413,8 @@
-
+
@@ -430,6 +430,13 @@
+
+
+
+
+
+
+
Index: lams_tool_laqa/db/sql/create_lams_tool_qa.sql
===================================================================
diff -u -r0e747c5eb46e7a7618f09aaf32c3b7cb700a76dd -rb7c4250adc416462793208c4393c5befc2dc69c7
--- lams_tool_laqa/db/sql/create_lams_tool_qa.sql (.../create_lams_tool_qa.sql) (revision 0e747c5eb46e7a7618f09aaf32c3b7cb700a76dd)
+++ lams_tool_laqa/db/sql/create_lams_tool_qa.sql (.../create_lams_tool_qa.sql) (revision b7c4250adc416462793208c4393c5befc2dc69c7)
@@ -66,6 +66,7 @@
, hidden TINYINT(1) DEFAULT 0
, answer VARCHAR(255)
, attempt_time DATETIME
+ , time_zone VARCHAR(255)
, que_usr_id BIGINT(20) NOT NULL
, qa_que_content_id BIGINT(20) NOT NULL
, PRIMARY KEY (response_id)
Index: lams_tool_laqa/src/java/org/lamsfoundation/lams/tool/qa/QaAppConstants.java
===================================================================
diff -u -r7473d498dd9a1beb27a3f29d9364eca13e9b8165 -rb7c4250adc416462793208c4393c5befc2dc69c7
--- lams_tool_laqa/src/java/org/lamsfoundation/lams/tool/qa/QaAppConstants.java (.../QaAppConstants.java) (revision 7473d498dd9a1beb27a3f29d9364eca13e9b8165)
+++ lams_tool_laqa/src/java/org/lamsfoundation/lams/tool/qa/QaAppConstants.java (.../QaAppConstants.java) (revision b7c4250adc416462793208c4393c5befc2dc69c7)
@@ -216,6 +216,7 @@
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";
/**
* following tell whether author prefers to have the questions listed all in one page or listed sequentially. The default is all in one page.
*/
Index: lams_tool_laqa/src/java/org/lamsfoundation/lams/tool/qa/QaContent.java
===================================================================
diff -u -r16e844de3f7c34b44baee1b28e67e708f42d00bf -rb7c4250adc416462793208c4393c5befc2dc69c7
--- lams_tool_laqa/src/java/org/lamsfoundation/lams/tool/qa/QaContent.java (.../QaContent.java) (revision 16e844de3f7c34b44baee1b28e67e708f42d00bf)
+++ lams_tool_laqa/src/java/org/lamsfoundation/lams/tool/qa/QaContent.java (.../QaContent.java) (revision b7c4250adc416462793208c4393c5befc2dc69c7)
@@ -79,6 +79,7 @@
/** nullable persistent field */
private Date updateDate;
+
/** persistent field */
private Set qaQueContents;
@@ -112,7 +113,7 @@
boolean contentLocked,
String creationDate,
Date updateDate,
- Set qaQueContents,
+ Set qaQueContents,
Set qaSessions)
{
this.qaContentId = qaContentId;
@@ -129,7 +130,7 @@
this.questionsSequenced = questionsSequenced;
this.usernameVisible = usernameVisible;
this.synchInMonitor = synchInMonitor;
- this.contentLocked =contentLocked;
+ this.contentLocked = contentLocked;
this.creationDate = creationDate;
this.updateDate = updateDate;
this.qaQueContents = qaQueContents;
@@ -165,7 +166,7 @@
qa.isContentLocked(),
qa.getCreationDate(),
qa.getUpdateDate(),
- new TreeSet(),
+ new TreeSet(),
new TreeSet());
logger.debug(logger + " " + "QaContent" + " " + "before doing deepCopyQaQueContent");
newContent.setQaQueContents(qa.deepCopyQaQueContent(newContent));
Index: lams_tool_laqa/src/java/org/lamsfoundation/lams/tool/qa/QaResources.properties
===================================================================
diff -u -r7473d498dd9a1beb27a3f29d9364eca13e9b8165 -rb7c4250adc416462793208c4393c5befc2dc69c7
--- lams_tool_laqa/src/java/org/lamsfoundation/lams/tool/qa/QaResources.properties (.../QaResources.properties) (revision 7473d498dd9a1beb27a3f29d9364eca13e9b8165)
+++ lams_tool_laqa/src/java/org/lamsfoundation/lams/tool/qa/QaResources.properties (.../QaResources.properties) (revision b7c4250adc416462793208c4393c5befc2dc69c7)
@@ -53,6 +53,7 @@
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 =The activity Q/A is setup to be carried out offline. Plase see your instructor.
error.defineLater =Sorry, this activity's content is not ready yet.
Please wait for your teacher to make the content ready.
Index: lams_tool_laqa/src/java/org/lamsfoundation/lams/tool/qa/QaUsrResp.hbm.xml
===================================================================
diff -u -rc2c90fffd84acacd50458727538e2e934e71d03e -rb7c4250adc416462793208c4393c5befc2dc69c7
--- lams_tool_laqa/src/java/org/lamsfoundation/lams/tool/qa/QaUsrResp.hbm.xml (.../QaUsrResp.hbm.xml) (revision c2c90fffd84acacd50458727538e2e934e71d03e)
+++ lams_tool_laqa/src/java/org/lamsfoundation/lams/tool/qa/QaUsrResp.hbm.xml (.../QaUsrResp.hbm.xml) (revision b7c4250adc416462793208c4393c5befc2dc69c7)
@@ -43,7 +43,15 @@
>
+
+
+
CONTENT_IN_USE
*
- * DEFAULT_QUE_CONTENT_ID is hardcoded for the moment, it will probably go.
- *
- * We won't need to create a mock user once the usernames are defined properly in the container and passed to the tool
- take off User mockUser=QaUtils.createMockUser();
- *
* QaStarterAction loads the default content and initializes the presentation Map
* Requests can come either from authoring envuironment or from the monitoring environment for Edit Activity screen
*
Index: lams_tool_laqa/test/java/org/lamsfoundation/lams/tool/qa/QaDataAccessTestCase.java
===================================================================
diff -u -rcb356577eaf17e3d797b1bae07f50014a849e86f -rb7c4250adc416462793208c4393c5befc2dc69c7
--- lams_tool_laqa/test/java/org/lamsfoundation/lams/tool/qa/QaDataAccessTestCase.java (.../QaDataAccessTestCase.java) (revision cb356577eaf17e3d797b1bae07f50014a849e86f)
+++ lams_tool_laqa/test/java/org/lamsfoundation/lams/tool/qa/QaDataAccessTestCase.java (.../QaDataAccessTestCase.java) (revision b7c4250adc416462793208c4393c5befc2dc69c7)
@@ -118,6 +118,7 @@
{
QaUsrResp qaUsrResp= new QaUsrResp(response, false,
new Date(System.currentTimeMillis()),
+ "",
qaQueContent,
getExistingUser("randomstriker","Michael Random"));
qaUsrRespDAO.createUserResponse(qaUsrResp);
@@ -130,6 +131,7 @@
QaUsrResp qaUsrResp= new QaUsrResp(response, false,
new Date(System.currentTimeMillis()),
+ "",
qaQueContent,
getExistingUser("randomstriker","Michael Random"));
qaUsrRespDAO.createUserResponse(qaUsrResp);
Index: lams_tool_laqa/test/java/org/lamsfoundation/lams/tool/qa/QaResources.properties
===================================================================
diff -u
--- lams_tool_laqa/test/java/org/lamsfoundation/lams/tool/qa/QaResources.properties (revision 0)
+++ lams_tool_laqa/test/java/org/lamsfoundation/lams/tool/qa/QaResources.properties (revision b7c4250adc416462793208c4393c5befc2dc69c7)
@@ -0,0 +1,102 @@
+# Project lams_tool_qa
+#Authoring mode resources
+label.authoring.qa =Questions and Answers
+label.authoring.title =Title
+label.authoring.instructions =Instructions
+
+button.basic =Basic
+button.uploadFile =Upload Package
+button.preview =Preview
+button.advanced =Advanced
+button.instructions =Instructions
+button.done =Done
+tool.icon.name =Q/A
+button.addNewQuestion =+
+button.removeQuestion =-
+button.removeAllContent =Remove Content
+button.submitAllContent =Submit
+button.done =Done
+button.getNextQuestion =Next
+button.getPreviousQuestion =Previous
+
+label.report.title =Report Title
+label.monitoringReport.title =Monitoring Report Title
+label.report.endLearningMessage =End of Activity Message
+label.question1 =Question 1
+radiobox.defineLater =Define Later
+radiobox.synchInMonitor =Sync in Monitor
+radiobox.forceOffline =Force Offline
+radiobox.usernameVisible =Username Visible
+radiobox.questionsSequenced =Questions Sequenced
+label.offlineInstructions =Offline Instructions
+label.onlineInstructions =Online Instructions
+option.on =ON
+option.off =OFF
+feedback =Please address the following issues before submit.
+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 =The activity Q/A is setup to be carried out offline. Plase see your instructor.
+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.
The expected format is either : TOOLURL?userId=A&toolContentId=B or TOOLURL?userId=A
+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.
+
+#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. 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.content.onlyContentAndNoSessions =A report can not be generated since no tool sessions has been passed to the Tool Activity.
+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_laqa/test/java/org/lamsfoundation/lams/tool/qa/QaUsrResp.hbm.xml
===================================================================
diff -u -rc2c90fffd84acacd50458727538e2e934e71d03e -rb7c4250adc416462793208c4393c5befc2dc69c7
--- lams_tool_laqa/test/java/org/lamsfoundation/lams/tool/qa/QaUsrResp.hbm.xml (.../QaUsrResp.hbm.xml) (revision c2c90fffd84acacd50458727538e2e934e71d03e)
+++ lams_tool_laqa/test/java/org/lamsfoundation/lams/tool/qa/QaUsrResp.hbm.xml (.../QaUsrResp.hbm.xml) (revision b7c4250adc416462793208c4393c5befc2dc69c7)
@@ -43,7 +43,15 @@
>
+
+
+
+
+
+
    |
    |
-     |
+     |
+     |
@@ -38,14 +39,18 @@
<%String fullName="fullName" + request.getAttribute("queIndex") + request.getAttribute("ansIndex");
String aTime="aTime" + request.getAttribute("queIndex") + request.getAttribute("ansIndex");
+ String timeZone="timeZone" + request.getAttribute("queIndex") + request.getAttribute("ansIndex");
String answer="answer" + request.getAttribute("queIndex") + request.getAttribute("ansIndex");
String currentLearnerFullname=(String) request.getSession().getAttribute("currentLearnerFullname");
fullName= (String) request.getSession().getAttribute(fullName);
java.util.Date attemptTime= (java.util.Date) request.getSession().getAttribute(aTime);
+ timeZone= (String) request.getSession().getAttribute(timeZone);
answer= (String) request.getSession().getAttribute(answer);
+
request.setAttribute("fullName", fullName);
request.setAttribute("attemptTime", attemptTime);
+ request.setAttribute("timeZone", timeZone);
request.setAttribute("answer", answer);
request.setAttribute("currentLearnerFullname", currentLearnerFullname);
%>
@@ -99,6 +104,15 @@
<%}%>
+ <% if (timeZone != null)
+ {
+ %>
+
+    
+ |
+ <%}%>
+
+
<% if (answer != null)
{
%>