CBA ItemBuilder Workshop: Session 07

Ulf Kroehne

Paris, 2022/11/07 - 2022/11/08

First Example

The CBA ItemBuilder’s concept of conditional links can be used to create various different item designs.

Examples:

  • The Feedback example evaluates the selected radio button.
  • The Filtering example shows how multiple links (forward and backward) can be used.
  • The Answer-Unit-Correct example illustrates the use of Variables and the set()-operator in Conditional Links.

More Complex Example

  • Conditional links can be sufficient to implement simple adaptive Tasks.
  • Feedback (knowledge of results) is provided, for each error.
  • Complete flow is illustrated here.

While this item doesn’t make too much sense from a content perspective, it illustrates how Tasks with adaptive item selection can be implemented with multiple pages of automatically scoreable closed response formats.

Naming Components (UserDefinedIDs)

UserDefinedIDs provide the reference between components in the (graphical) Page Editor and the Syntax.

  • All components can be assigned to a unique id (called UserDefinedIDs).
  • UserDefinedIDs are important for multiple purposes:

    • Used for scoring (e.g., Radiobutton with UserDefinedID: rb1 required for correct response)
    • Used for conditional links (i.e., conditions in links, e.g., page correct if Radiobutton with UserDefinedID: rb1 is selected)
    • Used for operators (i.e., syntax elements that change the item can refer to components using the UserDefinedIDs, e.g., set the Button with UserDefinedID: Button1 can be set frozen)
    • Used for log data (i.e, name of components in the collected log events, e.g., Button with UserDefinedID: Button1 was clicked)

Configuring UserDefinedIDs

The CBA ItemBuilder generates a placeholder for the UserDefinedIDs (a long string starting with $). Configuring UserDefinedIDs means replacing this placeholder with a meaningful identifier.

Single Components

  • Properties-view in group Identification

Multiple Components

  • Project > Edit all user defined IDs to open this dialog:

Valid UserDefinedID

The CBA ItemBuilder checks the validity and uniqueness of entered UserDefinedIds.1

Allowed Characters (same as for page names and project names):

  • Only letters, digits and underscores (_) are allowed as characters.
  • Each UserDefinedId must start with a letter and it is not allowed to use a digit or underscore as the first character.
  • UserDefinedIds are case sensitive and upper and lower case letters need to be distiguished.
  • No spaces and blanks are allowed in UserDefinedIds.

Since the UserDefinedId is used for many different functions to connect components to syntax, it is recommended in larger CBA ItemBuilder projects to use a consistent naming scheme for all UserDefinedIds. A systematic naming schemes for the UserDefinedIds can reduce the error-proneness of scoring definitions for complex items.

General Syntax Rules – Comments

Syntax comments are recommended to ensure you and your colleagues can remember and read the meaning of specific parts of a syntax.

Why comments in syntax?

  • Although no specific programming language is required, the syntax components play an important role in creating interactive items.

How to add comments to syntax?

  • End of (current) line: // The rest of the line is a comment

  • Sections (multiple lines possible):/* Everything within
    is a comment */

What is considered as CBA ItemBuilder syntax?

  • Conditional Links, Task Initialization, Finite-State Machine Rules and Hit-/Miss-Conditions for scoring.

General Syntax Rules – Auto-Completion

Syntax means keywords + UserDefinedIDs + schema.

The CBA ItemBuilder provides a Auto-Completion feature that can simplify writing syntax, as it often can suggest the appropriate keywords and possible UserDefinedIds.

How to request syntax help?

  • Press Ctrl + Space (Strg + Space) in any syntax editor of the CBA ItemBuilder to see possible values in the current context (including operators and UserDefinedIDs)

General Syntax Rules – Logical Expressions

Logical Expressions

  • Logical conjunction (and) and disjunction (or)
  • Logical negation (not)

Boolean Data Types

  • true: This is always fulfilled
  • false: This is never fulfilled

UserDefinedId in Syntax

  • Can evaluate to true, for instance, if a component with a particular UserDefinedId is selected.

Operators in Syntax

  • Can evaluate to true, given the provided arguments.

General Syntax Rules – Bracketing

The CBA ItemBuilder supports complex logical expressions. However, it is important to know that a specific formulation is necessary, that uses only pairs of conditions.

  • Single conditions can be used as as, i.e., Cond1
  • Two conditions need brackets, i.e., (Cond1 and Cond2)
  • Logical conjunction of >= 3 conditions must be formulated as pairs:
    • ((Cond1 and Cond2) and Cond3) are two conjunction A: (Cond1 and Cond2), B: Cond3, combined to (A and B).
  • Examples with negation:

    • Logical negation of a conjunction of three conditions: not ((Cond1 and Cond2) and Cond3)
    • Logical negation of a conjunction of three conditions (two with negation): not ((Cond1 and not Cond2) and not Cond3)

CBA ItemBuilder Syntax defines various Operators for Conditional Links

  • Operators for Inputfields: focus, insertText
  • Operators for dialog pages: openDialog, closeDialog
  • Operators to change FSMs: initFSM, setFSMEvent, setFSMState
  • Operators for Audio/ Video components: initMediaPlayer
  • Operators for Variables: set
  • Operators for components: setHidden / unsetHidden
  • Operators for components with Component State: setActive / unsetActive, setFrozen / unsetFrozen
  • Operators for PageAreas: setEmbeddedPage
  • Operators for TextFields: setHighlightable / unsetHighlightable
  • Operators for FrameSelectGroups: setMultiselect / unsetMultiselect, setNoDeselect / unsetNoDeselect, setSelectable / unsetSelectable

Operators Examples

  • Frozen / Unfrozen: Is it possible to use a button?
  • Change variables (e.g., count how clicks).
  • Select components automatically.
  • Show / Hide components completely.
  • Conditional Links can execute Operators, but also require to configure a Target Page (which can be the current page).
  • Most often, Operators will be triggered from the Finite-State Machine (see session 11).