--- loncom/homework/grades.pm 2003/03/28 23:44:31 1.81
+++ loncom/homework/grades.pm 2003/04/01 05:21:48 1.82
@@ -1,7 +1,7 @@
# The LearningOnline Network with CAPA
# The LON-CAPA Grading handler
#
-# $Id: grades.pm,v 1.81 2003/03/28 23:44:31 albertel Exp $
+# $Id: grades.pm,v 1.82 2003/04/01 05:21:48 albertel Exp $
#
# Copyright Michigan State University Board of Trustees
#
@@ -2819,6 +2819,19 @@ sub scantron_uploads {
return $result;
}
+sub scantron_scantab {
+ my $fh=Apache::File->new($Apache::lonnet::perlvar{'lonTabDir'}.'/scantronformat.tab');
+ my $result=''."\n";
+
+ return $result;
+}
+
sub scantron_selectphase {
my ($r) = @_;
my ($symb,$url)=&get_symb_and_url($r);
@@ -2827,10 +2840,11 @@ sub scantron_selectphase {
my $default_form_data=&defaultFormData($symb,$url);
my $grading_menu_button=&show_grading_menu_form($symb,$url);
my $file_selector=&scantron_uploads();
+ my $format_selector=&scantron_scantab();
my $result;
$result.= <
-
+
-$grading_menu_button
SCANTRONFORM
- #FIXME Needs to present some lines from the file and allow the instructor to specify which columns represent what data, possibly have some nice defaults setup, probably should do a pass through all problems for a student to get an idea of how many questions there are, and homw many lines we'll have,
- return $result;
-}
+ $r->print($result);
-sub scantron_process_students {
+ my @delayqueue;
+
+ foreach my $line (<$scanlines>) {
+ my $scan_record=&scantron_parse_scanline($line,\%scantron_config);
+ my ($uname,$udom);
+ if ($uname=&scantron_find_student($scan_record,\%idmap)) {
+ &scantron_add_delay(\@delayqueue,$line,
+ 'Unable to find a student that matches');
+ }
+ ($uname,$udom)=split(/:/,$uname);
+ #FIXME
+ #get iterator for $sequence
+ #foreach question 'submit' the students answer to the server
+ # through grade target {
+ # generate data to pass back that includes grade recevied
+ #}
+ }
+ foreach my $delay (@delayqueue) {
+ #FIXME
+ #print out each delayed student with interface to select how
+ # to repair student provided info
+ #Expected errors include
+ # 1 bad/no stuid/username
+ # 2 invalid bubblings
+
+ }
#FIXME
- # loop through students, {
- # Check if studnet info valid, if not add line to delay queue
- # foreach question 'submit' the students answer to the server
- # through grade target {
- # generate data to pass back that includes grade recevied
- # }
- # }
- # loop through delay queue {
- # print out each delayed student with interface to select how
- # to repair student provided info
- # Expected errors include
- # 1 bad/no stuid/username
- # 2 invalid bubblings
- # }
# if delay queue exists 2 submits one to process delayed students one
# to ignore delayed students, possibly saving the delay queue for later
@@ -3275,8 +3364,8 @@ sub handler {
}
} elsif ($command eq 'scantron_selectphase') {
$request->print(&scantron_selectphase($request));
- } elsif ($command eq 'scantron_configphase') {
- $request->print(&scantron_configphase($request));
+ } elsif ($command eq 'scantron_process') {
+ $request->print(&scantron_process_students($request));
} else {
$request->print("Unknown action: $command:");
}