Queries

Question Query

class dlkit.assessment.queries.QuestionQuery

Bases: dlkit.osid.queries.OsidObjectQuery

This is the query for searching questions.

Each method match request produces an AND term while multiple invocations of a method produces a nested OR.

get_question_query_record(question_record_type)

Gets the question record query corresponding to the given Item record Type.

Multiple retrievals produce a nested OR term.

Parameters:question_record_type (osid.type.Type) – a question record type
Returns:the question query record
Return type:osid.assessment.records.QuestionQueryRecord
Raise:NullArgumentquestion_record_type is null
Raise:OperationFailed – unable to complete request
Raise:Unsupportedhas_record_type(question_record_type) is false

compliance: mandatory – This method must be implemented.

Answer Query

class dlkit.assessment.queries.AnswerQuery

Bases: dlkit.osid.queries.OsidObjectQuery

This is the query for searching answers.

Each method match request produces an AND term while multiple invocations of a method produces a nested OR.

get_answer_query_record(answer_record_type)

Gets the answer record query corresponding to the given Answer record Type.

Multiple retrievals produce a nested OR term.

Parameters:answer_record_type (osid.type.Type) – an answer record type
Returns:the answer query record
Return type:osid.assessment.records.AnswerQueryRecord
Raise:NullArgumentanswer_record_type is null
Raise:OperationFailed – unable to complete request
Raise:Unsupportedhas_record_type(answer_record_type) is false

compliance: mandatory – This method must be implemented.

Item Query

class dlkit.assessment.queries.ItemQuery

Bases: dlkit.osid.queries.OsidObjectQuery, dlkit.osid.queries.OsidAggregateableQuery

This is the query for searching items.

Each method match request produces an AND term while multiple invocations of a method produces a nested OR.

match_learning_objective_id(objective_id, match)

Sets the learning objective Id for this query.

Parameters:
  • objective_id (osid.id.Id) – a learning objective Id
  • match (boolean) – true for a positive match, false for negative match
Raise:

NullArgumentobjective_id is null

compliance: mandatory – This method must be implemented.

learning_objective_id_terms
supports_learning_objective_query()

Tests if an ObjectiveQuery is available.

Returns:true if a learning objective query is available, false otherwise
Return type:boolean

compliance: mandatory – This method must be implemented.

learning_objective_query

Gets the query for a learning objective.

Multiple retrievals produce a nested OR term.

Returns:the learning objective query
Return type:osid.learning.ObjectiveQuery
Raise:Unimplementedsupports_learning_objective_query() is false

compliance: optional – This method must be implemented if ``supports_learning_objective_query()`` is ``true``.

match_any_learning_objective(match)

Matches an item with any objective.

Parameters:match (boolean) – true to match items with any learning objective, false to match items with no learning objectives

compliance: mandatory – This method must be implemented.

learning_objective_terms
match_question_id(question_id, match)

Sets the question Id for this query.

Parameters:
  • question_id (osid.id.Id) – a question Id
  • match (boolean) – true for a positive match, false for a negative match
Raise:

NullArgumentquestion_id is null

compliance: mandatory – This method must be implemented.

question_id_terms
supports_question_query()

Tests if a QuestionQuery is available.

Returns:true if a question query is available, false otherwise
Return type:boolean

compliance: mandatory – This method must be implemented.

question_query

Gets the query for a question.

Multiple retrievals produce a nested OR term.

Returns:the question query
Return type:osid.assessment.QuestionQuery
Raise:Unimplementedsupports_question_query() is false

compliance: optional – This method must be implemented if ``supports_learning_objective_query()`` is ``true``.

match_any_question(match)

Matches an item with any question.

Parameters:match (boolean) – true to match items with any question, false to match items with no questions

compliance: mandatory – This method must be implemented.

question_terms
match_answer_id(answer_id, match)

Sets the answer Id for this query.

Parameters:
  • answer_id (osid.id.Id) – an answer Id
  • match (boolean) – true for a positive match, false for a negative match
Raise:

NullArgumentanswer_id is null

compliance: mandatory – This method must be implemented.

answer_id_terms
supports_answer_query()

Tests if an AnswerQuery is available.

Returns:true if an answer query is available, false otherwise
Return type:boolean

compliance: mandatory – This method must be implemented.

answer_query

Gets the query for an answer.

Multiple retrievals produce a nested OR term.

Returns:the answer query
Return type:osid.assessment.AnswerQuery
Raise:Unimplementedsupports_answer_query() is false

compliance: optional – This method must be implemented if ``supports_learning_objective_query()`` is ``true``.

match_any_answer(match)

Matches an item with any answer.

Parameters:match (boolean) – true to match items with any answer, false to match items with no answers

compliance: mandatory – This method must be implemented.

answer_terms
match_assessment_id(assessment_id, match)

Sets the assessment Id for this query.

Parameters:
  • assessment_id (osid.id.Id) – an assessment Id
  • match (boolean) – true for a positive match, false for negative match
Raise:

NullArgumentassessment_id is null

compliance: mandatory – This method must be implemented.

assessment_id_terms
supports_assessment_query()

