--- loncom/homework/grades.pm 2006/03/10 23:49:29 1.330
+++ loncom/homework/grades.pm 2006/03/11 00:08:48 1.332
@@ -1,7 +1,7 @@
# The LearningOnline Network with CAPA
# The LON-CAPA Grading handler
#
-# $Id: grades.pm,v 1.330 2006/03/10 23:49:29 albertel Exp $
+# $Id: grades.pm,v 1.332 2006/03/11 00:08:48 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;
}
@@ -5075,8 +5084,10 @@ ENDSCRIPT
"&scantron_CODElist=".&Apache::lonnet::escape($env{'form.scantron_CODElist'}).
"&curCODE=".&Apache::lonnet::escape($$scan_record{'scantron.CODE'}).
"&scantron_selectfile=".&Apache::lonnet::escape($env{'form.scantron_selectfile'});
- $r->print(" Selected CODE is ");
- $r->print("\n ");
+ if ($env{'form.scantron_CODElist'} =~ /\S/) {
+ $r->print(" Selected CODE is ");
+ $r->print("\n ");
+ }
$r->print(" as the CODE.");
$r->print("\n