version 1.78, 2003/02/27 20:31:34
|
version 1.79, 2003/02/27 21:20:33
|
Line 223 sub end_numericalresponse {
|
Line 223 sub end_numericalresponse {
|
my $powers_number = 8; #default values for number of powers |
my $powers_number = 8; #default values for number of powers |
my $symb; |
my $symb; |
if ($ENV{'form.symb'}=~/___\d+___/) {$symb=$ENV{'form.symb'};} else {$symb=$ENV{'request.symb'};} |
if ($ENV{'form.symb'}=~/___\d+___/) {$symb=$ENV{'form.symb'};} else {$symb=$ENV{'request.symb'};} |
my $randomseed = srand(&Apache::lonnet::rndseed($symb,$ENV{'request.course.id'}, |
srand(&Apache::lonnet::rndseed($symb,$ENV{'request.course.id'}, |
$ENV{'user.domain'},$ENV{'user.name'})); |
$ENV{'user.domain'},$ENV{'user.name'})); |
my $ind=1+int(rand()*($factors_number-1)); |
my $ind=1+int(rand()*($factors_number-1)); |
my $factor = $factors[$ind]; |
my $factor = $factors[$ind]; |
Line 329 sub end_numericalresponse {
|
Line 329 sub end_numericalresponse {
|
&Apache::lonxml::increment_counter(); |
&Apache::lonxml::increment_counter(); |
} else { |
} else { |
$result.='\fbox{\fbox{\parbox{\textwidth-5mm}{\strut\\\\\strut\\\\\strut\\\\\strut\\\\\strut\\\\\strut\\\\}}}'; |
$result.='\fbox{\fbox{\parbox{\textwidth-5mm}{\strut\\\\\strut\\\\\strut\\\\\strut\\\\\strut\\\\\strut\\\\}}}'; |
$result.= '\begin{enumerate}\item[\textbf{'.$Apache::lonxml::counter.'}.]\textit{Live blank on scoring form}\vskip 0 mm \end{enumerate}'; |
my $id = $Apache::inputtags::part; |
&Apache::lonxml::increment_counter(); |
my $weight = &Apache::lonnet::EXT("resource.$id.weight"); |
} |
my $repetition = int $weight/9; |
|
if ($weight % 9 != 0) {$repetition++;} |
|
$result.='\begin{enumerate}'; |
|
for (my $i=0;$i<$repetition;$i++) { |
|
$result.='\item[\textbf{'.$Apache::lonxml::counter.'}.]\textit{Leave blank on scoring form}\vskip 0 mm'; |
|
&Apache::lonxml::increment_counter(); |
|
} |
|
$result.= '\end{enumerate}'; |
|
} |
} |
} |
} |
} |
} elsif ($target eq 'edit') { |
} elsif ($target eq 'edit') { |