Search CTAT

Configuring CTAT Flash Tutors with FlashVars

Last updated January 29, 2015

What is FlashVars?

FlashVars is a common way to assign variables for a Flash movie from an HTML document. This method is used extensively by CTAT Flash tutors, which are commonly included in HTML pages for viewing over the web (see Delivering CTAT Flash Tutors for instructions on how to generate such an HTML file).

When the Flash tutor (ie, the SWF) loads in a browser, it looks for the FlashVars parameter in HTML and, if found, converts the name-value pairs into variables that the Flash tutor can use. This mechanism is not unique to CTAT tutors, and can be used by any Flash movie for initializing data (see Adobe's FlashVars documentation for more information).

CTAT uses the flashvars parameter for a variety of things. These include setting:

  • the location of the Tutoring Service
  • the path to the behavior graph (.BRD) file
  • logging parameters

Flash logging flow: Flashvars

How to specify FlashVars for CTAT tutors

The way in which you specify flashvars for your tutors depends on the delivery framework you are using.

  • TutorShop: flashvars are generated dynamically based on tutor information contained in the TutorShop database
  • No delivery application (standalone pages): Use the CTAT_FlashPublish template from the Flash IDE to generate HTML, which contains a FlashVars stub that you can modify.
  • Your own application: Use the CTAT_FlashPublish template from the Flash IDE to generate HTML, which contains a FlashVars stub that you can examine for learning the flashvars syntax.

From Adobe's documentation:

The format of [FlashVars] is a set of name=value combinations separated by '&'. Special and/or non-printable characters can be escaped with a '%' followed by a 2 digit hexadecimal value. A single blank space can be represented using the '+' sign.

FlashVars is given in a single string enclosed by double quotes. In HTML, it will look like:

<object ...>
<param name="FlashVars" value="log_service_url=

In the above simplified example, the first name=value combination consists of log_service_url for the name, and for the value.

Include as many or as few flashvars as you'd like. Consult the tables below for deciding which parameters to include.

FlashVars Parameters and Values

The tables below present a list of FlashVars parameters that are commonly used by CTAT Flash tutors (ActionScript 3).

Table 1. Tutoring parameters
NameDefault ValueDescription
question_fileThe path to the behavior graph to load. Can be a relative path (if the BRD is located on the same machine as the Tutoring Service), in which case the path is relative to the Tutoring Service, or a full URL—the BRD does not need to be located on the same machine running the Tutoring Service.
BehaviorRecorderModeAuthorTimeTutoringThe mode of the Flash tutor. Possible values are: AuthorTime (for connecting to the Behavior Recorder) and AuthorTimeTutoring (for connecting to a Tutoring Service).
remoteSocketURLlocalhostThe host name of the machine running the Tutoring Service. If remoteSocketURL is not set in FlashVars, the tutor will use the property from the CommShell.
remoteSocketPort1502The port on which the Tutoring Service is listening.
session_idGenerated by the learner management system (LMS) and used in all log messages.
source_idPossible values are 'FLASH_PSEUDO_TUTOR' or 'CTAT_JAVA_TUTOR'. Used in all log messages.
collaboratorsa comma separated list of user ids of one collaborating team. See the user_guid flashvar in the logging table below. When the collaborators flashvar is specified and when a group of user ids is present, the tutoring service will wait until all users are connected before starting any collaboration. From that point all tutored and untutored messages will be echoed to the participants (excluding the originating user)

Show fewest parameters required for logging

Table 2. Logging parameters
NameDefault ValueDescription
LoggingNoneSpecify logging source and destination. Possible values:
  • None: no logging
  • ClientToService: Flash client sends log messages to the Tutoring Service, which in turn sends them to a log server or stores them on disk.
  • ClientToLogServer: Flash client sends log messages to a log server such as that hosted by PSLC DataShop
log_service_url The URL of a web service for logging. Required for ClientToLogServer logging. The default value is the URL of the Pittsburgh Science of Learning Center (PSLC) QA logging server, which should be used for testing. When logging for a PSLC study, log to the LearnLab production machine:
auth_tokenA unique authorization token.
class_nameName of the class
container_idA unique ID.
dataset_level_name[1-9]Required for logging. Can specify multiple nested levels. Example: dataset_level_name1=Fractions dataset_level_type1=Unit
dataset_level_type[1-9]Required for logging. Can specify multiple nested levels. Example: dataset_level_name2=FractionAddition dataset_level_type2=Section
dataset_nameRequired for logging. Appears in DataShop as the name of the dataset
DeliverUsingOLItrueIf delivering the tutor outside of the OLI course delivery system, set this to false and specify values for the following parameters:
  • user_guid
  • session_id
  • auth_token
  • container_id
  • source_id
  • external_object_id
If DeliverUsingOLI is false, you are responsible for authentication and providing values for the above parameters.
external_object_idA unique object id.
instructor_nameName of the instructor
log_to_disk_directory. (a single dot)The path name for the directory in which disk logging files will be stored. If the value is a relative path, it is relative to the value of the Projects dir preference at LauncherServer startup.
problem_contextA text description of the problem or how the problem is being used.
problem_nameDefaults to the value of question_fileThe name of the problem.
problem_tutorflagA description of the problem type. DataShop prefers one of: tutor, test, pre-test, post-test, or other.
school_nameSchool where these data will be collected.
SessionLog'true' or 'false'. Determines whether or not to send a session log message at the beginning of a session. If true, Flash should send the session log, not the LMS.
study_condition_name[1-9]Name to identify the study condition; can specify multiple conditions that apply to these data (e.g., study_condition_name1=mycondition).
study_condition_type[1-9]Type of study condition; can specify multiple conditions that apply to these data.
study_condition_description[1-9]A description of the study condition; can specify multiple conditions that apply to these data.
user_guidA unique user id used for logging.

These parameters map to elements in the tutor message DTD, version 4.

Table 3. LMS/sequencing parameters
NameDefault ValueDescription
authenticity_tokenneeded for authenticating POST messages
curriculum_service_url'[host]/process_problem_set/[parameters]' or '[host]/process_student_assignment/[parameters]'. Command that processes the problem summaries
expire_logout_url'[host]/admin/logout?type=expire'. Command that logs the user out on session expiration.
infohtml containing the problem caption.
problem_state_status'empty', 'complete', or 'incomplete'. Used for problem review.
reuse_swf'true' or 'false'. Should we reuse the SWF from problem to problem?
run_problem_url '[host]/run_student_assignment/[parameters]' or '[host]/run_problem_set/[parameters]'. Command that starts the next tutor. Location from which to receive the next problem (as HTML) if the Flash SWF is not being reused.
session_timeoutnumber of seconds to wait before the session times out
skillsXML containing the set of skills of interest for the current tutor
student_interfacecurrent tutor's full .swf path. Used for loading assets given a relative path, and for reuse_swf.
target_framename of html frame where tutor is runname of html frame where tutor is run
tutoring_service_communication'socket' or 'javascript'
Table 4. Debugging Parameters
NameDefault ValueDescription
instrumentation_log'off', 'on', or 'verbose'
show_debug_traces'on' or 'off'. Determines whether to send ActionScript debug messages.