[LON-CAPA-cvs] cvs: rat / lonratedt.pm
www
lon-capa-cvs@mail.lon-capa.org
Mon, 13 May 2002 19:38:33 -0000
www Mon May 13 15:38:33 2002 EDT
Modified files:
/rat lonratedt.pm
Log:
Discard and Clear
Index: rat/lonratedt.pm
diff -u rat/lonratedt.pm:1.13 rat/lonratedt.pm:1.14
--- rat/lonratedt.pm:1.13 Mon May 13 15:23:52 2002
+++ rat/lonratedt.pm Mon May 13 15:38:32 2002
@@ -1,7 +1,7 @@
# The LearningOnline Network with CAPA
# Edit Handler for RAT Maps
#
-# $Id: lonratedt.pm,v 1.13 2002/05/13 19:23:52 www Exp $
+# $Id: lonratedt.pm,v 1.14 2002/05/13 19:38:32 www Exp $
#
# Copyright Michigan State University Board of Trustees
#
@@ -189,12 +189,13 @@
}
# ============================================================ Process commands
- my $targetdetail='';
- my $importdetail='';
+ my $targetdetail=$ENV{'form.targetdetail'};
+ my $importdetail=$ENV{'form.curimpdetail'};
# ---------------------------------------------------- Importing from groupsort
if ($ENV{'form.importdetail'}) {
+ $importdetail='';
my @curimport=split(/\&/,$ENV{'form.curimpdetail'});
my $lastsel;
@@ -225,7 +226,24 @@
$importdetail=~s/\&+/\&/g;
$importdetail=~s/^\&//;
-# --------------------------------------------------------
+# ------------------------------------------------------------------- Clear all
+ } elsif ($ENV{'form.clear'}) {
+ $importdetail='';
+# ------------------------------------------------------------ Discard selected
+ } elsif ($ENV{'form.discard'}) {
+ $importdetail='';
+ my @curimport=split(/\&/,$ENV{'form.curimpdetail'});
+ foreach (@importselect) {
+ $curimport[$_]='';
+ }
+ for (my $i=0;$i<=$#curimport;$i++) {
+ my ($name,$url)=split(/\=/,$curimport[$i]);
+ if ($url) {
+ $importdetail.='&'.&Apache::lonnet::escape($name).'='.
+ &Apache::lonnet::escape($url);
+ }
+ }
+# ---------------------------
}
# ------------------------------------------------------------ Assemble windows
@@ -348,6 +366,10 @@
<tr><td bgcolor="#FFFFCC">
<input type=button onClick="javascript:groupsearch()" value="Group Search">
<input type=button onClick="javascript:groupimport();" value="Group Import">
+<br>after selected
+<hr>
+<input type=submit name="discard" value="Discard Selected">
+<input type=submit name="clear" value="Clear All">
<input type=button onClick="javascript:viewimport()" value="View">
</td><td> </td><td bgcolor="#FFFFCC">
<input type=button onClick="javascript:viewtarget()" value="View">