[LON-CAPA-cvs] cvs: loncom /homework drawimage.pm insertlist.xml

raeburn raeburn at source.lon-capa.org
Tue Apr 9 16:01:31 EDT 2024


raeburn		Tue Apr  9 20:01:31 2024 EDT

  Modified files:              
    /loncom/homework	drawimage.pm insertlist.xml 
  Log:
  - Support editing of drawimage tag with "colorful" editor, and add Draw Image
    tag to any "Insert:" dropdown lists which currently include img tag.
  
  
-------------- next part --------------
Index: loncom/homework/drawimage.pm
diff -u loncom/homework/drawimage.pm:1.13 loncom/homework/drawimage.pm:1.14
--- loncom/homework/drawimage.pm:1.13	Fri Apr  5 22:44:19 2024
+++ loncom/homework/drawimage.pm	Tue Apr  9 20:01:31 2024
@@ -1,7 +1,7 @@
 # The LearningOnline Network with CAPA
 # programatic image drawing
 #
-# $Id: drawimage.pm,v 1.13 2024/04/05 22:44:19 raeburn Exp $
+# $Id: drawimage.pm,v 1.14 2024/04/09 20:01:31 raeburn Exp $
 #
 # Copyright Michigan State University Board of Trustees
 #
@@ -31,6 +31,7 @@
 use Apache::loncommon;
 use Apache::lonnet;
 use Apache::lonxml;
+use Apache::edit;
 use lib '/home/httpd/lib/perl/';
 use Time::HiRes qw(gettimeofday);
 use LONCAPA;
@@ -46,12 +47,28 @@
 sub start_drawimage {
     my ($target,$token,$tagstack,$parstack,$parser,$safeeval,$style)=@_;
     &Apache::lonxml::register('Apache::drawimage',('text','line','rectangle','arc','fill','polygon','image'));
+    push(@Apache::lonxml::namespace,'drawimage');
+    my $result;
     if ($target eq 'web' || $target eq 'tex') {
 	my $new_id=&Apache::loncommon::get_cgi_id();
 	if ($cgi_id) { push(@cgi_ids,$cgi_id); } else { undef(%args); }
 	$cgi_id=$new_id;
+    } elsif ($target eq 'edit') {
+        $result .= &Apache::edit::tag_start($target,$token).
+            &Apache::edit::text_arg('Background color:','bgcolor' ,$token,8).
+            &Apache::edit::text_arg('Width(pixel):'    ,'width'   ,$token,6).
+            &Apache::edit::text_arg('Height(pixel):'   ,'height'  ,$token,6).
+            &Apache::edit::text_arg('TeXWidth(mm):'    ,'texwidth',$token,6).
+            &Apache::edit::end_row().&Apache::edit::start_spanning_row();
+    } elsif ($target eq 'modified') {
+        my $constructtag=&Apache::edit::get_new_args($token,$parstack,
+                                                     $safeeval,'bgcolor','width',
+                                                     'height','texwidth');
+        if ($constructtag) {
+            $result = &Apache::edit::rebuild_tag($token);
+        }
     }
-    return '';
+    return $result;
 }
 
 sub end_drawimage {
@@ -100,12 +117,12 @@
 	    undef($cgi_id);
 	}
     } elsif ($target eq 'edit') {
-    } elsif ($target eq 'modified') {
+        $result.=&Apache::edit::end_table;
     }
-    
-    &Apache::lonxml::register('Apache::drawimage',
-			      ('text','line','rectangle','arc','fill',
-			       'polygon'));
+    pop(@Apache::lonxml::namespace);
+    &Apache::lonxml::deregister('Apache::drawimage',
+			        ('text','line','rectangle','arc','fill',
+			         'polygon'));
     return $result;
 }
 
@@ -114,6 +131,31 @@
     my $result;
     if ($target eq 'web' || $target eq 'tex') {
 	&Apache::lonxml::startredirection();
+    } elsif ($target eq 'edit') {
+        $result =
+            &Apache::edit::tag_start($target,$token).
+            &Apache::edit::text_arg('x:','x',$token,6).
+            &Apache::edit::text_arg('y:','y',$token,6).
+            &Apache::edit::text_arg('font:','font',$token,12).
+            &Apache::edit::text_arg('color:','color',$token,8).
+            &Apache::edit::select_arg('direction:','direction',
+                                      ['vertical','horizontal'],$token).
+            &Apache::edit::text_arg('rotation:','rotation',$token,6);
+        my $text=&Apache::lonxml::get_all_text('/text',$parser,$style);
+        $result .=
+            &Apache::edit::editfield($token->[1],$text,'Text',60,2).
+            &Apache::edit::end_row();
+    } elsif ($target eq 'modified') {
+        my $constructtag=&Apache::edit::get_new_args($token,$parstack,
+                                                     $safeeval,'x','y',
+                                                     'font','color',
+                                                     'direction','rotation');
+        if ($constructtag) {
+            $result = &Apache::edit::rebuild_tag($token);
+        } else {
+            $result = $token->[4];
+        }
+        $result .= &Apache::edit::modifiedfield('/text',$parser);
     }
     return $result;
 }
