[LON-CAPA-admin] Accessing the randomized exam code
Stuart Raeburn
raeburn at msu.edu
Wed Nov 9 11:51:58 EST 2011
Hi,
>
> Is there a way to call the randomized exam code so that it can be printed
> as instruction with the exam?
>
Currently, the exam code is included in the header printed for each
page, when the printing option selected is:
"Selected Resources from folder Homework for CODEd assignments"
You could also include the code within a resource by including this:
&EXT('query.CODE')
either within a text block in a .problem, or within an HTML file. A
CODE would be displayed when the printing mode was:
"Selected Resources from folder Homework for CODEd assignments"
or
"Selected Problems from folder Homework for CODEd assignments"
(.problem only).
If you want the CODE to be displayed on screen after bubblesheet
grading, when the student views the item online (or prints the item)
you would need to include the instructions in a .problem file and use
logic similar to:
<script type="loncapa/perl">
$displaycode = '';
$code = &EXT('user.resource.resource.CODE');
if ($code eq '') {
$code eq &EXT('query.CODE');
}
if ($code ne '') {
$displaycode = '6-letter exam code: <b>'.$code.'</b><br />';
}
</script>
<block condition="$code">
<startouttext />
$displaycode
<endouttext />
</block>
Stuart Raeburn
Quoting hkng <hkng at fsu.edu>:
> Hi,
>
> Is there a way to call the randomized exam code so that it can be printed
> as instruction with the exam?
>
> Thanks,
> -hk
>
More information about the LON-CAPA-admin
mailing list