org.sakaiproject.service.gradebook.shared
Interface GradebookPermissionService

All Known Implementing Classes:
GradebookPermissionServiceImpl

public interface GradebookPermissionService


Method Summary
 Map getAvailableItemsForStudent(Long gradebookId, String userId, String studentId, Collection courseSections)
          Get a map of itemId/permission(grade/view) of a student for a grader that he can grade or view for gradebook.
 Map getAvailableItemsForStudent(String gradebookUid, String userId, String studentId, Collection courseSections)
          Get a map of itemId/permission(grade/view) of a student for a grader that he can grade or view for gradebook.
 Map getAvailableItemsForStudents(Long gradebookId, String userId, List studentIds, Collection courseSections)
          Get a map of map for students whose IDs are in studentIds with id as key and another map as value: itemId/permission(grade/view) for a grader that he can grade or view for gradebook.
 Map getAvailableItemsForStudents(String gradebookUid, String userId, List studentIds, Collection courseSections)
          Get a map of map for students whose IDs are in studentIds with id as key and another map as value: itemId/permission(grade/view) for a grader that he can grade or view for gradebook.
 List<Long> getCategoriesForUser(Long gradebookId, String userId, List<Long> categoryIdList, int cateType)
          Get all available categories for a user that the user can either view or grade.
 List<Long> getCategoriesForUserForStudentView(Long gradebookId, String userId, String studentId, List<Long> categories, int cateType, List sectionIds)
          Returns viewable categorie id's for a user for a specific student
 Map getCourseGradePermission(Long gradebookId, String userId, List studentIds, List courseSections)
          Get a map with student IDs as key and view/grade as value for their course grade.
 Map getCourseGradePermission(String gradebookUid, String userId, List studentIds, List courseSections)
          Get a map with student IDs as key and view/grade as value for their course grade.
 List getGraderPermissionsForUser(Long gradebookId, String userId)
          Get all Permission records associated with this user and gradebook
 List getGraderPermissionsForUser(String gradebookUid, String userId)
          Get all Permission records associated with this user and gradebook
 boolean getPermissionForUserForAllAssignment(Long gradebookId, String userId)
          Get true/false value for current user which indicats if he has permission for all assignments in a gradebook with category turned off or he has permission for assignments without category associated with in a gradebook with category turned on.
 boolean getPermissionForUserForAllAssignmentForStudent(Long gradebookId, String userId, String studentId, List sectionIds)
          Get true/false value for current user which indicates if he has permission for all gb items for a given student
 Map getStudentsForItem(Long gradebookId, String userId, List studentIds, int cateType, Long categoryId, List courseSections)
          Get students IDs that the current grader can either view or grade.
 Map getStudentsForItem(String gradebookUid, String userId, List studentIds, int cateType, Long categoryId, List courseSections)
          Get students IDs that the current grader can either view or grade.
 List getViewableGroupsForUser(Long gradebookId, String userId, List groupIds)
          Get all group ids associated with groups that contain at least one member that the user is authorized to view/grade
 List getViewableGroupsForUser(String gradebookUid, String userId, List groupIds)
          Get all group ids associated with groups that contain at least one member that the user is authorized to view/grade
 List getViewableStudentsForUser(Long gradebookId, String userId, List studentIds, List sections)
          Get a unique list of students that the current user has grader permissions to view in some capacity
 List getViewableStudentsForUser(String gradebookUid, String userId, List studentIds, List sections)
          Get a unique list of students that the current user has grader permissions to view in some capacity
 

Method Detail

getCategoriesForUser

List<Long> getCategoriesForUser(Long gradebookId,
                                String userId,
                                List<Long> categoryIdList,
                                int cateType)
                                throws IllegalArgumentException
Get all available categories for a user that the user can either view or grade. (For overview page)

Parameters:
gradebookId - Gradebook ID
userId - grader ID
categoryList - List of Category. (should be all categories for this gradebook)
cateType - gradebook category type
Returns:
List of categories
Throws:
IllegalArgumentException