@@ -133,6 +175,8 @@
         $args{"cgi.$cgi_id.OBJTYPE"}.='LABEL:';
 	my $i=$args{"cgi.$cgi_id.OBJCOUNT"}++;
 	$args{"cgi.$cgi_id.OBJ$i"}=join(':',($x,$y,$text,$font,$color,$direction,$rotation));
+    } elsif ($target eq 'edit') {
+        $result=&Apache::edit::end_table();
     }
     return $result;
 }
@@ -150,6 +194,23 @@
 	my $i=$args{"cgi.$cgi_id.OBJCOUNT"}++;
 	$args{"cgi.$cgi_id.OBJ$i"}=join(':',($x1,$y1,$x2,$y2,$color,$thickness));
 	$args{"cgi.$cgi_id.OBJTYPE"}.='LINE:';
+    } elsif ($target eq 'edit') {
+        $result .=
+            &Apache::edit::tag_start($target,$token).
+            &Apache::edit::text_arg('x1:','x1' ,$token,6).
+            &Apache::edit::text_arg('y1:','y1' ,$token,6).
+            &Apache::edit::text_arg('x2:','x2' ,$token,6).
+            &Apache::edit::text_arg('y2:','y2' ,$token,6).
+            &Apache::edit::text_arg('color:','color',$token,8).
+            &Apache::edit::text_arg('thickness:','thickness',$token,6).
+            &Apache::edit::end_row();
+    } elsif ($target eq 'modified') {
+        my $constructtag=&Apache::edit::get_new_args($token,$parstack,
+                                                     $safeeval,'x1','y1',
+                                                     'x2','y2','color','thickness');
+        if ($constructtag) { 
+            $result = &Apache::edit::rebuild_tag($token);
+        }
     }
     return $result;
 }
@@ -157,6 +218,9 @@
 sub end_line {
     my ($target,$token,$tagstack,$parstack,$parser,$safeeval,$style)=@_;
     my $result;
+    if ($target eq 'edit') {
+        $result=&Apache::edit::end_table();
+    }
     return $result;
 }
 
@@ -177,6 +241,26 @@
 	$args{"cgi.$cgi_id.OBJ$i"}=
 	    join(':',($x1,$y1,$x2,$y2,$color,$thickness,$filled));
 	$args{"cgi.$cgi_id.OBJTYPE"}.='RECTANGLE:';
+    } elsif ($target eq 'edit') {
+        $result .=
+            &Apache::edit::tag_start($target,$token).
+            &Apache::edit::text_arg('x1:','x1' ,$token,6).
+            &Apache::edit::text_arg('y1:','y1' ,$token,6).
+            &Apache::edit::text_arg('x2:','x2' ,$token,6).
+            &Apache::edit::text_arg('y2:','y2' ,$token,6).
+            &Apache::edit::text_arg('color:','color',$token,8).
+            &Apache::edit::text_arg('thickness:','thickness',$token,6).
+            &Apache::edit::select_arg('filled:','filled',
+                                      ['no','yes'],$token).
+            &Apache::edit::end_row();
+    } elsif ($target eq 'modified') {
+        my $constructtag=&Apache::edit::get_new_args($token,$parstack,
+                                                     $safeeval,'x1','y1',
+                                                     'x2','y2','color','thickness',
+                                                     'filled');
+        if ($constructtag) {
+            $result = &Apache::edit::rebuild_tag($token);
+        }
     }
     return $result;
 }
@@ -184,6 +268,9 @@
 sub end_rectangle {
     my ($target,$token,$tagstack,$parstack,$parser,$safeeval,$style)=@_;
     my $result;
+    if ($target eq 'edit') {
+        $result=&Apache::edit::end_table();
+    }
     return $result;
 }
 
@@ -205,6 +292,30 @@
 	    join(':',($x,$y,$width,$height,$start,$end,$color,$thickness,
 		      $filled));
 	$args{"cgi.$cgi_id.OBJTYPE"}.='ARC:';
+    } elsif ($target eq 'edit') {
+        $result .=
+            &Apache::edit::tag_start($target,$token).
+            &Apache::edit::text_arg('x:','x',$token,6).
+            &Apache::edit::text_arg('y:','y',$token,6).
+            &Apache::edit::text_arg('width:','width',$token,6).
+            &Apache::edit::text_arg('height:','height',$token,6).
+            &Apache::edit::text_arg('start:','start',$token,6).
+            &Apache::edit::text_arg('end:','end',$token,6).
+            &Apache::edit::text_arg('color:','color',$token,8).
+            &Apache::edit::text_arg('thickness:','thickness',$token,6).
+            &Apache::edit::select_arg('filled:','filled',
+                                      ['no','yes'],$token).
+            &Apache::edit::end_row();
+    } elsif ($target eq 'modified') {
+        my $constructtag=&Apache::edit::get_new_args($token,$parstack,
+                                                     $safeeval,'x','y',
+                                                     'width','height',
+                                                     'start','end',
+                                                     'color','thickness',
+                                                     'filled');
+        if ($constructtag) {
+            $result = &Apache::edit::rebuild_tag($token);
+        }
     }
     return $result;
 }
