--- loncom/homework/grades.pm 2008/04/21 16:30:47 1.518 +++ loncom/homework/grades.pm 2008/05/01 16:03:34 1.519 @@ -1,7 +1,7 @@ # The LearningOnline Network with CAPA # The LON-CAPA Grading handler # -# $Id: grades.pm,v 1.518 2008/04/21 16:30:47 raeburn Exp $ +# $Id: grades.pm,v 1.519 2008/05/01 16:03:34 raeburn Exp $ # # Copyright Michigan State University Board of Trustees # @@ -4908,7 +4908,7 @@ sub scantron_scantab { domainconfig user, lines are from this file. 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 @@ -4936,9 +4936,16 @@ sub get_scantronformat_file { } } if (!$gottab) { - my $fh=Apache::File->new($Apache::lonnet::perlvar{'lonTabDir'}.'/scantronformat.tab'); - @lines = <$fh>; - close($fh); + my @domains = &Apache::lonnet::current_machine_domains(); + if (grep(/^\Q$cdom\E$/,@domains)) { + 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; }