Objective Bank¶
Objective Bank¶
-
class
dlkit.services.learning.
ObjectiveBank
¶ Bases:
dlkit.osid.objects.OsidCatalog
,dlkit.osid.sessions.OsidSession
-
get_objective_bank_record
(objective_bank_record_type)¶ Gets the objective bank record corresponding to the given
ObjectiveBank
recordType
. This method is used to retrieve an object implementing the requested record. Theobjective_bank_record_type
may be theType
returned inget_record_types()
or any of its parents in aType
hierarchy wherehas_record_type(objective_bank_record_type)
istrue
.Parameters: objective_bank_record_type ( osid.type.Type
) – an objective bank record typeReturns: the objective bank record Return type: osid.learning.records.ObjectiveBankRecord
Raise: NullArgument
–objective_bank_record_type
isnull
Raise: OperationFailed
– unable to complete requestRaise: Unsupported
–has_record_type(objective_bank_record_type)
isfalse
-
Objective Lookup Methods¶
ObjectiveBank.
can_lookup_objectives
()¶Tests if this user can perform
Objective
lookups. A return of true does not guarantee successful authorization. A return of false indicates that it is known all methods in this session will result in aPermissionDenied
. This is intended as a hint to an application that may opt not to offer lookup operations to unauthorized users.
Returns: false
if lookup methods are not authorized,true
otherwiseReturn type: boolean
ObjectiveBank.
use_comparative_objective_view
()¶The returns from the lookup methods may omit or translate elements based on this session, such as authorization, and not result in an error. This view is used when greater interoperability is desired at the expense of precision.
ObjectiveBank.
use_plenary_objective_view
()¶A complete view of the
Objective
returns is desired. Methods will return what is requested or result in an error. This view is used when greater precision is desired at the expense of interoperability.
ObjectiveBank.
use_federated_objective_bank_view
()¶Federates the view for methods in this session. A federated view will include objectives in objective banks which are children of this objective bank in the objective bank hierarchy.
ObjectiveBank.
use_isolated_objective_bank_view
()¶Isolates the view for methods in this session. An isolated view restricts lookups to this objective bank only.
ObjectiveBank.
get_objective
(objective_id)¶Gets the
Objective
specified by itsId
. In plenary mode, the exactId
is found or aNotFound
results. Otherwise, the returnedObjective
may have a differentId
than requested, such as the case where a duplicateId
was assigned to anObjective
and retained for compatibility.
Parameters: objective_id ( osid.id.Id
) –Id
of theObjective
Returns: the objective Return type: osid.learning.Objective
Raise: NotFound
–objective_id
not foundRaise: NullArgument
–objective_id
isnull
Raise: OperationFailed
– unable to complete requestRaise: PermissionDenied
– authorization failure
ObjectiveBank.
get_objectives_by_ids
(objective_ids)¶Gets an
ObjectiveList
corresponding to the givenIdList
. In plenary mode, the returned list contains all of the objectives specified in theId
list, in the order of the list, including duplicates, or an error results if anId
in the supplied list is not found or inaccessible. Otherwise, inaccessibleObjectives
may be omitted from the list and may present the elements in any order including returning a unique set.
Parameters: objective_ids ( osid.id.IdList
) – the list ofIds
to retrieveReturns: the returned Objective
listReturn type: osid.learning.ObjectiveList
Raise: NotFound
– anId was
not foundRaise: NullArgument
–objective_ids
isnull
Raise: OperationFailed
– unable to complete requestRaise: PermissionDenied
– authorization failure
ObjectiveBank.
get_objectives_by_genus_type
(objective_genus_type)¶Gets an
ObjectiveList
corresponding to the given objective genusType
which does not include objectives of genus types derived from the specifiedType
. In plenary mode, the returned list contains all known objectives or an error results. Otherwise, the returned list may contain only those objectives that are accessible through this session.
Parameters: objective_genus_type ( osid.type.Type
) – an objective genus typeReturns: the returned Objective
listReturn type: osid.learning.ObjectiveList
Raise: NullArgument
–objective_genus_type
isnull
Raise: OperationFailed
– unable to complete requestRaise: PermissionDenied
– authorization failure
ObjectiveBank.
get_objectives_by_parent_genus_type
(objective_genus_type)¶Gets an
ObjectiveList
corresponding to the given objective genusType
and include any additional objective with genus types derived from the specifiedType
. In plenary mode, the returned list contains all known objectives or an error results. Otherwise, the returned list may contain only those objectives that are accessible through this session
Parameters: objective_genus_type ( osid.type.Type
) – an objective genus typeReturns: the returned Objective
listReturn type: osid.learning.ObjectiveList
Raise: NullArgument
–objective_genus_type
isnull
Raise: OperationFailed
– unable to complete requestRaise: PermissionDenied
– authorization failure
ObjectiveBank.
get_objectives_by_record_type
(objective_record_type)¶Gets an
ObjectiveList
containing the given objective recordType
. In plenary mode, the returned list contains all known objectives or an error results. Otherwise, the returned list may contain only those objectives that are accessible through this session.
Parameters: objective_record_type ( osid.type.Type
) – an objective record typeReturns: the returned Objective
listReturn type: osid.learning.ObjectiveList
Raise: NullArgument
–objective_record_type
isnull
Raise: OperationFailed
– unable to complete requestRaise: PermissionDenied
– authorization failure
ObjectiveBank.
objectives
¶Gets all
Objectives
. In plenary mode, the returned list contains all known objectives or an error results. Otherwise, the returned list may contain only those objectives that are accessible through this session.
Returns: an ObjectiveList
Return type: osid.learning.ObjectiveList
Raise: OperationFailed
– unable to complete requestRaise: PermissionDenied
– authorization failure
Objective Admin Methods¶
ObjectiveBank.
can_create_objectives
()¶Tests if this user can create
Objectives
. A return of true does not guarantee successful authorization. A return of false indicates that it is known creating an Objective will result in aPermissionDenied
. This is intended as a hint to an application that may opt not to offer create operations to an unauthorized user.
Returns: false
ifObjective
creation is not authorized,true
otherwiseReturn type: boolean
ObjectiveBank.
can_create_objective_with_record_types
(objective_record_types)¶Tests if this user can create a single
Objective
using the desired record types. WhileLearningManager.getObjectiveRecordTypes()
can be used to examine which records are supported, this method tests which record(s) are required for creating a specificObjective
. Providing an empty array tests if anObjective
can be created with no records.
Parameters: objective_record_types ( osid.type.Type[]
) – array of objective record typesReturns: true
ifObjective
creation using the specified recordTypes
is supported,false
otherwiseReturn type: boolean
Raise: NullArgument
–objective_record_types
isnull
ObjectiveBank.
get_objective_form_for_create
(objective_record_types)¶Gets the objective form for creating new objectives. A new form should be requested for each create transaction.
Parameters: objective_record_types ( osid.type.Type[]
) – array of objective record typesReturns: the objective form Return type: osid.learning.ObjectiveForm
Raise: NullArgument
–objective_record_types
isnull
Raise: OperationFailed
– unable to complete requestRaise: PermissionDenied
– authorization failureRaise: Unsupported
– unable to get form for requested record types
ObjectiveBank.
create_objective
(objective_form)¶Creates a new
Objective
.
Parameters: objective_form ( osid.learning.ObjectiveForm
) – the form for thisObjective
Returns: the new Objective
Return type: osid.learning.Objective
Raise: IllegalState
–objective_form
already used in a create transactionRaise: InvalidArgument
– one or more of the form elements is invalidRaise: NullArgument
–objective_form
isnull
Raise: OperationFailed
– unable to complete requestRaise: PermissionDenied
– authorization failureRaise: Unsupported
–objective_form
did not originate fromget_objective_form_for_create()
ObjectiveBank.
can_update_objectives
()¶Tests if this user can update
Objectives
. A return of true does not guarantee successful authorization. A return of false indicates that it is known updating anObjective
will result in aPermissionDenied
. This is intended as a hint to an application that may opt not to offer update operations to an unauthorized user.
Returns: false
if objective modification is not authorized,true
otherwiseReturn type: boolean
ObjectiveBank.
get_objective_form_for_update
(objective_id)¶Gets the objective form for updating an existing objective. A new objective form should be requested for each update transaction.
Parameters: objective_id ( osid.id.Id
) – theId
of theObjective
Returns: the objective form Return type: osid.learning.ObjectiveForm
Raise: NotFound
–objective_id
is not foundRaise: NullArgument
–objective_id
isnull
Raise: OperationFailed
– unable to complete requestRaise: PermissionDenied
– authorization failure
ObjectiveBank.
update_objective
(objective_form)¶Updates an existing objective.
Parameters: objective_form ( osid.learning.ObjectiveForm
) – the form containing the elements to be updatedRaise: IllegalState
–objective_form
already used in an update transactionRaise: InvalidArgument
– the form contains an invalid valueRaise: NullArgument
–objective_form
isnull
Raise: OperationFailed
– unable to complete requestRaise: PermissionDenied
– authorization failureRaise: Unsupported
–objective_form
did not originate fromget_objective_form_for_update()
ObjectiveBank.
can_delete_objectives
()¶Tests if this user can delete
Objectives
. A return of true does not guarantee successful authorization. A return of false indicates that it is known deleting anObjective
will result in aPermissionDenied
. This is intended as a hint to an application that may opt not to offer delete operations to an unauthorized user.
Returns: false
ifObjective
deletion is not authorized,true
otherwiseReturn type: boolean
ObjectiveBank.
delete_objective
(objective_id)¶Deletes the
Objective
identified by the givenId
.
Parameters: objective_id ( osid.id.Id
) – theId
of theObjective
to deleteRaise: NotFound
– anObjective
was not found identified by the givenId
Raise: NullArgument
–objective_id
isnull
Raise: OperationFailed
– unable to complete requestRaise: PermissionDenied
– authorization failure
ObjectiveBank.
can_manage_objective_aliases
()¶Tests if this user can manage
Id
aliases forObjectives
. A return of true does not guarantee successful authorization. A return of false indicates that it is known changing an alias will result in aPermissionDenied
. This is intended as a hint to an application that may opt not to offer alias operations to an unauthorized user.
Returns: false
ifObjective
aliasing is not authorized,true
otherwiseReturn type: boolean
ObjectiveBank.
alias_objective
(objective_id, alias_id)¶Adds an
Id
to anObjective
for the purpose of creating compatibility. The primaryId
of theObjective
is determined by the provider. The newId
performs as an alias to the primaryId
. If the alias is a pointer to another objective, it is reassigned to the given objectiveId
.
Parameters:
- objective_id (
osid.id.Id
) – theId
of anObjective
- alias_id (
osid.id.Id
) – the aliasId
Raise:
AlreadyExists
–alias_id
is already assignedRaise:
NotFound
–objective_id
not foundRaise:
NullArgument
–objective_id
oralias_id
isnull
Raise:
OperationFailed
– unable to complete requestRaise:
PermissionDenied
– authorization failure
Objective Hierarchy Methods¶
ObjectiveBank.
objective_hierarchy_id
¶Gets the hierarchy
Id
associated with this session.
Returns: the hierarchy Id
associated with this sessionReturn type: osid.id.Id
ObjectiveBank.
objective_hierarchy
¶Gets the hierarchy associated with this session.
Returns: the hierarchy associated with this session Return type: osid.hierarchy.Hierarchy
Raise: OperationFailed
– unable to complete requestRaise: PermissionDenied
– authorization failure
ObjectiveBank.
can_access_objective_hierarchy
()¶Tests if this user can perform hierarchy queries. A return of true does not guarantee successful authorization. A return of false indicates that it is known all methods in this session will result in a
PermissionDenied
. This is intended as a hint to an an application that may not offer traversal functions to unauthorized users.
Returns: false
if hierarchy traversal methods are not authorized,true
otherwiseReturn type: boolean
ObjectiveBank.
use_comparative_objective_view
()The returns from the lookup methods may omit or translate elements based on this session, such as authorization, and not result in an error. This view is used when greater interoperability is desired at the expense of precision.
ObjectiveBank.
use_plenary_objective_view
()A complete view of the
Objective
returns is desired. Methods will return what is requested or result in an error. This view is used when greater precision is desired at the expense of interoperability.
ObjectiveBank.
root_objective_ids
¶Gets the root objective
Ids
in this hierarchy.
Returns: the root objective Ids
Return type: osid.id.IdList
Raise: OperationFailed
– unable to complete requestRaise: PermissionDenied
– authorization failure
ObjectiveBank.
root_objectives
¶Gets the root objective in this objective hierarchy.
Returns: the root objective Return type: osid.learning.ObjectiveList
Raise: OperationFailed
– unable to complete requestRaise: PermissionDenied
– authorization failure
ObjectiveBank.
has_parent_objectives
(objective_id)¶Tests if the
Objective
has any parents.
Parameters: objective_id ( osid.id.Id
) – theId
of an objectiveReturns: true
if the objective has parents,false
otherwiseReturn type: boolean
Raise: NotFound
–objective_id
is not foundRaise: NullArgument
–objective_id
isnull
Raise: OperationFailed
– unable to complete requestRaise: PermissionDenied
– authorization failure
ObjectiveBank.
is_parent_of_objective
(id_, objective_id)¶Tests if an
Id
is a direct parent of an objective.
Parameters:
- id (
osid.id.Id
) – anId
- objective_id (
osid.id.Id
) – theId
of an objectiveReturns:
true
if thisid
is a parent ofobjective_id,
false
otherwiseReturn type:
boolean
Raise:
NotFound
–objective_id
is not foundRaise:
NullArgument
–id
orobjective_id
isnull
Raise:
OperationFailed
– unable to complete requestRaise:
PermissionDenied
– authorization failure
ObjectiveBank.
get_parent_objective_ids
(objective_id)¶Gets the parent
Ids
of the given objective.
Parameters: objective_id ( osid.id.Id
) – theId
of an objectiveReturns: the parent Ids
of the objectiveReturn type: osid.id.IdList
Raise: NotFound
–objective_id
is not foundRaise: NullArgument
–objective_id
isnull
Raise: OperationFailed
– unable to complete requestRaise: PermissionDenied
– authorization failure
ObjectiveBank.
get_parent_objectives
(objective_id)¶Gets the parents of the given objective.
Parameters: objective_id ( osid.id.Id
) – theId
of an objectiveReturns: the parents of the objective Return type: osid.learning.ObjectiveList
Raise: NotFound
–objective_id
is not foundRaise: NullArgument
–objective_id
isnull
Raise: OperationFailed
– unable to complete requestRaise: PermissionDenied
– authorization failure
ObjectiveBank.
is_ancestor_of_objective
(id_, objective_id)¶Tests if an
Id
is an ancestor of an objective.
Parameters:
- id (
osid.id.Id
) – anId
- objective_id (
osid.id.Id
) – theId
of an objectiveReturns:
true
if thisid
is an ancestor ofobjective_id,
false
otherwiseReturn type:
boolean
Raise:
NotFound
–objective_id
is not foundRaise:
NullArgument
–id
orobjective_id
isnull
Raise:
OperationFailed
– unable to complete requestRaise:
PermissionDenied
– authorization failure
ObjectiveBank.
has_child_objectives
(objective_id)¶Tests if an objective has any children.
Parameters: objective_id ( osid.id.Id
) – theId
of an objectiveReturns: true
if theobjective_id
has children,false
otherwiseReturn type: boolean
Raise: NotFound
–objective_id
is not foundRaise: NullArgument
–objective_id
isnull
Raise: OperationFailed
– unable to complete requestRaise: PermissionDenied
– authorization failure
ObjectiveBank.
is_child_of_objective
(id_, objective_id)¶Tests if an objective is a direct child of another.
Parameters:
- id (
osid.id.Id
) – anId
- objective_id (
osid.id.Id
) – theId
of an objectiveReturns:
true
if theid
is a child ofobjective_id,
false
otherwiseReturn type:
boolean
Raise:
NotFound
–objective_id
is not foundRaise:
NullArgument
–id
orobjective_id
isnull
Raise:
OperationFailed
– unable to complete requestRaise:
PermissionDenied
– authorization failure
ObjectiveBank.
get_child_objective_ids
(objective_id)¶Gets the child
Ids
of the given objective.
Parameters: objective_id ( osid.id.Id
) – theId
to queryReturns: the children of the objective Return type: osid.id.IdList
Raise: NotFound
–objective_id
is not foundRaise: NullArgument
–objective_id
isnull
Raise: OperationFailed
– unable to complete requestRaise: PermissionDenied
– authorization failure
ObjectiveBank.
get_child_objectives
(objective_id)¶Gets the children of the given objective.
Parameters: objective_id ( osid.id.Id
) – theId
to queryReturns: the children of the objective Return type: osid.learning.ObjectiveList
Raise: NotFound
–objective_id
is not foundRaise: NullArgument
–objective_id
isnull
Raise: OperationFailed
– unable to complete requestRaise: PermissionDenied
– authorization failure
ObjectiveBank.
is_descendant_of_objective
(id_, objective_id)¶Tests if an
Id
is a descendant of an objective.
Parameters:
- id (
osid.id.Id
) – anId
- objective_id (
osid.id.Id
) – theId
of an objectiveReturns:
true
if theid
is a descendant of theobjective_id,
false
otherwiseReturn type:
boolean
Raise:
NotFound
–objective_id
is not foundRaise:
NullArgument
–id
orobjective_id
isnull
Raise:
OperationFailed
– unable to complete requestRaise:
PermissionDenied
– authorization failure
ObjectiveBank.
get_objective_node_ids
(objective_id, ancestor_levels, descendant_levels, include_siblings)¶Gets a portion of the hierarchy for the given objective.
Parameters:
- objective_id (
osid.id.Id
) – theId
to query- ancestor_levels (
cardinal
) – the maximum number of ancestor levels to include. A value of 0 returns no parents in the node.- descendant_levels (
cardinal
) – the maximum number of descendant levels to include. A value of 0 returns no children in the node.- include_siblings (
boolean
) –true
to include the siblings of the given node,false
to omit the siblingsReturns: a catalog node
Return type:
osid.hierarchy.Node
Raise:
NotFound
–objective_id
not foundRaise:
NullArgument
–objective_id
isnull
Raise:
OperationFailed
– unable to complete requestRaise:
PermissionDenied
– authorization failure
ObjectiveBank.
get_objective_nodes
(objective_id, ancestor_levels, descendant_levels, include_siblings)¶Gets a portion of the hierarchy for the given objective.
Parameters:
- objective_id (
osid.id.Id
) – theId
to query- ancestor_levels (
cardinal
) – the maximum number of ancestor levels to include. A value of 0 returns no parents in the node.- descendant_levels (
cardinal
) – the maximum number of descendant levels to include. A value of 0 returns no children in the node.- include_siblings (
boolean
) –true
to include the siblings of the given node,false
to omit the siblingsReturns: an objective node
Return type:
osid.learning.ObjectiveNode
Raise:
NotFound
–objective_id
not foundRaise:
NullArgument
–objective_id
isnull
Raise:
OperationFailed
– unable to complete requestRaise:
PermissionDenied
– authorization failure
Objective Hierarchy Design Methods¶
ObjectiveBank.
objective_hierarchy_id
Gets the hierarchy
Id
associated with this session.
Returns: the hierarchy Id
associated with this sessionReturn type: osid.id.Id
ObjectiveBank.
objective_hierarchy
Gets the hierarchy associated with this session.
Returns: the hierarchy associated with this session Return type: osid.hierarchy.Hierarchy
Raise: OperationFailed
– unable to complete requestRaise: PermissionDenied
– authorization failure
ObjectiveBank.
can_modify_objective_hierarchy
()¶Tests if this user can change the hierarchy. A return of true does not guarantee successful authorization. A return of false indicates that it is known performing any update will result in a
PermissionDenied
. This is intended as a hint to an application that may opt not to offer these operations to an unauthorized user.
Returns: false
if changing this hierarchy is not authorized,true
otherwiseReturn type: boolean
ObjectiveBank.
add_root_objective
(objective_id)¶Adds a root objective.
Parameters: objective_id ( osid.id.Id
) – theId
of an objectiveRaise: AlreadyExists
–objective_id
is already in hierarchyRaise: NotFound
–objective_id
not foundRaise: NullArgument
–objective_id
isnull
Raise: OperationFailed
– unable to complete requestRaise: PermissionDenied
– authorization failure
ObjectiveBank.
remove_root_objective
(objective_id)¶Removes a root objective.
Parameters: objective_id ( osid.id.Id
) – theId
of an objectiveRaise: NotFound
–objective_id
not foundRaise: NullArgument
–objective_id
isnull
Raise: OperationFailed
– unable to complete requestRaise: PermissionDenied
– authorization failure
ObjectiveBank.
add_child_objective
(objective_id, child_id)¶Adds a child to an objective.
Parameters:
- objective_id (
osid.id.Id
) – theId
of an objective- child_id (
osid.id.Id
) – theId
of the new childRaise:
AlreadyExists
–objective_id
is already a parent ofchild_id
Raise:
NotFound
–objective_id
orchild_id
not foundRaise:
NullArgument
–objective_id
orchild_id
isnull
Raise:
OperationFailed
– unable to complete requestRaise:
PermissionDenied
– authorization failure
ObjectiveBank.
remove_child_objective
(objective_id, child_id)¶Removes a child from an objective.
Parameters:
- objective_id (
osid.id.Id
) – theId
of an objective- child_id (
osid.id.Id
) – theId
of the new childRaise:
NotFound
–objective_id
not a parent ofchild_id
Raise:
NullArgument
–objective_id
orchild_id
isnull
Raise:
OperationFailed
– unable to complete requestRaise:
PermissionDenied
– authorization failure
ObjectiveBank.
remove_child_objectives
(objective_id)¶Removes all children from an objective.
Parameters: objective_id ( osid.id.Id
) – theId
of an objectiveRaise: NotFound
–objective_id
not foundRaise: NullArgument
–objective_id
isnull
Raise: OperationFailed
– unable to complete requestRaise: PermissionDenied
– authorization failure
Objective Sequencing Methods¶
ObjectiveBank.
objective_hierarchy_id
Gets the hierarchy
Id
associated with this session.
Returns: the hierarchy Id
associated with this sessionReturn type: osid.id.Id
ObjectiveBank.
objective_hierarchy
Gets the hierarchy associated with this session.
Returns: the hierarchy associated with this session Return type: osid.hierarchy.Hierarchy
Raise: OperationFailed
– unable to complete requestRaise: PermissionDenied
– authorization failure
ObjectiveBank.
can_sequence_objectives
()¶Tests if this user can sequence objectives. A return of true does not guarantee successful authorization. A return of false indicates that it is known performing any update will result in a
PermissionDenied
. This is intended as a hint to an application that may opt not to offer these operations to an unauthorized user.
Returns: false
if sequencing objectives is not authorized,true
otherwiseReturn type: boolean
ObjectiveBank.
move_objective_ahead
(parent_objective_id, reference_objective_id, objective_id)¶Moves an objective ahead of a refrence objective under the given parent.
Parameters:
- parent_objective_id (
osid.id.Id
) – theId
of the parent objective- reference_objective_id (
osid.id.Id
) – theId
of the objective- objective_id (
osid.id.Id
) – theId
of the objective to move ahead ofreference_objective_id
Raise:
NotFound
–parent_objective_id, reference_objective_id,
orobjective_id
not found, orreference_objective_id
orobjective_id
is not a child ofparent_objective_id
Raise:
NullArgument
–parent_objective_id, reference_objective_id,
orid
isnull
Raise:
OperationFailed
– unable to complete requestRaise:
PermissionDenied
– authorization failure
ObjectiveBank.
move_objective_behind
(parent_objective_id, reference_objective_id, objective_id)¶Moves an objective behind a refrence objective under the given parent.
Parameters:
- parent_objective_id (
osid.id.Id
) – theId
of the parent objective- reference_objective_id (
osid.id.Id
) – theId
of the objective- objective_id (
osid.id.Id
) – theId
of the objective to move behindreference_objective_id
Raise:
NotFound
–parent_objective_id, reference_objective_id,
orobjective_id
not found, orreference_objective_id
orobjective_id
is not a child ofparent_objective_id
Raise:
NullArgument
–parent_objective_id, reference_objective_id,
orid
isnull
Raise:
OperationFailed
– unable to complete requestRaise:
PermissionDenied
– authorization failure
ObjectiveBank.
sequence_objectives
(parent_objective_id, objective_ids)¶Sequences a set of objectives under a parent.
Parameters:
- parent_objective_id (
osid.id.Id
) – theId
of the parent objective- objective_ids (
osid.id.Id[]
) – theId
of the objectivesRaise:
NotFound
–parent_id
or anobjective_id
not found, or anobjective_id
is not a child ofparent_objective_id
Raise:
NullArgument
–paren_objectivet_id
orobjective_ids
isnull
Raise:
OperationFailed
– unable to complete requestRaise:
PermissionDenied
– authorization failure
Objective Requisite Methods¶
ObjectiveBank.
can_lookup_objective_prerequisites
()¶Tests if this user can perform
Objective
lookups. A return of true does not guarantee successful authorization. A return of false indicates that it is known all methods in this session will result in aPermissionDenied
. This is intended as a hint to an application that may opt not to offer lookup operations to unauthorized users.
Returns: false
if lookup methods are not authorized,true
otherwiseReturn type: boolean
ObjectiveBank.
use_comparative_objective_view
()The returns from the lookup methods may omit or translate elements based on this session, such as authorization, and not result in an error. This view is used when greater interoperability is desired at the expense of precision.
ObjectiveBank.
use_plenary_objective_view
()A complete view of the
Objective
returns is desired. Methods will return what is requested or result in an error. This view is used when greater precision is desired at the expense of interoperability.
ObjectiveBank.
use_federated_objective_bank_view
()Federates the view for methods in this session. A federated view will include objectives in objective banks which are children of this objective bank in the objective bank hierarchy.
ObjectiveBank.
use_isolated_objective_bank_view
()Isolates the view for methods in this session. An isolated view restricts lookups to this objective bank only.
ObjectiveBank.
get_requisite_objectives
(objective_id)¶Gets a list of
Objectives
that are the immediate requisites for the givenObjective
. In plenary mode, the returned list contains all of the immediate requisites, or an error results if anObjective
is not found or inaccessible. Otherwise, inaccessibleObjectives
may be omitted from the list and may present the elements in any order including returning a unique set.
Parameters: objective_id ( osid.id.Id
) –Id
of theObjective
Returns: the returned requisite Objectives
Return type: osid.learning.ObjectiveList
Raise: NotFound
–objective_id
not foundRaise: NullArgument
–objective_id
isnull
Raise: OperationFailed
– unable to complete requestRaise: PermissionDenied
– authorization failure
ObjectiveBank.
get_all_requisite_objectives
(objective_id)¶Gets a list of
Objectives
that are the requisites for the givenObjective
including the requistes of the requisites, and so on. In plenary mode, the returned list contains all of the immediate requisites, or an error results if anObjective
is not found or inaccessible. Otherwise, inaccessibleObjectives
may be omitted from the list and may present the elements in any order including returning a unique set.
Parameters: objective_id ( osid.id.Id
) –Id
of theObjective
Returns: the returned Objective
listReturn type: osid.learning.ObjectiveList
Raise: NotFound
–objective_id
not foundRaise: NullArgument
–objective_id
isnull
Raise: OperationFailed
– unable to complete requestRaise: PermissionDenied
– authorization failure
ObjectiveBank.
get_dependent_objectives
(objective_id)¶Gets a list of
Objectives
that require the givenObjective
. In plenary mode, the returned list contains all of the immediate requisites, or an error results if an Objective is not found or inaccessible. Otherwise, inaccessibleObjectives
may be omitted from the list and may present the elements in any order including returning a unique set.
Parameters: objective_id ( osid.id.Id
) –Id
of theObjective
Returns: the returned Objective
listReturn type: osid.learning.ObjectiveList
Raise: NotFound
–objective_id
not foundRaise: NullArgument
–objective_id
isnull
Raise: OperationFailed
– unable to complete requestRaise: PermissionDenied
– authorization failure
ObjectiveBank.
is_objective_required
(objective_id, required_objective_id)¶Tests if an objective is required before proceeding with an objective. One objective may indirectly depend on another objective by way of one or more other objectives.
Parameters:
- objective_id (
osid.id.Id
) –Id
of the dependentObjective
- required_objective_id (
osid.id.Id
) –Id
of the requiredObjective
Returns:
true
ifobjective_id
depends onrequired_objective_id,
false
otherwiseReturn type:
boolean
Raise:
NotFound
–objective_id
not foundRaise:
NullArgument
–objective_id
isnull
Raise:
OperationFailed
– unable to complete requestRaise:
PermissionDenied
– authorization failure
ObjectiveBank.
get_equivalent_objectives
(objective_id)¶Gets a list of
Objectives
that are equivalent to the givenObjective
for the purpose of requisites. An equivalent objective can satisfy the given objective. In plenary mode, the returned list contains all of the equivalent requisites, or an error results if an Objective is not found or inaccessible. Otherwise, inaccessibleObjectives
may be omitted from the list and may present the elements in any order including returning a unique set.
Parameters: objective_id ( osid.id.Id
) –Id
of theObjective
Returns: the returned Objective
listReturn type: osid.learning.ObjectiveList
Raise: NotFound
–objective_id
not foundRaise: NullArgument
–objective_id
isnull
Raise: OperationFailed
– unable to complete requestRaise: PermissionDenied
– authorization failure
Objective Requisite Assignment Methods¶
ObjectiveBank.
can_assign_requisites
()¶Tests if this user can manage objective requisites. A return of true does not guarantee successful authorization. A return of false indicates that it is known mapping methods in this session will result in a
PermissionDenied
. This is intended as a hint to an application that may opt not to offer assignment operations to unauthorized users.
Returns: false
if mapping is not authorized,true
otherwiseReturn type: boolean
ObjectiveBank.
assign_objective_requisite
(objective_id, requisite_objective_id)¶Creates a requirement dependency between two
Objectives
.
Parameters:
- objective_id (
osid.id.Id
) – theId
of the dependentObjective
- requisite_objective_id (
osid.id.Id
) – theId
of the requiredObjective
Raise:
AlreadyExists
–objective_id
already mapped torequisite_objective_id
Raise:
NotFound
–objective_id
orrequisite_objective_id
not foundRaise:
NullArgument
–objective_id
orrequisite_objective_id
isnull
Raise:
OperationFailed
– unable to complete requestRaise:
PermissionDenied
– authorization failure
ObjectiveBank.
unassign_objective_requisite
(objective_id, requisite_objective_id)¶Removes an
Objective
requisite from anObjective
.
Parameters:
- objective_id (
osid.id.Id
) – theId
of theObjective
- requisite_objective_id (
osid.id.Id
) – theId
of the requiredObjective
Raise:
NotFound
–objective_id
orrequisite_objective_id
not found orobjective_id
not mapped torequisite_objective_id
Raise:
NullArgument
–objective_id
orrequisite_objective_id
isnull
Raise:
OperationFailed
– unable to complete requestRaise:
PermissionDenied
– authorization failure
ObjectiveBank.
assign_equivalent_objective
(objective_id, equivalent_objective_id)¶Makes an objective equivalent to another objective for the purposes of satisfying a requisite.
Parameters:
- objective_id (
osid.id.Id
) – theId
of the principalObjective
- equivalent_objective_id (
osid.id.Id
) – theId
of the equivalentObjective
Raise:
AlreadyExists
–objective_id
already mapped toequiavelnt_objective_id
Raise:
NotFound
–objective_id
orequivalent_objective_id
not foundRaise:
NullArgument
–objective_id
orequivalent_objective_id
isnull
Raise:
OperationFailed
– unable to complete requestRaise:
PermissionDenied
– authorization failure
ObjectiveBank.
unassign_equivalent_objective
(objective_id, equivalent_objective_id)¶Removes an
Objective
requisite from anObjective
.
Parameters:
- objective_id (
osid.id.Id
) – theId
of the principalObjective
- equivalent_objective_id (
osid.id.Id
) – theId
of the equivalentObjective
Raise:
NotFound
–objective_id
orequivalent_objective_id
not found orobjective_id
is already equivalent toequivalent_objective_id
Raise:
NullArgument
–objective_id
orequivalent_objective_id
isnull
Raise:
OperationFailed
– unable to complete requestRaise:
PermissionDenied
– authorization failure
Activity Lookup Methods¶
ObjectiveBank.
can_lookup_activities
()¶Tests if this user can perform
Activity
lookups. A return of true does not guarantee successful authorization. A return of false indicates that it is known all methods in this session will result in aPermissionDenied
. This is intended as a hint to an application that may opt not to offer lookup operations to unauthorized users.
Returns: false
if lookup methods are not authorized,true
otherwiseReturn type: boolean
ObjectiveBank.
use_comparative_activity_view
()¶The returns from the lookup methods may omit or translate elements based on this session, such as authorization, and not result in an error. This view is used when greater interoperability is desired at the expense of precision.
ObjectiveBank.
use_plenary_activity_view
()¶A complete view of the
Activity
returns is desired. Methods will return what is requested or result in an error. This view is used when greater precision is desired at the expense of interoperability.
ObjectiveBank.
use_federated_objective_bank_view
()Federates the view for methods in this session. A federated view will include objectives in objective banks which are children of this objective bank in the objective bank hierarchy.
ObjectiveBank.
use_isolated_objective_bank_view
()Isolates the view for methods in this session. An isolated view restricts lookups to this objective bank only.
ObjectiveBank.
get_activity
(activity_id)¶Gets the
Activity
specified by itsId
. In plenary mode, the exactId
is found or aNotFound
results. Otherwise, the returnedActivity
may have a differentId
than requested, such as the case where a duplicateId
was assigned to aActivity
and retained for compatibility.
Parameters: activity_id ( osid.id.Id
) –Id
of theActivity
Returns: the activity Return type: osid.learning.Activity
Raise: NotFound
–activity_id
not foundRaise: NullArgument
–activity_id
isnull
Raise: OperationFailed
– unable to complete requestRaise: PermissionDenied
– authorization failure
ObjectiveBank.
get_activities_by_ids
(activity_ids)¶Gets an
ActivityList
corresponding to the givenIdList
. In plenary mode, the returned list contains all of the activities specified in theId
list, in the order of the list, including duplicates, or an error results if anId
in the supplied list is not found or inaccessible. Otherwise, inaccessibleActivities
may be omitted from the list and may present the elements in any order including returning a unique set.
Parameters: activity_ids ( osid.id.IdList
) – the list ofIds
to retrieveReturns: the returned Activity
listReturn type: osid.learning.ActivityList
Raise: NotFound
– anId was
not foundRaise: NullArgument
–activity_ids
isnull
Raise: OperationFailed
– unable to complete requestRaise: PermissionDenied
– authorization failure
ObjectiveBank.
get_activities_by_genus_type
(activity_genus_type)¶Gets an
ActivityList
corresponding to the given activity genusType
which does not include activities of genus types derived from the specifiedType
. In plenary mode, the returned list contains all known activities or an error results. Otherwise, the returned list may contain only those activities that are accessible through this session.
Parameters: activity_genus_type ( osid.type.Type
) – an activity genus typeReturns: the returned Activity
listReturn type: osid.learning.ActivityList
Raise: NullArgument
–activity_genus_type
isnull
Raise: OperationFailed
– unable to complete requestRaise: PermissionDenied
– authorization failure
ObjectiveBank.
get_activities_by_parent_genus_type
(activity_genus_type)¶Gets an
ActivityList
corresponding to the given activity genusType
and include any additional activity with genus types derived from the specifiedType
. In plenary mode, the returned list contains all known activities or an error results. Otherwise, the returned list may contain only those activities that are accessible through this session.
Parameters: activity_genus_type ( osid.type.Type
) – an activity genus typeReturns: the returned Activity
listReturn type: osid.learning.ActivityList
Raise: NullArgument
–activity_genus_type
isnull
Raise: OperationFailed
– unable to complete requestRaise: PermissionDenied
– authorization failure
ObjectiveBank.
get_activities_by_record_type
(activity_record_type)¶Gets a
ActivityList
containing the given activity recordType
. In plenary mode, the returned list contains all known activities or an error results. Otherwise, the returned list may contain only those activities that are accessible through this session.
Parameters: activity_record_type ( osid.type.Type
) – an activity record typeReturns: the returned Activity
listReturn type: osid.learning.ActivityList
Raise: NullArgument
–activity_record_type
isnull
Raise: OperationFailed
– unable to complete requestRaise: PermissionDenied
– authorization failure
ObjectiveBank.
get_activities_for_objective
(objective_id)¶Gets the activities for the given objective. In plenary mode, the returned list contains all of the activities mapped to the objective
Id
or an error results if an Id in the supplied list is not found or inaccessible. Otherwise, inaccessibleActivities
may be omitted from the list and may present the elements in any order including returning a unique set.
Parameters: objective_id ( osid.id.Id
) –Id
of theObjective
Returns: list of enrollments Return type: osid.learning.ActivityList
Raise: NotFound
–objective_id
not foundRaise: NullArgument
–objective_id
isnull
Raise: OperationFailed
– unable to complete requestRaise: PermissionDenied
– authorization failure
ObjectiveBank.
get_activities_for_objectives
(objective_ids)¶Gets the activities for the given objectives. In plenary mode, the returned list contains all of the activities specified in the objective
Id
list, in the order of the list, including duplicates, or an error results if a course offeringId
in the supplied list is not found or inaccessible. Otherwise, inaccessibleActivities
may be omitted from the list and may present the elements in any order including returning a unique set.
Parameters: objective_ids ( osid.id.IdList
) – list of objectiveIds
Returns: list of activities Return type: osid.learning.ActivityList
Raise: NotFound
– anobjective_id
not foundRaise: NullArgument
–objective_id_list
isnull
Raise: OperationFailed
– unable to complete requestRaise: PermissionDenied
– authorization failure
ObjectiveBank.
get_activities_by_asset
(asset_id)¶Gets the activities for the given asset. In plenary mode, the returned list contains all of the activities mapped to the asset
Id
or an error results if anId
in the supplied list is not found or inaccessible. Otherwise, inaccessibleActivities
may be omitted from the list and may present the elements in any order including returning a unique set.
Parameters: asset_id ( osid.id.Id
) –Id
of anAsset
Returns: list of activities Return type: osid.learning.ActivityList
Raise: NotFound
–asset_id
not foundRaise: NullArgument
–asset_id
isnull
Raise: OperationFailed
– unable to complete requestRaise: PermissionDenied
– authorization failure
ObjectiveBank.
get_activities_by_assets
(asset_ids)¶Gets the activities for the given asset. In plenary mode, the returned list contains all of the activities mapped to the asset
Id
or an error results if anId
in the supplied list is not found or inaccessible. Otherwise, inaccessibleActivities
may be omitted from the list and may present the elements in any order including returning a unique set.
Parameters: asset_ids ( osid.id.IdList
) –Ids
ofAssets
Returns: list of activities Return type: osid.learning.ActivityList
Raise: NotFound
– anasset_id
not foundRaise: NullArgument
–asset_id_list
isnull
Raise: OperationFailed
– unable to complete requestRaise: PermissionDenied
– authorization failure
ObjectiveBank.
activities
¶Gets all
Activities
. In plenary mode, the returned list contains all known activites or an error results. Otherwise, the returned list may contain only those activities that are accessible through this session.
Returns: a ActivityList
Return type: osid.learning.ActivityList
Raise: OperationFailed
– unable to complete requestRaise: PermissionDenied
– authorization failure
Activity Admin Methods¶
ObjectiveBank.
can_create_activities
()¶Tests if this user can create
Activities
. A return of true does not guarantee successful authorization. A return of false indicates that it is known creating anActivity
will result in aPermissionDenied
. This is intended as a hint to an application that may opt not to offer create operations to an unauthorized user.
Returns: false
ifActivity
creation is not authorized,true
otherwiseReturn type: boolean
ObjectiveBank.
can_create_activity_with_record_types
(activity_record_types)¶Tests if this user can create a single
Activity
using the desired record types. WhileLearningManager.getActivityRecordTypes()
can be used to examine which records are supported, this method tests which record(s) are required for creating a specificActivity
. Providing an empty array tests if anActivity
can be created with no records.
Parameters: activity_record_types ( osid.type.Type[]
) – array of activity record typesReturns: true
ifActivity
creation using the specified recordTypes
is supported,false
otherwiseReturn type: boolean
Raise: NullArgument
–activity_record_types
isnull
ObjectiveBank.
get_activity_form_for_create
(objective_id, activity_record_types)¶Gets the activity form for creating new activities. A new form should be requested for each create transaction.
Parameters:
- objective_id (
osid.id.Id
) – theId
of theObjective
- activity_record_types (
osid.type.Type[]
) – array of activity record typesReturns: the activity form
Return type:
osid.learning.ActivityForm
Raise:
NotFound
–objective_id
is not foundRaise:
NullArgument
–objective_id
oractivity_record_types
isnull
Raise:
OperationFailed
– unable to complete requestRaise:
PermissionDenied
– authorization failureRaise:
Unsupported
– unable to get form for requested record types
ObjectiveBank.
create_activity
(activity_form)¶Creates a new
Activity
.
Parameters: activity_form ( osid.learning.ActivityForm
) – the form for thisActivity
Returns: the new Activity
Return type: osid.learning.Activity
Raise: IllegalState
–activity_form
already used in a create transactionRaise: InvalidArgument
– one or more of the form elements is invalidRaise: NullArgument
–activity_form
isnull
Raise: OperationFailed
– unable to complete requestRaise: PermissionDenied
– authorization failureRaise: Unsupported
–activity_form
did not originate fromget_activity_form_for_create()
ObjectiveBank.
can_update_activities
()¶Tests if this user can update
Activities
. A return of true does not guarantee successful authorization. A return of false indicates that it is known updating anActivity
will result in aPermissionDenied
. This is intended as a hint to an application that may opt not to offer update operations to an unauthorized user.
Returns: false
if activity modification is not authorized,true
otherwiseReturn type: boolean
ObjectiveBank.
get_activity_form_for_update
(activity_id)¶Gets the activity form for updating an existing activity. A new activity form should be requested for each update transaction.
Parameters: activity_id ( osid.id.Id
) – theId
of theActivity
Returns: the activity form Return type: osid.learning.ActivityForm
Raise: NotFound
–activity_id
is not foundRaise: NullArgument
–activity_id
isnull
Raise: OperationFailed
– unable to complete requestRaise: PermissionDenied
– authorization failure
ObjectiveBank.
update_activity
(activity_form)¶Updates an existing activity,.
Parameters: activity_form ( osid.learning.ActivityForm
) – the form containing the elements to be updatedRaise: IllegalState
–activity_form
already used in an update transactionRaise: InvalidArgument
– the form contains an invalid valueRaise: NullArgument
–activity_form
isnull
Raise: OperationFailed
– unable to complete requestRaise: PermissionDenied
– authorization failureRaise: Unsupported
–activity_form
did not originate fromget_activity_form_for_update()
ObjectiveBank.
can_delete_activities
()¶Tests if this user can delete
Activities
. A return of true does not guarantee successful authorization. A return of false indicates that it is known deleting anActivity
will result in aPermissionDenied
. This is intended as a hint to an application that may opt not to offer delete operations to an unauthorized user.
Returns: false
ifActivity
deletion is not authorized,true
otherwiseReturn type: boolean
ObjectiveBank.
delete_activity
(activity_id)¶Deletes the
Activity
identified by the givenId
.
Parameters: activity_id ( osid.id.Id
) – theId
of theActivity
to deleteRaise: NotFound
– anActivity
was not found identified by the givenId
Raise: NullArgument
–activity_id
isnull
Raise: OperationFailed
– unable to complete requestRaise: PermissionDenied
– authorization failure
ObjectiveBank.
can_manage_activity_aliases
()¶Tests if this user can manage
Id
aliases for activities. A return of true does not guarantee successful authorization. A return of false indicates that it is known changing an alias will result in aPermissionDenied
. This is intended as a hint to an application that may opt not to offer alias operations to an unauthorized user.
Returns: false
ifActivity
aliasing is not authorized,true
otherwiseReturn type: boolean
ObjectiveBank.
alias_activity
(activity_id, alias_id)¶Adds an
Id
to anActivity
for the purpose of creating compatibility. The primaryId
of theActivity
is determined by the provider. The newId
performs as an alias to the primaryId
. If the alias is a pointer to another activity, it is reassigned to the given activityId
.
Parameters:
- activity_id (
osid.id.Id
) – theId
of anActivity
- alias_id (
osid.id.Id
) – the aliasId
Raise:
AlreadyExists
–alias_id
is already assignedRaise:
NotFound
–activity_id
not foundRaise:
NullArgument
–activity_id
oralias_id
isnull
Raise:
OperationFailed
– unable to complete requestRaise:
PermissionDenied
– authorization failure