--- rat/lonsequence.pm 2007/07/11 23:51:02 1.31
+++ rat/lonsequence.pm 2013/11/28 02:23:25 1.44
@@ -2,7 +2,7 @@
#
# Sequence Handler
#
-# $Id: lonsequence.pm,v 1.31 2007/07/11 23:51:02 albertel Exp $
+# $Id: lonsequence.pm,v 1.44 2013/11/28 02:23:25 raeburn Exp $
#
# Copyright Michigan State University Board of Trustees
#
@@ -27,6 +27,8 @@
# http://www.lon-capa.org/
#
+
+
package Apache::lonsequence;
use strict;
@@ -34,6 +36,7 @@ use Apache::lonnet;
use Apache::Constants qw(:common :http REDIRECT);
use GDBM_File;
use LONCAPA::map();
+use LONCAPA;
use Apache::lonpageflip();
use Apache::loncommon();
use Apache::groupsort();
@@ -46,10 +49,10 @@ my $successtied;
# ----------------------------------------- Attempt to read from resource space
sub attemptread {
- my $fn=shift;
+ my ($fn,$unsorted)=@_;
&Apache::lonnet::repcopy($fn);
if (-e $fn) {
- return &LONCAPA::map::attemptread($fn);
+ return &LONCAPA::map::attemptread($fn,$unsorted);
} else {
return ();
}
@@ -100,14 +103,15 @@ ENDSCRIPT
'
'.$url.'
');
# ------------------ This is trying to select. Provide buttons and tie %selhash
if ($env{'form.forceselect'}) { $r->print(<
-
-
+
ENDSELECT
my $diropendb =
- "/home/httpd/perl/tmp/$env{'user.domain'}\_$env{'user.name'}_sel_res.db";
+ LONCAPA::tempdir() .
+ "$env{'user.domain'}\_$env{'user.name'}_sel_res.db";
if (tie(%selhash,'GDBM_File',$diropendb,&GDBM_WRCREAT(),0640)) {
if ($env{'form.launch'} eq '1') {
&start_fresh_session();
@@ -124,7 +128,9 @@ ENDSELECT
# ----------------------------- successtied is now '1' if in working selectmode
my ($errtext,$fatal)=&mapread(&Apache::lonnet::filelocation('',$url),'');
if ($fatal==1) {
- $r->print('