01: /**********************************************************************************
02: * $URL: https://source.sakaiproject.org/svn/sam/tags/sakai_2-4-1/samigo-api/src/java/org/sakaiproject/tool/assessment/shared/api/grading/GradingSectionAwareServiceAPI.java $
03: * $Id: GradingSectionAwareServiceAPI.java 11305 2006-06-29 00:26:24Z 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.shared.api.grading;
21:
22: import java.util.List;
23:
24: /**
25: *
26: * The GradingServiceAPI implements the shared interface to get grading information.
27: * @author Ed Smiley <esmiley@stanford.edu>
28: */
29:
30: public interface GradingSectionAwareServiceAPI {
31:
32: public boolean isUserAbleToGrade(String siteId, String userUid);
33:
34: public boolean isUserAbleToGradeAll(String siteId, String userUid);
35:
36: public boolean isUserAbleToGradeSection(String siteId,
37: String userUid);
38:
39: public boolean isUserAbleToEdit(String siteId, String userUid);
40:
41: public boolean isUserGradable(String siteId, String userUid);
42:
43: /**
44: * @return
45: * an EnrollmentRecord list for each student that the current user
46: * is allowed to grade.
47: */
48: public List getAvailableEnrollments(String siteId, String userUid);
49:
50: /**
51: * @return
52: * a CourseSection list for each group that the current user
53: * belongs to.
54: */
55: public List getAvailableSections(String siteId, String userUid);
56:
57: /**
58: * The section enrollment list will not be returned unless the user
59: * has access to it.
60: *
61: * @return
62: * an EnrollmentRecord list for all the students in the given group.
63: */
64: public List getSectionEnrollments(String siteId, String sectionUid,
65: String userUid);
66:
67: /**
68: * @param searchString
69: * a substring search for student name or display UID; the exact rules are
70: * up to the implementation
71: *
72: * @param optionalSectionUid
73: * null if the search should be made across all sections
74: *
75: * @return
76: * an EnrollmentRecord list for all matching available students.
77: */
78: public List findMatchingEnrollments(String siteId,
79: String searchString, String optionalSectionUid,
80: String userUid);
81:
82: /**
83: * @param sectionId
84: *
85: * @param studentId
86: *
87: * @return
88: * whether a student belongs to a section
89: */
90: public boolean isSectionMemberInRoleStudent(String sectionId,
91: String studentId);
92:
93: }
|