--- rat/lonratedt.pm 2006/04/11 19:35:16 1.75 +++ rat/lonratedt.pm 2006/09/12 22:13:12 1.83 @@ -1,7 +1,7 @@ # The LearningOnline Network with CAPA # Edit Handler for RAT Maps # -# $Id: lonratedt.pm,v 1.75 2006/04/11 19:35:16 albertel Exp $ +# $Id: lonratedt.pm,v 1.83 2006/09/12 22:13:12 albertel Exp $ # # Copyright Michigan State University Board of Trustees # @@ -172,6 +172,9 @@ use Apache::lonsequence; use Apache::loncommon; use Apache::lonlocal; use File::Copy; +use lib '/home/httpd/lib/perl/'; +use LONCAPA; + use vars qw(@order @resources @resparms @zombies); @@ -488,8 +491,8 @@ sub pastetarget { foreach (@which) { if (defined($_)) { my ($name,$url)=split(/\=/,$_); - $name=&Apache::lonnet::unescape($name); - $url=&Apache::lonnet::unescape($url); + $name=&unescape($name); + $url=&unescape($url); if ($url) { my $idx=&getresidx($url); $insertorder[$#insertorder+1]=$idx; @@ -646,7 +649,8 @@ sub getparameter { # ----------------------------------------------------------------- Edit script sub editscript { my $mode=shift; - my $resurl=&Apache::loncommon::lastresurl(); + my $resurl= + &Apache::loncommon::escape_single(&Apache::loncommon::lastresurl()); return(<'.&Apache::lonnet::unescape($name). + ''; } } split(/\&/,$importdetail)); @@ -1019,8 +1023,8 @@ sub smpedt { my ($name,$url)=split(/\:/,$resources[$_]); unless ($name) { $name=(split(/\//,$url))[-1]; } unless ($name) { $name='EMPTY'; } - $targetdetail.='&'.&Apache::lonnet::escape($name).'='. - &Apache::lonnet::escape($url); + $targetdetail.='&'.&escape($name).'='. + &escape($url); $idx++; $name=~s/\:/\:/g; ''; @@ -1034,6 +1038,7 @@ sub smpedt { 'nt' => 'New Title', 'se' => 'Search', 'im' => 'Import', + 'bk' => 'Import Bookmarks', 'vi' => 'View', 'lm' => 'Load Map', 'ds' => 'Discard Selected', @@ -1051,7 +1056,7 @@ sub smpedt { 'reco' => 'Recover Deleted' ); my $js=< $editscript @@ -1096,11 +1101,10 @@ sub smpedt { ENDJS - my $start_page = - &Apache::loncommon::start_page(undef,$js, - {'only_body' => - ($env{'environment.remote'} ne 'off')}). - &Apache::loncommon::help_open_menu('','Sequence_Simple_Editor_Creation','Sequence_Simple_Editor_Creation','',6,'RAT'); + my $start_page = &Apache::loncommon::start_page(undef,$js). + &Apache::loncommon::help_open_menu('Sequence_Simple_Editor_Creation', + 'Sequence_Simple_Editor_Creation', + 6,'RAT'); my $end_page = &Apache::loncommon::end_page(); $r->print(< +"javascript:impfortarget.value=1;groupopen(0,1,1);" value="$lt{'bk'}"> + $lt{'as'}
@@ -1192,7 +1198,7 @@ sub viewmap { my ($r,$url,$adv,$errtext)=@_; $r->print( &Apache::loncommon::start_page('Edit Content of a Map'). - &Apache::loncommon::help_open_menu('','','','',6,'RAT'). + &Apache::loncommon::help_open_menu('','',6,'RAT'). &buttons($adv)); if ($errtext) { $r->print($errtext.'
');