public class GradebookServiceHibernateImpl extends BaseHibernateManager implements GradebookService
GradebookService.PointsPossibleValidation| Modifier and Type | Field and Description |
|---|---|
protected ServerConfigurationService |
serverConfigService |
protected SiteService |
siteService |
authn, eventTrackingService, externalAssessmentService, propertiesMap, sectionAwareness, serverConfigurationServiceCATEGORY_TYPE_NO_CATEGORY, CATEGORY_TYPE_ONLY_CATEGORY, CATEGORY_TYPE_WEIGHTED_CATEGORY, enableLetterGradeString, GRADE_TYPE_LETTER, GRADE_TYPE_PERCENTAGE, GRADE_TYPE_POINTS, gradePermission, INVALID_CHARS_AT_START_OF_GB_ITEM_NAME, lettergradeComparator, MATH_CONTEXT, noPermission, validLetterGrade, viewPermission| Constructor and Description |
|---|
GradebookServiceHibernateImpl() |
addPermission, assignmentNameExists, calculateEquivalentPercent, calculateEquivalentPointValueForPercent, convertPointsToLetterGrade, convertPointsToPercentage, createAssignment, createAssignmentForCategory, createCategory, createCategory, createDefaultLetterGradePercentMapping, createOrUpdateDefaultLetterGradePercentMapping, createUngradedAssignment, createUngradedAssignmentForCategory, deletePermission, filterGradeRecordsByStudents, finalizeNullGradeRecords, getAllStudentUids, getAssignment, getAssignmentGradeRecord, getAssignments, getAssignmentScoreComment, getAssignmentsForCategory, getAssignmentWithoutStats, getAssignmentWithoutStats, getAuthn, getCategories, getCategoriesWithAssignments, getCategory, getComments, getCountedStudentGradeRecords, getCourseGradeOverrides, getCourseGradeRecord, getDefaultLetterGradePercentMapping, getEventTrackingService, getGradebook, getGradebookExternalAssessmentService, getGradebookUid, getIsAssignmentExcused, getLetterGradePercentMapping, getPermissionsForGB, getPermissionsForGBForCategoryIds, getPermissionsForUser, getPermissionsForUserAnyCategory, getPermissionsForUserAnyGroup, getPermissionsForUserAnyGroupAnyCategory, getPermissionsForUserAnyGroupForCategory, getPermissionsForUserForCategory, getPermissionsForUserForGoupsAnyCategory, getPermissionsForUserForGroup, getPropertyValue, getSectionAwareness, getServerConfigurationService, getUserUid, getVisibleExternalAssignments, isAssignmentDefined, isExplicitlyEnteredCourseGradeRecords, isGradebookDefined, postEvent, removeCategory, saveNewAssignment, saveOrUpdateLetterGradePercentMapping, setAssignmentScoreComment, setAuthn, setEventTrackingService, setGradebookExternalAssessmentService, setPropertyValue, setSectionAwareness, setServerConfigurationService, studentCanView, updateAssignment, updateCategory, updateGradebook, updateGradeMapping, updatePermission, updatePermission, validateLetterGradeMappingcheckDaoConfig, createHibernateTemplate, currentSession, getHibernateTemplate, getSessionFactory, setHibernateTemplate, setSessionFactoryclone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitgetAssignmentScoreComment, getCategories, getGradebook, getIsAssignmentExcused, isGradebookDefined, removeCategory, setAssignmentScoreCommentprotected SiteService siteService
protected ServerConfigurationService serverConfigService
public boolean isAssignmentDefined(String gradebookUid, String assignmentName)
isAssignmentDefined in interface GradebookServicepublic boolean isUserAbleToGradeItemForStudent(String gradebookUid, Long itemId, String studentUid)
isUserAbleToGradeItemForStudent in interface GradebookServicepublic boolean isUserAbleToViewItemForStudent(String gradebookUid, Long itemId, String studentUid)
isUserAbleToViewItemForStudent in interface GradebookServicepublic String getGradeViewFunctionForUserForStudentForItem(String gradebookUid, Long itemId, String studentUid)
getGradeViewFunctionForUserForStudentForItem in interface GradebookServicepublic List<Assignment> getAssignments(String gradebookUid) throws GradebookNotFoundException
getAssignments in interface GradebookServiceGradebookNotFoundExceptionpublic List<Assignment> getAssignments(String gradebookUid, SortType sortBy) throws GradebookNotFoundException
getAssignments in interface GradebookServiceGradebookNotFoundExceptionpublic Assignment getAssignment(String gradebookUid, Long assignmentId) throws AssessmentNotFoundException
getAssignment in interface GradebookServiceAssessmentNotFoundException@Deprecated public Assignment getAssignment(String gradebookUid, String assignmentName) throws AssessmentNotFoundException
getAssignment in interface GradebookServiceAssessmentNotFoundExceptionpublic Assignment getExternalAssignment(String gradebookUid, String externalId) throws GradebookNotFoundException
getExternalAssignment in interface GradebookServiceGradebookNotFoundExceptionpublic Assignment getAssignmentByNameOrId(String gradebookUid, String assignmentName) throws AssessmentNotFoundException
getAssignmentByNameOrId in interface GradebookServiceAssessmentNotFoundExceptionpublic GradeDefinition getGradeDefinitionForStudentForItem(String gradebookUid, Long assignmentId, String studentUid)
getGradeDefinitionForStudentForItem in interface GradebookServicepublic GradebookInformation getGradebookInformation(String gradebookUid)
getGradebookInformation in interface GradebookServicepublic Map<String,String> transferGradebook(GradebookInformation gradebookInformation, List<Assignment> assignments, String toGradebookUid, String fromContext)
transferGradebook in interface GradebookServicepublic void removeAssignment(Long assignmentId) throws StaleObjectModificationException
removeAssignment in interface GradebookServiceStaleObjectModificationExceptionpublic Long addAssignment(String gradebookUid, Assignment assignmentDefinition)
addAssignment in interface GradebookServicepublic void updateAssignment(String gradebookUid, Long assignmentId, Assignment assignmentDefinition)
updateAssignment in interface GradebookServicepublic CourseGrade getCourseGrade(Long gradebookId)
getCourseGrade in class BaseHibernateManagerpublic List getPointsEarnedCourseGradeRecords(CourseGrade courseGrade, Collection studentUids)
public Gradebook getGradebook(Long id)
id - public boolean checkStudentsNotSubmitted(String gradebookUid)
checkStudentsNotSubmitted in interface GradebookServicepublic List getAllAssignmentGradeRecords(Long gradebookId, Collection studentUids)
gradebookId - studentUids - public List getAssignments(Long gradebookId, SortType sortBy, boolean ascending)
gradebookId - sortBy - ascending - public List<Assignment> getViewableAssignmentsForCurrentUser(String gradebookUid) throws GradebookNotFoundException
getViewableAssignmentsForCurrentUser in interface GradebookServiceGradebookNotFoundExceptionpublic List<Assignment> getViewableAssignmentsForCurrentUser(String gradebookUid, SortType sortBy) throws GradebookNotFoundException
getViewableAssignmentsForCurrentUser in interface GradebookServiceGradebookNotFoundExceptionpublic Map<String,String> getViewableStudentsForItemForCurrentUser(String gradebookUid, Long gradableObjectId)
getViewableStudentsForItemForCurrentUser in interface GradebookServicepublic Map<String,String> getViewableStudentsForItemForUser(String userUid, String gradebookUid, Long gradableObjectId)
getViewableStudentsForItemForUser in interface GradebookServicepublic boolean isGradableObjectDefined(Long gradableObjectId)
isGradableObjectDefined in interface GradebookServicepublic Map getViewableSectionUuidToNameMap(String gradebookUid)
getViewableSectionUuidToNameMap in interface GradebookServicepublic boolean currentUserHasGradeAllPerm(String gradebookUid)
currentUserHasGradeAllPerm in interface GradebookServicepublic boolean isUserAllowedToGradeAll(String gradebookUid, String userUid)
isUserAllowedToGradeAll in interface GradebookServicepublic boolean currentUserHasGradingPerm(String gradebookUid)
currentUserHasGradingPerm in interface GradebookServicepublic boolean isUserAllowedToGrade(String gradebookUid, String userUid)
isUserAllowedToGrade in interface GradebookServicepublic boolean currentUserHasEditPerm(String gradebookUid)
currentUserHasEditPerm in interface GradebookServicepublic boolean currentUserHasViewOwnGradesPerm(String gradebookUid)
currentUserHasViewOwnGradesPerm in interface GradebookServicepublic boolean currentUserHasViewStudentNumbersPerm(String gradebookUid)
currentUserHasViewStudentNumbersPerm in interface GradebookServicepublic List<GradeDefinition> getGradesForStudentsForItem(String gradebookUid, Long gradableObjectId, List<String> studentIds)
getGradesForStudentsForItem in interface GradebookServicepublic Map<Long,List<GradeDefinition>> getGradesWithoutCommentsForStudentsForItems(String gradebookUid, List<Long> gradableObjectIds, List<String> studentIds)
getGradesWithoutCommentsForStudentsForItems in interface GradebookServicepublic boolean isGradeValid(String gradebookUuid, String grade)
isGradeValid in interface GradebookServicepublic boolean isValidNumericGrade(String grade)
isValidNumericGrade in interface GradebookServicepublic List<String> identifyStudentsWithInvalidGrades(String gradebookUid, Map<String,String> studentIdToGradeMap)
identifyStudentsWithInvalidGrades in interface GradebookServicepublic void saveGradeAndCommentForStudent(String gradebookUid, Long gradableObjectId, String studentUid, String grade, String comment)
saveGradeAndCommentForStudent in interface GradebookServicepublic void saveGradeAndExcuseForStudent(String gradebookUid, Long gradableObjectId, String studentUid, String grade, boolean excuse)
saveGradeAndExcuseForStudent in interface GradebookServicepublic void saveGradesAndComments(String gradebookUid, Long gradableObjectId, List<GradeDefinition> gradeDefList)
saveGradesAndComments in interface GradebookServicepublic int getGradeEntryType(String gradebookUid)
getGradeEntryType in interface GradebookServicepublic Map getEnteredCourseGrade(String gradebookUid)
getEnteredCourseGrade in interface GradebookServicepublic String getAssignmentScoreString(String gradebookUid, Long assignmentId, String studentUid) throws GradebookNotFoundException, AssessmentNotFoundException
getAssignmentScoreString in interface GradebookServiceGradebookNotFoundExceptionAssessmentNotFoundExceptionpublic String getAssignmentScoreString(String gradebookUid, String assignmentName, String studentUid) throws GradebookNotFoundException, AssessmentNotFoundException
getAssignmentScoreString in interface GradebookServiceGradebookNotFoundExceptionAssessmentNotFoundExceptionpublic String getAssignmentScoreStringByNameOrId(String gradebookUid, String assignmentName, String studentUid) throws GradebookNotFoundException, AssessmentNotFoundException
getAssignmentScoreStringByNameOrId in interface GradebookServiceGradebookNotFoundExceptionAssessmentNotFoundExceptionpublic void setAssignmentScoreString(String gradebookUid, Long assignmentId, String studentUid, String score, String clientServiceDescription) throws GradebookNotFoundException, AssessmentNotFoundException
setAssignmentScoreString in interface GradebookServiceGradebookNotFoundExceptionAssessmentNotFoundExceptionpublic void setAssignmentScoreString(String gradebookUid, String assignmentName, String studentUid, String score, String clientServiceDescription) throws GradebookNotFoundException, AssessmentNotFoundException
setAssignmentScoreString in interface GradebookServiceGradebookNotFoundExceptionAssessmentNotFoundExceptionpublic void finalizeGrades(String gradebookUid) throws GradebookNotFoundException
finalizeGrades in interface GradebookServiceGradebookNotFoundExceptionpublic String getLowestPossibleGradeForGbItem(String gradebookUid, Long gradebookItemId)
getLowestPossibleGradeForGbItem in interface GradebookServicepublic List<CategoryDefinition> getCategoryDefinitions(String gradebookUid)
getCategoryDefinitions in interface GradebookServiceprotected Map<String,List<AssignmentGradeRecord>> getGradeRecordMapForStudents(Long gradebookId, Collection<String> studentUids)
gradebookId - studentUids - protected List<GradebookAssignment> getCountedAssignments(org.hibernate.Session session, Long gradebookId)
session - gradebookId - public void applyDropScores(Collection<AssignmentGradeRecord> gradeRecords, int categoryType)
gradeRecords - NOTE: When the UI changes, this needs to be made private againpublic GradebookService.PointsPossibleValidation isPointsPossibleValid(String gradebookUid, Assignment gradebookItem, Double pointsPossible)
isPointsPossibleValid in interface GradebookServicepublic String getAverageCourseGrade(String gradebookUid)
getAverageCourseGrade in interface GradebookServicepublic void updateAssignmentOrder(String gradebookUid, Long assignmentId, Integer order)
updateAssignmentOrder in interface GradebookServiceGradebookService.updateAssignmentOrder(java.lang.String gradebookUid, java.lang.Long assignmentId, java.lang.Integer order)public List<GradingEvent> getGradingEvents(String studentId, long assignmentId)
getGradingEvents in interface GradebookServicepublic Optional<CategoryScoreData> calculateCategoryScore(Object gradebook, String studentUuid, CategoryDefinition category, List<Assignment> categoryAssignments, Map<Long,String> gradeMap, boolean includeNonReleasedItems)
calculateCategoryScore in interface GradebookServicepublic Optional<CategoryScoreData> calculateCategoryScore(Long gradebookId, String studentUuid, Long categoryId, boolean includeNonReleasedItems, int categoryType)
calculateCategoryScore in interface GradebookServicepublic CourseGrade getCourseGradeForStudent(String gradebookUid, String userUuid)
getCourseGradeForStudent in interface GradebookServicepublic Map<String,CourseGrade> getCourseGradeForStudents(String gradebookUid, List<String> userUuids)
getCourseGradeForStudents in interface GradebookServicepublic Map<String,CourseGrade> getCourseGradeForStudents(String gradebookUid, List<String> userUuids, Map<String,Double> gradeMap)
getCourseGradeForStudents in interface GradebookServicepublic List<CourseSection> getViewableSections(String gradebookUid)
getViewableSections in interface GradebookServicepublic void updateGradebookSettings(String gradebookUid, GradebookInformation gbInfo)
updateGradebookSettings in interface GradebookServicepublic Authz getAuthz()
public void setAuthz(Authz authz)
public GradebookPermissionService getGradebookPermissionService()
public void setGradebookPermissionService(GradebookPermissionService gradebookPermissionService)
public void setSiteService(SiteService siteService)
public SiteService getSiteService()
public Set getGradebookGradeMappings(Long gradebookId)
getGradebookGradeMappings in interface GradebookServicepublic Set getGradebookGradeMappings(String gradebookUid)
getGradebookGradeMappings in interface GradebookServicepublic void updateCourseGradeForStudent(String gradebookUid, String studentUuid, String grade)
updateCourseGradeForStudent in interface GradebookServicepublic void updateAssignmentCategorizedOrder(String gradebookUid, Long categoryId, Long assignmentId, Integer order)
updateAssignmentCategorizedOrder in interface GradebookServiceGradebookService.updateAssignmentCategorizedOrder(java.lang.String gradebookUid, java.lang.Long assignmentId, java.lang.Integer
order)public List<GradingEvent> getGradingEvents(List<Long> assignmentIds, Date since)
getGradingEvents in interface GradebookServiceassignmentIds - ids of assignments to checksince - timestamp from which to check for changesCopyright © 2003–2022 Sakai Project. All rights reserved.