Queries

Assessment Part Query

class dlkit.assessment_authoring.queries.AssessmentPartQuery

Bases: dlkit.osid.queries.OsidObjectQuery, dlkit.osid.queries.OsidContainableQuery, dlkit.osid.queries.OsidOperableQuery

This is the query for searching assessment parts.

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_parent_assessment_part_id(assessment_part_id, match)

Sets the assessment part Id for this query.

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

NullArgumentassessment_part_id is null

compliance: mandatory – This method must be implemented.

parent_assessment_part_id_terms
supports_parent_assessment_part_query()

Tests if an AssessmentPartQuery is available.

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

compliance: mandatory – This method must be implemented.

parent_assessment_part_query

Gets the query for an assessment part.

Multiple retrievals produce a nested OR term.

Returns:the assessment part query
Return type:osid.assessment.authoring.AssessmentPartQuery
Raise:Unimplementedsupports_parent_assessment_part_query() is false

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

match_any_parent_assessment_part(match)

Matches assessment parts with any parent assessment part.

Parameters:match (boolean) – true to match assessment parts with any parent, false to match assessment parts with no parents

compliance: mandatory – This method must be implemented.

parent_assessment_part_terms
match_section(match)

Matches assessment parts that are also used as sections.

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

compliance: mandatory – This method must be implemented.

section_terms
match_weight(low, high, match)

Matches assessment parts that fall in between the given weights inclusive.

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

InvalidArgumenthigh is less than low

compliance: mandatory – This method must be implemented.

match_any_weight(match)

Matches assessment parts with any weight assigned.

Parameters:match (boolean) – true to match assessment parts with any wieght, false to match assessment parts with no weight

compliance: mandatory – This method must be implemented.

weight_terms
match_allocated_time(low, high, match)

Matches assessment parts hose allocated time falls in between the given times inclusive.

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

InvalidArgumenthigh is less than low

compliance: mandatory – This method must be implemented.

match_any_allocated_time(match)

Matches assessment parts with any time assigned.

Parameters:match (boolean) – true to match assessment parts with any alloocated time, false to match assessment parts with no allocated time

compliance: mandatory – This method must be implemented.

allocated_time_terms
match_child_assessment_part_id(assessment_part_id, match)

Sets the assessment part Id for this query.

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

NullArgumentassessment_part_id is null

compliance: mandatory – This method must be implemented.

child_assessment_part_id_terms
supports_child_assessment_part_query()

Tests if an AssessmentPartQuery is available.

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

compliance: mandatory – This method must be implemented.

child_assessment_part_query

Gets the query for an assessment part.

Multiple retrievals produce a nested OR term.

Returns:the assessment part query
Return type:osid.assessment.authoring.AssessmentPartQuery
Raise:Unimplementedsupports_child_assessment_part_query() is false

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

match_any_child_assessment_part(match)

Matches assessment parts with any child assessment part.

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

compliance: mandatory – This method must be implemented.

child_assessment_part_terms
match_bank_id(bank_id, match)

Matches constrainers mapped to the bank.

Parameters:
  • bank_id (osid.id.Id) – the 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 an 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_part_query_record(assessment_part_record_type)

Gets the assessment part query record corresponding to the given AssessmentPart record Type.

Multiple retrievals produce a nested OR term.

Parameters:assessment_part_record_type (osid.type.Type) – an assessment part record type
Returns:the assessment part query record
Return type:osid.assessment.authoring.records.AssessmentPartQueryRecord
Raise:NullArgumentassessment_part_record_type is null
Raise:OperationFailed – unable to complete request
Raise:Unsupportedhas_record_type(assessment_part_record_type) is false

compliance: mandatory – This method must be implemented.

Sequence Rule Query

class dlkit.assessment_authoring.queries.SequenceRuleQuery

Bases: dlkit.osid.queries.OsidRuleQuery

This is the query for searching sequence rules.

Each method match specifies a AND term while multiple invocations of the same method produce a nested OR.

