01: /**********************************************************************************
02: *
03: * $Id: CourseGradesToSpreadsheetConverter.java 22061 2007-03-01 22:54:37Z ray@media.berkeley.edu $
04: *
05: ***********************************************************************************
06: *
07: * Copyright (c) 2007 The Regents of the University of California
08: *
09: * Licensed under the Educational Community License, Version 1.0 (the "License");
10: * you may not use this file except in compliance with the License.
11: * You may obtain a copy of the License at
12: *
13: * http://www.opensource.org/licenses/ecl1.php
14: *
15: * Unless required by applicable law or agreed to in writing, software
16: * distributed under the License is distributed on an "AS IS" BASIS,
17: * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
18: * See the License for the specific language governing permissions and
19: * limitations under the License.
20: *
21: **********************************************************************************/package org.sakaiproject.tool.gradebook;
22:
23: import java.util.List;
24: import java.util.Map;
25:
26: import org.sakaiproject.section.api.coursemanagement.EnrollmentRecord;
27:
28: /**
29: * Interface to let institutions intercept course grade spreadsheet download requests.
30: */
31: public interface CourseGradesToSpreadsheetConverter {
32: /**
33: * This method is called by the Course Grade UI after gathering filtered enrollment
34: * records and course grade records, and before actually formatting and downloading
35: * the XLS or CSV file. Customized implementations could, for example, call out to
36: * the course management service and change or add columns to the generic data table
37: * which is sent on to be formatted.
38: *
39: * @param enrollments
40: * @param courseGrade
41: * @param gradesMap a map of student UIDs to grade records
42: * @return a spreadsheet-like list of rows, each of which is a list of column values;
43: * the first row should contain header strings
44: */
45: public List<List<Object>> getSpreadsheetData(
46: List<EnrollmentRecord> enrollments,
47: CourseGrade courseGrade,
48: Map<String, CourseGradeRecord> gradesMap);
49: }
|