Class GradebookPermissionServiceImpl
- java.lang.Object
-
- org.springframework.dao.support.DaoSupport
-
- org.springframework.orm.hibernate5.support.HibernateDaoSupport
-
- org.sakaiproject.component.gradebook.BaseHibernateManager
-
- org.sakaiproject.component.gradebook.GradebookPermissionServiceImpl
-
- All Implemented Interfaces:
GradebookPermissionService,org.springframework.beans.factory.InitializingBean
public class GradebookPermissionServiceImpl extends BaseHibernateManager implements GradebookPermissionService
-
-
Field Summary
-
Fields inherited from class org.sakaiproject.component.gradebook.BaseHibernateManager
authn, eventTrackingService, externalAssessmentService, propertiesMap, serverConfigurationService
-
-
Constructor Summary
Constructors Constructor Description GradebookPermissionServiceImpl()
-
Method Summary
-
Methods inherited from class org.sakaiproject.component.gradebook.BaseHibernateManager
addPermission, assignmentNameExists, calculateEquivalentPercent, calculateEquivalentPointValueForPercent, convertPointsToLetterGrade, convertPointsToPercentage, createAssignment, createAssignmentForCategory, createCategory, createCategory, createDefaultLetterGradePercentMapping, createOrUpdateDefaultLetterGradePercentMapping, createUngradedAssignment, createUngradedAssignmentForCategory, deletePermission, filterGradeRecordsByStudents, finalizeNullGradeRecords, getAllStudentUids, getAssignment, getAssignmentById, getAssignmentGradeRecord, getAssignments, getAssignmentScoreComment, getAssignmentsForCategory, getAssignmentWithoutStats, getAssignmentWithoutStats, getAuthn, getCategories, getCategoriesWithAssignments, getCategory, getComments, getCountedStudentGradeRecords, getCourseGrade, getCourseGradeOverrides, getCourseGradeRecord, getDefaultLetterGradePercentMapping, getEventTrackingService, getGradebook, getGradebookExternalAssessmentService, getGradebookUid, getIsAssignmentExcused, getLetterGradePercentMapping, getPermissionsForGB, getPermissionsForGBForCategoryIds, getPermissionsForUser, getPermissionsForUserAnyCategory, getPermissionsForUserAnyGroup, getPermissionsForUserAnyGroupAnyCategory, getPermissionsForUserAnyGroupForCategory, getPermissionsForUserForCategory, getPermissionsForUserForGoupsAnyCategory, getPermissionsForUserForGroup, getPropertyValue, getServerConfigurationService, getUserUid, getVisibleExternalAssignments, isAssignmentDefined, isExplicitlyEnteredCourseGradeRecords, isGradebookDefined, postEvent, removeCategory, saveNewAssignment, saveOrUpdateLetterGradePercentMapping, setAssignmentScoreComment, setAuthn, setEventTrackingService, setGradebookExternalAssessmentService, setPropertyValue, setServerConfigurationService, studentCanView, updateAssignment, updateCategory, updateGradebook, updateGradeMapping, updatePermission, updatePermission, validateLetterGradeMapping
-
-
-
-
Method Detail
-
getCategoriesForUser
public List<Long> getCategoriesForUser(Long gradebookId, String userId, List<Long> categoryIdList) throws IllegalArgumentException
- Specified by:
getCategoriesForUserin interfaceGradebookPermissionService- Throws:
IllegalArgumentException
-
getCategoriesForUserForStudentView
public List<Long> getCategoriesForUserForStudentView(Long gradebookId, String userId, String studentId, List<Long> categoriesIds, List<String> sectionIds) throws IllegalArgumentException
- Specified by:
getCategoriesForUserForStudentViewin interfaceGradebookPermissionService- Throws:
IllegalArgumentException
-
getPermissionForUserForAllAssignment
public boolean getPermissionForUserForAllAssignment(Long gradebookId, String userId) throws IllegalArgumentException
- Specified by:
getPermissionForUserForAllAssignmentin interfaceGradebookPermissionService- Throws:
IllegalArgumentException
-
getPermissionForUserForAllAssignmentForStudent
public boolean getPermissionForUserForAllAssignmentForStudent(Long gradebookId, String userId, String studentId, List sectionIds) throws IllegalArgumentException
- Specified by:
getPermissionForUserForAllAssignmentForStudentin interfaceGradebookPermissionService- Throws:
IllegalArgumentException
-
getStudentsForItem
public Map<String,String> getStudentsForItem(Long gradebookId, String userId, List<String> studentIds, int cateType, Long categoryId, List courseSections) throws IllegalArgumentException
- Specified by:
getStudentsForItemin interfaceGradebookPermissionService- Throws:
IllegalArgumentException
-
getStudentsForItem
public Map<String,String> getStudentsForItem(String gradebookUid, String userId, List<String> studentIds, int cateType, Long categoryId, List courseSections) throws IllegalArgumentException
- Specified by:
getStudentsForItemin interfaceGradebookPermissionService- Throws:
IllegalArgumentException
-
getViewableGroupsForUser
public List<String> getViewableGroupsForUser(Long gradebookId, String userId, List<String> groupIds)
- Specified by:
getViewableGroupsForUserin interfaceGradebookPermissionService
-
getViewableGroupsForUser
public List getViewableGroupsForUser(String gradebookUid, String userId, List groupIds)
- Specified by:
getViewableGroupsForUserin interfaceGradebookPermissionService
-
getGraderPermissionsForUser
public List getGraderPermissionsForUser(Long gradebookId, String userId)
- Specified by:
getGraderPermissionsForUserin interfaceGradebookPermissionService
-
getGraderPermissionsForUser
public List getGraderPermissionsForUser(String gradebookUid, String userId)
- Specified by:
getGraderPermissionsForUserin interfaceGradebookPermissionService
-
getAvailableItemsForStudent
public Map getAvailableItemsForStudent(Long gradebookId, String userId, String studentId, Collection courseSections) throws IllegalArgumentException
- Specified by:
getAvailableItemsForStudentin interfaceGradebookPermissionService- Throws:
IllegalArgumentException
-
getAvailableItemsForStudent
public Map getAvailableItemsForStudent(String gradebookUid, String userId, String studentId, Collection courseSections) throws IllegalArgumentException
- Specified by:
getAvailableItemsForStudentin interfaceGradebookPermissionService- Throws:
IllegalArgumentException
-
getAvailableItemsForStudents
public Map getAvailableItemsForStudents(Long gradebookId, String userId, List studentIds, Collection courseSections) throws IllegalArgumentException
- Specified by:
getAvailableItemsForStudentsin interfaceGradebookPermissionService- Throws:
IllegalArgumentException
-
getAvailableItemsForStudents
public Map getAvailableItemsForStudents(String gradebookUid, String userId, List studentIds, Collection courseSections) throws IllegalArgumentException
- Specified by:
getAvailableItemsForStudentsin interfaceGradebookPermissionService- Throws:
IllegalArgumentException
-
getCourseGradePermission
public Map getCourseGradePermission(Long gradebookId, String userId, List studentIds, List courseSections) throws IllegalArgumentException
- Specified by:
getCourseGradePermissionin interfaceGradebookPermissionService- Throws:
IllegalArgumentException
-
getCourseGradePermission
public Map getCourseGradePermission(String gradebookUid, String userId, List studentIds, List courseSections) throws IllegalArgumentException
- Specified by:
getCourseGradePermissionin interfaceGradebookPermissionService- Throws:
IllegalArgumentException
-
getViewableStudentsForUser
public List getViewableStudentsForUser(Long gradebookId, String userId, List studentIds, List sections)
- Specified by:
getViewableStudentsForUserin interfaceGradebookPermissionService
-
getViewableStudentsForUser
public List getViewableStudentsForUser(String gradebookUid, String userId, List studentIds, List sections)
- Specified by:
getViewableStudentsForUserin interfaceGradebookPermissionService
-
getRealmsPermissionsForUser
public List<PermissionDefinition> getRealmsPermissionsForUser(String userUuid, String siteId, Role role)
Get a list of permissions defined for the given user based on section and role or all sections if allowed. This method checks realms permissions for role/section and is independent of the gb_permissions_t permissions. note: If user has the grade privilege, they are given the GraderPermission.VIEW_COURSE_GRADE permission to match GB classic functionality. This needs to be reviewed.- Specified by:
getRealmsPermissionsForUserin interfaceGradebookPermissionService- Parameters:
userUuid-siteId-role- user Role- Returns:
- list of
PermissionDefinitionsor empty list if none
-
getSectionAwareness
public SectionAwareness getSectionAwareness()
- Overrides:
getSectionAwarenessin classBaseHibernateManager
-
setSectionAwareness
public void setSectionAwareness(SectionAwareness sectionAwareness)
- Overrides:
setSectionAwarenessin classBaseHibernateManager
-
getGradebookService
public GradebookService getGradebookService()
-
setGradebookService
public void setGradebookService(GradebookService gradebookService)
-
getPermissionsForUser
public List<PermissionDefinition> getPermissionsForUser(String gradebookUid, String userId)
- Specified by:
getPermissionsForUserin interfaceGradebookPermissionService
-
updatePermissionsForUser
public void updatePermissionsForUser(String gradebookUid, String userId, List<PermissionDefinition> permissionDefinitions)
- Specified by:
updatePermissionsForUserin interfaceGradebookPermissionService
-
clearPermissionsForUser
public void clearPermissionsForUser(String gradebookUid, String userId)
- Specified by:
clearPermissionsForUserin interfaceGradebookPermissionService
-
-