code stringlengths 1 18.2k |
|---|
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 ``null`` raise: OperationFailed - unable to com... |
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 - ``vault_id`` is ``null`` raise: OperationFailed - unable to comple... |
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`` otherwise raise: NotFound - ``vault_id`` is not found ra... |
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: NullArgument - ``vault_id`` is ``null`` raise: OperationFailed - un... |
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`` otherwise raise: NotFound - ``vault_id`` not found raise: NullA... |
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 ``null`` raise: OperationFailed - unable to comple... |
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 - ``vault_id`` is ``null`` raise: OperationFailed - unable to ... |
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,`` ``false`` otherwise raise: NotFound - ``vault_id`` not foun... |
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 include. A value of 0 returns no parents in the nod... |
osid.resource.BinHierarchySession.get_bin_nodes return objects.VaultNode(self.get_vault_node_ids( vault_id=vault_id, ancestor_levels=ancestor_levels, descendant_levels=descendant_levels, include_siblings=include_siblings)._my_map, runtime=self._runtime, proxy=self._proxy) |
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: OperationFailed - unable to complete request raise: Permi... |
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: OperationFailed - unable to complete request raise: Perm... |
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`` raise: NotFound - ``vault_id`` or ``child_id`` not found raise: Nul... |
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 - ``vault_id`` or ``child_id`` is ``null`` raise: Operati... |
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 request raise: PermissionDenied - authorization f... |
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 duplicate ``Id`` was assigned to a ``GradeS... |
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 an ``Id`` in the supplied list is... |
for # osid.resource.ResourceLookupSession.get_resources_by_ids # NOTE: This implementation currently ignores plenary view collection = JSONClientValidated('grading', collection='GradeSystem', runtime=self._runtime) object_id_list = [] for i in grade_system_ids: object_id_list.append(ObjectId(self._get_id(i, 'grading').... |
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 an error results. O... |
proxy=self._proxy) |
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.grading.GradeSystemList) - a ``GradeSystemList`` r... |
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 ``GradeSystemList`` raise: NullArgument - ``gra... |
= collection.find(query_terms).sort('_id', DESCENDING) else: result = [] return objects.GradeSystemList(result, runtime=self._runtime, proxy=self._proxy) |
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 return: (osid.grading.GradeSystemForm) - the gra... |
return obj_form |
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_system_form`` already used in a create transaction raise... |
raise errors.Unsupported('grade_system_form did not originate from this session') if not grade_system_form.is_valid(): raise errors.InvalidArgument('one or more of the form elements is invalid') insert_result = collection.insert_one(grade_system_form._my_map) self._forms[grade_system_form.get_id().get_identifier()] = C... |
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 transaction raise: InvalidArgument - the form contains an inv... |
originate from this session') if not grade_system_form.is_valid(): raise errors.InvalidArgument('one or more of the form elements is invalid') collection.save(grade_system_form._my_map) self._forms[grade_system_form.get_id().get_identifier()] = UPDATED # Note: this is out of spec. The OSIDs don't require an object to b... |
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`` raise: OperationFailed - unable to complete request raise: Pe... |
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 a pointer to another grade system... |
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_record_types (osid.type.Type[]): array of grade recod types ... |
valid OSID Type') if grade_record_types == []: # WHY are we passing gradebook_id = self._catalog_id below, seems redundant: obj_form = objects.GradeForm( gradebook_id=self._catalog_id, grade_system_id=grade_system_id, catalog_id=self._catalog_id, runtime=self._runtime, proxy=self._proxy) else: obj_form = objects.GradeF... |
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 transaction raise: InvalidArgument - one or more of the form elements is in... |
in a create transaction') except KeyError: raise errors.Unsupported('grade_form did not originate from this session') if not grade_form.is_valid(): raise errors.InvalidArgument('one or more of the form elements is invalid') grade_form._my_map['_id'] = ObjectId() grade_system_id = Id(grade_form._my_map['gradeSystemId'])... |
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: InvalidArgument - the form contains an invalid value raise: NullArgument - ``grade_... |
transaction') except KeyError: raise errors.Unsupported('grade_form did not originate from this session') if not grade_form.is_valid(): raise errors.InvalidArgument('one or more of the form elements is invalid') grade_system_id = Id(grade_form._my_map['gradeSystemId']).get_identifier() grade_system = collection.find_on... |
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 request raise: PermissionDenied - authorization failure *complia... |
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 - ``gradebook_id`` is not found raise: NullA... |
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: NotFound - ``gradebook_id`` is not found raise: NullArgumen... |
def get_grade_system_ids_by_gradebooks(self, gradebook_ids): """Gets the list of ``GradeSystem Ids`` corresponding to a list of ``Gradebooks``. arg: gradebook_ids (osid.id.IdList): list of gradebook ``Ids`` return: (osid.id.IdList) - list of grade systems ``Ids`` raise: NullArgument - ``gradebook_ids`` is ``null`` rais... |
def get_grade_systems_by_gradebooks(self, gradebook_ids): """Gets the list of grade systems corresponding to a list of ``Gradebooks``. arg: gradebook_ids (osid.id.IdList): list of gradebook ``Ids`` return: (osid.grading.GradeSystemList) - list of grade systems raise: NullArgument - ``gradebook_ids`` is ``null`` raise: ... |
def get_gradebook_ids_by_grade_system(self, grade_system_id): """Gets the list of ``Gradebook`` ``Ids`` mapped to a ``GradeSystem``. arg: grade_system_id (osid.id.Id): ``Id`` of a ``GradeSystem`` return: (osid.id.IdList) - list of gradebook ``Ids`` raise: NotFound - ``grade_system_id`` is not found raise: NullArgument ... |
def get_gradebooks_by_grade_system(self, grade_system_id): """Gets the list of ``Gradebooks`` mapped to a ``GradeSystem``. arg: grade_system_id (osid.id.Id): ``Id`` of a ``GradeSystem`` return: (osid.grading.GradebookList) - list of gradebooks raise: NotFound - ``grade_system_id`` is not found raise: NullArgument - ``g... |
def get_assignable_gradebook_ids(self, gradebook_id): """Gets a list of gradebooks including and under the given gradebook node in which any grade system can be assigned. arg: gradebook_id (osid.id.Id): the ``Id`` of the ``Gradebook`` return: (osid.id.IdList) - list of assignable gradebook ``Ids`` raise: NullArgument -... |
def assign_grade_system_to_gradebook(self, grade_system_id, gradebook_id): """Adds an existing ``GradeSystem`` to a ``Gradebook``. arg: grade_system_id (osid.id.Id): the ``Id`` of the ``GradeSystem`` arg: gradebook_id (osid.id.Id): the ``Id`` of the ``Gradebook`` raise: AlreadyExists - ``grade_system_id`` is already as... |
def unassign_grade_system_from_gradebook(self, grade_system_id, gradebook_id): """Removes a ``GradeSystem`` from a ``Gradebook``. arg: grade_system_id (osid.id.Id): the ``Id`` of the ``GradeSystem`` arg: gradebook_id (osid.id.Id): the ``Id`` of the ``Gradebook`` raise: NotFound - ``grade_system_id`` or ``gradebook_id``... |
def get_grade_entry(self, grade_entry_id): """Gets the ``GradeEntry`` specified by its ``Id``. arg: grade_entry_id (osid.id.Id): ``Id`` of the ``GradeEntry`` return: (osid.grading.GradeEntry) - the grade entry raise: NotFound - ``grade_entry_id`` not found raise: NullArgument - ``grade_entry_id`` is ``null`` raise: Ope... |
def get_grade_entries_by_ids(self, grade_entry_ids): """Gets a ``GradeEntryList`` corresponding to the given ``IdList``. arg: grade_entry_ids (osid.id.IdList): the list of ``Ids`` to retrieve return: (osid.grading.GradeEntryList) - the returned ``GradeEntry`` list raise: NotFound - an ``Id was`` not found raise: NullAr... |
def get_grade_entries_by_genus_type(self, grade_entry_genus_type): """Gets a ``GradeEntryList`` corresponding to the given grade entry genus ``Type`` which does not include grade entries of genus types derived from the specified ``Type``. arg: grade_entry_genus_type (osid.type.Type): a grade entry genus type return: (o... |
def get_grade_entries_on_date(self, from_, to): """Gets a ``GradeEntryList`` effective during the entire given date range inclusive but not confined to the date range. arg: from (osid.calendaring.DateTime): start of date range arg: to (osid.calendaring.DateTime): end of date range return: (osid.grading.GradeEntryList) ... |
def get_grade_entries_for_gradebook_column_on_date(self, gradebook_column_id, from_, to): """Gets a ``GradeEntryList`` for the given gradebook column and effective during the entire given date range inclusive but not confined to the date range. arg: gradebook_column_id (osid.id.Id): a gradebook column ``Id`` arg: from ... |
def get_grade_entries_for_gradebook_column_and_resource(self, gradebook_column_id, resource_id): """Gets a ``GradeEntryList`` for the gradebook column and key resource. arg: gradebook_column_id (osid.id.Id): a gradebook column ``Id`` arg: resource_id (osid.id.Id): a key resource ``Id`` return: (osid.grading.GradeEntryL... |
def get_grade_entries(self): """Gets all grade entries. return: (osid.grading.GradeEntryList) - a ``GradeEntryList`` raise: OperationFailed - unable to complete request raise: PermissionDenied - authorization failure *compliance: mandatory -- This method must be implemented.* """ # Implemented from template for # osid.... |
def get_grade_entries_by_query(self, grade_entry_query): """Gets a list of entries matching the given grade entry query. arg: grade_entry_query (osid.grading.GradeEntryQuery): the grade entry query return: (osid.grading.GradeEntryList) - the returned ``GradeEntryList`` raise: NullArgument - ``grade_entry_query`` is ``n... |
collection.find(query_terms).sort('_id', DESCENDING) else: result = [] return objects.GradeEntryList(result, runtime=self._runtime, proxy=self._proxy) |
def get_grade_entry_form_for_create(self, gradebook_column_id, resource_id, grade_entry_record_types): """Gets the grade entry form for creating new grade entries. A new form should be requested for each create transaction. arg: gradebook_column_id (osid.id.Id): the gradebook column arg: resource_id (osid.id.Id): the k... |
code for checking Id and getting gradebook_column enclosure for arg in grade_entry_record_types: if not isinstance(arg, ABCType): raise errors.InvalidArgument('one or more argument array elements is not a valid OSID Type') if grade_entry_record_types == []: # WHY are we passing gradebook_id = self._catalog_id below, se... |
def create_grade_entry(self, grade_entry_form): """Creates a new ``GradeEntry``. arg: grade_entry_form (osid.grading.GradeEntryForm): the form for this ``GradeEntry`` return: (osid.grading.GradeEntry) - the new ``GradeEntry`` raise: IllegalState - ``grade_entry_form`` already used in a create transaction raise: Invalid... |
raise errors.Unsupported('grade_entry_form did not originate from this session') if not grade_entry_form.is_valid(): raise errors.InvalidArgument('one or more of the form elements is invalid') insert_result = collection.insert_one(grade_entry_form._my_map) self._forms[grade_entry_form.get_id().get_identifier()] = CREAT... |
def get_grade_entry_form_for_update(self, grade_entry_id): """Gets the grade entry form for updating an existing entry. A new grade entry form should be requested for each update transaction. arg: grade_entry_id (osid.id.Id): the ``Id`` of the ``GradeEntry`` return: (osid.grading.GradeEntryForm) - the grade entry form ... |
def update_grade_entry(self, grade_entry_form): """Updates an existing grade entry. arg: grade_entry_form (osid.grading.GradeEntryForm): the form containing the elements to be updated raise: IllegalState - ``grade_entry_form`` already used in an update transaction raise: InvalidArgument - the form contains an invalid v... |
originate from this session') if not grade_entry_form.is_valid(): raise errors.InvalidArgument('one or more of the form elements is invalid') collection.save(grade_entry_form._my_map) self._forms[grade_entry_form.get_id().get_identifier()] = UPDATED # Note: this is out of spec. The OSIDs don't require an object to be r... |
def delete_grade_entry(self, grade_entry_id): """Deletes the ``GradeEntry`` identified by the given ``Id``. arg: grade_entry_id (osid.id.Id): the ``Id`` of the ``GradeEntry`` to delete raise: NotFound - a ``GradeEntry`` was not found identified by the given ``Id`` raise: NullArgument - ``grade_entry_id`` is ``null`` ra... |
def alias_grade_entry(self, grade_entry_id, alias_id): """Adds an ``Id`` to a ``GradeEntry`` for the purpose of creating compatibility. The primary ``Id`` of the ``GradeEntry`` is determined by the provider. The new ``Id`` performs as an alias to the primary ``Id``. If the alias is a pointer to another grade entry, it ... |
def get_gradebook_column(self, gradebook_column_id): """Gets the ``GradebookColumn`` specified by its ``Id``. In plenary mode, the exact ``Id`` is found or a ``NotFound`` results. Otherwise, the returned ``GradebookColumn`` may have a different ``Id`` than requested, such as the case where a duplicate ``Id`` was assign... |
def get_gradebook_columns_by_ids(self, gradebook_column_ids): """Gets a ``GradebookColumnList`` corresponding to the given ``IdList``. In plenary mode, the returned list contains all of the gradebook columns specified in the ``Id`` list, in the order of the list, including duplicates, or an error results if a ``Id`` in... |
collection = JSONClientValidated('grading', collection='GradebookColumn', runtime=self._runtime) object_id_list = [] for i in gradebook_column_ids: object_id_list.append(ObjectId(self._get_id(i, 'grading').get_identifier())) result = collection.find( dict({'_id': {'$in': object_id_list}}, **self._view_filter())) result... |
def get_gradebook_columns_by_genus_type(self, gradebook_column_genus_type): """Gets a ``GradebookColumnList`` corresponding to the given gradebook column genus ``Type`` which does not include gradebook columns of genus types derived from the specified ``Type``. In plenary mode, the returned list contains all known grad... |
return objects.GradebookColumnList(result, runtime=self._runtime, proxy=self._proxy) |
def get_gradebook_columns(self): """Gets all gradebook columns. In plenary mode, the returned list contains all known gradebook columns or an error results. Otherwise, the returned list may contain only those gradebook columns that are accessible through this session. return: (osid.grading.GradebookColumnList) - a ``Gr... |
def get_gradebook_column_summary(self, gradebook_column_id): """Gets the ``GradebookColumnSummary`` for summary results. arg: gradebook_column_id (osid.id.Id): ``Id`` of the ``GradebookColumn`` return: (osid.grading.GradebookColumnSummary) - the gradebook column summary raise: NotFound - ``gradebook_column_id`` is not ... |
def get_gradebook_columns_by_query(self, gradebook_column_query): """Gets a list of gradebook columns matching the given query. arg: gradebook_column_query (osid.grading.GradebookColumnQuery): the gradebook column query return: (osid.grading.GradebookColumnList) - the returned ``GradebookColumnList`` raise: NullArgumen... |
DESCENDING) else: result = [] return objects.GradebookColumnList(result, runtime=self._runtime, proxy=self._proxy) |
def can_create_gradebook_column_with_record_types(self, gradebook_column_record_types): """Tests if this user can create a single ``GradebookColumn`` using the desired record types. While ``GradingManager.getGradebookColumnRecordTypes()`` can be used to examine which records are supported, this method tests which recor... |
not None: return self._catalog_session.can_create_catalog_with_record_types(catalog_record_types=gradebook_column_record_types) return True |
def get_gradebook_column_form_for_create(self, gradebook_column_record_types): """Gets the gradebook column form for creating new gradebook columns. A new form should be requested for each create transaction. arg: gradebook_column_record_types (osid.type.Type[]): array of gradebook column record types return: (osid.gra... |
CREATED return obj_form |
def create_gradebook_column(self, gradebook_column_form): """Creates a new ``GradebookColumn``. arg: gradebook_column_form (osid.grading.GradebookColumnForm): the form for this ``GradebookColumn`` return: (osid.grading.GradebookColumn) - the new ``GradebookColumn`` raise: IllegalState - ``gradebook_column_form`` alread... |
raise errors.Unsupported('gradebook_column_form did not originate from this session') if not gradebook_column_form.is_valid(): raise errors.InvalidArgument('one or more of the form elements is invalid') insert_result = collection.insert_one(gradebook_column_form._my_map) self._forms[gradebook_column_form.get_id().get_i... |
def update_gradebook_column(self, gradebook_column_form): """Updates an existing gradebook column. arg: gradebook_column_form (osid.grading.GradebookColumnForm): the form containing the elements to be updated raise: IllegalState - ``gradebook_column_form`` already used in an update transaction raise: InvalidArgument - ... |
raise errors.InvalidArgument('one or more of the form elements is invalid') # check that there are no entries, if updating the gradeSystemId old_column = collection.find_one({"_id": gradebook_column_form._my_map['_id']}) if old_column['gradeSystemId'] != gradebook_column_form._my_map['gradeSystemId']: if self._has_entr... |
def delete_gradebook_column(self, gradebook_column_id): """Deletes the ``GradebookColumn`` identified by the given ``Id``. arg: gradebook_column_id (osid.id.Id): the ``Id`` of the ``GradebookColumn`` to delete raise: NotFound - a ``GradebookColumn`` was not found identified by the given ``Id`` raise: NullArgument - ``g... |
def alias_gradebook_column(self, gradebook_column_id, alias_id): """Adds an ``Id`` to a ``GradebookColumn`` for the purpose of creating compatibility. The primary ``Id`` of the ``GradebookColumn`` is determined by the provider. The new ``Id`` performs as an alias to the primary ``Id``. If the alias is a pointer to anot... |
def get_gradebook_column_ids_by_gradebook(self, gradebook_id): """Gets the list of ``GradebookColumn`` ``Ids`` associated with a ``Gradebook``. arg: gradebook_id (osid.id.Id): ``Id`` of the ``Gradebook`` return: (osid.id.IdList) - list of related gradebook column ``Ids`` raise: NotFound - ``gradebook_id`` is not found ... |
def get_gradebook_columns_by_gradebook(self, gradebook_id): """Gets the list of gradebook columns associated with a ``Gradebook``. arg: gradebook_id (osid.id.Id): ``Id`` of the ``Gradebook`` return: (osid.grading.GradebookColumnList) - list of related gradebook columns raise: NotFound - ``gradebook_id`` is not found ra... |
def get_gradebook_column_ids_by_gradebooks(self, gradebook_ids): """Gets the list of ``GradebookColumn Ids`` corresponding to a list of ``Gradebooks``. arg: gradebook_ids (osid.id.IdList): list of gradebook ``Ids`` return: (osid.id.IdList) - list of gradebook column ``Ids`` raise: NullArgument - ``gradebook_ids`` is ``... |
def get_gradebook_columns_by_gradebooks(self, gradebook_ids): """Gets the list of gradebook columns corresponding to a list of ``Gradebooks``. arg: gradebook_ids (osid.id.IdList): list of gradebook ``Ids`` return: (osid.grading.GradebookColumnList) - list of gradebook columns raise: NullArgument - ``gradebook_ids`` is ... |
def get_gradebook_ids_by_gradebook_column(self, gradebook_column_id): """Gets the list of ``Gradebook`` ``Ids`` mapped to a ``GradebookColumn``. arg: gradebook_column_id (osid.id.Id): ``Id`` of a ``GradebookColumn`` return: (osid.id.IdList) - list of gradebook ``Ids`` raise: NotFound - ``gradebook_column_id`` is not fo... |
def get_gradebooks_by_gradebook_column(self, gradebook_column_id): """Gets the list of ``Gradebooks`` mapped to a ``GradebookColumn``. arg: gradebook_column_id (osid.id.Id): ``Id`` of a ``GradebookColumn`` return: (osid.grading.GradebookList) - list of gradebooks raise: NotFound - ``gradebook_column_id`` is not found r... |
def assign_gradebook_column_to_gradebook(self, gradebook_column_id, gradebook_id): """Adds an existing ``GradebookColumn`` to a ``Gradebook``. arg: gradebook_column_id (osid.id.Id): the ``Id`` of the ``GradebookColumn`` arg: gradebook_id (osid.id.Id): the ``Id`` of the ``Gradebook`` raise: AlreadyExists - ``gradebook_c... |
def unassign_gradebook_column_from_gradebook(self, gradebook_column_id, gradebook_id): """Removes a ``GradebookColumn`` from a ``Gradebook``. arg: gradebook_column_id (osid.id.Id): the ``Id`` of the ``GradebookColumn`` arg: gradebook_id (osid.id.Id): the ``Id`` of the ``Gradebook`` raise: NotFound - ``gradebook_column_... |
def can_create_gradebook_with_record_types(self, gradebook_record_types): """Tests if this user can create a single ``Gradebook`` using the desired record types. While ``GradingManager.getGradebookRecordTypes()`` can be used to examine which records are supported, this method tests which record(s) are required for crea... |
return self._catalog_session.can_create_catalog_with_record_types(catalog_record_types=gradebook_record_types) return True |
def update_gradebook(self, gradebook_form): """Updates an existing gradebook. arg: gradebook_form (osid.grading.GradebookForm): the form containing the elements to be updated raise: IllegalState - ``gradebook_form`` already used in an update transaction raise: InvalidArgument - the form contains an invalid value raise:... |
except KeyError: raise errors.Unsupported('gradebook_form did not originate from this session') if not gradebook_form.is_valid(): raise errors.InvalidArgument('one or more of the form elements is invalid') collection.save(gradebook_form._my_map) # save is deprecated - change to replace_one self._forms[gradebook_form.ge... |
def alias_gradebook(self, gradebook_id, alias_id): """Adds an ``Id`` to a ``Gradebook`` for the purpose of creating compatibility. The primary ``Id`` of the ``Gradebook`` is determined by the provider. The new ``Id`` performs as an alias to the primary ``Id`` . If the alias is a pointer to another gradebook, it is reas... |
equivalent_id=alias_id) |
def get_root_gradebook_ids(self): """Gets the root gradebook ``Ids`` in this hierarchy. return: (osid.id.IdList) - the root gradebook ``Ids`` raise: OperationFailed - unable to complete request raise: PermissionDenied - authorization failure *compliance: mandatory -- This method must be implemented.* """ # Implemented ... |
def get_root_gradebooks(self): """Gets the root gradebooks in this gradebook hierarchy. return: (osid.grading.GradebookList) - the root gradebooks raise: OperationFailed - unable to complete request raise: PermissionDenied - authorization failure *compliance: mandatory -- This method is must be implemented.* """ # Impl... |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.