--- rat/lonratedt.pm 2003/12/12 15:16:35 1.49
+++ rat/lonratedt.pm 2004/04/24 15:05:16 1.55
@@ -1,7 +1,7 @@
# The LearningOnline Network with CAPA
# Edit Handler for RAT Maps
#
-# $Id: lonratedt.pm,v 1.49 2003/12/12 15:16:35 sakharuk Exp $
+# $Id: lonratedt.pm,v 1.55 2004/04/24 15:05:16 www Exp $
#
# Copyright Michigan State University Board of Trustees
#
@@ -25,10 +25,7 @@
#
# http://www.lon-capa.org/
#
-# (TeX Content Handler
-#
-# 05/29/00,05/30 Gerd Kortemeyer)
-# 7/1,6/30 Gerd Kortemeyer
+
package Apache::lonratedt;
@@ -176,7 +173,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 +203,11 @@ sub mapread {
$links[$number]=$content;
}
if ($command eq 'objparms') {
- return(&mt('Map has resource parameters. Use advanced editor.'),1);
+ if ($resparms[$number]) {
+ $resparms[$number].='&&&'.$content;
+ } else {
+ $resparms[$number]=$content;
+ }
}
}
# ------------------------------------------------------- Is this a linear map?
@@ -414,12 +415,15 @@ sub buttons {
my $adv=shift;
my $output='
';
}
@@ -511,6 +515,13 @@ sub storemap {
if (defined($resources[$order[$i]])) {
$output.='<&>objcont<:>'.$order[$i].'<:>'.$resources[$order[$i]];
}
+ if (defined($resparms[$order[$i]])) {
+ foreach (split('&&&',$resparms[$order[$i]])) {
+ if ($_) {
+ $output.='<&>objparms<:>'.$order[$i].'<:>'.$_;
+ }
+ }
+ }
if (defined($order[$i+1])) {
if (defined($resources[$order[$i+1]])) {
$output.='<&>objlinks<:>'.$k.'<:>'.
@@ -527,6 +538,7 @@ sub storemap {
sub editscript {
my $mode=shift;
+ my $resurl=&Apache::loncommon::lastresurl();
return(< ---- Import and Paste Area ---- '.
+ ''.
join("\n",map {
$idx++;
if ($_) {
@@ -907,7 +919,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',
@@ -1063,9 +1078,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.'
');