version 1.106, 2003/01/27 16:01:13
|
version 1.109, 2003/01/30 16:57:01
|
Line 162 sub sequence_content_menu {
|
Line 162 sub sequence_content_menu {
|
my @titles_master_seq = &titles_coming_from_hash($primary_sequence,$sequence[0]); |
my @titles_master_seq = &titles_coming_from_hash($primary_sequence,$sequence[0]); |
foreach my $entity (@titles_master_seq) {$entity=~/^(.*)&&/; $entity=$1} |
foreach my $entity (@titles_master_seq) {$entity=~/^(.*)&&/; $entity=$1} |
my @master_seq_view = @master_seq; |
my @master_seq_view = @master_seq; |
if (not $ENV{'request.role'}=~/^st\./) { |
if ($ENV{'user.adv'}) { |
for (my $i=0;$i<=$#master_seq_view;$i++) { |
for (my $i=0;$i<=$#master_seq_view;$i++) { |
$master_seq_view[$i]=~/___\d+___(.+)$/; |
$master_seq_view[$i]=~/___\d+___(.+)$/; |
$master_seq_view[$i]='/'.$1; |
$master_seq_view[$i]='/'.$1; |
} |
} |
} else { |
} else { |
for (my $i=0;$i<=$#master_seq_view;$i++) { |
for (my $i=0;$i<=$#master_seq_view;$i++) { |
$master_seq_view[$i]=' '; |
$master_seq_view[$i]=' '; |
} |
} |
} |
} |
$r->print(<<ENDMENUOUT1); |
$r->print(<<ENDMENUOUT1); |
Line 216 ENDMENUOUT1
|
Line 216 ENDMENUOUT1
|
} |
} |
} |
} |
$r->print(<<ENDMENUOUT2); |
$r->print(<<ENDMENUOUT2); |
<br /> |
<br /><br /> |
<input type="hidden" name="numberoffiles" value="$inc"> |
<input type="hidden" name="numberoffiles" value="$inc"> |
<input type="hidden" name="phase" value="three"> |
<input type="hidden" name="phase" value="three"> |
|
<input type=button onClick="checkall()" value="Check All"> |
|
<input type=button onClick="uncheckall()" value="Uncheck"> |
<input type="submit" value="Submit"> |
<input type="submit" value="Submit"> |
ENDMENUOUT2 |
ENDMENUOUT2 |
|
|
Line 238 sub problem_choice_menu {
|
Line 240 sub problem_choice_menu {
|
@content_directory = &Apache::lonnet::dirlist($subdirtoprint, |
@content_directory = &Apache::lonnet::dirlist($subdirtoprint, |
$domain, $user,''); |
$domain, $user,''); |
} else { |
} else { |
@content_directory = &Apache::lonnet::dirlist($subdirtoprint); |
#local library server res space (allows to print only from the own library server) |
|
@content_directory = &Apache::lonnet::dirlist($subdirtoprint,$ENV{'user.domain'}, $ENV{'user.name'},''); |
} |
} |
for (my $iy=0;$iy<=$#content_directory;$iy++) { |
for (my $iy=0;$iy<=$#content_directory;$iy++) { |
my @tempo_array = split(/&/,$content_directory[$iy]); |
my @tempo_array = split(/&/,$content_directory[$iy]); |
Line 277 sub problem_choice_menu {
|
Line 280 sub problem_choice_menu {
|
} |
} |
</script> |
</script> |
<input type=button onClick="checkall()" value="Check All"> |
<input type=button onClick="checkall()" value="Check All"> |
<input type=button onClick="uncheckall()" value="Uncheck"> |
<input type=button onClick="uncheckall()" value="Uncheck"> |
|
<input type="submit" value="Submit"> |
<p> |
<p> |
ENDMENUOUT1 |
ENDMENUOUT1 |
my $i=0; |
my $i=0; |
Line 287 ENDMENUOUT1
|
Line 291 ENDMENUOUT1
|
$i++; |
$i++; |
} |
} |
$r->print(<<ENDMENUOUT2); |
$r->print(<<ENDMENUOUT2); |
<br /> |
<br /><br /> |
<input type="hidden" name="papersize" value="$ENV{'form.papersize'}"> |
<input type="hidden" name="papersize" value="$ENV{'form.papersize'}"> |
<input type="hidden" name="numberofproblems" value="$i"> |
<input type="hidden" name="numberofproblems" value="$i"> |
<input type="hidden" name="phase" value="three"> |
<input type="hidden" name="phase" value="three"> |
|
<input type=button onClick="checkall()" value="Check All"> |
|
<input type=button onClick="uncheckall()" value="Uncheck"> |
<input type="submit" value="Submit"> |
<input type="submit" value="Submit"> |
ENDMENUOUT2 |
ENDMENUOUT2 |
} |
} |
Line 464 ENDPART
|
Line 470 ENDPART
|
$LaTeXwidth = $1; |
$LaTeXwidth = $1; |
} |
} |
if ($choice eq 'Standard LaTeX output for current document') { |
if ($choice eq 'Standard LaTeX output for current document') { |
#-- single document - problem, page, html, xml |
#-- single document - problem, page, html, xml, ... |
$selectionmade = 1; |
$selectionmade = 1; |
if ($ENV{'form.url'}=~/\.(problem|exam|quiz|assess|survey|form|library|page|xml|html|htm|xhtml|xhtm)$/) { |
if ($ENV{'form.url'}=~/\.(problem|exam|quiz|assess|survey|form|library|page|xml|html|htm|xhtml|xhtm)$/) { |
my %moreenv; |
my %moreenv; |
Line 641 ENDPART
|
Line 647 ENDPART
|
&Apache::lonnet::appenv(%moreenv); |
&Apache::lonnet::appenv(%moreenv); |
if ($urlp =~ m|/home/([^/]+)/public_html|) { |
if ($urlp =~ m|/home/([^/]+)/public_html|) { |
$urlp =~ s|/home/([^/]*)/public_html|/~$1|; |
$urlp =~ s|/home/([^/]*)/public_html|/~$1|; |
|
} else { |
|
$urlp =~ s|^/home/httpd/html||; |
} |
} |
my $texversion=&Apache::lonnet::ssi($urlp); |
my $texversion=&Apache::lonnet::ssi($urlp); |
&Apache::lonnet::delenv('form.grade_target','form.textwidth'); |
&Apache::lonnet::delenv('form.grade_target','form.textwidth'); |
Line 1279 sub page_format_transformation {
|
Line 1287 sub page_format_transformation {
|
} else { |
} else { |
($textwidth,$textheight,$oddoffset,$evenoffset) = ($ENV{'form.width'},$ENV{'form.height'},$ENV{'form.leftmargin'},$ENV{'form.leftmargin'}); |
($textwidth,$textheight,$oddoffset,$evenoffset) = ($ENV{'form.width'},$ENV{'form.height'},$ENV{'form.leftmargin'},$ENV{'form.leftmargin'}); |
} |
} |
my $courseidinfo = $ENV{'course.'.$ENV{'request.course.id'}.'.description'}; |
my $firstname = &special_character_corrections(&Apache::lonnet::unescape($ENV{'environment.firstname'})); |
if ($layout eq 'CBI') { |
my $lastname = &special_character_corrections(&Apache::lonnet::unescape($ENV{'environment.lastname'})); |
$text =~ s/\\begin{document}/\\setlength{\\oddsidemargin}{$oddoffset}\\setlength{\\evensidemargin}{$evenoffset}\\setlength{\\topmargin}{200pt}\\setlength{\\textwidth}{$textwidth}\\setlength{\\textheight}{$textheight}\\setlength{\\parindent}{20pt}\\setlength{\\marginparwidth}{90pt}\\setlength{\\textfloatsep}{8pt plus 2\.0pt minus 4\.0pt}\\newlength{\\minipagewidth}\\setlength{\\minipagewidth}{\\textwidth\/\$number_of_columns-0\.2cm} \\begin{document}\\setcounter{page}{1}\\noindent\\parbox{\\minipagewidth}{\\noindent\\fbox{\\textbf{$ENV{'environment.firstname'} $ENV{'environment.lastname'}}} \\hfill $courseidinfo} \\vskip 5 mm /; |
my $courseidinfo = &special_character_corrections(&Apache::lonnet::unescape($ENV{'course.'.$ENV{'request.course.id'}.'.description'})); |
} elsif ($layout eq 'CAPA') { |
if ($layout eq 'CBI') { |
if ($choice ne 'All class print') { |
$text =~ s/\\begin{document}/\\setlength{\\oddsidemargin}{$oddoffset}\\setlength{\\evensidemargin}{$evenoffset}\\setlength{\\topmargin}{200pt}\\setlength{\\textwidth}{$textwidth}\\setlength{\\textheight}{$textheight}\\setlength{\\parindent}{20pt}\\setlength{\\marginparwidth}{90pt}\\setlength{\\textfloatsep}{8pt plus 2\.0pt minus 4\.0pt}\\newlength{\\minipagewidth}\\setlength{\\minipagewidth}{\\textwidth\/\$number_of_columns-0\.2cm} \\begin{document}\\setcounter{page}{1}\\noindent\\parbox{\\minipagewidth}{\\noindent\\fbox{\\textbf{$firstname $lastname}} \\hfill $courseidinfo} \\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\}\\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}/; |
} elsif ($layout eq 'CAPA') { |
} else { |
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{$firstname $lastname} $courseidinfo - $assignment}\\pagestyle{myheadings}\\begin{document}\\voffset=-1\.8cm\\setcounter{page}{1}/; |
|
} else { |
$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 /; |
$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; |
} |
|
return $text; |
} |
} |
|
|
|
|
Line 1332 sub details_for_menu {
|
Line 1342 sub details_for_menu {
|
} |
} |
|
|
|
|
|
sub special_character_corrections { |
|
my $argument = shift; |
|
$argument =~ s/_/ /g; |
|
$argument =~ s/\^/ /g; |
|
$argument =~ s/&/\\&/g; |
|
return $argument; |
|
} |
|
|
|
|
sub latex_corrections { |
sub latex_corrections { |
|
|
my ($number_of_columns,$result) = @_; |
my ($number_of_columns,$result) = @_; |