version 1.518, 2008/04/21 16:30:47
|
version 1.520, 2008/05/14 16:36:31
|
Line 4908 sub scantron_scantab {
|
Line 4908 sub scantron_scantab {
|
domainconfig user, lines are from this file. |
domainconfig user, lines are from this file. |
|
|
Otherwise, fall back to getting lines from the legacy file on the |
Otherwise, fall back to getting lines from the legacy file on the |
local server: /home/httpd/lonTabs/scantronformat.tab |
local server: /home/httpd/lonTabs/default_scantronformat.tab |
|
|
=cut |
=cut |
|
|
Line 4936 sub get_scantronformat_file {
|
Line 4936 sub get_scantronformat_file {
|
} |
} |
} |
} |
if (!$gottab) { |
if (!$gottab) { |
my $fh=Apache::File->new($Apache::lonnet::perlvar{'lonTabDir'}.'/scantronformat.tab'); |
my @domains = &Apache::lonnet::current_machine_domains(); |
@lines = <$fh>; |
if (grep(/^\Q$cdom\E$/,@domains)) { |
close($fh); |
my $fh=Apache::File->new($Apache::lonnet::perlvar{'lonTabDir'}.'/scantronformat.tab'); |
|
@lines = <$fh>; |
|
close($fh); |
|
} else { |
|
my $fh=Apache::File->new($Apache::lonnet::perlvar{'lonTabDir'}.'/default_scantronformat.tab'); |
|
@lines = <$fh>; |
|
close($fh); |
|
} |
} |
} |
return @lines; |
return @lines; |
} |
} |
Line 7512 SCANTRONFORM
|
Line 7519 SCANTRONFORM
|
my @delayqueue; |
my @delayqueue; |
my %completedstudents; |
my %completedstudents; |
|
|
|
my $lock=&Apache::lonnet::set_lock(&mt('Grading bubblesheet exam')); |
my $count=&get_todo_count($scanlines,$scan_data); |
my $count=&get_todo_count($scanlines,$scan_data); |
my %prog_state=&Apache::lonhtmlcommon::Create_PrgWin($r,'Scantron Status', |
my %prog_state=&Apache::lonhtmlcommon::Create_PrgWin($r,'Scantron Status', |
'Scantron Progress',$count, |
'Scantron Progress',$count, |
Line 7532 SCANTRONFORM
|
Line 7540 SCANTRONFORM
|
$r->print("</form>"); |
$r->print("</form>"); |
&ssi_print_error($r); |
&ssi_print_error($r); |
$r->print(&show_grading_menu_form($symb)); |
$r->print(&show_grading_menu_form($symb)); |
|
&Apache::lonnet::remove_lock($lock); |
return ''; # Dunno why the other returns return '' rather than just returning. |
return ''; # Dunno why the other returns return '' rather than just returning. |
} |
} |
|
|
Line 7589 SCANTRONFORM
|
Line 7598 SCANTRONFORM
|
$r->print("</form>"); |
$r->print("</form>"); |
&ssi_print_error($r); |
&ssi_print_error($r); |
$r->print(&show_grading_menu_form($symb)); |
$r->print(&show_grading_menu_form($symb)); |
|
&Apache::lonnet::remove_lock($lock); |
return ''; # Why return ''? Beats me. |
return ''; # Why return ''? Beats me. |
} |
} |
|
|
Line 7601 SCANTRONFORM
|
Line 7611 SCANTRONFORM
|
&Apache::lonnet::delenv('scantron\.'); |
&Apache::lonnet::delenv('scantron\.'); |
} |
} |
&Apache::lonhtmlcommon::Close_PrgWin($r,\%prog_state); |
&Apache::lonhtmlcommon::Close_PrgWin($r,\%prog_state); |
|
&Apache::lonnet::remove_lock($lock); |
# my $lasttime = &Time::HiRes::time()-$start; |
# my $lasttime = &Time::HiRes::time()-$start; |
# $r->print("<p>took $lasttime</p>"); |
# $r->print("<p>took $lasttime</p>"); |
|
|