@@ -212,6 +323,9 @@
 sub end_arc {
     my ($target,$token,$tagstack,$parstack,$parser,$safeeval,$style)=@_;
     my $result;
+    if ($target eq 'edit') {
+        $result=&Apache::edit::end_table();
+    }
     return $result;
 }
 
@@ -225,6 +339,20 @@
 	my $i=$args{"cgi.$cgi_id.OBJCOUNT"}++;
 	$args{"cgi.$cgi_id.OBJ$i"}=join(':',($x,$y,$color));
 	$args{"cgi.$cgi_id.OBJTYPE"}.='FILL:';
+    } elsif ($target eq 'edit') {
+        $result .=
+            &Apache::edit::tag_start($target,$token).
+            &Apache::edit::text_arg('x:','x' ,$token,6).
+            &Apache::edit::text_arg('y:','y' ,$token,6).
+            &Apache::edit::text_arg('color:','color',$token,8).
+            &Apache::edit::end_row();
+    } elsif ($target eq 'modified') {
+        my $constructtag=&Apache::edit::get_new_args($token,$parstack,
+                                                     $safeeval,'x','y',
+                                                     'color');
+        if ($constructtag) {
+            $result = &Apache::edit::rebuild_tag($token);
+        }
     }
     return $result;
 }
@@ -232,6 +360,9 @@
 sub end_fill {
     my ($target,$token,$tagstack,$parstack,$parser,$safeeval,$style)=@_;
     my $result;
+    if ($target eq 'edit') {
+        $result=&Apache::edit::end_table();
+    }
     return $result;
 }
 
@@ -239,9 +370,27 @@
 sub start_polygon {
     my ($target,$token,$tagstack,$parstack,$parser,$safeeval,$style)=@_;
     my $result;
+    push(@Apache::lonxml::namespace,'polygon');
     &Apache::lonxml::register('Apache::drawimage',('point'));
     if ($target eq 'web' || $target eq 'tex') {
 	undef(@polygon);
+    } elsif ($target eq 'edit') {
+        $result = 
+            &Apache::edit::tag_start($target,$token).
+            &Apache::edit::text_arg('color:','color',$token,8).
+            &Apache::edit::select_arg('Open:','open',
+                                           ['no','yes'],$token).
+            &Apache::edit::select_arg('Filled:','filled',
+                                           ['no','yes'],$token).
+            &Apache::edit::text_arg('thickness:','thickness',$token,6).
+            &Apache::edit::end_row().
+            &Apache::edit::start_spanning_row();
+    } elsif ($target eq 'modified') {
+        my $constructtag=&Apache::edit::get_new_args($token,$parstack,
+                                                     $safeeval,'open','filled');
+        if ($constructtag) {
+            $result = &Apache::edit::rebuild_tag($token);
+        }
     }
     return $result;
 }
@@ -259,7 +408,10 @@
 	$args{"cgi.$cgi_id.OBJTYPE"}.='POLYGON:';
 	$args{"cgi.$cgi_id.OBJ$i"}=join(':',($color,$thickness,$open,$filled));
 	$args{"cgi.$cgi_id.OBJEXTRA$i"}=join('-', at polygon);
+    } elsif ($target eq 'edit') {
+        $result=&Apache::edit::end_table();
     }
+    pop(@Apache::lonxml::namespace);
     &Apache::lonxml::deregister('Apache::drawimage',('point'));
     return $result;
 }
@@ -271,6 +423,18 @@
 	my $x = &Apache::lonxml::get_param('x',$parstack,$safeeval);
         my $y = &Apache::lonxml::get_param('y',$parstack,$safeeval);
 	push (@polygon,"($x,$y)");
+    } elsif ($target eq 'edit') {
+        $result.= 
+            &Apache::edit::tag_start($target,$token).
+            &Apache::edit::text_arg('x:','x' ,$token,6).
+            &Apache::edit::text_arg('y:','y' ,$token,6).
+            &Apache::edit::end_row();
+    } elsif ($target eq 'modified') {
+        my $constructtag=&Apache::edit::get_new_args($token,$parstack,
+                                                     $safeeval,'x','y');
+        if ($constructtag) {
+            $result = &Apache::edit::rebuild_tag($token);
+        }
     }
     return $result;
 }
@@ -278,6 +442,9 @@
 sub end_point {
     my ($target,$token,$tagstack,$parstack,$parser,$safeeval,$style)=@_;
     my $result;
+    if ($target eq 'edit') {
+        $result=&Apache::edit::end_table();
+    }
     return $result;
 }
 
