[LON-CAPA-cvs] cvs: loncom /interface lonprintout.pm
sakharuk
lon-capa-cvs@mail.lon-capa.org
Tue, 01 Jul 2003 20:15:06 -0000
sakharuk Tue Jul 1 16:15:06 2003 EDT
Modified files:
/loncom/interface lonprintout.pm
Log:
Bug 1667 is fixed. Internal counter (works only for bubblesheet LaTeX exams) is
implemented. All possible ways to print exam (as a single sequence, single problem, or assignments for the group of students) are supported now.
Index: loncom/interface/lonprintout.pm
diff -u loncom/interface/lonprintout.pm:1.200 loncom/interface/lonprintout.pm:1.201
--- loncom/interface/lonprintout.pm:1.200 Mon Jun 30 16:24:58 2003
+++ loncom/interface/lonprintout.pm Tue Jul 1 16:15:06 2003
@@ -1,7 +1,7 @@
# The LearningOnline Network
# Printout
#
-# $Id: lonprintout.pm,v 1.200 2003/06/30 20:24:58 sakharuk Exp $
+# $Id: lonprintout.pm,v 1.201 2003/07/01 20:15:06 sakharuk Exp $
#
# Copyright Michigan State University Board of Trustees
#
@@ -628,6 +628,8 @@
my $rndseed=time;
$form{'rndseed'}=$rndseed;
&Apache::lonnet::appenv(%moreenv);
+ &Apache::lonnet::delenv('form.counter');
+ &Apache::lonxml::init_counter();
my $texversion=&Apache::lonnet::ssi($currentURL,%form);
&Apache::lonnet::delenv('form.counter');
&Apache::lonnet::delenv('request.filename');
@@ -664,6 +666,8 @@
my $flag_page_in_sequence = 'NO';
my @master_seq=split /\|\|\|/, $helper->{'VARS'}->{'RESOURCES'};
my $prevassignment='';
+ &Apache::lonnet::delenv('form.counter');
+ &Apache::lonxml::init_counter();
for (my $i=0;$i<=$#master_seq;$i++) {
$master_seq[$i]=~/___\d+___(.*)$/;
my $urlp='/res/'.$1;
@@ -733,6 +737,8 @@
if ($parmhash{'anonymous_quiz'}=~/yes/) {$fullname=' ';} #put here something reasonable for anonymous exams or quiz
#goes through all resources, checks if they are available for current student, and produces output
+ &Apache::lonnet::delenv('form.counter');
+ &Apache::lonxml::init_counter();
foreach my $curresline (@master_seq) {
if ($curresline=~ m/\.(problem|exam|quiz|assess|survey|form|library)$/) {
my ($map,$id,$res_url) = split(/___/,$curresline);
@@ -887,7 +893,7 @@
my %parmhash=&Apache::lonnet::coursedescription($ENV{'request.course.id'});
-# my $key;
+ my $key;
# foreach $key (keys %parmhash) {
# $r->print(' '.$key.'->'.$parmhash{$key}.'<-<br />');
# }