[LON-CAPA-cvs] cvs: loncom /homework grades.pm /homework/templates examupload.problem examupload.problem.meta

www www@source.lon-capa.org
Tue, 20 Apr 2010 23:29:27 -0000


www		Tue Apr 20 23:29:27 2010 EDT

  Modified files:              
    /loncom/homework	grades.pm 
    /loncom/homework/templates	examupload.problem 
                              	examupload.problem.meta 
  Log:
  A good chunk of Bug #6250
  
  
Index: loncom/homework/grades.pm
diff -u loncom/homework/grades.pm:1.627 loncom/homework/grades.pm:1.628
--- loncom/homework/grades.pm:1.627	Tue Apr 20 21:53:33 2010
+++ loncom/homework/grades.pm	Tue Apr 20 23:29:22 2010
@@ -1,7 +1,7 @@
 # The LearningOnline Network with CAPA
 # The LON-CAPA Grading handler
 #
-# $Id: grades.pm,v 1.627 2010/04/20 21:53:33 www Exp $
+# $Id: grades.pm,v 1.628 2010/04/20 23:29:22 www Exp $
 #
 # Copyright Michigan State University Board of Trustees
 #
@@ -891,7 +891,7 @@
         '<label><input type="radio" name="lastSub" value="last" /> '.
         &mt('last submission &amp; parts info').' </label></span>'."\n".
         '<span class="LC_nobreak">'.
-        '<label><input type="radio" name="lastSub" value="datesub" /> '.
+        '<label><input type="radio" name="lastSub" value="datesub" checked="checked" /> '.
         &mt('by dates and submissions').'</label></span>'."\n".
         '<span class="LC_nobreak">'.
         '<label><input type="radio" name="lastSub" value="all" /> '.
@@ -3371,6 +3371,9 @@
 	if  (!$display) { $display = &Apache::lonnet::metadata($url,$part.'.name'); }
 	my ($partid) = &split_part_type($part);
         push(@partids,$partid);
+#
+# FIXME: Looks like $display looks at English text
+#
 	my $display_part=&get_display_part($partid,$symb);
 	if ($display =~ /^Partial Credit Factor/) {
 	    $result.='<th>'.
Index: loncom/homework/templates/examupload.problem
diff -u loncom/homework/templates/examupload.problem:1.10 loncom/homework/templates/examupload.problem:1.11
--- loncom/homework/templates/examupload.problem:1.10	Mon Jul  6 17:12:47 2009
+++ loncom/homework/templates/examupload.problem	Tue Apr 20 23:29:27 2010
@@ -12,14 +12,30 @@
 if (!defined($awarded)) { $awarded=0; }
 $scoreformat=&EXT('resource.0.scoreformat');
 if (!defined($scoreformat) || $scoreformat eq '') { $scoreformat="0f"; }
+$comment=&EXT('user.resource.resource.0.comment');
+if (!defined($comment) || $comment!~/\w/) {
+   $comment='';
+} else {
+   $comment='<br /><table><tr><td bgcolor="#FFFFDD">'.$comment.'</td></tr></table>';
+}
+$gradeinfo=&EXT('user.resource.resource.0.gradeinfo');
+if (!defined($gradeinfo) || $gradeinfo!~/\w/) {
+   $gradeinfo='';
+} else {
+   $gradeinfo='<br /><table><tr><td bgcolor="#DDDDFF">'.$gradeinfo.'</td></tr></table>';
+}
+
+
 </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.
+display format in "Modify parameter settings for this resource" (clock symbol), or the result will be displayed in rounded form.
 </span></instructorcomment>
+$gradeinfo
+$comment
 <endouttext />
 
 <block condition="0"><numericalresponse id="score" /></block>
Index: loncom/homework/templates/examupload.problem.meta
diff -u loncom/homework/templates/examupload.problem.meta:1.4 loncom/homework/templates/examupload.problem.meta:1.5
--- loncom/homework/templates/examupload.problem.meta:1.4	Mon Mar 12 20:39:23 2007
+++ loncom/homework/templates/examupload.problem.meta	Tue Apr 20 23:29:27 2010
@@ -18,5 +18,7 @@
 <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>
 <stores part="0" name="tries" type="int_zeropos" display="Number of Attempts [Part: 0]"></stores>
+<stores part="0" name="comment" type="string" display="Comment [Part: 0]"></stores>
+<stores part="0" name="gradeinfo" type="string" display="Grade Info [Part: 0]"</stores>
 <subject>Exam Scores</subject>
 <title>Exam Upload Resource</title>