@@ -286,6 +453,36 @@
     my $result;
     if ($target eq 'web' || $target eq 'tex') {
 	&Apache::lonxml::startredirection();
+    } elsif ($target eq 'edit') {
+        my $bgimg=&Apache::lonxml::get_all_text('/image',$parser,$style);
+        $Apache::edit::bgimgsrc=$bgimg;
+        $Apache::edit::bgimgsrcdepth=$Apache::lonxml::curdepth;
+        my $only = join(',',&Apache::loncommon::filecategorytypes('Pictures'));
+        $result=&Apache::edit::tag_start($target,$token,'Background Image').
+            &Apache::edit::editline($token->[1],$bgimg,'Image Source File',40).
+            &Apache::edit::browse_or_search(undef,'textnode',undef,$only,undef,1).
+            '<br />'.
+            &Apache::edit::text_arg('x:','x',$token,6).
+            &Apache::edit::text_arg('y:','y',$token,6).
+            &Apache::edit::text_arg('clipx:','clipx',$token,6).
+            &Apache::edit::text_arg('clipy:','clipy',$token,6).
+            &Apache::edit::text_arg('Clip width(pixel):','clipwidth',$token,6).
+            &Apache::edit::text_arg('Clip height(pixel):','clipheight',$token,6).
+            &Apache::edit::text_arg('Scaled width:','scaledwidth',$token,6).
+            &Apache::edit::text_arg('Scaled height:','scaledheight',$token,6).
+            &Apache::edit::text_arg('Transparent:','transparent',$token,6).
+            &Apache::edit::end_row();
+    } elsif ($target eq 'modified') {
+        my $constructtag=&Apache::edit::get_new_args($token,$parstack,
+                                                     $safeeval,'x','y',
+                                                     'clipx','clipy','clipwidth','clipheight',
+                                                     'scaledwidth','scaledheight','transparent');
+        if ($constructtag) {
+            $result = &Apache::edit::rebuild_tag($token);
+        } else {
+            $result = $token->[4];
+        }
+        $result .= &Apache::edit::modifiedfield('/image',$parser);
     }
     return $result;
 }
@@ -315,6 +512,8 @@
 	$args{"cgi.$cgi_id.OBJ$i"} = 
 	    join(':',($x,$y,&escape($bgimg),$transparent,
 		      $clipx,$clipy,$scaledwidth,$scaledheight,$clipwidth,$clipheight));
+    } elsif ($target eq 'edit') {
+        $result=&Apache::edit::end_table();
     }
     return $result;
 }
Index: loncom/homework/insertlist.xml
diff -u loncom/homework/insertlist.xml:1.35 loncom/homework/insertlist.xml:1.36
--- loncom/homework/insertlist.xml:1.35	Fri Feb  3 18:00:30 2017
+++ loncom/homework/insertlist.xml	Tue Apr  9 20:01:31 2024
@@ -190,7 +190,7 @@
 		<description>Conditional Hint</description>
 		<color>#ccaacc</color>
 		<insert_sub>insert_hintpart</insert_sub>
-		<allow>block,display,gnuplot,img,import,organicstructure,parserlib,problemtype,randomlabel,randomlist,script,scriptlib,startouttext,tex,web,while,window</allow>
+		<allow>block,display,drawimage,gnuplot,img,import,organicstructure,parserlib,problemtype,randomlabel,randomlist,script,scriptlib,startouttext,tex,web,while,window</allow>
 	        <help>
                         <file>adaptive_hints</file>
                         <description>How to write adaptive hints</description>
@@ -305,7 +305,7 @@
 		<description>Text to describe option</description>
 		<color>#ddFFee</color>
 		<insert_sub>default</insert_sub>
-		<allow>block,display,gnuplot,img,import,organicstructure,parserlib,problemtype,randomlabel,randomlist,script,scriptlib,startouttext,tex,web,while,window</allow>
+		<allow>block,display,drawimage,gnuplot,img,import,organicstructure,parserlib,problemtype,randomlabel,randomlist,script,scriptlib,startouttext,tex,web,while,window</allow>
 	</tag>
 	<tag name="datasubmission">
 		<description>Stored Entry Field</description>
@@ -370,7 +370,7 @@
 		<description>Option response foil</description>
 		<color>#E8D8EE</color>
 		<insert_sub>Apache::optionresponse::insert_foil</insert_sub>
-		<allow>block,display,gnuplot,img,import,organicstructure,parserlib,problemtype,randomlabel,randomlist,script,scriptlib,startouttext,tex,web,while,window,optionresponse::drawoptionlist</allow>
+		<allow>block,display,drawimage,gnuplot,img,import,organicstructure,parserlib,problemtype,randomlabel,randomlist,script,scriptlib,startouttext,tex,web,while,window,optionresponse::drawoptionlist</allow>
 	</tag>
 	<tag name="optionresponse::foilgroup">
 		<description>Collection of Foils</description>
@@ -407,7 +407,7 @@
 		<description>Foil</description>
 		<color>#E8D8EE</color>
 		<insert_sub>Apache::radiobuttonresponse::insert_foil</insert_sub>
-		<allow>block,display,gnuplot,img,import,organicstructure,parserlib,problemtype,randomlabel,randomlist,script,scriptlib,startouttext,tex,web,while,window</allow>
+		<allow>block,display,drawimage,gnuplot,img,import,organicstructure,parserlib,problemtype,randomlabel,randomlist,script,scriptlib,startouttext,tex,web,while,window</allow>
 	</tag>
 	<tag name="radiobuttonresponse::foilgroup">
 		<description>Collection of Foils</description>
@@ -432,7 +432,7 @@
 		<description>Foil</description>
 		<color>#E8D8EE</color>
 		<insert_sub>Apache::rankresponse::insert_foil</insert_sub>
