--- loncom/homework/grades.pm 2006/03/08 21:56:49 1.329
+++ loncom/homework/grades.pm 2006/03/13 21:10:34 1.334
@@ -1,7 +1,7 @@
# The LearningOnline Network with CAPA
# The LON-CAPA Grading handler
#
-# $Id: grades.pm,v 1.329 2006/03/08 21:56:49 albertel Exp $
+# $Id: grades.pm,v 1.334 2006/03/13 21:10:34 albertel Exp $
#
# Copyright Michigan State University Board of Trustees
#
@@ -4204,7 +4204,8 @@ sub scantron_selectphase {
Options:
-
+
+
@@ -4533,8 +4534,15 @@ sub scantron_find_student {
sub scantron_filter {
my ($curres)=@_;
- # randomout is dysfunctional at best for this purpose
- if (ref($curres) && $curres->is_problem()) { #&& !$curres->randomout) {
+
+ if (ref($curres) && $curres->is_problem()) {
+ # if the user has asked to not have either hidden
+ # or 'randomout' controlled resources to be graded
+ # don't include them
+ if ($env{'form.scantron_options_hidden'} eq 'ignore_hidden'
+ && $curres->randomout) {
+ return 0;
+ }
return 1;
}
return 0;
@@ -4717,6 +4725,7 @@ sub scantron_form_start {
+
SCANTRONFORM
return $result;
}
@@ -4751,11 +4760,12 @@ sub scantron_validate_file {
$r->print("
Gathering neccessary info.
");$r->rflush();
#get the student pick code ready
$r->print(&Apache::loncommon::studentbrowser_javascript());
- my $max_bubble=&scantron_get_maxbubble($r);
+ my $max_bubble=&scantron_get_maxbubble();
my $result=&scantron_form_start($max_bubble).$default_form_data;
$r->print($result);
- my @validate_phases=( 'ID',
+ my @validate_phases=( 'sequence',
+ 'ID',
'CODE',
'doublebubble',
'missingbubbles');
@@ -4788,10 +4798,17 @@ STUFF
$r->print("");
}
if ($stop) {
- $r->print('');
- $r->print(' using corrected info ');
- $r->print("");
- $r->print(" this scanline saving it for later.");
+ if ($validate_phases[$currentphase] eq 'sequence') {
+ $r->print('');
+ $r->print(' this error ');
+
+ $r->print("
Or click the 'Grading Menu' button to start over.
");
+ } else {
+ $r->print('');
+ $r->print(' using corrected info ');
+ $r->print("");
+ $r->print(" this scanline saving it for later.");
+ }
}
$r->print(" ".&show_grading_menu_form($symb).
"