Tests if an AssessmentQuery is available.

Returns:true if an assessment query is available, false otherwise
Return type:boolean

compliance: mandatory – This method must be implemented.

assessment_query

Gets the query for an assessment.

Multiple retrievals produce a nested OR term.

Returns:the assessment query
Return type:osid.assessment.AssessmentQuery
Raise:Unimplementedsupports_assessment_query() is false

compliance: optional – This method must be implemented if ``supports_assessment_query()`` is ``true``.

match_any_assessment(match)

Matches an item with any assessment.

Parameters:match (boolean) – true to match items with any assessment, false to match items with no assessments

compliance: mandatory – This method must be implemented.

assessment_terms
match_bank_id(bank_id, match)

Sets the bank Id for this query.

Parameters:
  • bank_id (osid.id.Id) – a bank Id
  • match (boolean) – true for a positive match, false for negative match
Raise:

NullArgumentbank_id is null

compliance: mandatory – This method must be implemented.

bank_id_terms
supports_bank_query()

Tests if a BankQuery is available.

Returns:true if a bank query is available, false otherwise
Return type:boolean

compliance: mandatory – This method must be implemented.

bank_query

Gets the query for a bank.

Multiple retrievals produce a nested OR term.

Returns:the bank query
Return type:osid.assessment.BankQuery
Raise:Unimplementedsupports_bank_query() is false

compliance: optional – This method must be implemented if ``supports_bank_query()`` is ``true``.

bank_terms
get_item_query_record(item_record_type)

Gets the item record query corresponding to the given Item record Type.

Multiple retrievals produce a nested OR term.

Parameters:item_record_type (osid.type.Type) – an item record type
Returns:the item query record
Return type:osid.assessment.records.ItemQueryRecord
Raise:NullArgumentitem_record_type is null
Raise:OperationFailed – unable to complete request
Raise:Unsupportedhas_record_type(item_record_type) is false

compliance: mandatory – This method must be implemented.

Assessment Query

class dlkit.assessment.queries.AssessmentQuery

Bases: dlkit.osid.queries.OsidObjectQuery

This is the query for searching assessments.

Each method match request produces an AND term while multiple invocations of a method produces a nested OR.

match_level_id(grade_id, match)

Sets the level grade Id for this query.

Parameters:
  • grade_id (osid.id.Id) – a grade Id
  • match (boolean) – true for a positive match, false for a negative match
Raise:

NullArgumentgrade_id is null

compliance: mandatory – This method must be implemented.

level_id_terms
supports_level_query()

Tests if a GradeQuery is available.

Returns:true if a grade query is available, false otherwise
Return type:boolean

compliance: mandatory – This method must be implemented.

level_query

Gets the query for a grade.

Multiple retrievals produce a nested OR term.

Returns:the grade query
Return type:osid.grading.GradeQuery
Raise:Unimplementedsupports_level_query() is false

compliance: optional – This method must be implemented if ``supports_level_query()`` is ``true``.

match_any_level(match)

Matches an assessment that has any level assigned.

Parameters:match (boolean) – true to match assessments with any level, false to match assessments with no level

compliance: mandatory – This method must be implemented.

level_terms
match_rubric_id(assessment_id, match)

Sets the rubric assessment Id for this query.

Parameters:
  • assessment_id (osid.id.Id) – an assessment Id
  • match (boolean) – true for a positive match, false for a negative match
Raise:

NullArgumentassessment_id is null

compliance: mandatory – This method must be implemented.

rubric_id_terms
supports_rubric_query()

Tests if an AssessmentQuery is available.

Returns:true if a rubric assessment query is available, false otherwise
Return type:boolean

compliance: mandatory – This method must be implemented.

rubric_query

Gets the query for a rubric assessment.

Multiple retrievals produce a nested OR term.

Returns:the assessment query
Return type:osid.assessment.AssessmentQuery
Raise:Unimplementedsupports_rubric_query() is false

compliance: optional – This method must be implemented if ``supports_rubric_query()`` is ``true``.

match_any_rubric(match)

Matches an assessment that has any rubric assessment assigned.

Parameters:match (boolean) – true to match assessments with any rubric, false to match assessments with no rubric

compliance: mandatory – This method must be implemented.

rubric_terms
match_item_id(item_id, match)

Sets the item Id for this query.

Parameters:
  • item_id (osid.id.Id) – an item Id
  • match (boolean) – true for a positive match, false for a negative match
Raise:

NullArgumentitem_id is null

compliance: mandatory – This method must be implemented.

item_id_terms
supports_item_query()

Tests if an ItemQuery is available.

Returns:true if an item query is available, false otherwise
Return type:boolean

compliance: mandatory – This method must be implemented.

item_query

Gets the query for an item.

Multiple retrievals produce a nested OR term.

Returns:the item query
Return type:osid.assessment.ItemQuery
Raise:Unimplementedsupports_item_query() is false

compliance: optional – This method must be implemented if ``supports_item_query()`` is ``true``.

match_any_item(match)

Matches an assessment that has any item.

Parameters:match (boolean) – true to match assessments with any item, false to match assessments with no items