-		<allow>block,display,gnuplot,img,import,organicstructure,parserlib,problemtype,randomlabel,randomlist,script,scriptlib,startouttext,tex,web,while,window</allow>
+		<allow>block,display,drawimage,gnuplot,img,import,organicstructure,parserlib,problemtype,randomlabel,randomlist,script,scriptlib,startouttext,tex,web,while,window</allow>
 	</tag>
 	<tag name="rankresponse::foilgroup">
 		<description>Collection of Foils</description>
@@ -457,7 +457,7 @@
 		<description>Foil</description>
 		<color>#E8D8EE</color>
 		<insert_sub>Apache::matchresponse::insert_foil</insert_sub>
-		<allow>block,display,gnuplot,img,import,organicstructure,parserlib,problemtype,randomlabel,randomlist,script,scriptlib,startouttext,tex,web,while,window</allow>
+		<allow>block,display,drawimage,gnuplot,img,import,organicstructure,parserlib,problemtype,randomlabel,randomlist,script,scriptlib,startouttext,tex,web,while,window</allow>
 	</tag>
 	<tag name="matchresponse::foilgroup">
 		<description>Collection of Foils</description>
@@ -470,7 +470,7 @@
 		<description>Item</description>
 		<color>#e0e0d7</color>
 		<insert_sub>Apache::matchresponse::insert_item</insert_sub>
-		<allow>block,display,gnuplot,img,import,organicstructure,parserlib,problemtype,randomlabel,randomlist,script,scriptlib,startouttext,tex,web,while,window</allow>
+		<allow>block,display,drawimage,gnuplot,img,import,organicstructure,parserlib,problemtype,randomlabel,randomlist,script,scriptlib,startouttext,tex,web,while,window</allow>
 	</tag>
 	<tag name="matchresponse::itemgroup">
 		<description>Item to Match</description>
@@ -548,6 +548,54 @@
 			<description>Image Options</description>
 		</help>
 	</tag>
+        <tag name="drawimage">
+                <description>Draw Image</description>
+                <color>#77DD55</color>
+                <insert_sub>default</insert_sub>
+                <allow>drawimage::rectangle,drawimage::polygon,drawimage::line,drawimage::image,drawimage::arc,drawimage::fill,drawimage::text</allow>
+        </tag>
+        <tag name="drawimage::rectangle">
+                <description>Rectangular area in drawimage</description>
+                <color>#ccFFdd</color>
+                <insert_sub>default</insert_sub>
+        </tag>
+        <tag name="drawimage::polygon">
+                <description>Polygonal area in drawimage</description>
+                <color>#ccFFdd</color>
+                <insert_sub>default</insert_sub>
+                <allow>polygon::point</allow>
+        </tag>
+        <tag name="drawimage::text">
+                <description>Text in drawimage</description>
+                <color>#ddFFee</color>
+                <insert_sub>default</insert_sub>
+                <allow>tex,web,while</allow>
+        </tag>
+        <tag name="drawimage::line">
+                <description>Line in drawimage</description>
+                <color>#ccFFdd</color>
+                <insert_sub>default</insert_sub>
+        </tag>
+        <tag name="drawimage::arc">
+                <description>Arc in drawimage</description>
+                <color>#ccFFdd</color>
+                <insert_sub>default</insert_sub>
+        </tag>
+        <tag name="drawimage::fill">
+                <description>Fill in drawimage</description>
+                <color>#ccFFdd</color>
+                <insert_sub>default</insert_sub>
+        </tag>
+        <tag name="drawimage::image">
+                <description>Background image in drawimage</description>
+                <color>#ddFFee</color>
+                <insert_sub>default</insert_sub>
+        </tag>
+        <tag name="polygon::point">
+                <description>Point in polygon in drawimage</description>
+                <color>#ddFFee</color>
+                <insert_sub>default</insert_sub>
+        </tag>
 	<tag name="meta">
 		<description>Custom Metadata</description>
 		<color>#aacccc</color>
@@ -558,31 +606,31 @@
 		<description>Text In Separate Window</description>
 		<color>#aacccc</color>
 		<insert_sub>default</insert_sub>
-		<allow>block,display,displayduedate,displaytitle,gnuplot,img,import,notsolved,organicstructure,postanswerdate,preduedate,problemtype,randomlabel,randomlist,script,solved,startouttext,tex,web,while,window</allow>
+		<allow>block,display,displayduedate,displaytitle,drawimage,gnuplot,img,import,notsolved,organicstructure,postanswerdate,preduedate,problemtype,randomlabel,randomlist,script,solved,startouttext,tex,web,while,window</allow>
 	</tag>
 	<tag name="block">
 		<description>Conditional Block</description>
 		<color>#FF3311</color>
 		<insert_sub>default</insert_sub>
