--- loncom/interface/groupsort.pm 2003/01/09 22:04:28 1.17 +++ loncom/interface/groupsort.pm 2003/10/08 20:33:34 1.21.2.1 @@ -2,7 +2,7 @@ # The LON-CAPA group sort handler # Allows for sorting prior to import into RAT. # -# $Id: groupsort.pm,v 1.17 2003/01/09 22:04:28 www Exp $ +# $Id: groupsort.pm,v 1.21.2.1 2003/10/08 20:33:34 albertel Exp $ # # Copyright Michigan State University Board of Trustees # @@ -27,9 +27,7 @@ # http://www.lon-capa.org/ # # YEAR=2001 -# 8/7,8/8,10/14,10/15,12/10 Scott Harrison # YEAR=2002 -# 1/17 Scott Harrison # ### @@ -45,7 +43,12 @@ my %hash; # variable to tie to user spec my $iconpath; # variable to be accessible to multiple subroutines sub cleanup { - untie(%hash) if (tied(%hash)); + if (tied(%hash)){ + &Apache::lonnet::logthis('Cleanup groupsort: hash'); + unless (untie(%hash)) { + &Apache::lonnet::logthis('Failed cleanup groupsort: hash'); + } + } } # ---------------------------------------------------------------- Main Handler @@ -64,7 +67,7 @@ sub handler { # finish_import looks different for graphical or "simple" RAT my $finishimport=''; - if ($ENV{'form.mode'} eq 'simple') { + if ($ENV{'form.mode'} eq 'simple' || $ENV{'form.mode'} eq '') { $finishimport=(<print(""); $r->print(&movers($clen,$ctr)); $r->print(&hidden($ctr-1,$thash{$key},$key)); $r->print(""); $r->print(&select_box($clen,$ctr)); $r->print(""); - $r->print(""); + $r->print(""); $r->print(""); $r->print("$thash{$key}\n"); $r->print("$key\n");