--- rat/lonratedt.pm 2004/01/02 21:00:56 1.51 +++ rat/lonratedt.pm 2004/04/23 22:34:15 1.54 @@ -1,7 +1,7 @@ # The LearningOnline Network with CAPA # Edit Handler for RAT Maps # -# $Id: lonratedt.pm,v 1.51 2004/01/02 21:00:56 www Exp $ +# $Id: lonratedt.pm,v 1.54 2004/04/23 22:34:15 www Exp $ # # Copyright Michigan State University Board of Trustees # @@ -176,7 +176,7 @@ use Apache::loncommon; use Apache::lonlocal; use File::Copy; -use vars qw(@order @resources); +use vars qw(@order @resources @resparms); # Mapread read maps into global arrays @links and @resources, determines status @@ -206,7 +206,7 @@ sub mapread { $links[$number]=$content; } if ($command eq 'objparms') { - return(&mt('Map has resource parameters. Use advanced editor.'),1); + $resparms[$number]=$content; } } # ------------------------------------------------------- Is this a linear map? @@ -414,12 +414,15 @@ sub buttons { my $adv=shift; my $output='
'; if ($adv==1) { - $output.=''; + $output.=''. + &Apache::loncommon::help_open_topic('Sequence_Advanced_Editor_Creation');; } else { unless ($adv==2) { - $output.=''; + $output.=''. + &Apache::loncommon::help_open_topic('Sequence_Simple_Editor_Creation'); } - $output.=''; + $output.=''. + &Apache::loncommon::help_open_topic('Sequence_Advanced_Editor_Creation'); } return $output.'

'; } @@ -511,6 +514,9 @@ sub storemap { if (defined($resources[$order[$i]])) { $output.='<&>objcont<:>'.$order[$i].'<:>'.$resources[$order[$i]]; } + if (defined($resparms[$order[$i]])) { + $output.='<&>objparms<:>'.$order[$i].'<:>'.$resparms[$order[$i]]; + } if (defined($order[$i+1])) { if (defined($resources[$order[$i+1]])) { $output.='<&>objlinks<:>'.$k.'<:>'. @@ -908,7 +914,10 @@ sub smpedt { # ----------------------------------------------------- Start simple RAT screen my $editscript=&editscript('simple'); - my $bodytag=&Apache::loncommon::bodytag(undef,undef,undef,1); + my $bodytag=&Apache::loncommon::bodytag(undef,undef,undef,1). + &Apache::loncommon::help_open_topic('Sequence_Simple_Editor_Creation'). + &Apache::loncommon::help_open_faq(6). + &Apache::loncommon::help_open_bug('RAT'); my %lt=&Apache::lonlocal::texthash( 'sa' => 'Save', 'nt' => 'New Title', @@ -1064,9 +1073,11 @@ sub viewmap { my ($r,$url,$adv,$errtext)=@_; $r->print(''. &Apache::loncommon::bodytag('Edit Content of a Map'). - &buttons($adv)); + &Apache::loncommon::help_open_faq(6). + &Apache::loncommon::help_open_bug('RAT'). + &buttons($adv)); if ($errtext) { - $r->print($errtext.'
'); + $r->print($errtext.'
'); } my $idx=0; $r->print('

'.$url.'

');