--- loncom/homework/structuretags.pm 2006/04/28 18:33:10 1.353 +++ loncom/homework/structuretags.pm 2006/05/30 12:45:37 1.356 @@ -1,7 +1,7 @@ # The LearningOnline Network with CAPA # definition of tags that give a structure to a document # -# $Id: structuretags.pm,v 1.353 2006/04/28 18:33:10 albertel Exp $ +# $Id: structuretags.pm,v 1.356 2006/05/30 12:45:37 www Exp $ # # Copyright Michigan State University Board of Trustees # @@ -38,6 +38,9 @@ use Apache::lonlocal; use Apache::lonxml; use Apache::lonenc(); use Time::HiRes qw( gettimeofday tv_interval ); +use lib '/home/httpd/lib/perl/'; +use LONCAPA; + 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')); } @@ -160,6 +163,14 @@ sub page_start { $form_tag_start.=&Apache::edit::form_change_detection(); } $form_tag_start.='>'; + + my $symb=&Apache::lonnet::symbread(); + if ($symb =~ /\S/) { + $symb= + &HTML::Entities::encode(&Apache::lonenc::check_encrypt($symb)); + $form_tag_start.= + ''; + } } return ($page_start,$form_tag_start); } @@ -606,7 +617,8 @@ sub start_problem { my $name= &get_resource_name($parstack,$safeeval); my ($result,$form_tag_start); - if ($target eq 'web' || $target eq 'webgrade' || $target eq 'tex') { + if ($target eq 'web' || $target eq 'webgrade' || $target eq 'tex' + || $target eq 'edit') { ($result,$form_tag_start) = &page_start($target,$token,$tagstack,$parstack,$parser,$safeeval, $name); @@ -1371,7 +1383,7 @@ sub start_part { } if (($Apache::lonhomework::type eq 'exam') && ($allow_print_points)) { $result .= '\fbox{\textit{'.$weight.' pt}}';} } elsif ($target eq 'web') { - $result.=''; + $result.=''; } } } @@ -1624,7 +1636,7 @@ sub start_simpleeditbutton { $url=~s/\?.*$//; my ($symb) = &Apache::lonxml::whichuser(); $result='
'. - ''.&mt('Edit').' - '.&mt('Note: it can take up to 10 minutes for changes to take effect for all users.'). + ''.&mt('Edit').' - '.&mt('Note: it can take up to 10 minutes for changes to take effect for all users.'). &Apache::loncommon::help_open_topic('Caching').'

'; } return $result;