--- loncom/homework/structuretags.pm 2006/05/30 12:45:37 1.356 +++ loncom/homework/structuretags.pm 2006/06/20 03:33:55 1.357 @@ -1,7 +1,7 @@ # The LearningOnline Network with CAPA # definition of tags that give a structure to a document # -# $Id: structuretags.pm,v 1.356 2006/05/30 12:45:37 www Exp $ +# $Id: structuretags.pm,v 1.357 2006/06/20 03:33:55 albertel Exp $ # # Copyright Michigan State University Board of Trustees # @@ -342,9 +342,11 @@ Feedback Mode: } sub initialize_storage { + my ($given_symb) = @_; undef(%Apache::lonhomework::results); undef(%Apache::lonhomework::history); - my ($symb,$courseid,$domain,$name) = &Apache::lonxml::whichuser(); + my ($symb,$courseid,$domain,$name) = + &Apache::lonxml::whichuser($given_symb); # anonymous users (CODEd exams) have no data if ($name eq 'anonymous' @@ -384,11 +386,13 @@ sub initialize_storage { # Will increment totals for attempts, students, and corrects # if running user has student role. sub finalize_storage { + my ($given_symb) = @_; my $result; if (%Apache::lonhomework::results) { my @remove = grep(/^INTERNAL_/,keys(%Apache::lonhomework::results)); delete(@Apache::lonhomework::results{@remove}); - my ($symb,$courseid,$domain,$name) = &Apache::lonxml::whichuser(); + my ($symb,$courseid,$domain,$name) = + &Apache::lonxml::whichuser($given_symb); if ($env{'request.state'} eq 'construct' || $symb eq '' || $Apache::lonhomework::type eq 'practice') {