[LON-CAPA-cvs] cvs: loncom /homework/templates DropBox.problem examupload.problem

www www@source.lon-capa.org
Thu, 27 May 2010 16:56:20 -0000


www		Thu May 27 16:56:20 2010 EDT

  Modified files:              
    /loncom/homework/templates	DropBox.problem examupload.problem 
  Log:
  Be able to control score feedback using problemstatus parameter
  
  
Index: loncom/homework/templates/DropBox.problem
diff -u loncom/homework/templates/DropBox.problem:1.15 loncom/homework/templates/DropBox.problem:1.16
--- loncom/homework/templates/DropBox.problem:1.15	Tue Apr 20 23:58:31 2010
+++ loncom/homework/templates/DropBox.problem	Thu May 27 16:56:20 2010
@@ -10,11 +10,14 @@
 $awarded=&EXT('user.resource.resource.0.awarded');
 $scoreformat=&EXT('resource.0.scoreformat');
 if (!defined($scoreformat) || $scoreformat eq '') { $scoreformat="0f"; }
-if (!defined($awarded)) {
-   $display=$weight.' possible points.';
-} else {
-   $display='You have '.&format($awarded*$weight,$scoreformat).' out of '.
+$display='';
+if (&EXT('resource.0.problemstatus')!~/^no/) {
+   if (!defined($awarded)) {
+      $display=$weight.' possible points.';
+   } else {
+      $display='You have '.&format($awarded*$weight,$scoreformat).' out of '.
             $weight.' possible points.';
+   }
 }
 $comment=&EXT('user.resource.resource.0.comment');
 if (!defined($comment) || $comment!~/\w/) {
@@ -39,6 +42,7 @@
 <ul><li>If non-integer points are used (e.g., 3.5), make sure to change the display format, or the result will be displayed in rounded form.</li>
 <li>To change the allowed file types for submissions, change the "uploadedfiletypes"</li>
 <li>To change the maximum cumulative size for submitted files for this item, modify the "maxfilesize" parameter (The default is 10 MB).</li>
+<li>Feedback on grades can be controlled using the "problemstatus" parameter.</li>
 </ul>
 You can upload comments and grade information with this resource when uploading CSV files.
 </span></instructorcomment>
Index: loncom/homework/templates/examupload.problem
diff -u loncom/homework/templates/examupload.problem:1.12 loncom/homework/templates/examupload.problem:1.13
--- loncom/homework/templates/examupload.problem:1.12	Tue Apr 20 23:58:31 2010
+++ loncom/homework/templates/examupload.problem	Thu May 27 16:56:20 2010
@@ -12,6 +12,15 @@
 if (!defined($awarded)) { $awarded=0; }
 $scoreformat=&EXT('resource.0.scoreformat');
 if (!defined($scoreformat) || $scoreformat eq '') { $scoreformat="0f"; }
+$display='';
+if (&EXT('resource.0.problemstatus')!~/^no/) {
+   if (!defined($awarded)) {
+      $display=$weight.' possible points.';
+   } else {
+      $display='You have '.&format($awarded*$weight,$scoreformat).' out of '.
+            $weight.' possible points.';
+   }
+}
 $comment=&EXT('user.resource.resource.0.comment');
 if (!defined($comment) || $comment!~/\w/) {
    $comment='';
@@ -29,11 +38,11 @@
 </script>
 
 <startouttext />
-You have <display>&format($awarded*$weight,$scoreformat)</display> out of $weight possible points.
+$display
 <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" (clock symbol), or the result will be displayed in rounded form.
-You can upload comments and grade information with this resource when uploading CSV files.
+You can upload comments and grade information with this resource when uploading CSV files. Feedback on grades can be controlled using the problemstatus parameter.
 </span></instructorcomment>
 $gradeinfo
 $comment