<?xml version="1.0" encoding="utf-8"?>
<rss version="2.0" xmlns:atom="http://www.w3.org/2005/Atom"><channel><title>Recent changes to Question</title><link>https://sourceforge.net/p/mathmaker/doc4dev/Question/</link><description>Recent changes to Question</description><atom:link href="https://sourceforge.net/p/mathmaker/doc4dev/Question/feed" rel="self"/><language>en</language><lastBuildDate>Wed, 26 Feb 2014 15:46:03 -0000</lastBuildDate><atom:link href="https://sourceforge.net/p/mathmaker/doc4dev/Question/feed" rel="self" type="application/rss+xml"/><item><title>Question modified by Nicolas Hainaux</title><link>https://sourceforge.net/p/mathmaker/doc4dev/Question/</link><description>&lt;div class="markdown_content"&gt;&lt;p&gt;The organization of the classes is analog to the one of sheets and exercises, the big difference being that the methods to write questions' texts and answers have to be rewritten for each new Question.&lt;/p&gt;
&lt;p&gt;Q_Structure contains the to_str() method which writes the texts and answers of the Question to the output. It uses text_to_str() and answer_to_str() that are not defined here.&lt;/p&gt;
&lt;p&gt;The instanciable Questions should all be a copy of Q_Model. They need to reimplement __init__() (which first calls Q_Structure.__init__() to set properly some fields) mainly to define the objects that will be used and what will be done; and they also must implement text_to_str() and answer_to_str().&lt;/p&gt;
&lt;p&gt;Finally, each Question has also one global variable which should be defined. More details about it: &lt;em&gt;(this should be checked again...)&lt;/em&gt;&lt;/p&gt;
&lt;ul&gt;
&lt;li&gt;
&lt;p&gt;AVAILABLE_Q_KIND_VALUES will define which kinds (and subkinds) of Questions are handled by this class. Extract from the code:&lt;/p&gt;
&lt;div class="codehilite"&gt;&lt;pre&gt;&lt;span class="c"&gt;# AVAILABLE_Q_KIND_VALUES lists so : {'q_kind1' : ['q_subkind1',&lt;/span&gt;
&lt;span class="c"&gt;#                                                  'q_subkind2',&lt;/span&gt;
&lt;span class="c"&gt;#                                                   etc.],&lt;/span&gt;
&lt;span class="c"&gt;#                                     'q_kind2' : ...}&lt;/span&gt;
&lt;span class="c"&gt;#                                    }&lt;/span&gt;
&lt;/pre&gt;&lt;/div&gt;
&lt;/li&gt;
&lt;/ul&gt;
&lt;p&gt;See __init__() in Q_Model.py to have some hints on where to write something.&lt;/p&gt;
&lt;p&gt;&lt;a class="" href="http://mathmaker.sourceforge.net/participate/doc/classsheet_1_1exercise_1_1question_1_1Q__Structure_1_1Q__Structure.html"&gt;Q_Structure in the doc&lt;/a&gt;&lt;br /&gt;
&lt;a class="" href="http://mathmaker.sourceforge.net/participate/doc/classsheet_1_1exercise_1_1question_1_1Q__Model_1_1Q__Model.html"&gt;Q_Model in the doc&lt;/a&gt;&lt;/p&gt;&lt;/div&gt;</description><dc:creator xmlns:dc="http://purl.org/dc/elements/1.1/">Nicolas Hainaux</dc:creator><pubDate>Wed, 26 Feb 2014 15:46:03 -0000</pubDate><guid>https://sourceforge.net22ef01f011920dcf2bb9443e24d979f267351713</guid></item></channel></rss>