--- loncom/homework/structuretags.pm 2003/06/30 20:21:43 1.191 +++ loncom/homework/structuretags.pm 2003/07/10 06:17:41 1.194 @@ -1,7 +1,7 @@ # The LearningOnline Network with CAPA # definition of tags that give a structure to a document # -# $Id: structuretags.pm,v 1.191 2003/06/30 20:21:43 sakharuk Exp $ +# $Id: structuretags.pm,v 1.194 2003/07/10 06:17:41 www Exp $ # # Copyright Michigan State University Board of Trustees # @@ -38,7 +38,8 @@ use Apache::File(); use Apache::lonmenu; BEGIN { - &Apache::lonxml::register('Apache::structuretags',('block','languageblock','instructorcomment','while','randomlist','problem','library','web','tex','part','preduedate','postanswerdate','solved','notsolved','startouttext','endouttext')); + &Apache::lonxml::register('Apache::structuretags',('block','languageblock','instructorcomment','while','randomlist','problem','library','web','tex','part','preduedate','postanswerdate','solved','notsolved','startouttext','endouttext', +'simpleeditbutton')); } sub start_web { @@ -405,9 +406,9 @@ sub start_problem { "$name\n$body_tag_start\n"; } } elsif ($target eq 'tex') { - my $startminipage = ' SSS '.$ENV{'form.problem_split'}.' FFF '; + my $startminipage = ''; if (not $ENV{'form.problem_split'}=~/yes/) { - $startminipage .= '\begin{minipage}{\textwidth}'; + $startminipage = '\begin{minipage}{\textwidth}'; } my $name= &Apache::lonxml::get_param('name',$parstack,$safeeval); if ($name eq '') { @@ -1082,5 +1083,22 @@ sub delete_startouttext { return 1; } +sub start_simpleeditbutton { + my ($target,$token,$tagstack,$parstack,$parser,$safeeval)=@_; + my $result=''; + if (($target eq 'web') && + (&Apache::lonnet::allowed('srm',$ENV{'request.course.id'}))) { + my $url=$ENV{'REQUEST_URI'}; + $url=~s/\?.*$//; + $result='
'. + 'Simple Problem Editor - Note: it can take up to 10 minutes for changes to take effect for all users.

'; + } + return $result; +} + +sub end_simpleeditbutton { + return ''; +} + 1; __END__