--- loncom/homework/grades.pm 2003/09/27 01:59:10 1.130.2.1.2.4
+++ loncom/homework/grades.pm 2003/08/07 17:32:21 1.132
@@ -1,7 +1,7 @@
# The LearningOnline Network with CAPA
# The LON-CAPA Grading handler
#
-# $Id: grades.pm,v 1.130.2.1.2.4 2003/09/27 01:59:10 albertel Exp $
+# $Id: grades.pm,v 1.132 2003/08/07 17:32:21 bowersj2 Exp $
#
# Copyright Michigan State University Board of Trustees
#
@@ -2510,6 +2510,7 @@ to this page if the data selected is ins
$javascript
ENDPICK
+ $request->print(&show_grading_menu_form($symb,$url));
return '';
}
@@ -2798,9 +2799,7 @@ LISTJAVASCRIPT
sub getSymbMap {
my ($request) = @_;
- my $navmap = Apache::lonnavmaps::navmap-> new($ENV{'request.course.fn'}.'.db',
- $ENV{'request.course.fn'}.'_parms.db');
-# $navmap->init();
+ my $navmap = Apache::lonnavmaps::navmap->new();
my %symbx = ();
my @titles = ();
@@ -2845,8 +2844,7 @@ sub displayPage {
&sub_page_js($request);
$request->print($result);
- my $navmap = Apache::lonnavmaps::navmap-> new($ENV{'request.course.fn'}.'.db',
- $ENV{'request.course.fn'}.'_parms.db',1, 1);
+ my $navmap = Apache::lonnavmaps::navmap->new();
my ($mapUrl, $id, $resUrl) = split(/___/, $ENV{'form.page'});
my $map = $navmap->getResourceByUrl($resUrl); # add to navmaps
@@ -3008,8 +3006,7 @@ sub updateGradeByPage {
$request->print($result);
- my $navmap = Apache::lonnavmaps::navmap-> new($ENV{'request.course.fn'}.'.db',
- $ENV{'request.course.fn'}.'_parms.db',1, 1);
+ my $navmap = Apache::lonnavmaps::navmap->new();
my ($mapUrl, $id, $resUrl) = split(/___/, $ENV{'form.page'});
my $map = $navmap->getResourceByUrl($resUrl); # add to navmaps
@@ -3146,8 +3143,6 @@ sub getSequenceDropDown {
}
sub scantron_uploads {
- #FIXME need to support scantron files put in another location,
- # maybe the course directory? a scantron dir in the course directory?
if (!-e $Apache::lonnet::perlvar{'lonScansDir'}) { return ''};
my $result= '
\n");
- } elsif ($error eq 'duplicateID') {
- $r->print("The encoded ID has also been used by a previous paper $arg\n");
- }
- $r->print("
Original ID is ".$$scan_record{'scantron.ID'}.
- " \n");
- $r->print("Name on paper is ".$$scan_record{'scantron.LastName'}.",".
- $$scan_record{'scantron.FirstName'}."
");
- $r->print("
Please correct \n");
- $r->print("\n
Pick a specific user -- username:");
- $r->print("\ndomain:".
- &Apache::loncommon::select_dom_form(undef,'scantron_domain'));
- #FIXME it would be nice if this sent back the user ID and
- #could do partial userID matches
- $r->print(&Apache::loncommon::selectstudent_link('scantronupload',
- 'scantron_username','scantron_domain'));
- } elsif ($error eq 'doublebubble') {
- $r->print("There have been muttiple bubbles scanned for a single question\n");
- foreach my $question (@{$arg}) {
- my $selected=$$scan_record{"scantron.$question.answer"};
- $r->print("
For question $question, selected bubbles were".
- join(" ",split('',$selected)).
- " Please pick which one should be used for grading");
- #FIXMENEXT need to have radio buttons to chose which one to use
-
- }
- }
- $r->print("
Skip this scanline saving it for later ");
- $r->print("\n
");
- &scantron_end_validate_form($r);
-}
-
-sub scantron_validate_CODE {
- my ($r,$currentphase) = @_;
- #FIXME doesn't do anything yet
- return (0,$currentphase+1);
-}
-
-sub scantron_validate_doublebubble {
- my ($r,$currentphase) = @_;
- #get student info
- my $classlist=&Apache::loncoursedata::get_classlist();
- my %idmap=&username_to_idmap($classlist);
-
- #get scantron line setup
- my %scantron_config=&get_scantron_config($ENV{'form.scantron_format'});
- my $scanlines=&scantron_getfile();
- for (my $i=0;$i<=$scanlines->{'count'};$i++) {
- my $line=&scantron_get_line($scanlines,$i);
- if (!$line) { next; }
- my $scan_record=&scantron_parse_scanline($line,\%scantron_config);
- if (!defined($$scan_record{'scantron.doubleerror'})) { next; }
- &scantron_get_correction($r,$i,$scan_record,$line,'double',
- $$scan_record{'scantron.doubleerror'});
- return (1,$currentphase);
- }
- return (0,$currentphase+1);
-}
-
-sub scantron_end_validate_form {
- my ($r) = @_;
- $r->print('