--- loncom/interface/londocs.pm 2004/05/11 06:45:35 1.128 +++ loncom/interface/londocs.pm 2004/07/04 05:43:12 1.134 @@ -1,7 +1,7 @@ # The LearningOnline Network # Documents # -# $Id: londocs.pm,v 1.128 2004/05/11 06:45:35 albertel Exp $ +# $Id: londocs.pm,v 1.134 2004/07/04 05:43:12 albertel Exp $ # # Copyright Michigan State University Board of Trustees # @@ -121,7 +121,8 @@ sub dumpbutton { if ($home) { return ''. ''; + &mt('Dump Course DOCS to Construction Space').'" />'. + &Apache::loncommon::help_open_topic('Docs_Dump_Course_Docs'); } else { return''. &mt('Dump Course DOCS to Construction Space: available on other servers'); @@ -156,7 +157,7 @@ sub dumpcourse { $crs=~s/\_/\//g; foreach (keys %replacehash) { my $newfilename=$title.'/'.$replacehash{$_}; - $newfilename=~s/[^\w\/\.]+/\_/g; + $newfilename=~s/[^\w\/\.\/]+/\_/g; my @dirs=split(/\//,$newfilename); my $path='/home/'.$ca.'/public_html'; my $makepath=$path; @@ -200,7 +201,8 @@ sub dumpcourse { $r->print( ''); } else { - $r->print(''); + $r->print(''); } } } @@ -223,7 +225,7 @@ sub dumpcourse { $title=$_; } $title=~s/\.(\w+)$//; - $title=~s/\W+/\_/gs; + $title=~s/[^\w\/]+/\_/gs; $title.='.'.$ext; $r->print("\n\n"); } @@ -493,6 +495,9 @@ sub editor { $r->print(&entryline($idx,$name,$url,$folder,$allowed,$_,$coursenum)); $idx++; } + unless ($idx) { + $r->print(''.&mt('Currently no documents.').''); + } $r->print(''); } } @@ -1023,7 +1028,8 @@ sub handler { 'Adding_External_Resource','Navigate_Content', 'Adding_Folders','Docs_Overview', 'Load_Map', 'Supplemental', 'Score_Upload_Form', - 'Importing_LON-CAPA_Resource','Uploading_From_Harddrive') { + 'Importing_LON-CAPA_Resource','Uploading_From_Harddrive', + 'Check_Resource_Versions','Verify_Content') { $help{$_}=&Apache::loncommon::help_open_topic('Docs_'.$_); } # Composite help files @@ -1218,8 +1224,7 @@ ENDNEWSCRIPT $r->print(''. &Apache::loncommon::bodytag('Course Documents','',$events, '','',$showdoc). - &Apache::loncommon::help_open_faq(273). - &Apache::loncommon::help_open_bug('RAT')); + &Apache::loncommon::help_open_menu('','','','',273,'RAT')); unless ($showdoc) { # ----------------------------------------------------------------------------- my %lt=&Apache::lonlocal::texthash( @@ -1276,9 +1281,9 @@ ENDNEWSCRIPT
- +$help{'Verify_Content'} - + $help{'Check_Resource_Versions'} $dumpbut
@@ -1325,8 +1330,8 @@ $lt{'title'}:
- + $help{'Uploading_From_Harddrive'}