--- loncom/interface/londocs.pm 2002/12/04 16:19:05 1.39 +++ loncom/interface/londocs.pm 2003/01/20 17:30:31 1.45 @@ -1,7 +1,7 @@ # The LearningOnline Network # Documents # -# $Id: londocs.pm,v 1.39 2002/12/04 16:19:05 www Exp $ +# $Id: londocs.pm,v 1.45 2003/01/20 17:30:31 www Exp $ # # Copyright Michigan State University Board of Trustees # @@ -45,6 +45,8 @@ my %hash; my $hashtied; my %alreadyseen=(); +my $hadchanges; + # Mapread read maps into lonratedt::global arrays # @order and @resources, determines status # sets @order - pointer to resources in right order @@ -60,6 +62,7 @@ sub mapread { sub storemap { my ($coursenum,$coursedom,$map)=@_; + $hadchanges=1; return &Apache::lonratedt::storemap('/uploaded/'.$coursedom.'/'.$coursenum.'/'. $map,1); @@ -272,7 +275,7 @@ sub checkonthis { my ($r,$url,$level,$title)=@_; $alreadyseen{$url}=1; $r->rflush(); - if ($url) { + if (($url) && ($url!~/^\/uploaded\//) && ($url!~/\*$/)) { $r->print('
'); for (my $i=0;$i<=$level*5;$i++) { $r->print(' '); @@ -557,15 +560,6 @@ function changename(folder,index,oldtitl } } -
- - - -
-
- - -
ENDNEWSCRIPT } @@ -575,6 +569,15 @@ ENDNEWSCRIPT unless ($showdoc) { if ($allowed) { $r->print(< + + + + +
+ + +
@@ -582,16 +585,22 @@ ENDNEWSCRIPT ENDCOURSEVERIFY } # --------------------------------------------------------- Standard documents - $r->print(''); + $r->print('
'); if (($standard) && ($allowed) && (!$forcesupplement)) { - $r->print(' +

Main Course Documents

'); + $r->print('

Main Course Documents

'); my $folder=$ENV{'form.folder'}; unless ($folder=~/^default/) { $folder='default'; } + $hadchanges=0; &editor($r,$coursenum,$coursedom,$folder,$allowed); + if ($hadchanges) { + $r->print(''. +'

Changes will become active for your current session after , or the next time you log in.

'); + } my $folderseq='/uploaded/'.$coursedom.'/'.$coursenum.'/default_'.time. '.sequence'; $r->print(<
@@ -675,7 +684,7 @@ ENDFORM # ----------------------------------------------------- Supplemental documents if (!$forcestandard) { $r->print( - ' +
Upload a new main course document Import a published document Special documents

Supplemental Course Documents

'); + '

Supplemental Course Documents

'); my $folder=$ENV{'form.folder'}; unless ($folder=~/supplemental/) { $folder='supplemental'; } &editor($r,$coursenum,$coursedom,$folder,$allowed); @@ -685,7 +694,7 @@ ENDFORM '.sequence'; $r->print(<
Upload a new supplemental course document Import a published document Special documents