compliance: mandatory – This method must be implemented.

item_terms
match_assessment_offered_id(assessment_offered_id, match)

Sets the assessment offered Id for this query.

Parameters:
  • assessment_offered_id (osid.id.Id) – an assessment offered Id
  • match (boolean) – true for a positive match, false for a negative match
Raise:

NullArgumentassessment_offered_id is null

compliance: mandatory – This method must be implemented.

assessment_offered_id_terms
supports_assessment_offered_query()

Tests if an AssessmentOfferedQuery is available.

Returns:true if an assessment offered query is available, false otherwise
Return type:boolean

compliance: mandatory – This method must be implemented.

assessment_offered_query

Gets the query for an assessment offered.

Multiple retrievals produce a nested OR term.

Returns:the assessment offered query
Return type:osid.assessment.AssessmentOfferedQuery
Raise:Unimplementedsupports_assessment_offered_query() is false

compliance: optional – This method must be implemented if ``supports_assessment_offered_query()`` is ``true``.

match_any_assessment_offered(match)

Matches an assessment that has any offering.

Parameters:match (boolean) – true to match assessments with any offering, false to match assessments with no offerings

compliance: mandatory – This method must be implemented.

assessment_offered_terms
match_assessment_taken_id(assessment_taken_id, match)

Sets the assessment taken Id for this query.

Parameters:
  • assessment_taken_id (osid.id.Id) – an assessment taken Id
  • match (boolean) – true for a positive match, false for a negative match
Raise:

NullArgumentassessment_taken_id is null

compliance: mandatory – This method must be implemented.

assessment_taken_id_terms
supports_assessment_taken_query()

Tests if an AssessmentTakenQuery is available.

Returns:true if an assessment taken query is available, false otherwise
Return type:boolean

compliance: mandatory – This method must be implemented.

assessment_taken_query

Gets the query for an assessment taken.

Multiple retrievals produce a nested OR term.

Returns:the assessment taken query
Return type:osid.assessment.AssessmentTakenQuery
Raise:Unimplementedsupports_assessment_taken_query() is false

compliance: optional – This method must be implemented if ``supports_assessment_taken_query()`` is ``true``.

match_any_assessment_taken(match)

Matches an assessment that has any taken version.

Parameters:match (boolean) – true to match assessments with any taken assessments, false to match assessments with no taken assessments

compliance: mandatory – This method must be implemented.

assessment_taken_terms
match_bank_id(bank_id, match)

Sets the bank Id for this query.

Parameters:
  • bank_id (osid.id.Id) – a bank Id
  • match (boolean) – true for a positive match, false for a negative match
Raise:

NullArgumentbank_id is null

compliance: mandatory – This method must be implemented.

bank_id_terms
supports_bank_query()

Tests if a BankQuery is available.

Returns:true if a bank query is available, false otherwise
Return type:boolean

compliance: mandatory – This method must be implemented.

bank_query

Gets the query for a bank.

Multiple retrievals produce a nested OR term.

Returns:the bank query
Return type:osid.assessment.BankQuery
Raise:Unimplementedsupports_bank_query() is false

compliance: optional – This method must be implemented if ``supports_bank_query()`` is ``true``.

bank_terms
get_assessment_query_record(assessment_record_type)

Gets the assessment query record corresponding to the given Assessment record Type.

Multiple retrievals produce a nested OR term.

Parameters:assessment_record_type (osid.type.Type) – an assessment record type
Returns:the assessment query record
Return type:osid.assessment.records.AssessmentQueryRecord
Raise:NullArgumentassessment_record_type is null
Raise:OperationFailed – unable to complete request
Raise:Unsupportedhas_record_type(assessment_record_type) is false

compliance: mandatory – This method must be implemented.

Assessment Offered Query

class dlkit.assessment.queries.AssessmentOfferedQuery

Bases: dlkit.osid.queries.OsidObjectQuery, dlkit.osid.queries.OsidSubjugateableQuery

This is the query for searching assessments.

Each method match request produces an AND term while multiple invocations of a method produces a nested OR.

match_assessment_id(assessment_id, match)

Sets the assessment Id for this query.

Parameters:
  • assessment_id (osid.id.Id) – an assessment Id
  • match (boolean) – true for a positive match, false for a negative match
Raise:

NullArgumentassessment_id is null

compliance: mandatory – This method must be implemented.

assessment_id_terms
supports_assessment_query()

Tests if an AssessmentQuery is available.

Returns:true if an assessment query is available, false otherwise
Return type:boolean

compliance: mandatory – This method must be implemented.

assessment_query

Gets the query for an assessment.

Multiple retrievals produce a nested OR term.

Returns:the assessment query
Return type:osid.assessment.AssessmentQuery
Raise:Unimplementedsupports_assessment_query() is false

compliance: optional – This method must be implemented if ``supports_assessment_query()`` is ``true``.

assessment_terms
match_level_id(grade_id, match)

Sets the level grade Id for this query.

Parameters:
  • grade_id (osid.id.Id) – a grade Id
  • match (boolean) – true for a positive match, false for a negative match
