_id stringlengths 2 7 | title stringlengths 1 88 | partition stringclasses 3
values | text stringlengths 75 19.8k | language stringclasses 1
value | meta_information dict |
|---|---|---|---|---|---|
q47500 | GradingProxyManager.get_gradebook_column_lookup_session | train | def get_gradebook_column_lookup_session(self, proxy):
"""Gets the ``OsidSession`` associated with the gradebook column lookup service.
arg: proxy (osid.proxy.Proxy): a proxy
return: (osid.grading.GradebookColumnLookupSession) - a
``GradebookColumnLookupSession``
raise... | python | {
"resource": ""
} |
q47501 | GradingProxyManager.get_gradebook_column_lookup_session_for_gradebook | train | def get_gradebook_column_lookup_session_for_gradebook(self, gradebook_id, proxy):
"""Gets the ``OsidSession`` associated with the gradebook column lookup service for the given gradebook.
arg: gradebook_id (osid.id.Id): the ``Id`` of the gradebook
arg: proxy (osid.proxy.Proxy): a proxy
... | python | {
"resource": ""
} |
q47502 | GradingProxyManager.get_gradebook_column_query_session | train | def get_gradebook_column_query_session(self, proxy):
"""Gets the ``OsidSession`` associated with the gradebook column query service.
arg: proxy (osid.proxy.Proxy): a proxy
return: (osid.grading.GradebookColumnQuerySession) - a
``GradebookColumnQuerySession``
raise: N... | python | {
"resource": ""
} |
q47503 | GradingProxyManager.get_gradebook_column_query_session_for_gradebook | train | def get_gradebook_column_query_session_for_gradebook(self, gradebook_id, proxy):
"""Gets the ``OsidSession`` associated with the gradebook column query service for the given gradebook.
arg: gradebook_id (osid.id.Id): the ``Id`` of the gradebook
arg: proxy (osid.proxy.Proxy): a proxy
... | python | {
"resource": ""
} |
q47504 | GradingProxyManager.get_gradebook_column_gradebook_assignment_session | train | def get_gradebook_column_gradebook_assignment_session(self, proxy):
"""Gets the session for assigning gradebook column to gradebook mappings.
arg: proxy (osid.proxy.Proxy): a proxy
return: (osid.grading.GradebookColumnGradebookAssignmentSession)
- a ``GradebookColumnGradebook... | python | {
"resource": ""
} |
q47505 | GradingProxyManager.get_gradebook_lookup_session | train | def get_gradebook_lookup_session(self, proxy):
"""Gets the OsidSession associated with the gradebook lookup service.
arg: proxy (osid.proxy.Proxy): a proxy
return: (osid.grading.GradebookLookupSession) - a
``GradebookLookupSession``
raise: NullArgument - ``proxy`` is... | python | {
"resource": ""
} |
q47506 | GradingProxyManager.get_gradebook_admin_session | train | def get_gradebook_admin_session(self, proxy):
"""Gets the OsidSession associated with the gradebook administration service.
arg: proxy (osid.proxy.Proxy): a proxy
return: (osid.grading.GradebookAdminSession) - a
``GradebookAdminSession``
raise: NullArgument - ``proxy... | python | {
"resource": ""
} |
q47507 | GradingProxyManager.get_gradebook_hierarchy_session | train | def get_gradebook_hierarchy_session(self, proxy):
"""Gets the session traversing gradebook hierarchies.
arg: proxy (osid.proxy.Proxy): a proxy
return: (osid.grading.GradebookHierarchySession) - a
``GradebookHierarchySession``
raise: NullArgument - ``proxy`` is ``null... | python | {
"resource": ""
} |
q47508 | GradingProxyManager.get_gradebook_hierarchy_design_session | train | def get_gradebook_hierarchy_design_session(self, proxy):
"""Gets the session designing gradebook hierarchies.
arg: proxy (osid.proxy.Proxy): a proxy
return: (osid.grading.GradebookHierarchyDesignSession) - a
``GradebookHierarchyDesignSession``
raise: NullArgument - `... | python | {
"resource": ""
} |
q47509 | HierarchyManager._instantiate_session | train | def _instantiate_session(self, method_name, proxy=None, *args, **kwargs):
"""Instantiates a provider session"""
if 'manager' in kwargs:
session_class = getattr(kwargs['manager'], method_name)
del kwargs['manager']
else:
session_class = getattr(self._provider_m... | python | {
"resource": ""
} |
q47510 | HierarchyManager.use_comparative_hierarchy_view | train | def use_comparative_hierarchy_view(self):
"""Pass through to provider HierarchyLookupSession.use_comparative_hierarchy_view"""
self._hierarchy_view = COMPARATIVE
# self._get_provider_session('hierarchy_lookup_session') # To make sure the session is tracked
for session in self._get_provid... | python | {
"resource": ""
} |
q47511 | HierarchyManager.use_plenary_hierarchy_view | train | def use_plenary_hierarchy_view(self):
"""Pass through to provider HierarchyLookupSession.use_plenary_hierarchy_view"""
self._hierarchy_view = PLENARY
# self._get_provider_session('hierarchy_lookup_session') # To make sure the session is tracked
for session in self._get_provider_sessions(... | python | {
"resource": ""
} |
q47512 | HierarchyManager.get_hierarchies_by_ids | train | def get_hierarchies_by_ids(self, *args, **kwargs):
"""Pass through to provider HierarchyLookupSession.get_hierarchies_by_ids"""
# Implemented from kitosid template for -
# osid.resource.BinLookupSession.get_bins_by_ids
catalogs = self._get_provider_session('hierarchy_lookup_session').get... | python | {
"resource": ""
} |
q47513 | HierarchyManager.get_hierarchies | train | def get_hierarchies(self):
"""Pass through to provider HierarchyLookupSession.get_hierarchies"""
# Implemented from kitosid template for -
# osid.resource.BinLookupSession.get_bins_template
catalogs = self._get_provider_session('hierarchy_lookup_session').get_hierarchies()
cat_li... | python | {
"resource": ""
} |
q47514 | HierarchyManager.create_hierarchy | train | def create_hierarchy(self, *args, **kwargs):
"""Pass through to provider HierarchyAdminSession.create_hierarchy"""
# Implemented from kitosid template for -
# osid.resource.BinAdminSession.create_bin
return Hierarchy(
self._provider_manager,
self._get_provider_ses... | python | {
"resource": ""
} |
q47515 | HierarchyManager.get_hierarchy_form | train | def get_hierarchy_form(self, *args, **kwargs):
"""Pass through to provider HierarchyAdminSession.get_hierarchy_form_for_update"""
# Implemented from kitosid template for -
# osid.resource.BinAdminSession.get_bin_form_for_update_template
# This method might be a bit sketchy. Time will tel... | python | {
"resource": ""
} |
q47516 | HierarchyManager.save_hierarchy | train | def save_hierarchy(self, hierarchy_form, *args, **kwargs):
"""Pass through to provider HierarchyAdminSession.update_hierarchy"""
# Implemented from kitosid template for -
# osid.resource.BinAdminSession.update_bin
if hierarchy_form.is_for_update():
return self.update_hierarch... | python | {
"resource": ""
} |
q47517 | Hierarchy._set_object_view | train | def _set_object_view(self, session):
"""Sets the underlying object views to match current view"""
for obj_name in self._object_views:
if self._object_views[obj_name] == PLENARY:
try:
getattr(session, 'use_plenary_' + obj_name + '_view')()
e... | python | {
"resource": ""
} |
q47518 | Hierarchy._set_operable_view | train | def _set_operable_view(self, session):
"""Sets the underlying operable views to match current view"""
for obj_name in self._operable_views:
if self._operable_views[obj_name] == ACTIVE:
try:
getattr(session, 'use_active_' + obj_name + '_view')()
... | python | {
"resource": ""
} |
q47519 | Hierarchy._set_containable_view | train | def _set_containable_view(self, session):
"""Sets the underlying containable views to match current view"""
for obj_name in self._containable_views:
if self._containable_views[obj_name] == SEQUESTERED:
try:
getattr(session, 'use_sequestered_' + obj_name + ... | python | {
"resource": ""
} |
q47520 | host_context | train | def host_context(func):
"Sets the context of the setting to the current host"
@wraps(func)
def decorator(*args, **kwargs):
hosts = get_hosts_settings()
with settings(**hosts[env.host]):
return func(*args, **kwargs)
return decorator | python | {
"resource": ""
} |
q47521 | merge_commit | train | def merge_commit(commit):
"Fetches the latest code and merges up the specified commit."
with cd(env.path):
run('git fetch')
if '@' in commit:
branch, commit = commit.split('@')
run('git checkout {0}'.format(branch))
run('git merge {0}'.format(commit)) | python | {
"resource": ""
} |
q47522 | migrate | train | def migrate(app_name=None, revision=None):
"Syncs and migrates the database using South."
cmd = ['python bin/manage.py syncdb --migrate']
if app_name:
cmd.append(app_name)
if revision:
cmd.append(revision)
verun(' '.join(cmd)) | python | {
"resource": ""
} |
q47523 | reload_wsgi | train | def reload_wsgi():
"Gets the PID for the wsgi process and sends a HUP signal."
pid = run('supervisorctl pid varify-{host}'.format(host=env.host))
try:
int(pid)
sudo('kill -HUP {0}'.format(pid))
except (TypeError, ValueError):
pass | python | {
"resource": ""
} |
q47524 | setup | train | def setup():
"Sets up the initial environment."
parent, project = os.path.split(env.path)
if not exists(parent):
run('mkdir -p {0}'.format(parent))
run('virtualenv {0}'.format(parent))
with cd(parent):
if not exists(project):
run('git clone {repo_url} {project}'.for... | python | {
"resource": ""
} |
q47525 | upload_settings | train | def upload_settings():
"Uploads the non-versioned local settings to the server."
local_path = os.path.join(curdir, 'settings/{0}.py'.format(env.host))
if os.path.exists(local_path):
remote_path = os.path.join(env.path, 'varify/conf/local_settings.py')
put(local_path, remote_path)
elif no... | python | {
"resource": ""
} |
q47526 | send | train | def send(template_name, sender=None, to=None, cc=None, bcc=None, subject='mail',
attachments=(), html_template_name=None, context=None, headers=None,
reply_to=None):
"""
Render and send an email. `template_name` is a plaintext template.
If `html_template_name` is passed then a multipart ... | python | {
"resource": ""
} |
q47527 | BasePipe.materialize_node | train | def materialize_node(self, node, uri, content, meta=None):
"""
Set node uri and content from backend
"""
node.uri = uri
node.content = content
node.meta = meta if meta is not None else {} | python | {
"resource": ""
} |
q47528 | load_image | train | def load_image(canvas, filepath, bounds=None):
"""Takes a tk.Canvas and a filepath, loads image into canvas"""
image_data = Image.open(filepath)
if bounds:
image_data.thumbnail(bounds, PIL.Image.ANTIALIAS)
canvas.image = ImageTk.PhotoImage(image_data)
canvas.create_image(0, 0, image=canvas.... | python | {
"resource": ""
} |
q47529 | ImageFrame.load_image | train | def load_image(self, imagepath, width=None, height=None):
"""Loads new image into canvas, updating size if needed."""
if width:
self.width = width
self.canvas["width"] = width
if height:
self.height = height
self.canvas["height"] = height
... | python | {
"resource": ""
} |
q47530 | AuthorizationSession._get_hierarchy_session | train | def _get_hierarchy_session(self, hierarchy_id):
"""Returns a hierarchy traversal session for the hierarchy"""
hierarchy_mgr = self._get_provider_manager('HIERARCHY', local=True)
return hierarchy_mgr.get_hierarchy_traversal_session_for_hierarchy(
hierarchy_id,
proxy=self._... | python | {
"resource": ""
} |
q47531 | AuthorizationSession._caching_enabled | train | def _caching_enabled(self):
"""Returns True if caching is enabled per configuration, false otherwise."""
try:
config = self._runtime.get_configuration()
parameter_id = Id('parameter:useCachingForQualifierIds@json')
if config.get_value_by_parameter(parameter_id).get_bo... | python | {
"resource": ""
} |
q47532 | AuthorizationSession._get_parent_id_list | train | def _get_parent_id_list(self, qualifier_id, hierarchy_id):
"""Returns list of parent id strings for qualifier_id in hierarchy.
Uses memcache if caching is enabled.
"""
if self._caching_enabled():
key = 'parent_id_list_{0}'.format(str(qualifier_id))
# If configu... | python | {
"resource": ""
} |
q47533 | AuthorizationSession.is_authorized | train | def is_authorized(self, agent_id, function_id, qualifier_id):
"""Determines if the given agent is authorized.
An agent is authorized if an active authorization exists whose
``Agent,`` ``Function`` and ``Qualifier`` matches the supplied
parameters. Authorizations may be defined using gro... | python | {
"resource": ""
} |
q47534 | AuthorizationLookupSession.get_authorization | train | def get_authorization(self, authorization_id):
"""Gets the ``Authorization`` specified by its ``Id``.
In plenary mode, the exact ``Id`` is found or a ``NotFound``
results. Otherwise, the returned ``Authorization`` may have a
different ``Id`` than requested, such as the case where a
... | python | {
"resource": ""
} |
q47535 | AuthorizationLookupSession.get_authorizations_by_ids | train | def get_authorizations_by_ids(self, authorization_ids):
"""Gets an ``AuthorizationList`` corresponding to the given ``IdList``.
In plenary mode, the returned list contains all of the
authorizations specified in the ``Id`` list, in the order of the
list, including duplicates, or an error... | python | {
"resource": ""
} |
q47536 | AuthorizationLookupSession.get_authorizations_by_genus_type | train | def get_authorizations_by_genus_type(self, authorization_genus_type):
"""Gets an ``AuthorizationList`` corresponding to the given authorization genus ``Type`` which does not include authorizations of genus types derived from the specified ``Type``.
In plenary mode, the returned list contains all known
... | python | {
"resource": ""
} |
q47537 | AuthorizationLookupSession.get_authorizations_on_date | train | def get_authorizations_on_date(self, from_, to):
"""Gets an ``AuthorizationList`` effective during the entire given date range inclusive but not confined to the date range.
arg: from (osid.calendaring.DateTime): starting date
arg: to (osid.calendaring.DateTime): ending date
return... | python | {
"resource": ""
} |
q47538 | AuthorizationLookupSession.get_authorizations_for_function | train | def get_authorizations_for_function(self, function_id):
"""Gets a list of ``Authorizations`` associated with a given function.
In plenary mode, the returned list contains all known
authorizations or an error results. Otherwise, the returned list
may contain only those authorizations tha... | python | {
"resource": ""
} |
q47539 | AuthorizationLookupSession.get_authorizations_for_resource_and_function | train | def get_authorizations_for_resource_and_function(self, resource_id, function_id):
"""Gets a list of ``Authorizations`` associated with a given resource.
Authorizations related to the given resource, including those
related through an ``Agent,`` are returned. In plenary mode, the
returne... | python | {
"resource": ""
} |
q47540 | AuthorizationLookupSession.get_authorizations_for_agent_and_function | train | def get_authorizations_for_agent_and_function(self, agent_id, function_id):
"""Gets a list of ``Authorizations`` associated with a given agent.
Authorizations related to the given resource, including those
related through an ``Agent,`` are returned. In plenary mode, the
returned list co... | python | {
"resource": ""
} |
q47541 | AuthorizationLookupSession.get_authorizations | train | def get_authorizations(self):
"""Geta all ``Authorizations``.
In plenary mode, the returned list contains all known
authorizations or an error results. Otherwise, the returned list
may contain only those authorizations that are accessible
through this session.
return: (... | python | {
"resource": ""
} |
q47542 | AuthorizationQuerySession.get_authorizations_by_query | train | def get_authorizations_by_query(self, authorization_query):
"""Gets a list of ``Authorizations`` matching the given query.
arg: authorization_query
(osid.authorization.AuthorizationQuery): the
authorization query
return: (osid.authorization.AuthorizationList) ... | python | {
"resource": ""
} |
q47543 | AuthorizationAdminSession.get_authorization_form_for_create_for_agent | train | def get_authorization_form_for_create_for_agent(self, agent_id, function_id, qualifier_id, authorization_record_types):
"""Gets the authorization form for creating new authorizations.
A new form should be requested for each create transaction.
arg: agent_id (osid.id.Id): the agent ``Id``
... | python | {
"resource": ""
} |
q47544 | AuthorizationAdminSession.create_authorization | train | def create_authorization(self, authorization_form):
"""Creates a new explicit ``Authorization``.
arg: authorization_form
(osid.authorization.AuthorizationForm): the
authorization form
return: (osid.authorization.Authorization) - ``t`` he new
``... | python | {
"resource": ""
} |
q47545 | AuthorizationAdminSession.update_authorization | train | def update_authorization(self, authorization_form):
"""Updates an existing authorization.
arg: authorization_form
(osid.authorization.AuthorizationForm): the
authorization ``Id``
raise: IllegalState - ``authorization_form`` already used in an
... | python | {
"resource": ""
} |
q47546 | AuthorizationAdminSession.delete_authorization | train | def delete_authorization(self, authorization_id):
"""Deletes the ``Authorization`` identified by the given ``Id``.
arg: authorization_id (osid.id.Id): the ``Id`` of the
``Authorization`` to delete
raise: NotFound - an ``Authorization`` was not found identified
... | python | {
"resource": ""
} |
q47547 | AuthorizationAdminSession.alias_authorization | train | def alias_authorization(self, authorization_id, alias_id):
"""Adds an ``Id`` to an ``Authorization`` for the purpose of creating compatibility.
The primary ``Id`` of the ``Authorization`` is determined by the
provider. The new ``Id`` performs as an alias to the primary
``Id``. If the al... | python | {
"resource": ""
} |
q47548 | AuthorizationVaultSession.use_comparative_vault_view | train | def use_comparative_vault_view(self):
"""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.
*compliance: man... | python | {
"resource": ""
} |
q47549 | AuthorizationVaultSession.use_plenary_vault_view | train | def use_plenary_vault_view(self):
"""A complete view of the ``Authorization`` and ``Vault`` returns is desired.
Methods will return what is requested or result in an error.
This view is used when greater precision is desired at the
expense of interoperability.
*compliance: mand... | python | {
"resource": ""
} |
q47550 | AuthorizationVaultSession.get_authorization_ids_by_vault | train | def get_authorization_ids_by_vault(self, vault_id):
"""Gets the list of ``Authorization`` ``Ids`` associated with a ``Vault``.
arg: vault_id (osid.id.Id): ``Id`` of a ``Vault``
return: (osid.id.IdList) - list of related authorization ``Ids``
raise: NotFound - ``vault_id`` is not fo... | python | {
"resource": ""
} |
q47551 | AuthorizationVaultSession.get_authorizations_by_vault | train | def get_authorizations_by_vault(self, vault_id):
"""Gets the list of ``Authorizations`` associated with a ``Vault``.
arg: vault_id (osid.id.Id): ``Id`` of a ``Vault``
return: (osid.authorization.AuthorizationList) - list of related
authorization
raise: NotFound - ``v... | python | {
"resource": ""
} |
q47552 | AuthorizationVaultSession.get_authorizations_ids_by_vault | train | def get_authorizations_ids_by_vault(self, vault_ids):
"""Gets the list of ``Authorization Ids`` corresponding to a list of ``Vault`` objects.
arg: vault_ids (osid.id.IdList): list of vault ``Ids``
return: (osid.id.IdList) - list of authorization ``Ids``
raise: NullArgument - ``vault... | python | {
"resource": ""
} |
q47553 | AuthorizationVaultSession.get_vault_ids_by_authorization | train | def get_vault_ids_by_authorization(self, authorization_id):
"""Gets the list of ``Vault`` ``Ids`` mapped to an ``Authorization``.
arg: authorization_id (osid.id.Id): ``Id`` of an
``Authorization``
return: (osid.id.IdList) - list of vault ``Ids``
raise: NotFound - ``... | python | {
"resource": ""
} |
q47554 | AuthorizationVaultAssignmentSession.get_assignable_vault_ids | train | def get_assignable_vault_ids(self, vault_id):
"""Gets a list of vault including and under the given vault node in which any authorization can be assigned.
arg: vault_id (osid.id.Id): the ``Id`` of the ``Vault``
return: (osid.id.IdList) - list of assignable vault ``Ids``
raise: NullA... | python | {
"resource": ""
} |
q47555 | AuthorizationVaultAssignmentSession.assign_authorization_to_vault | train | def assign_authorization_to_vault(self, authorization_id, vault_id):
"""Adds an existing ``Authorization`` to a ``Vault``.
arg: authorization_id (osid.id.Id): the ``Id`` of the
``Authorization``
arg: vault_id (osid.id.Id): the ``Id`` of the ``Vault``
raise: Alread... | python | {
"resource": ""
} |
q47556 | AuthorizationVaultAssignmentSession.unassign_authorization_from_vault | train | def unassign_authorization_from_vault(self, authorization_id, vault_id):
"""Removes an ``Authorization`` from a ``Vault``.
arg: authorization_id (osid.id.Id): the ``Id`` of the
``Authorization``
arg: vault_id (osid.id.Id): the ``Id`` of the ``Vault``
raise: NotFou... | python | {
"resource": ""
} |
q47557 | AuthorizationVaultAssignmentSession.reassign_authorization_to_vault | train | def reassign_authorization_to_vault(self, authorization_id, from_vault_id, to_vault_id):
"""Moves an ``Authorization`` from one ``Vault`` to another.
Mappings to other ``Vaults`` are unaffected.
arg: authorization_id (osid.id.Id): the ``Id`` of the
``Authorization``
... | python | {
"resource": ""
} |
q47558 | VaultLookupSession.get_vaults_by_genus_type | train | def get_vaults_by_genus_type(self, vault_genus_type):
"""Gets a ``VaultList`` corresponding to the given vault genus ``Type`` which does not include vaults of types derived from the specified ``Type``.
In plenary mode, the returned list contains all known vaults or
an error results. Otherwise, ... | python | {
"resource": ""
} |
q47559 | VaultQuerySession.get_vaults_by_query | train | def get_vaults_by_query(self, vault_query):
"""Gets a list of ``Vault`` objects matching the given search.
arg: vault_query (osid.authorization.VaultQuery): the vault
query
return: (osid.authorization.VaultList) - the returned
``VaultList``
raise: Nul... | python | {
"resource": ""
} |
q47560 | VaultAdminSession.can_create_vault_with_record_types | train | def can_create_vault_with_record_types(self, vault_record_types):
"""Tests if this user can create a single ``Vault`` using the desired record types.
While ``AuthorizationManager.getVaultRecordTypes()`` can be used
to examine which records are supported, this method tests which
record(s... | python | {
"resource": ""
} |
q47561 | VaultAdminSession.get_vault_form_for_create | train | def get_vault_form_for_create(self, vault_record_types):
"""Gets the vault form for creating new vaults.
A new form should be requested for each create transaction.
arg: vault_record_types (osid.type.Type[]): array of vault
record types
return: (osid.authorization.Va... | python | {
"resource": ""
} |
q47562 | VaultAdminSession.create_vault | train | def create_vault(self, vault_form):
"""Creates a new ``Vault``.
arg: vault_form (osid.authorization.VaultForm): the form for
this ``Vault``
return: (osid.authorization.Vault) - the new ``Vault``
raise: IllegalState - ``vault_form`` already used in a create
... | python | {
"resource": ""
} |
q47563 | VaultAdminSession.get_vault_form_for_update | train | def get_vault_form_for_update(self, vault_id):
"""Gets the vault form for updating an existing vault.
A new vault form should be requested for each update
transaction.
arg: vault_id (osid.id.Id): the ``Id`` of the ``Vault``
return: (osid.authorization.VaultForm) - the vault ... | python | {
"resource": ""
} |
q47564 | VaultAdminSession.update_vault | train | def update_vault(self, vault_form):
"""Updates an existing vault.
arg: vault_form (osid.authorization.VaultForm): the form
containing the elements to be updated
raise: IllegalState - ``vault_form`` already used in an update
transaction
raise: Invalid... | python | {
"resource": ""
} |
q47565 | VaultAdminSession.delete_vault | train | def delete_vault(self, vault_id):
"""Deletes a ``Vault``.
arg: vault_id (osid.id.Id): the ``Id`` of the ``Vault`` to
remove
raise: NotFound - ``vault_id`` not found
raise: NullArgument - ``vault_id`` is ``null``
raise: OperationFailed - unable to complete r... | python | {
"resource": ""
} |
q47566 | VaultAdminSession.alias_vault | train | def alias_vault(self, vault_id, alias_id):
"""Adds an ``Id`` to a ``Vault`` for the purpose of creating compatibility.
The primary ``Id`` of the ``Vault`` is determined by the
provider. The new ``Id`` performs as an alias to the primary
``Id``. If the alias is a pointer to another vault... | python | {
"resource": ""
} |
q47567 | VaultHierarchySession.get_root_vaults | train | def get_root_vaults(self):
"""Gets the root vaults in this vault hierarchy.
return: (osid.authorization.VaultList) - the root vaults
raise: OperationFailed - unable to complete request
raise: PermissionDenied - authorization failure
*compliance: mandatory -- This method is mus... | python | {
"resource": ""
} |
q47568 | VaultHierarchySession.has_parent_vaults | train | def has_parent_vaults(self, vault_id):
"""Tests if the ``Vault`` has any parents.
arg: vault_id (osid.id.Id): a vault ``Id``
return: (boolean) - ``true`` if the vault has parents, ``false``
otherwise
raise: NotFound - ``vault_id`` is not found
raise: NullArg... | python | {
"resource": ""
} |
q47569 | VaultHierarchySession.is_parent_of_vault | train | def is_parent_of_vault(self, id_, vault_id):
"""Tests if an ``Id`` is a direct parent of a vault.
arg: id (osid.id.Id): an ``Id``
arg: vault_id (osid.id.Id): the ``Id`` of a vault
return: (boolean) - ``true`` if this ``id`` is a parent of
``vault_id,`` ``false`` o... | python | {
"resource": ""
} |
q47570 | VaultHierarchySession.get_parent_vault_ids | train | def get_parent_vault_ids(self, vault_id):
"""Gets the parent ``Ids`` of the given vault.
arg: vault_id (osid.id.Id): a vault ``Id``
return: (osid.id.IdList) - the parent ``Ids`` of the vault
raise: NotFound - ``vault_id`` is not found
raise: NullArgument - ``vault_id`` is `... | python | {
"resource": ""
} |
q47571 | VaultHierarchySession.get_parent_vaults | train | def get_parent_vaults(self, vault_id):
"""Gets the parents of the given vault.
arg: vault_id (osid.id.Id): a vault ``Id``
return: (osid.authorization.VaultList) - the parents of the
vault
raise: NotFound - ``vault_id`` is not found
raise: NullArgument - ``va... | python | {
"resource": ""
} |
q47572 | VaultHierarchySession.is_ancestor_of_vault | train | def is_ancestor_of_vault(self, id_, vault_id):
"""Tests if an ``Id`` is an ancestor of a vault.
arg: id (osid.id.Id): an ``Id``
arg: vault_id (osid.id.Id): the ``Id`` of a vault
return: (boolean) - ``true`` if this ``id`` is an ancestor of
``vault_id,`` ``false`` ... | python | {
"resource": ""
} |
q47573 | VaultHierarchySession.has_child_vaults | train | def has_child_vaults(self, vault_id):
"""Tests if a vault has any children.
arg: vault_id (osid.id.Id): a ``vault_id``
return: (boolean) - ``true`` if the ``vault_id`` has children,
``false`` otherwise
raise: NotFound - ``vault_id`` is not found
raise: NullA... | python | {
"resource": ""
} |
q47574 | VaultHierarchySession.is_child_of_vault | train | def is_child_of_vault(self, id_, vault_id):
"""Tests if a vault is a direct child of another.
arg: id (osid.id.Id): an ``Id``
arg: vault_id (osid.id.Id): the ``Id`` of a vault
return: (boolean) - ``true`` if the ``id`` is a child of
``vault_id,`` ``false`` otherwi... | python | {
"resource": ""
} |
q47575 | VaultHierarchySession.get_child_vault_ids | train | def get_child_vault_ids(self, vault_id):
"""Gets the child ``Ids`` of the given vault.
arg: vault_id (osid.id.Id): the ``Id`` to query
return: (osid.id.IdList) - the children of the vault
raise: NotFound - ``vault_id`` is not found
raise: NullArgument - ``vault_id`` is ``nu... | python | {
"resource": ""
} |
q47576 | VaultHierarchySession.get_child_vaults | train | def get_child_vaults(self, vault_id):
"""Gets the children of the given vault.
arg: vault_id (osid.id.Id): the ``Id`` to query
return: (osid.authorization.VaultList) - the children of the
vault
raise: NotFound - ``vault_id`` is not found
raise: NullArgument ... | python | {
"resource": ""
} |
q47577 | VaultHierarchySession.is_descendant_of_vault | train | def is_descendant_of_vault(self, id_, vault_id):
"""Tests if an ``Id`` is a descendant of a vault.
arg: id (osid.id.Id): an ``Id``
arg: vault_id (osid.id.Id): the ``Id`` of a vault
return: (boolean) - ``true`` if the ``id`` is a descendant of
the ``vault_id,`` ``f... | python | {
"resource": ""
} |
q47578 | VaultHierarchySession.get_vault_nodes | train | def get_vault_nodes(self, vault_id, ancestor_levels, descendant_levels, include_siblings):
"""Gets a portion of the hierarchy for the given vault.
arg: vault_id (osid.id.Id): the ``Id`` to query
arg: ancestor_levels (cardinal): the maximum number of
ancestor levels to incl... | python | {
"resource": ""
} |
q47579 | VaultHierarchyDesignSession.add_root_vault | train | def add_root_vault(self, vault_id):
"""Adds a root vault.
arg: vault_id (osid.id.Id): the ``Id`` of a vault
raise: AlreadyExists - ``vault_id`` is already in hierarchy
raise: NotFound - ``vault_id`` not found
raise: NullArgument - ``vault_id`` is ``null``
raise: O... | python | {
"resource": ""
} |
q47580 | VaultHierarchyDesignSession.remove_root_vault | train | def remove_root_vault(self, vault_id):
"""Removes a root vault from this hierarchy.
arg: vault_id (osid.id.Id): the ``Id`` of a vault
raise: NotFound - ``vault_id`` not a parent of ``child_id``
raise: NullArgument - ``vault_id`` or ``child_id`` is ``null``
raise: Operation... | python | {
"resource": ""
} |
q47581 | VaultHierarchyDesignSession.add_child_vault | train | def add_child_vault(self, vault_id, child_id):
"""Adds a child to a vault.
arg: vault_id (osid.id.Id): the ``Id`` of a vault
arg: child_id (osid.id.Id): the ``Id`` of the new child
raise: AlreadyExists - ``vault_id`` is already a parent of
``child_id``
rai... | python | {
"resource": ""
} |
q47582 | VaultHierarchyDesignSession.remove_child_vault | train | def remove_child_vault(self, vault_id, child_id):
"""Removes a child from a vault.
arg: vault_id (osid.id.Id): the ``Id`` of a vault
arg: child_id (osid.id.Id): the ``Id`` of the child
raise: NotFound - ``vault_id`` not parent of ``child_id``
raise: NullArgument - ``vaul... | python | {
"resource": ""
} |
q47583 | VaultHierarchyDesignSession.remove_child_vaults | train | def remove_child_vaults(self, vault_id):
"""Removes all children from a vault.
arg: vault_id (osid.id.Id): the ``Id`` of a vault
raise: NotFound - ``vault_id`` is not in hierarchy
raise: NullArgument - ``vault_id`` is ``null``
raise: OperationFailed - unable to complete re... | python | {
"resource": ""
} |
q47584 | GradeSystemLookupSession.get_grade_system | train | def get_grade_system(self, grade_system_id):
"""Gets the ``GradeSystem`` specified by its ``Id``.
In plenary mode, the exact ``Id`` is found or a ``NotFound``
results. Otherwise, the returned ``GradeSystem`` may have a
different ``Id`` than requested, such as the case where a
du... | python | {
"resource": ""
} |
q47585 | GradeSystemLookupSession.get_grade_systems_by_ids | train | def get_grade_systems_by_ids(self, grade_system_ids):
"""Gets a ``GradeSystemList`` corresponding to the given ``IdList``.
In plenary mode, the returned list contains all of the systems
specified in the ``Id`` list, in the order of the list,
including duplicates, or an error results if ... | python | {
"resource": ""
} |
q47586 | GradeSystemLookupSession.get_grade_systems_by_genus_type | train | def get_grade_systems_by_genus_type(self, grade_system_genus_type):
"""Gets a ``GradeSystemList`` corresponding to the given grade system genus ``Type`` which does not include systems of genus types derived from the specified ``Type``.
In plenary mode, the returned list contains all known systems or
... | python | {
"resource": ""
} |
q47587 | GradeSystemLookupSession.get_grade_systems | train | def get_grade_systems(self):
"""Gets all ``GradeSystems``.
In plenary mode, the returned list contains all known grade
systems or an error results. Otherwise, the returned list may
contain only those grade systems that are accessible through
this session.
return: (osid.... | python | {
"resource": ""
} |
q47588 | GradeSystemQuerySession.get_grade_systems_by_query | train | def get_grade_systems_by_query(self, grade_system_query):
"""Gets a list of ``GradeSystem`` objects matching the given grade system query.
arg: grade_system_query (osid.grading.GradeSystemQuery): the
grade system query
return: (osid.grading.GradeSystemList) - the returned
... | python | {
"resource": ""
} |
q47589 | GradeSystemAdminSession.get_grade_system_form_for_create | train | def get_grade_system_form_for_create(self, grade_system_record_types):
"""Gets the grade system form for creating new grade systems.
A new form should be requested for each create transaction.
arg: grade_system_record_types (osid.type.Type[]): array of
grade system types
... | python | {
"resource": ""
} |
q47590 | GradeSystemAdminSession.create_grade_system | train | def create_grade_system(self, grade_system_form):
"""Creates a new ``GradeSystem``.
arg: grade_system_form (osid.grading.GradeSystemForm): the
form for this ``GradeSystem``
return: (osid.grading.GradeSystem) - the new ``GradeSystem``
raise: IllegalState - ``grade_sys... | python | {
"resource": ""
} |
q47591 | GradeSystemAdminSession.update_grade_system | train | def update_grade_system(self, grade_system_form):
"""Updates an existing grade system.
arg: grade_system_form (osid.grading.GradeSystemForm): the
form containing the elements to be updated
raise: IllegalState - ``grade_system_form`` already used in an
update ... | python | {
"resource": ""
} |
q47592 | GradeSystemAdminSession.delete_grade_system | train | def delete_grade_system(self, grade_system_id):
"""Deletes a ``GradeSystem``.
arg: grade_system_id (osid.id.Id): the ``Id`` of the
``GradeSystem`` to remove
raise: NotFound - ``grade_system_id`` not found
raise: NullArgument - ``grade_system_id`` is ``null``
... | python | {
"resource": ""
} |
q47593 | GradeSystemAdminSession.alias_grade_system | train | def alias_grade_system(self, grade_system_id, alias_id):
"""Adds an ``Id`` to a ``GradeSystem`` for the purpose of creating compatibility.
The primary ``Id`` of the ``GradeSystem`` is determined by the
provider. The new ``Id`` performs as an alias to the primary
``Id``. If the alias is ... | python | {
"resource": ""
} |
q47594 | GradeSystemAdminSession.get_grade_form_for_create | train | def get_grade_form_for_create(self, grade_system_id, grade_record_types):
"""Gets the grade form for creating new grades.
A new form should be requested for each create transaction.
arg: grade_system_id (osid.id.Id): the ``Id`` of a
``GradeSystem``
arg: grade_reco... | python | {
"resource": ""
} |
q47595 | GradeSystemAdminSession.create_grade | train | def create_grade(self, grade_form):
"""Creates a new ``Grade``.
arg: grade_form (osid.grading.GradeForm): the form for this
``Grade``
return: (osid.grading.Grade) - the new ``Grade``
raise: IllegalState - ``grade_form`` already used in a create
transa... | python | {
"resource": ""
} |
q47596 | GradeSystemAdminSession.update_grade | train | def update_grade(self, grade_form):
"""Updates an existing grade.
arg: grade_form (osid.grading.GradeForm): the form containing
the elements to be updated
raise: IllegalState - ``grade_form`` already used in an update
transaction
raise: InvalidArgume... | python | {
"resource": ""
} |
q47597 | GradeSystemAdminSession.delete_grade | train | def delete_grade(self, grade_id):
"""Deletes a ``Grade``.
arg: grade_id (osid.id.Id): the ``Id`` of the ``Grade`` to
remove
raise: NotFound - ``grade_id`` not found
raise: NullArgument - ``grade_id`` is ``null``
raise: OperationFailed - unable to complete r... | python | {
"resource": ""
} |
q47598 | GradeSystemGradebookSession.get_grade_system_ids_by_gradebook | train | def get_grade_system_ids_by_gradebook(self, gradebook_id):
"""Gets the list of ``GradeSystem`` ``Ids`` associated with a ``Gradebook``.
arg: gradebook_id (osid.id.Id): ``Id`` of the ``Gradebook``
return: (osid.id.IdList) - list of related grade system ``Ids``
raise: NotFound - ``gr... | python | {
"resource": ""
} |
q47599 | GradeSystemGradebookSession.get_grade_systems_by_gradebook | train | def get_grade_systems_by_gradebook(self, gradebook_id):
"""Gets the list of grade systems associated with a ``Gradebook``.
arg: gradebook_id (osid.id.Id): ``Id`` of the ``Gradebook``
return: (osid.grading.GradeSystemList) - list of related grade
systems
raise: NotFou... | python | {
"resource": ""
} |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.