[LON-CAPA-cvs] cvs: loncom /homework hint.pm randomlabel.pm response.pm structuretags.pm /xml lonplot.pm

albertel lon-capa-cvs-allow@mail.lon-capa.org
Wed, 23 May 2007 22:36:29 -0000


This is a MIME encoded message

--albertel1179959789
Content-Type: text/plain

albertel		Wed May 23 18:36:29 2007 EDT

  Modified files:              
    /loncom/homework	hint.pm randomlabel.pm response.pm 
                    	structuretags.pm 
    /loncom/xml	lonplot.pm 
  Log:
  - lonxml takes care of all insertions now, and thus the tags that were attempting to handle it themselves could cause double insertions so elimnate external insertion calls
  
  
--albertel1179959789
Content-Type: text/plain
Content-Disposition: attachment; filename="albertel-20070523183629.txt"

Index: loncom/homework/hint.pm
diff -u loncom/homework/hint.pm:1.67 loncom/homework/hint.pm:1.68
--- loncom/homework/hint.pm:1.67	Tue Dec 19 09:53:17 2006
+++ loncom/homework/hint.pm	Wed May 23 18:36:21 2007
@@ -1,7 +1,7 @@
 # The LearningOnline Network with CAPA 
 # implements the tags that control the hints
 #
-# $Id: hint.pm,v 1.67 2006/12/19 14:53:17 www Exp $
+# $Id: hint.pm,v 1.68 2007/05/23 22:36:21 albertel Exp $
 #
 # Copyright Michigan State University Board of Trustees
 #
@@ -74,7 +74,6 @@
 	my $constructtag=&Apache::edit::get_new_args($token,$parstack,$safeeval,'showoncorrect');
        if ($constructtag) {
            $result =&Apache::edit::rebuild_tag($token);
-           $result.=&Apache::edit::handle_insert();
        }
     }
     @Apache::hint::which=();
@@ -141,7 +140,6 @@
 	}
 	if ($constructtag) {
 	    $result  = &Apache::edit::rebuild_tag($token);
-	    $result .= &Apache::edit::handle_insert();
 	}
     } elsif ($target eq 'web') {
 	&Apache::response::reset_params();
@@ -256,7 +254,6 @@
                                                   $safeeval,'name','cas',
                                                   'args');
         $result  = &Apache::edit::rebuild_tag($token);
-        $result .= &Apache::edit::handle_insert();
     } elsif ($target eq 'web') {
         &Apache::response::reset_params();
     }
@@ -314,7 +311,6 @@
         $constructtag=&Apache::edit::get_new_args($token,$parstack,
                                                   $safeeval,'name');
         $result  = &Apache::edit::rebuild_tag($token);
-        $result .= &Apache::edit::handle_insert();
     } elsif ($target eq 'web') {
         &Apache::response::reset_params();
     }
@@ -381,7 +377,6 @@
 						  $safeeval,'name','answer',
 						  'type');
 	$result  = &Apache::edit::rebuild_tag($token);
-	$result .= &Apache::edit::handle_insert();
     } elsif ($target eq 'web') {
 	&Apache::response::reset_params();
     }
@@ -492,7 +487,6 @@
 						     $safeeval,'on');
 	if ($constructtag) {
 	    $result = &Apache::edit::rebuild_tag($token);
-	    $result.=&Apache::edit::handle_insert();
 	}
     }
     return $result;
@@ -522,7 +516,6 @@
 						     'answer','concept');
 	if ($constructtag) {
 	    $result  = &Apache::edit::rebuild_tag($token);
-	    $result .= &Apache::edit::handle_insert();
 	}
     } elsif ($target eq 'meta') {
 	$result=&Apache::response::meta_package_write('numericalhint');
@@ -601,7 +594,6 @@
 						     'answer');
 	if ($constructtag) {
 	    $result  = &Apache::edit::rebuild_tag($token);
-	    $result .= &Apache::edit::handle_insert();
 	}
     } elsif ($target eq 'meta') {
 	$result=&Apache::response::meta_package_write('numericalhint');
Index: loncom/homework/randomlabel.pm
diff -u loncom/homework/randomlabel.pm:1.87 loncom/homework/randomlabel.pm:1.88
--- loncom/homework/randomlabel.pm:1.87	Thu May 10 06:46:51 2007
+++ loncom/homework/randomlabel.pm	Wed May 23 18:36:21 2007
@@ -1,7 +1,7 @@
 # The LearningOnline Network with CAPA
 # random labelling tool
 #
-# $Id: randomlabel.pm,v 1.87 2007/05/10 10:46:51 foxr Exp $
+# $Id: randomlabel.pm,v 1.88 2007/05/23 22:36:21 albertel Exp $
 #
 # Copyright Michigan State University Board of Trustees
 #
@@ -164,7 +164,6 @@
 						     'height','texwidth');
 	if ($constructtag) {
 	    $result = &Apache::edit::rebuild_tag($token);
-	    $result.=&Apache::edit::handle_insert();
 	}
     }
     return $result;
@@ -354,7 +353,6 @@
 						     'TeXsize');
 	if ($constructtag) {
 	    $result = &Apache::edit::rebuild_tag($token);
-	    $result.=&Apache::edit::handle_insert();
 	}
     }
     return $result;
@@ -540,7 +538,6 @@
 						    $safeeval,'x','y','value');
 	if ($constructtag) {
 	    $result = &Apache::edit::rebuild_tag($token);
-	    $result.=&Apache::edit::handle_insert();
 	}
     }
     $Apache::lonxml::debug = 0;