Raise:

NullArgumentgrade_id is null

compliance: mandatory – This method must be implemented.

level_id_terms
supports_level_query()

Tests if a GradeQuery is available.

Returns:true if a grade query is available, false otherwise
Return type:boolean

compliance: mandatory – This method must be implemented.

level_query

Gets the query for a grade.

Multiple retrievals produce a nested OR term.

Returns:the grade query
Return type:osid.grading.GradeQuery
Raise:Unimplementedsupports_level_query() is false

compliance: optional – This method must be implemented if ``supports_level_query()`` is ``true``.

match_any_level(match)

Matches an assessment offered that has any level assigned.

Parameters:match (boolean) – true to match offerings with any level, false to match offerings with no levsls

compliance: mandatory – This method must be implemented.

level_terms
match_items_sequential(match)

Match sequential assessments.

Parameters:match (boolean) – true for a positive match, false for a negative match

compliance: mandatory – This method must be implemented.

items_sequential_terms
match_items_shuffled(match)

Match shuffled item assessments.

Parameters:match (boolean) – true for a positive match, false for a negative match

compliance: mandatory – This method must be implemented.

items_shuffled_terms
match_start_time(start, end, match)

Matches assessments whose start time falls between the specified range inclusive.

Parameters:
  • start (osid.calendaring.DateTime) – start of range
  • end (osid.calendaring.DateTime) – end of range
  • match (boolean) – true for a positive match, false for a negative match
Raise:

InvalidArgumentend is less than start

compliance: mandatory – This method must be implemented.

match_any_start_time(match)

Matches offerings that has any start time assigned.

Parameters:match (boolean) – true to match offerings with any start time, false to match offerings with no start time

compliance: mandatory – This method must be implemented.

start_time_terms
match_deadline(start, end, match)

Matches assessments whose end time falls between the specified range inclusive.

Parameters:
  • start (osid.calendaring.DateTime) – start of range
  • end (osid.calendaring.DateTime) – end of range
  • match (boolean) – true for a positive match, false for a negative match
Raise:

InvalidArgumentend is less than start

Raise:

NullArgumentstart or end is null

compliance: mandatory – This method must be implemented.

match_any_deadline(match)

Matches offerings that have any deadline assigned.

Parameters:match (boolean) – true to match offerings with any deadline, false to match offerings with no deadline

compliance: mandatory – This method must be implemented.

deadline_terms
match_duration(low, high, match)

Matches assessments whose duration falls between the specified range inclusive.

Parameters:
  • low (osid.calendaring.Duration) – start range of duration
  • high (osid.calendaring.Duration) – end range of duration
  • match (boolean) – true for a positive match, false for a negative match
Raise:

InvalidArgumentend is less than start

Raise:

NullArgumentstart or end is null

compliance: mandatory – This method must be implemented.

match_any_duration(match)

Matches offerings that have any duration assigned.

Parameters:match (boolean) – true to match offerings with any duration, false to match offerings with no duration

compliance: mandatory – This method must be implemented.

duration_terms
match_score_system_id(grade_system_id, match)

Sets the grade system Id for this query.

Parameters:
  • grade_system_id (osid.id.Id) – a grade system Id
  • match (boolean) – true for a positive match, false for a negative match
Raise:

NullArgumentgrade_system_id is null

compliance: mandatory – This method must be implemented.

score_system_id_terms
supports_score_system_query()

Tests if a GradeSystemQuery is available.

Returns:true if a grade system query is available, false otherwise
Return type:boolean

compliance: mandatory – This method must be implemented.

score_system_query

Gets the query for a grade system.

Multiple retrievals produce a nested OR term.

Returns:the grade system query
Return type:osid.grading.GradeSystemQuery
Raise:Unimplementedsupports_score_system_query() is false

compliance: optional – This method must be implemented if ``supports_score_system_query()`` is ``true``.

match_any_score_system(match)

Matches taken assessments that have any grade system assigned.

Parameters:match (boolean) – true to match assessments with any grade system, false to match assessments with no grade system

compliance: mandatory – This method must be implemented.

score_system_terms
match_grade_system_id(grade_system_id, match)

Sets the grade system Id for this query.

Parameters:
  • grade_system_id (osid.id.Id) – a grade system Id
  • match (boolean) – true for a positive match, false for a negative match
Raise:

NullArgumentgrade_system_id is null

compliance: mandatory – This method must be implemented.

grade_system_id_terms
supports_grade_system_query()

Tests if a GradeSystemQuery is available.

Returns:true if a grade system query is available, false otherwise
Return type:boolean

compliance: mandatory – This method must be implemented.

grade_system_query

Gets the query for a grade system.

Multiple retrievals produce a nested OR term.

Returns:the grade system query
Return type:osid.grading.GradeSystemQuery
Raise:Unimplementedsupports_score_system_query() is false

compliance: optional – This method must be implemented if ``supports_score_system_query()`` is ``true``.

match_any_grade_system(match)

Matches taken assessments that have any grade system assigned.

Parameters:match (boolean) – true to match assessments with any grade system, false to match assessments with no grade system

