--- loncom/homework/structuretags.pm 2001/08/06 18:33:58 1.52 +++ loncom/homework/structuretags.pm 2001/08/16 21:06:22 1.53 @@ -71,7 +71,14 @@ sub start_problem { $Apache::lonhomework::type=&Apache::lonnet::EXT('resource.0.type'); &Apache::lonxml::debug("Found this to be of type :$Apache::lonhomework::type:"); if ($Apache::lonhomework::type eq '') { - $Apache::lonhomework::type='homework'; + my $uri=$ENV{'request.uri'}; + if ($uri=~/\.(\w+)$/) { + $Apache::lonhomework::type=$1; + &Apache::lonxml::debug("Using type of $1"); + } else { + $Apache::lonhomework::type='problem'; + &Apache::lonxml::debug("Using default type, problem, :$uri:"); + } } #adeed vars to the scripting enviroment my $expression='$external::part='.$Apache::inputtags::part.';';