001: /**********************************************************************************
002: * $URL: https://source.sakaiproject.org/svn/sam/tags/sakai_2-4-1/samigo-hibernate/src/java/org/sakaiproject/tool/assessment/data/dao/assessment/PublishedFeedback.java $
003: * $Id: PublishedFeedback.java 15083 2006-09-20 20:03:55Z lydial@stanford.edu $
004: ***********************************************************************************
005: *
006: * Copyright (c) 2004, 2005, 2006 The Sakai Foundation.
007: *
008: * Licensed under the Educational Community License, Version 1.0 (the"License");
009: * you may not use this file except in compliance with the License.
010: * You may obtain a copy of the License at
011: *
012: * http://www.opensource.org/licenses/ecl1.php
013: *
014: * Unless required by applicable law or agreed to in writing, software
015: * distributed under the License is distributed on an "AS IS" BASIS,
016: * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
017: * See the License for the specific language governing permissions and
018: * limitations under the License.
019: *
020: **********************************************************************************/package org.sakaiproject.tool.assessment.data.dao.assessment;
021:
022: import org.sakaiproject.tool.assessment.data.ifc.assessment.AssessmentBaseIfc;
023: import org.sakaiproject.tool.assessment.data.ifc.assessment.AssessmentFeedbackIfc;
024: import org.sakaiproject.tool.assessment.data.ifc.assessment.AssessmentIfc;
025:
026: public class PublishedFeedback implements java.io.Serializable,
027: AssessmentFeedbackIfc {
028: /**
029: *
030: */
031: private static final long serialVersionUID = 6725754767789047244L;
032: private Long id;
033: private AssessmentIfc assessment;
034: private Integer feedbackDelivery; // 0 = cannot edit, 1=immediate, 2=on specific date , 3= no feedback
035: private Integer feedbackAuthoring; // 0 = cannot edit, 1=questionlevel, 2=sectionlevel, 3= both feedback
036: private Integer editComponents; // 0 = cannot
037: private Boolean showQuestionText;
038: private Boolean showStudentResponse;
039: private Boolean showCorrectResponse;
040: private Boolean showStudentScore;
041: private Boolean showStudentQuestionScore;
042: private Boolean showQuestionLevelFeedback;
043: private Boolean showSelectionLevelFeedback; // must be MC
044: private Boolean showGraderComments;
045: private Boolean showStatistics;
046: private Long assessmentId;
047:
048: /**
049: * Creates a new SubmissionModel object.
050: */
051: public PublishedFeedback() {
052: setShowCorrectResponse(Boolean.FALSE);
053: setShowGraderComments(Boolean.FALSE);
054: setShowQuestionLevelFeedback(Boolean.FALSE);
055: setShowQuestionText(Boolean.TRUE);
056: setShowSelectionLevelFeedback(Boolean.FALSE);
057: setShowStatistics(Boolean.FALSE);
058: setShowStudentScore(Boolean.FALSE);
059: setShowStudentQuestionScore(Boolean.FALSE);
060: setFeedbackDelivery(AssessmentFeedbackIfc.NO_FEEDBACK);
061: setFeedbackAuthoring(AssessmentFeedbackIfc.QUESTIONLEVEL_FEEDBACK);
062: }
063:
064: public PublishedFeedback(Long assessmentId,
065: Integer feedbackDelivery, Integer feedbackAuthoring,
066: Integer editComponents, Boolean showQuestionText,
067: Boolean showStudentResponse, Boolean showCorrectResponse,
068: Boolean showStudentScore, Boolean showStudentQuestionScore,
069: Boolean showQuestionLevelFeedback,
070: Boolean showSelectionLevelFeedback,
071: Boolean showGraderComments, Boolean showStatistics) {
072: this .assessmentId = assessmentId;
073: this .feedbackDelivery = feedbackDelivery;
074: this .feedbackAuthoring = feedbackAuthoring;
075: this .editComponents = editComponents;
076: this .showQuestionText = showQuestionText;
077: this .showStudentResponse = showStudentResponse;
078: this .showCorrectResponse = showCorrectResponse;
079: this .showStudentScore = showStudentScore;
080: this .showStudentQuestionScore = showStudentQuestionScore;
081: this .showQuestionLevelFeedback = showQuestionLevelFeedback;
082: this .showSelectionLevelFeedback = showSelectionLevelFeedback; // must be MC
083: this .showGraderComments = showGraderComments;
084: this .showStatistics = showStatistics;
085: }
086:
087: public PublishedFeedback(Integer feedbackDelivery,
088: Integer feedbackAuthoring, Integer editComponents,
089: Boolean showQuestionText, Boolean showStudentResponse,
090: Boolean showCorrectResponse, Boolean showStudentScore,
091: Boolean showStudentQuestionScore,
092: Boolean showQuestionLevelFeedback,
093: Boolean showSelectionLevelFeedback,
094: Boolean showGraderComments, Boolean showStatistics) {
095: this .feedbackDelivery = feedbackDelivery;
096: this .feedbackAuthoring = feedbackAuthoring;
097: this .editComponents = editComponents;
098: this .showQuestionText = showQuestionText;
099: this .showStudentResponse = showStudentResponse;
100: this .showCorrectResponse = showCorrectResponse;
101: this .showStudentScore = showStudentScore;
102: this .showStudentQuestionScore = showStudentQuestionScore;
103: this .showQuestionLevelFeedback = showQuestionLevelFeedback;
104: this .showSelectionLevelFeedback = showSelectionLevelFeedback; // must be MC
105: this .showGraderComments = showGraderComments;
106: this .showStatistics = showStatistics;
107: }
108:
109: public Object clone() throws CloneNotSupportedException {
110: Object cloned = new PublishedFeedback(this
111: .getFeedbackDelivery(), this .getFeedbackAuthoring(),
112: this .getEditComponents(), this .getShowQuestionText(),
113: this .getShowStudentResponse(), this
114: .getShowCorrectResponse(), this
115: .getShowStudentScore(), this
116: .getShowStudentQuestionScore(), this
117: .getShowQuestionLevelFeedback(), this
118: .getShowSelectionLevelFeedback(), this
119: .getShowGraderComments(), this
120: .getShowStatistics());
121: return cloned;
122: }
123:
124: public Long getId() {
125: return id;
126: }
127:
128: public void setId(Long id) {
129: this .id = id;
130: }
131:
132: public void setAssessment(AssessmentIfc assessment) {
133: this .assessment = assessment;
134: }
135:
136: public AssessmentIfc getAssessment() {
137: return (AssessmentIfc) assessment;
138: }
139:
140: public void setAssessmentBase(AssessmentBaseIfc assessment) {
141: setAssessment((AssessmentIfc) assessment);
142: }
143:
144: public AssessmentBaseIfc getAssessmentBase() {
145: return getAssessment();
146: }
147:
148: public Integer getFeedbackDelivery() {
149: return feedbackDelivery;
150: }
151:
152: public void setFeedbackDelivery(Integer feedbackDelivery) {
153: this .feedbackDelivery = feedbackDelivery;
154: }
155:
156: public Integer getFeedbackAuthoring() {
157: return feedbackAuthoring;
158: }
159:
160: public void setFeedbackAuthoring(Integer feedbackAuthoring) {
161: this .feedbackAuthoring = feedbackAuthoring;
162: }
163:
164: public Integer getEditComponents() {
165: return editComponents;
166: }
167:
168: public void setEditComponents(Integer editComponents) {
169: this .editComponents = editComponents;
170: }
171:
172: public Boolean getShowQuestionText() {
173: return showQuestionText;
174: }
175:
176: public void setShowQuestionText(Boolean showQuestionText) {
177: this .showQuestionText = showQuestionText;
178: }
179:
180: public Boolean getShowStudentResponse() {
181: return showStudentResponse;
182: }
183:
184: public void setShowStudentResponse(Boolean showStudentResponse) {
185: this .showStudentResponse = showStudentResponse;
186: }
187:
188: public Boolean getShowCorrectResponse() {
189: return showCorrectResponse;
190: }
191:
192: public void setShowCorrectResponse(Boolean showCorrectResponse) {
193: this .showCorrectResponse = showCorrectResponse;
194: }
195:
196: public Boolean getShowStudentScore() {
197: return showStudentScore;
198: }
199:
200: public void setShowStudentScore(Boolean showStudentScore) {
201: this .showStudentScore = showStudentScore;
202: }
203:
204: public Boolean getShowStudentQuestionScore() {
205: return showStudentQuestionScore;
206: }
207:
208: public void setShowStudentQuestionScore(
209: Boolean showStudentQuestionScore) {
210: this .showStudentQuestionScore = showStudentQuestionScore;
211: }
212:
213: public Boolean getShowQuestionLevelFeedback() {
214: return showQuestionLevelFeedback;
215: }
216:
217: public void setShowQuestionLevelFeedback(
218: Boolean showQuestionLevelFeedback) {
219: this .showQuestionLevelFeedback = showQuestionLevelFeedback;
220: }
221:
222: public Boolean getShowSelectionLevelFeedback() {
223: return showSelectionLevelFeedback;
224: }
225:
226: public void setShowSelectionLevelFeedback(
227: Boolean showSelectionLevelFeedback) {
228: this .showSelectionLevelFeedback = showSelectionLevelFeedback;
229: }
230:
231: public Boolean getShowGraderComments() {
232: return showGraderComments;
233: }
234:
235: public void setShowGraderComments(Boolean showGraderComments) {
236: this .showGraderComments = showGraderComments;
237: }
238:
239: public Boolean getShowStatistics() {
240: return showStatistics;
241: }
242:
243: public void setShowStatistics(Boolean showStatistics) {
244: this .showStatistics = showStatistics;
245: }
246:
247: public Long getAssessmentId() {
248: return this .assessmentId;
249: }
250:
251: public void setAssessmentId(Long assessmentId) {
252: this.assessmentId = assessmentId;
253: }
254:
255: }
|