[LON-CAPA-cvs] cvs: loncom(version_2_10_X) /homework structuretags.pm
raeburn
raeburn@source.lon-capa.org
Mon, 16 Aug 2010 17:51:02 -0000
raeburn Mon Aug 16 17:51:02 2010 EDT
Modified files: (Branch: version_2_10_X)
/loncom/homework structuretags.pm
Log:
- Backport 1.469.
Index: loncom/homework/structuretags.pm
diff -u loncom/homework/structuretags.pm:1.465.2.1 loncom/homework/structuretags.pm:1.465.2.2
--- loncom/homework/structuretags.pm:1.465.2.1 Tue May 18 21:03:15 2010
+++ loncom/homework/structuretags.pm Mon Aug 16 17:51:02 2010
@@ -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 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 @@
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.').'</td></tr>';
+ $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.').'</td></tr>';
+ $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) {