--- rat/lonratedt.pm 2004/07/04 05:43:12 1.59
+++ rat/lonratedt.pm 2004/11/17 19:59:29 1.62
@@ -1,7 +1,7 @@
# The LearningOnline Network with CAPA
# Edit Handler for RAT Maps
#
-# $Id: lonratedt.pm,v 1.59 2004/07/04 05:43:12 albertel Exp $
+# $Id: lonratedt.pm,v 1.62 2004/11/17 19:59:29 albertel Exp $
#
# Copyright Michigan State University Board of Trustees
#
@@ -706,14 +706,18 @@ sub smpedt {
my $tmpfn=&Apache::lonnet::filelocation('',$url).'.tmp';
my $targetmsg='';
if ($ENV{'form.save'}) {
- $targetmsg='Saving ...
';
copy($tmpfn,&Apache::lonnet::filelocation('',$url));
unlink($tmpfn);
my ($errtext,$fatal)=
&mapread(&Apache::lonnet::filelocation('',$url),'');
+ unless ($fatal) {
+ $targetmsg=''.&mt('Saved.').'
';
+ } else {
+ $targetmsg=''.&mt('An error occured while saving.').'
';
+ }
}
if ($ENV{'form.revert'}) {
- $targetmsg='Reverting ...
';
+ $targetmsg=''.&mt('Reverted.').'
';
unlink($tmpfn);
my ($errtext,$fatal)=
&mapread(&Apache::lonnet::filelocation('',$url),'');
@@ -973,7 +977,8 @@ 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,
+ ($ENV{'environment.remote'} ne 'off')).
&Apache::loncommon::help_open_menu('','Sequence_Simple_Editor_Creation','Sequence_Simple_Editor_Creation','',6,'RAT');
my %lt=&Apache::lonlocal::texthash(
'sa' => 'Save',
@@ -1143,7 +1148,8 @@ sub viewmap {
foreach (&attemptread(&Apache::lonnet::filelocation('',$url))) {
if (defined($_)) {
$idx++;
- my ($title,$url)=split(/\:/,$_);
+ my ($title,$url,$cond)=split(/\:/,$_);
+ if ($cond eq 'cond') { next; }
$title=~s/\&colon\;/\:/g;
$url=~s/\&colon\;/\:/g;
unless ($title) { $title=(split(/\//,$url))[-1] };
@@ -1153,7 +1159,7 @@ sub viewmap {
}
$r->print(&Apache::lonratsrv::qtescape($title));
if ($url) { $r->print(''); }
- $r->print('
');
+ $r->print("
\n");
}
}
$r->print('