-		<allow>block,customresponse,display,displayduedate,displaytitle,essayresponse,externalresponse,formularesponse,gnuplot,imageresponse,img,import,matchresponse,mathresponse,functionplotresponse,notsolved,numericalresponse,optionresponse,organicresponse,organicstructure,parserlib,part,postanswerdate,preduedate,problemtype,radiobuttonresponse,randomlabel,randomlist,rankresponse,reactionresponse,script,scriptlib,solved,startouttext,stringresponse,tex,web,while,window</allow>
+		<allow>block,customresponse,display,displayduedate,displaytitle,drawimage,essayresponse,externalresponse,formularesponse,gnuplot,imageresponse,img,import,matchresponse,mathresponse,functionplotresponse,notsolved,numericalresponse,optionresponse,organicresponse,organicstructure,parserlib,part,postanswerdate,preduedate,problemtype,radiobuttonresponse,randomlabel,randomlist,rankresponse,reactionresponse,script,scriptlib,solved,startouttext,stringresponse,tex,web,while,window</allow>
 	</tag>
 	<tag name="library">
 		<description>Start of Library</description>
 		<color>#FFFFFF</color>
 		<insert_sub>default</insert_sub>
-		<allow>customresponse,display,displayduedate,displaytitle,essayresponse,externalresponse,formularesponse,gnuplot,imageresponse,img,import,matchresponse,mathresponse,functionplotresponse,notsolved,numericalresponse,optionresponse,organicresponse,organicstructure,parserlib,part,postanswerdate,preduedate,problemtype,radiobuttonresponse,randomlabel,randomlist,rankresponse,reactionresponse,script,scriptlib,solved,startouttext,stringresponse,tex,web,while,window</allow>
+		<allow>customresponse,display,displayduedate,displaytitle,drawimage,essayresponse,externalresponse,formularesponse,gnuplot,imageresponse,img,import,matchresponse,mathresponse,functionplotresponse,notsolved,numericalresponse,optionresponse,organicresponse,organicstructure,parserlib,part,postanswerdate,preduedate,problemtype,radiobuttonresponse,randomlabel,randomlist,rankresponse,reactionresponse,script,scriptlib,solved,startouttext,stringresponse,tex,web,while,window</allow>
 	</tag>
 	<tag name="notsolved">
 		<description>Block For When Not Solved</description>
 		<color>#FFFFFF</color>
 		<insert_sub>default</insert_sub>
-		<allow>block,customresponse,display,displayduedate,displaytitle,essayresponse,externalresponse,formularesponse,gnuplot,imageresponse,img,import,matchresponse,mathresponse,functionplotresponse,numericalresponse,optionresponse,organicresponse,organicstructure,parserlib,postanswerdate,preduedate,problemtype,radiobuttonresponse,randomlabel,randomlist,rankresponse,reactionresponse,script,scriptlib,startouttext,stringresponse,tex,web,while,window</allow>
+		<allow>block,customresponse,display,displayduedate,displaytitle,drawimage,essayresponse,externalresponse,formularesponse,gnuplot,imageresponse,img,import,matchresponse,mathresponse,functionplotresponse,numericalresponse,optionresponse,organicresponse,organicstructure,parserlib,postanswerdate,preduedate,problemtype,radiobuttonresponse,randomlabel,randomlist,rankresponse,reactionresponse,script,scriptlib,startouttext,stringresponse,tex,web,while,window</allow>
 	</tag>
 	<tag name="part">
 		<description>Problem Part</description>
 		<color>#F0F0F0</color>
 		<insert_sub>default</insert_sub>
-		<allow>block,customresponse,display,displayduedate,displaytitle,essayresponse,externalresponse,formularesponse,gnuplot,imageresponse,img,import,matchresponse,mathresponse,functionplotresponse,notsolved,numericalresponse,optionresponse,organicresponse,organicstructure,parameter,parserlib,postanswerdate,preduedate,problemtype,radiobuttonresponse,randomlabel,randomlist,rankresponse,reactionresponse,script,scriptlib,solved,startouttext,stringresponse,tex,while,window</allow>
+		<allow>block,customresponse,display,displayduedate,displaytitle,drawimage,essayresponse,externalresponse,formularesponse,gnuplot,imageresponse,img,import,matchresponse,mathresponse,functionplotresponse,notsolved,numericalresponse,optionresponse,organicresponse,organicstructure,parameter,parserlib,postanswerdate,preduedate,problemtype,radiobuttonresponse,randomlabel,randomlist,rankresponse,reactionresponse,script,scriptlib,solved,startouttext,stringresponse,tex,while,window</allow>
 	</tag>
         <tag name="startpartmarker">
                 <description>Problem Part: Marker for Start of New Part</description>
@@ -598,19 +646,19 @@
 		<description>After Answer Date Block</description>
 		<color>#EE9999</color>
 		<insert_sub>default</insert_sub>
-		<allow>block,display,displayduedate,displaytitle,gnuplot,img,import,notsolved,organicstructure,parserlib,problemtype,randomlabel,randomlist,script,scriptlib,solved,startouttext,tex,while,window</allow>
+		<allow>block,display,displayduedate,displaytitle,drawimage,gnuplot,img,import,notsolved,organicstructure,parserlib,problemtype,randomlabel,randomlist,script,scriptlib,solved,startouttext,tex,while,window</allow>
 	</tag>
 	<tag name="preduedate">
 		<description>Before Due Date Block</description>
 		<color>#FFaaaa</color>
 		<insert_sub>default</insert_sub>
