File:  [LON-CAPA] / loncom / homework / templates / examupload.problem
Revision 1.4: download - view: text, annotated - select for diffs
Tue Jan 27 20:45:11 2004 UTC (20 years, 4 months ago) by albertel
Branches: MAIN
CVS tags: version_1_1_X, version_1_1_3, version_1_1_2, HEAD
- allow formatting of the shown grade in the score upload

    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: <endouttext />
   15: <notsolved><numericalresponse id='score' /></notsolved>
   16: </problem>

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