version 1.118, 2004/08/25 19:38:58
|
version 1.120, 2004/09/29 05:47:33
|
Line 192 sub end_foilgroup {
|
Line 192 sub end_foilgroup {
|
my $ignored=0; |
my $ignored=0; |
foreach $name (@whichopt) { |
foreach $name (@whichopt) { |
my $response=&Apache::response::getresponse($temp); |
my $response=&Apache::response::getresponse($temp); |
if ($ENV{'form.submitted'} eq 'scantron') { |
if ($ENV{'form.submitted'} eq 'scantron' && $response=~/\S/) { |
$response = $opt[$response]; |
$response = $opt[$response]; |
} |
} |
if ( $response =~ /[^\s]/) { |
if ( $response =~ /[^\s]/) { |
Line 238 sub end_foilgroup {
|
Line 238 sub end_foilgroup {
|
} else { |
} else { |
my $ad; |
my $ad; |
if ($wrong==0 && $right==0) { |
if ($wrong==0 && $right==0) { |
#nothing submitted |
#nothing submitted only assign a score if we |
|
#need to override a previous grade |
|
if (defined($Apache::lonhomework::history{"resource.$part.$id.awarddetail"})) { |
|
$ad='ASSIGNED_SCORE'; |
|
} |
} else { |
} else { |
$ad='ASSIGNED_SCORE'; |
$ad='ASSIGNED_SCORE'; |
} |
} |
Line 491 sub webbubbles {
|
Line 495 sub webbubbles {
|
|
|
|
|
sub bubbles { |
sub bubbles { |
my ($ralphabit,$ropt,$responce) = @_; |
my ($ralphabet,$ropt,$response) = @_; |
my @alphabet = @$ralphabit; |
my @alphabet = @$ralphabet; |
my @opt = @$ropt; |
my @opt = @$ropt; |
my ($result,$head,$line) =('','',''); |
my ($result,$head,$line) =('','',''); |
my $number_of_bubbles = $#opt + 1; |
my $number_of_bubbles = $#opt + 1; |
Line 508 sub bubbles {
|
Line 512 sub bubbles {
|
for (my $ind=0;$ind<=$number_of_bubbles;$ind++) { |
for (my $ind=0;$ind<=$number_of_bubbles;$ind++) { |
my $leftmargin; |
my $leftmargin; |
$opt[$ind]=&Apache::lonxml::latex_special_symbols($opt[$ind]); |
$opt[$ind]=&Apache::lonxml::latex_special_symbols($opt[$ind]); |
if ($responce eq 'rankresponce') {$opt[$ind]='Rank '.$opt[$ind];} |
if ($response eq 'rankresponse') {$opt[$ind]='Rank '.$opt[$ind];} |
if ($ind==0) {$leftmargin=6;} else {$leftmargin=10;} |
if ($ind==0) {$leftmargin=6;} else {$leftmargin=10;} |
$current_length += (length($opt[$ind])+length($alphabet[$ind])+4)*2; |
$current_length += (length($opt[$ind])+length($alphabet[$ind])+4)*2; |
if ($current_length<($textwidth-$leftmargin) and $ind!=$number_of_bubbles) { |
if ($current_length<($textwidth-$leftmargin) and $ind!=$number_of_bubbles) { |