--- rat/lonsequence.pm 2008/11/18 19:13:37 1.34
+++ rat/lonsequence.pm 2011/07/04 09:25:17 1.41
@@ -2,7 +2,7 @@
#
# Sequence Handler
#
-# $Id: lonsequence.pm,v 1.34 2008/11/18 19:13:37 jms Exp $
+# $Id: lonsequence.pm,v 1.41 2011/07/04 09:25:17 foxr Exp $
#
# Copyright Michigan State University Board of Trustees
#
@@ -27,35 +27,7 @@
# http://www.lon-capa.org/
#
-=head1 NAME
-
-Apache::lonsequence
-
-=head1 SYNOPSIS
-Handler for showing sequence objects of
-educational resources.
-
-This is part of the LearningOnline Network with CAPA project
-described at http://www.lon-capa.org.
-
-=head1 SUBROUTINES
-
-=over
-
-=item handler()
-
-=item viewmap()
-
-=item attemptread()
-
-=item mapread()
-
-=item start_fresh_session()
-
-=back
-
-=cut
package Apache::lonsequence;
@@ -64,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();
@@ -130,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();
@@ -154,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('