--- loncom/homework/structuretags.pm 2001/08/17 16:50:04 1.57 +++ loncom/homework/structuretags.pm 2001/08/18 16:08:34 1.58 @@ -2,7 +2,7 @@ # definition of tags that give a structure to a document # 2/19 Guy # 6/26/2001 fixed extra web display at end of tags -# 8/17 Gerd Kortemeyer +# 8/17,8/18 Gerd Kortemeyer package Apache::structuretags; @@ -82,6 +82,7 @@ sub start_problem { &Apache::lonxml::debug("Using default type, problem, :$uri:"); } } + #adeed vars to the scripting enviroment my $expression='$external::part='.$Apache::inputtags::part.';'; &Apache::run::run($expression,$safeeval); @@ -92,9 +93,32 @@ sub start_problem { my ($result,$head_tag_start,$body_tag_start)= &page_start($target,$token,$tagstack,$parstack,$parser,$safeeval); - if ($target eq 'web') { - if ($ENV{'form.doescheckout'}) { - $body_tag_start.=&Apache::lonxml::maketoken('web'); + if ($Apache::lonhomework::type eq 'exam') { + if ($target eq 'web') { + my $token=$Apache::lonhomework::history{"resource.0.outtoken"}; + if (($ENV{'form.doescheckout'}) && (!$token)) { + $token=&Apache::lonxml::maketoken(); + } + $body_tag_start.=&Apache::lonxml::printtokenheader($target,$token); + } + if ($target eq 'meta') { + print "Cool, I was called"; + + return (< + + + + + + +ENDSTORES } } if ($target eq 'web' || $target eq 'grade') {