Interface GradeGradebookAssignmentSession
- All Superinterfaces:
AutoCloseable, Closeable, OsidSession, OsidSession
This session provides methods to re-assign Grades to
Gradebook mappings. A Grade may appear in multiple
Gradebook catalogs and removing the last reference to a Grade is
the equivalent of deleting it. Each Gradebook may have its own
authorizations governing who is allowed to operate on it.
Adding a reference of a Grade to another Gradebook is
not a copy operation (eg: does not change its Id ).
-
Method Summary
Modifier and TypeMethodDescriptionvoidassignGradeToGradebook(Id gradeId, Id gradebookId) Adds an existingGradeto aGradebook.booleanTests if this user can alter grade/gradebook mappings.booleancanAssignGradeToGradebook(Id gradebookId) Tests if this user can alter grade/gradebook mappings.getAssignableGradebookIds(Id gradebookId) Gets a list of gradebooks including and under the given gradebook node in which any grade can be assigned.getAssignableGradebookIdsForGrade(Id gradebookId, Id gradeId) Gets a list of gradebooks including and under the given gradebook node in which a specific grade can be assigned.voidreassignGradeToGradebook(Id gradeId, Id fromGradebookId, Id toGradebookId) Moves aGradefrom oneGradebookto another.voidunassignGradeFromGradebook(Id gradeId, Id gradebookId) Removes aGradefrom aGradebook.Methods inherited from interface OsidSession
closeMethods inherited from interface OsidSession
getAuthenticatedAgent, getAuthenticatedAgentId, getClockRate, getDate, getEffectiveAgent, getEffectiveAgentId, getFormatType, getLocale, isAuthenticated, startTransaction, supportsTransactionsModifier and TypeMethodDescriptionGets the agent authenticated to this session.Gets theIdof the agent authenticated to this session.Gets the rate of the service clock.getDate()Gets the service date which may be the current date or the effective date in which this session exists.Gets the effective agent in use by this session.Gets theIdof the effective agent in use by this session.Gets theDisplayTextformatTypepreference in effect for this session.Gets the locale indicating the localization preferences in effect for this session.booleanTests if an agent is authenticated to this session.Starts a new transaction for this sesson.booleanTests for the availability of transactions.
-
Method Details
-
canAssignGrades
boolean canAssignGrades()Tests if this user can alter grade/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.
-
canAssignGradeToGradebook
Tests if this user can alter grade/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 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.
-
getAssignableGradebookIdsForGrade
IdList getAssignableGradebookIdsForGrade(Id gradebookId, Id gradeId) throws OperationFailedException Gets a list of gradebooks including and under the given gradebook node in which a specific grade can be assigned.- Parameters:
gradebookId- theIdof theGradebookgradeId- theIdof theGrade- Returns:
- list of assignable gradebook
Ids - Throws:
NullArgumentException-gradebookIdorgradeIdisnullOperationFailedException- unable to complete request- Compliance:
mandatory- This method must be implemented.
-
assignGradeToGradebook
void assignGradeToGradebook(Id gradeId, Id gradebookId) throws AlreadyExistsException, NotFoundException, OperationFailedException, PermissionDeniedException Adds an existingGradeto aGradebook.- Parameters:
gradeId- theIdof theGradegradebookId- theIdof theGradebook- Throws:
AlreadyExistsException-gradeIdis already assigned togradebookIdNotFoundException-gradeIdorgradebookIdnot foundNullArgumentException-gradeIdorgradebookIdisnullOperationFailedException- unable to complete requestPermissionDeniedException- authorization failure- Compliance:
mandatory- This method must be implemented.
-
unassignGradeFromGradebook
void unassignGradeFromGradebook(Id gradeId, Id gradebookId) throws NotFoundException, OperationFailedException, PermissionDeniedException Removes aGradefrom aGradebook.- Parameters:
gradeId- theIdof theGradegradebookId- theIdof theGradebook- Throws:
NotFoundException-gradeIdorgradebookIdnot found orgradeIdnot assigned togradebookIdNullArgumentException-gradeIdorgradebookIdisnullOperationFailedException- unable to complete requestPermissionDeniedException- authorization failure- Compliance:
mandatory- This method must be implemented.
-
reassignGradeToGradebook
void reassignGradeToGradebook(Id gradeId, Id fromGradebookId, Id toGradebookId) throws AlreadyExistsException, NotFoundException, OperationFailedException, PermissionDeniedException Moves aGradefrom oneGradebookto another. Mappings to otherGradebooksare unaffected.- Parameters:
gradeId- theIdof theGradefromGradebookId- theIdof the currentGradebooktoGradebookId- theIdof the destinationGradebook- Throws:
AlreadyExistsException-gradeIdalready assigned totogradebookIdNotFoundException-gradeId, fromGradebookId, ortoGradebookeIdnot found orgradeIdnot mapped tofromGradebookIdNullArgumentException-gradeId, fromGradebookId, ortoGradebookIdisnullOperationFailedException- unable to complete requestPermissionDeniedException- authorization failure- Compliance:
mandatory- This method must be implemented.
-