Ulf Kroehne
Paris, 2022/11/07 - 2022/11/08
The CBA ItemBuilder’s concept of conditional links can be used to create various different item designs.
Examples:
set()
-operator in Conditional Links.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.
UserDefinedIDs provide the reference between components in the (graphical) Page Editor and the Syntax.
UserDefinedIDs are important for multiple purposes:
Radiobutton
with UserDefinedID: rb1
required for correct response)correct
if Radiobutton
with UserDefinedID: rb1
is selected)Button
with UserDefinedID: Button1
can be set frozen)Button
with UserDefinedID: Button1
was clicked)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
Multiple Components
Project
>
Edit all user
defined IDs
to open this dialog: The CBA ItemBuilder checks the validity and uniqueness of entered UserDefinedIds.1
Allowed Characters (same as for page names and project names):
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.
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?
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?
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?
Ctrl + Space
(Strg + Space
) in any syntax editor of the CBA ItemBuilder to see possible values in the current context (including operators and UserDefinedIDs
)Logical Expressions
and
) and disjunction (or
)not
)Boolean Data Types
true
: This is always fulfilledfalse
: This is never fulfilledUserDefinedId in Syntax
true
, for instance, if a component with a particular UserDefinedId is selected.Operators in Syntax
true
, given the provided arguments.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.
Cond1
(Cond1 and Cond2)
((Cond1 and Cond2) and Cond3)
are two conjunction A: (Cond1 and Cond2)
, B: Cond3
, combined to (A and B)
.Examples with negation:
not ((Cond1 and Cond2) and Cond3)
not ((Cond1 and not Cond2) and not Cond3)
true
.Schema:
Page1
and Page2
) must exist in the current project.Condition1
nor Condition2
is fulfilled.Conditional Links are assigned as regular links.
CBA ItemBuilder Syntax Editor for Conditional Links:
x
in the title bar.link5513717510664183471.lk_dsl
is irrelevant).Five different conditional links:
target1
or target2
is shown.Conditional
Link 4,
a regular and conditional link is defined in parallel.If regular links and conditional links are defined in parallel (see example Conditional
Link 4,
), the regular link is only used if no conditional link rule applies.
Schema for Operator in Condition:
Example:
SingleLineInputFields
)matches(...)
is like a function call (returning true
or false
).matches(UserDefinedId,RegularExpression)
-operator in the condition evaluates to true
, when the Regular Expression matches the input (of the SingleLineInputField
with the UserDefinedId
).Schema for Single Operator:
Schema for Multiple Operators:
Schema for Multiple Operators:
Important:
Operator1()
, Operator2()
and OperatorA()
are placeholders for available Operators listed on the next slide.,
).CBA ItemBuilder Syntax defines various Operators for Conditional Links …
Inputfields
: focus
, insertText
openDialog
, closeDialog
initFSM
, setFSMEvent
, setFSMState
Audio
/ Video
components: initMediaPlayer
set
setHidden
/ unsetHidden
setActive
/ unsetActive
, setFrozen
/ unsetFrozen
PageAreas
: setEmbeddedPage
TextFields
: setHighlightable
/ unsetHighlightable
FrameSelectGroups
: setMultiselect
/ unsetMultiselect
, setNoDeselect
/ unsetNoDeselect
, setSelectable
/ unsetSelectable
Helpful to remember:
Additional tips:
Important: