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 Source | URL to the master source file. |
Response Handler | URL to the page which handles response submission. |
Source Version | Version of app. Use this to handle updates to your app. |
Results File | File to append results to. |
Events
ReadMaster | Reads the master file referenced in Master Source |
ReadInput | Reads the input file specified by Master Source and prepares the quiz |
LoadPrompt | Loads the next question |
SubmitPrompt | Submits user response to the current question |
SubmitData | Submits 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 Variables | List of global variables that student responses are stored in. |
Response Handler | URL to the page which handles response submission. |
Results File | File to append results to. |
Successful Event | This 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
SubmitData | Submits all student responses to the server and displays server's response |
|
Supporting Actors
|