version 1.298, 2004/05/03 17:51:11
|
version 1.300, 2004/05/06 06:45:13
|
Line 1038 ENDPART
|
Line 1038 ENDPART
|
} |
} |
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','75'); |
my $seed=time+($$<<16)+($$); |
my $seed=time+($$<<16)+($$); |
my @allcodes; |
my @allcodes; |
if ($old_name) { |
if ($old_name) { |
Line 1046 ENDPART
|
Line 1046 ENDPART
|
@allcodes=split(',',$result{$old_name}); |
@allcodes=split(',',$result{$old_name}); |
} else { |
} else { |
my %allcodes; |
my %allcodes; |
|
srand($seed); |
for (my $i=0;$i<$num_todo;$i++) { |
for (my $i=0;$i<$num_todo;$i++) { |
$moreenv{'CODE'}=&get_CODE(\%allcodes,$i,$seed,'6'); |
$moreenv{'CODE'}=&get_CODE(\%allcodes,$i,$seed,'6'); |
} |
} |
Line 1247 sub num_to_letters {
|
Line 1248 sub num_to_letters {
|
sub get_CODE { |
sub get_CODE { |
my ($all_codes,$num,$seed,$size)=@_; |
my ($all_codes,$num,$seed,$size)=@_; |
my $max='1'.'0'x$size; |
my $max='1'.'0'x$size; |
srand($seed); |
|
my $newcode; |
my $newcode; |
while(1) { |
while(1) { |
$newcode=sprintf("%06d",int(rand($max))); |
$newcode=sprintf("%06d",int(rand($max))); |