version 1.210, 2008/12/23 18:09:36
|
version 1.213, 2009/03/16 18:20:22
|
Line 283 sub check_for_previous {
|
Line 283 sub check_for_previous {
|
my %previous; |
my %previous; |
$previous{'used'} = 0; |
$previous{'used'} = 0; |
foreach my $key (sort(keys(%Apache::lonhomework::history))) { |
foreach my $key (sort(keys(%Apache::lonhomework::history))) { |
if ($key =~ /resource\.$partid\.$id\.submission$/) { |
if ($key =~ /resource\.\Q$partid\E\.\Q$id\E\.submission$/) { |
if ( $last && $key =~ /^(\d+):/ ) { |
if ( $last && $key =~ /^(\d+):/ ) { |
next if ($1 >= $last); |
next if ($1 >= $last); |
} |
} |
Line 538 sub edit_mathresponse_button {
|
Line 538 sub edit_mathresponse_button {
|
# my $helplink=&Apache::loncommon::help_open_topic('Formula_Editor'); |
# my $helplink=&Apache::loncommon::help_open_topic('Formula_Editor'); |
my $iconpath=$Apache::lonnet::perlvar{'lonIconsURL'}; |
my $iconpath=$Apache::lonnet::perlvar{'lonIconsURL'}; |
return(<<ENDFORMULABUTTON); |
return(<<ENDFORMULABUTTON); |
<script language="JavaScript"> |
<script type="text/javascript" language="JavaScript"> |
function edit_${id}_${field} (textarea) { |
function edit_${id}_${field} (textarea) { |
thenumber = textarea; |
thenumber = textarea; |
thedata = document.forms['lonhomework'].elements[textarea].value; |
thedata = document.forms['lonhomework'].elements[textarea].value; |
Line 948 sub getresponse {
|
Line 948 sub getresponse {
|
my $id = $Apache::inputtags::response[-1]; |
my $id = $Apache::inputtags::response[-1]; |
|
|
my $line; |
my $line; |
|
my $startline = $env{'form.scantron_questnum_start.'.$part.'.'.$id}; |
|
if (!$startline) { |
|
$startline = $Apache::lonxml::counter; |
|
} |
for ($line = 0; $line < $lines; $line++) { |
for ($line = 0; $line < $lines; $line++) { |
my $theline = $Apache::lonxml::counter+$offset-1+$line; |
my $theline = $startline+$offset-1+$line; |
$response = $env{"scantron.$theline.answer"}; |
$response = $env{"scantron.$theline.answer"}; |
if ((defined($response)) && ($response ne "") && ($response ne " ")) { |
if ((defined($response)) && ($response ne "") && ($response ne " ")) { |
last; |
last; |
} |
} |
|
|
} |
} |
|
|
# save bubbled letter for later |
# save bubbled letter for later |