[LON-CAPA-cvs] cvs: loncom /homework/templates examupload.problem examupload.problem.meta
albertel
lon-capa-cvs@mail.lon-capa.org
Mon, 12 Mar 2007 20:39:24 -0000
albertel Mon Mar 12 16:39:24 2007 EDT
Modified files:
/loncom/homework/templates examupload.problem
examupload.problem.meta
Log:
- remove the default seting of 0f and make the script do the defaulting instead to 0f, (BUG#5105)
Index: loncom/homework/templates/examupload.problem
diff -u loncom/homework/templates/examupload.problem:1.7 loncom/homework/templates/examupload.problem:1.8
--- loncom/homework/templates/examupload.problem:1.7 Tue Dec 20 11:49:34 2005
+++ loncom/homework/templates/examupload.problem Mon Mar 12 16:39:23 2007
@@ -1,6 +1,6 @@
<problem>
<displaytitle />
-<parameter name="scoreformat" description="Format for display of score" default="0f" type="string" />
+<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');
@@ -8,7 +8,7 @@
$awarded=&EXT('user.resource.resource.0.awarded');
if (!defined($awarded)) { $awarded=0; }
$scoreformat=&EXT('resource.0.scoreformat');
-if (!defined($scoreformat) || $scoreformat eq '') { $scoreformat="2f"; }
+if (!defined($scoreformat) || $scoreformat eq '') { $scoreformat="0f"; }
</script>
<startouttext />
You have <display>&format($awarded*$weight,$scoreformat)</display> out of $weight possible points.
Index: loncom/homework/templates/examupload.problem.meta
diff -u loncom/homework/templates/examupload.problem.meta:1.3 loncom/homework/templates/examupload.problem.meta:1.4
--- loncom/homework/templates/examupload.problem.meta:1.3 Tue Dec 20 11:49:34 2005
+++ loncom/homework/templates/examupload.problem.meta Mon Mar 12 16:39:23 2007
@@ -13,7 +13,7 @@
<owner>templates@lib</owner>
<parameter part="0" id="score" package="numericalresponse"></parameter>
<parameter part="0" package="part"></parameter>
-<parameter part="0" name="scoreformat" type="string" default="0f" display="Format for display of score [Part: 0]"></parameter>
+<parameter part="0" name="scoreformat" type="string" display="Format for display of score [Part: 0]"></parameter>
<parameter part="0" name="handgrade" type="string_yesno" default="yes" display="Hand Grade [Part: 0]"></parameter>
<stores part="0" name="awarded" type="float" display="Partial Credit Factor [Part: 0]"></stores>
<stores part="0" name="solved" type="string" display="Problem Status [Part: 0]"></stores>