01: /**********************************************************************************
02: * $URL: https://source.sakaiproject.org/svn/sam/trunk/component/src/java/org/sakaiproject/tool/assessment/integration/helper/ifc/SectionAwareServiceHelper.java $
03: * $Id: SectionAwareServiceHelper.java 9273 2006-05-10 22:34:28Z daisyf@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.integration.helper.ifc;
21:
22: import java.util.*;
23:
24: /**
25: * Facade to external role and authorization service.
26: * based Ray's gradebook code
27: */
28: public interface SectionAwareServiceHelper {
29: public boolean isUserAbleToGrade(String siteid, String userUid);
30:
31: public boolean isUserAbleToGradeAll(String siteid, String userUid);
32:
33: public boolean isUserAbleToGradeSection(String sectionUid,
34: String userUid);
35:
36: public boolean isUserAbleToEdit(String siteid, String userUid);
37:
38: public boolean isUserGradable(String siteid, String userUid);
39:
40: /**
41: * @return
42: * an EnrollmentRecord list for each student that the current user
43: * is allowed to grade.
44: */
45: public List getAvailableEnrollments(String siteid, String userUid);
46:
47: /**
48: * @return
49: * a CourseSection list for each group that the current user
50: * belongs to.
51: */
52: public List getAvailableSections(String siteid, String userUid);
53:
54: /**
55: * The section enrollment list will not be returned unless the user
56: * has access to it.
57: *
58: * @return
59: * an EnrollmentRecord list for all the students in the given group.
60: */
61: public List getSectionEnrollments(String siteid, String sectionUid,
62: String userUid);
63:
64: /**
65: * @param searchString
66: * a substring search for student name or display UID; the exact rules are
67: * up to the implementation
68: *
69: * @param optionalSectionUid
70: * null if the search should be made across all sections
71: *
72: * @return
73: * an EnrollmentRecord list for all matching available students.
74: */
75: public List findMatchingEnrollments(String siteid,
76: String searchString, String optionalSectionUid,
77: String userUid);
78:
79: /**
80: * @param sectionId
81: *
82: * @param studentId
83: *
84: * @param Role
85: * @return
86: * whether a member belongs to a section under a certain role
87: */
88:
89: public boolean isSectionMemberInRoleStudent(String sectionId,
90: String studentId);
91:
92: }
|