version 1.1, 2007/05/10 15:14:02
|
version 1.2, 2007/05/30 15:35:14
|
Line 18 The example below shows a portion of the
|
Line 18 The example below shows a portion of the
|
<!-- The parameters for this instance --> |
<!-- The parameters for this instance --> |
<InstanceText> |
<InstanceText> |
<script type='loncapa/perl'> |
<script type='loncapa/perl'> |
/* The first line must be the instance id */ |
/* The first line must be the instance id */ |
$entitySubject{instance} = "instanceHarry"; |
$entitySubject{instance} = "instanceHarry"; |
/* The two parameters. Personname = Harry and place=zoo */ |
/* The two parameters. Personname = Harry and place=zoo */ |
$entitySubject{personname} = "Harry"; |
$entitySubject{personname} = "Harry"; |
$entitySubject{place} = "zoo"; |
$entitySubject{place} = "zoo"; |
</script> |
</script> |
|
|
</InstanceText> |
</InstanceText> |
Line 35 The example below shows a portion of the
|
Line 35 The example below shows a portion of the
|
<!-- The parameters for this instance --> |
<!-- The parameters for this instance --> |
<InstanceText> |
<InstanceText> |
<script type='loncapa/perl'> |
<script type='loncapa/perl'> |
/* The first line must be the instance id */ |
/* The first line must be the instance id */ |
$entitySubject{instance} = "instanceBetty"; |
$entitySubject{instance} = "instanceBetty"; |
/* The two parameters. Personname = Betty and place=park */ $entitySubject{personname} = "Betty"; |
/* The two parameters. Personname = Betty and place=park */ $entitySubject{personname} = "Betty"; |
$entitySubject{place} = "park"; |
$entitySubject{place} = "park"; |
|
|
</script> |
</script> |
</InstanceText> |
</InstanceText> |
</Instance> |
</Instance> |
Line 54 The first line $<$Setup id="entitySubjec
|
Line 53 The first line $<$Setup id="entitySubjec
|
The first instance of this variable is shown from lines 2 to 10. Line two $<$Instance OptionalRequired="0" id="instanceHarry"$>$ marks the beginning of the instance element named instanceHarry (based on the id attribute). The OptionalRequired is given a value of 0. Lines 3-9 determine the actual value of this variable. Lines 3 and 4 must be typed as shown. Lines 5-7 define the instance properties, which must be of the form \$ $<$variable\_name$>$ \{$<$property\_name$>$ \} = $<$value$>$. The first line of the property must be the instance property (see line 5 of example), with the value being the id of the instance. Other lines (6-7) can be used for any attributes you wish to define. The closing $<$/script$>$, $<$/InstanceText$>$ and $<$/Instance$>$ tags must be typed as shown. |
The first instance of this variable is shown from lines 2 to 10. Line two $<$Instance OptionalRequired="0" id="instanceHarry"$>$ marks the beginning of the instance element named instanceHarry (based on the id attribute). The OptionalRequired is given a value of 0. Lines 3-9 determine the actual value of this variable. Lines 3 and 4 must be typed as shown. Lines 5-7 define the instance properties, which must be of the form \$ $<$variable\_name$>$ \{$<$property\_name$>$ \} = $<$value$>$. The first line of the property must be the instance property (see line 5 of example), with the value being the id of the instance. Other lines (6-7) can be used for any attributes you wish to define. The closing $<$/script$>$, $<$/InstanceText$>$ and $<$/Instance$>$ tags must be typed as shown. |
|
|
Line 12-21 shows the second instance with the same rules as the first instance. Line 23 $<$/Setup$>$ gives the closing Setup tag which must be as shown.. |
Line 12-21 shows the second instance with the same rules as the first instance. Line 23 $<$/Setup$>$ gives the closing Setup tag which must be as shown.. |
The example of the usage of this variable inside the question is this text: : |
The example of the usage of this variable inside the question is this text: |
|
|
This is a test question. \$entitySubject\{personname\} |
This is a test question. \$entitySubject\{personname\} |
went to the \$entitySubject\{place\}. . |
went to the \$entitySubject\{place\}. . |
|
|