[LON-CAPA-cvs] cvs: loncom /homework grades.pm
banghart
lon-capa-cvs@mail.lon-capa.org
Fri, 27 Jan 2006 00:26:19 -0000
banghart Thu Jan 26 19:26:19 2006 EDT
Modified files:
/loncom/homework grades.pm
Log:
Don't version portfiles if resetting status.
Index: loncom/homework/grades.pm
diff -u loncom/homework/grades.pm:1.304 loncom/homework/grades.pm:1.305
--- loncom/homework/grades.pm:1.304 Wed Jan 25 17:56:25 2006
+++ loncom/homework/grades.pm Thu Jan 26 19:26:18 2006
@@ -1,7 +1,7 @@
# The LearningOnline Network with CAPA
# The LON-CAPA Grading handler
#
-# $Id: grades.pm,v 1.304 2006/01/25 22:56:25 albertel Exp $
+# $Id: grades.pm,v 1.305 2006/01/27 00:26:18 banghart Exp $
#
# Copyright Michigan State University Board of Trustees
#
@@ -2049,6 +2049,8 @@
# if multiple files are uploaded names will be 'returndoc2', 'returndoc3'
my $file_counter = 1;
while ($env{'form.returndoc'.$file_counter}) {
+ my $fname=$env{'form.returndoc'.$file_counter.'.filename'};
+ $request->print("<br />".$fname." will be the uploaded file name");
$request->print("<font color=\"red\">Will upload document</font>".$env{'form.returndocorig'.$file_counter});
$file_counter ++;
}
@@ -2301,7 +2303,10 @@
"$env{'user.name'}:$env{'user.domain'}";
}
# unless problem has been graded, set flag to version the submitted files
- unless ($record{'resource.'.$new_part.'.solved'} =~ /^correct_/ || $record{'resource.'.$new_part.'.solved'} eq 'incorrect_by_override') {
+ unless ($record{'resource.'.$new_part.'.solved'} =~ /^correct_/ ||
+ $record{'resource.'.$new_part.'.solved'} eq 'incorrect_by_override' ||
+ $dropMenu eq 'reset status')
+ {
push (@v_flag,$new_part);
}
}
@@ -2407,7 +2412,6 @@
if ($key =~ /^resource\.($version_parts)\./ && $key =~ /\.portfiles$/ ) {
my @v_portfiles;
my @portfiles = split(/,/,$$record{$key});
- &Apache::lonnet::logthis("should be unmarking and remarking $key",@portfiles);
foreach my $file (@portfiles) {
&Apache::lonnet::unmark_as_readonly($domain,$stuname,[$symb,$env{'request.course.id'}],$file);
my ($directory,$answer_file) =($file =~ /^(.*?)([^\/]*)$/);
@@ -2449,7 +2453,11 @@
}
}
return 'ok';
-
+}
+
+sub version_selected_portfile {
+ my ($file_name,$domain,$stu_name) = @_;
+ return 'ok';
}
sub file_name_version_ext {