--- loncom/homework/structuretags.pm 2010/05/18 21:03:15 1.465.2.1 +++ loncom/homework/structuretags.pm 2010/08/16 17:51:02 1.465.2.2 @@ -1,7 +1,7 @@ # The LearningOnline Network with CAPA # definition of tags that give a structure to a document # -# $Id: structuretags.pm,v 1.465.2.1 2010/05/18 21:03:15 raeburn Exp $ +# $Id: structuretags.pm,v 1.465.2.2 2010/08/16 17:51:02 raeburn 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 { @@ -1699,6 +1699,44 @@ 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) {