--- loncom/homework/structuretags.pm 2010/03/26 00:49:36 1.468 +++ loncom/homework/structuretags.pm 2010/06/05 19:36:57 1.469 @@ -1,7 +1,7 @@ # The LearningOnline Network with CAPA # definition of tags that give a structure to a document # -# $Id: structuretags.pm,v 1.468 2010/03/26 00:49:36 raeburn Exp $ +# $Id: structuretags.pm,v 1.469 2010/06/05 19:36:57 www Exp $ # # Copyright Michigan State University Board of Trustees # @@ -66,7 +66,7 @@ use lib '/home/httpd/lib/perl/'; use LONCAPA; BEGIN { - &Apache::lonxml::register('Apache::structuretags',('block','languageblock','translated','instructorcomment','while','randomlist','problem','library','web','tex','part','preduedate','postanswerdate','solved','notsolved','problemtype','startouttext','endouttext','simpleeditbutton','definetag')); + &Apache::lonxml::register('Apache::structuretags',('block','languageblock','translated','instructorcomment','while','randomlist','problem','library','web','tex','part','preduedate','postanswerdate','solved','notsolved','problemtype','startpartmarker','startouttext','endpartmarker','endouttext','simpleeditbutton','definetag')); } sub start_web { @@ -1684,6 +1684,49 @@ sub ordered_show_check { return $in_order_show; } + +sub start_startpartmarker { + my ($target,$token,$tagstack,$parstack,$parser,$safeeval)=@_; + my $result=''; + if ($target eq 'edit') { + $result=&Apache::edit::tag_start($target,$token); + $result.=&mt('Marker for the start of a part. Place end marker below to wrap in-between tags into a new part.').''; + $result.=&Apache::edit::end_table(); + + } + return $result; +} + +sub end_startpartmarker { + my ($target,$token,$tagstack,$parstack,$parser,$safeeval)=@_; + my @result; + if ($target eq 'edit') { $result[1]='no'; } + return @result; +} + +sub start_endpartmarker { + my ($target,$token,$tagstack,$parstack,$parser,$safeeval)=@_; + my $result=''; + if ($target eq 'edit') { + $result=&Apache::edit::tag_start($target,$token); + $result.=&mt('Marker for the end of a part. Place start marker above to wrap in-between tags into a new part.').''; + $result.=&Apache::edit::end_table(); + + } + return $result; +} + +sub end_endpartmarker { + my ($target,$token,$tagstack,$parstack,$parser,$safeeval)=@_; + my @result; + if ($target eq 'edit') { $result[1]='no'; } + return @result; +} + + + + + sub start_part { my ($target,$token,$tagstack,$parstack,$parser,$safeeval,$style)=@_; if (!$Apache::lonxml::metamode) {