repository_name
stringlengths
5
67
func_path_in_repository
stringlengths
4
234
func_name
stringlengths
0
314
whole_func_string
stringlengths
52
3.87M
language
stringclasses
6 values
func_code_string
stringlengths
52
3.87M
func_code_tokens
listlengths
15
672k
func_documentation_string
stringlengths
1
47.2k
func_documentation_tokens
listlengths
1
3.92k
split_name
stringclasses
1 value
func_code_url
stringlengths
85
339
mitsei/dlkit
dlkit/records/adaptive/magic_parts/assessment_part_records.py
ScaffoldDownAssessmentPartRecord.get_assessment_part
def get_assessment_part(self): """If there's an AssessmentSection ask it first for the part. This will take advantage of the fact that the AssessmentSection may have already cached the Part in question. """ if self._magic_parent_id is None: assessment_part_id = Id(s...
python
def get_assessment_part(self): """If there's an AssessmentSection ask it first for the part. This will take advantage of the fact that the AssessmentSection may have already cached the Part in question. """ if self._magic_parent_id is None: assessment_part_id = Id(s...
[ "def", "get_assessment_part", "(", "self", ")", ":", "if", "self", ".", "_magic_parent_id", "is", "None", ":", "assessment_part_id", "=", "Id", "(", "self", ".", "my_osid_object", ".", "_my_map", "[", "'assessmentPartId'", "]", ")", "else", ":", "assessment_pa...
If there's an AssessmentSection ask it first for the part. This will take advantage of the fact that the AssessmentSection may have already cached the Part in question.
[ "If", "there", "s", "an", "AssessmentSection", "ask", "it", "first", "for", "the", "part", "." ]
train
https://github.com/mitsei/dlkit/blob/445f968a175d61c8d92c0f617a3c17dc1dc7c584/dlkit/records/adaptive/magic_parts/assessment_part_records.py#L426-L445
mitsei/dlkit
dlkit/records/adaptive/magic_parts/assessment_part_records.py
ScaffoldDownAssessmentPartFormRecord._init_map
def _init_map(self): """stub""" # super(ScaffoldDownAssessmentPartFormRecord, self)._init_map() self.my_osid_object_form._my_map['itemIds'] = \ [str(self._item_ids_metadata['default_id_values'][0])] self.my_osid_object_form._my_map['learningObjectiveIds'] = \ [str...
python
def _init_map(self): """stub""" # super(ScaffoldDownAssessmentPartFormRecord, self)._init_map() self.my_osid_object_form._my_map['itemIds'] = \ [str(self._item_ids_metadata['default_id_values'][0])] self.my_osid_object_form._my_map['learningObjectiveIds'] = \ [str...
[ "def", "_init_map", "(", "self", ")", ":", "# super(ScaffoldDownAssessmentPartFormRecord, self)._init_map()", "self", ".", "my_osid_object_form", ".", "_my_map", "[", "'itemIds'", "]", "=", "[", "str", "(", "self", ".", "_item_ids_metadata", "[", "'default_id_values'", ...
stub
[ "stub" ]
train
https://github.com/mitsei/dlkit/blob/445f968a175d61c8d92c0f617a3c17dc1dc7c584/dlkit/records/adaptive/magic_parts/assessment_part_records.py#L569-L585
mitsei/dlkit
dlkit/records/adaptive/magic_parts/assessment_part_records.py
ScaffoldDownAssessmentPartFormRecord.get_item_ids_metadata
def get_item_ids_metadata(self): """get the metadata for item""" metadata = dict(self._item_ids_metadata) metadata.update({'existing_id_values': self.my_osid_object_form._my_map['itemIds']}) return Metadata(**metadata)
python
def get_item_ids_metadata(self): """get the metadata for item""" metadata = dict(self._item_ids_metadata) metadata.update({'existing_id_values': self.my_osid_object_form._my_map['itemIds']}) return Metadata(**metadata)
[ "def", "get_item_ids_metadata", "(", "self", ")", ":", "metadata", "=", "dict", "(", "self", ".", "_item_ids_metadata", ")", "metadata", ".", "update", "(", "{", "'existing_id_values'", ":", "self", ".", "my_osid_object_form", ".", "_my_map", "[", "'itemIds'", ...
get the metadata for item
[ "get", "the", "metadata", "for", "item" ]
train
https://github.com/mitsei/dlkit/blob/445f968a175d61c8d92c0f617a3c17dc1dc7c584/dlkit/records/adaptive/magic_parts/assessment_part_records.py#L587-L591
mitsei/dlkit
dlkit/records/adaptive/magic_parts/assessment_part_records.py
ScaffoldDownAssessmentPartFormRecord.set_item_ids
def set_item_ids(self, item_ids): '''the target Item This can only be set if there is no learning objective set ''' if self.get_item_ids_metadata().is_read_only(): raise NoAccess() for item_id in item_ids: if not self.my_osid_object_form._is_valid_id(ite...
python
def set_item_ids(self, item_ids): '''the target Item This can only be set if there is no learning objective set ''' if self.get_item_ids_metadata().is_read_only(): raise NoAccess() for item_id in item_ids: if not self.my_osid_object_form._is_valid_id(ite...
[ "def", "set_item_ids", "(", "self", ",", "item_ids", ")", ":", "if", "self", ".", "get_item_ids_metadata", "(", ")", ".", "is_read_only", "(", ")", ":", "raise", "NoAccess", "(", ")", "for", "item_id", "in", "item_ids", ":", "if", "not", "self", ".", "...
the target Item This can only be set if there is no learning objective set
[ "the", "target", "Item" ]
train
https://github.com/mitsei/dlkit/blob/445f968a175d61c8d92c0f617a3c17dc1dc7c584/dlkit/records/adaptive/magic_parts/assessment_part_records.py#L593-L606
mitsei/dlkit
dlkit/records/adaptive/magic_parts/assessment_part_records.py
ScaffoldDownAssessmentPartFormRecord.get_learning_objective_ids_metadata
def get_learning_objective_ids_metadata(self): """get the metadata for learning objective""" metadata = dict(self._learning_objective_ids_metadata) metadata.update({'existing_id_values': self.my_osid_object_form._my_map['learningObjectiveIds'][0]}) return Metadata(**metadata)
python
def get_learning_objective_ids_metadata(self): """get the metadata for learning objective""" metadata = dict(self._learning_objective_ids_metadata) metadata.update({'existing_id_values': self.my_osid_object_form._my_map['learningObjectiveIds'][0]}) return Metadata(**metadata)
[ "def", "get_learning_objective_ids_metadata", "(", "self", ")", ":", "metadata", "=", "dict", "(", "self", ".", "_learning_objective_ids_metadata", ")", "metadata", ".", "update", "(", "{", "'existing_id_values'", ":", "self", ".", "my_osid_object_form", ".", "_my_m...
get the metadata for learning objective
[ "get", "the", "metadata", "for", "learning", "objective" ]
train
https://github.com/mitsei/dlkit/blob/445f968a175d61c8d92c0f617a3c17dc1dc7c584/dlkit/records/adaptive/magic_parts/assessment_part_records.py#L615-L619
mitsei/dlkit
dlkit/records/adaptive/magic_parts/assessment_part_records.py
ScaffoldDownAssessmentPartFormRecord.set_learning_objective_ids
def set_learning_objective_ids(self, learning_objective_ids): """the learning objective to find related items for This can only be set if there are no items specifically set """ if self.get_learning_objective_ids_metadata().is_read_only(): raise NoAccess() for learn...
python
def set_learning_objective_ids(self, learning_objective_ids): """the learning objective to find related items for This can only be set if there are no items specifically set """ if self.get_learning_objective_ids_metadata().is_read_only(): raise NoAccess() for learn...
[ "def", "set_learning_objective_ids", "(", "self", ",", "learning_objective_ids", ")", ":", "if", "self", ".", "get_learning_objective_ids_metadata", "(", ")", ".", "is_read_only", "(", ")", ":", "raise", "NoAccess", "(", ")", "for", "learning_objective_id", "in", ...
the learning objective to find related items for This can only be set if there are no items specifically set
[ "the", "learning", "objective", "to", "find", "related", "items", "for" ]
train
https://github.com/mitsei/dlkit/blob/445f968a175d61c8d92c0f617a3c17dc1dc7c584/dlkit/records/adaptive/magic_parts/assessment_part_records.py#L621-L634
mitsei/dlkit
dlkit/records/adaptive/magic_parts/assessment_part_records.py
ScaffoldDownAssessmentPartFormRecord.get_max_levels_metadata
def get_max_levels_metadata(self): """get the metadata for max levels""" metadata = dict(self._max_levels_metadata) metadata.update({'existing_cardinal_values': self.my_osid_object_form._my_map['maxLevels']}) return Metadata(**metadata)
python
def get_max_levels_metadata(self): """get the metadata for max levels""" metadata = dict(self._max_levels_metadata) metadata.update({'existing_cardinal_values': self.my_osid_object_form._my_map['maxLevels']}) return Metadata(**metadata)
[ "def", "get_max_levels_metadata", "(", "self", ")", ":", "metadata", "=", "dict", "(", "self", ".", "_max_levels_metadata", ")", "metadata", ".", "update", "(", "{", "'existing_cardinal_values'", ":", "self", ".", "my_osid_object_form", ".", "_my_map", "[", "'ma...
get the metadata for max levels
[ "get", "the", "metadata", "for", "max", "levels" ]
train
https://github.com/mitsei/dlkit/blob/445f968a175d61c8d92c0f617a3c17dc1dc7c584/dlkit/records/adaptive/magic_parts/assessment_part_records.py#L643-L647
mitsei/dlkit
dlkit/records/adaptive/magic_parts/assessment_part_records.py
ScaffoldDownAssessmentPartFormRecord.get_max_waypoint_items_metadata
def get_max_waypoint_items_metadata(self): """get the metadata for max waypoint items""" metadata = dict(self._max_waypoint_items_metadata) metadata.update({'existing_cardinal_values': self.my_osid_object_form._my_map['maxWaypointItems']}) return Metadata(**metadata)
python
def get_max_waypoint_items_metadata(self): """get the metadata for max waypoint items""" metadata = dict(self._max_waypoint_items_metadata) metadata.update({'existing_cardinal_values': self.my_osid_object_form._my_map['maxWaypointItems']}) return Metadata(**metadata)
[ "def", "get_max_waypoint_items_metadata", "(", "self", ")", ":", "metadata", "=", "dict", "(", "self", ".", "_max_waypoint_items_metadata", ")", "metadata", ".", "update", "(", "{", "'existing_cardinal_values'", ":", "self", ".", "my_osid_object_form", ".", "_my_map...
get the metadata for max waypoint items
[ "get", "the", "metadata", "for", "max", "waypoint", "items" ]
train
https://github.com/mitsei/dlkit/blob/445f968a175d61c8d92c0f617a3c17dc1dc7c584/dlkit/records/adaptive/magic_parts/assessment_part_records.py#L663-L667
mitsei/dlkit
dlkit/records/adaptive/magic_parts/assessment_part_records.py
ScaffoldDownAssessmentPartFormRecord.set_max_waypoint_items
def set_max_waypoint_items(self, max_waypoint_items): """This determines how many waypoint items will be seen for a scaffolded wrong answer""" if self.get_max_waypoint_items_metadata().is_read_only(): raise NoAccess() if not self.my_osid_object_form._is_valid_cardinal(max_waypoint_it...
python
def set_max_waypoint_items(self, max_waypoint_items): """This determines how many waypoint items will be seen for a scaffolded wrong answer""" if self.get_max_waypoint_items_metadata().is_read_only(): raise NoAccess() if not self.my_osid_object_form._is_valid_cardinal(max_waypoint_it...
[ "def", "set_max_waypoint_items", "(", "self", ",", "max_waypoint_items", ")", ":", "if", "self", ".", "get_max_waypoint_items_metadata", "(", ")", ".", "is_read_only", "(", ")", ":", "raise", "NoAccess", "(", ")", "if", "not", "self", ".", "my_osid_object_form",...
This determines how many waypoint items will be seen for a scaffolded wrong answer
[ "This", "determines", "how", "many", "waypoint", "items", "will", "be", "seen", "for", "a", "scaffolded", "wrong", "answer" ]
train
https://github.com/mitsei/dlkit/blob/445f968a175d61c8d92c0f617a3c17dc1dc7c584/dlkit/records/adaptive/magic_parts/assessment_part_records.py#L669-L676
mitsei/dlkit
dlkit/records/adaptive/magic_parts/assessment_part_records.py
ScaffoldDownAssessmentPartFormRecord.get_waypoint_quota_metadata
def get_waypoint_quota_metadata(self): """get the metadata for waypoint quota""" metadata = dict(self._waypoint_quota_metadata) metadata.update({'existing_cardinal_values': self.my_osid_object_form._my_map['waypointQuota']}) return Metadata(**metadata)
python
def get_waypoint_quota_metadata(self): """get the metadata for waypoint quota""" metadata = dict(self._waypoint_quota_metadata) metadata.update({'existing_cardinal_values': self.my_osid_object_form._my_map['waypointQuota']}) return Metadata(**metadata)
[ "def", "get_waypoint_quota_metadata", "(", "self", ")", ":", "metadata", "=", "dict", "(", "self", ".", "_waypoint_quota_metadata", ")", "metadata", ".", "update", "(", "{", "'existing_cardinal_values'", ":", "self", ".", "my_osid_object_form", ".", "_my_map", "["...
get the metadata for waypoint quota
[ "get", "the", "metadata", "for", "waypoint", "quota" ]
train
https://github.com/mitsei/dlkit/blob/445f968a175d61c8d92c0f617a3c17dc1dc7c584/dlkit/records/adaptive/magic_parts/assessment_part_records.py#L685-L689
mitsei/dlkit
dlkit/records/adaptive/magic_parts/assessment_part_records.py
ScaffoldDownAssessmentPartFormRecord.set_waypoint_quota
def set_waypoint_quota(self, waypoint_quota): """how many waypoint questions need to be answered correctly""" if self.get_waypoint_quota_metadata().is_read_only(): raise NoAccess() if not self.my_osid_object_form._is_valid_cardinal(waypoint_quota, ...
python
def set_waypoint_quota(self, waypoint_quota): """how many waypoint questions need to be answered correctly""" if self.get_waypoint_quota_metadata().is_read_only(): raise NoAccess() if not self.my_osid_object_form._is_valid_cardinal(waypoint_quota, ...
[ "def", "set_waypoint_quota", "(", "self", ",", "waypoint_quota", ")", ":", "if", "self", ".", "get_waypoint_quota_metadata", "(", ")", ".", "is_read_only", "(", ")", ":", "raise", "NoAccess", "(", ")", "if", "not", "self", ".", "my_osid_object_form", ".", "_...
how many waypoint questions need to be answered correctly
[ "how", "many", "waypoint", "questions", "need", "to", "be", "answered", "correctly" ]
train
https://github.com/mitsei/dlkit/blob/445f968a175d61c8d92c0f617a3c17dc1dc7c584/dlkit/records/adaptive/magic_parts/assessment_part_records.py#L691-L698
mitsei/dlkit
dlkit/records/adaptive/magic_parts/assessment_part_records.py
ScaffoldDownAssessmentPartFormRecord.get_item_bank_id_metadata
def get_item_bank_id_metadata(self): """get the metadata for item bank""" metadata = dict(self._item_bank_id_metadata) metadata.update({'existing_id_values': self.my_osid_object_form._my_map['itemBankId']}) return Metadata(**metadata)
python
def get_item_bank_id_metadata(self): """get the metadata for item bank""" metadata = dict(self._item_bank_id_metadata) metadata.update({'existing_id_values': self.my_osid_object_form._my_map['itemBankId']}) return Metadata(**metadata)
[ "def", "get_item_bank_id_metadata", "(", "self", ")", ":", "metadata", "=", "dict", "(", "self", ".", "_item_bank_id_metadata", ")", "metadata", ".", "update", "(", "{", "'existing_id_values'", ":", "self", ".", "my_osid_object_form", ".", "_my_map", "[", "'item...
get the metadata for item bank
[ "get", "the", "metadata", "for", "item", "bank" ]
train
https://github.com/mitsei/dlkit/blob/445f968a175d61c8d92c0f617a3c17dc1dc7c584/dlkit/records/adaptive/magic_parts/assessment_part_records.py#L707-L711
mitsei/dlkit
dlkit/records/adaptive/magic_parts/assessment_part_records.py
ScaffoldDownAssessmentPartFormRecord.set_item_bank_id
def set_item_bank_id(self, bank_id): """the assessment bank in which to search for items, such as related to an objective""" if self.get_item_bank_id_metadata().is_read_only(): raise NoAccess() if not self.my_osid_object_form._is_valid_id(bank_id): raise InvalidArgument()...
python
def set_item_bank_id(self, bank_id): """the assessment bank in which to search for items, such as related to an objective""" if self.get_item_bank_id_metadata().is_read_only(): raise NoAccess() if not self.my_osid_object_form._is_valid_id(bank_id): raise InvalidArgument()...
[ "def", "set_item_bank_id", "(", "self", ",", "bank_id", ")", ":", "if", "self", ".", "get_item_bank_id_metadata", "(", ")", ".", "is_read_only", "(", ")", ":", "raise", "NoAccess", "(", ")", "if", "not", "self", ".", "my_osid_object_form", ".", "_is_valid_id...
the assessment bank in which to search for items, such as related to an objective
[ "the", "assessment", "bank", "in", "which", "to", "search", "for", "items", "such", "as", "related", "to", "an", "objective" ]
train
https://github.com/mitsei/dlkit/blob/445f968a175d61c8d92c0f617a3c17dc1dc7c584/dlkit/records/adaptive/magic_parts/assessment_part_records.py#L713-L719
mitsei/dlkit
dlkit/records/adaptive/magic_parts/assessment_part_records.py
ScaffoldDownAssessmentPartFormRecord.get_allow_repeat_items_metadata
def get_allow_repeat_items_metadata(self): """get the metadata for allow repeat items""" metadata = dict(self._allow_repeat_items_metadata) metadata.update({'existing_id_values': self.my_osid_object_form._my_map['allowRepeatItems']}) return Metadata(**metadata)
python
def get_allow_repeat_items_metadata(self): """get the metadata for allow repeat items""" metadata = dict(self._allow_repeat_items_metadata) metadata.update({'existing_id_values': self.my_osid_object_form._my_map['allowRepeatItems']}) return Metadata(**metadata)
[ "def", "get_allow_repeat_items_metadata", "(", "self", ")", ":", "metadata", "=", "dict", "(", "self", ".", "_allow_repeat_items_metadata", ")", "metadata", ".", "update", "(", "{", "'existing_id_values'", ":", "self", ".", "my_osid_object_form", ".", "_my_map", "...
get the metadata for allow repeat items
[ "get", "the", "metadata", "for", "allow", "repeat", "items" ]
train
https://github.com/mitsei/dlkit/blob/445f968a175d61c8d92c0f617a3c17dc1dc7c584/dlkit/records/adaptive/magic_parts/assessment_part_records.py#L728-L732
mitsei/dlkit
dlkit/records/adaptive/magic_parts/assessment_part_records.py
ScaffoldDownAssessmentPartFormRecord.set_allow_repeat_items
def set_allow_repeat_items(self, allow_repeat_items): """determines if repeat items will be shown, or if the scaffold iteration will simply stop""" if self.get_allow_repeat_items_metadata().is_read_only(): raise NoAccess() if not self.my_osid_object_form._is_valid_boolean(allow_repea...
python
def set_allow_repeat_items(self, allow_repeat_items): """determines if repeat items will be shown, or if the scaffold iteration will simply stop""" if self.get_allow_repeat_items_metadata().is_read_only(): raise NoAccess() if not self.my_osid_object_form._is_valid_boolean(allow_repea...
[ "def", "set_allow_repeat_items", "(", "self", ",", "allow_repeat_items", ")", ":", "if", "self", ".", "get_allow_repeat_items_metadata", "(", ")", ".", "is_read_only", "(", ")", ":", "raise", "NoAccess", "(", ")", "if", "not", "self", ".", "my_osid_object_form",...
determines if repeat items will be shown, or if the scaffold iteration will simply stop
[ "determines", "if", "repeat", "items", "will", "be", "shown", "or", "if", "the", "scaffold", "iteration", "will", "simply", "stop" ]
train
https://github.com/mitsei/dlkit/blob/445f968a175d61c8d92c0f617a3c17dc1dc7c584/dlkit/records/adaptive/magic_parts/assessment_part_records.py#L734-L740
mitsei/dlkit
dlkit/records/adaptive/magic_parts/assessment_part_records.py
ScaffoldDownAssessmentPartFormRecord.clear_allow_repeat_items
def clear_allow_repeat_items(self): """reset allow repeat itmes to default value""" if (self.get_allow_repeat_items_metadata().is_read_only() or self.get_allow_repeat_items_metadata().is_required()): raise NoAccess() self.my_osid_object_form._my_map['allowRepeatItems'...
python
def clear_allow_repeat_items(self): """reset allow repeat itmes to default value""" if (self.get_allow_repeat_items_metadata().is_read_only() or self.get_allow_repeat_items_metadata().is_required()): raise NoAccess() self.my_osid_object_form._my_map['allowRepeatItems'...
[ "def", "clear_allow_repeat_items", "(", "self", ")", ":", "if", "(", "self", ".", "get_allow_repeat_items_metadata", "(", ")", ".", "is_read_only", "(", ")", "or", "self", ".", "get_allow_repeat_items_metadata", "(", ")", ".", "is_required", "(", ")", ")", ":"...
reset allow repeat itmes to default value
[ "reset", "allow", "repeat", "itmes", "to", "default", "value" ]
train
https://github.com/mitsei/dlkit/blob/445f968a175d61c8d92c0f617a3c17dc1dc7c584/dlkit/records/adaptive/magic_parts/assessment_part_records.py#L742-L748
mitsei/dlkit
dlkit/handcar/learning/sessions.py
ObjectiveLookupSession.get_objective_bank
def get_objective_bank(self): """Gets the ObjectiveBank associated with this session. return: (osid.learning.ObjectiveBank) - the ObjectiveBank associated with this session raise: OperationFailed - unable to complete request raise: PermissionDenied - authorization fail...
python
def get_objective_bank(self): """Gets the ObjectiveBank associated with this session. return: (osid.learning.ObjectiveBank) - the ObjectiveBank associated with this session raise: OperationFailed - unable to complete request raise: PermissionDenied - authorization fail...
[ "def", "get_objective_bank", "(", "self", ")", ":", "# This should probably be accomplished via a handcar call instead of OSID", "url_path", "=", "construct_url", "(", "'objective_banks'", ",", "bank_id", "=", "self", ".", "_catalog_idstr", ")", "return", "objects", ".", ...
Gets the ObjectiveBank associated with this session. return: (osid.learning.ObjectiveBank) - the ObjectiveBank associated with this session raise: OperationFailed - unable to complete request raise: PermissionDenied - authorization failure compliance: mandatory - This ...
[ "Gets", "the", "ObjectiveBank", "associated", "with", "this", "session", "." ]
train
https://github.com/mitsei/dlkit/blob/445f968a175d61c8d92c0f617a3c17dc1dc7c584/dlkit/handcar/learning/sessions.py#L84-L97
mitsei/dlkit
dlkit/handcar/learning/sessions.py
ObjectiveLookupSession.can_lookup_objectives
def can_lookup_objectives(self): """Tests if this user can perform Objective lookups. A return of true does not guarantee successful authorization. A return of false indicates that it is known all methods in this session will result in a PermissionDenied. This is intended as a hi...
python
def can_lookup_objectives(self): """Tests if this user can perform Objective lookups. A return of true does not guarantee successful authorization. A return of false indicates that it is known all methods in this session will result in a PermissionDenied. This is intended as a hi...
[ "def", "can_lookup_objectives", "(", "self", ")", ":", "url_path", "=", "construct_url", "(", "'authorization'", ",", "bank_id", "=", "self", ".", "_catalog_idstr", ")", "return", "self", ".", "_get_request", "(", "url_path", ")", "[", "'objectiveHints'", "]", ...
Tests if this user can perform Objective lookups. A return of true does not guarantee successful authorization. A return of false indicates that it is known all methods in this session will result in a PermissionDenied. This is intended as a hint to an application that may opt not to off...
[ "Tests", "if", "this", "user", "can", "perform", "Objective", "lookups", ".", "A", "return", "of", "true", "does", "not", "guarantee", "successful", "authorization", ".", "A", "return", "of", "false", "indicates", "that", "it", "is", "known", "all", "methods...
train
https://github.com/mitsei/dlkit/blob/445f968a175d61c8d92c0f617a3c17dc1dc7c584/dlkit/handcar/learning/sessions.py#L99-L113
mitsei/dlkit
dlkit/handcar/learning/sessions.py
ObjectiveLookupSession.get_objective
def get_objective(self, objective_id=None): """Gets the Objective specified by its Id. In plenary mode, the exact Id is found or a NotFound results. Otherwise, the returned Objective may have a different Id than requested, such as the case where a duplicate Id was assigned to an ...
python
def get_objective(self, objective_id=None): """Gets the Objective specified by its Id. In plenary mode, the exact Id is found or a NotFound results. Otherwise, the returned Objective may have a different Id than requested, such as the case where a duplicate Id was assigned to an ...
[ "def", "get_objective", "(", "self", ",", "objective_id", "=", "None", ")", ":", "if", "objective_id", "is", "None", ":", "raise", "NullArgument", "(", ")", "url_path", "=", "construct_url", "(", "'objectives'", ",", "obj_id", "=", "objective_id", ")", "retu...
Gets the Objective specified by its Id. In plenary mode, the exact Id is found or a NotFound results. Otherwise, the returned Objective may have a different Id than requested, such as the case where a duplicate Id was assigned to an Objective and retained for compatibility. arg: ...
[ "Gets", "the", "Objective", "specified", "by", "its", "Id", ".", "In", "plenary", "mode", "the", "exact", "Id", "is", "found", "or", "a", "NotFound", "results", ".", "Otherwise", "the", "returned", "Objective", "may", "have", "a", "different", "Id", "than"...
train
https://github.com/mitsei/dlkit/blob/445f968a175d61c8d92c0f617a3c17dc1dc7c584/dlkit/handcar/learning/sessions.py#L154-L172
mitsei/dlkit
dlkit/handcar/learning/sessions.py
ObjectiveLookupSession.get_objectives_by_ids
def get_objectives_by_ids(self, objective_ids=None): """Gets an ObjectiveList corresponding to the given IdList. In plenary mode, the returned list contains all of the objectives specified in the Id list, in the order of the list, including duplicates, or an error results if an Id in the...
python
def get_objectives_by_ids(self, objective_ids=None): """Gets an ObjectiveList corresponding to the given IdList. In plenary mode, the returned list contains all of the objectives specified in the Id list, in the order of the list, including duplicates, or an error results if an Id in the...
[ "def", "get_objectives_by_ids", "(", "self", ",", "objective_ids", "=", "None", ")", ":", "if", "objective_ids", "is", "None", ":", "raise", "NullArgument", "(", ")", "url_path", "=", "construct_url", "(", "'objectives_by_ids'", ",", "obj_ids", "=", "objective_i...
Gets an ObjectiveList corresponding to the given IdList. In plenary mode, the returned list contains all of the objectives 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 not found or inaccessible. Otherwise, ...
[ "Gets", "an", "ObjectiveList", "corresponding", "to", "the", "given", "IdList", ".", "In", "plenary", "mode", "the", "returned", "list", "contains", "all", "of", "the", "objectives", "specified", "in", "the", "Id", "list", "in", "the", "order", "of", "the", ...
train
https://github.com/mitsei/dlkit/blob/445f968a175d61c8d92c0f617a3c17dc1dc7c584/dlkit/handcar/learning/sessions.py#L174-L216
mitsei/dlkit
dlkit/handcar/learning/sessions.py
ObjectiveLookupSession.get_objectives_by_genus_type
def get_objectives_by_genus_type(self, objective_genus_type=None): """Gets an ObjectiveList corresponding to the given objective genus Type which does not include objectives of genus types derived from the specified Type. In plenary mode, the returned list contains all known objectives ...
python
def get_objectives_by_genus_type(self, objective_genus_type=None): """Gets an ObjectiveList corresponding to the given objective genus Type which does not include objectives of genus types derived from the specified Type. In plenary mode, the returned list contains all known objectives ...
[ "def", "get_objectives_by_genus_type", "(", "self", ",", "objective_genus_type", "=", "None", ")", ":", "if", "objective_genus_type", "is", "None", ":", "raise", "NullArgument", "(", ")", "url_path", "=", "construct_url", "(", "'objectives_by_genus'", ",", "bank_id"...
Gets an ObjectiveList corresponding to the given objective genus Type which does not include objectives of genus types derived from the specified Type. In plenary mode, the returned list contains all known objectives or an error results. Otherwise, the returned list may contain o...
[ "Gets", "an", "ObjectiveList", "corresponding", "to", "the", "given", "objective", "genus", "Type", "which", "does", "not", "include", "objectives", "of", "genus", "types", "derived", "from", "the", "specified", "Type", ".", "In", "plenary", "mode", "the", "re...
train
https://github.com/mitsei/dlkit/blob/445f968a175d61c8d92c0f617a3c17dc1dc7c584/dlkit/handcar/learning/sessions.py#L218-L240
mitsei/dlkit
dlkit/handcar/learning/sessions.py
ObjectiveQuerySession.get_objectives_by_query
def get_objectives_by_query(self, objective_query=None): """Gets a list of Objectives matching the given objective query. arg: objectiveQuery (osid.learning.ObjectiveQuery): the objective query return: (osid.learning.ObjectiveList) - the returned ObjectiveList...
python
def get_objectives_by_query(self, objective_query=None): """Gets a list of Objectives matching the given objective query. arg: objectiveQuery (osid.learning.ObjectiveQuery): the objective query return: (osid.learning.ObjectiveList) - the returned ObjectiveList...
[ "def", "get_objectives_by_query", "(", "self", ",", "objective_query", "=", "None", ")", ":", "if", "objective_query", "is", "None", ":", "raise", "NullArgument", "(", ")", "if", "'ancestorObjectiveId'", "in", "objective_query", ".", "_query_terms", ":", "url_path...
Gets a list of Objectives matching the given objective query. arg: objectiveQuery (osid.learning.ObjectiveQuery): the objective query return: (osid.learning.ObjectiveList) - the returned ObjectiveList raise: NullArgument - objectiveQuery is null raise...
[ "Gets", "a", "list", "of", "Objectives", "matching", "the", "given", "objective", "query", "." ]
train
https://github.com/mitsei/dlkit/blob/445f968a175d61c8d92c0f617a3c17dc1dc7c584/dlkit/handcar/learning/sessions.py#L440-L474
mitsei/dlkit
dlkit/handcar/learning/sessions.py
ObjectiveAdminSession._record_extension
def _record_extension(self, objective_id, key, value): """ To structure a record extension property bean """ record_bean = { 'value': value, 'displayName': self._text_bean(key), 'description': self._text_bean(key), 'displayLabel': self._tex...
python
def _record_extension(self, objective_id, key, value): """ To structure a record extension property bean """ record_bean = { 'value': value, 'displayName': self._text_bean(key), 'description': self._text_bean(key), 'displayLabel': self._tex...
[ "def", "_record_extension", "(", "self", ",", "objective_id", ",", "key", ",", "value", ")", ":", "record_bean", "=", "{", "'value'", ":", "value", ",", "'displayName'", ":", "self", ".", "_text_bean", "(", "key", ")", ",", "'description'", ":", "self", ...
To structure a record extension property bean
[ "To", "structure", "a", "record", "extension", "property", "bean" ]
train
https://github.com/mitsei/dlkit/blob/445f968a175d61c8d92c0f617a3c17dc1dc7c584/dlkit/handcar/learning/sessions.py#L627-L638
mitsei/dlkit
dlkit/handcar/learning/sessions.py
ObjectiveAdminSession.can_create_objectives
def can_create_objectives(self): """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 a PermissionDenied. This is intended as a hint to an appli...
python
def can_create_objectives(self): """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 a PermissionDenied. This is intended as a hint to an appli...
[ "def", "can_create_objectives", "(", "self", ")", ":", "url_path", "=", "construct_url", "(", "'authorization'", ",", "bank_id", "=", "self", ".", "_catalog_idstr", ")", "return", "self", ".", "_get_request", "(", "url_path", ")", "[", "'objectiveHints'", "]", ...
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 a PermissionDenied. This is intended as a hint to an application that may opt not to offer create oper...
[ "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", "Objecti...
train
https://github.com/mitsei/dlkit/blob/445f968a175d61c8d92c0f617a3c17dc1dc7c584/dlkit/handcar/learning/sessions.py#L719-L733
mitsei/dlkit
dlkit/handcar/learning/sessions.py
ObjectiveAdminSession.get_objective_form_for_create
def get_objective_form_for_create(self, objective_record_types=None): """Gets the objective form for creating new objectives. A new form should be requested for each create transaction. arg: objectiveRecordTypes (osid.type.Type): array of objective record types return:...
python
def get_objective_form_for_create(self, objective_record_types=None): """Gets the objective form for creating new objectives. A new form should be requested for each create transaction. arg: objectiveRecordTypes (osid.type.Type): array of objective record types return:...
[ "def", "get_objective_form_for_create", "(", "self", ",", "objective_record_types", "=", "None", ")", ":", "if", "objective_record_types", "is", "None", ":", "pass", "# Still need to deal with the record_types argument", "objective_form", "=", "objects", ".", "ObjectiveForm...
Gets the objective form for creating new objectives. A new form should be requested for each create transaction. arg: objectiveRecordTypes (osid.type.Type): array of objective record types return: (osid.learning.ObjectiveForm) - the objective form raise: NullArgument ...
[ "Gets", "the", "objective", "form", "for", "creating", "new", "objectives", ".", "A", "new", "form", "should", "be", "requested", "for", "each", "create", "transaction", ".", "arg", ":", "objectiveRecordTypes", "(", "osid", ".", "type", ".", "Type", ")", "...
train
https://github.com/mitsei/dlkit/blob/445f968a175d61c8d92c0f617a3c17dc1dc7c584/dlkit/handcar/learning/sessions.py#L753-L771
mitsei/dlkit
dlkit/handcar/learning/sessions.py
ObjectiveAdminSession.create_objective
def create_objective(self, objective_form=None): """Creates a new Objective. arg: objectiveForm (osid.learning.ObjectiveForm): the form for this Objective return: (osid.learning.Objective) - the new Objective raise: IllegalState - objectiveForm already used in a crea...
python
def create_objective(self, objective_form=None): """Creates a new Objective. arg: objectiveForm (osid.learning.ObjectiveForm): the form for this Objective return: (osid.learning.Objective) - the new Objective raise: IllegalState - objectiveForm already used in a crea...
[ "def", "create_objective", "(", "self", ",", "objective_form", "=", "None", ")", ":", "if", "objective_form", "is", "None", ":", "raise", "NullArgument", "(", ")", "if", "not", "isinstance", "(", "objective_form", ",", "abc_learning_objects", ".", "ObjectiveForm...
Creates a new Objective. arg: objectiveForm (osid.learning.ObjectiveForm): the form for this Objective return: (osid.learning.Objective) - the new Objective raise: IllegalState - objectiveForm already used in a create transaction raise: InvalidArgume...
[ "Creates", "a", "new", "Objective", "." ]
train
https://github.com/mitsei/dlkit/blob/445f968a175d61c8d92c0f617a3c17dc1dc7c584/dlkit/handcar/learning/sessions.py#L773-L812
mitsei/dlkit
dlkit/handcar/learning/sessions.py
ObjectiveAdminSession.get_objective_form_for_update
def get_objective_form_for_update(self, objective_id=None): """Gets the objective form for updating an existing objective. A new objective form should be requested for each update transaction. arg: objectiveId (osid.id.Id): the Id of the Objective return: (osid.learning.Object...
python
def get_objective_form_for_update(self, objective_id=None): """Gets the objective form for updating an existing objective. A new objective form should be requested for each update transaction. arg: objectiveId (osid.id.Id): the Id of the Objective return: (osid.learning.Object...
[ "def", "get_objective_form_for_update", "(", "self", ",", "objective_id", "=", "None", ")", ":", "if", "objective_id", "is", "None", ":", "raise", "NullArgument", "(", ")", "try", ":", "url_path", "=", "construct_url", "(", "'objectives'", ",", "bank_id", "=",...
Gets the objective form for updating an existing objective. A new objective form should be requested for each update transaction. arg: objectiveId (osid.id.Id): the Id of the Objective return: (osid.learning.ObjectiveForm) - the objective form raise: NotFound - objectiveId is...
[ "Gets", "the", "objective", "form", "for", "updating", "an", "existing", "objective", ".", "A", "new", "objective", "form", "should", "be", "requested", "for", "each", "update", "transaction", ".", "arg", ":", "objectiveId", "(", "osid", ".", "id", ".", "I...
train
https://github.com/mitsei/dlkit/blob/445f968a175d61c8d92c0f617a3c17dc1dc7c584/dlkit/handcar/learning/sessions.py#L830-L854
mitsei/dlkit
dlkit/handcar/learning/sessions.py
ObjectiveAdminSession.can_delete_objectives
def can_delete_objectives(self): """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 an Objective will result in a PermissionDenied. This is intended as a hint to an appli...
python
def can_delete_objectives(self): """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 an Objective will result in a PermissionDenied. This is intended as a hint to an appli...
[ "def", "can_delete_objectives", "(", "self", ")", ":", "url_path", "=", "construct_url", "(", "'authorization'", ",", "bank_id", "=", "self", ".", "_catalog_idstr", ")", "return", "self", ".", "_get_request", "(", "url_path", ")", "[", "'objectiveHints'", "]", ...
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 an Objective will result in a PermissionDenied. This is intended as a hint to an application that may opt not to offer delete oper...
[ "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", "an", "Objecti...
train
https://github.com/mitsei/dlkit/blob/445f968a175d61c8d92c0f617a3c17dc1dc7c584/dlkit/handcar/learning/sessions.py#L897-L911
mitsei/dlkit
dlkit/handcar/learning/sessions.py
ObjectiveAdminSession.delete_objective
def delete_objective(self, objective_id=None): """Deletes the Objective identified by the given Id. arg: objectiveId (osid.id.Id): the Id of the Objective to delete raise: NotFound - an Objective was not found identified by the given Id raise: NullAr...
python
def delete_objective(self, objective_id=None): """Deletes the Objective identified by the given Id. arg: objectiveId (osid.id.Id): the Id of the Objective to delete raise: NotFound - an Objective was not found identified by the given Id raise: NullAr...
[ "def", "delete_objective", "(", "self", ",", "objective_id", "=", "None", ")", ":", "if", "objective_id", "is", "None", ":", "raise", "NullArgument", "(", ")", "if", "not", "isinstance", "(", "objective_id", ",", "abc_id", ")", ":", "raise", "InvalidArgument...
Deletes the Objective identified by the given Id. arg: objectiveId (osid.id.Id): the Id of the Objective to delete raise: NotFound - an Objective was not found identified by the given Id raise: NullArgument - objectiveId is null raise: OperationFail...
[ "Deletes", "the", "Objective", "identified", "by", "the", "given", "Id", "." ]
train
https://github.com/mitsei/dlkit/blob/445f968a175d61c8d92c0f617a3c17dc1dc7c584/dlkit/handcar/learning/sessions.py#L913-L935
mitsei/dlkit
dlkit/handcar/learning/sessions.py
ObjectiveHierarchySession.can_access_objective_hierarchy
def can_access_objective_hierarchy(self): """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 ...
python
def can_access_objective_hierarchy(self): """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 ...
[ "def", "can_access_objective_hierarchy", "(", "self", ")", ":", "url_path", "=", "construct_url", "(", "'authorization'", ",", "bank_id", "=", "self", ".", "_catalog_idstr", ")", "return", "self", ".", "_get_request", "(", "url_path", ")", "[", "'objectiveHierarch...
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 ...
[ "Tests", "if", "this", "user", "can", "perform", "hierarchy", "queries", "." ]
train
https://github.com/mitsei/dlkit/blob/445f968a175d61c8d92c0f617a3c17dc1dc7c584/dlkit/handcar/learning/sessions.py#L1049-L1065
mitsei/dlkit
dlkit/handcar/learning/sessions.py
ObjectiveHierarchySession.get_root_objective_ids
def get_root_objective_ids(self): """Gets the root objective Ids in this hierarchy. return: (osid.id.IdList) - the root objective Ids raise: OperationFailed - unable to complete request raise: PermissionDenied - authorization failure compliance: mandatory - This method must be...
python
def get_root_objective_ids(self): """Gets the root objective Ids in this hierarchy. return: (osid.id.IdList) - the root objective Ids raise: OperationFailed - unable to complete request raise: PermissionDenied - authorization failure compliance: mandatory - This method must be...
[ "def", "get_root_objective_ids", "(", "self", ")", ":", "url_path", "=", "construct_url", "(", "'rootids'", ",", "bank_id", "=", "self", ".", "_catalog_idstr", ")", "id_list", "=", "list", "(", ")", "for", "identifier", "in", "self", ".", "_get_request", "("...
Gets the root objective Ids in this hierarchy. return: (osid.id.IdList) - the root objective Ids raise: OperationFailed - unable to complete request raise: PermissionDenied - authorization failure compliance: mandatory - This method must be implemented.
[ "Gets", "the", "root", "objective", "Ids", "in", "this", "hierarchy", "." ]
train
https://github.com/mitsei/dlkit/blob/445f968a175d61c8d92c0f617a3c17dc1dc7c584/dlkit/handcar/learning/sessions.py#L1092-L1106
mitsei/dlkit
dlkit/handcar/learning/sessions.py
ObjectiveHierarchySession.get_root_objectives
def get_root_objectives(self): """Gets the root objective in this objective hierarchy. return: (osid.learning.ObjectiveList) - the root objective raise: OperationFailed - unable to complete request raise: PermissionDenied - authorization failure compliance: mandatory - This me...
python
def get_root_objectives(self): """Gets the root objective in this objective hierarchy. return: (osid.learning.ObjectiveList) - the root objective raise: OperationFailed - unable to complete request raise: PermissionDenied - authorization failure compliance: mandatory - This me...
[ "def", "get_root_objectives", "(", "self", ")", ":", "url_path", "=", "construct_url", "(", "'roots'", ",", "bank_id", "=", "self", ".", "_catalog_idstr", ")", "return", "objects", ".", "ObjectiveList", "(", "self", ".", "_get_request", "(", "url_path", ")", ...
Gets the root objective in this objective hierarchy. return: (osid.learning.ObjectiveList) - the root objective raise: OperationFailed - unable to complete request raise: PermissionDenied - authorization failure compliance: mandatory - This method is must be implemented.
[ "Gets", "the", "root", "objective", "in", "this", "objective", "hierarchy", "." ]
train
https://github.com/mitsei/dlkit/blob/445f968a175d61c8d92c0f617a3c17dc1dc7c584/dlkit/handcar/learning/sessions.py#L1108-L1119
mitsei/dlkit
dlkit/handcar/learning/sessions.py
ObjectiveHierarchySession.is_parent_of_objective
def is_parent_of_objective(self, id_=None, objective_id=None): """Tests if an Id is a direct parent of an objective. arg: id (osid.id.Id): an Id arg: objective_id (osid.id.Id): the Id of an objective return: (boolean) - true if this id is a parent of objective_id, ...
python
def is_parent_of_objective(self, id_=None, objective_id=None): """Tests if an Id is a direct parent of an objective. arg: id (osid.id.Id): an Id arg: objective_id (osid.id.Id): the Id of an objective return: (boolean) - true if this id is a parent of objective_id, ...
[ "def", "is_parent_of_objective", "(", "self", ",", "id_", "=", "None", ",", "objective_id", "=", "None", ")", ":", "if", "id_", "is", "None", "or", "objective_id", "is", "None", ":", "raise", "NullArgument", "(", ")", "return", "id_", "in", "list", "(", ...
Tests if an Id is a direct parent of an objective. arg: id (osid.id.Id): an Id arg: objective_id (osid.id.Id): the Id of an objective return: (boolean) - true if this id is a parent of objective_id, false otherwise raise: NotFound - objective_id is not found ...
[ "Tests", "if", "an", "Id", "is", "a", "direct", "parent", "of", "an", "objective", "." ]
train
https://github.com/mitsei/dlkit/blob/445f968a175d61c8d92c0f617a3c17dc1dc7c584/dlkit/handcar/learning/sessions.py#L1138-L1155
mitsei/dlkit
dlkit/handcar/learning/sessions.py
ObjectiveHierarchySession.is_child_of_objective
def is_child_of_objective(self, id_=None, objective_id=None): """Tests if an objective is a direct child of another. arg: id (osid.id.Id): an Id arg: objective_id (osid.id.Id): the Id of an objective return: (boolean) - true if the id is a child of objective_id, fa...
python
def is_child_of_objective(self, id_=None, objective_id=None): """Tests if an objective is a direct child of another. arg: id (osid.id.Id): an Id arg: objective_id (osid.id.Id): the Id of an objective return: (boolean) - true if the id is a child of objective_id, fa...
[ "def", "is_child_of_objective", "(", "self", ",", "id_", "=", "None", ",", "objective_id", "=", "None", ")", ":", "if", "id_", "is", "None", "or", "objective_id", "is", "None", ":", "raise", "NullArgument", "(", ")", "return", "id_", "in", "list", "(", ...
Tests if an objective is a direct child of another. arg: id (osid.id.Id): an Id arg: objective_id (osid.id.Id): the Id of an objective return: (boolean) - true if the id is a child of objective_id, false otherwise raise: NotFound - objective_id is not found ...
[ "Tests", "if", "an", "objective", "is", "a", "direct", "child", "of", "another", "." ]
train
https://github.com/mitsei/dlkit/blob/445f968a175d61c8d92c0f617a3c17dc1dc7c584/dlkit/handcar/learning/sessions.py#L1233-L1250
mitsei/dlkit
dlkit/handcar/learning/sessions.py
ObjectiveHierarchySession.get_child_objective_ids
def get_child_objective_ids(self, objective_id=None): """Gets the child Ids of the given objective. arg: objective_id (osid.id.Id): the Id to query return: (osid.id.IdList) - the children of the objective raise: NotFound - objective_id is not found raise: NullArgument - obj...
python
def get_child_objective_ids(self, objective_id=None): """Gets the child Ids of the given objective. arg: objective_id (osid.id.Id): the Id to query return: (osid.id.IdList) - the children of the objective raise: NotFound - objective_id is not found raise: NullArgument - obj...
[ "def", "get_child_objective_ids", "(", "self", ",", "objective_id", "=", "None", ")", ":", "if", "objective_id", "is", "None", ":", "raise", "NullArgument", "(", ")", "url_path", "=", "construct_url", "(", "'childids'", ",", "bank_id", "=", "self", ".", "_ca...
Gets the child Ids of the given objective. arg: objective_id (osid.id.Id): the Id to query return: (osid.id.IdList) - the children of the objective raise: NotFound - objective_id is not found raise: NullArgument - objective_id is null raise: OperationFailed - unable to com...
[ "Gets", "the", "child", "Ids", "of", "the", "given", "objective", "." ]
train
https://github.com/mitsei/dlkit/blob/445f968a175d61c8d92c0f617a3c17dc1dc7c584/dlkit/handcar/learning/sessions.py#L1252-L1272
mitsei/dlkit
dlkit/handcar/learning/sessions.py
ObjectiveHierarchySession.get_child_objectives
def get_child_objectives(self, objective_id=None): """Gets the children of the given objective. arg: objective_id (osid.id.Id): the Id to query return: (osid.learning.ObjectiveList) - the children of the objective raise: NotFound - objective_id is not found r...
python
def get_child_objectives(self, objective_id=None): """Gets the children of the given objective. arg: objective_id (osid.id.Id): the Id to query return: (osid.learning.ObjectiveList) - the children of the objective raise: NotFound - objective_id is not found r...
[ "def", "get_child_objectives", "(", "self", ",", "objective_id", "=", "None", ")", ":", "if", "objective_id", "is", "None", ":", "raise", "NullArgument", "(", ")", "url_path", "=", "construct_url", "(", "'children'", ",", "bank_id", "=", "self", ".", "_catal...
Gets the children of the given objective. arg: objective_id (osid.id.Id): the Id to query return: (osid.learning.ObjectiveList) - the children of the objective raise: NotFound - objective_id is not found raise: NullArgument - objective_id is null raise: Ope...
[ "Gets", "the", "children", "of", "the", "given", "objective", "." ]
train
https://github.com/mitsei/dlkit/blob/445f968a175d61c8d92c0f617a3c17dc1dc7c584/dlkit/handcar/learning/sessions.py#L1274-L1292
mitsei/dlkit
dlkit/handcar/learning/sessions.py
ObjectiveHierarchySession.get_objective_nodes
def get_objective_nodes(self, objective_id=None, ancestor_levels=None, descendant_levels=None, include_siblings=None): """Gets a portion of the hierarchy for the given objective. arg: obje...
python
def get_objective_nodes(self, objective_id=None, ancestor_levels=None, descendant_levels=None, include_siblings=None): """Gets a portion of the hierarchy for the given objective. arg: obje...
[ "def", "get_objective_nodes", "(", "self", ",", "objective_id", "=", "None", ",", "ancestor_levels", "=", "None", ",", "descendant_levels", "=", "None", ",", "include_siblings", "=", "None", ")", ":", "if", "objective_id", "is", "None", ":", "url_path", "=", ...
Gets a portion of the hierarchy for the given objective. arg: objective_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 node. arg: descendant_level...
[ "Gets", "a", "portion", "of", "the", "hierarchy", "for", "the", "given", "objective", "." ]
train
https://github.com/mitsei/dlkit/blob/445f968a175d61c8d92c0f617a3c17dc1dc7c584/dlkit/handcar/learning/sessions.py#L1337-L1367
mitsei/dlkit
dlkit/handcar/learning/sessions.py
ObjectiveHierarchyDesignSession.can_modify_objective_hierarchy
def can_modify_objective_hierarchy(self): """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 ...
python
def can_modify_objective_hierarchy(self): """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 ...
[ "def", "can_modify_objective_hierarchy", "(", "self", ")", ":", "url_path", "=", "construct_url", "(", "'authorization'", ",", "bank_id", "=", "self", ".", "_catalog_idstr", ")", "return", "self", ".", "_get_request", "(", "url_path", ")", "[", "'objectiveHierarch...
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 o...
[ "Tests", "if", "this", "user", "can", "change", "the", "hierarchy", "." ]
train
https://github.com/mitsei/dlkit/blob/445f968a175d61c8d92c0f617a3c17dc1dc7c584/dlkit/handcar/learning/sessions.py#L1422-L1438
mitsei/dlkit
dlkit/handcar/learning/sessions.py
ObjectiveHierarchyDesignSession.add_child_objective
def add_child_objective(self, objective_id=None, child_id=None): """Adds a child to an objective. arg: objective_id (osid.id.Id): the Id of an objective arg: child_id (osid.id.Id): the Id of the new child raise: AlreadyExists - objective_id is already a parent of ...
python
def add_child_objective(self, objective_id=None, child_id=None): """Adds a child to an objective. arg: objective_id (osid.id.Id): the Id of an objective arg: child_id (osid.id.Id): the Id of the new child raise: AlreadyExists - objective_id is already a parent of ...
[ "def", "add_child_objective", "(", "self", ",", "objective_id", "=", "None", ",", "child_id", "=", "None", ")", ":", "if", "objective_id", "is", "None", "or", "child_id", "is", "None", ":", "raise", "NullArgument", "(", ")", "ohs", "=", "ObjectiveHierarchySe...
Adds a child to an objective. arg: objective_id (osid.id.Id): the Id of an objective arg: child_id (osid.id.Id): the Id of the new child raise: AlreadyExists - objective_id is already a parent of child_id raise: NotFound - objective_id or child_id not found ...
[ "Adds", "a", "child", "to", "an", "objective", "." ]
train
https://github.com/mitsei/dlkit/blob/445f968a175d61c8d92c0f617a3c17dc1dc7c584/dlkit/handcar/learning/sessions.py#L1467-L1502
mitsei/dlkit
dlkit/handcar/learning/sessions.py
ObjectiveHierarchyDesignSession.remove_child_objectives
def remove_child_objectives(self, objective_id=None): """Removes all children from an objective. arg: objective_id (osid.id.Id): the Id of an objective raise: NotFound - objective_id not found raise: NullArgument - objective_id is null raise: OperationFailed - unable to co...
python
def remove_child_objectives(self, objective_id=None): """Removes all children from an objective. arg: objective_id (osid.id.Id): the Id of an objective raise: NotFound - objective_id not found raise: NullArgument - objective_id is null raise: OperationFailed - unable to co...
[ "def", "remove_child_objectives", "(", "self", ",", "objective_id", "=", "None", ")", ":", "if", "objective_id", "is", "None", ":", "raise", "NullArgument", "(", ")", "ols", "=", "ObjectiveLookupSession", "(", "self", ".", "_objective_bank_id", ",", "runtime", ...
Removes all children from an objective. arg: objective_id (osid.id.Id): the Id of an objective raise: NotFound - objective_id not found raise: NullArgument - objective_id is null raise: OperationFailed - unable to complete request raise: PermissionDenied - authorization f...
[ "Removes", "all", "children", "from", "an", "objective", "." ]
train
https://github.com/mitsei/dlkit/blob/445f968a175d61c8d92c0f617a3c17dc1dc7c584/dlkit/handcar/learning/sessions.py#L1539-L1568
mitsei/dlkit
dlkit/handcar/learning/sessions.py
ObjectiveSequencingSession.can_sequence_objectives
def can_sequence_objectives(self): """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 ...
python
def can_sequence_objectives(self): """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 ...
[ "def", "can_sequence_objectives", "(", "self", ")", ":", "url_path", "=", "construct_url", "(", "'authorization'", ",", "bank_id", "=", "self", ".", "_catalog_idstr", ")", "return", "self", ".", "_get_request", "(", "url_path", ")", "[", "'objectiveHierarchyHints'...
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 op...
[ "Tests", "if", "this", "user", "can", "sequence", "objectives", "." ]
train
https://github.com/mitsei/dlkit/blob/445f968a175d61c8d92c0f617a3c17dc1dc7c584/dlkit/handcar/learning/sessions.py#L1651-L1667
mitsei/dlkit
dlkit/handcar/learning/sessions.py
ObjectiveSequencingSession.move_objective_behind
def move_objective_behind(self, parent_objective_id=None, reference_objective_id=None, objective_id=None): """Moves an objective behind a refrence objective under the given parent. arg: parent_objective_id (osid.id.Id): the Id of the parent objective arg: reference...
python
def move_objective_behind(self, parent_objective_id=None, reference_objective_id=None, objective_id=None): """Moves an objective behind a refrence objective under the given parent. arg: parent_objective_id (osid.id.Id): the Id of the parent objective arg: reference...
[ "def", "move_objective_behind", "(", "self", ",", "parent_objective_id", "=", "None", ",", "reference_objective_id", "=", "None", ",", "objective_id", "=", "None", ")", ":", "# NOT YET TESTED:", "if", "(", "parent_objective_id", "is", "None", "or", "reference_object...
Moves an objective behind a refrence objective under the given parent. arg: parent_objective_id (osid.id.Id): the Id of the parent objective arg: reference_objective_id (osid.id.Id): the Id of the objective arg: objective_id (osid.id.Id): the Id ...
[ "Moves", "an", "objective", "behind", "a", "refrence", "objective", "under", "the", "given", "parent", "." ]
train
https://github.com/mitsei/dlkit/blob/445f968a175d61c8d92c0f617a3c17dc1dc7c584/dlkit/handcar/learning/sessions.py#L1720-L1769
mitsei/dlkit
dlkit/handcar/learning/sessions.py
ObjectiveRequisiteSession.can_lookup_objective_prerequisites
def can_lookup_objective_prerequisites(self): """Tests if this user can perform Objective lookups. A return of true does not guarantee successful authorization. A return of false indicates that it is known all methods in this session will result in a PermissionDenied. This is intended a...
python
def can_lookup_objective_prerequisites(self): """Tests if this user can perform Objective lookups. A return of true does not guarantee successful authorization. A return of false indicates that it is known all methods in this session will result in a PermissionDenied. This is intended a...
[ "def", "can_lookup_objective_prerequisites", "(", "self", ")", ":", "url_path", "=", "construct_url", "(", "'authorization'", ",", "bank_id", "=", "self", ".", "_catalog_idstr", ")", "return", "self", ".", "_get_request", "(", "url_path", ")", "[", "'objectiveRequ...
Tests if this user can perform Objective lookups. A return of true does not guarantee successful authorization. A return of false indicates that it is known all methods in this session will result in a PermissionDenied. This is intended as a hint to an application that may opt not to of...
[ "Tests", "if", "this", "user", "can", "perform", "Objective", "lookups", "." ]
train
https://github.com/mitsei/dlkit/blob/445f968a175d61c8d92c0f617a3c17dc1dc7c584/dlkit/handcar/learning/sessions.py#L1861-L1877
mitsei/dlkit
dlkit/handcar/learning/sessions.py
ObjectiveRequisiteSession.get_all_requisite_objectives
def get_all_requisite_objectives(self, objective_id=None): """Gets a list of Objectives that are the requisites for the given Objective including the requistes of the requisites, and so on. In plenary mode, the returned list contains all of the immediate requisites, or an error results ...
python
def get_all_requisite_objectives(self, objective_id=None): """Gets a list of Objectives that are the requisites for the given Objective including the requistes of the requisites, and so on. In plenary mode, the returned list contains all of the immediate requisites, or an error results ...
[ "def", "get_all_requisite_objectives", "(", "self", ",", "objective_id", "=", "None", ")", ":", "# This should be re-implemented if and when handcar supports", "# getting all requisites directly", "requisites", "=", "list", "(", ")", "requisite_ids", "=", "list", "(", ")", ...
Gets a list of Objectives that are the requisites for the given Objective including the requistes of the requisites, and so on. In plenary mode, the returned list contains all of the immediate requisites, or an error results if an Objective is not found or inaccessible. Otherwise, inacc...
[ "Gets", "a", "list", "of", "Objectives", "that", "are", "the", "requisites", "for", "the", "given", "Objective", "including", "the", "requistes", "of", "the", "requisites", "and", "so", "on", "." ]
train
https://github.com/mitsei/dlkit/blob/445f968a175d61c8d92c0f617a3c17dc1dc7c584/dlkit/handcar/learning/sessions.py#L1961-L1986
mitsei/dlkit
dlkit/handcar/learning/sessions.py
ObjectiveRequisiteSession.is_objective_required
def is_objective_required(self, objective_id=None, required_objective_id=None): """Tests if an objective is required before proceeding with an objective. arg: objective_id (osid.id.Id): Id of the dependent Objective arg: required_objective_id (osid.id.Id): Id of the required ...
python
def is_objective_required(self, objective_id=None, required_objective_id=None): """Tests if an objective is required before proceeding with an objective. arg: objective_id (osid.id.Id): Id of the dependent Objective arg: required_objective_id (osid.id.Id): Id of the required ...
[ "def", "is_objective_required", "(", "self", ",", "objective_id", "=", "None", ",", "required_objective_id", "=", "None", ")", ":", "if", "objective_id", "is", "None", "or", "required_objective_id", "is", "None", ":", "raise", "NullArgument", "(", ")", "requisit...
Tests if an objective is required before proceeding with an objective. arg: objective_id (osid.id.Id): Id of the dependent Objective arg: required_objective_id (osid.id.Id): Id of the required Objective return: (boolean) - true if objective_id depends on ...
[ "Tests", "if", "an", "objective", "is", "required", "before", "proceeding", "with", "an", "objective", "." ]
train
https://github.com/mitsei/dlkit/blob/445f968a175d61c8d92c0f617a3c17dc1dc7c584/dlkit/handcar/learning/sessions.py#L2014-L2035
mitsei/dlkit
dlkit/handcar/learning/sessions.py
ObjectiveRequisiteAssignmentSession.can_assign_requisites
def can_assign_requisites(self): """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 ...
python
def can_assign_requisites(self): """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 ...
[ "def", "can_assign_requisites", "(", "self", ")", ":", "url_path", "=", "construct_url", "(", "'authorization'", ",", "bank_id", "=", "self", ".", "_catalog_idstr", ")", "return", "self", ".", "_get_request", "(", "url_path", ")", "[", "'objectiveRequisiteHints'",...
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...
[ "Tests", "if", "this", "user", "can", "manage", "objective", "requisites", "." ]
train
https://github.com/mitsei/dlkit/blob/445f968a175d61c8d92c0f617a3c17dc1dc7c584/dlkit/handcar/learning/sessions.py#L2120-L2136
mitsei/dlkit
dlkit/handcar/learning/sessions.py
ObjectiveRequisiteAssignmentSession.assign_objective_requisite
def assign_objective_requisite(self, objective_id=None, requisite_objective_id=None): """Creates a requirement dependency between two Objectives. arg: objective_id (osid.id.Id): the Id of the dependent Objective arg: requisite_objective_id (osid.id.Id): the Id of the ...
python
def assign_objective_requisite(self, objective_id=None, requisite_objective_id=None): """Creates a requirement dependency between two Objectives. arg: objective_id (osid.id.Id): the Id of the dependent Objective arg: requisite_objective_id (osid.id.Id): the Id of the ...
[ "def", "assign_objective_requisite", "(", "self", ",", "objective_id", "=", "None", ",", "requisite_objective_id", "=", "None", ")", ":", "if", "objective_id", "is", "None", "or", "requisite_objective_id", "is", "None", ":", "raise", "NullArgument", "(", ")", "o...
Creates a requirement dependency between two Objectives. arg: objective_id (osid.id.Id): the Id of the dependent Objective arg: requisite_objective_id (osid.id.Id): the Id of the required Objective raise: AlreadyExists - objective_id already mapped to ...
[ "Creates", "a", "requirement", "dependency", "between", "two", "Objectives", "." ]
train
https://github.com/mitsei/dlkit/blob/445f968a175d61c8d92c0f617a3c17dc1dc7c584/dlkit/handcar/learning/sessions.py#L2138-L2176
mitsei/dlkit
dlkit/handcar/learning/sessions.py
ObjectiveRequisiteAssignmentSession.assign_objective_requisites
def assign_objective_requisites(self, objective_id=None, requisite_objective_ids=None): """Creates a requirement dependency between Objective + a list of objectives. NON-standard method impl by cjshaw arg: objective_id (osid.id.Id): the Id of the dependent Objective a...
python
def assign_objective_requisites(self, objective_id=None, requisite_objective_ids=None): """Creates a requirement dependency between Objective + a list of objectives. NON-standard method impl by cjshaw arg: objective_id (osid.id.Id): the Id of the dependent Objective a...
[ "def", "assign_objective_requisites", "(", "self", ",", "objective_id", "=", "None", ",", "requisite_objective_ids", "=", "None", ")", ":", "if", "objective_id", "is", "None", "or", "requisite_objective_ids", "is", "None", ":", "raise", "NullArgument", "(", ")", ...
Creates a requirement dependency between Objective + a list of objectives. NON-standard method impl by cjshaw arg: objective_id (osid.id.Id): the Id of the dependent Objective arg: requisite_objective_id (osid.id.Id): the Id of the required Objective ...
[ "Creates", "a", "requirement", "dependency", "between", "Objective", "+", "a", "list", "of", "objectives", ".", "NON", "-", "standard", "method", "impl", "by", "cjshaw" ]
train
https://github.com/mitsei/dlkit/blob/445f968a175d61c8d92c0f617a3c17dc1dc7c584/dlkit/handcar/learning/sessions.py#L2178-L2212
mitsei/dlkit
dlkit/handcar/learning/sessions.py
ActivityLookupSession.can_lookup_activities
def can_lookup_activities(self): """Tests if this user can perform Activity lookups. A return of true does not guarantee successful authorization. A return of false indicates that it is known all methods in this session will result in a PermissionDenied. This is intended as a hin...
python
def can_lookup_activities(self): """Tests if this user can perform Activity lookups. A return of true does not guarantee successful authorization. A return of false indicates that it is known all methods in this session will result in a PermissionDenied. This is intended as a hin...
[ "def", "can_lookup_activities", "(", "self", ")", ":", "url_path", "=", "construct_url", "(", "'authorization'", ",", "bank_id", "=", "self", ".", "_catalog_idstr", ")", "return", "self", ".", "_get_request", "(", "url_path", ")", "[", "'activityHints'", "]", ...
Tests if this user can perform Activity lookups. A return of true does not guarantee successful authorization. A return of false indicates that it is known all methods in this session will result in a PermissionDenied. This is intended as a hint to an application that may opt not to offe...
[ "Tests", "if", "this", "user", "can", "perform", "Activity", "lookups", ".", "A", "return", "of", "true", "does", "not", "guarantee", "successful", "authorization", ".", "A", "return", "of", "false", "indicates", "that", "it", "is", "known", "all", "methods"...
train
https://github.com/mitsei/dlkit/blob/445f968a175d61c8d92c0f617a3c17dc1dc7c584/dlkit/handcar/learning/sessions.py#L2398-L2412
mitsei/dlkit
dlkit/handcar/learning/sessions.py
ActivityLookupSession.get_activity
def get_activity(self, activity_id=None): """Gets the Activity specified by its Id. In plenary mode, the exact Id is found or a NotFound results. Otherwise, the returned Activity may have a different Id than requested, such as the case where a duplicate Id was assigned to a Activ...
python
def get_activity(self, activity_id=None): """Gets the Activity specified by its Id. In plenary mode, the exact Id is found or a NotFound results. Otherwise, the returned Activity may have a different Id than requested, such as the case where a duplicate Id was assigned to a Activ...
[ "def", "get_activity", "(", "self", ",", "activity_id", "=", "None", ")", ":", "if", "activity_id", "is", "None", ":", "raise", "NullArgument", "(", ")", "url_path", "=", "construct_url", "(", "'activities'", ",", "bank_id", "=", "self", ".", "_catalog_idstr...
Gets the Activity specified by its Id. In plenary mode, the exact Id is found or a NotFound results. Otherwise, the returned Activity may have a different Id than requested, such as the case where a duplicate Id was assigned to a Activity and retained for compatibility. arg: a...
[ "Gets", "the", "Activity", "specified", "by", "its", "Id", ".", "In", "plenary", "mode", "the", "exact", "Id", "is", "found", "or", "a", "NotFound", "results", ".", "Otherwise", "the", "returned", "Activity", "may", "have", "a", "different", "Id", "than", ...
train
https://github.com/mitsei/dlkit/blob/445f968a175d61c8d92c0f617a3c17dc1dc7c584/dlkit/handcar/learning/sessions.py#L2453-L2473
mitsei/dlkit
dlkit/handcar/learning/sessions.py
ActivityLookupSession.get_activities_by_ids
def get_activities_by_ids(self, activity_ids=None): """Gets an ActivityList corresponding to the given IdList. In plenary mode, the returned list contains all of the activities specified in the Id list, in the order of the list, including duplicates, or an error results if an Id in the ...
python
def get_activities_by_ids(self, activity_ids=None): """Gets an ActivityList corresponding to the given IdList. In plenary mode, the returned list contains all of the activities specified in the Id list, in the order of the list, including duplicates, or an error results if an Id in the ...
[ "def", "get_activities_by_ids", "(", "self", ",", "activity_ids", "=", "None", ")", ":", "if", "activity_ids", "is", "None", ":", "raise", "NullArgument", "(", ")", "activities", "=", "[", "]", "for", "i", "in", "activity_ids", ":", "activity", "=", "None"...
Gets an ActivityList corresponding to the given IdList. In plenary mode, the returned list contains all of the activities 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 not found or inaccessible. Otherwise, ...
[ "Gets", "an", "ActivityList", "corresponding", "to", "the", "given", "IdList", ".", "In", "plenary", "mode", "the", "returned", "list", "contains", "all", "of", "the", "activities", "specified", "in", "the", "Id", "list", "in", "the", "order", "of", "the", ...
train
https://github.com/mitsei/dlkit/blob/445f968a175d61c8d92c0f617a3c17dc1dc7c584/dlkit/handcar/learning/sessions.py#L2475-L2514
mitsei/dlkit
dlkit/handcar/learning/sessions.py
ActivityLookupSession.get_activities_by_genus_type
def get_activities_by_genus_type(self, activity_genus_type=None): """Gets an ActivityList corresponding to the given activity genus Type which does not include activities of genus types derived from the specified Type. In plenary mode, the returned list contains all known activities ...
python
def get_activities_by_genus_type(self, activity_genus_type=None): """Gets an ActivityList corresponding to the given activity genus Type which does not include activities of genus types derived from the specified Type. In plenary mode, the returned list contains all known activities ...
[ "def", "get_activities_by_genus_type", "(", "self", ",", "activity_genus_type", "=", "None", ")", ":", "if", "activity_genus_type", "is", "None", ":", "raise", "NullArgument", "(", ")", "url_path", "=", "construct_url", "(", "'activities_by_genus'", ",", "bank_id", ...
Gets an ActivityList corresponding to the given activity genus Type which does not include activities of genus types derived from the specified Type. In plenary mode, the returned list contains all known activities or an error results. Otherwise, the returned list may contain onl...
[ "Gets", "an", "ActivityList", "corresponding", "to", "the", "given", "activity", "genus", "Type", "which", "does", "not", "include", "activities", "of", "genus", "types", "derived", "from", "the", "specified", "Type", ".", "In", "plenary", "mode", "the", "retu...
train
https://github.com/mitsei/dlkit/blob/445f968a175d61c8d92c0f617a3c17dc1dc7c584/dlkit/handcar/learning/sessions.py#L2516-L2538
mitsei/dlkit
dlkit/handcar/learning/sessions.py
ActivityLookupSession.get_activities_for_objective
def get_activities_for_objective(self, objective_id=None): """Gets the activities for the given objective. In plenary mode, the returned list contains all of the activities mapped to the objective Id or an error results if an Id in the supplied list is not found or inaccessible. Otherwis...
python
def get_activities_for_objective(self, objective_id=None): """Gets the activities for the given objective. In plenary mode, the returned list contains all of the activities mapped to the objective Id or an error results if an Id in the supplied list is not found or inaccessible. Otherwis...
[ "def", "get_activities_for_objective", "(", "self", ",", "objective_id", "=", "None", ")", ":", "if", "objective_id", "is", "None", ":", "raise", "NullArgument", "(", ")", "# Should also check if objective_id exists?", "url_path", "=", "construct_url", "(", "'activiti...
Gets the activities for the given objective. In plenary mode, the returned list contains all of the activities mapped to the objective Id or an error results if an Id in the supplied list is not found or inaccessible. Otherwise, inaccessible Activities may be omitted from the list and ma...
[ "Gets", "the", "activities", "for", "the", "given", "objective", ".", "In", "plenary", "mode", "the", "returned", "list", "contains", "all", "of", "the", "activities", "mapped", "to", "the", "objective", "Id", "or", "an", "error", "results", "if", "an", "I...
train
https://github.com/mitsei/dlkit/blob/445f968a175d61c8d92c0f617a3c17dc1dc7c584/dlkit/handcar/learning/sessions.py#L2576-L2599
mitsei/dlkit
dlkit/handcar/learning/sessions.py
ActivityLookupSession.get_activities_for_objectives
def get_activities_for_objectives(self, objective_ids=None): """Gets the activities for the given objectives. In plenary mode, the returned list contains all of the activities specified in the objective Id list, in the order of the list, including duplicates, or an error results if a cou...
python
def get_activities_for_objectives(self, objective_ids=None): """Gets the activities for the given objectives. In plenary mode, the returned list contains all of the activities specified in the objective Id list, in the order of the list, including duplicates, or an error results if a cou...
[ "def", "get_activities_for_objectives", "(", "self", ",", "objective_ids", "=", "None", ")", ":", "if", "objective_ids", "is", "None", ":", "raise", "NullArgument", "(", ")", "# Should also check if objective_id exists?", "activities", "=", "[", "]", "for", "i", "...
Gets the activities for the given objectives. In plenary mode, the returned list contains all of the activities specified in the objective Id list, in the order of the list, including duplicates, or an error results if a course offering Id in the supplied list is not found or inaccessibl...
[ "Gets", "the", "activities", "for", "the", "given", "objectives", ".", "In", "plenary", "mode", "the", "returned", "list", "contains", "all", "of", "the", "activities", "specified", "in", "the", "objective", "Id", "list", "in", "the", "order", "of", "the", ...
train
https://github.com/mitsei/dlkit/blob/445f968a175d61c8d92c0f617a3c17dc1dc7c584/dlkit/handcar/learning/sessions.py#L2601-L2637
mitsei/dlkit
dlkit/handcar/learning/sessions.py
ActivityLookupSession.get_activities
def get_activities(self): """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. return: (osid.learning.ActivityList) - a...
python
def get_activities(self): """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. return: (osid.learning.ActivityList) - a...
[ "def", "get_activities", "(", "self", ")", ":", "url_path", "=", "construct_url", "(", "'activities'", ",", "bank_id", "=", "self", ".", "_catalog_idstr", ")", "return", "objects", ".", "ActivityList", "(", "self", ".", "_get_request", "(", "url_path", ")", ...
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. return: (osid.learning.ActivityList) - a ActivityList raise: Operati...
[ "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",...
train
https://github.com/mitsei/dlkit/blob/445f968a175d61c8d92c0f617a3c17dc1dc7c584/dlkit/handcar/learning/sessions.py#L2677-L2690
mitsei/dlkit
dlkit/handcar/learning/sessions.py
ActivityQuerySession.get_activities_by_query
def get_activities_by_query(self, activity_query=None): """Gets a list of Activities matching the given activity query. arg: activityQuery (osid.learning.ActivityQuery): the activity query return: (osid.learning.ActivityList) - the returned ActivityList raise: NullAr...
python
def get_activities_by_query(self, activity_query=None): """Gets a list of Activities matching the given activity query. arg: activityQuery (osid.learning.ActivityQuery): the activity query return: (osid.learning.ActivityList) - the returned ActivityList raise: NullAr...
[ "def", "get_activities_by_query", "(", "self", ",", "activity_query", "=", "None", ")", ":", "url_path", "=", "construct_url", "(", "'activities'", ",", "bank_id", "=", "self", ".", "_catalog_idstr", ")", "query_terms", "=", "[", "v", "for", "k", ",", "v", ...
Gets a list of Activities matching the given activity query. arg: activityQuery (osid.learning.ActivityQuery): the activity query return: (osid.learning.ActivityList) - the returned ActivityList raise: NullArgument - activityQuery is null raise: OperationFailed - un...
[ "Gets", "a", "list", "of", "Activities", "matching", "the", "given", "activity", "query", "." ]
train
https://github.com/mitsei/dlkit/blob/445f968a175d61c8d92c0f617a3c17dc1dc7c584/dlkit/handcar/learning/sessions.py#L2795-L2812
mitsei/dlkit
dlkit/handcar/learning/sessions.py
ActivityAdminSession.can_create_activities
def can_create_activities(self): """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 an Activity will result in a PermissionDenied. This is intended as a hint to an applic...
python
def can_create_activities(self): """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 an Activity will result in a PermissionDenied. This is intended as a hint to an applic...
[ "def", "can_create_activities", "(", "self", ")", ":", "url_path", "=", "construct_url", "(", "'authorization'", ",", "bank_id", "=", "self", ".", "_catalog_idstr", ")", "return", "self", ".", "_get_request", "(", "url_path", ")", "[", "'activityHints'", "]", ...
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 an Activity will result in a PermissionDenied. This is intended as a hint to an application that may opt not to offer create opera...
[ "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", "an", "Activit...
train
https://github.com/mitsei/dlkit/blob/445f968a175d61c8d92c0f617a3c17dc1dc7c584/dlkit/handcar/learning/sessions.py#L2984-L2998
mitsei/dlkit
dlkit/handcar/learning/sessions.py
ActivityAdminSession.get_activity_form_for_create
def get_activity_form_for_create(self, objective_id=None, activity_record_types=None): """Gets the activity form for creating new activities. A new form should be requested for each create transaction. arg: activityRecordTypes (osid.type.Type): array of activity record types ...
python
def get_activity_form_for_create(self, objective_id=None, activity_record_types=None): """Gets the activity form for creating new activities. A new form should be requested for each create transaction. arg: activityRecordTypes (osid.type.Type): array of activity record types ...
[ "def", "get_activity_form_for_create", "(", "self", ",", "objective_id", "=", "None", ",", "activity_record_types", "=", "None", ")", ":", "if", "objective_id", "is", "None", ":", "raise", "NullArgument", "(", ")", "if", "activity_record_types", "is", "None", ":...
Gets the activity form for creating new activities. A new form should be requested for each create transaction. arg: activityRecordTypes (osid.type.Type): array of activity record types return: (osid.learning.ActivityForm) - the activity form raise: NotFound - objecti...
[ "Gets", "the", "activity", "form", "for", "creating", "new", "activities", ".", "A", "new", "form", "should", "be", "requested", "for", "each", "create", "transaction", ".", "arg", ":", "activityRecordTypes", "(", "osid", ".", "type", ".", "Type", ")", ":"...
train
https://github.com/mitsei/dlkit/blob/445f968a175d61c8d92c0f617a3c17dc1dc7c584/dlkit/handcar/learning/sessions.py#L3018-L3040
mitsei/dlkit
dlkit/handcar/learning/sessions.py
ActivityAdminSession.can_update_activities
def can_update_activities(self): """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 an Activity will result in a PermissionDenied. This is intended as a hint to an applic...
python
def can_update_activities(self): """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 an Activity will result in a PermissionDenied. This is intended as a hint to an applic...
[ "def", "can_update_activities", "(", "self", ")", ":", "url_path", "=", "construct_url", "(", "'authorization'", ",", "bank_id", "=", "self", ".", "_catalog_idstr", ")", "return", "self", ".", "_get_request", "(", "url_path", ")", "[", "'activityHints'", "]", ...
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 an Activity will result in a PermissionDenied. This is intended as a hint to an application that may opt not to offer update opera...
[ "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", "an", "Activit...
train
https://github.com/mitsei/dlkit/blob/445f968a175d61c8d92c0f617a3c17dc1dc7c584/dlkit/handcar/learning/sessions.py#L3082-L3096
mitsei/dlkit
dlkit/handcar/learning/sessions.py
ActivityAdminSession.get_activity_form_for_update
def get_activity_form_for_update(self, activity_id=None): """Gets the activity form for updating an existing activity. A new activity form should be requested for each update transaction. arg: activityId (osid.id.Id): the Id of the Activity return: (osid.learning.ActivityForm)...
python
def get_activity_form_for_update(self, activity_id=None): """Gets the activity form for updating an existing activity. A new activity form should be requested for each update transaction. arg: activityId (osid.id.Id): the Id of the Activity return: (osid.learning.ActivityForm)...
[ "def", "get_activity_form_for_update", "(", "self", ",", "activity_id", "=", "None", ")", ":", "if", "activity_id", "is", "None", ":", "raise", "NullArgument", "(", ")", "try", ":", "url_path", "=", "construct_url", "(", "'activities'", ",", "bank_id", "=", ...
Gets the activity form for updating an existing activity. A new activity form should be requested for each update transaction. arg: activityId (osid.id.Id): the Id of the Activity return: (osid.learning.ActivityForm) - the activity form raise: NotFound - activityId is not fou...
[ "Gets", "the", "activity", "form", "for", "updating", "an", "existing", "activity", ".", "A", "new", "activity", "form", "should", "be", "requested", "for", "each", "update", "transaction", ".", "arg", ":", "activityId", "(", "osid", ".", "id", ".", "Id", ...
train
https://github.com/mitsei/dlkit/blob/445f968a175d61c8d92c0f617a3c17dc1dc7c584/dlkit/handcar/learning/sessions.py#L3098-L3122
mitsei/dlkit
dlkit/handcar/learning/sessions.py
ActivityAdminSession.update_activity
def update_activity(self, activity_form=None): """Updates an existing activity,. arg: activityForm (osid.learning.ActivityForm): the form containing the elements to be updated raise: IllegalState - activityForm already used in an update transaction ra...
python
def update_activity(self, activity_form=None): """Updates an existing activity,. arg: activityForm (osid.learning.ActivityForm): the form containing the elements to be updated raise: IllegalState - activityForm already used in an update transaction ra...
[ "def", "update_activity", "(", "self", ",", "activity_form", "=", "None", ")", ":", "if", "activity_form", "is", "None", ":", "raise", "NullArgument", "(", ")", "if", "not", "isinstance", "(", "activity_form", ",", "abc_learning_objects", ".", "ActivityForm", ...
Updates an existing activity,. arg: activityForm (osid.learning.ActivityForm): the form containing the elements to be updated raise: IllegalState - activityForm already used in an update transaction raise: InvalidArgument - the form contains an invalid value...
[ "Updates", "an", "existing", "activity", "." ]
train
https://github.com/mitsei/dlkit/blob/445f968a175d61c8d92c0f617a3c17dc1dc7c584/dlkit/handcar/learning/sessions.py#L3124-L3161
mitsei/dlkit
dlkit/handcar/learning/sessions.py
ActivityAdminSession.can_delete_activities
def can_delete_activities(self): """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 an Activity will result in a PermissionDenied. This is intended as a hint to an applic...
python
def can_delete_activities(self): """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 an Activity will result in a PermissionDenied. This is intended as a hint to an applic...
[ "def", "can_delete_activities", "(", "self", ")", ":", "url_path", "=", "construct_url", "(", "'authorization'", ",", "bank_id", "=", "self", ".", "_catalog_idstr", ")", "return", "self", ".", "_get_request", "(", "url_path", ")", "[", "'activityHints'", "]", ...
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 an Activity will result in a PermissionDenied. This is intended as a hint to an application that may opt not to offer delete opera...
[ "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", "an", "Activit...
train
https://github.com/mitsei/dlkit/blob/445f968a175d61c8d92c0f617a3c17dc1dc7c584/dlkit/handcar/learning/sessions.py#L3163-L3177
mitsei/dlkit
dlkit/handcar/learning/sessions.py
ActivityAdminSession.delete_activity
def delete_activity(self, activity_id=None): """Deletes the Activity identified by the given Id. arg: activityId (osid.id.Id): the Id of the Activity to delete raise: NotFound - an Activity was not found identified by the given Id raise: NullArgument...
python
def delete_activity(self, activity_id=None): """Deletes the Activity identified by the given Id. arg: activityId (osid.id.Id): the Id of the Activity to delete raise: NotFound - an Activity was not found identified by the given Id raise: NullArgument...
[ "def", "delete_activity", "(", "self", ",", "activity_id", "=", "None", ")", ":", "if", "activity_id", "is", "None", ":", "raise", "NullArgument", "(", ")", "if", "not", "isinstance", "(", "activity_id", ",", "Id", ")", ":", "raise", "InvalidArgument", "("...
Deletes the Activity identified by the given Id. arg: activityId (osid.id.Id): the Id of the Activity to delete raise: NotFound - an Activity was not found identified by the given Id raise: NullArgument - activityId is null raise: OperationFailed - ...
[ "Deletes", "the", "Activity", "identified", "by", "the", "given", "Id", "." ]
train
https://github.com/mitsei/dlkit/blob/445f968a175d61c8d92c0f617a3c17dc1dc7c584/dlkit/handcar/learning/sessions.py#L3179-L3201
mitsei/dlkit
dlkit/handcar/learning/sessions.py
ObjectiveBankLookupSession.can_lookup_objective_banks
def can_lookup_objective_banks(self): """Tests if this user can perform ObjectiveBank lookups. A return of true does not guarantee successful authorization. A return of false indicates that it is known all methods in this session will result in a PermissionDenied. This is intended as ...
python
def can_lookup_objective_banks(self): """Tests if this user can perform ObjectiveBank lookups. A return of true does not guarantee successful authorization. A return of false indicates that it is known all methods in this session will result in a PermissionDenied. This is intended as ...
[ "def", "can_lookup_objective_banks", "(", "self", ")", ":", "# need to use a default bank_id here...not ideal.", "url_path", "=", "construct_url", "(", "'authorization'", ",", "bank_id", "=", "self", ".", "_default_bank_id", ")", "return", "self", ".", "_get_request", "...
Tests if this user can perform ObjectiveBank lookups. A return of true does not guarantee successful authorization. A return of false indicates that it is known all methods in this session will result in a PermissionDenied. This is intended as a hint to an application that may opt not to...
[ "Tests", "if", "this", "user", "can", "perform", "ObjectiveBank", "lookups", ".", "A", "return", "of", "true", "does", "not", "guarantee", "successful", "authorization", ".", "A", "return", "of", "false", "indicates", "that", "it", "is", "known", "all", "met...
train
https://github.com/mitsei/dlkit/blob/445f968a175d61c8d92c0f617a3c17dc1dc7c584/dlkit/handcar/learning/sessions.py#L3277-L3292
mitsei/dlkit
dlkit/handcar/learning/sessions.py
ObjectiveBankLookupSession.get_objective_bank
def get_objective_bank(self, objective_bank_id=None): """Gets the ObjectiveBank specified by its Id. In plenary mode, the exact Id is found or a NotFound results. Otherwise, the returned ObjectiveBank may have a different Id than requested, such as the case where a duplicate Id was ...
python
def get_objective_bank(self, objective_bank_id=None): """Gets the ObjectiveBank specified by its Id. In plenary mode, the exact Id is found or a NotFound results. Otherwise, the returned ObjectiveBank may have a different Id than requested, such as the case where a duplicate Id was ...
[ "def", "get_objective_bank", "(", "self", ",", "objective_bank_id", "=", "None", ")", ":", "if", "objective_bank_id", "is", "None", ":", "raise", "NullArgument", "(", ")", "url_path", "=", "construct_url", "(", "'objective_banks'", ",", "bank_id", "=", "objectiv...
Gets the ObjectiveBank specified by its Id. In plenary mode, the exact Id is found or a NotFound results. Otherwise, the returned ObjectiveBank may have a different Id than requested, such as the case where a duplicate Id was assigned to a ObjectiveBank and retained for compatility. ...
[ "Gets", "the", "ObjectiveBank", "specified", "by", "its", "Id", ".", "In", "plenary", "mode", "the", "exact", "Id", "is", "found", "or", "a", "NotFound", "results", ".", "Otherwise", "the", "returned", "ObjectiveBank", "may", "have", "a", "different", "Id", ...
train
https://github.com/mitsei/dlkit/blob/445f968a175d61c8d92c0f617a3c17dc1dc7c584/dlkit/handcar/learning/sessions.py#L3315-L3334
mitsei/dlkit
dlkit/handcar/learning/sessions.py
ObjectiveBankLookupSession.get_objective_banks_by_ids
def get_objective_banks_by_ids(self, objective_bank_ids=None): """Gets a ObjectiveBankList corresponding to the given IdList. In plenary mode, the returned list contains all of the objective banks specified in the Id list, in the order of the list, including duplicates, or an error resul...
python
def get_objective_banks_by_ids(self, objective_bank_ids=None): """Gets a ObjectiveBankList corresponding to the given IdList. In plenary mode, the returned list contains all of the objective banks specified in the Id list, in the order of the list, including duplicates, or an error resul...
[ "def", "get_objective_banks_by_ids", "(", "self", ",", "objective_bank_ids", "=", "None", ")", ":", "if", "objective_bank_ids", "is", "None", ":", "raise", "NullArgument", "(", ")", "banks", "=", "[", "]", "# The following runs really slow. Perhaps get all banks and the...
Gets a ObjectiveBankList corresponding to the given IdList. In plenary mode, the returned list contains all of the objective banks 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 not found or inaccessible. Oth...
[ "Gets", "a", "ObjectiveBankList", "corresponding", "to", "the", "given", "IdList", ".", "In", "plenary", "mode", "the", "returned", "list", "contains", "all", "of", "the", "objective", "banks", "specified", "in", "the", "Id", "list", "in", "the", "order", "o...
train
https://github.com/mitsei/dlkit/blob/445f968a175d61c8d92c0f617a3c17dc1dc7c584/dlkit/handcar/learning/sessions.py#L3336-L3375
mitsei/dlkit
dlkit/handcar/learning/sessions.py
ObjectiveBankLookupSession.get_objective_banks_by_genus_type
def get_objective_banks_by_genus_type(self, objective_bank_genus_type=None): """Gets a ObjectiveBankList corresponding to the given objective bank genus Type which does not include objective banks of types derived from the specified Type. In plenary mode, the returned list contains all k...
python
def get_objective_banks_by_genus_type(self, objective_bank_genus_type=None): """Gets a ObjectiveBankList corresponding to the given objective bank genus Type which does not include objective banks of types derived from the specified Type. In plenary mode, the returned list contains all k...
[ "def", "get_objective_banks_by_genus_type", "(", "self", ",", "objective_bank_genus_type", "=", "None", ")", ":", "if", "objective_bank_genus_type", "is", "None", ":", "raise", "NullArgument", "(", ")", "url_path", "=", "construct_url", "(", "'objective_banks_by_genus'"...
Gets a ObjectiveBankList corresponding to the given objective bank genus Type which does not include objective banks of types derived from the specified Type. In plenary mode, the returned list contains all known objective banks or an error results. Otherwise, the returned list may ...
[ "Gets", "a", "ObjectiveBankList", "corresponding", "to", "the", "given", "objective", "bank", "genus", "Type", "which", "does", "not", "include", "objective", "banks", "of", "types", "derived", "from", "the", "specified", "Type", ".", "In", "plenary", "mode", ...
train
https://github.com/mitsei/dlkit/blob/445f968a175d61c8d92c0f617a3c17dc1dc7c584/dlkit/handcar/learning/sessions.py#L3377-L3399
mitsei/dlkit
dlkit/handcar/learning/sessions.py
ObjectiveBankAdminSession._record_extension
def _record_extension(self, bank_id, key, value): """ To structure a record extension property bean """ record_bean = { 'value': value, 'displayName': self._text_bean(key), 'description': self._text_bean(key), 'displayLabel': self._text_bea...
python
def _record_extension(self, bank_id, key, value): """ To structure a record extension property bean """ record_bean = { 'value': value, 'displayName': self._text_bean(key), 'description': self._text_bean(key), 'displayLabel': self._text_bea...
[ "def", "_record_extension", "(", "self", ",", "bank_id", ",", "key", ",", "value", ")", ":", "record_bean", "=", "{", "'value'", ":", "value", ",", "'displayName'", ":", "self", ".", "_text_bean", "(", "key", ")", ",", "'description'", ":", "self", ".", ...
To structure a record extension property bean
[ "To", "structure", "a", "record", "extension", "property", "bean" ]
train
https://github.com/mitsei/dlkit/blob/445f968a175d61c8d92c0f617a3c17dc1dc7c584/dlkit/handcar/learning/sessions.py#L3667-L3678
mitsei/dlkit
dlkit/handcar/learning/sessions.py
ObjectiveBankAdminSession.get_objective_bank_form_for_create
def get_objective_bank_form_for_create(self, objective_bank_record_types=None): """Gets the objective bank form for creating new objective banks. A new form should be requested for each create transaction. arg: objectiveBankRecordTypes (osid.type.Type): array of objective bank...
python
def get_objective_bank_form_for_create(self, objective_bank_record_types=None): """Gets the objective bank form for creating new objective banks. A new form should be requested for each create transaction. arg: objectiveBankRecordTypes (osid.type.Type): array of objective bank...
[ "def", "get_objective_bank_form_for_create", "(", "self", ",", "objective_bank_record_types", "=", "None", ")", ":", "if", "objective_bank_record_types", "is", "None", ":", "pass", "# Still need to deal with the record_types argument", "objective_bank_form", "=", "objects", "...
Gets the objective bank form for creating new objective banks. A new form should be requested for each create transaction. arg: objectiveBankRecordTypes (osid.type.Type): array of objective bank record types return: (osid.learning.ObjectiveBankForm) - the objective bank ...
[ "Gets", "the", "objective", "bank", "form", "for", "creating", "new", "objective", "banks", ".", "A", "new", "form", "should", "be", "requested", "for", "each", "create", "transaction", ".", "arg", ":", "objectiveBankRecordTypes", "(", "osid", ".", "type", "...
train
https://github.com/mitsei/dlkit/blob/445f968a175d61c8d92c0f617a3c17dc1dc7c584/dlkit/handcar/learning/sessions.py#L3754-L3773
mitsei/dlkit
dlkit/handcar/learning/sessions.py
ObjectiveBankAdminSession.create_objective_bank
def create_objective_bank(self, objective_bank_form=None): """Creates a new ObjectiveBank. arg: objectiveBankForm (osid.learning.ObjectiveBankForm): the form for this ObjectiveBank return: (osid.learning.ObjectiveBankForm) - the new ObjectiveBank raise...
python
def create_objective_bank(self, objective_bank_form=None): """Creates a new ObjectiveBank. arg: objectiveBankForm (osid.learning.ObjectiveBankForm): the form for this ObjectiveBank return: (osid.learning.ObjectiveBankForm) - the new ObjectiveBank raise...
[ "def", "create_objective_bank", "(", "self", ",", "objective_bank_form", "=", "None", ")", ":", "if", "objective_bank_form", "is", "None", ":", "raise", "NullArgument", "(", ")", "if", "not", "isinstance", "(", "objective_bank_form", ",", "abc_learning_objects", "...
Creates a new ObjectiveBank. arg: objectiveBankForm (osid.learning.ObjectiveBankForm): the form for this ObjectiveBank return: (osid.learning.ObjectiveBankForm) - the new ObjectiveBank raise: IllegalState - objectiveBankForm already used in a ...
[ "Creates", "a", "new", "ObjectiveBank", "." ]
train
https://github.com/mitsei/dlkit/blob/445f968a175d61c8d92c0f617a3c17dc1dc7c584/dlkit/handcar/learning/sessions.py#L3775-L3819
mitsei/dlkit
dlkit/handcar/learning/sessions.py
ObjectiveBankAdminSession.can_update_objective_banks
def can_update_objective_banks(self, objective_bank_id=None): # This should not have objective_bank_id argument! """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 an Object...
python
def can_update_objective_banks(self, objective_bank_id=None): # This should not have objective_bank_id argument! """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 an Object...
[ "def", "can_update_objective_banks", "(", "self", ",", "objective_bank_id", "=", "None", ")", ":", "# This should not have objective_bank_id argument!", "if", "not", "objective_bank_id", ":", "url_path", "=", "construct_url", "(", "'authorization'", ")", "else", ":", "u...
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 an ObjectiveBank will result in a PermissionDenied. This is intended as a hint to an application that may not wish to offer ...
[ "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", "an", "Obj...
train
https://github.com/mitsei/dlkit/blob/445f968a175d61c8d92c0f617a3c17dc1dc7c584/dlkit/handcar/learning/sessions.py#L3821-L3838
mitsei/dlkit
dlkit/handcar/learning/sessions.py
ObjectiveBankAdminSession.get_objective_bank_form_for_update
def get_objective_bank_form_for_update(self, objective_bank_id=None): """Gets the objective bank form for updating an existing objective bank. A new objective bank form should be requested for each update transaction. arg: objectiveBankId (osid.id.Id): the Id of the ...
python
def get_objective_bank_form_for_update(self, objective_bank_id=None): """Gets the objective bank form for updating an existing objective bank. A new objective bank form should be requested for each update transaction. arg: objectiveBankId (osid.id.Id): the Id of the ...
[ "def", "get_objective_bank_form_for_update", "(", "self", ",", "objective_bank_id", "=", "None", ")", ":", "if", "objective_bank_id", "is", "None", ":", "raise", "NullArgument", "(", ")", "try", ":", "url_path", "=", "construct_url", "(", "'objective_banks'", ",",...
Gets the objective bank form for updating an existing objective bank. A new objective bank form should be requested for each update transaction. arg: objectiveBankId (osid.id.Id): the Id of the ObjectiveBank return: (osid.learning.ObjectiveBankForm) - the objec...
[ "Gets", "the", "objective", "bank", "form", "for", "updating", "an", "existing", "objective", "bank", ".", "A", "new", "objective", "bank", "form", "should", "be", "requested", "for", "each", "update", "transaction", ".", "arg", ":", "objectiveBankId", "(", ...
train
https://github.com/mitsei/dlkit/blob/445f968a175d61c8d92c0f617a3c17dc1dc7c584/dlkit/handcar/learning/sessions.py#L3840-L3866
mitsei/dlkit
dlkit/handcar/learning/sessions.py
ObjectiveBankAdminSession.get_objective_bank_record_types
def get_objective_bank_record_types(self): """Gets the objective bank types available in Handcar. arg: None return: (osid.type.TypeList) - list of objective bank types raise: NotFound - objectiveBankTypes is not found raise: OperationFailed - unable to complete request ...
python
def get_objective_bank_record_types(self): """Gets the objective bank types available in Handcar. arg: None return: (osid.type.TypeList) - list of objective bank types raise: NotFound - objectiveBankTypes is not found raise: OperationFailed - unable to complete request ...
[ "def", "get_objective_bank_record_types", "(", "self", ")", ":", "try", ":", "url_path", "=", "construct_url", "(", "'objective_bank_types'", ")", "objective_bank_types", "=", "typeObjects", ".", "TypeList", "(", "self", ".", "_get_request", "(", "url_path", ")", ...
Gets the objective bank types available in Handcar. arg: None return: (osid.type.TypeList) - list of objective bank types raise: NotFound - objectiveBankTypes is not found raise: OperationFailed - unable to complete request raise: PermissionDenied - authorization failure ...
[ "Gets", "the", "objective", "bank", "types", "available", "in", "Handcar", ".", "arg", ":", "None", "return", ":", "(", "osid", ".", "type", ".", "TypeList", ")", "-", "list", "of", "objective", "bank", "types", "raise", ":", "NotFound", "-", "objectiveB...
train
https://github.com/mitsei/dlkit/blob/445f968a175d61c8d92c0f617a3c17dc1dc7c584/dlkit/handcar/learning/sessions.py#L3868-L3883
mitsei/dlkit
dlkit/handcar/learning/sessions.py
ObjectiveBankAdminSession.update_objective_bank
def update_objective_bank(self, objective_bank_form=None): """Updates an existing objective bank. arg: objectiveBankForm (osid.learning.ObjectiveBankForm): the form containing the elements to be updated raise: IllegalState - objectiveBankForm already used in an ...
python
def update_objective_bank(self, objective_bank_form=None): """Updates an existing objective bank. arg: objectiveBankForm (osid.learning.ObjectiveBankForm): the form containing the elements to be updated raise: IllegalState - objectiveBankForm already used in an ...
[ "def", "update_objective_bank", "(", "self", ",", "objective_bank_form", "=", "None", ")", ":", "if", "objective_bank_form", "is", "None", ":", "raise", "NullArgument", "(", ")", "if", "not", "isinstance", "(", "objective_bank_form", ",", "abc_learning_objects", "...
Updates an existing objective bank. arg: objectiveBankForm (osid.learning.ObjectiveBankForm): the form containing the elements to be updated raise: IllegalState - objectiveBankForm already used in an update transaction raise: InvalidArgument - the form conta...
[ "Updates", "an", "existing", "objective", "bank", "." ]
train
https://github.com/mitsei/dlkit/blob/445f968a175d61c8d92c0f617a3c17dc1dc7c584/dlkit/handcar/learning/sessions.py#L3885-L3926
mitsei/dlkit
dlkit/handcar/learning/sessions.py
ObjectiveBankAdminSession.can_delete_objective_banks
def can_delete_objective_banks(self, objective_bank_id=None): # This should not have objective_bank_id argument! """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 Objec...
python
def can_delete_objective_banks(self, objective_bank_id=None): # This should not have objective_bank_id argument! """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 Objec...
[ "def", "can_delete_objective_banks", "(", "self", ",", "objective_bank_id", "=", "None", ")", ":", "# This should not have objective_bank_id argument!", "if", "not", "objective_bank_id", ":", "url_path", "=", "construct_url", "(", "'authorization'", ")", "else", ":", "u...
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 ObjectiveBank will result in a PermissionDenied. This is intended as a hint to an application that may not wish to offer ...
[ "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", ...
train
https://github.com/mitsei/dlkit/blob/445f968a175d61c8d92c0f617a3c17dc1dc7c584/dlkit/handcar/learning/sessions.py#L3928-L3945
mitsei/dlkit
dlkit/handcar/learning/sessions.py
ObjectiveBankAdminSession.delete_objective_bank
def delete_objective_bank(self, objective_bank_id=None): """Deletes an ObjectiveBank. arg: objectiveBankId (osid.id.Id): the Id of the ObjectiveBank to remove raise: NotFound - objectiveBankId not found raise: NullArgument - objectiveBankId is null raise: O...
python
def delete_objective_bank(self, objective_bank_id=None): """Deletes an ObjectiveBank. arg: objectiveBankId (osid.id.Id): the Id of the ObjectiveBank to remove raise: NotFound - objectiveBankId not found raise: NullArgument - objectiveBankId is null raise: O...
[ "def", "delete_objective_bank", "(", "self", ",", "objective_bank_id", "=", "None", ")", ":", "from", "dlkit", ".", "abstract_osid", ".", "id", ".", "primitives", "import", "Id", "as", "ABCId", "if", "objective_bank_id", "is", "None", ":", "raise", "NullArgume...
Deletes an ObjectiveBank. arg: objectiveBankId (osid.id.Id): the Id of the ObjectiveBank to remove raise: NotFound - objectiveBankId not found raise: NullArgument - objectiveBankId is null raise: OperationFailed - unable to complete request raise: Permissi...
[ "Deletes", "an", "ObjectiveBank", "." ]
train
https://github.com/mitsei/dlkit/blob/445f968a175d61c8d92c0f617a3c17dc1dc7c584/dlkit/handcar/learning/sessions.py#L3947-L3977
mitsei/dlkit
dlkit/handcar/learning/sessions.py
ObjectiveBankHierarchySession.get_root_objective_bank_ids
def get_root_objective_bank_ids(self, alias): """Gets the root objective bank Ids in this hierarchy. return: (osid.id.IdList) - the root objective bank Ids raise: OperationFailed - unable to complete request raise: PermissionDenied - authorization failure compliance: mandatory...
python
def get_root_objective_bank_ids(self, alias): """Gets the root objective bank Ids in this hierarchy. return: (osid.id.IdList) - the root objective bank Ids raise: OperationFailed - unable to complete request raise: PermissionDenied - authorization failure compliance: mandatory...
[ "def", "get_root_objective_bank_ids", "(", "self", ",", "alias", ")", ":", "url_path", "=", "self", ".", "_urls", ".", "roots", "(", "alias", ")", "return", "self", ".", "_get_request", "(", "url_path", ")" ]
Gets the root objective bank Ids in this hierarchy. return: (osid.id.IdList) - the root objective bank Ids raise: OperationFailed - unable to complete request raise: PermissionDenied - authorization failure compliance: mandatory - This method must be implemented.
[ "Gets", "the", "root", "objective", "bank", "Ids", "in", "this", "hierarchy", "." ]
train
https://github.com/mitsei/dlkit/blob/445f968a175d61c8d92c0f617a3c17dc1dc7c584/dlkit/handcar/learning/sessions.py#L4264-L4274
mitsei/dlkit
dlkit/handcar/learning/sessions.py
ObjectiveBankHierarchySession.get_objective_bank_nodes
def get_objective_bank_nodes(self, objective_bank_id=None, ancestor_levels=None, descendant_levels=None, include_siblings=None): """Gets a portion of the hierarchy for the given ob...
python
def get_objective_bank_nodes(self, objective_bank_id=None, ancestor_levels=None, descendant_levels=None, include_siblings=None): """Gets a portion of the hierarchy for the given ob...
[ "def", "get_objective_bank_nodes", "(", "self", ",", "objective_bank_id", "=", "None", ",", "ancestor_levels", "=", "None", ",", "descendant_levels", "=", "None", ",", "include_siblings", "=", "None", ")", ":", "if", "descendant_levels", ":", "url_path", "=", "s...
Gets a portion of the hierarchy for the given objective bank. arg: includeSiblings (boolean): true to include the siblings of the given node, false to omit the siblings return: (osid.learning.ObjectiveBankNode) - an objective bank node raise: NotFound - objec...
[ "Gets", "a", "portion", "of", "the", "hierarchy", "for", "the", "given", "objective", "bank", "." ]
train
https://github.com/mitsei/dlkit/blob/445f968a175d61c8d92c0f617a3c17dc1dc7c584/dlkit/handcar/learning/sessions.py#L4467-L4489
mitsei/dlkit
dlkit/handcar/learning/sessions.py
ObjectiveBankHierarchyDesignSession.create_objective_bank_hierarchy
def create_objective_bank_hierarchy(self, alias, desc, genus): """ Create a bank hierarchy with the given alias :param alias: :return: """ url_path = self._urls.hierarchy() data = { 'id': re.sub(r'[ ]', '', alias.lower()), 'displayName': { ...
python
def create_objective_bank_hierarchy(self, alias, desc, genus): """ Create a bank hierarchy with the given alias :param alias: :return: """ url_path = self._urls.hierarchy() data = { 'id': re.sub(r'[ ]', '', alias.lower()), 'displayName': { ...
[ "def", "create_objective_bank_hierarchy", "(", "self", ",", "alias", ",", "desc", ",", "genus", ")", ":", "url_path", "=", "self", ".", "_urls", ".", "hierarchy", "(", ")", "data", "=", "{", "'id'", ":", "re", ".", "sub", "(", "r'[ ]'", ",", "''", ",...
Create a bank hierarchy with the given alias :param alias: :return:
[ "Create", "a", "bank", "hierarchy", "with", "the", "given", "alias", ":", "param", "alias", ":", ":", "return", ":" ]
train
https://github.com/mitsei/dlkit/blob/445f968a175d61c8d92c0f617a3c17dc1dc7c584/dlkit/handcar/learning/sessions.py#L4512-L4529
mitsei/dlkit
dlkit/handcar/learning/sessions.py
ObjectiveBankHierarchyDesignSession.delete_objective_bank_hierarchy
def delete_objective_bank_hierarchy(self, alias): """ Delete this bank hierarchy :param alias: :return: """ url_path = self._urls.hierarchy(alias) return self._delete_request(url_path)
python
def delete_objective_bank_hierarchy(self, alias): """ Delete this bank hierarchy :param alias: :return: """ url_path = self._urls.hierarchy(alias) return self._delete_request(url_path)
[ "def", "delete_objective_bank_hierarchy", "(", "self", ",", "alias", ")", ":", "url_path", "=", "self", ".", "_urls", ".", "hierarchy", "(", "alias", ")", "return", "self", ".", "_delete_request", "(", "url_path", ")" ]
Delete this bank hierarchy :param alias: :return:
[ "Delete", "this", "bank", "hierarchy", ":", "param", "alias", ":", ":", "return", ":" ]
train
https://github.com/mitsei/dlkit/blob/445f968a175d61c8d92c0f617a3c17dc1dc7c584/dlkit/handcar/learning/sessions.py#L4531-L4538
mitsei/dlkit
dlkit/handcar/learning/sessions.py
ObjectiveBankHierarchyDesignSession.get_objective_bank_hierarchy
def get_objective_bank_hierarchy(self, alias): """Gets the hierarchy associated with this session. return: (osid.hierarchy.Hierarchy) - the hierarchy associated with this session raise: OperationFailed - unable to complete request raise: PermissionDenied - authorizatio...
python
def get_objective_bank_hierarchy(self, alias): """Gets the hierarchy associated with this session. return: (osid.hierarchy.Hierarchy) - the hierarchy associated with this session raise: OperationFailed - unable to complete request raise: PermissionDenied - authorizatio...
[ "def", "get_objective_bank_hierarchy", "(", "self", ",", "alias", ")", ":", "url_path", "=", "self", ".", "_urls", ".", "hierarchy", "(", "re", ".", "sub", "(", "r'[ ]'", ",", "''", ",", "alias", ".", "lower", "(", ")", ")", ")", "return", "self", "....
Gets the hierarchy associated with this session. return: (osid.hierarchy.Hierarchy) - the hierarchy associated with this session raise: OperationFailed - unable to complete request raise: PermissionDenied - authorization failure *compliance: mandatory -- This method mu...
[ "Gets", "the", "hierarchy", "associated", "with", "this", "session", "." ]
train
https://github.com/mitsei/dlkit/blob/445f968a175d61c8d92c0f617a3c17dc1dc7c584/dlkit/handcar/learning/sessions.py#L4552-L4563
mitsei/dlkit
dlkit/handcar/learning/sessions.py
ObjectiveBankHierarchyDesignSession.add_root_objective_bank
def add_root_objective_bank(self, alias=None, objective_bank_id=None): """Adds a root objective bank. arg: objective_bank_id (osid.id.Id): the ``Id`` of an objective bank raise: AlreadyExists - ``objective_bank_id`` is already in hierarchy raise: Not...
python
def add_root_objective_bank(self, alias=None, objective_bank_id=None): """Adds a root objective bank. arg: objective_bank_id (osid.id.Id): the ``Id`` of an objective bank raise: AlreadyExists - ``objective_bank_id`` is already in hierarchy raise: Not...
[ "def", "add_root_objective_bank", "(", "self", ",", "alias", "=", "None", ",", "objective_bank_id", "=", "None", ")", ":", "url_path", "=", "self", ".", "_urls", ".", "roots", "(", "alias", "=", "alias", ")", "current_root_ids", "=", "self", ".", "_get_req...
Adds a root objective bank. arg: objective_bank_id (osid.id.Id): the ``Id`` of an objective bank raise: AlreadyExists - ``objective_bank_id`` is already in hierarchy raise: NotFound - ``objective_bank_id`` not found raise: NullArgument - ``objective...
[ "Adds", "a", "root", "objective", "bank", "." ]
train
https://github.com/mitsei/dlkit/blob/445f968a175d61c8d92c0f617a3c17dc1dc7c584/dlkit/handcar/learning/sessions.py#L4583-L4603
mitsei/dlkit
dlkit/handcar/learning/sessions.py
ObjectiveBankHierarchyDesignSession.remove_root_objective_bank
def remove_root_objective_bank(self, alias=None, objective_bank_id=None): """Removes a root objective bank. arg: objective_bank_id (osid.id.Id): the ``Id`` of an objective bank raise: NotFound - ``objective_bank_id`` is not a root raise: NullArgument - ``objective_b...
python
def remove_root_objective_bank(self, alias=None, objective_bank_id=None): """Removes a root objective bank. arg: objective_bank_id (osid.id.Id): the ``Id`` of an objective bank raise: NotFound - ``objective_bank_id`` is not a root raise: NullArgument - ``objective_b...
[ "def", "remove_root_objective_bank", "(", "self", ",", "alias", "=", "None", ",", "objective_bank_id", "=", "None", ")", ":", "url_path", "=", "self", ".", "_urls", ".", "roots", "(", "alias", "=", "alias", ")", "current_root_ids", "=", "self", ".", "_get_...
Removes a root objective bank. arg: objective_bank_id (osid.id.Id): the ``Id`` of an objective bank raise: NotFound - ``objective_bank_id`` is not a root raise: NullArgument - ``objective_bank_id`` is ``null`` raise: OperationFailed - unable to complete request ...
[ "Removes", "a", "root", "objective", "bank", "." ]
train
https://github.com/mitsei/dlkit/blob/445f968a175d61c8d92c0f617a3c17dc1dc7c584/dlkit/handcar/learning/sessions.py#L4605-L4626
mitsei/dlkit
dlkit/handcar/learning/sessions.py
ObjectiveBankHierarchyDesignSession.add_child_objective_bank
def add_child_objective_bank(self, objective_bank_id=None, parent_id=None, child_id=None): """Adds a child to an objective bank. arg: objective_bank_id (osid.id.Id): the ``Id`` of an objective bank arg: child_id (osid.id.Id): the ``Id`` of the new child raise: Alr...
python
def add_child_objective_bank(self, objective_bank_id=None, parent_id=None, child_id=None): """Adds a child to an objective bank. arg: objective_bank_id (osid.id.Id): the ``Id`` of an objective bank arg: child_id (osid.id.Id): the ``Id`` of the new child raise: Alr...
[ "def", "add_child_objective_bank", "(", "self", ",", "objective_bank_id", "=", "None", ",", "parent_id", "=", "None", ",", "child_id", "=", "None", ")", ":", "url_path", "=", "self", ".", "_urls", ".", "children", "(", "alias", "=", "objective_bank_id", ",",...
Adds a child to an objective bank. arg: objective_bank_id (osid.id.Id): the ``Id`` of an objective bank arg: child_id (osid.id.Id): the ``Id`` of the new child raise: AlreadyExists - ``objective_bank_id`` is already a parent of ``child_id`` raise: ...
[ "Adds", "a", "child", "to", "an", "objective", "bank", "." ]
train
https://github.com/mitsei/dlkit/blob/445f968a175d61c8d92c0f617a3c17dc1dc7c584/dlkit/handcar/learning/sessions.py#L4628-L4651
jason-weirather/py-seq-tools
seqtools/cli/utilities/gpd_reannotate.py
main
def main(args): """first we need sorted genepreds""" cmd = ['sort',args.reference,'--gpd','--tempdir',args.tempdir,'--threads', str(args.threads),'-o',args.tempdir+'/ref.sorted.gpd'] sys.stderr.write(cmd+"\n") gpd_sort(cmd) cmd = ['sort',args.gpd,'--gpd','--tempdir',args.tempdir,'--threads', ...
python
def main(args): """first we need sorted genepreds""" cmd = ['sort',args.reference,'--gpd','--tempdir',args.tempdir,'--threads', str(args.threads),'-o',args.tempdir+'/ref.sorted.gpd'] sys.stderr.write(cmd+"\n") gpd_sort(cmd) cmd = ['sort',args.gpd,'--gpd','--tempdir',args.tempdir,'--threads', ...
[ "def", "main", "(", "args", ")", ":", "cmd", "=", "[", "'sort'", ",", "args", ".", "reference", ",", "'--gpd'", ",", "'--tempdir'", ",", "args", ".", "tempdir", ",", "'--threads'", ",", "str", "(", "args", ".", "threads", ")", ",", "'-o'", ",", "ar...
first we need sorted genepreds
[ "first", "we", "need", "sorted", "genepreds" ]
train
https://github.com/jason-weirather/py-seq-tools/blob/f642c2c73ffef2acc83656a78059a476fc734ca1/seqtools/cli/utilities/gpd_reannotate.py#L19-L103
danvk/pyjsonselect
jsonselect/jsonselect.py
_reExec
def _reExec(regex, string): '''This returns [full match, group1, group2, ...], just like JS.''' m = regex.search(string) if not m: return None return [m.group()] + list(m.groups())
python
def _reExec(regex, string): '''This returns [full match, group1, group2, ...], just like JS.''' m = regex.search(string) if not m: return None return [m.group()] + list(m.groups())
[ "def", "_reExec", "(", "regex", ",", "string", ")", ":", "m", "=", "regex", ".", "search", "(", "string", ")", "if", "not", "m", ":", "return", "None", "return", "[", "m", ".", "group", "(", ")", "]", "+", "list", "(", "m", ".", "groups", "(", ...
This returns [full match, group1, group2, ...], just like JS.
[ "This", "returns", "[", "full", "match", "group1", "group2", "...", "]", "just", "like", "JS", "." ]
train
https://github.com/danvk/pyjsonselect/blob/b700e9293f93b5a0b958714c7ecc421bb49267f8/jsonselect/jsonselect.py#L127-L131
danvk/pyjsonselect
jsonselect/jsonselect.py
_jsTypeof
def _jsTypeof(o): '''Return a string similar to JS's typeof.''' if o == None: return 'object' elif o == Undefined: return 'undefined' elif isinstance(o, bool): return 'boolean' if isinstance(o, int) or isinstance(o, float): return 'number' elif isinstance(o, list)...
python
def _jsTypeof(o): '''Return a string similar to JS's typeof.''' if o == None: return 'object' elif o == Undefined: return 'undefined' elif isinstance(o, bool): return 'boolean' if isinstance(o, int) or isinstance(o, float): return 'number' elif isinstance(o, list)...
[ "def", "_jsTypeof", "(", "o", ")", ":", "if", "o", "==", "None", ":", "return", "'object'", "elif", "o", "==", "Undefined", ":", "return", "'undefined'", "elif", "isinstance", "(", "o", ",", "bool", ")", ":", "return", "'boolean'", "if", "isinstance", ...
Return a string similar to JS's typeof.
[ "Return", "a", "string", "similar", "to", "JS", "s", "typeof", "." ]
train
https://github.com/danvk/pyjsonselect/blob/b700e9293f93b5a0b958714c7ecc421bb49267f8/jsonselect/jsonselect.py#L134-L148
danvk/pyjsonselect
jsonselect/jsonselect.py
match
def match(sel, obj, arr=None, bailout_fn=None): '''Match a selector to an object, yielding the matched values. Args: sel: The JSONSelect selector to apply (a string) obj: The object against which to apply the selector arr: If sel contains ? characters, then the values in this array will...
python
def match(sel, obj, arr=None, bailout_fn=None): '''Match a selector to an object, yielding the matched values. Args: sel: The JSONSelect selector to apply (a string) obj: The object against which to apply the selector arr: If sel contains ? characters, then the values in this array will...
[ "def", "match", "(", "sel", ",", "obj", ",", "arr", "=", "None", ",", "bailout_fn", "=", "None", ")", ":", "if", "arr", ":", "sel", "=", "interpolate", "(", "sel", ",", "arr", ")", "sel", "=", "parse", "(", "sel", ")", "[", "1", "]", "return", ...
Match a selector to an object, yielding the matched values. Args: sel: The JSONSelect selector to apply (a string) obj: The object against which to apply the selector arr: If sel contains ? characters, then the values in this array will be safely interpolated into the selector....
[ "Match", "a", "selector", "to", "an", "object", "yielding", "the", "matched", "values", "." ]
train
https://github.com/danvk/pyjsonselect/blob/b700e9293f93b5a0b958714c7ecc421bb49267f8/jsonselect/jsonselect.py#L658-L675
mitsei/dlkit
dlkit/runtime/impls/osid/managers.py
OsidProfile.get_display_name
def get_display_name(self): """Gets a display name for this service implementation. return: (osid.locale.DisplayText) - a display name compliance: mandatory - This method must be implemented. """ return DisplayText({'text': profile.DISPLAYNAME, 'lang...
python
def get_display_name(self): """Gets a display name for this service implementation. return: (osid.locale.DisplayText) - a display name compliance: mandatory - This method must be implemented. """ return DisplayText({'text': profile.DISPLAYNAME, 'lang...
[ "def", "get_display_name", "(", "self", ")", ":", "return", "DisplayText", "(", "{", "'text'", ":", "profile", ".", "DISPLAYNAME", ",", "'languageTypeId'", ":", "profile", ".", "LANGUAGETYPEID", ",", "'scriptTypeId'", ":", "profile", ".", "SCRIPTTYPEID", ",", ...
Gets a display name for this service implementation. return: (osid.locale.DisplayText) - a display name compliance: mandatory - This method must be implemented.
[ "Gets", "a", "display", "name", "for", "this", "service", "implementation", "." ]
train
https://github.com/mitsei/dlkit/blob/445f968a175d61c8d92c0f617a3c17dc1dc7c584/dlkit/runtime/impls/osid/managers.py#L39-L49
mitsei/dlkit
dlkit/runtime/impls/osid/managers.py
OsidProfile.get_description
def get_description(self): """Gets a description of this service implementation. return: (osid.locale.DisplayText) - a description compliance: mandatory - This method must be implemented. """ return DisplayText({'text': profile.DESCRIPTION, 'language...
python
def get_description(self): """Gets a description of this service implementation. return: (osid.locale.DisplayText) - a description compliance: mandatory - This method must be implemented. """ return DisplayText({'text': profile.DESCRIPTION, 'language...
[ "def", "get_description", "(", "self", ")", ":", "return", "DisplayText", "(", "{", "'text'", ":", "profile", ".", "DESCRIPTION", ",", "'languageTypeId'", ":", "profile", ".", "LANGUAGETYPEID", ",", "'scriptTypeId'", ":", "profile", ".", "SCRIPTTYPEID", ",", "...
Gets a description of this service implementation. return: (osid.locale.DisplayText) - a description compliance: mandatory - This method must be implemented.
[ "Gets", "a", "description", "of", "this", "service", "implementation", "." ]
train
https://github.com/mitsei/dlkit/blob/445f968a175d61c8d92c0f617a3c17dc1dc7c584/dlkit/runtime/impls/osid/managers.py#L51-L61
mitsei/dlkit
dlkit/runtime/impls/osid/managers.py
OsidRuntimeManager.get_manager
def get_manager(self, osid=None, impl_class_name=None, version=None): """Finds, loads and instantiates providers of OSID managers. Providers must conform to an OsidManager interface. The interfaces are defined in the OSID enumeration. For all OSID requests, an instance of ``OsidManager`...
python
def get_manager(self, osid=None, impl_class_name=None, version=None): """Finds, loads and instantiates providers of OSID managers. Providers must conform to an OsidManager interface. The interfaces are defined in the OSID enumeration. For all OSID requests, an instance of ``OsidManager`...
[ "def", "get_manager", "(", "self", ",", "osid", "=", "None", ",", "impl_class_name", "=", "None", ",", "version", "=", "None", ")", ":", "# This implementation assumes that all osid impls reside as seperate", "# packages in the dlkit library, so that for instance the proxy mana...
Finds, loads and instantiates providers of OSID managers. Providers must conform to an OsidManager interface. The interfaces are defined in the OSID enumeration. For all OSID requests, an instance of ``OsidManager`` that implements the ``OsidManager`` interface is returned. In bindings ...
[ "Finds", "loads", "and", "instantiates", "providers", "of", "OSID", "managers", "." ]
train
https://github.com/mitsei/dlkit/blob/445f968a175d61c8d92c0f617a3c17dc1dc7c584/dlkit/runtime/impls/osid/managers.py#L365-L412
mitsei/dlkit
dlkit/runtime/impls/osid/managers.py
OsidRuntimeManager.get_proxy_manager
def get_proxy_manager(self, osid=None, implementation=None, version=None): """Finds, loads and instantiates providers of OSID managers. Providers must conform to an ``OsidManager`` interface. The interfaces are defined in the OSID enumeration. For all OSID requests, an instance of ``Osi...
python
def get_proxy_manager(self, osid=None, implementation=None, version=None): """Finds, loads and instantiates providers of OSID managers. Providers must conform to an ``OsidManager`` interface. The interfaces are defined in the OSID enumeration. For all OSID requests, an instance of ``Osi...
[ "def", "get_proxy_manager", "(", "self", ",", "osid", "=", "None", ",", "implementation", "=", "None", ",", "version", "=", "None", ")", ":", "# This implementation assumes that all osid impls reside as seperate", "# packages in the dlkit library, so that for instance the proxy...
Finds, loads and instantiates providers of OSID managers. Providers must conform to an ``OsidManager`` interface. The interfaces are defined in the OSID enumeration. For all OSID requests, an instance of ``OsidManager`` that implements the ``OsidManager`` interface is returned. In bindi...
[ "Finds", "loads", "and", "instantiates", "providers", "of", "OSID", "managers", "." ]
train
https://github.com/mitsei/dlkit/blob/445f968a175d61c8d92c0f617a3c17dc1dc7c584/dlkit/runtime/impls/osid/managers.py#L414-L460
mitsei/dlkit
dlkit/authz_adapter/authentication/sessions.py
AgentSearchSession.get_agents_by_search
def get_agents_by_search(self, agent_query, agent_search): """Pass through to provider AgentSearchSession.get_agents_by_search""" # Implemented from azosid template for - # osid.resource.ResourceSearchSession.get_resources_by_search_template if not self._can('search'): raise ...
python
def get_agents_by_search(self, agent_query, agent_search): """Pass through to provider AgentSearchSession.get_agents_by_search""" # Implemented from azosid template for - # osid.resource.ResourceSearchSession.get_resources_by_search_template if not self._can('search'): raise ...
[ "def", "get_agents_by_search", "(", "self", ",", "agent_query", ",", "agent_search", ")", ":", "# Implemented from azosid template for -", "# osid.resource.ResourceSearchSession.get_resources_by_search_template", "if", "not", "self", ".", "_can", "(", "'search'", ")", ":", ...
Pass through to provider AgentSearchSession.get_agents_by_search
[ "Pass", "through", "to", "provider", "AgentSearchSession", ".", "get_agents_by_search" ]
train
https://github.com/mitsei/dlkit/blob/445f968a175d61c8d92c0f617a3c17dc1dc7c584/dlkit/authz_adapter/authentication/sessions.py#L327-L333
mitsei/dlkit
dlkit/primordium/locale/types/calendar_format.py
get_type_data
def get_type_data(name): """Return dictionary representation of type. Can be used to initialize primordium.type.primitives.Type """ name = name.upper() try: return { 'authority': 'birdland.mit.edu', 'namespace': 'calendar format', 'identifier': name, ...
python
def get_type_data(name): """Return dictionary representation of type. Can be used to initialize primordium.type.primitives.Type """ name = name.upper() try: return { 'authority': 'birdland.mit.edu', 'namespace': 'calendar format', 'identifier': name, ...
[ "def", "get_type_data", "(", "name", ")", ":", "name", "=", "name", ".", "upper", "(", ")", "try", ":", "return", "{", "'authority'", ":", "'birdland.mit.edu'", ",", "'namespace'", ":", "'calendar format'", ",", "'identifier'", ":", "name", ",", "'domain'", ...
Return dictionary representation of type. Can be used to initialize primordium.type.primitives.Type
[ "Return", "dictionary", "representation", "of", "type", "." ]
train
https://github.com/mitsei/dlkit/blob/445f968a175d61c8d92c0f617a3c17dc1dc7c584/dlkit/primordium/locale/types/calendar_format.py#L15-L34
immstudios/nxtools
nxtools/media/ffmpeg.py
ffmpeg
def ffmpeg(*args, **kwargs): """Universal ffmpeg wrapper with progress and error handling""" ff = FFMPEG(*args, **kwargs) ff.start( stdin=kwargs.get("stdin", None), stdout=kwargs.get("stdout", None), stderr=kwargs.get("stderr", subprocess.PIPE) ) ff.wait(kwa...
python
def ffmpeg(*args, **kwargs): """Universal ffmpeg wrapper with progress and error handling""" ff = FFMPEG(*args, **kwargs) ff.start( stdin=kwargs.get("stdin", None), stdout=kwargs.get("stdout", None), stderr=kwargs.get("stderr", subprocess.PIPE) ) ff.wait(kwa...
[ "def", "ffmpeg", "(", "*", "args", ",", "*", "*", "kwargs", ")", ":", "ff", "=", "FFMPEG", "(", "*", "args", ",", "*", "*", "kwargs", ")", "ff", ".", "start", "(", "stdin", "=", "kwargs", ".", "get", "(", "\"stdin\"", ",", "None", ")", ",", "...
Universal ffmpeg wrapper with progress and error handling
[ "Universal", "ffmpeg", "wrapper", "with", "progress", "and", "error", "handling" ]
train
https://github.com/immstudios/nxtools/blob/8c30213c61aec460c648d5e9ae7ce79dfb7b4b9a/nxtools/media/ffmpeg.py#L180-L196
mitsei/dlkit
dlkit/runtime/impls/proxy/sessions.py
ProxySession.get_proxy
def get_proxy(self, input_): """Gets a proxy. :param input: a proxy condition :type input: ``osid.proxy.ProxyCondition`` :return: a proxy :rtype: ``osid.proxy.Proxy`` :raise: ``NullArgument`` -- ``input`` is ``null`` :raise: ``OperationFailed`` -- unable to compl...
python
def get_proxy(self, input_): """Gets a proxy. :param input: a proxy condition :type input: ``osid.proxy.ProxyCondition`` :return: a proxy :rtype: ``osid.proxy.Proxy`` :raise: ``NullArgument`` -- ``input`` is ``null`` :raise: ``OperationFailed`` -- unable to compl...
[ "def", "get_proxy", "(", "self", ",", "input_", ")", ":", "if", "input_", ".", "_http_request", "is", "not", "None", ":", "authentication", "=", "DjangoAuthentication", "(", ")", "authentication", ".", "set_django_user", "(", "input_", ".", "_http_request", "....
Gets a proxy. :param input: a proxy condition :type input: ``osid.proxy.ProxyCondition`` :return: a proxy :rtype: ``osid.proxy.Proxy`` :raise: ``NullArgument`` -- ``input`` is ``null`` :raise: ``OperationFailed`` -- unable to complete request :raise: ``Permission...
[ "Gets", "a", "proxy", "." ]
train
https://github.com/mitsei/dlkit/blob/445f968a175d61c8d92c0f617a3c17dc1dc7c584/dlkit/runtime/impls/proxy/sessions.py#L34-L69
mitsei/dlkit
dlkit/records/assessment/clix/assessment_offered_records.py
NofMAssessmentOfferedFormRecord._init_metadata
def _init_metadata(self): """stub""" self._n_of_m_metadata = { 'element_id': Id(self.my_osid_object_form._authority, self.my_osid_object_form._namespace, 'nOfM'), 'element_label': 'nOfM', 'instructions': 'Stude...
python
def _init_metadata(self): """stub""" self._n_of_m_metadata = { 'element_id': Id(self.my_osid_object_form._authority, self.my_osid_object_form._namespace, 'nOfM'), 'element_label': 'nOfM', 'instructions': 'Stude...
[ "def", "_init_metadata", "(", "self", ")", ":", "self", ".", "_n_of_m_metadata", "=", "{", "'element_id'", ":", "Id", "(", "self", ".", "my_osid_object_form", ".", "_authority", ",", "self", ".", "my_osid_object_form", ".", "_namespace", ",", "'nOfM'", ")", ...
stub
[ "stub" ]
train
https://github.com/mitsei/dlkit/blob/445f968a175d61c8d92c0f617a3c17dc1dc7c584/dlkit/records/assessment/clix/assessment_offered_records.py#L57-L75
mitsei/dlkit
dlkit/records/assessment/clix/assessment_offered_records.py
NofMAssessmentOfferedFormRecord.set_n_of_m
def set_n_of_m(self, value=None): """stub""" if value is None: raise NullArgument() if isinstance(value, bool): # because True / False are also int types... raise InvalidArgument('value must be integer') if value is not None and not isinstance(value, i...
python
def set_n_of_m(self, value=None): """stub""" if value is None: raise NullArgument() if isinstance(value, bool): # because True / False are also int types... raise InvalidArgument('value must be integer') if value is not None and not isinstance(value, i...
[ "def", "set_n_of_m", "(", "self", ",", "value", "=", "None", ")", ":", "if", "value", "is", "None", ":", "raise", "NullArgument", "(", ")", "if", "isinstance", "(", "value", ",", "bool", ")", ":", "# because True / False are also int types...", "raise", "Inv...
stub
[ "stub" ]
train
https://github.com/mitsei/dlkit/blob/445f968a175d61c8d92c0f617a3c17dc1dc7c584/dlkit/records/assessment/clix/assessment_offered_records.py#L81-L95
mitsei/dlkit
dlkit/records/assessment/clix/assessment_offered_records.py
NofMAssessmentOfferedFormRecord.clear_n_of_m
def clear_n_of_m(self): """stub""" if (self.get_n_of_m_metadata().is_read_only() or self.get_n_of_m_metadata().is_required()): raise NoAccess() self.my_osid_object_form._my_map['nOfM'] = \ int(self._n_of_m_metadata['default_object_values'][0])
python
def clear_n_of_m(self): """stub""" if (self.get_n_of_m_metadata().is_read_only() or self.get_n_of_m_metadata().is_required()): raise NoAccess() self.my_osid_object_form._my_map['nOfM'] = \ int(self._n_of_m_metadata['default_object_values'][0])
[ "def", "clear_n_of_m", "(", "self", ")", ":", "if", "(", "self", ".", "get_n_of_m_metadata", "(", ")", ".", "is_read_only", "(", ")", "or", "self", ".", "get_n_of_m_metadata", "(", ")", ".", "is_required", "(", ")", ")", ":", "raise", "NoAccess", "(", ...
stub
[ "stub" ]
train
https://github.com/mitsei/dlkit/blob/445f968a175d61c8d92c0f617a3c17dc1dc7c584/dlkit/records/assessment/clix/assessment_offered_records.py#L97-L103
mitsei/dlkit
dlkit/records/assessment/clix/assessment_offered_records.py
UnlockPreviousButtonAssessmentOfferedRecord.has_unlock_previous
def has_unlock_previous(self): """stub""" if 'unlockPrevious' not in self.my_osid_object._my_map or \ self.my_osid_object._my_map['unlockPrevious'] is None: return False return True
python
def has_unlock_previous(self): """stub""" if 'unlockPrevious' not in self.my_osid_object._my_map or \ self.my_osid_object._my_map['unlockPrevious'] is None: return False return True
[ "def", "has_unlock_previous", "(", "self", ")", ":", "if", "'unlockPrevious'", "not", "in", "self", ".", "my_osid_object", ".", "_my_map", "or", "self", ".", "my_osid_object", ".", "_my_map", "[", "'unlockPrevious'", "]", "is", "None", ":", "return", "False", ...
stub
[ "stub" ]
train
https://github.com/mitsei/dlkit/blob/445f968a175d61c8d92c0f617a3c17dc1dc7c584/dlkit/records/assessment/clix/assessment_offered_records.py#L114-L119