--- loncom/homework/structuretags.pm 2006/04/20 19:08:41 1.332.2.3 +++ loncom/homework/structuretags.pm 2006/03/02 21:20:30 1.337 @@ -1,7 +1,7 @@ # The LearningOnline Network with CAPA # definition of tags that give a structure to a document # -# $Id: structuretags.pm,v 1.332.2.3 2006/04/20 19:08:41 albertel Exp $ +# $Id: structuretags.pm,v 1.337 2006/03/02 21:20:30 albertel Exp $ # # Copyright Michigan State University Board of Trustees # @@ -44,7 +44,7 @@ BEGIN { sub start_web { my ($target,$token,$tagstack,$parstack,$parser,$safeeval,$style)=@_; my $bodytext=&Apache::lonxml::get_all_text("/web",$parser,$style); - if ($target eq 'web' || $target eq 'webgrade') { + if ($target eq 'web') { return $bodytext; } return ''; @@ -156,9 +156,8 @@ sub page_start { } my $form_tag_start; if (!defined($found{'form'})) { - $form_tag_start='
'Checking out resources is subject to course policies, and may exclude future credit even if done erroneously.', 'checkout'=>'Check out Exam for Viewing', 'checkout?'=>'Check out Exam?'); - my $uri = &Apache::lonenc::check_encrypt($env{'request.uri'}); return (<$lt{'resource'}

$lt{'id_expln'}

$lt{'warning'}

- + @@ -448,10 +461,9 @@ sub firstaccess_msg { my ($map)=&Apache::lonnet::decode_symb($symb); my $foldertitle=&Apache::lonnet::gettitle($map); &Apache::lonxml::debug("map is $map title is $foldertitle"); - my $uri = &Apache::lonenc::check_encrypt($env{'request.uri'}); return (<The resources in "$foldertitle" are open for a limited time. Once you click the 'Show Resource' button below you have $time to complete all resources "$foldertitle". -
+
@@ -610,14 +622,18 @@ sub start_problem { #handle rand seed in construction space my $rndseed=&setup_rndseed($safeeval); my ($symb)=&Apache::lonxml::whichuser(); - if ($env{'request.state'} ne "construct" && $symb eq '') { + if ($env{'request.state'} ne "construct" && + ($symb eq '' || $Apache::lonhomework::type eq 'practice')) { $form_tag_start.=''. ''. + value="'.&mt('New Problem Variation').'" />'; + if (exists($env{'form.username'})) { + $form_tag_start.= ''; - if ($env{'user.adv'}) { + } + if ($env{'request.role.adv'}) { $form_tag_start.= '