File:  [LON-CAPA] / loncom / homework / templates / examupload.problem
Revision 1.6: download - view: text, annotated - select for diffs
Mon May 30 20:02:11 2005 UTC (19 years, 1 month ago) by www
Branches: MAIN
CVS tags: version_2_0_X, version_2_0_99_1, version_2_0_2, version_2_0_1, version_2_0_0, version_1_99_3, version_1_99_2, version_1_99_1, version_1_99_0, HEAD
I have done this to myself twice already.

    1: <problem>
    2: <displaytitle />
    3: <parameter name="scoreformat" description="Format for display of score" default="0f" type="string" />
    4: <script type="loncapa/perl">
    5: $weight=&EXT('resource.0.weight');
    6: if ((!defined($weight)) || ($weight eq '')) { $weight=1; }
    7: $awarded=&EXT('user.resource.resource.0.awarded');
    8: if (!defined($awarded)) { $awarded=0; }
    9: $scoreformat=&EXT('resource.0.scoreformat');
   10: if (!defined($scoreformat) || $scoreformat eq '') { $scoreformat="2f"; }
   11: </script>
   12: <startouttext />
   13: You have <display>&format($awarded*$weight,$scoreformat)</display> out of $weight possible points.
   14: <instructorcomment>
   15: <font color="red">
   16: <br />If non-integer points are used (e.g., 3.5), make sure to change the
   17: display format in PPRM, or the result will be displayed in rounded form.
   18: </font>
   19: </instructorcomment>
   20: <endouttext />
   21: <block condition="0"><numericalresponse id='score' /></block>
   22: </problem>

FreeBSD-CVSweb <freebsd-cvsweb@FreeBSD.org>