--- loncom/interface/londocs.pm 2013/08/03 18:16:46 1.484.2.36 +++ loncom/interface/londocs.pm 2013/08/17 00:59:32 1.484.2.38 @@ -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.38 2013/08/17 00:59:32 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); } @@ -1615,11 +1625,13 @@ sub dbcopy { &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 [_1]helpdesk[_2] for assistance.', + '',''). + ''; } } } elsif ($url =~ m{/syllabus$}) { @@ -3506,7 +3518,8 @@ sub new_timebased_suffix { } unless ($type eq 'paste') { $locknotfreed .= - ' '.&mt('Please contact the domain coordinator for your LON-CAPA domain.'); + ' '.&mt('Please contact the [_1]helpdesk[_2] for assistance.', + '',''); } $locknotfreed .= ''; } @@ -4707,7 +4720,7 @@ NASOFORM $lt{'rost'} - $help{'Course Roster'} + $help{'Course_Roster'} NROSTFORM @@ -4804,7 +4817,7 @@ NGFFORM ); } push(@importdoc, - {''.$lt{upl}.''=>$fileuploadform} + {''.$lt{upl}.''=>$fileuploadform} ); $fileuploadform = &create_form_ul(&create_list_elements(@importdoc)); @@ -4975,6 +4988,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) {