-		<allow>block,customresponse,display,displayduedate,displaytitle,essayresponse,externalresponse,formularesponse,gnuplot,imageresponse,img,import,matchresponse,mathresponse,functionplotresponse,notsolved,numericalresponse,optionresponse,organicresponse,organicstructure,parserlib,problemtype,radiobuttonresponse,randomlabel,randomlist,rankresponse,reactionresponse,script,scriptlib,solved,startouttext,stringresponse,tex,while,window</allow>
+		<allow>block,customresponse,display,displayduedate,displaytitle,drawimage,essayresponse,externalresponse,formularesponse,gnuplot,imageresponse,img,import,matchresponse,mathresponse,functionplotresponse,notsolved,numericalresponse,optionresponse,organicresponse,organicstructure,parserlib,problemtype,radiobuttonresponse,randomlabel,randomlist,rankresponse,reactionresponse,script,scriptlib,solved,startouttext,stringresponse,tex,while,window</allow>
 	</tag>
 	<tag name="problem">
 		<description>Start of Homework</description>
 		<color>#FFFFFF</color>
 		<insert_sub>default</insert_sub>
-		<allow>allow,block,customresponse,display,displayduedate,displaytitle,endpartmarker,essayresponse,externalresponse,formularesponse,gnuplot,imageresponse,img,import,matchresponse,mathresponse,functionplotresponse,meta,notsolved,numericalresponse,optionresponse,organicresponse,organicstructure,parameter,parserlib,part,postanswerdate,preduedate,problemtype,radiobuttonresponse,randomlabel,randomlist,rankresponse,reactionresponse,script,scriptlib,solved,startouttext,startpartmarker,stringresponse,tex,while,window</allow>
+		<allow>allow,block,customresponse,display,displayduedate,displaytitle,drawimage,endpartmarker,essayresponse,externalresponse,formularesponse,gnuplot,imageresponse,img,import,matchresponse,mathresponse,functionplotresponse,meta,notsolved,numericalresponse,optionresponse,organicresponse,organicstructure,parameter,parserlib,part,postanswerdate,preduedate,problemtype,radiobuttonresponse,randomlabel,randomlist,rankresponse,reactionresponse,script,scriptlib,solved,startouttext,startpartmarker,stringresponse,tex,while,window</allow>
 	</tag>
         <tag name="allow">
                 <description>File Dependencies</description>
@@ -621,7 +669,7 @@
 		<description>Problem Type Block</description>
 		<color>#EE9955</color>
 		<insert_sub>default</insert_sub>
-		<allow>block,customresponse,display,displayduedate,displaytitle,essayresponse,externalresponse,formularesponse,gnuplot,imageresponse,img,import,matchresponse,mathresponse,functionplotresponse,notsolved,numericalresponse,optionresponse,organicresponse,organicstructure,parserlib,postanswerdate,preduedate,problemtype,radiobuttonresponse,randomlabel,randomlist,rankresponse,reactionresponse,script,scriptlib,solved,startouttext,stringresponse,tex,web,while,window</allow>
+		<allow>block,customresponse,display,displayduedate,displaytitle,drawimage,essayresponse,externalresponse,formularesponse,gnuplot,imageresponse,img,import,matchresponse,mathresponse,functionplotresponse,notsolved,numericalresponse,optionresponse,organicresponse,organicstructure,parserlib,postanswerdate,preduedate,problemtype,radiobuttonresponse,randomlabel,randomlist,rankresponse,reactionresponse,script,scriptlib,solved,startouttext,stringresponse,tex,web,while,window</allow>
 	</tag>
 	<tag name="randomlabel">
 		<description>Randomly labeled image</description>
@@ -650,13 +698,13 @@
 		<description>Randomly Parsed Block</description>
 		<color>#FFFFFF</color>
 		<insert_sub>default</insert_sub>
-		<allow>block,customresponse,display,essayresponse,externalresponse,formularesponse,gnuplot,imageresponse,img,import,matchresponse,mathresponse,functionplotresponse,notsolved,numericalresponse,optionresponse,organicresponse,organicstructure,parserlib,postanswerdate,preduedate,problemtype,radiobuttonresponse,randomlist,rankresponse::foilgroup,reactionresponse,script,scriptlib,solved,stringresponse,tex,while,window</allow>
+		<allow>block,customresponse,display,drawimage,essayresponse,externalresponse,formularesponse,gnuplot,imageresponse,img,import,matchresponse,mathresponse,functionplotresponse,notsolved,numericalresponse,optionresponse,organicresponse,organicstructure,parserlib,postanswerdate,preduedate,problemtype,radiobuttonresponse,randomlist,rankresponse::foilgroup,reactionresponse,script,scriptlib,solved,stringresponse,tex,while,window</allow>
 	</tag>
 	<tag name="solved">
 		<description>Block For After Solved</description>
 		<color>#FFFFFF</color>
 		<insert_sub>default</insert_sub>
