01: /**********************************************************************************
02: * $URL: https://source.sakaiproject.org/svn/sam/tags/sakai_2-4-1/samigo-app/src/java/org/sakaiproject/tool/assessment/ui/bean/author/AnswerBean.java $
03: * $Id: AnswerBean.java 22608 2007-03-14 19:27:17Z lydial@stanford.edu $
04: ***********************************************************************************
05: *
06: * Copyright (c) 2004, 2005, 2006 The Sakai Foundation.
07: *
08: * Licensed under the Educational Community License, Version 1.0 (the"License");
09: * you may not use this file except in compliance with the License.
10: * You may obtain a copy of the License at
11: *
12: * http://www.opensource.org/licenses/ecl1.php
13: *
14: * Unless required by applicable law or agreed to in writing, software
15: * distributed under the License is distributed on an "AS IS" BASIS,
16: * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
17: * See the License for the specific language governing permissions and
18: * limitations under the License.
19: *
20: **********************************************************************************/package org.sakaiproject.tool.assessment.ui.bean.author;
21:
22: import java.io.Serializable;
23: import org.sakaiproject.util.ResourceLoader;
24:
25: public class AnswerBean implements Serializable {
26:
27: private static final long serialVersionUID = 7526471155622776147L;
28:
29: private String text;
30: private Long sequence;
31: private String label;
32: private String feedback;
33: private Boolean isCorrect;
34: private static ResourceLoader rb = new ResourceLoader(
35: "org.sakaiproject.tool.assessment.bundle.AuthorMessages");
36:
37: public static final String choiceLabels = rb
38: .getString("choice_labels");
39:
40: public AnswerBean() {
41: }
42:
43: public AnswerBean(String ptext, Long pseq, String plabel,
44: String pfdbk, Boolean pcorr, String pgrade, Float pscore) {
45: this .text = ptext;
46: this .sequence = pseq;
47: this .label = plabel;
48: this .feedback = pfdbk;
49: this .isCorrect = pcorr;
50:
51: }
52:
53: public String getText() {
54: return text;
55: }
56:
57: public void setText(String text) {
58: this .text = text;
59: }
60:
61: public Long getSequence() {
62: return sequence;
63: }
64:
65: public void setSequence(Long sequence) {
66: this .sequence = sequence;
67: }
68:
69: public String getLabel() {
70: return label;
71: }
72:
73: public void setLabel(String label) {
74: this .label = label;
75: }
76:
77: public String getFeedback() {
78: return feedback;
79: }
80:
81: public void setFeedback(String feedback) {
82: this .feedback = feedback;
83: }
84:
85: public Boolean getIsCorrect() {
86: return isCorrect;
87: }
88:
89: public void setIsCorrect(Boolean isCorrect) {
90: this .isCorrect = isCorrect;
91: }
92:
93: public static String[] getChoiceLabels() {
94: String[] lables = choiceLabels.split(":");
95: return lables;
96: }
97:
98: }
|