Interface GradebookColumnGradebookAssignmentSession
- All Superinterfaces:
AutoCloseable, Closeable, OsidSession, OsidSession
This session provides methods to re-assign gradebook columns to
Gradebooks. A GradebookColumn may map to multiple
Gradebooks and removing the last reference to a GradebookColumn
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 GradebookColumn to another
Gradebook is not a copy operation (eg: does not change its
Id).
Like all OsidSessions,
GradebookColumnGradebookAssignmentSessions are dedicated to single
processing threads and a single authenticated user.
-
Method Summary
Modifier and TypeMethodDescriptionvoidassignGradebookColumnToGradebook(Id gradebookColumnId, Id gradebookId) Adds an existingGradebookColumnto aGradebook.booleanTests if this user can alter gradebook column/gradebook mappings.booleancanAssignGradebookColumnsToGradebook(Id gradebookId) Tests if this user can alter gradebook column/gradebook mappings.getAssignableGradebookIds(Id gradebookId) Gets a list of gradebookIdsincluding and under the given gradebook node in which any gradebook column can be assigned.getAssignableGradebookIdsForGradebookColumn(Id gradebookId, Id gradebookColumnId) Gets a list of gradebooks including and under the given gradebook node in which a specific gradebook column can be assigned.voidreassignGradebookColumnToGradebook(Id gradebookColumnId, Id fromGradebookId, Id toGradebookId) Moves aGradebookColumnfrom oneGradebookto another.voidunassignGradebookColumnFromGradebook(Id gradebookColumnId, Id gradebookId) Removes aGradebookColumnfrom aGradebook.Methods inherited from interface OsidSession
closeMethods inherited from interface OsidSession
getAuthenticatedAgent, getAuthenticatedAgentId, getClockRate, getDate, getEffectiveAgent, getEffectiveAgentId, getFormatTypes, getLocales, isAuthenticated, startTransaction, supportsTransactions
-
Method Details
-
canAssignGradebookColumns
boolean canAssignGradebookColumns()Tests if this user can alter gradebook column/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.
-
canAssignGradebookColumnsToGradebook
Tests if this user can alter gradebook column/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 gradebookIdsincluding and under the given gradebook node in which any gradebook column 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.
-
getAssignableGradebookIdsForGradebookColumn
IdList getAssignableGradebookIdsForGradebookColumn(Id gradebookId, Id gradebookColumnId) throws OperationFailedException Gets a list of gradebooks including and under the given gradebook node in which a specific gradebook column can be assigned.- Parameters:
gradebookId- theIdof theGradebookgradebookColumnId- theIdof theGradebokColumn- Returns:
- list of assignable gradebook
Ids - Throws:
NullArgumentException-gradebookIdorgradebookColumnIdisnullOperationFailedException- unable to complete request- Compliance:
mandatory- This method must be implemented.
-
assignGradebookColumnToGradebook
void assignGradebookColumnToGradebook(Id gradebookColumnId, Id gradebookId) throws AlreadyExistsException, NotFoundException, OperationFailedException, PermissionDeniedException Adds an existingGradebookColumnto aGradebook.- Parameters:
gradebookColumnId- theIdof theGradebookColumngradebookId- theIdof theGradebook- Throws:
AlreadyExistsException-gradebookColumnIdis already assigned togradebookIdNotFoundException-gradebookColumnIdorgradebookIdnot foundNullArgumentException-gradebookColumnIdorgradebookIdisnullOperationFailedException- unable to complete requestPermissionDeniedException- authorization failure- Compliance:
mandatory- This method must be implemented.
-
unassignGradebookColumnFromGradebook
void unassignGradebookColumnFromGradebook(Id gradebookColumnId, Id gradebookId) throws NotFoundException, OperationFailedException, PermissionDeniedException Removes aGradebookColumnfrom aGradebook.- Parameters:
gradebookColumnId- theIdof theGradebookColumngradebookId- theIdof theGradebook- Throws:
NotFoundException-gradebookColumnIdorgradebookIdnot found orgradebookColumnIdnot assigned togradebookIdNullArgumentException-gradebookColumnIdorgradebookIdisnullOperationFailedException- unable to complete requestPermissionDeniedException- authorization failure- Compliance:
mandatory- This method must be implemented.
-
reassignGradebookColumnToGradebook
void reassignGradebookColumnToGradebook(Id gradebookColumnId, Id fromGradebookId, Id toGradebookId) throws AlreadyExistsException, NotFoundException, OperationFailedException, PermissionDeniedException Moves aGradebookColumnfrom oneGradebookto another. Mappings to otherGradebooksare unaffected.- Parameters:
gradebookColumnId- theIdof theGradebookColumnfromGradebookId- theIdof the currentGradebooktoGradebookId- theIdof the destinationGradebook- Throws:
AlreadyExistsException-gradebookColumnIdalready assigned totoGradebookIdNotFoundException-gradebookColumnId, fromGradebookId, ortoGradebookIdnot found orgradebookColumnIdnot mapped tofromGradebookIdNullArgumentException-gradebookColumnId, fromGradebookId, ortoGradebookIdisnullOperationFailedException- unable to complete requestPermissionDeniedException- authorization failure- Compliance:
mandatory- This method must be implemented.
-