compliance: mandatory – This method must be implemented.

grade_system_terms
match_rubric_id(assessment_offered_id, match)

Sets the rubric assessment offered Id for this query.

Parameters:
  • assessment_offered_id (osid.id.Id) – an assessment offered Id
  • match (boolean) – true for a positive match, false for a negative match
Raise:

NullArgumentassessment_offered_id is null

compliance: mandatory – This method must be implemented.

rubric_id_terms
supports_rubric_query()

Tests if an AssessmentOfferedQuery is available.

Returns:true if a rubric assessment offered query is available, false otherwise
Return type:boolean

compliance: mandatory – This method must be implemented.

rubric_query

Gets the query for a rubric assessment.

Multiple retrievals produce a nested OR term.

Returns:the assessment offered query
Return type:osid.assessment.AssessmentOfferedQuery
Raise:Unimplementedsupports_rubric_query() is false

compliance: optional – This method must be implemented if ``supports_rubric_query()`` is ``true``.

match_any_rubric(match)

Matches an assessment offered that has any rubric assessment assigned.

Parameters:match (boolean) – true to match assessments offered with any rubric, false to match assessments offered with no rubric

compliance: mandatory – This method must be implemented.

rubric_terms
match_assessment_taken_id(assessment_taken_id, match)

Sets the assessment taken Id for this query.

Parameters:
  • assessment_taken_id (osid.id.Id) – an assessment taken Id
  • match (boolean) – true for a positive match, false for a negative match
Raise:

NullArgumentassessment_taken_id is null

compliance: mandatory – This method must be implemented.

assessment_taken_id_terms
supports_assessment_taken_query()

Tests if an AssessmentTakenQuery is available.

Returns:true if an assessment taken query is available, false otherwise
Return type:boolean

compliance: mandatory – This method must be implemented.

assessment_taken_query

Gets the query for an assessment taken.

Multiple retrievals produce a nested OR term.

Returns:the assessment taken query
Return type:osid.assessment.AssessmentTakenQuery
Raise:Unimplementedsupports_assessment_taken_query() is false

compliance: optional – This method must be implemented if ``supports_assessment_taken_query()`` is ``true``.

match_any_assessment_taken(match)

Matches offerings that have any taken assessment version.

Parameters:match (boolean) – true to match offerings with any taken assessment, false to match offerings with no assessmen taken

compliance: mandatory – This method must be implemented.

assessment_taken_terms
match_bank_id(bank_id, match)

Sets the bank Id for this query.

Parameters:
  • bank_id (osid.id.Id) – a bank Id
  • match (boolean) – true for a positive match, false for a negative match
Raise:

NullArgumentbank_id is null

compliance: mandatory – This method must be implemented.

bank_id_terms
supports_bank_query()

Tests if a BankQuery is available.

Returns:true if a bank query is available, false otherwise
Return type:boolean

compliance: mandatory – This method must be implemented.

bank_query

Gets the query for a bank.

Multiple retrievals produce a nested OR term.

Returns:the bank query
Return type:osid.assessment.BankQuery
Raise:Unimplementedsupports_bank_query() is false

compliance: optional – This method must be implemented if ``supports_bank_query()`` is ``true``.

bank_terms
get_assessment_offered_query_record(assessment_offered_record_type)

Gets the assessment offered query record corresponding to the given AssessmentOffered record Type.

Multiple retrievals produce a nested OR term.

Parameters:assessment_offered_record_type (osid.type.Type) – an assessment offered record type
Returns:the assessment offered query record
Return type:osid.assessment.records.AssessmentOfferedQueryRecord
Raise:NullArgumentassessment_offered_record_type is null
Raise:OperationFailed – unable to complete request
Raise:Unsupportedhas_record_type(assessment_offered_record_type) is false

compliance: mandatory – This method must be implemented.

Assessment Taken Query

class dlkit.assessment.queries.AssessmentTakenQuery

Bases: dlkit.osid.queries.OsidObjectQuery

This is the query for searching assessments.

Each method match request produces an AND term while multiple invocations of a method produces a nested OR.

match_assessment_offered_id(assessment_offered_id, match)

Sets the assessment offered Id for this query.

Parameters:
  • assessment_offered_id (osid.id.Id) – an assessment Id
  • match (boolean) – true for a positive match, false for a negative match
Raise:

NullArgumentassessment_offered_id is null

compliance: mandatory – This method must be implemented.

assessment_offered_id_terms
supports_assessment_offered_query()

Tests if an AssessmentOfferedQuery is available.

Returns:true if an assessment offered query is available, false otherwise
Return type:boolean

compliance: mandatory – This method must be implemented.

assessment_offered_query

Gets the query for an assessment.

Multiple retrievals produce a nested OR term.

Returns:the assessment offered query
Return type:osid.assessment.AssessmentOfferedQuery
Raise:Unimplementedsupports_assessment_offered_query() is false

compliance: optional – This method must be implemented if ``supports_assessment_offered_query()`` is ``true``.

assessment_offered_terms
match_taker_id(resource_id, match)

Sets the resource Id for this query.

