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

banghart lon-capa-cvs@mail.lon-capa.org
Mon, 29 May 2006 23:45:14 -0000


banghart		Mon May 29 19:45:14 2006 EDT

  Modified files:              
    /loncom/homework	grades.pm 
  Log:
  	Message sent informing student of instructor handed back file.
  	Needs work on message format, language, etc. Work in progress.
  
  
Index: loncom/homework/grades.pm
diff -u loncom/homework/grades.pm:1.355 loncom/homework/grades.pm:1.356
--- loncom/homework/grades.pm:1.355	Sun May 28 12:47:02 2006
+++ loncom/homework/grades.pm	Mon May 29 19:45:14 2006
@@ -1,7 +1,7 @@
 # The LearningOnline Network with CAPA
 # The LON-CAPA Grading handler
 #
-# $Id: grades.pm,v 1.355 2006/05/28 16:47:02 banghart Exp $
+# $Id: grades.pm,v 1.356 2006/05/29 23:45:14 banghart Exp $
 #
 # Copyright Michigan State University Board of Trustees
 #
@@ -2456,6 +2456,15 @@
                     if ($result !~ m|^/uploaded/|) {
                         $request->print('<font color="red"> An errror occured ('.$result.
                         ') while trying to upload '.$newflg.'_'.$part_resp.'_returndoc'.$file_counter.'</font><br />');
+                    } else {
+                        my $subject = "File Handed Back by Instructor ";
+                        my $message = "A file has been returned that was originally submitted in reponse to: ";
+                        $message .= &Apache::lonnet::gettitle($symb);
+                        $message .= " The returned file is named ".$save_file_name;
+                        $message .= " and can be found in your portfolio space.";
+                        &Apache::lonnet::logthis($message);
+                        my $msgstatus = &Apache::lonmsg::user_normal_msg($stuname,$domain,
+				        $subject.' [File Returned]',$message);                    
                     }
                     $request->print("<br />".$fname." will be the uploaded file name");
                     $request->print(" ".$env{'form.'.$newflg.'_'.$part_resp.'_origdoc'.$file_counter});