<?xml version="1.0" encoding="UTF-8"?>
<rss version="2.0"
	xmlns:content="http://purl.org/rss/1.0/modules/content/"
	xmlns:wfw="http://wellformedweb.org/CommentAPI/"
	xmlns:dc="http://purl.org/dc/elements/1.1/"
	xmlns:atom="http://www.w3.org/2005/Atom"
	xmlns:sy="http://purl.org/rss/1.0/modules/syndication/"
	xmlns:slash="http://purl.org/rss/1.0/modules/slash/"
	>

<channel>
	<title>Open Education Research &#187; code</title>
	<atom:link href="http://openeducationresearch.org/category/code/feed/" rel="self" type="application/rss+xml" />
	<link>http://openeducationresearch.org</link>
	<description>Research in open education and education research in the open.</description>
	<lastBuildDate>Wed, 26 May 2010 21:48:36 +0000</lastBuildDate>
	<language>en</language>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
	<generator>http://wordpress.org/?v=3.0</generator>
<atom:link rel="hub" href="http://pubsubhubbub.appspot.com"/><atom:link rel="hub" href="http://superfeedr.com/hubbub"/>		<item>
		<title>Plone, Drupal, Moodle and ATutor</title>
		<link>http://openeducationresearch.org/2009/07/plone-drupal-moodle-and-atutor/</link>
		<comments>http://openeducationresearch.org/2009/07/plone-drupal-moodle-and-atutor/#comments</comments>
		<pubDate>Wed, 01 Jul 2009 20:34:33 +0000</pubDate>
		<dc:creator>Turadg</dc:creator>
				<category><![CDATA[code]]></category>

		<guid isPermaLink="false">http://openeducationresearch.org/?p=41</guid>
		<description><![CDATA[I'm overdue for an update here on what I've been working on.  My current project is a web application for collaboratively sharing, critiquing and improving question items for homeworks and quizzes. Basically a wiki question bank, but more socially-oriented.

In my last post, I was...]]></description>
			<content:encoded><![CDATA[<p>I&#8217;m overdue for an update here on what I&#8217;ve been working on.  My current project is a web application for collaboratively sharing, critiquing and improving question items for homeworks and quizzes. Basically a wiki question bank, but more socially-oriented.</p>
<p>In my last post, I was working on <a href="http://plone.org/">Plone</a> and the <a href="http://plone.org/products/ecquiz/">ECQuiz module</a> of <a href="http://wdok.cs.uni-magdeburg.de/demo/">eduComponents</a>.  After a few months I abandoned Plone and never looked back. Plone&#8217;s going through a big transition right now and it&#8217;s hard to be a newcomer to its scene.  I wish Plone and eduComponents developers well.</p>
<p>I switched my platform to <a href="http://drupal.org/">Drupal</a> and its <a href="http://drupal.org/project/quiz">Quiz module</a>. Drupal has an amazing community.  It&#8217;s hard to measure a community, but a handy data point is that the Drupal group on Facebook has 3500 members, compared to Plone&#8217;s 500.  This Quiz module has an <a href="http://groups.drupal.org/quiz">active forum</a>, an <a href="irc://irc.freenode.net/#drupal-quiz">IRC channel</a>, and a <a href="http://www.palantir.net/blog/quiz">longish history</a>.</p>
<p>While the Quiz community is strong, its design is lacking for my purposes.  It began 3 years ago as a simple module and has been pulled and contorted over the years to suit different needs.  This is arguably the best way for an open source module to evolve.  Thanks to <a href="http://technosophos.com/content/drupal-quiz-30-alpha-released">big contributions</a> from <a href="http://technosophos.com/">Matt Butcher</a>, the module got some big improvements in Quiz 3.0.  For example, there is now an <a href="http://sinciput.etl.luc.edu/2009/01/drupal-quiz-module.html">object-oriented type system for question types</a> so new ones can be added more easily.  (Unfortunately, Drupal data schemas don&#8217;t have inheritance like PHP objects do so data properties of the base class have to be included in each subclass.  Unless someone wants to hack around that.)  And now <a href="http://drupal.org/user/328724">Sivaji</a> is making yet more improvements for Quiz 4.x, as part of his <a href="http://ubuntuslave.blogspot.com/2009/04/me-got-selected-for-gsoc-2009_26.html">winning</a> <a href="http://code.google.com/soc/">GSoC</a> <a href="http://sivaji.ubuntu-tam.org/soc2009_application.pdf">proposal</a>.  Quiz 4.0 will be a polished set of improvements at the end of this summer.</p>
<p>I&#8217;ve been exploring the potential for Quiz to take a leap forward by drawing in code from PHP-based learning management systems.  I began with Moodle and hammered its import/export code into Quiz to allow it to <a href="http://drupal.org/node/473628">handle many more formats</a>.  I was happy having materialized the possibility for re-use in open source, but overall pretty turned off by Moodle&#8217;s spaghetti codebase.  Maybe if you&#8217;re a longtime Moodle developer it all seems clean and clear, but that wasn&#8217;t my experience.  So I&#8217;ve kept looking.</p>
<p><a href="http://www.atutor.ca">ATutor</a> looks promising.  It&#8217;s a leaner codebase and looks so far to be a clean design.  It also has much better support for standards, which is important for my question bank in order to interoperate with other systems.  After skimming the source code I realized I would need the db schemas to wrap my head around it so I installed the whole thing on my laptop.  Wow, that was easy.  I just moved the folder within my MAMP htdocs, navigated to it in my browser, and the rest was clicking through web forms.  (There was one step where I had to make a directory manually, but the directions were explicit enough for anybody.)  Thanks ATutor developers, and Happy Canada Day.</p>
<p>I may post again with an assessment.  Please reply in the comments if you&#8217;d like to hear this (and why would also help).</p>



Share...


	<a rel="nofollow"  target="_blank" href="http://www.printfriendly.com/print?url=http%3A%2F%2Fopeneducationresearch.org%2F2009%2F07%2Fplone-drupal-moodle-and-atutor%2F&amp;partner=sociable" title="Print"><img src="http://openeducationresearch.org/wp-content/plugins/sociable/images/printfriendly.png" title="Print" alt="Print" class="sociable-hovers" /></a>
	<a rel="nofollow"  target="_blank" href="http://digg.com/submit?phase=2&amp;url=http%3A%2F%2Fopeneducationresearch.org%2F2009%2F07%2Fplone-drupal-moodle-and-atutor%2F&amp;title=Plone%2C%20Drupal%2C%20Moodle%20and%20ATutor&amp;bodytext=I%27m%20overdue%20for%20an%20update%20here%20on%20what%20I%27ve%20been%20working%20on.%20%20My%20current%20project%20is%20a%20web%20application%20for%20collaboratively%20sharing%2C%20critiquing%20and%20improving%20question%20items%20for%20homeworks%20and%20quizzes.%20Basically%20a%20wiki%20question%20bank%2C%20but%20more%20socially-oriented.%0D%0A%0D%0AIn%20my%20last%20post%2C%20I%20was..." title="Digg"><img src="http://openeducationresearch.org/wp-content/plugins/sociable/images/digg.png" title="Digg" alt="Digg" class="sociable-hovers" /></a>
	<a rel="nofollow"  target="_blank" href="http://delicious.com/post?url=http%3A%2F%2Fopeneducationresearch.org%2F2009%2F07%2Fplone-drupal-moodle-and-atutor%2F&amp;title=Plone%2C%20Drupal%2C%20Moodle%20and%20ATutor&amp;notes=I%27m%20overdue%20for%20an%20update%20here%20on%20what%20I%27ve%20been%20working%20on.%20%20My%20current%20project%20is%20a%20web%20application%20for%20collaboratively%20sharing%2C%20critiquing%20and%20improving%20question%20items%20for%20homeworks%20and%20quizzes.%20Basically%20a%20wiki%20question%20bank%2C%20but%20more%20socially-oriented.%0D%0A%0D%0AIn%20my%20last%20post%2C%20I%20was..." title="del.icio.us"><img src="http://openeducationresearch.org/wp-content/plugins/sociable/images/delicious.png" title="del.icio.us" alt="del.icio.us" class="sociable-hovers" /></a>
	<a rel="nofollow"  target="_blank" href="http://www.facebook.com/share.php?u=http%3A%2F%2Fopeneducationresearch.org%2F2009%2F07%2Fplone-drupal-moodle-and-atutor%2F&amp;t=Plone%2C%20Drupal%2C%20Moodle%20and%20ATutor" title="Facebook"><img src="http://openeducationresearch.org/wp-content/plugins/sociable/images/facebook.png" title="Facebook" alt="Facebook" class="sociable-hovers" /></a>
	<a rel="nofollow"  target="_blank" href="http://www.mixx.com/submit?page_url=http%3A%2F%2Fopeneducationresearch.org%2F2009%2F07%2Fplone-drupal-moodle-and-atutor%2F&amp;title=Plone%2C%20Drupal%2C%20Moodle%20and%20ATutor" title="Mixx"><img src="http://openeducationresearch.org/wp-content/plugins/sociable/images/mixx.png" title="Mixx" alt="Mixx" class="sociable-hovers" /></a>
	<a rel="nofollow"  target="_blank" href="http://www.google.com/bookmarks/mark?op=edit&amp;bkmk=http%3A%2F%2Fopeneducationresearch.org%2F2009%2F07%2Fplone-drupal-moodle-and-atutor%2F&amp;title=Plone%2C%20Drupal%2C%20Moodle%20and%20ATutor&amp;annotation=I%27m%20overdue%20for%20an%20update%20here%20on%20what%20I%27ve%20been%20working%20on.%20%20My%20current%20project%20is%20a%20web%20application%20for%20collaboratively%20sharing%2C%20critiquing%20and%20improving%20question%20items%20for%20homeworks%20and%20quizzes.%20Basically%20a%20wiki%20question%20bank%2C%20but%20more%20socially-oriented.%0D%0A%0D%0AIn%20my%20last%20post%2C%20I%20was..." title="Google Bookmarks"><img src="http://openeducationresearch.org/wp-content/plugins/sociable/images/googlebookmark.png" title="Google Bookmarks" alt="Google Bookmarks" class="sociable-hovers" /></a>
	<a rel="nofollow"  target="_blank" href="http://www.connotea.org/addpopup?continue=confirm&amp;uri=http%3A%2F%2Fopeneducationresearch.org%2F2009%2F07%2Fplone-drupal-moodle-and-atutor%2F&amp;title=Plone%2C%20Drupal%2C%20Moodle%20and%20ATutor&amp;description=I%27m%20overdue%20for%20an%20update%20here%20on%20what%20I%27ve%20been%20working%20on.%20%20My%20current%20project%20is%20a%20web%20application%20for%20collaboratively%20sharing%2C%20critiquing%20and%20improving%20question%20items%20for%20homeworks%20and%20quizzes.%20Basically%20a%20wiki%20question%20bank%2C%20but%20more%20socially-oriented.%0D%0A%0D%0AIn%20my%20last%20post%2C%20I%20was..." title="connotea"><img src="http://openeducationresearch.org/wp-content/plugins/sociable/images/connotea.png" title="connotea" alt="connotea" class="sociable-hovers" /></a>
	<a rel="nofollow"  target="_blank" href="http://www.diigo.com/post?url=http%3A%2F%2Fopeneducationresearch.org%2F2009%2F07%2Fplone-drupal-moodle-and-atutor%2F&amp;title=Plone%2C%20Drupal%2C%20Moodle%20and%20ATutor" title="Diigo"><img src="http://openeducationresearch.org/wp-content/plugins/sociable/images/diigo.png" title="Diigo" alt="Diigo" class="sociable-hovers" /></a>
	<a rel="nofollow"  target="_blank" href="http://twitter.com/home?status=Plone%2C%20Drupal%2C%20Moodle%20and%20ATutor%20-%20http%3A%2F%2Fopeneducationresearch.org%2F2009%2F07%2Fplone-drupal-moodle-and-atutor%2F" title="Twitter"><img src="http://openeducationresearch.org/wp-content/plugins/sociable/images/twitter.png" title="Twitter" alt="Twitter" class="sociable-hovers" /></a>


<br/><br/>]]></content:encoded>
			<wfw:commentRss>http://openeducationresearch.org/2009/07/plone-drupal-moodle-and-atutor/feed/</wfw:commentRss>
		<slash:comments>3</slash:comments>
		</item>
		<item>
		<title>MySQL with Python on Mac</title>
		<link>http://openeducationresearch.org/2008/12/mysql-with-python-on-mac/</link>
		<comments>http://openeducationresearch.org/2008/12/mysql-with-python-on-mac/#comments</comments>
		<pubDate>Sun, 07 Dec 2008 22:08:00 +0000</pubDate>
		<dc:creator>Turadg</dc:creator>
				<category><![CDATA[code]]></category>
		<category><![CDATA[python]]></category>

		<guid isPermaLink="false">http://openeducationresearch.org/?p=11</guid>
		<description><![CDATA[This entry will be more technical than most, keying of the &#8220;open&#8221; and &#8220;research&#8221; more than &#8220;education&#8221;. In an analysis I&#8217;m working on, I&#8217;m going to be munging the data all sorts of ways and the graphical statistics environment I&#8217;ve been using (JMP) is going to be painful for me to use. Particularly because it [...]]]></description>
			<content:encoded><![CDATA[<p>This entry will be more technical than most, keying of the &#8220;open&#8221; and &#8220;research&#8221; more than &#8220;education&#8221;.</p>
<p>In an analysis I&#8217;m working on, I&#8217;m going to be munging the data all sorts of ways and the graphical statistics environment I&#8217;ve been using (JMP) is going to be painful for me to use.  Particularly because it updates state and it&#8217;s hard to remember how I got there.  I&#8217;ve had great success on a project recently using GNU Make to process the data from raw to beautiful and I want to try that here.</p>
<p>In my other project, the raw data is in XML so I got handy with Python and an XML processor.  In this project, my raw data is in a MySQL database.  I thought that would be as straightforward, but it hasn&#8217;t been.  That may be due more to using a Mac this time around though (as opposed to Windows and Linux previously).</p>
<p>In any event, here is what I had to do to get the <a href="http://pypi.python.org/pypi/MySQL-python/1.2.2">MySQL-python</a> on my MacBook Pro.  I hope this saves someone else the trouble.  In the end, I made an .egg, so if you want to skip the rest you can just download that: <a href="http://www.cs.cmu.edu/%7Etaleahma/projects/misc/MySQL_python-1.2.2-py2.5-macosx-10.5-i386.egg">MySQL_python-1.2.2-py2.5-macosx-10.5-i386.egg</a></p>
<p>First I had to get <a href="http://peak.telecommunity.com/DevCenter/setuptools">setuptools</a> working.  I noticed had two versions of Python installed, Leopard&#8217;s and MacPorts&#8217;, and decided to remove the MacPorts one to keep things clean.  (Incidentally, I regret ever making use of MacPorts.  I&#8217;ve much rather have built binaries ala Fink.)  Once I had setuptools working I thought I could install the MySQL driver with simply,</p>
<p><tt>easy_install MySQL-python</tt></p>
<p>Unfortunately, that fails with a compile error,</p>
<pre>In file included from /usr/local/mysql/include/mysql.h:47,                 from _mysql.c:40:/usr/include/sys/types.h:92: error: duplicate ‘unsigned’/usr/include/sys/types.h:92: error: two or more data types in declaration specifierserror: Setup script exited with error: command 'gcc' failed with exit status 1</pre>
<p>Fortunately I found a <a href="http://www.brainfault.com/2008/04/18/install-python-mysql-mysqldb-on-mac-osx/">blog that provided a workaround</a>,<br />Install MySQL server from <a href="http://mysql.com/">mysql.com</a><br />Download and unpack the MySQLdb package (download URL <a href="http://pypi.python.org/pypi/MySQL-python/1.2.2">here</a>)<br />Fix the path to mysql_config, either by editing setup-posix.py (editing mysql_config.path value) or adding <tt>/usr/local/mysql/bin/</tt> to your PATH.  (i.e. export PATH=$PATH:/usr/local/mysql/bin/)<br />In the folder run <tt>python setup.py clean</tt> and <tt>python setup.py build</tt></p>
<p>At this point you&#8217;ll probably get this error,</p>
<p><tt>/usr/include/sys/types.h:92: error: duplicate ‘unsigned’/usr/include/sys/types.h:92: error: two or more data types in declaration specifiers</tt></p>
<p>To get around this, edit _mysql.c to change</p>
<p><tt>#define uint unsigned int</tt><br />to</p>
<p><tt>#define /* uint unsigned int */</tt><br />Then build again.  You&#8217;ll probably see this warning,</p>
<pre>ld: warning in build/temp.macosx-10.5-i386-2.5/_mysql.o, file is not of required architectureld: warning in /usr/local/mysql/lib/libmysqlclient_r.dylib, file is not of required architectureld: warning in /usr/local/mysql/lib/libmygcc.a, file is not of required architecture</pre>
<p>I ignored them and haven&#8217;t encountered any problems.  I&#8217;m on a 32-bit Intel Mac though.  If you&#8217;re on 64-bit, <a href="http://blog.fourspaces.com/2008/07/16/python-mysql-mac-frustration/">this blog post</a> may be able to help.</p>
<p>Run <tt>sudo python setup.py install</tt> to install.</p>
<p>Then I ran <a href="http://www.kitebird.com/articles/pydbapi.html#TOC_3">this code</a> to test. Once I knew it was working, I tried to find a way to share the binary.  I was able to build a binary .egg with <tt>python setup.py bdist_egg</tt>, which made <a href="http://www.cs.cmu.edu/%7Etaleahma/projects/misc/MySQL_python-1.2.2-py2.5-macosx-10.5-i386.egg" style="font-family: &quot;Courier New&quot;,Courier,monospace;">MySQL_python-1.2.2-py2.5-macosx-10.5-i386.egg</a></p>
<p>I&#8217;d like to upload it to the <a href="http://pypi.python.org/pypi/MySQL-python/1.2.2">PyPi record</a>, having registered and set up my<a href="http://www.python.org/doc/2.5.2/dist/pypirc.html"> .pypirc file</a>, but I don&#8217;t have permission.  After writing this, I will contact to package index owner, Andy Dustman, and see if he can include it.  If he does, then the simple command I was expecting at first should work for 32-bit Mac users now on.</p>
<p><tt>easy_install MySQL-python</tt></p>
<p>And until then, this negligibly longer command should work,</p>
<p><tt>easy_install http://www.cs.cmu.edu/%7Etaleahma/projects/misc/MySQL_python-1.2.2-py2.5-macosx-10.5-i386.egg</tt></p>



Share...


	<a rel="nofollow"  target="_blank" href="http://www.printfriendly.com/print?url=http%3A%2F%2Fopeneducationresearch.org%2F2008%2F12%2Fmysql-with-python-on-mac%2F&amp;partner=sociable" title="Print"><img src="http://openeducationresearch.org/wp-content/plugins/sociable/images/printfriendly.png" title="Print" alt="Print" class="sociable-hovers" /></a>
	<a rel="nofollow"  target="_blank" href="http://digg.com/submit?phase=2&amp;url=http%3A%2F%2Fopeneducationresearch.org%2F2008%2F12%2Fmysql-with-python-on-mac%2F&amp;title=MySQL%20with%20Python%20on%20Mac&amp;bodytext=This%20entry%20will%20be%20more%20technical%20than%20most%2C%20keying%20of%20the%20%22open%22%20and%20%22research%22%20more%20than%20%22education%22.In%20an%20analysis%20I%27m%20working%20on%2C%20I%27m%20going%20to%20be%20munging%20the%20data%20all%20sorts%20of%20ways%20and%20the%20graphical%20statistics%20environment%20I%27ve%20been%20using%20%28JMP%29%20is" title="Digg"><img src="http://openeducationresearch.org/wp-content/plugins/sociable/images/digg.png" title="Digg" alt="Digg" class="sociable-hovers" /></a>
	<a rel="nofollow"  target="_blank" href="http://delicious.com/post?url=http%3A%2F%2Fopeneducationresearch.org%2F2008%2F12%2Fmysql-with-python-on-mac%2F&amp;title=MySQL%20with%20Python%20on%20Mac&amp;notes=This%20entry%20will%20be%20more%20technical%20than%20most%2C%20keying%20of%20the%20%22open%22%20and%20%22research%22%20more%20than%20%22education%22.In%20an%20analysis%20I%27m%20working%20on%2C%20I%27m%20going%20to%20be%20munging%20the%20data%20all%20sorts%20of%20ways%20and%20the%20graphical%20statistics%20environment%20I%27ve%20been%20using%20%28JMP%29%20is" title="del.icio.us"><img src="http://openeducationresearch.org/wp-content/plugins/sociable/images/delicious.png" title="del.icio.us" alt="del.icio.us" class="sociable-hovers" /></a>
	<a rel="nofollow"  target="_blank" href="http://www.facebook.com/share.php?u=http%3A%2F%2Fopeneducationresearch.org%2F2008%2F12%2Fmysql-with-python-on-mac%2F&amp;t=MySQL%20with%20Python%20on%20Mac" title="Facebook"><img src="http://openeducationresearch.org/wp-content/plugins/sociable/images/facebook.png" title="Facebook" alt="Facebook" class="sociable-hovers" /></a>
	<a rel="nofollow"  target="_blank" href="http://www.mixx.com/submit?page_url=http%3A%2F%2Fopeneducationresearch.org%2F2008%2F12%2Fmysql-with-python-on-mac%2F&amp;title=MySQL%20with%20Python%20on%20Mac" title="Mixx"><img src="http://openeducationresearch.org/wp-content/plugins/sociable/images/mixx.png" title="Mixx" alt="Mixx" class="sociable-hovers" /></a>
	<a rel="nofollow"  target="_blank" href="http://www.google.com/bookmarks/mark?op=edit&amp;bkmk=http%3A%2F%2Fopeneducationresearch.org%2F2008%2F12%2Fmysql-with-python-on-mac%2F&amp;title=MySQL%20with%20Python%20on%20Mac&amp;annotation=This%20entry%20will%20be%20more%20technical%20than%20most%2C%20keying%20of%20the%20%22open%22%20and%20%22research%22%20more%20than%20%22education%22.In%20an%20analysis%20I%27m%20working%20on%2C%20I%27m%20going%20to%20be%20munging%20the%20data%20all%20sorts%20of%20ways%20and%20the%20graphical%20statistics%20environment%20I%27ve%20been%20using%20%28JMP%29%20is" title="Google Bookmarks"><img src="http://openeducationresearch.org/wp-content/plugins/sociable/images/googlebookmark.png" title="Google Bookmarks" alt="Google Bookmarks" class="sociable-hovers" /></a>
	<a rel="nofollow"  target="_blank" href="http://www.connotea.org/addpopup?continue=confirm&amp;uri=http%3A%2F%2Fopeneducationresearch.org%2F2008%2F12%2Fmysql-with-python-on-mac%2F&amp;title=MySQL%20with%20Python%20on%20Mac&amp;description=This%20entry%20will%20be%20more%20technical%20than%20most%2C%20keying%20of%20the%20%22open%22%20and%20%22research%22%20more%20than%20%22education%22.In%20an%20analysis%20I%27m%20working%20on%2C%20I%27m%20going%20to%20be%20munging%20the%20data%20all%20sorts%20of%20ways%20and%20the%20graphical%20statistics%20environment%20I%27ve%20been%20using%20%28JMP%29%20is" title="connotea"><img src="http://openeducationresearch.org/wp-content/plugins/sociable/images/connotea.png" title="connotea" alt="connotea" class="sociable-hovers" /></a>
	<a rel="nofollow"  target="_blank" href="http://www.diigo.com/post?url=http%3A%2F%2Fopeneducationresearch.org%2F2008%2F12%2Fmysql-with-python-on-mac%2F&amp;title=MySQL%20with%20Python%20on%20Mac" title="Diigo"><img src="http://openeducationresearch.org/wp-content/plugins/sociable/images/diigo.png" title="Diigo" alt="Diigo" class="sociable-hovers" /></a>
	<a rel="nofollow"  target="_blank" href="http://twitter.com/home?status=MySQL%20with%20Python%20on%20Mac%20-%20http%3A%2F%2Fopeneducationresearch.org%2F2008%2F12%2Fmysql-with-python-on-mac%2F" title="Twitter"><img src="http://openeducationresearch.org/wp-content/plugins/sociable/images/twitter.png" title="Twitter" alt="Twitter" class="sociable-hovers" /></a>


<br/><br/>]]></content:encoded>
			<wfw:commentRss>http://openeducationresearch.org/2008/12/mysql-with-python-on-mac/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
	</channel>
</rss>
