[LON-CAPA-cvs] cvs: loncom /interface lonprintout.pm
bowersj2
lon-capa-cvs@mail.lon-capa.org
Mon, 05 May 2003 14:30:24 -0000
bowersj2 Mon May 5 10:30:24 2003 EDT
Modified files:
/loncom/interface lonprintout.pm
Log:
Make "print problems from sequeunce" work for things other then the
top-level sequence.
Index: loncom/interface/lonprintout.pm
diff -u loncom/interface/lonprintout.pm:1.145 loncom/interface/lonprintout.pm:1.146
--- loncom/interface/lonprintout.pm:1.145 Fri May 2 15:22:20 2003
+++ loncom/interface/lonprintout.pm Mon May 5 10:30:23 2003
@@ -1,7 +1,7 @@
# The LearningOnline Network
# Printout
#
-# $Id: lonprintout.pm,v 1.145 2003/05/02 19:22:20 bowersj2 Exp $
+# $Id: lonprintout.pm,v 1.146 2003/05/05 14:30:23 bowersj2 Exp $
#
# Copyright Michigan State University Board of Trustees
#
@@ -1774,22 +1774,30 @@
Apache::loncommon::get_unprocessed_cgi($ENV{QUERY_STRING});
my $helper = Apache::lonhelper::helper->new("Printing Wizard");
+ $helper->declareVar('symb');
+ $helper->declareVar('postdata');
# This will persistently load in the data we want from the
# very first screen.
- if (defined($ENV{'form.postdata'})) {
- $helper->{VARS}->{'postdata'} = $ENV{'form.postdata'};
+ if ($ENV{'form.postdata'}) {
+ $helper->{VARS}->{'symb'} = &Apache::lonnet::symbread($ENV{'form.postdata'});
}
- if (defined($ENV{'form.symb'})) {
- $helper->{VARS}->{'symb'} = &Apache::lonnet::symbread($helper->{VARS}->{'postdata'});
+ if ($ENV{'form.symb'}) {
+ $helper->{VARS}->{'symb'} = $ENV{'form.symb'};
}
- if (defined($ENV{'form.url'})) {
- $helper->{VARS}->{'url'} = $helper->{VARS}->{'postdata'};
+ if ($ENV{'form.url'}) {
+ $helper->{VARS}->{'symb'} = &Apache::lonnet::symbread($helper->{VARS}->{'postdata'});
}
+
my ($resourceTitle,$sequenceTitle,$mapTitle) = &details_for_menu;
$helper->{VARS}->{'assignment'} = $sequenceTitle;
+ # Extract map
+ my $symb = $helper->{VARS}->{'symb'};
+ my ($map, $id, $url) = split(/___/, $symb);
+ $helper->{VARS}->{'postdata'} = Apache::lonnet::clutter($url);
+
if (!$resourceTitle) { # if the resource doesn't have a title, use the filename
my $url = $helper->{VARS}->{'postdata'};
$resourceTitle = substr($url, rindex($url, '/') + 1);
@@ -1797,11 +1805,7 @@
Apache::lonhelper::registerHelperTags();
- # Extract map
- my $symb = $helper->{VARS}->{'symb'};
- my ($map, $id, $url) = split(/__/, $symb);
-
- my $subdir = &Apache::lonnet::filelocation("", $helper->{VARS}->{'postdata'});
+ my $subdir = &Apache::lonnet::filelocation("", $url);
# "Delete everything after the last slash."
$subdir =~ s|/[^/]+$||;