Skip to content

Main content

Assessment Option Position Index Tool

Calculate assessment option position index from explicit caller-supplied inputs.

Loading tool…

Description

If option is found, index is its array position plus origin; otherwise found = false and index = -1.

Assessment records use item identifiers, branch labels, hierarchy references and deadline metadata. Literal matching and position counting preserve the supplied conventions without validating content, actual eligibility or semantic answer equivalence.

If option is found, index is its array position plus origin; otherwise found = false and index = -1.

When to use this tool

Use Assessment Option Position Index when checking an explicit assessment-record or answer-token rule.

How to use the tool and how it works

  1. Enter option, options, origin. Use the units and conventions below.
  2. Run the tool. Correct any format, range, or cross-field input error before interpreting the output.
  3. Read found, index. Inspect found before interpreting the associated values.

Require origin exactly zero or one and unique options. If option is found, index is its array position plus origin; otherwise found = false and index = -1.1

Input fieldMeaning and unitsAccepted input
optionOptionRequired. Text; maximum UTF-16 length 8192.
optionsOptionsRequired. Array of text; maximum UTF-16 length 8192; maximum items 256.
originOriginRequired. Safe integer.
Output fieldInterpretationReturned shape
foundFoundRequired. Boolean.
indexIndexRequired. Safe integer.
json
{
  "input": {
    "option": "B",
    "options": [
      "A",
      "B",
      "C"
    ],
    "origin": 1
  },
  "output": {
    "found": true,
    "index": 2
  }
}

Limitations and assumptions

  • Matching is literal and case-sensitive. A one-based origin does not change the -1 missing sentinel; option order or answer correctness is not inferred.
  • Inputs must satisfy both the field types and the cross-field conditions above. Invalid input causes an error; a successful false flag or documented placeholder is a different result.
  • Numeric calculations use binary floating point unless exact decimal-integer arithmetic is explicitly stated. No hidden measurement tolerance or decimal rounding is added; nonfinite or out-of-contract results are rejected. Numeric signed-zero results are exported as zero.

Alternative or Complementary methods

Review the actual record structure and approved grading policy when identity, content or official outcomes matter.

References

  1. Calculation and input contract: education/assessment-option-position-index — tool.io

Similar or alternative tools

  • Assessment Branch Item Count

    Select records whose branch label occurs in selectedBranches; return selectedRecords, distinctItems and repeatedSelectedRecords = selectedRecords-distinctItems.

  • Assignment Late Window Offset

    signedOffset = (submitted-due), negated when positiveMeansLate is false; beyondGrace = max(0,submitted-due-grace) regardless of sign policy.