001: /**********************************************************************************
002: * $URL: https://source.sakaiproject.org/svn/sam/tags/sakai_2-4-1/samigo-app/src/java/org/sakaiproject/tool/assessment/ui/bean/select/SelectAssessmentBean.java $
003: * $Id: SelectAssessmentBean.java 16948 2006-10-10 21:49:01Z 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.ui.bean.select;
021:
022: import java.io.Serializable;
023:
024: import java.util.ArrayList;
025:
026: /**
027: *
028: * <p>Title: sakaiproject.org</p>
029: * <p>Description: OKI based implementation</p>
030: * <p>Copyright (c) 2003, 2004 The Regents of the University of Michigan, Trustees of Indiana University,
031: * Board of Trustees of the Leland Stanford, Jr., University, and The MIT Corporation
032: * </p>
033: * @author <a href="mailto:lance@indiana.edu">Lance Speelmon</a>
034: * @version $Id: SelectAssessmentBean.java 16948 2006-10-10 21:49:01Z lydial@stanford.edu $
035: *
036: * Used to be org.navigoproject.ui.web.asi.select.SelectAssessmentForm.java
037: */
038: public class SelectAssessmentBean implements Serializable {
039: private ArrayList takeableAssessments;
040:
041: /** Use serialVersionUID for interoperability. */
042: private final static long serialVersionUID = 7401578412639293693L;
043: private ArrayList lateHandlingAssessments;
044: private ArrayList reviewableAssessments;
045: private ArrayList nonReviewableAssessments;
046: private String reviewableSortOrder = "title";
047: private String takeableSortOrder = "title";
048: private boolean takeableAscending = true;
049: private boolean reviewableAscending = true;
050: private org.sakaiproject.tool.assessment.ui.model.PagingModel reviewPager;
051: private org.sakaiproject.tool.assessment.ui.model.PagingModel takePager;
052: private boolean hasHighestMultipleSubmission = false; // this is used to display the message on the bottom if there are any highest multiple submissions.
053:
054: /**
055: * ArrayLists should be lists of DeliveryBean objects
056: *
057: * @return ArrayLists of DeliveryBean objects
058: */
059: public ArrayList getTakeableAssessments() {
060: return takeableAssessments;
061: }
062:
063: /**
064: * ArrayLists should be lists of DeliveryBean objects
065: *
066: * @param takeableAssessments ArrayLists of DeliveryBean objects
067: */
068: public void setTakeableAssessments(ArrayList takeableAssessments) {
069: this .takeableAssessments = takeableAssessments;
070: }
071:
072: /**
073: * ArrayLists should be lists of DeliveryBean objects
074: *
075: * @return ArrayLists of DeliveryBean objects
076: */
077: public ArrayList getLateHandlingAssessments() {
078: return lateHandlingAssessments;
079: }
080:
081: /**
082: * ArrayLists should be lists of DeliveryBean objects
083: *
084: * @param lateHandlingAssessments ArrayLists of DeliveryBean objects
085: */
086: public void setLateHandlingAssessments(
087: ArrayList lateHandlingAssessments) {
088: this .lateHandlingAssessments = lateHandlingAssessments;
089: }
090:
091: /**
092: * ArrayLists should be lists of DeliveryBean objects
093: *
094: * @return ArrayLists of DeliveryBean objects
095: */
096: public ArrayList getReviewableAssessments() {
097: return reviewableAssessments;
098: }
099:
100: /**
101: * ArrayLists should be lists of DeliveryBean objects
102: *
103: * @param reviewAssessments ArrayLists should be lists of DeliveryBean objects
104: */
105: public void setReviewableAssessments(ArrayList reviewableAssessments) {
106: this .reviewableAssessments = reviewableAssessments;
107: }
108:
109: /**
110: * ArrayLists should be lists of DeliveryBean objects
111: *
112: * @return ArrayLists of DeliveryBean objects
113: */
114: public ArrayList getNonReviewableAssessments() {
115: return this .nonReviewableAssessments;
116: }
117:
118: /**
119: * ArrayLists should be lists of DeliveryBean objects
120: *
121: * @param nonReviewableAssessments ArrayLists should be lists of DeliveryBean objects
122: */
123: public void setNonReviewableAssessments(
124: ArrayList nonReviewableAssessments) {
125: this .nonReviewableAssessments = nonReviewableAssessments;
126: }
127:
128: ////////////////////////////////////////////////////////////////
129: // not used right now
130: public org.sakaiproject.tool.assessment.ui.model.PagingModel getReviewPager() {
131: return reviewPager;
132: }
133:
134: public void setReviewPager(
135: org.sakaiproject.tool.assessment.ui.model.PagingModel reviewPager) {
136: this .reviewPager = reviewPager;
137: }
138:
139: public org.sakaiproject.tool.assessment.ui.model.PagingModel getTakePager() {
140: return takePager;
141: }
142:
143: public void setTakePager(
144: org.sakaiproject.tool.assessment.ui.model.PagingModel takePager) {
145: this .takePager = takePager;
146: }
147:
148: // sorting model
149: /**
150: * sort order for review table
151: * @return
152: */
153: public String getReviewableSortOrder() {
154: return reviewableSortOrder;
155: }
156:
157: /**
158: * ascending descending for review table
159: * @return
160: */
161: public boolean isReviewableAscending() {
162: return reviewableAscending;
163: }
164:
165: /**
166: * sort for take assessment table
167: * @return
168: */
169:
170: public String getTakeableSortOrder() {
171: return takeableSortOrder;
172: }
173:
174: /**
175: * sort for take assessment table
176: * @param sort
177: */
178: public void setTakeableSortOrder(String takeableSortOrder) {
179: this .takeableSortOrder = takeableSortOrder;
180: }
181:
182: /**
183: * sort for review assessment table
184: * @param sort
185: */
186: public void setReviewableSortOrder(String reviewableSortOrder) {
187: this .reviewableSortOrder = reviewableSortOrder;
188: }
189:
190: /**
191: *
192: * @param reviewableAscending
193: */
194: public void setReviewableAscending(boolean reviewableAscending) {
195: this .reviewableAscending = reviewableAscending;
196: }
197:
198: /**
199: * is takable table sorted in ascending order
200: * @return true if it is
201: */
202: public boolean isTakeableAscending() {
203: return takeableAscending;
204: }
205:
206: /**
207: *
208: * @param takeableAscending is takable table sorted in ascending order
209: */
210: public void setTakeableAscending(boolean takeableAscending) {
211: this .takeableAscending = takeableAscending;
212: }
213:
214: public boolean getIsThereAssessmentToTake() {
215: if (takeableAssessments == null
216: || takeableAssessments.size() == 0)
217:
218: return false;
219: else
220: return true;
221: }
222:
223: public boolean getIsThereAssessmentToReview() {
224:
225: if (reviewableAssessments == null
226: || reviewableAssessments.size() == 0)
227:
228: return false;
229: else
230: return true;
231: }
232:
233: /**
234: * @return Returns the hasHighestMultipleSubmission.
235: */
236: public boolean isHasHighestMultipleSubmission() {
237: return hasHighestMultipleSubmission;
238: }
239:
240: /**
241: * @param hasHighestMultipleSubmission The hasHighestMultipleSubmission to set.
242: */
243: public void setHasHighestMultipleSubmission(
244: boolean hasHighestMultipleSubmission) {
245: this.hasHighestMultipleSubmission = hasHighestMultipleSubmission;
246: }
247: }
|