--- loncom/interface/londocs.pm 2004/08/22 18:15:54 1.138 +++ loncom/interface/londocs.pm 2004/09/09 18:56:01 1.141 @@ -1,7 +1,7 @@ # The LearningOnline Network # Documents # -# $Id: londocs.pm,v 1.138 2004/08/22 18:15:54 raeburn Exp $ +# $Id: londocs.pm,v 1.141 2004/09/09 18:56:01 albertel Exp $ # # Copyright Michigan State University Board of Trustees # @@ -833,8 +833,8 @@ END $line.=(< $lt{'hd'} - - $lt{'ec'} + $parameterset @@ -874,6 +874,7 @@ sub untiehash { sub checkonthis { my ($r,$url,$level,$title)=@_; + $url=&Apache::lonnet::unescape($url); $alreadyseen{$url}=1; $r->rflush(); if (($url) && ($url!~/^\/uploaded\//) && ($url!~/\*$/)) { @@ -960,7 +961,15 @@ sub verifycontent { %alreadyseen=(); &tiehash(); foreach (keys %hash) { - if (($_=~/^src\_(.+)$/) && (!$alreadyseen{$hash{$_}})) { + if ($hash{$_}=~/\.(page|sequence)$/) { + if (($_=~/^src_/) && ($alreadyseen{&Apache::lonnet::unescape($hash{$_})})) { + $r->print('
'. + &mt('The following sequence or page is included more than once in your course: '). + &Apache::lonnet::unescape($hash{$_}).'
'. + &mt('Note that grading records for problems included in this sequence or folder will overlap.
')); + } + } + if (($_=~/^src\_(.+)$/) && (!$alreadyseen{&Apache::lonnet::unescape($hash{$_})})) { &checkonthis($r,$hash{$_},0,$hash{'title_'.$1}); } } @@ -1778,7 +1787,8 @@ ENDSUPFORM $r->print(''); } else { # -------------------------------------------------------- This is showdoc mode - $r->print("

".&mt('Uploaded Document').'

'. + $r->print("

".&mt('Uploaded Document').' - '. + &Apache::lonnet::gettitle($r->uri).'

'. &mt('It is recommended that you use an up-to-date virus scanner before handling this file.')."

". &entryline(0,&mt("Click to download or use your browser's Save Link function"),$showdoc).'

'); }