match_assessment_part_id(assessment_part_id, match)

Sets the assessment part Id for this query.

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

NullArgumentassessment_part_id is null

compliance: mandatory – This method must be implemented.

assessment_part_id_terms
supports_assessment_part_query()

Tests if an AssessmentPartQuery is available.

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

compliance: mandatory – This method must be implemented.

assessment_part_query

Gets the query for an assessment part.

Multiple retrievals produce a nested OR term.

Returns:the assessment part query
Return type:osid.assessment.authoring.AssessmentPartQuery
Raise:Unimplementedsupports_assessment_part_query() is false

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

assessment_part_terms
match_next_assessment_part_id(assessment_part_id, match)

Sets the assessment part Id for this query.

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

NullArgumentassessment_part_id is null

compliance: mandatory – This method must be implemented.

next_assessment_part_id_terms
supports_next_assessment_part_query()

Tests if an AssessmentPartQuery is available.

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

compliance: mandatory – This method must be implemented.

next_assessment_part_query

Gets the query for an assessment part.

Multiple retrievals produce a nested OR term.

Returns:the assessment part query
Return type:osid.assessment.authoring.AssessmentPartQuery
Raise:Unimplementedsupports_next_assessment_part_query() is false

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

next_assessment_part_terms
match_minimum_score(low, high, match)

Matches minimum scores that fall in between the given scores inclusive.

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

InvalidArgumenthigh is less than low

compliance: mandatory – This method must be implemented.

match_any_minimum_score(match)

Matches assessment parts with any minimum score assigned.

Parameters:match (boolean) – true to match assessment parts with any minimum score, false to match assessment parts with no minimum score

compliance: mandatory – This method must be implemented.

minimum_score_terms
match_maximum_score(low, high, match)

Matches maximum scores that fall in between the given scores inclusive.

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

InvalidArgumenthigh is less than low

compliance: mandatory – This method must be implemented.

match_any_maximum_score(match)

Matches assessment parts with any maximum score assigned.

Parameters:match (boolean) – true to match assessment parts with any maximum score, false to match assessment parts with no maximum score

compliance: mandatory – This method must be implemented.

maximum_score_terms
match_cumulative(match)

Matches cumulative rules.

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

compliance: mandatory – This method must be implemented.

cumulative_terms
match_applied_assessment_part_id(assessment_part_id, match)

Sets the assessment part Id for this query.

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

NullArgumentassessment_part_id is null

compliance: mandatory – This method must be implemented.

applied_assessment_part_id_terms
supports_applied_assessment_part_query()

Tests if an AssessmentPartQuery is available.

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

compliance: mandatory – This method must be implemented.

applied_assessment_part_query

Gets the query for an assessment part.

Multiple retrievals produce a nested OR term.

Returns:the assessment part query
Return type:osid.assessment.authoring.AssessmentPartQuery
Raise:Unimplementedsupports_applied_assessment_part_query() is false

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

match_any_applied_assessment_part(match)

Matches assessment parts with any applied assessment part.

Parameters:match (boolean) – true to match assessment parts with any applied assessment part, false to match assessment parts with no applied assessment parts

compliance: mandatory – This method must be implemented.

applied_assessment_part_terms
match_bank_id(bank_id, match)

Matches constrainers mapped to the bank.

Parameters:
  • bank_id (osid.id.Id) – the 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 an 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_sequence_rule_query_record(sequence_rule_record_type)

Gets the sequence rule query record corresponding to the given SequenceRule record Type.

Multiple record retrievals produce a nested OR term.

Parameters:sequence_rule_record_type (osid.type.Type) – a sequence rule record type
Returns:the sequence rule query record
Return type:osid.assessment.authoring.records.SequenceRuleQueryRecord
Raise:NullArgumentsequence_rule_record_type is null
Raise:OperationFailed – unable to complete request
Raise:Unsupportedhas_record_type(sequence_rule_record_type) is false

compliance: mandatory – This method must be implemented.