Welcome to the DLKit documentation!¶
This documentation for the Digital Learning Toolkit (DLKit), like the toolkit itself, is still under development. It currently covers only a small handful of the 160 service packages and 9,000 educational service APIs that have been defined by MIT’s Office of Digital Learning and its collaborators to date.
The DLKit codebase is generated from the Open Service Interface Definitions (OSIDs), an extensive and growing suite of interface contract specifications that describe the integration points among the core services and components that make up modern educational systems.
Note that this documentation is intended for API consumers. However, at the heart of DLKit is an integration stack that is even more closely aligned with the OSID specifications. This has been designed to allow third parties to extend the library with alternative or additional implementations of any of the defined services for the purposes of service integration, technology migration, service adaptation, etc. Documentation written for service implementers and system integrators, including implementation notes and compliance information, will be provided elsewhere.
The complete OSID specification can be found at http://osid.org/specifications.
If you are interested in learning more about the DLKit Python libraries documented here, please contact dlkit-info@mit.edu
Contents:¶
Tutorial: DLKit Learning Service Basics¶
This tutorial is under development. It currently focuses on aspects of the Learning service. At the
time of this writing, MIT’s Office of Digital Learning is supporting a production learning objective management
service called the MIT Core Concept Catalog (MC3). DLKit includes an underlying implementation that uses MC3 for
persistence. As a result, this tutorial uses examples primarily from this particular service, which deals with
managing learning objectives, learning paths and relationships between learning objectives and educational
assets, assessments, etc, since there is data available for testing.
All of the other DLKit Interface Specifications build on most of the same patterns outlined in this tutorial, beginning with loading managers. Make sure that the dlkit package is in your python path or install the library.
The Runtime Manager and Proxy Authentication¶
Service managers are instantiated through a Runtime Manger, which are designed to work with certain runtime environments,
like Django or edX/XBlock runtimes. To get access to these runtime environments please contact dlkit-info@mit.edu. Install the
runtime environment you want to use and make sure that your Django project’s settings.py includes dlkit_django or
dlkit_xblock as appropriate.
Now you can get the RuntimeManager root instance for your runtime environment. Note that there is only one, and
it gets instantiated at environment launch time, it is thread-safe and used by all consumer application sessions:
from dlkit_django import runtime
This runtime object is your gateway to access all the underlying service managers and their respective service sessions and functionality
The django runtime knows about Django’s own services for users. You will have access to an HTTPRequest object that includes an user authentication (the request variable in the examples below). This needs to be encapsulated in a Proxy object:
from dlkit_django import PROXY_SESSION
condition = PROXY_SESSION.get_proxy_condition()
condition.set_http_request(request)
proxy = PROXY_SESSION.get_proxy(condition)
Or, if you are standing up dlkit in edX, get an XBlockUser() object from the xblock runtime. That object is assumed to be stored the ‘xblock_user’ variable below:
from dlkit_xblock import PROXY_SESSION
condition = PROXY_SESSION.get_proxy_condition()
condition.set_xblock_user(xblock_user)
proxy = PROXY_SESSION.get_proxy(condition)
Now you have a Proxy object that holds the user data and eventually other stuff, like locale information, etc, that can be used to instantiate new service Managers, which you can also insert into your HttpRequest.session:
from dlkit_django import RUNTIME
request.session.lm = RUNTIME.get_service_manager('LEARNING', proxy)
For the duration of the session you can use this for all the other things. that you normally do.
There is a lot more you can do with the RuntimeManager, but getting service managers will be the most common task. One of the other
important tasks of this manager, is configuration the underlying service stack based on the configs.py file and associated helpers. We
will cover this later.
Loading the Learning Manager¶
All consumer applications wishing to use the DLKit Learning service should start by instantiating
a LearningManager (don’t worry about the proxy for now):
lm = runtime.get_service_manager('LEARNING')
Everything you need to do within the learning service can now be
accessed through this manager. An OSID service Manager is used like a factory, providing all
the other objects necessary for using the service. You should never try to instantiate any
other OSID object directly, even if you know where its class definition resides.
The simplest thing you can do with a manager is to inspect its display_name and description
methods. Note that DLKit always returns user-readable strings as DisplayText
objects. The actual text is available via the get_text() method.
Other DisplayText methods return the LanguageType, ScriptType and
FormatType of the text to be displayed:
print "Learning Manager successfully instantiated:"
print " " + lm.get_display_name().get_text()
print " " + lm.get_description().get_text()
print (" (this description was written using the " +
lm.get_description().get_language_type().get_display_label().get_text() +
" language)\n")
Results in something that looks like this:
Learning Manager successfully instantiated:
MC3 Learning Service
OSID learning service implementation of the MIT Core Concept Catalog (MC3)
(this description was written using the English language)
# Note that the implementation name and description may be different for you.
# It will depend on which underlying service implementation your dlkit library is
# configured to point to. More on this later
Alternatively, the Python OSID service interfaces also specify property attributes for all basic “getter” methods, so the above could also be written more Pythonically as:
print "Learning Manager successfully instantiated:"
print " " + lm.display_name.text
print " " + lm.description.text
print (" (this description was written using the " +
lm.description.language_type.display_label.text + " language)\n")
For the remainder of this tutorial we will use the property attributes wherever available.
Looking up Objective Banks¶
Managers encapsulate service profile information, allowing a consumer application to ask questions about which functions are supported in the underlying service implementations that it manages:
if lm.supports_objective_bank_lookup():
print "This Learning Manager can be used to lookup ObjectiveBanks"
else:
print "What a lame Learning Manager. It can't even lookup ObjectiveBanks"
The LearningManager also provides methods for getting ObjectiveBanks.
One of the most useful is get_objective_banks(), which will return an iterator
containing all the banks known to the underlying implementations. This is
also available as a property, so treating objective_banks as an
attribute works here too:
if lm.supports_objective_bank_lookup():
banks = lm.objective_banks
for bank in banks:
print bank.display_name.text
else:
print "Objective bank lookup is not supported."
This will print a list of the names of all the banks, which can be thought of as catalogs for organizing learning objectives and other related information. At the time of this writing the following resulted:
Crosslinks
Chemistry Bridge
i2.002
Python Test Sandbox
x.xxx
Note that the OSIDs specify to first ask whether a functional area is supported
before trying to use it. However, if you wish to adhere to the Pythonic EAFP (easier
to ask forgiveness than permission) programming style, managers will throw an
Unimplemented exception if support is not available:
try:
banks = lm.objective_banks
except Unimplemented:
print "Objective bank lookup is not supported."
else:
for bank in banks:
print bank.display_name.text
The object returned from the call to get_objective_banks() is an
OsidList object, which as you can see from the example is just a Python iterator.
Like all iterators it is “wasting”, meaning that, unlike a Python list it
will be completely used up and empty after all the elements have been retrieved.
Like any iterator an OsidList object can be cast as a more persistent Python
list, like so:
banks = list(obls.objective_banks)
Which is useful if the consuming application needs to keep it around for a while.
However, when we start dealing with OsidLists from service implementations which
may return very large result sets, or where the underlying data changes often, casting
as a list may not be wise. Developers are encouraged to treat these as
iterators to the extent possible, and refresh from the session as necessary.
You can also inspect the number of available elements in the expected way:
len(obls.objective_banks)
# or
banks = obls.objective_banks
len(banks)
And walk through the list one-at-a-time, in for statements, or by calling next():
banks = lm.objective_banks
crosslinks_bank = banks.next() # At the time of this writing, Crosslinks was first
chem_bridge_bank = banks.next() # and Chemistry Bridge was second
OSID Ids¶
To begin working with OSID objects, like ObjectiveBanks it is important to understand
how the OSIDs deal with identity. When an OSID object is asked for its id
an OSID Id object is returned. This is not a ``string``. It is the unique identifier object
for the OSID object. Any requests for getting a specific object by its unique identifier will be
accomplished through passing this Id object back through the service.
Ids are obtained by calling an OSID object’s get_id() method,
which also provides an ident attribute property associated with it for convenience
(id is a reserved word in Python so it is not used)
OsidObject.ident |
Gets the Id associated with this instance of this OSID object. |
So we can try this out:
crosslinks_bank_id = crosslinks_bank.ident
chem_bridge_bank_id = chem_bridge_bank.ident
Ids can be compared for equality:
crosslinks_bank_id == chem_bridge_bank_id
# should return False
crosslinks_bank_id in [crosslinks_bank_id, chem_bridge_bank_id]
# should return True
If a consumer wishes to persist the identifier then it should serialize the
returned Id object, and all Ids can provide a string representation for this purpose:
id_str_to_perist = str(crosslinks_bank_id)
A consumer application can also stand up an Id from a persisted string. There is an implementation of the Id primitive object available through the runtime environment for this purpose. For instance, from the dlkit_django package:
from dlkit_django.primordium import Id
crosslinks_bank_id = Id(id_str_to_persist)
Once an application has its hands on an Id object it can go ahead and
retrieve the corresponding Osid Object through a Lookup Session:
crosslinks_bank_redux = obls.get_objective_bank(crosslinks_bank_id)
We now have two different objects representing the same Crosslinks bank,
which can be determined by comparing Ids:
crosslinks_bank_redux == crosslinks_bank
# should be False
crosslinks_bank_redux.ident == crosslinks_bank_id
# should be True
Looking up Objectives¶
ObjectiveBanks provide methods for looking up and retrieving learning
Objectives, in bulk, by Id, or by Type. Some of the more useful
methods include:
ObjectiveBank.can_lookup_objectives() |
Tests if this user can perform Objective lookups. |
ObjectiveBank.objectives |
Gets all Objectives. |
ObjectiveBank.get_objective(objective_id) |
Gets the Objective specified by its Id. |
ObjectiveBank.get_objectives_by_genus_type(...) |
Gets an ObjectiveList corresponding to the given objective genus Type which does not include objectives of genus types derived from the specified Type. |
So let’s try to find an Objective in the Crosslinks bank with a display name of
“Definite integral”. (Note, that there are also methods for
querying Objectives by various attributes. More on that later.):
for objective in crosslinks_bank:
if objective.display_name.text == 'Definite integral':
def_int_obj = objective
Now we have our hands on an honest-to-goodness learning objective as defined by an honest-to-goodness professor at MIT!
Authorization Hints¶
Many service implementations will require authentication and authorization for
security purposes (authn/authz). Authorization checks will be done when the consuming application
actually tries to invoke a method for which authz is required, and if
its found that the currently logged-in user is not authorized, then the implementation
will raise a PermissionDenied error.
However, sometimes its nice to be able to check in advance whether or not the user
is likely to be denied access. This way a consuming application can decide, for
instance, to hide or “gray out” UI widgets for doing un-permitted functions. This
is what the methods like can_lookup_objectives are for. They simply return a
boolean.
The Objective Object¶
Objectives inherit from OsidObjects (ObjectiveBanks do too, by the way),
which means there are a few methods they share with all other OsidObjects defined by
the specification
OsidObject.display_name |
Gets the preferred display name associated with this instance of this OSID object appropriate for display to the user. |
OsidObject.description |
Gets the description associated with this instance of this OSID object. |
OsidObject.genus_type |
Gets the genus type of this object. |
The display_name and description attributes work exactly like they did for
ObjectiveBanks and both return a Displaytext object that can be interrogated
for its text or the format, language, script of the text to be displayed. We’ll get
to genus_type in a little bit
Additionally Objectives objects can hold some information particular to the kind
of data that they manage:
Objective.has_assessment() |
Tests if an assessment is associated with this objective. |
Objective.assessment |
Gets the assessment associated with this learning objective. |
Objective.assessment_id |
Gets the assessment Id associated with this learning objective. |
Objective.has_cognitive_process() |
Tests if this objective has a cognitive process type. |
Objective.cognitive_process |
Gets the grade associated with the cognitive process. |
Objective.cognitive_process_id |
Gets the grade Id associated with the cognitive process. |
Objective.has_knowledge_category() |
Tests if this objective has a knowledge dimension. |
Objective.knowledge_category |
Gets the grade associated with the knowledge dimension. |
Objective.knowledge_category_id |
Gets the grade Id associated with the knowledge dimension. |
OSID Types¶
The OSID specification defines Types as a way to indicate additional agreements
between service consumers and service providers. A Type is similar to an Id but
includes other data for display and organization:
Type.display_name |
Gets the full display name of this Type. |
Type.display_label |
Gets the shorter display label for this Type. |
Type.description |
Gets a description of this Type. |
Type.domain |
Gets the domain. |
Types also include identification elements so as to uniquely identify one Type
from another:
Type.authority |
Gets the authority of this Type. |
Type.namespace |
Gets the namespace of the identifier. |
Type.identifier |
Gets the identifier of this Type. |
Consuming applications will often need to persist Types for future use.
Persisting a type reference requires persisting all three of these identification
elements.
For instance the MC3 service implementation supports two different types of
Objectives, which help differentiate between topic type objectives and
learning outcome type objectives. One way to store, say, the topic type for
future programmatic reference might be to put it in a dict:
OBJECTIVE_TOPIC_TYPE = {
'authority': 'MIT-OEIT',
'namespace': 'mc3-objective',
'identifier': 'mc3.learning.topic'
}
The OSIDs also specify functions for looking up types that are defined
and/or supported, and as one might imagine, there is TypeLookupSession specifically
designed for this purpose. This session, however, is not defined in the learning
service package, it is found in the type package, which therefore requires
a TypeManager be instantiated:
tm = runtime.get_service_manager('LEARNING', <proxy>)
...
if tm.supports_type_lookup():
tls = tm.get_type_lookup_session()
The TypeLookupSession provides a number of ways to get types, two of which are
sufficient to get started:
TypeLookupSession.types |
|
TypeLookupSession.get_type |
For kicks, let’s print a list of all the Types supported by the implementation:
for typ in tls.types:
print typ.display_label.text
# For the MC3 implementation this should result in a very long list
Also, we can pass the dict we created earlier to the session to get the actual
Type object representing the three identification elements we persisted:
topic_type = tls.get_type(**OBJECTIVE_TOPIC_TYPE)
print topic_type.display_label.text + ': ' + topic_type.description.text
# This should print the string 'Topic: Objective that represents a learning topic'
(More to come)
Assessment¶
Summary¶
Assessment Open Service Interface Definitions assessment version 3.0.0
The Assessment OSID provides the means to create, access, and take
assessments. An Assessment may represent a quiz, survey, or other
evaluation that includes assessment Items. The OSID defines methods
to describe the flow of control and the relationships among the objects.
Assessment Items are extensible objects to capture various types of
questions, such as a multiple choice or an asset submission.
The Assessment service can br broken down into several distinct services:
- Assessment Taking
- Assessment and Item authoring
- Accessing and managing banks of assessments and items
Each of these service areas are covered by different session and object interfaces. The object interfaces describe both the structure of the assessment and follow an assessment management workflow of first defining assessment items and then authoring assessments based on those items. They are:
Item: a question and answer pairResponse:a response to anItemquestionAssessment: a set ofItemsAssessmentSection:A grouped set ofItemsAssessmentOffering:AnAssessmentavailable for takingAssessmentTaken:AnAssessmentOfferingthat has been completed or in progress
Taking Assessments
The AssessmentSession is used to take an assessment. It captures
various ways an assessment can be taken which may include time
constraints, the ability to suspend and resume, and the availability of
an answer.
Taking an Assessment involves first navigating through
AssessmentSections. An AssessmentSection is an advanced
authoring construct used to both visually divide an Assessment and
impose additional constraints. Basic assessments are assumed to always
have one AssessmentSection even if not explicitly created.
Authoring
A basic authoring session is available in this package to map Items
to Assessments. More sophisticated authoring using
AssessmentParts and sequencing is available in the Assessment
Authoring OSID.
Bank Cataloging
Assessments, AssessmentsOffered, AssessmentsTaken, and
Items may be organized into federateable catalogs called Banks .
Sub Packages
The Assessment OSID includes an Assessment Authoring OSID for more advanced authoring and sequencing options.
Assessment Open Service Interface Definitions assessment version 3.0.0
The Assessment OSID provides the means to create, access, and take
assessments. An Assessment may represent a quiz, survey, or other
evaluation that includes assessment Items. The OSID defines methods
to describe the flow of control and the relationships among the objects.
Assessment Items are extensible objects to capture various types of
questions, such as a multiple choice or an asset submission.
The Assessment service can br broken down into several distinct services:
- Assessment Taking
- Assessment and Item authoring
- Accessing and managing banks of assessments and items
Each of these service areas are covered by different session and object interfaces. The object interfaces describe both the structure of the assessment and follow an assessment management workflow of first defining assessment items and then authoring assessments based on those items. They are:
Item: a question and answer pairResponse:a response to anItemquestionAssessment: a set ofItemsAssessmentSection:A grouped set ofItemsAssessmentOffering:AnAssessmentavailable for takingAssessmentTaken:AnAssessmentOfferingthat has been completed or in progress
Taking Assessments
The AssessmentSession is used to take an assessment. It captures
various ways an assessment can be taken which may include time
constraints, the ability to suspend and resume, and the availability of
an answer.
Taking an Assessment involves first navigating through
AssessmentSections. An AssessmentSection is an advanced
authoring construct used to both visually divide an Assessment and
impose additional constraints. Basic assessments are assumed to always
have one AssessmentSection even if not explicitly created.
Authoring
A basic authoring session is available in this package to map Items
to Assessments. More sophisticated authoring using
AssessmentParts and sequencing is available in the Assessment
Authoring OSID.
Bank Cataloging
Assessments, AssessmentsOffered, AssessmentsTaken, and
Items may be organized into federateable catalogs called Banks .
Sub Packages
The Assessment OSID includes an Assessment Authoring OSID for more advanced authoring and sequencing options.
Service Managers¶
Assessment Manager¶
-
class
dlkit.services.assessment.AssessmentManager¶ Bases:
dlkit.osid.managers.OsidManager,dlkit.osid.sessions.OsidSession,dlkit.services.assessment.AssessmentProfileGets an
AssessmentAuthoringManager.Returns: an AssessmentAuthoringManagerReturn type: osid.assessment.authoring.AssessmentAuthoringManagerRaise: OperationFailed– unable to complete requestRaise: Unimplemented–supports_assessment_authoring() is false
-
assessment_batch_manager¶ Gets an
AssessmentBatchManager.Returns: an AssessmentBatchManagerReturn type: osid.assessment.batch.AssessmentBatchManagerRaise: OperationFailed– unable to complete requestRaise: Unimplemented–supports_assessment_batch() is false
Assessment Profile Methods¶
AssessmentManager.supports_assessment()¶Tests for the availability of a assessment service which is the service for taking and examining assessments taken.
Returns: trueif assessment is supported,falseotherwiseReturn type: boolean
AssessmentManager.supports_item_lookup()¶Tests if an item lookup service is supported.
Returns: true if item lookup is supported, false otherwise Return type: boolean
AssessmentManager.supports_item_query()¶Tests if an item query service is supported.
Returns: trueif item query is supported,falseotherwiseReturn type: boolean
AssessmentManager.supports_item_admin()¶Tests if an item administrative service is supported.
Returns: trueif item admin is supported,falseotherwiseReturn type: boolean
AssessmentManager.supports_assessment_lookup()¶Tests if an assessment lookup service is supported. An assessment lookup service defines methods to access assessments.
Returns: true if assessment lookup is supported, false otherwise Return type: boolean
AssessmentManager.supports_assessment_query()¶Tests if an assessment query service is supported.
Returns: trueif assessment query is supported,falseotherwiseReturn type: boolean
AssessmentManager.supports_assessment_admin()¶Tests if an assessment administrative service is supported.
Returns: trueif assessment admin is supported,falseotherwiseReturn type: boolean
Tests if an assessment basic authoring session is available.
Returns: trueif assessment basic authoring is supported,falseotherwiseReturn type: boolean
AssessmentManager.supports_assessment_offered_lookup()¶Tests if an assessment offered lookup service is supported.
Returns: true if assessment offered lookup is supported, false otherwise Return type: boolean
AssessmentManager.supports_assessment_offered_query()¶Tests if an assessment offered query service is supported.
Returns: trueif assessment offered query is supported,falseotherwiseReturn type: boolean
AssessmentManager.supports_assessment_offered_admin()¶Tests if an assessment offered administrative service is supported.
Returns: trueif assessment offered admin is supported,falseotherwiseReturn type: boolean
AssessmentManager.supports_assessment_taken_lookup()¶Tests if an assessment taken lookup service is supported.
Returns: trueif assessment taken lookup is supported,falseotherwiseReturn type: boolean
AssessmentManager.supports_assessment_taken_query()¶Tests if an assessment taken query service is supported.
Returns: trueif assessment taken query is supported,falseotherwiseReturn type: boolean
AssessmentManager.supports_assessment_taken_admin()¶Tests if an assessment taken administrative service is supported which is used to instantiate an assessment offered.
Returns: trueif assessment taken admin is supported,falseotherwiseReturn type: boolean
AssessmentManager.supports_bank_lookup()¶Tests if a bank lookup service is supported. A bank lookup service defines methods to access assessment banks.
Returns: trueif bank lookup is supported,falseotherwiseReturn type: boolean
AssessmentManager.supports_bank_admin()¶Tests if a banlk administrative service is supported.
Returns: trueif bank admin is supported,falseotherwiseReturn type: boolean
AssessmentManager.supports_bank_hierarchy()¶Tests if a bank hierarchy traversal is supported.
Returns: trueif a bank hierarchy traversal is supported,falseotherwiseReturn type: boolean
AssessmentManager.supports_bank_hierarchy_design()¶Tests if bank hierarchy design is supported.
Returns: trueif a bank hierarchy design is supported,falseotherwiseReturn type: boolean
AssessmentManager.item_record_types¶Gets the supported
Itemrecord types.
Returns: a list containing the supported Itemrecord typesReturn type: osid.type.TypeList
AssessmentManager.item_search_record_types¶Gets the supported
Itemsearch record types.
Returns: a list containing the supported Itemsearch record typesReturn type: osid.type.TypeList
AssessmentManager.assessment_record_types¶Gets the supported
Assessmentrecord types.
Returns: a list containing the supported Assessmentrecord typesReturn type: osid.type.TypeList
AssessmentManager.assessment_search_record_types¶Gets the supported
Assessmentsearch record types.
Returns: a list containing the supported assessment search record types Return type: osid.type.TypeList
AssessmentManager.assessment_offered_record_types¶Gets the supported
AssessmentOfferedrecord types.
Returns: a list containing the supported AssessmentOfferedrecord typesReturn type: osid.type.TypeList
AssessmentManager.assessment_offered_search_record_types¶Gets the supported
AssessmentOfferedsearch record types.
Returns: a list containing the supported AssessmentOfferedsearch record typesReturn type: osid.type.TypeList
AssessmentManager.assessment_taken_record_types¶Gets the supported
AssessmentTakenrecord types.
Returns: a list containing the supported AssessmentTakenrecord typesReturn type: osid.type.TypeList
AssessmentManager.assessment_taken_search_record_types¶Gets the supported
AssessmentTakensearch record types.
Returns: a list containing the supported AssessmentTakensearch record typesReturn type: osid.type.TypeList
AssessmentManager.assessment_section_record_types¶Gets the supported
AssessmentSectionrecord types.
Returns: a list containing the supported AssessmentSectionrecord typesReturn type: osid.type.TypeList
AssessmentManager.bank_record_types¶Gets the supported
Bankrecord types.
Returns: a list containing the supported Bankrecord typesReturn type: osid.type.TypeList
AssessmentManager.bank_search_record_types¶Gets the supported bank search record types.
Returns: a list containing the supported Banksearch record typesReturn type: osid.type.TypeList
Bank Lookup Methods¶
AssessmentManager.can_lookup_banks()¶Tests if this user can perform
Banklookups. 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: falseif lookup methods are not authorized,trueotherwiseReturn type: boolean
AssessmentManager.use_comparative_bank_view()¶The returns from the lookup methods may omit or translate elements based on this session, such as assessment, and not result in an error. This view is used when greater interoperability is desired at the expense of precision.
AssessmentManager.use_plenary_bank_view()¶A complete view of the
Bankreturns 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.
AssessmentManager.get_banks_by_ids(bank_ids)¶Gets a
BankListcorresponding to the givenIdList. In plenary mode, the returned list contains all of the banks specified in theIdlist, in the order of the list, including duplicates, or an error results if anIdin the supplied list is not found or inaccessible. Otherwise, inaccessibleBankobjects may be omitted from the list and may present the elements in any order including returning a unique set.
Parameters: bank_ids ( osid.id.IdList) – the list ofIdsto retrieveReturns: the returned BanklistReturn type: osid.assessment.BankListRaise: NotFound– anId wasnot foundRaise: NullArgument–bank_idsisnullRaise: OperationFailed– unable to complete requestRaise: PermissionDenied– authorization failure occurred
AssessmentManager.get_banks_by_genus_type(bank_genus_type)¶Gets a
BankListcorresponding to the given bank genusTypewhich does not include banks of types derived from the specifiedType. In plenary mode, the returned list contains all known banks or an error results. Otherwise, the returned list may contain only those banks that are accessible through this session.
Parameters: bank_genus_type ( osid.type.Type) – a bank genus typeReturns: the returned BanklistReturn type: osid.assessment.BankListRaise: NullArgument–bank_genus_typeisnullRaise: OperationFailed– unable to complete requestRaise: PermissionDenied– authorization failure occurred
AssessmentManager.get_banks_by_parent_genus_type(bank_genus_type)¶Gets a
BankListcorresponding to the given bank genusTypeand include any additional banks with genus types derived from the specifiedType. In plenary mode, the returned list contains all known banks or an error results. Otherwise, the returned list may contain only those banks that are accessible through this session.
Parameters: bank_genus_type ( osid.type.Type) – a bank genus typeReturns: the returned BanklistReturn type: osid.assessment.BankListRaise: NullArgument–bank_genus_typeisnullRaise: OperationFailed– unable to complete requestRaise: PermissionDenied– authorization failure occurred
AssessmentManager.get_banks_by_record_type(bank_record_type)¶Gets a
BankListcontaining the given bank recordType. In plenary mode, the returned list contains all known banks or an error results. Otherwise, the returned list may contain only those banks that are accessible through this session.
Parameters: bank_record_type ( osid.type.Type) – a bank record typeReturns: the returned BanklistReturn type: osid.assessment.BankListRaise: NullArgument–bank_record_typeisnullRaise: OperationFailed– unable to complete requestRaise: PermissionDenied– authorization failure occurred
AssessmentManager.get_banks_by_provider(resource_id)¶Gets a
BankListfrom the given provider ````. In plenary mode, the returned list contains all known banks or an error results. Otherwise, the returned list may contain only those banks that are accessible through this session.
Parameters: resource_id ( osid.id.Id) – a resourceIdReturns: the returned BanklistReturn type: osid.assessment.BankListRaise: NullArgument–resource_idisnullRaise: OperationFailed– unable to complete requestRaise: PermissionDenied– authorization failure occurred
AssessmentManager.banks¶Gets all
Banks. In plenary mode, the returned list contains all known banks or an error results. Otherwise, the returned list may contain only those banks that are accessible through this session.
Returns: a BankListReturn type: osid.assessment.BankListRaise: OperationFailed– unable to complete requestRaise: PermissionDenied– authorization failure occurred
Bank Admin Methods¶
AssessmentManager.can_create_banks()¶Tests if this user can create
Banks. A return of true does not guarantee successful authorization. A return of false indicates that it is known creating aBankwill result in aPermissionDenied. This is intended as a hint to an application that may not wish to offer create operations to unauthorized users.
Returns: falseifBankcreation is not authorized,trueotherwiseReturn type: boolean
AssessmentManager.can_create_bank_with_record_types(bank_record_types)¶Tests if this user can create a single
Bankusing the desired record types. WhileAssessmentManager.getBankRecordTypes()can be used to examine which records are supported, this method tests which record(s) are required for creating a specificBank. Providing an empty array tests if aBankcan be created with no records.
Parameters: bank_record_types ( osid.type.Type[]) – array of bank record typesReturns: trueifBankcreation using the specifiedTypesis supported,falseotherwiseReturn type: booleanRaise: NullArgument–bank_record_typesisnull
AssessmentManager.get_bank_form_for_create(bank_record_types)¶Gets the bank form for creating new banks. A new form should be requested for each create transaction.
Parameters: bank_record_types ( osid.type.Type[]) – array of bank record types to be included in the create operation or an empty list if noneReturns: the bank form Return type: osid.assessment.BankFormRaise: NullArgument–bank_record_typesisnullRaise: OperationFailed– unable to complete requestRaise: PermissionDenied– authorization failure occurredRaise: Unsupported– unable to get form for requested record types
AssessmentManager.create_bank(bank_form)¶Creates a new
Bank.
Parameters: bank_form ( osid.assessment.BankForm) – the form for thisBankReturns: the new BankReturn type: osid.assessment.BankRaise: IllegalState–bank_formalready used in a create transactionRaise: InvalidArgument– one or more of the form elements is invalidRaise: NullArgument–bank_formisnullRaise: OperationFailed– unable to complete requestRaise: PermissionDenied– authorization failure occurredRaise: Unsupported–bank_formdid not originate fromget_bank_form_for_create()
AssessmentManager.can_update_banks()¶Tests if this user can update
Banks. A return of true does not guarantee successful authorization. A return of false indicates that it is known updating aBankwill result in aPermissionDenied. This is intended as a hint to an application that may not wish to offer update operations to unauthorized users.
Returns: falseifBankmodification is not authorized,trueotherwiseReturn type: boolean
AssessmentManager.get_bank_form_for_update(bank_id)¶Gets the bank form for updating an existing bank. A new bank form should be requested for each update transaction.
Parameters: bank_id ( osid.id.Id) – theIdof theBankReturns: the bank form Return type: osid.assessment.BankFormRaise: NotFound–bank_idis not foundRaise: NullArgument–bank_idisnullRaise: OperationFailed– unable to complete requestRaise: PermissionDenied– authorization failure occurred
AssessmentManager.update_bank(bank_form)¶Updates an existing bank.
Parameters: bank_form ( osid.assessment.BankForm) – the form containing the elements to be updatedRaise: IllegalState–bank_formalready used in an update transactionRaise: InvalidArgument– the form contains an invalid valueRaise: NullArgument–bank_formisnullRaise: OperationFailed– unable to complete requestRaise: PermissionDenied– authorization failure occurredRaise: Unsupported–bank_formdid not originate fromget_bank_form_for_update()
AssessmentManager.can_delete_banks()¶Tests if this user can delete banks. A return of true does not guarantee successful authorization. A return of false indicates that it is known deleting a
Bankwill result in aPermissionDenied. This is intended as a hint to an application that may not wish to offer delete operations to unauthorized users.
Returns: falseifBankdeletion is not authorized,trueotherwiseReturn type: boolean
AssessmentManager.delete_bank(bank_id)¶Deletes a
Bank.
Parameters: bank_id ( osid.id.Id) – theIdof theBankto removeRaise: NotFound–bank_idnot foundRaise: NullArgument–bank_idisnullRaise: OperationFailed– unable to complete requestRaise: PermissionDenied– authorization failure occurred
AssessmentManager.can_manage_bank_aliases()¶Tests if this user can manage
Idaliases forBanks. 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: falseifBankaliasing is not authorized,trueotherwiseReturn type: boolean
AssessmentManager.alias_bank(bank_id, alias_id)¶Adds an
Idto aBankfor the purpose of creating compatibility. The primaryIdof theBankis determined by the provider. The newIdis an alias to the primaryId. If the alias is a pointer to another bank, it is reassigned to the given bankId.
Parameters:
- bank_id (
osid.id.Id) – theIdof aBank- alias_id (
osid.id.Id) – the aliasIdRaise:
AlreadyExists–alias_idis in use as a primaryIdRaise:
NotFound–bank_idnot foundRaise:
NullArgument–bank_idoralias_idisnullRaise:
OperationFailed– unable to complete requestRaise:
PermissionDenied– authorization failure occurred
Bank Hierarchy Methods¶
AssessmentManager.bank_hierarchy_id¶Gets the hierarchy
Idassociated with this session.
Returns: the hierarchy Idassociated with this sessionReturn type: osid.id.Id
AssessmentManager.bank_hierarchy¶Gets the hierarchy associated with this session.
Returns: the hierarchy associated with this session Return type: osid.hierarchy.HierarchyRaise: OperationFailed– unable to complete requestRaise: PermissionDenied– assessment failure
AssessmentManager.can_access_bank_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 application that may opt not to offer lookup operations.
Returns: falseif hierarchy traversal methods are not authorized,trueotherwiseReturn type: boolean
AssessmentManager.use_comparative_bank_view()The returns from the lookup methods may omit or translate elements based on this session, such as assessment, and not result in an error. This view is used when greater interoperability is desired at the expense of precision.
AssessmentManager.use_plenary_bank_view()A complete view of the
Bankreturns 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.
AssessmentManager.root_bank_ids¶Gets the root bank
Idsin this hierarchy.
Returns: the root bank IdsReturn type: osid.id.IdListRaise: OperationFailed– unable to complete requestRaise: PermissionDenied– authorization failure occurred
AssessmentManager.root_banks¶Gets the root banks in this bank hierarchy.
Returns: the root banks Return type: osid.assessment.BankListRaise: OperationFailed– unable to complete requestRaise: PermissionDenied– authorization failure occurred
AssessmentManager.has_parent_banks(bank_id)¶Tests if the
Bankhas any parents.
Parameters: bank_id ( osid.id.Id) – a bankIdReturns: trueif the bank has parents,falseotherwiseReturn type: booleanRaise: NotFound–bank_idis not foundRaise: NullArgument–bank_idisnullRaise: OperationFailed– unable to complete requestRaise: PermissionDenied– authorization failure occurred
AssessmentManager.is_parent_of_bank(id_, bank_id)¶Tests if an
Idis a direct parent of a bank.
Parameters:
- id (
osid.id.Id) – anId- bank_id (
osid.id.Id) – theIdof a bankReturns:
trueif thisidis a parent ofbank_id,falseotherwiseReturn type:
booleanRaise:
NotFound–bank_idis not foundRaise:
NullArgument–idorbank_idisnullRaise:
OperationFailed– unable to complete requestRaise:
PermissionDenied– authorization failure occurred
AssessmentManager.get_parent_bank_ids(bank_id)¶Gets the parent
Idsof the given bank.
Parameters: bank_id ( osid.id.Id) – a bankIdReturns: the parent Idsof the bankReturn type: osid.id.IdListRaise: NotFound–bank_idis not foundRaise: NullArgument–bank_idisnullRaise: OperationFailed– unable to complete requestRaise: PermissionDenied– authorization failure occurred
AssessmentManager.get_parent_banks(bank_id)¶Gets the parents of the given bank.
Parameters: bank_id ( osid.id.Id) – a bankIdReturns: the parents of the bank Return type: osid.assessment.BankListRaise: NotFound–bank_idis not foundRaise: NullArgument–bank_idisnullRaise: OperationFailed– unable to complete requestRaise: PermissionDenied– authorization failure occurred
AssessmentManager.is_ancestor_of_bank(id_, bank_id)¶Tests if an
Idis an ancestor of a bank.
Parameters:
- id (
osid.id.Id) – anId- bank_id (
osid.id.Id) – theIdof a bankReturns:
trueif thisidis an ancestor ofbank_id,falseotherwiseReturn type:
booleanRaise:
NotFound–bank_idis not foundRaise:
NullArgument–bank_idisnullRaise:
OperationFailed– unable to complete requestRaise:
PermissionDenied– authorization failure
AssessmentManager.has_child_banks(bank_id)¶Tests if a bank has any children.
Parameters: bank_id ( osid.id.Id) – abank_idReturns: trueif thebank_idhas children,falseotherwiseReturn type: booleanRaise: NotFound–bank_idis not foundRaise: NullArgument–bank_idisnullRaise: OperationFailed– unable to complete requestRaise: PermissionDenied– authorization failure
AssessmentManager.is_child_of_bank(id_, bank_id)¶Tests if a bank is a direct child of another.
Parameters:
- id (
osid.id.Id) – anId- bank_id (
osid.id.Id) – theIdof a bankReturns:
trueif theidis a child ofbank_id,falseotherwiseReturn type:
booleanRaise:
NotFound–bank_idnot foundRaise:
NullArgument–bank_idoridisnullRaise:
OperationFailed– unable to complete requestRaise:
PermissionDenied– authorization failure
AssessmentManager.get_child_bank_ids(bank_id)¶Gets the child
Idsof the given bank.
Parameters: bank_id ( osid.id.Id) – theIdto queryReturns: the children of the bank Return type: osid.id.IdListRaise: NotFound–bank_idis not foundRaise: NullArgument–bank_idisnullRaise: OperationFailed– unable to complete requestRaise: PermissionDenied– authorization failure
AssessmentManager.get_child_banks(bank_id)¶Gets the children of the given bank.
Parameters: bank_id ( osid.id.Id) – theIdto queryReturns: the children of the bank Return type: osid.assessment.BankListRaise: NotFound–bank_idis not foundRaise: NullArgument–bank_idisnullRaise: OperationFailed– unable to complete requestRaise: PermissionDenied– authorization failure
AssessmentManager.is_descendant_of_bank(id_, bank_id)¶Tests if an
Idis a descendant of a bank.
Parameters:
- id (
osid.id.Id) – anId- bank_id (
osid.id.Id) – theIdof a bankReturns:
trueif theidis a descendant of thebank_id,falseotherwiseReturn type:
booleanRaise:
NotFound–bank_idnot foundRaise:
NullArgument–bank_idoridisnullRaise:
OperationFailed– unable to complete requestRaise:
PermissionDenied– authorization failure
AssessmentManager.get_bank_node_ids(bank_id, ancestor_levels, descendant_levels, include_siblings)¶Gets a portion of the hierarchy for the given bank.
Parameters:
- bank_id (
osid.id.Id) – theIdto 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) –trueto include the siblings of the given node,falseto omit the siblingsReturns: a bank node
Return type:
osid.hierarchy.NodeRaise:
NotFound–bank_idis not foundRaise:
NullArgument–bank_idisnullRaise:
OperationFailed– unable to complete requestRaise:
PermissionDenied– authorization failure
AssessmentManager.get_bank_nodes(bank_id, ancestor_levels, descendant_levels, include_siblings)¶Gets a portion of the hierarchy for the given bank.
Parameters:
- bank_id (
osid.id.Id) – theIdto 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) –trueto include the siblings of the given node,falseto omit the siblingsReturns: a bank node
Return type:
osid.assessment.BankNodeRaise:
NotFound–bank_idis not foundRaise:
NullArgument–bank_idisnullRaise:
OperationFailed– unable to complete requestRaise:
PermissionDenied– authorization failure
Bank Hierarchy Design Methods¶
AssessmentManager.bank_hierarchy_idGets the hierarchy
Idassociated with this session.
Returns: the hierarchy Idassociated with this sessionReturn type: osid.id.Id
AssessmentManager.bank_hierarchyGets the hierarchy associated with this session.
Returns: the hierarchy associated with this session Return type: osid.hierarchy.HierarchyRaise: OperationFailed– unable to complete requestRaise: PermissionDenied– assessment failure
AssessmentManager.can_modify_bank_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: falseif changing this hierarchy is not authorized,trueotherwiseReturn type: boolean
AssessmentManager.add_root_bank(bank_id)¶Adds a root bank.
Parameters: bank_id ( osid.id.Id) – theIdof a bankRaise: AlreadyExists–bank_idis already in hierarchyRaise: NotFound–bank_idnot foundRaise: NullArgument–bank_idisnullRaise: OperationFailed– unable to complete requestRaise: PermissionDenied– authorization failure occurred
AssessmentManager.remove_root_bank(bank_id)¶Removes a root bank from this hierarchy.
Parameters: bank_id ( osid.id.Id) – theIdof a bankRaise: NotFound–bank_idnot a parent ofchild_idRaise: NullArgument–bank_idorchild_idisnullRaise: OperationFailed– unable to complete requestRaise: PermissionDenied– authorization failure
AssessmentManager.add_child_bank(bank_id, child_id)¶Adds a child to a bank.
Parameters:
- bank_id (
osid.id.Id) – theIdof a bank- child_id (
osid.id.Id) – theIdof the new childRaise:
AlreadyExists–bank_idis already a parent ofchild_idRaise:
NotFound–bank_idorchild_idnot foundRaise:
NullArgument–bank_idorchild_idisnullRaise:
OperationFailed– unable to complete requestRaise:
PermissionDenied– authorization failure occurred
AssessmentManager.remove_child_bank(bank_id, child_id)¶Removes a child from a bank.
Parameters:
- bank_id (
osid.id.Id) – theIdof a bank- child_id (
osid.id.Id) – theIdof the new childRaise:
NotFound–bank_idnot parent ofchild_idRaise:
NullArgument–bank_idorchild_idisnullRaise:
OperationFailed– unable to complete requestRaise:
PermissionDenied– authorization failure occurred
AssessmentManager.remove_child_banks(bank_id)¶Removes all children from a bank.
Parameters: bank_id ( osid.id.Id) – theIdof a bankRaise: NotFound–bank_idis not in hierarchyRaise: NullArgument–bank_idisnullRaise: OperationFailed– unable to complete requestRaise: PermissionDenied– authorization failure occurred
Bank¶
Bank¶
-
class
dlkit.services.assessment.Bank¶ Bases:
dlkit.osid.objects.OsidCatalog,dlkit.osid.sessions.OsidSession-
get_bank_record(bank_record_type)¶ Gets the bank record corresponding to the given
BankrecordType. This method is used to retrieve an object implementing the requested record. Thebank_record_typemay be theTypereturned inget_record_types()or any of its parents in aTypehierarchy wherehas_record_type(bank_record_type)istrue.Parameters: bank_record_type ( osid.type.Type) – a bank record typeReturns: the bank record Return type: osid.assessment.records.BankRecordRaise: NullArgument–bank_record_typeisnullRaise: OperationFailed– unable to complete requestRaise: Unsupported–has_record_type(bank_record_type)isfalse
-
Assessment Methods¶
Bank.can_take_assessments()¶Tests if this user can take this assessment section. 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 application that may opt not to offer assessment operations to unauthorized users.
Returns: falseif assessment methods are not authorized,trueotherwiseReturn type: boolean
Bank.has_assessment_begun(assessment_taken_id)¶Tests if this assessment has started. An assessment begins from the designated start time if a start time is defined. If no start time is defined the assessment may begin at any time. Assessment sections cannot be accessed if the return for this method is
false.
Parameters: assessment_taken_id ( osid.id.Id) –Idof theAssessmentTakenReturns: trueif this assessment has begun,falseotherwiseReturn type: booleanRaise: NotFound–assessment_taken_idis not foundRaise: NullArgument–assessment_taken_idisnullRaise: OperationFailed– unable to complete requestRaise: PermissionDenied– authorization failure occurred
Bank.is_assessment_over(assessment_taken_id)¶Tests if this assessment is over. An assessment is over if
finished_assessment()is invoked or the designated finish time has expired.
Parameters: assessment_taken_id ( osid.id.Id) –Idof theAssessmentTakenReturns: trueif this assessment is over,falseotherwiseReturn type: booleanRaise: NotFound–assessment_taken_idis not foundRaise: NullArgument–assessment_taken_idisnullRaise: OperationFailed– unable to complete requestRaise: PermissionDenied– authorization failure occurred
Bank.requires_synchronous_sections(assessment_taken_id)¶Tests if synchronous sections are required. This method should be checked to determine if all sections are available when requested, or the next sections becomes available only after the previous section is complete.
There are two methods for retrieving sections. One is using the built-in hasNextSection() and getNextSection() methods. In synchronous mode, hasNextSection() is false until the current section is completed. In asynchronous mode,
has_next_section()returns true until the end of the assessment.
AssessmentSectionsmay also be accessed via anAssessmentSectionList. If syncronous sections are required,AssessmentSectionList.available() == 0andAssessmentSectionList.getNextQuestion()blocks until the section is complete.AssessmentSectionList.hasNext()is always true until the end of the assessment is reached.
Parameters: assessment_taken_id ( osid.id.Id) –Idof theAssessmentTakenReturns: trueif this synchronous sections are required,falseotherwiseReturn type: booleanRaise: NotFound–assessment_taken_idis not foundRaise: NullArgument–assessment_taken_idisnullRaise: OperationFailed– unable to complete requestRaise: PermissionDenied– authorization failure occurred
Bank.get_first_assessment_section(assessment_taken_id)¶Gets the first assessment section in this assesment. All assessments have at least one
AssessmentSection.
Parameters: assessment_taken_id ( osid.id.Id) –Idof theAssessmentTakenReturns: the first assessment section Return type: osid.assessment.AssessmentSectionRaise: IllegalState–has_assessment_begun()isfalseRaise: NotFound–assessment_taken_idis not foundRaise: NullArgument–assessment_taken_idisnullRaise: OperationFailed– unable to complete requestRaise: PermissionDenied– authorization failure occurred
Bank.has_next_assessment_section(assessment_section_id)¶Tests if there is a next assessment section in the assessment following the given assessment section
Id.
Parameters: assessment_section_id ( osid.id.Id) –Idof theAssessmentSectionReturns: trueif there is a next section,falseotherwiseReturn type: booleanRaise: IllegalState–has_assessment_begun()isfalseRaise: NotFound–assessment_taken_idis not foundRaise: NullArgument–assessment_taken_idisnullRaise: OperationFailed– unable to complete requestRaise: PermissionDenied– authorization failure occurred
Bank.get_next_assessment_section(assessment_section_id)¶Gets the next assessemnt section following the given assesment section.
Parameters: assessment_section_id ( osid.id.Id) –Idof theAssessmentSectionReturns: the next section Return type: osid.assessment.AssessmentSectionRaise: IllegalState–has_next_assessment_section()isfalseRaise: NotFound–assessment_section_idis not foundRaise: NullArgument–assessment_section_idisnullRaise: OperationFailed– unable to complete requestRaise: PermissionDenied– authorization failure occurred
Bank.has_previous_assessment_section(assessment_section_id)¶Tests if there is a previous assessment section in the assessment following the given assessment section
Id.
Parameters: assessment_section_id ( osid.id.Id) –Idof theAssessmentSectionReturns: trueif there is a previous assessment section,falseotherwiseReturn type: booleanRaise: IllegalState–has_assessment_begun()isfalseRaise: NotFound–assessment_section_idis not foundRaise: NullArgument–assessment_section_idisnullRaise: OperationFailed– unable to complete requestRaise: PermissionDenied– authorization failure occurred
Bank.get_previous_assessment_section(assessment_section_id)¶Gets the next assessemnt section following the given assesment section.
Parameters: assessment_section_id ( osid.id.Id) –Idof theAssessmentSectionReturns: the previous assessment section Return type: osid.assessment.AssessmentSectionRaise: IllegalState–has_next_assessment_section()isfalseRaise: NotFound–assessment_section_idis not foundRaise: NullArgument–assessment_section_idisnullRaise: OperationFailed– unable to complete requestRaise: PermissionDenied– authorization failure occurred
Bank.get_assessment_section(assessment_section_id)¶Gets an assessemnts section by
Id.
Parameters: assessment_section_id ( osid.id.Id) –Idof theAssessmentSectionReturns: the assessment section Return type: osid.assessment.AssessmentSectionRaise: IllegalState–has_assessment_begun()isfalseRaise: NotFound–assessment_section_idis not foundRaise: NullArgument–assessment_section_idisnullRaise: OperationFailed– unable to complete requestRaise: PermissionDenied– authorization failure occurred
Bank.get_assessment_sections(assessment_taken_id)¶Gets the assessment sections of this assessment.
Parameters: assessment_taken_id ( osid.id.Id) –Idof theAssessmentTakenReturns: the list of assessment sections Return type: osid.assessment.AssessmentSectionListRaise: IllegalState–has_assessment_begun()isfalseRaise: NotFound–assessment_taken_idis not foundRaise: NullArgument–assessment_taken_idisnullRaise: OperationFailed– unable to complete requestRaise: PermissionDenied– authorization failure occurred
Bank.is_assessment_section_complete(assessment_section_id)¶Tests if the all responses have been submitted to this assessment section. If
is_assessment_section_complete()is false, thenget_unanswered_questions()may return a list of questions that can be submitted.
Parameters: assessment_section_id ( osid.id.Id) –Idof theAssessmentSectionReturns: trueif this assessment section is complete,falseotherwiseReturn type: booleanRaise: IllegalState–is_assessment_over()istrueRaise: NotFound–assessment_section_idis not foundRaise: NullArgument–assessment_section_idisnullRaise: OperationFailed– unable to complete requestRaise: PermissionDenied– authorization failure
Bank.get_incomplete_assessment_sections(assessment_taken_id)¶Gets the incomplete assessment sections of this assessment.
Parameters: assessment_taken_id ( osid.id.Id) –Idof theAssessmentTakenReturns: the list of incomplete assessment sections Return type: osid.assessment.AssessmentSectionListRaise: IllegalState–has_assessment_begun()isfalseRaise: NotFound–assessment_taken_idis not foundRaise: NullArgument–assessment_taken_idisnullRaise: OperationFailed– unable to complete requestRaise: PermissionDenied– authorization failure occurred
Bank.has_assessment_section_begun(assessment_section_id)¶Tests if this assessment section has started. A section begins from the designated start time if a start time is defined. If no start time is defined the section may begin at any time. Assessment items cannot be accessed or submitted if the return for this method is
false.
Parameters: assessment_section_id ( osid.id.Id) –Idof theAssessmentSectionReturns: trueif this assessment section has begun,falseotherwiseReturn type: booleanRaise: IllegalState–has_assessment_begun()isfalse or is_assessment_over()istrueRaise: NotFound–assessment_section_idis not foundRaise: NullArgument–assessment_section_idisnullRaise: OperationFailed– unable to complete requestRaise: PermissionDenied– authorization failure
Bank.is_assessment_section_over(assessment_section_id)¶Tests if this assessment section is over. An assessment section is over if new or updated responses can not be submitted such as the designated finish time has expired.
Parameters: assessment_section_id ( osid.id.Id) –Idof theAssessmentSectionReturns: trueif this assessment is over,falseotherwiseReturn type: booleanRaise: IllegalState–has_assessmen_sectiont_begun()isfalse or is_assessment_section_over()istrueRaise: NotFound–assessment_section_idis not foundRaise: NullArgument–assessment_section_idisnullRaise: OperationFailed– unable to complete requestRaise: PermissionDenied– authorization failure
Bank.requires_synchronous_responses(assessment_section_id)¶Tests if synchronous responses are required in this assessment section. This method should be checked to determine if all items are available when requested, or the next item becomes available only after the response to the current item is submitted.
There are two methods for retrieving questions. One is using the built-in
has_next_question()andget_next_question()methods. In synchronous mode,has_next_question()isfalseuntil the response for the current question is submitted. In asynchronous mode,has_next_question()returnstrueuntil the end of the assessment.
Questionsmay also be accessed via aQuestionList. If syncronous responses are required,QuestionList.available() == 0andQuestionList.getNextQuestion()blocks until the response is submitted.QuestionList.hasNext()is always true until the end of the assessment is reached.
Parameters: assessment_section_id ( osid.id.Id) –Idof theAssessmentSectionReturns: trueif this synchronous responses are required,falseotherwiseReturn type: booleanRaise: IllegalState–has_assessment_begun()isfalse or is_assessment_over()istrueRaise: NotFound–assessment_section_idis not foundRaise: NullArgument–assessment_section_idisnullRaise: OperationFailed– unable to complete requestRaise: PermissionDenied– authorization failure
Bank.get_first_question(assessment_section_id)¶Gets the first question in this assesment section.
Parameters: assessment_section_id ( osid.id.Id) –Idof theAssessmentSectionReturns: the first question Return type: osid.assessment.QuestionRaise: IllegalState–has_assessment_section_begun() is false or is_assessment_section_over() is trueRaise: NotFound–assessment_section_idis not foundRaise: NullArgument–assessment_section_idisnullRaise: OperationFailed– unable to complete requestRaise: PermissionDenied– authorization failure occurred
Bank.has_next_question(assessment_section_id, item_id)¶Tests if there is a next question following the given question
Id.
Parameters:
- assessment_section_id (
osid.id.Id) –Idof theAssessmentSection- item_id (
osid.id.Id) –Idof theItemReturns:
trueif there is a next question,falseotherwiseReturn type:
booleanRaise:
IllegalState–has_assessment_section_begun() is false or is_assessment_section_over() is trueRaise:
NotFound–assessment_section_idoritem_idis not found, oritem_idnot part ofassessment_section_idRaise:
NullArgument–assessment_section_idoritem_idisnullRaise:
OperationFailed– unable to complete requestRaise:
PermissionDenied– authorization failure occurred
Bank.get_next_question(assessment_section_id, item_id)¶Gets the next question in this assesment section.
Parameters:
- assessment_section_id (
osid.id.Id) –Idof theAssessmentSection- item_id (
osid.id.Id) –Idof theItemReturns: the next question
Return type:
osid.assessment.QuestionRaise:
IllegalState–has_next_question()isfalseRaise:
NotFound–assessment_section_idoritem_idis not found, oritem_idnot part ofassessment_section_idRaise:
NullArgument–assessment_section_idoritem_idisnullRaise:
OperationFailed– unable to complete requestRaise:
PermissionDenied– authorization failure occurred
Bank.has_previous_question(assessment_section_id, item_id)¶Tests if there is a previous question preceeding the given question
Id.
Parameters:
- assessment_section_id (
osid.id.Id) –Idof theAssessmentSection- item_id (
osid.id.Id) –Idof theItemReturns:
trueif there is a previous question,falseotherwiseReturn type:
booleanRaise:
IllegalState–has_assessment_section_begun() is false or is_assessment_section_over() is trueRaise:
NotFound–assessment_section_idoritem_idis not found, oritem_idnot part ofassessment_section_idRaise:
NullArgument–assessment_section_idoritem_idisnullRaise:
OperationFailed– unable to complete requestRaise:
PermissionDenied– authorization failure occurred
Bank.get_previous_question(assessment_section_id, item_id)¶Gets the previous question in this assesment section.
Parameters:
- assessment_section_id (
osid.id.Id) –Idof theAssessmentSection- item_id (
osid.id.Id) –Idof theItemReturns: the previous question
Return type:
osid.assessment.QuestionRaise:
IllegalState–has_previous_question()isfalseRaise:
NotFound–assessment_section_idoritem_idis not found, oritem_idnot part ofassessment_section_idRaise:
NullArgument–assessment_section_idoritem_idisnullRaise:
OperationFailed– unable to complete requestRaise:
PermissionDenied– authorization failure occurred
Bank.get_question(assessment_section_id, item_id)¶Gets the
Questionspecified by itsId.
Parameters:
- assessment_section_id (
osid.id.Id) –Idof theAssessmentSection- item_id (
osid.id.Id) –Idof theItemReturns: the returned
QuestionReturn type:
osid.assessment.QuestionRaise:
IllegalState–has_assessment_section_begun() is false or is_assessment_section_over() is trueRaise:
NotFound–assessment_section_idoritem_idis not found, oritem_idnot part ofassessment_section_idRaise:
NullArgument–assessment_section_idoritem_idisnullRaise:
OperationFailed– unable to complete requestRaise:
PermissionDenied– authorization failure occurred
Bank.get_questions(assessment_section_id)¶Gets the questions of this assessment section.
Parameters: assessment_section_id ( osid.id.Id) –Idof theAssessmentSectionReturns: the list of assessment questions Return type: osid.assessment.QuestionListRaise: IllegalState–has_assessment_section_begun() is false or is_assessment_section_over() is trueRaise: NotFound–assessment_section_idis not foundRaise: NullArgument–assessment_section_idisnullRaise: OperationFailed– unable to complete requestRaise: PermissionDenied– authorization failure occurred
Bank.get_response_form(assessment_section_id, item_id)¶Gets the response form for submitting an answer.
Parameters:
- assessment_section_id (
osid.id.Id) –Idof theAssessmentSection- item_id (
osid.id.Id) –Idof theItemReturns: an answer form
Return type:
osid.assessment.AnswerFormRaise:
IllegalState–has_assessment_section_begun()isfalse or is_assessment_section_over()istrueRaise:
NotFound–assessment_section_idoritem_idis not found, oritem_idnot part ofassessment_section_idRaise:
NullArgument–assessment_section_idoritem_idisnullRaise:
OperationFailed– unable to complete requestRaise:
PermissionDenied– authorization failure occurred
Bank.submit_response(assessment_section_id, item_id, answer_form)¶Submits an answer to an item.
Parameters:
- assessment_section_id (
osid.id.Id) –Idof theAssessmentSection- item_id (
osid.id.Id) –Idof theItem- answer_form (
osid.assessment.AnswerForm) – the responseRaise:
IllegalState–has_assessment_section_begun()isfalse or is_assessment_section_over()istrueRaise:
InvalidArgument– one or more of the elements in the form is invalidRaise:
NotFound–assessment_section_idoritem_idis not found, oritem_idnot part ofassessment_section_idRaise:
NullArgument–assessment_section_id, item_id,oranswer_formisnullRaise:
OperationFailed– unable to complete requestRaise:
PermissionDenied– authorization failureRaise:
Unsupported–answer_formis not of this service
Bank.skip_item(assessment_section_id, item_id)¶Skips an item.
Parameters:
- assessment_section_id (
osid.id.Id) –Idof theAssessmentSection- item_id (
osid.id.Id) –Idof theItemRaise:
IllegalState–has_assessment_section_begun()isfalse or is_assessment_section_over()istrueRaise:
NotFound–assessment_section_idoritem_idis not found, oritem_idnot part ofassessment_section_idRaise:
NullArgument–assessment_section_idoritem_idisnullRaise:
OperationFailed– unable to complete requestRaise:
PermissionDenied– authorization failure
Bank.is_question_answered(assessment_section_id, item_id)¶Tests if the given item has a response.
Parameters:
- assessment_section_id (
osid.id.Id) –Idof theAssessmentSection- item_id (
osid.id.Id) –Idof theItemReturns:
trueif this item has a response,falseotherwiseReturn type:
booleanRaise:
IllegalState–has_assessment_section_begun()isfalse or is_assessment_section_over()istrueRaise:
NotFound–assessment_section_id or item_id is not found, or item_id not part of assessment_section_idRaise:
NullArgument–assessment_section_id or item_id is nullRaise:
OperationFailed– unable to complete requestRaise:
PermissionDenied– authorization failure
Bank.get_unanswered_questions(assessment_section_id)¶Gets the unanswered questions of this assessment section.
Parameters: assessment_section_id ( osid.id.Id) –Idof theAssessmentSectionReturns: the list of questions with no rsponses Return type: osid.assessment.QuestionListRaise: IllegalState–has_assessment_section_begun() is false or is_assessment_section_over() is trueRaise: NotFound–assessment_section_idis not foundRaise: NullArgument–assessment_section_idisnullRaise: OperationFailed– unable to complete requestRaise: PermissionDenied– authorization failure occurred
Bank.has_unanswered_questions(assessment_section_id)¶Tests if there are unanswered questions in this assessment section.
Parameters: assessment_section_id ( osid.id.Id) –Idof theAssessmentSectionReturns: trueif there are unanswered questions,falseotherwiseReturn type: booleanRaise: IllegalState–has_assessment_section_begun() is false or is_assessment_section_over() is trueRaise: NotFound–assessment_section_idis not foundRaise: NullArgument–assessment_section_idisnullRaise: OperationFailed– unable to complete requestRaise: PermissionDenied– authorization failure occurred
Bank.get_first_unanswered_question(assessment_section_id)¶Gets the first unanswered question in this assesment section.
Parameters: assessment_section_id ( osid.id.Id) –Idof theAssessmentSectionReturns: the first unanswered question Return type: osid.assessment.QuestionRaise: IllegalState–has_unanswered_questions()isfalseRaise: NotFound–assessment_section_idis not foundRaise: NullArgument–assessment_section_idisnullRaise: OperationFailed– unable to complete requestRaise: PermissionDenied– authorization failure occurred
Bank.has_next_unanswered_question(assessment_section_id, item_id)¶Tests if there is a next unanswered question following the given question
Id.
Parameters:
- assessment_section_id (
osid.id.Id) –Idof theAssessmentSection- item_id (
osid.id.Id) –Idof theItemReturns:
trueif there is a next unanswered question,falseotherwiseReturn type:
booleanRaise:
IllegalState–has_assessment_section_begun() is false or is_assessment_section_over() is trueRaise:
NotFound–assessment_section_id or item_id is not found, or item_id not part of assessment_section_idRaise:
NullArgument–assessment_section_id or item_id is nullRaise:
OperationFailed– unable to complete requestRaise:
PermissionDenied– authorization failure occurred
Bank.get_next_unanswered_question(assessment_section_id, item_id)¶Gets the next unanswered question in this assesment section.
Parameters:
- assessment_section_id (
osid.id.Id) –Idof theAssessmentSection- item_id (
osid.id.Id) –Idof theItemReturns: the next unanswered question
Return type:
osid.assessment.QuestionRaise:
IllegalState–has_next_unanswered_question()isfalseRaise:
NotFound–assessment_section_id or item_id is not found, or item_id not part of assessment_section_idRaise:
NullArgument–assessment_section_id or item_id is nullRaise:
OperationFailed– unable to complete requestRaise:
PermissionDenied– authorization failure occurred
Bank.has_previous_unanswered_question(assessment_section_id, item_id)¶Tests if there is a previous unanswered question preceeding the given question
Id.
Parameters:
- assessment_section_id (
osid.id.Id) –Idof theAssessmentSection- item_id (
osid.id.Id) –Idof theItemReturns:
trueif there is a previous unanswered question,falseotherwiseReturn type:
booleanRaise:
IllegalState–has_assessment_section_begun() is false or is_assessment_section_over() is trueRaise:
NotFound–assessment_section_id or item_id is not found, or item_id not part of assessment_section_idRaise:
NullArgument–assessment_section_id or item_id is nullRaise:
OperationFailed– unable to complete requestRaise:
PermissionDenied– authorization failure occurred
Bank.get_previous_unanswered_question(assessment_section_id, item_id)¶Gets the previous unanswered question in this assesment section.
Parameters:
- assessment_section_id (
osid.id.Id) –Idof theAssessmentSection- item_id (
osid.id.Id) –Idof theItemReturns: the previous unanswered question
Return type:
osid.assessment.QuestionRaise:
IllegalState–has_previous_unanswered_question()isfalseRaise:
NotFound–assessment_section_id or item_id is not found, or item_id not part of assessment_section_idRaise:
NullArgument–assessment_section_id or item_id is nullRaise:
OperationFailed– unable to complete requestRaise:
PermissionDenied– authorization failure occurred
Bank.get_response(assessment_section_id, item_id)¶Gets the submitted response to the associated item.
Parameters:
- assessment_section_id (
osid.id.Id) –Idof theAssessmentSection- item_id (
osid.id.Id) –Idof theItemReturns: the response
Return type:
osid.assessment.ResponseRaise:
IllegalState–has_assessment_section_begun()isfalse or is_assessment_section_over()istrueRaise:
NotFound–assessment_section_id or item_id is not found, or item_id not part of assessment_section_idRaise:
NullArgument–assessment_section_id or item_id is nullRaise:
OperationFailed– unable to complete requestRaise:
PermissionDenied– authorization failure
Bank.get_responses(assessment_section_id)¶Gets all submitted responses.
Parameters: assessment_section_id ( osid.id.Id) –Idof theAssessmentSectionReturns: the list of responses Return type: osid.assessment.ResponseListRaise: IllegalState–has_assessment_section_begun()isfalse or is_assessment_section_over()istrueRaise: NotFound–assessment_section_idis not foundRaise: NullArgument–assessment_section_idisnullRaise: OperationFailed– unable to complete requestRaise: PermissionDenied– authorization failure
Bank.clear_response(assessment_section_id, item_id)¶Clears the response to an item The item appears as unanswered. If no response exists, the method simply returns.
Parameters:
- assessment_section_id (
osid.id.Id) –Idof theAssessmentSection- item_id (
osid.id.Id) –Idof theItemRaise:
IllegalState–has_assessment_section_begun() is false or is_assessment_section_over() is trueRaise:
NotFound–assessment_section_id or item_id is not found, or item_id not part of assessment_section_idRaise:
NullArgument–assessment_section_id or item_id is nullRaise:
OperationFailed– unable to complete requestRaise:
PermissionDenied– authorization failure
Bank.finish_assessment_section(assessment_section_id)¶Indicates an assessment section is complete. Finished sections may or may not allow new or updated responses.
Parameters: assessment_section_id ( osid.id.Id) –Idof theAssessmentSectionRaise: IllegalState–has_assessment_section_begun()isfalse or is_assessment_section_over()istrueRaise: NotFound–assessment_section_idis not foundRaise: NullArgument–assessment_section_idisnullRaise: OperationFailed– unable to complete requestRaise: PermissionDenied– authorization failure
Bank.is_answer_available(assessment_section_id, item_id)¶Tests if an answer is available for the given item.
Parameters:
- assessment_section_id (
osid.id.Id) –Idof theAssessmentSection- item_id (
osid.id.Id) –Idof theItemReturns:
trueif an answer are available,falseotherwiseReturn type:
booleanRaise:
NotFound–assessment_section_id or item_id is not found, or item_id not part of assessment_section_idRaise:
NullArgument–assessment_section_id or item_id is nullRaise:
OperationFailed– unable to complete requestRaise:
PermissionDenied– authorization failure
Bank.get_answers(assessment_section_id, item_id)¶Gets the acceptable answers to the associated item.
Parameters:
- assessment_section_id (
osid.id.Id) –Idof theAssessmentSection- item_id (
osid.id.Id) –Idof theItemReturns: the answers
Return type:
osid.assessment.AnswerListRaise:
IllegalState–is_answer_available()isfalseRaise:
NotFound–assessment_section_id or item_id is not found, or item_id not part of assessment_section_idRaise:
NullArgument–assessment_section_id or item_id is nullRaise:
OperationFailed– unable to complete requestRaise:
PermissionDenied– authorization failure
Bank.finish_assessment(assessment_taken_id)¶Indicates the entire assessment is complete.
Parameters: assessment_taken_id ( osid.id.Id) –Idof theAssessmentTakenRaise: IllegalState–has_begun()isfalse or is_over()istrueRaise: NotFound–assessment_taken_idis not foundRaise: NullArgument–assessment_taken_idisnullRaise: OperationFailed– unable to complete requestRaise: PermissionDenied– authorization failure
Item Lookup Methods¶
Bank.can_lookup_items()¶Tests if this user can perform
Itemlookups. 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.
Returns: falseif lookup methods are not authorized,trueotherwiseReturn type: boolean
Bank.use_comparative_item_view()¶The returns from the lookup methods may omit or translate elements based on this session, such as assessment, and not result in an error. This view is used when greater interoperability is desired at the expense of precision.
Bank.use_plenary_item_view()¶A complete view of the
Itemreturns 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.
Bank.use_federated_bank_view()¶Federates the view for methods in this session. A federated view will include assessment items in assessment banks which are children of this assessment bank in the assessment bank hierarchy.
Bank.use_isolated_bank_view()¶Isolates the view for methods in this session. An isolated view restricts lookups to this assessment bank only.
Bank.get_item(item_id)¶Gets the
Itemspecified by itsId. In plenary mode, the exactIdis found or aNotFoundresults. Otherwise, the returnedItemmay have a differentIdthan requested, such as the case where a duplicateIdwas assigned to anItemand retained for compatibility.
Parameters: item_id ( osid.id.Id) – theIdof theItemto retrieveReturns: the returned ItemReturn type: osid.assessment.ItemRaise: NotFound– noItemfound with the givenIdRaise: NullArgument–item_idisnullRaise: OperationFailed– unable to complete requestRaise: PermissionDenied– authorization failure occurred
Bank.get_items_by_ids(item_ids)¶Gets an
ItemListcorresponding to the givenIdList. In plenary mode, the returned list contains all of the items specified in theIdlist, in the order of the list, including duplicates, or an error results if anIdin the supplied list is not found or inaccessible. Otherwise, inaccessibleItemsmay be omitted from the list and may present the elements in any order including returning a unique set.
Parameters: item_ids ( osid.id.IdList) – the list ofIdsto retrieveReturns: the returned ItemlistReturn type: osid.assessment.ItemListRaise: NotFound– anId wasnot foundRaise: NullArgument–item_idsisnullRaise: OperationFailed– unable to complete requestRaise: PermissionDenied– authorization failure occurred
Bank.get_items_by_genus_type(item_genus_type)¶Gets an
ItemListcorresponding to the given assessment item genusTypewhich does not include assessment items of genus types derived from the specifiedType. In plenary mode, the returned list contains all known assessment items or an error results. Otherwise, the returned list may contain only those assessment items that are accessible through this session.
Parameters: item_genus_type ( osid.type.Type) – an assessment item genus typeReturns: the returned ItemlistReturn type: osid.assessment.ItemListRaise: NullArgument–item_genus_typeisnullRaise: OperationFailed– unable to complete requestRaise: PermissionDenied– authorization failure occurred
Bank.get_items_by_parent_genus_type(item_genus_type)¶Gets an
ItemListcorresponding to the given assessment item genusTypeand include any additional assessment items with genus types derived from the specifiedType. In plenary mode, the returned list contains all known assessment items or an error results. Otherwise, the returned list may contain only those assessment items that are accessible through this session.
Parameters: item_genus_type ( osid.type.Type) – an assessment item genus typeReturns: the returned ItemlistReturn type: osid.assessment.ItemListRaise: NullArgument–item_genus_typeisnullRaise: OperationFailed– unable to complete requestRaise: PermissionDenied– authorization failure occurred
Bank.get_items_by_record_type(item_record_type)¶Gets an
ItemListcontaining the given assessment item recordType. In plenary mode, the returned list contains all known items or an error results. Otherwise, the returned list may contain only those assessment items that are accessible through this session.
Parameters: item_record_type ( osid.type.Type) – an item record typeReturns: the returned ItemlistReturn type: osid.assessment.ItemListRaise: NullArgument–item_record_typeisnullRaise: OperationFailed– unable to complete requestRaise: PermissionDenied– authorization failure occurred
Bank.get_items_by_question(question_id)¶Gets an
ItemListcontaining the given question. In plenary mode, the returned list contains all known items or an error results. Otherwise, the returned list may contain only those assessment items that are accessible through this session.
Parameters: question_id ( osid.id.Id) – a questionIdReturns: the returned ItemlistReturn type: osid.assessment.ItemListRaise: NullArgument–question_idisnullRaise: OperationFailed– unable to complete requestRaise: PermissionDenied– authorization failure occurred
Bank.get_items_by_answer(answer_id)¶Gets an
ItemListcontaining the given answer. In plenary mode, the returned list contains all known items or an error results. Otherwise, the returned list may contain only those assessment items that are accessible through this session.
Parameters: answer_id ( osid.id.Id) – an answerIdReturns: the returned ItemlistReturn type: osid.assessment.ItemListRaise: NullArgument–answer_idisnullRaise: OperationFailed– unable to complete requestRaise: PermissionDenied– authorization failure occurred
Bank.get_items_by_learning_objective(objective_id)¶Gets an
ItemListcontaining the given learning objective. In plenary mode, the returned list contains all known items or an error results. Otherwise, the returned list may contain only those assessment items that are accessible through this session.
Parameters: objective_id ( osid.id.Id) – a learning objectiveIdReturns: the returned ItemlistReturn type: osid.assessment.ItemListRaise: NullArgument–objective_idisnullRaise: OperationFailed– unable to complete requestRaise: PermissionDenied– authorization failure occurred
Bank.get_items_by_learning_objectives(objective_ids)¶Gets an
ItemListcontaining the given learning objectives. In plenary mode, the returned list contains all known items or an error results. Otherwise, the returned list may contain only those assessment items that are accessible through this session.
Parameters: objective_ids ( osid.id.IdList) – a list of learning objectiveIdsReturns: the returned ItemlistReturn type: osid.assessment.ItemListRaise: NullArgument–objective_idsisnullRaise: OperationFailed– unable to complete requestRaise: PermissionDenied– authorization failure occurred
Item Query Methods¶
Bank.can_search_items()¶Tests if this user can perform
Itemsearches. 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 pplication that may wish not to offer search operations to unauthorized users.
Returns: falseif search methods are not authorized,trueotherwiseReturn type: boolean
Bank.use_federated_bank_view()Federates the view for methods in this session. A federated view will include assessment items in assessment banks which are children of this assessment bank in the assessment bank hierarchy.
Bank.use_isolated_bank_view()Isolates the view for methods in this session. An isolated view restricts lookups to this assessment bank only.
Bank.item_query¶Gets an assessment item query.
Returns: the assessment item query Return type: osid.assessment.ItemQuery
Bank.get_items_by_query(item_query)¶Gets a list of
Itemsmatching the given item query.
Parameters: item_query ( osid.assessment.ItemQuery) – the item queryReturns: the returned ItemListReturn type: osid.assessment.ItemListRaise: NullArgument–item_queryisnullRaise: OperationFailed– unable to complete requestRaise: PermissionDenied– authorization failure occurredRaise: Unsupported–item_queryis not of this service
Item Admin Methods¶
Bank.can_create_items()¶Tests if this user can create
Items. A return of true does not guarantee successful authorization. A return of false indicates that it is known creating anItemwill 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: falseifItemcreation is not authorized,trueotherwiseReturn type: boolean
Bank.can_create_item_with_record_types(item_record_types)¶Tests if this user can create a single
Itemusing the desired record types. WhileAssessmentManager.getItemRecordTypes()can be used to examine which records are supported, this method tests which record(s) are required for creating a specificItem. Providing an empty array tests if anItemcan be created with no records.
Parameters: item_record_types ( osid.type.Type[]) – array of item record typesReturns: trueifItemcreation using the specified recordTypesis supported,falseotherwiseReturn type: booleanRaise: NullArgument–item_record_typesisnull
Bank.get_item_form_for_create(item_record_types)¶Gets the assessment item form for creating new assessment items. A new form should be requested for each create transaction.
Parameters: item_record_types ( osid.type.Type[]) – array of item record types to be included in the create operation or an empty list if noneReturns: the assessment item form Return type: osid.assessment.ItemFormRaise: NullArgument–item_record_typesisnullRaise: OperationFailed– unable to complete requestRaise: PermissionDenied– authorization failure occurredRaise: Unsupported– unable to get form for requested record types
Bank.create_item(item_form)¶Creates a new
Item.
Parameters: item_form ( osid.assessment.ItemForm) – the form for thisItemReturns: the new ItemReturn type: osid.assessment.ItemRaise: IllegalState–item_formalready used in a create transactionRaise: InvalidArgument– one or more of the form elements is invalidRaise: NullArgument–item_formisnullRaise: OperationFailed– unable to complete requestRaise: PermissionDenied– authorization failure occurredRaise: Unsupported–item_formdid not originate fromget_item_form_for_create()
Bank.can_update_items()¶Tests if this user can update
Items. A return of true does not guarantee successful authorization. A return of false indicates that it is known updating anItemwill 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: falseif assessment item modification is not authorized,trueotherwiseReturn type: boolean
Bank.get_item_form_for_update(item_id)¶Gets the assessment item form for updating an existing item. A new item form should be requested for each update transaction.
Parameters: item_id ( osid.id.Id) – theIdof theItemReturns: the assessment item form Return type: osid.assessment.ItemFormRaise: NotFound–item_idis not foundRaise: NullArgument–item_idisnullRaise: OperationFailed– unable to complete requestRaise: PermissionDenied– authorization failure occurred
Bank.update_item(item_form)¶Updates an existing item.
Parameters: item_form ( osid.assessment.ItemForm) – the form containing the elements to be updatedRaise: IllegalState–item_formalready used in an update transactionRaise: InvalidArgument– the form contains an invalid valueRaise: NullArgument–item_formisnullRaise: OperationFailed– unable to complete requestRaise: PermissionDenied– authorization failure occurredRaise: Unsupported–item_formdid not originate fromget_item_form_for_update()
Bank.can_delete_items()¶Tests if this user can delete
Items. A return of true does not guarantee successful authorization. A return of false indicates that it is known deleting anItemwill 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: falseifItemdeletion is not authorized,trueotherwiseReturn type: boolean
Bank.delete_item(item_id)¶Deletes the
Itemidentified by the givenId.
Parameters: item_id ( osid.id.Id) – theIdof theItemto deleteRaise: NotFound– anItemwas not found identified by the givenIdRaise: NullArgument–item_idisnullRaise: OperationFailed– unable to complete requestRaise: PermissionDenied– authorization failure occurred
Bank.can_manage_item_aliases()¶Tests if this user can manage
Idaliases forItems. 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: falseifItemaliasing is not authorized,trueotherwiseReturn type: boolean
Bank.alias_item(item_id, alias_id)¶Adds an
Idto anItemfor the purpose of creating compatibility. The primaryIdof theItemis determined by the provider. The newIdis an alias to the primaryId. If the alias is a pointer to another item, it is reassigned to the given itemId.
Parameters:
- item_id (
osid.id.Id) – theIdof anItem- alias_id (
osid.id.Id) – the aliasIdRaise:
AlreadyExists–alias_idis in use as a primaryIdRaise:
NotFound–item_idnot foundRaise:
NullArgument–item_idoralias_idisnullRaise:
OperationFailed– unable to complete requestRaise:
PermissionDenied– authorization failure occurred
Bank.can_create_questions()¶Tests if this user can create
Questions. A return of true does not guarantee successful authorization. A return of false indicates that it is known creating aQuestionwill 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: falseifQuestioncreation is not authorized,trueotherwiseReturn type: boolean
Bank.can_create_question_with_record_types(question_record_types)¶Tests if this user can create a single
Questionusing the desired record types. WhileAssessmentManager.getQuestionRecordTypes()can be used to examine which records are supported, this method tests which record(s) are required for creating a specificQuestion. Providing an empty array tests if aQuestioncan be created with no records.
Parameters: question_record_types ( osid.type.Type[]) – array of question record typesReturns: trueifQuestioncreation using the specified recordTypesis supported,falseotherwiseReturn type: booleanRaise: NullArgument–question_record_typesisnull
Bank.get_question_form_for_create(item_id, question_record_types)¶Gets the question form for creating new questions. A new form should be requested for each create transaction.
Parameters:
- item_id (
osid.id.Id) – an assessment itemId- question_record_types (
osid.type.Type[]) – array of question record types to be included in the create operation or an empty list if noneReturns: the question form
Return type:
osid.assessment.QuestionFormRaise:
NullArgument–question_record_typesisnullRaise:
OperationFailed– unable to complete requestRaise:
PermissionDenied– authorization failure occurredRaise:
Unsupported– unable to get form for requested record types
Bank.create_question(question_form)¶Creates a new
Question.
Parameters: question_form ( osid.assessment.QuestionForm) – the form for thisQuestionReturns: the new QuestionReturn type: osid.assessment.QuestionRaise: AlreadyExists– a question already exists for this itemRaise: IllegalState–question_formalready used in a create transactionRaise: InvalidArgument– one or more of the form elements is invalidRaise: NullArgument–question_formisnullRaise: OperationFailed– unable to complete requestRaise: PermissionDenied– authorization failure occurredRaise: Unsupported–question_formdid not originate fromget_question_form_for_create()
Bank.can_update_questions()¶Tests if this user can update
Questions. A return of true does not guarantee successful authorization. A return of false indicates that it is known updating aQuestionwill 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: falseif question modification is not authorized,trueotherwiseReturn type: boolean
Bank.get_question_form_for_update(question_id)¶Gets the question form for updating an existing question. A new question form should be requested for each update transaction.
Parameters: question_id ( osid.id.Id) – theIdof theQuestionReturns: the question form Return type: osid.assessment.QuestionFormRaise: NotFound–question_idis not foundRaise: NullArgument–question_idisnullRaise: OperationFailed– unable to complete requestRaise: PermissionDenied– authorization failure occurred
Bank.update_question(question_form)¶Updates an existing question.
Parameters: question_form ( osid.assessment.QuestionForm) – the form containing the elements to be updatedRaise: IllegalState–question_formalready used in an update transactionRaise: InvalidArgument– the form contains an invalid valueRaise: NullArgument–question_formisnullRaise: OperationFailed– unable to complete requestRaise: PermissionDenied– authorization failure occurredRaise: Unsupported–question_formdid not originate fromget_question_form_for_update()
Bank.can_delete_questions()¶Tests if this user can delete
Questions. A return of true does not guarantee successful authorization. A return of false indicates that it is known deleting aQuestionwill 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: falseifQuestiondeletion is not authorized,trueotherwiseReturn type: boolean
Bank.delete_question(question_id)¶Deletes the
Questionidentified by the givenId.
Parameters: question_id ( osid.id.Id) – theIdof theQuestionto deleteRaise: NotFound– aQuestionwas not found identified by the givenIdRaise: NullArgument–question_idisnullRaise: OperationFailed– unable to complete requestRaise: PermissionDenied– authorization failure occurred
Bank.can_create_answers()¶Tests if this user can create
Answers. A return of true does not guarantee successful authorization. A return of false indicates that it is known creating aAnswerwill 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: falseifAnswercreation is not authorized,trueotherwiseReturn type: boolean
Bank.can_create_answers_with_record_types(answer_record_types)¶Tests if this user can create a single
Answerusing the desired record types. WhileAssessmentManager.getAnswerRecordTypes()can be used to examine which records are supported, this method tests which record(s) are required for creating a specificAnswer. Providing an empty array tests if anAnswercan be created with no records.
Parameters: answer_record_types ( osid.type.Type[]) – array of answer record typesReturns: trueifAnswercreation using the specified recordTypesis supported,falseotherwiseReturn type: booleanRaise: NullArgument–answern_record_typesisnull
Bank.get_answer_form_for_create(item_id, answer_record_types)¶Gets the answer form for creating new answers. A new form should be requested for each create transaction.
Parameters:
- item_id (
osid.id.Id) – an assessment itemId- answer_record_types (
osid.type.Type[]) – array of answer record types to be included in the create operation or an empty list if noneReturns: the answer form
Return type:
osid.assessment.AnswerFormRaise:
NullArgument–answer_record_typesisnullRaise:
OperationFailed– unable to complete requestRaise:
PermissionDenied– authorization failure occurredRaise:
Unsupported– unable to get form for requested record types
Bank.create_answer(answer_form)¶Creates a new
Answer.
Parameters: answer_form ( osid.assessment.AnswerForm) – the form for thisAnswerReturns: the new AnswerReturn type: osid.assessment.AnswerRaise: IllegalState–answer_formalready used in a create transactionRaise: InvalidArgument– one or more of the form elements is invalidRaise: NullArgument–answer_formisnullRaise: OperationFailed– unable to complete requestRaise: PermissionDenied– authorization failure occurredRaise: Unsupported–answer_formdid not originate fromget_answer_form_for_create()
Bank.can_update_answers()¶Tests if this user can update
Answers. A return of true does not guarantee successful authorization. A return of false indicates that it is known updating anAnswerwill 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: falseif answer modification is not authorized,trueotherwiseReturn type: boolean
Bank.get_answer_form_for_update(answer_id)¶Gets the answer form for updating an existing answer. A new answer form should be requested for each update transaction.
Parameters: answer_id ( osid.id.Id) – theIdof theAnswerReturns: the answer form Return type: osid.assessment.AnswerFormRaise: NotFound–answer_idis not foundRaise: NullArgument–answer_idisnullRaise: OperationFailed– unable to complete requestRaise: PermissionDenied– authorization failure occurred
Bank.update_answer(answer_form)¶Updates an existing answer.
Parameters: answer_form ( osid.assessment.AnswerForm) – the form containing the elements to be updatedRaise: IllegalState–answer_formalready used in an update transactionRaise: InvalidArgument– the form contains an invalid valueRaise: NullArgument–answer_formisnullRaise: OperationFailed– unable to complete requestRaise: PermissionDenied– authorization failure occurredRaise: Unsupported–answer_formdid not originate fromget_answer_form_for_update()
Bank.can_delete_answers()¶Tests if this user can delete
Answers. A return of true does not guarantee successful authorization. A return of false indicates that it is known deleting anAnswerwill 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: falseifAnswerdeletion is not authorized,trueotherwiseReturn type: boolean
Bank.delete_answer(answer_id)¶Deletes the
Answeridentified by the givenId.
Parameters: answer_id ( osid.id.Id) – theIdof theAnswerto deleteRaise: NotFound– anAnswerwas not found identified by the givenIdRaise: NullArgument–answer_idisnullRaise: OperationFailed– unable to complete requestRaise: PermissionDenied– authorization failure occurred
Assessment Lookup Methods¶
Bank.can_lookup_assessments()¶Tests if this user can perform
Assessmentlookups. 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: falseif lookup methods are not authorized,trueotherwiseReturn type: boolean
Bank.use_comparative_assessment_view()¶The returns from the lookup methods may omit or translate elements based on this session, such as assessment, and not result in an error. This view is used when greater interoperability is desired at the expense of precision.
Bank.use_plenary_assessment_view()¶A complete view of the
Assessmentreturns 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.
Bank.use_federated_bank_view()Federates the view for methods in this session. A federated view will include assessment items in assessment banks which are children of this assessment bank in the assessment bank hierarchy.
Bank.use_isolated_bank_view()Isolates the view for methods in this session. An isolated view restricts lookups to this assessment bank only.
Bank.get_assessment(assessment_id)¶Gets the
Assessmentspecified by itsId. In plenary mode, the exactIdis found or aNotFoundresults. Otherwise, the returnedAssessmentmay have a differentIdthan requested, such as the case where a duplicateIdwas assigned to aAssessmentand retained for compatibility.
Parameters: assessment_id ( osid.id.Id) –Idof theAssessmentReturns: the assessment Return type: osid.assessment.AssessmentRaise: NotFound–assessment_idnot foundRaise: NullArgument–assessment_idisnullRaise: OperationFailed– unable to complete requestRaise: PermissionDenied– authorization failure occurred
Bank.get_assessments_by_ids(assessment_ids)¶Gets an
AssessmentListcorresponding to the givenIdList. In plenary mode, the returned list contains all of the assessments specified in theIdlist, in the order of the list, including duplicates, or an error results if anIdin the supplied list is not found or inaccessible. Otherwise, inaccessibleAssessmentsmay be omitted from the list and may present the elements in any order including returning a unique set.
Parameters: assessment_ids ( osid.id.IdList) – the list ofIdsto retrieveReturns: the returned AssessmentlistReturn type: osid.assessment.AssessmentListRaise: NotFound– anId wasnot foundRaise: NullArgument–assessment_idsisnullRaise: OperationFailed– unable to complete requestRaise: PermissionDenied– assessment failure
Bank.get_assessments_by_genus_type(assessment_genus_type)¶Gets an
AssessmentListcorresponding to the given assessment genusTypewhich does not include assessments of types derived from the specifiedType. In plenary mode, the returned list contains all known assessments or an error results. Otherwise, the returned list may contain only those assessments that are accessible through this session.
Parameters: assessment_genus_type ( osid.type.Type) – an assessment genus typeReturns: the returned AssessmentlistReturn type: osid.assessment.AssessmentListRaise: NullArgument–assessment_genus_typeisnullRaise: OperationFailed– unable to complete requestRaise: PermissionDenied– authorization failure occurred
Bank.get_assessments_by_parent_genus_type(assessment_genus_type)¶Gets an
AssessmentListcorresponding to the given assessment genusTypeand include any additional assessments with genus types derived from the specifiedType. In plenary mode, the returned list contains all known assessments or an error results. Otherwise, the returned list may contain only those assessments that are accessible through this session.
Parameters: assessment_genus_type ( osid.type.Type) – an assessment genus typeReturns: the returned AssessmentlistReturn type: osid.assessment.AssessmentListRaise: NullArgument–assessment_genus_typeisnullRaise: OperationFailed– unable to complete requestRaise: PermissionDenied– authorization failure occurred
Bank.get_assessments_by_record_type(assessment_record_type)¶Gets an
AssessmentListcorresponding to the given assessment recordType. The set of assessments implementing the given record type is returned. In plenary mode, the returned list contains all known assessments or an error results. Otherwise, the returned list may contain only those assessments that are accessible through this session.
Parameters: assessment_record_type ( osid.type.Type) – an assessment record typeReturns: the returned AssessmentlistReturn type: osid.assessment.AssessmentListRaise: NullArgument–assessment_record_typeisnullRaise: OperationFailed– unable to complete requestRaise: PermissionDenied– authorization failure occurred
Bank.assessments¶Gets all
Assessments. In plenary mode, the returned list contains all known assessments or an error results. Otherwise, the returned list may contain only those assessments that are accessible through this session.
Returns: a list of AssessmentsReturn type: osid.assessment.AssessmentListRaise: OperationFailed– unable to complete requestRaise: PermissionDenied– authorization failure occurred
Assessment Query Methods¶
Bank.can_search_assessments()¶Tests if this user can perform
Assessmentsearches. 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 pplication that may wish not to offer search operations to unauthorized users.
Returns: falseif search methods are not authorized,trueotherwiseReturn type: boolean
Bank.use_federated_bank_view()Federates the view for methods in this session. A federated view will include assessment items in assessment banks which are children of this assessment bank in the assessment bank hierarchy.
Bank.use_isolated_bank_view()Isolates the view for methods in this session. An isolated view restricts lookups to this assessment bank only.
Bank.assessment_query¶Gets an assessment query.
Returns: the assessment query Return type: osid.assessment.AssessmentQuery
Bank.get_assessments_by_query(assessment_query)¶Gets a list of
Assessmentsmatching the given assessment query.
Parameters: assessment_query ( osid.assessment.AssessmentQuery) – the assessment queryReturns: the returned AssessmentListReturn type: osid.assessment.AssessmentListRaise: NullArgument–assessment_queryisnullRaise: OperationFailed– unable to complete requestRaise: PermissionDenied– authorization failure occurredRaise: Unsupported–assessment_queryis not of this service
Assessment Admin Methods¶
Bank.can_create_assessments()¶Tests if this user can create
Assessments. A return of true does not guarantee successful authorization. A return of false indicates that it is known creating anAssessmentwill 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: falseifAssessmentcreation is not authorized,trueotherwiseReturn type: boolean
Bank.can_create_assessment_with_record_types(assessment_record_types)¶Tests if this user can create a single
Assessmentusing the desired record interface types. WhileAssessmentManager.getAssessmentRecordTypes()can be used to examine which record interfaces are supported, this method tests which record(s) are required for creating a specificAssessment. Providing an empty array tests if anAssessmentcan be created with no records.
Parameters: assessment_record_types ( osid.type.Type[]) – array of assessment record typesReturns: trueifAssessmentcreation using the specified recordTypesis supported,falseotherwiseReturn type: booleanRaise: NullArgument–assessment_record_typesisnull
Bank.get_assessment_form_for_create(assessment_record_types)¶Gets the assessment form for creating new assessments. A new form should be requested for each create transaction.
Parameters: assessment_record_types ( osid.type.Type[]) – array of assessment record types to be included in the create operation or an empty list if noneReturns: the assessment form Return type: osid.assessment.AssessmentFormRaise: NullArgument–assessment_record_typesisnullRaise: OperationFailed– unable to complete requestRaise: PermissionDenied– authorization failure occurredRaise: Unsupported– unable to get form for requested record types
Bank.create_assessment(assessment_form)¶Creates a new
Assessment.
Parameters: assessment_form ( osid.assessment.AssessmentForm) – the form for thisAssessmentReturns: the new AssessmentReturn type: osid.assessment.AssessmentRaise: IllegalState–assessment_formalready used in a create transactionRaise: InvalidArgument– one or more of the form elements is invalidRaise: NullArgument–assessment_formisnullRaise: OperationFailed– unable to complete requestRaise: PermissionDenied– authorization failure occurredRaise: Unsupported–assessment_formdid not originate fromget_assessment_form_for_create()
Bank.can_update_assessments()¶Tests if this user can update
Assessments. A return of true does not guarantee successful authorization. A return of false indicates that it is known updating anAssessmentwill 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: falseifAssessmentmodification is not authorized,trueotherwiseReturn type: boolean
Bank.get_assessment_form_for_update(assessment_id)¶Gets the assessment form for updating an existing assessment. A new assessment form should be requested for each update transaction.
Parameters: assessment_id ( osid.id.Id) – theIdof theAssessmentReturns: the assessment form Return type: osid.assessment.AssessmentFormRaise: NotFound–assessment_idis not foundRaise: NullArgument–assessment_idisnullRaise: OperationFailed– unable to complete requestRaise: PermissionDenied– authorization failure occurred
Bank.update_assessment(assessment_form)¶Updates an existing assessment.
Parameters: assessment_form ( osid.assessment.AssessmentForm) – the form containing the elements to be updatedRaise: IllegalState–assessment_formalready used in an update transactionRaise: InvalidArgument– the form contains an invalid valueRaise: NullArgument–assessment_formisnullRaise: OperationFailed– unable to complete requestRaise: PermissionDenied– authorization failure occurredRaise: Unsupported–assessment_form did not originate from get_assessment_form_for_update()
Bank.can_delete_assessments()¶Tests if this user can delete
Assessments. A return of true does not guarantee successful authorization. A return of false indicates that it is known deleting anAssessmentwill 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: falseifAssessmentdeletion is not authorized,trueotherwiseReturn type: boolean
Bank.delete_assessment(assessment_id)¶Deletes an
Assessment.
Parameters: assessment_id ( osid.id.Id) – theIdof theAssessmentto removeRaise: NotFound–assessment_idnot foundRaise: NullArgument–assessment_idisnullRaise: OperationFailed– unable to complete requestRaise: PermissionDenied– authorization failure occurred
Bank.can_manage_assessment_aliases()¶Tests if this user can manage
Idaliases forAssessments. 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: falseifAssessmentaliasing is not authorized,trueotherwiseReturn type: boolean
Bank.alias_assessment(assessment_id, alias_id)¶Adds an
Idto anAssessmentfor the purpose of creating compatibility. The primaryIdof theAssessmentis determined by the provider. The newIdis an alias to the primaryId. If the alias is a pointer to another assessment, it is reassigned to the given assessmentId.
Parameters:
- assessment_id (
osid.id.Id) – theIdof anAssessment- alias_id (
osid.id.Id) – the aliasIdRaise:
AlreadyExists–alias_idis in use as a primaryIdRaise:
NotFound–assessment_idnot foundRaise:
NullArgument–assessment_idoralias_idisnullRaise:
OperationFailed– unable to complete requestRaise:
PermissionDenied– authorization failure occurred
Assessment Basic Authoring Methods¶
Tests if this user can author assessments. 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 authoring operations to unauthorized users.
Returns: falseif mapping is not authorized,trueotherwiseReturn type: boolean
Bank.get_items(assessment_taken_id)¶Gets the items questioned in a assessment.
Parameters: assessment_taken_id ( osid.id.Id) –Idof theAssessmentTakenReturns: the list of assessment questions Return type: osid.assessment.ItemListRaise: NotFound–assessment_taken_idis not foundRaise: NullArgument–assessment_taken_idisnullRaise: OperationFailed– unable to complete requestRaise: PermissionDenied– authorization failure occurred
Bank.add_item(assessment_id, item_id)¶Adds an existing
Itemto an assessment.
Parameters:
- assessment_id (
osid.id.Id) – theIdof theAssessment- item_id (
osid.id.Id) – theIdof theItemRaise:
NotFound–assessment_idoritem_idnot foundRaise:
NullArgument–assessment_idoritem_idisnullRaise:
OperationFailed– unable to complete requestRaise:
PermissionDenied– authorization failure occurred
Bank.remove_item(assessment_id, item_id)¶Removes an
Itemfrom this assessment.
Parameters:
- assessment_id (
osid.id.Id) – theIdof theAssessment- item_id (
osid.id.Id) – theIdof theItemRaise:
NotFound–assessment_idoritem_idnot found oritem_idnot onassessmentidRaise:
NullArgument–assessment_idoritem_idisnullRaise:
OperationFailed– unable to complete requestRaise:
PermissionDenied– authorization failure occurred
Bank.move_item(assessment_id, item_id, preceeding_item_id)¶Moves an existing item to follow another item in an assessment.
Parameters:
- assessment_id (
osid.id.Id) – theIdof theAssessment- item_id (
osid.id.Id) – theIdof anItem- preceeding_item_id (
osid.id.Id) – theIdof a preceedingItemin the sequenceRaise:
NotFound–assessment_idis not found, oritem_idorpreceeding_item_idnot onassessment_idRaise:
NullArgument–assessment_id, item_idorpreceeding_item_idisnullRaise:
OperationFailed– unable to complete requestRaise:
PermissionDenied– authorization failure occurred
Bank.order_items(item_ids, assessment_id)¶Sequences existing items in an assessment.
Parameters:
- item_ids (
osid.id.Id[]) – theIdof theItems- assessment_id (
osid.id.Id) – theIdof theAssessmentRaise:
NotFound–assessment_idis not found or anitem_idis not onassessment_idRaise:
NullArgument–assessment_idoritem_idsisnullRaise:
OperationFailed– unable to complete requestRaise:
PermissionDenied– authorization failure occurred
Assessment Offered Lookup Methods¶
Bank.can_lookup_assessments_offered()¶Tests if this user can perform
AssessmentOfferedlookups. 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: falseif lookup methods are not authorized,trueotherwiseReturn type: boolean
Bank.use_comparative_assessment_offered_view()¶The returns from the lookup methods may omit or translate elements based on this session, such as assessment, and not result in an error. This view is used when greater interoperability is desired at the expense of precision.
Bank.use_plenary_assessment_offered_view()¶A complete view of the
AssessmentOfferedreturns 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.
Bank.use_federated_bank_view()Federates the view for methods in this session. A federated view will include assessment items in assessment banks which are children of this assessment bank in the assessment bank hierarchy.
Bank.use_isolated_bank_view()Isolates the view for methods in this session. An isolated view restricts lookups to this assessment bank only.
Bank.get_assessment_offered(assessment_offered_id)¶Gets the
AssessmentOfferedspecified by itsId. In plenary mode, the exactIdis found or aNotFoundresults. Otherwise, the returnedAssessmentOfferedmay have a differentIdthan requested, such as the case where a duplicateIdwas assigned to anAssessmentOfferedand retained for compatibility.
Parameters: assessment_offered_id ( osid.id.Id) –Idof theAssessmentOfferedReturns: the assessment offered Return type: osid.assessment.AssessmentOfferedRaise: NotFound–assessment_offered_idnot foundRaise: NullArgument–assessment_offered_idisnullRaise: OperationFailed– unable to complete requestRaise: PermissionDenied– authorization failure occurred
Bank.get_assessments_offered_by_ids(assessment_offered_ids)¶Gets an
AssessmentOfferedListcorresponding to the givenIdList. In plenary mode, the returned list contains all of the assessments specified in theIdlist, in the order of the list, including duplicates, or an error results if anIdin the supplied list is not found or inaccessible. Otherwise, inaccessibleAssessmentOfferedobjects may be omitted from the list and may present the elements in any order including returning a unique set.
Parameters: assessment_offered_ids ( osid.id.IdList) – the list ofIdsto retrieveReturns: the returned AssessmentOfferedlistReturn type: osid.assessment.AssessmentOfferedListRaise: NotFound– anId wasnot foundRaise: NullArgument–assessment_offered_idsisnullRaise: OperationFailed– unable to complete requestRaise: PermissionDenied– assessment failure
Bank.get_assessments_offered_by_genus_type(assessment_offered_genus_type)¶Gets an
AssessmentOfferedListcorresponding to the given assessment offered genusTypewhich does not include assessments of types derived from the specifiedType. In plenary mode, the returned list contains all known assessments offered or an error results. Otherwise, the returned list may contain only those assessments offered that are accessible through this session.
Parameters: assessment_offered_genus_type ( osid.type.Type) – an assessment offered genus typeReturns: the returned AssessmentOfferedlistReturn type: osid.assessment.AssessmentOfferedListRaise: NullArgument–assessment_offered_genus_typeisnullRaise: OperationFailed– unable to complete requestRaise: PermissionDenied– authorization failure occurred
Bank.get_assessments_offered_by_parent_genus_type(assessment_offered_genus_type)¶Gets an
AssessmentOfferedListcorresponding to the given assessment offered genusTypeand include any additional assessments with genus types derived from the specifiedType. In plenary mode, the returned list contains all known assessments or an error results. Otherwise, the returned list may contain only those assessments offered that are accessible through this session.
Parameters: assessment_offered_genus_type ( osid.type.Type) – an assessment offered genus typeReturns: the returned AssessmentOfferedlistReturn type: osid.assessment.AssessmentOfferedListRaise: NullArgument–assessment_offered_genus_typeisnullRaise: OperationFailed– unable to complete requestRaise: PermissionDenied– authorization failure occurred
Bank.get_assessments_offered_by_record_type(assessment_record_type)¶Gets an
AssessmentOfferedListcorresponding to the given assessment offered recordType. The set of assessments implementing the given record type is returned. In plenary mode, the returned list contains all known assessments offered or an error results. Otherwise, the returned list may contain only those assessments offered that are accessible through this session.
Parameters: assessment_record_type ( osid.type.Type) – an assessment offered record typeReturns: the returned AssessmentOfferedlistReturn type: osid.assessment.AssessmentOfferedListRaise: NullArgument–assessment_offered_record_typeisnullRaise: OperationFailed– unable to complete requestRaise: PermissionDenied– authorization failure occurred
Bank.get_assessments_offered_by_date(start, end)¶Gets an
AssessmentOfferedListthat have designated start times where the start times fall in the given range inclusive. In plenary mode, the returned list contains all known assessments offered or an error results. Otherwise, the returned list may contain only those assessments offered that are accessible through this session.
Parameters:
- start (
osid.calendaring.DateTime) – start of time range- end (
osid.calendaring.DateTime) – end of time rangeReturns: the returned
AssessmentOfferedlistReturn type:
osid.assessment.AssessmentOfferedListRaise:
InvalidArgument–endis less thanstartRaise:
OperationFailed– unable to complete requestRaise:
PermissionDenied– authorization failure occurred
Bank.get_assessments_offered_for_assessment(assessment_id)¶Gets an
AssessmentOfferedListby the given assessment. In plenary mode, the returned list contains all known assessments offered or an error results. Otherwise, the returned list may contain only those assessments offered that are accessible through this session.
Parameters: assessment_id ( osid.id.Id) –Idof anAssessmentReturns: the returned AssessmentOfferedlistReturn type: osid.assessment.AssessmentOfferedListRaise: NullArgument–assessment_idisnullRaise: OperationFailed– unable to complete requestRaise: PermissionDenied– authorization failure occurred
Bank.assessments_offered¶Gets all
AssessmentOfferedelements. In plenary mode, the returned list contains all known assessments offered or an error results. Otherwise, the returned list may contain only those assessments offered that are accessible through this session.
Returns: a list of AssessmentOfferedelementsReturn type: osid.assessment.AssessmentOfferedListRaise: OperationFailed– unable to complete requestRaise: PermissionDenied– authorization failure occurred
Assessment Offered Query Methods¶
Bank.can_search_assessments_offered()¶Tests if this user can perform
AssessmentOfferedsearches. 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 wish not to offer search operations to unauthorized users.
Returns: falseif search methods are not authorized,trueotherwiseReturn type: boolean
Bank.use_federated_bank_view()Federates the view for methods in this session. A federated view will include assessment items in assessment banks which are children of this assessment bank in the assessment bank hierarchy.
Bank.use_isolated_bank_view()Isolates the view for methods in this session. An isolated view restricts lookups to this assessment bank only.
Bank.assessment_offered_query¶Gets an assessment offered query.
Returns: the assessment offered query Return type: osid.assessment.AssessmentOfferedQuery
Bank.get_assessments_offered_by_query(assessment_offered_query)¶Gets a list of
AssessmentOfferedelements matching the given assessment offered query.
Parameters: assessment_offered_query ( osid.assessment.AssessmentOfferedQuery) – the assessment offered queryReturns: the returned AssessmentOfferedListReturn type: osid.assessment.AssessmentOfferedListRaise: NullArgument–assessment_offered_queryisnullRaise: OperationFailed– unable to complete requestRaise: PermissionDenied– authorization failure occurredRaise: Unsupported–assessment_offered_queryis not of this service
Assessment Offered Admin Methods¶
Bank.can_create_assessments_offered()¶Tests if this user can create
AssessmentOfferedobjects. A return of true does not guarantee successful authoriization. A return of false indicates that it is known creating anAssessmentOfferedwill 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: falseifAssessmentOfferedcreation is not authorized,trueotherwiseReturn type: boolean
Bank.can_create_assessment_offered_with_record_types(assessment_offered_record_types)¶Tests if this user can create a single
AssessmentOfferedusing the desired record types. WhileAssessmentManager.getAssessmentOfferedRecordTypes()can be used to examine which records are supported, this method tests which record(s) are required for creating a specificAssessmentOffered. Providing an empty array tests if anAssessmentOfferedcan be created with no records.
Parameters: assessment_offered_record_types ( osid.type.Type[]) – array of assessment offered record typesReturns: trueifAssessmentOfferedcreation using the specified recordTypesis supported,falseotherwiseReturn type: booleanRaise: NullArgument–assessment_offered_record_typesisnull
Bank.get_assessment_offered_form_for_create(assessment_id, assessment_offered_record_types)¶Gets the assessment offered form for creating new assessments offered. A new form should be requested for each create transaction.
Parameters:
- assessment_id (
osid.id.Id) – theIdof the relatedAssessment- assessment_offered_record_types (
osid.type.Type[]) – array of assessment offered record types to be included in the create operation or an empty list if noneReturns: the assessment offered form
Return type:
osid.assessment.AssessmentOfferedFormRaise:
NotFound–assessment_idis not foundRaise:
NullArgument–assessment_idorassessment_offered_record_typesisnullRaise:
OperationFailed– unable to complete requestRaise:
PermissionDenied– authorization failure occurredRaise:
Unsupported– unable to get form for requested record types
Bank.create_assessment_offered(assessment_offered_form)¶Creates a new
AssessmentOffered.
Parameters: assessment_offered_form ( osid.assessment.AssessmentOfferedForm) – the form for thisAssessmentOfferedReturns: the new AssessmentOfferedReturn type: osid.assessment.AssessmentOfferedRaise: IllegalState–assessment_offrered_formalready used in a create transactionRaise: InvalidArgument– one or more of the form elements is invalidRaise: NullArgument–assessment_formisnullRaise: OperationFailed– unable to complete requestRaise: PermissionDenied– authorization failure occurredRaise: Unsupported–assessment_formdid not originate fromget_assessment_form_for_create()
Bank.can_update_assessments_offered()¶Tests if this user can update
AssessmentOfferedobjects. A return of true does not guarantee successful authorization. A return of false indicates that it is known updating anAssessmentOfferedwill 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: falseifAssessmentmodification is not authorized,trueotherwiseReturn type: boolean
Bank.get_assessment_offered_form_for_update(assessment_offered_id)¶Gets the assessment offered form for updating an existing assessment offered. A new assessment offered form should be requested for each update transaction.
Parameters: assessment_offered_id ( osid.id.Id) – theIdof theAssessmentOfferedReturns: the assessment offered form Return type: osid.assessment.AssessmentOfferedFormRaise: NotFound–assessment_offered_idis not foundRaise: NullArgument–assessment_offered_idisnullRaise: OperationFailed– unable to complete requestRaise: PermissionDenied– authorization failure occurred
Bank.update_assessment_offered(assessment_offered_form)¶Updates an existing assessment offered.
Parameters: assessment_offered_form ( osid.assessment.AssessmentOfferedForm) – the form containing the elements to be updatedRaise: IllegalState–assessment_offrered_formalready used in an update transactionRaise: InvalidArgument– the form contains an invalid valueRaise: NullArgument–assessment_offered_formisnullRaise: OperationFailed– unable to complete requestRaise: PermissionDenied– authorization failure occurredRaise: Unsupported–assessment_formdid not originate fromget_assessment_form_for_update()
Bank.can_delete_assessments_offered()¶Tests if this user can delete
AssessmentsOffered. A return of true does not guarantee successful authorization. A return of false indicates that it is known deleting anAssessmentOfferedwill result in aPermissionDenied. This is intended as a hint to an application that may opt not to offer a delete operations to unauthorized users.
Returns: falseifAssessmentOffereddeletion is not authorized,trueotherwiseReturn type: boolean
Bank.delete_assessment_offered(assessment_offered_id)¶Deletes an
AssessmentOffered.
Parameters: assessment_offered_id ( osid.id.Id) – theIdof theAssessmentOfferedto removeRaise: NotFound–assessment_offered_idnot foundRaise: NullArgument–assessment_offered_idisnullRaise: OperationFailed– unable to complete requestRaise: PermissionDenied– authorization failure occurred
Bank.can_manage_assessment_offered_aliases()¶Tests if this user can manage
Idaliases forAssessmentsOffered. 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: falseifAssessmentOfferedaliasing is not authorized,trueotherwiseReturn type: boolean
Bank.alias_assessment_offered(assessment_offered_id, alias_id)¶Adds an
Idto anAssessmentOfferedfor the purpose of creating compatibility. The primaryIdof theAssessmentOfferedis determined by the provider. The newIdis an alias to the primaryId. If the alias is a pointer to another assessment offered, it is reassigned to the given assessment offeredId.
Parameters:
- assessment_offered_id (
osid.id.Id) – theIdof anAssessmentOffered- alias_id (
osid.id.Id) – the aliasIdRaise:
AlreadyExists–alias_idis in use as a primaryIdRaise:
NotFound–assessment_offered_idnot foundRaise:
NullArgument–assessment_offered_idoralias_idisnullRaise:
OperationFailed– unable to complete requestRaise:
PermissionDenied– authorization failure occurred
Assessment Taken Lookup Methods¶
Bank.can_lookup_assessments_taken()¶Tests if this user can perform
AssessmentTakenlookups. 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: falseif lookup methods are not authorized,trueotherwiseReturn type: boolean
Bank.use_comparative_assessment_taken_view()¶The returns from the lookup methods may omit or translate elements based on this session, such as assessment, and not result in an error. This view is used when greater interoperability is desired at the expense of precision.
Bank.use_plenary_assessment_taken_view()¶A complete view of the
AssessmentTakenreturns 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.
Bank.use_federated_bank_view()Federates the view for methods in this session. A federated view will include assessment items in assessment banks which are children of this assessment bank in the assessment bank hierarchy.
Bank.use_isolated_bank_view()Isolates the view for methods in this session. An isolated view restricts lookups to this assessment bank only.
Bank.get_assessment_taken(assessment_taken_id)¶Gets the
AssessmentTakenspecified by itsId. In plenary mode, the exactIdis found or aNotFoundresults. Otherwise, the returnedAssessmentTakenmay have a differentIdthan requested, such as the case where a duplicateIdwas assigned to anAssessmentTakenand retained for compatibility.
Parameters: assessment_taken_id ( osid.id.Id) –Idof theAssessmentTakenReturns: the assessment taken Return type: osid.assessment.AssessmentTakenRaise: NotFound–assessment_taken_idnot foundRaise: NullArgument–assessment_taken_idisnullRaise: OperationFailed– unable to complete requestRaise: PermissionDenied– authorization failure occurred
Bank.get_assessments_taken_by_ids(assessment_taken_ids)¶Gets an
AssessmentTakenListcorresponding to the givenIdList. In plenary mode, the returned list contains all of the assessments specified in theIdlist, in the order of the list, including duplicates, or an error results if anIdin the supplied list is not found or inaccessible. Otherwise, inaccessibleAssessmentTakenobjects may be omitted from the list and may present the elements in any order including returning a unique set.
Parameters: assessment_taken_ids ( osid.id.IdList) – the list ofIdsto retrieveReturns: the returned AssessmentTaken listReturn type: osid.assessment.AssessmentTakenListRaise: NotFound– anId wasnot foundRaise: NullArgument–assessment_taken_idsisnullRaise: OperationFailed– unable to complete requestRaise: PermissionDenied– assessment failure
Bank.get_assessments_taken_by_genus_type(assessment_taken_genus_type)¶Gets an
AssessmentTakenListcorresponding to the given assessment taken genusTypewhich does not include assessments of types derived from the specifiedType. In plenary mode, the returned list contains all known assessments taken or an error results. Otherwise, the returned list may contain only those assessments taken that are accessible through this session.
Parameters: assessment_taken_genus_type ( osid.type.Type) – an assessment taken genus typeReturns: the returned AssessmentTaken listReturn type: osid.assessment.AssessmentTakenListRaise: NullArgument–assessment_taken_genus_typeisnullRaise: OperationFailed– unable to complete requestRaise: PermissionDenied– authorization failure occurred
Bank.get_assessments_taken_by_parent_genus_type(assessment_taken_genus_type)¶Gets an
AssessmentTakenListcorresponding to the given assessment taken genusTypeand include any additional assessments with genus types derived from the specifiedType. In plenary mode, the returned list contains all known assessments or an error results. Otherwise, the returned list may contain only those assessments taken that are accessible through this session.
Parameters: assessment_taken_genus_type ( osid.type.Type) – an assessment taken genus typeReturns: the returned AssessmentTaken listReturn type: osid.assessment.AssessmentTakenListRaise: NullArgument–assessment_taken_genus_typeisnullRaise: OperationFailed– unable to complete requestRaise: PermissionDenied– authorization failure occurred
Bank.get_assessments_taken_by_record_type(assessment_taken_record_type)¶Gets an
AssessmentTakenListcorresponding to the given assessment taken recordType. The set of assessments implementing the given record type is returned. In plenary mode, the returned list contains all known assessments taken or an error results. Otherwise, the returned list may contain only those assessments taken that are accessible through this session. In both cases, the order of the set is not specified.
Parameters: assessment_taken_record_type ( osid.type.Type) – an assessment taken record typeReturns: the returned AssessmentTakenlistReturn type: osid.assessment.AssessmentTakenListRaise: NullArgument–assessment_taken_record_typeisnullRaise: OperationFailed– unable to complete requestRaise: PermissionDenied– authorization failure occurred
Bank.get_assessments_taken_by_date(from_, to)¶Gets an
AssessmentTakenListstarted in the given date range inclusive. In plenary mode, the returned list contains all known assessments taken or an error results. Otherwise, the returned list may contain only those assessments taken that are accessible through this session. In both cases, the order of the set is not specified.
Parameters:
- from (
osid.calendaring.DateTime) – start date- to (
osid.calendaring.DateTime) – end dateReturns: the returned
AssessmentTakenlistReturn type:
osid.assessment.AssessmentTakenListRaise:
InvalidArgument–fromis greater thantoRaise:
NullArgument–fromortoisnullRaise:
OperationFailed– unable to complete requestRaise:
PermissionDenied– authorization failure occurred
Bank.get_assessments_taken_for_taker(resource_id)¶Gets an
AssessmentTakenListfor the given resource. In plenary mode, the returned list contains all known assessments taken or an error results. Otherwise, the returned list may contain only those assessments taken that are accessible through this session.
Parameters: resource_id ( osid.id.Id) –Idof aResourceReturns: the returned AssessmentTakenlistReturn type: osid.assessment.AssessmentTakenListRaise: NullArgument–resource_idisnullRaise: OperationFailed– unable to complete requestRaise: PermissionDenied– authorization failure occurred
Bank.get_assessments_taken_by_date_for_taker(resource_id, from_, to)¶Gets an
AssessmentTakenListstarted in the given date range inclusive for the given resource. In plenary mode, the returned list contains all known assessments taken or an error results. Otherwise, the returned list may contain only those assessments taken that are accessible through this session.
Parameters:
- resource_id (
osid.id.Id) –Idof aResource- from (
osid.calendaring.DateTime) – start date- to (
osid.calendaring.DateTime) – end dateReturns: the returned
AssessmentTakenlistReturn type:
osid.assessment.AssessmentTakenListRaise:
InvalidArgument–fromis greater thantoRaise:
NullArgument–resource_id, fromortoisnullRaise:
OperationFailed– unable to complete requestRaise:
PermissionDenied– authorization failure occurred
Bank.get_assessments_taken_for_assessment(assessment_id)¶Gets an
AssessmentTakenListfor the given assessment. In plenary mode, the returned list contains all known assessments taken or an error results. Otherwise, the returned list may contain only those assessments taken that are accessible through this session.
Parameters: assessment_id ( osid.id.Id) –Idof anAssessmentReturns: the returned AssessmentTakenlistReturn type: osid.assessment.AssessmentTakenListRaise: NullArgument–assessment_idisnullRaise: OperationFailed– unable to complete requestRaise: PermissionDenied– authorization failure occurred
Bank.get_assessments_taken_by_date_for_assessment(assessment_id, from_, to)¶Gets an
AssessmentTakenListstarted in the given date range inclusive for the given assessment. In plenary mode, the returned list contains all known assessments taken or an error results. Otherwise, the returned list may contain only those assessments taken that are accessible through this session.
Parameters:
- assessment_id (
osid.id.Id) –Idof anAssessment- from (
osid.calendaring.DateTime) – start date- to (
osid.calendaring.DateTime) – end dateReturns: the returned
AssessmentTakenlistReturn type:
osid.assessment.AssessmentTakenListRaise:
InvalidArgument–fromis greater thantoRaise:
NullArgument–assessment_id, fromortoisnullRaise:
OperationFailed– unable to complete requestRaise:
PermissionDenied– authorization failure occurred
Bank.get_assessments_taken_for_taker_and_assessment(resource_id, assessment_id)¶Gets an
AssessmentTakenListfor the given resource and assessment. In plenary mode, the returned list contains all known assessments taken or an error results. Otherwise, the returned list may contain only those assessments taken that are accessible through this session.
Parameters:
- resource_id (
osid.id.Id) –Idof aResource- assessment_id (
osid.id.Id) –Idof anAssessmentReturns: the returned
AssessmentTakenlistReturn type:
osid.assessment.AssessmentTakenListRaise:
NullArgument–resource_idorassessment_idisnullRaise:
OperationFailed– unable to complete requestRaise:
PermissionDenied– authorization failure occurred
Bank.get_assessments_taken_by_date_for_taker_and_assessment(resource_id, assessment_id, from_, to)¶Gets an
AssessmentTakenListstarted in the given date range inclusive for the given resource and assessment. In plenary mode, the returned list contains all known assessments taken or an error results. Otherwise, the returned list may contain only those assessments taken that are accessible through this session.
Parameters:
- resource_id (
osid.id.Id) –Idof aResource- assessment_id (
osid.id.Id) –Idof anAssessment- from (
osid.calendaring.DateTime) – start date- to (
osid.calendaring.DateTime) – end dateReturns: the returned
AssessmentTakenlistReturn type:
osid.assessment.AssessmentTakenListRaise:
InvalidArgument–fromis greater thantoRaise:
NullArgument–resource_id, assessment_id, fromortoisnullRaise:
OperationFailed– unable to complete requestRaise:
PermissionDenied– authorization failure occurred
Bank.get_assessments_taken_for_assessment_offered(assessment_offered_id)¶Gets an
AssessmentTakenListby the given assessment offered. In plenary mode, the returned list contains all known assessments taken or an error results. Otherwise, the returned list may contain only those assessments taken that are accessible through this session.
Parameters: assessment_offered_id ( osid.id.Id) –Idof anAssessmentOfferedReturns: the returned AssessmentTakenlistReturn type: osid.assessment.AssessmentTakenListRaise: NullArgument–assessment_offered_idisnullRaise: OperationFailed– unable to complete requestRaise: PermissionDenied– authorization failure occurred
Bank.get_assessments_taken_by_date_for_assessment_offered(assessment_offered_id, from_, to)¶Gets an
AssessmentTakenListstarted in the given date range inclusive for the given assessment offered. In plenary mode, the returned list contains all known assessments taken or an error results. Otherwise, the returned list may contain only those assessments taken that are accessible through this session.
Parameters:
- assessment_offered_id (
osid.id.Id) –Idof anAssessmentOffered- from (
osid.calendaring.DateTime) – start date- to (
osid.calendaring.DateTime) – end dateReturns: the returned
AssessmentTakenlistReturn type:
osid.assessment.AssessmentTakenListRaise:
InvalidArgument–fromis greater thantoRaise:
NullArgument–assessment_offered_id, from,ortoisnullRaise:
OperationFailed– unable to complete requestRaise:
PermissionDenied– authorization failure occurred
Bank.get_assessments_taken_for_taker_and_assessment_offered(resource_id, assessment_offered_id)¶Gets an
AssessmentTakenListfor the given resource and assessment offered. In plenary mode, the returned list contains all known assessments taken or an error results. Otherwise, the returned list may contain only those assessments taken that are accessible through this session.
Parameters:
- resource_id (
osid.id.Id) –Idof aResource- assessment_offered_id (
osid.id.Id) –Idof anAssessmentOfferedReturns: the returned
AssessmentTakenlistReturn type:
osid.assessment.AssessmentTakenListRaise:
NullArgument–resource_idorassessmen_offeredt_idisnullRaise:
OperationFailed– unable to complete requestRaise:
PermissionDenied– authorization failure occurred
Bank.get_assessments_taken_by_date_for_taker_and_assessment_offered(resource_id, assessment_offered_id, from_, to)¶Gets an
AssessmentTakenListstarted in the given date range inclusive for the given resource and assessment offered. In plenary mode, the returned list contains all known assessments taken or an error results. Otherwise, the returned list may contain only those assessments taken that are accessible through this session.
Parameters:
- resource_id (
osid.id.Id) –Idof aResource- assessment_offered_id (
osid.id.Id) –Idof anAssessmentOffered- from (
osid.calendaring.DateTime) – start date- to (
osid.calendaring.DateTime) – end dateReturns: the returned
AssessmentTakenlistReturn type:
osid.assessment.AssessmentTakenListRaise:
InvalidArgument–fromis greater thantoRaise:
NullArgument–resource_id, assessment_offered_id, from,ortoisnullRaise:
OperationFailed– unable to complete requestRaise:
PermissionDenied– authorization failure occurred
Bank.assessments_taken¶Gets all
AssessmentTakenelements. In plenary mode, the returned list contains all known assessments taken or an error results. Otherwise, the returned list may contain only those assessments taken that are accessible through this session.
Returns: a list of AssessmentTakenelementsReturn type: osid.assessment.AssessmentTakenListRaise: OperationFailed– unable to complete requestRaise: PermissionDenied– authorization failure occurred
Assessment Taken Query Methods¶
Bank.can_search_assessments_taken()¶Tests if this user can perform
AssessmentTakensearches. 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 search operations to unauthorized users.
Returns: falseif search methods are not authorized,trueotherwiseReturn type: boolean
Bank.use_federated_bank_view()Federates the view for methods in this session. A federated view will include assessment items in assessment banks which are children of this assessment bank in the assessment bank hierarchy.
Bank.use_isolated_bank_view()Isolates the view for methods in this session. An isolated view restricts lookups to this assessment bank only.
Bank.assessment_taken_query¶Gets an assessment taken query.
Returns: the assessment taken query Return type: osid.assessment.AssessmentTakenQuery
Bank.get_assessments_taken_by_query(assessment_taken_query)¶Gets a list of
AssessmentTakenelements matching the given assessment taken query.
Parameters: assessment_taken_query ( osid.assessment.AssessmentTakenQuery) – the assessment taken queryReturns: the returned AssessmentTakenListReturn type: osid.assessment.AssessmentTakenListRaise: NullArgument–assessment_taken_queryisnullRaise: OperationFailed– unable to complete requestRaise: PermissionDenied– authorization failure occurredRaise: Unsupported–assessment_taken_queryis not of this service
Assessment Taken Admin Methods¶
Bank.can_create_assessments_taken()¶Tests if this user can create
AssessmentTakenobjects. A return of true does not guarantee successful authoriization. A return of false indicates that it is known creating anAssessmentTakenwill 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: falseifAssessmentTakencreation is not authorized,trueotherwiseReturn type: boolean
Bank.can_create_assessment_taken_with_record_types(assessment_taken_record_types)¶Tests if this user can create a single
AssessmentTakenusing the desired record types. WhileAssessmentManager.getAssessmentTakenRecordTypes()can be used to examine which records are supported, this method tests which record(s) are required for creating a specificAssessmentTaken. Providing an empty array tests if anAssessmentTakencan be created with no records.
Parameters: assessment_taken_record_types ( osid.type.Type[]) – array of assessment taken record typesReturns: trueifAssessmentTakencreation using the specified recordTypesis supported,falseotherwiseReturn type: booleanRaise: NullArgument–assessment_taken_record_typesisnull
Bank.get_assessment_taken_form_for_create(assessment_offered_id, assessment_taken_record_types)¶Gets the assessment taken form for creating new assessments taken. A new form should be requested for each create transaction.
Parameters:
- assessment_offered_id (
osid.id.Id) – theIdof the relatedAssessmentOffered- assessment_taken_record_types (
osid.type.Type[]) – array of assessment taken record types to be included in the create operation or an empty list if noneReturns: the assessment taken form
Return type:
osid.assessment.AssessmentTakenFormRaise:
NotFound–assessment_offered_idis not foundRaise:
NullArgument–assessment_offered_idorassessment_taken_record_typesisnullRaise:
OperationFailed– unable to complete requestRaise:
PermissionDenied– authorization failure occurredRaise:
Unsupported– unable to get form for requested record types
Bank.create_assessment_taken(assessment_taken_form)¶Creates a new
AssessmentTaken.
Parameters: assessment_taken_form ( osid.assessment.AssessmentTakenForm) – the form for thisAssessmentTakenReturns: the new AssessmentTakenReturn type: osid.assessment.AssessmentTakenRaise: IllegalState–assessment_taken_formalready used in a create transactionRaise: InvalidArgument– one or more of the form elements is invalidRaise: NullArgument–assessment_taken_formisnullRaise: OperationFailed– unable to complete requestRaise: PermissionDenied– authorization failure occurredRaise: Unsupported–assessment_offered_formdid not originate fromget_assessment_taken_form_for_create()
Bank.can_update_assessments_taken()¶Tests if this user can update
AssessmentTakenobjects. A return of true does not guarantee successful authorization. A return of false indicates that it is known updating anAssessmentTakenwill 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: falseifAssessmentTakenmodification is not authorized,trueotherwiseReturn type: boolean
Bank.get_assessment_taken_form_for_update(assessment_taken_id)¶Gets the assessment taken form for updating an existing assessment taken. A new assessment taken form should be requested for each update transaction.
Parameters: assessment_taken_id ( osid.id.Id) – theIdof theAssessmentTakenReturns: the assessment taken form Return type: osid.assessment.AssessmentTakenFormRaise: NotFound–assessment_taken_idis not foundRaise: NullArgument–assessment_taken_idisnullRaise: OperationFailed– unable to complete requestRaise: PermissionDenied– authorization failure occurred
Bank.update_assessment_taken(assessment_taken_form)¶Updates an existing assessment taken.
Parameters: assessment_taken_form ( osid.assessment.AssessmentTakenForm) – the form containing the elements to be updatedRaise: IllegalState–assessment_taken_formalready used in an update transactionRaise: InvalidArgument– the form contains an invalid valueRaise: NullArgument–assessment_taken_formisnullRaise: OperationFailed– unable to complete requestRaise: PermissionDenied– authorization failure occurredRaise: Unsupported–assessment_offered_formdid not originate fromget_assessment_taken_form_for_update()
Bank.can_delete_assessments_taken()¶Tests if this user can delete
AssessmentsTaken. A return of true does not guarantee successful authorization. A return of false indicates that it is known deleting anAssessmentTakenwill result in aPermissionDenied. This is intended as a hint to an application that may opt not to offer a delete operations to unauthorized users.
Returns: falseifAssessmentTakendeletion is not authorized,trueotherwiseReturn type: boolean
Bank.delete_assessment_taken(assessment_taken_id)¶Deletes an
AssessmentTaken.
Parameters: assessment_taken_id ( osid.id.Id) – theIdof theAssessmentTakento removeRaise: NotFound–assessment_taken_idnot foundRaise: NullArgument–assessment_taken_idisnullRaise: OperationFailed– unable to complete requestRaise: PermissionDenied– authorization failure occurred
Bank.can_manage_assessment_taken_aliases()¶Tests if this user can manage
Idaliases forAssessmentsTaken. 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: falseifAssessmentTakenaliasing is not authorized,trueotherwiseReturn type: boolean
Bank.alias_assessment_taken(assessment_taken_id, alias_id)¶Adds an
Idto anAssessmentTakenfor the purpose of creating compatibility. The primaryIdof theAssessmentTakenis determined by the provider. The newIdis an alias to the primaryId. If the alias is a pointer to another assessment taken, it is reassigned to the given assessment takenId.
Parameters:
- assessment_taken_id (
osid.id.Id) – theIdof anAssessmentTaken- alias_id (
osid.id.Id) – the aliasIdRaise:
AlreadyExists–alias_idis in use as a primaryIdRaise:
NotFound–assessment_taken_idnot foundRaise:
NullArgument–assessment_taken_idoralias_idisnullRaise:
OperationFailed– unable to complete requestRaise:
PermissionDenied– authorization failure occurred
Objects¶
Question¶
-
class
dlkit.assessment.objects.Question¶ Bases:
dlkit.osid.objects.OsidObjectA
Questionrepresents the question portion of an assessment item.Like all OSID objects, a
Questionis identified by itsIdand any persisted references should use theId.-
get_question_record(question_record_type)¶ Gets the item record corresponding to the given
QuestionrecordType.This method is used to retrieve an object implementing the requested record. The
question_record_typemay be theTypereturned inget_record_types()or any of its parents in aTypehierarchy wherehas_record_type(question_record_type)istrue.Parameters: question_record_type ( osid.type.Type) – the type of the record to retrieveReturns: the question record Return type: osid.assessment.records.QuestionRecordRaise: NullArgument–question_record_typeisnullRaise: OperationFailed– unable to complete requestRaise: Unsupported–has_record_type(question_record_type)isfalse
-
Question Form¶
-
class
dlkit.assessment.objects.QuestionForm¶ Bases:
dlkit.osid.objects.OsidObjectFormThis is the form for creating and updating
Questions.-
get_question_form_record(question_record_type)¶ Gets the
QuestionFormRecordcorresponding to the given question recordType.Parameters: question_record_type ( osid.type.Type) – the question record typeReturns: the question record Return type: osid.assessment.records.QuestionFormRecordRaise: NullArgument–question_record_typeisnullRaise: OperationFailed– unable to complete requestRaise: Unsupported–has_record_type(question_record_type)isfalse
-
Question List¶
-
class
dlkit.assessment.objects.QuestionList¶ Bases:
dlkit.osid.objects.OsidListLike all
OsidLists,QuestionListprovides a means for accessingQuestionelements sequentially either one at a time or many at a time.Examples: while (ql.hasNext()) { Question question = ql.getNextQuestion(); }
- or
- while (ql.hasNext()) {
- Question[] question = al.getNextQuestions(ql.available());
}
-
next_question¶ Gets the next
Questionin this list.Returns: the next Questionin this list. Thehas_next()method should be used to test that a nextQuestionis available before calling this method.Return type: osid.assessment.QuestionRaise: IllegalState– no more elements available in this listRaise: OperationFailed– unable to complete request
-
get_next_questions(n)¶ Gets the next set of
Questionelements in this list which must be less than or equal to the number returned fromavailable().Parameters: n ( cardinal) – the number ofQuestionelements requested which should be less than or equal toavailable()Returns: an array of Questionelements.The length of the array is less than or equal to the number specified.Return type: osid.assessment.QuestionRaise: IllegalState– no more elements available in this listRaise: OperationFailed– unable to complete request
Answer¶
-
class
dlkit.assessment.objects.Answer¶ Bases:
dlkit.osid.objects.OsidObjectAn
Answerrepresents the question portion of an assessment item.Like all OSID objects, an
Answeris identified by itsIdand any persisted references should use theId.-
get_answer_record(answer_record_type)¶ Gets the answer record corresponding to the given
AnswerrecordType.This method is used to retrieve an object implementing the requested records. The
answer_record_typemay be theTypereturned inget_record_types()or any of its parents in aTypehierarchy wherehas_record_type(answer_record_type)istrue.Parameters: answer_record_type ( osid.type.Type) – the type of the record to retrieveReturns: the answer record Return type: osid.assessment.records.AnswerRecordRaise: NullArgument–answer_record_typeisnullRaise: OperationFailed– unable to complete requestRaise: Unsupported–has_record_type(answer_record_type)isfalse
-
Answer Form¶
-
class
dlkit.assessment.objects.AnswerForm¶ Bases:
dlkit.osid.objects.OsidObjectFormThis is the form for creating and updating
Answers.-
get_answer_form_record(answer_record_type)¶ Gets the
AnswerFormRecordcorresponding to the given answer recordType.Parameters: answer_record_type ( osid.type.Type) – the answer record typeReturns: the answer record Return type: osid.assessment.records.AnswerFormRecordRaise: NullArgument–answer_record_typeisnullRaise: OperationFailed– unable to complete requestRaise: Unsupported–has_record_type(answer_record_type)isfalse
-
Answer List¶
-
class
dlkit.assessment.objects.AnswerList¶ Bases:
dlkit.osid.objects.OsidListLike all
OsidLists,AnswerListprovides a means for accessingAnswerelements sequentially either one at a time or many at a time.Examples: while (al.hasNext()) { Answer answer = al.getNextAnswer(); }
- or
- while (al.hasNext()) {
- Answer[] answer = al.getNextAnswers(al.available());
}
-
next_answer¶ Gets the next
Answerin this list.Returns: the next Answerin this list. Thehas_next()method should be used to test that a nextAnsweris available before calling this method.Return type: osid.assessment.AnswerRaise: IllegalState– no more elements available in this listRaise: OperationFailed– unable to complete request
-
get_next_answers(n)¶ Gets the next set of
Answerelements in this list which must be less than or equal to the number returned fromavailable().Parameters: n ( cardinal) – the number ofAnswerelements requested which should be less than or equal toavailable()Returns: an array of Answerelements.The length of the array is less than or equal to the number specified.Return type: osid.assessment.AnswerRaise: IllegalState– no more elements available in this listRaise: OperationFailed– unable to complete request
Item¶
-
class
dlkit.assessment.objects.Item¶ Bases:
dlkit.osid.objects.OsidObject,dlkit.osid.markers.AggregateableAn
Itemrepresents an individual assessment item such as a question.Like all OSID objects, a
Itemis identified by itsIdand any persisted references should use theId.An
Itemis composed of aQuestionand anAnswer.-
learning_objective_ids¶ Gets the
Idsof anyObjectivescorresponding to this item.Returns: the learning objective IdsReturn type: osid.id.IdList
-
learning_objectives¶ Gets the any
Objectivescorresponding to this item.Returns: the learning objectives Return type: osid.learning.ObjectiveListRaise: OperationFailed– unable to complete request
-
question_id¶ Gets the
Idof theQuestion.Returns: the question IdReturn type: osid.id.Id
-
question¶ Gets the question.
Returns: the question Return type: osid.assessment.QuestionRaise: OperationFailed– unable to complete request
-
answer_ids¶ Gets the
Idsof the answers.Questions may have more than one acceptable answer.
Returns: the answer IdsReturn type: osid.id.IdList
-
answers¶ Gets the answers.
Returns: the answers Return type: osid.assessment.AnswerListRaise: OperationFailed– unable to complete request
-
get_item_record(item_record_type)¶ Gets the item record corresponding to the given
ItemrecordType.This method is used to retrieve an object implementing the requested records. The
item_record_typemay be theTypereturned inget_record_types()or any of its parents in aTypehierarchy wherehas_record_type(item_record_type)istrue.Parameters: item_record_type ( osid.type.Type) – the type of the record to retrieveReturns: the item record Return type: osid.assessment.records.ItemRecordRaise: NullArgument–item_record_typeisnullRaise: OperationFailed– unable to complete requestRaise: Unsupported–has_record_type(item_record_type)isfalse
-
Item Form¶
-
class
dlkit.assessment.objects.ItemForm¶ Bases:
dlkit.osid.objects.OsidObjectForm,dlkit.osid.objects.OsidAggregateableFormThis is the form for creating and updating
Items.Like all
OsidFormobjects, various data elements may be set here for use in the create and update methods in theItemAdminSession. For each data element that may be set, metadata may be examined to provide display hints or data constraints.-
learning_objectives_metadata¶ Gets the metadata for learning objectives.
Returns: metadata for the learning objectives Return type: osid.Metadata
-
learning_objectives¶ Sets the learning objectives.
Parameters: objective_ids ( osid.id.Id[]) – the learning objectiveIdsRaise: InvalidArgument–objective_idsis invalidRaise: NoAccess–Metadata.isReadOnly()istrue
-
get_item_form_record(item_record_type)¶ Gets the
ItemnFormRecordcorresponding to the given item recordType.Parameters: item_record_type ( osid.type.Type) – the item record typeReturns: the item record Return type: osid.assessment.records.ItemFormRecordRaise: NullArgument–item_record_typeisnullRaise: OperationFailed– unable to complete requestRaise: Unsupported–has_record_type(item_record_type)isfalse
-
Item List¶
-
class
dlkit.assessment.objects.ItemList¶ Bases:
dlkit.osid.objects.OsidListLike all
OsidLists,ItemListprovides a means for accessingItemelements sequentially either one at a time or many at a time.Examples: while (il.hasNext()) { Item item = il.getNextItem(); }
- or
- while (il.hasNext()) {
- Item[] items = il.getNextItems(il.available());
}
-
next_item¶ Gets the next
Itemin this list.Returns: the next Itemin this list. Thehas_next()method should be used to test that a nextItemis available before calling this method.Return type: osid.assessment.ItemRaise: IllegalState– no more elements available in this listRaise: OperationFailed– unable to complete request
-
get_next_items(n)¶ Gets the next set of
Itemelements in this list which must be less than or equal to the number returned fromavailable().Parameters: n ( cardinal) – the number ofItemelements requested which should be less than or equal toavailable()Returns: an array of Itemelements.The length of the array is less than or equal to the number specified.Return type: osid.assessment.ItemRaise: IllegalState– no more elements available in this listRaise: OperationFailed– unable to complete request
Assessment¶
-
class
dlkit.assessment.objects.Assessment¶ Bases:
dlkit.osid.objects.OsidObjectAn
Assessmentrepresents a sequence of assessment items.Like all OSID objects, an
Assessmentis identified by itsIdand any persisted references should use theId.An
Assessmentmay have an accompanying rubric used for assessing performance. The rubric assessment is established canonically in thisAssessment.-
level_id¶ Gets the
Idof aGradecorresponding to the assessment difficulty.Returns: a grade IdReturn type: osid.id.Id
-
level¶ Gets the
Gradecorresponding to the assessment difficulty.Returns: the level Return type: osid.grading.GradeRaise: OperationFailed– unable to complete request
-
has_rubric()¶ Tests if a rubric assessment is associated with this assessment.
Returns: trueif a rubric is available,falseotherwiseReturn type: boolean
-
rubric_id¶ Gets the
Idof the rubric.Returns: an assessment IdReturn type: osid.id.IdRaise: IllegalState–has_rubric()isfalse
-
rubric¶ Gets the rubric.
Returns: the assessment Return type: osid.assessment.AssessmentRaise: IllegalState–has_rubric()isfalseRaise: OperationFailed– unable to complete request
-
get_assessment_record(assessment_record_type)¶ Gets the assessment record corresponding to the given
AssessmentrecordType.This method is used to retrieve an object implementing the requested record. The
assessment_record_typemay be theTypereturned inget_record_types()or any of its parents in aTypehierarchy wherehas_record_type(assessment_record_type)istrue.Parameters: assessment_record_type ( osid.type.Type) – the type of the record to retrieveReturns: the assessment record Return type: osid.assessment.records.AssessmentRecordRaise: NullArgument–assessment_record_typeisnullRaise: OperationFailed– unable to complete requestRaise: Unsupported–has_record_type(assessment_record_type)isfalse
-
Assessment Form¶
-
class
dlkit.assessment.objects.AssessmentForm¶ Bases:
dlkit.osid.objects.OsidObjectFormThis is the form for creating and updating
Assessments.Like all
OsidFormobjects, various data elements may be set here for use in the create and update methods in theAssessmentAdminSession. For each data element that may be set, metadata may be examined to provide display hints or data constraints.-
level_metadata¶ Gets the metadata for a grade level.
Returns: metadata for the grade level Return type: osid.Metadata
-
level¶ Sets the level of difficulty expressed as a
Grade.Parameters: grade_id ( osid.id.Id) – the grade levelRaise: InvalidArgument–grade_idis invalidRaise: NoAccess–Metadata.isReadOnly()istrueRaise: NullArgument–grade_idisnull
-
rubric_metadata¶ Gets the metadata for a rubric assessment.
Returns: metadata for the assesment Return type: osid.Metadata
-
rubric¶ Sets the rubric expressed as another assessment.
Parameters: assessment_id ( osid.id.Id) – the assessmentIdRaise: InvalidArgument–assessment_idis invalidRaise: NoAccess–Metadata.isReadOnly()istrueRaise: NullArgument–assessment_idisnull
-
get_assessment_form_record(assessment_record_type)¶ Gets the
AssessmentFormRecordcorresponding to the given assessment recordType.Parameters: assessment_record_type ( osid.type.Type) – the assessment record typeReturns: the assessment record Return type: osid.assessment.records.AssessmentFormRecordRaise: NullArgument–assessment_record_typeisnullRaise: OperationFailed– unable to complete requestRaise: Unsupported–has_record_type(assessment_record_type)isfalse
-
Assessment List¶
-
class
dlkit.assessment.objects.AssessmentList¶ Bases:
dlkit.osid.objects.OsidListLike all
OsidLists,AssessmentListprovides a means for accessingAssessmentelements sequentially either one at a time or many at a time.Examples: while (al.hasNext()) { Assessment assessment = al.getNextAssessment(); }
- or
- while (al.hasNext()) {
- Assessment[] assessments = al.hetNextAssessments(al.available());
}
-
next_assessment¶ Gets the next
Assessmentin this list.Returns: the next Assessmentin this list. Thehas_next()method should be used to test that a nextAssessmentis available before calling this method.Return type: osid.assessment.AssessmentRaise: IllegalState– no more elements available in this listRaise: OperationFailed– unable to complete request
-
get_next_assessments(n)¶ Gets the next set of
Assessmentelements in this list which must be less than or equal to the number returned fromavailable().Parameters: n ( cardinal) – the number ofAssessmentelements requested which should be less than or equal toavailable()Returns: an array of Assessmentelements.The length of the array is less than or equal to the number specified.Return type: osid.assessment.AssessmentRaise: IllegalState– no more elements available in this listRaise: OperationFailed– unable to complete request
Assessment Offered¶
-
class
dlkit.assessment.objects.AssessmentOffered¶ Bases:
dlkit.osid.objects.OsidObject,dlkit.osid.markers.SubjugateableAn
AssessmentOfferedrepresents a sequence of assessment items.Like all OSID objects, an
AssessmentOfferedis identified by itsIdand any persisted references should use theId.-
assessment_id¶ Gets the assessment
Idcorresponding to this assessment offering.Returns: the assessment id Return type: osid.id.Id
-
assessment¶ Gets the assessment corresponding to this assessment offereng.
Returns: the assessment Return type: osid.assessment.AssessmentRaise: OperationFailed– unable to complete request
-
level_id¶ Gets the
Idof aGradecorresponding to the assessment difficulty.Returns: a grade id Return type: osid.id.Id
-
level¶ Gets the
Gradecorresponding to the assessment difficulty.Returns: the level Return type: osid.grading.GradeRaise: OperationFailed– unable to complete request
-
are_items_sequential()¶ Tests if the items or parts in this assessment are taken sequentially.
Returns: trueif the items are taken sequentially,falseif the items can be skipped and revisitedReturn type: boolean
-
are_items_shuffled()¶ Tests if the items or parts appear in a random order.
Returns: trueif the items appear in a random order,falseotherwiseReturn type: boolean
-
has_start_time()¶ Tests if there is a fixed start time for this assessment.
Returns: trueif there is a fixed start time,falseotherwiseReturn type: boolean
-
start_time¶ Gets the start time for this assessment.
Returns: the designated start time Return type: osid.calendaring.DateTimeRaise: IllegalState–has_start_time()isfalse
-
has_deadline()¶ Tests if there is a fixed end time for this assessment.
Returns: trueif there is a fixed end time,falseotherwiseReturn type: boolean
-
deadline¶ Gets the end time for this assessment.
Returns: the designated end time Return type: osid.calendaring.DateTimeRaise: IllegalState–has_deadline()isfalse
-
has_duration()¶ Tests if there is a fixed duration for this assessment.
Returns: trueif there is a fixed duration,falseotherwiseReturn type: boolean
-
duration¶ Gets the duration for this assessment.
Returns: the duration Return type: osid.calendaring.DurationRaise: IllegalState–has_duration()isfalse
-
is_scored()¶ Tests if this assessment will be scored.
Returns: trueif this assessment will be scoredfalseotherwiseReturn type: boolean
-
score_system_id¶ Gets the grade system
Idfor the score.Returns: the grade system IdReturn type: osid.id.IdRaise: IllegalState–is_scored()isfalse
-
score_system¶ Gets the grade system for the score.
Returns: the grade system Return type: osid.grading.GradeSystemRaise: IllegalState–is_scored()isfalseRaise: OperationFailed– unable to complete request
-
is_graded()¶ Tests if this assessment will be graded.
Returns: trueif this assessment will be graded,falseotherwiseReturn type: boolean
-
grade_system_id¶ Gets the grade system
Idfor the grade.Returns: the grade system IdReturn type: osid.id.IdRaise: IllegalState–is_graded()isfalse
-
grade_system¶ Gets the grade system for the grade.
Returns: the grade system Return type: osid.grading.GradeSystemRaise: IllegalState–is_graded()isfalseRaise: OperationFailed– unable to complete request
-
has_rubric()¶ Tests if a rubric assessment is associated with this assessment.
Returns: trueif a rubric is available,falseotherwiseReturn type: boolean
-
rubric_id¶ Gets the
Idof the rubric.Returns: an assessment offered IdReturn type: osid.id.IdRaise: IllegalState–has_rubric()isfalse
-
rubric¶ Gets the rubric.
Returns: the assessment offered Return type: osid.assessment.AssessmentOfferedRaise: IllegalState–has_rubric()isfalseRaise: OperationFailed– unable to complete request
-
get_assessment_offered_record(assessment_taken_record_type)¶ Gets the assessment offered record corresponding to the given
AssessmentOfferedrecordType.This method is used to retrieve an object implementing the requested record. The
assessment_offered_record_typemay be theTypereturned inget_record_types()or any of its parents in aTypehierarchy wherehas_record_type(assessment_offered_record_type)istrue.Parameters: assessment_taken_record_type ( osid.type.Type) – an assessment offered record typeReturns: the assessment offered record Return type: osid.assessment.records.AssessmentOfferedRecordRaise: NullArgument–assessment_offered_record_typeisnullRaise: OperationFailed– unable to complete requestRaise: Unsupported–has_record_type(assessment_offered_record_type)isfalse
-
Assessment Offered Form¶
-
class
dlkit.assessment.objects.AssessmentOfferedForm¶ Bases:
dlkit.osid.objects.OsidObjectForm,dlkit.osid.objects.OsidSubjugateableFormThis is the form for creating and updating an
AssessmentOffered.Like all
OsidFormobjects, various data elements may be set here for use in the create and update methods in theAssessmentOfferedAdminSession. For each data element that may be set, metadata may be examined to provide display hints or data constraints.-
level_metadata¶ Gets the metadata for a grade level.
Returns: metadata for the grade level Return type: osid.Metadata
-
level¶ Sets the level of difficulty expressed as a
Grade.Parameters: grade_id ( osid.id.Id) – the grade levelRaise: InvalidArgument–grade_idis invalidRaise: NoAccess–Metadata.isReadOnly()istrue
-
items_sequential_metadata¶ Gets the metadata for sequential operation.
Returns: metadata for the sequential flag Return type: osid.Metadata
-
items_sequential¶ Sets the items sequential flag.
Parameters: sequential ( boolean) –trueif the items are taken sequentially,falseif the items can be skipped and revisitedRaise: InvalidArgument–sequentialis invalidRaise: NoAccess–Metadata.isReadOnly()istrue
-
items_shuffled_metadata¶ Gets the metadata for shuffling items.
Returns: metadata for the shuffled flag Return type: osid.Metadata
-
items_shuffled¶ Sets the shuffle flag.
The shuffle flag may be overidden by other assessment sequencing rules.
Parameters: shuffle ( boolean) –trueif the items are shuffled,falseif the items appear in the designated orderRaise: InvalidArgument–shuffleis invalidRaise: NoAccess–Metadata.isReadOnly()istrue
-
start_time_metadata¶ Gets the metadata for the assessment start time.
Returns: metadata for the start time Return type: osid.Metadata
-
start_time¶ Sets the assessment start time.
Parameters: start ( osid.calendaring.DateTime) – assessment start timeRaise: InvalidArgument–startis invalidRaise: NoAccess–Metadata.isReadOnly()istrue
-
deadline_metadata¶ Gets the metadata for the assessment deadline.
Returns: metadata for the end time Return type: osid.Metadata
-
deadline¶ Sets the assessment end time.
Parameters: end ( timestamp) – assessment end timeRaise: InvalidArgument–endis invalidRaise: NoAccess–Metadata.isReadOnly()istrue
-
duration_metadata¶ Gets the metadata for the assessment duration.
Returns: metadata for the duration Return type: osid.Metadata
-
duration¶ Sets the assessment duration.
Parameters: duration ( osid.calendaring.Duration) – assessment durationRaise: InvalidArgument–durationis invalidRaise: NoAccess–Metadata.isReadOnly()istrue
-
score_system_metadata¶ Gets the metadata for a score system.
Returns: metadata for the grade system Return type: osid.Metadata
-
score_system¶ Sets the scoring system.
Parameters: grade_system_id ( osid.id.Id) – the grade systemRaise: InvalidArgument–grade_system_idis invalidRaise: NoAccess–Metadata.isReadOnly()istrue
-
grade_system_metadata¶ Gets the metadata for a grading system.
Returns: metadata for the grade system Return type: osid.Metadata
-
grade_system¶ Sets the grading system.
Parameters: grade_system_id ( osid.id.Id) – the grade systemRaise: InvalidArgument–grade_system_idis invalidRaise: NoAccess–Metadata.isReadOnly()istrue
-
get_assessment_offered_form_record(assessment_offered_record_type)¶ Gets the
AssessmentOfferedFormRecordcorresponding to the given assessment recordType.Parameters: assessment_offered_record_type ( osid.type.Type) – the assessment offered record typeReturns: the assessment offered record Return type: osid.assessment.records.AssessmentOfferedFormRecordRaise: NullArgument–assessment_offered_record_typeisnullRaise: OperationFailed– unable to complete requestRaise: Unsupported–has_record_type(assessment_offered_record_type)isfalse
-
Assessment Offered List¶
-
class
dlkit.assessment.objects.AssessmentOfferedList¶ Bases:
dlkit.osid.objects.OsidListLike all
OsidLists,AssessmentOfferedListprovides a means for accessingAssessmentTakenelements sequentially either one at a time or many at a time.Examples: while (aol.hasNext()) { AssessmentOffered assessment = aol.getNextAssessmentOffered();
- or
- while (aol.hasNext()) {
- AssessmentOffered[] assessments = aol.hetNextAssessmentsOffered(aol.available());
}
-
next_assessment_offered¶ Gets the next
AssessmentOfferedin this list.Returns: the next AssessmentOfferedin this list. Thehas_next()method should be used to test that a nextAssessmentOfferedis available before calling this method.Return type: osid.assessment.AssessmentOfferedRaise: IllegalState– no more elements available in this listRaise: OperationFailed– unable to complete request
-
get_next_assessments_offered(n)¶ Gets the next set of
AssessmentOfferedelements in this list which must be less than or equal to the number returned fromavailable().Parameters: n ( cardinal) – the number ofAssessmentOfferedelements requested which should be less than or equal toavailable()Returns: an array of AssessmentOfferedelements.The length of the array is less than or equal to the number specified.Return type: osid.assessment.AssessmentOfferedRaise: IllegalState– no more elements available in this listRaise: OperationFailed– unable to complete request
Assessment Taken¶
-
class
dlkit.assessment.objects.AssessmentTaken¶ Bases:
dlkit.osid.objects.OsidObjectRepresents a taken assessment or an assessment in progress.
-
assessment_offered_id¶ Gets the
Idof theAssessmentOffered.Returns: the assessment offered IdReturn type: osid.id.Id
-
assessment_offered¶ Gets the
AssessmentOffered.Returns: the assessment offered Return type: osid.assessment.AssessmentOfferedRaise: OperationFailed– unable to complete request
-
taker_id¶ Gets the
Idof the resource who took or is taking this assessment.Returns: the resource IdReturn type: osid.id.Id
-
taker¶ Gets the
Resourcetaking this assessment.Returns: the resource Return type: osid.resource.ResourceRaise: OperationFailed– unable to complete request
-
taking_agent_id¶ Gets the
Idof theAgentwho took or is taking the assessment.Returns: the agent IdReturn type: osid.id.Id
-
taking_agent¶ Gets the
Agent.Returns: the agent Return type: osid.authentication.AgentRaise: OperationFailed– unable to complete request
-
has_started()¶ Tests if this assessment has begun.
Returns: trueif the assessment has begun,falseotherwiseReturn type: boolean
-
actual_start_time¶ Gets the time this assessment was started.
Returns: the start time Return type: osid.calendaring.DateTimeRaise: IllegalState–has_started()isfalse
-
has_ended()¶ Tests if this assessment has ended.
Returns: trueif the assessment has ended,falseotherwiseReturn type: boolean
-
completion_time¶ Gets the time of this assessment was completed.
Returns: the end time Return type: osid.calendaring.DateTimeRaise: IllegalState–has_ended()isfalse
-
time_spent¶ Gets the total time spent taking this assessment.
Returns: the total time spent Return type: osid.calendaring.Duration
-
completion¶ Gets a completion percentage of the assessment.
Returns: the percent complete (0-100) Return type: cardinal
-
is_scored()¶ Tests if a score is available for this assessment.
Returns: trueif a score is available,falseotherwiseReturn type: boolean
-
score_system_id¶ Gets a score system
Idfor the assessment.Returns: the grade system Return type: osid.id.IdRaise: IllegalState–is_score()isfalse
-
score_system¶ Gets a grade system for the score.
Returns: the grade system Return type: osid.grading.GradeSystemRaise: IllegalState–is_scored()isfalseRaise: OperationFailed– unable to complete request
-
score¶ Gets a score for the assessment.
Returns: the score Return type: decimalRaise: IllegalState–is_scored()isfalse
-
is_graded()¶ Tests if a grade is available for this assessment.
Returns: trueif a grade is available,falseotherwiseReturn type: boolean
-
grade_id¶ Gets a grade
Idfor the assessment.Returns: the grade Return type: osid.id.IdRaise: IllegalState–is_graded()isfalse
-
grade¶ Gets a grade for the assessment.
Returns: the grade Return type: osid.grading.GradeRaise: IllegalState–is_graded()isfalseRaise: OperationFailed– unable to complete request
-
feedback¶ Gets any overall comments available for this assessment by the grader.
Returns: comments Return type: osid.locale.DisplayText
-
has_rubric()¶ Tests if a rubric assessment is associated with this assessment.
Returns: trueif a rubric is available,falseotherwiseReturn type: boolean
-
rubric_id¶ Gets the
Idof the rubric.Returns: an assessment taken IdReturn type: osid.id.IdRaise: IllegalState–has_rubric()isfalse
-
rubric¶ Gets the rubric.
Returns: the assessment taken Return type: osid.assessment.AssessmentTakenRaise: IllegalState–has_rubric()isfalseRaise: OperationFailed– unable to complete request
-
get_assessment_taken_record(assessment_taken_record_type)¶ Gets the assessment taken record corresponding to the given
AssessmentTakenrecordType.This method is used to retrieve an object implementing the requested record. The
assessment_taken_record_typemay be theTypereturned inget_record_types()or any of its parents in aTypehierarchy wherehas_record_type(assessment_taken_record_type)istrue.Parameters: assessment_taken_record_type ( osid.type.Type) – an assessment taken record typeReturns: the assessment taken record Return type: osid.assessment.records.AssessmentTakenRecordRaise: NullArgument–assessment_taken_record_typeisnullRaise: OperationFailed– unable to complete requestRaise: Unsupported–has_record_type(assessment_taken_record_type)isfalse
-
Assessment Taken Form¶
-
class
dlkit.assessment.objects.AssessmentTakenForm¶ Bases:
dlkit.osid.objects.OsidObjectFormThis is the form for creating and updating an
AssessmentTaken.Like all
OsidFormobjects, various data elements may be set here for use in the create and update methods in theAssessmentTakenAdminSession. For each data element that may be set, metadata may be examined to provide display hints or data constraints.-
taker_metadata¶ Gets the metadata for a resource to manually set which resource will be taking the assessment.
Returns: metadata for the resource Return type: osid.Metadata
-
taker¶ Sets the resource who will be taking this assessment.
Parameters: resource_id ( osid.id.Id) – the resource IdRaise: InvalidArgument–resource_idis invalidRaise: NoAccess–Metadata.isReadOnly()istrue
-
get_assessment_taken_form_record(assessment_taken_record_type)¶ Gets the
AssessmentTakenFormRecordcorresponding to the given assessment taken recordType.Parameters: assessment_taken_record_type ( osid.type.Type) – the assessment taken record typeReturns: the assessment taken record Return type: osid.assessment.records.AssessmentTakenFormRecordRaise: NullArgument–assessment_taken_record_typeisnullRaise: OperationFailed– unable to complete requestRaise: Unsupported–has_record_type(assessment_taken_record_type)isfalse
-
Assessment Taken List¶
-
class
dlkit.assessment.objects.AssessmentTakenList¶ Bases:
dlkit.osid.objects.OsidListLike all
OsidLists,AssessmentTakenListprovides a means for accessingAssessmentTakenelements sequentially either one at a time or many at a time.Examples: while (atl.hasNext()) { AssessmentTaken assessment = atl.getNextAssessmentTaken();
- or
- while (atl.hasNext()) {
- AssessmentTaken[] assessments = atl.hetNextAssessmentsTaken(atl.available());
}
-
next_assessment_taken¶ Gets the next
AssessmentTakenin this list.Returns: the next AssessmentTakenin this list. Thehas_next()method should be used to test that a nextAssessmentTakenis available before calling this method.Return type: osid.assessment.AssessmentTakenRaise: IllegalState– no more elements available in this listRaise: OperationFailed– unable to complete request
-
get_next_assessments_taken(n)¶ Gets the next set of
AssessmentTakenelements in this list which must be less than or equal to the number returned fromavailable().Parameters: n ( cardinal) – the number ofAssessmentTakenelements requested which should be less than or equal toavailable()Returns: an array of AssessmentTakenelements.The length of the array is less than or equal to the number specified.Return type: osid.assessment.AssessmentTakenRaise: IllegalState– no more elements available in this listRaise: OperationFailed– unable to complete request
Assessment Section¶
-
class
dlkit.assessment.objects.AssessmentSection¶ Bases:
dlkit.osid.objects.OsidObjectRepresents an assessment section.
An assessment section represents a cluster of questions used to organize the execution of an assessment. The section is the student aspect of an assessment part.
-
assessment_taken_id¶ Gets the
Idof theAssessmentTaken.Returns: the assessment taken IdReturn type: osid.id.Id
-
assessment_taken¶ Gets the
AssessmentTakeb.Returns: the assessment taken Return type: osid.assessment.AssessmentTakenRaise: OperationFailed– unable to complete request
-
has_allocated_time()¶ Tests if this section must be completed within an allocated time.
Returns: trueif this section has an allocated time,falseotherwiseReturn type: boolean
-
allocated_time¶ Gets the allocated time for this section.
Returns: allocated time Return type: osid.calendaring.DurationRaise: IllegalState–has_allocated_time()isfalse
-
are_items_sequential()¶ Tests if the items or parts in this section are taken sequentially.
Returns: trueif the items are taken sequentially,falseif the items can be skipped and revisitedReturn type: boolean
-
are_items_shuffled()¶ Tests if the items or parts appear in a random order.
Returns: trueif the items appear in a random order,falseotherwiseReturn type: boolean
-
get_assessment_section_record(assessment_section_record_type)¶ Gets the assessment section record corresponding to the given
AssessmentSectionrecordType.This method is used to retrieve an object implementing the requested record. The
assessment_section_record_typemay be theTypereturned inget_record_types()or any of its parents in aTypehierarchy wherehas_record_type(assessment_section_record_type)istrue.Parameters: assessment_section_record_type ( osid.type.Type) – an assessment section record typeReturns: the assessment section record Return type: osid.assessment.records.AssessmentSectionRecordRaise: NullArgument–assessment_section_record_typeisnullRaise: OperationFailed– unable to complete requestRaise: Unsupported–has_record_type(assessment_section_record_type)isfalse
-
Assessment Section List¶
-
class
dlkit.assessment.objects.AssessmentSectionList¶ Bases:
dlkit.osid.objects.OsidListLike all
OsidLists,AssessmentSectionListprovides a means for accessingAssessmentSectionelements sequentially either one at a time or many at a time.Examples: while (asl.hasNext()) { AssessmentSection section = asl.getNextAssessmentSection();
- or
- while (asl.hasNext()) {
- AssessmentSection[] sections = asl.hetNextAssessmentSections(asl.available());
}
-
next_assessment_section¶ Gets the next
AssessmentSectionin this list.Returns: the next AssessmentSectionin this list. Thehas_next()method should be used to test that a nextAssessmentSectionis available before calling this method.Return type: osid.assessment.AssessmentSectionRaise: IllegalState– no more elements available in this listRaise: OperationFailed– unable to complete request
-
get_next_assessment_sections(n)¶ Gets the next set of
AssessmentSectionelements in this list which must be less than or equal to the number returned fromavailable().Parameters: n ( cardinal) – the number ofAssessmentSectionelements requested which should be less than or equal toavailable()Returns: an array of AssessmentSectionelements.The length of the array is less than or equal to the number specified.Return type: osid.assessment.AssessmentSectionRaise: IllegalState– no more elements available in this listRaise: OperationFailed– unable to complete request
Bank Form¶
-
class
dlkit.assessment.objects.BankForm¶ Bases:
dlkit.osid.objects.OsidCatalogFormThis is the form for creating and updating banks.
Like all
OsidFormobjects, various data elements may be set here for use in the create and update methods in theBankAdminSession. For each data element that may be set, metadata may be examined to provide display hints or data constraints.-
get_bank_form_record(bank_record_type)¶ Gets the
BankFormRecordcorresponding to the given bank recordType.Parameters: bank_record_type ( osid.type.Type) – a bank record typeReturns: the bank record Return type: osid.assessment.records.BankFormRecordRaise: NullArgument–bank_record_typeisnullRaise: OperationFailed– unable to complete requestRaise: Unsupported–has_record_type(bank_record_type)isfalse
-
Bank List¶
-
class
dlkit.assessment.objects.BankList¶ Bases:
dlkit.osid.objects.OsidListLike all
OsidLists,BankListprovides a means for accessingBankelements sequentially either one at a time or many at a time.Examples: while (bl.hasNext()) { Bank bank = bl.getNextBank(); }
- or
- while (bl.hasNext()) {
- Bank[] banks = bl.getNextBanks(bl.available());
}
-
next_bank¶ Gets the next
Bankin this list.Returns: the next Bankin this list. Thehas_next()method should be used to test that a nextBankis available before calling this method.Return type: osid.assessment.BankRaise: IllegalState– no more elements available in this listRaise: OperationFailed– unable to complete request
-
get_next_banks(n)¶ Gets the next set of
Bankelements in this list which must be less than or equal to the return fromavailable().Parameters: n ( cardinal) – the number ofBankelements requested which must be less than or equal toavailable()Returns: an array of Bankelements.The length of the array is less than or equal to the number specified.Return type: osid.assessment.BankRaise: IllegalState– no more elements available in this listRaise: OperationFailed– unable to complete request
Response List¶
-
class
dlkit.assessment.objects.ResponseList¶ Bases:
dlkit.osid.objects.OsidListLike all
OsidLists,ResponseListprovides a means for accessingResponseelements sequentially either one at a time or many at a time.Examples: while (rl.hasNext()) { Response response = rl.getNextResponse(); }
- or
- while (rl.hasNext()) {
- Response[] responses = rl.getNextResponses(rl.available());
}
-
next_response¶ Gets the next
Responsein this list.Returns: the next Responsein this list. Thehas_next()method should be used to test that a nextResponseis available before calling this method.Return type: osid.assessment.ResponseRaise: IllegalState– no more elements available in this listRaise: OperationFailed– unable to complete request
-
get_next_responses(n)¶ Gets the next set of
Responseelements in this list which must be less than or equal to the return fromavailable().Parameters: n ( cardinal) – the number ofResponseelements requested which must be less than or equal toavailable()Returns: an array of Responseelements.The length of the array is less than or equal to the number specified.Return type: osid.assessment.ResponseRaise: IllegalState– no more elements available in this listRaise: OperationFailed– unable to complete request
Queries¶
Question Query¶
-
class
dlkit.assessment.queries.QuestionQuery¶ Bases:
dlkit.osid.queries.OsidObjectQueryThis is the query for searching questions.
Each method match request produces an
ANDterm while multiple invocations of a method produces a nestedOR.-
get_question_query_record(question_record_type)¶ Gets the question record query corresponding to the given
ItemrecordType.Multiple retrievals produce a nested
ORterm.Parameters: question_record_type ( osid.type.Type) – a question record typeReturns: the question query record Return type: osid.assessment.records.QuestionQueryRecordRaise: NullArgument–question_record_typeisnullRaise: OperationFailed– unable to complete requestRaise: Unsupported–has_record_type(question_record_type)isfalse
-
Answer Query¶
-
class
dlkit.assessment.queries.AnswerQuery¶ Bases:
dlkit.osid.queries.OsidObjectQueryThis is the query for searching answers.
Each method match request produces an
ANDterm while multiple invocations of a method produces a nestedOR.-
get_answer_query_record(answer_record_type)¶ Gets the answer record query corresponding to the given
AnswerrecordType.Multiple retrievals produce a nested
ORterm.Parameters: answer_record_type ( osid.type.Type) – an answer record typeReturns: the answer query record Return type: osid.assessment.records.AnswerQueryRecordRaise: NullArgument–answer_record_typeisnullRaise: OperationFailed– unable to complete requestRaise: Unsupported–has_record_type(answer_record_type)isfalse
-
Item Query¶
-
class
dlkit.assessment.queries.ItemQuery¶ Bases:
dlkit.osid.queries.OsidObjectQuery,dlkit.osid.queries.OsidAggregateableQueryThis is the query for searching items.
Each method match request produces an
ANDterm while multiple invocations of a method produces a nestedOR.-
match_learning_objective_id(objective_id, match)¶ Sets the learning objective
Idfor this query.Parameters: - objective_id (
osid.id.Id) – a learning objectiveId - match (
boolean) –truefor a positive match,falsefor negative match
Raise: NullArgument–objective_idisnull- objective_id (
-
learning_objective_id_terms¶
-
supports_learning_objective_query()¶ Tests if an
ObjectiveQueryis available.Returns: trueif a learning objective query is available,falseotherwiseReturn type: boolean
-
learning_objective_query¶ Gets the query for a learning objective.
Multiple retrievals produce a nested
ORterm.Returns: the learning objective query Return type: osid.learning.ObjectiveQueryRaise: Unimplemented–supports_learning_objective_query()isfalse
-
match_any_learning_objective(match)¶ Matches an item with any objective.
Parameters: match ( boolean) –trueto match items with any learning objective,falseto match items with no learning objectives
-
learning_objective_terms¶
-
match_question_id(question_id, match)¶ Sets the question
Idfor this query.Parameters: - question_id (
osid.id.Id) – a questionId - match (
boolean) –truefor a positive match,falsefor a negative match
Raise: NullArgument–question_idisnull- question_id (
-
question_id_terms¶
-
supports_question_query()¶ Tests if a
QuestionQueryis available.Returns: trueif a question query is available,falseotherwiseReturn type: boolean
-
question_query¶ Gets the query for a question.
Multiple retrievals produce a nested
ORterm.Returns: the question query Return type: osid.assessment.QuestionQueryRaise: Unimplemented–supports_question_query()isfalse
-
match_any_question(match)¶ Matches an item with any question.
Parameters: match ( boolean) –trueto match items with any question,falseto match items with no questions
-
question_terms¶
-
match_answer_id(answer_id, match)¶ Sets the answer
Idfor this query.Parameters: - answer_id (
osid.id.Id) – an answerId - match (
boolean) –truefor a positive match,falsefor a negative match
Raise: NullArgument–answer_idisnull- answer_id (
-
answer_id_terms¶
-
supports_answer_query()¶ Tests if an
AnswerQueryis available.Returns: trueif an answer query is available,falseotherwiseReturn type: boolean
-
answer_query¶ Gets the query for an answer.
Multiple retrievals produce a nested
ORterm.Returns: the answer query Return type: osid.assessment.AnswerQueryRaise: Unimplemented–supports_answer_query()isfalse
-
match_any_answer(match)¶ Matches an item with any answer.
Parameters: match ( boolean) –trueto match items with any answer,falseto match items with no answers
-
answer_terms¶
-
match_assessment_id(assessment_id, match)¶ Sets the assessment
Idfor this query.Parameters: - assessment_id (
osid.id.Id) – an assessmentId - match (
boolean) –truefor a positive match,falsefor negative match
Raise: NullArgument–assessment_idisnull- assessment_id (
-
assessment_id_terms¶
-
supports_assessment_query()¶ Tests if an
AssessmentQueryis available.Returns: trueif an assessment query is available,falseotherwiseReturn type: boolean
-
assessment_query¶ Gets the query for an assessment.
Multiple retrievals produce a nested
ORterm.Returns: the assessment query Return type: osid.assessment.AssessmentQueryRaise: Unimplemented–supports_assessment_query()isfalse
-
match_any_assessment(match)¶ Matches an item with any assessment.
Parameters: match ( boolean) –trueto match items with any assessment,falseto match items with no assessments
-
assessment_terms¶
-
match_bank_id(bank_id, match)¶ Sets the bank
Idfor this query.Parameters: - bank_id (
osid.id.Id) – a bankId - match (
boolean) –truefor a positive match,falsefor negative match
Raise: NullArgument–bank_idisnull- bank_id (
-
bank_id_terms¶
-
supports_bank_query()¶ Tests if a
BankQueryis available.Returns: trueif a bank query is available,falseotherwiseReturn type: boolean
-
bank_query¶ Gets the query for a bank.
Multiple retrievals produce a nested
ORterm.Returns: the bank query Return type: osid.assessment.BankQueryRaise: Unimplemented–supports_bank_query()isfalse
-
bank_terms¶
-
get_item_query_record(item_record_type)¶ Gets the item record query corresponding to the given
ItemrecordType.Multiple retrievals produce a nested
ORterm.Parameters: item_record_type ( osid.type.Type) – an item record typeReturns: the item query record Return type: osid.assessment.records.ItemQueryRecordRaise: NullArgument–item_record_typeisnullRaise: OperationFailed– unable to complete requestRaise: Unsupported–has_record_type(item_record_type)isfalse
-
Assessment Query¶
-
class
dlkit.assessment.queries.AssessmentQuery¶ Bases:
dlkit.osid.queries.OsidObjectQueryThis is the query for searching assessments.
Each method match request produces an
ANDterm while multiple invocations of a method produces a nestedOR.-
match_level_id(grade_id, match)¶ Sets the level grade
Idfor this query.Parameters: - grade_id (
osid.id.Id) – a gradeId - match (
boolean) –truefor a positive match,falsefor a negative match
Raise: NullArgument–grade_idisnull- grade_id (
-
level_id_terms¶
-
supports_level_query()¶ Tests if a
GradeQueryis available.Returns: trueif a grade query is available,falseotherwiseReturn type: boolean
-
level_query¶ Gets the query for a grade.
Multiple retrievals produce a nested
ORterm.Returns: the grade query Return type: osid.grading.GradeQueryRaise: Unimplemented–supports_level_query()isfalse
-
match_any_level(match)¶ Matches an assessment that has any level assigned.
Parameters: match ( boolean) –trueto match assessments with any level,falseto match assessments with no level
-
level_terms¶
-
match_rubric_id(assessment_id, match)¶ Sets the rubric assessment
Idfor this query.Parameters: - assessment_id (
osid.id.Id) – an assessmentId - match (
boolean) –truefor a positive match,falsefor a negative match
Raise: NullArgument–assessment_idisnull- assessment_id (
-
rubric_id_terms¶
-
supports_rubric_query()¶ Tests if an
AssessmentQueryis available.Returns: trueif a rubric assessment query is available,falseotherwiseReturn type: boolean
-
rubric_query¶ Gets the query for a rubric assessment.
Multiple retrievals produce a nested
ORterm.Returns: the assessment query Return type: osid.assessment.AssessmentQueryRaise: Unimplemented–supports_rubric_query()isfalse
-
match_any_rubric(match)¶ Matches an assessment that has any rubric assessment assigned.
Parameters: match ( boolean) –trueto match assessments with any rubric,falseto match assessments with no rubric
-
rubric_terms¶
-
match_item_id(item_id, match)¶ Sets the item
Idfor this query.Parameters: - item_id (
osid.id.Id) – an itemId - match (
boolean) –truefor a positive match,falsefor a negative match
Raise: NullArgument–item_idisnull- item_id (
-
item_id_terms¶
-
supports_item_query()¶ Tests if an
ItemQueryis available.Returns: trueif an item query is available,falseotherwiseReturn type: boolean
-
item_query¶ Gets the query for an item.
Multiple retrievals produce a nested
ORterm.Returns: the item query Return type: osid.assessment.ItemQueryRaise: Unimplemented–supports_item_query()isfalse
-
match_any_item(match)¶ Matches an assessment that has any item.
Parameters: match ( boolean) –trueto match assessments with any item,falseto match assessments with no items
-
item_terms¶
-
match_assessment_offered_id(assessment_offered_id, match)¶ Sets the assessment offered
Idfor this query.Parameters: - assessment_offered_id (
osid.id.Id) – an assessment offeredId - match (
boolean) –truefor a positive match,falsefor a negative match
Raise: NullArgument–assessment_offered_idisnull- assessment_offered_id (
-
assessment_offered_id_terms¶
-
supports_assessment_offered_query()¶ Tests if an
AssessmentOfferedQueryis available.Returns: trueif an assessment offered query is available,falseotherwiseReturn type: boolean
-
assessment_offered_query¶ Gets the query for an assessment offered.
Multiple retrievals produce a nested
ORterm.Returns: the assessment offered query Return type: osid.assessment.AssessmentOfferedQueryRaise: Unimplemented–supports_assessment_offered_query()isfalse
-
match_any_assessment_offered(match)¶ Matches an assessment that has any offering.
Parameters: match ( boolean) –trueto match assessments with any offering,falseto match assessments with no offerings
-
assessment_offered_terms¶
-
match_assessment_taken_id(assessment_taken_id, match)¶ Sets the assessment taken
Idfor this query.Parameters: - assessment_taken_id (
osid.id.Id) – an assessment takenId - match (
boolean) –truefor a positive match,falsefor a negative match
Raise: NullArgument–assessment_taken_idisnull- assessment_taken_id (
-
assessment_taken_id_terms¶
-
supports_assessment_taken_query()¶ Tests if an
AssessmentTakenQueryis available.Returns: trueif an assessment taken query is available,falseotherwiseReturn type: boolean
-
assessment_taken_query¶ Gets the query for an assessment taken.
Multiple retrievals produce a nested
ORterm.Returns: the assessment taken query Return type: osid.assessment.AssessmentTakenQueryRaise: Unimplemented–supports_assessment_taken_query()isfalse
-
match_any_assessment_taken(match)¶ Matches an assessment that has any taken version.
Parameters: match ( boolean) –trueto match assessments with any taken assessments,falseto match assessments with no taken assessments
-
assessment_taken_terms¶
-
match_bank_id(bank_id, match)¶ Sets the bank
Idfor this query.Parameters: - bank_id (
osid.id.Id) – a bankId - match (
boolean) –truefor a positive match,falsefor a negative match
Raise: NullArgument–bank_idisnull- bank_id (
-
bank_id_terms¶
-
supports_bank_query()¶ Tests if a
BankQueryis available.Returns: trueif a bank query is available,falseotherwiseReturn type: boolean
-
bank_query¶ Gets the query for a bank.
Multiple retrievals produce a nested
ORterm.Returns: the bank query Return type: osid.assessment.BankQueryRaise: Unimplemented–supports_bank_query()isfalse
-
bank_terms¶
-
get_assessment_query_record(assessment_record_type)¶ Gets the assessment query record corresponding to the given
AssessmentrecordType.Multiple retrievals produce a nested
ORterm.Parameters: assessment_record_type ( osid.type.Type) – an assessment record typeReturns: the assessment query record Return type: osid.assessment.records.AssessmentQueryRecordRaise: NullArgument–assessment_record_typeisnullRaise: OperationFailed– unable to complete requestRaise: Unsupported–has_record_type(assessment_record_type)isfalse
-
Assessment Offered Query¶
-
class
dlkit.assessment.queries.AssessmentOfferedQuery¶ Bases:
dlkit.osid.queries.OsidObjectQuery,dlkit.osid.queries.OsidSubjugateableQueryThis is the query for searching assessments.
Each method match request produces an
ANDterm while multiple invocations of a method produces a nestedOR.-
match_assessment_id(assessment_id, match)¶ Sets the assessment
Idfor this query.Parameters: - assessment_id (
osid.id.Id) – an assessmentId - match (
boolean) –truefor a positive match,falsefor a negative match
Raise: NullArgument–assessment_idisnull- assessment_id (
-
assessment_id_terms¶
-
supports_assessment_query()¶ Tests if an
AssessmentQueryis available.Returns: trueif an assessment query is available,falseotherwiseReturn type: boolean
-
assessment_query¶ Gets the query for an assessment.
Multiple retrievals produce a nested
ORterm.Returns: the assessment query Return type: osid.assessment.AssessmentQueryRaise: Unimplemented–supports_assessment_query()isfalse
-
assessment_terms¶
-
match_level_id(grade_id, match)¶ Sets the level grade
Idfor this query.Parameters: - grade_id (
osid.id.Id) – a gradeId - match (
boolean) –truefor a positive match,falsefor a negative match
Raise: NullArgument–grade_idisnull- grade_id (
-
level_id_terms¶
-
supports_level_query()¶ Tests if a
GradeQueryis available.Returns: trueif a grade query is available,falseotherwiseReturn type: boolean
-
level_query¶ Gets the query for a grade.
Multiple retrievals produce a nested
ORterm.Returns: the grade query Return type: osid.grading.GradeQueryRaise: Unimplemented–supports_level_query()isfalse
-
match_any_level(match)¶ Matches an assessment offered that has any level assigned.
Parameters: match ( boolean) –trueto match offerings with any level,falseto match offerings with no levsls
-
level_terms¶
-
match_items_sequential(match)¶ Match sequential assessments.
Parameters: match ( boolean) –truefor a positive match,falsefor a negative match
-
items_sequential_terms¶
-
match_items_shuffled(match)¶ Match shuffled item assessments.
Parameters: match ( boolean) –truefor a positive match,falsefor a negative match
-
items_shuffled_terms¶
-
match_start_time(start, end, match)¶ Matches assessments whose start time falls between the specified range inclusive.
Parameters: - start (
osid.calendaring.DateTime) – start of range - end (
osid.calendaring.DateTime) – end of range - match (
boolean) –truefor a positive match,falsefor a negative match
Raise: InvalidArgument–endis less thanstart- start (
-
match_any_start_time(match)¶ Matches offerings that has any start time assigned.
Parameters: match ( boolean) –trueto match offerings with any start time,falseto match offerings with no start time
-
start_time_terms¶
-
match_deadline(start, end, match)¶ Matches assessments whose end time falls between the specified range inclusive.
Parameters: - start (
osid.calendaring.DateTime) – start of range - end (
osid.calendaring.DateTime) – end of range - match (
boolean) –truefor a positive match,falsefor a negative match
Raise: InvalidArgument–endis less thanstartRaise: NullArgument–startorendisnull- start (
-
match_any_deadline(match)¶ Matches offerings that have any deadline assigned.
Parameters: match ( boolean) –trueto match offerings with any deadline,falseto match offerings with no deadline
-
deadline_terms¶
-
match_duration(low, high, match)¶ Matches assessments whose duration falls between the specified range inclusive.
Parameters: - low (
osid.calendaring.Duration) – start range of duration - high (
osid.calendaring.Duration) – end range of duration - match (
boolean) –truefor a positive match,falsefor a negative match
Raise: InvalidArgument–endis less thanstartRaise: NullArgument–startorendisnull- low (
-
match_any_duration(match)¶ Matches offerings that have any duration assigned.
Parameters: match ( boolean) –trueto match offerings with any duration,falseto match offerings with no duration
-
duration_terms¶
-
match_score_system_id(grade_system_id, match)¶ Sets the grade system
Idfor this query.Parameters: - grade_system_id (
osid.id.Id) – a grade systemId - match (
boolean) –true for a positive match, false for a negative match
Raise: NullArgument–grade_system_idisnull- grade_system_id (
-
score_system_id_terms¶
-
supports_score_system_query()¶ Tests if a
GradeSystemQueryis available.Returns: trueif a grade system query is available,falseotherwiseReturn type: boolean
-
score_system_query¶ Gets the query for a grade system.
Multiple retrievals produce a nested
ORterm.Returns: the grade system query Return type: osid.grading.GradeSystemQueryRaise: Unimplemented–supports_score_system_query()isfalse
-
match_any_score_system(match)¶ Matches taken assessments that have any grade system assigned.
Parameters: match ( boolean) –trueto match assessments with any grade system,falseto match assessments with no grade system
-
score_system_terms¶
-
match_grade_system_id(grade_system_id, match)¶ Sets the grade system
Idfor this query.Parameters: - grade_system_id (
osid.id.Id) – a grade systemId - match (
boolean) –true for a positive match, false for a negative match
Raise: NullArgument–grade_system_idisnull- grade_system_id (
-
grade_system_id_terms¶
-
supports_grade_system_query()¶ Tests if a
GradeSystemQueryis available.Returns: trueif a grade system query is available,falseotherwiseReturn type: boolean
-
grade_system_query¶ Gets the query for a grade system.
Multiple retrievals produce a nested
ORterm.Returns: the grade system query Return type: osid.grading.GradeSystemQueryRaise: Unimplemented–supports_score_system_query()isfalse
-
match_any_grade_system(match)¶ Matches taken assessments that have any grade system assigned.
Parameters: match ( boolean) –trueto match assessments with any grade system,falseto match assessments with no grade system
-
grade_system_terms¶
-
match_rubric_id(assessment_offered_id, match)¶ Sets the rubric assessment offered
Idfor this query.Parameters: - assessment_offered_id (
osid.id.Id) – an assessment offeredId - match (
boolean) –truefor a positive match,falsefor a negative match
Raise: NullArgument–assessment_offered_idisnull- assessment_offered_id (
-
rubric_id_terms¶
-
supports_rubric_query()¶ Tests if an
AssessmentOfferedQueryis available.Returns: trueif a rubric assessment offered query is available,falseotherwiseReturn type: boolean
-
rubric_query¶ Gets the query for a rubric assessment.
Multiple retrievals produce a nested
ORterm.Returns: the assessment offered query Return type: osid.assessment.AssessmentOfferedQueryRaise: Unimplemented–supports_rubric_query()isfalse
-
match_any_rubric(match)¶ Matches an assessment offered that has any rubric assessment assigned.
Parameters: match ( boolean) –trueto match assessments offered with any rubric,falseto match assessments offered with no rubric
-
rubric_terms¶
-
match_assessment_taken_id(assessment_taken_id, match)¶ Sets the assessment taken
Idfor this query.Parameters: - assessment_taken_id (
osid.id.Id) – an assessment takenId - match (
boolean) –truefor a positive match,falsefor a negative match
Raise: NullArgument–assessment_taken_idisnull- assessment_taken_id (
-
assessment_taken_id_terms¶
-
supports_assessment_taken_query()¶ Tests if an
AssessmentTakenQueryis available.Returns: trueif an assessment taken query is available,falseotherwiseReturn type: boolean
-
assessment_taken_query¶ Gets the query for an assessment taken.
Multiple retrievals produce a nested
ORterm.Returns: the assessment taken query Return type: osid.assessment.AssessmentTakenQueryRaise: Unimplemented–supports_assessment_taken_query()isfalse
-
match_any_assessment_taken(match)¶ Matches offerings that have any taken assessment version.
Parameters: match ( boolean) –trueto match offerings with any taken assessment,falseto match offerings with no assessmen taken
-
assessment_taken_terms¶
-
match_bank_id(bank_id, match)¶ Sets the bank
Idfor this query.Parameters: - bank_id (
osid.id.Id) – a bankId - match (
boolean) –truefor a positive match,falsefor a negative match
Raise: NullArgument–bank_idisnull- bank_id (
-
bank_id_terms¶
-
supports_bank_query()¶ Tests if a
BankQueryis available.Returns: trueif a bank query is available,falseotherwiseReturn type: boolean
-
bank_query¶ Gets the query for a bank.
Multiple retrievals produce a nested
ORterm.Returns: the bank query Return type: osid.assessment.BankQueryRaise: Unimplemented–supports_bank_query()isfalse
-
bank_terms¶
-
get_assessment_offered_query_record(assessment_offered_record_type)¶ Gets the assessment offered query record corresponding to the given
AssessmentOfferedrecordType.Multiple retrievals produce a nested
ORterm.Parameters: assessment_offered_record_type ( osid.type.Type) – an assessment offered record typeReturns: the assessment offered query record Return type: osid.assessment.records.AssessmentOfferedQueryRecordRaise: NullArgument–assessment_offered_record_typeisnullRaise: OperationFailed– unable to complete requestRaise: Unsupported–has_record_type(assessment_offered_record_type)isfalse
-
Assessment Taken Query¶
-
class
dlkit.assessment.queries.AssessmentTakenQuery¶ Bases:
dlkit.osid.queries.OsidObjectQueryThis is the query for searching assessments.
Each method match request produces an
ANDterm while multiple invocations of a method produces a nestedOR.-
match_assessment_offered_id(assessment_offered_id, match)¶ Sets the assessment offered
Idfor this query.Parameters: - assessment_offered_id (
osid.id.Id) – an assessmentId - match (
boolean) –truefor a positive match,falsefor a negative match
Raise: NullArgument–assessment_offered_idisnull- assessment_offered_id (
-
assessment_offered_id_terms¶
-
supports_assessment_offered_query()¶ Tests if an
AssessmentOfferedQueryis available.Returns: trueif an assessment offered query is available,falseotherwiseReturn type: boolean
-
assessment_offered_query¶ Gets the query for an assessment.
Multiple retrievals produce a nested
ORterm.Returns: the assessment offered query Return type: osid.assessment.AssessmentOfferedQueryRaise: Unimplemented–supports_assessment_offered_query()isfalse
-
assessment_offered_terms¶
-
match_taker_id(resource_id, match)¶ Sets the resource
Idfor this query.Parameters: - resource_id (
osid.id.Id) – a resourceId - match (
boolean) –truefor a positive match,falsefor a negative match
Raise: NullArgument–resource_idisnull- resource_id (
-
taker_id_terms¶
-
supports_taker_query()¶ Tests if a
ResourceQueryis available.Returns: trueif a resource query is available,falseotherwiseReturn type: boolean
-
taker_query¶ Gets the query for a resource.
Multiple retrievals produce a nested
ORterm.Returns: the resource query Return type: osid.resource.ResourceQueryRaise: Unimplemented–supports_taker_query()isfalse
-
taker_terms¶
-
match_taking_agent_id(agent_id, match)¶ Sets the agent
Idfor this query.Parameters: - agent_id (
osid.id.Id) – an agentId - match (
boolean) –truefor a positive match,falsefor a negative match
Raise: NullArgument–agent_idisnull- agent_id (
-
taking_agent_id_terms¶
-
supports_taking_agent_query()¶ Tests if an
AgentQueryis available.Returns: trueif an agent query is available,falseotherwiseReturn type: boolean
-
taking_agent_query¶ Gets the query for an agent.
Multiple retrievals produce a nested
ORterm.Returns: the agent query Return type: osid.authentication.AgentQueryRaise: Unimplemented–supports_taking_agent_query()isfalse
-
taking_agent_terms¶
-
match_actual_start_time(start, end, match)¶ Matches assessments whose start time falls between the specified range inclusive.
Parameters: - start (
osid.calendaring.DateTime) – start of range - end (
osid.calendaring.DateTime) – end of range - match (
boolean) –truefor a positive match,falsefor a negative match
Raise: InvalidArgument–endis less thanstartRaise: NullArgument–startorendisnull- start (
-
match_any_actual_start_time(match)¶ Matches taken assessments taken that have begun.
Parameters: match ( boolean) –trueto match assessments taken started,falseto match assessments taken that have not begun
-
actual_start_time_terms¶
-
match_completion_time(start, end, match)¶ Matches assessments whose completion time falls between the specified range inclusive.
Parameters: - start (
osid.calendaring.DateTime) – start of range - end (
osid.calendaring.DateTime) – end of range - match (
boolean) –truefor a positive match,falsefor a negative match
Raise: InvalidArgument–endis less thanstartRaise: NullArgument–startorendisnull- start (
-
match_any_completion_time(match)¶ Matches taken assessments taken that have completed.
Parameters: match ( boolean) –trueto match assessments taken completed,falseto match assessments taken that are incomplete
-
completion_time_terms¶
-
match_time_spent(low, high, match)¶ Matches assessments where the time spent falls between the specified range inclusive.
Parameters: - low (
osid.calendaring.Duration) – start of duration range - high (
osid.calendaring.Duration) – end of duration range - match (
boolean) –truefor a positive match,falsefor a negative match
Raise: InvalidArgument–highis less thanlowRaise: NullArgument–loworhighisnull- low (
-
time_spent_terms¶
-
match_score_system_id(grade_system_id, match)¶ Sets the grade system
Idfor this query.Parameters: - grade_system_id (
osid.id.Id) – a grade systemId - match (
boolean) –true for a positive match, false for a negative match
Raise: NullArgument–grade_system_idisnull- grade_system_id (
-
score_system_id_terms¶
-
supports_score_system_query()¶ Tests if a
GradeSystemQueryis available.Returns: trueif a grade system query is available,falseotherwiseReturn type: boolean
-
score_system_query¶ Gets the query for a grade system.
Multiple retrievals produce a nested
ORterm.Returns: the grade system query Return type: osid.grading.GradeSystemQueryRaise: Unimplemented–supports_score_system_query()isfalse
-
match_any_score_system(match)¶ Matches taken assessments that have any grade system assigned.
Parameters: match ( boolean) –trueto match assessments with any grade system,falseto match assessments with no grade system
-
score_system_terms¶
-
match_score(low, high, match)¶ Matches assessments whose score falls between the specified range inclusive.
Parameters: - low (
decimal) – start of range - high (
decimal) – end of range - match (
boolean) –truefor a positive match,falsefor negative match
Raise: InvalidArgument–highis less thanlow- low (
-
match_any_score(match)¶ Matches taken assessments that have any score assigned.
Parameters: match ( boolean) –trueto match assessments with any score,falseto match assessments with no score
-
score_terms¶
-
match_grade_id(grade_id, match)¶ Sets the grade
Idfor this query.Parameters: - grade_id (
osid.id.Id) – a gradeId - match (
boolean) –true for a positive match, false for a negative match
Raise: NullArgument–grade_idisnull- grade_id (
-
grade_id_terms¶
-
supports_grade_query()¶ Tests if a
GradeQueryis available.Returns: trueif a grade query is available,falseotherwiseReturn type: boolean
-
grade_query¶ Gets the query for a grade.
Multiple retrievals produce a nested
ORterm.Returns: the grade query Return type: osid.grading.GradeQueryRaise: Unimplemented–supports_grade_query()isfalse
-
match_any_grade(match)¶ Matches taken assessments that have any grade assigned.
Parameters: match ( boolean) –trueto match assessments with any grade,falseto match assessments with no grade
-
grade_terms¶
-
match_feedback(comments, string_match_type, match)¶ Sets the comment string for this query.
Parameters: - comments (
string) – comment string - string_match_type (
osid.type.Type) – the string match type - match (
boolean) –truefor a positive match,falsefor negative match
Raise: InvalidArgument–comments isnot ofstring_match_typeRaise: NullArgument–commentsorstring_match_typeisnullRaise: Unsupported–supports_string_match_type(string_match_type)isfalse- comments (
-
match_any_feedback(match)¶ Matches taken assessments that have any comments.
Parameters: match ( boolean) –trueto match assessments with any comments,falseto match assessments with no comments
-
feedback_terms¶
-
match_rubric_id(assessment_taken_id, match)¶ Sets the rubric assessment taken
Idfor this query.Parameters: - assessment_taken_id (
osid.id.Id) – an assessment takenId - match (
boolean) –truefor a positive match,falsefor a negative match
Raise: NullArgument–assessment_taken_idisnull- assessment_taken_id (
-
rubric_id_terms¶
-
supports_rubric_query()¶ Tests if an
AssessmentTakenQueryis available.Returns: trueif a rubric assessment taken query is available,falseotherwiseReturn type: boolean
-
rubric_query¶ Gets the query for a rubric assessment.
Multiple retrievals produce a nested
ORterm.Returns: the assessment taken query Return type: osid.assessment.AssessmentTakenQueryRaise: Unimplemented–supports_rubric_query()isfalse
-
match_any_rubric(match)¶ Matches an assessment taken that has any rubric assessment assigned.
Parameters: match ( boolean) –trueto match assessments taken with any rubric,falseto match assessments taken with no rubric
-
rubric_terms¶
-
match_bank_id(bank_id, match)¶ Sets the bank
Idfor this query.Parameters: - bank_id (
osid.id.Id) – a bankId - match (
boolean) –truefor a positive match,falsefor a negative match
Raise: NullArgument–bank_idisnull- bank_id (
-
bank_id_terms¶
-
supports_bank_query()¶ Tests if a
BankQueryis available.Returns: trueif a bank query is available,falseotherwiseReturn type: boolean
-
bank_query¶ Gets the query for a bank.
Multiple retrievals produce a nested
ORterm.Returns: the bank query Return type: osid.assessment.BankQueryRaise: Unimplemented–supports_bank_query()isfalse
-
bank_terms¶
-
get_assessment_taken_query_record(assessment_taken_record_type)¶ Gets the assessment taken query record corresponding to the given
AssessmentTakenrecordType.Multiple retrievals produce a nested
ORterm.Parameters: assessment_taken_record_type ( osid.type.Type) – an assessment taken record typeReturns: the assessment taken query record Return type: osid.assessment.records.AssessmentTakenQueryRecordRaise: NullArgument–assessment_taken_record_typeisnullRaise: OperationFailed– unable to complete requestRaise: Unsupported–has_record_type(assessment_taken_record_type)isfalse
-
Bank Query¶
-
class
dlkit.assessment.queries.BankQuery¶ Bases:
dlkit.osid.queries.OsidCatalogQueryThis is the query for searching banks Each method specifies an
ANDterm while multiple invocations of the same method produce a nestedOR.-
match_item_id(item_id, match)¶ Sets the item
Idfor this query.Parameters: - item_id (
osid.id.Id) – an itemId - match (
boolean) –truefor a positive match,falsefor a negative match
Raise: NullArgument–item_idisnull- item_id (
-
item_id_terms¶
-
supports_item_query()¶ Tests if a
ItemQueryis available.Returns: trueif an item query is available,falseotherwiseReturn type: boolean
-
item_query¶ Gets the query for an item.
Multiple retrievals produce a nested
ORterm.Returns: the item query Return type: osid.assessment.ItemQueryRaise: Unimplemented–supports_item_query()isfalse
-
match_any_item(match)¶ Matches assessment banks that have any item assigned.
Parameters: match ( boolean) –trueto match banks with any item,falseto match assessments with no item
-
item_terms¶
-
match_assessment_id(assessment_id, match)¶ Sets the assessment
Idfor this query.Parameters: - assessment_id (
osid.id.Id) – an assessmentId - match (
boolean) –truefor a positive match,falsefor a negative match
Raise: NullArgument–assessment_idisnull- assessment_id (
-
assessment_id_terms¶
-
supports_assessment_query()¶ Tests if an
AssessmentQueryis available.Returns: trueif an assessment query is available,falseotherwiseReturn type: boolean
-
assessment_query¶ Gets the query for an assessment.
Multiple retrievals produce a nested
ORterm.Returns: the assessment query Return type: osid.assessment.AssessmentQueryRaise: Unimplemented–supports_assessment_query()isfalse
-
match_any_assessment(match)¶ Matches assessment banks that have any assessment assigned.
Parameters: match ( boolean) –trueto match banks with any assessment,falseto match banks with no assessment
-
assessment_terms¶
-
match_assessment_offered_id(assessment_offered_id, match)¶ Sets the assessment offered
Idfor this query.Parameters: - assessment_offered_id (
osid.id.Id) – an assessmentId - match (
boolean) –truefor a positive match,falsefor a negative match
Raise: NullArgument–assessment_offered_idisnull- assessment_offered_id (
-
assessment_offered_id_terms¶
-
supports_assessment_offered_query()¶ Tests if an
AssessmentOfferedQueryis available.Returns: trueif an assessment offered query is available,falseotherwiseReturn type: boolean
-
assessment_offered_query¶ Gets the query for an assessment offered.
Multiple retrievals produce a nested
ORterm.Returns: the assessment offered query Return type: osid.assessment.AssessmentOfferedQueryRaise: Unimplemented–supports_assessment_offered_query()isfalse
-
match_any_assessment_offered(match)¶ Matches assessment banks that have any assessment offering assigned.
Parameters: match ( boolean) –trueto match banks with any assessment offering,falseto match banks with no offering
-
assessment_offered_terms¶
-
match_ancestor_bank_id(bank_id, match)¶ Sets the bank
Idfor to match banks in which the specified bank is an acestor.Parameters: - bank_id (
osid.id.Id) – a bankId - match (
boolean) –truefor a positive match,falsefor a negative match
Raise: NullArgument–bank_idisnull- bank_id (
-
ancestor_bank_id_terms¶
-
supports_ancestor_bank_query()¶ Tests if a
BankQueryis available.Returns: trueif a bank query is available,falseotherwiseReturn type: boolean
-
ancestor_bank_query¶ Gets the query for an ancestor bank.
Multiple retrievals produce a nested
ORterm.Returns: the bank query Return type: osid.assessment.BankQueryRaise: Unimplemented–supports_ancestor_bank_query()isfalse
-
match_any_ancestor_bank(match)¶ Matches a bank that has any ancestor.
Parameters: match ( boolean) –trueto match banks with any ancestor banks,falseto match root banks
-
ancestor_bank_terms¶
-
match_descendant_bank_id(bank_id, match)¶ Sets the bank
Idfor to match banks in which the specified bank is a descendant.Parameters: - bank_id (
osid.id.Id) – a bankId - match (
boolean) –truefor a positive match,falsefor a negative match
Raise: NullArgument–bank_idisnull- bank_id (
-
descendant_bank_id_terms¶
-
supports_descendant_bank_query()¶ Tests if a
BankQueryis available.Returns: trueif a bank query is available,falseotherwiseReturn type: boolean
-
descendant_bank_query¶ Gets the query for a descendant bank.
Multiple retrievals produce a nested
ORterm.Returns: the bank query Return type: osid.assessment.BankQueryRaise: Unimplemented–supports_descendant_bank_query()isfalse
-
match_any_descendant_bank(match)¶ Matches a bank that has any descendant.
Parameters: match ( boolean) –trueto match banks with any descendant banks,falseto match leaf banks
-
descendant_bank_terms¶
-
get_bank_query_record(bank_record_type)¶ Gets the bank query record corresponding to the given
BankrecordType.Multiple record retrievals produce a nested
ORterm.Parameters: bank_record_type ( osid.type.Type) – a bank record typeReturns: the bank query record Return type: osid.assessment.records.BankQueryRecordRaise: NullArgument–bank_record_typeisnullRaise: OperationFailed– unable to complete requestRaise: Unsupported–has_record_type(bank_record_type)isfalse
-
Records¶
Question Record¶
-
class
dlkit.assessment.records.QuestionRecord¶ Bases:
dlkit.osid.records.OsidRecordA record for a
Question.The methods specified by the record type are available through the underlying object.
Question Query Record¶
-
class
dlkit.assessment.records.QuestionQueryRecord¶ Bases:
dlkit.osid.records.OsidRecordA record for a
QuestionQuery.The methods specified by the record type are available through the underlying object.
Question Form Record¶
-
class
dlkit.assessment.records.QuestionFormRecord¶ Bases:
dlkit.osid.records.OsidRecordA record for a
QuestionForm.The methods specified by the record type are available through the underlying object.
Answer Record¶
-
class
dlkit.assessment.records.AnswerRecord¶ Bases:
dlkit.osid.records.OsidRecordA record for an
Answer.The methods specified by the record type are available through the underlying object.
Answer Query Record¶
-
class
dlkit.assessment.records.AnswerQueryRecord¶ Bases:
dlkit.osid.records.OsidRecordA record for an
AnswerQuery.The methods specified by the record type are available through the underlying object.
Answer Form Record¶
-
class
dlkit.assessment.records.AnswerFormRecord¶ Bases:
dlkit.osid.records.OsidRecordA record for an
AnswerForm.The methods specified by the record type are available through the underlying object.
Item Record¶
-
class
dlkit.assessment.records.ItemRecord¶ Bases:
dlkit.osid.records.OsidRecordA record for an
Item.The methods specified by the record type are available through the underlying object.
Item Query Record¶
-
class
dlkit.assessment.records.ItemQueryRecord¶ Bases:
dlkit.osid.records.OsidRecordA record for an
ItemQuery.The methods specified by the record type are available through the underlying object.
Item Form Record¶
-
class
dlkit.assessment.records.ItemFormRecord¶ Bases:
dlkit.osid.records.OsidRecordA record for an
ItemForm.The methods specified by the record type are available through the underlying object.
Assessment Record¶
-
class
dlkit.assessment.records.AssessmentRecord¶ Bases:
dlkit.osid.records.OsidRecordA record for an
Assessment.The methods specified by the record type are available through the underlying object.
Assessment Query Record¶
-
class
dlkit.assessment.records.AssessmentQueryRecord¶ Bases:
dlkit.osid.records.OsidRecordA record for an
AssessmentQuery.The methods specified by the record type are available through the underlying object.
Assessment Form Record¶
-
class
dlkit.assessment.records.AssessmentFormRecord¶ Bases:
dlkit.osid.records.OsidRecordA record for an
AssessmentForm.The methods specified by the record type are available through the underlying object.
Assessment Offered Record¶
-
class
dlkit.assessment.records.AssessmentOfferedRecord¶ Bases:
dlkit.osid.records.OsidRecordA record for an
AssessmentOffered.The methods specified by the record type are available through the underlying object.
Assessment Offered Query Record¶
-
class
dlkit.assessment.records.AssessmentOfferedQueryRecord¶ Bases:
dlkit.osid.records.OsidRecordA record for an
AssessmentOfferedQuery.The methods specified by the record type are available through the underlying object.
Assessment Offered Form Record¶
-
class
dlkit.assessment.records.AssessmentOfferedFormRecord¶ Bases:
dlkit.osid.records.OsidRecordA record for an
AssessmentOfferedForm.The methods specified by the record type are available through the underlying object.
Assessment Taken Record¶
-
class
dlkit.assessment.records.AssessmentTakenRecord¶ Bases:
dlkit.osid.records.OsidRecordA record for an
AssessmentTaken.The methods specified by the record type are available through the underlying object.
Assessment Taken Query Record¶
-
class
dlkit.assessment.records.AssessmentTakenQueryRecord¶ Bases:
dlkit.osid.records.OsidRecordA record for an
AssessmentTakenQuery.The methods specified by the record type are available through the underlying object.
Assessment Taken Form Record¶
-
class
dlkit.assessment.records.AssessmentTakenFormRecord¶ Bases:
dlkit.osid.records.OsidRecordA record for an
AssessmentTakenForm.The methods specified by the record type are available through the underlying object.
Assessment Section Record¶
-
class
dlkit.assessment.records.AssessmentSectionRecord¶ Bases:
dlkit.osid.records.OsidRecordA record for an
AssessmentSection.The methods specified by the record type are available through the underlying object.
Bank Record¶
-
class
dlkit.assessment.records.BankRecord¶ Bases:
dlkit.osid.records.OsidRecordA record for a
Bank.The methods specified by the record type are available through the underlying object.
Bank Query Record¶
-
class
dlkit.assessment.records.BankQueryRecord¶ Bases:
dlkit.osid.records.OsidRecordA record for a
BankQuery.The methods specified by the record type are available through the underlying object.
Bank Form Record¶
-
class
dlkit.assessment.records.BankFormRecord¶ Bases:
dlkit.osid.records.OsidRecordA record for a
BankForm.The methods specified by the record type are available through the underlying object.
Response Record¶
-
class
dlkit.assessment.records.ResponseRecord¶ Bases:
dlkit.osid.records.OsidRecordA record for a
Response.The methods specified by the record type are available through the underlying object.
Rules¶
Response¶
-
class
dlkit.assessment.rules.Response¶ Bases:
dlkit.osid.rules.OsidConditionA response to an assessment item.
This interface contains methods to set values in response to an assessmet item and mirrors the item record structure with the corresponding setters.
-
item_id¶ Gets the
Idof theItem.Returns: the assessment item IdReturn type: osid.id.Id
-
item¶ Gets the
Item.Returns: the assessment item Return type: osid.assessment.Item
-
get_response_record(item_record_type)¶ Gets the response record corresponding to the given
ItemrecordType.This method is used to retrieve an object implementing the requested record. The
item_record_typemay be theTypereturned inget_record_types()or any of its parents in aTypehierarchy wherehas_record_type(item_record_type)istrue.Parameters: item_record_type ( osid.type.Type) – an item record typeReturns: the response record Return type: osid.assessment.records.ResponseRecordRaise: NullArgument–item_record_typeisnullRaise: OperationFailed– unable to complete requestRaise: Unsupported–has_record_type(item_record_type)isfalse
-
Commenting¶
Summary¶
Commenting Open Service Interface Definitions commenting version 3.0.0
The Commenting OSID provides a means of relating user comments and ratings to OSID Objects.
The Commenting OSID may be used as an auxiliary service orchestrated
with other OSIDs to either provide administrative comments as well as
create a social network-esque comment and rating service to various
OsidObjects.
Comments
Comments contain text entries logged by date and Agent. A
Comment may also include a rating represented by a Grade defined
in a GradeSystem. The RatingLookupSession may be used to query
cumulative scores across an object reference or the entire Book.
Comments are OsidRelationships between a commentor and a
reference Id. The relationship defines dates for which the comment
and/or rating is effective.
Commentors
An Agent comments on something. As a person is represented by a
Resource in the Resource OSID, the Comments provide access to both
the commenting Agent and the related Resource to avoid the need
of an additional service orchestration for resolving the Agent.
Cataloging
Comments are cataloged in Books which may also be grouped
hierarchically to federate multiple collections of comments.
Sub Packages
The Commenting OSID includes a Commenting Batch OSID for managing
Comments and Books in bulk.
Commenting Open Service Interface Definitions commenting version 3.0.0
The Commenting OSID provides a means of relating user comments and ratings to OSID Objects.
The Commenting OSID may be used as an auxiliary service orchestrated
with other OSIDs to either provide administrative comments as well as
create a social network-esque comment and rating service to various
OsidObjects.
Comments
Comments contain text entries logged by date and Agent. A
Comment may also include a rating represented by a Grade defined
in a GradeSystem. The RatingLookupSession may be used to query
cumulative scores across an object reference or the entire Book.
Comments are OsidRelationships between a commentor and a
reference Id. The relationship defines dates for which the comment
and/or rating is effective.
Commentors
An Agent comments on something. As a person is represented by a
Resource in the Resource OSID, the Comments provide access to both
the commenting Agent and the related Resource to avoid the need
of an additional service orchestration for resolving the Agent.
Cataloging
Comments are cataloged in Books which may also be grouped
hierarchically to federate multiple collections of comments.
Sub Packages
The Commenting OSID includes a Commenting Batch OSID for managing
Comments and Books in bulk.
Service Managers¶
Commenting Manager¶
-
class
dlkit.services.commenting.CommentingManager¶ Bases:
dlkit.osid.managers.OsidManager,dlkit.osid.sessions.OsidSession,dlkit.services.commenting.CommentingProfile-
commenting_batch_manager¶ Gets a
CommentingBatchManager.Returns: a CommentingBatchManagerReturn type: osid.commenting.batch.CommentingBatchManagerRaise: OperationFailed– unable to complete requestRaise: Unimplemented–supports_commenting_batch()isfalse
-
Commenting Profile Methods¶
CommentingManager.supports_comment_lookup()¶Tests for the availability of a comment lookup service.
Returns: trueif comment lookup is available,falseotherwiseReturn type: boolean
CommentingManager.supports_comment_query()¶Tests if querying comments is available.
Returns: trueif comment query is available,falseotherwiseReturn type: boolean
CommentingManager.supports_comment_admin()¶Tests if managing comments is available.
Returns: trueif comment admin is available,falseotherwiseReturn type: boolean
CommentingManager.supports_book_lookup()¶Tests for the availability of an book lookup service.
Returns: trueif book lookup is available,falseotherwiseReturn type: boolean
CommentingManager.supports_book_admin()¶Tests for the availability of a book administrative service for creating and deleting books.
Returns: trueif book administration is available,falseotherwiseReturn type: boolean
CommentingManager.supports_book_hierarchy()¶Tests for the availability of a book hierarchy traversal service.
Returns: trueif book hierarchy traversal is available,falseotherwiseReturn type: boolean
CommentingManager.supports_book_hierarchy_design()¶Tests for the availability of a book hierarchy design service.
Returns: trueif book hierarchy design is available,falseotherwiseReturn type: boolean
CommentingManager.comment_record_types¶Gets the supported
Commentrecord types.
Returns: a list containing the supported comment record types Return type: osid.type.TypeList
CommentingManager.comment_search_record_types¶Gets the supported comment search record types.
Returns: a list containing the supported comment search record types Return type: osid.type.TypeList
CommentingManager.book_record_types¶Gets the supported
Bookrecord types.
Returns: a list containing the supported book record types Return type: osid.type.TypeList
CommentingManager.book_search_record_types¶Gets the supported book search record types.
Returns: a list containing the supported book search record types Return type: osid.type.TypeList
Book Lookup Methods¶
CommentingManager.can_lookup_books()¶Tests if this user can perform
Booklookups. 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 not offer lookup operations to unauthorized users.
Returns: falseif lookup methods are not authorized,trueotherwiseReturn type: boolean
CommentingManager.use_comparative_book_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.
CommentingManager.use_plenary_book_view()¶A complete view of the
Bookreturns 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.
CommentingManager.get_books_by_ids(book_ids)¶Gets a
BookListcorresponding to the givenIdList. In plenary mode, the returned list contains all of the books specified in theIdlist, in the order of the list, including duplicates, or an error results if anIdin the supplied list is not found or inaccessible. Otherwise, inaccessibleBooksmay be omitted from the list and may present the elements in any order including returning a unique set.
Parameters: book_ids ( osid.id.IdList) – the list ofIdsto retrieveReturns: the returned BooklistReturn type: osid.commenting.BookListRaise: NotFound– anId wasnot foundRaise: NullArgument–book_idsisnullRaise: OperationFailed– unable to complete requestRaise: PermissionDenied– authorization failure
CommentingManager.get_books_by_genus_type(book_genus_type)¶Gets a
BookListcorresponding to the given book genusTypewhich does not include books of genus types derived from the specifiedType. In plenary mode, the returned list contains all known books or an error results. Otherwise, the returned list may contain only those books that are accessible through this session.
Parameters: book_genus_type ( osid.type.Type) – a book genus typeReturns: the returned BooklistReturn type: osid.commenting.BookListRaise: NullArgument–book_genus_typeisnullRaise: OperationFailed– unable to complete requestRaise: PermissionDenied– authorization failure
CommentingManager.get_books_by_parent_genus_type(book_genus_type)¶Gets a
BookListcorresponding to the given book genusTypeand include any additional books with genus types derived from the specifiedType. In plenary mode, the returned list contains all known books or an error results. Otherwise, the returned list may contain only those books that are accessible through this session.
Parameters: book_genus_type ( osid.type.Type) – a book genus typeReturns: the returned BooklistReturn type: osid.commenting.BookListRaise: NullArgument–book_genus_typeisnullRaise: OperationFailed– unable to complete requestRaise: PermissionDenied– authorization failure
CommentingManager.get_books_by_record_type(book_record_type)¶Gets a
BookListcontaining the given book recordType. In plenary mode, the returned list contains all known books or an error results. Otherwise, the returned list may contain only those books that are accessible through this session.
Parameters: book_record_type ( osid.type.Type) – a book record typeReturns: the returned BooklistReturn type: osid.commenting.BookListRaise: NullArgument–book_record_typeisnullRaise: OperationFailed– unable to complete requestRaise: PermissionDenied– authorization failure
CommentingManager.get_books_by_provider(resource_id)¶Gets a
BookListfrom the given provider ````. In plenary mode, the returned list contains all known books or an error results. Otherwise, the returned list may contain only those books that are accessible through this session.
Parameters: resource_id ( osid.id.Id) – a resourceIdReturns: the returned BooklistReturn type: osid.commenting.BookListRaise: NullArgument–resource_idisnullRaise: OperationFailed– unable to complete requestRaise: PermissionDenied– authorization failure
CommentingManager.books¶Gets all
Books. In plenary mode, the returned list contains all known books or an error results. Otherwise, the returned list may contain only those books that are accessible through this session.
Returns: a list of BooksReturn type: osid.commenting.BookListRaise: OperationFailed– unable to complete requestRaise: PermissionDenied– authorization failure
Book Admin Methods¶
CommentingManager.can_create_books()¶Tests if this user can create
Books. A return of true does not guarantee successful authorization. A return of false indicates that it is known creating aBookwill result in aPermissionDenied. This is intended as a hint to an application that may not wish to offer create operations to unauthorized users.
Returns: falseifBookcreation is not authorized,trueotherwiseReturn type: boolean
CommentingManager.can_create_book_with_record_types(book_record_types)¶Tests if this user can create a single
Bookusing the desired record types. WhileCommentingManager.getBookRecordTypes()can be used to examine which records are supported, this method tests which record(s) are required for creating a specificBook. Providing an empty array tests if aBookcan be created with no records.
Parameters: book_record_types ( osid.type.Type[]) – array of book record typesReturns: trueifBookcreation using the specified recordTypesis supported,falseotherwiseReturn type: booleanRaise: NullArgument–book_record_typesisnull
CommentingManager.get_book_form_for_create(book_record_types)¶Gets the book form for creating new books. A new form should be requested for each create transaction.
Parameters: book_record_types ( osid.type.Type[]) – array of book record typesReturns: the book form Return type: osid.commenting.BookFormRaise: NullArgument–book_record_typesisnullRaise: OperationFailed– unable to complete requestRaise: PermissionDenied– authorization failureRaise: Unsupported– unable to get form for requested record types
CommentingManager.create_book(book_form)¶Creates a new
Book.
Parameters: book_form ( osid.commenting.BookForm) – the form for thisBookReturns: the new BookReturn type: osid.commenting.BookRaise: IllegalState–book_formalready used in a create transactionRaise: InvalidArgument– one or more of the form elements is invalidRaise: NullArgument–book_formisnullRaise: OperationFailed– unable to complete requestRaise: PermissionDenied– authorization failureRaise: Unsupported–book_formdid not originte fromget_book_form_for_create()
CommentingManager.can_update_books()¶Tests if this user can update
Books. A return of true does not guarantee successful authorization. A return of false indicates that it is known updating aBookwill result in aPermissionDenied. This is intended as a hint to an application that may not wish to offer update operations to unauthorized users.
Returns: falseifBookmodification is not authorized,trueotherwiseReturn type: boolean
CommentingManager.get_book_form_for_update(book_id)¶Gets the book form for updating an existing book. A new book form should be requested for each update transaction.
Parameters: book_id ( osid.id.Id) – theIdof theBookReturns: the book form Return type: osid.commenting.BookFormRaise: NotFound–book_idis not foundRaise: NullArgument–book_idisnullRaise: OperationFailed– unable to complete requestRaise: PermissionDenied– authorization failure
CommentingManager.update_book(book_form)¶Updates an existing book.
Parameters: book_form ( osid.commenting.BookForm) – the form containing the elements to be updatedRaise: IllegalState–book_formalready used in an update transactionRaise: InvalidArgument– the form contains an invalid valueRaise: NullArgument–book_formisnullRaise: OperationFailed– unable to complete requestRaise: PermissionDenied– authorization failureRaise: Unsupported–book_formdid not originte fromget_book_form_for_update()
CommentingManager.can_delete_books()¶Tests if this user can delete
BooksA return of true does not guarantee successful authorization. A return of false indicates that it is known deleting aBookwill result in aPermissionDenied. This is intended as a hint to an application that may not wish to offer delete operations to unauthorized users.
Returns: falseifBookdeletion is not authorized,trueotherwiseReturn type: boolean
CommentingManager.delete_book(book_id)¶Deletes a
Book.
Parameters: book_id ( osid.id.Id) – theIdof theBookto removeRaise: NotFound–book_idnot foundRaise: NullArgument–book_idisnullRaise: OperationFailed– unable to complete requestRaise: PermissionDenied– authorization failure
CommentingManager.can_manage_book_aliases()¶Tests if this user can manage
Idaliases forBooks. 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: falseifBookaliasing is not authorized,trueotherwiseReturn type: boolean
CommentingManager.alias_book(book_id, alias_id)¶Adds an
Idto aBookfor the purpose of creating compatibility. The primaryIdof theBookis determined by the provider. The newIdperforms as an alias to the primaryId. If the alias is a pointer to another book, it is reassigned to the given bookId.
Parameters:
- book_id (
osid.id.Id) – theIdof aBook- alias_id (
osid.id.Id) – the aliasIdRaise:
AlreadyExists–alias_idis already assignedRaise:
NotFound–book_idnot foundRaise:
NullArgument–book_idoralias_idisnullRaise:
OperationFailed– unable to complete requestRaise:
PermissionDenied– authorization failure
Book Hierarchy Methods¶
CommentingManager.book_hierarchy_id¶Gets the hierarchy
Idassociated with this session.
Returns: the hierarchy Idassociated with this sessionReturn type: osid.id.Id
CommentingManager.book_hierarchy¶Gets the hierarchy associated with this session.
Returns: the hierarchy associated with this session Return type: osid.hierarchy.HierarchyRaise: OperationFailed– unable to complete requestRaise: PermissionDenied– authorization failure
CommentingManager.can_access_book_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 application that may opt not to offer lookup operations.
Returns: falseif hierarchy traversal methods are not authorized,trueotherwiseReturn type: boolean
CommentingManager.use_comparative_book_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.
CommentingManager.use_plenary_book_view()A complete view of the
Bookreturns 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.
CommentingManager.root_book_ids¶Gets the root book
Idsin this hierarchy.
Returns: the root book IdsReturn type: osid.id.IdListRaise: OperationFailed– unable to complete requestRaise: PermissionDenied– authorization failure
CommentingManager.root_books¶Gets the root books in the book hierarchy. A node with no parents is an orphan. While all book
Idsare known to the hierarchy, an orphan does not appear in the hierarchy unless explicitly added as a root node or child of another node.
Returns: the root books Return type: osid.commenting.BookListRaise: OperationFailed– unable to complete requestRaise: PermissionDenied– authorization failure
CommentingManager.has_parent_books(book_id)¶Tests if the
Bookhas any parents.
Parameters: book_id ( osid.id.Id) – a bookIdReturns: trueif the book has parents, falseotherwiseReturn type: booleanRaise: NotFound–book_idis not foundRaise: NullArgument–book_idisnullRaise: OperationFailed– unable to complete requestRaise: PermissionDenied– authorization failure
CommentingManager.is_parent_of_book(id_, book_id)¶Tests if an
Idis a direct parent of book.
Parameters:
- id (
osid.id.Id) – anId- book_id (
osid.id.Id) – theIdof a bookReturns:
trueif thisidis a parent ofbook_id,falseotherwiseReturn type:
booleanRaise:
NotFound–book_idis not foundRaise:
NullArgument–idorbook_idisnullRaise:
OperationFailed– unable to complete requestRaise:
PermissionDenied– authorization failure
CommentingManager.get_parent_book_ids(book_id)¶Gets the parent
Idsof the given book.
Parameters: book_id ( osid.id.Id) – a bookIdReturns: the parent Idsof the bookReturn type: osid.id.IdListRaise: NotFound–book_idis not foundRaise: NullArgument–book_idisnullRaise: OperationFailed– unable to complete requestRaise: PermissionDenied– authorization failure
CommentingManager.get_parent_books(book_id)¶Gets the parent books of the given
id.
Parameters: book_id ( osid.id.Id) – theIdof theBookto queryReturns: the parent books of the idReturn type: osid.commenting.BookListRaise: NotFound– aBookidentified byId isnot foundRaise: NullArgument–book_idisnullRaise: OperationFailed– unable to complete requestRaise: PermissionDenied– authorization failure
CommentingManager.is_ancestor_of_book(id_, book_id)¶Tests if an
Idis an ancestor of a book.
Parameters:
- id (
osid.id.Id) – anId- book_id (
osid.id.Id) – theIdof a bookReturns:
true if thisidis an ancestor ofbook_id,falseotherwiseReturn type:
booleanRaise:
NotFound–book_idis not foundRaise:
NullArgument–idorbook_idisnullRaise:
OperationFailed– unable to complete requestRaise:
PermissionDenied– authorization failure
CommentingManager.has_child_books(book_id)¶Tests if a book has any children.
Parameters: book_id ( osid.id.Id) – a bookIdReturns: trueif thebook_idhas children,falseotherwiseReturn type: booleanRaise: NotFound–book_idis not foundRaise: NullArgument–book_idisnullRaise: OperationFailed– unable to complete requestRaise: PermissionDenied– authorization failure
CommentingManager.is_child_of_book(id_, book_id)¶Tests if a book is a direct child of another.
Parameters:
- id (
osid.id.Id) – anId- book_id (
osid.id.Id) – theIdof a bookReturns:
trueif theidis a child ofbook_id,falseotherwiseReturn type:
booleanRaise:
NotFound–book_idis not foundRaise:
NullArgument–idorbook_idisnullRaise:
OperationFailed– unable to complete requestRaise:
PermissionDenied– authorization failure
CommentingManager.get_child_book_ids(book_id)¶Gets the child
Idsof the given book.
Parameters: book_id ( osid.id.Id) – theIdto queryReturns: the children of the book Return type: osid.id.IdListRaise: NotFound–book_idis not foundRaise: NullArgument–book_idisnullRaise: OperationFailed– unable to complete requestRaise: PermissionDenied– authorization failure
CommentingManager.get_child_books(book_id)¶Gets the child books of the given
id.
Parameters: book_id ( osid.id.Id) – theIdof theBookto queryReturns: the child books of the idReturn type: osid.commenting.BookListRaise: NotFound– aBookidentified byId isnot foundRaise: NullArgument–book_idisnullRaise: OperationFailed– unable to complete requestRaise: PermissionDenied– authorization failure
CommentingManager.is_descendant_of_book(id_, book_id)¶Tests if an
Idis a descendant of a book.
Parameters:
- id (
osid.id.Id) – anId- book_id (
osid.id.Id) – theIdof a bookReturns:
trueif theidis a descendant of thebook_id,falseotherwiseReturn type:
booleanRaise:
NotFound–book_idis not foundRaise:
NullArgument–idorbook_idisnullRaise:
OperationFailed– unable to complete requestRaise:
PermissionDenied– authorization failure
CommentingManager.get_book_node_ids(book_id, ancestor_levels, descendant_levels, include_siblings)¶Gets a portion of the hierarchy for the given book.
Parameters:
- book_id (
osid.id.Id) – theIdto 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) –trueto include the siblings of the given node,falseto omit the siblingsReturns: a book node
Return type:
osid.hierarchy.NodeRaise:
NotFound–book_idis not foundRaise:
NullArgument–book_idisnullRaise:
OperationFailed– unable to complete requestRaise:
PermissionDenied– authorization failure
CommentingManager.get_book_nodes(book_id, ancestor_levels, descendant_levels, include_siblings)¶Gets a portion of the hierarchy for the given book.
Parameters:
- book_id (
osid.id.Id) – theIdto 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) –trueto include the siblings of the given node,falseto omit the siblingsReturns: a book node
Return type:
osid.commenting.BookNodeRaise:
NotFound–book_idis not foundRaise:
NullArgument–book_idisnullRaise:
OperationFailed– unable to complete requestRaise:
PermissionDenied– authorization failure
Book Hierarchy Design Methods¶
CommentingManager.book_hierarchy_idGets the hierarchy
Idassociated with this session.
Returns: the hierarchy Idassociated with this sessionReturn type: osid.id.Id
CommentingManager.book_hierarchyGets the hierarchy associated with this session.
Returns: the hierarchy associated with this session Return type: osid.hierarchy.HierarchyRaise: OperationFailed– unable to complete requestRaise: PermissionDenied– authorization failure
CommentingManager.can_modify_book_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: falseif changing this hierarchy is not authorized,trueotherwiseReturn type: boolean
CommentingManager.add_root_book(book_id)¶Adds a root book.
Parameters: book_id ( osid.id.Id) – theIdof a bookRaise: AlreadyExists–book_idis already in hierarchyRaise: NotFound–book_idis not foundRaise: NullArgument–book_idisnullRaise: OperationFailed– unable to complete requestRaise: PermissionDenied– authorization failure
CommentingManager.remove_root_book(book_id)¶Removes a root book.
Parameters: book_id ( osid.id.Id) – theIdof a bookRaise: NotFound–book_idis not a rootRaise: NullArgument–book_idisnullRaise: OperationFailed– unable to complete requestRaise: PermissionDenied– authorization failure
CommentingManager.add_child_book(book_id, child_id)¶Adds a child to a book.
Parameters:
- book_id (
osid.id.Id) – theIdof a book- child_id (
osid.id.Id) – theIdof the new childRaise:
AlreadyExists–book_idis already a parent ofchild_idRaise:
NotFound–book_idorchild_idnot foundRaise:
NullArgument–book_idorchild_idisnullRaise:
OperationFailed– unable to complete requestRaise:
PermissionDenied– authorization failure
CommentingManager.remove_child_book(book_id, child_id)¶Removes a child from a book.
Parameters:
- book_id (
osid.id.Id) – theIdof a book- child_id (
osid.id.Id) – theIdof the new childRaise:
NotFound–book_idnot a parent ofchild_idRaise:
NullArgument–book_idorchild_idisnullRaise:
OperationFailed– unable to complete requestRaise:
PermissionDenied– authorization failure
CommentingManager.remove_child_books(book_id)¶Removes all children from a book.
Parameters: book_id ( osid.id.Id) – theIdof a bookRaise: NotFound–book_idnot foundRaise: NullArgument–book_idisnullRaise: OperationFailed– unable to complete requestRaise: PermissionDenied– authorization failure
Book¶
Book¶
-
class
dlkit.services.commenting.Book¶ Bases:
dlkit.osid.objects.OsidCatalog,dlkit.osid.sessions.OsidSession-
get_book_record(book_record_type)¶ Gets the book record corresponding to the given
BookrecordType. This method is used to retrieve an object implementing the requested record. Thebook_record_typemay be theTypereturned inget_record_types()or any of its parents in aTypehierarchy wherehas_record_type(book_record_type)istrue.Parameters: book_record_type ( osid.type.Type) – the type of book record to retrieveReturns: the book record Return type: osid.commenting.records.BookRecordRaise: NullArgument–book_record_typeisnullRaise: OperationFailed– unable to complete requestRaise: Unsupported–has_record_type(book_record_type)isfalse
-
Comment Lookup Methods¶
Book.can_lookup_comments()¶Tests if this user can examine this book. 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 application that may opt not to offer these operations.
Returns: falseif book reading methods are not authorized,trueotherwiseReturn type: boolean
Book.use_comparative_comment_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.
Book.use_plenary_comment_view()¶A complete view of the
Commentreturns 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.
Book.use_federated_book_view()¶Federates the view for methods in this session. A federated view will include comments in books which are children of this book in the book hierarchy.
Book.use_isolated_book_view()¶Isolates the view for methods in this session. An isolated view restricts retrievals to this book only.
Book.use_effective_comment_view()¶Only comments whose effective dates are current are returned by methods in this session.
Book.use_any_effective_comment_view()¶All comments of any effective dates are returned by all methods in this session.
Book.get_comment(comment_id)¶Gets the
Commentspecified by itsId.
Parameters: comment_id ( osid.id.Id) – theIdof theCommentto retrieveReturns: the returned CommentReturn type: osid.commenting.CommentRaise: NotFound– noCommentfound with the givenIdRaise: NullArgument–comment_idisnullRaise: OperationFailed– unable to complete requestRaise: PermissionDenied– authorization failure
Book.get_comments_by_ids(comment_ids)¶Gets a
CommentListcorresponding to the givenIdList.
Parameters: comment_ids ( osid.id.IdList) – the list ofIdsto retrieveReturns: the returned Comment listReturn type: osid.commenting.CommentListRaise: NotFound– anId wasnot foundRaise: NullArgument–comment_idsisnullRaise: OperationFailed– unable to complete requestRaise: PermissionDenied– authorization failure
Book.get_comments_by_genus_type(comment_genus_type)¶Gets a
CommentListcorresponding to the given comment genusTypewhich does not include comments of genus types derived from the specifiedType.
Parameters: comment_genus_type ( osid.type.Type) – a comment genus typeReturns: the returned CommentlistReturn type: osid.commenting.CommentListRaise: NullArgument–comment_genus_typeisnullRaise: OperationFailed– unable to complete requestRaise: PermissionDenied– authorization failure
Book.get_comments_by_parent_genus_type(comment_genus_type)¶Gets a
CommentListcorresponding to the given comment genusTypeand include any additional comments with genus types derived from the specifiedType.
Parameters: comment_genus_type ( osid.type.Type) – a comment genus typeReturns: the returned CommentlistReturn type: osid.commenting.CommentListRaise: NullArgument–comment_genus_typeisnullRaise: OperationFailed– unable to complete requestRaise: PermissionDenied– authorization failure
Book.get_comments_by_record_type(comment_record_type)¶Gets a
CommentListcontaining the given comment recordType.
Parameters: comment_record_type ( osid.type.Type) – a comment record typeReturns: the returned CommentlistReturn type: osid.commenting.CommentListRaise: NullArgument–comment_record_typeisnullRaise: OperationFailed– unable to complete requestRaise: PermissionDenied– authorization failure
Book.get_comments_on_date(from_, to)¶Gets a
CommentListeffective during the entire given date range inclusive but not confined to the date range.
Parameters:
- from (
osid.calendaring.DateTime) – starting date- to (
osid.calendaring.DateTime) – ending dateReturns: the returned
CommentlistReturn type:
osid.commenting.CommentListRaise:
InvalidArgument–fromis greater thantoRaise:
NullArgument–fromortoisnullRaise:
OperationFailed– unable to complete requestRaise:
PermissionDenied– authorization failure
Book.get_comments_by_genus_type_on_date(comment_genus_type, from_, to)¶Gets a
CommentListof a given genus type and effective during the entire given date range inclusive but not confined to the date range.
Parameters:
- comment_genus_type (
osid.type.Type) – a comment genus type- from (
osid.calendaring.DateTime) – starting date- to (
osid.calendaring.DateTime) – ending dateReturns: the returned
CommentlistReturn type:
osid.commenting.CommentListRaise:
InvalidArgument–fromis greater thantoRaise:
NullArgument–comment_genus_type, from,ortoisnullRaise:
OperationFailed– unable to complete requestRaise:
PermissionDenied– authorization failure
Book.get_comments_for_commentor(resource_id)¶Gets a list of comments corresponding to a resource
Id.
Parameters: resource_id ( osid.id.Id) – theIdof the resourceReturns: the returned CommentListReturn type: osid.commenting.CommentListRaise: NullArgument–resource_idisnullRaise: OperationFailed– unable to complete requestRaise: PermissionDenied– authorization failure
Book.get_comments_for_commentor_on_date(resource_id, from_, to)¶Gets a list of all comments corresponding to a resource
Idand effective during the entire given date range inclusive but not confined to the date range.
Parameters:
- resource_id (
osid.id.Id) – theIdof the resource- from (
osid.calendaring.DateTime) – from date- to (
osid.calendaring.DateTime) – to dateReturns: the returned
CommentListReturn type:
osid.commenting.CommentListRaise:
InvalidArgument–tois less thanfromRaise:
NullArgument–resource_id, from,ortoisnullRaise:
OperationFailed– unable to complete requestRaise:
PermissionDenied– authorization failure
Book.get_comments_by_genus_type_for_commentor(resource_id, comment_genus_type)¶Gets a list of comments of the given genus type corresponding to a resource
Id.
Parameters:
- resource_id (
osid.id.Id) – theIdof the resource- comment_genus_type (
osid.type.Type) – the comment genus typeReturns: the returned
CommentListReturn type:
osid.commenting.CommentListRaise:
NullArgument–resource_idorcomment_genus_typeisnullRaise:
OperationFailed– unable to complete requestRaise:
PermissionDenied– authorization failure
Book.get_comments_by_genus_type_for_commentor_on_date(resource_id, comment_genus_type, from_, to)¶Gets a list of all comments of the given genus type corresponding to a resource
Idand effective during the entire given date range inclusive but not confined to the date range.
Parameters:
- resource_id (
osid.id.Id) – theIdof the resource- comment_genus_type (
osid.type.Type) – the comment genus type- from (
osid.calendaring.DateTime) – from date- to (
osid.calendaring.DateTime) – to dateReturns: the returned
CommentListReturn type:
osid.commenting.CommentListRaise:
InvalidArgument–tois less thanfromRaise:
NullArgument–resource_id, comment_genus_type, from,ortoisnullRaise:
OperationFailed– unable to complete requestRaise:
PermissionDenied– authorization failure
Book.get_comments_for_reference(reference_id)¶Gets a list of comments corresponding to a reference
Id.
Parameters: reference_id ( osid.id.Id) – theIdof the referenceReturns: the returned CommentListReturn type: osid.commenting.CommentListRaise: NullArgument–reference_idisnullRaise: OperationFailed– unable to complete requestRaise: PermissionDenied– authorization failure
Book.get_comments_for_reference_on_date(reference_id, from_, to)¶Gets a list of all comments corresponding to a reference
Idand effective during the entire given date range inclusive but not confined to the date range.
Parameters:
- reference_id (
osid.id.Id) – a referenceId- from (
osid.calendaring.DateTime) – from date- to (
osid.calendaring.DateTime) – to dateReturns: the returned
CommentListReturn type:
osid.commenting.CommentListRaise:
InvalidArgument–tois less thanfromRaise:
NullArgument–reference_id, from,ortoisnullRaise:
OperationFailed– unable to complete requestRaise:
PermissionDenied– authorization failure
Book.get_comments_by_genus_type_for_reference(reference_id, comment_genus_type)¶Gets a list of comments of the given genus type corresponding to a reference
Id.
Parameters:
- reference_id (
osid.id.Id) – theIdof the reference- comment_genus_type (
osid.type.Type) – the comment genus typeReturns: the returned
CommentListReturn type:
osid.commenting.CommentListRaise:
NullArgument–reference_idorcomment_genus_typeisnullRaise:
OperationFailed– unable to complete requestRaise:
PermissionDenied– authorization failure
Book.get_comments_by_genus_type_for_reference_on_date(reference_id, comment_genus_type, from_, to)¶Gets a list of all comments of the given genus type corresponding to a reference
Idand effective during the entire given date range inclusive but not confined to the date range.
Parameters:
- reference_id (
osid.id.Id) – a referenceId- comment_genus_type (
osid.type.Type) – the comment genus type- from (
osid.calendaring.DateTime) – from date- to (
osid.calendaring.DateTime) – to dateReturns: the returned
CommentListReturn type:
osid.commenting.CommentListRaise:
InvalidArgument–tois less thanfromRaise:
NullArgument–reference_id, comment_genus_type, from,ortoisnullRaise:
OperationFailed– unable to complete requestRaise:
PermissionDenied– authorization failure
Book.get_comments_for_commentor_and_reference(resource_id, reference_id)¶Gets a list of comments corresponding to a resource and reference
Id.
Parameters:
- resource_id (
osid.id.Id) – theIdof the resource- reference_id (
osid.id.Id) – theIdof the referenceReturns: the returned
CommentListReturn type:
osid.commenting.CommentListRaise:
NullArgument–resource_idorreference_idisnullRaise:
OperationFailed– unable to complete requestRaise:
PermissionDenied– authorization failure
Book.get_comments_for_commentor_and_reference_on_date(resource_id, reference_id, from_, to)¶Gets a list of all comments corresponding to a resource and reference
Idand effective during the entire given date range inclusive but not confined to the date range.
Parameters:
- resource_id (
osid.id.Id) – theIdof the resource- reference_id (
osid.id.Id) – a referenceId- from (
osid.calendaring.DateTime) – from date- to (
osid.calendaring.DateTime) – to dateReturns: the returned
CommentListReturn type:
osid.commenting.CommentListRaise:
InvalidArgument–tois less thanfromRaise:
NullArgument–resource_id, reference_id, from,ortoisnullRaise:
OperationFailed– unable to complete requestRaise:
PermissionDenied– authorization failure
Book.get_comments_by_genus_type_for_commentor_and_reference(resource_id, reference_id, comment_genus_type)¶Gets a list of comments of the given genus type corresponding to a resource and reference
Id.
Parameters:
- resource_id (
osid.id.Id) – theIdof the resource- reference_id (
osid.id.Id) – theIdof the reference- comment_genus_type (
osid.type.Type) – the comment genus typeReturns: the returned
CommentListReturn type:
osid.commenting.CommentListRaise:
NullArgument–resource_id, reference_idorcomment_genus_typeisnullRaise:
OperationFailed– unable to complete requestRaise:
PermissionDenied– authorization failure
Book.get_comments_by_genus_type_for_commentor_and_reference_on_date(resource_id, reference_id, comment_genus_type, from_, to)¶Gets a list of all comments corresponding to a resource and reference
Idand effective during the entire given date range inclusive but not confined to the date range.
Parameters:
- resource_id (
osid.id.Id) – theIdof the resource- reference_id (
osid.id.Id) – a referenceId- comment_genus_type (
osid.type.Type) – the comment genus type- from (
osid.calendaring.DateTime) – from date- to (
osid.calendaring.DateTime) – to dateReturns: the returned
CommentListReturn type:
osid.commenting.CommentListRaise:
InvalidArgument–tois less thanfromRaise:
NullArgument–resource_id, reference_id, comment_genus_type, from,ortoisnullRaise:
OperationFailed– unable to complete requestRaise:
PermissionDenied– authorization failure
Book.comments¶Gets all comments.
Returns: a list of comments Return type: osid.commenting.CommentListRaise: OperationFailed– unable to complete requestRaise: PermissionDenied– authorization failure
Comment Query Methods¶
Book.can_search_comments()¶Tests if this user can perform comment searches. 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 application that may not wish to offer search operations to unauthorized users.
Returns: falseif search methods are not authorized,trueotherwiseReturn type: boolean
Book.use_federated_book_view()Federates the view for methods in this session. A federated view will include comments in books which are children of this book in the book hierarchy.
Book.use_isolated_book_view()Isolates the view for methods in this session. An isolated view restricts retrievals to this book only.
Book.comment_query¶Gets a comment query.
Returns: the comment query Return type: osid.commenting.CommentQuery
Book.get_comments_by_query(comment_query)¶Gets a list of comments matching the given search.
Parameters: comment_query ( osid.commenting.CommentQuery) – the search query arrayReturns: the returned CommentListReturn type: osid.commenting.CommentListRaise: NullArgument–comment_queryisnullRaise: OperationFailed– unable to complete requestRaise: PermissionDenied– authorization failureRaise: Unsupported–comment_queryis not of this service
Comment Admin Methods¶
Book.can_create_comments()¶Tests if this user can create comments. A return of true does not guarantee successful authorization. A return of false indicates that it is known creating a
Commentwill result in aPermissionDenied. This is intended as a hint to an application that may not wish to offer create operations to unauthorized users.
Returns: falseifCommentcreation is not authorized,trueotherwiseReturn type: boolean
Book.can_create_comment_with_record_types(comment_record_types)¶Tests if this user can create a single
Commentusing the desired record types. WhileCommentingManager.getCommentRecordTypes()can be used to examine which records are supported, this method tests which record(s) are required for creating a specificComment. Providing an empty array tests if aCommentcan be created with no records.
Parameters: comment_record_types ( osid.type.Type[]) – array of comment record typesReturns: trueifCommentcreation using the specified recordTypesis supported,falseotherwiseReturn type: booleanRaise: NullArgument–comment_record_typesisnull
Book.get_comment_form_for_create(reference_id, comment_record_types)¶Gets the comment form for creating new comments. A new form should be requested for each create transaction.
Parameters:
- reference_id (
osid.id.Id) – theIdfor the reference object- comment_record_types (
osid.type.Type[]) – array of comment record typesReturns: the comment form
Return type:
osid.commenting.CommentFormRaise:
NullArgument–reference_id or comment_record_typesisnullRaise:
OperationFailed– unable to complete requestRaise:
PermissionDenied– authorization failureRaise:
Unsupported– unable to get form for requested record types
Book.create_comment(comment_form)¶Creates a new
Comment.
Parameters: comment_form ( osid.commenting.CommentForm) – the form for thisCommentReturns: the new CommentReturn type: osid.commenting.CommentRaise: IllegalState–comment_formalready used in a create transactionRaise: InvalidArgument– one or more of the form elements is invalidRaise: NullArgument–comment_formisnullRaise: OperationFailed– unable to complete requestRaise: PermissionDenied– authorization failureRaise: Unsupported–comment_formdid not originate fromget_comment_form_for_create()
Book.can_update_comments()¶Tests if this user can update comments. A return of true does not guarantee successful authorization. A return of false indicates that it is known updating a
Commentwill result in aPermissionDenied. This is intended as a hint to an application that may not wish to offer update operations to unauthorized users.
Returns: falseifCommentmodification is not authorized,trueotherwiseReturn type: boolean
Book.get_comment_form_for_update(comment_id)¶Gets the comment form for updating an existing comment. A new comment form should be requested for each update transaction.
Parameters: comment_id ( osid.id.Id) – theIdof theCommentReturns: the comment form Return type: osid.commenting.CommentFormRaise: NotFound–comment_idis not foundRaise: NullArgument–comment_idisnullRaise: OperationFailed– unable to complete requestRaise: PermissionDenied– authorization failure
Book.update_comment(comment_form)¶Updates an existing comment.
Parameters: comment_form ( osid.commenting.CommentForm) – the form containing the elements to be updatedRaise: IllegalState–comment_formalready used in an update transactionRaise: InvalidArgument– the form contains an invalid valueRaise: NullArgument–comment_formisnullRaise: OperationFailed– unable to complete requestRaise: PermissionDenied– authorization failureRaise: Unsupported–comment_formdid not originate fromget_comment_form_for_update()
Book.can_delete_comments()¶Tests if this user can delete comments. A return of true does not guarantee successful authorization. A return of false indicates that it is known deleting an
Commentwill result in aPermissionDenied. This is intended as a hint to an application that may not wish to offer delete operations to unauthorized users.
Returns: falseifCommentdeletion is not authorized,trueotherwiseReturn type: boolean
Book.delete_comment(comment_id)¶Deletes a
Comment.
Parameters: comment_id ( osid.id.Id) – theIdof theCommentto removeRaise: NotFound–comment_idnot foundRaise: NullArgument–comment_idisnullRaise: OperationFailed– unable to complete requestRaise: PermissionDenied– authorization failure
Book.can_manage_comment_aliases()¶Tests if this user can manage
Idaliases forComnents. 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: falseifCommentaliasing is not authorized,trueotherwiseReturn type: boolean
Book.alias_comment(comment_id, alias_id)¶Adds an
Idto aCommentfor the purpose of creating compatibility. The primaryIdof theCommentis determined by the provider. The newIdperforms as an alias to the primaryId. If the alias is a pointer to another comment, it is reassigned to the given commentId.
Parameters:
- comment_id (
osid.id.Id) – theIdof aComment- alias_id (
osid.id.Id) – the aliasIdRaise:
AlreadyExists–alias_idis already assignedRaise:
NotFound–comment_idnot foundRaise:
NullArgument–comment_idoralias_idisnullRaise:
OperationFailed– unable to complete requestRaise:
PermissionDenied– authorization failure
Objects¶
Comment¶
-
class
dlkit.commenting.objects.Comment¶ Bases:
dlkit.osid.objects.OsidRelationshipA
Commentrepresents a comment and/or rating related to a reference object in a book.-
reference_id¶ Gets the
Idof the referenced object to which this comment pertains.Returns: the reference IdReturn type: osid.id.Id
-
commentor_id¶ Gets the
Idof the resource who created this comment.Returns: the ResourceIdReturn type: osid.id.Id
-
commentor¶ Gets the resource who created this comment.
Returns: the ResourceReturn type: osid.resource.ResourceRaise: OperationFailed– unable to complete request
-
commenting_agent_id¶ Gets the
Idof the agent who created this comment.Returns: the AgentIdReturn type: osid.id.Id
-
commenting_agent¶ Gets the agent who created this comment.
Returns: the AgentReturn type: osid.authentication.AgentRaise: OperationFailed– unable to complete request
-
text¶ Gets the comment text.
Returns: the comment text Return type: osid.locale.DisplayText
-
has_rating()¶ Tests if this comment includes a rating.
Returns: trueif this comment includes a rating,falseotherwiseReturn type: boolean
-
rating_id¶ Gets the
Idof theGrade.Returns: the AgentIdReturn type: osid.id.IdRaise: IllegalState–has_rating()isfalse
-
rating¶ Gets the
Grade.Returns: the GradeReturn type: osid.grading.GradeRaise: IllegalState–has_rating()isfalseRaise: OperationFailed– unable to complete request
-
get_comment_record(comment_record_type)¶ Gets the comment record corresponding to the given
CommentrecordType.This method is used to retrieve an object implementing the requested record. The
comment_record_typemay be theTypereturned inget_record_types()or any of its parents in aTypehierarchy wherehas_record_type(comment_record_type)istrue.Parameters: comment_record_type ( osid.type.Type) – the type of comment record to retrieveReturns: the comment record Return type: osid.commenting.records.CommentRecordRaise: NullArgument–comment_record_typeisnullRaise: OperationFailed– unable to complete requestRaise: Unsupported–has_record_type(comment_record_type)isfalse
-
Comment Form¶
-
class
dlkit.commenting.objects.CommentForm¶ Bases:
dlkit.osid.objects.OsidRelationshipFormThis is the form for creating and updating
Commentobjects.Like all
OsidFormobjects, various data elements may be set here for use in the create and update methods in theCommentAdminSession. For each data element that may be set, metadata may be examined to provide display hints or data constraints.-
text_metadata¶ Gets the metadata for the text.
Returns: metadata for the text Return type: osid.Metadata
-
text¶ Sets the text.
Parameters: text ( string) – the new textRaise: InvalidArgument–textis invalidRaise: NoAccess–Metadata.isReadOnly()istrueRaise: NullArgument–textisnull
-
rating_metadata¶ Gets the metadata for a rating.
Returns: metadata for the rating Return type: osid.Metadata
-
rating¶ Sets the rating.
Parameters: grade_id ( osid.id.Id) – the new ratingRaise: InvalidArgument–grade_idis invalidRaise: NoAccess–Metadata.isReadOnly()istrueRaise: NullArgument–grade_idisnull
-
get_comment_form_record(comment_record_type)¶ Gets the
CommentFormRecordcorresponding to the given comment recordType.Parameters: comment_record_type ( osid.type.Type) – the comment record typeReturns: the comment form record Return type: osid.commenting.records.CommentFormRecordRaise: NullArgument–comment_record_typeisnullRaise: OperationFailed– unable to complete requestRaise: Unsupported–has_record_type(comment_record_type)isfalse
-
Comment List¶
-
class
dlkit.commenting.objects.CommentList¶ Bases:
dlkit.osid.objects.OsidListLike all
OsidLists,CommentListprovides a means for accessingCommentelements sequentially either one at a time or many at a time.Examples: while (cl.hasNext()) { Comment comment = cl.getNextComment(); }
- or
- while (cl.hasNext()) {
- Comment[] comments = cl.getNextComments(cl.available());
}
-
next_comment¶ Gets the next
Commentin this list.Returns: the next Commentin this list. Thehas_next()method should be used to test that a nextCommentis available before calling this method.Return type: osid.commenting.CommentRaise: IllegalState– no more elements available in this listRaise: OperationFailed– unable to complete request
-
get_next_comments(n)¶ Gets the next set of
Commentelements in this list.The specified amount must be less than or equal to the return from
available().Parameters: n ( cardinal) – the number ofCommentelements requested which must be less than or equal toavailable()Returns: an array of Commentelements.The length of the array is less than or equal to the number specified.Return type: osid.commenting.CommentRaise: IllegalState– no more elements available in this listRaise: OperationFailed– unable to complete request
Book Form¶
-
class
dlkit.commenting.objects.BookForm¶ Bases:
dlkit.osid.objects.OsidCatalogFormThis is the form for creating and updating
Books.Like all
OsidFormobjects, various data elements may be set here for use in the create and update methods in theBookAdminSession. For each data element that may be set, metadata may be examined to provide display hints or data constraints.-
get_book_form_record(book_record_type)¶ Gets the
BookFormRecordcorresponding to the given book recordType.Parameters: book_record_type ( osid.type.Type) – the book record typeReturns: the book form record Return type: osid.commenting.records.BookFormRecordRaise: NullArgument–book_record_typeisnullRaise: OperationFailed– unable to complete requestRaise: Unsupported–has_record_type(book_record_type)isfalse
-
Book List¶
-
class
dlkit.commenting.objects.BookList¶ Bases:
dlkit.osid.objects.OsidListLike all
OsidLists,BookListprovides a means for accessingBookelements sequentially either one at a time or many at a time.Examples: while (bl.hasNext()) { Book book = bl.getNextBook(); }
- or
- while (bl.hasNext()) {
- Book[] books = bl.getNextBooks(bl.available());
}
-
next_book¶ Gets the next
Bookin this list.Returns: the next Bookin this list. Thehas_next()method should be used to test that a nextBookis available before calling this method.Return type: osid.commenting.BookRaise: IllegalState– no more elements available in this listRaise: OperationFailed– unable to complete request
-
get_next_books(n)¶ Gets the next set of
Bookelements in this list.The specified amount must be less than or equal to the return from
available().Parameters: n ( cardinal) – the number ofBookelements requested which must be less than or equal toavailable()Returns: an array of Bookelements.The length of the array is less than or equal to the number specified.Return type: osid.commenting.BookRaise: IllegalState– no more elements available in this listRaise: OperationFailed– unable to complete request
Queries¶
Comment Query¶
-
class
dlkit.commenting.queries.CommentQuery¶ Bases:
dlkit.osid.queries.OsidRelationshipQueryThis is the query for searching comments.
Each method specifies an
ANDterm while multiple invocations of the same method produce a nestedOR.-
match_reference_id(source_id, match)¶ Sets reference
Id.Parameters: - source_id (
osid.id.Id) – a sourceId - match (
boolean) –truefor a positive match,falsefor a negative match
Raise: NullArgument–source_idisnull- source_id (
-
reference_id_terms¶
-
match_commentor_id(resource_id, match)¶ Sets a resource
Idto match a commentor.Parameters: - resource_id (
osid.id.Id) – a resourceId - match (
boolean) –truefor a positive match,falsefor a negative match
Raise: NullArgument–resource_idisnull- resource_id (
-
commentor_id_terms¶
-
supports_commentor_query()¶ Tests if a
ResourceQueryis available.Returns: trueif a resource query is available,falseotherwiseReturn type: boolean
-
commentor_query¶ Gets the query for a resource query.
Multiple retrievals produce a nested
ORterm.Returns: the resource query Return type: osid.resource.ResourceQueryRaise: Unimplemented–supports_commentor_query()isfalse
-
commentor_terms¶
-
match_commenting_agent_id(agent_id, match)¶ Sets an agent
Id.Parameters: - agent_id (
osid.id.Id) – an agentId - match (
boolean) –truefor a positive match,falsefor a negative match
Raise: NullArgument–agent_idisnull- agent_id (
-
commenting_agent_id_terms¶
-
supports_commenting_agent_query()¶ Tests if an
AgentQueryis available.Returns: trueif an agent query is available,falseotherwiseReturn type: boolean
-
commenting_agent_query¶ Gets the query for an agent query.
Multiple retrievals produce a nested
ORterm.Returns: the agent query Return type: osid.authentication.AgentQueryRaise: Unimplemented–supports_commenting_agent_query()isfalse
-
commenting_agent_terms¶
-
match_text(text, string_match_type, match)¶ Matches text.
Parameters: - text (
string) – the text - string_match_type (
osid.type.Type) – a string match type - match (
boolean) –truefor a positive match,falsefor a negative match
Raise: InvalidArgument–textis not ofstring_match_typeRaise: NullArgument–textisnullRaise: Unsupported–supports_string_match_type(string_match_type)isfalse- text (
-
match_any_text(match)¶ Matches a comment that has any text assigned.
Parameters: match ( boolean) –trueto match comments with any text,falseto match comments with no text
-
text_terms¶
-
match_rating_id(grade_id, match)¶ Sets a grade
Id.Parameters: - grade_id (
osid.id.Id) – a gradeId - match (
boolean) –truefor a positive match,falsefor a negative match
Raise: NullArgument–grade_idisnull- grade_id (
-
rating_id_terms¶
-
supports_rating_query()¶ Tests if a
GradeQueryis available.Returns: trueif a rating query is available,falseotherwiseReturn type: boolean
-
rating_query¶ Gets the query for a rating query.
Multiple retrievals produce a nested
ORterm.Returns: the rating query Return type: osid.grading.GradeQueryRaise: Unimplemented–supports_rating_query()isfalse
-
match_any_rating(match)¶ Matches books with any rating.
Parameters: match ( boolean) –trueto match comments with any rating,falseto match comments with no ratings
-
rating_terms¶
-
match_book_id(book_id, match)¶ Sets the book
Idfor this query to match comments assigned to books.Parameters: - book_id (
osid.id.Id) – a bookId - match (
boolean) –truefor a positive match,falsefor a negative match
Raise: NullArgument–book_idisnull- book_id (
-
book_id_terms¶
-
supports_book_query()¶ Tests if a
BookQueryis available.Returns: trueif a book query is available,falseotherwiseReturn type: boolean
-
book_query¶ Gets the query for a book query.
Multiple retrievals produce a nested
ORterm.Returns: the book query Return type: osid.commenting.BookQueryRaise: Unimplemented–supports_book_query()isfalse
-
book_terms¶
-
get_comment_query_record(comment_record_type)¶ Gets the comment query record corresponding to the given
CommentrecordType.Multiple record retrievals produce a nested
ORterm.Parameters: comment_record_type ( osid.type.Type) – a comment record typeReturns: the comment query record Return type: osid.commenting.records.CommentQueryRecordRaise: NullArgument–comment_record_typeisnullRaise: OperationFailed– unable to complete requestRaise: Unsupported–has_record_type(comment_record_type)isfalse
-
Book Query¶
-
class
dlkit.commenting.queries.BookQuery¶ Bases:
dlkit.osid.queries.OsidCatalogQueryThis is the query for searching books.
Each method specifies an
ANDterm while multiple invocations of the same method produce a nestedOR.-
match_comment_id(comment_id, match)¶ Sets the comment
Idfor this query to match comments assigned to books.Parameters: - comment_id (
osid.id.Id) – a commentId - match (
boolean) –truefor a positive match,falsefor a negative match
Raise: NullArgument–comment_idisnull- comment_id (
-
comment_id_terms¶
-
supports_comment_query()¶ Tests if a comment query is available.
Returns: trueif a comment query is available,falseotherwiseReturn type: boolean
-
comment_query¶ Gets the query for a comment.
Returns: the comment query Return type: osid.commenting.CommentQueryRaise: Unimplemented–supports_comment_query()isfalse
-
match_any_comment(match)¶ Matches books with any comment.
Parameters: match ( boolean) –trueto match books with any comment,falseto match books with no comments
-
comment_terms¶
-
match_ancestor_book_id(book_id, match)¶ Sets the book
Idfor this query to match books that have the specified book as an ancestor.Parameters: - book_id (
osid.id.Id) – a bookId - match (
boolean) –truefor a positive match, afalsefor a negative match
Raise: NullArgument–book_idisnull- book_id (
-
ancestor_book_id_terms¶
-
supports_ancestor_book_query()¶ Tests if a
BookQueryis available.Returns: trueif a book query is available,falseotherwiseReturn type: boolean
-
ancestor_book_query¶ Gets the query for a book.
Multiple retrievals produce a nested
ORterm.Returns: the book query Return type: osid.commenting.BookQueryRaise: Unimplemented–supports_ancestor_book_query()isfalse
-
match_any_ancestor_book(match)¶ Matches books with any ancestor.
Parameters: match ( boolean) –trueto match books with any ancestor,falseto match root books
-
ancestor_book_terms¶
-
match_descendant_book_id(book_id, match)¶ Sets the book
Idfor this query to match books that have the specified book as a descendant.Parameters: - book_id (
osid.id.Id) – a bookId - match (
boolean) –truefor a positive match,falsefor a negative match
Raise: NullArgument–book_idisnull- book_id (
-
descendant_book_id_terms¶
-
supports_descendant_book_query()¶ Tests if a
BookQueryis available.Returns: trueif a book query is available,falseotherwiseReturn type: boolean
-
descendant_book_query¶ Gets the query for a book.
Multiple retrievals produce a nested
ORterm.Returns: the book query Return type: osid.commenting.BookQueryRaise: Unimplemented–supports_descendant_book_query()isfalse
-
match_any_descendant_book(match)¶ Matches books with any descendant.
Parameters: match ( boolean) –trueto match books with any descendant,falseto match leaf books
-
descendant_book_terms¶
-
get_book_query_record(book_record_type)¶ Gets the book query record corresponding to the given
BookrecordType.Multiple record retrievals produce a nested boolean
ORterm.Parameters: book_record_type ( osid.type.Type) – a book record typeReturns: the book query record Return type: osid.commenting.records.BookQueryRecordRaise: NullArgument–book_record_typeisnullRaise: OperationFailed– unable to complete requestRaise: Unsupported–has_record_type(book_record_type)isfalse
-
Records¶
Comment Record¶
-
class
dlkit.commenting.records.CommentRecord¶ Bases:
dlkit.osid.records.OsidRecordA record for a
Comment.The methods specified by the record type are available through the underlying object.
Comment Query Record¶
-
class
dlkit.commenting.records.CommentQueryRecord¶ Bases:
dlkit.osid.records.OsidRecordA record for a
CommentQuery.The methods specified by the record type are available through the underlying object.
Comment Form Record¶
-
class
dlkit.commenting.records.CommentFormRecord¶ Bases:
dlkit.osid.records.OsidRecordA record for a
CommentForm.The methods specified by the record type are available through the underlying object.
Book Record¶
-
class
dlkit.commenting.records.BookRecord¶ Bases:
dlkit.osid.records.OsidRecordA record for a
Book.The methods specified by the record type are available through the underlying object.
Book Query Record¶
-
class
dlkit.commenting.records.BookQueryRecord¶ Bases:
dlkit.osid.records.OsidRecordA record for a
BookQuery.The methods specified by the record type are available through the underlying object.
Book Form Record¶
-
class
dlkit.commenting.records.BookFormRecord¶ Bases:
dlkit.osid.records.OsidRecordA record for a
BookForm.The methods specified by the record type are available through the underlying object.
Learning¶
Summary¶
Learning Open Service Interface Definitions learning version 3.0.0
The Learning OSID manages learning objectives. A learning Objective
describes measurable learning goals.
Objectives
Objectives describe measurable learning goals. A learning objective
may be measured by a related Assesment. Objectives may be
mapped to levels, A level is represented by a Grade which is used to
indicate a grade level or level of difficulty.
Objectives are hierarchical. An Objective with children
represents an objective that is inclusive of all its children. For
example, an Objective that represents learning in arithmetic may be
composed of objectives that represent learning in both addition and
subtraction.
Objectives may also have requisites. A requisite objective is one
that should be achieved before an objective is attempted.
Activities
An Activity describes actions that one can do to meet a learning
objective. An Activity includes a list of Assets to read or
watch, or a list of Courses to take, or a list of learning
Assessments to practice. An Activity may also represent other
learning activities such as taking a course or practicing an instrument.
An Activity is specific to an Objective where the reusability is
achieved based on what the Activity relates.
Proficiencies
A Proficiency is an OsidRelationship measuring the competence of
a Resource with respect to an Objective.
Objective Bank Cataloging
Objectives, Activities, and Proficiencies can be organized into
hierarchical ObjectiveBanks for the purposes of categorization and
federation.
Concept Mapping
A concept can be modeled as a learning Objective without any related
Assessment or Activities. In this scenario, an Objective
looks much like the simpler Subject in the Ontology OSID. The
Ontology OSID is constrained to qualifying concepts while the relations
found in an Objective allow for the quantification of the learning
concept and providing paths to self-learning.
The Topology OSID may also be used to construct and view a concept map.
While a Topology OSID Provider may be adapted from a Learning OSID or an
Ontology OSID, the topology for either would be interpreted from a
multi-parented hierarchy of the Objectives and Subjects
respectively.
Courses
The Learning OSID may be used in conjunction with the Course OSID to identify dsired learning oitcomes from a course or to align the course activities and syllabus with stated learning objectives. The Course OSID describes learning from a structured curriculum management point of view where the Learning OSID and allows for various objectives to be combined and related without any regard to a prescribed curriculum.
Sub Packages
The Learning OSID contains a Learning Batch OSID for bulk management of
Objectives, Activities, and Proficiencies .
Learning Open Service Interface Definitions learning version 3.0.0
The Learning OSID manages learning objectives. A learning Objective
describes measurable learning goals.
Objectives
Objectives describe measurable learning goals. A learning objective
may be measured by a related Assesment. Objectives may be
mapped to levels, A level is represented by a Grade which is used to
indicate a grade level or level of difficulty.
Objectives are hierarchical. An Objective with children
represents an objective that is inclusive of all its children. For
example, an Objective that represents learning in arithmetic may be
composed of objectives that represent learning in both addition and
subtraction.
Objectives may also have requisites. A requisite objective is one
that should be achieved before an objective is attempted.
Activities
An Activity describes actions that one can do to meet a learning
objective. An Activity includes a list of Assets to read or
watch, or a list of Courses to take, or a list of learning
Assessments to practice. An Activity may also represent other
learning activities such as taking a course or practicing an instrument.
An Activity is specific to an Objective where the reusability is
achieved based on what the Activity relates.
Proficiencies
A Proficiency is an OsidRelationship measuring the competence of
a Resource with respect to an Objective.
Objective Bank Cataloging
Objectives, Activities, and Proficiencies can be organized into
hierarchical ObjectiveBanks for the purposes of categorization and
federation.
Concept Mapping
A concept can be modeled as a learning Objective without any related
Assessment or Activities. In this scenario, an Objective
looks much like the simpler Subject in the Ontology OSID. The
Ontology OSID is constrained to qualifying concepts while the relations
found in an Objective allow for the quantification of the learning
concept and providing paths to self-learning.
The Topology OSID may also be used to construct and view a concept map.
While a Topology OSID Provider may be adapted from a Learning OSID or an
Ontology OSID, the topology for either would be interpreted from a
multi-parented hierarchy of the Objectives and Subjects
respectively.
Courses
The Learning OSID may be used in conjunction with the Course OSID to identify dsired learning oitcomes from a course or to align the course activities and syllabus with stated learning objectives. The Course OSID describes learning from a structured curriculum management point of view where the Learning OSID and allows for various objectives to be combined and related without any regard to a prescribed curriculum.
Sub Packages
The Learning OSID contains a Learning Batch OSID for bulk management of
Objectives, Activities, and Proficiencies .
Service Managers¶
Learning Manager¶
-
class
dlkit.services.learning.LearningManager¶ Bases:
dlkit.osid.managers.OsidManager,dlkit.osid.sessions.OsidSession,dlkit.services.learning.LearningProfile-
learning_batch_manager¶ Gets a
LearningBatchManager.Returns: a LearningBatchManagerReturn type: osid.learning.batch.LearningBatchManagerRaise: OperationFailed– unable to complete requestRaise: Unimplemented–supports_learning_batch() is false
-
Learning Profile Methods¶
LearningManager.supports_objective_lookup()¶Tests if an objective lookup service is supported. An objective lookup service defines methods to access objectives.
Returns: true if objective lookup is supported, false otherwise Return type: boolean
LearningManager.supports_objective_admin()¶Tests if an objective administrative service is supported.
Returns: trueif objective admin is supported,falseotherwiseReturn type: boolean
LearningManager.supports_objective_hierarchy()¶Tests if an objective hierarchy traversal is supported.
Returns: trueif an objective hierarchy traversal is supported,falseotherwiseReturn type: boolean
LearningManager.supports_objective_hierarchy_design()¶Tests if an objective hierarchy design is supported.
Returns: trueif an objective hierarchy design is supported,falseotherwiseReturn type: boolean
LearningManager.supports_objective_sequencing()¶Tests if an objective sequencing design is supported.
Returns: trueif objective sequencing is supported,falseotherwiseReturn type: boolean
LearningManager.supports_objective_requisite()¶Tests if an objective requisite service is supported.
Returns: trueif objective requisite service is supported,falseotherwiseReturn type: boolean
LearningManager.supports_objective_requisite_assignment()¶Tests if an objective requisite assignment service is supported.
Returns: trueif objective requisite assignment service is supported,falseotherwiseReturn type: boolean
LearningManager.supports_activity_lookup()¶Tests if an activity lookup service is supported.
Returns: trueif activity lookup is supported,falseotherwiseReturn type: boolean
LearningManager.supports_activity_admin()¶Tests if an activity administrative service is supported.
Returns: trueif activity admin is supported,falseotherwiseReturn type: boolean
LearningManager.supports_objective_bank_lookup()¶Tests if an objective bank lookup service is supported.
Returns: trueif objective bank lookup is supported,falseotherwiseReturn type: boolean
LearningManager.supports_objective_bank_admin()¶Tests if an objective bank administrative service is supported.
Returns: trueif objective bank admin is supported,falseotherwiseReturn type: boolean
LearningManager.supports_objective_bank_hierarchy()¶Tests if an objective bank hierarchy traversal is supported.
Returns: trueif an objective bank hierarchy traversal is supported,falseotherwiseReturn type: boolean
LearningManager.supports_objective_bank_hierarchy_design()¶Tests if objective bank hierarchy design is supported.
Returns: trueif an objective bank hierarchy design is supported,falseotherwiseReturn type: boolean
LearningManager.objective_record_types¶Gets the supported
Objectiverecord types.
Returns: a list containing the supported Objectiverecord typesReturn type: osid.type.TypeList
LearningManager.objective_search_record_types¶Gets the supported
Objectivesearch record types.
Returns: a list containing the supported Objectivesearch record typesReturn type: osid.type.TypeList
LearningManager.activity_record_types¶Gets the supported
Activityrecord types.
Returns: a list containing the supported Activityrecord typesReturn type: osid.type.TypeList
LearningManager.activity_search_record_types¶Gets the supported
Activitysearch record types.
Returns: a list containing the supported Activitysearch record typesReturn type: osid.type.TypeList
LearningManager.proficiency_record_types¶Gets the supported
Proficiencyrecord types.
Returns: a list containing the supported Proficiencyrecord typesReturn type: osid.type.TypeList
LearningManager.proficiency_search_record_types¶Gets the supported
Proficiencysearch types.
Returns: a list containing the supported Proficiencysearch typesReturn type: osid.type.TypeList
LearningManager.objective_bank_record_types¶Gets the supported
ObjectiveBankrecord types.
Returns: a list containing the supported ObjectiveBankrecord typesReturn type: osid.type.TypeList
LearningManager.objective_bank_search_record_types¶Gets the supported objective bank search record types.
Returns: a list containing the supported ObjectiveBanksearch record typesReturn type: osid.type.TypeList
Objective Bank Lookup Methods¶
LearningManager.can_lookup_objective_banks()¶Tests if this user can perform
ObjectiveBanklookups. 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: falseif lookup methods are not authorized,trueotherwiseReturn type: boolean
LearningManager.use_comparative_objective_bank_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.
LearningManager.use_plenary_objective_bank_view()¶A complete view of the
ObjectiveBankreturns 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.
LearningManager.get_objective_banks_by_ids(objective_bank_ids)¶Gets a
ObjectiveBankListcorresponding to the givenIdList. In plenary mode, the returned list contains all of the objective banks specified in theIdlist, in the order of the list, including duplicates, or an error results if anIdin the supplied list is not found or inaccessible. Otherwise, inaccessibleObjectiveBankobjects may be omitted from the list and may present the elements in any order including returning a unique set.
Parameters: objective_bank_ids ( osid.id.IdList) – the list ofIdsto retrieveReturns: the returned ObjectiveBanklistReturn type: osid.learning.ObjectiveBankListRaise: NotFound– anId wasnot foundRaise: NullArgument–objective_bank_idsisnullRaise: OperationFailed– unable to complete requestRaise: PermissionDenied– authorization failure
LearningManager.get_objective_banks_by_genus_type(objective_bank_genus_type)¶Gets a
ObjectiveBankListcorresponding to the given objective bank genusTypewhich does not include objective banks of types derived from the specifiedType. In plenary mode, the returned list contains all known objective banks or an error results. Otherwise, the returned list may contain only those objective banks that are accessible through this session.
Parameters: objective_bank_genus_type ( osid.type.Type) – an objective bank genus typeReturns: the returned ObjectiveBanklistReturn type: osid.learning.ObjectiveBankListRaise: NullArgument–objective_bank_genus_typeisnullRaise: OperationFailed– unable to complete requestRaise: PermissionDenied– authorization failure
LearningManager.get_objective_banks_by_parent_genus_type(objective_bank_genus_type)¶Gets a
ObjectiveBankListcorresponding to the given objective bank genusTypeand include any additional objective banks with genus types derived from the specifiedType. In plenary mode, the returned list contains all known objective banks or an error results. Otherwise, the returned list may contain only those objective banks that are accessible through this session.
Parameters: objective_bank_genus_type ( osid.type.Type) – an objective bank genus typeReturns: the returned ObjectiveBanklistReturn type: osid.learning.ObjectiveBankListRaise: NullArgument–objective_bank_genus_typeisnullRaise: OperationFailed– unable to complete requestRaise: PermissionDenied– authorization failure
LearningManager.get_objective_banks_by_record_type(objective_bank_record_type)¶Gets a
ObjectiveBankListcontaining the given objective bank recordType. In plenary mode, the returned list contains all known objective banks or an error results. Otherwise, the returned list may contain only those objective banks that are accessible through this session.
Parameters: objective_bank_record_type ( osid.type.Type) – an objective bank record typeReturns: the returned ObjectiveBanklistReturn type: osid.learning.ObjectiveBankListRaise: NullArgument–objective_bank_record_typeisnullRaise: OperationFailed– unable to complete requestRaise: PermissionDenied– authorization failure
LearningManager.get_objective_banks_by_provider(resource_id)¶Gets a
ObjectiveBankListfor the given provider. In plenary mode, the returned list contains all known objective banks or an error results. Otherwise, the returned list may contain only those objective banks that are accessible through this session.
Parameters: resource_id ( osid.id.Id) – a resourceIdReturns: the returned ObjectiveBanklistReturn type: osid.learning.ObjectiveBankListRaise: NullArgument–resource_idisnullRaise: OperationFailed– unable to complete requestRaise: PermissionDenied– authorization failure
LearningManager.objective_banks¶Gets all
ObjectiveBanks. In plenary mode, the returned list contains all known objective banks or an error results. Otherwise, the returned list may contain only those objective banks that are accessible through this session.
Returns: a ObjectiveBankListReturn type: osid.learning.ObjectiveBankListRaise: OperationFailed– unable to complete requestRaise: PermissionDenied– authorization failure
Objective Bank Admin Methods¶
LearningManager.can_create_objective_banks()¶Tests if this user can create
ObjectiveBanks. A return of true does not guarantee successful authorization. A return of false indicates that it is known creating anObjectiveBankwill result in aPermissionDenied. This is intended as a hint to an application that may not wish to offer create operations to unauthorized users.
Returns: falseifObjectiveBankcreation is not authorized,trueotherwiseReturn type: boolean
LearningManager.can_create_objective_bank_with_record_types(objective_bank_record_types)¶Tests if this user can create a single
ObjectiveBankusing the desired record types. WhileLearningManager.getObjectiveBankRecordTypes()can be used to examine which records are supported, this method tests which record(s) are required for creating a specificObjectiveBank. Providing an empty array tests if anObjectiveBankcan be created with no records.
Parameters: objective_bank_record_types ( osid.type.Type[]) – array of objective bank record typesReturns: trueifObjectiveBankcreation using the specifiedTypesis supported,falseotherwiseReturn type: booleanRaise: NullArgument–objective_bank_record_typesisnull
LearningManager.get_objective_bank_form_for_create(objective_bank_record_types)¶Gets the objective bank form for creating new objective banks. A new form should be requested for each create transaction.
Parameters: objective_bank_record_types ( osid.type.Type[]) – array of objective bank record typesReturns: the objective bank form Return type: osid.learning.ObjectiveBankFormRaise: NullArgument–objective_bank_record_typesisnullRaise: OperationFailed– unable to complete requestRaise: PermissionDenied– authorization failureRaise: Unsupported– unable to get form for requested record types.
LearningManager.create_objective_bank(objective_bank_form)¶Creates a new
ObjectiveBank.
Parameters: objective_bank_form ( osid.learning.ObjectiveBankForm) – the form for thisObjectiveBankReturns: the new ObjectiveBankReturn type: osid.learning.ObjectiveBankRaise: IllegalState–objective_bank_formalready used in a create transactionRaise: InvalidArgument– one or more of the form elements is invalidRaise: NullArgument–objective_bank_formisnullRaise: OperationFailed– unable to complete requestRaise: PermissionDenied– authorization failureRaise: Unsupported–objective_bank_formdid not originate fromget_objective_bank_form_for_create()
LearningManager.can_update_objective_banks()¶Tests if this user can update
ObjectiveBanks. A return of true does not guarantee successful authorization. A return of false indicates that it is known updating anObjectiveBankwill result in aPermissionDenied. This is intended as a hint to an application that may not wish to offer update operations to unauthorized users.
Returns: falseifObjectiveBankmodification is not authorized,trueotherwiseReturn type: boolean
LearningManager.get_objective_bank_form_for_update(objective_bank_id)¶Gets the objective bank form for updating an existing objective bank. A new objective bank form should be requested for each update transaction.
Parameters: objective_bank_id ( osid.id.Id) – theIdof theObjectiveBankReturns: the objective bank form Return type: osid.learning.ObjectiveBankFormRaise: NotFound–objective_bank_idis not foundRaise: NullArgument–objective_bank_idisnullRaise: OperationFailed– unable to complete requestRaise: PermissionDenied– authorization failure
LearningManager.update_objective_bank(objective_bank_form)¶Updates an existing objective bank.
Parameters: objective_bank_form ( osid.learning.ObjectiveBankForm) – the form containing the elements to be updatedRaise: IllegalState–objective_bank_formalready used in an update transactionRaise: InvalidArgument– the form contains an invalid valueRaise: NullArgument–objective_bank_formisnullRaise: OperationFailed– unable to complete requestRaise: PermissionDenied– authorization failureRaise: Unsupported–objective_bank_form did not originate from get_objective_bank_form_for_update()
LearningManager.can_delete_objective_banks()¶Tests if this user can delete objective banks. A return of true does not guarantee successful authorization. A return of false indicates that it is known deleting an
ObjectiveBankwill result in aPermissionDenied. This is intended as a hint to an application that may not wish to offer delete operations to unauthorized users.
Returns: falseifObjectiveBankdeletion is not authorized,trueotherwiseReturn type: boolean
LearningManager.delete_objective_bank(objective_bank_id)¶Deletes an
ObjectiveBank.
Parameters: objective_bank_id ( osid.id.Id) – theIdof theObjectiveBankto removeRaise: NotFound–objective_bank_idnot foundRaise: NullArgument–objective_bank_idisnullRaise: OperationFailed– unable to complete requestRaise: PermissionDenied– authorization failure
LearningManager.can_manage_objective_bank_aliases()¶Tests if this user can manage
Idaliases forObjectiveBanks. 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: falseifObjectiveBankaliasing is not authorized,trueotherwiseReturn type: boolean
LearningManager.alias_objective_bank(objective_bank_id, alias_id)¶Adds an
Idto anObjectiveBankfor the purpose of creating compatibility. The primaryIdof theObjectiveBankis determined by the provider. The newIdperforms as an alias to the primaryId. If the alias is a pointer to another objective bank, it is reassigned to the given objective bankId.
Parameters:
- objective_bank_id (
osid.id.Id) – theIdof anObjectiveBank- alias_id (
osid.id.Id) – the aliasIdRaise:
AlreadyExists–alias_idis already assignedRaise:
NotFound–objective_bank_idnot foundRaise:
NullArgument–objective_bank_idoralias_idisnullRaise:
OperationFailed– unable to complete requestRaise:
PermissionDenied– authorization failure
Objective Bank Hierarchy Methods¶
LearningManager.objective_bank_hierarchy_id¶Gets the hierarchy
Idassociated with this session.
Returns: the hierarchy Idassociated with this sessionReturn type: osid.id.Id
LearningManager.objective_bank_hierarchy¶Gets the hierarchy associated with this session.
Returns: the hierarchy associated with this session Return type: osid.hierarchy.HierarchyRaise: OperationFailed– unable to complete requestRaise: PermissionDenied– authorization failure
LearningManager.can_access_objective_bank_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: falseif hierarchy traversal methods are not authorized,trueotherwiseReturn type: boolean
LearningManager.use_comparative_objective_bank_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.
LearningManager.use_plenary_objective_bank_view()A complete view of the
ObjectiveBankreturns 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.
LearningManager.root_objective_bank_ids¶Gets the root objective bank
Idsin this hierarchy.
Returns: the root objective bank IdsReturn type: osid.id.IdListRaise: OperationFailed– unable to complete requestRaise: PermissionDenied– authorization failure
LearningManager.root_objective_banks¶Gets the root objective banks in this objective bank hierarchy.
Returns: the root objective banks Return type: osid.learning.ObjectiveBankListRaise: OperationFailed– unable to complete requestRaise: PermissionDenied– authorization failure
LearningManager.has_parent_objective_banks(objective_bank_id)¶Tests if the
ObjectiveBankhas any parents.
Parameters: objective_bank_id ( osid.id.Id) – theIdof an objective bankReturns: trueif the objective bank has parents,falseotherwiseReturn type: booleanRaise: NotFound–objective_bank_idis not foundRaise: NullArgument–objective_bank_idisnullRaise: OperationFailed– unable to complete requestRaise: PermissionDenied– authorization failure
LearningManager.is_parent_of_objective_bank(id_, objective_bank_id)¶Tests if an
Idis a direct parent of an objective bank.
Parameters:
- id (
osid.id.Id) – anId- objective_bank_id (
osid.id.Id) – theIdof an objective bankReturns:
trueif thisidis a parent ofobjective_bank_id,falseotherwiseReturn type:
booleanRaise:
NotFound–objective_bank_idis not foundRaise:
NullArgument–idorobjective_bank_idisnullRaise:
OperationFailed– unable to complete requestRaise:
PermissionDenied– authorization failure
LearningManager.get_parent_objective_bank_ids(objective_bank_id)¶Gets the parent
Idsof the given objective bank.
Parameters: objective_bank_id ( osid.id.Id) – theIdof an objective bankReturns: the parent Idsof the objective bankReturn type: osid.id.IdListRaise: NotFound–objective_bank_idis not foundRaise: NullArgument–objective_bank_idisnullRaise: OperationFailed– unable to complete requestRaise: PermissionDenied– authorization failure
LearningManager.get_parent_objective_banks(objective_bank_id)¶Gets the parents of the given objective bank.
Parameters: objective_bank_id ( osid.id.Id) – theIdof an objective bankReturns: the parents of the objective bank Return type: osid.learning.ObjectiveBankListRaise: NotFound–objective_bank_idis not foundRaise: NullArgument–objective_bank_idisnullRaise: OperationFailed– unable to complete requestRaise: PermissionDenied– authorization failure
LearningManager.is_ancestor_of_objective_bank(id_, objective_bank_id)¶Tests if an
Idis an ancestor of an objective bank.
Parameters:
- id (
osid.id.Id) – anId- objective_bank_id (
osid.id.Id) – theIdof an objective bankReturns:
trueif thisidis an ancestor ofobjective_bank_id,falseotherwiseReturn type:
booleanRaise:
NotFound–objective_bank_idis not foundRaise:
NullArgument–idorobjective_bank_idisnullRaise:
OperationFailed– unable to complete requestRaise:
PermissionDenied– authorization failure
LearningManager.has_child_objective_banks(objective_bank_id)¶Tests if an objective bank has any children.
Parameters: objective_bank_id ( osid.id.Id) – theIdof an objective bankReturns: trueif theobjective_bank_idhas children,falseotherwiseReturn type: booleanRaise: NotFound–objective_bank_idis not foundRaise: NullArgument–objective_bank_idisnullRaise: OperationFailed– unable to complete requestRaise: PermissionDenied– authorization failure
LearningManager.is_child_of_objective_bank(id_, objective_bank_id)¶Tests if an objective bank is a direct child of another.
Parameters:
- id (
osid.id.Id) – anId- objective_bank_id (
osid.id.Id) – theIdof an objective bankReturns:
trueif theidis a child ofobjective_bank_id,falseotherwiseReturn type:
booleanRaise:
NotFound–objective_bank_idis not foundRaise:
NullArgument–idorobjective_bank_idisnullRaise:
OperationFailed– unable to complete requestRaise:
PermissionDenied– authorization failure
LearningManager.get_child_objective_bank_ids(objective_bank_id)¶Gets the child
Idsof the given objective bank.
Parameters: objective_bank_id ( osid.id.Id) – theIdto queryReturns: the children of the objective bank Return type: osid.id.IdListRaise: NotFound–objective_bank_idis not foundRaise: NullArgument–objective_bank_idisnullRaise: OperationFailed– unable to complete requestRaise: PermissionDenied– authorization failure
LearningManager.get_child_objective_banks(objective_bank_id)¶Gets the children of the given objective bank.
Parameters: objective_bank_id ( osid.id.Id) – theIdto queryReturns: the children of the objective bank Return type: osid.learning.ObjectiveBankListRaise: NotFound–objective_bank_idis not foundRaise: NullArgument–objective_bank_idisnullRaise: OperationFailed– unable to complete requestRaise: PermissionDenied– authorization failure
LearningManager.is_descendant_of_objective_bank(id_, objective_bank_id)¶Tests if an
Idis a descendant of an objective bank.
Parameters:
- id (
osid.id.Id) – anId- objective_bank_id (
osid.id.Id) – theIdof an objective bankReturns:
trueif theidis a descendant of theobjective_bank_id,falseotherwiseReturn type:
booleanRaise:
NotFound–objective_bank_idis not foundRaise:
NullArgument–idorobjective_bank_idisnullRaise:
OperationFailed– unable to complete requestRaise:
PermissionDenied– authorization failure
LearningManager.get_objective_bank_node_ids(objective_bank_id, ancestor_levels, descendant_levels, include_siblings)¶Gets a portion of the hierarchy for the given objective bank.
Parameters:
- objective_bank_id (
osid.id.Id) – theIdto 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) –trueto include the siblings of the given node,falseto omit the siblingsReturns: a catalog node
Return type:
osid.hierarchy.NodeRaise:
NotFound–objective_bank_idnot foundRaise:
NullArgument–objective_bank_idisnullRaise:
OperationFailed– unable to complete requestRaise:
PermissionDenied– authorization failure
LearningManager.get_objective_bank_nodes(objective_bank_id, ancestor_levels, descendant_levels, include_siblings)¶Gets a portion of the hierarchy for the given objective bank.
Parameters:
- objective_bank_id (
osid.id.Id) – theIdto 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) –trueto include the siblings of the given node,falseto omit the siblingsReturns: an objective bank node
Return type:
osid.learning.ObjectiveBankNodeRaise:
NotFound–objective_bank_idnot foundRaise:
NullArgument–objective_bank_idisnullRaise:
OperationFailed– unable to complete requestRaise:
PermissionDenied– authorization failure
Objective Bank Hierarchy Design Methods¶
LearningManager.objective_bank_hierarchy_idGets the hierarchy
Idassociated with this session.
Returns: the hierarchy Idassociated with this sessionReturn type: osid.id.Id
LearningManager.objective_bank_hierarchyGets the hierarchy associated with this session.
Returns: the hierarchy associated with this session Return type: osid.hierarchy.HierarchyRaise: OperationFailed– unable to complete requestRaise: PermissionDenied– authorization failure
LearningManager.can_modify_objective_bank_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: falseif changing this hierarchy is not authorized,trueotherwiseReturn type: boolean
LearningManager.add_root_objective_bank(objective_bank_id)¶Adds a root objective bank.
Parameters: objective_bank_id ( osid.id.Id) – theIdof an objective bankRaise: AlreadyExists–objective_bank_idis already in hierarchyRaise: NotFound–objective_bank_idnot foundRaise: NullArgument–objective_bank_idisnullRaise: OperationFailed– unable to complete requestRaise: PermissionDenied– authorization failure
LearningManager.remove_root_objective_bank(objective_bank_id)¶Removes a root objective bank.
Parameters: objective_bank_id ( osid.id.Id) – theIdof an objective bankRaise: NotFound–objective_bank_idis not a rootRaise: NullArgument–objective_bank_idisnullRaise: OperationFailed– unable to complete requestRaise: PermissionDenied– authorization failure
LearningManager.add_child_objective_bank(objective_bank_id, child_id)¶Adds a child to an objective bank.
Parameters:
- objective_bank_id (
osid.id.Id) – theIdof an objective bank- child_id (
osid.id.Id) – theIdof the new childRaise:
AlreadyExists–objective_bank_idis already a parent ofchild_idRaise:
NotFound–objective_bank_idorchild_idnot foundRaise:
NullArgument–objective_bank_idorchild_idisnullRaise:
OperationFailed– unable to complete requestRaise:
PermissionDenied– authorization failure
LearningManager.remove_child_objective_bank(objective_bank_id, child_id)¶Removes a child from an objective bank.
Parameters:
- objective_bank_id (
osid.id.Id) – theIdof an objective bank- child_id (
osid.id.Id) – theIdof the childRaise:
NotFound–objective_bank_idnot a parent ofchild_idRaise:
NullArgument–objective_bank_idorchild_idisnullRaise:
OperationFailed– unable to complete requestRaise:
PermissionDenied– authorization failure
LearningManager.remove_child_objective_banks(objective_bank_id)¶Removes all children from an objective bank.
Parameters: objective_bank_id ( osid.id.Id) – theIdof an objective bankRaise: NotFound–objective_bank_idnot in hierarchyRaise: NullArgument–objective_bank_idisnullRaise: OperationFailed– unable to complete requestRaise: PermissionDenied– authorization failure
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
ObjectiveBankrecordType. This method is used to retrieve an object implementing the requested record. Theobjective_bank_record_typemay be theTypereturned inget_record_types()or any of its parents in aTypehierarchy 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.ObjectiveBankRecordRaise: NullArgument–objective_bank_record_typeisnullRaise: 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
Objectivelookups. 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: falseif lookup methods are not authorized,trueotherwiseReturn 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
Objectivereturns 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
Objectivespecified by itsId. In plenary mode, the exactIdis found or aNotFoundresults. Otherwise, the returnedObjectivemay have a differentIdthan requested, such as the case where a duplicateIdwas assigned to anObjectiveand retained for compatibility.
Parameters: objective_id ( osid.id.Id) –Idof theObjectiveReturns: the objective Return type: osid.learning.ObjectiveRaise: NotFound–objective_idnot foundRaise: NullArgument–objective_idisnullRaise: OperationFailed– unable to complete requestRaise: PermissionDenied– authorization failure
ObjectiveBank.get_objectives_by_ids(objective_ids)¶Gets an
ObjectiveListcorresponding to the givenIdList. In plenary mode, the returned list contains all of the objectives specified in theIdlist, in the order of the list, including duplicates, or an error results if anIdin the supplied list is not found or inaccessible. Otherwise, inaccessibleObjectivesmay 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 ofIdsto retrieveReturns: the returned ObjectivelistReturn type: osid.learning.ObjectiveListRaise: NotFound– anId wasnot foundRaise: NullArgument–objective_idsisnullRaise: OperationFailed– unable to complete requestRaise: PermissionDenied– authorization failure
ObjectiveBank.get_objectives_by_genus_type(objective_genus_type)¶Gets an
ObjectiveListcorresponding to the given objective genusTypewhich 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 ObjectivelistReturn type: osid.learning.ObjectiveListRaise: NullArgument–objective_genus_typeisnullRaise: OperationFailed– unable to complete requestRaise: PermissionDenied– authorization failure
ObjectiveBank.get_objectives_by_parent_genus_type(objective_genus_type)¶Gets an
ObjectiveListcorresponding to the given objective genusTypeand 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 ObjectivelistReturn type: osid.learning.ObjectiveListRaise: NullArgument–objective_genus_typeisnullRaise: OperationFailed– unable to complete requestRaise: PermissionDenied– authorization failure
ObjectiveBank.get_objectives_by_record_type(objective_record_type)¶Gets an
ObjectiveListcontaining 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 ObjectivelistReturn type: osid.learning.ObjectiveListRaise: NullArgument–objective_record_typeisnullRaise: 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 ObjectiveListReturn type: osid.learning.ObjectiveListRaise: 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: falseifObjectivecreation is not authorized,trueotherwiseReturn type: boolean
ObjectiveBank.can_create_objective_with_record_types(objective_record_types)¶Tests if this user can create a single
Objectiveusing 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 anObjectivecan be created with no records.
Parameters: objective_record_types ( osid.type.Type[]) – array of objective record typesReturns: trueifObjectivecreation using the specified recordTypesis supported,falseotherwiseReturn type: booleanRaise: NullArgument–objective_record_typesisnull
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.ObjectiveFormRaise: NullArgument–objective_record_typesisnullRaise: 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 thisObjectiveReturns: the new ObjectiveReturn type: osid.learning.ObjectiveRaise: IllegalState–objective_formalready used in a create transactionRaise: InvalidArgument– one or more of the form elements is invalidRaise: NullArgument–objective_formisnullRaise: OperationFailed– unable to complete requestRaise: PermissionDenied– authorization failureRaise: Unsupported–objective_formdid 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 anObjectivewill 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: falseif objective modification is not authorized,trueotherwiseReturn 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) – theIdof theObjectiveReturns: the objective form Return type: osid.learning.ObjectiveFormRaise: NotFound–objective_idis not foundRaise: NullArgument–objective_idisnullRaise: 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_formalready used in an update transactionRaise: InvalidArgument– the form contains an invalid valueRaise: NullArgument–objective_formisnullRaise: OperationFailed– unable to complete requestRaise: PermissionDenied– authorization failureRaise: Unsupported–objective_formdid 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 anObjectivewill 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: falseifObjectivedeletion is not authorized,trueotherwiseReturn type: boolean
ObjectiveBank.delete_objective(objective_id)¶Deletes the
Objectiveidentified by the givenId.
Parameters: objective_id ( osid.id.Id) – theIdof theObjectiveto deleteRaise: NotFound– anObjectivewas not found identified by the givenIdRaise: NullArgument–objective_idisnullRaise: OperationFailed– unable to complete requestRaise: PermissionDenied– authorization failure
ObjectiveBank.can_manage_objective_aliases()¶Tests if this user can manage
Idaliases 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: falseifObjectivealiasing is not authorized,trueotherwiseReturn type: boolean
ObjectiveBank.alias_objective(objective_id, alias_id)¶Adds an
Idto anObjectivefor the purpose of creating compatibility. The primaryIdof theObjectiveis determined by the provider. The newIdperforms 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) – theIdof anObjective- alias_id (
osid.id.Id) – the aliasIdRaise:
AlreadyExists–alias_idis already assignedRaise:
NotFound–objective_idnot foundRaise:
NullArgument–objective_idoralias_idisnullRaise:
OperationFailed– unable to complete requestRaise:
PermissionDenied– authorization failure
Objective Hierarchy Methods¶
ObjectiveBank.objective_hierarchy_id¶Gets the hierarchy
Idassociated with this session.
Returns: the hierarchy Idassociated 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.HierarchyRaise: 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: falseif hierarchy traversal methods are not authorized,trueotherwiseReturn 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
Objectivereturns 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
Idsin this hierarchy.
Returns: the root objective IdsReturn type: osid.id.IdListRaise: 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.ObjectiveListRaise: OperationFailed– unable to complete requestRaise: PermissionDenied– authorization failure
ObjectiveBank.has_parent_objectives(objective_id)¶Tests if the
Objectivehas any parents.
Parameters: objective_id ( osid.id.Id) – theIdof an objectiveReturns: trueif the objective has parents,falseotherwiseReturn type: booleanRaise: NotFound–objective_idis not foundRaise: NullArgument–objective_idisnullRaise: OperationFailed– unable to complete requestRaise: PermissionDenied– authorization failure
ObjectiveBank.is_parent_of_objective(id_, objective_id)¶Tests if an
Idis a direct parent of an objective.
Parameters:
- id (
osid.id.Id) – anId- objective_id (
osid.id.Id) – theIdof an objectiveReturns:
trueif thisidis a parent ofobjective_id,falseotherwiseReturn type:
booleanRaise:
NotFound–objective_idis not foundRaise:
NullArgument–idorobjective_idisnullRaise:
OperationFailed– unable to complete requestRaise:
PermissionDenied– authorization failure
ObjectiveBank.get_parent_objective_ids(objective_id)¶Gets the parent
Idsof the given objective.
Parameters: objective_id ( osid.id.Id) – theIdof an objectiveReturns: the parent Idsof the objectiveReturn type: osid.id.IdListRaise: NotFound–objective_idis not foundRaise: NullArgument–objective_idisnullRaise: 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) – theIdof an objectiveReturns: the parents of the objective Return type: osid.learning.ObjectiveListRaise: NotFound–objective_idis not foundRaise: NullArgument–objective_idisnullRaise: OperationFailed– unable to complete requestRaise: PermissionDenied– authorization failure
ObjectiveBank.is_ancestor_of_objective(id_, objective_id)¶Tests if an
Idis an ancestor of an objective.
Parameters:
- id (
osid.id.Id) – anId- objective_id (
osid.id.Id) – theIdof an objectiveReturns:
trueif thisidis an ancestor ofobjective_id,falseotherwiseReturn type:
booleanRaise:
NotFound–objective_idis not foundRaise:
NullArgument–idorobjective_idisnullRaise:
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) – theIdof an objectiveReturns: trueif theobjective_idhas children,falseotherwiseReturn type: booleanRaise: NotFound–objective_idis not foundRaise: NullArgument–objective_idisnullRaise: 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) – theIdof an objectiveReturns:
trueif theidis a child ofobjective_id,falseotherwiseReturn type:
booleanRaise:
NotFound–objective_idis not foundRaise:
NullArgument–idorobjective_idisnullRaise:
OperationFailed– unable to complete requestRaise:
PermissionDenied– authorization failure
ObjectiveBank.get_child_objective_ids(objective_id)¶Gets the child
Idsof the given objective.
Parameters: objective_id ( osid.id.Id) – theIdto queryReturns: the children of the objective Return type: osid.id.IdListRaise: NotFound–objective_idis not foundRaise: NullArgument–objective_idisnullRaise: 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) – theIdto queryReturns: the children of the objective Return type: osid.learning.ObjectiveListRaise: NotFound–objective_idis not foundRaise: NullArgument–objective_idisnullRaise: OperationFailed– unable to complete requestRaise: PermissionDenied– authorization failure
ObjectiveBank.is_descendant_of_objective(id_, objective_id)¶Tests if an
Idis a descendant of an objective.
Parameters:
- id (
osid.id.Id) – anId- objective_id (
osid.id.Id) – theIdof an objectiveReturns:
trueif theidis a descendant of theobjective_id,falseotherwiseReturn type:
booleanRaise:
NotFound–objective_idis not foundRaise:
NullArgument–idorobjective_idisnullRaise:
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) – theIdto 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) –trueto include the siblings of the given node,falseto omit the siblingsReturns: a catalog node
Return type:
osid.hierarchy.NodeRaise:
NotFound–objective_idnot foundRaise:
NullArgument–objective_idisnullRaise:
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) – theIdto 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) –trueto include the siblings of the given node,falseto omit the siblingsReturns: an objective node
Return type:
osid.learning.ObjectiveNodeRaise:
NotFound–objective_idnot foundRaise:
NullArgument–objective_idisnullRaise:
OperationFailed– unable to complete requestRaise:
PermissionDenied– authorization failure
Objective Hierarchy Design Methods¶
ObjectiveBank.objective_hierarchy_idGets the hierarchy
Idassociated with this session.
Returns: the hierarchy Idassociated with this sessionReturn type: osid.id.Id
ObjectiveBank.objective_hierarchyGets the hierarchy associated with this session.
Returns: the hierarchy associated with this session Return type: osid.hierarchy.HierarchyRaise: 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: falseif changing this hierarchy is not authorized,trueotherwiseReturn type: boolean
ObjectiveBank.add_root_objective(objective_id)¶Adds a root objective.
Parameters: objective_id ( osid.id.Id) – theIdof an objectiveRaise: AlreadyExists–objective_idis already in hierarchyRaise: NotFound–objective_idnot foundRaise: NullArgument–objective_idisnullRaise: OperationFailed– unable to complete requestRaise: PermissionDenied– authorization failure
ObjectiveBank.remove_root_objective(objective_id)¶Removes a root objective.
Parameters: objective_id ( osid.id.Id) – theIdof an objectiveRaise: NotFound–objective_idnot foundRaise: NullArgument–objective_idisnullRaise: 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) – theIdof an objective- child_id (
osid.id.Id) – theIdof the new childRaise:
AlreadyExists–objective_idis already a parent ofchild_idRaise:
NotFound–objective_idorchild_idnot foundRaise:
NullArgument–objective_idorchild_idisnullRaise:
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) – theIdof an objective- child_id (
osid.id.Id) – theIdof the new childRaise:
NotFound–objective_idnot a parent ofchild_idRaise:
NullArgument–objective_idorchild_idisnullRaise:
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) – theIdof an objectiveRaise: NotFound–objective_idnot foundRaise: NullArgument–objective_idisnullRaise: OperationFailed– unable to complete requestRaise: PermissionDenied– authorization failure
Objective Sequencing Methods¶
ObjectiveBank.objective_hierarchy_idGets the hierarchy
Idassociated with this session.
Returns: the hierarchy Idassociated with this sessionReturn type: osid.id.Id
ObjectiveBank.objective_hierarchyGets the hierarchy associated with this session.
Returns: the hierarchy associated with this session Return type: osid.hierarchy.HierarchyRaise: 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: falseif sequencing objectives is not authorized,trueotherwiseReturn 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) – theIdof the parent objective- reference_objective_id (
osid.id.Id) – theIdof the objective- objective_id (
osid.id.Id) – theIdof the objective to move ahead ofreference_objective_idRaise:
NotFound–parent_objective_id, reference_objective_id,orobjective_idnot found, orreference_objective_idorobjective_idis not a child ofparent_objective_idRaise:
NullArgument–parent_objective_id, reference_objective_id,oridisnullRaise:
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) – theIdof the parent objective- reference_objective_id (
osid.id.Id) – theIdof the objective- objective_id (
osid.id.Id) – theIdof the objective to move behindreference_objective_idRaise:
NotFound–parent_objective_id, reference_objective_id,orobjective_idnot found, orreference_objective_idorobjective_idis not a child ofparent_objective_idRaise:
NullArgument–parent_objective_id, reference_objective_id,oridisnullRaise:
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) – theIdof the parent objective- objective_ids (
osid.id.Id[]) – theIdof the objectivesRaise:
NotFound–parent_idor anobjective_idnot found, or anobjective_idis not a child ofparent_objective_idRaise:
NullArgument–paren_objectivet_idorobjective_idsisnullRaise:
OperationFailed– unable to complete requestRaise:
PermissionDenied– authorization failure
Objective Requisite Methods¶
ObjectiveBank.can_lookup_objective_prerequisites()¶Tests if this user can perform
Objectivelookups. 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: falseif lookup methods are not authorized,trueotherwiseReturn 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
Objectivereturns 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
Objectivesthat are the immediate requisites for the givenObjective. In plenary mode, the returned list contains all of the immediate requisites, or an error results if anObjectiveis not found or inaccessible. Otherwise, inaccessibleObjectivesmay be omitted from the list and may present the elements in any order including returning a unique set.
Parameters: objective_id ( osid.id.Id) –Idof theObjectiveReturns: the returned requisite ObjectivesReturn type: osid.learning.ObjectiveListRaise: NotFound–objective_idnot foundRaise: NullArgument–objective_idisnullRaise: OperationFailed– unable to complete requestRaise: PermissionDenied– authorization failure
ObjectiveBank.get_all_requisite_objectives(objective_id)¶Gets a list of
Objectivesthat are the requisites for the givenObjectiveincluding 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 anObjectiveis not found or inaccessible. Otherwise, inaccessibleObjectivesmay be omitted from the list and may present the elements in any order including returning a unique set.
Parameters: objective_id ( osid.id.Id) –Idof theObjectiveReturns: the returned ObjectivelistReturn type: osid.learning.ObjectiveListRaise: NotFound–objective_idnot foundRaise: NullArgument–objective_idisnullRaise: OperationFailed– unable to complete requestRaise: PermissionDenied– authorization failure
ObjectiveBank.get_dependent_objectives(objective_id)¶Gets a list of
Objectivesthat 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, inaccessibleObjectivesmay be omitted from the list and may present the elements in any order including returning a unique set.
Parameters: objective_id ( osid.id.Id) –Idof theObjectiveReturns: the returned ObjectivelistReturn type: osid.learning.ObjectiveListRaise: NotFound–objective_idnot foundRaise: NullArgument–objective_idisnullRaise: 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) –Idof the dependentObjective- required_objective_id (
osid.id.Id) –Idof the requiredObjectiveReturns:
trueifobjective_iddepends onrequired_objective_id,falseotherwiseReturn type:
booleanRaise:
NotFound–objective_idnot foundRaise:
NullArgument–objective_idisnullRaise:
OperationFailed– unable to complete requestRaise:
PermissionDenied– authorization failure
ObjectiveBank.get_equivalent_objectives(objective_id)¶Gets a list of
Objectivesthat are equivalent to the givenObjectivefor 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, inaccessibleObjectivesmay be omitted from the list and may present the elements in any order including returning a unique set.
Parameters: objective_id ( osid.id.Id) –Idof theObjectiveReturns: the returned ObjectivelistReturn type: osid.learning.ObjectiveListRaise: NotFound–objective_idnot foundRaise: NullArgument–objective_idisnullRaise: 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: falseif mapping is not authorized,trueotherwiseReturn type: boolean
ObjectiveBank.assign_objective_requisite(objective_id, requisite_objective_id)¶Creates a requirement dependency between two
Objectives.
Parameters:
- objective_id (
osid.id.Id) – theIdof the dependentObjective- requisite_objective_id (
osid.id.Id) – theIdof the requiredObjectiveRaise:
AlreadyExists–objective_idalready mapped torequisite_objective_idRaise:
NotFound–objective_idorrequisite_objective_idnot foundRaise:
NullArgument–objective_idorrequisite_objective_idisnullRaise:
OperationFailed– unable to complete requestRaise:
PermissionDenied– authorization failure
ObjectiveBank.unassign_objective_requisite(objective_id, requisite_objective_id)¶Removes an
Objectiverequisite from anObjective.
Parameters:
- objective_id (
osid.id.Id) – theIdof theObjective- requisite_objective_id (
osid.id.Id) – theIdof the requiredObjectiveRaise:
NotFound–objective_idorrequisite_objective_idnot found orobjective_idnot mapped torequisite_objective_idRaise:
NullArgument–objective_idorrequisite_objective_idisnullRaise:
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) – theIdof the principalObjective- equivalent_objective_id (
osid.id.Id) – theIdof the equivalentObjectiveRaise:
AlreadyExists–objective_idalready mapped toequiavelnt_objective_idRaise:
NotFound–objective_idorequivalent_objective_idnot foundRaise:
NullArgument–objective_idorequivalent_objective_idisnullRaise:
OperationFailed– unable to complete requestRaise:
PermissionDenied– authorization failure
ObjectiveBank.unassign_equivalent_objective(objective_id, equivalent_objective_id)¶Removes an
Objectiverequisite from anObjective.
Parameters:
- objective_id (
osid.id.Id) – theIdof the principalObjective- equivalent_objective_id (
osid.id.Id) – theIdof the equivalentObjectiveRaise:
NotFound–objective_idorequivalent_objective_idnot found orobjective_idis already equivalent toequivalent_objective_idRaise:
NullArgument–objective_idorequivalent_objective_idisnullRaise:
OperationFailed– unable to complete requestRaise:
PermissionDenied– authorization failure
Activity Lookup Methods¶
ObjectiveBank.can_lookup_activities()¶Tests if this user can perform
Activitylookups. 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: falseif lookup methods are not authorized,trueotherwiseReturn 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
Activityreturns 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
Activityspecified by itsId. In plenary mode, the exactIdis found or aNotFoundresults. Otherwise, the returnedActivitymay have a differentIdthan requested, such as the case where a duplicateIdwas assigned to aActivityand retained for compatibility.
Parameters: activity_id ( osid.id.Id) –Idof theActivityReturns: the activity Return type: osid.learning.ActivityRaise: NotFound–activity_idnot foundRaise: NullArgument–activity_idisnullRaise: OperationFailed– unable to complete requestRaise: PermissionDenied– authorization failure
ObjectiveBank.get_activities_by_ids(activity_ids)¶Gets an
ActivityListcorresponding to the givenIdList. In plenary mode, the returned list contains all of the activities specified in theIdlist, in the order of the list, including duplicates, or an error results if anIdin the supplied list is not found or inaccessible. Otherwise, inaccessibleActivitiesmay 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 ofIdsto retrieveReturns: the returned ActivitylistReturn type: osid.learning.ActivityListRaise: NotFound– anId wasnot foundRaise: NullArgument–activity_idsisnullRaise: OperationFailed– unable to complete requestRaise: PermissionDenied– authorization failure
ObjectiveBank.get_activities_by_genus_type(activity_genus_type)¶Gets an
ActivityListcorresponding to the given activity genusTypewhich 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 ActivitylistReturn type: osid.learning.ActivityListRaise: NullArgument–activity_genus_typeisnullRaise: OperationFailed– unable to complete requestRaise: PermissionDenied– authorization failure
ObjectiveBank.get_activities_by_parent_genus_type(activity_genus_type)¶Gets an
ActivityListcorresponding to the given activity genusTypeand 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 ActivitylistReturn type: osid.learning.ActivityListRaise: NullArgument–activity_genus_typeisnullRaise: OperationFailed– unable to complete requestRaise: PermissionDenied– authorization failure
ObjectiveBank.get_activities_by_record_type(activity_record_type)¶Gets a
ActivityListcontaining 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 ActivitylistReturn type: osid.learning.ActivityListRaise: NullArgument–activity_record_typeisnullRaise: 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
Idor an error results if an Id in the supplied list is not found or inaccessible. Otherwise, inaccessibleActivitiesmay be omitted from the list and may present the elements in any order including returning a unique set.
Parameters: objective_id ( osid.id.Id) –Idof theObjectiveReturns: list of enrollments Return type: osid.learning.ActivityListRaise: NotFound–objective_idnot foundRaise: NullArgument–objective_idisnullRaise: 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
Idlist, in the order of the list, including duplicates, or an error results if a course offeringIdin the supplied list is not found or inaccessible. Otherwise, inaccessibleActivitiesmay 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 objectiveIdsReturns: list of activities Return type: osid.learning.ActivityListRaise: NotFound– anobjective_idnot foundRaise: NullArgument–objective_id_listisnullRaise: 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
Idor an error results if anIdin the supplied list is not found or inaccessible. Otherwise, inaccessibleActivitiesmay be omitted from the list and may present the elements in any order including returning a unique set.
Parameters: asset_id ( osid.id.Id) –Idof anAssetReturns: list of activities Return type: osid.learning.ActivityListRaise: NotFound–asset_idnot foundRaise: NullArgument–asset_idisnullRaise: 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
Idor an error results if anIdin the supplied list is not found or inaccessible. Otherwise, inaccessibleActivitiesmay be omitted from the list and may present the elements in any order including returning a unique set.
Parameters: asset_ids ( osid.id.IdList) –IdsofAssetsReturns: list of activities Return type: osid.learning.ActivityListRaise: NotFound– anasset_idnot foundRaise: NullArgument–asset_id_listisnullRaise: 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 ActivityListReturn type: osid.learning.ActivityListRaise: 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 anActivitywill 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: falseifActivitycreation is not authorized,trueotherwiseReturn type: boolean
ObjectiveBank.can_create_activity_with_record_types(activity_record_types)¶Tests if this user can create a single
Activityusing 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 anActivitycan be created with no records.
Parameters: activity_record_types ( osid.type.Type[]) – array of activity record typesReturns: trueifActivitycreation using the specified recordTypesis supported,falseotherwiseReturn type: booleanRaise: NullArgument–activity_record_typesisnull
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) – theIdof theObjective- activity_record_types (
osid.type.Type[]) – array of activity record typesReturns: the activity form
Return type:
osid.learning.ActivityFormRaise:
NotFound–objective_idis not foundRaise:
NullArgument–objective_idoractivity_record_typesisnullRaise:
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 thisActivityReturns: the new ActivityReturn type: osid.learning.ActivityRaise: IllegalState–activity_formalready used in a create transactionRaise: InvalidArgument– one or more of the form elements is invalidRaise: NullArgument–activity_formisnullRaise: OperationFailed– unable to complete requestRaise: PermissionDenied– authorization failureRaise: Unsupported–activity_formdid 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 anActivitywill 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: falseif activity modification is not authorized,trueotherwiseReturn 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) – theIdof theActivityReturns: the activity form Return type: osid.learning.ActivityFormRaise: NotFound–activity_idis not foundRaise: NullArgument–activity_idisnullRaise: 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_formalready used in an update transactionRaise: InvalidArgument– the form contains an invalid valueRaise: NullArgument–activity_formisnullRaise: OperationFailed– unable to complete requestRaise: PermissionDenied– authorization failureRaise: Unsupported–activity_formdid 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 anActivitywill 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: falseifActivitydeletion is not authorized,trueotherwiseReturn type: boolean
ObjectiveBank.delete_activity(activity_id)¶Deletes the
Activityidentified by the givenId.
Parameters: activity_id ( osid.id.Id) – theIdof theActivityto deleteRaise: NotFound– anActivitywas not found identified by the givenIdRaise: NullArgument–activity_idisnullRaise: OperationFailed– unable to complete requestRaise: PermissionDenied– authorization failure
ObjectiveBank.can_manage_activity_aliases()¶Tests if this user can manage
Idaliases 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: falseifActivityaliasing is not authorized,trueotherwiseReturn type: boolean
ObjectiveBank.alias_activity(activity_id, alias_id)¶Adds an
Idto anActivityfor the purpose of creating compatibility. The primaryIdof theActivityis determined by the provider. The newIdperforms 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) – theIdof anActivity- alias_id (
osid.id.Id) – the aliasIdRaise:
AlreadyExists–alias_idis already assignedRaise:
NotFound–activity_idnot foundRaise:
NullArgument–activity_idoralias_idisnullRaise:
OperationFailed– unable to complete requestRaise:
PermissionDenied– authorization failure
Objects¶
Objective¶
-
class
dlkit.learning.objects.Objective¶ Bases:
dlkit.osid.objects.OsidObject,dlkit.osid.markers.FederateableAn
Objectiveis a statable learning objective.-
has_assessment()¶ Tests if an assessment is associated with this objective.
Returns: trueif an assessment exists,falseotherwiseReturn type: boolean
-
assessment_id¶ Gets the assessment
Idassociated with this learning objective.Returns: the assessment IdReturn type: osid.id.IdRaise: IllegalState–has_assessment()isfalse
-
assessment¶ Gets the assessment associated with this learning objective.
Returns: the assessment Return type: osid.assessment.AssessmentRaise: IllegalState–has_assessment()isfalseRaise: OperationFailed– unable to complete request
-
has_knowledge_category()¶ Tests if this objective has a knowledge dimension.
Returns: trueif a knowledge category exists,falseotherwiseReturn type: boolean
-
knowledge_category_id¶ Gets the grade
Idassociated with the knowledge dimension.Returns: the grade IdReturn type: osid.id.IdRaise: IllegalState–has_knowledge_category()isfalse
-
knowledge_category¶ Gets the grade associated with the knowledge dimension.
Returns: the grade Return type: osid.grading.GradeRaise: IllegalState–has_knowledge_category()isfalseRaise: OperationFailed– unable to complete request
-
has_cognitive_process()¶ Tests if this objective has a cognitive process type.
Returns: trueif a cognitive process exists,falseotherwiseReturn type: boolean
-
cognitive_process_id¶ Gets the grade
Idassociated with the cognitive process.Returns: the grade IdReturn type: osid.id.IdRaise: IllegalState–has_cognitive_process()isfalse
-
cognitive_process¶ Gets the grade associated with the cognitive process.
Returns: the grade Return type: osid.grading.GradeRaise: IllegalState–has_cognitive_process()isfalseRaise: OperationFailed– unable to complete request
-
get_objective_record(objective_record_type)¶ Gets the objective bank record corresponding to the given
ObjectiverecordType.This method is used to retrieve an object implementing the requested record. The
objective_record_typemay be theTypereturned inget_record_types()or any of its parents in aTypehierarchy wherehas_record_type(objective_record_type)istrue.Parameters: objective_record_type ( osid.type.Type) – an objective record typeReturns: the objective record Return type: osid.learning.records.ObjectiveRecordRaise: NullArgument–objective_record_typeisnullRaise: OperationFailed– unable to complete requestRaise: Unsupported–has_record_type(objective_record_type)isfalse
-
Objective Form¶
-
class
dlkit.learning.objects.ObjectiveForm¶ Bases:
dlkit.osid.objects.OsidObjectForm,dlkit.osid.objects.OsidFederateableFormThis is the form for creating and updating
Objectives.Like all
OsidFormobjects, various data elements may be set here for use in the create and update methods in theObjectiveAdminSession. For each data element that may be set, metadata may be examined to provide display hints or data constraints.-
assessment_metadata¶ Gets the metadata for an assessment.
Returns: metadata for the assessment Return type: osid.Metadata
-
assessment¶ Sets the assessment.
Parameters: assessment_id ( osid.id.Id) – the new assessmentRaise: InvalidArgument–assessment_idis invalidRaise: NoAccess–assessment_idcannot be modifiedRaise: NullArgument–assessment_idisnull
-
knowledge_category_metadata¶ Gets the metadata for a knowledge category.
Returns: metadata for the knowledge category Return type: osid.Metadata
-
knowledge_category¶ Sets the knowledge category.
Parameters: grade_id ( osid.id.Id) – the new knowledge categoryRaise: InvalidArgument–grade_idis invalidRaise: NoAccess–grade_idcannot be modifiedRaise: NullArgument–grade_idisnull
-
cognitive_process_metadata¶ Gets the metadata for a cognitive process.
Returns: metadata for the cognitive process Return type: osid.Metadata
-
cognitive_process¶ Sets the cognitive process.
Parameters: grade_id ( osid.id.Id) – the new cognitive processRaise: InvalidArgument–grade_idis invalidRaise: NoAccess–grade_idcannot be modifiedRaise: NullArgument–grade_idisnull
-
get_objective_form_record(objective_record_type)¶ Gets the
ObjectiveFormRecordcorresponding to the given objective recordType.Parameters: objective_record_type ( osid.type.Type) – the objective record typeReturns: the objective form record Return type: osid.learning.records.ObjectiveFormRecordRaise: NullArgument–objective_record_typeisnullRaise: OperationFailed– unable to complete requestRaise: Unsupported–has_record_type(objective_record_type)isfalse
-
Objective List¶
-
class
dlkit.learning.objects.ObjectiveList¶ Bases:
dlkit.osid.objects.OsidListLike all
OsidLists,ObjectiveListprovides a means for accessingObjectiveelements sequentially either one at a time or many at a time.Examples: while (ol.hasNext()) { Objective objective = ol.getNextObjective(); }
- or
- while (ol.hasNext()) {
- Objective[] objectives = ol.getNextObjectives(ol.available());
}
-
next_objective¶ Gets the next
Objectivein this list.Returns: the next Objectivein this list. Thehas_next()method should be used to test that a nextObjectiveis available before calling this method.Return type: osid.learning.ObjectiveRaise: IllegalState– no more elements available in this listRaise: OperationFailed– unable to complete request
-
get_next_objectives(n)¶ Gets the next set of
Objectiveelements in this list which must be less than or equal to the number returned fromavailable().Parameters: n ( cardinal) – the number ofObjectiveelements requested which should be less than or equal toavailable()Returns: an array of Objectiveelements.The length of the array is less than or equal to the number specified.Return type: osid.learning.ObjectiveRaise: IllegalState– no more elements available in this listRaise: OperationFailed– unable to complete request
Activity¶
-
class
dlkit.learning.objects.Activity¶ Bases:
dlkit.osid.objects.OsidObject,dlkit.osid.markers.SubjugateableAn
Activityrepresents learning material or other learning activities to meet an objective.An Activity has may relate to a set of
Assstsfor self learning, recommendedCoursesto take, or a learningAssessment. The learningAssessmentdiffers from theObjectiveAssessmentin that the latter used to test for proficiency in theObjective.Generally, an
Activityshould focus on one of assets, courses, assessments, or some other specific activity related to the objective described or related in theActivityRecord.-
objective_id¶ Gets the
Idof the related objective.Returns: the objective IdReturn type: osid.id.Id
-
objective¶ Gets the related objective.
Returns: the related objective Return type: osid.learning.ObjectiveRaise: OperationFailed– unable to complete request
-
is_asset_based_activity()¶ Tests if this is an asset based activity.
Returns: trueif this activity is based on assets,falseotherwiseReturn type: boolean
-
asset_ids¶ Gets the
Idsof any assets associated with this activity.Returns: list of asset IdsReturn type: osid.id.IdListRaise: IllegalState–is_asset_based_activity()isfalse
-
assets¶ Gets any assets associated with this activity.
Returns: list of assets Return type: osid.repository.AssetListRaise: IllegalState–is_asset_based_activity()isfalseRaise: OperationFailed– unable to complete request
-
is_course_based_activity()¶ Tests if this is a course based activity.
Returns: trueif this activity is based on courses,falseotherwiseReturn type: boolean
-
course_ids¶ Gets the
Idsof any courses associated with this activity.Returns: list of course IdsReturn type: osid.id.IdListRaise: IllegalState–is_course_based_activity()isfalse
-
courses¶ Gets any courses associated with this activity.
Returns: list of courses Return type: osid.course.CourseListRaise: IllegalState–is_course_based_activity()isfalseRaise: OperationFailed– unable to complete request
-
is_assessment_based_activity()¶ Tests if this is an assessment based activity.
These assessments are for learning the objective and not for assessing prodiciency in the objective.
Returns: trueif this activity is based on assessments,falseotherwiseReturn type: boolean
-
assessment_ids¶ Gets the
Idsof any assessments associated with this activity.Returns: list of assessment IdsReturn type: osid.id.IdListRaise: IllegalState–is_assessment_based_activity()isfalse
-
assessments¶ Gets any assessments associated with this activity.
Returns: list of assessments Return type: osid.assessment.AssessmentListRaise: IllegalState–is_assessment_based_activity()isfalseRaise: OperationFailed– unable to complete request
-
get_activity_record(activity_record_type)¶ Gets the activity record corresponding to the given
ActivityrecordType.This method is used to retrieve an object implementing the requested record. The
activity_record_typemay be theTypereturned inget_record_types()or any of its parents in aTypehierarchy wherehas_record_type(activity_record_type)istrue.Parameters: activity_record_type ( osid.type.Type) – the type of the record to retrieveReturns: the activity record Return type: osid.learning.records.ActivityRecordRaise: NullArgument–activity_record_typeisnullRaise: OperationFailed– unable to complete requestRaise: Unsupported–has_record_type(activity_record_type)isfalse
-
Activity Form¶
-
class
dlkit.learning.objects.ActivityForm¶ Bases:
dlkit.osid.objects.OsidObjectForm,dlkit.osid.objects.OsidSubjugateableFormThis is the form for creating and updating
Activities.Like all
OsidFormobjects, various data elements may be set here for use in the create and update methods in theActivityAdminSession. For each data element that may be set, metadata may be examined to provide display hints or data constraints.-
assets_metadata¶ Gets the metadata for the assets.
Returns: metadata for the assets Return type: osid.Metadata
-
assets¶ Sets the assets.
Parameters: asset_ids ( osid.id.Id[]) – the assetIdsRaise: InvalidArgument–asset_idsis invalidRaise: NullArgument–asset_idsisnullRaise: NoAccess–Metadata.isReadOnly()istrue
-
courses_metadata¶ Gets the metadata for the courses.
Returns: metadata for the courses Return type: osid.Metadata
-
courses¶ Sets the courses.
Parameters: course_ids ( osid.id.Id[]) – the courseIdsRaise: InvalidArgument–course_idsis invalidRaise: NullArgument–course_idsisnullRaise: NoAccess–Metadata.isReadOnly()istrue
-
assessments_metadata¶ Gets the metadata for the assessments.
Returns: metadata for the assessments Return type: osid.Metadata
-
assessments¶ Sets the assessments.
Parameters: assessment_ids ( osid.id.Id[]) – the assessmentIdsRaise: InvalidArgument–assessment_idsis invalidRaise: NullArgument–assessment_idsisnullRaise: NoAccess–Metadata.isReadOnly()istrue
-
get_activity_form_record(activity_record_type)¶ Gets the
ActivityFormRecordcorresponding to the given activity recordType.Parameters: activity_record_type ( osid.type.Type) – the activity record typeReturns: the activity form record Return type: osid.learning.records.ActivityFormRecordRaise: NullArgument–activity_record_typeisnullRaise: OperationFailed– unable to complete requestRaise: Unsupported–has_record_type(activity_record_type)isfalse
-
Activity List¶
-
class
dlkit.learning.objects.ActivityList¶ Bases:
dlkit.osid.objects.OsidListLike all
OsidLists,ActivityListprovides a means for accessingActivityelements sequentially either one at a time or many at a time.Examples: while (al.hasNext()) { Activity activity = al.getNextActivity(); }
- or
- while (al.hasNext()) {
- Activity[] activities = al.getNextActivities(al.available());
}
-
next_activity¶ Gets the next
Activityin this list.Returns: the next Activityin this list. Thehas_next()method should be used to test that a nextActivityis available before calling this method.Return type: osid.learning.ActivityRaise: IllegalState– no more elements available in this listRaise: OperationFailed– unable to complete request
-
get_next_activities(n)¶ Gets the next set of
Activityelements in this list which must be less than or equal to the number returned fromavailable().Parameters: n ( cardinal) – the number ofActivityelements requested which should be less than or equal toavailable()Returns: an array of Activityelements.The length of the array is less than or equal to the number specified.Return type: osid.learning.ActivityRaise: IllegalState– no more elements available in this listRaise: OperationFailed– unable to complete request
Objective Bank Form¶
-
class
dlkit.learning.objects.ObjectiveBankForm¶ Bases:
dlkit.osid.objects.OsidCatalogFormThis is the form for creating and updating objective banks.
Like all
OsidFormobjects, various data elements may be set here for use in the create and update methods in theObjectiveBankAdminSession. For each data element that may be set, metadata may be examined to provide display hints or data constraints.-
get_objective_bank_form_record(objective_bank_record_type)¶ Gets the
ObjectiveBankFormRecordcorresponding to the given objective bank recordType.Parameters: objective_bank_record_type ( osid.type.Type) – an objective bank record typeReturns: the objective bank form record Return type: osid.learning.records.ObjectiveBankFormRecordRaise: NullArgument–objective_bank_record_typeisnullRaise: OperationFailed– unable to complete requestRaise: Unsupported–has_record_type(objective_bank_record_type)isfalse
-
Objective Bank List¶
-
class
dlkit.learning.objects.ObjectiveBankList¶ Bases:
dlkit.osid.objects.OsidListLike all
OsidLists,ObjectiveBankListprovides a means for accessingObjectiveBankelements sequentially either one at a time or many at a time.Examples: while (obl.hasNext()) { ObjectiveBank objectiveBanks = obl.getNextObjectiveBank(); }
- or
- while (obl.hasNext()) {
- ObjectiveBank[] objectivBanks = obl.getNextObjectiveBanks(obl.available());
}
-
next_objective_bank¶ Gets the next
ObjectiveBankin this list.Returns: the next ObjectiveBankin this list. Thehas_next()method should be used to test that a nextObjectiveBankis available before calling this method.Return type: osid.learning.ObjectiveBankRaise: IllegalState– no more elements available in this listRaise: OperationFailed– unable to complete request
-
get_next_objective_banks(n)¶ Gets the next set of
ObjectiveBankelements in this list which must be less than or equal to the return fromavailable().Parameters: n ( cardinal) – the number ofObjectiveBankelements requested which must be less than or equal toavailable()Returns: an array of ObjectiveBankelements.The length of the array is less than or equal to the number specified.Return type: osid.learning.ObjectiveBankRaise: IllegalState– no more elements available in this listRaise: OperationFailed– unable to complete request
Queries¶
Objective Query¶
-
class
dlkit.learning.queries.ObjectiveQuery¶ Bases:
dlkit.osid.queries.OsidObjectQuery,dlkit.osid.queries.OsidFederateableQueryThis is the query for searching objectives.
Each method match request produces an
ANDterm while multiple invocations of a method produces a nestedOR.-
match_assessment_id(assessment_id, match)¶ Sets the assessment
Idfor this query.Parameters: - assessment_id (
osid.id.Id) – an assessmentId - match (
boolean) –truefor a positive match,falsefor a negative match
Raise: NullArgument–assessment_idisnull- assessment_id (
-
assessment_id_terms¶
-
supports_assessment_query()¶ Tests if an
AssessmentQueryis available for querying activities.Returns: trueif an assessment query is available,falseotherwiseReturn type: boolean
-
assessment_query¶ Gets the query for an assessment.
Multiple retrievals produce a nested
ORterm.Returns: the assessment query Return type: osid.assessment.AssessmentQueryRaise: Unimplemented–supports_assessment_query()isfalse
-
match_any_assessment(match)¶ Matches an objective that has any assessment assigned.
Parameters: match ( boolean) –trueto match objectives with any assessment,falseto match objectives with no assessment
-
assessment_terms¶
-
match_knowledge_category_id(grade_id, match)¶ Sets the knowledge category
Idfor this query.Parameters: - grade_id (
osid.id.Id) – a gradeId - match (
boolean) –truefor a positive match,falsefor a negative match
Raise: NullArgument–grade_idisnull- grade_id (
-
knowledge_category_id_terms¶
-
supports_knowledge_category_query()¶ Tests if a
GradeQueryis available for querying knowledge categories.Returns: trueif a grade query is available,falseotherwiseReturn type: boolean
-
knowledge_category_query¶ Gets the query for a knowledge category.
Multiple retrievals produce a nested
ORterm.Returns: the grade query Return type: osid.grading.GradeQueryRaise: Unimplemented–supports_knowledge_category_query()isfalse
-
match_any_knowledge_category(match)¶ Matches an objective that has any knowledge category.
Parameters: match ( boolean) –trueto match objectives with any knowledge category,falseto match objectives with no knowledge category
-
knowledge_category_terms¶
-
match_cognitive_process_id(grade_id, match)¶ Sets the cognitive process
Idfor this query.Parameters: - grade_id (
osid.id.Id) – a gradeId - match (
boolean) –truefor a positive match,falsefor a negative match
Raise: NullArgument–grade_idisnull- grade_id (
-
cognitive_process_id_terms¶
-
supports_cognitive_process_query()¶ Tests if a
GradeQueryis available for querying cognitive processes.Returns: trueif a grade query is available,falseotherwiseReturn type: boolean
-
cognitive_process_query¶ Gets the query for a cognitive process.
Multiple retrievals produce a nested
ORterm.Returns: the grade query Return type: osid.grading.GradeQueryRaise: Unimplemented–supports_cognitive_process_query()isfalse
-
match_any_cognitive_process(match)¶ Matches an objective that has any cognitive process.
Parameters: match ( boolean) –trueto match objectives with any cognitive process,falseto match objectives with no cognitive process
-
cognitive_process_terms¶
-
match_activity_id(activity_id, match)¶ Sets the activity
Idfor this query.Parameters: - activity_id (
osid.id.Id) – an activityId - match (
boolean) –truefor a positive match,falsefor a negative match
Raise: NullArgument–activity_idisnull- activity_id (
-
activity_id_terms¶
-
supports_activity_query()¶ Tests if an
ActivityQueryis available for querying activities.Returns: trueif an activity query is available,falseotherwiseReturn type: boolean
-
activity_query¶ Gets the query for an activity.
Multiple retrievals produce a nested
ORterm.Returns: the activity query Return type: osid.learning.ActivityQueryRaise: Unimplemented–supports_activity_query()isfalse
-
match_any_activity(match)¶ Matches an objective that has any related activity.
Parameters: match ( boolean) –trueto match objectives with any activity,falseto match objectives with no activity
-
activity_terms¶
-
match_requisite_objective_id(requisite_objective_id, match)¶ Sets the requisite objective
Idfor this query.Parameters: - requisite_objective_id (
osid.id.Id) – a requisite objectiveId - match (
boolean) –truefor a positive match,falsefor a negative match
Raise: NullArgument–requisite_objective_idisnull- requisite_objective_id (
-
requisite_objective_id_terms¶
-
supports_requisite_objective_query()¶ Tests if an
ObjectiveQueryis available for querying requisite objectives.Returns: trueif an objective query is available,falseotherwiseReturn type: boolean
-
requisite_objective_query¶ Gets the query for a requisite objective.
Multiple retrievals produce a nested
ORterm.Returns: the objective query Return type: osid.learning.ObjectiveQueryRaise: Unimplemented–supports_requisite_objective_query()isfalse
-
match_any_requisite_objective(match)¶ Matches an objective that has any related requisite.
Parameters: match ( boolean) –trueto match objectives with any requisite,falseto match objectives with no requisite
-
requisite_objective_terms¶
-
match_dependent_objective_id(dependent_objective_id, match)¶ Sets the dependent objective
Idto query objectives dependent on the given objective.Parameters: - dependent_objective_id (
osid.id.Id) – a dependent objectiveId - match (
boolean) –truefor a positive match,falsefor a negative match
Raise: NullArgument–dependent_objective_idisnull- dependent_objective_id (
-
dependent_objective_id_terms¶
-
supports_depndent_objective_query()¶ Tests if an
ObjectiveQueryis available for querying dependent objectives.Returns: trueif an objective query is available,falseotherwiseReturn type: boolean
-
dependent_objective_query¶ Gets the query for a dependent objective.
Multiple retrievals produce a nested
ORterm.Returns: the objective query Return type: osid.learning.ObjectiveQueryRaise: Unimplemented–supports_dependent_objective_query()isfalse
-
match_any_dependent_objective(match)¶ Matches an objective that has any related dependents.
Parameters: match ( boolean) –trueto match objectives with any dependent,falseto match objectives with no dependents
-
dependent_objective_terms¶
-
match_equivalent_objective_id(equivalent_objective_id, match)¶ Sets the equivalent objective
Idto query equivalents.Parameters: - equivalent_objective_id (
osid.id.Id) – an equivalent objectiveId - match (
boolean) –truefor a positive match,falsefor a negative match
Raise: NullArgument–equivalent_objective_idisnull- equivalent_objective_id (
-
equivalent_objective_id_terms¶
-
supports_equivalent_objective_query()¶ Tests if an
ObjectiveQueryis available for querying equivalent objectives.Returns: trueif an objective query is available,falseotherwiseReturn type: boolean
-
equivalent_objective_query¶ Gets the query for an equivalent objective.
Multiple retrievals produce a nested
ORterm.Returns: the objective query Return type: osid.learning.ObjectiveQueryRaise: Unimplemented–supports_equivalent_objective_query()isfalse
-
match_any_equivalent_objective(match)¶ Matches an objective that has any related equivalents.
Parameters: match ( boolean) –trueto match objectives with any equivalent,falseto match objectives with no equivalents
-
equivalent_objective_terms¶
-
match_ancestor_objective_id(objective_id, match)¶ Sets the objective
Idfor this query to match objectives that have the specified objective as an ancestor.Parameters: - objective_id (
osid.id.Id) – an objectiveId - match (
boolean) –truefor a positive match,falsefor a negative match
Raise: NullArgument–objective_idisnull- objective_id (
-
ancestor_objective_id_terms¶
-
supports_ancestor_objective_query()¶ Tests if an
ObjectiveQueryis available.Returns: trueif an objective query is available,falseotherwiseReturn type: boolean
-
ancestor_objective_query¶ Gets the query for an objective.
Multiple retrievals produce a nested
ORterm.Returns: the objective query Return type: osid.learning.ObjectiveQueryRaise: Unimplemented–supports_ancestor_objective_query()isfalse
-
match_any_ancestor_objective(match)¶ Matches objectives that have any ancestor.
Parameters: match ( boolean) –trueto match objective with any ancestor,falseto match root objectives
-
ancestor_objective_terms¶
-
match_descendant_objective_id(objective_id, match)¶ Sets the objective
Idfor this query to match objectives that have the specified objective as a descendant.Parameters: - objective_id (
osid.id.Id) – an objectiveId - match (
boolean) –truefor a positive match,falsefor a negative match
Raise: NullArgument–objective_idisnull- objective_id (
-
descendant_objective_id_terms¶
-
supports_descendant_objective_query()¶ Tests if an
ObjectiveQueryis available.Returns: trueif an objective query is available,falseotherwiseReturn type: boolean
-
descendant_objective_query¶ Gets the query for an objective.
Multiple retrievals produce a nested
ORterm.Returns: the objective query Return type: osid.learning.ObjectiveQueryRaise: Unimplemented–supports_descendant_objective_query()isfalse
-
match_any_descendant_objective(match)¶ Matches objectives that have any ancestor.
Parameters: match ( boolean) –trueto match objectives with any ancestor,falseto match leaf objectives
-
descendant_objective_terms¶
-
match_objective_bank_id(objective_bank_id, match)¶ Sets the objective bank
Idfor this query.Parameters: - objective_bank_id (
osid.id.Id) – an objective bankId - match (
boolean) –truefor a positive match,falsefor a negative match
Raise: NullArgument–objective_bank_idisnull- objective_bank_id (
-
objective_bank_id_terms¶
-
supports_objective_bank_query()¶ Tests if a
ObjectiveBankQueryis available for querying objective banks.Returns: trueif an objective bank query is available,falseotherwiseReturn type: boolean
-
objective_bank_query¶ Gets the query for an objective bank.
Multiple retrievals produce a nested
ORterm.Returns: the objective bank query Return type: osid.learning.ObjectiveBankQueryRaise: Unimplemented–supports_objective_bank_query()isfalse
-
objective_bank_terms¶
-
get_objective_query_record(objective_record_type)¶ Gets the objective query record corresponding to the given
ObjectiverecordType.Multiple retrievals produce a nested
ORterm.Parameters: objective_record_type ( osid.type.Type) – an objective query record typeReturns: the objective query record Return type: osid.learning.records.ObjectiveQueryRecordRaise: NullArgument–objective_record_typeisnullRaise: OperationFailed– unable to complete requestRaise: Unsupported–has_record_type(objective_record_type)isfalse
-
Activity Query¶
-
class
dlkit.learning.queries.ActivityQuery¶ Bases:
dlkit.osid.queries.OsidObjectQuery,dlkit.osid.queries.OsidSubjugateableQueryThis is the query for searching activities.
Each method match request produces an
ANDterm while multiple invocations of a method produces a nestedOR.-
match_objective_id(objective_id, match)¶ Sets the objective
Idfor this query.Parameters: - objective_id (
osid.id.Id) – an objectiveId - match (
boolean) –truefor a positive match,falsefor a negative match
Raise: NullArgument–objective_idisnull- objective_id (
-
objective_id_terms¶
-
supports_objective_query()¶ Tests if an
ObjectiveQueryis available for querying objectives.Returns: trueif an objective query is available,falseotherwiseReturn type: boolean
-
objective_query¶ Gets the query for an objective.
Multiple retrievals produce a nested
ORterm.Returns: the objective query Return type: osid.learning.ObjectiveQueryRaise: Unimplemented–supports_objective_query()isfalse
-
objective_terms¶
-
match_asset_id(asset_id, match)¶ Sets the asset
Idfor this query.Parameters: - asset_id (
osid.id.Id) – an assetId - match (
boolean) –truefor a positive match,falsefor a negative match
Raise: NullArgument–asset_idisnull- asset_id (
-
asset_id_terms¶
-
supports_asset_query()¶ Tests if an
AssetQueryis available for querying objectives.Returns: trueif an robjective query is available,falseotherwiseReturn type: boolean
-
asset_query¶ Gets the query for an asset.
Multiple retrievals produce a nested
ORterm.Returns: the asset query Return type: osid.repository.AssetQueryRaise: Unimplemented–supports_asset_query()isfalse
-
match_any_asset(match)¶ Matches an activity that has any objective assigned.
Parameters: match ( boolean) –trueto match activities with any asset,falseto match activities with no asset
-
asset_terms¶
-
match_course_id(course_id, match)¶ Sets the course
Idfor this query.Parameters: - course_id (
osid.id.Id) – a courseId - match (
boolean) –truefor a positive match,falsefor a negative match
Raise: NullArgument–course_idisnull- course_id (
-
course_id_terms¶
-
supports_course_query()¶ Tests if a
CourseQueryis available for querying courses.Returns: trueif a course query is available,falseotherwiseReturn type: boolean
-
course_query¶ Gets the query for a course.
Multiple retrievals produce a nested
ORterm.Returns: the course query Return type: osid.course.CourseQueryRaise: Unimplemented–supports_course_query()isfalse
-
match_any_course(match)¶ Matches an activity that has any course assigned.
Parameters: match ( boolean) –trueto match activities with any courses,falseto match activities with no courses
-
course_terms¶
-
match_assessment_id(assessment_id, match)¶ Sets the assessment
Idfor this query.Parameters: - assessment_id (
osid.id.Id) – an assessmentId - match (
boolean) –truefor a positive match,falsefor a negative match
Raise: NullArgument–assessment_idisnull- assessment_id (
-
assessment_id_terms¶
-
supports_assessment_query()¶ Tests if an
AssessmentQueryis available for querying assessments.Returns: trueif an assessment query is available,falseotherwiseReturn type: boolean
-
assessment_query¶ Gets the query for a assessment.
Multiple retrievals produce a nested
ORterm.Returns: the assessment query Return type: osid.assessment.AssessmentQueryRaise: Unimplemented–supports_assessment_query()isfalse
-
match_any_assessment(match)¶ Matches an activity that has any assessment assigned.
Parameters: match ( boolean) –trueto match activities with any assessments,falseto match activities with no assessments
-
assessment_terms¶
-
match_objective_bank_id(objective_bank_id, match)¶ Sets the objective bank
Idfor this query.Parameters: - objective_bank_id (
osid.id.Id) – an objective bankId - match (
boolean) –truefor a positive match,falsefor a negative match
Raise: NullArgument–objective_bank_idisnull- objective_bank_id (
-
objective_bank_id_terms¶
-
supports_objective_bank_query()¶ Tests if a
ObjectiveBankQueryis available for querying resources.Returns: trueif an objective bank query is available,falseotherwiseReturn type: boolean
-
objective_bank_query¶ Gets the query for an objective bank.
Multiple retrievals produce a nested
ORterm.Returns: the objective bank query Return type: osid.learning.ObjectiveBankQueryRaise: Unimplemented–supports_objective_bank_query()isfalse
-
objective_bank_terms¶
-
get_activity_query_record(activity_record_type)¶ Gets the activity query record corresponding to the given
ActivityrecordType.Multiple retrievals produce a nested
ORterm.Parameters: activity_record_type ( osid.type.Type) – an activity query record typeReturns: the activity query record Return type: osid.learning.records.ActivityQueryRecordRaise: NullArgument–activity_record_typeisnullRaise: OperationFailed– unable to complete requestRaise: Unsupported–has_record_type(activity_record_type)isfalse
-
Objective Bank Query¶
-
class
dlkit.learning.queries.ObjectiveBankQuery¶ Bases:
dlkit.osid.queries.OsidCatalogQueryThis is the query for searching objective banks.
Each method specifies an
ANDterm while multiple invocations of the same method produce a nestedOR.-
match_objective_id(objective_id, match)¶ Sets the objective
Idfor this query.Parameters: - objective_id (
osid.id.Id) – an objectiveId - match (
boolean) –truefor a positive match,falsefor a negative match
Raise: NullArgument–objective_idisnull- objective_id (
-
objective_id_terms¶
-
supports_objective_query()¶ Tests if an
ObjectiveQueryis available.Returns: trueif an objective query is available,falseotherwiseReturn type: boolean
-
objective_query¶ Gets the query for an objective.
Multiple retrievals produce a nested
ORterm.Returns: the objective query Return type: osid.learning.ObjectiveQueryRaise: Unimplemented–supports_objective_query()isfalse
-
match_any_objective(match)¶ Matches an objective bank that has any objective assigned.
Parameters: match ( boolean) –trueto match objective banks with any objective,falseto match objective banks with no objectives
-
objective_terms¶
-
match_activity_id(activity_id, match)¶ Sets the activity
Idfor this query.Parameters: - activity_id (
osid.id.Id) – an activityId - match (
boolean) –truefor a positive match,falsefor a negative match
Raise: NullArgument–activity_idisnull- activity_id (
-
activity_id_terms¶
-
supports_activity_query()¶ Tests if a
ActivityQueryis available for querying activities.Returns: trueif an activity query is available,falseotherwiseReturn type: boolean
-
activity_query¶ Gets the query for an activity.
Multiple retrievals produce a nested
ORterm.Returns: the activity query Return type: osid.learning.ActivityQueryRaise: Unimplemented–supports_activity_query()isfalse
-
match_any_activity(match)¶ Matches an objective bank that has any activity assigned.
Parameters: match ( boolean) –trueto match objective banks with any activity,falseto match objective banks with no activities
-
activity_terms¶
-
match_ancestor_objective_bank_id(objective_bank_id, match)¶ Sets the objective bank
Idfor this query to match objective banks that have the specified objective bank as an ancestor.Parameters: - objective_bank_id (
osid.id.Id) – an objective bankId - match (
boolean) –truefor a positive match,falsefor a negative match
Raise: NullArgument–objective_bank_idisnull- objective_bank_id (
-
ancestor_objective_bank_id_terms¶
-
supports_ancestor_objective_bank_query()¶ Tests if a
ObjectiveBankQueryis available for querying ancestor objective banks.Returns: trueif an objective bank query is available,falseotherwiseReturn type: boolean
-
ancestor_objective_bank_query¶ Gets the query for an objective bank.
Multiple retrievals produce a nested
ORterm.Returns: the objective bank query Return type: osid.learning.ObjectiveBankQueryRaise: Unimplemented–supports_ancestor_objective_bank_query()isfalse
-
match_any_ancestor_objective_bank(match)¶ Matches an objective bank that has any ancestor.
Parameters: match ( boolean) –trueto match objective banks with any ancestor,falseto match root objective banks
-
ancestor_objective_bank_terms¶
-
match_descendant_objective_bank_id(objective_bank_id, match)¶ Sets the objective bank
Idfor this query to match objective banks that have the specified objective bank as a descendant.Parameters: - objective_bank_id (
osid.id.Id) – an objective bankId - match (
boolean) –truefor a positive match,falsefor a negative match
Raise: NullArgument–objective_bank_idisnull- objective_bank_id (
-
descendant_objective_bank_id_terms¶
-
supports_descendant_objective_bank_query()¶ Tests if a
ObjectiveBankQueryis available for querying descendant objective banks.Returns: trueif an objective bank query is available,falseotherwiseReturn type: boolean
-
descendant_objective_bank_query¶ Gets the query for an objective bank.
Multiple retrievals produce a nested
ORterm.Returns: the objective bank query Return type: osid.learning.ObjectiveBankQueryRaise: Unimplemented–supports_descendant_objective_bank_query()isfalse
-
match_any_descendant_objective_bank(match)¶ Matches an objective bank that has any descendant.
Parameters: match ( boolean) –trueto match objective banks with any descendant,falseto match leaf objective banks
-
descendant_objective_bank_terms¶
-
get_objective_bank_query_record(objective_bank_record_type)¶ Gets the objective bank query record corresponding to the given
ObjectiveBankrecordType.Multiple record retrievals produce a nested
ORterm.Parameters: objective_bank_record_type ( osid.type.Type) – an objective bank record typeReturns: the objective bank query record Return type: osid.learning.records.ObjectiveBankQueryRecordRaise: NullArgument–objective_bank_record_typeisnullRaise: OperationFailed– unable to complete requestRaise: Unsupported–has_record_type(objective_bank_record_type)isfalse
-
Records¶
Objective Record¶
-
class
dlkit.learning.records.ObjectiveRecord¶ Bases:
dlkit.osid.records.OsidRecordA record for an
Objective.The methods specified by the record type are available through the underlying object.
Objective Query Record¶
-
class
dlkit.learning.records.ObjectiveQueryRecord¶ Bases:
dlkit.osid.records.OsidRecordA record for an
ObjectiveQuery.The methods specified by the record type are available through the underlying object.
Objective Form Record¶
-
class
dlkit.learning.records.ObjectiveFormRecord¶ Bases:
dlkit.osid.records.OsidRecordA record for an
ObjectiveForm.The methods specified by the record type are available through the underlying object.
Activity Record¶
-
class
dlkit.learning.records.ActivityRecord¶ Bases:
dlkit.osid.records.OsidRecordA record for a
Activity.The methods specified by the record type are available through the underlying object.
Activity Query Record¶
-
class
dlkit.learning.records.ActivityQueryRecord¶ Bases:
dlkit.osid.records.OsidRecordA record for an
ActivityQuery.The methods specified by the record type are available through the underlying object.
Activity Form Record¶
-
class
dlkit.learning.records.ActivityFormRecord¶ Bases:
dlkit.osid.records.OsidRecordA record for a
ActivityForm.The methods specified by the record type are available through the underlying object.
Objective Bank Record¶
-
class
dlkit.learning.records.ObjectiveBankRecord¶ Bases:
dlkit.osid.records.OsidRecordA record for a
ObjectiveBank.The methods specified by the record type are available through the underlying object.
Objective Bank Query Record¶
-
class
dlkit.learning.records.ObjectiveBankQueryRecord¶ Bases:
dlkit.osid.records.OsidRecordA record for an
ObjectiveBankQuery.The methods specified by the record type are available through the underlying object.
Objective Bank Form Record¶
-
class
dlkit.learning.records.ObjectiveBankFormRecord¶ Bases:
dlkit.osid.records.OsidRecordA record for a
ObjectiveBankForm.The methods specified by the record type are available through the underlying object.
Repository¶
Summary¶
Repository Open Service Interface Definitions repository version 3.0.0
The Repository OSID provides the service of finding and managing digital assets.
Assets
An Asset represents a unit of content, whether it be an image, a
video, an application document or some text. The Asset defines a core
set of definitions applicable to digital content, such as copyright and
publisher, and allows for a type specification to be appended as with
other OsidObjects.
Asset content, such as a document, is defined such that there may be multiple formats contained with the same asset. A document may be accessible in both PDF and MS Word, but is the same document, for example. An image may have both a large size and a thumbnail version. Generally, an asset contains more than one version of content when it is left to the application to decide which is most appropriate.
The Asset Type may define methods in common throughout the
content variations. An example asset is one whose content Types are
“Quicktime” and “MPEG”, but the Asset Type is “movie” and
defines methods that describe the move aside from the formats. This
“double” Type hierarchy stemming from the asset requires more care in
defining interfaces.
Assets also have “credits” which define the authors, editors,
creators, performers, producers or any other “role”, identified with a
role Type, with the production of the asset. These are managed
externally to the asset through another OsidSession.
Through additional optional OsidSessions, the Asset can be
“extended” to offer temporal information. An asset may pertain to a
date, a period of time, or a series of dates and periods. This mechanism
is to offer the ability to search for assets pertaining to a desired
date range without requiring understanding of a Type.
Similarly, the Asset can also map to spatial information. A
photograph may be “geotagged” with the GPS coordinates where it was
taken, a conical shape in stellar coordinates could be described for an
astronimocal image, or there may be a desire to may a historical book to
the spatial coordinates of Boston and Philadelphia. Unlike temporal
mappings, the definition of the spatial coordinate is left to a spatial
Type to define. The Repository OSID simply manages spatial mappings to
the Asset.
Asset Tagging
Assets may also relate to Ontology OSID Subjects. The
Subject provides the ability to normalize information related to
subject matter across the Assets to simplify management and provide
a more robust searching mechanism. For example, with a photograph of the
Empire State Building, one may wish to describe that it was designed by
Shreve, Lamb and Harmon and completed in 1931. The information about the
building itself can be described using a Subject and related to the
photograph, and any other photograph that captures the building. The
Asset Type for the photograph may simply be “photograph” and
doesn’t attempt to describe a building, while the AssetContent
Type is “image/jpeg”.
An application performing a search for Empire State Building can be
execute the search over the Subjects, and once the user has narrowed
the subject area, then the related Assets can be retrieved, and from
there negotiate the content.
A provider wishing to construct a simple inventory database of buildings
in New York may decide to do so using the Resource OSID. The
Resource Type may describe the construction dates, height,
location, style and architects of buildings. The Type may also
include a means of getting a reference image using the Asset
interface. Since there is no explicit relationship between Subject
and Resource, the Resource can be adapted to the Subject
interface (mapping a building_resource_type to a
building_subject_type ) to use the same data for Subject to
Asset mappings and searching.
Asset Compositions
Asset compositions can be created using the Composition interface. A
Composition is a group of Assets and compositions may be
structured into a hierarchy for the purpose of “building” larger
content. A content management system may make use of this interface to
construct a web page. The Composition hierarchy may map into an
XHTML structure and each Asset represent an image or a link in the
document. However, the produced web page at a given URL may be
represented by another single Asset that whose content has both the
URL and the XHTML stream.
Another example is an IMS Common Cartridge. The Composition may be
used to produce the zip file cartridge, but consumers may access the zip
file via an Asset .
Repository Cataloging
Finally, Assets and Compositions may be categorized into
Repository objects. A Repository is a catalog-like interface to
help organize assets and subject matter. Repositories may be organized
into hierarchies for organization or federation purposes.
This number of service aspects to this Repository OSID produce a large
number of definitions. It is recommended to use the
RepositoryManager definition to select a single OsidSession of
interest, and work that definition through its dependencies before
tackling another aspect.
Sub Packages
The Repository OSID includes a rules subpackage for managing dynamic compositions.
Repository Open Service Interface Definitions repository version 3.0.0
The Repository OSID provides the service of finding and managing digital assets.
Assets
An Asset represents a unit of content, whether it be an image, a
video, an application document or some text. The Asset defines a core
set of definitions applicable to digital content, such as copyright and
publisher, and allows for a type specification to be appended as with
other OsidObjects.
Asset content, such as a document, is defined such that there may be multiple formats contained with the same asset. A document may be accessible in both PDF and MS Word, but is the same document, for example. An image may have both a large size and a thumbnail version. Generally, an asset contains more than one version of content when it is left to the application to decide which is most appropriate.
The Asset Type may define methods in common throughout the
content variations. An example asset is one whose content Types are
“Quicktime” and “MPEG”, but the Asset Type is “movie” and
defines methods that describe the move aside from the formats. This
“double” Type hierarchy stemming from the asset requires more care in
defining interfaces.
Assets also have “credits” which define the authors, editors,
creators, performers, producers or any other “role”, identified with a
role Type, with the production of the asset. These are managed
externally to the asset through another OsidSession.
Through additional optional OsidSessions, the Asset can be
“extended” to offer temporal information. An asset may pertain to a
date, a period of time, or a series of dates and periods. This mechanism
is to offer the ability to search for assets pertaining to a desired
date range without requiring understanding of a Type.
Similarly, the Asset can also map to spatial information. A
photograph may be “geotagged” with the GPS coordinates where it was
taken, a conical shape in stellar coordinates could be described for an
astronimocal image, or there may be a desire to may a historical book to
the spatial coordinates of Boston and Philadelphia. Unlike temporal
mappings, the definition of the spatial coordinate is left to a spatial
Type to define. The Repository OSID simply manages spatial mappings to
the Asset.
Asset Tagging
Assets may also relate to Ontology OSID Subjects. The
Subject provides the ability to normalize information related to
subject matter across the Assets to simplify management and provide
a more robust searching mechanism. For example, with a photograph of the
Empire State Building, one may wish to describe that it was designed by
Shreve, Lamb and Harmon and completed in 1931. The information about the
building itself can be described using a Subject and related to the
photograph, and any other photograph that captures the building. The
Asset Type for the photograph may simply be “photograph” and
doesn’t attempt to describe a building, while the AssetContent
Type is “image/jpeg”.
An application performing a search for Empire State Building can be
execute the search over the Subjects, and once the user has narrowed
the subject area, then the related Assets can be retrieved, and from
there negotiate the content.
A provider wishing to construct a simple inventory database of buildings
in New York may decide to do so using the Resource OSID. The
Resource Type may describe the construction dates, height,
location, style and architects of buildings. The Type may also
include a means of getting a reference image using the Asset
interface. Since there is no explicit relationship between Subject
and Resource, the Resource can be adapted to the Subject
interface (mapping a building_resource_type to a
building_subject_type ) to use the same data for Subject to
Asset mappings and searching.
Asset Compositions
Asset compositions can be created using the Composition interface. A
Composition is a group of Assets and compositions may be
structured into a hierarchy for the purpose of “building” larger
content. A content management system may make use of this interface to
construct a web page. The Composition hierarchy may map into an
XHTML structure and each Asset represent an image or a link in the
document. However, the produced web page at a given URL may be
represented by another single Asset that whose content has both the
URL and the XHTML stream.
Another example is an IMS Common Cartridge. The Composition may be
used to produce the zip file cartridge, but consumers may access the zip
file via an Asset .
Repository Cataloging
Finally, Assets and Compositions may be categorized into
Repository objects. A Repository is a catalog-like interface to
help organize assets and subject matter. Repositories may be organized
into hierarchies for organization or federation purposes.
This number of service aspects to this Repository OSID produce a large
number of definitions. It is recommended to use the
RepositoryManager definition to select a single OsidSession of
interest, and work that definition through its dependencies before
tackling another aspect.
Sub Packages
The Repository OSID includes a rules subpackage for managing dynamic compositions.
Service Managers¶
Repository Manager¶
-
class
dlkit.services.repository.RepositoryManager¶ Bases:
dlkit.osid.managers.OsidManager,dlkit.osid.sessions.OsidSession,dlkit.services.repository.RepositoryProfile-
repository_batch_manager¶ Gets a
RepositoryBatchManager.Returns: a RepostoryBatchManagerReturn type: osid.repository.batch.RepositoryBatchManagerRaise: OperationFailed– unable to complete requestRaise: Unimplemented–supports_repository_batch()isfalse
-
repository_rules_manager¶ Gets a
RepositoryRulesManager.Returns: a RepostoryRulesManagerReturn type: osid.repository.rules.RepositoryRulesManagerRaise: OperationFailed– unable to complete requestRaise: Unimplemented–supports_repository_rules()isfalse
-
Repository Profile Methods¶
RepositoryManager.supports_asset_lookup()¶Tests if asset lookup is supported.
Returns: trueif asset lookup is supported,falseotherwiseReturn type: boolean
RepositoryManager.supports_asset_query()¶Tests if asset query is supported.
Returns: trueif asset query is supported,falseotherwiseReturn type: boolean
RepositoryManager.supports_asset_admin()¶Tests if asset administration is supported.
Returns: trueif asset administration is supported,falseotherwiseReturn type: boolean
RepositoryManager.supports_repository_lookup()¶Tests if repository lookup is supported.
Returns: trueif repository lookup is supported,falseotherwiseReturn type: boolean
RepositoryManager.supports_repository_admin()¶Tests if repository administration is supported.
Returns: trueif repository administration is supported,falseotherwiseReturn type: boolean
RepositoryManager.asset_record_types¶Gets all the asset record types supported.
Returns: the list of supported asset record types Return type: osid.type.TypeList
RepositoryManager.asset_search_record_types¶Gets all the asset search record types supported.
Returns: the list of supported asset search record types Return type: osid.type.TypeList
RepositoryManager.asset_content_record_types¶Gets all the asset content record types supported.
Returns: the list of supported asset content record types Return type: osid.type.TypeList
RepositoryManager.composition_record_types¶Gets all the composition record types supported.
Returns: the list of supported composition record types Return type: osid.type.TypeList
RepositoryManager.composition_search_record_types¶Gets all the composition search record types supported.
Returns: the list of supported composition search record types Return type: osid.type.TypeList
RepositoryManager.repository_record_types¶Gets all the repository record types supported.
Returns: the list of supported repository record types Return type: osid.type.TypeList
RepositoryManager.repository_search_record_types¶Gets all the repository search record types supported.
Returns: the list of supported repository search record types Return type: osid.type.TypeList
RepositoryManager.spatial_unit_record_types¶Gets all the spatial unit record types supported.
Returns: the list of supported spatial unit record types Return type: osid.type.TypeList
RepositoryManager.coordinate_types¶Gets all the coordinate types supported.
Returns: the list of supported coordinate types Return type: osid.type.TypeList
Repository Lookup Methods¶
RepositoryManager.can_lookup_repositories()¶Tests if this user can perform
Repositorylookups. 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: falseif lookup methods are not authorized,trueotherwiseReturn type: boolean
RepositoryManager.use_comparative_repository_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.
RepositoryManager.use_plenary_repository_view()¶A complete view of the
Repositoryreturns 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.
RepositoryManager.get_repositories_by_ids(repository_ids)¶Gets a
RepositoryListcorresponding to the givenIdList. In plenary mode, the returned list contains all of the repositories specified in theIdlist, in the order of the list, including duplicates, or an error results if anIdin the supplied list is not found or inaccessible. Otherwise, inaccessibleRepositoriesmay be omitted from the list and may present the elements in any order including returning a unique set.
Parameters: repository_ids ( osid.id.IdList) – the list ofIdsto retrieveReturns: the returned Repository listReturn type: osid.repository.RepositoryListRaise: NotFound– anIdwas not foundRaise: NullArgument–repository_idsisnullRaise: OperationFailed– unable to complete requestRaise: PermissionDenied– authorization failure
RepositoryManager.get_repositories_by_genus_type(repository_genus_type)¶Gets a
RepositoryListcorresponding to the given repository genusTypewhich does not include repositories of types derived from the specifiedType. In plenary mode, the returned list contains all known repositories or an error results. Otherwise, the returned list may contain only those repositories that are accessible through this session.
Parameters: repository_genus_type ( osid.type.Type) – a repository genus typeReturns: the returned Repository listReturn type: osid.repository.RepositoryListRaise: NullArgument–repository_genus_typeisnullRaise: OperationFailed– unable to complete requestRaise: PermissionDenied– authorization failure
RepositoryManager.get_repositories_by_parent_genus_type(repository_genus_type)¶Gets a
RepositoryListcorresponding to the given repository genusTypeand include any additional repositories with genus types derived from the specifiedType. In plenary mode, the returned list contains all known repositories or an error results. Otherwise, the returned list may contain only those repositories that are accessible through this session.
Parameters: repository_genus_type ( osid.type.Type) – a repository genus typeReturns: the returned Repository listReturn type: osid.repository.RepositoryListRaise: NullArgument–repository_genus_typeisnullRaise: OperationFailed– unable to complete requestRaise: PermissionDenied– authorization failure
RepositoryManager.get_repositories_by_record_type(repository_record_type)¶Gets a
RepositoryListcontaining the given repository recordType. In plenary mode, the returned list contains all known repositories or an error results. Otherwise, the returned list may contain only those repositories that are accessible through this session.
Parameters: repository_record_type ( osid.type.Type) – a repository record typeReturns: the returned Repository listReturn type: osid.repository.RepositoryListRaise: NullArgument–repository_record_typeisnullRaise: OperationFailed– unable to complete requestRaise: PermissionDenied– authorization failure
RepositoryManager.get_repositories_by_provider(resource_id)¶Gets a
RepositoryListfrom the given provider ````. In plenary mode, the returned list contains all known repositories or an error results. Otherwise, the returned list may contain only those repositories that are accessible through this session.
Parameters: resource_id ( osid.id.Id) – a resourceIdReturns: the returned Repository listReturn type: osid.repository.RepositoryListRaise: NullArgument–resource_idisnullRaise: OperationFailed– unable to complete requestRaise: PermissionDenied– authorization failure
RepositoryManager.repositories¶Gets all
Repositories. In plenary mode, the returned list contains all known repositories or an error results. Otherwise, the returned list may contain only those repositories that are accessible through this session.
Returns: a list of RepositoriesReturn type: osid.repository.RepositoryListRaise: OperationFailed– unable to complete requestRaise: PermissionDenied– authorization failure
Repository Admin Methods¶
RepositoryManager.can_create_repositories()¶Tests if this user can create
Repositories. A return of true does not guarantee successful authorization. A return of false indicates that it is known creating aRepositorywill result in aPermissionDenied. This is intended as a hint to an application that may not wish to offer create operations to unauthorized users.
Returns: falseifRepositorycreation is not authorized,trueotherwiseReturn type: boolean
RepositoryManager.can_create_repository_with_record_types(repository_record_types)¶Tests if this user can create a single
Repositoryusing the desired record types. WhileRepositoryManager.getRepositoryRecordTypes()can be used to examine which records are supported, this method tests which record(s) are required for creating a specificRepository. Providing an empty array tests if aRepositorycan be created with no records.
Parameters: repository_record_types ( osid.type.Type[]) – array of repository record typesReturns: trueifRepositorycreation using the specifiedTypesis supported,falseotherwiseReturn type: booleanRaise: NullArgument–repository_record_typesisnull
RepositoryManager.get_repository_form_for_create(repository_record_types)¶Gets the repository form for creating new repositories. A new form should be requested for each create transaction.
Parameters: repository_record_types ( osid.type.Type[]) – array of repository record typesReturns: the repository form Return type: osid.repository.RepositoryFormRaise: NullArgument–repository_record_typesisnullRaise: OperationFailed– unable to complete requestRaise: PermissionDenied– authorization failureRaise: Unsupported– unable to get form for requested record types
RepositoryManager.create_repository(repository_form)¶Creates a new
Repository.
Parameters: repository_form ( osid.repository.RepositoryForm) – the form for thisRepositoryReturns: the new RepositoryReturn type: osid.repository.RepositoryRaise: IllegalState–repository_formalready used in a create transactionRaise: InvalidArgument– one or more of the form elements is invalidRaise: NullArgument–repository_formisnullRaise: OperationFailed– unable to complete requestRaise: PermissionDenied– authorization failureRaise: Unsupported–repository_formdid not originate fromget_repository_form_for_create()
RepositoryManager.can_update_repositories()¶Tests if this user can update
Repositories. A return of true does not guarantee successful authorization. A return of false indicates that it is known updating aRepositorywill result in aPermissionDenied. This is intended as a hint to an application that may not wish to offer update operations to unauthorized users.
Returns: falseifRepositorymodification is not authorized,trueotherwiseReturn type: boolean
RepositoryManager.get_repository_form_for_update(repository_id)¶Gets the repository form for updating an existing repository. A new repository form should be requested for each update transaction.
Parameters: repository_id ( osid.id.Id) – theIdof theRepositoryReturns: the repository form Return type: osid.repository.RepositoryFormRaise: NotFound–repository_idis not foundRaise: NullArgument–repository_idisnullRaise: OperationFailed– unable to complete requestRaise: PermissionDenied– authorization failure
RepositoryManager.update_repository(repository_form)¶Updates an existing repository.
Parameters: repository_form ( osid.repository.RepositoryForm) – the form containing the elements to be updatedRaise: IllegalState–repository_formalready used in an update transactionRaise: InvalidArgument– the form contains an invalid valueRaise: NullArgument–repository_formisnullRaise: OperationFailed– unable to complete requestRaise: PermissionDenied– authorization failureRaise: Unsupported–repository_formdid not originate fromget_repository_form_for_update()
RepositoryManager.can_delete_repositories()¶Tests if this user can delete
Repositories. A return of true does not guarantee successful authorization. A return of false indicates that it is known deleting aRepositorywill result in aPermissionDenied. This is intended as a hint to an application that may not wish to offer delete operations to unauthorized users.
Returns: falseifRepositorydeletion is not authorized,trueotherwiseReturn type: boolean
RepositoryManager.delete_repository(repository_id)¶Deletes a
Repository.
Parameters: repository_id ( osid.id.Id) – theIdof theRepositoryto removeRaise: NotFound–repository_idnot foundRaise: NullArgument–repository_idisnullRaise: OperationFailed– unable to complete requestRaise: PermissionDenied– authorization failure
RepositoryManager.can_manage_repository_aliases()¶Tests if this user can manage
Idaliases for repositories. 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: falseifRepositoryaliasing is not authorized,trueotherwiseReturn type: boolean
RepositoryManager.alias_repository(repository_id, alias_id)¶Adds an
Idto aRepositoryfor the purpose of creating compatibility. The primaryIdof theRepositoryis determined by the provider. The newIdis an alias to the primaryId. If the alias is a pointer to another repository, it is reassigned to the given repositoryId.
Parameters:
- repository_id (
osid.id.Id) – theIdof aRepository- alias_id (
osid.id.Id) – the aliasIdRaise:
AlreadyExists–alias_idis in use as a primaryIdRaise:
NotFound–repository_idnot foundRaise:
NullArgument–repository_idoralias_idisnullRaise:
OperationFailed– unable to complete requestRaise:
PermissionDenied– authorization failure
Repository¶
Repository¶
-
class
dlkit.services.repository.Repository¶ Bases:
dlkit.osid.objects.OsidCatalog,dlkit.osid.sessions.OsidSession-
get_repository_record(repository_record_type)¶ Gets the record corresponding to the given
RepositoryrecordType. This method is used to retrieve an object implementing the requested record. Therepository_record_typemay be theTypereturned inget_record_types()or any of its parents in aTypehierarchy wherehas_record_type(repository_record_type)istrue.Parameters: repository_record_type ( osid.type.Type) – a repository record typeReturns: the repository record Return type: osid.repository.records.RepositoryRecordRaise: NullArgument–repository_record_typeisnullRaise: OperationFailed– unable to complete requestRaise: Unsupported–has_record_type(repository_record_type)isfalse
-
Asset Lookup Methods¶
Repository.can_lookup_assets()¶Tests if this user can perform
Assetlookups. 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.
Returns: falseif lookup methods are not authorized,trueotherwiseReturn type: boolean
Repository.use_comparative_asset_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.
Repository.use_plenary_asset_view()¶A complete view of the
Assetreturns 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.
Repository.use_federated_repository_view()¶Federates the view for methods in this session. A federated view will include assets in repositories which are children of this repository in the repository hierarchy.
Repository.use_isolated_repository_view()¶Isolates the view for methods in this session. An isolated view restricts lookups to this repository only.
Repository.get_asset(asset_id)¶Gets the
Assetspecified by itsId. In plenary mode, the exactIdis found or aNotFoundresults. Otherwise, the returnedAssetmay have a differentIdthan requested, such as the case where a duplicateIdwas assigned to anAssetand retained for compatibility.
Parameters: asset_id ( osid.id.Id) – theIdof theAssetto retrieveReturns: the returned AssetReturn type: osid.repository.AssetRaise: NotFound– noAssetfound with the givenIdRaise: NullArgument–asset_idisnullRaise: OperationFailed– unable to complete requestRaise: PermissionDenied– authorization failure
Repository.get_assets_by_ids(asset_ids)¶Gets an
AssetListcorresponding to the givenIdList. In plenary mode, the returned list contains all of the assets specified in theIdlist, in the order of the list, including duplicates, or an error results if anIdin the supplied list is not found or inaccessible. Otherwise, inaccessibleAssetsmay be omitted from the list and may present the elements in any order including returning a unique set.
Parameters: asset_ids ( osid.id.IdList) – the list ofIdsto retrieveReturns: the returned Asset listReturn type: osid.repository.AssetListRaise: NotFound– anIdwas not foundRaise: NullArgument–asset_idsisnullRaise: OperationFailed– unable to complete requestRaise: PermissionDenied– authorization failure
Repository.get_assets_by_genus_type(asset_genus_type)¶Gets an
AssetListcorresponding to the given asset genusTypewhich does not include assets of types derived from the specifiedType. In plenary mode, the returned list contains all known assets or an error results. Otherwise, the returned list may contain only those assets that are accessible through this session.
Parameters: asset_genus_type ( osid.type.Type) – an asset genus typeReturns: the returned Asset listReturn type: osid.repository.AssetListRaise: NullArgument–asset_genus_typeisnullRaise: OperationFailed– unable to complete requestRaise: PermissionDenied– authorization failure
Repository.get_assets_by_parent_genus_type(asset_genus_type)¶Gets an
AssetListcorresponding to the given asset genusTypeand include any additional assets with genus types derived from the specifiedType. In plenary mode, the returned list contains all known assets or an error results. Otherwise, the returned list may contain only those assets that are accessible through this session.
Parameters: asset_genus_type ( osid.type.Type) – an asset genus typeReturns: the returned Asset listReturn type: osid.repository.AssetListRaise: NullArgument–asset_genus_typeisnullRaise: OperationFailed– unable to complete requestRaise: PermissionDenied– authorization failure
Repository.get_assets_by_record_type(asset_record_type)¶Gets an
AssetListcontaining the given asset recordType. In plenary mode, the returned list contains all known assets or an error results. Otherwise, the returned list may contain only those assets that are accessible through this session.
Parameters: asset_record_type ( osid.type.Type) – an asset record typeReturns: the returned Asset listReturn type: osid.repository.AssetListRaise: NullArgument–asset_record_typeisnullRaise: OperationFailed– unable to complete requestRaise: PermissionDenied– authorization failure
Repository.get_assets_by_provider(resource_id)¶Gets an
AssetListfrom the given provider. In plenary mode, the returned list contains all known assets or an error results. Otherwise, the returned list may contain only those assets that are accessible through this session.
Parameters: resource_id ( osid.id.Id) – a resourceIdReturns: the returned Asset listReturn type: osid.repository.AssetListRaise: NullArgument–resource_idisnullRaise: OperationFailed– unable to complete requestRaise: PermissionDenied– authorization failure
Repository.assets¶Gets all
Assets. In plenary mode, the returned list contains all known assets or an error results. Otherwise, the returned list may contain only those assets that are accessible through this session.
Returns: a list of AssetsReturn type: osid.repository.AssetListRaise: OperationFailed– unable to complete requestRaise: PermissionDenied– authorization failure
Asset Query Methods¶
Repository.can_search_assets()¶Tests if this user can perform
Assetsearches. 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 search operations to unauthorized users.
Returns: falseif search methods are not authorized,trueotherwiseReturn type: boolean
Repository.use_federated_repository_view()Federates the view for methods in this session. A federated view will include assets in repositories which are children of this repository in the repository hierarchy.
Repository.use_isolated_repository_view()Isolates the view for methods in this session. An isolated view restricts lookups to this repository only.
Repository.asset_query¶Gets an asset query.
Returns: the asset query Return type: osid.repository.AssetQuery
Repository.get_assets_by_query(asset_query)¶Gets a list of
Assetsmatching the given asset query.
Parameters: asset_query ( osid.repository.AssetQuery) – the asset queryReturns: the returned AssetListReturn type: osid.repository.AssetListRaise: NullArgument–asset_queryisnullRaise: OperationFailed– unable to complete requestRaise: PermissionDenied– authorization failureRaise: Unsupported– theasset_queryis not of this service
Asset Admin Methods¶
Repository.can_create_assets()¶Tests if this user can create
Assets. A return of true does not guarantee successful authorization. A return of false indicates that it is known creating anAssetwill 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: falseifAssetcreation is not authorized,trueotherwiseReturn type: boolean
Repository.can_create_asset_with_record_types(asset_record_types)¶Tests if this user can create a single
Assetusing the desired record types. WhileRepositoryManager.getAssetRecordTypes()can be used to examine which records are supported, this method tests which record(s) are required for creating a specificAsset. Providing an empty array tests if anAssetcan be created with no records.
Parameters: asset_record_types ( osid.type.Type[]) – array of asset record typesReturns: trueifAssetcreation using the specified recordTypesis supported,falseotherwiseReturn type: booleanRaise: NullArgument–asset_record_typesisnull
Repository.get_asset_form_for_create(asset_record_types)¶Gets the asset form for creating new assets. A new form should be requested for each create transaction.
Parameters: asset_record_types ( osid.type.Type[]) – array of asset record typesReturns: the asset form Return type: osid.repository.AssetFormRaise: NullArgument–asset_record_typesisnullRaise: OperationFailed– unable to complete requestRaise: PermissionDenied– authorization failureRaise: Unsupported– unable to get form for requested record types
Repository.create_asset(asset_form)¶Creates a new
Asset.
Parameters: asset_form ( osid.repository.AssetForm) – the form for thisAssetReturns: the new AssetReturn type: osid.repository.AssetRaise: IllegalState–asset_formalready used in a create transactionRaise: InvalidArgument– one or more of the form elements is invalidRaise: NullArgument–asset_formisnullRaise: OperationFailed– unable to complete requestRaise: PermissionDenied– authorization failureRaise: Unsupported–asset_formdid not originate fromget_asset_form_for_create()
Repository.can_update_assets()¶Tests if this user can update
Assets. A return of true does not guarantee successful authorization. A return of false indicates that it is known updating anAssetwill 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: falseifAssetmodification is not authorized,trueotherwiseReturn type: boolean
Repository.get_asset_form_for_update(asset_id)¶Gets the asset form for updating an existing asset. A new asset form should be requested for each update transaction.
Parameters: asset_id ( osid.id.Id) – theIdof theAssetReturns: the asset form Return type: osid.repository.AssetFormRaise: NotFound–asset_idis not foundRaise: NullArgument–asset_idis nullRaise: OperationFailed– unable to complete requestRaise: PermissionDenied– authorization failure
Repository.update_asset(asset_form)¶Updates an existing asset.
Parameters: asset_form ( osid.repository.AssetForm) – the form containing the elements to be updatedRaise: IllegalState–asset_formalready used in anupdate transactionRaise: InvalidArgument– the form contains an invalid valueRaise: NullArgument–asset_formisnullRaise: OperationFailed– unable to complete requestRaise: PermissionDenied– authorization failureRaise: Unsupported–asset_formdid not originate fromget_asset_form_for_update()
Repository.can_delete_assets()¶Tests if this user can delete
Assets. A return of true does not guarantee successful authorization. A return of false indicates that it is known deleting anAssetwill 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: falseifAssetdeletion is not authorized,trueotherwiseReturn type: boolean
Repository.delete_asset(asset_id)¶Deletes an
Asset.
Parameters: asset_id ( osid.id.Id) – theIdof theAssetto removeRaise: NotFound–asset_idnot foundRaise: NullArgument–asset_idisnullRaise: OperationFailed– unable to complete requestRaise: PermissionDenied– authorization failure
Repository.can_manage_asset_aliases()¶Tests if this user can manage
Idaliases forAssets. 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: falseifAssetaliasing is not authorized,trueotherwiseReturn type: boolean
Repository.alias_asset(asset_id, alias_id)¶Adds an
Idto anAssetfor the purpose of creating compatibility. The primaryIdof theAssetis determined by the provider. The newIdperforms as an alias to the primaryId. If the alias is a pointer to another asset, it is reassigned to the given assetId.
Parameters:
- asset_id (
osid.id.Id) – theIdof anAsset- alias_id (
osid.id.Id) – the aliasIdRaise:
AlreadyExists–alias_idis already assignedRaise:
NotFound–asset_idnot foundRaise:
NullArgument–asset_idoralias_idisnullRaise:
OperationFailed– unable to complete requestRaise:
PermissionDenied– authorization failure
Repository.can_create_asset_content()¶Tests if this user can create content for
Assets. A return of true does not guarantee successful authorization. A return of false indicates that it is known creating anAssetContentwill 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: falseifAssetcontent creation is not authorized,trueotherwiseReturn type: boolean
Repository.can_create_asset_content_with_record_types(asset_content_record_types)¶Tests if this user can create an
AssetContentusing the desired record types. WhileRepositoryManager.getAssetContentRecordTypes()can be used to test which records are supported, this method tests which records are required for creating a specificAssetContent. Providing an empty array tests if anAssetContentcan be created with no records.
Parameters: asset_content_record_types ( osid.type.Type[]) – array of asset content record typesReturns: trueifAssetContentcreation using the specifiedTypesis supported,falseotherwiseReturn type: booleanRaise: NullArgument–asset_content_record_typesisnull
Repository.get_asset_content_form_for_create(asset_id, asset_content_record_types)¶Gets an asset content form for creating new assets.
Parameters:
- asset_id (
osid.id.Id) – theIdof anAsset- asset_content_record_types (
osid.type.Type[]) – array of asset content record typesReturns: the asset content form
Return type:
osid.repository.AssetContentFormRaise:
NotFound–asset_idis not foundRaise:
NullArgument–asset_idorasset_content_record_typesisnullRaise:
OperationFailed– unable to complete requestRaise:
PermissionDenied– authorization failureRaise:
Unsupported– unable to get form for requested record types
Repository.create_asset_content(asset_content_form)¶Creates new
AssetContentfor a given asset.
Parameters: asset_content_form ( osid.repository.AssetContentForm) – the form for thisAssetContentReturns: the new AssetContentReturn type: osid.repository.AssetContentRaise: IllegalState–asset_content_formalready used in a create transactionRaise: InvalidArgument– one or more of the form elements is invalidRaise: NullArgument–asset_content_formisnullRaise: OperationFailed– unable to complete requestRaise: PermissionDenied– authorization failureRaise: Unsupported–asset_content_formdid not originate fromget_asset_content_form_for_create()
Repository.can_update_asset_contents()¶Tests if this user can update
AssetContent. A return of true does not guarantee successful authorization. A return of false indicates that it is known updating anAssetContentwill 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: falseifAssetContentmodification is not authorized,trueotherwiseReturn type: boolean
Repository.get_asset_content_form_for_update(asset_content_id)¶Gets the asset content form for updating an existing asset content. A new asset content form should be requested for each update transaction.
Parameters: asset_content_id ( osid.id.Id) – theIdof theAssetContentReturns: the asset content form Return type: osid.repository.AssetContentFormRaise: NotFound–asset_content_idis not foundRaise: NullArgument–asset_content_idisnullRaise: OperationFailed– unable to complete request
Repository.update_asset_content(asset_content_form)¶Updates an existing asset content.
Parameters: asset_content_form ( osid.repository.AssetContentForm) – the form containing the elements to be updatedRaise: IllegalState–asset_content_formalready used in an update transactionRaise: InvalidArgument– the form contains an invalid valueRaise: NullArgument–asset_formisnullRaise: OperationFailed– unable to complete requestRaise: PermissionDenied– authorization failureRaise: Unsupported–asset_content_formdid not originate fromget_asset_content_form_for_update()
Repository.can_delete_asset_contents()¶Tests if this user can delete
AssetsContents. A return of true does not guarantee successful authorization. A return of false indicates that it is known deleting anAssetContentwill 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: falseifAssetContentdeletion is not authorized,trueotherwiseReturn type: boolean
Repository.delete_asset_content(asset_content_id)¶Deletes content from an
Asset.
Parameters: asset_content_id ( osid.id.Id) – theIdof theAssetContentRaise: NotFound–asset_content_idis not foundRaise: NullArgument–asset_content_idisnullRaise: OperationFailed– unable to complete requestRaise: PermissionDenied– authorization failure
Objects¶
Asset¶
-
class
dlkit.repository.objects.Asset¶ Bases:
dlkit.osid.objects.OsidObject,dlkit.osid.markers.Aggregateable,dlkit.osid.markers.SourceableAn
Assetrepresents some digital content.Example assets might be a text document, an image, or a movie. The content data, and metadata related directly to the content format and quality, is accessed through
AssetContent. Assets, like allOsidObjects,include a type a record to qualify theAssetand include additional data. The division between theAssetTypeandAssetContentis to separate data describing the asset from data describing the format of the contents, allowing a consumer to select among multiple formats, sizes or levels of fidelity.An example is a photograph of the Bay Bridge. The content may deliver a JPEG in multiple resolutions where the
AssetContentmay also desribe size or compression factor for each one. The content may also include an uncompressed TIFF version. TheAssetTypemay be “photograph” indicating that the photo itself is the asset managed in this repository.Since an Asset may have multiple
AssetContentstructures, the decision of how many things to stuff inside a single asset comes down to if the content is actually a different format, or size, or quality, falling under the same creator, copyright, publisher and distribution rights as the original. This may, in some cases, provide a means to implement some accessibility, it doesn’t handle the case where, to meet an accessibility requirement, one asset needs to be substituted for another. The Repository OSID manages this aspect outside the scope of the coreAssetdefinition.Assetsmap toAssetSubjects.AssetSubjectsareOsidObjectsthat capture a subject matter. In the above example, anAssetSubjectmay be defined for the Bay Bridge and include data describing the bridge. The single subject can map to multiple assets depicting the bridge providing a single entry for a search and a single place to describe a bridge. Bridges, as physical items, may also be described using the Resource OSID in which case the use of theAssetSubjectacts as a cover for the underlyingResourceto assist repository-only consumers.The
Assetdefinition includes some basic copyright and related licensing information to assist in finding free-to-use content, or to convey the distribution restrictions that may be placed on the asset. Generally, if no data is available it is to be assumed that all rights are reserved.A publisher is applicable if the content of this
Assethas been published. Not allAssetsin thisRepositorymay have a published status and such a status may effect the applicability of copyright law. To trace the source of anAsset,both a provider and source are defined. The provider indicates where this repository acquired the asset and the source indicates the original provider or copyright owner. In the case of a published asset, the source is the publisher.Assetsalso define methods to facilitate searches over time and space as it relates to the subject matter. This may at times be redundant with theAssetSubject. In the case of the Bay Bridge photograph, the temporal coverage may include 1936, when it opened, and/or indicate when the photo was taken to capture a current event of the bridge. The decision largeley depends on what desired effect is from a search. The spatial coverage may describe the gps coordinates of the bridge or describe the spatial area encompassed in the view. In either case, a “photograph” type may unambiguously defined methods to describe the exact time the photograph was taken and the location of the photographer.The core Asset defines methods to perform general searches and construct bibliographic entries without knowledge of a particular
AssetorAssetContentrecordType.-
title¶ Gets the proper title of this asset.
This may be the same as the display name or the display name may be used for a less formal label.
Returns: the title of this asset Return type: osid.locale.DisplayText
-
is_copyright_status_known()¶ Tests if the copyright status is known.
return: trueif the copyright status of this asset is known,falseotherwise. Iffalse, is_public_domain(),``can_distribute_verbatim(), can_distribute_alterations() and- can_distribute_compositions()`` may also be
false. rtype: boolean
- can_distribute_compositions()`` may also be
-
is_public_domain()¶ Tests if this asset is in the public domain.
An asset is in the public domain if copyright is not applicable, the copyright has expired, or the copyright owner has expressly relinquished the copyright.
Returns: trueif this asset is in the public domain,falseotherwise. Iftrue,can_distribute_verbatim(), can_distribute_alterations() and can_distribute_compositions()must also betrue.Return type: booleanRaise: IllegalState–is_copyright_status_known()isfalse
-
copyright_registration¶ Gets the copyright registration information for this asset.
Returns: the copyright registration. An empty string means the registration status isn’t known. Return type: stringRaise: IllegalState–is_copyright_status_known()isfalse
-
can_distribute_verbatim()¶ Tests if there are any license restrictions on this asset that restrict the distribution, re-publication or public display of this asset, commercial or otherwise, without modification, alteration, or inclusion in other works.
This method is intended to offer consumers a means of filtering out search results that restrict distribution for any purpose. The scope of this method does not include licensing that describes warranty disclaimers or attribution requirements. This method is intended for informational purposes only and does not replace or override the terms specified in a license agreement which may specify exceptions or additional restrictions.
Returns: trueif the asset can be distributed verbatim,falseotherwise.Return type: booleanRaise: IllegalState–is_copyright_status_known()isfalse
-
can_distribute_alterations()¶ Tests if there are any license restrictions on this asset that restrict the distribution, re-publication or public display of any alterations or modifications to this asset, commercial or otherwise, for any purpose.
This method is intended to offer consumers a means of filtering out search results that restrict the distribution or public display of any modification or alteration of the content or its metadata of any kind, including editing, translation, resampling, resizing and cropping. The scope of this method does not include licensing that describes warranty disclaimers or attribution requirements. This method is intended for informational purposes only and does not replace or override the terms specified in a license agreement which may specify exceptions or additional restrictions.
Returns: trueif the asset can be modified,falseotherwise. Iftrue,can_distribute_verbatim()must also betrue.Return type: booleanRaise: IllegalState–is_copyright_status_known()isfalse
-
can_distribute_compositions()¶ Tests if there are any license restrictions on this asset that restrict the distribution, re-publication or public display of this asset as an inclusion within other content or composition, commercial or otherwise, for any purpose, including restrictions upon the distribution or license of the resulting composition.
This method is intended to offer consumers a means of filtering out search results that restrict the use of this asset within compositions. The scope of this method does not include licensing that describes warranty disclaimers or attribution requirements. This method is intended for informational purposes only and does not replace or override the terms specified in a license agreement which may specify exceptions or additional restrictions.
Returns: trueif the asset can be part of a larger compositionfalseotherwise. Iftrue,can_distribute_verbatim()must also betrue.Return type: booleanRaise: IllegalState–is_copyright_status_known()isfalse
-
source_id¶ Gets the
Resource Idof the source of this asset.The source is the original owner of the copyright of this asset and may differ from the creator of this asset. The source for a published book written by Margaret Mitchell would be Macmillan. The source for an unpublished painting by Arthur Goodwin would be Arthur Goodwin.
An
AssetisSourceableand also contains a provider identity. The provider is the entity that makes this digital asset available in this repository but may or may not be the publisher of the contents depicted in the asset. For example, a map published by Ticknor and Fields in 1848 may have a provider of Library of Congress and a source of Ticknor and Fields. If copied from a repository at Middlebury College, the provider would be Middlebury College and a source of Ticknor and Fields.Returns: the source IdReturn type: osid.id.Id
-
source¶ Gets the
Resourceof the source of this asset.The source is the original owner of the copyright of this asset and may differ from the creator of this asset. The source for a published book written by Margaret Mitchell would be Macmillan. The source for an unpublished painting by Arthur Goodwin would be Arthur Goodwin.
Returns: the source Return type: osid.resource.Resource
-
provider_link_ids¶ Gets the resource
Idsrepresenting the source of this asset in order from the most recent provider to the originating source.Returns: the provider IdsReturn type: osid.id.IdList
-
provider_links¶ Gets the
Resourcesrepresenting the source of this asset in order from the most recent provider to the originating source.Returns: the provider chain Return type: osid.resource.ResourceListRaise: OperationFailed– unable to complete request
-
created_date¶ Gets the created date of this asset, which is generally not related to when the object representing the asset was created.
The date returned may indicate that not much is known.
Returns: the created date Return type: osid.calendaring.DateTime
-
is_published()¶ Tests if this asset has been published.
Not all assets viewable in this repository may have been published. The source of a published asset indicates the publisher.
Returns: true if this asset has been published, falseif unpublished or its published status is not knownReturn type: boolean
-
published_date¶ Gets the published date of this asset.
Unpublished assets have no published date. A published asset has a date available, however the date returned may indicate that not much is known.
Returns: the published date Return type: osid.calendaring.DateTimeRaise: IllegalState–is_published()isfalse
-
principal_credit_string¶ Gets the credits of the principal people involved in the production of this asset as a display string.
Returns: the principal credits Return type: osid.locale.DisplayText
-
asset_content_ids¶ Gets the content
Idsof this asset.Returns: the asset content IdsReturn type: osid.id.IdList
-
asset_contents¶ Gets the content of this asset.
Returns: the asset contents Return type: osid.repository.AssetContentListRaise: OperationFailed– unable to complete request
-
is_composition()¶ Tetss if this asset is a representation of a composition of assets.
Returns: true if this asset is a composition, falseotherwiseReturn type: boolean
-
composition_id¶ Gets the
CompositionIdcorresponding to this asset.Returns: the composiiton IdReturn type: osid.id.IdRaise: IllegalState–is_composition()isfalse
-
composition¶ Gets the Composition corresponding to this asset.
Returns: the composiiton Return type: osid.repository.CompositionRaise: IllegalState–is_composition()isfalseRaise: OperationFailed– unable to complete request
-
get_asset_record(asset_record_type)¶ Gets the asset record corresponding to the given
AssetrecordType.This method is used to retrieve an object implementing the requested record. The
asset_record_typemay be theTypereturned inget_record_types()or any of its parents in aTypehierarchy wherehas_record_type(asset_record_type)istrue.Parameters: asset_record_type ( osid.type.Type) – an asset record typeReturns: the asset record Return type: osid.repository.records.AssetRecordRaise: NullArgument–asset_record_typeisnullRaise: OperationFailed– unable to complete requestRaise: Unsupported–has_record_type(asset_record_type)isfalse
-
Asset Form¶
-
class
dlkit.repository.objects.AssetForm¶ Bases:
dlkit.osid.objects.OsidObjectForm,dlkit.osid.objects.OsidAggregateableForm,dlkit.osid.objects.OsidSourceableFormThis is the form for creating and updating
Assets.Like all
OsidFormobjects, various data elements may be set here for use in the create and update methods in theAssetAdminSession. For each data element that may be set, metadata may be examined to provide display hints or data constraints.-
title_metadata¶ Gets the metadata for an asset title.
Returns: metadata for the title Return type: osid.Metadata
-
title¶ Sets the title.
Parameters: title ( string) – the new titleRaise: InvalidArgument–titleis invalidRaise: NoAccess–Metadata.isReadOnly()istrueRaise: NullArgument–titleisnull
-
public_domain_metadata¶ Gets the metadata for the public domain flag.
Returns: metadata for the public domain Return type: osid.Metadata
-
public_domain¶ Sets the public domain flag.
Parameters: public_domain ( boolean) – the public domain statusRaise: NoAccess–Metadata.isReadOnly()istrue
-
copyright_metadata¶ Gets the metadata for the copyright.
Returns: metadata for the copyright Return type: osid.Metadata
-
copyright_registration_metadata¶ Gets the metadata for the copyright registration.
Returns: metadata for the copyright registration Return type: osid.Metadata
-
copyright_registration¶ Sets the copyright registration.
Parameters: registration ( string) – the new copyright registrationRaise: InvalidArgument–copyrightis invalidRaise: NoAccess–Metadata.isReadOnly()istrueRaise: NullArgument–copyrightisnull
-
distribute_verbatim_metadata¶ Gets the metadata for the distribute verbatim rights flag.
Returns: metadata for the distribution rights fields Return type: osid.Metadata
-
distribute_verbatim¶ Sets the distribution rights.
Parameters: distribute_verbatim ( boolean) – right to distribute verbatim copiesRaise: InvalidArgument–distribute_verbatimis invalidRaise: NoAccess– authorization failure
-
distribute_alterations_metadata¶ Gets the metadata for the distribute alterations rights flag.
Returns: metadata for the distribution rights fields Return type: osid.Metadata
-
distribute_alterations¶ Sets the distribute alterations flag.
This also sets distribute verbatim to
true.Parameters: distribute_mods ( boolean) – right to distribute modificationsRaise: InvalidArgument–distribute_modsis invalidRaise: NoAccess– authorization failure
-
distribute_compositions_metadata¶ Gets the metadata for the distribute compositions rights flag.
Returns: metadata for the distribution rights fields Return type: osid.Metadata
-
distribute_compositions¶ Sets the distribution rights.
This sets distribute verbatim to
true.Parameters: distribute_comps ( boolean) – right to distribute modificationsRaise: InvalidArgument–distribute_compsis invalidRaise: NoAccess– authorization failure
-
source_metadata¶ Gets the metadata for the source.
Returns: metadata for the source Return type: osid.Metadata
-
source¶ Sets the source.
Parameters: source_id ( osid.id.Id) – the new publisherRaise: InvalidArgument–source_idis invalidRaise: NoAccess–Metadata.isReadOnly()istrueRaise: NullArgument–source_idisnull
-
provider_links_metadata¶ Gets the metadata for the provider chain.
Returns: metadata for the provider chain Return type: osid.Metadata
-
provider_links¶ Sets a provider chain in order from the most recent source to the originating source.
Parameters: resource_ids ( osid.id.Id[]) – the new sourceRaise: InvalidArgument–resource_idsis invalidRaise: NoAccess–Metadata.isReadOnly()istrueRaise: NullArgument–resource_idsisnull
-
created_date_metadata¶ Gets the metadata for the asset creation date.
Returns: metadata for the created date Return type: osid.Metadata
-
created_date¶ Sets the created date.
Parameters: created_date ( osid.calendaring.DateTime) – the new created dateRaise: InvalidArgument–created_dateis invalidRaise: NoAccess–Metadata.isReadOnly()istrueRaise: NullArgument–created_dateisnull
-
published_metadata¶ Gets the metadata for the published status.
Returns: metadata for the published field Return type: osid.Metadata
-
published¶ Sets the published status.
Parameters: published ( boolean) – the published statusRaise: NoAccess–Metadata.isReadOnly()istrue
-
published_date_metadata¶ Gets the metadata for the published date.
Returns: metadata for the published date Return type: osid.Metadata
-
published_date¶ Sets the published date.
Parameters: published_date ( osid.calendaring.DateTime) – the new published dateRaise: InvalidArgument–published_dateis invalidRaise: NoAccess–Metadata.isReadOnly()istrueRaise: NullArgument–published_dateisnull
-
principal_credit_string_metadata¶ Gets the metadata for the principal credit string.
Returns: metadata for the credit string Return type: osid.Metadata
-
principal_credit_string¶ Sets the principal credit string.
Parameters: credit_string ( string) – the new credit stringRaise: InvalidArgument–credit_stringis invalidRaise: NoAccess–Metadata.isReadOnly()istrueRaise: NullArgument–credit_stringisnull
-
composition_metadata¶ Gets the metadata for linking this asset to a composition.
Returns: metadata for the composition Return type: osid.Metadata
-
composition¶ Sets the composition.
Parameters: composition_id ( osid.id.Id) – a compositionRaise: InvalidArgument–composition_idis invalidRaise: NoAccess–Metadata.isReadOnly()istrueRaise: NullArgument–composition_idisnull
-
get_asset_form_record(asset_record_type)¶ Gets the
AssetFormRecordcorresponding to the givenAssetrecordType.Parameters: asset_record_type ( osid.type.Type) – an asset record typeReturns: the asset form record Return type: osid.repository.records.AssetFormRecordRaise: NullArgument–asset_record_typeisnullRaise: OperationFailed– unable to complete requestRaise: Unsupported–has_record_type(asset_record_type)isfalse
-
Asset List¶
-
class
dlkit.repository.objects.AssetList¶ Bases:
dlkit.osid.objects.OsidListLike all
OsidLists,AssetListprovides a means for accessingAssetelements sequentially either one at a time or many at a time.Examples: while (al.hasNext()) { Asset asset = al.getNextAsset(); }
- or
- while (al.hasNext()) {
- Asset[] assets = al.getNextAssets(al.available());
}
-
next_asset¶ Gets the next
Assetin this list.Returns: the next Assetin this list. Thehas_next()method should be used to test that a nextAssetis available before calling this method.Return type: osid.repository.AssetRaise: IllegalState– no more elements available in this listRaise: OperationFailed– unable to complete request
-
get_next_assets(n)¶ Gets the next set of
Assetsin this list which must be less than or equal to the return fromavailable().Parameters: n ( cardinal) – the number ofAssetelements requested which must be less than or equal toavailable()Returns: an array of Assetelements.The length of the array is less than or equal to the number specified.Return type: osid.repository.AssetRaise: IllegalState– no more elements available in this listRaise: OperationFailed– unable to complete request
Asset Content¶
-
class
dlkit.repository.objects.AssetContent¶ Bases:
dlkit.osid.objects.OsidObject,dlkit.osid.markers.SubjugateableAssetContentrepresents a version of content represented by anAsset.Although
AssetContentis a separateOsidObjectwith its ownIdto distuinguish it from other content inside anAsset, AssetContentcan only be accessed through anAsset.Once an
Assetis selected, multiple contents should be negotiated using the size, fidelity, accessibility requirements or application evnironment.-
asset_id¶ Gets the
Asset Idcorresponding to this content.Returns: the asset IdReturn type: osid.id.Id
-
asset¶ Gets the
Assetcorresponding to this content.Returns: the asset Return type: osid.repository.Asset
-
accessibility_types¶ Gets the accessibility types associated with this content.
Returns: list of content accessibility types Return type: osid.type.TypeList
-
has_data_length()¶ Tests if a data length is available.
Returns: trueif a length is available for this content,falseotherwise.Return type: boolean
-
data_length¶ Gets the length of the data represented by this content in bytes.
Returns: the length of the data stream Return type: cardinalRaise: IllegalState–has_data_length()isfalse
-
data¶ Gets the asset content data.
Returns: the length of the content data Return type: osid.transport.DataInputStreamRaise: OperationFailed– unable to complete request
-
has_url()¶ Tests if a URL is associated with this content.
Returns: trueif a URL is available,falseotherwiseReturn type: boolean
-
url¶ Gets the URL associated with this content for web-based retrieval.
Returns: the url for this data Return type: stringRaise: IllegalState–has_url()isfalse
-
get_asset_content_record(asset_content_content_record_type)¶ Gets the asset content record corresponding to the given
AssetContentrecordType.This method is used to retrieve an object implementing the requested record. The
asset_record_typemay be theTypereturned inget_record_types()or any of its parents in aTypehierarchy wherehas_record_type(asset_record_type)istrue.Parameters: asset_content_content_record_type ( osid.type.Type) – the type of the record to retrieveReturns: the asset content record Return type: osid.repository.records.AssetContentRecordRaise: NullArgument–asset_content_record_typeisnullRaise: OperationFailed– unable to complete requestRaise: Unsupported–has_record_type(asset_content_record_type)isfalse
-
Asset Content Form¶
-
class
dlkit.repository.objects.AssetContentForm¶ Bases:
dlkit.osid.objects.OsidObjectForm,dlkit.osid.objects.OsidSubjugateableFormThis is the form for creating and updating content for
AssetContent.Like all
OsidFormobjects, various data elements may be set here for use in the create and update methods in theAssetAdminSession. For each data element that may be set, metadata may be examined to provide display hints or data constraints.-
accessibility_type_metadata¶ Gets the metadata for an accessibility type.
Returns: metadata for the accessibility types Return type: osid.Metadata
-
add_accessibility_type(accessibility_type)¶ Adds an accessibility type.
Multiple types can be added.
Parameters: accessibility_type ( osid.type.Type) – a new accessibility typeRaise: InvalidArgument–accessibility_typeis invalidRaise: NoAccess–Metadata.isReadOnly()istrueRaise: NullArgument–accessibility_t_ypeisnull
-
remove_accessibility_type(accessibility_type)¶ Removes an accessibility type.
Parameters: accessibility_type ( osid.type.Type) – accessibility type to removeRaise: NoAccess–Metadata.isReadOnly()istrueRaise: NotFound– acessibility type not foundRaise: NullArgument–accessibility_typeisnull
-
accessibility_types¶
-
data_metadata¶ Gets the metadata for the content data.
Returns: metadata for the content data Return type: osid.Metadata
-
data¶ Sets the content data.
Parameters: data ( osid.transport.DataInputStream) – the content dataRaise: InvalidArgument–datais invalidRaise: NoAccess–Metadata.isReadOnly()istrueRaise: NullArgument–dataisnull
-
url_metadata¶ Gets the metadata for the url.
Returns: metadata for the url Return type: osid.Metadata
-
url¶ Sets the url.
Parameters: url ( string) – the new copyrightRaise: InvalidArgument–urlis invalidRaise: NoAccess–Metadata.isReadOnly()istrueRaise: NullArgument–urlisnull
-
get_asset_content_form_record(asset_content_record_type)¶ Gets the
AssetContentFormRecordcorresponding to the given asset content recordType.Parameters: asset_content_record_type ( osid.type.Type) – an asset content record typeReturns: the asset content form record Return type: osid.repository.records.AssetContentFormRecordRaise: NullArgument–asset_content_record_typeisnullRaise: OperationFailed– unable to complete requestRaise: Unsupported–has_record_type(asset_content_record_type)isfalse
-
Asset Content List¶
-
class
dlkit.repository.objects.AssetContentList¶ Bases:
dlkit.osid.objects.OsidListLike all
OsidLists,AssetContentListprovides a means for accessingAssetContentelements sequentially either one at a time or many at a time.Examples: while (acl.hasNext()) { AssetContent content = acl.getNextAssetContent(); }
- or
- while (acl.hasNext()) {
- AssetContent[] contents = acl.getNextAssetContents(acl.available());
}
-
next_asset_content¶ Gets the next
AssetContentin this list.Returns: the next AssetContentin this list. Thehas_next()method should be used to test that a nextAssetContentis available before calling this method.Return type: osid.repository.AssetContentRaise: IllegalState– no more elements available in this listRaise: OperationFailed– unable to complete request
-
get_next_asset_contents(n)¶ Gets the next set of
AssetContentsin this list which must be less than or equal to the return fromavailable().Parameters: n ( cardinal) – the number ofAssetContentelements requested which must be less than or equal toavailable()Returns: an array of AssetContentelements.The length of the array is less than or equal to the number specified.Return type: osid.repository.AssetContentRaise: IllegalState– no more elements available in this listRaise: OperationFailed– unable to complete request
Repository Form¶
-
class
dlkit.repository.objects.RepositoryForm¶ Bases:
dlkit.osid.objects.OsidCatalogFormThis is the form for creating and updating repositories.
Like all
OsidFormobjects, various data elements may be set here for use in the create and update methods in theRepositoryAdminSession. For each data element that may be set, metadata may be examined to provide display hints or data constraints.-
get_repository_form_record(repository_record_type)¶ Gets the
RepositoryFormRecordcorresponding to the given repository recordType.Parameters: repository_record_type ( osid.type.Type) – a repository record typeReturns: the repository form record Return type: osid.repository.records.RepositoryFormRecordRaise: NullArgument–repository_record_typeisnullRaise: OperationFailed– unable to complete requestRaise: Unsupported–has_record_type(repository_record_type)isfalse
-
Repository List¶
-
class
dlkit.repository.objects.RepositoryList¶ Bases:
dlkit.osid.objects.OsidListLike all
OsidLists,RepositoryListprovides a means for accessingRepositoryelements sequentially either one at a time or many at a time.Examples: while (rl.hasNext()) { Repository repository = rl.getNextRepository(); }
- or
- while (rl.hasNext()) {
- Repository[] repositories = rl.getNextRepositories(rl.available());
}
-
next_repository¶ Gets the next
Repositoryin this list.Returns: the next Repositoryin this list. Thehas_next()method should be used to test that a nextRepositoryis available before calling this method.Return type: osid.repository.RepositoryRaise: IllegalState– no more elements available in this listRaise: OperationFailed– unable to complete request
-
get_next_repositories(n)¶ Gets the next set of
Repositoryelements in this list which must be less than or equal to the return fromavailable().Parameters: n ( cardinal) – the number ofRepositoryelements requested which must be less than or equal toavailable()Returns: an array of Repositoryelements.The length of the array is less than or equal to the number specified.Return type: osid.repository.RepositoryRaise: IllegalState– no more elements available in this listRaise: OperationFailed– unable to complete request
Queries¶
Asset Query¶
-
class
dlkit.repository.queries.AssetQuery¶ Bases:
dlkit.osid.queries.OsidObjectQuery,dlkit.osid.queries.OsidAggregateableQuery,dlkit.osid.queries.OsidSourceableQueryThis is the query for searching assets.
Each method specifies an
ANDterm while multiple invocations of the same method produce a nestedOR. The query record is identified by theAsset Type.-
match_title(title, string_match_type, match)¶ Adds a title for this query.
Parameters: - title (
string) – title string to match - string_match_type (
osid.type.Type) – the string match type - match (
boolean) –truefor a positive match,falsefor a negative match
Raise: InvalidArgument–titlenot ofstring_match_typeRaise: NullArgument–titleorstring_match_typeisnullRaise: Unsupported–supports_string_match_type(string_match_type)isfalse- title (
-
match_any_title(match)¶ Matches a title that has any value.
Parameters: match ( boolean) –trueto match assets with any title,falseto match assets with no title
-
title_terms¶
-
match_public_domain(public_domain)¶ Matches assets marked as public domain.
Parameters: public_domain ( boolean) – public domain flag
-
match_any_public_domain(match)¶ Matches assets with any public domain value.
Parameters: match ( boolean) –trueto match assets with any public domain value,falseto match assets with no public domain value
-
public_domain_terms¶
-
match_copyright(copyright_, string_match_type, match)¶ Adds a copyright for this query.
Parameters: - copyright (
string) – copyright string to match - string_match_type (
osid.type.Type) – the string match type - match (
boolean) –truefor a positive match,falsefor a negative match
Raise: InvalidArgument–copyrightnot ofstring_match_typeRaise: NullArgument–copyrightorstring_match_typeisnullRaise: Unsupported–supports_string_match_type(string_match_type)isfalse- copyright (
-
match_any_copyright(match)¶ Matches assets with any copyright statement.
Parameters: match ( boolean) –trueto match assets with any copyright value,falseto match assets with no copyright value
-
copyright_terms¶
-
match_copyright_registration(registration, string_match_type, match)¶ Adds a copyright registration for this query.
Parameters: - registration (
string) – copyright registration string to match - string_match_type (
osid.type.Type) – the string match type - match (
boolean) –truefor a positive match,falsefor a negative match
Raise: InvalidArgument–registrationnot ofstring_match_typeRaise: NullArgument–registrationorstring_match_typeisnullRaise: Unsupported–supports_string_match_type(string_match_type)isfalse- registration (
-
match_any_copyright_registration(match)¶ Matches assets with any copyright registration.
Parameters: match ( boolean) –trueto match assets with any copyright registration value,falseto match assets with no copyright registration value
-
copyright_registration_terms¶
-
match_distribute_verbatim(distributable)¶ Matches assets marked as distributable.
Parameters: distributable ( boolean) – distribute verbatim rights flag
-
distribute_verbatim_terms¶
-
match_distribute_alterations(alterable)¶ Matches assets that whose alterations can be distributed.
Parameters: alterable ( boolean) – distribute alterations rights flag
-
distribute_alterations_terms¶
-
match_distribute_compositions(composable)¶ Matches assets that can be distributed as part of other compositions.
Parameters: composable ( boolean) – distribute compositions rights flag
-
distribute_compositions_terms¶
-
match_source_id(source_id, match)¶ Sets the source
Idfor this query.Parameters: - source_id (
osid.id.Id) – the sourceId - match (
boolean) –truefor a positive match,falsefor a negative match
Raise: NullArgument–source_idisnull- source_id (
-
source_id_terms¶
-
supports_source_query()¶ Tests if a
ResourceQueryis available for the source.Returns: trueif a resource query is available,falseotherwiseReturn type: boolean
-
source_query¶ Gets the query for the source.
Multiple queries can be retrieved for a nested
ORterm.Returns: the source query Return type: osid.resource.ResourceQueryRaise: Unimplemented–supports_source_query()isfalse
-
match_any_source(match)¶ Matches assets with any source.
Parameters: match ( boolean) –trueto match assets with any source,falseto match assets with no sources
-
source_terms¶
-
match_created_date(start, end, match)¶ Match assets that are created between the specified time period.
Parameters: - start (
osid.calendaring.DateTime) – start time of the query - end (
osid.calendaring.DateTime) – end time of the query - match (
boolean) –truefor a positive match,falsefor a negative match
Raise: InvalidArgument–endis les thanstartRaise: NullArgument–startorendisnull- start (
-
match_any_created_date(match)¶ Matches assets with any creation time.
Parameters: match ( boolean) –trueto match assets with any created time,falseto match assets with no cerated time
-
created_date_terms¶
-
match_published(published)¶ Marks assets that are marked as published.
Parameters: published ( boolean) – published flag
-
published_terms¶
-
match_published_date(start, end, match)¶ Match assets that are published between the specified time period.
Parameters: - start (
osid.calendaring.DateTime) – start time of the query - end (
osid.calendaring.DateTime) – end time of the query - match (
boolean) –truefor a positive match,falsefor a negative match
Raise: InvalidArgument–endis les thanstartRaise: NullArgument–startorendisnull- start (
-
match_any_published_date(match)¶ Matches assets with any published time.
Parameters: match ( boolean) –trueto match assets with any published time,falseto match assets with no published time
-
published_date_terms¶
-
match_principal_credit_string(credit, string_match_type, match)¶ Adds a principal credit string for this query.
Parameters: - credit (
string) – credit string to match - string_match_type (
osid.type.Type) – the string match type - match (
boolean) –truefor a positive match,falsefor a negative match
Raise: InvalidArgument–creditnot ofstring_match_typeRaise: NullArgument–creditorstring_match_typeisnullRaise: Unsupported–supports_string_match_type(string_match_type)isfalse- credit (
-
match_any_principal_credit_string(match)¶ Matches a principal credit string that has any value.
Parameters: match ( boolean) –trueto match assets with any principal credit string,falseto match assets with no principal credit string
-
principal_credit_string_terms¶
-
match_temporal_coverage(start, end, match)¶ Match assets that whose coverage falls between the specified time period inclusive.
Parameters: - start (
osid.calendaring.DateTime) – start time of the query - end (
osid.calendaring.DateTime) – end time of the query - match (
boolean) –truefor a positive match,falsefor a negative match
Raise: InvalidArgument–endis less thanstartRaise: NullArgument–startorendisnull- start (
-
match_any_temporal_coverage(match)¶ Matches assets with any temporal coverage.
Parameters: match ( boolean) –trueto match assets with any temporal coverage,falseto match assets with no temporal coverage
-
temporal_coverage_terms¶
-
match_location_id(location_id, match)¶ Sets the location
Idfor this query of spatial coverage.Parameters: - location_id (
osid.id.Id) – the locationId - match (
boolean) –truefor a positive match,falsefor a negative match
Raise: NullArgument–location_idisnull- location_id (
-
location_id_terms¶
-
supports_location_query()¶ Tests if a
LocationQueryis available for the provider.Returns: trueif a location query is available,falseotherwiseReturn type: boolean
-
location_query¶ Gets the query for a location.
Multiple queries can be retrieved for a nested
ORterm.Returns: the location query Return type: osid.mapping.LocationQueryRaise: Unimplemented–supports_location_query()isfalse
-
match_any_location(match)¶ Matches assets with any provider.
Parameters: match ( boolean) –trueto match assets with any location,falseto match assets with no locations
-
location_terms¶
-
match_spatial_coverage(spatial_unit, match)¶ Matches assets that are contained within the given spatial unit.
Parameters: - spatial_unit (
osid.mapping.SpatialUnit) – the spatial unit - match (
boolean) –truefor a positive match,falsefor a negative match
Raise: NullArgument–spatial_unitisnullRaise: Unsupported–spatial_unitis not suppoted- spatial_unit (
-
spatial_coverage_terms¶
-
match_spatial_coverage_overlap(spatial_unit, match)¶ Matches assets that overlap or touch the given spatial unit.
Parameters: - spatial_unit (
osid.mapping.SpatialUnit) – the spatial unit - match (
boolean) –truefor a positive match,falsefor a negative match
Raise: NullArgument–spatial_unitisnullRaise: Unsupported–spatial_unitis not suppoted- spatial_unit (
-
match_any_spatial_coverage(match)¶ Matches assets with no spatial coverage.
Parameters: match ( boolean) –trueto match assets with any spatial coverage,falseto match assets with no spatial coverage
-
spatial_coverage_overlap_terms¶
-
match_asset_content_id(asset_content_id, match)¶ Sets the asset content
Idfor this query.Parameters: - asset_content_id (
osid.id.Id) – the asset contentId - match (
boolean) –truefor a positive match,falsefor a negative match
Raise: NullArgument–asset_content_idisnull- asset_content_id (
-
asset_content_id_terms¶
-
supports_asset_content_query()¶ Tests if an
AssetContentQueryis available.Returns: trueif an asset content query is available,falseotherwiseReturn type: boolean
-
asset_content_query¶ Gets the query for the asset content.
Multiple queries can be retrieved for a nested
ORterm.Returns: the asset contents query Return type: osid.repository.AssetContentQueryRaise: Unimplemented–supports_asset_content_query()isfalse
-
match_any_asset_content(match)¶ Matches assets with any content.
Parameters: match ( boolean) –trueto match assets with any content,falseto match assets with no content
-
asset_content_terms¶
-
match_composition_id(composition_id, match)¶ Sets the composition
Idfor this query to match assets that are a part of the composition.Parameters: - composition_id (
osid.id.Id) – the compositionId - match (
boolean) –truefor a positive match,falsefor a negative match
Raise: NullArgument–composition_idisnull- composition_id (
-
composition_id_terms¶
-
supports_composition_query()¶ Tests if a
CompositionQueryis available.Returns: trueif a composition query is available,falseotherwiseReturn type: boolean
-
composition_query¶ Gets the query for a composition.
Multiple queries can be retrieved for a nested
ORterm.Returns: the composition query Return type: osid.repository.CompositionQueryRaise: Unimplemented–supports_composition_query()isfalse
-
match_any_composition(match)¶ Matches assets with any composition mappings.
Parameters: match ( boolean) –trueto match assets with any composition,falseto match assets with no composition mappings
-
composition_terms¶
-
match_repository_id(repository_id, match)¶ Sets the repository
Idfor this query.Parameters: - repository_id (
osid.id.Id) – the repositoryId - match (
boolean) –truefor a positive match,falsefor a negative match
Raise: NullArgument–repository_idisnull- repository_id (
-
repository_id_terms¶
-
supports_repository_query()¶ Tests if a
RepositoryQueryis available.Returns: trueif a repository query is available,falseotherwiseReturn type: boolean
-
repository_query¶ Gets the query for a repository.
Multiple queries can be retrieved for a nested
ORterm.Returns: the repository query Return type: osid.repository.RepositoryQueryRaise: Unimplemented–supports_repository_query()isfalse
-
repository_terms¶
-
get_asset_query_record(asset_record_type)¶ Gets the asset query record corresponding to the given
AssetrecordType.Multiuple retrievals produce a nested
ORterm.Parameters: asset_record_type ( osid.type.Type) – an asset record typeReturns: the asset query record Return type: osid.repository.records.AssetQueryRecordRaise: NullArgument–asset_record_typeisnullRaise: OperationFailed– unable to complete requestRaise: Unsupported–has_record_type(asset_record_type)isfalse
-
Asset Content Query¶
-
class
dlkit.repository.queries.AssetContentQuery¶ Bases:
dlkit.osid.queries.OsidObjectQuery,dlkit.osid.queries.OsidSubjugateableQueryThis is the query for searching asset contents.
Each method forms an
ANDterm while multiple invocations of the same method produce a nestedOR.-
match_accessibility_type(accessibility_type, match)¶ Sets the accessibility types for this query.
Supplying multiple types behaves like a boolean OR among the elements.
Parameters: - accessibility_type (
osid.type.Type) – an accessibilityType - match (
boolean) –truefor a positive match,falsefor a negative match
Raise: NullArgument–accessibility_typeisnull- accessibility_type (
-
match_any_accessibility_type(match)¶ Matches asset content that has any accessibility type.
Parameters: match ( boolean) –trueto match content with any accessibility type,falseto match content with no accessibility type
-
accessibility_type_terms¶
-
match_data_length(low, high, match)¶ Matches content whose length of the data in bytes are inclusive of the given range.
Parameters: - low (
cardinal) – low range - high (
cardinal) – high range - match (
boolean) –truefor a positive match,falsefor a negative match
Raise: InvalidArgument–lowis greater thanhigh- low (
-
match_any_data_length(match)¶ Matches content that has any data length.
Parameters: match ( boolean) –trueto match content with any data length,falseto match content with no data length
-
data_length_terms¶
-
match_data(data, match, partial)¶ Matches data in this content.
Parameters: - data (
byte[]) – list of matching strings - match (
boolean) –truefor a positive match,falsefor a negative match - partial (
boolean) –truefor a partial match,falsefor a complete match
Raise: NullArgument–dataisnull- data (
-
match_any_data(match)¶ Matches content that has any data.
Parameters: match ( boolean) –trueto match content with any data,falseto match content with no data
-
data_terms¶
-
match_url(url, string_match_type, match)¶ Sets the url for this query.
Supplying multiple strings behaves like a boolean
ORamong the elements each which must correspond to thestringMatchType.Parameters: - url (
string) – url string to match - string_match_type (
osid.type.Type) – the string match type - match (
boolean) –truefor a positive match,falsefor a negative match
Raise: InvalidArgument–urlnot ofstring_match_typeRaise: NullArgument–urlorstring_match_typeisnullRaise: Unsupported–supports_string_match_type(url)isfalse- url (
-
match_any_url(match)¶ Matches content that has any url.
Parameters: match ( boolean) –trueto match content with any url,falseto match content with no url
-
url_terms¶
-
get_asset_content_query_record(asset_content_record_type)¶ Gets the asset content query record corresponding to the given
AssetContentrecordType.Multiple record retrievals produce a nested
ORterm.Parameters: asset_content_record_type ( osid.type.Type) – an asset content record typeReturns: the asset content query record Return type: osid.repository.records.AssetContentQueryRecordRaise: NullArgument–asset_content_record_typeisnullRaise: OperationFailed– unable to complete requestRaise: Unsupported–has_record_type(asset_content_record_type)isfalse
-
Repository Query¶
-
class
dlkit.repository.queries.RepositoryQuery¶ Bases:
dlkit.osid.queries.OsidCatalogQueryThis is the query for searching repositories.
Each method specifies an
ANDterm while multiple invocations of the same method produce a nestedOR.-
match_asset_id(asset_id, match)¶ Sets the asset
Idfor this query.Parameters: - asset_id (
osid.id.Id) – an assetId - match (
boolean) –truefor a positive match,falsefor a negative match
Raise: NullArgument–asset_idisnull- asset_id (
-
asset_id_terms¶
-
supports_asset_query()¶ Tests if an
AssetQueryis available.Returns: trueif an asset query is available,falseotherwiseReturn type: boolean
-
asset_query¶ Gets the query for an asset.
Multiple retrievals produce a nested
ORterm.Returns: the asset query Return type: osid.repository.AssetQueryRaise: Unimplemented–supports_asset_query()isfalse
-
match_any_asset(match)¶ Matches repositories that has any asset mapping.
Parameters: match ( boolean) –trueto match repositories with any asset,falseto match repositories with no asset
-
asset_terms¶
-
match_composition_id(composition_id, match)¶ Sets the composition
Idfor this query.Parameters: - composition_id (
osid.id.Id) – a compositionId - match (
boolean) –truefor a positive match,falsefor a negative match
Raise: NullArgument–composition_idisnull- composition_id (
-
composition_id_terms¶
-
supports_composition_query()¶ Tests if a
CompositionQueryis available.Returns: trueif a composition query is available,falseotherwiseReturn type: boolean
-
composition_query¶ Gets the query for a composition.
Multiple retrievals produce a nested
ORterm.Returns: the composition query Return type: osid.repository.CompositionQueryRaise: Unimplemented–supports_composition_query()isfalse
-
match_any_composition(match)¶ Matches repositories that has any composition mapping.
Parameters: match ( boolean) –trueto match repositories with any composition,falseto match repositories with no composition
-
composition_terms¶
-
match_ancestor_repository_id(repository_id, match)¶ Sets the repository
Idfor this query to match repositories that have the specified repository as an ancestor.Parameters: - repository_id (
osid.id.Id) – a repositoryId - match (
boolean) –truefor a positive match,falsefor a negative match
Raise: NullArgument–repository_idisnull- repository_id (
-
ancestor_repository_id_terms¶
-
supports_ancestor_repository_query()¶ Tests if a
RepositoryQueryis available.Returns: trueif a repository query is available,falseotherwiseReturn type: boolean
-
ancestor_repository_query¶ Gets the query for a repository.
Multiple retrievals produce a nested
ORterm.Returns: the repository query Return type: osid.repository.RepositoryQueryRaise: Unimplemented–supports_ancestor_repository_query()isfalse
-
match_any_ancestor_repository(match)¶ Matches repositories with any ancestor.
Parameters: match ( boolean) –trueto match repositories with any ancestor,falseto match root repositories
-
ancestor_repository_terms¶
-
match_descendant_repository_id(repository_id, match)¶ Sets the repository
Idfor this query to match repositories that have the specified repository as a descendant.Parameters: - repository_id (
osid.id.Id) – a repositoryId - match (
boolean) –truefor a positive match,falsefor a negative match
Raise: NullArgument–repository_idisnull- repository_id (
-
descendant_repository_id_terms¶
-
supports_descendant_repository_query()¶ Tests if a
RepositoryQueryis available.Returns: trueif a repository query is available,falseotherwiseReturn type: boolean
-
descendant_repository_query¶ Gets the query for a repository.
Multiple retrievals produce a nested
ORterm.Returns: the repository query Return type: osid.repository.RepositoryQueryRaise: Unimplemented–supports_descendant_repository_query()isfalse
-
match_any_descendant_repository(match)¶ Matches repositories with any descendant.
Parameters: match ( boolean) –trueto match repositories with any descendant,falseto match leaf repositories
-
descendant_repository_terms¶
-
get_repository_query_record(repository_record_type)¶ Gets the repository query record corresponding to the given
RepositoryrecordType.Multiple record retrievals produce a nested
ORterm.Parameters: repository_record_type ( osid.type.Type) – a repository record typeReturns: the repository query record Return type: osid.repository.records.RepositoryQueryRecordRaise: NullArgument–repository_record_typeisnullRaise: OperationFailed– unable to complete requestRaise: Unsupported–has_record_type(repository_record_type)isfalse
-
Records¶
Asset Record¶
-
class
dlkit.repository.records.AssetRecord¶ Bases:
dlkit.osid.records.OsidRecordA record for an
Asset.The methods specified by the record type are available through the underlying object.
Asset Query Record¶
-
class
dlkit.repository.records.AssetQueryRecord¶ Bases:
dlkit.osid.records.OsidRecordA record for an
AssetQuery.The methods specified by the record type are available through the underlying object.
Asset Form Record¶
-
class
dlkit.repository.records.AssetFormRecord¶ Bases:
dlkit.osid.records.OsidRecordA record for an
AssetForm.The methods specified by the record type are available through the underlying object.
Asset Content Record¶
-
class
dlkit.repository.records.AssetContentRecord¶ Bases:
dlkit.osid.records.OsidRecordA record for an
AssetContent.The methods specified by the record type are available through the underlying object.
Asset Content Query Record¶
-
class
dlkit.repository.records.AssetContentQueryRecord¶ Bases:
dlkit.osid.records.OsidRecordA record for an
AssetContentQuery.The methods specified by the record type are available through the underlying object.
Asset Content Form Record¶
-
class
dlkit.repository.records.AssetContentFormRecord¶ Bases:
dlkit.osid.records.OsidRecordA record for an
AssetForm.The methods specified by the record type are available through the underlying object.
Repository Record¶
-
class
dlkit.repository.records.RepositoryRecord¶ Bases:
dlkit.osid.records.OsidRecordA record for a
Repository.The methods specified by the record type are available through the underlying object.
Repository Query Record¶
-
class
dlkit.repository.records.RepositoryQueryRecord¶ Bases:
dlkit.osid.records.OsidRecordA record for a
RepositoryQuery.The methods specified by the record type are available through the underlying object.
Repository Form Record¶
-
class
dlkit.repository.records.RepositoryFormRecord¶ Bases:
dlkit.osid.records.OsidRecordA record for a
RepositoryForm.The methods specified by the record type are available through the underlying object.