--- loncom/interface/londocs.pm 2013/05/25 21:56:23 1.551
+++ loncom/interface/londocs.pm 2013/08/16 23:27:31 1.559
@@ -1,7 +1,7 @@
# The LearningOnline Network
# Documents
#
-# $Id: londocs.pm,v 1.551 2013/05/25 21:56:23 raeburn Exp $
+# $Id: londocs.pm,v 1.559 2013/08/16 23:27:31 raeburn Exp $
#
# Copyright Michigan State University Board of Trustees
#
@@ -56,6 +56,7 @@ my $hashtied;
my %alreadyseen=();
my $hadchanges;
+my $suppchanges;
my %help=();
@@ -79,7 +80,11 @@ sub storemap {
$map,1,$report);
if ($errtext) { return ($errtext,2); }
- $hadchanges=1;
+ if ($map =~ /^default/) {
+ $hadchanges=1;
+ } else {
+ $suppchanges=1;
+ }
return ($errtext,0);
}
@@ -402,6 +407,11 @@ END
}
my ($errtext,$fatal) =
&storemap($coursenum, $coursedom, $folder.'.'.$container,1);
+ unless ($fatal) {
+ if ($folder =~ /^supplemental/) {
+ &Apache::lonnet::get_numsuppfiles($coursenum,$coursedom,1);
+ }
+ }
return ($errtext,$fatal,$fixuperrors);
}
@@ -1610,16 +1620,16 @@ sub dbcopy {
}
}
if (($freedlock ne 'ok') && (ref($lockerrorsref) eq 'HASH')) {
- $lockerrorsref->{$prefix} =
+ $lockerrorsref->{$prefix} =
'
'.
&mt('There was a problem removing a lockfile.');
if ($prefix eq 'smppg') {
$lockerrorsref->{$prefix} .=
- &mt('This will prevent creation of additional simple pages in this course.');
+ ' '.&mt('This will prevent creation of additional simple pages in this course.');
} else {
- $lockerrorsref->{$prefix} .= &mt('This will prevent creation of additional bulletin boards in this course.');
+ $lockerrorsref->{$prefix} .= ' '.&mt('This will prevent creation of additional bulletin boards in this course.');
}
- $lockerrorsref->{$prefix} .= &mt('Please contact the domain coordinator for your LON-CAPA domain.').'
';
+ $lockerrorsref->{$prefix} .= ' '.&mt('Please contact the domain coordinator for your LON-CAPA domain.').'';
}
}
} elsif ($url =~ m{/syllabus$}) {
@@ -2802,8 +2812,30 @@ sub multiple_check_form {
}
sub process_file_upload {
- my ($upload_output,$coursenum,$coursedom,$allfiles,$codebase,$uploadcmd) = @_;
+ my ($upload_output,$coursenum,$coursedom,$allfiles,$codebase,$uploadcmd,$crstype) = @_;
# upload a file, if present
+ my $filesize = length($env{'form.uploaddoc'});
+ if (!$filesize) {
+ $$upload_output = '
'.
+ &mt('Unable to upload [_1]. (size = [_2] bytes)',
+ ''.$env{'form.uploaddoc.filename'}.'',
+ $filesize).' '.
+ &mt('Either the file you attempted to upload was empty, or your web browser was unable to read its contents.').' '.
+ '