|SAS/AF Software Procedure Guide|
CBT entries store interactive user assistance or tutorial applications, which consist of
The following sections describe each of these components of a CBT entry.
|CBT Entry Displays|
You use the BUILD procedure's DISPLAY window to design the displays for CBT entries. The displays can use any of the text color features and highlighting features that the SAS text editor supports. In addition to static text, the display can include fields in which users can enter or select answers to questions, as well as graphics.
The display for
a CBT entry is divided into a sequence of frames. Frame
boundaries in the display are indicated with either a frame indicator line
or a divider line that consists of dash (
characters across the full width of the DISPLAY window. (You can use the FILL
command in the DISPLAY window to create divider lines.) Refer to Frame Indicator Syntax for information about
the syntax of frame indicator lines.
In addition to presenting information to users, frames in CBT entries can pose both fill-in-the-blank and multiple-choice questions. Refer to Query Frames for details about creating frames that present questions. If the frame contains a question for users, it must begin with a frame indicator line, and it must include one or more feedback indicator lines that determine how the entry responds to user input. Refer to Feedback Indicator Syntax for information about the syntax of feedback indicator lines.
If a frame does not present a question, users can press ENTER to advance to the next frame in the sequence. If the frame presents a question, users must either attempt to answer the question or use the FORWARD command to skip the question. Users can issue the BACKWARD command to scroll back to previous frames in the sequence. When a user issues an END command to close the CBT entry, the current entry name is stored as the AF checkpoint (unless the CHECKLAST=NO option was specified in the AF command that started the application). Users can issue the SAVE command to save the current frame number and end the current SAS session. When the user opens the CBT entry again, it resumes at the frame that was displayed when the SAVE command was issued.
You can define frames that branch unconditionally to other SAS/AF catalog
entries. To define a frame that jumps to another entry, use a divider line
to begin the frame, and enter three uppercase P characters in the first three
columns of the next line. Follow the
the name of the entry to open.
you design a frame that has more lines than the current window size, only
the number of lines that fit in the window are initially displayed. Users
must issue a FORWARD command to display the remaining lines of the frame.
You can designate a portion of the frame that does not scroll. Enter three
^) or NOT (
characters in the first three columns of a line to delineate the nonscrolling
region of the frame. Any text and fields above the line that contains the
visible as long as the current frame is displayed; FORWARD and BACKWARD commands
scroll only the region below the nonscrolling area.
You can define pause indicators in the display to delay the presentation
of portions of the text. Enter three at (
characters in the first three columns of a line to define a pause. Only the
text between the beginning of the frame and the first pause indicator (
@@@) appears when the frame is initially displayed. When the
user presses ENTER, the text from the current pause indicator up to the next
pause indicator (or up to the end of the frame, if there are no more pause
indicators) is added to the frame, and so on.
You can use the LOCK option in the frame indicator to segment frames.
A frame indicator line with the LOCK option ends a sequence of frames. Users
cannot press the ENTER key or issue FORWARD or BACKWARD commands to move into
or out of a locked frame. Locked frames are displayed only when they are specifically
called, such as in a branch from a feedback item in another frame.
CBT entries can pose either fill-in-the-blank or multiple-choice questions. If a frame poses a question, the user cannot press the ENTER key to move to the next frame without attempting to answer the question. However, the FORWARD command can be used to skip the question, unless the field is locked.
You designate the response field for a fill-in-the-blank question with an initial ampersand (&), followed by underscore (_) characters to pad the field to the length required to hold the largest answer value. A response field can be as short as a single & or as long as the width of a display line. The ampersand and pad characters do not appear when the frame is displayed to the user.
Use the CORRECT= option in the frame indicator to specify the correct answer to the fill-in-the-blank question. You can use feedback indicators to define the entry's response to correct or incorrect answers. The feedback indicators can either display messages or branch to other frames or entries.
Designate the response fields for multiple-choice questions with underscore (_) characters. The underscore for each response field should be preceded and followed by a space. You can use up to eight multiple-choice response fields in a frame. When the frame is displayed to users, they can use the TAB key to move the cursor from field to field, and they can either press ENTER or click the mouse to select the desired field.
Each multiple-choice response field should have a corresponding feedback indicator that specifies the entry's response to the selection. The feedback indicators can either display messages or branch to other frames or entries. Use the C option in the feedback indicator to indicate which responses are considered correct.
You can collect information about the user's responses to the questions in the CBT entry. The response statistics are stored in a SAS data set. Refer to the descriptions of the QUIZ= and QUIZ options in Frame Indicator Options for details.
The AF task creates the following macro variables when a CBT entry is executed:
In addition to response fields, you can define the following other methods for enabling users to interact with the frames in a CBT entry:
The general form of a frame indicator is
|? <*|n> <options>|
|GRAPH=<(left-col, right-col, top-row, bottom-row)> libref.catalog-name.graphic-entry </ERASE>|
|SOUND|MUSIC=freq-1 duration-1 <... freq-n duration-n>|note-1 duration-1 <... note-n duration-n>|
Use the slash character (/) to continue a frame indicator across multiple lines of the display. For example, the following lines comprise a single frame indicator:
?2 name=mean / correct=42 / wrong=review.cbt
You can use the following options in frame indicators:
If you omit the n option, feedback indicator lines in the frame are ignored, so the value of n should always be at least 1 if the frame includes feedback indicator lines.
If the user fails to enter or select the correct answer to the question within the allotted number of attempts, then by default the correct answer is displayed, and the user is prompted to press ENTER to continue. However, if the frame indicator includes the WRONG= option, then control passes to the specified entry.
By default, frames from the current sequence are displayed until a query frame is encountered or until the last frame of the sequence is displayed. Use the NOAUTO option to stop the automatic display before the last frame is reached.
If you specify CORRECT=?, then any answer that a user enters in the response field is considered correct.
Note: In order for users to see the graph when the CBT entry runs
in the application window, SAS/GRAPH software must be licensed at their site,
and their display devices must support SAS/GRAPH output.
By default, the graph is displayed starting on the second row of the display area to leave room for a line of text above. The display must contain enough blank lines so that the graph does not overlay any text. You can specify left and right column values and top and bottom row values to control the position of the graph within the display. The position values must be enclosed in parentheses. The following rules apply:
By default, any new graph that you display overlays any previous graph. Add the /ERASE option to erase any previous graphs before displaying the current graph. To erase the previous graph without displaying a new graph, specify the following:
Note: Use the QUIZ= option in the first frame for which you wish to collect
response data, and use the QUIZ option in subsequent frames.
The tracking data set contains the following variables:
|LIBREF||is the libref that contains the catalog where the CBT entry resides.|
|CATNAME||is the name of the catalog that contains the CBT entry.|
|OBJNAME||is the name of the CBT entry (or XTESTAFX, if you are testing the entry with the TESTAF command).|
|FRAME||is the frame number for which response data was recorded.|
|MATRICES||is the number of attempts that the user is allotted to answer the question.|
|TRIES||is the number of attempts that the user actually
Note: The number of attempts is not incremented if the frame does
not specify a correct answer for the question.
|SCORE||is a number that represents the user's success in
answering the question in the frame, as follows:
You can use either of the following formats to specify the sounds to play:
#to raise the note by a half tone or a lowercase
bto lower the note by a half tone. For example,
E6bspecifies an E flat in octave 6.
0for the frequency or
Zfor the note name.
Note: Users can use the SOUND command in the application window to turn
sounds on or off.
The general form of a feedback indicator is
|#<n<C>> <branch> <options>|
|SELECT=(left-col, right-col, top-row, bottom-row)|
|SOUND|MUSIC=freq-1 duration-1 <... freq-n duration-n>|note-1 duration-1 <... note-n duration-n>|
Use the slash character (/) to continue a feedback indicator across multiple lines of the display. For example, the following lines comprise a single feedback indicator:
#1 >< fruit.cbt frame=app / select=(10,14,3,3) / menu=apple
If you do not use the branch option in
the feedback indicator, you can follow the feedback indicator with one or
more lines of text. The lines of text that follow the feedback indicator are
displayed when users select the corresponding response field or selection
box. If the indicator designates a correct response, the first line of text
after the indicator is considered the congratulatory message, and the remaining
lines are considered the explanatory message. Both are displayed when a user
enters a correct response, but only the explanatory lines are displayed if
the user fails to give the correct response in the allotted number of attempts
or when the user asks to see the correct response without giving the correct
You can use the following options in feedback indicators:
If the frame includes a fill-in-the-blank question, then use the value 1 to provide feedback on user responses to the question. If the frame includes a multiple-choice question, the value of n should correspond to the order of the choice field (1 for the first choice, 2 for the second choice, and so on). For feedback indicators that are not associated with response fields (for example, when the SELECT= or MENU= options are used), the value of n is not significant.
Note: If you do not specify the HELP= option, the HELP command opens
the entry specified in the Help general attribute for the CBT entry.
Selection boxes should be separated by at least one space.
|CBT Entry General Attributes|
CBT entries also store attributes for the application window in which the entries are displayed to users. See General Attributes for Application Windows for details about the general attributes you can specify for the application window.
|CBT Entry Child Attribute|
CBT entries can store a child attribute that specifies the name of another SAS/AF entry that opens if users press ENTER from the last frame of the CBT entry. You specify the child attribute in the ATTR window for the CBT entry. Use the ATTR command in the BUILD procedure's DISPLAY window to open the ATTR window.
Note: The child entry is opened only when a user presses the ENTER key while
the final frame of the CBT entry is displayed. Use the Parent general attribute
to specify an entry to open when users end some other CBT entry.
The child attribute consists of the four-level name of the entry to open. If the target entry is in the same catalog as the CBT entry, you only need to specify the name and type of the target entry. If the target entry is stored in a different catalog or in a catalog in a different library, then you must also specify the libref and catalog for the target entry.
Top of Page
Copyright 1999 by SAS Institute Inc., Cary, NC, USA. All rights reserved.