Simple Clicker and Data Submission (Version 1.0)

The "Simple Clicker and Data Submission" behavior set is used to handle data retrieval and submission to a server. This behavior set is used in the Simple Clicker Demo and Physics Demo.

The behavior set was designed to maximize the lifespan of a published app. The underlying assumption is that apps can be distributed to a student at the beginning of a term, but not updated afterward.

Simple Clicker Process

When the student starts the clicker, the app reads a master file that the instructor places on the server. The name of this file is hard-coded in the app as the Master Source attribute. The contents of this file is the URL to the quiz that should be downloaded. The instructor can then change the quiz that is downloaded by updating the Master Source file.

The app then reads the input file, and displays the quiz. When the student has responded to the last question, the data is uploaded to the server.

Simple Clicker uses the HTTP GET protocol. It loads the file (typically .php) referenced in the Response Handler attribute, and passes, as parameters, Results File, the user name, the answer key, and the student's recorded responses. The string sent to the server will be:

Response Handler?resfile=Results File&user=username&key=answer key&res=response string

The Response Handler is a server-side program that parses the incoming input and stores the data to file for instructor use. An example is provided below.


Server PHP Code (.tar.gz)

Simple Data Submission

The Simple Data Submission behavior is a variant of the Simple Clicker, that only handles the data submission side. Its intended purpose is to allow submission of student work, such as in the Physics Demo.

Data submission is handled in the same way as in the Simple Clicker, but there is no answer key parameter. The string sent to the server will be:

Response Handler?resfile=Results File&user=username&res=response string

Behavior Components


Simple Clicker Behavior
Actor handles data download and upload for the simple clicker.

Notable Variables
Master SourceURL to the master source file.
Response HandlerURL to the page which handles response submission.
Source VersionVersion of app. Use this to handle updates to your app.
Results FileFile to append results to.

Events
ReadMasterReads the master file referenced in Master Source
ReadInputReads the input file specified by Master Source and prepares the quiz
LoadPromptLoads the next question
SubmitPromptSubmits user response to the current question
SubmitDataSubmits all student responses to the server and displays server's response


Simple Data Submission
Actor handles submission of data to a server.

Notable Variables
Response VariablesList of global variables that student responses are stored in.
Response HandlerURL to the page which handles response submission.
Results FileFile to append results to.
Successful EventThis event is triggered when data submission is successful. Events are only triggered in behaviors attached to the same actor. The Unique ID system is not used.

Events
SubmitDataSubmits all student responses to the server and displays server's response


Supporting Actors


Simple Clicker
Actor provides all functionality for the "simple clicker".

Required Behaviors
Simple Clicker Behavior (Version 1.0)
Unique Identifier
Hide Actor


Simple Data Button
Actor provides all functionality for the "simple clicker".

Required Behaviors
Simple Data Submission (Version 1.0)
Simple Push Button Behavior
Unique Identifier