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 (15 years 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)
<problem>
<displaytitle />
<parameter name="scoreformat" description="Format for display of score" type="string" />
<parameter name="handgrade" description="Hand Grade" default="yes" type="string_yesno" />
<script type="loncapa/perl">
$weight=&EXT('resource.0.weight');
if ((!defined($weight)) || ($weight eq '')) { $weight=1; }
$awarded=&EXT('user.resource.resource.0.awarded');
if (!defined($awarded)) { $awarded=0; }
$scoreformat=&EXT('resource.0.scoreformat');
if (!defined($scoreformat) || $scoreformat eq '') { $scoreformat="0f"; }
</script>
<startouttext />
You have <display>&format($awarded*$weight,$scoreformat)</display> out of $weight possible points.
<instructorcomment><span style="color:red">
<br />If non-integer points are used (e.g., 3.5), make sure to change the
display format in "Modify parameter settings for this resource" ("PPRM"/clock symbol), or the result will be displayed in rounded form.
</span></instructorcomment>
<endouttext />
<block condition="0"><numericalresponse id="score" /></block>
</problem>
FreeBSD-CVSweb <freebsd-cvsweb@FreeBSD.org>