--- loncom/interface/londocs.pm 2013/08/03 18:16:46 1.484.2.36 +++ loncom/interface/londocs.pm 2013/08/08 02:18:50 1.484.2.37 @@ -1,7 +1,7 @@ # The LearningOnline Network # Documents # -# $Id: londocs.pm,v 1.484.2.36 2013/08/03 18:16:46 raeburn Exp $ +# $Id: londocs.pm,v 1.484.2.37 2013/08/08 02:18:50 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); } @@ -4707,7 +4717,7 @@ NASOFORM $lt{'rost'} - $help{'Course Roster'} + $help{'Course_Roster'} NROSTFORM @@ -4975,6 +4985,18 @@ 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) {