public interface GradebookService
WARNING: For documentation of the deprecated methods, please see the service interfaces which own them.
| Modifier and Type | Interface and Description |
|---|---|
static class |
GradebookService.PointsPossibleValidation
An enum for defining valid/invalid information for a points possible/relative weight
value for a gradebook item.
|
| Modifier and Type | Field and Description |
|---|---|
static int |
CATEGORY_TYPE_NO_CATEGORY |
static int |
CATEGORY_TYPE_ONLY_CATEGORY |
static int |
CATEGORY_TYPE_WEIGHTED_CATEGORY |
static String |
enableLetterGradeString |
static int |
GRADE_TYPE_LETTER |
static int |
GRADE_TYPE_PERCENTAGE |
static int |
GRADE_TYPE_POINTS |
static String |
gradePermission |
static Comparator |
lettergradeComparator |
static MathContext |
MATH_CONTEXT |
static String[] |
validLetterGrade |
static String |
viewPermission |
| Modifier and Type | Method and Description |
|---|---|
void |
addAssignment(String gradebookUid,
Assignment assignmentDefinition)
Create a new Gradebook-managed assignment.
|
void |
addExternalAssessment(String gradebookUid,
String externalId,
String externalUrl,
String title,
double points,
Date dueDate,
String externalServiceDescription)
Deprecated.
Replaced by
GradebookExternalAssessmentService#addExternalAssessment(String, String, String, Boolean) |
void |
addExternalAssessment(String gradebookUid,
String externalId,
String externalUrl,
String title,
Double points,
Date dueDate,
String externalServiceDescription,
Boolean ungraded)
|
void |
addGradebook(String uid,
String name)
Deprecated.
|
boolean |
checkStudentsNotSubmitted(String gradebookUid) |
boolean |
checkStuendsNotSubmitted(String gradebookUid)
Deprecated.
|
boolean |
currentUserHasEditPerm(String gradebookUid) |
boolean |
currentUserHasGradeAllPerm(String gradebookUid) |
boolean |
currentUserHasGradingPerm(String gradebookUid) |
boolean |
currentUserHasViewOwnGradesPerm(String gradebookUid) |
void |
deleteGradebook(String uid)
Deprecated.
|
void |
finalizeGrades(String gradebookUid)
Finalize the gradebook's course grades by setting all still-unscored assignments
to zero scores.
|
Assignment |
getAssignment(String gradebookUid,
Long gbItemId) |
Assignment |
getAssignment(String gradebookUid,
String assignmentName) |
List |
getAssignments(String gradebookUid) |
Double |
getAssignmentScore(String gradebookUid,
Long gbItemId,
String studentUid)
Deprecated.
Replaced by
getAssignmentScoreString(String, Long, String) |
Double |
getAssignmentScore(String gradebookUid,
String assignmentName,
String studentUid)
Deprecated.
Replaced by
getAssignmentScoreString(String, String, String) |
CommentDefinition |
getAssignmentScoreComment(String gradebookUid,
Long gbItemId,
String studentUid)
Get the comment (if any) currently provided for the given combination
of student and assignment.
|
CommentDefinition |
getAssignmentScoreComment(String gradebookUid,
String assignmentName,
String studentUid)
Get the comment (if any) currently provided for the given combination
of student and assignment.
|
String |
getAssignmentScoreString(String gradebookUid,
Long gbItemId,
String studentUid)
Get student's assignment's score as string.
|
String |
getAssignmentScoreString(String gradebookUid,
String assignmentName,
String studentUid)
Get student's assignment's score as string.
|
Map |
getCalculatedCourseGrade(String gradebookUid)
Get a Map of auto calculated CourseGrade for students.
|
Map |
getCalculatedCourseGrade(String gradebookUid,
boolean mapTheGrades)
Get a Map of auto calculated CourseGrade for students.
|
List |
getCategories(Long gradebookId)
method to get all categories for a gradebook.
|
List<CategoryDefinition> |
getCategoryDefinitions(String gradebookUid) |
Map |
getEnteredCourseGrade(String gradebookUid)
Get a Map of overridden CourseGrade for students.
|
Map |
getFixedGrade(String gradebookUid)
Get fixed grades for students by using course grade scale.
|
Map |
getFixedPoint(String gradebookUid)
Get fixed earned points for students by using course grade scale.
|
Object |
getGradebook(String uid)
return Object to avoid circular dependency with sakai-gradebook-tool
|
String |
getGradebookDefinitionXml(String gradebookUid)
Get an archivable definition of gradebook data suitable for migration
between sites.
|
GradeDefinition |
getGradeDefinitionForStudentForItem(String gradebookUid,
Long gbItemId,
String studentUid) |
int |
getGradeEntryType(String gradebookUid) |
List<GradeDefinition> |
getGradesForStudentsForItem(String gradebookUid,
Long gradableObjectId,
List<String> studentIds) |
String |
getGradeViewFunctionForUserForStudentForItem(String gradebookUid,
Long itemId,
String studentUid)
Check to see if current user may grade or view the given student for the given item in the given gradebook.
|
String |
getGradeViewFunctionForUserForStudentForItem(String gradebookUid,
String itemName,
String studentUid)
Check to see if current user may grade or view the given student for the given item in the given gradebook.
|
Map |
getImportCourseGrade(String gradebookUid) |
Map |
getImportCourseGrade(String gradebookUid,
boolean useDefault) |
String |
getLowestPossibleGradeForGbItem(String gradebookUid,
Long gradebookItemId) |
Map |
getOldPoint(String gradebookUid)
Get old earned points for students by using letter grade scale.
|
List<Assignment> |
getViewableAssignmentsForCurrentUser(String gradebookUid) |
Map |
getViewableSectionUuidToNameMap(String gradebookUid)
Using the grader permissions, return map of section uuid to section name
that includes all sections that the current user may view or grade
|
Map<String,String> |
getViewableStudentsForItemForCurrentUser(String gradebookUid,
Long gradableObjectId) |
Map<String,String> |
getViewableStudentsForItemForUser(String userUid,
String gradebookUid,
Long gradableObjectId) |
List<String> |
identifyStudentsWithInvalidGrades(String gradebookUid,
Map<String,String> studentIdToGradeMap) |
boolean |
isAssignmentDefined(String gradebookUid,
String assignmentTitle)
Check to see if an assignment with the given name already exists in the
given gradebook.
|
boolean |
isExternalAssignmentDefined(String gradebookUid,
String externalId)
Deprecated.
|
boolean |
isGradableObjectDefined(Long gradableObjectId) |
boolean |
isGradebookDefined(String gradebookUid)
Checks to see whether a gradebook with the given uid exists.
|
boolean |
isGradeValid(String gradebookUuid,
String grade) |
GradebookService.PointsPossibleValidation |
isPointsPossibleValid(String gradebookUid,
Assignment gradebookItem,
Double pointsPossible) |
boolean |
isUserAbleToGradeItemForStudent(String gradebookUid,
Long itemId,
String studentUid)
Check to see if the current user is allowed to grade the given item for the given student in
the given gradebook.
|
boolean |
isUserAbleToGradeItemForStudent(String gradebookUid,
String itemName,
String studentUid)
Check to see if the current user is allowed to grade the given item for the given student in
the given gradebook.
|
boolean |
isUserAbleToViewItemForStudent(String gradebookUid,
Long itemId,
String studentUid)
Check to see if the current user is allowed to view the given item for the given student in
the given gradebook.
|
boolean |
isUserAbleToViewItemForStudent(String gradebookUid,
String itemName,
String studentUid)
Check to see if the current user is allowed to view the given item for the given student in
the given gradebook.
|
boolean |
isUserAllowedToGrade(String gradebookUid,
String userUid) |
boolean |
isUserAllowedToGradeAll(String gradebookUid,
String userUid) |
void |
mergeGradebookDefinitionXml(String toGradebookUid,
String fromGradebookXml)
Attempt to merge archived gradebook data (notably the assignnments) into a new gradebook.
|
void |
removeAssignment(Long assignmentId)
Removes an assignment from a gradebook.
|
void |
removeCategory(Long categoryId)
remove category from gradebook
|
void |
removeExternalAssessment(String gradebookUid,
String externalId)
Deprecated.
|
void |
saveGradeAndCommentForStudent(String gradebookUid,
Long gradableObjectId,
String studentId,
String grade,
String comment)
Save a student score and comment for a gradebook item.
|
void |
saveGradesAndComments(String gradebookUid,
Long gradableObjectId,
List<GradeDefinition> gradeDefList)
Given a list of GradeDefinitions for students for a given gradebook and gradable object,
will save the associated scores and comments.
|
void |
setAssignmentScore(String gradebookUid,
String assignmentName,
String studentUid,
Double score,
String clientServiceDescription)
Deprecated.
|
void |
setAssignmentScoreComment(String gradebookUid,
String assignmentName,
String studentUid,
String comment)
Provide a student-viewable comment on the score (or lack of score) associated
with the given assignment.
|
void |
setAssignmentScoreString(String gradebookUid,
String assignmentName,
String studentUid,
String score,
String clientServiceDescription)
set student's score for assignment.
|
void |
setAvailableGradingScales(Collection gradingScaleDefinitions)
Deprecated.
|
void |
setDefaultGradingScale(String uid)
Deprecated.
|
void |
transferGradebookDefinitionXml(String fromGradebookUid,
String toGradebookUid,
String fromGradebookXml)
Attempt to transfer gradebook data with Category and weight and settings
|
void |
updateAssignment(String gradebookUid,
String assignmentName,
Assignment assignmentDefinition)
Modify the definition of an existing Gradebook-managed assignment.
|
void |
updateExternalAssessment(String gradebookUid,
String externalId,
String externalUrl,
String title,
double points,
Date dueDate)
Deprecated.
Replaced by
GradebookExternalAssessmentService#updateExternalAssessment(String, String, String, String, Double, Date) |
void |
updateExternalAssessment(String gradebookUid,
String externalId,
String externalUrl,
String title,
Double points,
Date dueDate)
|
void |
updateExternalAssessmentScore(String gradebookUid,
String externalId,
String studentUid,
Double points)
Deprecated.
Replaced by
GradebookExternalAssessmentService#updateExternalAssessmentScore(String, String, String, Double) |
void |
updateExternalAssessmentScores(String gradebookUid,
String externalId,
Map studentUidsToScores)
Deprecated.
|
static final int GRADE_TYPE_POINTS
static final int GRADE_TYPE_PERCENTAGE
static final int GRADE_TYPE_LETTER
static final int CATEGORY_TYPE_NO_CATEGORY
static final int CATEGORY_TYPE_ONLY_CATEGORY
static final int CATEGORY_TYPE_WEIGHTED_CATEGORY
static final String[] validLetterGrade
static final String gradePermission
static final String viewPermission
static final String enableLetterGradeString
static final MathContext MATH_CONTEXT
static final Comparator lettergradeComparator
boolean isGradebookDefined(String gradebookUid)
gradebookUid - The gradebook UID to checkboolean isUserAbleToGradeItemForStudent(String gradebookUid, Long itemId, String studentUid)
boolean isUserAbleToGradeItemForStudent(String gradebookUid, String itemName, String studentUid)
gradebookUid - itemId - studentUid - boolean isUserAbleToViewItemForStudent(String gradebookUid, Long itemId, String studentUid)
gradebookUid - itemId - studentUid - boolean isUserAbleToViewItemForStudent(String gradebookUid, String itemName, String studentUid)
gradebookUid - itemName - studentUid - String getGradeViewFunctionForUserForStudentForItem(String gradebookUid, Long itemId, String studentUid)
gradebookUid - itemId - studentUid - String getGradeViewFunctionForUserForStudentForItem(String gradebookUid, String itemName, String studentUid)
gradebookUid - itemName - studentUid - List getAssignments(String gradebookUid) throws GradebookNotFoundException
GradebookNotFoundExceptionAssignment getAssignment(String gradebookUid, String assignmentName) throws GradebookNotFoundException
gradebookUid - assignmentName - GradebookNotFoundExceptionAssessmentNotFoundExceptionAssignment getAssignment(String gradebookUid, Long gbItemId) throws AssessmentNotFoundException
gradebookUid - gbItemId - AssessmentNotFoundExceptionDouble getAssignmentScore(String gradebookUid, String assignmentName, String studentUid) throws GradebookNotFoundException, AssessmentNotFoundException
getAssignmentScoreString(String, String, String)Double getAssignmentScore(String gradebookUid, Long gbItemId, String studentUid) throws GradebookNotFoundException, AssessmentNotFoundException
getAssignmentScoreString(String, Long, String)GradeDefinition getGradeDefinitionForStudentForItem(String gradebookUid, Long gbItemId, String studentUid) throws GradebookNotFoundException, AssessmentNotFoundException
gradebookUid - gbItemId - studentUid - GradebookNotFoundExceptionAssessmentNotFoundExceptionCommentDefinition getAssignmentScoreComment(String gradebookUid, String assignmentName, String studentUid) throws GradebookNotFoundException, AssessmentNotFoundException
gradebookUid - assignmentName - studentUid - GradebookNotFoundExceptionAssessmentNotFoundExceptionCommentDefinition getAssignmentScoreComment(String gradebookUid, Long gbItemId, String studentUid) throws GradebookNotFoundException, AssessmentNotFoundException
gradebookUid - gbItemId - studentUid - GradebookNotFoundExceptionAssessmentNotFoundExceptionvoid setAssignmentScore(String gradebookUid, String assignmentName, String studentUid, Double score, String clientServiceDescription) throws GradebookNotFoundException, AssessmentNotFoundException
setAssignmentScoreString(String, String, String, String, String)void setAssignmentScoreComment(String gradebookUid, String assignmentName, String studentUid, String comment) throws GradebookNotFoundException, AssessmentNotFoundException
gradebookUid - assignmentName - studentUid - comment - a plain text comment, or null to remove any currrent commentGradebookNotFoundExceptionAssessmentNotFoundExceptionboolean isAssignmentDefined(String gradebookUid, String assignmentTitle) throws GradebookNotFoundException
GradebookNotFoundExceptionString getGradebookDefinitionXml(String gradebookUid)
gradebookUid - void transferGradebookDefinitionXml(String fromGradebookUid, String toGradebookUid, String fromGradebookXml)
fromGradebookUid - toGradebookUid - fromGradebookXml - void mergeGradebookDefinitionXml(String toGradebookUid, String fromGradebookXml)
toGradebookUid - fromGradebookXml - void removeAssignment(Long assignmentId) throws StaleObjectModificationException
assignmentId - The assignment idStaleObjectModificationExceptionList getCategories(Long gradebookId)
getCategoryDefinitions(String)gradebookId - HibernateExceptionList<CategoryDefinition> getCategoryDefinitions(String gradebookUid)
gradebookUid - CategoryDefinitions for the categories defined for the given gradebook.
Returns an empty list if the gradebook does not have categories.GradebookNotFoundExceptionvoid removeCategory(Long categoryId) throws StaleObjectModificationException
categoryId - StaleObjectModificationExceptionvoid addAssignment(String gradebookUid, Assignment assignmentDefinition)
assignmentDefinition - void updateAssignment(String gradebookUid, String assignmentName, Assignment assignmentDefinition)
assignmentName - the name of the assignment that needs to be changedassignmentDefinition - the new properties of the assignmentList<Assignment> getViewableAssignmentsForCurrentUser(String gradebookUid)
gradebookUid - Map<String,String> getViewableStudentsForItemForCurrentUser(String gradebookUid, Long gradableObjectId)
gradebookUid - gradableObjectId - Map<String,String> getViewableStudentsForItemForUser(String userUid, String gradebookUid, Long gradableObjectId)
userUid - gradebookUid - gradableObjectId - void addGradebook(String uid, String name)
GradebookFrameworkService.addGradebook(String, String)void deleteGradebook(String uid) throws GradebookNotFoundException
GradebookFrameworkService.deleteGradebook(String)GradebookNotFoundExceptionvoid setAvailableGradingScales(Collection gradingScaleDefinitions)
GradebookFrameworkService.setAvailableGradingScales(Collection)void setDefaultGradingScale(String uid)
GradebookFrameworkService.setDefaultGradingScale(String)void addExternalAssessment(String gradebookUid, String externalId, String externalUrl, String title, Double points, Date dueDate, String externalServiceDescription, Boolean ungraded) throws GradebookNotFoundException, ConflictingAssignmentNameException, ConflictingExternalIdException, AssignmentHasIllegalPointsException
void addExternalAssessment(String gradebookUid, String externalId, String externalUrl, String title, double points, Date dueDate, String externalServiceDescription) throws GradebookNotFoundException, ConflictingAssignmentNameException, ConflictingExternalIdException, AssignmentHasIllegalPointsException
GradebookExternalAssessmentService#addExternalAssessment(String, String, String, Boolean)void updateExternalAssessment(String gradebookUid, String externalId, String externalUrl, String title, double points, Date dueDate) throws GradebookNotFoundException, AssessmentNotFoundException, ConflictingAssignmentNameException, AssignmentHasIllegalPointsException
GradebookExternalAssessmentService#updateExternalAssessment(String, String, String, String, Double, Date)void updateExternalAssessment(String gradebookUid, String externalId, String externalUrl, String title, Double points, Date dueDate) throws GradebookNotFoundException, AssessmentNotFoundException, ConflictingAssignmentNameException, AssignmentHasIllegalPointsException
void removeExternalAssessment(String gradebookUid, String externalId) throws GradebookNotFoundException, AssessmentNotFoundException
GradebookExternalAssessmentService.removeExternalAssessment(String, String)void updateExternalAssessmentScore(String gradebookUid, String externalId, String studentUid, Double points) throws GradebookNotFoundException, AssessmentNotFoundException
GradebookExternalAssessmentService#updateExternalAssessmentScore(String, String, String, Double)void updateExternalAssessmentScores(String gradebookUid, String externalId, Map studentUidsToScores) throws GradebookNotFoundException, AssessmentNotFoundException
GradebookExternalAssessmentService.updateExternalAssessmentScoresString(String, String, Map)boolean isExternalAssignmentDefined(String gradebookUid, String externalId) throws GradebookNotFoundException
GradebookExternalAssessmentService.isExternalAssignmentDefined(String, String)GradebookNotFoundExceptionObject getGradebook(String uid) throws GradebookNotFoundException
GradebookNotFoundExceptionboolean checkStuendsNotSubmitted(String gradebookUid)
checkStudentsNotSubmitted(String)gradebookUid - boolean checkStudentsNotSubmitted(String gradebookUid)
gradebookUid - boolean isGradableObjectDefined(Long gradableObjectId)
gradableObjectId - Map getViewableSectionUuidToNameMap(String gradebookUid)
gradebookUid - boolean currentUserHasGradeAllPerm(String gradebookUid)
gradebookUid - boolean isUserAllowedToGradeAll(String gradebookUid, String userUid)
gradebookUid - userUid - boolean currentUserHasGradingPerm(String gradebookUid)
gradebookUid - boolean isUserAllowedToGrade(String gradebookUid, String userUid)
gradebookUid - userUid - boolean currentUserHasEditPerm(String gradebookUid)
gradebookUid - boolean currentUserHasViewOwnGradesPerm(String gradebookUid)
gradebookUid - List<GradeDefinition> getGradesForStudentsForItem(String gradebookUid, Long gradableObjectId, List<String> studentIds)
gradebookUid - gradableObjectId - studentIds - SecurityException - if the current user is not authorized to view
or grade a student in the passed listboolean isGradeValid(String gradebookUuid, String grade) throws GradebookNotFoundException
gradebookUuid - grade - GradebookNotFoundException - if no gradebook exists with given gradebookUidList<String> identifyStudentsWithInvalidGrades(String gradebookUid, Map<String,String> studentIdToGradeMap) throws GradebookNotFoundException
gradebookUid - studentIdToGradeMap - - the student's username mapped to their grade
that you want to validateGradebookNotFoundException - if no gradebook exists with given gradebookUidvoid saveGradeAndCommentForStudent(String gradebookUid, Long gradableObjectId, String studentId, String grade, String comment) throws InvalidGradeException, GradebookNotFoundException, AssessmentNotFoundException
gradebookUid - gradableObjectId - studentId - grade - - must be in format according to gradebook's grade entry typecomment - InvalidGradeException - - if grade is invalid. grade and comment will not be savedGradebookNotFoundExceptionAssessmentNotFoundExceptionSecurityException - if current user is not authorized to grade studentvoid saveGradesAndComments(String gradebookUid, Long gradableObjectId, List<GradeDefinition> gradeDefList) throws InvalidGradeException, GradebookNotFoundException, AssessmentNotFoundException
gradebookUid - gradableObjectId - gradeDefList - InvalidGradeException - if any of the grades are not valid - none will be savedSecurityException - if the user does not have access to a student in the list -
no grades or comments will be saved for any studentGradebookNotFoundExceptionAssessmentNotFoundExceptionMap getFixedGrade(String gradebookUid)
gradebookUid - Map getFixedPoint(String gradebookUid)
gradebookUid - Map getOldPoint(String gradebookUid)
gradebookUid - int getGradeEntryType(String gradebookUid) throws GradebookNotFoundException
gradebookUid - GradebookNotFoundException - if no gradebook exists w/ the given uidMap getEnteredCourseGrade(String gradebookUid)
gradebookUid - Map getCalculatedCourseGrade(String gradebookUid)
gradebookUid - Map getCalculatedCourseGrade(String gradebookUid, boolean mapTheGrades)
gradebookUid - mapTheGrades - Should we map the grades from points to letters?String getAssignmentScoreString(String gradebookUid, String assignmentName, String studentUid) throws GradebookNotFoundException, AssessmentNotFoundException
gradebookUid - assignmentName - studentUid - GradebookNotFoundExceptionAssessmentNotFoundExceptionString getAssignmentScoreString(String gradebookUid, Long gbItemId, String studentUid) throws GradebookNotFoundException, AssessmentNotFoundException
gradebookUid - gbItemId - studentUid - GradebookNotFoundExceptionAssessmentNotFoundExceptionvoid setAssignmentScoreString(String gradebookUid, String assignmentName, String studentUid, String score, String clientServiceDescription) throws GradebookNotFoundException, AssessmentNotFoundException
gradebookUid - assignmentName - studentUid - score - clientServiceDescription - GradebookNotFoundExceptionAssessmentNotFoundExceptionvoid finalizeGrades(String gradebookUid) throws GradebookNotFoundException
gradebookUid - GradebookNotFoundExceptionString getLowestPossibleGradeForGbItem(String gradebookUid, Long gradebookItemId)
gradebookUid - gradebookItemId - SecurityException - if user does not have permission to view assignments
in the given gradebookAssessmentNotFoundException - if there is no gradebook item with the given gradebookItemIdGradebookService.PointsPossibleValidation isPointsPossibleValid(String gradebookUid, Assignment gradebookItem, Double pointsPossible)
gradebookUid - (non-null)gradebookItem - (non-null) the Assignment object representing the gradebook item for which you are
setting the points possible (aka relative weight). May be a new gradebook item without
an id yet.pointsPossible - the points possible/relative weight you would like to validate
for the gradebookItem above.GradebookService.PointsPossibleValidation value indicating the validity of the given
points possible/relative weight or a problem code defining why it is invalidCopyright © 2003-2014 Sakai Project. All Rights Reserved.