[LON-CAPA-cvs] cvs: loncom /homework essayresponse.pm grades.pm

www lon-capa-cvs@mail.lon-capa.org
Fri, 24 Jan 2003 20:40:37 -0000


www		Fri Jan 24 15:40:37 2003 EDT

  Modified files:              
    /loncom/homework	essayresponse.pm grades.pm 
  Log:
  Now student uploaded files show up in grader mode.
  
  
Index: loncom/homework/essayresponse.pm
diff -u loncom/homework/essayresponse.pm:1.22 loncom/homework/essayresponse.pm:1.23
--- loncom/homework/essayresponse.pm:1.22	Fri Jan 24 14:49:48 2003
+++ loncom/homework/essayresponse.pm	Fri Jan 24 15:40:37 2003
@@ -1,7 +1,7 @@
 # The LearningOnline Network with CAPA
 # essay (ungraded) style responses
 #
-# $Id: essayresponse.pm,v 1.22 2003/01/24 19:49:48 www Exp $
+# $Id: essayresponse.pm,v 1.23 2003/01/24 20:40:37 www Exp $
 #
 # Copyright Michigan State University Board of Trustees
 #
@@ -74,7 +74,7 @@
 "'multipart/form-data'".';" /><br />Allowed filetypes: <b>'.$uploadedfiletypes.'</b><br />';
            if ($uploadedfile) {
 	       $result.='Currently submitted: <tt><a href="'.
-                &Apache::lonnet::tokenwrapper($Apache::lonhomework::history{"resource.$part.$id.uploadedurl"}).'">'.$uploadedfile.'</a></tt>';
+                &Apache::lonnet::tokenwrapper($Apache::lonhomework::history{"resource.$part.$id.uploadedurl"}).'"><img src="/adm/lonIcons/unknown.gif" border=0"> '.$uploadedfile.'</a></tt>';
            } else {
               $result.='(Hand in a file you have prepared on your computer)';
            }
Index: loncom/homework/grades.pm
diff -u loncom/homework/grades.pm:1.66 loncom/homework/grades.pm:1.67
--- loncom/homework/grades.pm:1.66	Thu Jan  9 16:33:07 2003
+++ loncom/homework/grades.pm	Fri Jan 24 15:40:37 2003
@@ -1,7 +1,7 @@
 # The LearningOnline Network with CAPA
 # The LON-CAPA Grading handler
 #
-# $Id: grades.pm,v 1.66 2003/01/09 21:33:07 albertel Exp $
+# $Id: grades.pm,v 1.67 2003/01/24 20:40:37 www Exp $
 #
 # Copyright Michigan State University Board of Trustees
 #
@@ -1021,7 +1021,12 @@
 			    my ($ressub,$subval) = split(/:/,$_,2);
 			    $lastsubonly.='<tr><td bgcolor="#ffffe6"><b>Part '.
 				$partid.'</b> <font color="#999999">( ID '.$respid.
-				' )</font>&nbsp; &nbsp;<b>Answer: </b>'.
+				' )</font>&nbsp; &nbsp;'.
+                                ($record{"resource.$partid.$respid.uploadedurl"}?
+                                '<a href="'.
+                                &Apache::lonnet::tokenwrapper($record{"resource.$partid.$respid.uploadedurl"}).
+   '"><img src="/adm/lonIcons/unknown.gif" border=0"> File uploaded by student</a> <font color="red" size="1">Like all files provided by users, this file may contain virusses</font><br />':'').
+                                '<b>Answer: </b>'.
 				&keywords_highlight($subval).'</td></tr>'."\n"
 				if ($ENV{'form.lastSub'} eq 'lastonly' || 
 				    ($ENV{'form.lastSub'} eq 'hdgrade' &&