OSID Logo
OSID Specifications
course registration package
Version 3.0.0
Release Candidate Preview
Interfaceosid.course.registration.ActivityRegistrationAdminSession
Implementsosid.OsidSession
Description

This session creates, updates, and deletes ActivityRegistrations. 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 ActivityRegistration, an ActivityRegistrationForm is requested using getRegistrationFormForCreate() specifying the registration, activity, student, and desired record Types or none if no record Types are needed. The returned ActivityRegistrationForm 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 the ActivityRegistrationForm is submiited to a create operation, it cannot be reused with another create operation unless the first operation was unsuccessful. Each ActivityRegistrationForm corresponds to an attempted transaction.

For updates, ActivityRegistrationForms are requested to the ActivityRegistrationForm Id that is to be updated using getActivityRegistrationFormForUpdate(). Similarly, the ActivityRegistrationForm has metadata about the data that can be updated and it can perform validation before submitting the update. The ActivityRegistrationForm can only be used once for a successful update and cannot be reused.

The delete operations delete ActivityRegistrations. To unmap an ActivityRegistration from the current CourseCatalog, the ActivityRegistrationCourseCatalogAssignmentSession should be used. These delete operations attempt to remove the ActivityRegistrationForm itself thus removing it from all known CourseCatalog catalogs.

This session includes an Id aliasing mechanism to assign an external Id to an internally assigned Id.

MethodgetCourseCatalogId
Description

Gets the CourseCatalog Id associated with this session.

Returnosid.id.Idthe CourseCatalog Id associated with this session
CompliancemandatoryThis method must be implemented.
MethodgetCourseCatalog
Description

Gets the CourseCatalog associated with this session.

Returnosid.course.CourseCatalogthe course catalog
ErrorsOPERATION_FAILEDunable to complete request
PERMISSION_DENIEDauthorization failure
CompliancemandatoryThis method must be implemented.
MethodcanCreateActivityRegistrations
Description

Tests if this user can create ActivityRegistrations. A return of true does not guarantee successful authorization. A return of false indicates that it is known creating an ActivityRegistration will result in a PERMISSION_DENIED. This is intended as a hint to an application that may opt not to offer create operations to an unauthorized user.

Returnboolean false if ActivityRegistration creation is not authorized, true otherwise
CompliancemandatoryThis method must be implemented.
MethodcanCreateActivityRegistrationWithRecordTypes
Description

Tests if this user can create a single ActivityRegistration using the desired record types. While CourseRegistrationManager.getActivityRegistrationRecordTypes() can be used to examine which records are supported, this method tests which record(s) are required for creating a specific ActivityRegistration. Providing an empty array tests if an ActivityRegistration can be created with no records.

Parametersosid.type.Type[]activityRegistrationRecordTypesarray of activity registration record types
Returnboolean true if ActivityRegistration creation using the specified record Types is supported, false otherwise
ErrorsNULL_ARGUMENT activityRegistrationRecordTypes is null
CompliancemandatoryThis method must be implemented.
MethodgetActivityRegistrationFormForCreate
Description

Gets the course form for creating new activity registrations. A new form should be requested for each create transaction.

Parametersosid.id.IdregistrationIdthe Id for a Registration
osid.id.IdactivityIdthe Id for an Activity
osid.id.IdresourceIdthe Id for a Resource
osid.type.Type[]activityRegistrationRecordTypesarray of activity registration record types
Returnosid.course.registration.ActivityRegistrationFormthe activity registration form
ErrorsNOT_FOUND activityId or resourceId is not found
NULL_ARGUMENT activityId, resourceId, or activityRegistrationRecordTypes is null
OPERATION_FAILEDunable to complete request
PERMISSION_DENIEDauthorization failure
UNSUPPORTEDunable to get form for requested recod types
CompliancemandatoryThis method must be implemented.
MethodcreateActivityRegistration
Description

Creates a new ActivityRegistration.

