Interface GradeGradebookAssignmentSession

All Superinterfaces:
AutoCloseable, Closeable, OsidSession, OsidSession

public interface GradeGradebookAssignmentSession extends 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 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 a PERMISSION_DENIED. T his is intended as a hint to an application that may opt not to offer assignment operations to unauthorized users.
      Returns:
      false if mapping is not authorized, true otherwise
      Compliance:
      mandatory - This method must be implemented.
    • canAssignGradeToGradebook

      boolean canAssignGradeToGradebook(Id gradebookId)
      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 a PERMISSION_DENIED. T his is intended as a hint to an application that may opt not to offer assignment operations to unauthorized users.
      Parameters:
      gradebookId - the Id of the Gradebook
      Returns:
      false if mapping is not authorized, true otherwise
      Throws:
      NullArgumentException - gradebookId is null
      Compliance:
      mandatory - This method must be implemented.
    • getAssignableGradebookIds

      IdList getAssignableGradebookIds(Id gradebookId) throws OperationFailedException
      Gets a list of gradebooks including and under the given gradebook node in which any grade can be assigned.
      Parameters:
      gradebookId - the Id of the Gradebook
      Returns:
      list of assignable gradebook Ids
      Throws:
      NullArgumentException - gradebookId is null
      OperationFailedException - 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 - the Id of the Gradebook
      gradeId - the Id of the Grade
      Returns:
      list of assignable gradebook Ids
      Throws:
      NullArgumentException - gradebookId or gradeId is null
      OperationFailedException - 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 existing Grade to a Gradebook .
      Parameters:
      gradeId - the Id of the Grade
      gradebookId - the Id of the Gradebook
      Throws:
      AlreadyExistsException - gradeId is already assigned to gradebookId
      NotFoundException - gradeId or gradebookId not found
      NullArgumentException - gradeId or gradebookId is null
      OperationFailedException - unable to complete request
      PermissionDeniedException - authorization failure
      Compliance:
      mandatory - This method must be implemented.
    • unassignGradeFromGradebook

      void unassignGradeFromGradebook(Id gradeId, Id gradebookId) throws NotFoundException, OperationFailedException, PermissionDeniedException
      Removes a Grade from a Gradebook .
      Parameters:
      gradeId - the Id of the Grade
      gradebookId - the Id of the Gradebook
      Throws:
      NotFoundException - gradeId or gradebookId not found or gradeId not assigned to gradebookId
      NullArgumentException - gradeId or gradebookId is null
      OperationFailedException - unable to complete request
      PermissionDeniedException - authorization failure
      Compliance:
      mandatory - This method must be implemented.
    • reassignGradeToGradebook

      void reassignGradeToGradebook(Id gradeId, Id fromGradebookId, Id toGradebookId) throws AlreadyExistsException, NotFoundException, OperationFailedException, PermissionDeniedException
      Moves a Grade from one Gradebook to another. Mappings to other Gradebooks are unaffected.
      Parameters:
      gradeId - the Id of the Grade
      fromGradebookId - the Id of the current Gradebook
      toGradebookId - the Id of the destination Gradebook
      Throws:
      AlreadyExistsException - gradeId already assigned to togradebookId
      NotFoundException - gradeId, fromGradebookId , or toGradebookeId not found or gradeId not mapped to fromGradebookId
      NullArgumentException - gradeId, fromGradebookId , or toGradebookId is null
      OperationFailedException - unable to complete request
      PermissionDeniedException - authorization failure
      Compliance:
      mandatory - This method must be implemented.