Index: loncom/homework/response.pm
diff -u loncom/homework/response.pm:1.166 loncom/homework/response.pm:1.167
--- loncom/homework/response.pm:1.166	Mon May 21 21:03:35 2007
+++ loncom/homework/response.pm	Wed May 23 18:36:21 2007
@@ -1,7 +1,7 @@
 # The LearningOnline Network with CAPA
 # various response type definitons response definition
 #
-# $Id: response.pm,v 1.166 2007/05/22 01:03:35 albertel Exp $
+# $Id: response.pm,v 1.167 2007/05/23 22:36:21 albertel Exp $
 #
 # Copyright Michigan State University Board of Trustees
 #
@@ -391,7 +391,6 @@
 						  $safeeval,'answerdisplay');
 	if ($constructtag) {
 	    $result = &Apache::edit::rebuild_tag($token);
-	    $result.=&Apache::edit::handle_insert();
 	}
     } elsif ($target eq 'answer' || $target eq 'grade') {
 	&Apache::response::reset_params();
@@ -499,7 +498,6 @@
 						  $safeeval,'answerdisplay','cas','args');
 	if ($constructtag) {
 	    $result = &Apache::edit::rebuild_tag($token);
-	    $result.=&Apache::edit::handle_insert();
 	}
     } elsif ($target eq 'answer' || $target eq 'grade') {
 	&Apache::response::reset_params();
@@ -677,7 +675,6 @@
 	}
 	if ($constructtag) {
 	    $result = &Apache::edit::rebuild_tag($token);
-	    $result.=&Apache::edit::handle_insert();
 	}
     } elsif ($target eq 'grade' || $target eq 'answer' || $target eq 'web' ||
 	     $target eq 'tex' || $target eq 'analyze' ) {
Index: loncom/homework/structuretags.pm
diff -u loncom/homework/structuretags.pm:1.376 loncom/homework/structuretags.pm:1.377
--- loncom/homework/structuretags.pm:1.376	Fri Apr  6 20:12:43 2007
+++ loncom/homework/structuretags.pm	Wed May 23 18:36:21 2007
@@ -1,7 +1,7 @@
 # The LearningOnline Network with CAPA 
 # definition of tags that give a structure to a document
 #
-# $Id: structuretags.pm,v 1.376 2007/04/07 00:12:43 albertel Exp $
+# $Id: structuretags.pm,v 1.377 2007/05/23 22:36:21 albertel Exp $
 #
 # Copyright Michigan State University Board of Trustees
 #
@@ -792,7 +792,6 @@
 	$result.=$temp;
     } elsif ($target eq 'modified') {
 	$result=$token->[4];
-	$result.=&Apache::edit::handle_insert();
     } else {
 	# page_start returned a starting result, delete it if we don't need it
 	$result = '';
@@ -969,7 +968,6 @@
 	$result .= &problem_edit_footer();
     } elsif ($target eq 'modified') {
 	 $result .= $token->[2];
-	 $result.=&Apache::edit::handle_insertafter($token->[1]);
     }
 
     if ($env{'request.state'} eq 'construct' && $target eq 'web') {
@@ -998,7 +996,6 @@
 	$result.=$temp;
     } elsif ($target eq 'modified') {
 	$result=$token->[4];
-	$result.=&Apache::edit::handle_insert();
     } elsif (($target eq 'web' || $target eq 'webgrade')
 	     && ($#$tagstack eq 0 && $$tagstack[0] eq 'library')
 	     && $env{'request.state'} eq "construct" ) {
@@ -1445,7 +1442,6 @@
 	    #limiting ids to only letters numbers, and space
 	    $token->[2]->{'id'}=~s/[^A-Za-z0-9 ]//gs;
 	    $result = &Apache::edit::rebuild_tag($token);
-	    $result.=&Apache::edit::handle_insert();
 	}
     }
     return $result;
@@ -1483,7 +1479,6 @@
 	$result.=&Apache::edit::end_table();
     } elsif ($target eq 'modified') {
 	 $result .= $token->[2];
-	 $result.=&Apache::edit::handle_insertafter($token->[1]);
     }
     pop @Apache::inputtags::status;
     $Apache::inputtags::part='';
@@ -1652,7 +1647,8 @@
     if ($target eq "edit" ) { $result="</td></tr>".&Apache::edit::end_table()."\n"; }
     if ($target eq "modified") {
 	$result='<endouttext />'.
-	    &Apache::edit::handle_insertafter('startouttext'); }
+	    &Apache::edit::handle_insertafter('startouttext');
+    }
     return $result;
 }
 
Index: loncom/xml/lonplot.pm
diff -u loncom/xml/lonplot.pm:1.116 loncom/xml/lonplot.pm:1.117
--- loncom/xml/lonplot.pm:1.116	Wed Feb 21 15:47:49 2007
+++ loncom/xml/lonplot.pm	Wed May 23 18:36:28 2007
@@ -1,7 +1,7 @@
 # The LearningOnline Network with CAPA
 # Dynamic plot
 #
-# $Id: lonplot.pm,v 1.116 2007/02/21 20:47:49 albertel Exp $
+# $Id: lonplot.pm,v 1.117 2007/05/23 22:36:28 albertel Exp $
 #
 # Copyright Michigan State University Board of Trustees
 #
@@ -863,7 +863,6 @@
 	    ($token,$parstack,$safeeval,keys(%curve_defaults));
 	if ($constructtag) {
 	    $result = &Apache::edit::rebuild_tag($token);
-	    $result.= &Apache::edit::handle_insert();
 	}
     }
     return $result;

--albertel1179959789--