--- loncom/interface/londocs.pm 2013/07/16 14:08:18 1.553
+++ loncom/interface/londocs.pm 2013/08/13 15:38:35 1.558
@@ -1,7 +1,7 @@
# The LearningOnline Network
# Documents
#
-# $Id: londocs.pm,v 1.553 2013/07/16 14:08:18 raeburn Exp $
+# $Id: londocs.pm,v 1.558 2013/08/13 15:38:35 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);
}
@@ -4098,7 +4108,8 @@ sub handler {
'Supplemental','Score_Upload_Form','Adding_Pages',
'Importing_LON-CAPA_Resource','Importing_IMS_Course',
'Uploading_From_Harddrive',
- 'Check_Resource_Versions','Verify_Content') {
+ 'Check_Resource_Versions','Verify_Content',
+ 'Course_Roster','Web_Page','Dropbox') {
$help{$topic}=&Apache::loncommon::help_open_topic('Docs_'.$topic);
}
# Composite help files
@@ -4114,8 +4125,6 @@ sub handler {
'Docs_About_My_Personal_Info,Docs_Editing_Templated_Pages');
$help{'Group Portfolio'} = &Apache::loncommon::help_open_topic('Docs_About_Group_Files');
$help{'Caching'} = &Apache::loncommon::help_open_topic('Caching');
- $help{'Course Roster'} = &Apache::loncommon::help_open_topic('Docs_Course_Roster');
- $help{'Web Page'} = &Apache::loncommon::help_open_topic('Docs_Web_Page');
my $allowed;
# URI is /adm/supplemental when viewing supplemental docs in non-edit mode.
@@ -4658,6 +4667,7 @@ NSPROBFORM
$pathitem
$lt{'drbx'}
+ $help{'Dropbox'}
NDBFORM
@@ -4708,7 +4718,7 @@ NASOFORM
$lt{'rost'}
- $help{'Course Roster'}
+ $help{'Course_Roster'}
NROSTFORM
@@ -4728,7 +4738,7 @@ NROSTFORM
$pathitem
$lt{'webp'}
- $help{'Web Page'}
+ $help{'Web_Page'}
NWEBFORM
@@ -4805,7 +4815,7 @@ NGFFORM
);
}
push(@importdoc,
- {''=>$fileuploadform}
+ {'
'=>$fileuploadform}
);
$fileuploadform = &create_form_ul(&create_list_elements(@importdoc));
@@ -4945,7 +4955,7 @@ SNAMFORM
$pathitem
$lt{'webp'}
- $help{'Web Page'}
+ $help{'Web_Page'}
SWEBFORM
@@ -4976,7 +4986,19 @@ my %suporderhash = (
$supplementalflag,\%suporderhash,$iconpath,$pathitem);
if ($error) {
$r->print('
'.$error.'
'); - } + } else { + if ($suppchanges) { + my %servers = &Apache::lonnet::internet_dom_servers($coursedom); + my @ids=&Apache::lonnet::current_machine_ids(); + foreach my $server (keys(%servers)) { + next if (grep(/^\Q$server\E$/,@ids)); + my $hashid=$coursenum.':'.$coursedom; + &Apache::lonnet::remote_devalidate_cache($server,'suppcount',$hashid); + } + &Apache::lonnet::get_numsuppfiles($coursenum,$coursedom,1); + undef($suppchanges); + } + } } } elsif ($supplementalflag) { my $error = &editor($r,$coursenum,$coursedom,$folder,$allowed,'',$crstype,