Parameters:
  • resource_id (osid.id.Id) – a resource Id
  • match (boolean) – true for a positive match, false for a negative match
Raise:

NullArgumentresource_id is null

compliance: mandatory – This method must be implemented.

taker_id_terms
supports_taker_query()

Tests if a ResourceQuery is available.

Returns:true if a resource query is available, false otherwise
Return type:boolean

compliance: mandatory – This method must be implemented.

taker_query

Gets the query for a resource.

Multiple retrievals produce a nested OR term.

Returns:the resource query
Return type:osid.resource.ResourceQuery
Raise:Unimplementedsupports_taker_query() is false

compliance: optional – This method must be implemented if ``supports_taker_query()`` is ``true``.

taker_terms
match_taking_agent_id(agent_id, match)

Sets the agent Id for this query.

Parameters:
  • agent_id (osid.id.Id) – an agent Id
  • match (boolean) – true for a positive match, false for a negative match
Raise:

NullArgumentagent_id is null

compliance: mandatory – This method must be implemented.

taking_agent_id_terms
supports_taking_agent_query()

Tests if an AgentQuery is available.

Returns:true if an agent query is available, false otherwise
Return type:boolean

compliance: mandatory – This method must be implemented.

taking_agent_query

Gets the query for an agent.

Multiple retrievals produce a nested OR term.

Returns:the agent query
Return type:osid.authentication.AgentQuery
Raise:Unimplementedsupports_taking_agent_query() is false

compliance: optional – This method must be implemented if ``supports_taking_agent_query()`` is ``true``.

taking_agent_terms
match_actual_start_time(start, end, match)

Matches assessments whose start time falls between the specified range inclusive.

Parameters:
  • start (osid.calendaring.DateTime) – start of range
  • end (osid.calendaring.DateTime) – end of range
  • match (boolean) – true for a positive match, false for a negative match
Raise:

InvalidArgumentend is less than start

Raise:

NullArgumentstart or end is null

compliance: mandatory – This method must be implemented.

match_any_actual_start_time(match)

Matches taken assessments taken that have begun.

Parameters:match (boolean) – true to match assessments taken started, false to match assessments taken that have not begun

compliance: mandatory – This method must be implemented.

actual_start_time_terms
match_completion_time(start, end, match)

Matches assessments whose completion time falls between the specified range inclusive.

Parameters:
  • start (osid.calendaring.DateTime) – start of range
  • end (osid.calendaring.DateTime) – end of range
  • match (boolean) – true for a positive match, false for a negative match
Raise:

InvalidArgumentend is less than start

Raise:

NullArgumentstart or end is null

compliance: mandatory – This method must be implemented.

match_any_completion_time(match)

Matches taken assessments taken that have completed.

Parameters:match (boolean) – true to match assessments taken completed, false to match assessments taken that are incomplete

compliance: mandatory – This method must be implemented.

completion_time_terms
match_time_spent(low, high, match)

Matches assessments where the time spent falls between the specified range inclusive.

Parameters:
  • low (osid.calendaring.Duration) – start of duration range
  • high (osid.calendaring.Duration) – end of duration range
  • match (boolean) – true for a positive match, false for a negative match
Raise:

InvalidArgumenthigh is less than low

Raise:

NullArgumentlow or high is null

compliance: mandatory – This method must be implemented.

time_spent_terms
match_score_system_id(grade_system_id, match)

Sets the grade system Id for this query.

Parameters:
  • grade_system_id (osid.id.Id) – a grade system Id
  • match (boolean) – true for a positive match, false for a negative match
Raise:

NullArgumentgrade_system_id is null

compliance: mandatory – This method must be implemented.

score_system_id_terms
supports_score_system_query()

Tests if a GradeSystemQuery is available.

Returns:true if a grade system query is available, false otherwise
Return type:boolean

compliance: mandatory – This method must be implemented.

score_system_query

Gets the query for a grade system.

Multiple retrievals produce a nested OR term.

Returns:the grade system query
Return type:osid.grading.GradeSystemQuery
Raise:Unimplementedsupports_score_system_query() is false

compliance: optional – This method must be implemented if ``supports_score_system_query()`` is ``true``.

match_any_score_system(match)

Matches taken assessments that have any grade system assigned.

Parameters:match (boolean) – true to match assessments with any grade system, false to match assessments with no grade system

compliance: mandatory – This method must be implemented.

score_system_terms
match_score(low, high, match)

Matches assessments whose score falls between the specified range inclusive.

Parameters:
  • low (decimal) – start of range
  • high (decimal) – end of range
  • match (boolean) – true for a positive match, false for negative match
Raise:

InvalidArgumenthigh is less than low

compliance: mandatory – This method must be implemented.

match_any_score(match)

Matches taken assessments that have any score assigned.

Parameters:match (boolean) – true to match assessments with any score, false to match assessments with no score

compliance: mandatory – This method must be implemented.

score_terms
match_grade_id(grade_id, match)

Sets the grade Id for this query.

Parameters:
  • grade_id (osid.id.Id) – a grade Id
  • match (boolean) – true for a positive match, false for a negative match
