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 |
|---|---|---|---|---|---|---|---|---|---|---|
delfick/harpoon | harpoon/ship/context.py | ContextBuilder.find_files | def find_files(self, context, silent_build):
"""
Find the set of files from our parent_dir that we care about
"""
first_layer = ["'{0}'".format(thing) for thing in os.listdir(context.parent_dir)]
output, status = command_output("find {0} -type l -or -type f {1} -follow -print".fo... | python | def find_files(self, context, silent_build):
"""
Find the set of files from our parent_dir that we care about
"""
first_layer = ["'{0}'".format(thing) for thing in os.listdir(context.parent_dir)]
output, status = command_output("find {0} -type l -or -type f {1} -follow -print".fo... | [
"def",
"find_files",
"(",
"self",
",",
"context",
",",
"silent_build",
")",
":",
"first_layer",
"=",
"[",
"\"'{0}'\"",
".",
"format",
"(",
"thing",
")",
"for",
"thing",
"in",
"os",
".",
"listdir",
"(",
"context",
".",
"parent_dir",
")",
"]",
"output",
... | Find the set of files from our parent_dir that we care about | [
"Find",
"the",
"set",
"of",
"files",
"from",
"our",
"parent_dir",
"that",
"we",
"care",
"about"
] | train | https://github.com/delfick/harpoon/blob/a2d39311d6127b7da2e15f40468bf320d598e461/harpoon/ship/context.py#L192-L245 |
delfick/harpoon | harpoon/ship/context.py | ContextBuilder.convert_nonascii | def convert_nonascii(self, lst):
"""Convert the strange outputs from git commands"""
for item in lst:
if item.startswith('"') and item.endswith('"'):
item = item[1:-1]
yield item.encode('utf-8').decode('unicode-escape')
else:
yield ... | python | def convert_nonascii(self, lst):
"""Convert the strange outputs from git commands"""
for item in lst:
if item.startswith('"') and item.endswith('"'):
item = item[1:-1]
yield item.encode('utf-8').decode('unicode-escape')
else:
yield ... | [
"def",
"convert_nonascii",
"(",
"self",
",",
"lst",
")",
":",
"for",
"item",
"in",
"lst",
":",
"if",
"item",
".",
"startswith",
"(",
"'\"'",
")",
"and",
"item",
".",
"endswith",
"(",
"'\"'",
")",
":",
"item",
"=",
"item",
"[",
"1",
":",
"-",
"1",... | Convert the strange outputs from git commands | [
"Convert",
"the",
"strange",
"outputs",
"from",
"git",
"commands"
] | train | https://github.com/delfick/harpoon/blob/a2d39311d6127b7da2e15f40468bf320d598e461/harpoon/ship/context.py#L247-L254 |
delfick/harpoon | harpoon/ship/context.py | ContextBuilder.find_notignored_git_files | def find_notignored_git_files(self, context, silent_build):
"""
Return a list of files that are not ignored by git
"""
def git(args, error_message, cwd=context.parent_dir, **error_kwargs):
output, status = command_output("git {0}".format(args), cwd=cwd)
if status ... | python | def find_notignored_git_files(self, context, silent_build):
"""
Return a list of files that are not ignored by git
"""
def git(args, error_message, cwd=context.parent_dir, **error_kwargs):
output, status = command_output("git {0}".format(args), cwd=cwd)
if status ... | [
"def",
"find_notignored_git_files",
"(",
"self",
",",
"context",
",",
"silent_build",
")",
":",
"def",
"git",
"(",
"args",
",",
"error_message",
",",
"cwd",
"=",
"context",
".",
"parent_dir",
",",
"*",
"*",
"error_kwargs",
")",
":",
"output",
",",
"status"... | Return a list of files that are not ignored by git | [
"Return",
"a",
"list",
"of",
"files",
"that",
"are",
"not",
"ignored",
"by",
"git"
] | train | https://github.com/delfick/harpoon/blob/a2d39311d6127b7da2e15f40468bf320d598e461/harpoon/ship/context.py#L256-L304 |
avladev/pypro | pypro/console.py | ask | def ask(question, default=None):
"""
@question: str
@default: Any value which can be converted to string.
Asks a user for a input.
If default parameter is passed it will be appended to the end of the message in square brackets.
"""
question = str(question)
if default:
question ... | python | def ask(question, default=None):
"""
@question: str
@default: Any value which can be converted to string.
Asks a user for a input.
If default parameter is passed it will be appended to the end of the message in square brackets.
"""
question = str(question)
if default:
question ... | [
"def",
"ask",
"(",
"question",
",",
"default",
"=",
"None",
")",
":",
"question",
"=",
"str",
"(",
"question",
")",
"if",
"default",
":",
"question",
"+=",
"' ['",
"+",
"str",
"(",
"default",
")",
"+",
"']'",
"question",
"+=",
"': '",
"reply",
"=",
... | @question: str
@default: Any value which can be converted to string.
Asks a user for a input.
If default parameter is passed it will be appended to the end of the message in square brackets. | [
"@question",
":",
"str",
"@default",
":",
"Any",
"value",
"which",
"can",
"be",
"converted",
"to",
"string",
"."
] | train | https://github.com/avladev/pypro/blob/7eb98c5ebd9830104689d105c36424b24c72b475/pypro/console.py#L9-L25 |
avladev/pypro | pypro/console.py | to_bool | def to_bool(answer, default):
"""
Converts user answer to boolean
"""
answer = str(answer).lower()
default = str(default).lower()
if answer and answer in "yes":
return True
return False | python | def to_bool(answer, default):
"""
Converts user answer to boolean
"""
answer = str(answer).lower()
default = str(default).lower()
if answer and answer in "yes":
return True
return False | [
"def",
"to_bool",
"(",
"answer",
",",
"default",
")",
":",
"answer",
"=",
"str",
"(",
"answer",
")",
".",
"lower",
"(",
")",
"default",
"=",
"str",
"(",
"default",
")",
".",
"lower",
"(",
")",
"if",
"answer",
"and",
"answer",
"in",
"\"yes\"",
":",
... | Converts user answer to boolean | [
"Converts",
"user",
"answer",
"to",
"boolean"
] | train | https://github.com/avladev/pypro/blob/7eb98c5ebd9830104689d105c36424b24c72b475/pypro/console.py#L37-L47 |
avladev/pypro | pypro/console.py | out | def out(*args):
""" Outputs its parameters to users stdout. """
for value in args:
sys.stdout.write(value)
sys.stdout.write(os.linesep) | python | def out(*args):
""" Outputs its parameters to users stdout. """
for value in args:
sys.stdout.write(value)
sys.stdout.write(os.linesep) | [
"def",
"out",
"(",
"*",
"args",
")",
":",
"for",
"value",
"in",
"args",
":",
"sys",
".",
"stdout",
".",
"write",
"(",
"value",
")",
"sys",
".",
"stdout",
".",
"write",
"(",
"os",
".",
"linesep",
")"
] | Outputs its parameters to users stdout. | [
"Outputs",
"its",
"parameters",
"to",
"users",
"stdout",
"."
] | train | https://github.com/avladev/pypro/blob/7eb98c5ebd9830104689d105c36424b24c72b475/pypro/console.py#L65-L70 |
avladev/pypro | pypro/console.py | err | def err(*args):
""" Outputs its parameters to users stderr. """
for value in args:
sys.stderr.write(value)
sys.stderr.write(os.linesep) | python | def err(*args):
""" Outputs its parameters to users stderr. """
for value in args:
sys.stderr.write(value)
sys.stderr.write(os.linesep) | [
"def",
"err",
"(",
"*",
"args",
")",
":",
"for",
"value",
"in",
"args",
":",
"sys",
".",
"stderr",
".",
"write",
"(",
"value",
")",
"sys",
".",
"stderr",
".",
"write",
"(",
"os",
".",
"linesep",
")"
] | Outputs its parameters to users stderr. | [
"Outputs",
"its",
"parameters",
"to",
"users",
"stderr",
"."
] | train | https://github.com/avladev/pypro/blob/7eb98c5ebd9830104689d105c36424b24c72b475/pypro/console.py#L73-L78 |
mitsei/dlkit | dlkit/json_/assessment/sessions.py | AssessmentSession.has_next_assessment_section | def has_next_assessment_section(self, assessment_section_id):
"""Tests if there is a next assessment section in the assessment following the given assessment section ``Id``.
arg: assessment_section_id (osid.id.Id): ``Id`` of the
``AssessmentSection``
return: (boolean) - ``tru... | python | def has_next_assessment_section(self, assessment_section_id):
"""Tests if there is a next assessment section in the assessment following the given assessment section ``Id``.
arg: assessment_section_id (osid.id.Id): ``Id`` of the
``AssessmentSection``
return: (boolean) - ``tru... | [
"def",
"has_next_assessment_section",
"(",
"self",
",",
"assessment_section_id",
")",
":",
"try",
":",
"self",
".",
"get_next_assessment_section",
"(",
"assessment_section_id",
")",
"except",
"errors",
".",
"IllegalState",
":",
"return",
"False",
"else",
":",
"retur... | Tests if there is a next assessment section in the assessment following the given assessment section ``Id``.
arg: assessment_section_id (osid.id.Id): ``Id`` of the
``AssessmentSection``
return: (boolean) - ``true`` if there is a next section,
``false`` otherwise
... | [
"Tests",
"if",
"there",
"is",
"a",
"next",
"assessment",
"section",
"in",
"the",
"assessment",
"following",
"the",
"given",
"assessment",
"section",
"Id",
"."
] | train | https://github.com/mitsei/dlkit/blob/445f968a175d61c8d92c0f617a3c17dc1dc7c584/dlkit/json_/assessment/sessions.py#L261-L281 |
mitsei/dlkit | dlkit/json_/assessment/sessions.py | AssessmentSession.get_next_assessment_section | def get_next_assessment_section(self, assessment_section_id):
"""Gets the next assessemnt section following the given assesment section.
arg: assessment_section_id (osid.id.Id): ``Id`` of the
``AssessmentSection``
return: (osid.assessment.AssessmentSection) - the next section... | python | def get_next_assessment_section(self, assessment_section_id):
"""Gets the next assessemnt section following the given assesment section.
arg: assessment_section_id (osid.id.Id): ``Id`` of the
``AssessmentSection``
return: (osid.assessment.AssessmentSection) - the next section... | [
"def",
"get_next_assessment_section",
"(",
"self",
",",
"assessment_section_id",
")",
":",
"assessment_taken",
"=",
"self",
".",
"get_assessment_section",
"(",
"assessment_section_id",
")",
".",
"_assessment_taken",
"return",
"assessment_taken",
".",
"_get_next_assessment_s... | Gets the next assessemnt section following the given assesment section.
arg: assessment_section_id (osid.id.Id): ``Id`` of the
``AssessmentSection``
return: (osid.assessment.AssessmentSection) - the next section
raise: IllegalState - ``has_next_assessment_section()`` is
... | [
"Gets",
"the",
"next",
"assessemnt",
"section",
"following",
"the",
"given",
"assesment",
"section",
"."
] | train | https://github.com/mitsei/dlkit/blob/445f968a175d61c8d92c0f617a3c17dc1dc7c584/dlkit/json_/assessment/sessions.py#L285-L301 |
mitsei/dlkit | dlkit/json_/assessment/sessions.py | AssessmentSession.has_previous_assessment_section | def has_previous_assessment_section(self, assessment_section_id):
"""Tests if there is a previous assessment section in the assessment following the given assessment section ``Id``.
arg: assessment_section_id (osid.id.Id): ``Id`` of the
``AssessmentSection``
return: (boolean)... | python | def has_previous_assessment_section(self, assessment_section_id):
"""Tests if there is a previous assessment section in the assessment following the given assessment section ``Id``.
arg: assessment_section_id (osid.id.Id): ``Id`` of the
``AssessmentSection``
return: (boolean)... | [
"def",
"has_previous_assessment_section",
"(",
"self",
",",
"assessment_section_id",
")",
":",
"try",
":",
"self",
".",
"get_previous_assessment_section",
"(",
"assessment_section_id",
")",
"except",
"errors",
".",
"IllegalState",
":",
"return",
"False",
"else",
":",
... | Tests if there is a previous assessment section in the assessment following the given assessment section ``Id``.
arg: assessment_section_id (osid.id.Id): ``Id`` of the
``AssessmentSection``
return: (boolean) - ``true`` if there is a previous assessment
section, ``fals... | [
"Tests",
"if",
"there",
"is",
"a",
"previous",
"assessment",
"section",
"in",
"the",
"assessment",
"following",
"the",
"given",
"assessment",
"section",
"Id",
"."
] | train | https://github.com/mitsei/dlkit/blob/445f968a175d61c8d92c0f617a3c17dc1dc7c584/dlkit/json_/assessment/sessions.py#L305-L325 |
mitsei/dlkit | dlkit/json_/assessment/sessions.py | AssessmentSession.get_previous_assessment_section | def get_previous_assessment_section(self, assessment_section_id):
"""Gets the next assessemnt section following the given assesment section.
arg: assessment_section_id (osid.id.Id): ``Id`` of the
``AssessmentSection``
return: (osid.assessment.AssessmentSection) - the previous... | python | def get_previous_assessment_section(self, assessment_section_id):
"""Gets the next assessemnt section following the given assesment section.
arg: assessment_section_id (osid.id.Id): ``Id`` of the
``AssessmentSection``
return: (osid.assessment.AssessmentSection) - the previous... | [
"def",
"get_previous_assessment_section",
"(",
"self",
",",
"assessment_section_id",
")",
":",
"assessment_taken",
"=",
"self",
".",
"get_assessment_section",
"(",
"assessment_section_id",
")",
".",
"_assessment_taken",
"return",
"assessment_taken",
".",
"_get_previous_asse... | Gets the next assessemnt section following the given assesment section.
arg: assessment_section_id (osid.id.Id): ``Id`` of the
``AssessmentSection``
return: (osid.assessment.AssessmentSection) - the previous
assessment section
raise: IllegalState - ``has_next... | [
"Gets",
"the",
"next",
"assessemnt",
"section",
"following",
"the",
"given",
"assesment",
"section",
"."
] | train | https://github.com/mitsei/dlkit/blob/445f968a175d61c8d92c0f617a3c17dc1dc7c584/dlkit/json_/assessment/sessions.py#L329-L346 |
mitsei/dlkit | dlkit/json_/assessment/sessions.py | AssessmentSession.get_assessment_section | def get_assessment_section(self, assessment_section_id):
"""Gets an assessemnts section by ``Id``.
arg: assessment_section_id (osid.id.Id): ``Id`` of the
``AssessmentSection``
return: (osid.assessment.AssessmentSection) - the assessment
section
raise: ... | python | def get_assessment_section(self, assessment_section_id):
"""Gets an assessemnts section by ``Id``.
arg: assessment_section_id (osid.id.Id): ``Id`` of the
``AssessmentSection``
return: (osid.assessment.AssessmentSection) - the assessment
section
raise: ... | [
"def",
"get_assessment_section",
"(",
"self",
",",
"assessment_section_id",
")",
":",
"return",
"get_section_util",
"(",
"assessment_section_id",
",",
"runtime",
"=",
"self",
".",
"_runtime",
",",
"proxy",
"=",
"self",
".",
"_proxy",
")"
] | Gets an assessemnts section by ``Id``.
arg: assessment_section_id (osid.id.Id): ``Id`` of the
``AssessmentSection``
return: (osid.assessment.AssessmentSection) - the assessment
section
raise: IllegalState - ``has_assessment_begun()`` is ``false``
rais... | [
"Gets",
"an",
"assessemnts",
"section",
"by",
"Id",
"."
] | train | https://github.com/mitsei/dlkit/blob/445f968a175d61c8d92c0f617a3c17dc1dc7c584/dlkit/json_/assessment/sessions.py#L350-L365 |
mitsei/dlkit | dlkit/json_/assessment/sessions.py | AssessmentSession.get_incomplete_assessment_sections | def get_incomplete_assessment_sections(self, assessment_taken_id):
"""Gets the incomplete assessment sections of this assessment.
arg: assessment_taken_id (osid.id.Id): ``Id`` of the
``AssessmentTaken``
return: (osid.assessment.AssessmentSectionList) - the list of
... | python | def get_incomplete_assessment_sections(self, assessment_taken_id):
"""Gets the incomplete assessment sections of this assessment.
arg: assessment_taken_id (osid.id.Id): ``Id`` of the
``AssessmentTaken``
return: (osid.assessment.AssessmentSectionList) - the list of
... | [
"def",
"get_incomplete_assessment_sections",
"(",
"self",
",",
"assessment_taken_id",
")",
":",
"section_list",
"=",
"[",
"]",
"for",
"section",
"in",
"self",
".",
"get_assessment_sections",
"(",
"assessment_taken_id",
")",
":",
"if",
"not",
"section",
".",
"is_co... | Gets the incomplete assessment sections of this assessment.
arg: assessment_taken_id (osid.id.Id): ``Id`` of the
``AssessmentTaken``
return: (osid.assessment.AssessmentSectionList) - the list of
incomplete assessment sections
raise: IllegalState - ``has_asses... | [
"Gets",
"the",
"incomplete",
"assessment",
"sections",
"of",
"this",
"assessment",
"."
] | train | https://github.com/mitsei/dlkit/blob/445f968a175d61c8d92c0f617a3c17dc1dc7c584/dlkit/json_/assessment/sessions.py#L411-L430 |
mitsei/dlkit | dlkit/json_/assessment/sessions.py | AssessmentSession.has_assessment_section_begun | def has_assessment_section_begun(self, assessment_section_id):
"""Tests if this assessment section has started.
A section begins from the designated start time if a start time
is defined. If no start time is defined the section may begin at
any time. Assessment items cannot be accessed ... | python | def has_assessment_section_begun(self, assessment_section_id):
"""Tests if this assessment section has started.
A section begins from the designated start time if a start time
is defined. If no start time is defined the section may begin at
any time. Assessment items cannot be accessed ... | [
"def",
"has_assessment_section_begun",
"(",
"self",
",",
"assessment_section_id",
")",
":",
"return",
"get_section_util",
"(",
"assessment_section_id",
",",
"runtime",
"=",
"self",
".",
"_runtime",
")",
".",
"_assessment_taken",
".",
"has_started",
"(",
")"
] | Tests if this assessment section has started.
A section begins from the designated start time if a start time
is defined. If no start time is defined the section may begin at
any time. Assessment items cannot be accessed or submitted if
the return for this method is ``false``.
... | [
"Tests",
"if",
"this",
"assessment",
"section",
"has",
"started",
"."
] | train | https://github.com/mitsei/dlkit/blob/445f968a175d61c8d92c0f617a3c17dc1dc7c584/dlkit/json_/assessment/sessions.py#L433-L455 |
mitsei/dlkit | dlkit/json_/assessment/sessions.py | AssessmentSession.has_next_question | def has_next_question(self, assessment_section_id, item_id):
"""Tests if there is a next question following the given question ``Id``.
arg: assessment_section_id (osid.id.Id): ``Id`` of the
``AssessmentSection``
arg: item_id (osid.id.Id): ``Id`` of the ``Item``
ret... | python | def has_next_question(self, assessment_section_id, item_id):
"""Tests if there is a next question following the given question ``Id``.
arg: assessment_section_id (osid.id.Id): ``Id`` of the
``AssessmentSection``
arg: item_id (osid.id.Id): ``Id`` of the ``Item``
ret... | [
"def",
"has_next_question",
"(",
"self",
",",
"assessment_section_id",
",",
"item_id",
")",
":",
"try",
":",
"self",
".",
"get_next_question",
"(",
"assessment_section_id",
",",
"item_id",
")",
"except",
"errors",
".",
"IllegalState",
":",
"return",
"False",
"el... | Tests if there is a next question following the given question ``Id``.
arg: assessment_section_id (osid.id.Id): ``Id`` of the
``AssessmentSection``
arg: item_id (osid.id.Id): ``Id`` of the ``Item``
return: (boolean) - ``true`` if there is a next question,
`... | [
"Tests",
"if",
"there",
"is",
"a",
"next",
"question",
"following",
"the",
"given",
"question",
"Id",
"."
] | train | https://github.com/mitsei/dlkit/blob/445f968a175d61c8d92c0f617a3c17dc1dc7c584/dlkit/json_/assessment/sessions.py#L538-L563 |
mitsei/dlkit | dlkit/json_/assessment/sessions.py | AssessmentSession.get_next_question | def get_next_question(self, assessment_section_id, item_id):
"""Gets the next question in this assesment section.
arg: assessment_section_id (osid.id.Id): ``Id`` of the
``AssessmentSection``
arg: item_id (osid.id.Id): ``Id`` of the ``Item``
return: (osid.assessment... | python | def get_next_question(self, assessment_section_id, item_id):
"""Gets the next question in this assesment section.
arg: assessment_section_id (osid.id.Id): ``Id`` of the
``AssessmentSection``
arg: item_id (osid.id.Id): ``Id`` of the ``Item``
return: (osid.assessment... | [
"def",
"get_next_question",
"(",
"self",
",",
"assessment_section_id",
",",
"item_id",
")",
":",
"return",
"self",
".",
"get_assessment_section",
"(",
"assessment_section_id",
")",
".",
"get_next_question",
"(",
"question_id",
"=",
"item_id",
")"
] | Gets the next question in this assesment section.
arg: assessment_section_id (osid.id.Id): ``Id`` of the
``AssessmentSection``
arg: item_id (osid.id.Id): ``Id`` of the ``Item``
return: (osid.assessment.Question) - the next question
raise: IllegalState - ``has_next... | [
"Gets",
"the",
"next",
"question",
"in",
"this",
"assesment",
"section",
"."
] | train | https://github.com/mitsei/dlkit/blob/445f968a175d61c8d92c0f617a3c17dc1dc7c584/dlkit/json_/assessment/sessions.py#L567-L585 |
mitsei/dlkit | dlkit/json_/assessment/sessions.py | AssessmentSession.has_previous_question | def has_previous_question(self, assessment_section_id, item_id):
"""Tests if there is a previous question preceeding the given question ``Id``.
arg: assessment_section_id (osid.id.Id): ``Id`` of the
``AssessmentSection``
arg: item_id (osid.id.Id): ``Id`` of the ``Item``
... | python | def has_previous_question(self, assessment_section_id, item_id):
"""Tests if there is a previous question preceeding the given question ``Id``.
arg: assessment_section_id (osid.id.Id): ``Id`` of the
``AssessmentSection``
arg: item_id (osid.id.Id): ``Id`` of the ``Item``
... | [
"def",
"has_previous_question",
"(",
"self",
",",
"assessment_section_id",
",",
"item_id",
")",
":",
"try",
":",
"self",
".",
"get_previous_question",
"(",
"assessment_section_id",
",",
"item_id",
")",
"except",
"errors",
".",
"IllegalState",
":",
"return",
"False... | Tests if there is a previous question preceeding the given question ``Id``.
arg: assessment_section_id (osid.id.Id): ``Id`` of the
``AssessmentSection``
arg: item_id (osid.id.Id): ``Id`` of the ``Item``
return: (boolean) - ``true`` if there is a previous question,
... | [
"Tests",
"if",
"there",
"is",
"a",
"previous",
"question",
"preceeding",
"the",
"given",
"question",
"Id",
"."
] | train | https://github.com/mitsei/dlkit/blob/445f968a175d61c8d92c0f617a3c17dc1dc7c584/dlkit/json_/assessment/sessions.py#L589-L614 |
mitsei/dlkit | dlkit/json_/assessment/sessions.py | AssessmentSession.get_previous_question | def get_previous_question(self, assessment_section_id, item_id):
"""Gets the previous question in this assesment section.
arg: assessment_section_id (osid.id.Id): ``Id`` of the
``AssessmentSection``
arg: item_id (osid.id.Id): ``Id`` of the ``Item``
return: (osid.as... | python | def get_previous_question(self, assessment_section_id, item_id):
"""Gets the previous question in this assesment section.
arg: assessment_section_id (osid.id.Id): ``Id`` of the
``AssessmentSection``
arg: item_id (osid.id.Id): ``Id`` of the ``Item``
return: (osid.as... | [
"def",
"get_previous_question",
"(",
"self",
",",
"assessment_section_id",
",",
"item_id",
")",
":",
"return",
"self",
".",
"get_assessment_section",
"(",
"assessment_section_id",
")",
".",
"get_next_question",
"(",
"question_id",
"=",
"item_id",
",",
"reverse",
"="... | Gets the previous question in this assesment section.
arg: assessment_section_id (osid.id.Id): ``Id`` of the
``AssessmentSection``
arg: item_id (osid.id.Id): ``Id`` of the ``Item``
return: (osid.assessment.Question) - the previous question
raise: IllegalState - ``... | [
"Gets",
"the",
"previous",
"question",
"in",
"this",
"assesment",
"section",
"."
] | train | https://github.com/mitsei/dlkit/blob/445f968a175d61c8d92c0f617a3c17dc1dc7c584/dlkit/json_/assessment/sessions.py#L618-L636 |
mitsei/dlkit | dlkit/json_/assessment/sessions.py | AssessmentSession.get_question | def get_question(self, assessment_section_id, item_id):
"""Gets the ``Question`` specified by its ``Id``.
arg: assessment_section_id (osid.id.Id): ``Id`` of the
``AssessmentSection``
arg: item_id (osid.id.Id): ``Id`` of the ``Item``
return: (osid.assessment.Questio... | python | def get_question(self, assessment_section_id, item_id):
"""Gets the ``Question`` specified by its ``Id``.
arg: assessment_section_id (osid.id.Id): ``Id`` of the
``AssessmentSection``
arg: item_id (osid.id.Id): ``Id`` of the ``Item``
return: (osid.assessment.Questio... | [
"def",
"get_question",
"(",
"self",
",",
"assessment_section_id",
",",
"item_id",
")",
":",
"return",
"self",
".",
"get_assessment_section",
"(",
"assessment_section_id",
")",
".",
"get_question",
"(",
"question_id",
"=",
"item_id",
")"
] | Gets the ``Question`` specified by its ``Id``.
arg: assessment_section_id (osid.id.Id): ``Id`` of the
``AssessmentSection``
arg: item_id (osid.id.Id): ``Id`` of the ``Item``
return: (osid.assessment.Question) - the returned ``Question``
raise: IllegalState - ``has... | [
"Gets",
"the",
"Question",
"specified",
"by",
"its",
"Id",
"."
] | train | https://github.com/mitsei/dlkit/blob/445f968a175d61c8d92c0f617a3c17dc1dc7c584/dlkit/json_/assessment/sessions.py#L640-L659 |
mitsei/dlkit | dlkit/json_/assessment/sessions.py | AssessmentSession.get_response_form | def get_response_form(self, assessment_section_id, item_id):
"""Gets the response form for submitting an answer.
arg: assessment_section_id (osid.id.Id): ``Id`` of the
``AssessmentSection``
arg: item_id (osid.id.Id): ``Id`` of the ``Item``
return: (osid.assessment.... | python | def get_response_form(self, assessment_section_id, item_id):
"""Gets the response form for submitting an answer.
arg: assessment_section_id (osid.id.Id): ``Id`` of the
``AssessmentSection``
arg: item_id (osid.id.Id): ``Id`` of the ``Item``
return: (osid.assessment.... | [
"def",
"get_response_form",
"(",
"self",
",",
"assessment_section_id",
",",
"item_id",
")",
":",
"if",
"not",
"isinstance",
"(",
"item_id",
",",
"ABCId",
")",
":",
"raise",
"errors",
".",
"InvalidArgument",
"(",
"'argument is not a valid OSID Id'",
")",
"# This is... | Gets the response form for submitting an answer.
arg: assessment_section_id (osid.id.Id): ``Id`` of the
``AssessmentSection``
arg: item_id (osid.id.Id): ``Id`` of the ``Item``
return: (osid.assessment.AnswerForm) - an answer form
raise: IllegalState - ``has_assess... | [
"Gets",
"the",
"response",
"form",
"for",
"submitting",
"an",
"answer",
"."
] | train | https://github.com/mitsei/dlkit/blob/445f968a175d61c8d92c0f617a3c17dc1dc7c584/dlkit/json_/assessment/sessions.py#L684-L745 |
mitsei/dlkit | dlkit/json_/assessment/sessions.py | AssessmentSession.submit_response | def submit_response(self, assessment_section_id, item_id, answer_form):
"""Submits an answer to an item.
arg: assessment_section_id (osid.id.Id): ``Id`` of the
``AssessmentSection``
arg: item_id (osid.id.Id): ``Id`` of the ``Item``
arg: answer_form (osid.assessm... | python | def submit_response(self, assessment_section_id, item_id, answer_form):
"""Submits an answer to an item.
arg: assessment_section_id (osid.id.Id): ``Id`` of the
``AssessmentSection``
arg: item_id (osid.id.Id): ``Id`` of the ``Item``
arg: answer_form (osid.assessm... | [
"def",
"submit_response",
"(",
"self",
",",
"assessment_section_id",
",",
"item_id",
",",
"answer_form",
")",
":",
"if",
"not",
"isinstance",
"(",
"answer_form",
",",
"ABCAnswerForm",
")",
":",
"raise",
"errors",
".",
"InvalidArgument",
"(",
"'argument type is not... | Submits an answer to an item.
arg: assessment_section_id (osid.id.Id): ``Id`` of the
``AssessmentSection``
arg: item_id (osid.id.Id): ``Id`` of the ``Item``
arg: answer_form (osid.assessment.AnswerForm): the response
raise: IllegalState - ``has_assessment_secti... | [
"Submits",
"an",
"answer",
"to",
"an",
"item",
"."
] | train | https://github.com/mitsei/dlkit/blob/445f968a175d61c8d92c0f617a3c17dc1dc7c584/dlkit/json_/assessment/sessions.py#L749-L788 |
mitsei/dlkit | dlkit/json_/assessment/sessions.py | AssessmentSession.get_first_unanswered_question | def get_first_unanswered_question(self, assessment_section_id):
"""Gets the first unanswered question in this assesment section.
arg: assessment_section_id (osid.id.Id): ``Id`` of the
``AssessmentSection``
return: (osid.assessment.Question) - the first unanswered
... | python | def get_first_unanswered_question(self, assessment_section_id):
"""Gets the first unanswered question in this assesment section.
arg: assessment_section_id (osid.id.Id): ``Id`` of the
``AssessmentSection``
return: (osid.assessment.Question) - the first unanswered
... | [
"def",
"get_first_unanswered_question",
"(",
"self",
",",
"assessment_section_id",
")",
":",
"questions",
"=",
"self",
".",
"get_unanswered_questions",
"(",
"assessment_section_id",
")",
"if",
"not",
"questions",
".",
"available",
"(",
")",
":",
"raise",
"errors",
... | Gets the first unanswered question in this assesment section.
arg: assessment_section_id (osid.id.Id): ``Id`` of the
``AssessmentSection``
return: (osid.assessment.Question) - the first unanswered
question
raise: IllegalState - ``has_unanswered_questions()`` ... | [
"Gets",
"the",
"first",
"unanswered",
"question",
"in",
"this",
"assesment",
"section",
"."
] | train | https://github.com/mitsei/dlkit/blob/445f968a175d61c8d92c0f617a3c17dc1dc7c584/dlkit/json_/assessment/sessions.py#L879-L898 |
mitsei/dlkit | dlkit/json_/assessment/sessions.py | AssessmentSession.has_next_unanswered_question | def has_next_unanswered_question(self, assessment_section_id, item_id):
"""Tests if there is a next unanswered question following the given question ``Id``.
arg: assessment_section_id (osid.id.Id): ``Id`` of the
``AssessmentSection``
arg: item_id (osid.id.Id): ``Id`` of th... | python | def has_next_unanswered_question(self, assessment_section_id, item_id):
"""Tests if there is a next unanswered question following the given question ``Id``.
arg: assessment_section_id (osid.id.Id): ``Id`` of the
``AssessmentSection``
arg: item_id (osid.id.Id): ``Id`` of th... | [
"def",
"has_next_unanswered_question",
"(",
"self",
",",
"assessment_section_id",
",",
"item_id",
")",
":",
"# There's probably a more efficient way to implement this:",
"try",
":",
"self",
".",
"get_next_unanswered_question",
"(",
"assessment_section_id",
",",
"item_id",
")"... | Tests if there is a next unanswered question following the given question ``Id``.
arg: assessment_section_id (osid.id.Id): ``Id`` of the
``AssessmentSection``
arg: item_id (osid.id.Id): ``Id`` of the ``Item``
return: (boolean) - ``true`` if there is a next unanswered
... | [
"Tests",
"if",
"there",
"is",
"a",
"next",
"unanswered",
"question",
"following",
"the",
"given",
"question",
"Id",
"."
] | train | https://github.com/mitsei/dlkit/blob/445f968a175d61c8d92c0f617a3c17dc1dc7c584/dlkit/json_/assessment/sessions.py#L902-L927 |
mitsei/dlkit | dlkit/json_/assessment/sessions.py | AssessmentSession.get_next_unanswered_question | def get_next_unanswered_question(self, assessment_section_id, item_id):
"""Gets the next unanswered question in this assesment section.
arg: assessment_section_id (osid.id.Id): ``Id`` of the
``AssessmentSection``
arg: item_id (osid.id.Id): ``Id`` of the ``Item``
re... | python | def get_next_unanswered_question(self, assessment_section_id, item_id):
"""Gets the next unanswered question in this assesment section.
arg: assessment_section_id (osid.id.Id): ``Id`` of the
``AssessmentSection``
arg: item_id (osid.id.Id): ``Id`` of the ``Item``
re... | [
"def",
"get_next_unanswered_question",
"(",
"self",
",",
"assessment_section_id",
",",
"item_id",
")",
":",
"# Or this could call through to get_next_question in the section",
"questions",
"=",
"self",
".",
"get_unanswered_questions",
"(",
"assessment_section_id",
")",
"for",
... | Gets the next unanswered question in this assesment section.
arg: assessment_section_id (osid.id.Id): ``Id`` of the
``AssessmentSection``
arg: item_id (osid.id.Id): ``Id`` of the ``Item``
return: (osid.assessment.Question) - the next unanswered
question
... | [
"Gets",
"the",
"next",
"unanswered",
"question",
"in",
"this",
"assesment",
"section",
"."
] | train | https://github.com/mitsei/dlkit/blob/445f968a175d61c8d92c0f617a3c17dc1dc7c584/dlkit/json_/assessment/sessions.py#L931-L958 |
mitsei/dlkit | dlkit/json_/assessment/sessions.py | AssessmentSession.has_previous_unanswered_question | def has_previous_unanswered_question(self, assessment_section_id, item_id):
"""Tests if there is a previous unanswered question preceeding the given question ``Id``.
arg: assessment_section_id (osid.id.Id): ``Id`` of the
``AssessmentSection``
arg: item_id (osid.id.Id): ``I... | python | def has_previous_unanswered_question(self, assessment_section_id, item_id):
"""Tests if there is a previous unanswered question preceeding the given question ``Id``.
arg: assessment_section_id (osid.id.Id): ``Id`` of the
``AssessmentSection``
arg: item_id (osid.id.Id): ``I... | [
"def",
"has_previous_unanswered_question",
"(",
"self",
",",
"assessment_section_id",
",",
"item_id",
")",
":",
"# There's probably a more efficient way to implement this:",
"try",
":",
"self",
".",
"get_previous_unanswered_question",
"(",
"assessment_section_id",
",",
"item_id... | Tests if there is a previous unanswered question preceeding the given question ``Id``.
arg: assessment_section_id (osid.id.Id): ``Id`` of the
``AssessmentSection``
arg: item_id (osid.id.Id): ``Id`` of the ``Item``
return: (boolean) - ``true`` if there is a previous unanswe... | [
"Tests",
"if",
"there",
"is",
"a",
"previous",
"unanswered",
"question",
"preceeding",
"the",
"given",
"question",
"Id",
"."
] | train | https://github.com/mitsei/dlkit/blob/445f968a175d61c8d92c0f617a3c17dc1dc7c584/dlkit/json_/assessment/sessions.py#L962-L987 |
mitsei/dlkit | dlkit/json_/assessment/sessions.py | AssessmentSession.get_previous_unanswered_question | def get_previous_unanswered_question(self, assessment_section_id, item_id):
"""Gets the previous unanswered question in this assesment section.
arg: assessment_section_id (osid.id.Id): ``Id`` of the
``AssessmentSection``
arg: item_id (osid.id.Id): ``Id`` of the ``Item``
... | python | def get_previous_unanswered_question(self, assessment_section_id, item_id):
"""Gets the previous unanswered question in this assesment section.
arg: assessment_section_id (osid.id.Id): ``Id`` of the
``AssessmentSection``
arg: item_id (osid.id.Id): ``Id`` of the ``Item``
... | [
"def",
"get_previous_unanswered_question",
"(",
"self",
",",
"assessment_section_id",
",",
"item_id",
")",
":",
"# Or this could call through to get_next_question in the section with reverse=True",
"questions",
"=",
"self",
".",
"get_unanswered_questions",
"(",
"assessment_section_... | Gets the previous unanswered question in this assesment section.
arg: assessment_section_id (osid.id.Id): ``Id`` of the
``AssessmentSection``
arg: item_id (osid.id.Id): ``Id`` of the ``Item``
return: (osid.assessment.Question) - the previous unanswered
ques... | [
"Gets",
"the",
"previous",
"unanswered",
"question",
"in",
"this",
"assesment",
"section",
"."
] | train | https://github.com/mitsei/dlkit/blob/445f968a175d61c8d92c0f617a3c17dc1dc7c584/dlkit/json_/assessment/sessions.py#L991-L1020 |
mitsei/dlkit | dlkit/json_/assessment/sessions.py | AssessmentSession.get_response | def get_response(self, assessment_section_id, item_id):
"""Gets the submitted response to the associated item.
arg: assessment_section_id (osid.id.Id): ``Id`` of the
``AssessmentSection``
arg: item_id (osid.id.Id): ``Id`` of the ``Item``
return: (osid.assessment.Re... | python | def get_response(self, assessment_section_id, item_id):
"""Gets the submitted response to the associated item.
arg: assessment_section_id (osid.id.Id): ``Id`` of the
``AssessmentSection``
arg: item_id (osid.id.Id): ``Id`` of the ``Item``
return: (osid.assessment.Re... | [
"def",
"get_response",
"(",
"self",
",",
"assessment_section_id",
",",
"item_id",
")",
":",
"return",
"self",
".",
"get_assessment_section",
"(",
"assessment_section_id",
")",
".",
"get_response",
"(",
"question_id",
"=",
"item_id",
")"
] | Gets the submitted response to the associated item.
arg: assessment_section_id (osid.id.Id): ``Id`` of the
``AssessmentSection``
arg: item_id (osid.id.Id): ``Id`` of the ``Item``
return: (osid.assessment.Response) - the response
raise: IllegalState - ``has_assessm... | [
"Gets",
"the",
"submitted",
"response",
"to",
"the",
"associated",
"item",
"."
] | train | https://github.com/mitsei/dlkit/blob/445f968a175d61c8d92c0f617a3c17dc1dc7c584/dlkit/json_/assessment/sessions.py#L1024-L1042 |
mitsei/dlkit | dlkit/json_/assessment/sessions.py | AssessmentSession.clear_response | def clear_response(self, assessment_section_id, item_id):
"""Clears the response to an item The item appears as unanswered.
If no response exists, the method simply returns.
arg: assessment_section_id (osid.id.Id): ``Id`` of the
``AssessmentSection``
arg: item_id ... | python | def clear_response(self, assessment_section_id, item_id):
"""Clears the response to an item The item appears as unanswered.
If no response exists, the method simply returns.
arg: assessment_section_id (osid.id.Id): ``Id`` of the
``AssessmentSection``
arg: item_id ... | [
"def",
"clear_response",
"(",
"self",
",",
"assessment_section_id",
",",
"item_id",
")",
":",
"if",
"(",
"not",
"self",
".",
"has_assessment_section_begun",
"(",
"assessment_section_id",
")",
"or",
"self",
".",
"is_assessment_section_over",
"(",
"assessment_section_id... | Clears the response to an item The item appears as unanswered.
If no response exists, the method simply returns.
arg: assessment_section_id (osid.id.Id): ``Id`` of the
``AssessmentSection``
arg: item_id (osid.id.Id): ``Id`` of the ``Item``
raise: IllegalState - `... | [
"Clears",
"the",
"response",
"to",
"an",
"item",
"The",
"item",
"appears",
"as",
"unanswered",
"."
] | train | https://github.com/mitsei/dlkit/blob/445f968a175d61c8d92c0f617a3c17dc1dc7c584/dlkit/json_/assessment/sessions.py#L1064-L1087 |
mitsei/dlkit | dlkit/json_/assessment/sessions.py | AssessmentSession.finish_assessment_section | def finish_assessment_section(self, assessment_section_id):
"""Indicates an assessment section is complete.
Finished sections may or may not allow new or updated responses.
arg: assessment_section_id (osid.id.Id): ``Id`` of the
``AssessmentSection``
raise: IllegalSt... | python | def finish_assessment_section(self, assessment_section_id):
"""Indicates an assessment section is complete.
Finished sections may or may not allow new or updated responses.
arg: assessment_section_id (osid.id.Id): ``Id`` of the
``AssessmentSection``
raise: IllegalSt... | [
"def",
"finish_assessment_section",
"(",
"self",
",",
"assessment_section_id",
")",
":",
"if",
"(",
"not",
"self",
".",
"has_assessment_section_begun",
"(",
"assessment_section_id",
")",
"or",
"self",
".",
"is_assessment_section_over",
"(",
"assessment_section_id",
")",... | Indicates an assessment section is complete.
Finished sections may or may not allow new or updated responses.
arg: assessment_section_id (osid.id.Id): ``Id`` of the
``AssessmentSection``
raise: IllegalState - ``has_assessment_section_begun()`` is
``false or ... | [
"Indicates",
"an",
"assessment",
"section",
"is",
"complete",
"."
] | train | https://github.com/mitsei/dlkit/blob/445f968a175d61c8d92c0f617a3c17dc1dc7c584/dlkit/json_/assessment/sessions.py#L1091-L1110 |
mitsei/dlkit | dlkit/json_/assessment/sessions.py | AssessmentSession.is_answer_available | def is_answer_available(self, assessment_section_id, item_id):
"""Tests if an answer is available for the given item.
arg: assessment_section_id (osid.id.Id): ``Id`` of the
``AssessmentSection``
arg: item_id (osid.id.Id): ``Id`` of the ``Item``
return: (boolean) - ... | python | def is_answer_available(self, assessment_section_id, item_id):
"""Tests if an answer is available for the given item.
arg: assessment_section_id (osid.id.Id): ``Id`` of the
``AssessmentSection``
arg: item_id (osid.id.Id): ``Id`` of the ``Item``
return: (boolean) - ... | [
"def",
"is_answer_available",
"(",
"self",
",",
"assessment_section_id",
",",
"item_id",
")",
":",
"# Note: we need more settings elsewhere to indicate answer available conditions",
"# This makes the simple assumption that answers are available only when",
"# a response has been submitted fo... | Tests if an answer is available for the given item.
arg: assessment_section_id (osid.id.Id): ``Id`` of the
``AssessmentSection``
arg: item_id (osid.id.Id): ``Id`` of the ``Item``
return: (boolean) - ``true`` if an answer are available,
``false`` otherwise
... | [
"Tests",
"if",
"an",
"answer",
"is",
"available",
"for",
"the",
"given",
"item",
"."
] | train | https://github.com/mitsei/dlkit/blob/445f968a175d61c8d92c0f617a3c17dc1dc7c584/dlkit/json_/assessment/sessions.py#L1114-L1142 |
mitsei/dlkit | dlkit/json_/assessment/sessions.py | AssessmentSession.get_answers | def get_answers(self, assessment_section_id, item_id):
"""Gets the acceptable answers to the associated item.
arg: assessment_section_id (osid.id.Id): ``Id`` of the
``AssessmentSection``
arg: item_id (osid.id.Id): ``Id`` of the ``Item``
return: (osid.assessment.Ans... | python | def get_answers(self, assessment_section_id, item_id):
"""Gets the acceptable answers to the associated item.
arg: assessment_section_id (osid.id.Id): ``Id`` of the
``AssessmentSection``
arg: item_id (osid.id.Id): ``Id`` of the ``Item``
return: (osid.assessment.Ans... | [
"def",
"get_answers",
"(",
"self",
",",
"assessment_section_id",
",",
"item_id",
")",
":",
"if",
"self",
".",
"is_answer_available",
"(",
"assessment_section_id",
",",
"item_id",
")",
":",
"return",
"self",
".",
"get_assessment_section",
"(",
"assessment_section_id"... | Gets the acceptable answers to the associated item.
arg: assessment_section_id (osid.id.Id): ``Id`` of the
``AssessmentSection``
arg: item_id (osid.id.Id): ``Id`` of the ``Item``
return: (osid.assessment.AnswerList) - the answers
raise: IllegalState - ``is_answer_... | [
"Gets",
"the",
"acceptable",
"answers",
"to",
"the",
"associated",
"item",
"."
] | train | https://github.com/mitsei/dlkit/blob/445f968a175d61c8d92c0f617a3c17dc1dc7c584/dlkit/json_/assessment/sessions.py#L1146-L1165 |
mitsei/dlkit | dlkit/json_/assessment/sessions.py | AssessmentSession.finish_assessment | def finish_assessment(self, assessment_taken_id):
"""Indicates the entire assessment is complete.
arg: assessment_taken_id (osid.id.Id): ``Id`` of the
``AssessmentTaken``
raise: IllegalState - ``has_begun()`` is ``false or is_over()``
is ``true``
rais... | python | def finish_assessment(self, assessment_taken_id):
"""Indicates the entire assessment is complete.
arg: assessment_taken_id (osid.id.Id): ``Id`` of the
``AssessmentTaken``
raise: IllegalState - ``has_begun()`` is ``false or is_over()``
is ``true``
rais... | [
"def",
"finish_assessment",
"(",
"self",
",",
"assessment_taken_id",
")",
":",
"assessment_taken",
"=",
"self",
".",
"_get_assessment_taken",
"(",
"assessment_taken_id",
")",
"assessment_taken_map",
"=",
"assessment_taken",
".",
"_my_map",
"if",
"assessment_taken",
".",... | Indicates the entire assessment is complete.
arg: assessment_taken_id (osid.id.Id): ``Id`` of the
``AssessmentTaken``
raise: IllegalState - ``has_begun()`` is ``false or is_over()``
is ``true``
raise: NotFound - ``assessment_taken_id`` is not found
r... | [
"Indicates",
"the",
"entire",
"assessment",
"is",
"complete",
"."
] | train | https://github.com/mitsei/dlkit/blob/445f968a175d61c8d92c0f617a3c17dc1dc7c584/dlkit/json_/assessment/sessions.py#L1169-L1193 |
mitsei/dlkit | dlkit/json_/assessment/sessions.py | AssessmentSession._get_assessment_taken | def _get_assessment_taken(self, assessment_taken_id):
"""Helper method for getting an AssessmentTaken objects given an Id."""
if assessment_taken_id not in self._assessments_taken:
mgr = self._get_provider_manager('ASSESSMENT')
lookup_session = mgr.get_assessment_taken_lookup_ses... | python | def _get_assessment_taken(self, assessment_taken_id):
"""Helper method for getting an AssessmentTaken objects given an Id."""
if assessment_taken_id not in self._assessments_taken:
mgr = self._get_provider_manager('ASSESSMENT')
lookup_session = mgr.get_assessment_taken_lookup_ses... | [
"def",
"_get_assessment_taken",
"(",
"self",
",",
"assessment_taken_id",
")",
":",
"if",
"assessment_taken_id",
"not",
"in",
"self",
".",
"_assessments_taken",
":",
"mgr",
"=",
"self",
".",
"_get_provider_manager",
"(",
"'ASSESSMENT'",
")",
"lookup_session",
"=",
... | Helper method for getting an AssessmentTaken objects given an Id. | [
"Helper",
"method",
"for",
"getting",
"an",
"AssessmentTaken",
"objects",
"given",
"an",
"Id",
"."
] | train | https://github.com/mitsei/dlkit/blob/445f968a175d61c8d92c0f617a3c17dc1dc7c584/dlkit/json_/assessment/sessions.py#L1195-L1203 |
mitsei/dlkit | dlkit/json_/assessment/sessions.py | AssessmentResultsSession.get_items | def get_items(self, assessment_taken_id):
"""Gets the items questioned in a assessment.
arg: assessment_taken_id (osid.id.Id): ``Id`` of the
``AssessmentTaken``
return: (osid.assessment.ItemList) - the list of assessment
questions
raise: NotFound - ``... | python | def get_items(self, assessment_taken_id):
"""Gets the items questioned in a assessment.
arg: assessment_taken_id (osid.id.Id): ``Id`` of the
``AssessmentTaken``
return: (osid.assessment.ItemList) - the list of assessment
questions
raise: NotFound - ``... | [
"def",
"get_items",
"(",
"self",
",",
"assessment_taken_id",
")",
":",
"mgr",
"=",
"self",
".",
"_get_provider_manager",
"(",
"'ASSESSMENT'",
",",
"local",
"=",
"True",
")",
"taken_lookup_session",
"=",
"mgr",
".",
"get_assessment_taken_lookup_session",
"(",
"prox... | Gets the items questioned in a assessment.
arg: assessment_taken_id (osid.id.Id): ``Id`` of the
``AssessmentTaken``
return: (osid.assessment.ItemList) - the list of assessment
questions
raise: NotFound - ``assessment_taken_id`` is not found
raise: Nu... | [
"Gets",
"the",
"items",
"questioned",
"in",
"a",
"assessment",
"."
] | train | https://github.com/mitsei/dlkit/blob/445f968a175d61c8d92c0f617a3c17dc1dc7c584/dlkit/json_/assessment/sessions.py#L1272-L1300 |
mitsei/dlkit | dlkit/json_/assessment/sessions.py | AssessmentResultsSession.get_responses | def get_responses(self, assessment_taken_id):
"""Gets the submitted responses.
arg: assessment_taken_id (osid.id.Id): ``Id`` of the
``AssessmentTaken``
return: (osid.assessment.ResponseList) - the submitted answers
raise: NotFound - ``assessment_taken_id`` is not fou... | python | def get_responses(self, assessment_taken_id):
"""Gets the submitted responses.
arg: assessment_taken_id (osid.id.Id): ``Id`` of the
``AssessmentTaken``
return: (osid.assessment.ResponseList) - the submitted answers
raise: NotFound - ``assessment_taken_id`` is not fou... | [
"def",
"get_responses",
"(",
"self",
",",
"assessment_taken_id",
")",
":",
"mgr",
"=",
"self",
".",
"_get_provider_manager",
"(",
"'ASSESSMENT'",
",",
"local",
"=",
"True",
")",
"taken_lookup_session",
"=",
"mgr",
".",
"get_assessment_taken_lookup_session",
"(",
"... | Gets the submitted responses.
arg: assessment_taken_id (osid.id.Id): ``Id`` of the
``AssessmentTaken``
return: (osid.assessment.ResponseList) - the submitted answers
raise: NotFound - ``assessment_taken_id`` is not found
raise: NullArgument - ``assessment_taken_id``... | [
"Gets",
"the",
"submitted",
"responses",
"."
] | train | https://github.com/mitsei/dlkit/blob/445f968a175d61c8d92c0f617a3c17dc1dc7c584/dlkit/json_/assessment/sessions.py#L1303-L1327 |
mitsei/dlkit | dlkit/json_/assessment/sessions.py | ItemLookupSession.get_item | def get_item(self, item_id):
"""Gets the ``Item`` specified by its ``Id``.
In plenary mode, the exact ``Id`` is found or a ``NotFound``
results. Otherwise, the returned ``Item`` may have a different
``Id`` than requested, such as the case where a duplicate ``Id``
was assigned to... | python | def get_item(self, item_id):
"""Gets the ``Item`` specified by its ``Id``.
In plenary mode, the exact ``Id`` is found or a ``NotFound``
results. Otherwise, the returned ``Item`` may have a different
``Id`` than requested, such as the case where a duplicate ``Id``
was assigned to... | [
"def",
"get_item",
"(",
"self",
",",
"item_id",
")",
":",
"# Implemented from template for",
"# osid.resource.ResourceLookupSession.get_resource",
"# NOTE: This implementation currently ignores plenary view",
"collection",
"=",
"JSONClientValidated",
"(",
"'assessment'",
",",
"coll... | Gets the ``Item`` specified by its ``Id``.
In plenary mode, the exact ``Id`` is found or a ``NotFound``
results. Otherwise, the returned ``Item`` may have a different
``Id`` than requested, such as the case where a duplicate ``Id``
was assigned to an ``Item`` and retained for compatibil... | [
"Gets",
"the",
"Item",
"specified",
"by",
"its",
"Id",
"."
] | train | https://github.com/mitsei/dlkit/blob/445f968a175d61c8d92c0f617a3c17dc1dc7c584/dlkit/json_/assessment/sessions.py#L1487-L1514 |
mitsei/dlkit | dlkit/json_/assessment/sessions.py | ItemLookupSession.get_items_by_ids | def get_items_by_ids(self, item_ids):
"""Gets an ``ItemList`` corresponding to the given ``IdList``.
In plenary mode, the returned list contains all of the items
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_items_by_ids(self, item_ids):
"""Gets an ``ItemList`` corresponding to the given ``IdList``.
In plenary mode, the returned list contains all of the items
specified in the ``Id`` list, in the order of the list,
including duplicates, or an error results if an ``Id`` in the
... | [
"def",
"get_items_by_ids",
"(",
"self",
",",
"item_ids",
")",
":",
"# Implemented from template for",
"# osid.resource.ResourceLookupSession.get_resources_by_ids",
"# NOTE: This implementation currently ignores plenary view",
"collection",
"=",
"JSONClientValidated",
"(",
"'assessment'... | Gets an ``ItemList`` corresponding to the given ``IdList``.
In plenary mode, the returned list contains all of the items
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. Othe... | [
"Gets",
"an",
"ItemList",
"corresponding",
"to",
"the",
"given",
"IdList",
"."
] | train | https://github.com/mitsei/dlkit/blob/445f968a175d61c8d92c0f617a3c17dc1dc7c584/dlkit/json_/assessment/sessions.py#L1517-L1557 |
mitsei/dlkit | dlkit/json_/assessment/sessions.py | ItemLookupSession.get_items_by_genus_type | def get_items_by_genus_type(self, item_genus_type):
"""Gets an ``ItemList`` corresponding to the given assessment item genus ``Type`` which does not include assessment items of genus types derived from the specified ``Type``.
In plenary mode, the returned list contains all known assessment
item... | python | def get_items_by_genus_type(self, item_genus_type):
"""Gets an ``ItemList`` corresponding to the given assessment item genus ``Type`` which does not include assessment items of genus types derived from the specified ``Type``.
In plenary mode, the returned list contains all known assessment
item... | [
"def",
"get_items_by_genus_type",
"(",
"self",
",",
"item_genus_type",
")",
":",
"# Implemented from template for",
"# osid.resource.ResourceLookupSession.get_resources_by_genus_type",
"# NOTE: This implementation currently ignores plenary view",
"collection",
"=",
"JSONClientValidated",
... | Gets an ``ItemList`` corresponding to the given assessment item genus ``Type`` which does not include assessment items of genus types derived from the specified ``Type``.
In plenary mode, the returned list contains all known assessment
items or an error results. Otherwise, the returned list may
... | [
"Gets",
"an",
"ItemList",
"corresponding",
"to",
"the",
"given",
"assessment",
"item",
"genus",
"Type",
"which",
"does",
"not",
"include",
"assessment",
"items",
"of",
"genus",
"types",
"derived",
"from",
"the",
"specified",
"Type",
"."
] | train | https://github.com/mitsei/dlkit/blob/445f968a175d61c8d92c0f617a3c17dc1dc7c584/dlkit/json_/assessment/sessions.py#L1560-L1586 |
mitsei/dlkit | dlkit/json_/assessment/sessions.py | ItemLookupSession.get_items | def get_items(self):
"""Gets all ``Items``.
In plenary mode, the returned list contains all known items or
an error results. Otherwise, the returned list may contain only
those items that are accessible through this session.
return: (osid.assessment.ItemList) - a list of ``Item... | python | def get_items(self):
"""Gets all ``Items``.
In plenary mode, the returned list contains all known items or
an error results. Otherwise, the returned list may contain only
those items that are accessible through this session.
return: (osid.assessment.ItemList) - a list of ``Item... | [
"def",
"get_items",
"(",
"self",
")",
":",
"# Implemented from template for",
"# osid.resource.ResourceLookupSession.get_resources",
"# NOTE: This implementation currently ignores plenary view",
"collection",
"=",
"JSONClientValidated",
"(",
"'assessment'",
",",
"collection",
"=",
... | Gets all ``Items``.
In plenary mode, the returned list contains all known items or
an error results. Otherwise, the returned list may contain only
those items that are accessible through this session.
return: (osid.assessment.ItemList) - a list of ``Items``
raise: OperationFai... | [
"Gets",
"all",
"Items",
"."
] | train | https://github.com/mitsei/dlkit/blob/445f968a175d61c8d92c0f617a3c17dc1dc7c584/dlkit/json_/assessment/sessions.py#L1705-L1725 |
mitsei/dlkit | dlkit/json_/assessment/sessions.py | ItemQuerySession.get_items_by_query | def get_items_by_query(self, item_query):
"""Gets a list of ``Items`` matching the given item query.
arg: item_query (osid.assessment.ItemQuery): the item query
return: (osid.assessment.ItemList) - the returned ``ItemList``
raise: NullArgument - ``item_query`` is ``null``
ra... | python | def get_items_by_query(self, item_query):
"""Gets a list of ``Items`` matching the given item query.
arg: item_query (osid.assessment.ItemQuery): the item query
return: (osid.assessment.ItemList) - the returned ``ItemList``
raise: NullArgument - ``item_query`` is ``null``
ra... | [
"def",
"get_items_by_query",
"(",
"self",
",",
"item_query",
")",
":",
"# Implemented from template for",
"# osid.resource.ResourceQuerySession.get_resources_by_query",
"and_list",
"=",
"list",
"(",
")",
"or_list",
"=",
"list",
"(",
")",
"for",
"term",
"in",
"item_query... | Gets a list of ``Items`` matching the given item query.
arg: item_query (osid.assessment.ItemQuery): the item query
return: (osid.assessment.ItemList) - the returned ``ItemList``
raise: NullArgument - ``item_query`` is ``null``
raise: OperationFailed - unable to complete request
... | [
"Gets",
"a",
"list",
"of",
"Items",
"matching",
"the",
"given",
"item",
"query",
"."
] | train | https://github.com/mitsei/dlkit/blob/445f968a175d61c8d92c0f617a3c17dc1dc7c584/dlkit/json_/assessment/sessions.py#L1854-L1892 |
mitsei/dlkit | dlkit/json_/assessment/sessions.py | ItemSearchSession.get_items_by_search | def get_items_by_search(self, item_query, item_search):
"""Gets the search results matching the given search query using the given search.
arg: item_query (osid.assessment.ItemQuery): the item query
arg: item_search (osid.assessment.ItemSearch): the item
search
ret... | python | def get_items_by_search(self, item_query, item_search):
"""Gets the search results matching the given search query using the given search.
arg: item_query (osid.assessment.ItemQuery): the item query
arg: item_search (osid.assessment.ItemSearch): the item
search
ret... | [
"def",
"get_items_by_search",
"(",
"self",
",",
"item_query",
",",
"item_search",
")",
":",
"# Implemented from template for",
"# osid.resource.ResourceSearchSession.get_resources_by_search_template",
"# Copied from osid.resource.ResourceQuerySession.get_resources_by_query_template",
"and_... | Gets the search results matching the given search query using the given search.
arg: item_query (osid.assessment.ItemQuery): the item query
arg: item_search (osid.assessment.ItemSearch): the item
search
return: (osid.assessment.ItemSearchResults) - the returned
... | [
"Gets",
"the",
"search",
"results",
"matching",
"the",
"given",
"search",
"query",
"using",
"the",
"given",
"search",
"."
] | train | https://github.com/mitsei/dlkit/blob/445f968a175d61c8d92c0f617a3c17dc1dc7c584/dlkit/json_/assessment/sessions.py#L1957-L2000 |
mitsei/dlkit | dlkit/json_/assessment/sessions.py | ItemAdminSession.get_item_form_for_create | def get_item_form_for_create(self, item_record_types):
"""Gets the assessment item form for creating new assessment items.
A new form should be requested for each create transaction.
arg: item_record_types (osid.type.Type[]): array of item
record types to be included in the ... | python | def get_item_form_for_create(self, item_record_types):
"""Gets the assessment item form for creating new assessment items.
A new form should be requested for each create transaction.
arg: item_record_types (osid.type.Type[]): array of item
record types to be included in the ... | [
"def",
"get_item_form_for_create",
"(",
"self",
",",
"item_record_types",
")",
":",
"# Implemented from template for",
"# osid.resource.ResourceAdminSession.get_resource_form_for_create_template",
"for",
"arg",
"in",
"item_record_types",
":",
"if",
"not",
"isinstance",
"(",
"ar... | Gets the assessment item form for creating new assessment items.
A new form should be requested for each create transaction.
arg: item_record_types (osid.type.Type[]): array of item
record types to be included in the create operation or
an empty list if none
... | [
"Gets",
"the",
"assessment",
"item",
"form",
"for",
"creating",
"new",
"assessment",
"items",
"."
] | train | https://github.com/mitsei/dlkit/blob/445f968a175d61c8d92c0f617a3c17dc1dc7c584/dlkit/json_/assessment/sessions.py#L2143-L2179 |
mitsei/dlkit | dlkit/json_/assessment/sessions.py | ItemAdminSession.create_item | def create_item(self, item_form):
"""Creates a new ``Item``.
arg: item_form (osid.assessment.ItemForm): the form for this
``Item``
return: (osid.assessment.Item) - the new ``Item``
raise: IllegalState - ``item_form`` already used in a create
transacti... | python | def create_item(self, item_form):
"""Creates a new ``Item``.
arg: item_form (osid.assessment.ItemForm): the form for this
``Item``
return: (osid.assessment.Item) - the new ``Item``
raise: IllegalState - ``item_form`` already used in a create
transacti... | [
"def",
"create_item",
"(",
"self",
",",
"item_form",
")",
":",
"# Implemented from template for",
"# osid.resource.ResourceAdminSession.create_resource_template",
"collection",
"=",
"JSONClientValidated",
"(",
"'assessment'",
",",
"collection",
"=",
"'Item'",
",",
"runtime",
... | Creates a new ``Item``.
arg: item_form (osid.assessment.ItemForm): the form for this
``Item``
return: (osid.assessment.Item) - the new ``Item``
raise: IllegalState - ``item_form`` already used in a create
transaction
raise: InvalidArgument - one or m... | [
"Creates",
"a",
"new",
"Item",
"."
] | train | https://github.com/mitsei/dlkit/blob/445f968a175d61c8d92c0f617a3c17dc1dc7c584/dlkit/json_/assessment/sessions.py#L2182-L2224 |
mitsei/dlkit | dlkit/json_/assessment/sessions.py | ItemAdminSession.update_item | def update_item(self, item_form):
"""Updates an existing item.
arg: item_form (osid.assessment.ItemForm): the form
containing the elements to be updated
raise: IllegalState - ``item_form`` already used in an update
transaction
raise: InvalidArgument ... | python | def update_item(self, item_form):
"""Updates an existing item.
arg: item_form (osid.assessment.ItemForm): the form
containing the elements to be updated
raise: IllegalState - ``item_form`` already used in an update
transaction
raise: InvalidArgument ... | [
"def",
"update_item",
"(",
"self",
",",
"item_form",
")",
":",
"# Implemented from template for",
"# osid.resource.ResourceAdminSession.update_resource_template",
"collection",
"=",
"JSONClientValidated",
"(",
"'assessment'",
",",
"collection",
"=",
"'Item'",
",",
"runtime",
... | Updates an existing item.
arg: item_form (osid.assessment.ItemForm): the form
containing the elements to be updated
raise: IllegalState - ``item_form`` already used in an update
transaction
raise: InvalidArgument - the form contains an invalid value
... | [
"Updates",
"an",
"existing",
"item",
"."
] | train | https://github.com/mitsei/dlkit/blob/445f968a175d61c8d92c0f617a3c17dc1dc7c584/dlkit/json_/assessment/sessions.py#L2279-L2319 |
mitsei/dlkit | dlkit/json_/assessment/sessions.py | ItemAdminSession.delete_item | def delete_item(self, item_id):
"""Deletes the ``Item`` identified by the given ``Id``.
arg: item_id (osid.id.Id): the ``Id`` of the ``Item`` to
delete
raise: NotFound - an ``Item`` was not found identified by the
given ``Id``
raise: NullArgument - `... | python | def delete_item(self, item_id):
"""Deletes the ``Item`` identified by the given ``Id``.
arg: item_id (osid.id.Id): the ``Id`` of the ``Item`` to
delete
raise: NotFound - an ``Item`` was not found identified by the
given ``Id``
raise: NullArgument - `... | [
"def",
"delete_item",
"(",
"self",
",",
"item_id",
")",
":",
"if",
"not",
"isinstance",
"(",
"item_id",
",",
"ABCId",
")",
":",
"raise",
"errors",
".",
"InvalidArgument",
"(",
"'the argument is not a valid OSID Id'",
")",
"collection",
"=",
"JSONClientValidated",
... | Deletes the ``Item`` identified by the given ``Id``.
arg: item_id (osid.id.Id): the ``Id`` of the ``Item`` to
delete
raise: NotFound - an ``Item`` was not found identified by the
given ``Id``
raise: NullArgument - ``item_id`` is ``null``
raise: Oper... | [
"Deletes",
"the",
"Item",
"identified",
"by",
"the",
"given",
"Id",
"."
] | train | https://github.com/mitsei/dlkit/blob/445f968a175d61c8d92c0f617a3c17dc1dc7c584/dlkit/json_/assessment/sessions.py#L2342-L2370 |
mitsei/dlkit | dlkit/json_/assessment/sessions.py | ItemAdminSession.alias_item | def alias_item(self, item_id, alias_id):
"""Adds an ``Id`` to an ``Item`` for the purpose of creating compatibility.
The primary ``Id`` of the ``Item`` is determined by the
provider. The new ``Id`` is an alias to the primary ``Id``. If
the alias is a pointer to another item, it is reass... | python | def alias_item(self, item_id, alias_id):
"""Adds an ``Id`` to an ``Item`` for the purpose of creating compatibility.
The primary ``Id`` of the ``Item`` is determined by the
provider. The new ``Id`` is an alias to the primary ``Id``. If
the alias is a pointer to another item, it is reass... | [
"def",
"alias_item",
"(",
"self",
",",
"item_id",
",",
"alias_id",
")",
":",
"# Implemented from template for",
"# osid.resource.ResourceAdminSession.alias_resources_template",
"self",
".",
"_alias_id",
"(",
"primary_id",
"=",
"item_id",
",",
"equivalent_id",
"=",
"alias_... | Adds an ``Id`` to an ``Item`` for the purpose of creating compatibility.
The primary ``Id`` of the ``Item`` is determined by the
provider. The new ``Id`` is an alias to the primary ``Id``. If
the alias is a pointer to another item, it is reassigned to the
given item ``Id``.
arg... | [
"Adds",
"an",
"Id",
"to",
"an",
"Item",
"for",
"the",
"purpose",
"of",
"creating",
"compatibility",
"."
] | train | https://github.com/mitsei/dlkit/blob/445f968a175d61c8d92c0f617a3c17dc1dc7c584/dlkit/json_/assessment/sessions.py#L2391-L2412 |
mitsei/dlkit | dlkit/json_/assessment/sessions.py | ItemAdminSession.get_question_form_for_create | def get_question_form_for_create(self, item_id, question_record_types):
"""Gets the question form for creating new questions.
A new form should be requested for each create transaction.
arg: item_id (osid.id.Id): an assessment item ``Id``
arg: question_record_types (osid.type.Typ... | python | def get_question_form_for_create(self, item_id, question_record_types):
"""Gets the question form for creating new questions.
A new form should be requested for each create transaction.
arg: item_id (osid.id.Id): an assessment item ``Id``
arg: question_record_types (osid.type.Typ... | [
"def",
"get_question_form_for_create",
"(",
"self",
",",
"item_id",
",",
"question_record_types",
")",
":",
"# Implemented from template for",
"# osid.learning.ActivityAdminSession.get_activity_form_for_create_template",
"if",
"not",
"isinstance",
"(",
"item_id",
",",
"ABCId",
... | Gets the question form for creating new questions.
A new form should be requested for each create transaction.
arg: item_id (osid.id.Id): an assessment item ``Id``
arg: question_record_types (osid.type.Type[]): array of
question record types to be included in the create
... | [
"Gets",
"the",
"question",
"form",
"for",
"creating",
"new",
"questions",
"."
] | train | https://github.com/mitsei/dlkit/blob/445f968a175d61c8d92c0f617a3c17dc1dc7c584/dlkit/json_/assessment/sessions.py#L2460-L2504 |
mitsei/dlkit | dlkit/json_/assessment/sessions.py | ItemAdminSession.get_question_form_for_update | def get_question_form_for_update(self, question_id):
"""Gets the question form for updating an existing question.
A new question form should be requested for each update
transaction.
arg: question_id (osid.id.Id): the ``Id`` of the ``Question``
return: (osid.assessment.Quest... | python | def get_question_form_for_update(self, question_id):
"""Gets the question form for updating an existing question.
A new question form should be requested for each update
transaction.
arg: question_id (osid.id.Id): the ``Id`` of the ``Question``
return: (osid.assessment.Quest... | [
"def",
"get_question_form_for_update",
"(",
"self",
",",
"question_id",
")",
":",
"collection",
"=",
"JSONClientValidated",
"(",
"'assessment'",
",",
"collection",
"=",
"'Item'",
",",
"runtime",
"=",
"self",
".",
"_runtime",
")",
"if",
"not",
"isinstance",
"(",
... | Gets the question form for updating an existing question.
A new question form should be requested for each update
transaction.
arg: question_id (osid.id.Id): the ``Id`` of the ``Question``
return: (osid.assessment.QuestionForm) - the question form
raise: NotFound - ``questi... | [
"Gets",
"the",
"question",
"form",
"for",
"updating",
"an",
"existing",
"question",
"."
] | train | https://github.com/mitsei/dlkit/blob/445f968a175d61c8d92c0f617a3c17dc1dc7c584/dlkit/json_/assessment/sessions.py#L2578-L2603 |
mitsei/dlkit | dlkit/json_/assessment/sessions.py | ItemAdminSession.update_question | def update_question(self, question_form):
"""Updates an existing question.
arg: question_form (osid.assessment.QuestionForm): the form
containing the elements to be updated
raise: IllegalState - ``question_form`` already used in an
update transaction
... | python | def update_question(self, question_form):
"""Updates an existing question.
arg: question_form (osid.assessment.QuestionForm): the form
containing the elements to be updated
raise: IllegalState - ``question_form`` already used in an
update transaction
... | [
"def",
"update_question",
"(",
"self",
",",
"question_form",
")",
":",
"collection",
"=",
"JSONClientValidated",
"(",
"'assessment'",
",",
"collection",
"=",
"'Item'",
",",
"runtime",
"=",
"self",
".",
"_runtime",
")",
"if",
"not",
"isinstance",
"(",
"question... | Updates an existing question.
arg: question_form (osid.assessment.QuestionForm): the form
containing the elements to be updated
raise: IllegalState - ``question_form`` already used in an
update transaction
raise: InvalidArgument - the form contains an invali... | [
"Updates",
"an",
"existing",
"question",
"."
] | train | https://github.com/mitsei/dlkit/blob/445f968a175d61c8d92c0f617a3c17dc1dc7c584/dlkit/json_/assessment/sessions.py#L2606-L2648 |
mitsei/dlkit | dlkit/json_/assessment/sessions.py | ItemAdminSession.delete_question | def delete_question(self, question_id):
"""Deletes the ``Question`` identified by the given ``Id``.
arg: question_id (osid.id.Id): the ``Id`` of the ``Question``
to delete
raise: NotFound - a ``Question`` was not found identified by
the given ``Id``
r... | python | def delete_question(self, question_id):
"""Deletes the ``Question`` identified by the given ``Id``.
arg: question_id (osid.id.Id): the ``Id`` of the ``Question``
to delete
raise: NotFound - a ``Question`` was not found identified by
the given ``Id``
r... | [
"def",
"delete_question",
"(",
"self",
",",
"question_id",
")",
":",
"collection",
"=",
"JSONClientValidated",
"(",
"'assessment'",
",",
"collection",
"=",
"'Item'",
",",
"runtime",
"=",
"self",
".",
"_runtime",
")",
"if",
"not",
"isinstance",
"(",
"question_i... | Deletes the ``Question`` identified by the given ``Id``.
arg: question_id (osid.id.Id): the ``Id`` of the ``Question``
to delete
raise: NotFound - a ``Question`` was not found identified by
the given ``Id``
raise: NullArgument - ``question_id`` is ``null``
... | [
"Deletes",
"the",
"Question",
"identified",
"by",
"the",
"given",
"Id",
"."
] | train | https://github.com/mitsei/dlkit/blob/445f968a175d61c8d92c0f617a3c17dc1dc7c584/dlkit/json_/assessment/sessions.py#L2671-L2692 |
mitsei/dlkit | dlkit/json_/assessment/sessions.py | ItemAdminSession.create_answer | def create_answer(self, answer_form):
"""Creates a new ``Answer``.
arg: answer_form (osid.assessment.AnswerForm): the form for
this ``Answer``
return: (osid.assessment.Answer) - the new ``Answer``
raise: IllegalState - ``answer_form`` already used in a create
... | python | def create_answer(self, answer_form):
"""Creates a new ``Answer``.
arg: answer_form (osid.assessment.AnswerForm): the form for
this ``Answer``
return: (osid.assessment.Answer) - the new ``Answer``
raise: IllegalState - ``answer_form`` already used in a create
... | [
"def",
"create_answer",
"(",
"self",
",",
"answer_form",
")",
":",
"# Implemented from template for",
"# osid.repository.AssetAdminSession.create_asset_content_template",
"from",
"dlkit",
".",
"abstract_osid",
".",
"assessment",
".",
"objects",
"import",
"AnswerForm",
"as",
... | Creates a new ``Answer``.
arg: answer_form (osid.assessment.AnswerForm): the form for
this ``Answer``
return: (osid.assessment.Answer) - the new ``Answer``
raise: IllegalState - ``answer_form`` already used in a create
transaction
raise: InvalidArgum... | [
"Creates",
"a",
"new",
"Answer",
"."
] | train | https://github.com/mitsei/dlkit/blob/445f968a175d61c8d92c0f617a3c17dc1dc7c584/dlkit/json_/assessment/sessions.py#L2787-L2835 |
mitsei/dlkit | dlkit/json_/assessment/sessions.py | ItemAdminSession.update_answer | def update_answer(self, answer_form):
"""Updates an existing answer.
arg: answer_form (osid.assessment.AnswerForm): the form
containing the elements to be updated
raise: IllegalState - ``answer_form`` already used in an update
transaction
raise: Inva... | python | def update_answer(self, answer_form):
"""Updates an existing answer.
arg: answer_form (osid.assessment.AnswerForm): the form
containing the elements to be updated
raise: IllegalState - ``answer_form`` already used in an update
transaction
raise: Inva... | [
"def",
"update_answer",
"(",
"self",
",",
"answer_form",
")",
":",
"# Implemented from template for",
"# osid.repository.AssetAdminSession.update_asset_content_template",
"from",
"dlkit",
".",
"abstract_osid",
".",
"assessment",
".",
"objects",
"import",
"AnswerForm",
"as",
... | Updates an existing answer.
arg: answer_form (osid.assessment.AnswerForm): the form
containing the elements to be updated
raise: IllegalState - ``answer_form`` already used in an update
transaction
raise: InvalidArgument - the form contains an invalid value
... | [
"Updates",
"an",
"existing",
"answer",
"."
] | train | https://github.com/mitsei/dlkit/blob/445f968a175d61c8d92c0f617a3c17dc1dc7c584/dlkit/json_/assessment/sessions.py#L2895-L2954 |
mitsei/dlkit | dlkit/json_/assessment/sessions.py | ItemAdminSession.delete_answer | def delete_answer(self, answer_id):
"""Deletes the ``Answer`` identified by the given ``Id``.
arg: answer_id (osid.id.Id): the ``Id`` of the ``Answer`` to
delete
raise: NotFound - an ``Answer`` was not found identified by the
given ``Id``
raise: Null... | python | def delete_answer(self, answer_id):
"""Deletes the ``Answer`` identified by the given ``Id``.
arg: answer_id (osid.id.Id): the ``Id`` of the ``Answer`` to
delete
raise: NotFound - an ``Answer`` was not found identified by the
given ``Id``
raise: Null... | [
"def",
"delete_answer",
"(",
"self",
",",
"answer_id",
")",
":",
"# Implemented from template for",
"# osid.repository.AssetAdminSession.delete_asset_content_template",
"from",
"dlkit",
".",
"abstract_osid",
".",
"id",
".",
"primitives",
"import",
"Id",
"as",
"ABCId",
"fr... | Deletes the ``Answer`` identified by the given ``Id``.
arg: answer_id (osid.id.Id): the ``Id`` of the ``Answer`` to
delete
raise: NotFound - an ``Answer`` was not found identified by the
given ``Id``
raise: NullArgument - ``answer_id`` is ``null``
ra... | [
"Deletes",
"the",
"Answer",
"identified",
"by",
"the",
"given",
"Id",
"."
] | train | https://github.com/mitsei/dlkit/blob/445f968a175d61c8d92c0f617a3c17dc1dc7c584/dlkit/json_/assessment/sessions.py#L2977-L3014 |
mitsei/dlkit | dlkit/json_/assessment/sessions.py | ItemNotificationSession.register_for_deleted_item | def register_for_deleted_item(self, item_id):
"""Registers for notification of a deleted assessment item.
``ItemReceiver.deletedItems()`` is invoked when the specified
assessment item is removed from the assessment bank.
arg: item_id (osid.id.Id): the ``Id`` of the ``Item`` to
... | python | def register_for_deleted_item(self, item_id):
"""Registers for notification of a deleted assessment item.
``ItemReceiver.deletedItems()`` is invoked when the specified
assessment item is removed from the assessment bank.
arg: item_id (osid.id.Id): the ``Id`` of the ``Item`` to
... | [
"def",
"register_for_deleted_item",
"(",
"self",
",",
"item_id",
")",
":",
"# Implemented from template for",
"# osid.resource.ResourceNotificationSession.register_for_deleted_resource",
"if",
"not",
"MONGO_LISTENER",
".",
"receivers",
"[",
"self",
".",
"_ns",
"]",
"[",
"se... | Registers for notification of a deleted assessment item.
``ItemReceiver.deletedItems()`` is invoked when the specified
assessment item is removed from the assessment bank.
arg: item_id (osid.id.Id): the ``Id`` of the ``Item`` to
monitor
raise: NotFound - an ``Item``... | [
"Registers",
"for",
"notification",
"of",
"a",
"deleted",
"assessment",
"item",
"."
] | train | https://github.com/mitsei/dlkit/blob/445f968a175d61c8d92c0f617a3c17dc1dc7c584/dlkit/json_/assessment/sessions.py#L3276-L3297 |
mitsei/dlkit | dlkit/json_/assessment/sessions.py | ItemBankSession.get_item_ids_by_bank | def get_item_ids_by_bank(self, bank_id):
"""Gets the list of ``Item`` ``Ids`` associated with a ``Bank``.
arg: bank_id (osid.id.Id): ``Id`` of the ``Bank``
return: (osid.id.IdList) - list of related item ``Ids``
raise: NotFound - ``bank_id`` is not found
raise: NullArgumen... | python | def get_item_ids_by_bank(self, bank_id):
"""Gets the list of ``Item`` ``Ids`` associated with a ``Bank``.
arg: bank_id (osid.id.Id): ``Id`` of the ``Bank``
return: (osid.id.IdList) - list of related item ``Ids``
raise: NotFound - ``bank_id`` is not found
raise: NullArgumen... | [
"def",
"get_item_ids_by_bank",
"(",
"self",
",",
"bank_id",
")",
":",
"# Implemented from template for",
"# osid.resource.ResourceBinSession.get_resource_ids_by_bin",
"id_list",
"=",
"[",
"]",
"for",
"item",
"in",
"self",
".",
"get_items_by_bank",
"(",
"bank_id",
")",
"... | Gets the list of ``Item`` ``Ids`` associated with a ``Bank``.
arg: bank_id (osid.id.Id): ``Id`` of the ``Bank``
return: (osid.id.IdList) - list of related item ``Ids``
raise: NotFound - ``bank_id`` is not found
raise: NullArgument - ``bank_id`` is ``null``
raise: Operatio... | [
"Gets",
"the",
"list",
"of",
"Item",
"Ids",
"associated",
"with",
"a",
"Bank",
"."
] | train | https://github.com/mitsei/dlkit/blob/445f968a175d61c8d92c0f617a3c17dc1dc7c584/dlkit/json_/assessment/sessions.py#L3411-L3428 |
mitsei/dlkit | dlkit/json_/assessment/sessions.py | ItemBankSession.get_items_by_bank | def get_items_by_bank(self, bank_id):
"""Gets the list of ``Items`` associated with a ``Bank``.
arg: bank_id (osid.id.Id): ``Id`` of the ``Bank``
return: (osid.assessment.ItemList) - list of related items
raise: NotFound - ``bank_id`` is not found
raise: NullArgument - ``ba... | python | def get_items_by_bank(self, bank_id):
"""Gets the list of ``Items`` associated with a ``Bank``.
arg: bank_id (osid.id.Id): ``Id`` of the ``Bank``
return: (osid.assessment.ItemList) - list of related items
raise: NotFound - ``bank_id`` is not found
raise: NullArgument - ``ba... | [
"def",
"get_items_by_bank",
"(",
"self",
",",
"bank_id",
")",
":",
"# Implemented from template for",
"# osid.resource.ResourceBinSession.get_resources_by_bin",
"mgr",
"=",
"self",
".",
"_get_provider_manager",
"(",
"'ASSESSMENT'",
",",
"local",
"=",
"True",
")",
"lookup_... | Gets the list of ``Items`` associated with a ``Bank``.
arg: bank_id (osid.id.Id): ``Id`` of the ``Bank``
return: (osid.assessment.ItemList) - list of related items
raise: NotFound - ``bank_id`` is not found
raise: NullArgument - ``bank_id`` is ``null``
raise: OperationFail... | [
"Gets",
"the",
"list",
"of",
"Items",
"associated",
"with",
"a",
"Bank",
"."
] | train | https://github.com/mitsei/dlkit/blob/445f968a175d61c8d92c0f617a3c17dc1dc7c584/dlkit/json_/assessment/sessions.py#L3431-L3448 |
mitsei/dlkit | dlkit/json_/assessment/sessions.py | ItemBankSession.get_item_ids_by_banks | def get_item_ids_by_banks(self, bank_ids):
"""Gets the list of ``Item Ids`` corresponding to a list of ``Banks``.
arg: bank_ids (osid.id.IdList): list of bank ``Ids``
return: (osid.id.IdList) - list of bank ``Ids``
raise: NullArgument - ``bank_ids`` is ``null``
raise: Opera... | python | def get_item_ids_by_banks(self, bank_ids):
"""Gets the list of ``Item Ids`` corresponding to a list of ``Banks``.
arg: bank_ids (osid.id.IdList): list of bank ``Ids``
return: (osid.id.IdList) - list of bank ``Ids``
raise: NullArgument - ``bank_ids`` is ``null``
raise: Opera... | [
"def",
"get_item_ids_by_banks",
"(",
"self",
",",
"bank_ids",
")",
":",
"# Implemented from template for",
"# osid.resource.ResourceBinSession.get_resource_ids_by_bins",
"id_list",
"=",
"[",
"]",
"for",
"item",
"in",
"self",
".",
"get_items_by_banks",
"(",
"bank_ids",
")"... | Gets the list of ``Item Ids`` corresponding to a list of ``Banks``.
arg: bank_ids (osid.id.IdList): list of bank ``Ids``
return: (osid.id.IdList) - list of bank ``Ids``
raise: NullArgument - ``bank_ids`` is ``null``
raise: OperationFailed - unable to complete request
raise:... | [
"Gets",
"the",
"list",
"of",
"Item",
"Ids",
"corresponding",
"to",
"a",
"list",
"of",
"Banks",
"."
] | train | https://github.com/mitsei/dlkit/blob/445f968a175d61c8d92c0f617a3c17dc1dc7c584/dlkit/json_/assessment/sessions.py#L3451-L3467 |
mitsei/dlkit | dlkit/json_/assessment/sessions.py | ItemBankSession.get_items_by_banks | def get_items_by_banks(self, bank_ids):
"""Gets the list of ``Items`` corresponding to a list of ``Banks``.
arg: bank_ids (osid.id.IdList): list of bank ``Ids``
return: (osid.assessment.ItemList) - list of items
raise: NullArgument - ``bank_ids`` is ``null``
raise: Operatio... | python | def get_items_by_banks(self, bank_ids):
"""Gets the list of ``Items`` corresponding to a list of ``Banks``.
arg: bank_ids (osid.id.IdList): list of bank ``Ids``
return: (osid.assessment.ItemList) - list of items
raise: NullArgument - ``bank_ids`` is ``null``
raise: Operatio... | [
"def",
"get_items_by_banks",
"(",
"self",
",",
"bank_ids",
")",
":",
"# Implemented from template for",
"# osid.resource.ResourceBinSession.get_resources_by_bins",
"item_list",
"=",
"[",
"]",
"for",
"bank_id",
"in",
"bank_ids",
":",
"item_list",
"+=",
"list",
"(",
"self... | Gets the list of ``Items`` corresponding to a list of ``Banks``.
arg: bank_ids (osid.id.IdList): list of bank ``Ids``
return: (osid.assessment.ItemList) - list of items
raise: NullArgument - ``bank_ids`` is ``null``
raise: OperationFailed - unable to complete request
raise:... | [
"Gets",
"the",
"list",
"of",
"Items",
"corresponding",
"to",
"a",
"list",
"of",
"Banks",
"."
] | train | https://github.com/mitsei/dlkit/blob/445f968a175d61c8d92c0f617a3c17dc1dc7c584/dlkit/json_/assessment/sessions.py#L3470-L3487 |
mitsei/dlkit | dlkit/json_/assessment/sessions.py | ItemBankSession.get_bank_ids_by_item | def get_bank_ids_by_item(self, item_id):
"""Gets the list of ``Bank`` ``Ids`` mapped to an ``Item``.
arg: item_id (osid.id.Id): ``Id`` of an ``Item``
return: (osid.id.IdList) - list of bank ``Ids``
raise: NotFound - ``item_id`` is not found
raise: NullArgument - ``item_id`... | python | def get_bank_ids_by_item(self, item_id):
"""Gets the list of ``Bank`` ``Ids`` mapped to an ``Item``.
arg: item_id (osid.id.Id): ``Id`` of an ``Item``
return: (osid.id.IdList) - list of bank ``Ids``
raise: NotFound - ``item_id`` is not found
raise: NullArgument - ``item_id`... | [
"def",
"get_bank_ids_by_item",
"(",
"self",
",",
"item_id",
")",
":",
"# Implemented from template for",
"# osid.resource.ResourceBinSession.get_bin_ids_by_resource",
"mgr",
"=",
"self",
".",
"_get_provider_manager",
"(",
"'ASSESSMENT'",
",",
"local",
"=",
"True",
")",
"l... | Gets the list of ``Bank`` ``Ids`` mapped to an ``Item``.
arg: item_id (osid.id.Id): ``Id`` of an ``Item``
return: (osid.id.IdList) - list of bank ``Ids``
raise: NotFound - ``item_id`` is not found
raise: NullArgument - ``item_id`` is ``null``
raise: OperationFailed - unab... | [
"Gets",
"the",
"list",
"of",
"Bank",
"Ids",
"mapped",
"to",
"an",
"Item",
"."
] | train | https://github.com/mitsei/dlkit/blob/445f968a175d61c8d92c0f617a3c17dc1dc7c584/dlkit/json_/assessment/sessions.py#L3490-L3511 |
mitsei/dlkit | dlkit/json_/assessment/sessions.py | ItemBankSession.get_banks_by_item | def get_banks_by_item(self, item_id):
"""Gets the list of ``Banks`` mapped to an ``Item``.
arg: item_id (osid.id.Id): ``Id`` of an ``Item``
return: (osid.assessment.BankList) - list of banks
raise: NotFound - ``item_id`` is not found
raise: NullArgument - ``item_id`` is ``n... | python | def get_banks_by_item(self, item_id):
"""Gets the list of ``Banks`` mapped to an ``Item``.
arg: item_id (osid.id.Id): ``Id`` of an ``Item``
return: (osid.assessment.BankList) - list of banks
raise: NotFound - ``item_id`` is not found
raise: NullArgument - ``item_id`` is ``n... | [
"def",
"get_banks_by_item",
"(",
"self",
",",
"item_id",
")",
":",
"# Implemented from template for",
"# osid.resource.ResourceBinSession.get_bins_by_resource",
"mgr",
"=",
"self",
".",
"_get_provider_manager",
"(",
"'ASSESSMENT'",
",",
"local",
"=",
"True",
")",
"lookup_... | Gets the list of ``Banks`` mapped to an ``Item``.
arg: item_id (osid.id.Id): ``Id`` of an ``Item``
return: (osid.assessment.BankList) - list of banks
raise: NotFound - ``item_id`` is not found
raise: NullArgument - ``item_id`` is ``null``
raise: OperationFailed - unable to... | [
"Gets",
"the",
"list",
"of",
"Banks",
"mapped",
"to",
"an",
"Item",
"."
] | train | https://github.com/mitsei/dlkit/blob/445f968a175d61c8d92c0f617a3c17dc1dc7c584/dlkit/json_/assessment/sessions.py#L3514-L3531 |
mitsei/dlkit | dlkit/json_/assessment/sessions.py | ItemBankAssignmentSession.assign_item_to_bank | def assign_item_to_bank(self, item_id, bank_id):
"""Adds an existing ``Item`` to a ``Bank``.
arg: item_id (osid.id.Id): the ``Id`` of the ``Item``
arg: bank_id (osid.id.Id): the ``Id`` of the ``Bank``
raise: AlreadyExists - ``item_id`` is already assigned to
``ban... | python | def assign_item_to_bank(self, item_id, bank_id):
"""Adds an existing ``Item`` to a ``Bank``.
arg: item_id (osid.id.Id): the ``Id`` of the ``Item``
arg: bank_id (osid.id.Id): the ``Id`` of the ``Bank``
raise: AlreadyExists - ``item_id`` is already assigned to
``ban... | [
"def",
"assign_item_to_bank",
"(",
"self",
",",
"item_id",
",",
"bank_id",
")",
":",
"# Implemented from template for",
"# osid.resource.ResourceBinAssignmentSession.assign_resource_to_bin",
"mgr",
"=",
"self",
".",
"_get_provider_manager",
"(",
"'ASSESSMENT'",
",",
"local",
... | Adds an existing ``Item`` to a ``Bank``.
arg: item_id (osid.id.Id): the ``Id`` of the ``Item``
arg: bank_id (osid.id.Id): the ``Id`` of the ``Bank``
raise: AlreadyExists - ``item_id`` is already assigned to
``bank_id``
raise: NotFound - ``item_id`` or ``bank_id``... | [
"Adds",
"an",
"existing",
"Item",
"to",
"a",
"Bank",
"."
] | train | https://github.com/mitsei/dlkit/blob/445f968a175d61c8d92c0f617a3c17dc1dc7c584/dlkit/json_/assessment/sessions.py#L3639-L3658 |
mitsei/dlkit | dlkit/json_/assessment/sessions.py | ItemBankAssignmentSession.unassign_item_from_bank | def unassign_item_from_bank(self, item_id, bank_id):
"""Removes an ``Item`` from a ``Bank``.
arg: item_id (osid.id.Id): the ``Id`` of the ``Item``
arg: bank_id (osid.id.Id): the ``Id`` of the ``Bank``
raise: NotFound - ``item_id`` or ``bank_id`` not found or
``ite... | python | def unassign_item_from_bank(self, item_id, bank_id):
"""Removes an ``Item`` from a ``Bank``.
arg: item_id (osid.id.Id): the ``Id`` of the ``Item``
arg: bank_id (osid.id.Id): the ``Id`` of the ``Bank``
raise: NotFound - ``item_id`` or ``bank_id`` not found or
``ite... | [
"def",
"unassign_item_from_bank",
"(",
"self",
",",
"item_id",
",",
"bank_id",
")",
":",
"# Implemented from template for",
"# osid.resource.ResourceBinAssignmentSession.unassign_resource_from_bin",
"mgr",
"=",
"self",
".",
"_get_provider_manager",
"(",
"'ASSESSMENT'",
",",
"... | Removes an ``Item`` from a ``Bank``.
arg: item_id (osid.id.Id): the ``Id`` of the ``Item``
arg: bank_id (osid.id.Id): the ``Id`` of the ``Bank``
raise: NotFound - ``item_id`` or ``bank_id`` not found or
``item_id`` not assigned to ``bank_id``
raise: NullArgument ... | [
"Removes",
"an",
"Item",
"from",
"a",
"Bank",
"."
] | train | https://github.com/mitsei/dlkit/blob/445f968a175d61c8d92c0f617a3c17dc1dc7c584/dlkit/json_/assessment/sessions.py#L3661-L3679 |
mitsei/dlkit | dlkit/json_/assessment/sessions.py | AssessmentLookupSession.get_assessment | def get_assessment(self, assessment_id):
"""Gets the ``Assessment`` specified by its ``Id``.
In plenary mode, the exact ``Id`` is found or a ``NotFound``
results. Otherwise, the returned ``Assessment`` may have a
different ``Id`` than requested, such as the case where a
duplicat... | python | def get_assessment(self, assessment_id):
"""Gets the ``Assessment`` specified by its ``Id``.
In plenary mode, the exact ``Id`` is found or a ``NotFound``
results. Otherwise, the returned ``Assessment`` may have a
different ``Id`` than requested, such as the case where a
duplicat... | [
"def",
"get_assessment",
"(",
"self",
",",
"assessment_id",
")",
":",
"# Implemented from template for",
"# osid.resource.ResourceLookupSession.get_resource",
"# NOTE: This implementation currently ignores plenary view",
"collection",
"=",
"JSONClientValidated",
"(",
"'assessment'",
... | Gets the ``Assessment`` specified by its ``Id``.
In plenary mode, the exact ``Id`` is found or a ``NotFound``
results. Otherwise, the returned ``Assessment`` may have a
different ``Id`` than requested, such as the case where a
duplicate ``Id`` was assigned to a ``Assessment`` and retain... | [
"Gets",
"the",
"Assessment",
"specified",
"by",
"its",
"Id",
"."
] | train | https://github.com/mitsei/dlkit/blob/445f968a175d61c8d92c0f617a3c17dc1dc7c584/dlkit/json_/assessment/sessions.py#L3821-L3848 |
mitsei/dlkit | dlkit/json_/assessment/sessions.py | AssessmentLookupSession.get_assessments_by_ids | def get_assessments_by_ids(self, assessment_ids):
"""Gets an ``AssessmentList`` corresponding to the given ``IdList``.
In plenary mode, the returned list contains all of the
assessments specified in the ``Id`` list, in the order of the
list, including duplicates, or an error results if ... | python | def get_assessments_by_ids(self, assessment_ids):
"""Gets an ``AssessmentList`` corresponding to the given ``IdList``.
In plenary mode, the returned list contains all of the
assessments specified in the ``Id`` list, in the order of the
list, including duplicates, or an error results if ... | [
"def",
"get_assessments_by_ids",
"(",
"self",
",",
"assessment_ids",
")",
":",
"# Implemented from template for",
"# osid.resource.ResourceLookupSession.get_resources_by_ids",
"# NOTE: This implementation currently ignores plenary view",
"collection",
"=",
"JSONClientValidated",
"(",
"... | Gets an ``AssessmentList`` corresponding to the given ``IdList``.
In plenary mode, the returned list contains all of the
assessments 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 inacce... | [
"Gets",
"an",
"AssessmentList",
"corresponding",
"to",
"the",
"given",
"IdList",
"."
] | train | https://github.com/mitsei/dlkit/blob/445f968a175d61c8d92c0f617a3c17dc1dc7c584/dlkit/json_/assessment/sessions.py#L3851-L3892 |
mitsei/dlkit | dlkit/json_/assessment/sessions.py | AssessmentLookupSession.get_assessments_by_genus_type | def get_assessments_by_genus_type(self, assessment_genus_type):
"""Gets an ``AssessmentList`` corresponding to the given assessment genus ``Type`` which does not include assessments of types derived from the specified ``Type``.
In plenary mode, the returned list contains all known
assessments o... | python | def get_assessments_by_genus_type(self, assessment_genus_type):
"""Gets an ``AssessmentList`` corresponding to the given assessment genus ``Type`` which does not include assessments of types derived from the specified ``Type``.
In plenary mode, the returned list contains all known
assessments o... | [
"def",
"get_assessments_by_genus_type",
"(",
"self",
",",
"assessment_genus_type",
")",
":",
"# Implemented from template for",
"# osid.resource.ResourceLookupSession.get_resources_by_genus_type",
"# NOTE: This implementation currently ignores plenary view",
"collection",
"=",
"JSONClientV... | Gets an ``AssessmentList`` corresponding to the given assessment genus ``Type`` which does not include assessments of types derived from the specified ``Type``.
In plenary mode, the returned list contains all known
assessments or an error results. Otherwise, the returned list
may contain only t... | [
"Gets",
"an",
"AssessmentList",
"corresponding",
"to",
"the",
"given",
"assessment",
"genus",
"Type",
"which",
"does",
"not",
"include",
"assessments",
"of",
"types",
"derived",
"from",
"the",
"specified",
"Type",
"."
] | train | https://github.com/mitsei/dlkit/blob/445f968a175d61c8d92c0f617a3c17dc1dc7c584/dlkit/json_/assessment/sessions.py#L3895-L3922 |
mitsei/dlkit | dlkit/json_/assessment/sessions.py | AssessmentLookupSession.get_assessments | def get_assessments(self):
"""Gets all ``Assessments``.
In plenary mode, the returned list contains all known
assessments or an error results. Otherwise, the returned list
may contain only those assessments that are accessible through
this session.
return: (osid.assessm... | python | def get_assessments(self):
"""Gets all ``Assessments``.
In plenary mode, the returned list contains all known
assessments or an error results. Otherwise, the returned list
may contain only those assessments that are accessible through
this session.
return: (osid.assessm... | [
"def",
"get_assessments",
"(",
"self",
")",
":",
"# Implemented from template for",
"# osid.resource.ResourceLookupSession.get_resources",
"# NOTE: This implementation currently ignores plenary view",
"collection",
"=",
"JSONClientValidated",
"(",
"'assessment'",
",",
"collection",
"... | Gets all ``Assessments``.
In plenary mode, the returned list contains all known
assessments or an error results. Otherwise, the returned list
may contain only those assessments that are accessible through
this session.
return: (osid.assessment.AssessmentList) - a list of
... | [
"Gets",
"all",
"Assessments",
"."
] | train | https://github.com/mitsei/dlkit/blob/445f968a175d61c8d92c0f617a3c17dc1dc7c584/dlkit/json_/assessment/sessions.py#L3973-L3995 |
mitsei/dlkit | dlkit/json_/assessment/sessions.py | AssessmentQuerySession.get_assessments_by_query | def get_assessments_by_query(self, assessment_query):
"""Gets a list of ``Assessments`` matching the given assessment query.
arg: assessment_query (osid.assessment.AssessmentQuery): the
assessment query
return: (osid.assessment.AssessmentList) - the returned
`... | python | def get_assessments_by_query(self, assessment_query):
"""Gets a list of ``Assessments`` matching the given assessment query.
arg: assessment_query (osid.assessment.AssessmentQuery): the
assessment query
return: (osid.assessment.AssessmentList) - the returned
`... | [
"def",
"get_assessments_by_query",
"(",
"self",
",",
"assessment_query",
")",
":",
"\"\"\"Gets a list of ``Assessments`` matching the given assessment query.\n\n arg: assessment_query (osid.assessment.AssessmentQuery): the\n assessment query\n return: (osid.assessment... | Gets a list of ``Assessments`` matching the given assessment query.
arg: assessment_query (osid.assessment.AssessmentQuery): the
assessment query
return: (osid.assessment.AssessmentList) - the returned
``AssessmentList``
raise: NullArgument - ``assessment_que... | [
"Gets",
"a",
"list",
"of",
"Assessments",
"matching",
"the",
"given",
"assessment",
"query",
"."
] | train | https://github.com/mitsei/dlkit/blob/445f968a175d61c8d92c0f617a3c17dc1dc7c584/dlkit/json_/assessment/sessions.py#L4121-L4221 |
mitsei/dlkit | dlkit/json_/assessment/sessions.py | AssessmentAdminSession.get_assessment_form_for_create | def get_assessment_form_for_create(self, assessment_record_types):
"""Gets the assessment form for creating new assessments.
A new form should be requested for each create transaction.
arg: assessment_record_types (osid.type.Type[]): array of
assessment record types to be in... | python | def get_assessment_form_for_create(self, assessment_record_types):
"""Gets the assessment form for creating new assessments.
A new form should be requested for each create transaction.
arg: assessment_record_types (osid.type.Type[]): array of
assessment record types to be in... | [
"def",
"get_assessment_form_for_create",
"(",
"self",
",",
"assessment_record_types",
")",
":",
"# Implemented from template for",
"# osid.resource.ResourceAdminSession.get_resource_form_for_create_template",
"for",
"arg",
"in",
"assessment_record_types",
":",
"if",
"not",
"isinsta... | Gets the assessment form for creating new assessments.
A new form should be requested for each create transaction.
arg: assessment_record_types (osid.type.Type[]): array of
assessment record types to be included in the create
operation or an empty list if none
... | [
"Gets",
"the",
"assessment",
"form",
"for",
"creating",
"new",
"assessments",
"."
] | train | https://github.com/mitsei/dlkit/blob/445f968a175d61c8d92c0f617a3c17dc1dc7c584/dlkit/json_/assessment/sessions.py#L4348-L4384 |
mitsei/dlkit | dlkit/json_/assessment/sessions.py | AssessmentAdminSession.create_assessment | def create_assessment(self, assessment_form):
"""Creates a new ``Assessment``.
arg: assessment_form (osid.assessment.AssessmentForm): the
form for this ``Assessment``
return: (osid.assessment.Assessment) - the new ``Assessment``
raise: IllegalState - ``assessment_for... | python | def create_assessment(self, assessment_form):
"""Creates a new ``Assessment``.
arg: assessment_form (osid.assessment.AssessmentForm): the
form for this ``Assessment``
return: (osid.assessment.Assessment) - the new ``Assessment``
raise: IllegalState - ``assessment_for... | [
"def",
"create_assessment",
"(",
"self",
",",
"assessment_form",
")",
":",
"# Implemented from template for",
"# osid.resource.ResourceAdminSession.create_resource_template",
"collection",
"=",
"JSONClientValidated",
"(",
"'assessment'",
",",
"collection",
"=",
"'Assessment'",
... | Creates a new ``Assessment``.
arg: assessment_form (osid.assessment.AssessmentForm): the
form for this ``Assessment``
return: (osid.assessment.Assessment) - the new ``Assessment``
raise: IllegalState - ``assessment_form`` already used in a
create transaction
... | [
"Creates",
"a",
"new",
"Assessment",
"."
] | train | https://github.com/mitsei/dlkit/blob/445f968a175d61c8d92c0f617a3c17dc1dc7c584/dlkit/json_/assessment/sessions.py#L4387-L4429 |
mitsei/dlkit | dlkit/json_/assessment/sessions.py | AssessmentAdminSession.update_assessment | def update_assessment(self, assessment_form):
"""Updates an existing assessment.
arg: assessment_form (osid.assessment.AssessmentForm): the
form containing the elements to be updated
raise: IllegalState - ``assessment_form`` already used in an
update transact... | python | def update_assessment(self, assessment_form):
"""Updates an existing assessment.
arg: assessment_form (osid.assessment.AssessmentForm): the
form containing the elements to be updated
raise: IllegalState - ``assessment_form`` already used in an
update transact... | [
"def",
"update_assessment",
"(",
"self",
",",
"assessment_form",
")",
":",
"# Implemented from template for",
"# osid.resource.ResourceAdminSession.update_resource_template",
"collection",
"=",
"JSONClientValidated",
"(",
"'assessment'",
",",
"collection",
"=",
"'Assessment'",
... | Updates an existing assessment.
arg: assessment_form (osid.assessment.AssessmentForm): the
form containing the elements to be updated
raise: IllegalState - ``assessment_form`` already used in an
update transaction
raise: InvalidArgument - the form contains a... | [
"Updates",
"an",
"existing",
"assessment",
"."
] | train | https://github.com/mitsei/dlkit/blob/445f968a175d61c8d92c0f617a3c17dc1dc7c584/dlkit/json_/assessment/sessions.py#L4486-L4526 |
mitsei/dlkit | dlkit/json_/assessment/sessions.py | AssessmentAdminSession.delete_assessment | def delete_assessment(self, assessment_id):
"""Deletes an ``Assessment``.
arg: assessment_id (osid.id.Id): the ``Id`` of the
``Assessment`` to remove
raise: NotFound - ``assessment_id`` not found
raise: NullArgument - ``assessment_id`` is ``null``
raise: Op... | python | def delete_assessment(self, assessment_id):
"""Deletes an ``Assessment``.
arg: assessment_id (osid.id.Id): the ``Id`` of the
``Assessment`` to remove
raise: NotFound - ``assessment_id`` not found
raise: NullArgument - ``assessment_id`` is ``null``
raise: Op... | [
"def",
"delete_assessment",
"(",
"self",
",",
"assessment_id",
")",
":",
"\"\"\"Delete all the children AssessmentParts recursively, too\"\"\"",
"def",
"remove_children_parts",
"(",
"parent_id",
")",
":",
"part_collection",
"=",
"JSONClientValidated",
"(",
"'assessment_authorin... | Deletes an ``Assessment``.
arg: assessment_id (osid.id.Id): the ``Id`` of the
``Assessment`` to remove
raise: NotFound - ``assessment_id`` not found
raise: NullArgument - ``assessment_id`` is ``null``
raise: OperationFailed - unable to complete request
rais... | [
"Deletes",
"an",
"Assessment",
"."
] | train | https://github.com/mitsei/dlkit/blob/445f968a175d61c8d92c0f617a3c17dc1dc7c584/dlkit/json_/assessment/sessions.py#L4549-L4598 |
mitsei/dlkit | dlkit/json_/assessment/sessions.py | AssessmentAdminSession.alias_assessment | def alias_assessment(self, assessment_id, alias_id):
"""Adds an ``Id`` to an ``Assessment`` for the purpose of creating compatibility.
The primary ``Id`` of the ``Assessment`` is determined by the
provider. The new ``Id`` is an alias to the primary ``Id``. If
the alias is a pointer to a... | python | def alias_assessment(self, assessment_id, alias_id):
"""Adds an ``Id`` to an ``Assessment`` for the purpose of creating compatibility.
The primary ``Id`` of the ``Assessment`` is determined by the
provider. The new ``Id`` is an alias to the primary ``Id``. If
the alias is a pointer to a... | [
"def",
"alias_assessment",
"(",
"self",
",",
"assessment_id",
",",
"alias_id",
")",
":",
"# Implemented from template for",
"# osid.resource.ResourceAdminSession.alias_resources_template",
"self",
".",
"_alias_id",
"(",
"primary_id",
"=",
"assessment_id",
",",
"equivalent_id"... | Adds an ``Id`` to an ``Assessment`` for the purpose of creating compatibility.
The primary ``Id`` of the ``Assessment`` is determined by the
provider. The new ``Id`` is an alias to the primary ``Id``. If
the alias is a pointer to another assessment, it is reassigned
to the given assessm... | [
"Adds",
"an",
"Id",
"to",
"an",
"Assessment",
"for",
"the",
"purpose",
"of",
"creating",
"compatibility",
"."
] | train | https://github.com/mitsei/dlkit/blob/445f968a175d61c8d92c0f617a3c17dc1dc7c584/dlkit/json_/assessment/sessions.py#L4619-L4642 |
mitsei/dlkit | dlkit/json_/assessment/sessions.py | AssessmentBankSession.get_assessment_ids_by_bank | def get_assessment_ids_by_bank(self, bank_id):
"""Gets the list of ``Assessment`` ``Ids`` associated with a ``Bank``.
arg: bank_id (osid.id.Id): ``Id`` of the ``Bank``
return: (osid.id.IdList) - list of related assessment ``Ids``
raise: NotFound - ``bank_id`` is not found
r... | python | def get_assessment_ids_by_bank(self, bank_id):
"""Gets the list of ``Assessment`` ``Ids`` associated with a ``Bank``.
arg: bank_id (osid.id.Id): ``Id`` of the ``Bank``
return: (osid.id.IdList) - list of related assessment ``Ids``
raise: NotFound - ``bank_id`` is not found
r... | [
"def",
"get_assessment_ids_by_bank",
"(",
"self",
",",
"bank_id",
")",
":",
"# Implemented from template for",
"# osid.resource.ResourceBinSession.get_resource_ids_by_bin",
"id_list",
"=",
"[",
"]",
"for",
"assessment",
"in",
"self",
".",
"get_assessments_by_bank",
"(",
"ba... | Gets the list of ``Assessment`` ``Ids`` associated with a ``Bank``.
arg: bank_id (osid.id.Id): ``Id`` of the ``Bank``
return: (osid.id.IdList) - list of related assessment ``Ids``
raise: NotFound - ``bank_id`` is not found
raise: NullArgument - ``bank_id`` is ``null``
rais... | [
"Gets",
"the",
"list",
"of",
"Assessment",
"Ids",
"associated",
"with",
"a",
"Bank",
"."
] | train | https://github.com/mitsei/dlkit/blob/445f968a175d61c8d92c0f617a3c17dc1dc7c584/dlkit/json_/assessment/sessions.py#L4744-L4761 |
mitsei/dlkit | dlkit/json_/assessment/sessions.py | AssessmentBankSession.get_assessments_by_bank | def get_assessments_by_bank(self, bank_id):
"""Gets the list of ``Assessments`` associated with a ``Bank``.
arg: bank_id (osid.id.Id): ``Id`` of the ``Bank``
return: (osid.assessment.AssessmentList) - list of related
assessments
raise: NotFound - ``bank_id`` is not f... | python | def get_assessments_by_bank(self, bank_id):
"""Gets the list of ``Assessments`` associated with a ``Bank``.
arg: bank_id (osid.id.Id): ``Id`` of the ``Bank``
return: (osid.assessment.AssessmentList) - list of related
assessments
raise: NotFound - ``bank_id`` is not f... | [
"def",
"get_assessments_by_bank",
"(",
"self",
",",
"bank_id",
")",
":",
"# Implemented from template for",
"# osid.resource.ResourceBinSession.get_resources_by_bin",
"mgr",
"=",
"self",
".",
"_get_provider_manager",
"(",
"'ASSESSMENT'",
",",
"local",
"=",
"True",
")",
"l... | Gets the list of ``Assessments`` associated with a ``Bank``.
arg: bank_id (osid.id.Id): ``Id`` of the ``Bank``
return: (osid.assessment.AssessmentList) - list of related
assessments
raise: NotFound - ``bank_id`` is not found
raise: NullArgument - ``bank_id`` is ``nu... | [
"Gets",
"the",
"list",
"of",
"Assessments",
"associated",
"with",
"a",
"Bank",
"."
] | train | https://github.com/mitsei/dlkit/blob/445f968a175d61c8d92c0f617a3c17dc1dc7c584/dlkit/json_/assessment/sessions.py#L4764-L4782 |
mitsei/dlkit | dlkit/json_/assessment/sessions.py | AssessmentBankSession.get_assessment_ids_by_banks | def get_assessment_ids_by_banks(self, bank_ids):
"""Gets the list of ``Assessment Ids`` corresponding to a list of ``Banks``.
arg: bank_ids (osid.id.IdList): list of bank ``Ids``
return: (osid.id.IdList) - list of bank ``Ids``
raise: NullArgument - ``bank_ids`` is ``null``
r... | python | def get_assessment_ids_by_banks(self, bank_ids):
"""Gets the list of ``Assessment Ids`` corresponding to a list of ``Banks``.
arg: bank_ids (osid.id.IdList): list of bank ``Ids``
return: (osid.id.IdList) - list of bank ``Ids``
raise: NullArgument - ``bank_ids`` is ``null``
r... | [
"def",
"get_assessment_ids_by_banks",
"(",
"self",
",",
"bank_ids",
")",
":",
"# Implemented from template for",
"# osid.resource.ResourceBinSession.get_resource_ids_by_bins",
"id_list",
"=",
"[",
"]",
"for",
"assessment",
"in",
"self",
".",
"get_assessments_by_banks",
"(",
... | Gets the list of ``Assessment Ids`` corresponding to a list of ``Banks``.
arg: bank_ids (osid.id.IdList): list of bank ``Ids``
return: (osid.id.IdList) - list of bank ``Ids``
raise: NullArgument - ``bank_ids`` is ``null``
raise: OperationFailed - unable to complete request
... | [
"Gets",
"the",
"list",
"of",
"Assessment",
"Ids",
"corresponding",
"to",
"a",
"list",
"of",
"Banks",
"."
] | train | https://github.com/mitsei/dlkit/blob/445f968a175d61c8d92c0f617a3c17dc1dc7c584/dlkit/json_/assessment/sessions.py#L4785-L4801 |
mitsei/dlkit | dlkit/json_/assessment/sessions.py | AssessmentBankSession.get_assessments_by_banks | def get_assessments_by_banks(self, bank_ids):
"""Gets the list of ``Assessments`` corresponding to a list of ``Banks``.
arg: bank_ids (osid.id.IdList): list of bank ``Ids``
return: (osid.assessment.AssessmentList) - list of assessments
raise: NullArgument - ``bank_ids`` is ``null``
... | python | def get_assessments_by_banks(self, bank_ids):
"""Gets the list of ``Assessments`` corresponding to a list of ``Banks``.
arg: bank_ids (osid.id.IdList): list of bank ``Ids``
return: (osid.assessment.AssessmentList) - list of assessments
raise: NullArgument - ``bank_ids`` is ``null``
... | [
"def",
"get_assessments_by_banks",
"(",
"self",
",",
"bank_ids",
")",
":",
"# Implemented from template for",
"# osid.resource.ResourceBinSession.get_resources_by_bins",
"assessment_list",
"=",
"[",
"]",
"for",
"bank_id",
"in",
"bank_ids",
":",
"assessment_list",
"+=",
"lis... | Gets the list of ``Assessments`` corresponding to a list of ``Banks``.
arg: bank_ids (osid.id.IdList): list of bank ``Ids``
return: (osid.assessment.AssessmentList) - list of assessments
raise: NullArgument - ``bank_ids`` is ``null``
raise: OperationFailed - unable to complete requ... | [
"Gets",
"the",
"list",
"of",
"Assessments",
"corresponding",
"to",
"a",
"list",
"of",
"Banks",
"."
] | train | https://github.com/mitsei/dlkit/blob/445f968a175d61c8d92c0f617a3c17dc1dc7c584/dlkit/json_/assessment/sessions.py#L4804-L4821 |
mitsei/dlkit | dlkit/json_/assessment/sessions.py | AssessmentBankSession.get_bank_ids_by_assessment | def get_bank_ids_by_assessment(self, assessment_id):
"""Gets the list of ``Bank`` ``Ids`` mapped to an ``Assessment``.
arg: assessment_id (osid.id.Id): ``Id`` of an ``Assessment``
return: (osid.id.IdList) - list of bank ``Ids``
raise: NotFound - ``assessment_id`` is not found
... | python | def get_bank_ids_by_assessment(self, assessment_id):
"""Gets the list of ``Bank`` ``Ids`` mapped to an ``Assessment``.
arg: assessment_id (osid.id.Id): ``Id`` of an ``Assessment``
return: (osid.id.IdList) - list of bank ``Ids``
raise: NotFound - ``assessment_id`` is not found
... | [
"def",
"get_bank_ids_by_assessment",
"(",
"self",
",",
"assessment_id",
")",
":",
"# Implemented from template for",
"# osid.resource.ResourceBinSession.get_bin_ids_by_resource",
"mgr",
"=",
"self",
".",
"_get_provider_manager",
"(",
"'ASSESSMENT'",
",",
"local",
"=",
"True",... | Gets the list of ``Bank`` ``Ids`` mapped to an ``Assessment``.
arg: assessment_id (osid.id.Id): ``Id`` of an ``Assessment``
return: (osid.id.IdList) - list of bank ``Ids``
raise: NotFound - ``assessment_id`` is not found
raise: NullArgument - ``assessment_id`` is ``null``
... | [
"Gets",
"the",
"list",
"of",
"Bank",
"Ids",
"mapped",
"to",
"an",
"Assessment",
"."
] | train | https://github.com/mitsei/dlkit/blob/445f968a175d61c8d92c0f617a3c17dc1dc7c584/dlkit/json_/assessment/sessions.py#L4824-L4845 |
mitsei/dlkit | dlkit/json_/assessment/sessions.py | AssessmentBankSession.get_banks_by_assessment | def get_banks_by_assessment(self, assessment_id):
"""Gets the list of ``Banks`` mapped to an ``Assessment``.
arg: assessment_id (osid.id.Id): ``Id`` of an ``Assessment``
return: (osid.assessment.BankList) - list of banks
raise: NotFound - ``assessment_id`` is not found
raise... | python | def get_banks_by_assessment(self, assessment_id):
"""Gets the list of ``Banks`` mapped to an ``Assessment``.
arg: assessment_id (osid.id.Id): ``Id`` of an ``Assessment``
return: (osid.assessment.BankList) - list of banks
raise: NotFound - ``assessment_id`` is not found
raise... | [
"def",
"get_banks_by_assessment",
"(",
"self",
",",
"assessment_id",
")",
":",
"# Implemented from template for",
"# osid.resource.ResourceBinSession.get_bins_by_resource",
"mgr",
"=",
"self",
".",
"_get_provider_manager",
"(",
"'ASSESSMENT'",
",",
"local",
"=",
"True",
")"... | Gets the list of ``Banks`` mapped to an ``Assessment``.
arg: assessment_id (osid.id.Id): ``Id`` of an ``Assessment``
return: (osid.assessment.BankList) - list of banks
raise: NotFound - ``assessment_id`` is not found
raise: NullArgument - ``assessment_id`` is ``null``
raise... | [
"Gets",
"the",
"list",
"of",
"Banks",
"mapped",
"to",
"an",
"Assessment",
"."
] | train | https://github.com/mitsei/dlkit/blob/445f968a175d61c8d92c0f617a3c17dc1dc7c584/dlkit/json_/assessment/sessions.py#L4848-L4865 |
mitsei/dlkit | dlkit/json_/assessment/sessions.py | AssessmentBankAssignmentSession.assign_assessment_to_bank | def assign_assessment_to_bank(self, assessment_id, bank_id):
"""Adds an existing ``Assessment`` to a ``Bank``.
arg: assessment_id (osid.id.Id): the ``Id`` of the
``Assessment``
arg: bank_id (osid.id.Id): the ``Id`` of the ``Bank``
raise: AlreadyExists - ``assessme... | python | def assign_assessment_to_bank(self, assessment_id, bank_id):
"""Adds an existing ``Assessment`` to a ``Bank``.
arg: assessment_id (osid.id.Id): the ``Id`` of the
``Assessment``
arg: bank_id (osid.id.Id): the ``Id`` of the ``Bank``
raise: AlreadyExists - ``assessme... | [
"def",
"assign_assessment_to_bank",
"(",
"self",
",",
"assessment_id",
",",
"bank_id",
")",
":",
"# Implemented from template for",
"# osid.resource.ResourceBinAssignmentSession.assign_resource_to_bin",
"mgr",
"=",
"self",
".",
"_get_provider_manager",
"(",
"'ASSESSMENT'",
",",... | Adds an existing ``Assessment`` to a ``Bank``.
arg: assessment_id (osid.id.Id): the ``Id`` of the
``Assessment``
arg: bank_id (osid.id.Id): the ``Id`` of the ``Bank``
raise: AlreadyExists - ``assessment_id`` is already assigned to
``bank_id``
raise... | [
"Adds",
"an",
"existing",
"Assessment",
"to",
"a",
"Bank",
"."
] | train | https://github.com/mitsei/dlkit/blob/445f968a175d61c8d92c0f617a3c17dc1dc7c584/dlkit/json_/assessment/sessions.py#L4975-L4996 |
mitsei/dlkit | dlkit/json_/assessment/sessions.py | AssessmentBankAssignmentSession.unassign_assessment_from_bank | def unassign_assessment_from_bank(self, assessment_id, bank_id):
"""Removes an ``Assessment`` from a ``Bank``.
arg: assessment_id (osid.id.Id): the ``Id`` of the
``Assessment``
arg: bank_id (osid.id.Id): the ``Id`` of the ``Bank``
raise: NotFound - ``assessment_id... | python | def unassign_assessment_from_bank(self, assessment_id, bank_id):
"""Removes an ``Assessment`` from a ``Bank``.
arg: assessment_id (osid.id.Id): the ``Id`` of the
``Assessment``
arg: bank_id (osid.id.Id): the ``Id`` of the ``Bank``
raise: NotFound - ``assessment_id... | [
"def",
"unassign_assessment_from_bank",
"(",
"self",
",",
"assessment_id",
",",
"bank_id",
")",
":",
"# Implemented from template for",
"# osid.resource.ResourceBinAssignmentSession.unassign_resource_from_bin",
"mgr",
"=",
"self",
".",
"_get_provider_manager",
"(",
"'ASSESSMENT'"... | Removes an ``Assessment`` from a ``Bank``.
arg: assessment_id (osid.id.Id): the ``Id`` of the
``Assessment``
arg: bank_id (osid.id.Id): the ``Id`` of the ``Bank``
raise: NotFound - ``assessment_id`` or ``bank_id`` not found or
``assessment_id`` not assigne... | [
"Removes",
"an",
"Assessment",
"from",
"a",
"Bank",
"."
] | train | https://github.com/mitsei/dlkit/blob/445f968a175d61c8d92c0f617a3c17dc1dc7c584/dlkit/json_/assessment/sessions.py#L4999-L5019 |
mitsei/dlkit | dlkit/json_/assessment/sessions.py | AssessmentBasicAuthoringSession._get_first_part_id | def _get_first_part_id(self, assessment_id):
"""This session implemenation assumes all items are assigned to the first assessment part"""
if assessment_id not in self._first_part_index:
self._first_part_index[assessment_id] = get_first_part_id_for_assessment(
assessment_id,
... | python | def _get_first_part_id(self, assessment_id):
"""This session implemenation assumes all items are assigned to the first assessment part"""
if assessment_id not in self._first_part_index:
self._first_part_index[assessment_id] = get_first_part_id_for_assessment(
assessment_id,
... | [
"def",
"_get_first_part_id",
"(",
"self",
",",
"assessment_id",
")",
":",
"if",
"assessment_id",
"not",
"in",
"self",
".",
"_first_part_index",
":",
"self",
".",
"_first_part_index",
"[",
"assessment_id",
"]",
"=",
"get_first_part_id_for_assessment",
"(",
"assessmen... | This session implemenation assumes all items are assigned to the first assessment part | [
"This",
"session",
"implemenation",
"assumes",
"all",
"items",
"are",
"assigned",
"to",
"the",
"first",
"assessment",
"part"
] | train | https://github.com/mitsei/dlkit/blob/445f968a175d61c8d92c0f617a3c17dc1dc7c584/dlkit/json_/assessment/sessions.py#L5072-L5081 |
mitsei/dlkit | dlkit/json_/assessment/sessions.py | AssessmentBasicAuthoringSession.get_items | def get_items(self, assessment_id):
"""Gets the items in sequence from an assessment.
arg: assessment_id (osid.id.Id): the ``Id`` of the
``Assessment``
return: (osid.assessment.ItemList) - list of items
raise: NotFound - ``assessmentid`` not found
raise: Nul... | python | def get_items(self, assessment_id):
"""Gets the items in sequence from an assessment.
arg: assessment_id (osid.id.Id): the ``Id`` of the
``Assessment``
return: (osid.assessment.ItemList) - list of items
raise: NotFound - ``assessmentid`` not found
raise: Nul... | [
"def",
"get_items",
"(",
"self",
",",
"assessment_id",
")",
":",
"if",
"assessment_id",
".",
"get_identifier_namespace",
"(",
")",
"!=",
"'assessment.Assessment'",
":",
"raise",
"errors",
".",
"InvalidArgument",
"return",
"self",
".",
"_part_item_session",
".",
"g... | Gets the items in sequence from an assessment.
arg: assessment_id (osid.id.Id): the ``Id`` of the
``Assessment``
return: (osid.assessment.ItemList) - list of items
raise: NotFound - ``assessmentid`` not found
raise: NullArgument - ``assessment_id`` is ``null``
... | [
"Gets",
"the",
"items",
"in",
"sequence",
"from",
"an",
"assessment",
"."
] | train | https://github.com/mitsei/dlkit/blob/445f968a175d61c8d92c0f617a3c17dc1dc7c584/dlkit/json_/assessment/sessions.py#L5130-L5145 |
mitsei/dlkit | dlkit/json_/assessment/sessions.py | AssessmentBasicAuthoringSession.add_item | def add_item(self, assessment_id, item_id):
"""Adds an existing ``Item`` to an assessment.
arg: assessment_id (osid.id.Id): the ``Id`` of the
``Assessment``
arg: item_id (osid.id.Id): the ``Id`` of the ``Item``
raise: NotFound - ``assessment_id`` or ``item_id`` no... | python | def add_item(self, assessment_id, item_id):
"""Adds an existing ``Item`` to an assessment.
arg: assessment_id (osid.id.Id): the ``Id`` of the
``Assessment``
arg: item_id (osid.id.Id): the ``Id`` of the ``Item``
raise: NotFound - ``assessment_id`` or ``item_id`` no... | [
"def",
"add_item",
"(",
"self",
",",
"assessment_id",
",",
"item_id",
")",
":",
"if",
"assessment_id",
".",
"get_identifier_namespace",
"(",
")",
"!=",
"'assessment.Assessment'",
":",
"raise",
"errors",
".",
"InvalidArgument",
"self",
".",
"_part_item_design_session... | Adds an existing ``Item`` to an assessment.
arg: assessment_id (osid.id.Id): the ``Id`` of the
``Assessment``
arg: item_id (osid.id.Id): the ``Id`` of the ``Item``
raise: NotFound - ``assessment_id`` or ``item_id`` not found
raise: NullArgument - ``assessment_id`... | [
"Adds",
"an",
"existing",
"Item",
"to",
"an",
"assessment",
"."
] | train | https://github.com/mitsei/dlkit/blob/445f968a175d61c8d92c0f617a3c17dc1dc7c584/dlkit/json_/assessment/sessions.py#L5148-L5164 |
mitsei/dlkit | dlkit/json_/assessment/sessions.py | AssessmentBasicAuthoringSession.move_item | def move_item(self, assessment_id, item_id, preceeding_item_id):
"""Moves an existing item to follow another item in an assessment.
arg: assessment_id (osid.id.Id): the ``Id`` of the
``Assessment``
arg: item_id (osid.id.Id): the ``Id`` of an ``Item``
arg: precee... | python | def move_item(self, assessment_id, item_id, preceeding_item_id):
"""Moves an existing item to follow another item in an assessment.
arg: assessment_id (osid.id.Id): the ``Id`` of the
``Assessment``
arg: item_id (osid.id.Id): the ``Id`` of an ``Item``
arg: precee... | [
"def",
"move_item",
"(",
"self",
",",
"assessment_id",
",",
"item_id",
",",
"preceeding_item_id",
")",
":",
"if",
"assessment_id",
".",
"get_identifier_namespace",
"(",
")",
"!=",
"'assessment.Assessment'",
":",
"raise",
"errors",
".",
"InvalidArgument",
"self",
"... | Moves an existing item to follow another item in an assessment.
arg: assessment_id (osid.id.Id): the ``Id`` of the
``Assessment``
arg: item_id (osid.id.Id): the ``Id`` of an ``Item``
arg: preceeding_item_id (osid.id.Id): the ``Id`` of a
preceeding ``Item... | [
"Moves",
"an",
"existing",
"item",
"to",
"follow",
"another",
"item",
"in",
"an",
"assessment",
"."
] | train | https://github.com/mitsei/dlkit/blob/445f968a175d61c8d92c0f617a3c17dc1dc7c584/dlkit/json_/assessment/sessions.py#L5187-L5207 |
mitsei/dlkit | dlkit/json_/assessment/sessions.py | AssessmentBasicAuthoringSession.order_items | def order_items(self, item_ids, assessment_id):
"""Sequences existing items in an assessment.
arg: item_ids (osid.id.Id[]): the ``Id`` of the ``Items``
arg: assessment_id (osid.id.Id): the ``Id`` of the
``Assessment``
raise: NotFound - ``assessment_id`` is not fou... | python | def order_items(self, item_ids, assessment_id):
"""Sequences existing items in an assessment.
arg: item_ids (osid.id.Id[]): the ``Id`` of the ``Items``
arg: assessment_id (osid.id.Id): the ``Id`` of the
``Assessment``
raise: NotFound - ``assessment_id`` is not fou... | [
"def",
"order_items",
"(",
"self",
",",
"item_ids",
",",
"assessment_id",
")",
":",
"if",
"assessment_id",
".",
"get_identifier_namespace",
"(",
")",
"!=",
"'assessment.Assessment'",
":",
"raise",
"errors",
".",
"InvalidArgument",
"self",
".",
"_part_item_design_ses... | Sequences existing items in an assessment.
arg: item_ids (osid.id.Id[]): the ``Id`` of the ``Items``
arg: assessment_id (osid.id.Id): the ``Id`` of the
``Assessment``
raise: NotFound - ``assessment_id`` is not found or an
``item_id`` is not on ``assessment... | [
"Sequences",
"existing",
"items",
"in",
"an",
"assessment",
"."
] | train | https://github.com/mitsei/dlkit/blob/445f968a175d61c8d92c0f617a3c17dc1dc7c584/dlkit/json_/assessment/sessions.py#L5210-L5227 |
mitsei/dlkit | dlkit/json_/assessment/sessions.py | AssessmentOfferedLookupSession.get_assessment_offered | def get_assessment_offered(self, assessment_offered_id):
"""Gets the ``AssessmentOffered`` specified by its ``Id``.
In plenary mode, the exact ``Id`` is found or a ``NotFound``
results. Otherwise, the returned ``AssessmentOffered`` may have
a different ``Id`` than requested, such as the... | python | def get_assessment_offered(self, assessment_offered_id):
"""Gets the ``AssessmentOffered`` specified by its ``Id``.
In plenary mode, the exact ``Id`` is found or a ``NotFound``
results. Otherwise, the returned ``AssessmentOffered`` may have
a different ``Id`` than requested, such as the... | [
"def",
"get_assessment_offered",
"(",
"self",
",",
"assessment_offered_id",
")",
":",
"# Implemented from template for",
"# osid.resource.ResourceLookupSession.get_resource",
"# NOTE: This implementation currently ignores plenary view",
"collection",
"=",
"JSONClientValidated",
"(",
"'... | Gets the ``AssessmentOffered`` specified by its ``Id``.
In plenary mode, the exact ``Id`` is found or a ``NotFound``
results. Otherwise, the returned ``AssessmentOffered`` may have
a different ``Id`` than requested, such as the case where a
duplicate ``Id`` was assigned to an ``Assessme... | [
"Gets",
"the",
"AssessmentOffered",
"specified",
"by",
"its",
"Id",
"."
] | train | https://github.com/mitsei/dlkit/blob/445f968a175d61c8d92c0f617a3c17dc1dc7c584/dlkit/json_/assessment/sessions.py#L5347-L5376 |
mitsei/dlkit | dlkit/json_/assessment/sessions.py | AssessmentOfferedLookupSession.get_assessments_offered_by_ids | def get_assessments_offered_by_ids(self, assessment_offered_ids):
"""Gets an ``AssessmentOfferedList`` corresponding to the given ``IdList``.
In plenary mode, the returned list contains all of the
assessments specified in the ``Id`` list, in the order of the
list, including duplicates, ... | python | def get_assessments_offered_by_ids(self, assessment_offered_ids):
"""Gets an ``AssessmentOfferedList`` corresponding to the given ``IdList``.
In plenary mode, the returned list contains all of the
assessments specified in the ``Id`` list, in the order of the
list, including duplicates, ... | [
"def",
"get_assessments_offered_by_ids",
"(",
"self",
",",
"assessment_offered_ids",
")",
":",
"# Implemented from template for",
"# osid.resource.ResourceLookupSession.get_resources_by_ids",
"# NOTE: This implementation currently ignores plenary view",
"collection",
"=",
"JSONClientValida... | Gets an ``AssessmentOfferedList`` corresponding to the given ``IdList``.
In plenary mode, the returned list contains all of the
assessments 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... | [
"Gets",
"an",
"AssessmentOfferedList",
"corresponding",
"to",
"the",
"given",
"IdList",
"."
] | train | https://github.com/mitsei/dlkit/blob/445f968a175d61c8d92c0f617a3c17dc1dc7c584/dlkit/json_/assessment/sessions.py#L5379-L5420 |
mitsei/dlkit | dlkit/json_/assessment/sessions.py | AssessmentOfferedLookupSession.get_assessments_offered_by_genus_type | def get_assessments_offered_by_genus_type(self, assessment_offered_genus_type):
"""Gets an ``AssessmentOfferedList`` corresponding to the given assessment offered genus ``Type`` which does not include assessments of types derived from the specified ``Type``.
In plenary mode, the returned list contains ... | python | def get_assessments_offered_by_genus_type(self, assessment_offered_genus_type):
"""Gets an ``AssessmentOfferedList`` corresponding to the given assessment offered genus ``Type`` which does not include assessments of types derived from the specified ``Type``.
In plenary mode, the returned list contains ... | [
"def",
"get_assessments_offered_by_genus_type",
"(",
"self",
",",
"assessment_offered_genus_type",
")",
":",
"# Implemented from template for",
"# osid.resource.ResourceLookupSession.get_resources_by_genus_type",
"# NOTE: This implementation currently ignores plenary view",
"collection",
"="... | Gets an ``AssessmentOfferedList`` corresponding to the given assessment offered genus ``Type`` which does not include assessments of types derived from the specified ``Type``.
In plenary mode, the returned list contains all known
assessments offered or an error results. Otherwise, the returned
... | [
"Gets",
"an",
"AssessmentOfferedList",
"corresponding",
"to",
"the",
"given",
"assessment",
"offered",
"genus",
"Type",
"which",
"does",
"not",
"include",
"assessments",
"of",
"types",
"derived",
"from",
"the",
"specified",
"Type",
"."
] | train | https://github.com/mitsei/dlkit/blob/445f968a175d61c8d92c0f617a3c17dc1dc7c584/dlkit/json_/assessment/sessions.py#L5423-L5451 |
mitsei/dlkit | dlkit/json_/assessment/sessions.py | AssessmentOfferedLookupSession.get_assessments_offered_for_assessment | def get_assessments_offered_for_assessment(self, assessment_id):
"""Gets an ``AssessmentOfferedList`` by the given assessment.
In plenary mode, the returned list contains all known
assessments offered or an error results. Otherwise, the returned
list may contain only those assessments o... | python | def get_assessments_offered_for_assessment(self, assessment_id):
"""Gets an ``AssessmentOfferedList`` by the given assessment.
In plenary mode, the returned list contains all known
assessments offered or an error results. Otherwise, the returned
list may contain only those assessments o... | [
"def",
"get_assessments_offered_for_assessment",
"(",
"self",
",",
"assessment_id",
")",
":",
"# Implemented from template for",
"# osid.learning.ActivityLookupSession.get_activities_for_objective_template",
"# NOTE: This implementation currently ignores plenary view",
"collection",
"=",
"... | Gets an ``AssessmentOfferedList`` by the given assessment.
In plenary mode, the returned list contains all known
assessments offered or an error results. Otherwise, the returned
list may contain only those assessments offered that are
accessible through this session.
arg: as... | [
"Gets",
"an",
"AssessmentOfferedList",
"by",
"the",
"given",
"assessment",
"."
] | train | https://github.com/mitsei/dlkit/blob/445f968a175d61c8d92c0f617a3c17dc1dc7c584/dlkit/json_/assessment/sessions.py#L5526-L5552 |
mitsei/dlkit | dlkit/json_/assessment/sessions.py | AssessmentOfferedLookupSession.get_assessments_offered | def get_assessments_offered(self):
"""Gets all ``AssessmentOffered`` elements.
In plenary mode, the returned list contains all known
assessments offered or an error results. Otherwise, the returned
list may contain only those assessments offered that are
accessible through this ... | python | def get_assessments_offered(self):
"""Gets all ``AssessmentOffered`` elements.
In plenary mode, the returned list contains all known
assessments offered or an error results. Otherwise, the returned
list may contain only those assessments offered that are
accessible through this ... | [
"def",
"get_assessments_offered",
"(",
"self",
")",
":",
"# Implemented from template for",
"# osid.resource.ResourceLookupSession.get_resources",
"# NOTE: This implementation currently ignores plenary view",
"collection",
"=",
"JSONClientValidated",
"(",
"'assessment'",
",",
"collecti... | Gets all ``AssessmentOffered`` elements.
In plenary mode, the returned list contains all known
assessments offered or an error results. Otherwise, the returned
list may contain only those assessments offered that are
accessible through this session.
return: (osid.assessment.Ass... | [
"Gets",
"all",
"AssessmentOffered",
"elements",
"."
] | train | https://github.com/mitsei/dlkit/blob/445f968a175d61c8d92c0f617a3c17dc1dc7c584/dlkit/json_/assessment/sessions.py#L5554-L5576 |
mitsei/dlkit | dlkit/json_/assessment/sessions.py | AssessmentOfferedQuerySession.get_assessments_offered_by_query | def get_assessments_offered_by_query(self, assessment_offered_query):
"""Gets a list of ``AssessmentOffered`` elements matching the given assessment offered query.
arg: assessment_offered_query
(osid.assessment.AssessmentOfferedQuery): the assessment
offered query
... | python | def get_assessments_offered_by_query(self, assessment_offered_query):
"""Gets a list of ``AssessmentOffered`` elements matching the given assessment offered query.
arg: assessment_offered_query
(osid.assessment.AssessmentOfferedQuery): the assessment
offered query
... | [
"def",
"get_assessments_offered_by_query",
"(",
"self",
",",
"assessment_offered_query",
")",
":",
"# Implemented from template for",
"# osid.resource.ResourceQuerySession.get_resources_by_query",
"and_list",
"=",
"list",
"(",
")",
"or_list",
"=",
"list",
"(",
")",
"for",
"... | Gets a list of ``AssessmentOffered`` elements matching the given assessment offered query.
arg: assessment_offered_query
(osid.assessment.AssessmentOfferedQuery): the assessment
offered query
return: (osid.assessment.AssessmentOfferedList) - the returned
... | [
"Gets",
"a",
"list",
"of",
"AssessmentOffered",
"elements",
"matching",
"the",
"given",
"assessment",
"offered",
"query",
"."
] | train | https://github.com/mitsei/dlkit/blob/445f968a175d61c8d92c0f617a3c17dc1dc7c584/dlkit/json_/assessment/sessions.py#L5704-L5746 |
mitsei/dlkit | dlkit/json_/assessment/sessions.py | AssessmentOfferedAdminSession.create_assessment_offered | def create_assessment_offered(self, assessment_offered_form):
"""Creates a new ``AssessmentOffered``.
arg: assessment_offered_form
(osid.assessment.AssessmentOfferedForm): the form for
this ``AssessmentOffered``
return: (osid.assessment.AssessmentOffered) - th... | python | def create_assessment_offered(self, assessment_offered_form):
"""Creates a new ``AssessmentOffered``.
arg: assessment_offered_form
(osid.assessment.AssessmentOfferedForm): the form for
this ``AssessmentOffered``
return: (osid.assessment.AssessmentOffered) - th... | [
"def",
"create_assessment_offered",
"(",
"self",
",",
"assessment_offered_form",
")",
":",
"# Implemented from template for",
"# osid.resource.ResourceAdminSession.create_resource_template",
"collection",
"=",
"JSONClientValidated",
"(",
"'assessment'",
",",
"collection",
"=",
"'... | Creates a new ``AssessmentOffered``.
arg: assessment_offered_form
(osid.assessment.AssessmentOfferedForm): the form for
this ``AssessmentOffered``
return: (osid.assessment.AssessmentOffered) - the new
``AssessmentOffered``
raise: IllegalState ... | [
"Creates",
"a",
"new",
"AssessmentOffered",
"."
] | train | https://github.com/mitsei/dlkit/blob/445f968a175d61c8d92c0f617a3c17dc1dc7c584/dlkit/json_/assessment/sessions.py#L5927-L5971 |
mitsei/dlkit | dlkit/json_/assessment/sessions.py | AssessmentOfferedAdminSession.update_assessment_offered | def update_assessment_offered(self, assessment_offered_form):
"""Updates an existing assessment offered.
arg: assessment_offered_form
(osid.assessment.AssessmentOfferedForm): the form
containing the elements to be updated
raise: IllegalState - ``assessment_of... | python | def update_assessment_offered(self, assessment_offered_form):
"""Updates an existing assessment offered.
arg: assessment_offered_form
(osid.assessment.AssessmentOfferedForm): the form
containing the elements to be updated
raise: IllegalState - ``assessment_of... | [
"def",
"update_assessment_offered",
"(",
"self",
",",
"assessment_offered_form",
")",
":",
"# Implemented from template for",
"# osid.resource.ResourceAdminSession.update_resource_template",
"collection",
"=",
"JSONClientValidated",
"(",
"'assessment'",
",",
"collection",
"=",
"'... | Updates an existing assessment offered.
arg: assessment_offered_form
(osid.assessment.AssessmentOfferedForm): the form
containing the elements to be updated
raise: IllegalState - ``assessment_offrered_form`` already used
in an update transaction
... | [
"Updates",
"an",
"existing",
"assessment",
"offered",
"."
] | train | https://github.com/mitsei/dlkit/blob/445f968a175d61c8d92c0f617a3c17dc1dc7c584/dlkit/json_/assessment/sessions.py#L6029-L6070 |
mitsei/dlkit | dlkit/json_/assessment/sessions.py | AssessmentOfferedAdminSession.alias_assessment_offered | def alias_assessment_offered(self, assessment_offered_id, alias_id):
"""Adds an ``Id`` to an ``AssessmentOffered`` for the purpose of creating compatibility.
The primary ``Id`` of the ``AssessmentOffered`` is determined by
the provider. The new ``Id`` is an alias to the primary ``Id``.
... | python | def alias_assessment_offered(self, assessment_offered_id, alias_id):
"""Adds an ``Id`` to an ``AssessmentOffered`` for the purpose of creating compatibility.
The primary ``Id`` of the ``AssessmentOffered`` is determined by
the provider. The new ``Id`` is an alias to the primary ``Id``.
... | [
"def",
"alias_assessment_offered",
"(",
"self",
",",
"assessment_offered_id",
",",
"alias_id",
")",
":",
"# Implemented from template for",
"# osid.resource.ResourceAdminSession.alias_resources_template",
"self",
".",
"_alias_id",
"(",
"primary_id",
"=",
"assessment_offered_id",
... | Adds an ``Id`` to an ``AssessmentOffered`` for the purpose of creating compatibility.
The primary ``Id`` of the ``AssessmentOffered`` is determined by
the provider. The new ``Id`` is an alias to the primary ``Id``.
If the alias is a pointer to another assessment offered, it is
reassigne... | [
"Adds",
"an",
"Id",
"to",
"an",
"AssessmentOffered",
"for",
"the",
"purpose",
"of",
"creating",
"compatibility",
"."
] | train | https://github.com/mitsei/dlkit/blob/445f968a175d61c8d92c0f617a3c17dc1dc7c584/dlkit/json_/assessment/sessions.py#L6140-L6163 |
mitsei/dlkit | dlkit/json_/assessment/sessions.py | AssessmentOfferedBankSession.get_assessment_offered_ids_by_bank | def get_assessment_offered_ids_by_bank(self, bank_id):
"""Gets the list of ``AssessmentOffered`` ``Ids`` associated with a ``Bank``.
arg: bank_id (osid.id.Id): ``Id`` of the ``Bank``
return: (osid.id.IdList) - list of related assessment offered
``Ids``
raise: NotFou... | python | def get_assessment_offered_ids_by_bank(self, bank_id):
"""Gets the list of ``AssessmentOffered`` ``Ids`` associated with a ``Bank``.
arg: bank_id (osid.id.Id): ``Id`` of the ``Bank``
return: (osid.id.IdList) - list of related assessment offered
``Ids``
raise: NotFou... | [
"def",
"get_assessment_offered_ids_by_bank",
"(",
"self",
",",
"bank_id",
")",
":",
"# Implemented from template for",
"# osid.resource.ResourceBinSession.get_resource_ids_by_bin",
"id_list",
"=",
"[",
"]",
"for",
"assessment_offered",
"in",
"self",
".",
"get_assessments_offere... | Gets the list of ``AssessmentOffered`` ``Ids`` associated with a ``Bank``.
arg: bank_id (osid.id.Id): ``Id`` of the ``Bank``
return: (osid.id.IdList) - list of related assessment offered
``Ids``
raise: NotFound - ``bank_id`` is not found
raise: NullArgument - ``ban... | [
"Gets",
"the",
"list",
"of",
"AssessmentOffered",
"Ids",
"associated",
"with",
"a",
"Bank",
"."
] | train | https://github.com/mitsei/dlkit/blob/445f968a175d61c8d92c0f617a3c17dc1dc7c584/dlkit/json_/assessment/sessions.py#L6239-L6257 |
mitsei/dlkit | dlkit/json_/assessment/sessions.py | AssessmentOfferedBankSession.get_assessments_offered_by_bank | def get_assessments_offered_by_bank(self, bank_id):
"""Gets the list of ``AssessmentOffereds`` associated with a ``Bank``.
arg: bank_id (osid.id.Id): ``Id`` of the ``Bank``
return: (osid.assessment.AssessmentOfferedList) - list of
related assessments offered
raise: N... | python | def get_assessments_offered_by_bank(self, bank_id):
"""Gets the list of ``AssessmentOffereds`` associated with a ``Bank``.
arg: bank_id (osid.id.Id): ``Id`` of the ``Bank``
return: (osid.assessment.AssessmentOfferedList) - list of
related assessments offered
raise: N... | [
"def",
"get_assessments_offered_by_bank",
"(",
"self",
",",
"bank_id",
")",
":",
"# Implemented from template for",
"# osid.resource.ResourceBinSession.get_resources_by_bin",
"mgr",
"=",
"self",
".",
"_get_provider_manager",
"(",
"'ASSESSMENT'",
",",
"local",
"=",
"True",
"... | Gets the list of ``AssessmentOffereds`` associated with a ``Bank``.
arg: bank_id (osid.id.Id): ``Id`` of the ``Bank``
return: (osid.assessment.AssessmentOfferedList) - list of
related assessments offered
raise: NotFound - ``bank_id`` is not found
raise: NullArgument... | [
"Gets",
"the",
"list",
"of",
"AssessmentOffereds",
"associated",
"with",
"a",
"Bank",
"."
] | train | https://github.com/mitsei/dlkit/blob/445f968a175d61c8d92c0f617a3c17dc1dc7c584/dlkit/json_/assessment/sessions.py#L6260-L6278 |
mitsei/dlkit | dlkit/json_/assessment/sessions.py | AssessmentOfferedBankSession.get_assessment_offered_ids_by_banks | def get_assessment_offered_ids_by_banks(self, bank_ids):
"""Gets the list of ``AssessmentOffered Ids`` corresponding to a list of ``Banks``.
arg: bank_ids (osid.id.IdList): list of bank ``Ids``
return: (osid.id.IdList) - list of bank ``Ids``
raise: NullArgument - ``bank_ids`` is ``n... | python | def get_assessment_offered_ids_by_banks(self, bank_ids):
"""Gets the list of ``AssessmentOffered Ids`` corresponding to a list of ``Banks``.
arg: bank_ids (osid.id.IdList): list of bank ``Ids``
return: (osid.id.IdList) - list of bank ``Ids``
raise: NullArgument - ``bank_ids`` is ``n... | [
"def",
"get_assessment_offered_ids_by_banks",
"(",
"self",
",",
"bank_ids",
")",
":",
"# Implemented from template for",
"# osid.resource.ResourceBinSession.get_resource_ids_by_bins",
"id_list",
"=",
"[",
"]",
"for",
"assessment_offered",
"in",
"self",
".",
"get_assessments_off... | Gets the list of ``AssessmentOffered Ids`` corresponding to a list of ``Banks``.
arg: bank_ids (osid.id.IdList): list of bank ``Ids``
return: (osid.id.IdList) - list of bank ``Ids``
raise: NullArgument - ``bank_ids`` is ``null``
raise: OperationFailed - unable to complete request
... | [
"Gets",
"the",
"list",
"of",
"AssessmentOffered",
"Ids",
"corresponding",
"to",
"a",
"list",
"of",
"Banks",
"."
] | train | https://github.com/mitsei/dlkit/blob/445f968a175d61c8d92c0f617a3c17dc1dc7c584/dlkit/json_/assessment/sessions.py#L6281-L6297 |
mitsei/dlkit | dlkit/json_/assessment/sessions.py | AssessmentOfferedBankSession.get_assessments_offered_by_banks | def get_assessments_offered_by_banks(self, bank_ids):
"""Gets the list of ``AssessmentOffered`` objects corresponding to a list of ``Banks``.
arg: bank_ids (osid.id.IdList): list of bank ``Ids``
return: (osid.assessment.AssessmentOfferedList) - list of
assessments offered
... | python | def get_assessments_offered_by_banks(self, bank_ids):
"""Gets the list of ``AssessmentOffered`` objects corresponding to a list of ``Banks``.
arg: bank_ids (osid.id.IdList): list of bank ``Ids``
return: (osid.assessment.AssessmentOfferedList) - list of
assessments offered
... | [
"def",
"get_assessments_offered_by_banks",
"(",
"self",
",",
"bank_ids",
")",
":",
"# Implemented from template for",
"# osid.resource.ResourceBinSession.get_resources_by_bins",
"assessment_offered_list",
"=",
"[",
"]",
"for",
"bank_id",
"in",
"bank_ids",
":",
"assessment_offer... | Gets the list of ``AssessmentOffered`` objects corresponding to a list of ``Banks``.
arg: bank_ids (osid.id.IdList): list of bank ``Ids``
return: (osid.assessment.AssessmentOfferedList) - list of
assessments offered
raise: NullArgument - ``bank_ids`` is ``null``
rais... | [
"Gets",
"the",
"list",
"of",
"AssessmentOffered",
"objects",
"corresponding",
"to",
"a",
"list",
"of",
"Banks",
"."
] | train | https://github.com/mitsei/dlkit/blob/445f968a175d61c8d92c0f617a3c17dc1dc7c584/dlkit/json_/assessment/sessions.py#L6300-L6318 |
mitsei/dlkit | dlkit/json_/assessment/sessions.py | AssessmentOfferedBankSession.get_bank_ids_by_assessment_offered | def get_bank_ids_by_assessment_offered(self, assessment_offered_id):
"""Gets the list of ``Bank`` ``Ids`` mapped to an ``AssessmentOffered``.
arg: assessment_offered_id (osid.id.Id): ``Id`` of an
``AssessmentOffered``
return: (osid.id.IdList) - list of bank ``Ids``
r... | python | def get_bank_ids_by_assessment_offered(self, assessment_offered_id):
"""Gets the list of ``Bank`` ``Ids`` mapped to an ``AssessmentOffered``.
arg: assessment_offered_id (osid.id.Id): ``Id`` of an
``AssessmentOffered``
return: (osid.id.IdList) - list of bank ``Ids``
r... | [
"def",
"get_bank_ids_by_assessment_offered",
"(",
"self",
",",
"assessment_offered_id",
")",
":",
"# Implemented from template for",
"# osid.resource.ResourceBinSession.get_bin_ids_by_resource",
"mgr",
"=",
"self",
".",
"_get_provider_manager",
"(",
"'ASSESSMENT'",
",",
"local",
... | Gets the list of ``Bank`` ``Ids`` mapped to an ``AssessmentOffered``.
arg: assessment_offered_id (osid.id.Id): ``Id`` of an
``AssessmentOffered``
return: (osid.id.IdList) - list of bank ``Ids``
raise: NotFound - ``assessment_offered_id`` is not found
raise: NullArg... | [
"Gets",
"the",
"list",
"of",
"Bank",
"Ids",
"mapped",
"to",
"an",
"AssessmentOffered",
"."
] | train | https://github.com/mitsei/dlkit/blob/445f968a175d61c8d92c0f617a3c17dc1dc7c584/dlkit/json_/assessment/sessions.py#L6321-L6343 |
mitsei/dlkit | dlkit/json_/assessment/sessions.py | AssessmentOfferedBankSession.get_banks_by_assessment_offered | def get_banks_by_assessment_offered(self, assessment_offered_id):
"""Gets the list of ``Banks`` mapped to an ``AssessmentOffered``.
arg: assessment_offered_id (osid.id.Id): ``Id`` of an
``AssessmentOffered``
return: (osid.assessment.BankList) - list of banks
raise: N... | python | def get_banks_by_assessment_offered(self, assessment_offered_id):
"""Gets the list of ``Banks`` mapped to an ``AssessmentOffered``.
arg: assessment_offered_id (osid.id.Id): ``Id`` of an
``AssessmentOffered``
return: (osid.assessment.BankList) - list of banks
raise: N... | [
"def",
"get_banks_by_assessment_offered",
"(",
"self",
",",
"assessment_offered_id",
")",
":",
"# Implemented from template for",
"# osid.resource.ResourceBinSession.get_bins_by_resource",
"mgr",
"=",
"self",
".",
"_get_provider_manager",
"(",
"'ASSESSMENT'",
",",
"local",
"=",... | Gets the list of ``Banks`` mapped to an ``AssessmentOffered``.
arg: assessment_offered_id (osid.id.Id): ``Id`` of an
``AssessmentOffered``
return: (osid.assessment.BankList) - list of banks
raise: NotFound - ``assessment_offered_id`` is not found
raise: NullArgument... | [
"Gets",
"the",
"list",
"of",
"Banks",
"mapped",
"to",
"an",
"AssessmentOffered",
"."
] | train | https://github.com/mitsei/dlkit/blob/445f968a175d61c8d92c0f617a3c17dc1dc7c584/dlkit/json_/assessment/sessions.py#L6346-L6364 |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.