-		<allow>block,display,displayduedate,displaytitle,gnuplot,img,import,organicstructure,parserlib,postanswerdate,preduedate,problemtype,randomlist,script,scriptlib,startouttext,tex,while,window</allow>
+		<allow>block,display,displayduedate,displaytitle,drawimage,gnuplot,img,import,organicstructure,parserlib,postanswerdate,preduedate,problemtype,randomlist,script,scriptlib,startouttext,tex,while,window</allow>
 	</tag>
 	<tag name="startouttext">
 		<description>Text/HTML Block</description>
@@ -685,7 +733,7 @@
 		<description>While Loop Block</description>
 		<color>#FFFFFF</color>
 		<insert_sub>default</insert_sub>
-		<allow>block,display,displayduedate,displaytitle,gnuplot,img,import,notsolved,organicstructure,parserlib,postanswerdate,preduedate,problemtype,randomlist,script,scriptlib,solved,startouttext,tex,web,while,window</allow>
+		<allow>block,display,displayduedate,displaytitle,drawimage,gnuplot,img,import,notsolved,organicstructure,parserlib,postanswerdate,preduedate,problemtype,randomlist,script,scriptlib,solved,startouttext,tex,web,while,window</allow>
 	</tag>
 	<tag name="gnuplot">
 		<description>GnuPlot</description>
@@ -812,13 +860,13 @@
 		<description>Introductory Information</description>
 		<color>#FFFFFF</color>
 		<insert_sub>Apache::bridgetask::insert_IntroParagraph</insert_sub>
-		<allow>block,display,gnuplot,img,import,organicstructure,parserlib,problemtype,randomlabel,randomlist,script,scriptlib,startouttext,tex,web,while,window</allow>
+		<allow>block,display,drawimage,gnuplot,img,import,organicstructure,parserlib,problemtype,randomlabel,randomlist,script,scriptlib,startouttext,tex,web,while,window</allow>
 	</tag>
 	<tag name="ClosingParagraph">
 		<description>Closing Information</description>
 		<color>#FFFFFF</color>
 		<insert_sub>Apache::bridgetask::insert_ClosingParagraph</insert_sub>
-		<allow>block,display,gnuplot,img,import,organicstructure,parserlib,problemtype,randomlabel,randomlist,script,scriptlib,startouttext,tex,web,while,window</allow>
+		<allow>block,display,drawimage,gnuplot,img,import,organicstructure,parserlib,problemtype,randomlabel,randomlist,script,scriptlib,startouttext,tex,web,while,window</allow>
 	</tag>
 
 	<tag name="Question">
@@ -831,7 +879,7 @@
 		<description>Question Information</description>
 		<color>#FFFFFF</color>
 		<insert_sub>Apache::bridgetask::insert_QuestionText</insert_sub>
-		<allow>block,display,gnuplot,img,import,organicstructure,parserlib,problemtype,randomlabel,randomlist,script,scriptlib,startouttext,tex,web,while,window</allow>
+		<allow>block,display,drawimage,gnuplot,img,import,organicstructure,parserlib,problemtype,randomlabel,randomlist,script,scriptlib,startouttext,tex,web,while,window</allow>
                 <!-- allowed but edit not supportted yet
                      <allow>Question,Criteria</allow>-->
 	</tag>
@@ -851,7 +899,7 @@
 		<description>Information for the Instance</description>
 		<color>#FFFFFF</color>
 		<insert_sub>Apache::bridgetask::insert_InstanceText</insert_sub>
-		<allow>block,display,gnuplot,img,import,organicstructure,parserlib,problemtype,randomlabel,randomlist,script,scriptlib,startouttext,tex,web,while,window</allow>
+		<allow>block,display,drawimage,gnuplot,img,import,organicstructure,parserlib,problemtype,randomlabel,randomlist,script,scriptlib,startouttext,tex,web,while,window</allow>
 	</tag>
 	<tag name="Criteria">
 		<description>Question Criteria</description>
@@ -863,12 +911,12 @@
 		<description>Criteria Information</description>
 		<color>#FFFFFF</color>
 		<insert_sub>Apache::bridgetask::insert_CriteriaText</insert_sub>
-		<allow>block,display,gnuplot,img,import,organicstructure,parserlib,problemtype,randomlabel,randomlist,script,scriptlib,startouttext,tex,web,while,window</allow>
+		<allow>block,display,drawimage,gnuplot,img,import,organicstructure,parserlib,problemtype,randomlabel,randomlist,script,scriptlib,startouttext,tex,web,while,window</allow>
 	</tag>
 	<tag name="GraderNote">
 		<description>Text to display to Grader</description>
 		<color>#FFFFFF</color>
 		<insert_sub>Apache::bridgetask::insert_GraderNote</insert_sub>
-		<allow>block,display,gnuplot,img,import,organicstructure,parserlib,problemtype,randomlabel,randomlist,script,scriptlib,startouttext,tex,web,while,window</allow>
+		<allow>block,display,drawimage,gnuplot,img,import,organicstructure,parserlib,problemtype,randomlabel,randomlist,script,scriptlib,startouttext,tex,web,while,window</allow>
 	</tag>
 </insertlist>


More information about the LON-CAPA-cvs mailing list