001: /**********************************************************************************
002: * $URL: https://source.sakaiproject.org/svn/sam/trunk/component/src/java/org/sakaiproject/tool/assessment/facade/AssessmentGradingFacadeQueriesAPI.java $
003: * $Id: AssessmentGradingFacadeQueriesAPI.java 9273 2006-05-10 22:34:28Z daisyf@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.facade;
021:
022: import java.util.ArrayList;
023: import java.util.Collection;
024: import java.util.Date;
025: import java.util.HashMap;
026: import java.util.HashSet;
027: import java.util.List;
028: import java.util.Set;
029:
030: //import org.sakaiproject.tool.assessment.data.dao.assessment.PublishedAssessmentData;
031: //import org.sakaiproject.tool.assessment.data.dao.assessment.PublishedItemData;
032: import org.sakaiproject.tool.assessment.data.dao.grading.AssessmentGradingData;
033: import org.sakaiproject.tool.assessment.data.dao.grading.ItemGradingData;
034: import org.sakaiproject.tool.assessment.data.dao.grading.MediaData;
035: import org.sakaiproject.tool.assessment.data.ifc.assessment.PublishedAssessmentIfc;
036: import org.sakaiproject.tool.assessment.data.ifc.grading.AssessmentGradingIfc;
037: import org.sakaiproject.tool.assessment.data.ifc.grading.ItemGradingIfc;
038: import org.sakaiproject.tool.assessment.data.ifc.grading.StudentGradingSummaryIfc;
039:
040: public interface AssessmentGradingFacadeQueriesAPI {
041:
042: public List getTotalScores(String publishedId, String which);
043:
044: public List getAllSubmissions(String publishedId);
045:
046: public HashMap getItemScores(Long publishedId, Long itemId,
047: String which);
048:
049: /**
050: * This returns a hashmap of all the latest item entries, keyed by
051: * item id for easy retrieval.
052: */
053: public HashMap getLastItemGradingData(Long publishedId,
054: String agentId);
055:
056: /**
057: * This returns a hashmap of all the submitted items, keyed by
058: * item id for easy retrieval.
059: */
060: public HashMap getStudentGradingData(String assessmentGradingId);
061:
062: public HashMap getSubmitData(Long publishedId, String agentId,
063: Integer scoringoption);
064:
065: // public void saveTotalScores(ArrayList data);
066:
067: //public void saveItemScores(ArrayList data, HashMap map);
068:
069: /**
070: * Assume this is a new item.
071: */
072: //public void storeGrades(AssessmentGradingIfc data);
073: /**
074: * This is the big, complicated mess where we take all the items in
075: * an assessment, store the grading data, auto-grade it, and update
076: * everything.
077: *
078: * If regrade is true, we just recalculate the graded score. If it's
079: * false, we do everything from scratch.
080: */
081: //public void storeGrades(AssessmentGradingIfc data, boolean regrade);
082: /**
083: * This grades multiple choice and true false questions. Since
084: * multiple choice/multiple select has a separate ItemGradingIfc for
085: * each choice, they're graded the same way the single choice are.
086: * Choices should be given negative score values if one wants them
087: * to lose points for the wrong choice.
088: */
089: //public float getAnswerScore(ItemGradingIfc data);
090: public Long add(AssessmentGradingData a);
091:
092: public int getSubmissionSizeOfPublishedAssessment(
093: Long publishedAssessmentId);
094:
095: public HashMap getSubmissionSizeOfAllPublishedAssessments();
096:
097: public Long saveMedia(byte[] media, String mimeType);
098:
099: public Long saveMedia(MediaData mediaData);
100:
101: public void removeMediaById(Long mediaId);
102:
103: public MediaData getMedia(Long mediaId);
104:
105: public ArrayList getMediaArray(Long itemGradingId);
106:
107: public ArrayList getMediaArray(ItemGradingData item);
108:
109: public List getMediaArray(Long publishedItemId, Long agentId,
110: String which);
111:
112: public ItemGradingData getLastItemGradingDataByAgent(
113: Long publishedItemId, String agentId);
114:
115: public ItemGradingData getItemGradingData(Long assessmentGradingId,
116: Long publishedItemId);
117:
118: public AssessmentGradingData load(Long id);
119:
120: public ItemGradingData getItemGrading(Long id);
121:
122: public AssessmentGradingIfc getLastAssessmentGradingByAgentId(
123: Long publishedAssessmentId, String agentIdString);
124:
125: public AssessmentGradingData getLastSavedAssessmentGradingByAgentId(
126: Long publishedAssessmentId, String agentIdString);
127:
128: public AssessmentGradingData getLastSubmittedAssessmentGradingByAgentId(
129: Long publishedAssessmentId, String agentIdString);
130:
131: public List getLastAssessmentGradingList(Long publishedAssessmentId);
132:
133: public List getLastSubmittedAssessmentGradingList(
134: Long publishedAssessmentId);
135:
136: public void saveItemGrading(ItemGradingIfc item);
137:
138: public void saveOrUpdateAssessmentGrading(
139: AssessmentGradingIfc assessment);
140:
141: //public void setIsLate(AssessmentGradingIfc assessment);
142:
143: public List getAssessmentGradingIds(Long publishedItemId);
144:
145: public AssessmentGradingIfc getHighestAssessmentGrading(
146: Long publishedAssessmentId, String agentId);
147:
148: public AssessmentGradingIfc getHighestSubmittedAssessmentGrading(
149: Long publishedAssessmentId, String agentId);
150:
151: public HashMap getLastAssessmentGradingByPublishedItem(
152: Long publishedAssessmentId);
153:
154: public HashMap getHighestAssessmentGradingByPublishedItem(
155: Long publishedAssessmentId);
156:
157: public List getHighestAssessmentGradingList(
158: Long publishedAssessmentId);
159:
160: public List getHighestSubmittedAssessmentGradingList(
161: Long publishedAssessmentId);
162:
163: public Set getItemGradingSet(Long assessmentGradingId);
164:
165: public HashMap getAssessmentGradingByItemGradingId(
166: Long publishedAssessmentId);
167:
168: public void deleteAll(Collection c);
169:
170: public void saveOrUpdateAll(Collection c);
171:
172: public PublishedAssessmentIfc getPublishedAssessmentByAssessmentGradingId(
173: Long assessmentGradingId);
174:
175: public PublishedAssessmentIfc getPublishedAssessmentByPublishedItemId(
176: Long publishedItemId);
177:
178: public ArrayList getLastItemGradingDataPosition(
179: Long assessmentGradingId, String agentId);
180:
181: public List getItemGradingIds(Long assessmentGradingId);
182:
183: public HashSet getItemSet(Long publishedAssessmentId, Long sectionId);
184:
185: public Long getTypeId(Long itemGradingId);
186:
187: public List getAllAssessmentGradingByAgentId(
188: Long publishedAssessmentId, String agentIdString);
189:
190: public int getActualNumberRetake(Long publishedAssessmentId,
191: String agentIdString);
192:
193: public List getStudentGradingSummaryData(
194: Long publishedAssessmentId, String agentIdString);
195:
196: public int getNumberRetake(Long publishedAssessmentId,
197: String agentIdString);
198:
199: public void saveStudentGradingSummaryData(
200: StudentGradingSummaryIfc studentGradingSummaryData);
201:
202: public int getLateSubmissionsNumberByAgentId(
203: Long publishedAssessmentId, String agentIdString,
204: Date dueDate);
205: }
|