--- loncom/homework/structuretags.pm 2006/04/20 19:08:41 1.332.2.3 +++ loncom/homework/structuretags.pm 2006/03/30 20:16:14 1.340 @@ -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.340 2006/03/30 20:16:14 albertel Exp $ # # Copyright Michigan State University Board of Trustees # @@ -36,6 +36,7 @@ use Apache::File(); use Apache::lonmenu; use Apache::lonlocal; use Apache::lonxml; +use Apache::lonenc(); use Time::HiRes qw( gettimeofday tv_interval ); BEGIN { &Apache::lonxml::register('Apache::structuretags',('block','languageblock','instructorcomment','while','randomlist','problem','library','web','tex','part','preduedate','postanswerdate','solved','notsolved','problemtype','startouttext','endouttext','simpleeditbutton','definetag')); @@ -156,9 +157,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 +462,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 +623,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.= '