Interface GradeEntryGradebookAssignmentSession
- All Superinterfaces:
AutoCloseable, Closeable, OsidSession, OsidSession
This session provides methods to re-assign grade entries to
Gradebooks. A GradeEntry may map to multiple Gradebooks
and removing the last reference to a GradeEntry is the equivalent
of deleting it. Each Gradebook may have its own authorizations
governing who is allowed to operate on it.
Moving or adding a reference of a GradeEntry to another
Gradebook is not a copy operation (eg: does not change its Id).
Like all OsidSessions,
GradeEntryGradebookAssignmentSessions are dedicated to single processing
threads and a single authenticated user.
-
Method Summary
Modifier and TypeMethodDescriptionvoidassignGradeEntryToGradebook(Id gradeEntryId, Id gradebookId) Adds an existingGradeEntryto aGradebook.booleancanAssignGradeEntriesToGradebook(Id gradebookId) Tests if this user can alter grade entry/gradebook mappings.booleanTests if this user can alter grade entry/gradebook mappings.getAssignableGradebookIds(Id gradebookId) Gets a list of gradebooks including and under the given gradebook node in which any grade entry can be assigned.getAssignableGradebookIdsForGradeEntry(Id gradebookId, Id gradeEntryId) Gets a list of gradebooks including and under the given gradebook node in which a specific grade entry can be assigned.voidreassignGradeEntryToGradebook(Id gradeEntryId, Id fromGradebookId, Id toGradebookId) Moves aGradeEntryfrom oneGradebookto another.voidunassignGradeEntryFromGradebook(Id gradeEntryId, Id gradebookId) Removes aGradeEntryfrom aGradebook.Methods inherited from interface OsidSession
closeMethods inherited from interface OsidSession
getAuthenticatedAgent, getAuthenticatedAgentId, getClockRate, getDate, getEffectiveAgent, getEffectiveAgentId, getFormatTypes, getLocales, isAuthenticated, startTransaction, supportsTransactions
-
Method Details
-
canAssignGradeEntry
boolean canAssignGradeEntry()Tests if this user can alter grade entry/gradebook mappings. A return of true does not guarantee successful authorization. A return of false indicates that it is known mapping methods in this session will result in aPERMISSION_DENIED. This is intended as a hint to an application that may opt not to offer assignment operations to unauthorized users.- Returns:
falseif mapping is not authorized,trueotherwise- Compliance:
mandatory- This method must be implemented.
-
canAssignGradeEntriesToGradebook
Tests if this user can alter grade entry/gradebook mappings. A return of true does not guarantee successful authorization. A return of false indicates that it is known mapping methods in this session will result in aPERMISSION_DENIED. This is intended as a hint to an application that may opt not to offer assignment operations to unauthorized users.- Parameters:
gradebookId- theIdof theGradebook- Returns:
falseif mapping is not authorized,trueotherwise- Throws:
NullArgumentException-gradebookIdisnull- Compliance:
mandatory- This method must be implemented.
-
getAssignableGradebookIds
Gets a list of gradebooks including and under the given gradebook node in which any grade entry can be assigned.- Parameters:
gradebookId- theIdof theGradebook- Returns:
- list of assignable gradebook
Ids - Throws:
NullArgumentException-gradebookIdisnullOperationFailedException- unable to complete request- Compliance:
mandatory- This method must be implemented.
-
getAssignableGradebookIdsForGradeEntry
IdList getAssignableGradebookIdsForGradeEntry(Id gradebookId, Id gradeEntryId) throws OperationFailedException Gets a list of gradebooks including and under the given gradebook node in which a specific grade entry can be assigned.- Parameters:
gradebookId- theIdof theGradebookgradeEntryId- theIdof theGradeEntry- Returns:
- list of assignable gradebook
Ids - Throws:
NullArgumentException-gradebookIdorgradeEntryIdisnullOperationFailedException- unable to complete request- Compliance:
mandatory- This method must be implemented.
-
assignGradeEntryToGradebook
void assignGradeEntryToGradebook(Id gradeEntryId, Id gradebookId) throws AlreadyExistsException, NotFoundException, OperationFailedException, PermissionDeniedException Adds an existingGradeEntryto aGradebook.- Parameters:
gradeEntryId- theIdof theGradeEntrygradebookId- theIdof theGradebook- Throws:
AlreadyExistsException-gradeEntryIdis already assigned togradebookIdNotFoundException-gradeEntryIdorgradebookIdnot foundNullArgumentException-gradeEntryIdorgradebookIdisnullOperationFailedException- unable to complete requestPermissionDeniedException- authorization failure- Compliance:
mandatory- This method must be implemented.
-
unassignGradeEntryFromGradebook
void unassignGradeEntryFromGradebook(Id gradeEntryId, Id gradebookId) throws NotFoundException, OperationFailedException, PermissionDeniedException Removes aGradeEntryfrom aGradebook.- Parameters:
gradeEntryId- theIdof theGradeEntrygradebookId- theIdof theGradebook- Throws:
NotFoundException-gradeEntryIdorgradebookIdnot found orgradeEntryIdnot assigned togradebookIdNullArgumentException-gradeEntryIdorgradebookIdisnullOperationFailedException- unable to complete requestPermissionDeniedException- authorization failure- Compliance:
mandatory- This method must be implemented.
-
reassignGradeEntryToGradebook
void reassignGradeEntryToGradebook(Id gradeEntryId, Id fromGradebookId, Id toGradebookId) throws AlreadyExistsException, NotFoundException, OperationFailedException, PermissionDeniedException Moves aGradeEntryfrom oneGradebookto another. Mappings to otherGradebooksare unaffected.- Parameters:
gradeEntryId- theIdof theGradeEntryfromGradebookId- theIdof the currentGradebooktoGradebookId- theIdof the destinationGradebook- Throws:
AlreadyExistsException-gradeEntryIdalready assigned totoGradebookIdNotFoundException-gradeEntryId, fromGradebookId, ortoGradebookIdnot found orgradeEntryIdnot mapped tofromGradebookIdNullArgumentException-gradeEntryId, fromGradebookId, ortoGradebookIdisnullOperationFailedException- unable to complete requestPermissionDeniedException- authorization failure- Compliance:
mandatory- This method must be implemented.
-