--- loncom/interface/londocs.pm 2004/05/06 17:55:03 1.123 +++ loncom/interface/londocs.pm 2004/05/06 18:28:16 1.124 @@ -1,7 +1,7 @@ # The LearningOnline Network # Documents # -# $Id: londocs.pm,v 1.123 2004/05/06 17:55:03 www Exp $ +# $Id: londocs.pm,v 1.124 2004/05/06 18:28:16 www Exp $ # # Copyright Michigan State University Board of Trustees # @@ -321,26 +321,23 @@ sub editor { &Apache::lonratedt::delparameter($idx,'parameter_encrypturl'); } - ($errtext,$fatal)=&storemap($coursenum,$coursedom,$folder.'.sequence'); - if ($fatal) { - $r->print('

'.$errtext.'

'); - return; - } if ($ENV{'form.newpos'}) { # change order my $newpos=$ENV{'form.newpos'}-1; - $r->print('Sorting '.$idx.' -> '.$newpos); - ($errtext,$fatal)=&storemap($coursenum,$coursedom,$folder.'.sequence'); - if ($fatal) { - $r->print('

'.$errtext.'

'); - return; - } - + my $currentpos=$ENV{'form.currentpos'}-1; + $r->print('Sorting '.$idx.': '.$currentpos.' -> '.$newpos); } - +# store the changed version + ($errtext,$fatal)=&storemap($coursenum,$coursedom,$folder.'.sequence'); + if ($fatal) { + $r->print('

'.$errtext.'

'); + return; + } + } + # upload a file, if present if (($ENV{'form.uploaddoc.filename'}) && ($ENV{'form.cmd'}=~/^upload_(\w+)/)) { @@ -499,6 +496,7 @@ sub entryline { my $selectbox=''; if ($folder!~/^supplemental/) { $selectbox= + ''. '