Raise:

NullArgumentgrade_id is null

compliance: mandatory – This method must be implemented.

grade_id_terms
supports_grade_query()

Tests if a GradeQuery is available.

Returns:true if a grade query is available, false otherwise
Return type:boolean

compliance: mandatory – This method must be implemented.

grade_query

Gets the query for a grade.

Multiple retrievals produce a nested OR term.

Returns:the grade query
Return type:osid.grading.GradeQuery
Raise:Unimplementedsupports_grade_query() is false

compliance: optional – This method must be implemented if ``supports_grade_query()`` is ``true``.

match_any_grade(match)

Matches taken assessments that have any grade assigned.

Parameters:match (boolean) – true to match assessments with any grade, false to match assessments with no grade

compliance: mandatory – This method must be implemented.

grade_terms
match_feedback(comments, string_match_type, match)

Sets the comment string for this query.

Parameters:
  • comments (string) – comment string
  • string_match_type (osid.type.Type) – the string match type
  • match (boolean) – true for a positive match, false for negative match
Raise:

InvalidArgumentcomments is not of string_match_type

Raise:

NullArgumentcomments or string_match_type is null

Raise:

Unsupportedsupports_string_match_type(string_match_type) is false

compliance: mandatory – This method must be implemented.

match_any_feedback(match)

Matches taken assessments that have any comments.

Parameters:match (boolean) – true to match assessments with any comments, false to match assessments with no comments

compliance: mandatory – This method must be implemented.

feedback_terms
match_rubric_id(assessment_taken_id, match)

Sets the rubric assessment taken Id for this query.

Parameters:
  • assessment_taken_id (osid.id.Id) – an assessment taken Id
  • match (boolean) – true for a positive match, false for a negative match
Raise:

NullArgumentassessment_taken_id is null

compliance: mandatory – This method must be implemented.

rubric_id_terms
supports_rubric_query()

Tests if an AssessmentTakenQuery is available.

Returns:true if a rubric assessment taken query is available, false otherwise
Return type:boolean

compliance: mandatory – This method must be implemented.

rubric_query

Gets the query for a rubric assessment.

Multiple retrievals produce a nested OR term.

Returns:the assessment taken query
Return type:osid.assessment.AssessmentTakenQuery
Raise:Unimplementedsupports_rubric_query() is false

compliance: optional – This method must be implemented if ``supports_rubric_query()`` is ``true``.

match_any_rubric(match)

Matches an assessment taken that has any rubric assessment assigned.

Parameters:match (boolean) – true to match assessments taken with any rubric, false to match assessments taken with no rubric

compliance: mandatory – This method must be implemented.

rubric_terms
match_bank_id(bank_id, match)

Sets the bank Id for this query.

Parameters:
  • bank_id (osid.id.Id) – a bank Id
  • match (boolean) – true for a positive match, false for a negative match
Raise:

NullArgumentbank_id is null

compliance: mandatory – This method must be implemented.

bank_id_terms
supports_bank_query()

Tests if a BankQuery is available.

Returns:true if a bank query is available, false otherwise
Return type:boolean

compliance: mandatory – This method must be implemented.

bank_query

Gets the query for a bank.

Multiple retrievals produce a nested OR term.

Returns:the bank query
Return type:osid.assessment.BankQuery
Raise:Unimplementedsupports_bank_query() is false

compliance: optional – This method must be implemented if ``supports_bank_query()`` is ``true``.

bank_terms
get_assessment_taken_query_record(assessment_taken_record_type)

Gets the assessment taken query record corresponding to the given AssessmentTaken record Type.

Multiple retrievals produce a nested OR term.

Parameters:assessment_taken_record_type (osid.type.Type) – an assessment taken record type
Returns:the assessment taken query record
Return type:osid.assessment.records.AssessmentTakenQueryRecord
Raise:NullArgumentassessment_taken_record_type is null
Raise:OperationFailed – unable to complete request
Raise:Unsupportedhas_record_type(assessment_taken_record_type) is false

compliance: mandatory – This method must be implemented.

Bank Query

class dlkit.assessment.queries.BankQuery

Bases: dlkit.osid.queries.OsidCatalogQuery

This is the query for searching banks Each method specifies an AND term while multiple invocations of the same method produce a nested OR.

match_item_id(item_id, match)

Sets the item Id for this query.

Parameters:
  • item_id (osid.id.Id) – an item Id
  • match (boolean) – true for a positive match, false for a negative match
Raise:

NullArgumentitem_id is null

compliance: mandatory – This method must be implemented.

item_id_terms
supports_item_query()

Tests if a ItemQuery is available.

Returns:true if an item query is available, false otherwise
Return type:boolean

compliance: mandatory – This method must be implemented.

item_query

Gets the query for an item.

Multiple retrievals produce a nested OR term.

Returns:the item query
Return type:osid.assessment.ItemQuery
Raise:Unimplementedsupports_item_query() is false

compliance: optional – This method must be implemented if ``supports_item_query()`` is ``true``.

match_any_item(match)

Matches assessment banks that have any item assigned.

