version 1.293, 2004/04/22 22:59:11
|
version 1.295, 2004/04/26 19:00:29
|
Line 1009 ENDPART
|
Line 1009 ENDPART
|
my $old_name=$helper->{'VARS'}->{'REUSE_OLD_CODES'}; |
my $old_name=$helper->{'VARS'}->{'REUSE_OLD_CODES'}; |
my @master_seq=split /\|\|\|/, $helper->{'VARS'}->{'RESOURCES'}; |
my @master_seq=split /\|\|\|/, $helper->{'VARS'}->{'RESOURCES'}; |
my ($type) = split(/_/,$helper->{'VARS'}->{'PRINT_TYPE'}); |
my ($type) = split(/_/,$helper->{'VARS'}->{'PRINT_TYPE'}); |
|
my $number_per_page=$helper->{'VARS'}->{'NUMBER_TO_PRINT'}; |
|
if ($number_per_page eq '0' || $number_per_page eq 'all') { |
|
$number_per_page=$num_todo; |
|
} |
my $flag_latex_header_remove = 'NO'; |
my $flag_latex_header_remove = 'NO'; |
my %moreenv = ('textwidth' => &get_textwidth($helper,$LaTeXwidth)); |
my %moreenv = ('textwidth' => &get_textwidth($helper,$LaTeXwidth)); |
my %prog_state=&Apache::lonhtmlcommon::Create_PrgWin($r,'Print Status','Class Print Status',$num_todo,'inline'); |
my %prog_state=&Apache::lonhtmlcommon::Create_PrgWin($r,'Print Status','Class Print Status',$num_todo,'inline'); |
Line 1029 ENDPART
|
Line 1033 ENDPART
|
} |
} |
@allcodes=keys(%allcodes); |
@allcodes=keys(%allcodes); |
} |
} |
my $i=0; |
my $count=0; |
foreach my $code (sort(@allcodes)) { |
foreach my $code (sort(@allcodes)) { |
|
my $file_num=int($count/$number_per_page); |
$moreenv{'CODE'}=&num_to_letters($code); |
$moreenv{'CODE'}=&num_to_letters($code); |
my ($output,$fullname)= |
my ($output,$fullname)= |
&print_resources($r,$helper,'anonymous',$type,\%moreenv, |
&print_resources($r,$helper,'anonymous',$type,\%moreenv, |
\@master_seq,$flag_latex_header_remove); |
\@master_seq,$flag_latex_header_remove); |
$print_array[$i].=$output; |
$print_array[$file_num].=$output; |
&Apache::lonhtmlcommon::Increment_PrgWin($r,\%prog_state, |
&Apache::lonhtmlcommon::Increment_PrgWin($r,\%prog_state, |
&mt('last assignment').' '.$fullname); |
&mt('last assignment').' '.$fullname); |
$flag_latex_header_remove = 'YES'; |
$flag_latex_header_remove = 'YES'; |
$i++; |
$count++; |
} |
} |
&Apache::lonhtmlcommon::Close_PrgWin($r,\%prog_state); |
&Apache::lonhtmlcommon::Close_PrgWin($r,\%prog_state); |
$result .= $print_array[0].' \end{document}'; |
$result .= $print_array[0].' \end{document}'; |
Line 1583 CHOOSE_STUDENTS
|
Line 1588 CHOOSE_STUDENTS
|
my @names=&Apache::lonnet::getkeys('CODEs',$cdom,$cnum); |
my @names=&Apache::lonnet::getkeys('CODEs',$cdom,$cnum); |
my $namechoice='<choice></choice>'; |
my $namechoice='<choice></choice>'; |
foreach my $name (@names) { |
foreach my $name (@names) { |
|
if ($name =~ /^error: 2 /) { next; } |
$namechoice.='<choice computer="'.$name.'">'.$name.'</choice>'; |
$namechoice.='<choice computer="'.$name.'">'.$name.'</choice>'; |
} |
} |
&Apache::lonxml::xmlparse($r, 'helper', <<CHOOSE_ANON1); |
&Apache::lonxml::xmlparse($r, 'helper', <<CHOOSE_ANON1); |
Line 1637 CHOOSE_STUDENTS1
|
Line 1643 CHOOSE_STUDENTS1
|
|
|
&Apache::lonxml::xmlparse($r, 'helper', <<CHOOSE_ANON2); |
&Apache::lonxml::xmlparse($r, 'helper', <<CHOOSE_ANON2); |
<state name="CHOOSE_ANON2" title="Select Students and Resources"> |
<state name="CHOOSE_ANON2" title="Select Students and Resources"> |
<message><hr width='33%' /><b>How many Anonymous exams to print?</b></message> |
<nextstate>PAGESIZE</nextstate> |
|
<message><hr width='33%' /><b>Number of anonymous assignments to print?</b></message> |
<string variable="NUMBER_TO_PRINT_TOTAL" maxlength="5" size="5"></string> |
<string variable="NUMBER_TO_PRINT_TOTAL" maxlength="5" size="5"></string> |
|
<message><br /><b>Names to store the CODEs under for later:</b></message> |
|
<string variable="ANON_CODE_STORAGE_NAME" maxlength="50" size="20" /> |
|
<message><hr width='33%' /></message> |
|
<message><b>Reprint a set of saved CODEs:</b></message> |
|
<dropdown variable="REUSE_OLD_CODES"> |
|
$namechoice |
|
</dropdown> |
<message><hr width='33%' /></message> |
<message><hr width='33%' /></message> |
$resource_selector |
$resource_selector |
</state> |
</state> |