[LON-CAPA-cvs] cvs: loncom /auth lonacc.pm /lonnet/perl lonnet.pm
raeburn
raeburn@source.lon-capa.org
Sat, 29 Nov 2008 10:34:30 -0000
raeburn Sat Nov 29 10:34:30 2008 EDT
Modified files:
/loncom/lonnet/perl lonnet.pm
/loncom/auth lonacc.pm
Log:
Bugs 5719 and 5820.
- Do not add contents of files uploaded to essayresponse items in course activity log.
- Round file size (in Mb) to 6 decimal places when setting HWFILESIZE form element.
- HWFILESIZE and HWFILETOOBIG (if set) will be stored in course activity log.
Index: loncom/lonnet/perl/lonnet.pm
diff -u loncom/lonnet/perl/lonnet.pm:1.974 loncom/lonnet/perl/lonnet.pm:1.975
--- loncom/lonnet/perl/lonnet.pm:1.974 Sat Nov 29 09:57:43 2008
+++ loncom/lonnet/perl/lonnet.pm Sat Nov 29 10:34:29 2008
@@ -1,7 +1,7 @@
# The LearningOnline Network
# TCP networking package
#
-# $Id: lonnet.pm,v 1.974 2008/11/29 09:57:43 raeburn Exp $
+# $Id: lonnet.pm,v 1.975 2008/11/29 10:34:29 raeburn Exp $
#
# Copyright Michigan State University Board of Trustees
#
@@ -2489,7 +2489,12 @@
# FIXME: Probably ought to escape things....
foreach my $key (keys(%env)) {
if ($key=~/^form\.(.*)/) {
- $what.=':'.$1.'='.$env{$key};
+ my $formitem = $1;
+ if ($formitem =~ /^HWFILE(?:SIZE|TOOBIG)/) {
+ $what.=':'.$formitem.'='.$env{$key};
+ } elsif ($formitem !~ /^HWFILE(?:[^.]+)$/) {
+ $what.=':'.$formitem.'='.$env{$key};
+ }
}
}
} elsif ($fnsymb =~ m:^/adm/searchcat:) {
Index: loncom/auth/lonacc.pm
diff -u loncom/auth/lonacc.pm:1.121 loncom/auth/lonacc.pm:1.122
--- loncom/auth/lonacc.pm:1.121 Tue Nov 25 14:19:07 2008
+++ loncom/auth/lonacc.pm Sat Nov 29 10:34:30 2008
@@ -1,7 +1,7 @@
# The LearningOnline Network
# Cookie Based Access Handler
#
-# $Id: lonacc.pm,v 1.121 2008/11/25 14:19:07 jms Exp $
+# $Id: lonacc.pm,v 1.122 2008/11/29 10:34:30 raeburn Exp $
#
# Copyright Michigan State University Board of Trustees
#
@@ -238,7 +238,8 @@
if ($name =~ /^HWFILE(\w+)$/) {
my $ident = $1;
my $item = 'HWFILESIZE'.$ident;
- &Apache::loncommon::add_to_env("form.$item",$size);
+ my $savesize = sprintf("%.6f",$size);
+ &Apache::loncommon::add_to_env("form.$item",$savesize);
my $maxsize= &Apache::lonnet::EXT("resource.$ident.maxfilesize");
if (!$maxsize) {
$maxsize = 100.0;
@@ -351,7 +352,6 @@
return OK;
}
-
my $handle = &Apache::lonnet::check_for_valid_session($r);
my $result = &sso_login($r,$handle);