[LON-CAPA-cvs] cvs: loncom /interface lonprintout.pm
foxr
lon-capa-cvs@mail.lon-capa.org
Mon, 13 Dec 2004 22:24:04 -0000
This is a MIME encoded message
--foxr1102976644
Content-Type: text/plain
foxr Mon Dec 13 17:24:04 2004 EDT
Modified files:
/loncom/interface lonprintout.pm
Log:
Defect 3618
Add radio buttons (as yet with no code behind them) to control the
sort order of print * for selected students etc.
--foxr1102976644
Content-Type: text/plain
Content-Disposition: attachment; filename="foxr-20041213172404.txt"
Index: loncom/interface/lonprintout.pm
diff -u loncom/interface/lonprintout.pm:1.339 loncom/interface/lonprintout.pm:1.340
--- loncom/interface/lonprintout.pm:1.339 Fri Nov 19 16:48:41 2004
+++ loncom/interface/lonprintout.pm Mon Dec 13 17:24:03 2004
@@ -1,7 +1,7 @@
# The LearningOnline Network
# Printout
#
-# $Id: lonprintout.pm,v 1.339 2004/11/19 21:48:41 albertel Exp $
+# $Id: lonprintout.pm,v 1.340 2004/12/13 22:24:03 foxr Exp $
#
# Copyright Michigan State University Board of Trustees
#
@@ -516,12 +516,12 @@
$fancypagestatement="\\rhead{}\\chead{}\\lhead{\\textbf{$name} $courseidinfo \\hfill \\thepage \\\\ \\textit{$assignment}}";
}
if ($layout eq 'album') {
- $text =~ s/\\begin{document}/\\setlength{\\oddsidemargin}{$oddoffset}\\setlength{\\evensidemargin}{$evenoffset}$topmargintoinsert\\setlength{\\textwidth}{$textwidth}\\setlength{\\textheight}{$textheight}\\setlength{\\textfloatsep}{8pt plus 2\.0pt minus 4\.0pt}\\newlength{\\minipagewidth}\\setlength{\\minipagewidth}{\\textwidth\/\$number_of_columns-0\.2cm}\\usepackage{fancyhdr}\\addtolength{\\headheight}{\\baselineskip}\\pagestyle{fancy}$fancypagestatement\\begin{document}\\voffset=-0\.8 cm\\setcounter{page}{1} /;
+ $text =~ s/\\begin{document}/\\setlength{\\oddsidemargin}{$oddoffset}\\setlength{\\evensidemargin}{$evenoffset}$topmargintoinsert\n\\setlength{\\textwidth}{$textwidth}\\setlength{\\textheight}{$textheight}\\setlength{\\textfloatsep}{8pt plus 2\.0pt minus 4\.0pt}\n\\newlength{\\minipagewidth}\\setlength{\\minipagewidth}{\\textwidth\/\$number_of_columns-0\.2cm}\\usepackage{fancyhdr}\\addtolength{\\headheight}{\\baselineskip}\n\\pagestyle{fancy}$fancypagestatement\\begin{document}\\voffset=-0\.8 cm\\setcounter{page}{1}\n /;
} elsif ($layout eq 'book') {
if ($choice ne 'All class print') {
- $text =~ s/\\begin{document}/\\textheight $textheight\\oddsidemargin = $evenoffset\\evensidemargin = $evenoffset $topmargintoinsert\\textwidth= $textwidth\\newlength{\\minipagewidth}\\setlength{\\minipagewidth}{\\textwidth\/\$number_of_columns-0\.2cm}\\renewcommand{\\ref}{\\keephidden\}\\usepackage{fancyhdr}\\addtolength{\\headheight}{\\baselineskip}\\pagestyle{fancy}$fancypagestatement\\begin{document}\\voffset=-0\.8 cm\\setcounter{page}{1}/;
+ $text =~ s/\\begin{document}/\\textheight $textheight\\oddsidemargin = $evenoffset\\evensidemargin = $evenoffset $topmargintoinsert\n\\textwidth= $textwidth\\newlength{\\minipagewidth}\\setlength{\\minipagewidth}{\\textwidth\/\$number_of_columns-0\.2cm}\n\\renewcommand{\\ref}{\\keephidden\}\\usepackage{fancyhdr}\\addtolength{\\headheight}{\\baselineskip}\\pagestyle{fancy}$fancypagestatement\\begin{document}\n\\voffset=-0\.8 cm\\setcounter{page}{1}\n/;
} else {
- $text =~ s/\\pagestyle{fancy}\\rhead{}\\chead{}\s*\\begin{document}/\\textheight = $textheight\\oddsidemargin = $evenoffset\\evensidemargin = $evenoffset $topmargintoinsert\\textwidth= $textwidth\\newlength{\\minipagewidth}\\setlength{\\minipagewidth}{\\textwidth\/\$number_of_columns-0\.2cm}\\renewcommand{\\ref}{\\keephidden\}\\pagestyle{fancy}\\rhead{}\\chead{}\\begin{document}\\voffset=-0\.8cm\\setcounter{page}{1} \\vskip 5 mm /;
+ $text =~ s/\\pagestyle{fancy}\\rhead{}\\chead{}\s*\\begin{document}/\\textheight = $textheight\\oddsidemargin = $evenoffset\n\\evensidemargin = $evenoffset $topmargintoinsert\\textwidth= $textwidth\\newlength{\\minipagewidth}\n\\setlength{\\minipagewidth}{\\textwidth\/\$number_of_columns-0\.2cm}\\renewcommand{\\ref}{\\keephidden\}\\pagestyle{fancy}\\rhead{}\\chead{}\\begin{document}\\voffset=-0\.8cm\n\\setcounter{page}{1} \\vskip 5 mm\n /;
}
if ($papersize eq 'a4') {
$text =~ s/(\\begin{document})/$1\\special{papersize=210mm,297mm}/;
@@ -643,22 +643,22 @@
if ($mode eq 'batchmode') {
$output.='\batchmode';
}
- $output.='\newcommand{\keephidden}[1]{}\renewcommand{\deg}{$^{\circ}$}'.
- '\usepackage{longtable}\usepackage{textcomp}\usepackage{makeidx}'.
- '\usepackage[dvips]{graphicx}\usepackage{epsfig}\usepackage{calc}'.
- '\newenvironment{choicelist}{\begin{list}{}{\setlength{\rightmargin}{0in}'.
- '\setlength{\leftmargin}{0.13in}\setlength{\topsep}{0.05in}'.
- '\setlength{\itemsep}{0.022in}\setlength{\parsep}{0in}'.
- '\setlength{\belowdisplayskip}{0.04in}\setlength{\abovedisplayskip}{0.05in}'.
- '\setlength{\abovedisplayshortskip}{-0.04in}'.
- '\setlength{\belowdisplayshortskip}{0.04in}}}{\end{list}}'.
- '\renewenvironment{theindex}{\begin{list}{}{{\vskip 1mm \noindent \large'.
- '\textbf{Index}} \newline \setlength{\rightmargin}{0in}'.
- '\setlength{\leftmargin}{0.13in}\setlength{\topsep}{0.01in}'.
- '\setlength{\itemsep}{0.1in}\setlength{\parsep}{-0.02in}'.
- '\setlength{\belowdisplayskip}{0.01in}\setlength{\abovedisplayskip}{0.01in}'.
- '\setlength{\abovedisplayshortskip}{-0.04in}'.
- '\setlength{\belowdisplayshortskip}{0.01in}}}{\end{list}}\begin{document}';
+ $output.='\newcommand{\keephidden}[1]{}\renewcommand{\deg}{$^{\circ}$}'."\n".
+ '\usepackage{longtable}\usepackage{textcomp}\usepackage{makeidx}'."\n".
+ '\usepackage[dvips]{graphicx}\usepackage{epsfig}\usepackage{calc}'."\n".
+ '\newenvironment{choicelist}{\begin{list}{}{\setlength{\rightmargin}{0in}'."\n".
+ '\setlength{\leftmargin}{0.13in}\setlength{\topsep}{0.05in}'."\n".
+ '\setlength{\itemsep}{0.022in}\setlength{\parsep}{0in}'."\n".
+ '\setlength{\belowdisplayskip}{0.04in}\setlength{\abovedisplayskip}{0.05in}'."\n".
+ '\setlength{\abovedisplayshortskip}{-0.04in}'."\n".
+ '\setlength{\belowdisplayshortskip}{0.04in}}}{\end{list}}'."\n".
+ '\renewenvironment{theindex}{\begin{list}{}{{\vskip 1mm \noindent \large'."\n".
+ '\textbf{Index}} \newline \setlength{\rightmargin}{0in}'."\n".
+ '\setlength{\leftmargin}{0.13in}\setlength{\topsep}{0.01in}'."\n".
+ '\setlength{\itemsep}{0.1in}\setlength{\parsep}{-0.02in}'."\n".
+ '\setlength{\belowdisplayskip}{0.01in}\setlength{\abovedisplayskip}{0.01in}'."\n".
+ '\setlength{\abovedisplayshortskip}{-0.04in}'."\n".
+ '\setlength{\belowdisplayshortskip}{0.01in}}}{\end{list}}\begin{document}'."\n";
return $output;
}
@@ -964,7 +964,6 @@
my $assignment=&Apache::lonxml::latex_special_symbols(&Apache::lonnet::gettitle($sequence),'header'); #tittle of the assignment which contains this problem
if ($selectionmade==7) {$helper->{VARS}->{'assignment'}=$assignment;}
if ($i==0) {$prevassignment=$assignment;}
- #&Apache::lonnet::logthis("Trying to get $urlp with symb $master_seq[$i]");
my $texversion='';
if ($urlp=~/\.(problem|exam|quiz|assess|survey|form|library|page|xml|html|htm|xhtml|xhtm)$/) {
$texversion.=&Apache::lonnet::ssi($urlp,%form);
@@ -1507,6 +1506,7 @@
$helper->declareVar('construction');
$helper->declareVar('assignment');
$helper->declareVar('style_file');
+ $helper->declareVar('student_sort');
# This will persistently load in the data we want from the
# very first screen.
@@ -1695,6 +1695,10 @@
&Apache::lonxml::xmlparse($r, 'helper', <<CHOOSE_STUDENTS);
<state name="CHOOSE_STUDENTS" title="Select Students and Resources">
<student multichoice='1' variable="STUDENTS" nextstate="PAGESIZE" />
+ <choices variable='student_sort'>
+ <choice computer='0'>Sort by section then student</choice>
+ <choice computer='1'>Sort by students across sections.</choice>
+ </choices>
$resource_selector
</state>
CHOOSE_STUDENTS
@@ -1753,6 +1757,11 @@
&Apache::lonxml::xmlparse($r, 'helper', <<CHOOSE_STUDENTS1);
<state name="CHOOSE_STUDENTS1" title="Select Students and Resources">
<student multichoice='1' variable="STUDENTS" nextstate="PAGESIZE" />
+ <choices variable='student_sort'>
+ <choice computer='0'>Sort by section then student</choice>
+ <choice computer='1'>Sort by students across sections.</choice>
+ </choices>
+
$resource_selector
</state>
CHOOSE_STUDENTS1
--foxr1102976644--