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

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

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

The delete operations delete Plans. To unmap a Plan from the current CourseCatalog, the PlanCourseCatalogAssignmentSession should be used. These delete operations attempt to remove the Plan 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.
MethodcanCreatePlans
Description

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

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

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

Parametersosid.type.Type[]planRecordTypesarray of plan record types
Returnboolean true if Plan creation using the specified record Types is supported, false otherwise
ErrorsNULL_ARGUMENT planRecordTypes is null
CompliancemandatoryThis method must be implemented.
MethodgetPlanFormForCreate
Description

Gets the plan form for creating new plans. A new form should be requested for each create transaction.

Parametersosid.id.IdsyllabusIda syllabus Id
osid.id.IdcourseOfferingIda course offering Id
osid.type.Type[]planRecordTypesarray of plan record types
Returnosid.course.plan.PlanFormthe plan form
ErrorsNOT_FOUND syllabusId or courseOfferingId is not found
NULL_ARGUMENT syllabusId, courseOfferingId, or planRecordTypes is null
OPERATION_FAILEDunable to complete request
PERMISSION_DENIEDauthorization failure
UNSUPPORTEDunable to get form for requested record types
CompliancemandatoryThis method must be implemented.
MethodcreatePlan
Description

Creates a new Plan.

Parametersosid.course.plan.PlanFormplanFormthe form for this Plan
Returnosid.course.plan.Planthe new Plan
ErrorsILLEGAL_STATE planForm already used in a create transaction
INVALID_ARGUMENTone or more of the form elements is invalid
NULL_ARGUMENT planForm is null
OPERATION_FAILEDunable to complete request
PERMISSION_DENIEDauthorization failure
UNSUPPORTED planForm did not originate from getPlanFormForCreate()
CompliancemandatoryThis method must be implemented.
MethodcanUpdatePlans
Description

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

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

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

Parametersosid.id.IdplanIdthe Id of the Plan
Returnosid.course.plan.PlanFormthe plan form
ErrorsNOT_FOUND planId is not found
NULL_ARGUMENT planId is null
OPERATION_FAILEDunable to complete request
PERMISSION_DENIEDauthorization failure
CompliancemandatoryThis method must be implemented.
MethodupdatePlan
Description

Updates an existing plan.

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

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

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

Deletes a Plan.

Parametersosid.id.IdplanIdthe Id of the Plan to remove
ErrorsNOT_FOUND planId not found
NULL_ARGUMENT planId is null
OPERATION_FAILEDunable to complete request
PERMISSION_DENIEDauthorization failure
CompliancemandatoryThis method must be implemented.
MethodcanManagePlanAliases
Description

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

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

Parametersosid.id.IdplanIdthe Id of a Plan
osid.id.IdaliasIdthe alias Id
ErrorsALREADY_EXISTS aliasId is already assigned
NOT_FOUND planId not found
NULL_ARGUMENT planId or aliasId is null
OPERATION_FAILEDunable to complete request
PERMISSION_DENIEDauthorization failure
CompliancemandatoryThis method must be implemented.