--- rat/lonratedt.pm 2002/05/22 20:39:59 1.27 +++ rat/lonratedt.pm 2002/05/23 10:19:30 1.28 @@ -1,7 +1,7 @@ # The LearningOnline Network with CAPA # Edit Handler for RAT Maps # -# $Id: lonratedt.pm,v 1.27 2002/05/22 20:39:59 www Exp $ +# $Id: lonratedt.pm,v 1.28 2002/05/23 10:19:30 www Exp $ # # Copyright Michigan State University Board of Trustees # @@ -129,7 +129,9 @@ sub mapread { } # ---------------------------------------------- Read a map as well as possible - +# Also used by the sequence handler +# Call lonsequence::attemptread to read from resource space +# sub attemptread { my $fn=shift; @@ -263,7 +265,6 @@ ENDDOCUMENT # ---------------------------------------------------------------- Make buttons sub buttons { - if ($ENV{'form.forceselect'}) { return ''; } my $adv=shift; my $output='
'; if ($adv==1) { @@ -765,41 +766,7 @@ ENDNODIR sub viewmap { my ($r,$url,$adv,$errtext)=@_; - $r->print(''); - if ($ENV{'form.forceselect'}) { $r->print(< - -function select_group() { - window.location="/adm/groupsort?catalogmode=groupimport&mode=rat&acts="+document.forms.fileattr.acts.value; -} - -function queue(val) { - if (eval("document.forms."+val+".filelink.checked")) { - var l=val.length; - var v=val.substring(4,l); - document.forms.fileattr.acts.value+='1a'+v+'b'; - } - else { - var l=val.length; - var v=val.substring(4,l); - document.forms.fileattr.acts.value+='0a'+v+'b'; - } -} - - - - -ENDSCRIPT - } - $r->print(''.&buttons($adv)); - if ($ENV{'form.forceselect'}) { $r->print(< - - - -ENDSELECT - } + $r->print(''.&buttons($adv)); if ($errtext) { $r->print($errtext.'
'); } @@ -807,31 +774,17 @@ ENDSELECT foreach (&attemptread(&Apache::lonnet::filelocation('',$url))) { if (defined($_)) { $idx++; - if ($ENV{'form.forceselect'}) { - $r->print('
'); - } my ($title,$url)=split(/\:/,$_); $title=~s/\&colon\;/\:/g; $url=~s/\&colon\;/\:/g; unless ($title) { $title=(split(/\//,$url))[-1] }; unless ($title) { $title='Empty'; } if ($url) { - if ($ENV{'form.forceselect'}) { - $r->print(< - -ENDCHECKBOX - } $r->print(''); } $r->print(&Apache::lonratsrv::qtescape($title)); if ($url) { $r->print(''); } - if ($ENV{'form.forceselect'}) { - $r->print(''); - } else { - $r->print('
'); - } + $r->print('
'); } } $r->print(''); @@ -845,9 +798,6 @@ sub handler { $r->send_http_header; return OK if $r->header_only; - - &Apache::loncommon::get_unprocessed_cgi($ENV{'QUERY_STRING'}, - ['forceselect']); my $url=$r->uri; my $fn=&Apache::lonnet::filelocation('',$url);