[LON-CAPA-cvs] cvs: loncom /homework edit.pm insertlist.xml response.pm
albertel
lon-capa-cvs-allow@mail.lon-capa.org
Tue, 22 May 2007 01:03:35 -0000
This is a MIME encoded message
--albertel1179795815
Content-Type: text/plain
albertel Mon May 21 21:03:35 2007 EDT
Modified files:
/loncom/homework edit.pm response.pm insertlist.xml
Log:
- add in mathresponse mathhint customhint (and their associated answers) for Edit mode insertion
--albertel1179795815
Content-Type: text/plain
Content-Disposition: attachment; filename="albertel-20070521210335.txt"
Index: loncom/homework/edit.pm
diff -u loncom/homework/edit.pm:1.105 loncom/homework/edit.pm:1.106
--- loncom/homework/edit.pm:1.105 Sat Feb 17 21:00:59 2007
+++ loncom/homework/edit.pm Mon May 21 21:03:35 2007
@@ -1,7 +1,7 @@
# The LearningOnline Network with CAPA
# edit mode helpers
#
-# $Id: edit.pm,v 1.105 2007/02/18 02:00:59 albertel Exp $
+# $Id: edit.pm,v 1.106 2007/05/22 01:03:35 albertel Exp $
#
# Copyright Michigan State University Board of Trustees
#
@@ -324,6 +324,56 @@
';
}
+sub insert_customhint {
+ return '
+ <customhint>
+ <answer type="loncapa/perl">
+ </answer>
+ </customhint>';
+}
+
+sub insert_customhint_answer {
+ return '
+ <answer type="loncapa/perl">
+ </answer>
+';
+}
+
+sub insert_mathresponse {
+ return '
+<mathresponse>
+ <answer>
+ </answer>
+ <textline />
+ <hintgroup>
+ <startouttext />
+ <endouttext />
+ </hintgroup>
+</mathresponse>';
+}
+
+sub insert_mathresponse_answer {
+ return '
+ <answer>
+ </answer>
+';
+}
+
+sub insert_mathhint {
+ return '
+ <mathhint>
+ <answer>
+ </answer>
+ </mathhint>';
+}
+
+sub insert_mathhint_answer {
+ return '
+ <answer>
+ </answer>
+';
+}
+
sub insert_stringresponse {
return '
<stringresponse answer="" type="">
Index: loncom/homework/response.pm
diff -u loncom/homework/response.pm:1.165 loncom/homework/response.pm:1.166
--- loncom/homework/response.pm:1.165 Thu May 17 05:43:47 2007
+++ loncom/homework/response.pm Mon May 21 21:03:35 2007
@@ -1,7 +1,7 @@
# The LearningOnline Network with CAPA
# various response type definitons response definition
#
-# $Id: response.pm,v 1.165 2007/05/17 09:43:47 foxr Exp $
+# $Id: response.pm,v 1.166 2007/05/22 01:03:35 albertel Exp $
#
# Copyright Michigan State University Board of Trustees
#
@@ -1026,7 +1026,8 @@
#
# Get a parameter associated with a problem.
# Parameters:
-# $id - the symb of the problem part within the map(?) ($part_$id).
+# $id - the id of the paramater, either a part id,
+# or a partid and responspe id joined by _
# $name - Name of the parameter to fetch
# $default - Default value for the paramter.
#
Index: loncom/homework/insertlist.xml
diff -u loncom/homework/insertlist.xml:1.5 loncom/homework/insertlist.xml:1.6
--- loncom/homework/insertlist.xml:1.5 Fri Apr 20 17:46:18 2007
+++ loncom/homework/insertlist.xml Mon May 21 21:03:35 2007
@@ -54,7 +54,7 @@
<description>Hint</description>
<color>#accacc</color>
<insert_sub>insert_hintgroup</insert_sub>
- <allow>formulahint,hintpart,numericalhint,optionhint,radiobuttonhint,startouttext,stringhint</allow>
+ <allow>customhint,formulahint,hintpart,mathhint,numericalhint,optionhint,radiobuttonhint,startouttext,stringhint</allow>
</tag>
<tag name="hintpart">
<description>Conditional Hint</description>
@@ -92,6 +92,28 @@
<insert_sub>insert_stringhint</insert_sub>
<allow>responseparam</allow>
</tag>
+ <tag name="customhint">
+ <description>Custom Hint Condition</description>
+ <color>#ccaacc</color>
+ <insert_sub>insert_customhint</insert_sub>
+ <allow>responseparam,customhint::answer</allow>
+ </tag>
+ <tag name="customhint::answer">
+ <description>Hint algorithm</description>
+ <color>#ccccaa</color>
+ <insert_sub>insert_customhint_answer</insert_sub>
+ </tag>
+ <tag name="mathhint">
+ <description>Math Hint Condition</description>
+ <color>#ccaacc</color>
+ <insert_sub>insert_mathhint</insert_sub>
+ <allow>responseparam,mathhint::answer</allow>
+ </tag>
+ <tag name="mathhint::answer">
+ <description>Hint algorithm</description>
+ <color>#ccccaa</color>
+ <insert_sub>insert_mathhint_answer</insert_sub>
+ </tag>
<tag name="imageresponse::conceptgroup">
<description>Collection of similar foils</description>
<color>#99FFFF</color>
@@ -158,6 +180,21 @@
<color>#ccccaa</color>
<insert_sub>insert_customresponse_answer</insert_sub>
</tag>
+ <tag name="mathresponse">
+ <description>Response: Math</description>
+ <color>#44cc55</color>
+ <insert_sub>insert_mathresponse</insert_sub>
+ <help>
+ <file>Math_Response_Problems</file>
+ <description>How to write math responses</description>
+ </help>
+ <allow>mathresponse::answer,hintgroup,responseparam,textfield,textline</allow>
+ </tag>
+ <tag name="mathresponse::answer">
+ <description>Answer algorithm</description>
+ <color>#ccccaa</color>
+ <insert_sub>insert_mathresponse_answer</insert_sub>
+ </tag>
<tag name="textfield">
<description>Large Text Entry Area</description>
<color>#1144dd</color>
@@ -367,25 +404,25 @@
<description>Conditional Block</description>
<color>#FF3311</color>
<insert_sub>default</insert_sub>
- <allow>block,customresponse,display,displayduedate,displaytitle,essayresponse,formularesponse,gnuplot,imageresponse,img,import,matchresponse,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,essayresponse,formularesponse,gnuplot,imageresponse,img,import,matchresponse,mathresponse,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,formularesponse,gnuplot,imageresponse,img,import,matchresponse,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,essayresponse,formularesponse,gnuplot,imageresponse,img,import,matchresponse,mathresponse,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,formularesponse,gnuplot,imageresponse,img,import,matchresponse,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,essayresponse,formularesponse,gnuplot,imageresponse,img,import,matchresponse,mathresponse,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,formularesponse,gnuplot,imageresponse,img,import,matchresponse,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,essayresponse,formularesponse,gnuplot,imageresponse,img,import,matchresponse,mathresponse,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="postanswerdate">
<description>After Answer Date Block</description>
@@ -397,13 +434,13 @@
<description>Before Due Date Block</description>
<color>#FFaaaa</color>
<insert_sub>default</insert_sub>
- <allow>block,customresponse,display,displayduedate,displaytitle,essayresponse,formularesponse,gnuplot,imageresponse,img,import,matchresponse,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,essayresponse,formularesponse,gnuplot,imageresponse,img,import,matchresponse,mathresponse,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,essayresponse,formularesponse,gnuplot,imageresponse,img,import,matchresponse,notsolved,numericalresponse,optionresponse,organicresponse,organicstructure,parameter,parserlib,part,postanswerdate,preduedate,problemtype,radiobuttonresponse,randomlabel,randomlist,rankresponse,reactionresponse,script,scriptlib,solved,startouttext,stringresponse,tex,while,window</allow>
+ <allow>allow,block,customresponse,display,displayduedate,displaytitle,essayresponse,formularesponse,gnuplot,imageresponse,img,import,matchresponse,mathresponse,notsolved,numericalresponse,optionresponse,organicresponse,organicstructure,parameter,parserlib,part,postanswerdate,preduedate,problemtype,radiobuttonresponse,randomlabel,randomlist,rankresponse,reactionresponse,script,scriptlib,solved,startouttext,stringresponse,tex,while,window</allow>
</tag>
<tag name="allow">
<description>File Dependencies</dscription>
@@ -414,7 +451,7 @@
<description>Problem Type Block</description>
<color>#EE9955</color>
<insert_sub>default</insert_sub>
- <allow>block,customresponse,display,displayduedate,displaytitle,essayresponse,formularesponse,gnuplot,imageresponse,img,import,matchresponse,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,essayresponse,formularesponse,gnuplot,imageresponse,img,import,matchresponse,mathresponse,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>
@@ -443,7 +480,7 @@
<description>Randomly Parsed Block</description>
<color>#FFFFFF</color>
<insert_sub>default</insert_sub>
- <allow>block,customresponse,display,essayresponse,formularesponse,gnuplot,imageresponse,img,import,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,essayresponse,formularesponse,gnuplot,imageresponse,img,import,matchresponse,mathresponse,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>
--albertel1179795815--