[LON-CAPA-users] function 'submission' and version

Peter Dencker dencker at math.uni-luebeck.de
Fri Jun 5 05:31:24 EDT 2015


Hi,

I tried to demonstrate that it is possible to show all submissions:

submission( $partid, $responseid, $version )

If  $version is 0, the latest submission is returned and for all other 
values of $version the return value is undefined.

Have  I made a mistake or this a bug?

- Peter


<problem>
<script type="loncapa/perl">

   $submission_0 = submission ( 'p0', 'p0r0', 0 );
   $response_0
     = $submission_0 ? "first submission: $submission_0" : q{};
   $submission_1 = submission ( 'p0', 'p0r0', 1 );
   $response_1
     = $submission_1 ? "second submission: $submission_1" : q{};

</script>

$response_0 <br />
$response_1 <br />

<part id="p0">
<customresponse id="p0r0">
   <answer type="loncapa/perl">
     return 'INCORRECT';
   </answer>
   <textline />
</customresponse>
</part>
</problem>

-- 
Dr. Peter Dencker
     wissenschaftl. Mitarbeiter

UNIVERSITÄT ZU LÜBECK
     INSTITUT FÜR MATHEMATIK

     Ratzeburger Allee 160
     23562 Lübeck

     Tel +49 451 500 4254
     Fax +49 451 500 3373
     dencker at math.uni-luebeck.de

     www.math.uni-luebeck.de


More information about the LON-CAPA-users mailing list