|Web-Based Authoring Environment|
|4.3.3 Data referencing|
A variable created in the Data View is more useful, of course, if it can be referenced elsewhere, such as in the problem statement or in the evaluation expression of a feedback message. To reference this data, the user must implement py-tags ((py>for opening and (/py> for closing). The piece of data to be referenced goes in between the opening and closing py-tags and is referenced as seen in the "Reference" field of the variable being referenced. For example, if one created an integer variable named "a" with a value of 6, the reference would be "Data.a" and the user could reference this variable by the expression "(py> Data.a (/py>". If this expression were to be used in some statement delivered to the student, it would appear as "6". Note that this referencing format is only used outside of the Data View. Within the Data View, (such as in function definitions and derived expressions) the user need only reference a variable by its name (i.e. - "a" instead of "Data.a").
The resource below is a Flash movie with a play control at the bottom. To begin playing the movie, press the Play button on the control. You might need to enlarge the browser window to view all of the movie.