[LON-CAPA-cvs] cvs: loncom /homework grades.pm
banghart
lon-capa-cvs@mail.lon-capa.org
Mon, 03 Apr 2006 20:45:42 -0000
banghart Mon Apr 3 16:45:42 2006 EDT
Modified files:
/loncom/homework grades.pm
Log:
In handback, display original file name, not versioned name. Upload
and version handed back files accordingly.
Index: loncom/homework/grades.pm
diff -u loncom/homework/grades.pm:1.346 loncom/homework/grades.pm:1.347
--- loncom/homework/grades.pm:1.346 Mon Apr 3 15:00:27 2006
+++ loncom/homework/grades.pm Mon Apr 3 16:45:38 2006
@@ -1,7 +1,7 @@
# The LearningOnline Network with CAPA
# The LON-CAPA Grading handler
#
-# $Id: grades.pm,v 1.346 2006/04/03 19:00:27 banghart Exp $
+# $Id: grades.pm,v 1.347 2006/04/03 20:45:38 banghart Exp $
#
# Copyright Michigan State University Board of Trustees
#
@@ -1517,7 +1517,10 @@
next if (!@$files);
my $file_counter = 1;
foreach my $file (@$files) {
- my ($file_disp) = ($file =~ m|.+/(.+)$|);
+ my ($file_path, $file_disp) = ($file =~ m|(.+/)(.+)$|);
+ my ($name,$version,$ext) = &file_name_version_ext($file_disp);
+ $file_disp = "$name.$ext";
+ $file = $file_path.$file_disp;
$result.=&mt('Return commented version of [_1] to student.',
'<span class="filename">'.$file_disp.'</span>');
$result.='<input type="file" name="'.$prefix.'returndoc'.$file_counter.'" />'."\n";