Index: lams_tool_lamc/src/java/org/lamsfoundation/lams/tool/mc/pojos/McContent.java =================================================================== diff -u --- lams_tool_lamc/src/java/org/lamsfoundation/lams/tool/mc/pojos/McContent.java (revision 0) +++ lams_tool_lamc/src/java/org/lamsfoundation/lams/tool/mc/pojos/McContent.java (revision df74c2ae9ad3fd2a2e559fdc6ab92593204c7090) @@ -0,0 +1,485 @@ +/*************************************************************************** + * 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.pojos; + +import java.io.Serializable; +import java.util.Date; +import java.util.HashSet; +import java.util.Iterator; +import java.util.Set; +import java.util.TreeSet; + +import javax.servlet.http.HttpServletRequest; + +import org.apache.commons.lang.builder.ToStringBuilder; +import org.apache.log4j.Logger; + +/** + *
Persistent object/bean that defines the content for the MCQ tool. + * Provides accessors and mutators to get/set attributes + * It maps to database table: tl_lamc11_content + *
+ * + * @author Ozgur Demirtas + */ +public class McContent implements Serializable { + static Logger logger = Logger.getLogger(McContent.class.getName()); + + /** identifier field */ + private Long uid; + + /** persistent field */ + private Long mcContentId; + + /** nullable persistent field */ + private String title; + + /** nullable persistent field */ + private String instructions; + + /** nullable persistent field */ + private boolean defineLater; + + /** nullable persistent field */ + private boolean runOffline; + + /** nullable persistent field */ + private String creationDate; + + /** nullable persistent field */ + private Date updateDate; + + /** nullable persistent field */ + private boolean questionsSequenced; + + /** nullable persistent field */ + private boolean usernameVisible; + + /** nullable persistent field */ + private String reportTitle; + + /** nullable persistent field */ + private String monitoringReportTitle; + + /** nullable persistent field */ + private long createdBy; + + /** nullable persistent field */ + private boolean synchInMonitor; + + /** nullable persistent field */ + private boolean contentInUse; + + /** nullable persistent field */ + private String offlineInstructions; + + /** nullable persistent field */ + private String onlineInstructions; + + /** nullable persistent field */ + private String endLearningMessage; + + /** nullable persistent field */ + private boolean retries; + + private boolean showReport; + + + /** nullable persistent field */ + private Integer passMark; + + /** nullable persistent field */ + private boolean showFeedback; + + + /** persistent field */ + private Set mcQueContents; + + /** persistent field */ + private Set mcSessions; + + /** persistent field */ + private Set mcAttachments; + + /** full constructor */ + public McContent(Long mcContentId, String title, String instructions, boolean defineLater, boolean runOffline, String creationDate, + Date updateDate, boolean questionsSequenced, boolean usernameVisible, String reportTitle, String monitoringReportTitle, + long createdBy, boolean synchInMonitor, boolean contentInUse, String offlineInstructions, String onlineInstructions, + String endLearningMessage, Integer passMark, boolean showReport, boolean showFeedback, boolean retries, Set mcQueContents, Set mcSessions, + Set mcAttachments) { + this.mcContentId = mcContentId; + this.title = title; + this.instructions = instructions; + this.defineLater = defineLater; + this.runOffline = runOffline; + this.creationDate = creationDate; + this.updateDate = updateDate; + this.questionsSequenced = questionsSequenced; + this.usernameVisible = usernameVisible; + this.reportTitle = reportTitle; + this.monitoringReportTitle = monitoringReportTitle; + this.createdBy = createdBy; + this.synchInMonitor = synchInMonitor; + this.contentInUse = contentInUse; + this.offlineInstructions = offlineInstructions; + this.onlineInstructions = onlineInstructions; + this.endLearningMessage = endLearningMessage; + this.passMark = passMark; + this.showReport = showReport; + this.retries=retries; + this.showFeedback = showFeedback; + this.mcQueContents = mcQueContents; + this.mcSessions = mcSessions; + this.mcAttachments = mcAttachments; + } + + /** default constructor */ + public McContent() { + } + + /** minimal constructor */ + public McContent(Long mcContentId, Set mcQueContents, Set mcSessions) { + this.mcContentId = mcContentId; + this.mcQueContents = mcQueContents; + this.mcSessions = mcSessions; + } + + + /** + * gets called as part of the copyToolContent + * + * Copy Construtor to create a new mc content instance. Note that we + * don't copy the mc session data here because the mc session + * will be created after we copied tool content. + * @param mc the original mc content. + * @param newContentId the new mc content id. + * @return the new mc content object. + */ + public static McContent newInstance(McContent mc, + Long newContentId, HttpServletRequest request) + { + McContent newContent = new McContent( + newContentId, + mc.getTitle(), + mc.getInstructions(), + mc.isDefineLater(), + mc.isRunOffline(), + mc.getCreationDate(), + mc.getUpdateDate(), + mc.isQuestionsSequenced(), + mc.isUsernameVisible(), + mc.getReportTitle(), + mc.getMonitoringReportTitle(), + mc.getCreatedBy(), + mc.isSynchInMonitor(), + mc.isContentInUse(), + mc.getOfflineInstructions(), + mc.getOnlineInstructions(), + mc.getEndLearningMessage(), + mc.getPassMark(), + mc.isShowReport(), + mc.isRetries(), + mc.isShowFeedback(), + new TreeSet(), + new TreeSet(), + new TreeSet() + ); + newContent.setMcQueContents(mc.deepCopyMcQueContent(newContent)); + newContent.setMcAttachments(mc.deepCopyMcAttachments(newContent, request)); + + + + return newContent; + } + + /** + * gets called as part of the copyToolContent + * + * @param newQaContent + * @return Set + */ + public Set deepCopyMcQueContent(McContent newMcContent) + { + Set newMcQueContent = new TreeSet(); + for (Iterator i = this.getMcQueContents().iterator(); i.hasNext();) + { + McQueContent queContent = (McQueContent) i.next(); + if (queContent.getMcContent() != null) + { + McQueContent mcQueContent=McQueContent.newInstance(queContent, + newMcContent); + newMcQueContent.add(mcQueContent); + } + } + return newMcQueContent; + } + + /** + * gets called as part of the copyToolContent + * + * @param newMcContent + * @return Set + */ + public Set deepCopyMcAttachments(McContent newMcContent, HttpServletRequest request) + { + Set newMcQueContent = new TreeSet(); + for (Iterator i = this.getMcAttachments().iterator(); i.hasNext();) + { + McUploadedFile mcUploadedFile = (McUploadedFile) i.next(); + if (mcUploadedFile.getMcContent() != null) + { + McUploadedFile newMcUploadedFile=McUploadedFile.newInstance(mcUploadedFile, + newMcContent, request); + newMcQueContent.add(newMcUploadedFile); + } + } + return newMcQueContent; + } + + + public Long getUid() { + return this.uid; + } + + public void setUid(Long uid) { + this.uid = uid; + } + + public Long getMcContentId() { + return this.mcContentId; + } + + public void setMcContentId(Long mcContentId) { + this.mcContentId = mcContentId; + } + + public String getTitle() { + return this.title; + } + + public void setTitle(String title) { + this.title = title; + } + + public String getInstructions() { + return this.instructions; + } + + public void setInstructions(String instructions) { + this.instructions = instructions; + } + + public boolean isDefineLater() { + return this.defineLater; + } + + public void setDefineLater(boolean defineLater) { + this.defineLater = defineLater; + } + + public boolean isRunOffline() { + return this.runOffline; + } + + public void setRunOffline(boolean runOffline) { + this.runOffline = runOffline; + } + + public String getCreationDate() { + return this.creationDate; + } + + public void setCreationDate(String creationDate) { + this.creationDate = creationDate; + } + + public Date getUpdateDate() { + return this.updateDate; + } + + public void setUpdateDate(Date updateDate) { + this.updateDate = updateDate; + } + + public boolean isQuestionsSequenced() { + return this.questionsSequenced; + } + + public void setQuestionsSequenced(boolean questionsSequenced) { + this.questionsSequenced = questionsSequenced; + } + + public boolean isUsernameVisible() { + return this.usernameVisible; + } + + public void setUsernameVisible(boolean usernameVisible) { + this.usernameVisible = usernameVisible; + } + + public String getReportTitle() { + return this.reportTitle; + } + + public void setReportTitle(String reportTitle) { + this.reportTitle = reportTitle; + } + + public String getMonitoringReportTitle() { + return this.monitoringReportTitle; + } + + public void setMonitoringReportTitle(String monitoringReportTitle) { + this.monitoringReportTitle = monitoringReportTitle; + } + + public long getCreatedBy() { + return this.createdBy; + } + + public void setCreatedBy(long createdBy) { + this.createdBy = createdBy; + } + + public boolean isSynchInMonitor() { + return this.synchInMonitor; + } + + public void setSynchInMonitor(boolean synchInMonitor) { + this.synchInMonitor = synchInMonitor; + } + + public boolean isContentInUse() { + return this.contentInUse; + } + + public void setContentInUse(boolean contentInUse) { + this.contentInUse = contentInUse; + } + + public String getOfflineInstructions() { + return this.offlineInstructions; + } + + public void setOfflineInstructions(String offlineInstructions) { + this.offlineInstructions = offlineInstructions; + } + + public String getOnlineInstructions() { + return this.onlineInstructions; + } + + public void setOnlineInstructions(String onlineInstructions) { + this.onlineInstructions = onlineInstructions; + } + + public String getEndLearningMessage() { + return this.endLearningMessage; + } + + public void setEndLearningMessage(String endLearningMessage) { + this.endLearningMessage = endLearningMessage; + } + + public Integer getPassMark() { + return this.passMark; + } + + public void setPassMark(Integer passMark) { + this.passMark = passMark; + } + + public boolean isShowFeedback() { + return this.showFeedback; + } + + public void setShowFeedback(boolean showFeedback) { + this.showFeedback = showFeedback; + } + + + public Set getMcQueContents() { + if (this.mcQueContents == null) + setMcQueContents(new HashSet()); + return this.mcQueContents; + } + + + public void setMcQueContents(Set mcQueContents) { + this.mcQueContents = mcQueContents; + } + + public Set getMcSessions() { + if (this.mcSessions == null) + setMcSessions(new HashSet()); + return this.mcSessions; + } + + public void setMcSessions(Set mcSessions) { + this.mcSessions = mcSessions; + } + + public String toString() { + return new ToStringBuilder(this) + .append("uid", getUid()) + .toString(); + } + + /** + * @return Returns the retries. + */ + public boolean isRetries() { + return retries; + } + /** + * @param retries The retries to set. + */ + public void setRetries(boolean retries) { + this.retries = retries; + } + + /** + * @return Returns the showReport. + */ + public boolean isShowReport() { + return showReport; + } + /** + * @param showReport The showReport to set. + */ + public void setShowReport(boolean showReport) { + this.showReport = showReport; + } + /** + * @return Returns the mcAttachments. + */ + public Set getMcAttachments() { + return mcAttachments; + } + /** + * @param mcAttachments The mcAttachments to set. + */ + public void setMcAttachments(Set mcAttachments) { + this.mcAttachments = mcAttachments; + } +} Index: lams_tool_lamc/src/java/org/lamsfoundation/lams/tool/mc/pojos/McOptsContent.java =================================================================== diff -u --- lams_tool_lamc/src/java/org/lamsfoundation/lams/tool/mc/pojos/McOptsContent.java (revision 0) +++ lams_tool_lamc/src/java/org/lamsfoundation/lams/tool/mc/pojos/McOptsContent.java (revision df74c2ae9ad3fd2a2e559fdc6ab92593204c7090) @@ -0,0 +1,189 @@ +/*************************************************************************** + * 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.pojos; + +import java.io.Serializable; +import java.util.HashSet; +import java.util.Set; +import java.util.TreeSet; + +import org.apache.commons.lang.builder.ToStringBuilder; +import org.apache.log4j.Logger; + + +/** + *Persistent object/bean that defines the content for the MCQ tool. + * Provides accessors and mutators to get/set attributes + * It maps to database table: tl_lamc11_options_content + *
+ * + * @author Ozgur Demirtas + */ +public class McOptsContent implements Serializable, Comparable { + static Logger logger = Logger.getLogger(McOptsContent.class.getName()); + + /** identifier field */ + private Long uid; + + private Long mcQueOptionId; + + /** nullable persistent field */ + private boolean correctOption; + + /** nullable persistent field */ + private String mcQueOptionText; + + /** non persistent field */ + private Long mcQueContentId; + + /** persistent field */ + private org.lamsfoundation.lams.tool.mc.pojos.McQueContent mcQueContent; + + /** persistent field */ + private Set mcUsrAttempts; + + + public McOptsContent(Long mcQueOptionId, boolean correctOption, String mcQueOptionText, org.lamsfoundation.lams.tool.mc.pojos.McQueContent mcQueContent, Set mcUsrAttempts) { + this.mcQueOptionId=mcQueOptionId; + this.correctOption = correctOption; + this.mcQueOptionText = mcQueOptionText; + this.mcQueContent = mcQueContent; + this.mcUsrAttempts=mcUsrAttempts; + } + + + public McOptsContent(boolean correctOption, String mcQueOptionText, org.lamsfoundation.lams.tool.mc.pojos.McQueContent mcQueContent, Set mcUsrAttempts) { + this.correctOption = correctOption; + this.mcQueOptionText = mcQueOptionText; + this.mcQueContent = mcQueContent; + this.mcUsrAttempts=mcUsrAttempts; + } + + public static McOptsContent newInstance(McOptsContent mcOptsContent, + McQueContent newMcQueContent) + + { + McOptsContent newMcOptsContent = new McOptsContent(mcOptsContent.isCorrectOption(), + mcOptsContent.getMcQueOptionText(), + newMcQueContent, + new TreeSet()); + return newMcOptsContent; + } + + + /** default constructor */ + public McOptsContent() { + } + + public Long getUid() { + return this.uid; + } + + public void setUid(Long uid) { + this.uid = uid; + } + + + public boolean isCorrectOption() { + return this.correctOption; + } + + public void setCorrectOption(boolean correctOption) { + this.correctOption = correctOption; + } + + public String getMcQueOptionText() { + return this.mcQueOptionText; + } + + public void setMcQueOptionText(String mcQueOptionText) { + this.mcQueOptionText = mcQueOptionText; + } + + public org.lamsfoundation.lams.tool.mc.pojos.McQueContent getMcQueContent() { + return this.mcQueContent; + } + + public void setMcQueContent(org.lamsfoundation.lams.tool.mc.pojos.McQueContent mcQueContent) { + this.mcQueContent = mcQueContent; + } + + + public String toString() { + return new ToStringBuilder(this) + .append("uid", getUid()) + .toString(); + } + + /** + * @return Returns the mcQueOptionId. + */ + public Long getMcQueOptionId() { + return mcQueOptionId; + } + /** + * @param mcQueOptionId The mcQueOptionId to set. + */ + public void setMcQueOptionId(Long mcQueOptionId) { + this.mcQueOptionId = mcQueOptionId; + } + /** + * @return Returns the mcUsrAttempts. + */ + + + public Set getMcUsrAttempts() { + if (this.mcUsrAttempts == null) + setMcUsrAttempts(new HashSet()); + return this.mcUsrAttempts; + } + /** + * @param mcUsrAttempts The mcUsrAttempts to set. + */ + public void setMcUsrAttempts(Set mcUsrAttempts) { + this.mcUsrAttempts = mcUsrAttempts; + } + + /** + * @return Returns the mcQueContentId. + */ + public Long getMcQueContentId() { + return mcQueContentId; + } + /** + * @param mcQueContentId The mcQueContentId to set. + */ + public void setMcQueContentId(Long mcQueContentId) { + this.mcQueContentId = mcQueContentId; + } + + public int compareTo(Object o) + { + McOptsContent optContent = (McOptsContent) o; + //if the object does not exist yet, then just return any one of 0, -1, 1. Should not make a difference. + if (mcQueOptionId == null) + return 1; + else + return (int) (mcQueOptionId.longValue() - optContent.mcQueOptionId.longValue()); + } +} Index: lams_tool_lamc/src/java/org/lamsfoundation/lams/tool/mc/pojos/McQueContent.java =================================================================== diff -u --- lams_tool_lamc/src/java/org/lamsfoundation/lams/tool/mc/pojos/McQueContent.java (revision 0) +++ lams_tool_lamc/src/java/org/lamsfoundation/lams/tool/mc/pojos/McQueContent.java (revision df74c2ae9ad3fd2a2e559fdc6ab92593204c7090) @@ -0,0 +1,357 @@ +/*************************************************************************** + * 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.pojos; + +import java.io.Serializable; +import java.util.HashSet; +import java.util.Iterator; +import java.util.Set; +import java.util.TreeSet; + +import org.apache.commons.lang.builder.ToStringBuilder; +import org.apache.log4j.Logger; + + +/** + *Persistent object/bean that defines the question content for the MCQ tool. + * Provides accessors and mutators to get/set attributes + * It maps to database table: tl_lamc11_que_content + *
+ * + * @author Ozgur Demirtas + */ +public class McQueContent implements Serializable, Comparable { + static Logger logger = Logger.getLogger(McQueContent.class.getName()); + + /** identifier field */ + private Long uid; + + /** persistent field */ + private Long mcQueContentId; + + /** nullable persistent field */ + private String question; + + /** nullable persistent field */ + private Integer displayOrder; + + /** nullable persistent field */ + private Integer weight; + + /** persistent field */ + private boolean disabled; + + private String feedbackCorrect; + + private String feedbackIncorrect; + + + /** non persistent field */ + private Long mcContentId; + + /** persistent field */ + private org.lamsfoundation.lams.tool.mc.pojos.McContent mcContent; + + /** persistent field */ + private Set mcUsrAttempts; + + /** persistent field */ + private Set mcOptionsContents; + + /** full constructor */ + public McQueContent(Long mcQueContentId, String question, Integer displayOrder, McContent mcContent, Set mcUsrAttempts, Set mcOptionsContents) { + this.mcQueContentId = mcQueContentId; + this.question = question; + this.displayOrder = displayOrder; + this.mcContent=mcContent; + this.mcUsrAttempts = mcUsrAttempts; + this.mcOptionsContents = mcOptionsContents; + } + + public McQueContent(String question, Integer displayOrder, McContent mcContent, Set mcUsrAttempts, Set mcOptionsContents) { + this.question = question; + this.displayOrder = displayOrder; + this.mcContent=mcContent; + this.mcUsrAttempts = mcUsrAttempts; + this.mcOptionsContents = mcOptionsContents; + } + + public McQueContent(String question, Integer displayOrder, Integer weight, boolean disabled, McContent mcContent, Set mcUsrAttempts, Set mcOptionsContents) { + this.question = question; + this.displayOrder = displayOrder; + this.weight = weight; + this.disabled = disabled; + this.mcContent=mcContent; + this.mcUsrAttempts = mcUsrAttempts; + this.mcOptionsContents = mcOptionsContents; + } + + public McQueContent(String question, Integer displayOrder, Integer weight, boolean disabled, String feedbackIncorrect, String feedbackCorrect, McContent mcContent, Set mcUsrAttempts, Set mcOptionsContents) { + this.question = question; + this.displayOrder = displayOrder; + this.weight = weight; + this.disabled = disabled; + this.feedbackIncorrect = feedbackIncorrect; + this.feedbackCorrect = feedbackCorrect; + this.mcContent=mcContent; + this.mcUsrAttempts = mcUsrAttempts; + this.mcOptionsContents = mcOptionsContents; + } + + + public McQueContent(String question, Integer displayOrder, Integer weight, String feedbackCorrect, String feedbackIncorrect, boolean disabled, McContent mcContent, Set mcUsrAttempts, Set mcOptionsContents) { + this.question = question; + this.displayOrder = displayOrder; + this.weight = weight; + this.disabled = disabled; + this.feedbackCorrect=feedbackCorrect; + this.feedbackIncorrect=feedbackIncorrect; + this.mcContent=mcContent; + this.mcUsrAttempts = mcUsrAttempts; + this.mcOptionsContents = mcOptionsContents; + } + + + public McQueContent(Long mcQueContentId, String question, Integer displayOrder, Set mcUsrAttempts, Set mcOptionsContents) { + this.mcQueContentId = mcQueContentId; + this.question = question; + this.displayOrder = displayOrder; + this.mcUsrAttempts = mcUsrAttempts; + this.mcOptionsContents = mcOptionsContents; + } + + public McQueContent(Long mcQueContentId, String question, Integer displayOrder, Integer weight, Set mcUsrAttempts, Set mcOptionsContents) { + this.mcQueContentId = mcQueContentId; + this.question = question; + this.displayOrder = displayOrder; + this.weight=weight; + this.mcUsrAttempts = mcUsrAttempts; + this.mcOptionsContents = mcOptionsContents; + } + + + + public McQueContent(String question, Integer displayOrder, Set mcUsrAttempts, Set mcOptionsContents) { + this.question = question; + this.displayOrder = displayOrder; + this.mcUsrAttempts = mcUsrAttempts; + this.mcOptionsContents = mcOptionsContents; + } + + + + /** default constructor */ + public McQueContent() { + } + + /** minimal constructor */ + public McQueContent(Long mcQueContentId, org.lamsfoundation.lams.tool.mc.pojos.McContent mcContent, Set mcUsrAttempts, Set mcOptionsContents) { + this.mcQueContentId = mcQueContentId; + this.mcContent = mcContent; + this.mcUsrAttempts = mcUsrAttempts; + this.mcOptionsContents = mcOptionsContents; + } + + + /** + * gets called by copyToolContent + * + * Copy constructor + * @param queContent the original qa question content + * @return the new qa question content object + */ + public static McQueContent newInstance(McQueContent queContent, + McContent newMcContent) + + { + McQueContent newQueContent = new McQueContent(queContent.getQuestion(), + queContent.getDisplayOrder(), + queContent.getWeight(), + queContent.isDisabled(), + queContent.getFeedbackCorrect(), + queContent.getFeedbackCorrect(), + newMcContent, + new TreeSet(), + new TreeSet()); + + newQueContent.setMcOptionsContents(queContent.deepCopyMcOptionsContent(newQueContent)); + return newQueContent; + } + + + public Set deepCopyMcOptionsContent(McQueContent newQueContent) + { + Set newMcOptionsContent = new TreeSet(); + for (Iterator i = this.getMcOptionsContents().iterator(); i.hasNext();) + { + McOptsContent mcOptsContent = (McOptsContent) i.next(); + McOptsContent mcNewOptsContent= McOptsContent.newInstance(mcOptsContent,newQueContent); + + if (mcNewOptsContent.getMcQueContent() != null) + { + newMcOptionsContent.add(mcNewOptsContent); + } + } + return newMcOptionsContent; + } + + + public Long getUid() { + return this.uid; + } + + public void setUid(Long uid) { + this.uid = uid; + } + + public Long getMcQueContentId() { + return this.mcQueContentId; + } + + public void setMcQueContentId(Long mcQueContentId) { + this.mcQueContentId = mcQueContentId; + } + + public String getQuestion() { + return this.question; + } + + public void setQuestion(String question) { + this.question = question; + } + + public Integer getDisplayOrder() { + return this.displayOrder; + } + + public void setDisplayOrder(Integer displayOrder) { + this.displayOrder = displayOrder; + } + + public org.lamsfoundation.lams.tool.mc.pojos.McContent getMcContent() { + return this.mcContent; + } + + public void setMcContent(org.lamsfoundation.lams.tool.mc.pojos.McContent mcContent) { + this.mcContent = mcContent; + } + + public Set getMcUsrAttempts() { + if (this.mcUsrAttempts == null) + setMcUsrAttempts(new HashSet()); + return this.mcUsrAttempts; + } + + + public void setMcUsrAttempts(Set mcUsrAttempts) { + this.mcUsrAttempts = mcUsrAttempts; + } + + + public Set getMcOptionsContents() { + if (this.mcOptionsContents == null) + setMcOptionsContents(new HashSet()); + return this.mcOptionsContents; + } + + public void setMcOptionsContents(Set mcOptionsContents) { + this.mcOptionsContents = mcOptionsContents; + } + + public String toString() { + return new ToStringBuilder(this) + .append("uid", getUid()) + .toString(); + } + + /** + * @return Returns the mcContentId. + */ + public Long getMcContentId() { + return mcContentId; + } + /** + * @param mcContentId The mcContentId to set. + */ + public void setMcContentId(Long mcContentId) { + this.mcContentId = mcContentId; + } + /** + * @return Returns the disabled. + */ + public boolean isDisabled() { + return disabled; + } + /** + * @param disabled The disabled to set. + */ + public void setDisabled(boolean disabled) { + this.disabled = disabled; + } + /** + * @return Returns the weight. + */ + public Integer getWeight() { + return weight; + } + /** + * @param weight The weight to set. + */ + public void setWeight(Integer weight) { + this.weight = weight; + } + /** + * @return Returns the feedbackCorrect. + */ + public String getFeedbackCorrect() { + return feedbackCorrect; + } + /** + * @param feedbackCorrect The feedbackCorrect to set. + */ + public void setFeedbackCorrect(String feedbackCorrect) { + this.feedbackCorrect = feedbackCorrect; + } + /** + * @return Returns the feedbackIncorrect. + */ + public String getFeedbackIncorrect() { + return feedbackIncorrect; + } + /** + * @param feedbackIncorrect The feedbackIncorrect to set. + */ + public void setFeedbackIncorrect(String feedbackIncorrect) { + this.feedbackIncorrect = feedbackIncorrect; + } + + public int compareTo(Object o) + { + McQueContent queContent = (McQueContent) o; + //if the object does not exist yet, then just return any one of 0, -1, 1. Should not make a difference. + if (mcQueContentId == null) + return 1; + else + return (int) (mcQueContentId.longValue() - queContent.mcQueContentId.longValue()); + } +} Index: lams_tool_lamc/src/java/org/lamsfoundation/lams/tool/mc/pojos/McQueUsr.java =================================================================== diff -u --- lams_tool_lamc/src/java/org/lamsfoundation/lams/tool/mc/pojos/McQueUsr.java (revision 0) +++ lams_tool_lamc/src/java/org/lamsfoundation/lams/tool/mc/pojos/McQueUsr.java (revision df74c2ae9ad3fd2a2e559fdc6ab92593204c7090) @@ -0,0 +1,151 @@ +/*************************************************************************** + * 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.pojos; + +import java.io.Serializable; +import java.util.HashSet; +import java.util.Set; + +import org.apache.commons.lang.builder.ToStringBuilder; + + +/** + *Persistent object/bean that defines the user for the MCQ tool. + * Provides accessors and mutators to get/set attributes + * It maps to database table: tl_lamc11_que_usr + *
+ * + * @author Ozgur Demirtas + */ +public class McQueUsr implements Serializable { + + /** identifier field */ + private Long uid; + + /** persistent field */ + private Long queUsrId; + + /** nullable persistent field */ + private String username; + + /** nullable persistent field */ + private String fullname; + + private Long mcSessionId; + + /** nullable persistent field */ + private org.lamsfoundation.lams.tool.mc.pojos.McSession mcSession; + + /** persistent field */ + private Set mcUsrAttempts; + + /** full constructor */ + public McQueUsr(Long queUsrId, String username, String fullname, org.lamsfoundation.lams.tool.mc.pojos.McSession mcSession, Set mcUsrAttempts) { + this.queUsrId = queUsrId; + this.username = username; + this.fullname = fullname; + this.mcSession = mcSession; + this.mcUsrAttempts = mcUsrAttempts; + } + + /** default constructor */ + public McQueUsr() { + } + + /** minimal constructor */ + public McQueUsr(Long queUsrId, Set mcUsrAttempts) { + this.queUsrId = queUsrId; + this.mcUsrAttempts = mcUsrAttempts; + } + + public Long getUid() { + return this.uid; + } + + public void setUid(Long uid) { + this.uid = uid; + } + + public Long getQueUsrId() { + return this.queUsrId; + } + + public void setQueUsrId(Long queUsrId) { + this.queUsrId = queUsrId; + } + + public String getUsername() { + return this.username; + } + + public void setUsername(String username) { + this.username = username; + } + + public String getFullname() { + return this.fullname; + } + + public void setFullname(String fullname) { + this.fullname = fullname; + } + + + public org.lamsfoundation.lams.tool.mc.pojos.McSession getMcSession() { + return this.mcSession; + } + + public void setMcSession(org.lamsfoundation.lams.tool.mc.pojos.McSession mcSession) { + this.mcSession = mcSession; + } + + public Set getMcUsrAttempts() { + if (this.mcUsrAttempts == null) + setMcUsrAttempts(new HashSet()); + return this.mcUsrAttempts; + } + + + public void setMcUsrAttempts(Set mcUsrAttempts) { + this.mcUsrAttempts = mcUsrAttempts; + } + + public String toString() { + return new ToStringBuilder(this) + .append("uid", getUid()) + .toString(); + } + + /** + * @return Returns the mcSessionId. + */ + public Long getMcSessionId() { + return mcSessionId; + } + /** + * @param mcSessionId The mcSessionId to set. + */ + public void setMcSessionId(Long mcSessionId) { + this.mcSessionId = mcSessionId; + } +} Index: lams_tool_lamc/src/java/org/lamsfoundation/lams/tool/mc/pojos/McSession.java =================================================================== diff -u --- lams_tool_lamc/src/java/org/lamsfoundation/lams/tool/mc/pojos/McSession.java (revision 0) +++ lams_tool_lamc/src/java/org/lamsfoundation/lams/tool/mc/pojos/McSession.java (revision df74c2ae9ad3fd2a2e559fdc6ab92593204c7090) @@ -0,0 +1,190 @@ +/*************************************************************************** + * 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.pojos; + +import java.io.Serializable; +import java.util.Date; +import java.util.HashSet; +import java.util.Set; + +import org.apache.commons.lang.builder.ToStringBuilder; + + +/** + *Persistent object/bean that defines the content for the MCQ tool. + * Provides accessors and mutators to get/set attributes + * It maps to database table: tl_lamc11_session + *
+ * + * @author Ozgur Demirtas + */ +public class McSession implements Serializable { + + public final static String INCOMPLETE = "INCOMPLETE"; + + public static final String COMPLETED = "COMPLETED"; + + /** identifier field */ + private Long uid; + + /** persistent field */ + private Long mcSessionId; + + /** nullable persistent field */ + private Date sessionStartDate; + + /** nullable persistent field */ + private Date sessionEndDate; + + /** nullable persistent field */ + private String sessionStatus; + + /** nullable persistent field */ + private Long mcContentId; + + /** nullable persistent field */ + private org.lamsfoundation.lams.tool.mc.pojos.McContent mcContent; + + /** persistent field */ + private Set mcQueUsers; + + /** full constructor */ + public McSession(Long mcSessionId, Date sessionStartDate, Date sessionEndDate, String sessionStatus, org.lamsfoundation.lams.tool.mc.pojos.McContent mcContent, Set mcQueUsers) { + this.mcSessionId = mcSessionId; + this.sessionStartDate = sessionStartDate; + this.sessionEndDate = sessionEndDate; + this.sessionStatus = sessionStatus; + this.mcContent = mcContent; + this.mcQueUsers = mcQueUsers; + } + + public McSession(Long mcSessionId, Date sessionStartDate, String sessionStatus, org.lamsfoundation.lams.tool.mc.pojos.McContent mcContent, Set mcQueUsers) { + this.mcSessionId = mcSessionId; + this.sessionStartDate = sessionStartDate; + this.sessionStatus = sessionStatus; + this.mcContent = mcContent; + this.mcQueUsers = mcQueUsers; + } + + + /** default constructor */ + public McSession() { + } + + /** minimal constructor */ + public McSession(Long mcSessionId, Set mcQueUsers) { + this.mcSessionId = mcSessionId; + this.mcQueUsers = mcQueUsers; + } + + public Long getUid() { + return this.uid; + } + + public void setUid(Long uid) { + this.uid = uid; + } + + public Long getMcSessionId() { + return this.mcSessionId; + } + + public void setMcSessionId(Long mcSessionId) { + this.mcSessionId = mcSessionId; + } + + + public Long getMcContentId() { + return this.mcContentId; + } + + public void setMcContentId(Long mcContentId) { + this.mcContentId = mcContentId; + } + + public org.lamsfoundation.lams.tool.mc.pojos.McContent getMcContent() { + return this.mcContent; + } + + public void setMcContent(org.lamsfoundation.lams.tool.mc.pojos.McContent mcContent) { + this.mcContent = mcContent; + } + + public String toString() { + return new ToStringBuilder(this) + .append("uid", getUid()) + .toString(); + } + + /** + * @return Returns the sessionEndDate. + */ + public Date getSessionEndDate() { + return sessionEndDate; + } + /** + * @param sessionEndDate The sessionEndDate to set. + */ + public void setSessionEndDate(Date sessionEndDate) { + this.sessionEndDate = sessionEndDate; + } + /** + * @return Returns the sessionStartDate. + */ + public Date getSessionStartDate() { + return sessionStartDate; + } + /** + * @param sessionStartDate The sessionStartDate to set. + */ + public void setSessionStartDate(Date sessionStartDate) { + this.sessionStartDate = sessionStartDate; + } + /** + * @return Returns the sessionStatus. + */ + public String getSessionStatus() { + return sessionStatus; + } + /** + * @param sessionStatus The sessionStatus to set. + */ + public void setSessionStatus(String sessionStatus) { + this.sessionStatus = sessionStatus; + } + /** + * @return Returns the mcQueUsers. + */ + + public Set getMcQueUsers() { + if (this.mcQueUsers == null) + setMcQueUsers(new HashSet()); + return this.mcQueUsers; + } + /** + * @param mcQueUsers The mcQueUsers to set. + */ + public void setMcQueUsers(Set mcQueUsers) { + this.mcQueUsers = mcQueUsers; + } +} Index: lams_tool_lamc/src/java/org/lamsfoundation/lams/tool/mc/pojos/McUploadedFile.java =================================================================== diff -u --- lams_tool_lamc/src/java/org/lamsfoundation/lams/tool/mc/pojos/McUploadedFile.java (revision 0) +++ lams_tool_lamc/src/java/org/lamsfoundation/lams/tool/mc/pojos/McUploadedFile.java (revision df74c2ae9ad3fd2a2e559fdc6ab92593204c7090) @@ -0,0 +1,230 @@ +/* + *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.pojos; + +import java.io.Serializable; + +import javax.servlet.http.HttpServletRequest; + +import org.apache.commons.lang.builder.ToStringBuilder; +import org.apache.log4j.Logger; +import org.lamsfoundation.lams.contentrepository.NodeKey; +import org.lamsfoundation.lams.contentrepository.RepositoryCheckedException; +import org.lamsfoundation.lams.tool.mc.McUtils; +import org.lamsfoundation.lams.tool.mc.service.IMcService; + +/** + *Persistent object/bean that defines the uploaded file for the MCQ tool. + * Provides accessors and mutators to get/set attributes + * It maps to database table: tl_lamc11_uploadedFile + *
+ * + * @author Ozgur Demirtas + */ +public class McUploadedFile implements Serializable, Comparable +{ + static Logger logger = Logger.getLogger(McUploadedFile.class.getName()); + + /** identifier field */ + private Long uid; + + /** persistent field */ + private String uuid; + + /** persistent field */ + private boolean fileOnline; + + /** persistent field */ + private String filename; + + + private Long mcContentId; + + /** persistent field */ + private McContent mcContent; + + public McUploadedFile(){}; + + /** full constructor */ + public McUploadedFile(Long uid, + String uuid, + boolean fileOnline, + String filename, + McContent mcContent) + { + this.uid=uid; + this.uuid = uuid; + this.fileOnline = fileOnline; + this.filename = filename; + this.mcContent=mcContent; + } + + public McUploadedFile(String uuid, + boolean fileOnline, + String filename, + McContent mcContent) + { + this.uuid = uuid; + this.fileOnline = fileOnline; + this.filename = filename; + this.mcContent=mcContent; + } + + public McUploadedFile(String uuid, + boolean fileOnline, + String filename, + Long mcContentId) + { + this.uuid = uuid; + this.fileOnline = fileOnline; + this.filename = filename; + this.mcContentId=mcContentId; + } + + + public static McUploadedFile newInstance(McUploadedFile mcUploadedFile, + McContent newMcContent, HttpServletRequest request) + + { + IMcService mcService =McUtils.getToolService(request); + McUploadedFile newMcUploadedFile=null; + + try + { + NodeKey copiedNodeKey = mcService.copyFile(new Long(mcUploadedFile.getUuid())); + logger.debug("copiedNodeKey: " + copiedNodeKey); + newMcUploadedFile = new McUploadedFile(copiedNodeKey.getUuid().toString(), + mcUploadedFile.isFileOnline(), + mcUploadedFile.getFilename(), + newMcContent); + + } + catch(RepositoryCheckedException e) + { + logger.debug("error occurred: " + e); + } + + return newMcUploadedFile; + } + + + public String toString() { + return new ToStringBuilder(this) + .append("uuid: ", getUuid()) + .toString(); + } + + + /** + * @return Returns the mcContent. + */ + public McContent getMcContent() { + return mcContent; + } + /** + * @param mcContent The mcContent to set. + */ + public void setMcContent(McContent mcContent) { + this.mcContent = mcContent; + } + /** + * @return Returns the mcContentId. + */ + public Long getMcContentId() { + return mcContentId; + } + /** + * @param mcContentId The mcContentId to set. + */ + public void setMcContentId(Long mcContentId) { + this.mcContentId = mcContentId; + } + /** + * @return Returns the uid. + */ + public Long getSubmissionId() { + return uid; + } + /** + * @param uid The uid to set. + */ + public void setSubmissionId(Long uid) { + this.uid = uid; + } + /** + * @return Returns the uuid. + */ + public String getUuid() { + return uuid; + } + /** + * @param uuid The uuid to set. + */ + public void setUuid(String uuid) { + this.uuid = uuid; + } + /** + * @return Returns the fileOnline. + */ + public boolean isFileOnline() { + return fileOnline; + } + /** + * @param fileOnline The fileOnline to set. + */ + public void setFileOnline(boolean fileOnline) { + this.fileOnline = fileOnline; + } + /** + * @return Returns the uid. + */ + public Long getUid() { + return uid; + } + /** + * @param uid The uid to set. + */ + public void setUid(Long uid) { + this.uid = uid; + } + /** + * @return Returns the filename. + */ + public String getFilename() { + return filename; + } + /** + * @param filename The filename to set. + */ + public void setFilename(String filename) { + this.filename = filename; + } + + public int compareTo(Object o) + { + McUploadedFile optContent = (McUploadedFile) o; + //if the object does not exist yet, then just return any one of 0, -1, 1. Should not make a difference. + if (uid == null) + return 1; + else + return (int) (uid.longValue() - optContent.uid.longValue()); + } +} Index: lams_tool_lamc/src/java/org/lamsfoundation/lams/tool/mc/pojos/McUsrAttempt.java =================================================================== diff -u --- lams_tool_lamc/src/java/org/lamsfoundation/lams/tool/mc/pojos/McUsrAttempt.java (revision 0) +++ lams_tool_lamc/src/java/org/lamsfoundation/lams/tool/mc/pojos/McUsrAttempt.java (revision df74c2ae9ad3fd2a2e559fdc6ab92593204c7090) @@ -0,0 +1,278 @@ +/*************************************************************************** + * 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.pojos; + +import java.io.Serializable; +import java.util.Date; + +import org.apache.commons.lang.builder.ToStringBuilder; + + +/** + *Persistent object/bean that defines the user attempt for the MCQ tool. + * Provides accessors and mutators to get/set attributes + * It maps to database table: tl_lamc11_usr_attempt + *
+ * + * @author Ozgur Demirtas + */ +public class McUsrAttempt implements Serializable { + + /** identifier field */ + private Long uid; + + /** persistent field */ + private Long attemptId; + + /** nullable persistent field */ + private Date attemptTime; + + /** nullable persistent field */ + private String timeZone; + + private Integer mark; + + private boolean attemptCorrect; + + private boolean passed; + + private Integer attemptOrder; + + private Long queUsrId; + + private Long mcQueContentId; + + /** persistent field */ + private org.lamsfoundation.lams.tool.mc.pojos.McQueContent mcQueContent; + + /** persistent field */ + private org.lamsfoundation.lams.tool.mc.pojos.McQueUsr mcQueUsr; + + /** persistent field */ + private org.lamsfoundation.lams.tool.mc.pojos.McOptsContent mcOptionsContent; + + /** full constructor */ + public McUsrAttempt(Long attemptId, Date attemptTime, String timeZone, org.lamsfoundation.lams.tool.mc.pojos.McQueContent mcQueContent, + org.lamsfoundation.lams.tool.mc.pojos.McQueUsr mcQueUsr, org.lamsfoundation.lams.tool.mc.pojos.McOptsContent mcOptionsContent) { + this.attemptId = attemptId; + this.attemptTime = attemptTime; + this.timeZone = timeZone; + this.mcQueContent = mcQueContent; + this.mcQueUsr = mcQueUsr; + this.mcOptionsContent = mcOptionsContent; + } + + public McUsrAttempt(Date attemptTime, String timeZone, org.lamsfoundation.lams.tool.mc.pojos.McQueContent mcQueContent, + org.lamsfoundation.lams.tool.mc.pojos.McQueUsr mcQueUsr, org.lamsfoundation.lams.tool.mc.pojos.McOptsContent mcOptionsContent) { + this.attemptTime = attemptTime; + this.timeZone = timeZone; + this.mcQueContent = mcQueContent; + this.mcQueUsr = mcQueUsr; + this.mcOptionsContent = mcOptionsContent; + } + + public McUsrAttempt(Date attemptTime, String timeZone, org.lamsfoundation.lams.tool.mc.pojos.McQueContent mcQueContent, + org.lamsfoundation.lams.tool.mc.pojos.McQueUsr mcQueUsr, org.lamsfoundation.lams.tool.mc.pojos.McOptsContent mcOptionsContent, Integer mark, boolean passed) { + this.attemptTime = attemptTime; + this.timeZone = timeZone; + this.mcQueContent = mcQueContent; + this.mcQueUsr = mcQueUsr; + this.mcOptionsContent = mcOptionsContent; + this.mark = mark; + this.passed = passed; + } + + public McUsrAttempt(Date attemptTime, String timeZone, org.lamsfoundation.lams.tool.mc.pojos.McQueContent mcQueContent, + org.lamsfoundation.lams.tool.mc.pojos.McQueUsr mcQueUsr, org.lamsfoundation.lams.tool.mc.pojos.McOptsContent mcOptionsContent, Integer mark, boolean passed, Integer attemptOrder) { + this.attemptTime = attemptTime; + this.timeZone = timeZone; + this.mcQueContent = mcQueContent; + this.mcQueUsr = mcQueUsr; + this.mcOptionsContent = mcOptionsContent; + this.mark = mark; + this.passed = passed; + this.attemptOrder=attemptOrder; + } + + public McUsrAttempt(Date attemptTime, String timeZone, org.lamsfoundation.lams.tool.mc.pojos.McQueContent mcQueContent, + org.lamsfoundation.lams.tool.mc.pojos.McQueUsr mcQueUsr, org.lamsfoundation.lams.tool.mc.pojos.McOptsContent mcOptionsContent, Integer mark, boolean passed, Integer attemptOrder, boolean attemptCorrect) { + this.attemptTime = attemptTime; + this.timeZone = timeZone; + this.mcQueContent = mcQueContent; + this.mcQueUsr = mcQueUsr; + this.mcOptionsContent = mcOptionsContent; + this.mark = mark; + this.passed = passed; + this.attemptOrder=attemptOrder; + this.attemptCorrect=attemptCorrect; + } + + + /** default constructor */ + public McUsrAttempt() { + } + + /** minimal constructor */ + public McUsrAttempt(Long attemptId, org.lamsfoundation.lams.tool.mc.pojos.McQueContent mcQueContent, org.lamsfoundation.lams.tool.mc.pojos.McQueUsr mcQueUsr, org.lamsfoundation.lams.tool.mc.pojos.McOptsContent mcOptionsContent) { + this.attemptId = attemptId; + this.mcQueContent = mcQueContent; + this.mcQueUsr = mcQueUsr; + this.mcOptionsContent = mcOptionsContent; + } + + public Long getUid() { + return this.uid; + } + + public void setUid(Long uid) { + this.uid = uid; + } + + public Long getAttemptId() { + return this.attemptId; + } + + public void setAttemptId(Long attemptId) { + this.attemptId = attemptId; + } + + public Date getAttemptTime() { + return this.attemptTime; + } + + public void setAttemptTime(Date attemptTime) { + this.attemptTime = attemptTime; + } + + public String getTimeZone() { + return this.timeZone; + } + + public void setTimeZone(String timeZone) { + this.timeZone = timeZone; + } + + public org.lamsfoundation.lams.tool.mc.pojos.McQueContent getMcQueContent() { + return this.mcQueContent; + } + + public void setMcQueContent(org.lamsfoundation.lams.tool.mc.pojos.McQueContent mcQueContent) { + this.mcQueContent = mcQueContent; + } + + public org.lamsfoundation.lams.tool.mc.pojos.McQueUsr getMcQueUsr() { + return this.mcQueUsr; + } + + public void setMcQueUsr(org.lamsfoundation.lams.tool.mc.pojos.McQueUsr mcQueUsr) { + this.mcQueUsr = mcQueUsr; + } + + public org.lamsfoundation.lams.tool.mc.pojos.McOptsContent getMcOptionsContent() { + return this.mcOptionsContent; + } + + public void setMcOptionsContent(org.lamsfoundation.lams.tool.mc.pojos.McOptsContent mcOptionsContent) { + this.mcOptionsContent = mcOptionsContent; + } + + public String toString() { + return new ToStringBuilder(this) + .append("uid", getUid()) + .toString(); + } + + /** + * @return Returns the mark. + */ + public Integer getMark() { + return mark; + } + /** + * @param mark The mark to set. + */ + public void setMark(Integer mark) { + this.mark = mark; + } + /** + * @return Returns the passed. + */ + public boolean isPassed() { + return passed; + } + /** + * @param passed The passed to set. + */ + public void setPassed(boolean passed) { + this.passed = passed; + } + /** + * @return Returns the queUsrId. + */ + public Long getQueUsrId() { + return queUsrId; + } + /** + * @param queUsrId The queUsrId to set. + */ + public void setQueUsrId(Long queUsrId) { + this.queUsrId = queUsrId; + } + /** + * @return Returns the attemptOrder. + */ + public Integer getAttemptOrder() { + return attemptOrder; + } + /** + * @param attemptOrder The attemptOrder to set. + */ + public void setAttemptOrder(Integer attemptOrder) { + this.attemptOrder = attemptOrder; + } + /** + * @return Returns the mcQueContentId. + */ + public Long getMcQueContentId() { + return mcQueContentId; + } + /** + * @param mcQueContentId The mcQueContentId to set. + */ + public void setMcQueContentId(Long mcQueContentId) { + this.mcQueContentId = mcQueContentId; + } + + /** + * @return Returns the attemptCorrect. + */ + public boolean isAttemptCorrect() { + return attemptCorrect; + } + /** + * @param attemptCorrect The attemptCorrect to set. + */ + public void setAttemptCorrect(boolean attemptCorrect) { + this.attemptCorrect = attemptCorrect; + } +}