');
}
-
- # FIXME: This loop probably has to be considerably more clever for
- # multiline bubbles: User can multibubble by having bubbles in
- # several lines. User can skip lines legitimately etc. etc.
-
+ my @selected = split(//,$lines[$l]);
for (my $i=0;$i<$max;$i++) {
$r->print("\n".'');
if ($selected[0] eq $alphabet[$i]) {
@@ -6706,14 +6785,11 @@ sub scantron_validate_doublebubble {
=cut
sub scantron_get_maxbubble {
- &Apache::lonnet::logthis("get_max_bubble");
if (defined($env{'form.scantron_maxbubble'}) &&
$env{'form.scantron_maxbubble'}) {
- &Apache::lonnet::logthis("cached");
&restore_bubble_lines();
return $env{'form.scantron_maxbubble'};
}
- &Apache::lonnet::logthis("computing");
my (undef, undef, $sequence) =
&Apache::lonnet::decode_symb($env{'form.selectpage'});
@@ -6751,9 +6827,9 @@ sub scantron_get_maxbubble {
foreach my $part_id (@{$analysis{'parts'}}) {
- my ($trash, $part) = split(/\./, $part_id);
- my $lines = $analysis{"$part_id.bubble_lines"}[0];
+
+ my $lines = $analysis{"$part_id.bubble_lines"};;
# TODO - make this a persistent hash not an array.
@@ -6803,6 +6879,9 @@ sub scantron_validate_missingbubbles {
$scan_data);
if (!defined($$scan_record{'scantron.missingerror'})) { next; }
my @to_correct;
+
+ # Probably here's where the error is...
+
foreach my $missing (@{$$scan_record{'scantron.missingerror'}}) {
if ($missing > $max_bubble) { next; }
push(@to_correct,$missing);
@@ -7159,10 +7238,6 @@ sub grading_menu {
my $probTitle = &Apache::lonnet::gettitle($symb);
my ($table,undef,$hdgrade) = &showResourceInfo($symb,$probTitle);
- #
- # Define menu data
- $env{'form.probTitle'} = &Apache::lonnet::gettitle($symb);
- my ($table) = &showResourceInfo($symb,$env{'form.probTitle'});
$request->print($table);
my %fields = ('symb'=>&Apache::lonenc::check_encrypt($symb),
'handgrade'=>$hdgrade,
@@ -7192,29 +7267,15 @@ sub grading_menu {
$fields{'command'} = 'scantron_selectphase';
$url = &Apache::lonhtmlcommon::build_url('grades/',\%fields);
push (@menu, { url => $url,
- name => &mt('Grade Scantron Forms'),
+ name => &mt('Grade/Manage Scantron Forms'),
short_description =>
&mt('')});
$fields{'command'} = 'verify';
$url = &Apache::lonhtmlcommon::build_url('grades/',\%fields);
push (@menu, { url => "",
- jscript => ' onClick="javascript:checkChoice2(document.forms.gradingMenu,\'5\',\'verify\')" ',
name => &mt('Verify Receipt'),
short_description =>
&mt('')});
- $fields{'command'} = 'manage';
- $url = &Apache::lonhtmlcommon::build_url('/adm/helper/resettimes.helper',\%fields);
- push (@menu, { url => $url,
- name => &mt('Manage Access Times'),
- short_description =>
- &mt('')});
- $fields{'command'} = 'view';
- $url = &Apache::lonhtmlcommon::build_url('/adm/pickcode',\%fields);
- push (@menu, { url => $url,
- name => &mt('View Saved CODEs'),
- short_description =>
- &mt('')});
-
#
# Create the menu
my $Str;
@@ -7236,10 +7297,10 @@ sub grading_menu {
$menudata->{'url'}.'" >'.
$menudata->{'name'}."\n";
} else {
- $Str .=' \n";
+ ' onClick="javascript:checkChoice(document.forms.gradingMenu,\'5\',\'verify\')" '.
+ ' />';
$Str .= (' 'x8).
' receipt: '.&Apache::lonnet::recprefix($env{'request.course.id'}).
'-';
@@ -7260,30 +7321,14 @@ sub grading_menu {
cmdsave = 'submission';
}
formname.command.value = cmd;
- formname.saveState.value = "saveCmd="+cmdsave+":saveSec="+pullDownSelection(formname.section)+
- ":saveSub="+pullDownSelection(formname.submitonly)+":saveStatus="+pullDownSelection(formname.Status);
- if (val < 5) formname.submit();
- if (val == 5) {
- if (!checkReceiptNo(formname,'notOK')) { return false;}
- formname.submit();
- }
- if (val < 7) formname.submit();
- }
- function checkChoice2(formname,val,cmdx) {
- if (val <= 2) {
- var cmd = radioSelection(formname.radioChoice);
- var cmdsave = cmd;
- } else {
- cmd = cmdx;
- cmdsave = 'submission';
- }
- formname.command.value = cmd;
if (val < 5) formname.submit();
if (val == 5) {
- if (!checkReceiptNo(formname,'notOK')) { return false;}
- formname.submit();
+ if (!checkReceiptNo(formname,'notOK')) {
+ return false;
+ } else {
+ formname.submit();
+ }
}
- if (val < 7) formname.submit();
}
function checkReceiptNo(formname,nospace) {
@@ -7302,43 +7347,6 @@ sub grading_menu {
GRADINGMENUJS
&commonJSfunctions($request);
- my $result=' Manual Grading/View Submission';
- $result.=$table;
- my (undef,$sections) = &getclasslist('all','0');
- my $savedState = &savedState();
- my $saveCmd = ($$savedState{'saveCmd'} eq '' ? 'submission' : $$savedState{'saveCmd'});
- my $saveSec = ($$savedState{'saveSec'} eq '' ? 'all' : $$savedState{'saveSec'});
- my $saveSub = ($$savedState{'saveSub'} eq '' ? 'all' : $$savedState{'saveSub'});
- my $saveStatus = ($$savedState{'saveStatus'} eq '' ? 'Active' : $$savedState{'saveStatus'});
-
- $result.=' |