[LON-CAPA-cvs] cvs: rat / lonratedt.pm

www lon-capa-cvs@mail.lon-capa.org
Fri, 10 May 2002 15:42:16 -0000


www		Fri May 10 11:42:16 2002 EDT

  Modified files:              
    /rat	lonratedt.pm 
  Log:
  Reads maps now.
  
  
Index: rat/lonratedt.pm
diff -u rat/lonratedt.pm:1.6 rat/lonratedt.pm:1.7
--- rat/lonratedt.pm:1.6	Thu May  9 17:59:33 2002
+++ rat/lonratedt.pm	Fri May 10 11:42:16 2002
@@ -1,7 +1,7 @@
 # The LearningOnline Network with CAPA
 # Edit Handler for RAT Maps
 #
-# $Id: lonratedt.pm,v 1.6 2002/05/09 21:59:33 www Exp $
+# $Id: lonratedt.pm,v 1.7 2002/05/10 15:42:16 www Exp $
 #
 # Copyright Michigan State University Board of Trustees
 #
@@ -35,6 +35,7 @@
 use strict;
 use Apache::Constants qw(:common);
 use Apache::lonnet;
+use Apache::lonratsrv;
 
 # --------------------------------------------------------- Build up RAT screen
 sub ratedt {
@@ -59,6 +60,9 @@
 
 sub smpedt {
    my ($r,$fn)=@_;
+   my $errtext='';
+   my ($outtext,$errtext)=&Apache::lonratsrv::loadmap($fn,$errtext);
+   my @loadelements=split(/\<\&\>/,$outtext);
    $r->print(<<ENDSMPHEAD);
 <html>
 <head>
@@ -147,12 +151,14 @@
 <form method=post>
 <input type=submit name=forceadv 
 value="Advanced Map Editing - Graphical Resource Assembly Tool"><hr>
-This is the future site of the great simple RAT
+<font color=red>$errtext</font>
 <a href="javascript:groupsearch()">Group Search</a>
 <a href="javascript:groupimport()">Group Import</a>
 
 ENDSMPHEAD
-
+    $r->print('<pre>');
+   foreach (@loadelements) { $r->print($_."\n") }
+			     $r->print('</pre>');
     $r->print(
       '<input type=submit name=forcesmp value="Store"></form></body></html>');
 }