OSID Logo
OSID Specifications
course program package
Version 3.0.0
Release Candidate Preview
Interfaceosid.course.program.ProgramOfferingAdminSession
Implementsosid.OsidSession
Description

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

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

The delete operations delete ProgramEntries. To unmap a ProgramOffering from the current CourseCatalog, the ProgramOfferingCourseCatalogAssignmentSession should be used. These delete operations attempt to remove the ProgramOffering 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.
MethodcanCreateProgramOfferings
Description

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

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

Parametersosid.type.Type[]programOfferingRecordTypesarray of program offering record types
Returnboolean true if ProgramOffering creation using the specified record Types is supported, false otherwise
ErrorsNULL_ARGUMENT programOfferingRecordTypes is null
CompliancemandatoryThis method must be implemented.
MethodgetProgramOfferingFormForCreate
Description

Gets the program offering form for creating new program offerings. A new form should be requested for each create transaction.

Parametersosid.id.IdprogramIdthe Id of the associated Program
osid.id.IdtermIdthe Id of the associated Term
osid.type.Type[]programOfferingRecordTypesarray of program offering record types
Returnosid.course.program.ProgramOfferingFormthe program offering form
ErrorsNOT_FOUND programId or termId not found
NULL_ARGUMENT programId, termId or programOfferingRecordTypes is null
OPERATION_FAILEDunable to complete request
PERMISSION_DENIEDauthorization failure
UNSUPPORTEDunable to get form for requested record types
CompliancemandatoryThis method must be implemented.
MethodcreateProgramOffering
Description

Creates a new ProgramOffering.

Parametersosid.course.program.ProgramOfferingFormprogramOfferingFormthe form for this ProgramOffering
Returnosid.course.program.ProgramOfferingthe new ProgramOffering
ErrorsILLEGAL_STATE programOfferingForm already used in a create transaction
INVALID_ARGUMENTone or more of the form elements is invalid
NULL_ARGUMENT programOfferingForm is null
OPERATION_FAILEDunable to complete request
PERMISSION_DENIEDauthorization failure
UNSUPPORTED programOfferingForm did not originate from getProramOfferingFormForCreate()
CompliancemandatoryThis method must be implemented.
MethodcanUpdateProgramOfferings
Description

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

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

Parametersosid.id.IdprogramOfferingIdthe Id of the ProgramOffering
Returnosid.course.program.ProgramOfferingFormthe program offering form
ErrorsNOT_FOUND programOfferingId is not found
NULL_ARGUMENT programOfferingId is null
OPERATION_FAILEDunable to complete request
PERMISSION_DENIEDauthorization failure
CompliancemandatoryThis method must be implemented.
MethodupdateProgramOffering
Description

Updates an existing program offering.

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

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

Deletes a ProgramOffering.

Parametersosid.id.IdprogramOfferingIdthe Id of the ProgramOffering to remove
ErrorsNOT_FOUND programOfferingId not found
NULL_ARGUMENT programOfferingId is null
OPERATION_FAILEDunable to complete request
PERMISSION_DENIEDauthorization failure
CompliancemandatoryThis method must be implemented.
MethodcanManageProgramOfferingAliases
Description

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

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

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