Parametersosid.course.registration.ActivityRegistrationFormactivityRegistrationFormthe form for this ActivityRegistration
Returnosid.course.registration.ActivityRegistrationthe new ActivityRegistration
ErrorsILLEGAL_STATE activityRegistrationForm already used in a create transaction
INVALID_ARGUMENTone or more of the form elements is invalid
NULL_ARGUMENT activityRegistrationForm is null
OPERATION_FAILEDunable to complete request
PERMISSION_DENIEDauthorization failure
UNSUPPORTED activityRegistrationForm did not originate from getActivityRegistrationFormForCreate()
CompliancemandatoryThis method must be implemented.
MethodcanUpdateActivityRegistrations
Description

Tests if this user can update ActivityRegistrations. A return of true does not guarantee successful authorization. A return of false indicates that it is known updating an ActivityRegistration will result in a PERMISSION_DENIED. This is intended as a hint to an application that may opt not to offer update operations to an unauthorized user.

Returnboolean false if ActivityRegistration modification is not authorized, true otherwise
CompliancemandatoryThis method must be implemented.
MethodgetActivityRegistrationFormForUpdate
Description

Gets the activity registration form for updating an existing activity registration. A new activity registration form should be requested for each update transaction.

Parametersosid.id.IdactivityRegistrationIdthe Id of the ActivityRegistration
Returnosid.course.registration.ActivityRegistrationFormthe activity registration form
ErrorsNOT_FOUND activityRegistrationId is not found
NULL_ARGUMENT activityRegistrationId is null
OPERATION_FAILEDunable to complete request
PERMISSION_DENIEDauthorization failure
CompliancemandatoryThis method must be implemented.
MethodupdateActivityRegistration
Description

Updates an existing activity registration.

Parametersosid.id.IdactivityRegistrationIdthe Id of the ActivityRegistration
osid.course.registration.ActivityRegistrationFormactivityRegistrationFormthe form containing the elements to be updated
ErrorsILLEGAL_STATE activityRegistrationForm already used in an update transaction
INVALID_ARGUMENTthe form contains an invalid value
NULL_ARGUMENT activityRegistrationForm is null
OPERATION_FAILEDunable to complete request
PERMISSION_DENIEDauthorization failure
UNSUPPORTED activityRegistrationForm did not originate from getActivityRegistrationFormForUpdate()
CompliancemandatoryThis method must be implemented.
MethodcanDeleteActivityRegistrations
Description

Tests if this user can delete ActivityRegistrations. A return of true does not guarantee successful authorization. A return of false indicates that it is known deleting an ActivityRegistration will result in a PERMISSION_DENIED. This is intended as a hint to an application that may opt not to offer delete operations to an unauthorized user.

Returnboolean false if ActivityRegistration deletion is not authorized, true otherwise
CompliancemandatoryThis method must be implemented.
MethoddeleteActivityRegistration
Description

Deletes an ActivityRegistration.

Parametersosid.id.IdactivityRegistrationIdthe Id of the ActivityRegistration to remove
ErrorsNOT_FOUND activityRegistrationId not found
NULL_ARGUMENT activityRegistrationId is null
OPERATION_FAILEDunable to complete request
PERMISSION_DENIEDauthorization failure
CompliancemandatoryThis method must be implemented.
MethodcanManageActivityRegistrationAliases
Description

Tests if this user can manage Id aliases for ActivityRegistrations. A return of true does not guarantee successful authorization. A return of false indicates that it is known changing an alias will result in a PERMISSION_DENIED. This is intended as a hint to an application that may opt not to offer alias operations to an unauthorized user.

Returnboolean false if ActivityRegistration aliasing is not authorized, true otherwise
CompliancemandatoryThis method must be implemented.
MethodaliasActivityRegistration
Description

Adds an Id to an ActivityRegistration for the purpose of creating compatibility. The primary Id of the ActivityRegistration is determined by the provider. The new Id performs as an alias to the primary Id. If the alias is a pointer to another activity registration, it is reassigned to the given activity registration Id.

Parametersosid.id.IdactivityRegistrationIdthe Id of an ActivityRegistration
osid.id.IdaliasIdthe alias Id
ErrorsALREADY_EXISTS aliasId is in use as a primary Id
NOT_FOUND activityRegistrationId not found
NULL_ARGUMENT activityRegistrationId or aliasId is null
OPERATION_FAILEDunable to complete request
PERMISSION_DENIEDauthorization failure
CompliancemandatoryThis method must be implemented.