getCategoriesForUserForStudentView

List<Long> getCategoriesForUserForStudentView(Long gradebookId,
                                              String userId,
                                              String studentId,
                                              List<Long> categories,
                                              int cateType,
                                              List sectionIds)
                                              throws IllegalArgumentException
Returns viewable categorie id's for a user for a specific student

Parameters:
gradebookId -
userId -
studentId -
categories -
cateType -
sectionIds -
Returns:
Throws:
IllegalArgumentException

getPermissionForUserForAllAssignment

boolean getPermissionForUserForAllAssignment(Long gradebookId,
                                             String userId)
                                             throws IllegalArgumentException
Get true/false value for current user which indicats if he has permission for all assignments in a gradebook with category turned off or he has permission for assignments without category associated with in a gradebook with category turned on. (For overview page)

Parameters:
gradebookId - Gradebook ID
userId - grader ID
Returns:
boolean of true/false
Throws:
IllegalArgumentException

getPermissionForUserForAllAssignmentForStudent

boolean getPermissionForUserForAllAssignmentForStudent(Long gradebookId,
                                                       String userId,
                                                       String studentId,
                                                       List sectionIds)
                                                       throws IllegalArgumentException
Get true/false value for current user which indicates if he has permission for all gb items for a given student

Parameters:
gradebookId -
userId -
studentId -
sectionIds -
Returns:
Throws:
IllegalArgumentException

getStudentsForItem

Map getStudentsForItem(Long gradebookId,
                       String userId,
                       List studentIds,
                       int cateType,
                       Long categoryId,
                       List courseSections)
                       throws IllegalArgumentException
Get students IDs that the current grader can either view or grade. When categoryId is null and cateType is with category - return students' map that the grader can grade/view any category for course sections. (this is mostly for items that have no category associated with them in a gradebook with category turned on) (For item detail page)

Parameters:
gradebookId - Gradebook ID
userId - grader ID
studentIds - List of student IDs
cateType - gradebook category type
categoryId - current category ID that the permission check is based on. it can be null.
courseSections - List of course sections for current site
Returns:
Map of student IDs with grade/view as function value
Throws:
IllegalArgumentException

getStudentsForItem

Map getStudentsForItem(String gradebookUid,
                       String userId,
                       List studentIds,
                       int cateType,
                       Long categoryId,
                       List courseSections)
                       throws IllegalArgumentException
Get students IDs that the current grader can either view or grade. When categoryId is null and cateType is with category - return students' map that the grader can grade/view any category for course sections. (this is mostly for items that have no category associated with them in a gradebook with category turned on) (For item detail page)

Parameters:
gradebookUid - gradebook uid
userId - grader ID
studentIds - List of student IDs
cateType - gradebook category type
categoryId - current category ID that the permission check is based on. it can be null.
courseSections - List of course sections for current site
Returns:
Map of student IDs with grade/view as function value
Throws:
IllegalArgumentException

getAvailableItemsForStudent

Map getAvailableItemsForStudent(String gradebookUid,
                                String userId,
                                String studentId,
                                Collection courseSections)
                                throws IllegalArgumentException
