File:  [LON-CAPA] / loncom / homework / templates / examupload.problem
Revision 1.10: download - view: text, annotated - select for diffs
Mon Jul 6 17:12:47 2009 UTC (14 years, 11 months ago) by bisitz
Branches: MAIN
CVS tags: version_2_9_99_0, bz6209-base, bz6209, bz2851, HEAD, GCI_3
Consistent problem templates:
- New line after each tag (not for texts in foils)
- One empty row after each end tag and before new start tag for second level tags
- No indentation for second level tags, e.g. <script>
- Four white spaces as indentation for each further sub level
    Exceptions:
        -Content (mostly text) in separate line(s): no indentation
        - Concept groups: same indentation as foilgroup
          (allows to insert code from problems without concept groups without changing the indentation and vice versa)
- No new line at end of template
- Removed new lines from within the middle of default texts
- Added one blank each after "<m>$" and before "$</m>" to ensure no misinterpretation neither by human nor by machine (e.g. "<m>$x" is not "<m>$ $x")
- Replaced deprecated font tag in <instructorcomment> by CSS
- Removed dos line endings
- dos2unix conversion
  (ClickImageExample.problem, RandomLabelExample.problem, SimpleMatching.problem)

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

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