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

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

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

The delete operations delete Modules. To unmap a Module from the current CourseCatalog, the ModuleCourseCatalogAssignmentSession should be used. These delete operations attempt to remove the Module 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.
MethodcanCreateModules
Description

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

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

Parametersosid.type.Type[]moduleRecordTypesarray of module record types
Returnboolean true if Module creation using the specified record Types is supported, false otherwise
ErrorsNULL_ARGUMENT moduleRecordTypes is null
CompliancemandatoryThis method must be implemented.
MethodgetModuleFormForCreate
Description

Gets the module form for creating new modules. A new form should be requested for each create transaction.

Parametersosid.id.IdsyllabusIda syllabus Id
osid.type.Type[]moduleRecordTypesarray of module record types
Returnosid.course.syllabus.ModuleFormthe module form
ErrorsNOT_FOUND syllabusId is not found
NULL_ARGUMENT syllabusId or moduleRecordTypes is null
OPERATION_FAILEDunable to complete request
PERMISSION_DENIEDauthorization failure
UNSUPPORTEDunable to get form for requested record types
CompliancemandatoryThis method must be implemented.
MethodcreateModule
Description

Creates a new Module.

Parametersosid.course.syllabus.ModuleFormmoduleFormthe form for this Module
Returnosid.course.syllabus.Modulethe new Module
ErrorsILLEGAL_STATE moduleForm already used in a create transaction
INVALID_ARGUMENTone or more of the form elements is invalid
NULL_ARGUMENT moduleForm is null
OPERATION_FAILEDunable to complete request
PERMISSION_DENIEDauthorization failure
UNSUPPORTED moduleForm did not originate from getModuleFormForCreate()
CompliancemandatoryThis method must be implemented.
MethodcanUpdateModules
Description

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

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

Parametersosid.id.IdmoduleIdthe Id of the Module
Returnosid.course.syllabus.ModuleFormthe module form
ErrorsNOT_FOUND moduleId is not found
NULL_ARGUMENT moduleId is null
OPERATION_FAILEDunable to complete request
PERMISSION_DENIEDauthorization failure
CompliancemandatoryThis method must be implemented.
MethodupdateModule
Description

Updates an existing module.

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

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

Deletes a Module.

Parametersosid.id.IdmoduleIdthe Id of the Module to remove
ErrorsNOT_FOUND moduleId not found
NULL_ARGUMENT moduleId is null
OPERATION_FAILEDunable to complete request
PERMISSION_DENIEDauthorization failure
CompliancemandatoryThis method must be implemented.
MethodcanManageModuleAliases
Description

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

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

Parametersosid.id.IdmoduleIdthe Id of a Module
osid.id.IdaliasIdthe alias Id
ErrorsALREADY_EXISTS aliasId is already assigned
NOT_FOUND moduleId not found
NULL_ARGUMENT moduleId or aliasId is null
OPERATION_FAILEDunable to complete request
PERMISSION_DENIEDauthorization failure
CompliancemandatoryThis method must be implemented.
MethodcanSequenceModules
Description

Tests if this user can order Modules. 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 sequencing operations to an unauthorized user.

Returnboolean false if Module ordering is not authorized, true otherwise
CompliancemandatoryThis method must be implemented.
MethodmoveModuleAhead
Description

Reorders modules in a syllabus by moving the specified module in front of a reference module.

Parametersosid.id.IdmoduleIdthe Id of a Module
osid.id.IdsyllabusIdthe Id of a Syllabus
osid.id.IdreferenceIdthe reference module Id
ErrorsNOT_FOUND moduleId, syllabusId, or referenceId not found or, moduleId or referenceId not related to syllabusId
NULL_ARGUMENT moduleId, syllabusId, or referenceId is null
OPERATION_FAILEDunable to complete request
PERMISSION_DENIEDauthorization failure
CompliancemandatoryThis method must be implemented.
MethodmoveModuleBehind
Description

Reorders modules in a syllabus by moving the specified module behind a reference module.

Parametersosid.id.IdmoduleIdthe Id of a Module
osid.id.IdsyllabusIdthe Id of a Syllabus
osid.id.IdreferenceIdthe reference module Id
ErrorsNOT_FOUND moduleId, syllabusId, or referenceId not found or, moduleId or referenceId not related to syllabusId
NULL_ARGUMENT moduleId, syllabusId, or referenceId is null
OPERATION_FAILEDunable to complete request
PERMISSION_DENIEDauthorization failure
CompliancemandatoryThis method must be implemented.
MethodorderModules
Description

Reorders a set of modules in a syllabus.

Parametersosid.id.Id[]moduleIdsthe Ids for a set of Modules
osid.id.IdsyllabusIdthe Id of a Syllabus
ErrorsNOT_FOUND moduleId not found or, a moduleId not related to syllabusId
NULL_ARGUMENT moduleIds or syllabusId is null
OPERATION_FAILEDunable to complete request
PERMISSION_DENIEDauthorization failure
CompliancemandatoryThis method must be implemented.