Get a map of itemId/permission(grade/view) of a student for a grader that he can grade or view for gradebook. (For a student's roster page)

Parameters:
gradebookUid - Gradebook UID
userId - grader ID
studentId - student ID
courseSections - List of course sections for current site
Returns:
Map of item IDs with grade/view as function value
Throws:
IllegalArgumentException

getAvailableItemsForStudent

Map getAvailableItemsForStudent(Long gradebookId,
                                String userId,
                                String studentId,
                                Collection courseSections)
                                throws IllegalArgumentException
Get a map of itemId/permission(grade/view) of a student for a grader that he can grade or view for gradebook. (For a student's roster page)

Parameters:
gradebookId - Gradebook ID
userId - grader ID
studentId - student ID
courseSections - List of course sections for current site
Returns:
Map of item IDs with grade/view as function value
Throws:
IllegalArgumentException

getAvailableItemsForStudents

Map getAvailableItemsForStudents(Long gradebookId,
                                 String userId,
                                 List studentIds,
                                 Collection courseSections)
                                 throws IllegalArgumentException
Get a map of map for students whose IDs are in studentIds with id as key and another map as value: itemId/permission(grade/view) for a grader that he can grade or view for gradebook. (For a student's roster page)

Parameters:
gradebookId - Gradebook ID
userId - grader ID
studentIds - List of student IDs
courseSections - List of course sections for current site
Returns:
Map
Throws:
IllegalArgumentException

getAvailableItemsForStudents

Map getAvailableItemsForStudents(String gradebookUid,
                                 String userId,
                                 List studentIds,
                                 Collection courseSections)
                                 throws IllegalArgumentException
Get a map of map for students whose IDs are in studentIds with id as key and another map as value: itemId/permission(grade/view) for a grader that he can grade or view for gradebook. (For a student's roster page)

Parameters:
gradebookUid - Gradebook UID
userId - grader ID
studentIds - List of student IDs
courseSections - List of course sections for current site
Returns:
Map
Throws:
IllegalArgumentException

getCourseGradePermission

Map getCourseGradePermission(Long gradebookId,
                             String userId,
                             List studentIds,
                             List courseSections)
                             throws IllegalArgumentException
Get a map with student IDs as key and view/grade as value for their course grade. (For course grade page)

Parameters:
gradebookId - Gradebook ID
userId - grader ID
studentIds - List of student IDs
courseSections - List of course sections for current site (Should be all course sections the current site has.)
Returns:
Map of student IDs with view/grade as function value
Throws:
IllegalArgumentException

getCourseGradePermission

Map getCourseGradePermission(String gradebookUid,
                             String userId,
                             List studentIds,
                             List courseSections)
                             throws IllegalArgumentException
Get a map with student IDs as key and view/grade as value for their course grade. (For course grade page)

Parameters:
gradebookUid - Gradebook Uid
userId - grader ID
studentIds - List of student IDs
courseSections - List of course sections for current site (Should be all course sections the current site has.)
Returns:
Map of student IDs with view/grade as function value
Throws:
IllegalArgumentException

getGraderPermissionsForUser

List getGraderPermissionsForUser(Long gradebookId,
                                 String userId)
Get all Permission records associated with this user and gradebook

Parameters:
gradebookId -
userId -
Returns:
List of Permission records for user and gradebook

getGraderPermissionsForUser

List getGraderPermissionsForUser(String gradebookUid,
                                 String userId)
Get all Permission records associated with this user and gradebook

Parameters:
gradebookUid -
userId -
Returns:
List of Permission records for user and gradebook

getViewableGroupsForUser

List getViewableGroupsForUser(Long gradebookId,
                              String userId,
                              List groupIds)
Get all group ids associated with groups that contain at least one member that the user is authorized to view/grade

Parameters:
gradebookId -
userId -
groupIds -
Returns:
List of group ids that user has some authorization to view

getViewableGroupsForUser

List getViewableGroupsForUser(String gradebookUid,
                              String userId,
                              List groupIds)
Get all group ids associated with groups that contain at least one member that the user is authorized to view/grade

Parameters:
gradebookUid -
userId -
groupIds -
Returns:
List of group ids that user has some authorization to view

getViewableStudentsForUser

List getViewableStudentsForUser(Long gradebookId,
                                String userId,
                                List studentIds,
                                List sections)
Get a unique list of students that the current user has grader permissions to view in some capacity

Parameters:
gradebookId -
userId -
studentIds -
sections -
Returns:
List of student ids

getViewableStudentsForUser

List getViewableStudentsForUser(String gradebookUid,
                                String userId,
                                List studentIds,
                                List sections)
Get a unique list of students that the current user has grader permissions to view in some capacity

Parameters:
gradebookUid -
userId -
studentIds -
sections -
Returns:
List of student ids


Copyright © 2011 Sakai Project. All Rights Reserved.