[LON-CAPA-cvs] cvs: loncom /interface lonprintout.pm
sakharuk
lon-capa-cvs@mail.lon-capa.org
Wed, 08 Jan 2003 15:05:52 -0000
sakharuk Wed Jan 8 10:05:52 2003 EDT
Modified files:
/loncom/interface lonprintout.pm
Log:
1. Corrections are done to print the correct title of primary sequence for the sequences created in docs. (lines 1228-1232)
2. Sort is added to
a) list of files in primary sequence (line 162);
b) list of problems in particular directory in the construction space (line 275).
Guy, let me know if you are going to implement of them on s10 now please.
Index: loncom/interface/lonprintout.pm
diff -u loncom/interface/lonprintout.pm:1.101 loncom/interface/lonprintout.pm:1.102
--- loncom/interface/lonprintout.pm:1.101 Mon Jan 6 10:19:21 2003
+++ loncom/interface/lonprintout.pm Wed Jan 8 10:05:52 2003
@@ -1,7 +1,7 @@
# The LearningOnline Network
# Printout
#
-# $Id: lonprintout.pm,v 1.101 2003/01/06 15:19:21 sakharuk Exp $
+# $Id: lonprintout.pm,v 1.102 2003/01/08 15:05:52 sakharuk Exp $
#
# Copyright Michigan State University Board of Trustees
#
@@ -159,7 +159,7 @@
if ($sequence[0]=~/^uploaded/) {$primary_sequence = '/'.$sequence[0];}
else {$primary_sequence = '/res/'.$sequence[0];}
my @master_seq = &coming_from_hash($primary_sequence,$sequence[0]);
- my @master_seq_view = @master_seq;
+ my @master_seq_view = sort @master_seq;
for (my $i=0;$i<=$#master_seq_view;$i++) {
$master_seq_view[$i]=~/\/([^\/]+)$/;
$master_seq_view[$i]=$1;
@@ -272,7 +272,7 @@
<p>
ENDMENUOUT1
my $i=0;
- foreach my $file (@list_of_files) {
+ foreach my $file (sort @list_of_files) {
$r->print('<br /><input type=checkbox name="whattoprint'.$i.'" value="'.$file.'"> '.
$file);
$i++;
@@ -1198,7 +1198,7 @@
if ($choice ne 'All class print') {
$text =~ s/\\begin{document}/\\textheight $textheight\\oddsidemargin = $evenoffset\\evensidemargin = $evenoffset\\textwidth= $textwidth\\newlength{\\minipagewidth}\\setlength{\\minipagewidth}{\\textwidth\/\$number_of_columns-0\.2cm}\\renewcommand{\\ref}{\\keephidden\}\\setlength{\\topmargin}{1cm}\\setlength{\\headheight}{1cm}\\setlength{\\headsep}{0.5cm}\\markboth{}{\\textbf{$ENV{'environment.firstname'} $ENV{'environment.lastname'}} $courseidinfo - $assignment}\\pagestyle{myheadings}\\begin{document}\\voffset=-1\.8cm\\setcounter{page}{1}/;
} else {
- $text =~ s/\\begin{document}/\\setlength{\\textheight}{$textheight}\\setlength{\\oddsidemargin}{$oddoffset}\\setlength{\\evensidemargin}{$evenoffset}\\setlength{\\textwidth}{$textwidth}\\newlength{\\minipagewidth}\\setlength{\\minipagewidth}{\\textwidth\/\$number_of_columns-0\.2cm}\\renewcommand{\\ref}{\\keephidden\}\\begin{document}\\voffset=-1\.8cm\\setcounter{page}{1} \\vskip 5 mm /;
+ $text =~ s/\\begin{document}/\\textheight $textheight\\oddsidemargin = $evenoffset\\evensidemargin = $evenoffset\\textwidth= $textwidth\\newlength{\\minipagewidth}\\setlength{\\minipagewidth}{\\textwidth\/\$number_of_columns-0\.2cm}\\renewcommand{\\ref}{\\keephidden\}\\begin{document}\\voffset=-1\.8cm\\setcounter{page}{1} \\vskip 5 mm /;
}
}
return $text;
@@ -1224,9 +1224,14 @@
my $name_of_resourse = $hash{'title_'.$hash{'ids_'.$ENV{'form.postdata'}}};
my $symbolic = &Apache::lonnet::symbread($ENV{'form.postdata'});
my ($map,$id,$resource)=split(/___/,$symbolic);
- my $name_of_sequence = $hash{'title_'.$hash{'ids_/res/'.$map}};
+ my $name_of_sequence;
+ if ($map=~/^uploaded/) {
+ $name_of_sequence = $hash{'title_'.$hash{'ids_/'.$map}};
+ } else {
+ $name_of_sequence = $hash{'title_'.$hash{'ids_/res/'.$map}};
+ }
if ($name_of_sequence =~ /^\s*$/) {
- $map =~ m|([^/]+)$|;
+ $map =~ m|([^/]+)$|;
$name_of_sequence = $1;
}
my $name_of_map = $hash{'title_'.$hash{'ids_/res/'.$ENV{'request.course.uri'}}};