Parameters:match (boolean) – true to match banks with any item, false to match assessments with no item

compliance: mandatory – This method must be implemented.

item_terms
match_assessment_id(assessment_id, match)

Sets the assessment Id for this query.

Parameters:
  • assessment_id (osid.id.Id) – an assessment Id
  • match (boolean) – true for a positive match, false for a negative match
Raise:

NullArgumentassessment_id is null

compliance: mandatory – This method must be implemented.

assessment_id_terms
supports_assessment_query()

Tests if an AssessmentQuery is available.

Returns:true if an assessment query is available, false otherwise
Return type:boolean

compliance: mandatory – This method must be implemented.

assessment_query

Gets the query for an assessment.

Multiple retrievals produce a nested OR term.

Returns:the assessment query
Return type:osid.assessment.AssessmentQuery
Raise:Unimplementedsupports_assessment_query() is false

compliance: optional – This method must be implemented if ``supports_assessment_query()`` is ``true``.

match_any_assessment(match)

Matches assessment banks that have any assessment assigned.

Parameters:match (boolean) – true to match banks with any assessment, false to match banks with no assessment

compliance: mandatory – This method must be implemented.

assessment_terms
match_assessment_offered_id(assessment_offered_id, match)

Sets the assessment offered Id for this query.

Parameters:
  • assessment_offered_id (osid.id.Id) – an assessment Id
  • match (boolean) – true for a positive match, false for a negative match
Raise:

NullArgumentassessment_offered_id is null

compliance: mandatory – This method must be implemented.

assessment_offered_id_terms
supports_assessment_offered_query()

Tests if an AssessmentOfferedQuery is available.

Returns:true if an assessment offered query is available, false otherwise
Return type:boolean

compliance: mandatory – This method must be implemented.

assessment_offered_query

Gets the query for an assessment offered.

Multiple retrievals produce a nested OR term.

Returns:the assessment offered query
Return type:osid.assessment.AssessmentOfferedQuery
Raise:Unimplementedsupports_assessment_offered_query() is false

compliance: optional – This method must be implemented if ``supports_assessment_offered_query()`` is ``true``.

match_any_assessment_offered(match)

Matches assessment banks that have any assessment offering assigned.

Parameters:match (boolean) – true to match banks with any assessment offering, false to match banks with no offering

compliance: mandatory – This method must be implemented.

assessment_offered_terms
match_ancestor_bank_id(bank_id, match)

Sets the bank Id for to match banks in which the specified bank is an acestor.

Parameters:
  • bank_id (osid.id.Id) – a bank Id
  • match (boolean) – true for a positive match, false for a negative match
Raise:

NullArgumentbank_id is null

compliance: mandatory – This method must be implemented.

ancestor_bank_id_terms
supports_ancestor_bank_query()

Tests if a BankQuery is available.

Returns:true if a bank query is available, false otherwise
Return type:boolean

compliance: mandatory – This method must be implemented.

ancestor_bank_query

Gets the query for an ancestor bank.

Multiple retrievals produce a nested OR term.

Returns:the bank query
Return type:osid.assessment.BankQuery
Raise:Unimplementedsupports_ancestor_bank_query() is false

compliance: optional – This method must be implemented if ``supports_ancestor_bank_query()`` is ``true``.

match_any_ancestor_bank(match)

Matches a bank that has any ancestor.

Parameters:match (boolean) – true to match banks with any ancestor banks, false to match root banks

compliance: mandatory – This method must be implemented.

ancestor_bank_terms
match_descendant_bank_id(bank_id, match)

Sets the bank Id for to match banks in which the specified bank is a descendant.

Parameters:
  • bank_id (osid.id.Id) – a bank Id
  • match (boolean) – true for a positive match, false for a negative match
Raise:

NullArgumentbank_id is null

compliance: mandatory – This method must be implemented.

descendant_bank_id_terms
supports_descendant_bank_query()

Tests if a BankQuery is available.

Returns:true if a bank query is available, false otherwise
Return type:boolean

compliance: mandatory – This method must be implemented.

descendant_bank_query

Gets the query for a descendant bank.

Multiple retrievals produce a nested OR term.

Returns:the bank query
Return type:osid.assessment.BankQuery
Raise:Unimplementedsupports_descendant_bank_query() is false

compliance: optional – This method must be implemented if ``supports_descendant_bank_query()`` is ``true``.

match_any_descendant_bank(match)

Matches a bank that has any descendant.

Parameters:match (boolean) – true to match banks with any descendant banks, false to match leaf banks

compliance: mandatory – This method must be implemented.

descendant_bank_terms
get_bank_query_record(bank_record_type)

Gets the bank query record corresponding to the given Bank record Type.

Multiple record retrievals produce a nested OR term.

Parameters:bank_record_type (osid.type.Type) – a bank record type
Returns:the bank query record
Return type:osid.assessment.records.BankQueryRecord
Raise:NullArgumentbank_record_type is null
Raise:OperationFailed – unable to complete request
Raise:Unsupportedhas_record_type(bank_record_type) is false

compliance: mandatory – This method must be implemented.