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

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

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

The delete operations delete CourseOfferings. To unmap a CourseOffering from the current CourseCatalog, the CourseOfferingCourseCatalogAssignmentSession should be used. These delete operations attempt to remove the CourseOffering 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.
MethodcanCreateCourseOfferings
Description

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

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

Parametersosid.type.Type[]courseOfferingRecordTypesarray of course offering record types
Returnboolean true if CourseOffering creation using the specified record Types is supported, false otherwise
ErrorsNULL_ARGUMENT courseOfferingRecordTypes is null
CompliancemandatoryThis method must be implemented.
MethodgetCourseOfferingFormForCreate
Description

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

Parametersosid.id.IdcourseIdthe Id of the associated Course
osid.id.IdtermIdthe Id of the associated Term
osid.type.Type[]courseOfferingRecordTypesarray of course offering record types
Returnosid.course.CourseOfferingFormthe course offering form
ErrorsNOT_FOUND courseId or termId not found
NULL_ARGUMENT courseId, termId or courseOfferingRecordTypes is null
OPERATION_FAILEDunable to complete request
PERMISSION_DENIEDauthorization failure
UNSUPPORTEDunable to get form for requested record types
CompliancemandatoryThis method must be implemented.
MethodcreateCourseOffering
Description

Creates a new CourseOffering.

Parametersosid.course.CourseOfferingFormcourseOfferingFormthe form for this CourseOffering
Returnosid.course.CourseOfferingthe new CourseOffering
ErrorsILLEGAL_STATE courseOfferingForm already used in a create transaction
INVALID_ARGUMENTone or more of the form elements is invalid
NULL_ARGUMENT courseOfferingForm is null
OPERATION_FAILEDunable to complete request
PERMISSION_DENIEDauthorization failure
UNSUPPORTED activityForm did not originate from getCourseOfferingFormForCreate()
CompliancemandatoryThis method must be implemented.
MethodcanUpdateCourseOfferings
Description

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

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

Parametersosid.id.IdcourseOfferingIdthe Id of the CourseOffering
Returnosid.course.CourseOfferingFormthe course offering form
ErrorsNOT_FOUND courseOfferingId is not found
NULL_ARGUMENT courseOfferingId is null
OPERATION_FAILEDunable to complete request
PERMISSION_DENIEDauthorization failure
CompliancemandatoryThis method must be implemented.
MethodupdateCourseOffering
Description

Updates an existing course offering.

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

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

Deletes a CourseOffering.

Parametersosid.id.IdcourseOfferingIdthe Id of the CourseOffering to remove
ErrorsNOT_FOUND courseOfferingId not found
NULL_ARGUMENT courseOfferingId is null
OPERATION_FAILEDunable to complete request
PERMISSION_DENIEDauthorization failure
CompliancemandatoryThis method must be implemented.
MethodcanManageCourseOfferingAliases
Description

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

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

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