Interface AssessmentEntryBatchAdminSession
- All Superinterfaces:
AssessmentEntryAdminSession, AutoCloseable, Closeable, OsidSession, OsidSession
This session creates, updates, and deletes AssessmentEntries in
bulk. The data for create and update is provided by the consumer via the
form object. OsidForms are requested for each create or update and
may not be reused.
Create and update operations differ in their usage. To create an
AssessmentEntry , an AssessmentEntryForm is requested
using getAssessmentEntryFormsForCreate() specifying the desired
assessment, student, and record Types or none if no record
Types are needed. Each of the returned AssessmentEntryForms will
indicate that it is to be used with a create operation and can be used to
examine metdata or validate data prior to creation. Once an
AssessmentEntryForm is submiited to a create operation, it cannot be
reused with another create operation unless the first operation was
unsuccessful. Each AssessmentEntryForm corresponds to an attempted
transaction.
The AssessmentEntryForms returned from
getAssessmentEntryFormsForCreate() may be linked to the originating
request through the peer Ids of the AssessmentEntryForm .
In the case where there may be duplicates, any AssessmentEntryForm
of the same peer Ids may be used for a create operation.
Once a batch of AssessmentEntryForms are submitted for create,
a CreateResponse is returned for each AssessmentEntryForm
, although the ordering is not defined. Only errors that pertain to the
entire create operation are returned from
createAssessmentEntries() , errors specific to an individual
AssessmentEntryForm are indicated in the corresponding
CreateResponse . CreateResponses may be linked to the originating
AssessmentEntryForm through the AssessmentEntryForm
Id .
For updates, AssessmentEntryForms are requested to the
AssessmentEntry Id that is to be updated using
getAssessmentEntryFormsForUpdate() where the reference Id in the
AssessmentEntryForm may be used to link the request. Similarly,
the AssessmentEntryForm has metadata about the data that can be
updated and it can perform validation before submitting the update. The
AssessmentEntryForm can only be used once for a successful update
and cannot be reused.
Once a batch of AssessmentEntryForms are submitted for update,
an UpdateResponse is returned for each AssessmentEntryForm
, although the ordering is not defined. Only errors that pertain to the
entire update operation are returned from
updateAssessmentEntries() , errors specific to an individual
AssessmentEntryForm are indicated in the corresponding
UpdateResponse . UpdateResponses may be linked to the originating
AssessmentEntryForm through the AssessmentEntryForm
Id .
The delete operations delete AssessmentEntries in bulk. To
unmap an AssessmentEntry from the current CourseCatalog ,
the AssessmentEntryCourseCatalogAssignmentSession should be used.
These delete operations attempt to remove the AssessmentEntry
itself thus removing it from all known CourseCatalog catalogs.
Bulk delete operations return the results in DeleteResponses .
-
Method Summary
Modifier and TypeMethodDescriptionaliasAssessmentEntries(AliasRequestList aliasRequests) Adds anIdto anAssessmentEntryfor the purpose of creating compatibility.createAssessmentEntries(AssessmentEntryBatchFormList assessmentEntryForms) Creates a new set ofAssessmentEntries.Deletes allAssessmentEntriesin thisCourseCatalog.deleteAssessmentEntries(IdList assessmentEntryIds) Deletes assessment entries for the givenIds.deleteAssessmentEntriesForAssessment(Id assessmentId) Deletes all assessment entries for the given assessment.deleteAssessmentEntriesForStudent(Id resourceId) Deletes all assessment entries for the given student.Deletes assessment entries expired before the given date.getAssessmentEntryFormsForCreate(AssessmentEntryPeerList peers, Type[] assessmentEntryRecordTypes) Gets the assessment entry forms for creating a bunch of new cressmentedential entries.getAssessmentEntryFormsForUpdate(IdList assessmentEntryIds) Gets the assessment entry forms for updating an existing set of assessment entries.updateAssessmentEntries(AssessmentEntryBatchFormList assessmentEntryForms) Updates existing assessment entries.Methods inherited from interface AssessmentEntryAdminSession
aliasAssessmentEntry, canCreateAssessmentEntries, canCreateAssessmentEntryWithRecordTypes, canDeleteAssessmentEntries, canDeleteAssessmentEntry, canManageAssessmentEntryAliases, canUpdateAssessmentEntries, createAssessmentEntry, deleteAssessmentEntry, getAssessmentEntryFormForCreate, getAssessmentEntryFormForUpdate, getCourseCatalog, getCourseCatalogId, updateAssessmentEntryModifier and TypeMethodDescriptionvoidaliasAssessmentEntry(Id assessmentEntryId, Id aliasId) Adds anIdto anAssessmentEntryfor the purpose of creating compatibility.booleanTests if this user can createAssessmentEntries.booleancanCreateAssessmentEntryWithRecordTypes(Type[] assessmentEntryRecordTypes) Tests if this user can create a singlePorgramusing the desired record types.booleanTests if this user can deleteAssessmentEntries.booleancanDeleteAssessmentEntry(Id assessmentEntryId) Tests if this user can delete a specifiedAssessmentEntry.booleanTests if this user can manageIdaliases forAssessmentEntries.booleanTests if this user can updateAssessmentEntries.createAssessmentEntry(AssessmentEntryForm assessmentEntryForm) Creates a newAssessmentEntry.voiddeleteAssessmentEntry(Id assessmentEntryId) Deletes anAssessmentEntry.getAssessmentEntryFormForCreate(Id assessmentId, Id resourceId, Type[] assessmentEntryRecordTypes) Gets the assessment entry form for creating new assessment entries.getAssessmentEntryFormForUpdate(Id assessmentEntryId) Gets the assessment entry form for updating an existing assessment entry.Gets theCourseCatalogassociated with this session.Gets theCourseCatalogIdassociated with this session.voidupdateAssessmentEntry(AssessmentEntryForm assessmentEntryForm) Updates an existing assessment entry.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
-
getAssessmentEntryFormsForCreate
AssessmentEntryBatchFormList getAssessmentEntryFormsForCreate(AssessmentEntryPeerList peers, Type[] assessmentEntryRecordTypes) throws NotFoundException, OperationFailedException, PermissionDeniedException Gets the assessment entry forms for creating a bunch of new cressmentedential entries. AnAssessmentEntryFormis returned for each assessment and student pair.- Parameters:
peers- the relationship peersassessmentEntryRecordTypes- array of assessment entry record types to be included in each create operation or an empty list if none- Returns:
- the assessment entry forms
- Throws:
NotFoundException- anassessmentIdorstuidentIdis not foundNullArgumentException-peersorassessmentEntryRecordTypesisnullOperationFailedException- unable to complete requestPermissionDeniedException- authorization failureUnsupportedException- unable to request forms with given record types- Compliance:
mandatory- This method must be implemented.
-
createAssessmentEntries
CreateResponseList createAssessmentEntries(AssessmentEntryBatchFormList assessmentEntryForms) throws OperationFailedException, PermissionDeniedException Creates a new set ofAssessmentEntries. This method returns an error if the entire operation fails. Otherwise, the status of an individual create operation is indicated in theBatchCreateResponse.- Parameters:
assessmentEntryForms- the assessment entry forms- Returns:
- the create responses
- Throws:
NullArgumentException-assessmentEntryFormsisnullOperationFailedException- unable to complete requestPermissionDeniedException- authorization failure- Compliance:
mandatory- This method must be implemented.
-
getAssessmentEntryFormsForUpdate
AssessmentEntryBatchFormList getAssessmentEntryFormsForUpdate(IdList assessmentEntryIds) throws NotFoundException, OperationFailedException, PermissionDeniedException Gets the assessment entry forms for updating an existing set of assessment entries. A new assessment entry form should be requested for each update transaction.- Parameters:
assessmentEntryIds- theIdsof theAssessmentEntry- Returns:
- the assessment entry form
- Throws:
NotFoundException- anassessmentEntryIdis not foundNullArgumentException-assessmentEntryIdsisnullOperationFailedException- unable to complete requestPermissionDeniedException- authorization failure- Compliance:
mandatory- This method must be implemented.
-
updateAssessmentEntries
UpdateResponseList updateAssessmentEntries(AssessmentEntryBatchFormList assessmentEntryForms) throws OperationFailedException, PermissionDeniedException Updates existing assessment entries. This method returns an error if the entire operation fails. Otherwise, the status of an individual update operation is indicated in theBatchCreateResponse.- Parameters:
assessmentEntryForms- the form containing the elements to be updated- Returns:
- the update responses
- Throws:
NullArgumentException-assessmentEntryFormsisnullOperationFailedException- unable to complete requestPermissionDeniedException- authorization failure- Compliance:
mandatory- This method must be implemented.
-
deleteAllAssessmentEntries
DeleteResponseList deleteAllAssessmentEntries() throws OperationFailedException, PermissionDeniedExceptionDeletes allAssessmentEntriesin thisCourseCatalog.- Returns:
- the delete responses
- Throws:
OperationFailedException- unable to complete requestPermissionDeniedException- authorization failure- Compliance:
mandatory- This method must be implemented.
-
deleteAssessmentEntries
DeleteResponseList deleteAssessmentEntries(IdList assessmentEntryIds) throws OperationFailedException, PermissionDeniedException Deletes assessment entries for the givenIds.- Parameters:
assessmentEntryIds- theIdsof the assessment entries to delete- Returns:
- the delete responses
- Throws:
NullArgumentException-assessmentEntryIdsisnullOperationFailedException- unable to complete requestPermissionDeniedException- authorization failure- Compliance:
mandatory- This method must be implemented.
-
deleteAssessmentEntriesForAssessment
DeleteResponseList deleteAssessmentEntriesForAssessment(Id assessmentId) throws OperationFailedException, PermissionDeniedException Deletes all assessment entries for the given assessment.- Parameters:
assessmentId- anIdof an assessment- Returns:
- the delete responses
- Throws:
NullArgumentException-assessmentIdisnullOperationFailedException- unable to complete requestPermissionDeniedException- authorization failure- Compliance:
mandatory- This method must be implemented.
-
deleteAssessmentEntriesForStudent
DeleteResponseList deleteAssessmentEntriesForStudent(Id resourceId) throws OperationFailedException, PermissionDeniedException Deletes all assessment entries for the given student.- Parameters:
resourceId- anIdof a student- Returns:
- the delete responses
- Throws:
NullArgumentException-resourceIdisnullOperationFailedException- unable to complete requestPermissionDeniedException- authorization failure- Compliance:
mandatory- This method must be implemented.
-
deleteIneffectiveAssessmentEntriesByDate
DeleteResponseList deleteIneffectiveAssessmentEntriesByDate(DateTime date) throws OperationFailedException, PermissionDeniedException Deletes assessment entries expired before the given date.- Parameters:
date- a date- Returns:
- the delete responses
- Throws:
NullArgumentException-dateisnullOperationFailedException- unable to complete requestPermissionDeniedException- authorization failure- Compliance:
mandatory- This method must be implemented.
-
aliasAssessmentEntries
AliasResponseList aliasAssessmentEntries(AliasRequestList aliasRequests) throws OperationFailedException, PermissionDeniedException Adds anIdto anAssessmentEntryfor the purpose of creating compatibility. The primaryIdof theAssessmentEntryis determined by the provider. The newIdis an alias to the primaryId. If the alias is a pointer to another sessment entry, it is reassigned to the given assessment entryId.- Parameters:
aliasRequests- the alias requests- Returns:
- the alias responses
- Throws:
NullArgumentException-aliasRequestsisnullOperationFailedException- unable to complete requestPermissionDeniedException- authorization failure- Compliance:
mandatory- This method must be implemented.
-