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

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

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

The delete operations delete ActivityBundles. To unmap an ActivityBundle from the current CourseCatalog, the ActivityBundleCourseCatalogAssignmentSession should be used. These delete operations attempt to remove the ActivityBundle 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.
MethodcanCreateActivityBundles
Description

Tests if this user can create ActivityBundles. A return of true does not guarantee successful authorization. A return of false indicates that it is known creating an ActivityBundle 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 ActivityBundle creation is not authorized, true otherwise
CompliancemandatoryThis method must be implemented.
MethodcanCreateActivityBundleWithRecordTypes
Description

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

Parametersosid.type.Type[]activityBundleRecordTypesarray of types
Returnboolean true if ActivityBundle creation using the specified record Types is supported, false otherwise
ErrorsNULL_ARGUMENT activityBundleRecordTypes is null
CompliancemandatoryThis method must be implemented.
MethodcanCreateActivityBundlesForCourseOffering
Description

Tests if this user can create a single ActivityBundle for a course offering.

Parametersosid.id.IdcourseOfferingIda course offering Id
Returnboolean true if ActivityBundle creation for the specified CourseOffering is supported, false otherwise
ErrorsNULL_ARGUMENT courseOfferingId is null
CompliancemandatoryThis method must be implemented.
MethodgetActivityBundleFormForCreate
Description

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

Parametersosid.id.IdcourseOfferingIda course offering Id
osid.type.Type[]activityBundleRecordTypesarray of types
Returnosid.course.registration.ActivityBundleFormthe activity bundle form
ErrorsNOT_FOUND courseOfferingId is not found
NULL_ARGUMENT courseOfferingId or activityBundleRecordTypes is null
OPERATION_FAILEDunable to complete request
PERMISSION_DENIEDauthorization failure
UNSUPPORTEDunable to get form for requested record types
CompliancemandatoryThis method must be implemented.
MethodcreateActivityBundle
Description

Creates a new ActivityBundle.

Parametersosid.course.registration.ActivityBundleFormactivityBundleFormthe form for this ActivityBundle
Returnosid.course.registration.ActivityBundlethe new ActivityBundle
ErrorsILLEGAL_STATE activityBundleForm already used in a create transaction
INVALID_ARGUMENTone or more of the form elements is invalid
NULL_ARGUMENT activityBundleForm is null
OPERATION_FAILEDunable to complete request
PERMISSION_DENIEDauthorization failure
UNSUPPORTED activityBundleForm did not originate from getActivityBundleFormForCreate()
CompliancemandatoryThis method must be implemented.
MethodcanUpdateActivityBundles
Description

Tests if this user can update ActivityBundles. A return of true does not guarantee successful authorization. A return of false indicates that it is known updating an ActivityBundle 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 ActivityBundle modification is not authorized, true otherwise
CompliancemandatoryThis method must be implemented.
MethodgetActivityBundleFormForUpdate
Description

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

Parametersosid.id.IdactivityBundleIdthe Id of the ActivityBundle
Returnosid.course.registration.ActivityBundleFormthe activity bundle form
ErrorsNOT_FOUND activityBundleId is not found
NULL_ARGUMENT activityBundleId is null
OPERATION_FAILEDunable to complete request
PERMISSION_DENIEDauthorization failure
CompliancemandatoryThis method must be implemented.
MethodupdateActivityBundle
Description

Updates an existing activity bundle.

Parametersosid.course.registration.ActivityBundleFormactivityBundleFormthe form containing the elements to be updated
ErrorsILLEGAL_STATE activityBundleForm already used in an update transaction
INVALID_ARGUMENTthe form contains an invalid value
NULL_ARGUMENT activityBundleForm is null
OPERATION_FAILEDunable to complete request
PERMISSION_DENIEDauthorization failure
UNSUPPORTED activityBundleForm did not originate from getActivityBundleFormForUpdate()
CompliancemandatoryThis method must be implemented.
MethodcanDeleteActivityBundles
Description

Tests if this user can delete ActivityBundles. A return of true does not guarantee successful authorization. A return of false indicates that it is known deleting an ActivityBundle 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 ActivityBundle deletion is not authorized, true otherwise
CompliancemandatoryThis method must be implemented.
MethoddeleteActivityBundle
Description

Deletes an ActivityBundle.

Parametersosid.id.IdactivityBundleIdthe Id of the ActivityBundle to remove
ErrorsNOT_FOUND activityBundleId not found
NULL_ARGUMENT activityBundleId is null
OPERATION_FAILEDunable to complete request
PERMISSION_DENIEDauthorization failure
CompliancemandatoryThis method must be implemented.
MethodcanManageActivityBundleAliases
Description

Tests if this user can manage Id aliases for ActivityBundles. 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 ActivityBundle aliasing is not authorized, true otherwise
CompliancemandatoryThis method must be implemented.
MethodaliasActivityBundle
Description

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

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