--- loncom/interface/londocs.pm 2004/12/15 15:21:43 1.157 +++ loncom/interface/londocs.pm 2005/02/02 22:15:06 1.166 @@ -1,7 +1,7 @@ # The LearningOnline Network # Documents # -# $Id: londocs.pm,v 1.157 2004/12/15 15:21:43 raeburn Exp $ +# $Id: londocs.pm,v 1.166 2005/02/02 22:15:06 albertel Exp $ # # Copyright Michigan State University Board of Trustees # @@ -30,6 +30,7 @@ package Apache::londocs; use strict; use Apache::Constants qw(:common :http); +use Apache::imsexport; use Apache::lonnet; use Apache::loncommon; use Apache::lonratedt; @@ -131,6 +132,11 @@ sub dumpbutton { } } +sub clean { + my ($title)=@_; + $title=~s/[^\w\/\!\$\%\^\*\-\_\=\+\;\:\,\\\|\`\~]+/\_/gs; + return $title; +} # -------------------------------------------------------- Actually dump course sub dumpcourse { @@ -148,7 +154,7 @@ sub dumpcourse { my ($ca,$cd)=split(/\@/,$ENV{'form.authorspace'}); $r->print('
'.&mt('Internal Filename').' | '.&mt('Title').' | '.&mt('Save as ...').' | '.($title?$title:' ').' | '); unless ($title) { $title=$_; } $title=~s/\.(\w+)$//; - $title=~s/[^\w\/]+/\_/gs; + $title=&clean($title); $title.='.'.$ext; $r->print("\n\n"); } @@ -241,6 +248,7 @@ sub dumpcourse { # ------------------------------------------------------ Generate "export" button sub exportbutton { + return ''; return ' | '.
''.
@@ -319,7 +327,7 @@ sub exportcourse {
}
$r->print(' |
---|