Index: lams_central/web/qb/search.jsp
===================================================================
diff -u -r28a07fe5e236a1481734372dc50a5e57edcbea23 -r9ca39edffd0c57ba7deeb38316f5a0f7b0d8fe44
--- lams_central/web/qb/search.jsp (.../search.jsp) (revision 28a07fe5e236a1481734372dc50a5e57edcbea23)
+++ lams_central/web/qb/search.jsp (.../search.jsp) (revision 9ca39edffd0c57ba7deeb38316f5a0f7b0d8fe44)
@@ -18,7 +18,7 @@
}
.question-description-grid {
min-height: 10px;
- max-height: 10px;
+ max-height: 12px;
overflow-x: hidden;
margin-top: 4px;
}
Index: lams_common/src/java/org/lamsfoundation/lams/dbupdates/patch20190110.sql
===================================================================
diff -u -r3bf41cd7874527c26d84d0be4de6dfa40eada489 -r9ca39edffd0c57ba7deeb38316f5a0f7b0d8fe44
--- lams_common/src/java/org/lamsfoundation/lams/dbupdates/patch20190110.sql (.../patch20190110.sql) (revision 3bf41cd7874527c26d84d0be4de6dfa40eada489)
+++ lams_common/src/java/org/lamsfoundation/lams/dbupdates/patch20190110.sql (.../patch20190110.sql) (revision 9ca39edffd0c57ba7deeb38316f5a0f7b0d8fe44)
@@ -118,7 +118,7 @@
INSERT INTO lams_qb_question (uid, `local`, `type`, question_id, version, create_date, name, description, max_mark, feedback, tmp_question_id)
SELECT NULL, 0, 1, @question_id:=@question_id + 1, 1, IFNULL(c.creation_date, NOW()),
- mcq.question, NULL, IFNULL(mcq.max_mark, 1), mcq.feedback, q.target_uid
+ 'MCQ question', mcq.question, IFNULL(mcq.max_mark, 1), mcq.feedback, q.target_uid
FROM (SELECT uid,
TRIM(question) AS question,
mark AS max_mark,
Index: lams_tool_lamc/conf/language/lams/ApplicationResources_en_AU.properties
===================================================================
diff -u -rdc41ab1a82d32dfecca77a3db6936fe116c164b7 -r9ca39edffd0c57ba7deeb38316f5a0f7b0d8fe44
--- lams_tool_lamc/conf/language/lams/ApplicationResources_en_AU.properties (.../ApplicationResources_en_AU.properties) (revision dc41ab1a82d32dfecca77a3db6936fe116c164b7)
+++ lams_tool_lamc/conf/language/lams/ApplicationResources_en_AU.properties (.../ApplicationResources_en_AU.properties) (revision 9ca39edffd0c57ba7deeb38316f5a0f7b0d8fe44)
@@ -234,6 +234,7 @@
outcome.authoring.existing.none =none
warn.tool.output.change.none =This will delete all existing marks for this activity. Are you sure?
output.desc.none =No score
+label.import.from.question.bank =Import from question bank
#======= End labels: Exported 228 labels for en AU =====
Index: lams_tool_lamc/src/java/org/lamsfoundation/lams/tool/mc/McAppConstants.java
===================================================================
diff -u -r8e218cf691c1235001bd61a9e6f62c363f62124a -r9ca39edffd0c57ba7deeb38316f5a0f7b0d8fe44
--- lams_tool_lamc/src/java/org/lamsfoundation/lams/tool/mc/McAppConstants.java (.../McAppConstants.java) (revision 8e218cf691c1235001bd61a9e6f62c363f62124a)
+++ lams_tool_lamc/src/java/org/lamsfoundation/lams/tool/mc/McAppConstants.java (.../McAppConstants.java) (revision 9ca39edffd0c57ba7deeb38316f5a0f7b0d8fe44)
@@ -80,7 +80,7 @@
public static final String CORRECT = "Correct";
/* learner mode contants */
- public static final String LEARNER_ANSWERS_DTO_LIST = "learnerAnswersDTOList";
+ public static final String LEARNER_ANSWER_DTOS = "learnerAnswerDtos";
public static final String MC_GENERAL_LEARNER_FLOW_DTO = "mcGeneralLearnerFlowDTO";
public static final String NOTEBOOK = "notebook";
public static final String ENTRY_TEXT = "entryText";
Index: lams_tool_lamc/src/java/org/lamsfoundation/lams/tool/mc/dao/IMcQueContentDAO.java
===================================================================
diff -u -r2e9ee1c2451a05981f05e9edf89bb3356cf2b147 -r9ca39edffd0c57ba7deeb38316f5a0f7b0d8fe44
--- lams_tool_lamc/src/java/org/lamsfoundation/lams/tool/mc/dao/IMcQueContentDAO.java (.../IMcQueContentDAO.java) (revision 2e9ee1c2451a05981f05e9edf89bb3356cf2b147)
+++ lams_tool_lamc/src/java/org/lamsfoundation/lams/tool/mc/dao/IMcQueContentDAO.java (.../IMcQueContentDAO.java) (revision 9ca39edffd0c57ba7deeb38316f5a0f7b0d8fe44)
@@ -28,7 +28,7 @@
import org.lamsfoundation.lams.tool.mc.model.McQueContent;
/**
- * Interface for the McQueContent DAO, defines methods needed to access/modify mc question content
+ * Interface for the McQueContent DAO, defines methods needed to access/modify mc questionDescription content
*
* @author Ozgur Demirtas
*/
@@ -48,28 +48,17 @@
/**
*
- * Return a list of McQueContent with the given identifier question
and mcContentUid
,
+ * Return a list of McQueContent with the given identifier questionDescription
and mcContentUid
,
* returns null if not found.
*
*
* @param mcContentUid
* @return List
*/
- List getQuestionsByContentUid(final long mcContentId);
+ List getQuestionsByContentUid(final long contentUid);
/**
*
- * Return a list of McQueContent with the given identifier question
and mcContentUid
,
- * returns null if not found.
- *
- *
- * @param mcContentUid
- * @return List
- */
- List refreshQuestionContent(final Long mcContentId);
-
- /**
- *
* saves McQueContent with the given identifier mcQueContent
*
*
Index: lams_tool_lamc/src/java/org/lamsfoundation/lams/tool/mc/dao/IMcUsrAttemptDAO.java
===================================================================
diff -u -rd03a1456d2d0ee7a482273fe35412c67054f133d -r9ca39edffd0c57ba7deeb38316f5a0f7b0d8fe44
--- lams_tool_lamc/src/java/org/lamsfoundation/lams/tool/mc/dao/IMcUsrAttemptDAO.java (.../IMcUsrAttemptDAO.java) (revision d03a1456d2d0ee7a482273fe35412c67054f133d)
+++ lams_tool_lamc/src/java/org/lamsfoundation/lams/tool/mc/dao/IMcUsrAttemptDAO.java (.../IMcUsrAttemptDAO.java) (revision 9ca39edffd0c57ba7deeb38316f5a0f7b0d8fe44)
@@ -97,12 +97,12 @@
List getLeadersFinalizedAttemptsByContentId(final Long contentId);
/**
- * Get the highest attempt order for a user for a particular question
+ * Get the highest attempt order for a user for a particular questionDescription
*/
McUsrAttempt getUserAttemptByQuestion(Long queUsrUid, Long mcQueContentId);
/**
- * Get the highest attempt order for a all users in a session for a particular question
+ * Get the highest attempt order for a all users in a session for a particular questionDescription
*/
List getUserAttemptsByQuestionSession(final Long sessionUid, final Long mcQueContentId);
Index: lams_tool_lamc/src/java/org/lamsfoundation/lams/tool/mc/dao/hibernate/McQueContentDAO.java
===================================================================
diff -u -r2e9ee1c2451a05981f05e9edf89bb3356cf2b147 -r9ca39edffd0c57ba7deeb38316f5a0f7b0d8fe44
--- lams_tool_lamc/src/java/org/lamsfoundation/lams/tool/mc/dao/hibernate/McQueContentDAO.java (.../McQueContentDAO.java) (revision 2e9ee1c2451a05981f05e9edf89bb3356cf2b147)
+++ lams_tool_lamc/src/java/org/lamsfoundation/lams/tool/mc/dao/hibernate/McQueContentDAO.java (.../McQueContentDAO.java) (revision 9ca39edffd0c57ba7deeb38316f5a0f7b0d8fe44)
@@ -37,12 +37,10 @@
@Repository
public class McQueContentDAO extends LAMSBaseDAO implements IMcQueContentDAO {
- private static final String LOAD_QUESTION_CONTENT_BY_CONTENT_ID = "from mcQueContent in class McQueContent where mcQueContent.mcContent.uid=:mcContentId order by mcQueContent.displayOrder";
+ private static final String LOAD_QUESTION_CONTENT_BY_CONTENT_ID = "from mcQueContent in class McQueContent where mcQueContent.mcContent.uid=:contentUid order by mcQueContent.displayOrder";
private static final String FIND_QUESTION_CONTENT_BY_UID = "from mcQueContent in class McQueContent where mcQueContent.uid=:uid";
- private static final String REFRESH_QUESTION_CONTENT = "from mcQueContent in class McQueContent where mcQueContent.mcContent.uid=:mcContentId order by mcQueContent.displayOrder";
-
private static final String LOAD_QUESTION_CONTENT_BY_DISPLAY_ORDER = "from mcQueContent in class McQueContent where mcQueContent.displayOrder=:displayOrder and mcQueContent.mcContent.uid=:mcContentUid";
private static final String SORT_QUESTION_CONTENT_BY_DISPLAY_ORDER = "from mcQueContent in class McQueContent where mcQueContent.mcContent.uid=:mcContentId order by mcQueContent.displayOrder";
@@ -65,20 +63,12 @@
@SuppressWarnings("unchecked")
public List getQuestionsByContentUid(final long contentUid) {
List list = getSessionFactory().getCurrentSession()
- .createQuery(LOAD_QUESTION_CONTENT_BY_CONTENT_ID).setParameter("mcContentId", contentUid).list();
+ .createQuery(LOAD_QUESTION_CONTENT_BY_CONTENT_ID).setParameter("contentUid", contentUid).list();
return list;
}
@Override
- public List> refreshQuestionContent(final Long mcContentId) {
- List> list = getSessionFactory().getCurrentSession().createQuery(REFRESH_QUESTION_CONTENT)
- .setParameter("mcContentId", mcContentId).list();
-
- return list;
- }
-
- @Override
public McQueContent getQuestionContentByDisplayOrder(final Integer displayOrder, final Long mcContentUid) {
List> list = getSessionFactory().getCurrentSession().createQuery(LOAD_QUESTION_CONTENT_BY_DISPLAY_ORDER)
.setParameter("displayOrder", displayOrder).setParameter("mcContentUid", mcContentUid).list();
Index: lams_tool_lamc/src/java/org/lamsfoundation/lams/tool/mc/dao/hibernate/McUsrAttemptDAO.java
===================================================================
diff -u -reb5312af3f0d7ca64ca3b41988129079c7509427 -r9ca39edffd0c57ba7deeb38316f5a0f7b0d8fe44
--- lams_tool_lamc/src/java/org/lamsfoundation/lams/tool/mc/dao/hibernate/McUsrAttemptDAO.java (.../McUsrAttemptDAO.java) (revision eb5312af3f0d7ca64ca3b41988129079c7509427)
+++ lams_tool_lamc/src/java/org/lamsfoundation/lams/tool/mc/dao/hibernate/McUsrAttemptDAO.java (.../McUsrAttemptDAO.java) (revision 9ca39edffd0c57ba7deeb38316f5a0f7b0d8fe44)
@@ -124,7 +124,7 @@
.createQuery(LOAD_PARTICULAR_QUESTION_ATTEMPT).setParameter("queUsrUid", queUsrUid)
.setParameter("mcQueContentId", mcQueContentId).list();
if (userAttemptList.size() > 1) {
- throw new RuntimeException("There are more than 1 latest question attempt");
+ throw new RuntimeException("There are more than 1 latest questionDescription attempt");
}
McUsrAttempt userAttempt = (userAttemptList.size() == 0) ? null : userAttemptList.get(0);
Index: lams_tool_lamc/src/java/org/lamsfoundation/lams/tool/mc/dto/AnswerDTO.java
===================================================================
diff -u -rc87bb47eb670934f10192c08922f83367bc36230 -r9ca39edffd0c57ba7deeb38316f5a0f7b0d8fe44
--- lams_tool_lamc/src/java/org/lamsfoundation/lams/tool/mc/dto/AnswerDTO.java (.../AnswerDTO.java) (revision c87bb47eb670934f10192c08922f83367bc36230)
+++ lams_tool_lamc/src/java/org/lamsfoundation/lams/tool/mc/dto/AnswerDTO.java (.../AnswerDTO.java) (revision 9ca39edffd0c57ba7deeb38316f5a0f7b0d8fe44)
@@ -30,17 +30,20 @@
/**
*
- * DTO that holds question and candidate answers for the learner environment
+ * DTO that holds questionDescription and candidate answers for the learner environment
*
*
* @author Ozgur Demirtas
*/
public class AnswerDTO implements Comparable {
- protected String question;
protected String displayOrder;
protected Long questionUid;
+
+ protected String questionName;
+
+ protected String questionDescription;
protected Integer mark;
@@ -74,25 +77,26 @@
public void setOptions(List options) {
this.options = options;
}
+
+ public String getQuestionName() {
+ return questionName;
+ }
- /**
- * @return Returns the question.
- */
- public String getQuestion() {
- return question;
+ public void setQuestionName(String questionName) {
+ this.questionName = questionName;
}
- /**
- * @param question
- * The question to set.
- */
- public void setQuestion(String question) {
- this.question = question;
+ public String getQuestionDescription() {
+ return questionDescription;
}
+ public void setQuestionDescription(String questionDescription) {
+ this.questionDescription = questionDescription;
+ }
+
@Override
public String toString() {
- return new ToStringBuilder(this).append("question: ", getQuestion()).append("displayOrder: ", getDisplayOrder())
+ return new ToStringBuilder(this).append("questionDescription: ", getQuestionDescription()).append("displayOrder: ", getDisplayOrder())
.append("answerOption: ", getAnswerOption()).toString();
}
Index: lams_tool_lamc/src/java/org/lamsfoundation/lams/tool/mc/dto/McGeneralLearnerFlowDTO.java
===================================================================
diff -u -rd03a1456d2d0ee7a482273fe35412c67054f133d -r9ca39edffd0c57ba7deeb38316f5a0f7b0d8fe44
--- lams_tool_lamc/src/java/org/lamsfoundation/lams/tool/mc/dto/McGeneralLearnerFlowDTO.java (.../McGeneralLearnerFlowDTO.java) (revision d03a1456d2d0ee7a482273fe35412c67054f133d)
+++ lams_tool_lamc/src/java/org/lamsfoundation/lams/tool/mc/dto/McGeneralLearnerFlowDTO.java (.../McGeneralLearnerFlowDTO.java) (revision 9ca39edffd0c57ba7deeb38316f5a0f7b0d8fe44)
@@ -22,9 +22,11 @@
package org.lamsfoundation.lams.tool.mc.dto;
+import java.util.List;
import java.util.Map;
import org.apache.commons.lang.builder.ToStringBuilder;
+import org.lamsfoundation.lams.tool.mc.model.McQueContent;
import org.lamsfoundation.lams.tool.mc.model.McUsrAttempt;
/**
@@ -82,7 +84,7 @@
protected Map mapGeneralOptionsContent;
- protected Map mapQuestionsContent;
+ protected List questions;
protected String toolSessionId;
@@ -422,18 +424,18 @@
}
/**
- * @return Returns the mapQuestionsContent.
+ * @return Returns the questions.
*/
- public Map getMapQuestionsContent() {
- return mapQuestionsContent;
+ public List getQuestions() {
+ return questions;
}
/**
- * @param mapQuestionsContent
- * The mapQuestionsContent to set.
+ * @param questions
+ * The questions to set.
*/
- public void setMapQuestionsContent(Map mapQuestionsContent) {
- this.mapQuestionsContent = mapQuestionsContent;
+ public void setQuestions(List questions) {
+ this.questions = questions;
}
/**
@@ -529,7 +531,7 @@
/**
* If using for a display screen then showMarks controls whether or not to show the average and top marks for the
* session. If using for the "get answers" screens, then this controls whether or not to show the marks for each
- * question - this allows us to NOT show the marks if ALL of the questions have a mark of 1.
+ * questionDescription - this allows us to NOT show the marks if ALL of the questions have a mark of 1.
*
* @return Returns the showMarks.
*/
Index: lams_tool_lamc/src/java/org/lamsfoundation/lams/tool/mc/dto/McQuestionDTO.java
===================================================================
diff -u -rf24a82ae2ef1cbaa92dfd356226f6c3edcd5e404 -r9ca39edffd0c57ba7deeb38316f5a0f7b0d8fe44
--- lams_tool_lamc/src/java/org/lamsfoundation/lams/tool/mc/dto/McQuestionDTO.java (.../McQuestionDTO.java) (revision f24a82ae2ef1cbaa92dfd356226f6c3edcd5e404)
+++ lams_tool_lamc/src/java/org/lamsfoundation/lams/tool/mc/dto/McQuestionDTO.java (.../McQuestionDTO.java) (revision 9ca39edffd0c57ba7deeb38316f5a0f7b0d8fe44)
@@ -36,7 +36,8 @@
private Long uid;
private Long qbQuestionUid;
private int qbQuestionModified = IQbService.QUESTION_MODIFIED_NONE;
- private String question;
+ private String name;
+ private String description;
private Integer displayOrder;
private String feedback;
private String mark;
@@ -113,23 +114,38 @@
public void setFeedback(String feedback) {
this.feedback = feedback;
}
+
+ /**
+ * @return Returns the name.
+ */
+ public String getName() {
+ return name;
+ }
/**
- * @return Returns the question.
+ * @param name
+ * The name to set.
*/
- public String getQuestion() {
- return question;
+ public void setName(String name) {
+ this.name = name;
}
/**
- * @param question
- * The question to set.
+ * @return Returns the description.
*/
- public void setQuestion(String question) {
- this.question = question;
+ public String getDescription() {
+ return description;
}
/**
+ * @param description
+ * The description to set.
+ */
+ public void setDescription(String description) {
+ this.description = description;
+ }
+
+ /**
* @return Returns the mark.
*/
public String getMark() {
Index: lams_tool_lamc/src/java/org/lamsfoundation/lams/tool/mc/model/McQueContent.java
===================================================================
diff -u -r9c3a64b840753192b333afb73c8fe7bdb54be638 -r9ca39edffd0c57ba7deeb38316f5a0f7b0d8fe44
--- lams_tool_lamc/src/java/org/lamsfoundation/lams/tool/mc/model/McQueContent.java (.../McQueContent.java) (revision 9c3a64b840753192b333afb73c8fe7bdb54be638)
+++ lams_tool_lamc/src/java/org/lamsfoundation/lams/tool/mc/model/McQueContent.java (.../McQueContent.java) (revision 9ca39edffd0c57ba7deeb38316f5a0f7b0d8fe44)
@@ -40,7 +40,7 @@
/**
*
- * Persistent object/bean that defines the question content for the MCQ tool. Provides accessors and mutators to get/set
+ * Persistent object/bean that defines the questionDescription content for the MCQ tool. Provides accessors and mutators to get/set
* attributes It maps to database table: tl_lamc11_que_content
*
*
@@ -54,7 +54,7 @@
private static final long serialVersionUID = 4022287106119453962L;
/**
- * It stores sha1(question) value that allows us to search for the McQueContentc with the same question
+ * It stores sha1(questionDescription) value that allows us to search for the McQueContentc with the same questionDescription
*/
@Column(name = "question_hash")
private String questionHash;
@@ -65,7 +65,7 @@
//DTO fields
@Transient
- private String escapedQuestion;
+ private String escapedDescription;
public McQueContent(QbQuestion qbQuestion, String questionHash, Integer displayOrder, McContent mcContent) {
this.qbQuestion = qbQuestion;
@@ -82,26 +82,34 @@
*
* Copy constructor
*
- * @param queContent
- * the original qa question content
- * @return the new qa question content object
+ * @param questionDescription
+ * the original qa questionDescription content
+ * @return the new qa questionDescription content object
*/
- public static McQueContent newInstance(McQueContent queContent, McContent newMcContent) {
- McQueContent newQueContent = new McQueContent(queContent.getQbQuestion(), queContent.getQuestionHash(),
- queContent.getDisplayOrder(), newMcContent);
+ public static McQueContent newInstance(McQueContent question, McContent newMcContent) {
+ McQueContent newQueContent = new McQueContent(question.getQbQuestion(), question.getQuestionHash(),
+ question.getDisplayOrder(), newMcContent);
return newQueContent;
}
-
- public String getQuestion() {
+
+ public String getName() {
return this.qbQuestion.getName();
}
- public void setQuestion(String question) {
- this.qbQuestion.setName(question);
+ public void setName(String name) {
+ this.qbQuestion.setName(name);
}
+ public String getDescription() {
+ return this.qbQuestion.getDescription();
+ }
+
+ public void setDescription(String description) {
+ this.qbQuestion.setDescription(description);
+ }
+
/**
- * Returns sha1(question) value that allows us to search for the McQueContent with the same question
+ * Returns sha1(questionDescription) value that allows us to search for the McQueContent with the same questionDescription
*/
public String getQuestionHash() {
return questionHash;
@@ -111,7 +119,7 @@
this.questionHash = questionHash;
}
- public org.lamsfoundation.lams.tool.mc.model.McContent getMcContent() {
+ public McContent getMcContent() {
return this.mcContent;
}
@@ -179,11 +187,11 @@
qbQuestion.setMaxMark(mark);
}
- public String getEscapedQuestion() {
- return this.escapedQuestion;
+ public String getEscapedDescription() {
+ return this.escapedDescription;
}
- public void setEscapedQuestion(String escapedQuestion) {
- this.escapedQuestion = escapedQuestion;
+ public void setEscapedDescription(String escapedDescription) {
+ this.escapedDescription = escapedDescription;
}
}
Index: lams_tool_lamc/src/java/org/lamsfoundation/lams/tool/mc/service/IMcService.java
===================================================================
diff -u -rf24a82ae2ef1cbaa92dfd356226f6c3edcd5e404 -r9ca39edffd0c57ba7deeb38316f5a0f7b0d8fe44
--- lams_tool_lamc/src/java/org/lamsfoundation/lams/tool/mc/service/IMcService.java (.../IMcService.java) (revision f24a82ae2ef1cbaa92dfd356226f6c3edcd5e404)
+++ lams_tool_lamc/src/java/org/lamsfoundation/lams/tool/mc/service/IMcService.java (.../IMcService.java) (revision 9ca39edffd0c57ba7deeb38316f5a0f7b0d8fe44)
@@ -108,8 +108,6 @@
void releaseQuestionsFromCache(McContent content);
- List refreshQuestionContent(final Long mcContentId) throws McApplicationException;
-
List getAllQuestionsSorted(final long mcContentId);
McQueContent getQuestionByUid(Long uid);
@@ -180,7 +178,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
+ * for a particular activity such as the answer to the third questionDescription contains the word Koala and hence the need for
* the toolContentId
*
* @return SortedMap of ToolOutputDefinitions with the key being the name of each definition
@@ -268,7 +266,7 @@
List getSessionDtos(Long contentId, boolean includeStatistics);
/**
- * Checks if data in DTO is the same as in the corresponding QB question and options in DB.
+ * Checks if data in DTO is the same as in the corresponding QB questionDescription and options in DB.
* Returns one of statuses from IQbService.QUESTION_MODIFIED_*
*/
int isQbQuestionModified(McQuestionDTO questionDTO);
Index: lams_tool_lamc/src/java/org/lamsfoundation/lams/tool/mc/service/MCOutputFactory.java
===================================================================
diff -u -rc87bb47eb670934f10192c08922f83367bc36230 -r9ca39edffd0c57ba7deeb38316f5a0f7b0d8fe44
--- lams_tool_lamc/src/java/org/lamsfoundation/lams/tool/mc/service/MCOutputFactory.java (.../MCOutputFactory.java) (revision c87bb47eb670934f10192c08922f83367bc36230)
+++ lams_tool_lamc/src/java/org/lamsfoundation/lams/tool/mc/service/MCOutputFactory.java (.../MCOutputFactory.java) (revision 9ca39edffd0c57ba7deeb38316f5a0f7b0d8fe44)
@@ -182,8 +182,8 @@
getI18NText(McAppConstants.OUTPUT_NAME_LEARNER_ALL_CORRECT, true), allCorrect);
}
- // written to cope with more than one correct option for each question but only tested with
- // one correct option for a question.
+ // written to cope with more than one correct option for each questionDescription but only tested with
+ // one correct option for a questionDescription.
private boolean allQuestionsCorrect(IMcService mcService, McQueUsr user) {
// Build a list of all the correct answers. If we hit any options that are not a correct option
Index: lams_tool_lamc/src/java/org/lamsfoundation/lams/tool/mc/service/McService.java
===================================================================
diff -u -r9c3a64b840753192b333afb73c8fe7bdb54be638 -r9ca39edffd0c57ba7deeb38316f5a0f7b0d8fe44
--- lams_tool_lamc/src/java/org/lamsfoundation/lams/tool/mc/service/McService.java (.../McService.java) (revision 9c3a64b840753192b333afb73c8fe7bdb54be638)
+++ lams_tool_lamc/src/java/org/lamsfoundation/lams/tool/mc/service/McService.java (.../McService.java) (revision 9ca39edffd0c57ba7deeb38316f5a0f7b0d8fe44)
@@ -247,29 +247,27 @@
}
@Override
- public void saveOrUpdateMcQueContent(McQueContent mcQueContent) {
+ public void saveOrUpdateMcQueContent(McQueContent question) {
//update questions' hash
- String newHash = mcQueContent.getQuestion() == null ? null : HashUtil.sha1(mcQueContent.getQuestion());
- mcQueContent.setQuestionHash(newHash);
+ String newHash = question.getDescription() == null ? null : HashUtil.sha1(question.getDescription());
+ question.setQuestionHash(newHash);
- mcQueContentDAO.insertOrUpdate(mcQueContent.getQbQuestion());
+ mcQueContentDAO.insertOrUpdate(question.getQbQuestion());
- for (QbOption option : mcQueContent.getQbQuestion().getQbOptions()) {
+ for (QbOption option : question.getQbQuestion().getQbOptions()) {
mcQueContentDAO.insertOrUpdate(option);
}
- mcQueContentDAO.saveOrUpdateMcQueContent(mcQueContent);
+ mcQueContentDAO.saveOrUpdateMcQueContent(question);
}
@Override
public McContent createQuestions(List questionDTOs, McContent content) {
int displayOrder = 0;
for (McQuestionDTO questionDTO : questionDTOs) {
- String currentQuestionText = questionDTO.getQuestion();
-
// skip empty questions
- if (currentQuestionText.isEmpty()) {
+ if (questionDTO.getName().isEmpty()) {
continue;
}
@@ -283,7 +281,7 @@
McQueContent question = getQuestionByUid(questionDTO.getUid());
- // get the QB question from DB
+ // get the QB questionDescription from DB
QbQuestion qbQuestion = questionDTO.getQbQuestionUid() == null ? null
: (QbQuestion) mcQueContentDAO.find(QbQuestion.class, questionDTO.getQbQuestionUid());
if (qbQuestion == null) {
@@ -296,7 +294,8 @@
QbQuestion qbQuestionClone = qbQuestion.clone();
// set clone's data to current values
- qbQuestionClone.setName(currentQuestionText);
+ qbQuestionClone.setName(questionDTO.getName());
+ qbQuestionClone.setDescription(questionDTO.getDescription());
qbQuestionClone.setMaxMark(Integer.valueOf(currentMark));
qbQuestionClone.setFeedback(currentFeedback);
@@ -307,37 +306,37 @@
releaseQbQuestionFromCache(qbQuestionClone);
break;
case IQbService.QUESTION_MODIFIED_UPDATE:
- // simply accept the modified clone as new version of the question
+ // simply accept the modified clone as new version of the questionDescription
// this option is not supported yet
qbQuestion = qbQuestionClone;
break;
case IQbService.QUESTION_MODIFIED_VERSION_BUMP:
- // new version of the old question gets created
+ // new version of the old questionDescription gets created
qbQuestion = qbQuestionClone;
qbQuestion.setVersion(qbService.getMaxQuestionVersion(qbQuestion.getQuestionId()));
qbQuestion.setCreateDate(new Date());
break;
case IQbService.QUESTION_MODIFIED_ID_BUMP:
- // new question gets created
+ // new questionDescription gets created
qbQuestion = qbQuestionClone;
qbQuestion.setVersion(1);
qbQuestion.setQuestionId(qbService.getMaxQuestionId());
qbQuestion.setCreateDate(new Date());
break;
}
- // in case question doesn't exist
+ // in case questionDescription doesn't exist
if (question == null) {
question = new McQueContent(qbQuestion, null, new Integer(displayOrder), content);
- // adding a new question to content
+ // adding a new questionDescription to content
content.getMcQueContents().add(question);
question.setMcContent(content);
- // in case question exists already
+ // in case questionDescription exists already
} else {
question.setDisplayOrder(new Integer(displayOrder));
- // this is needed, if we took the clone as the new question
+ // this is needed, if we took the clone as the new questionDescription
question.setQbQuestion(qbQuestion);
}
@@ -391,13 +390,13 @@
// make removed options orphaned, so they will be removed from DB
qbQuestion.getQbOptions().removeAll(qbOptionsToRemove);
qbOptionsToRemove.clear();
- // if clone is the real question, clear its IDs so it is saved as a new question or version
+ // if clone is the real questionDescription, clear its IDs so it is saved as a new questionDescription or version
// it needs to happen only now as above we used option UID matching
if (questionDTO.getQbQuestionModified() > IQbService.QUESTION_MODIFIED_UPDATE) {
qbQuestion.clearID();
}
- // updating the existing question content
+ // updating the existing questionDescription content
saveOrUpdateMcQueContent(question);
}
@@ -495,7 +494,7 @@
McQueContent question = this.getQuestionByUid(questionUid);
if (question == null) {
throw new McApplicationException(
- "Can't find question with specified question uid: " + answerDto.getQuestionUid());
+ "Can't find questionDescription with specified questionDescription uid: " + answerDto.getQuestionUid());
}
QbOption answerOption = answerDto.getAnswerOption();
@@ -549,27 +548,26 @@
for (McQueContent question : questions) {
AnswerDTO answerDto = new AnswerDTO();
- List optionList = question.getQbQuestion().getQbOptions();
+ List qbOptions = question.getQbQuestion().getQbOptions();
List mcOptsContentList = new ArrayList<>();
boolean randomize = mcContent.isRandomize();
if (randomize) {
- ArrayList shuffledList = new ArrayList<>(optionList);
+ ArrayList shuffledList = new ArrayList<>(qbOptions);
Collections.shuffle(shuffledList);
- optionList = new LinkedList<>(shuffledList);
+ qbOptions = new LinkedList<>(shuffledList);
}
- for (QbOption option : optionList) {
- McOptsContent mcOptsContent = new McOptsContent();
- mcOptsContent.setQbOption(option);
- mcOptsContentList.add(mcOptsContent);
+ for (QbOption qbOption : qbOptions) {
+ McOptsContent option = new McOptsContent();
+ option.setQbOption(qbOption);
+ mcOptsContentList.add(option);
}
- answerDto.setQuestion(question.getQuestion());
+ answerDto.setQuestionName(question.getName());
+ answerDto.setQuestionDescription(question.getDescription());
answerDto.setDisplayOrder(String.valueOf(question.getDisplayOrder()));
answerDto.setQuestionUid(question.getUid());
-
answerDto.setMark(question.getMark());
-
answerDto.setOptions(mcOptsContentList);
answerDtos.add(answerDto);
@@ -633,15 +631,15 @@
if (isFullAttemptDetailsRequired) {
- // The marks for the user must be listed in the display order of the question.
+ // The marks for the user must be listed in the display order of the questionDescription.
// Other parts of the code assume that the questions will be in consecutive display
// order starting 1 (e.g. 1, 2, 3, not 1, 3, 4) so we set up an array and use
// the ( display order - 1) as the index (arrays start at 0, rather than 1 hence -1)
// The user must answer all questions, so we can assume that they will have marks
// for all questions or no questions.
- // At present there can only be one answer for each question but there may be more
+ // At present there can only be one answer for each questionDescription but there may be more
// than one in the future and if so, we don't want to count the mark twice hence
- // we need to check if we've already processed this question in the total.
+ // we need to check if we've already processed this questionDescription in the total.
Integer[] userMarks = new Integer[numQuestions];
String[] answeredOptions = new String[numQuestions];
Date attemptTime = null;
@@ -721,23 +719,12 @@
}
@Override
- public List refreshQuestionContent(final Long mcContentId) throws McApplicationException {
- try {
- return mcQueContentDAO.refreshQuestionContent(mcContentId);
- } catch (DataAccessException e) {
- throw new McApplicationException(
- "Exception occured when lams is refreshing mc question content: " + e.getMessage(), e);
- }
-
- }
-
- @Override
public void removeMcQueContent(McQueContent mcQueContent) throws McApplicationException {
try {
mcQueContentDAO.removeMcQueContent(mcQueContent);
} catch (DataAccessException e) {
throw new McApplicationException(
- "Exception occured when lams is removing mc question content: " + e.getMessage(), e);
+ "Exception occured when lams is removing mc questionDescription content: " + e.getMessage(), e);
}
}
@@ -871,17 +858,22 @@
// create list of modified questions
List modifiedQuestions = new ArrayList<>();
- // create list of modified question marks
+ // create list of modified questionDescription marks
List modifiedQuestionsMarksOnly = new ArrayList<>();
for (McQueContent oldQuestion : oldQuestions) {
for (McQuestionDTO questionDTO : questionDTOs) {
if (oldQuestion.getUid().equals(questionDTO.getUid())) {
boolean isQuestionModified = false;
boolean isQuestionMarkModified = false;
+
+ // question name is different
+ if (!oldQuestion.getName().equals(questionDTO.getName())) {
+ isQuestionModified = true;
+ }
- // question is different
- if (!oldQuestion.getQuestion().equals(questionDTO.getQuestion())) {
+ // question description is different
+ if (!oldQuestion.getDescription().equals(questionDTO.getDescription())) {
isQuestionModified = true;
}
@@ -935,7 +927,7 @@
boolean isRemoveQuestionResult = false;
- // [+] if the question mark is modified
+ // [+] if the questionDescription mark is modified
for (McQuestionDTO modifiedQuestion : modifiedQuestionsMarksOnly) {
if (question.getUid().equals(modifiedQuestion.getUid())) {
Integer newQuestionMark = new Integer(modifiedQuestion.getMark());
@@ -944,7 +936,7 @@
newTotalMark += newActualMark - userAttempt.getMark();
- // update question answer's mark
+ // update questionDescription answer's mark
userAttempt.setMark(newActualMark);
mcUsrAttemptDAO.saveMcUsrAttempt(userAttempt);
@@ -953,15 +945,15 @@
}
- // [+] if the question is modified
+ // [+] if the questionDescription is modified
for (McQuestionDTO modifiedQuestion : modifiedQuestions) {
if (question.getUid().equals(modifiedQuestion.getUid())) {
isRemoveQuestionResult = true;
break;
}
}
- // [+] if the question was removed
+ // [+] if the questionDescription was removed
for (McQuestionDTO deletedQuestion : deletedQuestions) {
if (question.getUid().equals(deletedQuestion.getUid())) {
isRemoveQuestionResult = true;
@@ -980,7 +972,7 @@
mcUsrAttemptDAO.removeAttempt(userAttempt);
}
- // [+] doing nothing if the new question was added
+ // [+] doing nothing if the new questionDescription was added
}
@@ -1025,7 +1017,7 @@
whiteFont.setFontName(ExcelUtil.DEFAULT_FONT_NAME);
greenColor.setFont(whiteFont);
- // ======================================================= Report by question IRA page
+ // ======================================================= Report by questionDescription IRA page
// =======================================
HSSFSheet sheet = wb.createSheet(messageService.getMessage("label.report.by.question"));
@@ -1620,15 +1612,15 @@
: ((Number) userAttemptAndPortraitIter[1]).longValue();
Long userId = userAttempt.getMcQueUsr().getQueUsrId();
- //fill in question's and user answer's hashes
+ //fill in questionDescription's and user answer's hashes
McQueContent question = userAttempt.getMcQueContent();
String answer = userAttempt.getQbOption().getName();
ConfidenceLevelDTO confidenceLevelDto = new ConfidenceLevelDTO();
confidenceLevelDto.setUserId(userId.intValue());
confidenceLevelDto.setPortraitUuid(portraitUuid);
confidenceLevelDto.setLevel(userAttempt.getConfidenceLevel());
- confidenceLevelDto.setQuestion(question.getQuestion());
+ confidenceLevelDto.setQuestion(question.getDescription());
confidenceLevelDto.setAnswer(answer);
confidenceLevelDtos.add(confidenceLevelDto);
@@ -2046,10 +2038,10 @@
@Override
public int isQbQuestionModified(McQuestionDTO questionDTO) {
- String currentQuestionText = questionDTO.getQuestion();
+ String name = questionDTO.getName();
// skip empty questions
- if (currentQuestionText.isEmpty()) {
+ if (name.isEmpty()) {
return IQbService.QUESTION_MODIFIED_NONE;
}
QbQuestion baseLine = questionDTO.getQbQuestionUid() == null ? null
@@ -2063,17 +2055,17 @@
QbQuestion modifiedQuestion = baseLine.clone();
releaseQbQuestionFromCache(modifiedQuestion);
- String currentFeedback = questionDTO.getFeedback();
String currentMark = questionDTO.getMark();
/* set the default mark in case it is not provided */
if (currentMark == null) {
currentMark = "1";
}
// set clone's data to current values
- modifiedQuestion.setName(currentQuestionText);
+ modifiedQuestion.setName(name);
+ modifiedQuestion.setDescription(questionDTO.getDescription());
modifiedQuestion.setMaxMark(Integer.valueOf(currentMark));
- modifiedQuestion.setFeedback(currentFeedback);
+ modifiedQuestion.setFeedback(questionDTO.getFeedback());
List optionDTOs = questionDTO.getOptionDtos();
boolean isModified = baseLine.isModified(modifiedQuestion)
Index: lams_tool_lamc/src/java/org/lamsfoundation/lams/tool/mc/util/AuthoringUtil.java
===================================================================
diff -u -r3ec7cbf6d6a62b79ba7e4334d770721f8867e999 -r9ca39edffd0c57ba7deeb38316f5a0f7b0d8fe44
--- lams_tool_lamc/src/java/org/lamsfoundation/lams/tool/mc/util/AuthoringUtil.java (.../AuthoringUtil.java) (revision 3ec7cbf6d6a62b79ba7e4334d770721f8867e999)
+++ lams_tool_lamc/src/java/org/lamsfoundation/lams/tool/mc/util/AuthoringUtil.java (.../AuthoringUtil.java) (revision 9ca39edffd0c57ba7deeb38316f5a0f7b0d8fe44)
@@ -228,7 +228,8 @@
McQuestionDTO questionDto = new McQuestionDTO();
questionDto.setUid(question.getUid());
questionDto.setQbQuestionUid(question.getQbQuestion().getUid());
- questionDto.setQuestion(question.getQuestion());
+ questionDto.setName(question.getName());
+ questionDto.setDescription(question.getDescription());
questionDto.setDisplayOrder(question.getDisplayOrder());
String feedback = question.getFeedback() == null ? "" : question.getFeedback();
questionDto.setFeedback(feedback);
Index: lams_tool_lamc/src/java/org/lamsfoundation/lams/tool/mc/util/LearningUtil.java
===================================================================
diff -u -r650202864c49257c570cd5c4d496ca3789db7846 -r9ca39edffd0c57ba7deeb38316f5a0f7b0d8fe44
--- lams_tool_lamc/src/java/org/lamsfoundation/lams/tool/mc/util/LearningUtil.java (.../LearningUtil.java) (revision 650202864c49257c570cd5c4d496ca3789db7846)
+++ lams_tool_lamc/src/java/org/lamsfoundation/lams/tool/mc/util/LearningUtil.java (.../LearningUtil.java) (revision 9ca39edffd0c57ba7deeb38316f5a0f7b0d8fe44)
@@ -70,7 +70,7 @@
}
/**
- * Should we show the marks for each question - we show the marks if any of the questions have a mark > 1.
+ * Should we show the marks for each questionDescription - we show the marks if any of the questions have a mark > 1.
*/
public static Boolean isShowMarksOnQuestion(List listQuestionAndCandidateAnswersDTO) {
Iterator iter = listQuestionAndCandidateAnswersDTO.iterator();
Index: lams_tool_lamc/src/java/org/lamsfoundation/lams/tool/mc/web/controller/McController.java
===================================================================
diff -u -r9c3a64b840753192b333afb73c8fe7bdb54be638 -r9ca39edffd0c57ba7deeb38316f5a0f7b0d8fe44
--- lams_tool_lamc/src/java/org/lamsfoundation/lams/tool/mc/web/controller/McController.java (.../McController.java) (revision 9c3a64b840753192b333afb73c8fe7bdb54be638)
+++ lams_tool_lamc/src/java/org/lamsfoundation/lams/tool/mc/web/controller/McController.java (.../McController.java) (revision 9ca39edffd0c57ba7deeb38316f5a0f7b0d8fe44)
@@ -226,7 +226,7 @@
}
/**
- * opens up an new screen within the current page for editing a question
+ * opens up an new screen within the current page for editing a questionDescription
*/
@RequestMapping("/editQuestionBox")
public String editQuestionBox(@ModelAttribute McAuthoringForm mcAuthoringForm, HttpServletRequest request) {
@@ -240,7 +240,7 @@
Integer questionIndex = WebUtil.readIntParam(request, "questionIndex", true);
McQuestionDTO questionDto = null;
- //editing existing question
+ //editing existing questionDescription
if (questionIndex != null) {
mcAuthoringForm.setQuestionIndex(questionIndex);
@@ -254,9 +254,9 @@
}
}
- //adding new question
+ //adding new questionDescription
} else {
- // prepare question for adding new question page
+ // prepare questionDescription for adding new questionDescription page
questionDto = new McQuestionDTO();
List newOptions = new ArrayList<>();
McOptionDTO newOption1 = new McOptionDTO();
@@ -272,8 +272,9 @@
}
/**
- * removes a question from the questions map
+ * removes a questionDescription from the questions map
*/
+ @SuppressWarnings("unchecked")
@RequestMapping("/removeQuestion")
public String removeQuestion(@ModelAttribute McAuthoringForm mcAuthoringForm, HttpServletRequest request) {
@@ -285,38 +286,38 @@
Integer questionIndexToDelete = WebUtil.readIntParam(request, "questionIndex");
mcAuthoringForm.setQuestionIndex(questionIndexToDelete);
- List questionDTOs = (List) sessionMap.get(McAppConstants.QUESTION_DTOS);
+ List questionDtos = (List) sessionMap.get(McAppConstants.QUESTION_DTOS);
//exclude Question with questionIndex From List
List tempQuestionDtos = new LinkedList<>();
int queIndex = 0;
- for (McQuestionDTO questionDTO : questionDTOs) {
+ for (McQuestionDTO questionDto : questionDtos) {
- String questionText = questionDTO.getQuestion();
- Integer displayOrder = questionDTO.getDisplayOrder();
- if ((questionText != null) && !questionText.isEmpty()) {
+ String name = questionDto.getName();
+ Integer displayOrder = questionDto.getDisplayOrder();
+ if ((name != null) && !name.isEmpty()) {
if (!displayOrder.equals(questionIndexToDelete)) {
++queIndex;
- questionDTO.setDisplayOrder(queIndex);
- tempQuestionDtos.add(questionDTO);
+ questionDto.setDisplayOrder(queIndex);
+ tempQuestionDtos.add(questionDto);
} else {
List deletedQuestionDTOs = (List) sessionMap
.get(McAppConstants.LIST_DELETED_QUESTION_DTOS);
- deletedQuestionDTOs.add(questionDTO);
+ deletedQuestionDTOs.add(questionDto);
sessionMap.put(McAppConstants.LIST_DELETED_QUESTION_DTOS, deletedQuestionDTOs);
}
}
}
- questionDTOs = tempQuestionDtos;
- sessionMap.put(McAppConstants.QUESTION_DTOS, questionDTOs);
+ questionDtos = tempQuestionDtos;
+ sessionMap.put(McAppConstants.QUESTION_DTOS, questionDtos);
return "authoring/itemlist";
}
/**
- * moves a question down in the list
+ * moves a questionDescription down in the list
*/
@RequestMapping("/moveQuestionDown")
public String moveQuestionDown(@ModelAttribute McAuthoringForm mcAuthoringForm, HttpServletRequest request) {
@@ -408,15 +409,17 @@
while (iter.hasNext()) {
McQuestionDTO questionDto = iter.next();
- String question = questionDto.getQuestion();
+ String name = questionDto.getName();
+ String description = questionDto.getDescription();
String feedback = questionDto.getFeedback();
String mark = questionDto.getMark();
List optionDtos = questionDto.getOptionDtos();
- if ((question != null) && (!question.equals(""))) {
+ if ((name != null) && (!name.equals(""))) {
++queIndex;
- questionDto.setQuestion(question);
+ questionDto.setName(name);
+ questionDto.setDescription(description);
questionDto.setDisplayOrder(queIndex);
questionDto.setFeedback(feedback);
questionDto.setOptionDtos(optionDtos);
@@ -429,7 +432,7 @@
}
/**
- * Adds QbQuestion, selected in the question bank, to the current question list.
+ * Adds QbQuestion, selected in the questionDescription bank, to the current questionDescription list.
*/
@SuppressWarnings("unchecked")
@RequestMapping(value = "/importQbQuestion", method = RequestMethod.POST)
@@ -438,7 +441,7 @@
SessionMap sessionMap = (SessionMap) request.getSession()
.getAttribute(sessionMapId);
request.setAttribute(McAppConstants.ATTR_SESSION_MAP_ID, sessionMapId);
- List questionDtos = (List) sessionMap.get(McAppConstants.QUESTION_DTOS);
+ List questionDtos = (List) sessionMap.get(McAppConstants.QUESTION_DTOS);
//get QbQuestion from DB
Long qbQuestionUid = WebUtil.readLongParam(request, "qbQuestionUid");
@@ -462,7 +465,8 @@
//create new McQuestionDTO and assign imported qbQuestion to it
McQuestionDTO questionDto = new McQuestionDTO();
- questionDto.setQuestion(qbQuestion.getName());
+ questionDto.setName(qbQuestion.getName());
+ questionDto.setDescription(qbQuestion.getDescription());
questionDto.setQbQuestionUid(qbQuestionUid);
questionDto.setFeedback(qbQuestion.getFeedback());
questionDto.setDisplayOrder(maxDisplayOrder + 1);
@@ -474,6 +478,7 @@
return "authoring/itemlist";
}
+ @SuppressWarnings("unchecked")
@RequestMapping("/saveQuestion")
public String saveQuestion(@ModelAttribute McAuthoringForm mcAuthoringForm, HttpServletRequest request) {
@@ -498,38 +503,40 @@
List questionDTOs = (List) sessionMap.get(McAppConstants.QUESTION_DTOS);
- String newQuestion = request.getParameter("newQuestion");
+ String name = request.getParameter("name");
+ String description = request.getParameter("description");
String feedback = request.getParameter("feedback");
Integer questionIndex = WebUtil.readIntParam(request, "questionIndex", true);
Long qbQuestionUid = WebUtil.readLongParam(request, "qbQuestionUid", true);
mcAuthoringForm.setQuestionIndex(questionIndex);
- if ((newQuestion != null) && (newQuestion.length() > 0)) {
- // adding new question
+ if ((name != null) && (name.length() > 0)) {
+ // adding new questionDescription
if (questionIndex == null) {
//finding max displayOrder
int maxDisplayOrder = 0;
for (McQuestionDTO questionDTO : questionDTOs) {
- int displayOrder = new Integer(questionDTO.getDisplayOrder());
+ int displayOrder = questionDTO.getDisplayOrder();
if (displayOrder > maxDisplayOrder) {
maxDisplayOrder = displayOrder;
}
}
- McQuestionDTO questionDTO = new McQuestionDTO();
- questionDTO.setQuestion(newQuestion);
- questionDTO.setQbQuestionUid(qbQuestionUid);
- questionDTO.setFeedback(feedback);
- questionDTO.setDisplayOrder(maxDisplayOrder + 1);
- questionDTO.setOptionDtos(options);
- questionDTO.setMark(mark);
- questionDTO.setQbQuestionModified(IQbService.QUESTION_MODIFIED_ID_BUMP);
- request.setAttribute("qbQuestionModified", questionDTO.getQbQuestionModified());
+ McQuestionDTO questionDto = new McQuestionDTO();
+ questionDto.setName(name);
+ questionDto.setDescription(description);
+ questionDto.setQbQuestionUid(qbQuestionUid);
+ questionDto.setFeedback(feedback);
+ questionDto.setDisplayOrder(maxDisplayOrder + 1);
+ questionDto.setOptionDtos(options);
+ questionDto.setMark(mark);
+ questionDto.setQbQuestionModified(IQbService.QUESTION_MODIFIED_ID_BUMP);
+ request.setAttribute("qbQuestionModified", questionDto.getQbQuestionModified());
- questionDTOs.add(questionDTO);
+ questionDTOs.add(questionDto);
- // updating existing question
+ // updating existing questionDescription
} else {
McQuestionDTO questionDto = null;
for (McQuestionDTO questionDtoIter : questionDTOs) {
@@ -541,13 +548,13 @@
}
}
- questionDto.setQuestion(newQuestion);
+ questionDto.setName(name);
+ questionDto.setDescription(description);
questionDto.setQbQuestionUid(qbQuestionUid);
questionDto.setFeedback(feedback);
questionDto.setDisplayOrder(questionIndex);
questionDto.setOptionDtos(options);
questionDto.setMark(mark);
-
questionDto.setQbQuestionModified(mcService.isQbQuestionModified(questionDto));
request.setAttribute("qbQuestionModified", questionDto.getQbQuestionModified());
}
@@ -562,10 +569,10 @@
}
/**
- * Parses questions extracted from IMS QTI file and adds them to currently edited question.
+ * Parses questions extracted from IMS QTI file and adds them to currently edited questionDescription.
*/
@RequestMapping("/saveQTI")
- @SuppressWarnings({ "unchecked", "rawtypes" })
+ @SuppressWarnings("unchecked")
public String saveQTI(HttpServletRequest request) throws IOException, ServletException {
// big part of code was taken from addSingleQuestion() and saveQuestion() methods
@@ -580,16 +587,13 @@
Question[] questions = QuestionParser.parseQuestionChoiceForm(request);
for (Question question : questions) {
- // quietly do same verification as in other question-adding methods
- String questionText = question.getText();
- if (StringUtils.isBlank(questionText)) {
- logger.warn("Skipping a blank question.");
+ // quietly do same verification as in other questionDescription-adding methods
+ String questionTitle = question.getTitle();
+ if (StringUtils.isBlank(questionTitle)) {
+ logger.warn("Skipping a blank question title.");
continue;
}
- questionText = QuestionParser.processHTMLField(questionText, false, contentFolderID,
- question.getResourcesFolderPath());
-
List optionDtos = new ArrayList<>();
String correctAnswer = null;
Integer correctAnswerScore = 1;
@@ -618,7 +622,7 @@
// marks are integer numbers
correctAnswerScore = Math.min(new Double(Math.ceil(answer.getScore())).intValue(), 10);
} else {
- // there can be only one correct answer in a MCQ question
+ // there can be only one correct answer in a MCQ questionDescription
logger.warn(
"Choosing only first correct answer, despite another one was found: " + answerText);
optionDto.setCorrect("Incorrect");
@@ -632,21 +636,23 @@
}
if (correctAnswer == null) {
- logger.warn("No correct answer found for question: " + questionText);
+ logger.warn("No correct answer found for question title: " + questionTitle);
continue;
}
McQuestionDTO questionDto = new McQuestionDTO();
questionDto.setDisplayOrder(questionDtos.size() + 1);
- questionDto.setQuestion(questionText);
+ questionDto.setName(question.getTitle());
+ questionDto.setDescription(QuestionParser.processHTMLField(question.getText(), false, contentFolderID,
+ question.getResourcesFolderPath()));
questionDto.setFeedback(QuestionParser.processHTMLField(question.getFeedback(), true, null, null));
questionDto.setOptionDtos(optionDtos);
questionDto.setMark(correctAnswerScore.toString());
questionDtos.add(questionDto);
if (logger.isDebugEnabled()) {
- logger.debug("Added question: " + questionText);
+ logger.debug("Added questionDescription: " + questionTitle);
}
}
@@ -672,8 +678,8 @@
Question question = new Question();
question.setType(Question.QUESTION_TYPE_MULTIPLE_CHOICE);
- question.setTitle("Question " + mcQuestion.getDisplayOrder());
- question.setText(mcQuestion.getQuestion());
+ question.setTitle(mcQuestion.getName());
+ question.setText(mcQuestion.getDescription());
question.setFeedback(mcQuestion.getFeedback());
List answers = new ArrayList<>();
@@ -687,7 +693,7 @@
question.setAnswers(answers);
}
- // put the question in the right place
+ // put the questionDescription in the right place
questions.add(mcQuestion.getDisplayOrder() - 1, question);
}
Index: lams_tool_lamc/src/java/org/lamsfoundation/lams/tool/mc/web/controller/McLearningController.java
===================================================================
diff -u -r6de3d240b76c900f96a93ab784838f2153fbe7c5 -r9ca39edffd0c57ba7deeb38316f5a0f7b0d8fe44
--- lams_tool_lamc/src/java/org/lamsfoundation/lams/tool/mc/web/controller/McLearningController.java (.../McLearningController.java) (revision 6de3d240b76c900f96a93ab784838f2153fbe7c5)
+++ lams_tool_lamc/src/java/org/lamsfoundation/lams/tool/mc/web/controller/McLearningController.java (.../McLearningController.java) (revision 9ca39edffd0c57ba7deeb38316f5a0f7b0d8fe44)
@@ -226,11 +226,11 @@
}
request.setAttribute(McAppConstants.MC_GENERAL_LEARNER_FLOW_DTO, mcGeneralLearnerFlowDTO);
- List learnerAnswersDTOList = mcService.getAnswersFromDatabase(mcContent, user);
- request.setAttribute(McAppConstants.LEARNER_ANSWERS_DTO_LIST, learnerAnswersDTOList);
- // should we show the marks for each question - we show the marks if any of the questions
+ List learnerAnswerDtos = mcService.getAnswersFromDatabase(mcContent, user);
+ request.setAttribute(McAppConstants.LEARNER_ANSWER_DTOS, learnerAnswerDtos);
+ // should we show the marks for each questionDescription - we show the marks if any of the questions
// have a mark > 1.
- Boolean showMarks = LearningUtil.isShowMarksOnQuestion(learnerAnswersDTOList);
+ Boolean showMarks = LearningUtil.isShowMarksOnQuestion(learnerAnswerDtos);
mcGeneralLearnerFlowDTO.setShowMarks(showMarks.toString());
/* find out if the content is being modified at the moment. */
@@ -339,7 +339,8 @@
int questionMark = question.getMark().intValue();
AnswerDTO answerDto = new AnswerDTO();
- answerDto.setQuestion(question.getQuestion());
+ answerDto.setQuestionName(question.getName());
+ answerDto.setQuestionDescription(question.getDescription());
answerDto.setDisplayOrder(String.valueOf(question.getDisplayOrder()));
answerDto.setQuestionUid(question.getUid());
answerDto.setFeedback(question.getFeedback() != null ? question.getFeedback() : "");
@@ -482,8 +483,8 @@
List answerDtos = buildAnswerDtos(answers, learnerConfidenceLevels, mcContent, request);
mcService.saveUserAttempt(user, answerDtos);
- List learnerAnswersDTOList = mcService.getAnswersFromDatabase(mcContent, user);
- request.setAttribute(McAppConstants.LEARNER_ANSWERS_DTO_LIST, learnerAnswersDTOList);
+ List learnerAnswerDtos = mcService.getAnswersFromDatabase(mcContent, user);
+ request.setAttribute(McAppConstants.LEARNER_ANSWER_DTOS, learnerAnswerDtos);
McGeneralLearnerFlowDTO mcGeneralLearnerFlowDTO = LearningUtil.buildMcGeneralLearnerFlowDTO(mcContent);
@@ -524,22 +525,20 @@
McGeneralLearnerFlowDTO mcGeneralLearnerFlowDTO = LearningUtil.buildMcGeneralLearnerFlowDTO(mcContent);
Map mapQuestionsUidContent = new TreeMap(new McComparator());
- if (mcContent != null) {
- List list = mcService.refreshQuestionContent(mcContent.getUid());
+ List questions = mcService.getQuestionsByContentUid(mcContent.getUid());
- Iterator listIterator = list.iterator();
- Long mapIndex = new Long(1);
- while (listIterator.hasNext()) {
- McQueContent mcQueContent = (McQueContent) listIterator.next();
- mapQuestionsUidContent.put(mapIndex.toString(), mcQueContent.getUid());
- mapIndex = new Long(mapIndex.longValue() + 1);
- }
+ Iterator listIterator = questions.iterator();
+ Long mapIndex = new Long(1);
+ while (listIterator.hasNext()) {
+ McQueContent mcQueContent = (McQueContent) listIterator.next();
+ mapQuestionsUidContent.put(mapIndex.toString(), mcQueContent.getUid());
+ mapIndex = new Long(mapIndex.longValue() + 1);
}
//builds a map to hold all the candidate answers for all the questions by accessing the db
Map mapStartupGeneralOptionsContent = new TreeMap(new McComparator());
Iterator itMap = mapQuestionsUidContent.entrySet().iterator();
- Long mapIndex = new Long(1);
+ mapIndex = new Long(1);
while (itMap.hasNext()) {
Map.Entry pairs = (Map.Entry) itMap.next();
String currentQuestionUid = pairs.getValue().toString();
@@ -561,31 +560,14 @@
mapIndex = new Long(mapIndex.longValue() + 1);
}
mcGeneralLearnerFlowDTO.setMapGeneralOptionsContent(mapStartupGeneralOptionsContent);
+ mcGeneralLearnerFlowDTO.setQuestions(questions);
- //builds a map to hold question texts
- Map mapQuestionsContent = new TreeMap(new McComparator());
- List list = mcService.refreshQuestionContent(mcContent.getUid());
- Iterator iter = list.iterator();
- Long mapIndex3 = new Long(1);
- while (iter.hasNext()) {
- McQueContent question = (McQueContent) iter.next();
- mapQuestionsContent.put(mapIndex3.toString(), question.getQuestion());
- mapIndex3 = new Long(mapIndex3.longValue() + 1);
- }
- mcGeneralLearnerFlowDTO.setMapQuestionsContent(mapQuestionsContent);
-
//rebuildFeedbackMapfromDB
Map mapFeedbackContent = new TreeMap(new McComparator());
- List list2 = mcService.refreshQuestionContent(mcContent.getUid());
- Iterator iter2 = list2.iterator();
- Long mapIndex4 = new Long(1);
- while (iter2.hasNext()) {
- McQueContent question = (McQueContent) iter2.next();
-
+ int i = 1;
+ for(McQueContent question : questions) {
String feedback = question.getFeedback();
-
- mapFeedbackContent.put(mapIndex4.toString(), feedback);
- mapIndex4 = new Long(mapIndex4.longValue() + 1);
+ mapFeedbackContent.put(String.valueOf(i++), feedback);
}
mcGeneralLearnerFlowDTO.setMapFeedbackContent(mapFeedbackContent);
@@ -595,7 +577,7 @@
//create attemptMap for displaying on jsp
Map attemptMap = new TreeMap(new McComparator());
- for (int i = 1; i <= mcContent.getMcQueContents().size(); i++) {
+ for (i = 1; i <= mcContent.getMcQueContents().size(); i++) {
McQueContent question = mcService.getQuestionByDisplayOrder(i, toolContentUID);
McUsrAttempt userAttempt = mcService.getUserAttemptByQuestion(user.getUid(), question.getUid());
@@ -665,8 +647,8 @@
List sequentialCheckedCa = new LinkedList<>();
sessionMap.put(McAppConstants.QUESTION_AND_CANDIDATE_ANSWERS_KEY, sequentialCheckedCa);
- List learnerAnswersDTOList = mcService.getAnswersFromDatabase(mcContent, mcQueUsr);
- request.setAttribute(McAppConstants.LEARNER_ANSWERS_DTO_LIST, learnerAnswersDTOList);
+ List learnerAnswerDtos = mcService.getAnswersFromDatabase(mcContent, mcQueUsr);
+ request.setAttribute(McAppConstants.LEARNER_ANSWER_DTOS, learnerAnswerDtos);
McGeneralLearnerFlowDTO mcGeneralLearnerFlowDTO = LearningUtil.buildMcGeneralLearnerFlowDTO(mcContent);
mcGeneralLearnerFlowDTO.setQuestionIndex(new Integer(1));
@@ -684,9 +666,9 @@
mcGeneralLearnerFlowDTO.setTotalMarksPossible(mcContent.getTotalMarksPossible());
- // should we show the marks for each question - we show the marks if any of the questions
+ // should we show the marks for each questionDescription - we show the marks if any of the questions
// have a mark > 1.
- Boolean showMarks = LearningUtil.isShowMarksOnQuestion(learnerAnswersDTOList);
+ Boolean showMarks = LearningUtil.isShowMarksOnQuestion(learnerAnswerDtos);
mcGeneralLearnerFlowDTO.setShowMarks(showMarks.toString());
request.setAttribute("sessionMapID", mcLearningForm.getHttpSessionID());
Index: lams_tool_lamc/src/java/org/lamsfoundation/lams/tool/mc/web/controller/McMonitoringController.java
===================================================================
diff -u -r650202864c49257c570cd5c4d496ca3789db7846 -r9ca39edffd0c57ba7deeb38316f5a0f7b0d8fe44
--- lams_tool_lamc/src/java/org/lamsfoundation/lams/tool/mc/web/controller/McMonitoringController.java (.../McMonitoringController.java) (revision 650202864c49257c570cd5c4d496ca3789db7846)
+++ lams_tool_lamc/src/java/org/lamsfoundation/lams/tool/mc/web/controller/McMonitoringController.java (.../McMonitoringController.java) (revision 9ca39edffd0c57ba7deeb38316f5a0f7b0d8fe44)
@@ -372,10 +372,10 @@
McQueContent question = userAttempt.getMcQueContent();
McOptsContent option = userAttempt.getMcOptionsContent();
- String questionText = question.getQuestion();
- if (questionText != null) {
- String escapedQuestion = StringEscapeUtils.escapeJavaScript(questionText);
- question.setEscapedQuestion(escapedQuestion);
+ String description = question.getDescription();
+ if (description != null) {
+ String escapedDescription = StringEscapeUtils.escapeJavaScript(description);
+ question.setEscapedDescription(escapedDescription);
}
String optionText = option.getQbOption().getName();
Index: lams_tool_lamc/src/java/org/lamsfoundation/lams/tool/mc/web/controller/McPedagogicalPlannerController.java
===================================================================
diff -u -rc87bb47eb670934f10192c08922f83367bc36230 -r9ca39edffd0c57ba7deeb38316f5a0f7b0d8fe44
--- lams_tool_lamc/src/java/org/lamsfoundation/lams/tool/mc/web/controller/McPedagogicalPlannerController.java (.../McPedagogicalPlannerController.java) (revision c87bb47eb670934f10192c08922f83367bc36230)
+++ lams_tool_lamc/src/java/org/lamsfoundation/lams/tool/mc/web/controller/McPedagogicalPlannerController.java (.../McPedagogicalPlannerController.java) (revision 9ca39edffd0c57ba7deeb38316f5a0f7b0d8fe44)
@@ -88,7 +88,7 @@
String question = null;
do {
- question = plannerForm.getQuestion(questionIndex - 1);
+ question = plannerForm.getDescription(questionIndex - 1);
List candidateAnswerDTOList = plannerForm.extractCandidateAnswers(request, questionIndex);
boolean removeQuestion = true;
if (!StringUtils.isEmpty(question)) {
@@ -107,7 +107,7 @@
if (questionIndex <= mcContent.getMcQueContents().size()) {
McQueContent mcQueContent = mcService.getQuestionByDisplayOrder(questionIndex,
mcContent.getUid());
- mcQueContent.setQuestion(question);
+ mcQueContent.setDescription(question);
int candidateAnswerDTOIndex = 0;
List candidateAnswers = mcQueContent.getQbQuestion().getQbOptions();
Iterator candidateAnswerIter = candidateAnswers.iterator();
@@ -127,10 +127,10 @@
} else {
McQueContent mcQueContent = new McQueContent();
mcQueContent.setQbQuestion(new QbQuestion());
- // TODO Set question ID and version
+ // TODO Set questionDescription ID and version
mcQueContent.setDisplayOrder(questionIndex);
mcQueContent.setMcContent(mcContent);
- mcQueContent.setQuestion(question);
+ mcQueContent.setDescription(question);
mcQueContent.setMark(McAppConstants.QUESTION_DEFAULT_MARK);
List candidateAnswers = mcQueContent.getQbQuestion().getQbOptions();
for (int candidateAnswerDTOIndex = 0; candidateAnswerDTOIndex < candidateAnswerDTOList
@@ -172,7 +172,7 @@
int count = NumberUtils.toInt(param[0]);
plannerForm.getCandidateAnswerCount().add(count);
}
- plannerForm.setQuestion(questionDisplayOrder - 1, "");
+ plannerForm.setDescription(questionDisplayOrder - 1, "");
plannerForm.getCandidateAnswerCount().add(McAppConstants.CANDIDATE_ANSWER_DEFAULT_COUNT);
plannerForm.setCorrect(questionDisplayOrder - 1, "1");
Index: lams_tool_lamc/src/java/org/lamsfoundation/lams/tool/mc/web/controller/TblMonitoringController.java
===================================================================
diff -u -rc87bb47eb670934f10192c08922f83367bc36230 -r9ca39edffd0c57ba7deeb38316f5a0f7b0d8fe44
--- lams_tool_lamc/src/java/org/lamsfoundation/lams/tool/mc/web/controller/TblMonitoringController.java (.../TblMonitoringController.java) (revision c87bb47eb670934f10192c08922f83367bc36230)
+++ lams_tool_lamc/src/java/org/lamsfoundation/lams/tool/mc/web/controller/TblMonitoringController.java (.../TblMonitoringController.java) (revision 9ca39edffd0c57ba7deeb38316f5a0f7b0d8fe44)
@@ -57,7 +57,7 @@
long toolContentId = WebUtil.readLongParam(request, AttributeNames.PARAM_TOOL_CONTENT_ID);
McContent mcContent = mcService.getMcContent(toolContentId);
- // ======================================================= Report by question IRA page
+ // ======================================================= Report by questionDescription IRA page
// =======================================
Set questions = mcContent.getMcQueContents();
@@ -91,7 +91,8 @@
McQuestionDTO questionDto = new McQuestionDTO();
questionDto.setUid(question.getUid());
- questionDto.setQuestion(question.getQuestion());
+ questionDto.setName(question.getName());
+ questionDto.setDescription(question.getDescription());
questionDto.setOptionDtos(optionDtos);
questionDtos.add(questionDto);
Index: lams_tool_lamc/src/java/org/lamsfoundation/lams/tool/mc/web/form/McPedagogicalPlannerForm.java
===================================================================
diff -u -rd03a1456d2d0ee7a482273fe35412c67054f133d -r9ca39edffd0c57ba7deeb38316f5a0f7b0d8fe44
--- lams_tool_lamc/src/java/org/lamsfoundation/lams/tool/mc/web/form/McPedagogicalPlannerForm.java (.../McPedagogicalPlannerForm.java) (revision d03a1456d2d0ee7a482273fe35412c67054f133d)
+++ lams_tool_lamc/src/java/org/lamsfoundation/lams/tool/mc/web/form/McPedagogicalPlannerForm.java (.../McPedagogicalPlannerForm.java) (revision 9ca39edffd0c57ba7deeb38316f5a0f7b0d8fe44)
@@ -53,7 +53,7 @@
@Qualifier("lamcMessageService")
private static MessageService messageService;
- private List question;
+ private List descriptions;
private List candidateAnswerCount;
private String candidateAnswersString;
private List correct;
@@ -63,9 +63,9 @@
MultiValueMap errorMap = new LinkedMultiValueMap<>();
boolean allEmpty = true;
- if (question != null && !question.isEmpty()) {
+ if (descriptions != null && !descriptions.isEmpty()) {
int questionIndex = 1;
- for (String item : question) {
+ for (String item : descriptions) {
if (item != null || !StringUtils.isEmpty(item)) {
try {
List candidateAnswerList = extractCandidateAnswers(request, questionIndex);
@@ -96,7 +96,7 @@
if (allEmpty) {
errorMap.clear();
errorMap.add("GLOBAL", messageService.getMessage("questions.none.submitted"));
- question = null;
+ descriptions = null;
setCandidateAnswersString("");
} else if (!errorMap.isEmpty()) {
StringBuilder candidateAnswersBuilder = new StringBuilder();
@@ -128,11 +128,11 @@
StringBuilder candidateAnswersBuilder = new StringBuilder();
setCandidateAnswerCount(new ArrayList(questionDtos.size()));
for (int questionIndex = 1; questionIndex <= questionDtos.size(); questionIndex++) {
- McQuestionDTO item = questionDtos.get(questionIndex - 1);
- int questionDisplayOrder = item.getDisplayOrder();
- String questionText = item.getQuestion();
- setQuestion(questionDisplayOrder - 1, questionText);
- List candidateAnswers = item.getOptionDtos();
+ McQuestionDTO questionDto = questionDtos.get(questionIndex - 1);
+ int questionDisplayOrder = questionDto.getDisplayOrder();
+ String description = questionDto.getDescription();
+ setDescription(questionDisplayOrder - 1, description);
+ List candidateAnswers = questionDto.getOptionDtos();
for (int candidateAnswerIndex = 1; candidateAnswerIndex <= candidateAnswers
.size(); candidateAnswerIndex++) {
@@ -152,32 +152,32 @@
}
}
- public void setQuestion(int number, String Questions) {
- if (question == null) {
- question = new ArrayList<>();
+ public void setDescription(int number, String description) {
+ if (descriptions == null) {
+ descriptions = new ArrayList<>();
}
- while (number >= question.size()) {
- question.add(null);
+ while (number >= descriptions.size()) {
+ descriptions.add(null);
}
- question.set(number, Questions);
+ descriptions.set(number, description);
}
- public String getQuestion(int number) {
- if (question == null || number >= question.size()) {
+ public String getDescription(int number) {
+ if (descriptions == null || number >= descriptions.size()) {
return null;
}
- return question.get(number);
+ return descriptions.get(number);
}
public Integer getQuestionCount() {
- return question == null ? 0 : question.size();
+ return descriptions == null ? 0 : descriptions.size();
}
public boolean removeQuestion(int number) {
- if (question == null || number >= question.size()) {
+ if (descriptions == null || number >= descriptions.size()) {
return false;
}
- question.remove(number);
+ descriptions.remove(number);
return true;
}
@@ -239,7 +239,7 @@
this.candidateAnswerCount = candidateAnswerCount;
}
- public List getQuestionList() {
- return question;
+ public List getDescriptionList() {
+ return descriptions;
}
}
\ No newline at end of file
Index: lams_tool_lamc/web/authoring/BasicContent.jsp
===================================================================
diff -u -r3ec7cbf6d6a62b79ba7e4334d770721f8867e999 -r9ca39edffd0c57ba7deeb38316f5a0f7b0d8fe44
--- lams_tool_lamc/web/authoring/BasicContent.jsp (.../BasicContent.jsp) (revision 3ec7cbf6d6a62b79ba7e4334d770721f8867e999)
+++ lams_tool_lamc/web/authoring/BasicContent.jsp (.../BasicContent.jsp) (revision 9ca39edffd0c57ba7deeb38316f5a0f7b0d8fe44)
@@ -1,5 +1,10 @@
<%@ include file="/common/taglibs.jsp"%>
+
@@ -110,10 +107,11 @@
+
-
@@ -125,6 +123,7 @@
onclick="javascript:clearEntry(${questionIndex-1})" />
+
@@ -136,9 +135,14 @@
+
-
+
+
+
+
+
-
\ No newline at end of file
+
Index: lams_tool_lamc/web/learning/AnswersContent.jsp
===================================================================
diff -u -raced7ba6c1e7c5a9a50d3f64d8cdd96dd7e76194 -r9ca39edffd0c57ba7deeb38316f5a0f7b0d8fe44
--- lams_tool_lamc/web/learning/AnswersContent.jsp (.../AnswersContent.jsp) (revision aced7ba6c1e7c5a9a50d3f64d8cdd96dd7e76194)
+++ lams_tool_lamc/web/learning/AnswersContent.jsp (.../AnswersContent.jsp) (revision 9ca39edffd0c57ba7deeb38316f5a0f7b0d8fe44)
@@ -74,7 +74,7 @@
function verifyAllQuestionsAnswered() {
// in case oneQuestionPerPage option is ON user has to select 1 answer, and all answers otherwise
var isOneQuestionPerPage = ${sessionMap.content.questionsSequenced};
- var answersRequiredNumber = (isOneQuestionPerPage) ? 1 : ${fn:length(requestScope.learnerAnswersDTOList)};
+ var answersRequiredNumber = (isOneQuestionPerPage) ? 1 : ${fn:length(requestScope.learnerAnswerDtos)};
//check each question is answered
if ($(':radio:checked').length == answersRequiredNumber) {
Index: lams_tool_lamc/web/learning/CombinedAnswersContent.jsp
===================================================================
diff -u -reb5312af3f0d7ca64ca3b41988129079c7509427 -r9ca39edffd0c57ba7deeb38316f5a0f7b0d8fe44
--- lams_tool_lamc/web/learning/CombinedAnswersContent.jsp (.../CombinedAnswersContent.jsp) (revision eb5312af3f0d7ca64ca3b41988129079c7509427)
+++ lams_tool_lamc/web/learning/CombinedAnswersContent.jsp (.../CombinedAnswersContent.jsp) (revision 9ca39edffd0c57ba7deeb38316f5a0f7b0d8fe44)
@@ -2,25 +2,29 @@
-
+
- ${dto.displayOrder})
+
+ ${answerDto.displayOrder})
-
+
+
+
+
[
-
+
]
@@ -33,12 +37,12 @@
-
+
- checked="checked"
disabled="disabled"
>
@@ -50,7 +54,7 @@
-
+
@@ -67,10 +71,10 @@
- data-slider-value="${dto.confidenceLevel}"
+ data-slider-value="${answerDto.confidenceLevel}"
/>
Index: lams_tool_lamc/web/learning/SingleQuestionAnswersContent.jsp
===================================================================
diff -u -reb5312af3f0d7ca64ca3b41988129079c7509427 -r9ca39edffd0c57ba7deeb38316f5a0f7b0d8fe44
--- lams_tool_lamc/web/learning/SingleQuestionAnswersContent.jsp (.../SingleQuestionAnswersContent.jsp) (revision eb5312af3f0d7ca64ca3b41988129079c7509427)
+++ lams_tool_lamc/web/learning/SingleQuestionAnswersContent.jsp (.../SingleQuestionAnswersContent.jsp) (revision 9ca39edffd0c57ba7deeb38316f5a0f7b0d8fe44)
@@ -6,22 +6,28 @@
-
-
+
+
- ${dto.displayOrder})
-
+
+ ${answerDto.displayOrder})
+
+
+
+
+
+
- [ ]
+
+ [ ]
@@ -32,11 +38,11 @@
-
+
- checked="checked"
/>
@@ -46,7 +52,7 @@
-
@@ -62,10 +68,10 @@
- data-slider-value="${dto.confidenceLevel}"
+ data-slider-value="${answerDto.confidenceLevel}"
/>
Index: lams_tool_lamc/web/learning/ViewAnswers.jsp
===================================================================
diff -u -r650202864c49257c570cd5c4d496ca3789db7846 -r9ca39edffd0c57ba7deeb38316f5a0f7b0d8fe44
--- lams_tool_lamc/web/learning/ViewAnswers.jsp (.../ViewAnswers.jsp) (revision 650202864c49257c570cd5c4d496ca3789db7846)
+++ lams_tool_lamc/web/learning/ViewAnswers.jsp (.../ViewAnswers.jsp) (revision 9ca39edffd0c57ba7deeb38316f5a0f7b0d8fe44)
@@ -94,7 +94,7 @@
-
+
@@ -103,11 +103,18 @@
- ${status.count})
-
+
+ ${status.count})
+
+
+
+
+
+
+
Index: lams_tool_lamc/web/monitoring/masterDetailLoadUp.jsp
===================================================================
diff -u -r7475d08afc280b5e2e5ddf04e8bf35e3166aaf80 -r9ca39edffd0c57ba7deeb38316f5a0f7b0d8fe44
--- lams_tool_lamc/web/monitoring/masterDetailLoadUp.jsp (.../masterDetailLoadUp.jsp) (revision 7475d08afc280b5e2e5ddf04e8bf35e3166aaf80)
+++ lams_tool_lamc/web/monitoring/masterDetailLoadUp.jsp (.../masterDetailLoadUp.jsp) (revision 9ca39edffd0c57ba7deeb38316f5a0f7b0d8fe44)
@@ -10,7 +10,7 @@
table.addRowData(${i.index + 1}, {
id: "${i.index + 1}",
userAttemptUid: "${userAttempt.uid}",
- title: "${userAttempt.mcQueContent.escapedQuestion}",
+ title: "${userAttempt.mcQueContent.escapedDescription}",
response: "${userAttempt.mcOptionsContent.escapedOptionText}",
confidence: "${userAttempt.confidenceLevel}",
Index: lams_tool_lamc/web/monitoring/parts/advanceQuestions.jsp
===================================================================
diff -u -r650202864c49257c570cd5c4d496ca3789db7846 -r9ca39edffd0c57ba7deeb38316f5a0f7b0d8fe44
--- lams_tool_lamc/web/monitoring/parts/advanceQuestions.jsp (.../advanceQuestions.jsp) (revision 650202864c49257c570cd5c4d496ca3789db7846)
+++ lams_tool_lamc/web/monitoring/parts/advanceQuestions.jsp (.../advanceQuestions.jsp) (revision 9ca39edffd0c57ba7deeb38316f5a0f7b0d8fe44)
@@ -15,13 +15,17 @@
- ${i.index + 1}: ( )
-
+
+ ${i.index + 1}: ( )
+
+
+
-
+
+
Index: lams_tool_lamc/web/tblmonitoring/mcq.jsp
===================================================================
diff -u -r650202864c49257c570cd5c4d496ca3789db7846 -r9ca39edffd0c57ba7deeb38316f5a0f7b0d8fe44
--- lams_tool_lamc/web/tblmonitoring/mcq.jsp (.../mcq.jsp) (revision 650202864c49257c570cd5c4d496ca3789db7846)
+++ lams_tool_lamc/web/tblmonitoring/mcq.jsp (.../mcq.jsp) (revision 9ca39edffd0c57ba7deeb38316f5a0f7b0d8fe44)
@@ -49,7 +49,10 @@
- Q${i.index + 1})
+ Q${i.index + 1})
+
+
+
Index: lams_tool_lamc/web/tblmonitoring/mcqStudentChoices.jsp
===================================================================
diff -u -re7ba02fbd771cb86ff621168fed50bd21d00d0d1 -r9ca39edffd0c57ba7deeb38316f5a0f7b0d8fe44
--- lams_tool_lamc/web/tblmonitoring/mcqStudentChoices.jsp (.../mcqStudentChoices.jsp) (revision e7ba02fbd771cb86ff621168fed50bd21d00d0d1)
+++ lams_tool_lamc/web/tblmonitoring/mcqStudentChoices.jsp (.../mcqStudentChoices.jsp) (revision 9ca39edffd0c57ba7deeb38316f5a0f7b0d8fe44)
@@ -97,7 +97,12 @@
-
Q${i.index+1}) ${questionDto.question}
+
+ Q${i.index+1})
+ ${questionDto.name}
+
+ ${questionDto.description}
+
Index: lams_tool_lamc/web/tblmonitoring/teams.jsp
===================================================================
diff -u -r650202864c49257c570cd5c4d496ca3789db7846 -r9ca39edffd0c57ba7deeb38316f5a0f7b0d8fe44
--- lams_tool_lamc/web/tblmonitoring/teams.jsp (.../teams.jsp) (revision 650202864c49257c570cd5c4d496ca3789db7846)
+++ lams_tool_lamc/web/tblmonitoring/teams.jsp (.../teams.jsp) (revision 9ca39edffd0c57ba7deeb38316f5a0f7b0d8fe44)
@@ -5,7 +5,9 @@
Q${i.index+1})
-
+
+
+