<?xml version="1.0"?>
<feed xmlns="http://www.w3.org/2005/Atom" xml:lang="en">
	<id>https://wiki.sugarlabs.org/api.php?action=feedcontributions&amp;feedformat=atom&amp;user=Bbl5660</id>
	<title>Sugar Labs - User contributions [en]</title>
	<link rel="self" type="application/atom+xml" href="https://wiki.sugarlabs.org/api.php?action=feedcontributions&amp;feedformat=atom&amp;user=Bbl5660"/>
	<link rel="alternate" type="text/html" href="https://wiki.sugarlabs.org/go/Special:Contributions/Bbl5660"/>
	<updated>2026-04-11T08:06:07Z</updated>
	<subtitle>User contributions</subtitle>
	<generator>MediaWiki 1.43.0</generator>
	<entry>
		<id>https://wiki.sugarlabs.org/index.php?title=VirtualBox&amp;diff=36968</id>
		<title>VirtualBox</title>
		<link rel="alternate" type="text/html" href="https://wiki.sugarlabs.org/index.php?title=VirtualBox&amp;diff=36968"/>
		<updated>2009-09-07T23:47:20Z</updated>

		<summary type="html">&lt;p&gt;Bbl5660: &lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;{{TOCright}}&lt;br /&gt;
[[wikipedia:VirtualBox|VirtualBox]] is an x86 virtualization system available as either GPL or commercial software. It runs on either Win32, Intel Mac or Linux host machines, allowing you to run [[Emulator image files|OLPC images]] within the virtual machine. The following instructions are mostly for VirtualBox OSE (Open Source Edition), which is available in packages in many Linux distributions. You can also download it and its documentation from the [http://www.virtualbox.org/ VirtualBox.org] Web site.&lt;br /&gt;
&lt;br /&gt;
==Sugar on a Stick==&lt;br /&gt;
These are instructions for using a copy of Sugar on a Stick, configured to run in a VirtualBox&amp;lt;sup&amp;gt;®&amp;lt;/sup&amp;gt; virtual appliance (a virtual machine disc image ready to run in the VirtualBox host application).&lt;br /&gt;
&lt;br /&gt;
* Download http://www.sugarlabs.org/static/soas/soas-strawberry-vdi.zip (dated: 24 June 2009)&lt;br /&gt;
* Unzip the file you just downloaded and remember where you put it - you&#039;ll get a .vdi file.&lt;br /&gt;
* Follow the instructions below to get and configure the VirtualBox host application.&lt;br /&gt;
&lt;br /&gt;
Please be aware of the fact that this is still beta quality and not at all ready for production use. You might want to create your own VirtualBox disc image from another snapshot or iso disc file. Instructions to do so are located here, [[VirtualBox/Preparing a disk image]].&lt;br /&gt;
&lt;br /&gt;
You can also convert .img image files from [[QEMU | qemu]] formats, such as qcow2, to vmdk format, which VirtualBox can open. The qemu-img command usually detects the source image format automatically.&lt;br /&gt;
&lt;br /&gt;
 $ qemu-img convert -O vmdk file.img file.vmdk&lt;br /&gt;
&lt;br /&gt;
* USB (2GB or larger) Boot Stick to run VirtualBox Images:&lt;br /&gt;
 see:http://wiki.sugarlabs.org/go/VMware#Running_VMPlayer_and_an_Appliance_using_a_Single_8_GB_USB_Boot_Stick&lt;br /&gt;
 Download VirtualBox OSE program and install instead of VMPlayer&lt;br /&gt;
 Boot PC from stick and run images on same or 2nd stick.&lt;br /&gt;
&lt;br /&gt;
==Install VirtualBox==&lt;br /&gt;
=== OS X ===&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
# Download VirtualBox for OS X from here, http://www.virtualbox.org/wiki/Downloads&lt;br /&gt;
# If you haven&#039;t done so yet, you should start the download of [[http://wiki.sugarlabs.org/go/VirtualBox#Sugar_on_a_Stick Sugar on a Stick vdi]]&lt;br /&gt;
# Install it by opening the DMG.&lt;br /&gt;
# Follow the instructions in the window&lt;br /&gt;
## Double click VirtualBox.mpkg&lt;br /&gt;
## If you see a warning about running a program from the internet click OK to run it.&lt;br /&gt;
## click continue until you see the license popup, click Agree.&lt;br /&gt;
## Choose location to install, probably something like Macintosh HD then click Continue.&lt;br /&gt;
## Click Continue, then Install. Enter password if required.&lt;br /&gt;
# Now you can run VirtualBox by opening the Applications folder and double clicking on the icon.&lt;br /&gt;
# Next Follow the instructions &#039;&#039;&#039;Setup a Virtual Machine for Sugar on a Stick&#039;&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
You can watch a screencast video of the rest of the process on a Mac here: http://tinyurl.com/nz4rhd.&lt;br /&gt;
&lt;br /&gt;
=== Windows ===&lt;br /&gt;
&lt;br /&gt;
: Download from http://www.virtualbox.org/wiki/Downloads.&lt;br /&gt;
&lt;br /&gt;
=== Linux ===&lt;br /&gt;
:See http://www.virtualbox.org/wiki/Linux_Downloads&lt;br /&gt;
:For Ubuntu, it is available in Synaptic Package Manager, once you add the the URI, distribution &amp;amp; components to your 3rd-party software sources or enter the following in your /etc/apt/sources.list.&lt;br /&gt;
 deb &amp;lt;nowiki&amp;gt;http://download.virtualbox.org/virtualbox/debian&amp;lt;/nowiki&amp;gt; &amp;lt;distribution&amp;gt; non-free&lt;br /&gt;
&lt;br /&gt;
:Install &#039;&#039;&#039;dkms&#039;&#039;&#039;, as well, so upgrades will update the kernel modules.&lt;br /&gt;
&lt;br /&gt;
 Ubuntu 8.04 Hardy: Use downloaded file from link above, Synaptic does not load&lt;br /&gt;
 Virtual Box that works [satellit 05/08/2009]&lt;br /&gt;
&lt;br /&gt;
==Setup a Virtual Machine for Sugar on a Stick==&lt;br /&gt;
(You can watch a screencast video of the process on a Mac here: http://tinyurl.com/nz4rhd.)&lt;br /&gt;
# In VirtualBox click New&lt;br /&gt;
# Click Next&lt;br /&gt;
# Enter a name &amp;quot;Sugar&amp;quot;&lt;br /&gt;
# Operating System: choose Linux&lt;br /&gt;
# Version: choose Fedora&lt;br /&gt;
# Click Next&lt;br /&gt;
# For memory leave 256 MB &lt;br /&gt;
# Click Next&lt;br /&gt;
# Virtual Hard Disk click Existing&lt;br /&gt;
# Click the little folder to the right of the selection box&lt;br /&gt;
## A new window pops up&lt;br /&gt;
## Click Add button in the toolbar&lt;br /&gt;
## Browse to the location where you extracted the .vdi disk image&lt;br /&gt;
## Click Open&lt;br /&gt;
## Click Select&lt;br /&gt;
# Click Next&lt;br /&gt;
# Click Finish&lt;br /&gt;
# Select Sugar on the left &lt;br /&gt;
# Click Start in the toolbar&lt;br /&gt;
# After a minute or two you should see the Sugar screen asking for you name&lt;br /&gt;
# Enter your name&lt;br /&gt;
# Click Done at the bottom of the window. You might have to scroll.&lt;br /&gt;
# From now on you can start VirtualBox and start the &amp;quot;Sugar&amp;quot; virtual machine&lt;br /&gt;
&lt;br /&gt;
===Issues===&lt;br /&gt;
&lt;br /&gt;
* Activating the Frame might be a little difficult. The lower 2 corners are easiest and you may want to configure edge activation in the My Settings &amp;gt; Frame panel.  With VirtualBox Guest Additions installed (see [[VirtualBox/Preparing_a_disk_image#Installing_VirtualBox_Guest_Additions| here]]), only the bottom edge and corners are available for Frame activation.&lt;br /&gt;
&lt;br /&gt;
* On Mac keyboards, you might wish to change the Virtual Box default key for switching the Sugar cursor to the normal one, as the default key (control right arrow on Mac keyboards) is trapped by Sugar. (Windows and Linux keyboards use Right Ctrl.) You may do this change in File/settings of the Virtual Box menu.&lt;br /&gt;
&lt;br /&gt;
==Mounting Drives==&lt;br /&gt;
&lt;br /&gt;
===Hard Drives===&lt;br /&gt;
&lt;br /&gt;
When booting from a CD image, with a hard drive image attached, you can mount the hard drive by creating an empty directory to mount it on. The form of the command is &lt;br /&gt;
&lt;br /&gt;
 $ mount -t ext3 /dev/sda1 /mnt/drive&lt;br /&gt;
&lt;br /&gt;
for the first hard drive. The mount point can be anywhere you have permission to create a directory, although /mnt and ~/mnt are the usual choices.&lt;br /&gt;
&lt;br /&gt;
This gives you a place to save files that cannot be written to CDs.&lt;br /&gt;
&lt;br /&gt;
===USB===&lt;br /&gt;
&lt;br /&gt;
USB access is not available in the Open Source Edition of VirtualBox.&lt;br /&gt;
&lt;br /&gt;
In order to access USB storage devices, the user must have access to the usbfs file system. The permissions for usbfs can be changed by editing the /etc/fstab file.&lt;br /&gt;
&lt;br /&gt;
For example, most Linux distributions have a user group called usb or similar, of which the current user must be a member. To give all users of that group access to usbfs, make sure the following line is present in /etc/fstab:&lt;br /&gt;
&lt;br /&gt;
 # 85 is the USB group&lt;br /&gt;
 none /proc/bus/usb usbfs devgid=85,devmode=664 0 0&lt;br /&gt;
&lt;br /&gt;
Replace 85 with the group ID that matches your system (search /etc/group for &amp;quot;usb&amp;quot; or similar).&lt;br /&gt;
&lt;br /&gt;
After this, you should be able to mount real USB drives in the normal manner.&lt;br /&gt;
&lt;br /&gt;
===Shared Directories===&lt;br /&gt;
&lt;br /&gt;
In order to access a directory on your real hard drive, VirtualBox needs the Guest Additions installed.&lt;br /&gt;
&lt;br /&gt;
Mount the VBoxGuestAdditions.iso file&lt;br /&gt;
&lt;br /&gt;
Change to the directory where your CD-ROM drive is mounted and execute as root:&lt;br /&gt;
&lt;br /&gt;
 sh ./VBoxLinuxAdditions-x86.run&lt;br /&gt;
&lt;br /&gt;
In a 64-bit Linux guest, use VBoxLinuxAdditions-amd64.run instead.&lt;br /&gt;
&lt;br /&gt;
After this installation, you can create a share in the VirtualBox GUI, and mount it in somewhat the normal way, but with the vboxsf file system type.&lt;br /&gt;
&lt;br /&gt;
 mount -t vboxsf [-o OPTIONS] sharename mountpoint&lt;br /&gt;
&lt;br /&gt;
==Resources==&lt;br /&gt;
* http://www.virtualbox.org/&lt;br /&gt;
* [[OLPC:VirtualBox]]&lt;br /&gt;
* [http://fedorasolved.org/Members/realz/VB_Guest_Addition How To Install Virtualbox Guest Additions in Fedora Guest]&lt;br /&gt;
&lt;br /&gt;
[[Category:HowTo]]&lt;/div&gt;</summary>
		<author><name>Bbl5660</name></author>
	</entry>
	<entry>
		<id>https://wiki.sugarlabs.org/index.php?title=User:Bbl5660&amp;diff=35234</id>
		<title>User:Bbl5660</title>
		<link rel="alternate" type="text/html" href="https://wiki.sugarlabs.org/index.php?title=User:Bbl5660&amp;diff=35234"/>
		<updated>2009-08-14T01:05:08Z</updated>

		<summary type="html">&lt;p&gt;Bbl5660: /* Project */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;=Brian Long=&lt;br /&gt;
&lt;br /&gt;
==About Me==&lt;br /&gt;
Hello, I am Brian Long, a 4th year Information Technology (I.T.) , major at the Rochester Institute of Technology[http://rit.edu].  I have pretty big interest in all things OLPC.  At RIT, I have taken classes in Java, Database Applications / Administration, PHP, SQL (PL/SQL, T SQL).&lt;br /&gt;
&lt;br /&gt;
I&#039;m very interested in learning more about the XO laptop, as well as Open Source education and Open Curriculum.  Currently working with the [[http://wiki.sugarlabs.org/go/Math4Team/RIT/| Math4Team at RIT]] to develop Math software for the XO. &amp;lt;br /&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
==The following are my accounts:==&lt;br /&gt;
&lt;br /&gt;
At the &#039;&#039;&#039;SugarLabs.org&#039;&#039;&#039; wiki here: http://wiki.sugarlabs.org/go/User:Bbl5660&lt;br /&gt;
&lt;br /&gt;
At the &#039;&#039;&#039;Laptop.org&#039;&#039;&#039; wiki here: http://wiki.laptop.org/go/User:Bbl5660&lt;br /&gt;
&lt;br /&gt;
On &#039;&#039;&#039;irc.freenode.net&#039;&#039;&#039; with the handle &#039;&#039;&#039;bbl5660&#039;&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
==[[Math4Team/Resources/Curriculum_Chart | Topics I am interested in]]==&lt;br /&gt;
* 4N4&lt;br /&gt;
* 4N5&lt;br /&gt;
* 4N6&lt;br /&gt;
&lt;br /&gt;
==Project==&lt;br /&gt;
&amp;lt;Placeholder&amp;gt;&lt;br /&gt;
(Beginning to write)&lt;br /&gt;
Alright, so clearly VirtualBox is the best way to an emulation environment up and running quickly.  It&#039;s time that I start publishing everything I&#039;ve researched and start spreading the word to the community.&lt;br /&gt;
&lt;br /&gt;
Points that need to be kept under consideration throughout spreading the word is that &amp;quot;the community&amp;quot; is dispersed!  This might have something to do with the fact that school&#039;s been out, and also the fact that this is truly a global effort.  We&#039;ve people at the sugar labs wiki, the laptop.org wiki and our FourthGradeMath mailing list.&lt;br /&gt;
&lt;br /&gt;
I&#039;m also going to try and get close to some key people w/ Sugar (SoaS team?), OLPC, and maybe even VirtualBox.&lt;br /&gt;
&lt;br /&gt;
Now is crunch time, this little project of mine needs to be delivered SOON!&lt;br /&gt;
&lt;br /&gt;
I&#039;ve got VirtualBox running! Time to start pushing (or pulling?) code to it!  I&#039;ll probably end up working with / updating this page: http://wiki.laptop.org/go/Developers/Setup#Emulation_for_Development&lt;br /&gt;
&lt;br /&gt;
and this page:&lt;br /&gt;
&lt;br /&gt;
and this one:&lt;br /&gt;
&lt;br /&gt;
==Contact Info==&lt;br /&gt;
* Email me at &#039;&#039;&#039;bbl5660 /-\T  RIT(dot) EDU&#039;&#039;&#039;&lt;/div&gt;</summary>
		<author><name>Bbl5660</name></author>
	</entry>
	<entry>
		<id>https://wiki.sugarlabs.org/index.php?title=User:Bbl5660&amp;diff=35040</id>
		<title>User:Bbl5660</title>
		<link rel="alternate" type="text/html" href="https://wiki.sugarlabs.org/index.php?title=User:Bbl5660&amp;diff=35040"/>
		<updated>2009-08-09T20:13:53Z</updated>

		<summary type="html">&lt;p&gt;Bbl5660: /* Project */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;=Brian Long=&lt;br /&gt;
&lt;br /&gt;
==About Me==&lt;br /&gt;
Hello, I am Brian Long, a 4th year Information Technology (I.T.) , major at the Rochester Institute of Technology[http://rit.edu].  I have pretty big interest in all things OLPC.  At RIT, I have taken classes in Java, Database Applications / Administration, PHP, SQL (PL/SQL, T SQL).&lt;br /&gt;
&lt;br /&gt;
I&#039;m very interested in learning more about the XO laptop, as well as Open Source education and Open Curriculum.  Currently working with the [[http://wiki.sugarlabs.org/go/Math4Team/RIT/| Math4Team at RIT]] to develop Math software for the XO. &amp;lt;br /&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
==The following are my accounts:==&lt;br /&gt;
&lt;br /&gt;
At the &#039;&#039;&#039;SugarLabs.org&#039;&#039;&#039; wiki here: http://wiki.sugarlabs.org/go/User:Bbl5660&lt;br /&gt;
&lt;br /&gt;
At the &#039;&#039;&#039;Laptop.org&#039;&#039;&#039; wiki here: http://wiki.laptop.org/go/User:Bbl5660&lt;br /&gt;
&lt;br /&gt;
On &#039;&#039;&#039;irc.freenode.net&#039;&#039;&#039; with the handle &#039;&#039;&#039;bbl5660&#039;&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
==[[Math4Team/Resources/Curriculum_Chart | Topics I am interested in]]==&lt;br /&gt;
* 4N4&lt;br /&gt;
* 4N5&lt;br /&gt;
* 4N6&lt;br /&gt;
&lt;br /&gt;
==Project==&lt;br /&gt;
&amp;lt;Placeholder&amp;gt;&lt;br /&gt;
(Beginning to write)&lt;br /&gt;
Alright, so clearly VirtualBox is the best way to an emulation environment up and running quickly.  It&#039;s time that I start publishing everything I&#039;ve researched and start spreading the word to the community.&lt;br /&gt;
&lt;br /&gt;
Points that need to be kept under consideration throughout spreading the word is that &amp;quot;the community&amp;quot; is dispersed!  This might have something to do with the fact that school&#039;s been out, and also the fact that this is truly a global effort.  We&#039;ve people at the sugar labs wiki, the laptop.org wiki and our FourthGradeMath mailing list.&lt;br /&gt;
&lt;br /&gt;
I&#039;m also going to try and get close to some key people w/ Sugar (SoaS team?), OLPC, and maybe even VirtualBox.&lt;br /&gt;
&lt;br /&gt;
Now is crunch time, this little project of mine needs to be delivered SOON!&lt;br /&gt;
&lt;br /&gt;
==Contact Info==&lt;br /&gt;
* Email me at &#039;&#039;&#039;bbl5660 /-\T  RIT(dot) EDU&#039;&#039;&#039;&lt;/div&gt;</summary>
		<author><name>Bbl5660</name></author>
	</entry>
	<entry>
		<id>https://wiki.sugarlabs.org/index.php?title=Math4Team/RIT/Projects/Question_Support_API&amp;diff=29442</id>
		<title>Math4Team/RIT/Projects/Question Support API</title>
		<link rel="alternate" type="text/html" href="https://wiki.sugarlabs.org/index.php?title=Math4Team/RIT/Projects/Question_Support_API&amp;diff=29442"/>
		<updated>2009-05-18T19:48:19Z</updated>

		<summary type="html">&lt;p&gt;Bbl5660: /* &amp;quot;How to Play/Use&amp;quot; for end user */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;{{TOCright}}&lt;br /&gt;
==Question Support API==&lt;br /&gt;
===Project Information===&lt;br /&gt;
{{Definition_table&lt;br /&gt;
|Primary Project Contact| [[User:Enimihil|Greg Stevens]]&lt;br /&gt;
|Project Members| [[User:Enimihil|Greg Stevens]], [[User:Jfinney|Jameson Finney]], [[User:Bbl5660|Brian Long]]&lt;br /&gt;
|Source Repository| http://git.sugarlabs.org/projects/question-support-api&lt;br /&gt;
}}&lt;br /&gt;
&lt;br /&gt;
===Current Goals===&lt;br /&gt;
&lt;br /&gt;
* Documentation&lt;br /&gt;
** Packaging&lt;br /&gt;
** Documenting Dependencies and how to enable them in a development environment (Simple tutorial on setting up your Question API Development Environment)&lt;br /&gt;
** Question Authoring guidelines&lt;br /&gt;
** Integrate within lesson planning&lt;br /&gt;
** How does an instructor get the questions they have written/found into an Activity?&lt;br /&gt;
* Liase w/ other Math4 teams and Sugarlabs (What would it take to be included in the Sugar core?)&lt;br /&gt;
* Future Development (Needs / Wants — collect proposals from other teams)&lt;br /&gt;
* Discovery / Plugin  (How do activities find questions, i.e. how to get URIs to load questions from?)&lt;br /&gt;
&lt;br /&gt;
===Setting Up a Development Environment (For Newbies)===&lt;br /&gt;
These are links, tutorials and things that [[User:Bbl5660|Brian Long]] has found along the way, as well as help gained from [[User:Enimihil|Greg Stevens]].  Brian is new to the Linux / OpenSource community, and is working on documenting a development environment for &amp;lt;b&amp;gt;you&amp;lt;/b&amp;gt; and for us to continue developing this API.  The small amount of information below is meant to help someone new step into the world of developing for the Sugar environment, from Ubuntu and have all  dependencies and things setup to continue development of this API.  &amp;lt;b&amp;gt;Next&amp;lt;/b&amp;gt; Brian would like to document how to setup these sort of items for [http://wiki.laptop.org/go/Creating_an_activity Activity developers] to include our API and be able to extend it.&lt;br /&gt;
&lt;br /&gt;
* For development environments, you may consider consider first installing a linux OS and the the LAMP stack with PhpMyAdmin.  Brian is choosing Ubuntu, Aptana as a (free) Python IDE that can be used with PyDev to easily allow Python writing.  &lt;br /&gt;
* Links that Brian is relying on at the moment include:&lt;br /&gt;
** http://help.ubuntu.com/community/ApacheMySQLPHP&lt;br /&gt;
** http://www.sqlalchemy.org/docs/04/ormtutorial.html&lt;br /&gt;
** http://docs.python.org/&lt;br /&gt;
** http://andrewbleakley.com/blog/2008/11/01/installing-and-running-aptana-on-ubuntu-810/&lt;br /&gt;
** http://forums.aptana.com/viewtopic.php?f=37&amp;amp;t=7147&amp;amp;p=32918&amp;amp;hilit=ubuntu#p32918&lt;br /&gt;
&lt;br /&gt;
====Dependencies====&lt;br /&gt;
&amp;lt;!-- Development for Linux / Python / Sugar Newbies! --&amp;gt;&lt;br /&gt;
;The following are required by the Question Support API.&lt;br /&gt;
:python-setuptools&lt;br /&gt;
:pyparsing&lt;br /&gt;
:peak-rules&lt;br /&gt;
:sqlalchemy&lt;br /&gt;
&lt;br /&gt;
;You can install these via a linux terminal in this manner:&lt;br /&gt;
        sudo apt-get install python-setuptools&lt;br /&gt;
        sudo easy_install pyparsing&lt;br /&gt;
        sudo easy_install peak-rules&lt;br /&gt;
        sudo easy_install sqlalchemy&lt;br /&gt;
&lt;br /&gt;
;Exception: When developing on a Fedora based distro, you&#039;ll need to install python-setuptools-devel for easy_install&lt;br /&gt;
&lt;br /&gt;
===Motivation===&lt;br /&gt;
In the RIT class working on the Math4 projects, many proposed activities&lt;br /&gt;
require a question database of some kind.  A common API or library for&lt;br /&gt;
accessing databases in different formats, stored either locally or remotely,&lt;br /&gt;
along with a simple mechanism to determine more complex formatting or&lt;br /&gt;
presentation than simple text (e.g. to include simple graphics or&lt;br /&gt;
mathematical notation) would cover a majority of the cases where the&lt;br /&gt;
activity needs some configurable &amp;quot;curriculum data&amp;quot;.&lt;br /&gt;
&lt;br /&gt;
Eventually this library could be extended to provide hints, explanations, or&lt;br /&gt;
walkthroughs for questions, in addition to the basic metadata about level,&lt;br /&gt;
grouping, difficulty, and subject matter that would be part of the base&lt;br /&gt;
system.&lt;br /&gt;
&lt;br /&gt;
===Envisioned Usage===&lt;br /&gt;
Consider a simple flash-card-like activity.  It presents a question from a&lt;br /&gt;
list of questions, allows the student to select an answer from the provided&lt;br /&gt;
answers for the question or to enter their own answer.  Then the correct&lt;br /&gt;
answer is revealed and the student it told whether their answer is correct.&lt;br /&gt;
If the question has an explanation of the correct answer, the flash-card&lt;br /&gt;
activity will show the explanation of the correct answer.  (Note that this&lt;br /&gt;
is just a simple usage example, the interaction design of a drilling&lt;br /&gt;
activity could be very different.)&lt;br /&gt;
&lt;br /&gt;
The flash-card activity would use this proposed Quiz API for the following:&lt;br /&gt;
&lt;br /&gt;
* Loading the questions from the storage location into memory. This includes any filtering or network lookup to download the questions from a remote resource and select appropriate questions for the student.&lt;br /&gt;
&lt;br /&gt;
* Determining whether the student has entered a correct answer.&lt;br /&gt;
&lt;br /&gt;
To start with, the library would simply be a time-saving tool for developers&lt;br /&gt;
needing similar functionality, but as the XS (School Server) becomes more&lt;br /&gt;
fully developed the library should integrate the functions provided by the&lt;br /&gt;
XS to enable automated update of course material for the current topic of&lt;br /&gt;
study so the students can drill material using any tool they prefer, while&lt;br /&gt;
still reporting progress to the instructor using the XS services.&lt;br /&gt;
&lt;br /&gt;
===Current Status===&lt;br /&gt;
&lt;br /&gt;
Currently, (14 May 2009) the API supports parsing the GIFT file format well enough to import Multiple Choice and True/False questions, along with complete implementations for basic functionality of the corresponding question objects.  No support for partial credit answers is currently implemented, nor are other question types working correctly (though most can be parsed to some extent).  Export to CSV works as intended, though it is intentionally simple.  Documentation on usage and integration of the API into an activity is in the doc/ directory of [[http://git.sugarlabs.org/projects/question-support-api the repository]]. A simple, but complete usage example, using a console interface is available in tests/complete_test.py.&lt;br /&gt;
&lt;br /&gt;
===Current implementation===&lt;br /&gt;
1. Ensure that PyParser and PEAK-Rules are installed &amp;lt;br&amp;gt;&lt;br /&gt;
2. Include the quizdata module&lt;br /&gt;
    import quizdata&lt;br /&gt;
3. Select plain text output&lt;br /&gt;
    from quizdata.text import plain_text&lt;br /&gt;
4. Select desired question types&lt;br /&gt;
    from quizdata.question import MultipleChoiceQuestion, MissingWordQuestion&lt;br /&gt;
5. Import when function to assist with question sorting&lt;br /&gt;
    from peak.rules import when&lt;br /&gt;
6. Handle questions (this section should be rewritten as needed for your activity&lt;br /&gt;
    # this is the base case for any question type we don&#039;t handle otherwise.&lt;br /&gt;
    def do_question(q):&lt;br /&gt;
        print &amp;quot;Unhandled question type.&amp;quot;, type(q)&lt;br /&gt;
    # for multiple choice questions (incl. subclasses) we do this...&lt;br /&gt;
    @when(do_question, (MultipleChoiceQuestion,))&lt;br /&gt;
    def do_multi_questions(q):&lt;br /&gt;
        print plain_text(q.text)&lt;br /&gt;
        for a in zip(&#039;0123456789&#039;, q.answers):&lt;br /&gt;
            print &amp;quot;%5s: %s&amp;quot; % a&lt;br /&gt;
        answer = int(raw_input())&lt;br /&gt;
        q.answer = q.answers[answer]&lt;br /&gt;
        print q.correct&lt;br /&gt;
    # for missing word-style questions, which aren&#039;t implemented correctly yet, and&lt;br /&gt;
    # are a subclass of multiple choice questions... we make sure to ignore them&lt;br /&gt;
    # with a more specific rule.&lt;br /&gt;
    @when(do_question, (MissingWordQuestion,))&lt;br /&gt;
    def do_mw_question(q): # XXX: inheritance is annoying here...&lt;br /&gt;
        print &amp;quot;Unhandled question type. (MissingWordQuestion)&amp;quot;&lt;br /&gt;
7. Open questions&lt;br /&gt;
    questions = quizdata.open(&amp;quot;file://%s?format=gift&amp;quot; % path.join(base_path, &#039;tests&#039;, &#039;multi_choice.txt&#039;))&lt;br /&gt;
    for q in questions:&lt;br /&gt;
        do_question(q)&lt;br /&gt;
====&amp;quot;How to Play/Use&amp;quot; for end user====&lt;br /&gt;
This is a requirement of the RIT OLPC seminar.  The question doesn&#039;t exactly pertain to the API team&#039;s project, a more applicable question might be “How development of the API is done?” and “How do activity developers include / extend our API?”.&lt;br /&gt;
* The API is written in Python and has a set of [[#Dependencies|dependencies]], documented above.&lt;br /&gt;
* For activity developers to include our API into an activity, we&#039;re hoping to have the Sugar development team create a mechanism for developer&#039;s to install or include components.   [[User:Enimihil|Greg Stevens]]&#039;s has a bit more knowledge on this than  [[User:bbl5660|Brian]] or [[User:Jfinney|Jameson]], but we will be looking into how to package our API, and how it can be accessed by other Activities.  The issue with this later concept, is that Activities running on Sugar&#039;s platform are intentionally meant to be restricted to their own space inside of the Sugar environment.  This means that we&#039;ll either need to hack something together to make other Activities include our API, or we&#039;ll need to collaborate with people at Sugar and figure out the best practice to include our API.&lt;br /&gt;
&lt;br /&gt;
===Education Standards===&lt;br /&gt;
As a general API and not a standalone Activity, along with the nature of the API in specific, this project does not directly address any specific education standards or learning outcomes.  It is reliant on educators to write questions, or have questions available to them in usable formats.  As such, the potential educational standards this project could help to meet includes **any** standard where drilling or question/response evaluation is appropriate. (This includes a wider range of topic areas than the Math4 focus, even.)&lt;br /&gt;
&lt;br /&gt;
====A Teacher&#039;s Guide Abstract====&lt;br /&gt;
* Per the nature of this API, we&#039;ve decided that our “Teacher Guide” will be more of an abstract.  Below is a hypothetical situation of the Question Support API:Imagine a school manages a repository of quiz material that fit&#039;s some curriculum, and this repository is located at Moodle.org (for example the 4th Grade Math curriculum see: http://wiki.sugarlabs.org/go/User:Gdk/4th_Grade_Maths ).  The teacher&#039;s use of our API design might go something like this: &lt;br /&gt;
&lt;br /&gt;
* An activity that has extended / implemented our API is started by the teacher.  The teacher is presented with an input field that requires a URI (URL).  The teacher enters the URI of this week&#039;s quiz (i.e. http://moodle.org/SchoolName/ClassName/Week_11_Quiz/ )  The activity fetches the specified quiz data from the web, and presents the teacher with a summary and confirmation dialog box.  Upon confirmation, the teacher can send / assign the quiz to the class.  The class starts their corresponding activity which then also has a mechanism to either grab the assigned quiz from the Moodle.org server or from the local “School Server” (also-known-as the XS server, see: http://wiki.laptop.org/go/School_server ).  The student&#039;s complete their assigned quiz, and data is sent back to the server for reporting / grading.&lt;br /&gt;
&lt;br /&gt;
===Milestones===&lt;br /&gt;
;Initial Prototype Phase (1)&lt;br /&gt;
:Simple implementation, data model not yet nailed down, focus on import and utility to question *consumers*, Like Activities. Initial formats to include MoodleXML, GIFT.&lt;br /&gt;
        &lt;br /&gt;
;Rigorous Design Phase (2)&lt;br /&gt;
:Nail down the data model, including developing the &#039;native&#039; format, probably using a sqlite file mechanism, or other database support, if possible. Freeze the Question object (in terms of required properties,        etc.), finalize decisions about URLs for question aquisition.  Make sure requirements of other projects *can* be met by the design at this stage.&lt;br /&gt;
&lt;br /&gt;
;Full Implementation Phase (3)&lt;br /&gt;
:Complete the implementation of the import formats, including the &#039;native&#039; format.  Should be usable to other Activity developers at this point (hopefully useful, before now, but all needs should be filled at this point).  Export implementation should start now, along with prototyping for an authoring activity. (Collaboration with the reporting team *needs* to happen at this point, as the activity will probably be combined with reporting tools.)&lt;br /&gt;
&lt;br /&gt;
;Activity Development Phase (4)&lt;br /&gt;
:Complete the authoring/reporting activity for the teachers, allowing export to file formats (and possibly *serving* the questions to other XOs; requires support in activities (using the API) to support).&lt;br /&gt;
&lt;br /&gt;
===Community Contacts===&lt;br /&gt;
[[User:FGrose]], [[User:Tony37]] (see [[Talk:{{PAGENAMEE}}|talk page]])&lt;br /&gt;
&lt;br /&gt;
===RIT Project Usage===&lt;br /&gt;
{{Definition_table&lt;br /&gt;
|Produce Puzzle| No API need or usage.&lt;br /&gt;
|Lemonade Stand| No API need or usage.&lt;br /&gt;
|Assimilate| API Usage needs documented on [[Talk:{{PAGENAMEE}}|talk page]].  Progress not far enough to start implementation using the API.&lt;br /&gt;
|Fun Towers| No API need or usage.&lt;br /&gt;
|Reporting Team| Simple export format documented at [[{{PAGENAMEE}}/API_Design|API Design]].  Futher integration work would be nice, but there is more work than could be done in a year along these lines (and neither team is prepared to embark on it).&lt;br /&gt;
|Muthris| No contact from? Probably no API need or usage.&lt;br /&gt;
}}&lt;br /&gt;
===See Also===&lt;br /&gt;
{{Special:PrefixIndex/{{PAGENAMEE}}/}}&lt;/div&gt;</summary>
		<author><name>Bbl5660</name></author>
	</entry>
	<entry>
		<id>https://wiki.sugarlabs.org/index.php?title=Math4Team/RIT/Projects/Question_Support_API&amp;diff=29441</id>
		<title>Math4Team/RIT/Projects/Question Support API</title>
		<link rel="alternate" type="text/html" href="https://wiki.sugarlabs.org/index.php?title=Math4Team/RIT/Projects/Question_Support_API&amp;diff=29441"/>
		<updated>2009-05-18T19:47:28Z</updated>

		<summary type="html">&lt;p&gt;Bbl5660: /* &amp;quot;How to Play/Use&amp;quot; for end user */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;{{TOCright}}&lt;br /&gt;
==Question Support API==&lt;br /&gt;
===Project Information===&lt;br /&gt;
{{Definition_table&lt;br /&gt;
|Primary Project Contact| [[User:Enimihil|Greg Stevens]]&lt;br /&gt;
|Project Members| [[User:Enimihil|Greg Stevens]], [[User:Jfinney|Jameson Finney]], [[User:Bbl5660|Brian Long]]&lt;br /&gt;
|Source Repository| http://git.sugarlabs.org/projects/question-support-api&lt;br /&gt;
}}&lt;br /&gt;
&lt;br /&gt;
===Current Goals===&lt;br /&gt;
&lt;br /&gt;
* Documentation&lt;br /&gt;
** Packaging&lt;br /&gt;
** Documenting Dependencies and how to enable them in a development environment (Simple tutorial on setting up your Question API Development Environment)&lt;br /&gt;
** Question Authoring guidelines&lt;br /&gt;
** Integrate within lesson planning&lt;br /&gt;
** How does an instructor get the questions they have written/found into an Activity?&lt;br /&gt;
* Liase w/ other Math4 teams and Sugarlabs (What would it take to be included in the Sugar core?)&lt;br /&gt;
* Future Development (Needs / Wants — collect proposals from other teams)&lt;br /&gt;
* Discovery / Plugin  (How do activities find questions, i.e. how to get URIs to load questions from?)&lt;br /&gt;
&lt;br /&gt;
===Setting Up a Development Environment (For Newbies)===&lt;br /&gt;
These are links, tutorials and things that [[User:Bbl5660|Brian Long]] has found along the way, as well as help gained from [[User:Enimihil|Greg Stevens]].  Brian is new to the Linux / OpenSource community, and is working on documenting a development environment for &amp;lt;b&amp;gt;you&amp;lt;/b&amp;gt; and for us to continue developing this API.  The small amount of information below is meant to help someone new step into the world of developing for the Sugar environment, from Ubuntu and have all  dependencies and things setup to continue development of this API.  &amp;lt;b&amp;gt;Next&amp;lt;/b&amp;gt; Brian would like to document how to setup these sort of items for [http://wiki.laptop.org/go/Creating_an_activity Activity developers] to include our API and be able to extend it.&lt;br /&gt;
&lt;br /&gt;
* For development environments, you may consider consider first installing a linux OS and the the LAMP stack with PhpMyAdmin.  Brian is choosing Ubuntu, Aptana as a (free) Python IDE that can be used with PyDev to easily allow Python writing.  &lt;br /&gt;
* Links that Brian is relying on at the moment include:&lt;br /&gt;
** http://help.ubuntu.com/community/ApacheMySQLPHP&lt;br /&gt;
** http://www.sqlalchemy.org/docs/04/ormtutorial.html&lt;br /&gt;
** http://docs.python.org/&lt;br /&gt;
** http://andrewbleakley.com/blog/2008/11/01/installing-and-running-aptana-on-ubuntu-810/&lt;br /&gt;
** http://forums.aptana.com/viewtopic.php?f=37&amp;amp;t=7147&amp;amp;p=32918&amp;amp;hilit=ubuntu#p32918&lt;br /&gt;
&lt;br /&gt;
====Dependencies====&lt;br /&gt;
&amp;lt;!-- Development for Linux / Python / Sugar Newbies! --&amp;gt;&lt;br /&gt;
;The following are required by the Question Support API.&lt;br /&gt;
:python-setuptools&lt;br /&gt;
:pyparsing&lt;br /&gt;
:peak-rules&lt;br /&gt;
:sqlalchemy&lt;br /&gt;
&lt;br /&gt;
;You can install these via a linux terminal in this manner:&lt;br /&gt;
        sudo apt-get install python-setuptools&lt;br /&gt;
        sudo easy_install pyparsing&lt;br /&gt;
        sudo easy_install peak-rules&lt;br /&gt;
        sudo easy_install sqlalchemy&lt;br /&gt;
&lt;br /&gt;
;Exception: When developing on a Fedora based distro, you&#039;ll need to install python-setuptools-devel for easy_install&lt;br /&gt;
&lt;br /&gt;
===Motivation===&lt;br /&gt;
In the RIT class working on the Math4 projects, many proposed activities&lt;br /&gt;
require a question database of some kind.  A common API or library for&lt;br /&gt;
accessing databases in different formats, stored either locally or remotely,&lt;br /&gt;
along with a simple mechanism to determine more complex formatting or&lt;br /&gt;
presentation than simple text (e.g. to include simple graphics or&lt;br /&gt;
mathematical notation) would cover a majority of the cases where the&lt;br /&gt;
activity needs some configurable &amp;quot;curriculum data&amp;quot;.&lt;br /&gt;
&lt;br /&gt;
Eventually this library could be extended to provide hints, explanations, or&lt;br /&gt;
walkthroughs for questions, in addition to the basic metadata about level,&lt;br /&gt;
grouping, difficulty, and subject matter that would be part of the base&lt;br /&gt;
system.&lt;br /&gt;
&lt;br /&gt;
===Envisioned Usage===&lt;br /&gt;
Consider a simple flash-card-like activity.  It presents a question from a&lt;br /&gt;
list of questions, allows the student to select an answer from the provided&lt;br /&gt;
answers for the question or to enter their own answer.  Then the correct&lt;br /&gt;
answer is revealed and the student it told whether their answer is correct.&lt;br /&gt;
If the question has an explanation of the correct answer, the flash-card&lt;br /&gt;
activity will show the explanation of the correct answer.  (Note that this&lt;br /&gt;
is just a simple usage example, the interaction design of a drilling&lt;br /&gt;
activity could be very different.)&lt;br /&gt;
&lt;br /&gt;
The flash-card activity would use this proposed Quiz API for the following:&lt;br /&gt;
&lt;br /&gt;
* Loading the questions from the storage location into memory. This includes any filtering or network lookup to download the questions from a remote resource and select appropriate questions for the student.&lt;br /&gt;
&lt;br /&gt;
* Determining whether the student has entered a correct answer.&lt;br /&gt;
&lt;br /&gt;
To start with, the library would simply be a time-saving tool for developers&lt;br /&gt;
needing similar functionality, but as the XS (School Server) becomes more&lt;br /&gt;
fully developed the library should integrate the functions provided by the&lt;br /&gt;
XS to enable automated update of course material for the current topic of&lt;br /&gt;
study so the students can drill material using any tool they prefer, while&lt;br /&gt;
still reporting progress to the instructor using the XS services.&lt;br /&gt;
&lt;br /&gt;
===Current Status===&lt;br /&gt;
&lt;br /&gt;
Currently, (14 May 2009) the API supports parsing the GIFT file format well enough to import Multiple Choice and True/False questions, along with complete implementations for basic functionality of the corresponding question objects.  No support for partial credit answers is currently implemented, nor are other question types working correctly (though most can be parsed to some extent).  Export to CSV works as intended, though it is intentionally simple.  Documentation on usage and integration of the API into an activity is in the doc/ directory of [[http://git.sugarlabs.org/projects/question-support-api the repository]]. A simple, but complete usage example, using a console interface is available in tests/complete_test.py.&lt;br /&gt;
&lt;br /&gt;
===Current implementation===&lt;br /&gt;
1. Ensure that PyParser and PEAK-Rules are installed &amp;lt;br&amp;gt;&lt;br /&gt;
2. Include the quizdata module&lt;br /&gt;
    import quizdata&lt;br /&gt;
3. Select plain text output&lt;br /&gt;
    from quizdata.text import plain_text&lt;br /&gt;
4. Select desired question types&lt;br /&gt;
    from quizdata.question import MultipleChoiceQuestion, MissingWordQuestion&lt;br /&gt;
5. Import when function to assist with question sorting&lt;br /&gt;
    from peak.rules import when&lt;br /&gt;
6. Handle questions (this section should be rewritten as needed for your activity&lt;br /&gt;
    # this is the base case for any question type we don&#039;t handle otherwise.&lt;br /&gt;
    def do_question(q):&lt;br /&gt;
        print &amp;quot;Unhandled question type.&amp;quot;, type(q)&lt;br /&gt;
    # for multiple choice questions (incl. subclasses) we do this...&lt;br /&gt;
    @when(do_question, (MultipleChoiceQuestion,))&lt;br /&gt;
    def do_multi_questions(q):&lt;br /&gt;
        print plain_text(q.text)&lt;br /&gt;
        for a in zip(&#039;0123456789&#039;, q.answers):&lt;br /&gt;
            print &amp;quot;%5s: %s&amp;quot; % a&lt;br /&gt;
        answer = int(raw_input())&lt;br /&gt;
        q.answer = q.answers[answer]&lt;br /&gt;
        print q.correct&lt;br /&gt;
    # for missing word-style questions, which aren&#039;t implemented correctly yet, and&lt;br /&gt;
    # are a subclass of multiple choice questions... we make sure to ignore them&lt;br /&gt;
    # with a more specific rule.&lt;br /&gt;
    @when(do_question, (MissingWordQuestion,))&lt;br /&gt;
    def do_mw_question(q): # XXX: inheritance is annoying here...&lt;br /&gt;
        print &amp;quot;Unhandled question type. (MissingWordQuestion)&amp;quot;&lt;br /&gt;
7. Open questions&lt;br /&gt;
    questions = quizdata.open(&amp;quot;file://%s?format=gift&amp;quot; % path.join(base_path, &#039;tests&#039;, &#039;multi_choice.txt&#039;))&lt;br /&gt;
    for q in questions:&lt;br /&gt;
        do_question(q)&lt;br /&gt;
====&amp;quot;How to Play/Use&amp;quot; for end user====&lt;br /&gt;
This is a requirement of the RIT OLPC seminar.  The question doesn&#039;t exactly pertain to the API team&#039;s project, a more applicable question might be “How development of the API is done?” and “How do activity developers include / extend our API?”.&lt;br /&gt;
* The API is written in Python and has a set of [[#Dependencies|dependencies]], documented above.&lt;br /&gt;
* For activity developers to include our API into an activity, we&#039;re hoping to have the Sugar development team create a mechanism for developer&#039;s to install or include components.   [[User:Enimihil|Greg Stevens]]&#039;s has a bit more knowledge on this than  [[User:bbl5660|Brian]], but we will be looking into how to package our API, and how it can be accessed by other Activities.  The issue with this later concept, is that Activities running on Sugar&#039;s platform are intentionally meant to be restricted to their own space inside of the Sugar environment.  This means that we&#039;ll either need to hack something together to make other Activities include our API, or we&#039;ll need to collaborate with people at Sugar and figure out the best practice to include our API.&lt;br /&gt;
&lt;br /&gt;
===Education Standards===&lt;br /&gt;
As a general API and not a standalone Activity, along with the nature of the API in specific, this project does not directly address any specific education standards or learning outcomes.  It is reliant on educators to write questions, or have questions available to them in usable formats.  As such, the potential educational standards this project could help to meet includes **any** standard where drilling or question/response evaluation is appropriate. (This includes a wider range of topic areas than the Math4 focus, even.)&lt;br /&gt;
&lt;br /&gt;
====A Teacher&#039;s Guide Abstract====&lt;br /&gt;
* Per the nature of this API, we&#039;ve decided that our “Teacher Guide” will be more of an abstract.  Below is a hypothetical situation of the Question Support API:Imagine a school manages a repository of quiz material that fit&#039;s some curriculum, and this repository is located at Moodle.org (for example the 4th Grade Math curriculum see: http://wiki.sugarlabs.org/go/User:Gdk/4th_Grade_Maths ).  The teacher&#039;s use of our API design might go something like this: &lt;br /&gt;
&lt;br /&gt;
* An activity that has extended / implemented our API is started by the teacher.  The teacher is presented with an input field that requires a URI (URL).  The teacher enters the URI of this week&#039;s quiz (i.e. http://moodle.org/SchoolName/ClassName/Week_11_Quiz/ )  The activity fetches the specified quiz data from the web, and presents the teacher with a summary and confirmation dialog box.  Upon confirmation, the teacher can send / assign the quiz to the class.  The class starts their corresponding activity which then also has a mechanism to either grab the assigned quiz from the Moodle.org server or from the local “School Server” (also-known-as the XS server, see: http://wiki.laptop.org/go/School_server ).  The student&#039;s complete their assigned quiz, and data is sent back to the server for reporting / grading.&lt;br /&gt;
&lt;br /&gt;
===Milestones===&lt;br /&gt;
;Initial Prototype Phase (1)&lt;br /&gt;
:Simple implementation, data model not yet nailed down, focus on import and utility to question *consumers*, Like Activities. Initial formats to include MoodleXML, GIFT.&lt;br /&gt;
        &lt;br /&gt;
;Rigorous Design Phase (2)&lt;br /&gt;
:Nail down the data model, including developing the &#039;native&#039; format, probably using a sqlite file mechanism, or other database support, if possible. Freeze the Question object (in terms of required properties,        etc.), finalize decisions about URLs for question aquisition.  Make sure requirements of other projects *can* be met by the design at this stage.&lt;br /&gt;
&lt;br /&gt;
;Full Implementation Phase (3)&lt;br /&gt;
:Complete the implementation of the import formats, including the &#039;native&#039; format.  Should be usable to other Activity developers at this point (hopefully useful, before now, but all needs should be filled at this point).  Export implementation should start now, along with prototyping for an authoring activity. (Collaboration with the reporting team *needs* to happen at this point, as the activity will probably be combined with reporting tools.)&lt;br /&gt;
&lt;br /&gt;
;Activity Development Phase (4)&lt;br /&gt;
:Complete the authoring/reporting activity for the teachers, allowing export to file formats (and possibly *serving* the questions to other XOs; requires support in activities (using the API) to support).&lt;br /&gt;
&lt;br /&gt;
===Community Contacts===&lt;br /&gt;
[[User:FGrose]], [[User:Tony37]] (see [[Talk:{{PAGENAMEE}}|talk page]])&lt;br /&gt;
&lt;br /&gt;
===RIT Project Usage===&lt;br /&gt;
{{Definition_table&lt;br /&gt;
|Produce Puzzle| No API need or usage.&lt;br /&gt;
|Lemonade Stand| No API need or usage.&lt;br /&gt;
|Assimilate| API Usage needs documented on [[Talk:{{PAGENAMEE}}|talk page]].  Progress not far enough to start implementation using the API.&lt;br /&gt;
|Fun Towers| No API need or usage.&lt;br /&gt;
|Reporting Team| Simple export format documented at [[{{PAGENAMEE}}/API_Design|API Design]].  Futher integration work would be nice, but there is more work than could be done in a year along these lines (and neither team is prepared to embark on it).&lt;br /&gt;
|Muthris| No contact from? Probably no API need or usage.&lt;br /&gt;
}}&lt;br /&gt;
===See Also===&lt;br /&gt;
{{Special:PrefixIndex/{{PAGENAMEE}}/}}&lt;/div&gt;</summary>
		<author><name>Bbl5660</name></author>
	</entry>
	<entry>
		<id>https://wiki.sugarlabs.org/index.php?title=Math4Team/RIT/Projects/Question_Support_API&amp;diff=29440</id>
		<title>Math4Team/RIT/Projects/Question Support API</title>
		<link rel="alternate" type="text/html" href="https://wiki.sugarlabs.org/index.php?title=Math4Team/RIT/Projects/Question_Support_API&amp;diff=29440"/>
		<updated>2009-05-18T19:45:37Z</updated>

		<summary type="html">&lt;p&gt;Bbl5660: /* &amp;quot;How to Play/Use&amp;quot; for end user */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;{{TOCright}}&lt;br /&gt;
==Question Support API==&lt;br /&gt;
===Project Information===&lt;br /&gt;
{{Definition_table&lt;br /&gt;
|Primary Project Contact| [[User:Enimihil|Greg Stevens]]&lt;br /&gt;
|Project Members| [[User:Enimihil|Greg Stevens]], [[User:Jfinney|Jameson Finney]], [[User:Bbl5660|Brian Long]]&lt;br /&gt;
|Source Repository| http://git.sugarlabs.org/projects/question-support-api&lt;br /&gt;
}}&lt;br /&gt;
&lt;br /&gt;
===Current Goals===&lt;br /&gt;
&lt;br /&gt;
* Documentation&lt;br /&gt;
** Packaging&lt;br /&gt;
** Documenting Dependencies and how to enable them in a development environment (Simple tutorial on setting up your Question API Development Environment)&lt;br /&gt;
** Question Authoring guidelines&lt;br /&gt;
** Integrate within lesson planning&lt;br /&gt;
** How does an instructor get the questions they have written/found into an Activity?&lt;br /&gt;
* Liase w/ other Math4 teams and Sugarlabs (What would it take to be included in the Sugar core?)&lt;br /&gt;
* Future Development (Needs / Wants — collect proposals from other teams)&lt;br /&gt;
* Discovery / Plugin  (How do activities find questions, i.e. how to get URIs to load questions from?)&lt;br /&gt;
&lt;br /&gt;
===Setting Up a Development Environment (For Newbies)===&lt;br /&gt;
These are links, tutorials and things that [[User:Bbl5660|Brian Long]] has found along the way, as well as help gained from [[User:Enimihil|Greg Stevens]].  Brian is new to the Linux / OpenSource community, and is working on documenting a development environment for &amp;lt;b&amp;gt;you&amp;lt;/b&amp;gt; and for us to continue developing this API.  The small amount of information below is meant to help someone new step into the world of developing for the Sugar environment, from Ubuntu and have all  dependencies and things setup to continue development of this API.  &amp;lt;b&amp;gt;Next&amp;lt;/b&amp;gt; Brian would like to document how to setup these sort of items for [http://wiki.laptop.org/go/Creating_an_activity Activity developers] to include our API and be able to extend it.&lt;br /&gt;
&lt;br /&gt;
* For development environments, you may consider consider first installing a linux OS and the the LAMP stack with PhpMyAdmin.  Brian is choosing Ubuntu, Aptana as a (free) Python IDE that can be used with PyDev to easily allow Python writing.  &lt;br /&gt;
* Links that Brian is relying on at the moment include:&lt;br /&gt;
** http://help.ubuntu.com/community/ApacheMySQLPHP&lt;br /&gt;
** http://www.sqlalchemy.org/docs/04/ormtutorial.html&lt;br /&gt;
** http://docs.python.org/&lt;br /&gt;
** http://andrewbleakley.com/blog/2008/11/01/installing-and-running-aptana-on-ubuntu-810/&lt;br /&gt;
** http://forums.aptana.com/viewtopic.php?f=37&amp;amp;t=7147&amp;amp;p=32918&amp;amp;hilit=ubuntu#p32918&lt;br /&gt;
&lt;br /&gt;
====Dependencies====&lt;br /&gt;
&amp;lt;!-- Development for Linux / Python / Sugar Newbies! --&amp;gt;&lt;br /&gt;
;The following are required by the Question Support API.&lt;br /&gt;
:python-setuptools&lt;br /&gt;
:pyparsing&lt;br /&gt;
:peak-rules&lt;br /&gt;
:sqlalchemy&lt;br /&gt;
&lt;br /&gt;
;You can install these via a linux terminal in this manner:&lt;br /&gt;
        sudo apt-get install python-setuptools&lt;br /&gt;
        sudo easy_install pyparsing&lt;br /&gt;
        sudo easy_install peak-rules&lt;br /&gt;
        sudo easy_install sqlalchemy&lt;br /&gt;
&lt;br /&gt;
;Exception: When developing on a Fedora based distro, you&#039;ll need to install python-setuptools-devel for easy_install&lt;br /&gt;
&lt;br /&gt;
===Motivation===&lt;br /&gt;
In the RIT class working on the Math4 projects, many proposed activities&lt;br /&gt;
require a question database of some kind.  A common API or library for&lt;br /&gt;
accessing databases in different formats, stored either locally or remotely,&lt;br /&gt;
along with a simple mechanism to determine more complex formatting or&lt;br /&gt;
presentation than simple text (e.g. to include simple graphics or&lt;br /&gt;
mathematical notation) would cover a majority of the cases where the&lt;br /&gt;
activity needs some configurable &amp;quot;curriculum data&amp;quot;.&lt;br /&gt;
&lt;br /&gt;
Eventually this library could be extended to provide hints, explanations, or&lt;br /&gt;
walkthroughs for questions, in addition to the basic metadata about level,&lt;br /&gt;
grouping, difficulty, and subject matter that would be part of the base&lt;br /&gt;
system.&lt;br /&gt;
&lt;br /&gt;
===Envisioned Usage===&lt;br /&gt;
Consider a simple flash-card-like activity.  It presents a question from a&lt;br /&gt;
list of questions, allows the student to select an answer from the provided&lt;br /&gt;
answers for the question or to enter their own answer.  Then the correct&lt;br /&gt;
answer is revealed and the student it told whether their answer is correct.&lt;br /&gt;
If the question has an explanation of the correct answer, the flash-card&lt;br /&gt;
activity will show the explanation of the correct answer.  (Note that this&lt;br /&gt;
is just a simple usage example, the interaction design of a drilling&lt;br /&gt;
activity could be very different.)&lt;br /&gt;
&lt;br /&gt;
The flash-card activity would use this proposed Quiz API for the following:&lt;br /&gt;
&lt;br /&gt;
* Loading the questions from the storage location into memory. This includes any filtering or network lookup to download the questions from a remote resource and select appropriate questions for the student.&lt;br /&gt;
&lt;br /&gt;
* Determining whether the student has entered a correct answer.&lt;br /&gt;
&lt;br /&gt;
To start with, the library would simply be a time-saving tool for developers&lt;br /&gt;
needing similar functionality, but as the XS (School Server) becomes more&lt;br /&gt;
fully developed the library should integrate the functions provided by the&lt;br /&gt;
XS to enable automated update of course material for the current topic of&lt;br /&gt;
study so the students can drill material using any tool they prefer, while&lt;br /&gt;
still reporting progress to the instructor using the XS services.&lt;br /&gt;
&lt;br /&gt;
===Current Status===&lt;br /&gt;
&lt;br /&gt;
Currently, (14 May 2009) the API supports parsing the GIFT file format well enough to import Multiple Choice and True/False questions, along with complete implementations for basic functionality of the corresponding question objects.  No support for partial credit answers is currently implemented, nor are other question types working correctly (though most can be parsed to some extent).  Export to CSV works as intended, though it is intentionally simple.  Documentation on usage and integration of the API into an activity is in the doc/ directory of [[http://git.sugarlabs.org/projects/question-support-api the repository]]. A simple, but complete usage example, using a console interface is available in tests/complete_test.py.&lt;br /&gt;
&lt;br /&gt;
===Current implementation===&lt;br /&gt;
1. Ensure that PyParser and PEAK-Rules are installed &amp;lt;br&amp;gt;&lt;br /&gt;
2. Include the quizdata module&lt;br /&gt;
    import quizdata&lt;br /&gt;
3. Select plain text output&lt;br /&gt;
    from quizdata.text import plain_text&lt;br /&gt;
4. Select desired question types&lt;br /&gt;
    from quizdata.question import MultipleChoiceQuestion, MissingWordQuestion&lt;br /&gt;
5. Import when function to assist with question sorting&lt;br /&gt;
    from peak.rules import when&lt;br /&gt;
6. Handle questions (this section should be rewritten as needed for your activity&lt;br /&gt;
    # this is the base case for any question type we don&#039;t handle otherwise.&lt;br /&gt;
    def do_question(q):&lt;br /&gt;
        print &amp;quot;Unhandled question type.&amp;quot;, type(q)&lt;br /&gt;
    # for multiple choice questions (incl. subclasses) we do this...&lt;br /&gt;
    @when(do_question, (MultipleChoiceQuestion,))&lt;br /&gt;
    def do_multi_questions(q):&lt;br /&gt;
        print plain_text(q.text)&lt;br /&gt;
        for a in zip(&#039;0123456789&#039;, q.answers):&lt;br /&gt;
            print &amp;quot;%5s: %s&amp;quot; % a&lt;br /&gt;
        answer = int(raw_input())&lt;br /&gt;
        q.answer = q.answers[answer]&lt;br /&gt;
        print q.correct&lt;br /&gt;
    # for missing word-style questions, which aren&#039;t implemented correctly yet, and&lt;br /&gt;
    # are a subclass of multiple choice questions... we make sure to ignore them&lt;br /&gt;
    # with a more specific rule.&lt;br /&gt;
    @when(do_question, (MissingWordQuestion,))&lt;br /&gt;
    def do_mw_question(q): # XXX: inheritance is annoying here...&lt;br /&gt;
        print &amp;quot;Unhandled question type. (MissingWordQuestion)&amp;quot;&lt;br /&gt;
7. Open questions&lt;br /&gt;
    questions = quizdata.open(&amp;quot;file://%s?format=gift&amp;quot; % path.join(base_path, &#039;tests&#039;, &#039;multi_choice.txt&#039;))&lt;br /&gt;
    for q in questions:&lt;br /&gt;
        do_question(q)&lt;br /&gt;
====&amp;quot;How to Play/Use&amp;quot; for end user====&lt;br /&gt;
This is a requirement of the RIT OLPC seminar.  The question doesn&#039;t exactly pertain to the API team&#039;s project, a more applicable question might be “How development of the API is done?” and “How do activity developers include / extend our API?”.&lt;br /&gt;
* The API is written in Python and has a set of [[#Dependencies]], documented above.&lt;br /&gt;
* For activity developers to include our API into an activity, we&#039;re hoping to have the Sugar development team create a mechanism for developer&#039;s to install or include components.   [[User:Enimihil|Greg Stevens]]&#039;s has a bit more knowledge on this than  [[User:bbl5660|Brian]], but we will be looking into how to package our API, and how it can be accessed by other Activities.  The issue with this later concept, is that Activities running on Sugar&#039;s platform are intentionally meant to be restricted to their own space inside of the Sugar environment.  This means that we&#039;ll either need to hack something together to make other Activities include our API, or we&#039;ll need to collaborate with people at Sugar and figure out the best practice to include our API.&lt;br /&gt;
&lt;br /&gt;
===Education Standards===&lt;br /&gt;
As a general API and not a standalone Activity, along with the nature of the API in specific, this project does not directly address any specific education standards or learning outcomes.  It is reliant on educators to write questions, or have questions available to them in usable formats.  As such, the potential educational standards this project could help to meet includes **any** standard where drilling or question/response evaluation is appropriate. (This includes a wider range of topic areas than the Math4 focus, even.)&lt;br /&gt;
&lt;br /&gt;
====A Teacher&#039;s Guide Abstract====&lt;br /&gt;
* Per the nature of this API, we&#039;ve decided that our “Teacher Guide” will be more of an abstract.  Below is a hypothetical situation of the Question Support API:Imagine a school manages a repository of quiz material that fit&#039;s some curriculum, and this repository is located at Moodle.org (for example the 4th Grade Math curriculum see: http://wiki.sugarlabs.org/go/User:Gdk/4th_Grade_Maths ).  The teacher&#039;s use of our API design might go something like this: &lt;br /&gt;
&lt;br /&gt;
* An activity that has extended / implemented our API is started by the teacher.  The teacher is presented with an input field that requires a URI (URL).  The teacher enters the URI of this week&#039;s quiz (i.e. http://moodle.org/SchoolName/ClassName/Week_11_Quiz/ )  The activity fetches the specified quiz data from the web, and presents the teacher with a summary and confirmation dialog box.  Upon confirmation, the teacher can send / assign the quiz to the class.  The class starts their corresponding activity which then also has a mechanism to either grab the assigned quiz from the Moodle.org server or from the local “School Server” (also-known-as the XS server, see: http://wiki.laptop.org/go/School_server ).  The student&#039;s complete their assigned quiz, and data is sent back to the server for reporting / grading.&lt;br /&gt;
&lt;br /&gt;
===Milestones===&lt;br /&gt;
;Initial Prototype Phase (1)&lt;br /&gt;
:Simple implementation, data model not yet nailed down, focus on import and utility to question *consumers*, Like Activities. Initial formats to include MoodleXML, GIFT.&lt;br /&gt;
        &lt;br /&gt;
;Rigorous Design Phase (2)&lt;br /&gt;
:Nail down the data model, including developing the &#039;native&#039; format, probably using a sqlite file mechanism, or other database support, if possible. Freeze the Question object (in terms of required properties,        etc.), finalize decisions about URLs for question aquisition.  Make sure requirements of other projects *can* be met by the design at this stage.&lt;br /&gt;
&lt;br /&gt;
;Full Implementation Phase (3)&lt;br /&gt;
:Complete the implementation of the import formats, including the &#039;native&#039; format.  Should be usable to other Activity developers at this point (hopefully useful, before now, but all needs should be filled at this point).  Export implementation should start now, along with prototyping for an authoring activity. (Collaboration with the reporting team *needs* to happen at this point, as the activity will probably be combined with reporting tools.)&lt;br /&gt;
&lt;br /&gt;
;Activity Development Phase (4)&lt;br /&gt;
:Complete the authoring/reporting activity for the teachers, allowing export to file formats (and possibly *serving* the questions to other XOs; requires support in activities (using the API) to support).&lt;br /&gt;
&lt;br /&gt;
===Community Contacts===&lt;br /&gt;
[[User:FGrose]], [[User:Tony37]] (see [[Talk:{{PAGENAMEE}}|talk page]])&lt;br /&gt;
&lt;br /&gt;
===RIT Project Usage===&lt;br /&gt;
{{Definition_table&lt;br /&gt;
|Produce Puzzle| No API need or usage.&lt;br /&gt;
|Lemonade Stand| No API need or usage.&lt;br /&gt;
|Assimilate| API Usage needs documented on [[Talk:{{PAGENAMEE}}|talk page]].  Progress not far enough to start implementation using the API.&lt;br /&gt;
|Fun Towers| No API need or usage.&lt;br /&gt;
|Reporting Team| Simple export format documented at [[{{PAGENAMEE}}/API_Design|API Design]].  Futher integration work would be nice, but there is more work than could be done in a year along these lines (and neither team is prepared to embark on it).&lt;br /&gt;
|Muthris| No contact from? Probably no API need or usage.&lt;br /&gt;
}}&lt;br /&gt;
===See Also===&lt;br /&gt;
{{Special:PrefixIndex/{{PAGENAMEE}}/}}&lt;/div&gt;</summary>
		<author><name>Bbl5660</name></author>
	</entry>
	<entry>
		<id>https://wiki.sugarlabs.org/index.php?title=Math4Team/RIT/Projects/Question_Support_API&amp;diff=29439</id>
		<title>Math4Team/RIT/Projects/Question Support API</title>
		<link rel="alternate" type="text/html" href="https://wiki.sugarlabs.org/index.php?title=Math4Team/RIT/Projects/Question_Support_API&amp;diff=29439"/>
		<updated>2009-05-18T19:44:58Z</updated>

		<summary type="html">&lt;p&gt;Bbl5660: /* &amp;quot;How to Play/Use&amp;quot; for end user */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;{{TOCright}}&lt;br /&gt;
==Question Support API==&lt;br /&gt;
===Project Information===&lt;br /&gt;
{{Definition_table&lt;br /&gt;
|Primary Project Contact| [[User:Enimihil|Greg Stevens]]&lt;br /&gt;
|Project Members| [[User:Enimihil|Greg Stevens]], [[User:Jfinney|Jameson Finney]], [[User:Bbl5660|Brian Long]]&lt;br /&gt;
|Source Repository| http://git.sugarlabs.org/projects/question-support-api&lt;br /&gt;
}}&lt;br /&gt;
&lt;br /&gt;
===Current Goals===&lt;br /&gt;
&lt;br /&gt;
* Documentation&lt;br /&gt;
** Packaging&lt;br /&gt;
** Documenting Dependencies and how to enable them in a development environment (Simple tutorial on setting up your Question API Development Environment)&lt;br /&gt;
** Question Authoring guidelines&lt;br /&gt;
** Integrate within lesson planning&lt;br /&gt;
** How does an instructor get the questions they have written/found into an Activity?&lt;br /&gt;
* Liase w/ other Math4 teams and Sugarlabs (What would it take to be included in the Sugar core?)&lt;br /&gt;
* Future Development (Needs / Wants — collect proposals from other teams)&lt;br /&gt;
* Discovery / Plugin  (How do activities find questions, i.e. how to get URIs to load questions from?)&lt;br /&gt;
&lt;br /&gt;
===Setting Up a Development Environment (For Newbies)===&lt;br /&gt;
These are links, tutorials and things that [[User:Bbl5660|Brian Long]] has found along the way, as well as help gained from [[User:Enimihil|Greg Stevens]].  Brian is new to the Linux / OpenSource community, and is working on documenting a development environment for &amp;lt;b&amp;gt;you&amp;lt;/b&amp;gt; and for us to continue developing this API.  The small amount of information below is meant to help someone new step into the world of developing for the Sugar environment, from Ubuntu and have all  dependencies and things setup to continue development of this API.  &amp;lt;b&amp;gt;Next&amp;lt;/b&amp;gt; Brian would like to document how to setup these sort of items for [http://wiki.laptop.org/go/Creating_an_activity Activity developers] to include our API and be able to extend it.&lt;br /&gt;
&lt;br /&gt;
* For development environments, you may consider consider first installing a linux OS and the the LAMP stack with PhpMyAdmin.  Brian is choosing Ubuntu, Aptana as a (free) Python IDE that can be used with PyDev to easily allow Python writing.  &lt;br /&gt;
* Links that Brian is relying on at the moment include:&lt;br /&gt;
** http://help.ubuntu.com/community/ApacheMySQLPHP&lt;br /&gt;
** http://www.sqlalchemy.org/docs/04/ormtutorial.html&lt;br /&gt;
** http://docs.python.org/&lt;br /&gt;
** http://andrewbleakley.com/blog/2008/11/01/installing-and-running-aptana-on-ubuntu-810/&lt;br /&gt;
** http://forums.aptana.com/viewtopic.php?f=37&amp;amp;t=7147&amp;amp;p=32918&amp;amp;hilit=ubuntu#p32918&lt;br /&gt;
&lt;br /&gt;
====Dependencies====&lt;br /&gt;
&amp;lt;!-- Development for Linux / Python / Sugar Newbies! --&amp;gt;&lt;br /&gt;
;The following are required by the Question Support API.&lt;br /&gt;
:python-setuptools&lt;br /&gt;
:pyparsing&lt;br /&gt;
:peak-rules&lt;br /&gt;
:sqlalchemy&lt;br /&gt;
&lt;br /&gt;
;You can install these via a linux terminal in this manner:&lt;br /&gt;
        sudo apt-get install python-setuptools&lt;br /&gt;
        sudo easy_install pyparsing&lt;br /&gt;
        sudo easy_install peak-rules&lt;br /&gt;
        sudo easy_install sqlalchemy&lt;br /&gt;
&lt;br /&gt;
;Exception: When developing on a Fedora based distro, you&#039;ll need to install python-setuptools-devel for easy_install&lt;br /&gt;
&lt;br /&gt;
===Motivation===&lt;br /&gt;
In the RIT class working on the Math4 projects, many proposed activities&lt;br /&gt;
require a question database of some kind.  A common API or library for&lt;br /&gt;
accessing databases in different formats, stored either locally or remotely,&lt;br /&gt;
along with a simple mechanism to determine more complex formatting or&lt;br /&gt;
presentation than simple text (e.g. to include simple graphics or&lt;br /&gt;
mathematical notation) would cover a majority of the cases where the&lt;br /&gt;
activity needs some configurable &amp;quot;curriculum data&amp;quot;.&lt;br /&gt;
&lt;br /&gt;
Eventually this library could be extended to provide hints, explanations, or&lt;br /&gt;
walkthroughs for questions, in addition to the basic metadata about level,&lt;br /&gt;
grouping, difficulty, and subject matter that would be part of the base&lt;br /&gt;
system.&lt;br /&gt;
&lt;br /&gt;
===Envisioned Usage===&lt;br /&gt;
Consider a simple flash-card-like activity.  It presents a question from a&lt;br /&gt;
list of questions, allows the student to select an answer from the provided&lt;br /&gt;
answers for the question or to enter their own answer.  Then the correct&lt;br /&gt;
answer is revealed and the student it told whether their answer is correct.&lt;br /&gt;
If the question has an explanation of the correct answer, the flash-card&lt;br /&gt;
activity will show the explanation of the correct answer.  (Note that this&lt;br /&gt;
is just a simple usage example, the interaction design of a drilling&lt;br /&gt;
activity could be very different.)&lt;br /&gt;
&lt;br /&gt;
The flash-card activity would use this proposed Quiz API for the following:&lt;br /&gt;
&lt;br /&gt;
* Loading the questions from the storage location into memory. This includes any filtering or network lookup to download the questions from a remote resource and select appropriate questions for the student.&lt;br /&gt;
&lt;br /&gt;
* Determining whether the student has entered a correct answer.&lt;br /&gt;
&lt;br /&gt;
To start with, the library would simply be a time-saving tool for developers&lt;br /&gt;
needing similar functionality, but as the XS (School Server) becomes more&lt;br /&gt;
fully developed the library should integrate the functions provided by the&lt;br /&gt;
XS to enable automated update of course material for the current topic of&lt;br /&gt;
study so the students can drill material using any tool they prefer, while&lt;br /&gt;
still reporting progress to the instructor using the XS services.&lt;br /&gt;
&lt;br /&gt;
===Current Status===&lt;br /&gt;
&lt;br /&gt;
Currently, (14 May 2009) the API supports parsing the GIFT file format well enough to import Multiple Choice and True/False questions, along with complete implementations for basic functionality of the corresponding question objects.  No support for partial credit answers is currently implemented, nor are other question types working correctly (though most can be parsed to some extent).  Export to CSV works as intended, though it is intentionally simple.  Documentation on usage and integration of the API into an activity is in the doc/ directory of [[http://git.sugarlabs.org/projects/question-support-api the repository]]. A simple, but complete usage example, using a console interface is available in tests/complete_test.py.&lt;br /&gt;
&lt;br /&gt;
===Current implementation===&lt;br /&gt;
1. Ensure that PyParser and PEAK-Rules are installed &amp;lt;br&amp;gt;&lt;br /&gt;
2. Include the quizdata module&lt;br /&gt;
    import quizdata&lt;br /&gt;
3. Select plain text output&lt;br /&gt;
    from quizdata.text import plain_text&lt;br /&gt;
4. Select desired question types&lt;br /&gt;
    from quizdata.question import MultipleChoiceQuestion, MissingWordQuestion&lt;br /&gt;
5. Import when function to assist with question sorting&lt;br /&gt;
    from peak.rules import when&lt;br /&gt;
6. Handle questions (this section should be rewritten as needed for your activity&lt;br /&gt;
    # this is the base case for any question type we don&#039;t handle otherwise.&lt;br /&gt;
    def do_question(q):&lt;br /&gt;
        print &amp;quot;Unhandled question type.&amp;quot;, type(q)&lt;br /&gt;
    # for multiple choice questions (incl. subclasses) we do this...&lt;br /&gt;
    @when(do_question, (MultipleChoiceQuestion,))&lt;br /&gt;
    def do_multi_questions(q):&lt;br /&gt;
        print plain_text(q.text)&lt;br /&gt;
        for a in zip(&#039;0123456789&#039;, q.answers):&lt;br /&gt;
            print &amp;quot;%5s: %s&amp;quot; % a&lt;br /&gt;
        answer = int(raw_input())&lt;br /&gt;
        q.answer = q.answers[answer]&lt;br /&gt;
        print q.correct&lt;br /&gt;
    # for missing word-style questions, which aren&#039;t implemented correctly yet, and&lt;br /&gt;
    # are a subclass of multiple choice questions... we make sure to ignore them&lt;br /&gt;
    # with a more specific rule.&lt;br /&gt;
    @when(do_question, (MissingWordQuestion,))&lt;br /&gt;
    def do_mw_question(q): # XXX: inheritance is annoying here...&lt;br /&gt;
        print &amp;quot;Unhandled question type. (MissingWordQuestion)&amp;quot;&lt;br /&gt;
7. Open questions&lt;br /&gt;
    questions = quizdata.open(&amp;quot;file://%s?format=gift&amp;quot; % path.join(base_path, &#039;tests&#039;, &#039;multi_choice.txt&#039;))&lt;br /&gt;
    for q in questions:&lt;br /&gt;
        do_question(q)&lt;br /&gt;
====&amp;quot;How to Play/Use&amp;quot; for end user====&lt;br /&gt;
This is a requirement of the RIT OLPC seminar.  The question doesn&#039;t exactly pertain to the API team&#039;s project, a more applicable question might be “How development of the API is done?” and “How do activity developers include / extend our API?”.&lt;br /&gt;
* The API is written in Python and has a set of [[#dependencies]], documented above.&lt;br /&gt;
&amp;lt;!--  &lt;br /&gt;
&lt;br /&gt;
( [http://wiki.sugarlabs.org/go/Math4Team/RIT/Projects/Question_Support_API#Dependencies which are documented on this wiki page] ). test link &lt;br /&gt;
&lt;br /&gt;
[[http://wiki.sugarlabs.org/go/Math4Team/RIT/Projects/Question_Support_API#Dependencies| deps]]&lt;br /&gt;
&lt;br /&gt;
[[#Dependencies]] is a link to another section on the current page. &lt;br /&gt;
--&amp;gt;&lt;br /&gt;
&lt;br /&gt;
* For activity developers to include our API into an activity, we&#039;re hoping to have the Sugar development team create a mechanism for developer&#039;s to install or include components.   [[User:Enimihil|Greg Stevens]]&#039;s has a bit more knowledge on this than  [[User:bbl5660|Brian]], but we will be looking into how to package our API, and how it can be accessed by other Activities.  The issue with this later concept, is that Activities running on Sugar&#039;s platform are intentionally meant to be restricted to their own space inside of the Sugar environment.  This means that we&#039;ll either need to hack something together to make other Activities include our API, or we&#039;ll need to collaborate with people at Sugar and figure out the best practice to include our API.&lt;br /&gt;
&lt;br /&gt;
===Education Standards===&lt;br /&gt;
As a general API and not a standalone Activity, along with the nature of the API in specific, this project does not directly address any specific education standards or learning outcomes.  It is reliant on educators to write questions, or have questions available to them in usable formats.  As such, the potential educational standards this project could help to meet includes **any** standard where drilling or question/response evaluation is appropriate. (This includes a wider range of topic areas than the Math4 focus, even.)&lt;br /&gt;
&lt;br /&gt;
====A Teacher&#039;s Guide Abstract====&lt;br /&gt;
* Per the nature of this API, we&#039;ve decided that our “Teacher Guide” will be more of an abstract.  Below is a hypothetical situation of the Question Support API:Imagine a school manages a repository of quiz material that fit&#039;s some curriculum, and this repository is located at Moodle.org (for example the 4th Grade Math curriculum see: http://wiki.sugarlabs.org/go/User:Gdk/4th_Grade_Maths ).  The teacher&#039;s use of our API design might go something like this: &lt;br /&gt;
&lt;br /&gt;
* An activity that has extended / implemented our API is started by the teacher.  The teacher is presented with an input field that requires a URI (URL).  The teacher enters the URI of this week&#039;s quiz (i.e. http://moodle.org/SchoolName/ClassName/Week_11_Quiz/ )  The activity fetches the specified quiz data from the web, and presents the teacher with a summary and confirmation dialog box.  Upon confirmation, the teacher can send / assign the quiz to the class.  The class starts their corresponding activity which then also has a mechanism to either grab the assigned quiz from the Moodle.org server or from the local “School Server” (also-known-as the XS server, see: http://wiki.laptop.org/go/School_server ).  The student&#039;s complete their assigned quiz, and data is sent back to the server for reporting / grading.&lt;br /&gt;
&lt;br /&gt;
===Milestones===&lt;br /&gt;
;Initial Prototype Phase (1)&lt;br /&gt;
:Simple implementation, data model not yet nailed down, focus on import and utility to question *consumers*, Like Activities. Initial formats to include MoodleXML, GIFT.&lt;br /&gt;
        &lt;br /&gt;
;Rigorous Design Phase (2)&lt;br /&gt;
:Nail down the data model, including developing the &#039;native&#039; format, probably using a sqlite file mechanism, or other database support, if possible. Freeze the Question object (in terms of required properties,        etc.), finalize decisions about URLs for question aquisition.  Make sure requirements of other projects *can* be met by the design at this stage.&lt;br /&gt;
&lt;br /&gt;
;Full Implementation Phase (3)&lt;br /&gt;
:Complete the implementation of the import formats, including the &#039;native&#039; format.  Should be usable to other Activity developers at this point (hopefully useful, before now, but all needs should be filled at this point).  Export implementation should start now, along with prototyping for an authoring activity. (Collaboration with the reporting team *needs* to happen at this point, as the activity will probably be combined with reporting tools.)&lt;br /&gt;
&lt;br /&gt;
;Activity Development Phase (4)&lt;br /&gt;
:Complete the authoring/reporting activity for the teachers, allowing export to file formats (and possibly *serving* the questions to other XOs; requires support in activities (using the API) to support).&lt;br /&gt;
&lt;br /&gt;
===Community Contacts===&lt;br /&gt;
[[User:FGrose]], [[User:Tony37]] (see [[Talk:{{PAGENAMEE}}|talk page]])&lt;br /&gt;
&lt;br /&gt;
===RIT Project Usage===&lt;br /&gt;
{{Definition_table&lt;br /&gt;
|Produce Puzzle| No API need or usage.&lt;br /&gt;
|Lemonade Stand| No API need or usage.&lt;br /&gt;
|Assimilate| API Usage needs documented on [[Talk:{{PAGENAMEE}}|talk page]].  Progress not far enough to start implementation using the API.&lt;br /&gt;
|Fun Towers| No API need or usage.&lt;br /&gt;
|Reporting Team| Simple export format documented at [[{{PAGENAMEE}}/API_Design|API Design]].  Futher integration work would be nice, but there is more work than could be done in a year along these lines (and neither team is prepared to embark on it).&lt;br /&gt;
|Muthris| No contact from? Probably no API need or usage.&lt;br /&gt;
}}&lt;br /&gt;
===See Also===&lt;br /&gt;
{{Special:PrefixIndex/{{PAGENAMEE}}/}}&lt;/div&gt;</summary>
		<author><name>Bbl5660</name></author>
	</entry>
	<entry>
		<id>https://wiki.sugarlabs.org/index.php?title=Math4Team/RIT/Projects/Question_Support_API&amp;diff=29438</id>
		<title>Math4Team/RIT/Projects/Question Support API</title>
		<link rel="alternate" type="text/html" href="https://wiki.sugarlabs.org/index.php?title=Math4Team/RIT/Projects/Question_Support_API&amp;diff=29438"/>
		<updated>2009-05-18T19:44:14Z</updated>

		<summary type="html">&lt;p&gt;Bbl5660: /* &amp;quot;How to Play/Use&amp;quot; for end user */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;{{TOCright}}&lt;br /&gt;
==Question Support API==&lt;br /&gt;
===Project Information===&lt;br /&gt;
{{Definition_table&lt;br /&gt;
|Primary Project Contact| [[User:Enimihil|Greg Stevens]]&lt;br /&gt;
|Project Members| [[User:Enimihil|Greg Stevens]], [[User:Jfinney|Jameson Finney]], [[User:Bbl5660|Brian Long]]&lt;br /&gt;
|Source Repository| http://git.sugarlabs.org/projects/question-support-api&lt;br /&gt;
}}&lt;br /&gt;
&lt;br /&gt;
===Current Goals===&lt;br /&gt;
&lt;br /&gt;
* Documentation&lt;br /&gt;
** Packaging&lt;br /&gt;
** Documenting Dependencies and how to enable them in a development environment (Simple tutorial on setting up your Question API Development Environment)&lt;br /&gt;
** Question Authoring guidelines&lt;br /&gt;
** Integrate within lesson planning&lt;br /&gt;
** How does an instructor get the questions they have written/found into an Activity?&lt;br /&gt;
* Liase w/ other Math4 teams and Sugarlabs (What would it take to be included in the Sugar core?)&lt;br /&gt;
* Future Development (Needs / Wants — collect proposals from other teams)&lt;br /&gt;
* Discovery / Plugin  (How do activities find questions, i.e. how to get URIs to load questions from?)&lt;br /&gt;
&lt;br /&gt;
===Setting Up a Development Environment (For Newbies)===&lt;br /&gt;
These are links, tutorials and things that [[User:Bbl5660|Brian Long]] has found along the way, as well as help gained from [[User:Enimihil|Greg Stevens]].  Brian is new to the Linux / OpenSource community, and is working on documenting a development environment for &amp;lt;b&amp;gt;you&amp;lt;/b&amp;gt; and for us to continue developing this API.  The small amount of information below is meant to help someone new step into the world of developing for the Sugar environment, from Ubuntu and have all  dependencies and things setup to continue development of this API.  &amp;lt;b&amp;gt;Next&amp;lt;/b&amp;gt; Brian would like to document how to setup these sort of items for [http://wiki.laptop.org/go/Creating_an_activity Activity developers] to include our API and be able to extend it.&lt;br /&gt;
&lt;br /&gt;
* For development environments, you may consider consider first installing a linux OS and the the LAMP stack with PhpMyAdmin.  Brian is choosing Ubuntu, Aptana as a (free) Python IDE that can be used with PyDev to easily allow Python writing.  &lt;br /&gt;
* Links that Brian is relying on at the moment include:&lt;br /&gt;
** http://help.ubuntu.com/community/ApacheMySQLPHP&lt;br /&gt;
** http://www.sqlalchemy.org/docs/04/ormtutorial.html&lt;br /&gt;
** http://docs.python.org/&lt;br /&gt;
** http://andrewbleakley.com/blog/2008/11/01/installing-and-running-aptana-on-ubuntu-810/&lt;br /&gt;
** http://forums.aptana.com/viewtopic.php?f=37&amp;amp;t=7147&amp;amp;p=32918&amp;amp;hilit=ubuntu#p32918&lt;br /&gt;
&lt;br /&gt;
====Dependencies====&lt;br /&gt;
&amp;lt;!-- Development for Linux / Python / Sugar Newbies! --&amp;gt;&lt;br /&gt;
;The following are required by the Question Support API.&lt;br /&gt;
:python-setuptools&lt;br /&gt;
:pyparsing&lt;br /&gt;
:peak-rules&lt;br /&gt;
:sqlalchemy&lt;br /&gt;
&lt;br /&gt;
;You can install these via a linux terminal in this manner:&lt;br /&gt;
        sudo apt-get install python-setuptools&lt;br /&gt;
        sudo easy_install pyparsing&lt;br /&gt;
        sudo easy_install peak-rules&lt;br /&gt;
        sudo easy_install sqlalchemy&lt;br /&gt;
&lt;br /&gt;
;Exception: When developing on a Fedora based distro, you&#039;ll need to install python-setuptools-devel for easy_install&lt;br /&gt;
&lt;br /&gt;
===Motivation===&lt;br /&gt;
In the RIT class working on the Math4 projects, many proposed activities&lt;br /&gt;
require a question database of some kind.  A common API or library for&lt;br /&gt;
accessing databases in different formats, stored either locally or remotely,&lt;br /&gt;
along with a simple mechanism to determine more complex formatting or&lt;br /&gt;
presentation than simple text (e.g. to include simple graphics or&lt;br /&gt;
mathematical notation) would cover a majority of the cases where the&lt;br /&gt;
activity needs some configurable &amp;quot;curriculum data&amp;quot;.&lt;br /&gt;
&lt;br /&gt;
Eventually this library could be extended to provide hints, explanations, or&lt;br /&gt;
walkthroughs for questions, in addition to the basic metadata about level,&lt;br /&gt;
grouping, difficulty, and subject matter that would be part of the base&lt;br /&gt;
system.&lt;br /&gt;
&lt;br /&gt;
===Envisioned Usage===&lt;br /&gt;
Consider a simple flash-card-like activity.  It presents a question from a&lt;br /&gt;
list of questions, allows the student to select an answer from the provided&lt;br /&gt;
answers for the question or to enter their own answer.  Then the correct&lt;br /&gt;
answer is revealed and the student it told whether their answer is correct.&lt;br /&gt;
If the question has an explanation of the correct answer, the flash-card&lt;br /&gt;
activity will show the explanation of the correct answer.  (Note that this&lt;br /&gt;
is just a simple usage example, the interaction design of a drilling&lt;br /&gt;
activity could be very different.)&lt;br /&gt;
&lt;br /&gt;
The flash-card activity would use this proposed Quiz API for the following:&lt;br /&gt;
&lt;br /&gt;
* Loading the questions from the storage location into memory. This includes any filtering or network lookup to download the questions from a remote resource and select appropriate questions for the student.&lt;br /&gt;
&lt;br /&gt;
* Determining whether the student has entered a correct answer.&lt;br /&gt;
&lt;br /&gt;
To start with, the library would simply be a time-saving tool for developers&lt;br /&gt;
needing similar functionality, but as the XS (School Server) becomes more&lt;br /&gt;
fully developed the library should integrate the functions provided by the&lt;br /&gt;
XS to enable automated update of course material for the current topic of&lt;br /&gt;
study so the students can drill material using any tool they prefer, while&lt;br /&gt;
still reporting progress to the instructor using the XS services.&lt;br /&gt;
&lt;br /&gt;
===Current Status===&lt;br /&gt;
&lt;br /&gt;
Currently, (14 May 2009) the API supports parsing the GIFT file format well enough to import Multiple Choice and True/False questions, along with complete implementations for basic functionality of the corresponding question objects.  No support for partial credit answers is currently implemented, nor are other question types working correctly (though most can be parsed to some extent).  Export to CSV works as intended, though it is intentionally simple.  Documentation on usage and integration of the API into an activity is in the doc/ directory of [[http://git.sugarlabs.org/projects/question-support-api the repository]]. A simple, but complete usage example, using a console interface is available in tests/complete_test.py.&lt;br /&gt;
&lt;br /&gt;
===Current implementation===&lt;br /&gt;
1. Ensure that PyParser and PEAK-Rules are installed &amp;lt;br&amp;gt;&lt;br /&gt;
2. Include the quizdata module&lt;br /&gt;
    import quizdata&lt;br /&gt;
3. Select plain text output&lt;br /&gt;
    from quizdata.text import plain_text&lt;br /&gt;
4. Select desired question types&lt;br /&gt;
    from quizdata.question import MultipleChoiceQuestion, MissingWordQuestion&lt;br /&gt;
5. Import when function to assist with question sorting&lt;br /&gt;
    from peak.rules import when&lt;br /&gt;
6. Handle questions (this section should be rewritten as needed for your activity&lt;br /&gt;
    # this is the base case for any question type we don&#039;t handle otherwise.&lt;br /&gt;
    def do_question(q):&lt;br /&gt;
        print &amp;quot;Unhandled question type.&amp;quot;, type(q)&lt;br /&gt;
    # for multiple choice questions (incl. subclasses) we do this...&lt;br /&gt;
    @when(do_question, (MultipleChoiceQuestion,))&lt;br /&gt;
    def do_multi_questions(q):&lt;br /&gt;
        print plain_text(q.text)&lt;br /&gt;
        for a in zip(&#039;0123456789&#039;, q.answers):&lt;br /&gt;
            print &amp;quot;%5s: %s&amp;quot; % a&lt;br /&gt;
        answer = int(raw_input())&lt;br /&gt;
        q.answer = q.answers[answer]&lt;br /&gt;
        print q.correct&lt;br /&gt;
    # for missing word-style questions, which aren&#039;t implemented correctly yet, and&lt;br /&gt;
    # are a subclass of multiple choice questions... we make sure to ignore them&lt;br /&gt;
    # with a more specific rule.&lt;br /&gt;
    @when(do_question, (MissingWordQuestion,))&lt;br /&gt;
    def do_mw_question(q): # XXX: inheritance is annoying here...&lt;br /&gt;
        print &amp;quot;Unhandled question type. (MissingWordQuestion)&amp;quot;&lt;br /&gt;
7. Open questions&lt;br /&gt;
    questions = quizdata.open(&amp;quot;file://%s?format=gift&amp;quot; % path.join(base_path, &#039;tests&#039;, &#039;multi_choice.txt&#039;))&lt;br /&gt;
    for q in questions:&lt;br /&gt;
        do_question(q)&lt;br /&gt;
====&amp;quot;How to Play/Use&amp;quot; for end user====&lt;br /&gt;
This is a requirement of the RIT OLPC seminar.  The question doesn&#039;t exactly pertain to the API team&#039;s project, a more applicable question might be “How development of the API is done?” and “How do activity developers include / extend our API?”.&lt;br /&gt;
* The API is written in Python and has a set of [[Dependencies]], documented above.&lt;br /&gt;
&amp;lt;!--  &lt;br /&gt;
&lt;br /&gt;
( [http://wiki.sugarlabs.org/go/Math4Team/RIT/Projects/Question_Support_API#Dependencies which are documented on this wiki page] ). test link &lt;br /&gt;
&lt;br /&gt;
[[http://wiki.sugarlabs.org/go/Math4Team/RIT/Projects/Question_Support_API#Dependencies| deps]]&lt;br /&gt;
&lt;br /&gt;
[[#Dependencies]] is a link to another section on the current page. &lt;br /&gt;
--&amp;gt;&lt;br /&gt;
&lt;br /&gt;
* For activity developers to include our API into an activity, we&#039;re hoping to have the Sugar development team create a mechanism for developer&#039;s to install or include components.   [[User:Enimihil|Greg Stevens]]&#039;s has a bit more knowledge on this than  [[User:bbl5660|Brian]], but we will be looking into how to package our API, and how it can be accessed by other Activities.  The issue with this later concept, is that Activities running on Sugar&#039;s platform are intentionally meant to be restricted to their own space inside of the Sugar environment.  This means that we&#039;ll either need to hack something together to make other Activities include our API, or we&#039;ll need to collaborate with people at Sugar and figure out the best practice to include our API.&lt;br /&gt;
&lt;br /&gt;
===Education Standards===&lt;br /&gt;
As a general API and not a standalone Activity, along with the nature of the API in specific, this project does not directly address any specific education standards or learning outcomes.  It is reliant on educators to write questions, or have questions available to them in usable formats.  As such, the potential educational standards this project could help to meet includes **any** standard where drilling or question/response evaluation is appropriate. (This includes a wider range of topic areas than the Math4 focus, even.)&lt;br /&gt;
&lt;br /&gt;
====A Teacher&#039;s Guide Abstract====&lt;br /&gt;
* Per the nature of this API, we&#039;ve decided that our “Teacher Guide” will be more of an abstract.  Below is a hypothetical situation of the Question Support API:Imagine a school manages a repository of quiz material that fit&#039;s some curriculum, and this repository is located at Moodle.org (for example the 4th Grade Math curriculum see: http://wiki.sugarlabs.org/go/User:Gdk/4th_Grade_Maths ).  The teacher&#039;s use of our API design might go something like this: &lt;br /&gt;
&lt;br /&gt;
* An activity that has extended / implemented our API is started by the teacher.  The teacher is presented with an input field that requires a URI (URL).  The teacher enters the URI of this week&#039;s quiz (i.e. http://moodle.org/SchoolName/ClassName/Week_11_Quiz/ )  The activity fetches the specified quiz data from the web, and presents the teacher with a summary and confirmation dialog box.  Upon confirmation, the teacher can send / assign the quiz to the class.  The class starts their corresponding activity which then also has a mechanism to either grab the assigned quiz from the Moodle.org server or from the local “School Server” (also-known-as the XS server, see: http://wiki.laptop.org/go/School_server ).  The student&#039;s complete their assigned quiz, and data is sent back to the server for reporting / grading.&lt;br /&gt;
&lt;br /&gt;
===Milestones===&lt;br /&gt;
;Initial Prototype Phase (1)&lt;br /&gt;
:Simple implementation, data model not yet nailed down, focus on import and utility to question *consumers*, Like Activities. Initial formats to include MoodleXML, GIFT.&lt;br /&gt;
        &lt;br /&gt;
;Rigorous Design Phase (2)&lt;br /&gt;
:Nail down the data model, including developing the &#039;native&#039; format, probably using a sqlite file mechanism, or other database support, if possible. Freeze the Question object (in terms of required properties,        etc.), finalize decisions about URLs for question aquisition.  Make sure requirements of other projects *can* be met by the design at this stage.&lt;br /&gt;
&lt;br /&gt;
;Full Implementation Phase (3)&lt;br /&gt;
:Complete the implementation of the import formats, including the &#039;native&#039; format.  Should be usable to other Activity developers at this point (hopefully useful, before now, but all needs should be filled at this point).  Export implementation should start now, along with prototyping for an authoring activity. (Collaboration with the reporting team *needs* to happen at this point, as the activity will probably be combined with reporting tools.)&lt;br /&gt;
&lt;br /&gt;
;Activity Development Phase (4)&lt;br /&gt;
:Complete the authoring/reporting activity for the teachers, allowing export to file formats (and possibly *serving* the questions to other XOs; requires support in activities (using the API) to support).&lt;br /&gt;
&lt;br /&gt;
===Community Contacts===&lt;br /&gt;
[[User:FGrose]], [[User:Tony37]] (see [[Talk:{{PAGENAMEE}}|talk page]])&lt;br /&gt;
&lt;br /&gt;
===RIT Project Usage===&lt;br /&gt;
{{Definition_table&lt;br /&gt;
|Produce Puzzle| No API need or usage.&lt;br /&gt;
|Lemonade Stand| No API need or usage.&lt;br /&gt;
|Assimilate| API Usage needs documented on [[Talk:{{PAGENAMEE}}|talk page]].  Progress not far enough to start implementation using the API.&lt;br /&gt;
|Fun Towers| No API need or usage.&lt;br /&gt;
|Reporting Team| Simple export format documented at [[{{PAGENAMEE}}/API_Design|API Design]].  Futher integration work would be nice, but there is more work than could be done in a year along these lines (and neither team is prepared to embark on it).&lt;br /&gt;
|Muthris| No contact from? Probably no API need or usage.&lt;br /&gt;
}}&lt;br /&gt;
===See Also===&lt;br /&gt;
{{Special:PrefixIndex/{{PAGENAMEE}}/}}&lt;/div&gt;</summary>
		<author><name>Bbl5660</name></author>
	</entry>
	<entry>
		<id>https://wiki.sugarlabs.org/index.php?title=Math4Team/RIT/Projects/Question_Support_API&amp;diff=29437</id>
		<title>Math4Team/RIT/Projects/Question Support API</title>
		<link rel="alternate" type="text/html" href="https://wiki.sugarlabs.org/index.php?title=Math4Team/RIT/Projects/Question_Support_API&amp;diff=29437"/>
		<updated>2009-05-18T19:43:35Z</updated>

		<summary type="html">&lt;p&gt;Bbl5660: /* &amp;quot;How to Play/Use&amp;quot; for end user */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;{{TOCright}}&lt;br /&gt;
==Question Support API==&lt;br /&gt;
===Project Information===&lt;br /&gt;
{{Definition_table&lt;br /&gt;
|Primary Project Contact| [[User:Enimihil|Greg Stevens]]&lt;br /&gt;
|Project Members| [[User:Enimihil|Greg Stevens]], [[User:Jfinney|Jameson Finney]], [[User:Bbl5660|Brian Long]]&lt;br /&gt;
|Source Repository| http://git.sugarlabs.org/projects/question-support-api&lt;br /&gt;
}}&lt;br /&gt;
&lt;br /&gt;
===Current Goals===&lt;br /&gt;
&lt;br /&gt;
* Documentation&lt;br /&gt;
** Packaging&lt;br /&gt;
** Documenting Dependencies and how to enable them in a development environment (Simple tutorial on setting up your Question API Development Environment)&lt;br /&gt;
** Question Authoring guidelines&lt;br /&gt;
** Integrate within lesson planning&lt;br /&gt;
** How does an instructor get the questions they have written/found into an Activity?&lt;br /&gt;
* Liase w/ other Math4 teams and Sugarlabs (What would it take to be included in the Sugar core?)&lt;br /&gt;
* Future Development (Needs / Wants — collect proposals from other teams)&lt;br /&gt;
* Discovery / Plugin  (How do activities find questions, i.e. how to get URIs to load questions from?)&lt;br /&gt;
&lt;br /&gt;
===Setting Up a Development Environment (For Newbies)===&lt;br /&gt;
These are links, tutorials and things that [[User:Bbl5660|Brian Long]] has found along the way, as well as help gained from [[User:Enimihil|Greg Stevens]].  Brian is new to the Linux / OpenSource community, and is working on documenting a development environment for &amp;lt;b&amp;gt;you&amp;lt;/b&amp;gt; and for us to continue developing this API.  The small amount of information below is meant to help someone new step into the world of developing for the Sugar environment, from Ubuntu and have all  dependencies and things setup to continue development of this API.  &amp;lt;b&amp;gt;Next&amp;lt;/b&amp;gt; Brian would like to document how to setup these sort of items for [http://wiki.laptop.org/go/Creating_an_activity Activity developers] to include our API and be able to extend it.&lt;br /&gt;
&lt;br /&gt;
* For development environments, you may consider consider first installing a linux OS and the the LAMP stack with PhpMyAdmin.  Brian is choosing Ubuntu, Aptana as a (free) Python IDE that can be used with PyDev to easily allow Python writing.  &lt;br /&gt;
* Links that Brian is relying on at the moment include:&lt;br /&gt;
** http://help.ubuntu.com/community/ApacheMySQLPHP&lt;br /&gt;
** http://www.sqlalchemy.org/docs/04/ormtutorial.html&lt;br /&gt;
** http://docs.python.org/&lt;br /&gt;
** http://andrewbleakley.com/blog/2008/11/01/installing-and-running-aptana-on-ubuntu-810/&lt;br /&gt;
** http://forums.aptana.com/viewtopic.php?f=37&amp;amp;t=7147&amp;amp;p=32918&amp;amp;hilit=ubuntu#p32918&lt;br /&gt;
&lt;br /&gt;
====Dependencies====&lt;br /&gt;
&amp;lt;!-- Development for Linux / Python / Sugar Newbies! --&amp;gt;&lt;br /&gt;
;The following are required by the Question Support API.&lt;br /&gt;
:python-setuptools&lt;br /&gt;
:pyparsing&lt;br /&gt;
:peak-rules&lt;br /&gt;
:sqlalchemy&lt;br /&gt;
&lt;br /&gt;
;You can install these via a linux terminal in this manner:&lt;br /&gt;
        sudo apt-get install python-setuptools&lt;br /&gt;
        sudo easy_install pyparsing&lt;br /&gt;
        sudo easy_install peak-rules&lt;br /&gt;
        sudo easy_install sqlalchemy&lt;br /&gt;
&lt;br /&gt;
;Exception: When developing on a Fedora based distro, you&#039;ll need to install python-setuptools-devel for easy_install&lt;br /&gt;
&lt;br /&gt;
===Motivation===&lt;br /&gt;
In the RIT class working on the Math4 projects, many proposed activities&lt;br /&gt;
require a question database of some kind.  A common API or library for&lt;br /&gt;
accessing databases in different formats, stored either locally or remotely,&lt;br /&gt;
along with a simple mechanism to determine more complex formatting or&lt;br /&gt;
presentation than simple text (e.g. to include simple graphics or&lt;br /&gt;
mathematical notation) would cover a majority of the cases where the&lt;br /&gt;
activity needs some configurable &amp;quot;curriculum data&amp;quot;.&lt;br /&gt;
&lt;br /&gt;
Eventually this library could be extended to provide hints, explanations, or&lt;br /&gt;
walkthroughs for questions, in addition to the basic metadata about level,&lt;br /&gt;
grouping, difficulty, and subject matter that would be part of the base&lt;br /&gt;
system.&lt;br /&gt;
&lt;br /&gt;
===Envisioned Usage===&lt;br /&gt;
Consider a simple flash-card-like activity.  It presents a question from a&lt;br /&gt;
list of questions, allows the student to select an answer from the provided&lt;br /&gt;
answers for the question or to enter their own answer.  Then the correct&lt;br /&gt;
answer is revealed and the student it told whether their answer is correct.&lt;br /&gt;
If the question has an explanation of the correct answer, the flash-card&lt;br /&gt;
activity will show the explanation of the correct answer.  (Note that this&lt;br /&gt;
is just a simple usage example, the interaction design of a drilling&lt;br /&gt;
activity could be very different.)&lt;br /&gt;
&lt;br /&gt;
The flash-card activity would use this proposed Quiz API for the following:&lt;br /&gt;
&lt;br /&gt;
* Loading the questions from the storage location into memory. This includes any filtering or network lookup to download the questions from a remote resource and select appropriate questions for the student.&lt;br /&gt;
&lt;br /&gt;
* Determining whether the student has entered a correct answer.&lt;br /&gt;
&lt;br /&gt;
To start with, the library would simply be a time-saving tool for developers&lt;br /&gt;
needing similar functionality, but as the XS (School Server) becomes more&lt;br /&gt;
fully developed the library should integrate the functions provided by the&lt;br /&gt;
XS to enable automated update of course material for the current topic of&lt;br /&gt;
study so the students can drill material using any tool they prefer, while&lt;br /&gt;
still reporting progress to the instructor using the XS services.&lt;br /&gt;
&lt;br /&gt;
===Current Status===&lt;br /&gt;
&lt;br /&gt;
Currently, (14 May 2009) the API supports parsing the GIFT file format well enough to import Multiple Choice and True/False questions, along with complete implementations for basic functionality of the corresponding question objects.  No support for partial credit answers is currently implemented, nor are other question types working correctly (though most can be parsed to some extent).  Export to CSV works as intended, though it is intentionally simple.  Documentation on usage and integration of the API into an activity is in the doc/ directory of [[http://git.sugarlabs.org/projects/question-support-api the repository]]. A simple, but complete usage example, using a console interface is available in tests/complete_test.py.&lt;br /&gt;
&lt;br /&gt;
===Current implementation===&lt;br /&gt;
1. Ensure that PyParser and PEAK-Rules are installed &amp;lt;br&amp;gt;&lt;br /&gt;
2. Include the quizdata module&lt;br /&gt;
    import quizdata&lt;br /&gt;
3. Select plain text output&lt;br /&gt;
    from quizdata.text import plain_text&lt;br /&gt;
4. Select desired question types&lt;br /&gt;
    from quizdata.question import MultipleChoiceQuestion, MissingWordQuestion&lt;br /&gt;
5. Import when function to assist with question sorting&lt;br /&gt;
    from peak.rules import when&lt;br /&gt;
6. Handle questions (this section should be rewritten as needed for your activity&lt;br /&gt;
    # this is the base case for any question type we don&#039;t handle otherwise.&lt;br /&gt;
    def do_question(q):&lt;br /&gt;
        print &amp;quot;Unhandled question type.&amp;quot;, type(q)&lt;br /&gt;
    # for multiple choice questions (incl. subclasses) we do this...&lt;br /&gt;
    @when(do_question, (MultipleChoiceQuestion,))&lt;br /&gt;
    def do_multi_questions(q):&lt;br /&gt;
        print plain_text(q.text)&lt;br /&gt;
        for a in zip(&#039;0123456789&#039;, q.answers):&lt;br /&gt;
            print &amp;quot;%5s: %s&amp;quot; % a&lt;br /&gt;
        answer = int(raw_input())&lt;br /&gt;
        q.answer = q.answers[answer]&lt;br /&gt;
        print q.correct&lt;br /&gt;
    # for missing word-style questions, which aren&#039;t implemented correctly yet, and&lt;br /&gt;
    # are a subclass of multiple choice questions... we make sure to ignore them&lt;br /&gt;
    # with a more specific rule.&lt;br /&gt;
    @when(do_question, (MissingWordQuestion,))&lt;br /&gt;
    def do_mw_question(q): # XXX: inheritance is annoying here...&lt;br /&gt;
        print &amp;quot;Unhandled question type. (MissingWordQuestion)&amp;quot;&lt;br /&gt;
7. Open questions&lt;br /&gt;
    questions = quizdata.open(&amp;quot;file://%s?format=gift&amp;quot; % path.join(base_path, &#039;tests&#039;, &#039;multi_choice.txt&#039;))&lt;br /&gt;
    for q in questions:&lt;br /&gt;
        do_question(q)&lt;br /&gt;
====&amp;quot;How to Play/Use&amp;quot; for end user====&lt;br /&gt;
This is a requirement of the RIT OLPC seminar.  The question doesn&#039;t exactly pertain to the API team&#039;s project, a more applicable question might be “How development of the API is done?” and “How do activity developers include / extend our API?”.&lt;br /&gt;
* The API is written in Python and has a set of [[#Dependencies]], documented above.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;!--  ( [http://wiki.sugarlabs.org/go/Math4Team/RIT/Projects/Question_Support_API#Dependencies which are documented on this wiki page] ). test link [[http://wiki.sugarlabs.org/go/Math4Team/RIT/Projects/Question_Support_API#Dependencies| deps]]&lt;br /&gt;
&lt;br /&gt;
[[#Dependencies]] is a link to another section on the current page. --&amp;gt;&lt;br /&gt;
&lt;br /&gt;
* For activity developers to include our API into an activity, we&#039;re hoping to have the Sugar development team create a mechanism for developer&#039;s to install or include components.   [[User:Enimihil|Greg Stevens]]&#039;s has a bit more knowledge on this than  [[User:bbl5660|Brian]], but we will be looking into how to package our API, and how it can be accessed by other Activities.  The issue with this later concept, is that Activities running on Sugar&#039;s platform are intentionally meant to be restricted to their own space inside of the Sugar environment.  This means that we&#039;ll either need to hack something together to make other Activities include our API, or we&#039;ll need to collaborate with people at Sugar and figure out the best practice to include our API.&lt;br /&gt;
&lt;br /&gt;
===Education Standards===&lt;br /&gt;
As a general API and not a standalone Activity, along with the nature of the API in specific, this project does not directly address any specific education standards or learning outcomes.  It is reliant on educators to write questions, or have questions available to them in usable formats.  As such, the potential educational standards this project could help to meet includes **any** standard where drilling or question/response evaluation is appropriate. (This includes a wider range of topic areas than the Math4 focus, even.)&lt;br /&gt;
&lt;br /&gt;
====A Teacher&#039;s Guide Abstract====&lt;br /&gt;
* Per the nature of this API, we&#039;ve decided that our “Teacher Guide” will be more of an abstract.  Below is a hypothetical situation of the Question Support API:Imagine a school manages a repository of quiz material that fit&#039;s some curriculum, and this repository is located at Moodle.org (for example the 4th Grade Math curriculum see: http://wiki.sugarlabs.org/go/User:Gdk/4th_Grade_Maths ).  The teacher&#039;s use of our API design might go something like this: &lt;br /&gt;
&lt;br /&gt;
* An activity that has extended / implemented our API is started by the teacher.  The teacher is presented with an input field that requires a URI (URL).  The teacher enters the URI of this week&#039;s quiz (i.e. http://moodle.org/SchoolName/ClassName/Week_11_Quiz/ )  The activity fetches the specified quiz data from the web, and presents the teacher with a summary and confirmation dialog box.  Upon confirmation, the teacher can send / assign the quiz to the class.  The class starts their corresponding activity which then also has a mechanism to either grab the assigned quiz from the Moodle.org server or from the local “School Server” (also-known-as the XS server, see: http://wiki.laptop.org/go/School_server ).  The student&#039;s complete their assigned quiz, and data is sent back to the server for reporting / grading.&lt;br /&gt;
&lt;br /&gt;
===Milestones===&lt;br /&gt;
;Initial Prototype Phase (1)&lt;br /&gt;
:Simple implementation, data model not yet nailed down, focus on import and utility to question *consumers*, Like Activities. Initial formats to include MoodleXML, GIFT.&lt;br /&gt;
        &lt;br /&gt;
;Rigorous Design Phase (2)&lt;br /&gt;
:Nail down the data model, including developing the &#039;native&#039; format, probably using a sqlite file mechanism, or other database support, if possible. Freeze the Question object (in terms of required properties,        etc.), finalize decisions about URLs for question aquisition.  Make sure requirements of other projects *can* be met by the design at this stage.&lt;br /&gt;
&lt;br /&gt;
;Full Implementation Phase (3)&lt;br /&gt;
:Complete the implementation of the import formats, including the &#039;native&#039; format.  Should be usable to other Activity developers at this point (hopefully useful, before now, but all needs should be filled at this point).  Export implementation should start now, along with prototyping for an authoring activity. (Collaboration with the reporting team *needs* to happen at this point, as the activity will probably be combined with reporting tools.)&lt;br /&gt;
&lt;br /&gt;
;Activity Development Phase (4)&lt;br /&gt;
:Complete the authoring/reporting activity for the teachers, allowing export to file formats (and possibly *serving* the questions to other XOs; requires support in activities (using the API) to support).&lt;br /&gt;
&lt;br /&gt;
===Community Contacts===&lt;br /&gt;
[[User:FGrose]], [[User:Tony37]] (see [[Talk:{{PAGENAMEE}}|talk page]])&lt;br /&gt;
&lt;br /&gt;
===RIT Project Usage===&lt;br /&gt;
{{Definition_table&lt;br /&gt;
|Produce Puzzle| No API need or usage.&lt;br /&gt;
|Lemonade Stand| No API need or usage.&lt;br /&gt;
|Assimilate| API Usage needs documented on [[Talk:{{PAGENAMEE}}|talk page]].  Progress not far enough to start implementation using the API.&lt;br /&gt;
|Fun Towers| No API need or usage.&lt;br /&gt;
|Reporting Team| Simple export format documented at [[{{PAGENAMEE}}/API_Design|API Design]].  Futher integration work would be nice, but there is more work than could be done in a year along these lines (and neither team is prepared to embark on it).&lt;br /&gt;
|Muthris| No contact from? Probably no API need or usage.&lt;br /&gt;
}}&lt;br /&gt;
===See Also===&lt;br /&gt;
{{Special:PrefixIndex/{{PAGENAMEE}}/}}&lt;/div&gt;</summary>
		<author><name>Bbl5660</name></author>
	</entry>
	<entry>
		<id>https://wiki.sugarlabs.org/index.php?title=Math4Team/RIT/Projects/Question_Support_API&amp;diff=29436</id>
		<title>Math4Team/RIT/Projects/Question Support API</title>
		<link rel="alternate" type="text/html" href="https://wiki.sugarlabs.org/index.php?title=Math4Team/RIT/Projects/Question_Support_API&amp;diff=29436"/>
		<updated>2009-05-18T19:41:08Z</updated>

		<summary type="html">&lt;p&gt;Bbl5660: /* &amp;quot;How to Play/Use&amp;quot; for end user */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;{{TOCright}}&lt;br /&gt;
==Question Support API==&lt;br /&gt;
===Project Information===&lt;br /&gt;
{{Definition_table&lt;br /&gt;
|Primary Project Contact| [[User:Enimihil|Greg Stevens]]&lt;br /&gt;
|Project Members| [[User:Enimihil|Greg Stevens]], [[User:Jfinney|Jameson Finney]], [[User:Bbl5660|Brian Long]]&lt;br /&gt;
|Source Repository| http://git.sugarlabs.org/projects/question-support-api&lt;br /&gt;
}}&lt;br /&gt;
&lt;br /&gt;
===Current Goals===&lt;br /&gt;
&lt;br /&gt;
* Documentation&lt;br /&gt;
** Packaging&lt;br /&gt;
** Documenting Dependencies and how to enable them in a development environment (Simple tutorial on setting up your Question API Development Environment)&lt;br /&gt;
** Question Authoring guidelines&lt;br /&gt;
** Integrate within lesson planning&lt;br /&gt;
** How does an instructor get the questions they have written/found into an Activity?&lt;br /&gt;
* Liase w/ other Math4 teams and Sugarlabs (What would it take to be included in the Sugar core?)&lt;br /&gt;
* Future Development (Needs / Wants — collect proposals from other teams)&lt;br /&gt;
* Discovery / Plugin  (How do activities find questions, i.e. how to get URIs to load questions from?)&lt;br /&gt;
&lt;br /&gt;
===Setting Up a Development Environment (For Newbies)===&lt;br /&gt;
These are links, tutorials and things that [[User:Bbl5660|Brian Long]] has found along the way, as well as help gained from [[User:Enimihil|Greg Stevens]].  Brian is new to the Linux / OpenSource community, and is working on documenting a development environment for &amp;lt;b&amp;gt;you&amp;lt;/b&amp;gt; and for us to continue developing this API.  The small amount of information below is meant to help someone new step into the world of developing for the Sugar environment, from Ubuntu and have all  dependencies and things setup to continue development of this API.  &amp;lt;b&amp;gt;Next&amp;lt;/b&amp;gt; Brian would like to document how to setup these sort of items for [http://wiki.laptop.org/go/Creating_an_activity Activity developers] to include our API and be able to extend it.&lt;br /&gt;
&lt;br /&gt;
* For development environments, you may consider consider first installing a linux OS and the the LAMP stack with PhpMyAdmin.  Brian is choosing Ubuntu, Aptana as a (free) Python IDE that can be used with PyDev to easily allow Python writing.  &lt;br /&gt;
* Links that Brian is relying on at the moment include:&lt;br /&gt;
** http://help.ubuntu.com/community/ApacheMySQLPHP&lt;br /&gt;
** http://www.sqlalchemy.org/docs/04/ormtutorial.html&lt;br /&gt;
** http://docs.python.org/&lt;br /&gt;
** http://andrewbleakley.com/blog/2008/11/01/installing-and-running-aptana-on-ubuntu-810/&lt;br /&gt;
** http://forums.aptana.com/viewtopic.php?f=37&amp;amp;t=7147&amp;amp;p=32918&amp;amp;hilit=ubuntu#p32918&lt;br /&gt;
&lt;br /&gt;
====Dependencies====&lt;br /&gt;
&amp;lt;!-- Development for Linux / Python / Sugar Newbies! --&amp;gt;&lt;br /&gt;
;The following are required by the Question Support API.&lt;br /&gt;
:python-setuptools&lt;br /&gt;
:pyparsing&lt;br /&gt;
:peak-rules&lt;br /&gt;
:sqlalchemy&lt;br /&gt;
&lt;br /&gt;
;You can install these via a linux terminal in this manner:&lt;br /&gt;
        sudo apt-get install python-setuptools&lt;br /&gt;
        sudo easy_install pyparsing&lt;br /&gt;
        sudo easy_install peak-rules&lt;br /&gt;
        sudo easy_install sqlalchemy&lt;br /&gt;
&lt;br /&gt;
;Exception: When developing on a Fedora based distro, you&#039;ll need to install python-setuptools-devel for easy_install&lt;br /&gt;
&lt;br /&gt;
===Motivation===&lt;br /&gt;
In the RIT class working on the Math4 projects, many proposed activities&lt;br /&gt;
require a question database of some kind.  A common API or library for&lt;br /&gt;
accessing databases in different formats, stored either locally or remotely,&lt;br /&gt;
along with a simple mechanism to determine more complex formatting or&lt;br /&gt;
presentation than simple text (e.g. to include simple graphics or&lt;br /&gt;
mathematical notation) would cover a majority of the cases where the&lt;br /&gt;
activity needs some configurable &amp;quot;curriculum data&amp;quot;.&lt;br /&gt;
&lt;br /&gt;
Eventually this library could be extended to provide hints, explanations, or&lt;br /&gt;
walkthroughs for questions, in addition to the basic metadata about level,&lt;br /&gt;
grouping, difficulty, and subject matter that would be part of the base&lt;br /&gt;
system.&lt;br /&gt;
&lt;br /&gt;
===Envisioned Usage===&lt;br /&gt;
Consider a simple flash-card-like activity.  It presents a question from a&lt;br /&gt;
list of questions, allows the student to select an answer from the provided&lt;br /&gt;
answers for the question or to enter their own answer.  Then the correct&lt;br /&gt;
answer is revealed and the student it told whether their answer is correct.&lt;br /&gt;
If the question has an explanation of the correct answer, the flash-card&lt;br /&gt;
activity will show the explanation of the correct answer.  (Note that this&lt;br /&gt;
is just a simple usage example, the interaction design of a drilling&lt;br /&gt;
activity could be very different.)&lt;br /&gt;
&lt;br /&gt;
The flash-card activity would use this proposed Quiz API for the following:&lt;br /&gt;
&lt;br /&gt;
* Loading the questions from the storage location into memory. This includes any filtering or network lookup to download the questions from a remote resource and select appropriate questions for the student.&lt;br /&gt;
&lt;br /&gt;
* Determining whether the student has entered a correct answer.&lt;br /&gt;
&lt;br /&gt;
To start with, the library would simply be a time-saving tool for developers&lt;br /&gt;
needing similar functionality, but as the XS (School Server) becomes more&lt;br /&gt;
fully developed the library should integrate the functions provided by the&lt;br /&gt;
XS to enable automated update of course material for the current topic of&lt;br /&gt;
study so the students can drill material using any tool they prefer, while&lt;br /&gt;
still reporting progress to the instructor using the XS services.&lt;br /&gt;
&lt;br /&gt;
===Current Status===&lt;br /&gt;
&lt;br /&gt;
Currently, (14 May 2009) the API supports parsing the GIFT file format well enough to import Multiple Choice and True/False questions, along with complete implementations for basic functionality of the corresponding question objects.  No support for partial credit answers is currently implemented, nor are other question types working correctly (though most can be parsed to some extent).  Export to CSV works as intended, though it is intentionally simple.  Documentation on usage and integration of the API into an activity is in the doc/ directory of [[http://git.sugarlabs.org/projects/question-support-api the repository]]. A simple, but complete usage example, using a console interface is available in tests/complete_test.py.&lt;br /&gt;
&lt;br /&gt;
===Current implementation===&lt;br /&gt;
1. Ensure that PyParser and PEAK-Rules are installed &amp;lt;br&amp;gt;&lt;br /&gt;
2. Include the quizdata module&lt;br /&gt;
    import quizdata&lt;br /&gt;
3. Select plain text output&lt;br /&gt;
    from quizdata.text import plain_text&lt;br /&gt;
4. Select desired question types&lt;br /&gt;
    from quizdata.question import MultipleChoiceQuestion, MissingWordQuestion&lt;br /&gt;
5. Import when function to assist with question sorting&lt;br /&gt;
    from peak.rules import when&lt;br /&gt;
6. Handle questions (this section should be rewritten as needed for your activity&lt;br /&gt;
    # this is the base case for any question type we don&#039;t handle otherwise.&lt;br /&gt;
    def do_question(q):&lt;br /&gt;
        print &amp;quot;Unhandled question type.&amp;quot;, type(q)&lt;br /&gt;
    # for multiple choice questions (incl. subclasses) we do this...&lt;br /&gt;
    @when(do_question, (MultipleChoiceQuestion,))&lt;br /&gt;
    def do_multi_questions(q):&lt;br /&gt;
        print plain_text(q.text)&lt;br /&gt;
        for a in zip(&#039;0123456789&#039;, q.answers):&lt;br /&gt;
            print &amp;quot;%5s: %s&amp;quot; % a&lt;br /&gt;
        answer = int(raw_input())&lt;br /&gt;
        q.answer = q.answers[answer]&lt;br /&gt;
        print q.correct&lt;br /&gt;
    # for missing word-style questions, which aren&#039;t implemented correctly yet, and&lt;br /&gt;
    # are a subclass of multiple choice questions... we make sure to ignore them&lt;br /&gt;
    # with a more specific rule.&lt;br /&gt;
    @when(do_question, (MissingWordQuestion,))&lt;br /&gt;
    def do_mw_question(q): # XXX: inheritance is annoying here...&lt;br /&gt;
        print &amp;quot;Unhandled question type. (MissingWordQuestion)&amp;quot;&lt;br /&gt;
7. Open questions&lt;br /&gt;
    questions = quizdata.open(&amp;quot;file://%s?format=gift&amp;quot; % path.join(base_path, &#039;tests&#039;, &#039;multi_choice.txt&#039;))&lt;br /&gt;
    for q in questions:&lt;br /&gt;
        do_question(q)&lt;br /&gt;
====&amp;quot;How to Play/Use&amp;quot; for end user====&lt;br /&gt;
This is a requirement of the RIT OLPC seminar.  The question doesn&#039;t exactly pertain to the API team&#039;s project, a more applicable question might be “How development of the API is done?” and “How do activity developers include / extend our API?”.&lt;br /&gt;
* The API is written in Python, has a set of dependencies ( [http://wiki.sugarlabs.org/go/Math4Team/RIT/Projects/Question_Support_API#Dependencies which are documented on this wiki page] ). test link [[http://wiki.sugarlabs.org/go/Math4Team/RIT/Projects/Question_Support_API#Dependencies| deps]]&lt;br /&gt;
&lt;br /&gt;
[[#Dependencies]] is a link to another section on the current page.&lt;br /&gt;
&lt;br /&gt;
* For activity developers to include our API into an activity, we&#039;re hoping to have the Sugar development team create a mechanism for developer&#039;s to install or include components.   [[User:Enimihil|Greg Stevens]]&#039;s has a bit more knowledge on this than  [[User:bbl5660|Brian]], but we will be looking into how to package our API, and how it can be accessed by other Activities.  The issue with this later concept, is that Activities running on Sugar&#039;s platform are intentionally meant to be restricted to their own space inside of the Sugar environment.  This means that we&#039;ll either need to hack something together to make other Activities include our API, or we&#039;ll need to collaborate with people at Sugar and figure out the best practice to include our API.&lt;br /&gt;
&lt;br /&gt;
===Education Standards===&lt;br /&gt;
As a general API and not a standalone Activity, along with the nature of the API in specific, this project does not directly address any specific education standards or learning outcomes.  It is reliant on educators to write questions, or have questions available to them in usable formats.  As such, the potential educational standards this project could help to meet includes **any** standard where drilling or question/response evaluation is appropriate. (This includes a wider range of topic areas than the Math4 focus, even.)&lt;br /&gt;
&lt;br /&gt;
====A Teacher&#039;s Guide Abstract====&lt;br /&gt;
* Per the nature of this API, we&#039;ve decided that our “Teacher Guide” will be more of an abstract.  Below is a hypothetical situation of the Question Support API:Imagine a school manages a repository of quiz material that fit&#039;s some curriculum, and this repository is located at Moodle.org (for example the 4th Grade Math curriculum see: http://wiki.sugarlabs.org/go/User:Gdk/4th_Grade_Maths ).  The teacher&#039;s use of our API design might go something like this: &lt;br /&gt;
&lt;br /&gt;
* An activity that has extended / implemented our API is started by the teacher.  The teacher is presented with an input field that requires a URI (URL).  The teacher enters the URI of this week&#039;s quiz (i.e. http://moodle.org/SchoolName/ClassName/Week_11_Quiz/ )  The activity fetches the specified quiz data from the web, and presents the teacher with a summary and confirmation dialog box.  Upon confirmation, the teacher can send / assign the quiz to the class.  The class starts their corresponding activity which then also has a mechanism to either grab the assigned quiz from the Moodle.org server or from the local “School Server” (also-known-as the XS server, see: http://wiki.laptop.org/go/School_server ).  The student&#039;s complete their assigned quiz, and data is sent back to the server for reporting / grading.&lt;br /&gt;
&lt;br /&gt;
===Milestones===&lt;br /&gt;
;Initial Prototype Phase (1)&lt;br /&gt;
:Simple implementation, data model not yet nailed down, focus on import and utility to question *consumers*, Like Activities. Initial formats to include MoodleXML, GIFT.&lt;br /&gt;
        &lt;br /&gt;
;Rigorous Design Phase (2)&lt;br /&gt;
:Nail down the data model, including developing the &#039;native&#039; format, probably using a sqlite file mechanism, or other database support, if possible. Freeze the Question object (in terms of required properties,        etc.), finalize decisions about URLs for question aquisition.  Make sure requirements of other projects *can* be met by the design at this stage.&lt;br /&gt;
&lt;br /&gt;
;Full Implementation Phase (3)&lt;br /&gt;
:Complete the implementation of the import formats, including the &#039;native&#039; format.  Should be usable to other Activity developers at this point (hopefully useful, before now, but all needs should be filled at this point).  Export implementation should start now, along with prototyping for an authoring activity. (Collaboration with the reporting team *needs* to happen at this point, as the activity will probably be combined with reporting tools.)&lt;br /&gt;
&lt;br /&gt;
;Activity Development Phase (4)&lt;br /&gt;
:Complete the authoring/reporting activity for the teachers, allowing export to file formats (and possibly *serving* the questions to other XOs; requires support in activities (using the API) to support).&lt;br /&gt;
&lt;br /&gt;
===Community Contacts===&lt;br /&gt;
[[User:FGrose]], [[User:Tony37]] (see [[Talk:{{PAGENAMEE}}|talk page]])&lt;br /&gt;
&lt;br /&gt;
===RIT Project Usage===&lt;br /&gt;
{{Definition_table&lt;br /&gt;
|Produce Puzzle| No API need or usage.&lt;br /&gt;
|Lemonade Stand| No API need or usage.&lt;br /&gt;
|Assimilate| API Usage needs documented on [[Talk:{{PAGENAMEE}}|talk page]].  Progress not far enough to start implementation using the API.&lt;br /&gt;
|Fun Towers| No API need or usage.&lt;br /&gt;
|Reporting Team| Simple export format documented at [[{{PAGENAMEE}}/API_Design|API Design]].  Futher integration work would be nice, but there is more work than could be done in a year along these lines (and neither team is prepared to embark on it).&lt;br /&gt;
|Muthris| No contact from? Probably no API need or usage.&lt;br /&gt;
}}&lt;br /&gt;
===See Also===&lt;br /&gt;
{{Special:PrefixIndex/{{PAGENAMEE}}/}}&lt;/div&gt;</summary>
		<author><name>Bbl5660</name></author>
	</entry>
	<entry>
		<id>https://wiki.sugarlabs.org/index.php?title=Math4Team/RIT/Projects/Question_Support_API&amp;diff=29435</id>
		<title>Math4Team/RIT/Projects/Question Support API</title>
		<link rel="alternate" type="text/html" href="https://wiki.sugarlabs.org/index.php?title=Math4Team/RIT/Projects/Question_Support_API&amp;diff=29435"/>
		<updated>2009-05-18T19:38:30Z</updated>

		<summary type="html">&lt;p&gt;Bbl5660: /* &amp;quot;How to Play/Use&amp;quot; for end user */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;{{TOCright}}&lt;br /&gt;
==Question Support API==&lt;br /&gt;
===Project Information===&lt;br /&gt;
{{Definition_table&lt;br /&gt;
|Primary Project Contact| [[User:Enimihil|Greg Stevens]]&lt;br /&gt;
|Project Members| [[User:Enimihil|Greg Stevens]], [[User:Jfinney|Jameson Finney]], [[User:Bbl5660|Brian Long]]&lt;br /&gt;
|Source Repository| http://git.sugarlabs.org/projects/question-support-api&lt;br /&gt;
}}&lt;br /&gt;
&lt;br /&gt;
===Current Goals===&lt;br /&gt;
&lt;br /&gt;
* Documentation&lt;br /&gt;
** Packaging&lt;br /&gt;
** Documenting Dependencies and how to enable them in a development environment (Simple tutorial on setting up your Question API Development Environment)&lt;br /&gt;
** Question Authoring guidelines&lt;br /&gt;
** Integrate within lesson planning&lt;br /&gt;
** How does an instructor get the questions they have written/found into an Activity?&lt;br /&gt;
* Liase w/ other Math4 teams and Sugarlabs (What would it take to be included in the Sugar core?)&lt;br /&gt;
* Future Development (Needs / Wants — collect proposals from other teams)&lt;br /&gt;
* Discovery / Plugin  (How do activities find questions, i.e. how to get URIs to load questions from?)&lt;br /&gt;
&lt;br /&gt;
===Setting Up a Development Environment (For Newbies)===&lt;br /&gt;
These are links, tutorials and things that [[User:Bbl5660|Brian Long]] has found along the way, as well as help gained from [[User:Enimihil|Greg Stevens]].  Brian is new to the Linux / OpenSource community, and is working on documenting a development environment for &amp;lt;b&amp;gt;you&amp;lt;/b&amp;gt; and for us to continue developing this API.  The small amount of information below is meant to help someone new step into the world of developing for the Sugar environment, from Ubuntu and have all  dependencies and things setup to continue development of this API.  &amp;lt;b&amp;gt;Next&amp;lt;/b&amp;gt; Brian would like to document how to setup these sort of items for [http://wiki.laptop.org/go/Creating_an_activity Activity developers] to include our API and be able to extend it.&lt;br /&gt;
&lt;br /&gt;
* For development environments, you may consider consider first installing a linux OS and the the LAMP stack with PhpMyAdmin.  Brian is choosing Ubuntu, Aptana as a (free) Python IDE that can be used with PyDev to easily allow Python writing.  &lt;br /&gt;
* Links that Brian is relying on at the moment include:&lt;br /&gt;
** http://help.ubuntu.com/community/ApacheMySQLPHP&lt;br /&gt;
** http://www.sqlalchemy.org/docs/04/ormtutorial.html&lt;br /&gt;
** http://docs.python.org/&lt;br /&gt;
** http://andrewbleakley.com/blog/2008/11/01/installing-and-running-aptana-on-ubuntu-810/&lt;br /&gt;
** http://forums.aptana.com/viewtopic.php?f=37&amp;amp;t=7147&amp;amp;p=32918&amp;amp;hilit=ubuntu#p32918&lt;br /&gt;
&lt;br /&gt;
====Dependencies====&lt;br /&gt;
&amp;lt;!-- Development for Linux / Python / Sugar Newbies! --&amp;gt;&lt;br /&gt;
;The following are required by the Question Support API.&lt;br /&gt;
:python-setuptools&lt;br /&gt;
:pyparsing&lt;br /&gt;
:peak-rules&lt;br /&gt;
:sqlalchemy&lt;br /&gt;
&lt;br /&gt;
;You can install these via a linux terminal in this manner:&lt;br /&gt;
        sudo apt-get install python-setuptools&lt;br /&gt;
        sudo easy_install pyparsing&lt;br /&gt;
        sudo easy_install peak-rules&lt;br /&gt;
        sudo easy_install sqlalchemy&lt;br /&gt;
&lt;br /&gt;
;Exception: When developing on a Fedora based distro, you&#039;ll need to install python-setuptools-devel for easy_install&lt;br /&gt;
&lt;br /&gt;
===Motivation===&lt;br /&gt;
In the RIT class working on the Math4 projects, many proposed activities&lt;br /&gt;
require a question database of some kind.  A common API or library for&lt;br /&gt;
accessing databases in different formats, stored either locally or remotely,&lt;br /&gt;
along with a simple mechanism to determine more complex formatting or&lt;br /&gt;
presentation than simple text (e.g. to include simple graphics or&lt;br /&gt;
mathematical notation) would cover a majority of the cases where the&lt;br /&gt;
activity needs some configurable &amp;quot;curriculum data&amp;quot;.&lt;br /&gt;
&lt;br /&gt;
Eventually this library could be extended to provide hints, explanations, or&lt;br /&gt;
walkthroughs for questions, in addition to the basic metadata about level,&lt;br /&gt;
grouping, difficulty, and subject matter that would be part of the base&lt;br /&gt;
system.&lt;br /&gt;
&lt;br /&gt;
===Envisioned Usage===&lt;br /&gt;
Consider a simple flash-card-like activity.  It presents a question from a&lt;br /&gt;
list of questions, allows the student to select an answer from the provided&lt;br /&gt;
answers for the question or to enter their own answer.  Then the correct&lt;br /&gt;
answer is revealed and the student it told whether their answer is correct.&lt;br /&gt;
If the question has an explanation of the correct answer, the flash-card&lt;br /&gt;
activity will show the explanation of the correct answer.  (Note that this&lt;br /&gt;
is just a simple usage example, the interaction design of a drilling&lt;br /&gt;
activity could be very different.)&lt;br /&gt;
&lt;br /&gt;
The flash-card activity would use this proposed Quiz API for the following:&lt;br /&gt;
&lt;br /&gt;
* Loading the questions from the storage location into memory. This includes any filtering or network lookup to download the questions from a remote resource and select appropriate questions for the student.&lt;br /&gt;
&lt;br /&gt;
* Determining whether the student has entered a correct answer.&lt;br /&gt;
&lt;br /&gt;
To start with, the library would simply be a time-saving tool for developers&lt;br /&gt;
needing similar functionality, but as the XS (School Server) becomes more&lt;br /&gt;
fully developed the library should integrate the functions provided by the&lt;br /&gt;
XS to enable automated update of course material for the current topic of&lt;br /&gt;
study so the students can drill material using any tool they prefer, while&lt;br /&gt;
still reporting progress to the instructor using the XS services.&lt;br /&gt;
&lt;br /&gt;
===Current Status===&lt;br /&gt;
&lt;br /&gt;
Currently, (14 May 2009) the API supports parsing the GIFT file format well enough to import Multiple Choice and True/False questions, along with complete implementations for basic functionality of the corresponding question objects.  No support for partial credit answers is currently implemented, nor are other question types working correctly (though most can be parsed to some extent).  Export to CSV works as intended, though it is intentionally simple.  Documentation on usage and integration of the API into an activity is in the doc/ directory of [[http://git.sugarlabs.org/projects/question-support-api the repository]]. A simple, but complete usage example, using a console interface is available in tests/complete_test.py.&lt;br /&gt;
&lt;br /&gt;
===Current implementation===&lt;br /&gt;
1. Ensure that PyParser and PEAK-Rules are installed &amp;lt;br&amp;gt;&lt;br /&gt;
2. Include the quizdata module&lt;br /&gt;
    import quizdata&lt;br /&gt;
3. Select plain text output&lt;br /&gt;
    from quizdata.text import plain_text&lt;br /&gt;
4. Select desired question types&lt;br /&gt;
    from quizdata.question import MultipleChoiceQuestion, MissingWordQuestion&lt;br /&gt;
5. Import when function to assist with question sorting&lt;br /&gt;
    from peak.rules import when&lt;br /&gt;
6. Handle questions (this section should be rewritten as needed for your activity&lt;br /&gt;
    # this is the base case for any question type we don&#039;t handle otherwise.&lt;br /&gt;
    def do_question(q):&lt;br /&gt;
        print &amp;quot;Unhandled question type.&amp;quot;, type(q)&lt;br /&gt;
    # for multiple choice questions (incl. subclasses) we do this...&lt;br /&gt;
    @when(do_question, (MultipleChoiceQuestion,))&lt;br /&gt;
    def do_multi_questions(q):&lt;br /&gt;
        print plain_text(q.text)&lt;br /&gt;
        for a in zip(&#039;0123456789&#039;, q.answers):&lt;br /&gt;
            print &amp;quot;%5s: %s&amp;quot; % a&lt;br /&gt;
        answer = int(raw_input())&lt;br /&gt;
        q.answer = q.answers[answer]&lt;br /&gt;
        print q.correct&lt;br /&gt;
    # for missing word-style questions, which aren&#039;t implemented correctly yet, and&lt;br /&gt;
    # are a subclass of multiple choice questions... we make sure to ignore them&lt;br /&gt;
    # with a more specific rule.&lt;br /&gt;
    @when(do_question, (MissingWordQuestion,))&lt;br /&gt;
    def do_mw_question(q): # XXX: inheritance is annoying here...&lt;br /&gt;
        print &amp;quot;Unhandled question type. (MissingWordQuestion)&amp;quot;&lt;br /&gt;
7. Open questions&lt;br /&gt;
    questions = quizdata.open(&amp;quot;file://%s?format=gift&amp;quot; % path.join(base_path, &#039;tests&#039;, &#039;multi_choice.txt&#039;))&lt;br /&gt;
    for q in questions:&lt;br /&gt;
        do_question(q)&lt;br /&gt;
====&amp;quot;How to Play/Use&amp;quot; for end user====&lt;br /&gt;
This is a requirement of the RIT OLPC seminar.  The question doesn&#039;t exactly pertain to the API team&#039;s project, a more applicable question might be “How development of the API is done?” and “How do activity developers include / extend our API?”.&lt;br /&gt;
* The API is written in Python, has a set of dependencies ( [http://wiki.sugarlabs.org/go/Math4Team/RIT/Projects/Question_Support_API#Dependencies which are documented on this wiki page] ). test link [[http://wiki.sugarlabs.org/go/Math4Team/RIT/Projects/Question_Support_API#Dependencies| deps]]&lt;br /&gt;
* For activity developers to include our API into an activity, we&#039;re hoping to have the Sugar development team create a mechanism for developer&#039;s to install or include components.   [[User:Enimihil|Greg Stevens]]&#039;s has a bit more knowledge on this than  [[User:bbl5660|Brian]], but we will be looking into how to package our API, and how it can be accessed by other Activities.  The issue with this later concept, is that Activities running on Sugar&#039;s platform are intentionally meant to be restricted to their own space inside of the Sugar environment.  This means that we&#039;ll either need to hack something together to make other Activities include our API, or we&#039;ll need to collaborate with people at Sugar and figure out the best practice to include our API.&lt;br /&gt;
&lt;br /&gt;
===Education Standards===&lt;br /&gt;
As a general API and not a standalone Activity, along with the nature of the API in specific, this project does not directly address any specific education standards or learning outcomes.  It is reliant on educators to write questions, or have questions available to them in usable formats.  As such, the potential educational standards this project could help to meet includes **any** standard where drilling or question/response evaluation is appropriate. (This includes a wider range of topic areas than the Math4 focus, even.)&lt;br /&gt;
&lt;br /&gt;
====A Teacher&#039;s Guide Abstract====&lt;br /&gt;
* Per the nature of this API, we&#039;ve decided that our “Teacher Guide” will be more of an abstract.  Below is a hypothetical situation of the Question Support API:Imagine a school manages a repository of quiz material that fit&#039;s some curriculum, and this repository is located at Moodle.org (for example the 4th Grade Math curriculum see: http://wiki.sugarlabs.org/go/User:Gdk/4th_Grade_Maths ).  The teacher&#039;s use of our API design might go something like this: &lt;br /&gt;
&lt;br /&gt;
* An activity that has extended / implemented our API is started by the teacher.  The teacher is presented with an input field that requires a URI (URL).  The teacher enters the URI of this week&#039;s quiz (i.e. http://moodle.org/SchoolName/ClassName/Week_11_Quiz/ )  The activity fetches the specified quiz data from the web, and presents the teacher with a summary and confirmation dialog box.  Upon confirmation, the teacher can send / assign the quiz to the class.  The class starts their corresponding activity which then also has a mechanism to either grab the assigned quiz from the Moodle.org server or from the local “School Server” (also-known-as the XS server, see: http://wiki.laptop.org/go/School_server ).  The student&#039;s complete their assigned quiz, and data is sent back to the server for reporting / grading.&lt;br /&gt;
&lt;br /&gt;
===Milestones===&lt;br /&gt;
;Initial Prototype Phase (1)&lt;br /&gt;
:Simple implementation, data model not yet nailed down, focus on import and utility to question *consumers*, Like Activities. Initial formats to include MoodleXML, GIFT.&lt;br /&gt;
        &lt;br /&gt;
;Rigorous Design Phase (2)&lt;br /&gt;
:Nail down the data model, including developing the &#039;native&#039; format, probably using a sqlite file mechanism, or other database support, if possible. Freeze the Question object (in terms of required properties,        etc.), finalize decisions about URLs for question aquisition.  Make sure requirements of other projects *can* be met by the design at this stage.&lt;br /&gt;
&lt;br /&gt;
;Full Implementation Phase (3)&lt;br /&gt;
:Complete the implementation of the import formats, including the &#039;native&#039; format.  Should be usable to other Activity developers at this point (hopefully useful, before now, but all needs should be filled at this point).  Export implementation should start now, along with prototyping for an authoring activity. (Collaboration with the reporting team *needs* to happen at this point, as the activity will probably be combined with reporting tools.)&lt;br /&gt;
&lt;br /&gt;
;Activity Development Phase (4)&lt;br /&gt;
:Complete the authoring/reporting activity for the teachers, allowing export to file formats (and possibly *serving* the questions to other XOs; requires support in activities (using the API) to support).&lt;br /&gt;
&lt;br /&gt;
===Community Contacts===&lt;br /&gt;
[[User:FGrose]], [[User:Tony37]] (see [[Talk:{{PAGENAMEE}}|talk page]])&lt;br /&gt;
&lt;br /&gt;
===RIT Project Usage===&lt;br /&gt;
{{Definition_table&lt;br /&gt;
|Produce Puzzle| No API need or usage.&lt;br /&gt;
|Lemonade Stand| No API need or usage.&lt;br /&gt;
|Assimilate| API Usage needs documented on [[Talk:{{PAGENAMEE}}|talk page]].  Progress not far enough to start implementation using the API.&lt;br /&gt;
|Fun Towers| No API need or usage.&lt;br /&gt;
|Reporting Team| Simple export format documented at [[{{PAGENAMEE}}/API_Design|API Design]].  Futher integration work would be nice, but there is more work than could be done in a year along these lines (and neither team is prepared to embark on it).&lt;br /&gt;
|Muthris| No contact from? Probably no API need or usage.&lt;br /&gt;
}}&lt;br /&gt;
===See Also===&lt;br /&gt;
{{Special:PrefixIndex/{{PAGENAMEE}}/}}&lt;/div&gt;</summary>
		<author><name>Bbl5660</name></author>
	</entry>
	<entry>
		<id>https://wiki.sugarlabs.org/index.php?title=Math4Team/RIT/Projects/Question_Support_API&amp;diff=29434</id>
		<title>Math4Team/RIT/Projects/Question Support API</title>
		<link rel="alternate" type="text/html" href="https://wiki.sugarlabs.org/index.php?title=Math4Team/RIT/Projects/Question_Support_API&amp;diff=29434"/>
		<updated>2009-05-18T19:36:48Z</updated>

		<summary type="html">&lt;p&gt;Bbl5660: /* &amp;quot;How to Play/Use&amp;quot; for end user */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;{{TOCright}}&lt;br /&gt;
==Question Support API==&lt;br /&gt;
===Project Information===&lt;br /&gt;
{{Definition_table&lt;br /&gt;
|Primary Project Contact| [[User:Enimihil|Greg Stevens]]&lt;br /&gt;
|Project Members| [[User:Enimihil|Greg Stevens]], [[User:Jfinney|Jameson Finney]], [[User:Bbl5660|Brian Long]]&lt;br /&gt;
|Source Repository| http://git.sugarlabs.org/projects/question-support-api&lt;br /&gt;
}}&lt;br /&gt;
&lt;br /&gt;
===Current Goals===&lt;br /&gt;
&lt;br /&gt;
* Documentation&lt;br /&gt;
** Packaging&lt;br /&gt;
** Documenting Dependencies and how to enable them in a development environment (Simple tutorial on setting up your Question API Development Environment)&lt;br /&gt;
** Question Authoring guidelines&lt;br /&gt;
** Integrate within lesson planning&lt;br /&gt;
** How does an instructor get the questions they have written/found into an Activity?&lt;br /&gt;
* Liase w/ other Math4 teams and Sugarlabs (What would it take to be included in the Sugar core?)&lt;br /&gt;
* Future Development (Needs / Wants — collect proposals from other teams)&lt;br /&gt;
* Discovery / Plugin  (How do activities find questions, i.e. how to get URIs to load questions from?)&lt;br /&gt;
&lt;br /&gt;
===Setting Up a Development Environment (For Newbies)===&lt;br /&gt;
These are links, tutorials and things that [[User:Bbl5660|Brian Long]] has found along the way, as well as help gained from [[User:Enimihil|Greg Stevens]].  Brian is new to the Linux / OpenSource community, and is working on documenting a development environment for &amp;lt;b&amp;gt;you&amp;lt;/b&amp;gt; and for us to continue developing this API.  The small amount of information below is meant to help someone new step into the world of developing for the Sugar environment, from Ubuntu and have all  dependencies and things setup to continue development of this API.  &amp;lt;b&amp;gt;Next&amp;lt;/b&amp;gt; Brian would like to document how to setup these sort of items for [http://wiki.laptop.org/go/Creating_an_activity Activity developers] to include our API and be able to extend it.&lt;br /&gt;
&lt;br /&gt;
* For development environments, you may consider consider first installing a linux OS and the the LAMP stack with PhpMyAdmin.  Brian is choosing Ubuntu, Aptana as a (free) Python IDE that can be used with PyDev to easily allow Python writing.  &lt;br /&gt;
* Links that Brian is relying on at the moment include:&lt;br /&gt;
** http://help.ubuntu.com/community/ApacheMySQLPHP&lt;br /&gt;
** http://www.sqlalchemy.org/docs/04/ormtutorial.html&lt;br /&gt;
** http://docs.python.org/&lt;br /&gt;
** http://andrewbleakley.com/blog/2008/11/01/installing-and-running-aptana-on-ubuntu-810/&lt;br /&gt;
** http://forums.aptana.com/viewtopic.php?f=37&amp;amp;t=7147&amp;amp;p=32918&amp;amp;hilit=ubuntu#p32918&lt;br /&gt;
&lt;br /&gt;
====Dependencies====&lt;br /&gt;
&amp;lt;!-- Development for Linux / Python / Sugar Newbies! --&amp;gt;&lt;br /&gt;
;The following are required by the Question Support API.&lt;br /&gt;
:python-setuptools&lt;br /&gt;
:pyparsing&lt;br /&gt;
:peak-rules&lt;br /&gt;
:sqlalchemy&lt;br /&gt;
&lt;br /&gt;
;You can install these via a linux terminal in this manner:&lt;br /&gt;
        sudo apt-get install python-setuptools&lt;br /&gt;
        sudo easy_install pyparsing&lt;br /&gt;
        sudo easy_install peak-rules&lt;br /&gt;
        sudo easy_install sqlalchemy&lt;br /&gt;
&lt;br /&gt;
;Exception: When developing on a Fedora based distro, you&#039;ll need to install python-setuptools-devel for easy_install&lt;br /&gt;
&lt;br /&gt;
===Motivation===&lt;br /&gt;
In the RIT class working on the Math4 projects, many proposed activities&lt;br /&gt;
require a question database of some kind.  A common API or library for&lt;br /&gt;
accessing databases in different formats, stored either locally or remotely,&lt;br /&gt;
along with a simple mechanism to determine more complex formatting or&lt;br /&gt;
presentation than simple text (e.g. to include simple graphics or&lt;br /&gt;
mathematical notation) would cover a majority of the cases where the&lt;br /&gt;
activity needs some configurable &amp;quot;curriculum data&amp;quot;.&lt;br /&gt;
&lt;br /&gt;
Eventually this library could be extended to provide hints, explanations, or&lt;br /&gt;
walkthroughs for questions, in addition to the basic metadata about level,&lt;br /&gt;
grouping, difficulty, and subject matter that would be part of the base&lt;br /&gt;
system.&lt;br /&gt;
&lt;br /&gt;
===Envisioned Usage===&lt;br /&gt;
Consider a simple flash-card-like activity.  It presents a question from a&lt;br /&gt;
list of questions, allows the student to select an answer from the provided&lt;br /&gt;
answers for the question or to enter their own answer.  Then the correct&lt;br /&gt;
answer is revealed and the student it told whether their answer is correct.&lt;br /&gt;
If the question has an explanation of the correct answer, the flash-card&lt;br /&gt;
activity will show the explanation of the correct answer.  (Note that this&lt;br /&gt;
is just a simple usage example, the interaction design of a drilling&lt;br /&gt;
activity could be very different.)&lt;br /&gt;
&lt;br /&gt;
The flash-card activity would use this proposed Quiz API for the following:&lt;br /&gt;
&lt;br /&gt;
* Loading the questions from the storage location into memory. This includes any filtering or network lookup to download the questions from a remote resource and select appropriate questions for the student.&lt;br /&gt;
&lt;br /&gt;
* Determining whether the student has entered a correct answer.&lt;br /&gt;
&lt;br /&gt;
To start with, the library would simply be a time-saving tool for developers&lt;br /&gt;
needing similar functionality, but as the XS (School Server) becomes more&lt;br /&gt;
fully developed the library should integrate the functions provided by the&lt;br /&gt;
XS to enable automated update of course material for the current topic of&lt;br /&gt;
study so the students can drill material using any tool they prefer, while&lt;br /&gt;
still reporting progress to the instructor using the XS services.&lt;br /&gt;
&lt;br /&gt;
===Current Status===&lt;br /&gt;
&lt;br /&gt;
Currently, (14 May 2009) the API supports parsing the GIFT file format well enough to import Multiple Choice and True/False questions, along with complete implementations for basic functionality of the corresponding question objects.  No support for partial credit answers is currently implemented, nor are other question types working correctly (though most can be parsed to some extent).  Export to CSV works as intended, though it is intentionally simple.  Documentation on usage and integration of the API into an activity is in the doc/ directory of [[http://git.sugarlabs.org/projects/question-support-api the repository]]. A simple, but complete usage example, using a console interface is available in tests/complete_test.py.&lt;br /&gt;
&lt;br /&gt;
===Current implementation===&lt;br /&gt;
1. Ensure that PyParser and PEAK-Rules are installed &amp;lt;br&amp;gt;&lt;br /&gt;
2. Include the quizdata module&lt;br /&gt;
    import quizdata&lt;br /&gt;
3. Select plain text output&lt;br /&gt;
    from quizdata.text import plain_text&lt;br /&gt;
4. Select desired question types&lt;br /&gt;
    from quizdata.question import MultipleChoiceQuestion, MissingWordQuestion&lt;br /&gt;
5. Import when function to assist with question sorting&lt;br /&gt;
    from peak.rules import when&lt;br /&gt;
6. Handle questions (this section should be rewritten as needed for your activity&lt;br /&gt;
    # this is the base case for any question type we don&#039;t handle otherwise.&lt;br /&gt;
    def do_question(q):&lt;br /&gt;
        print &amp;quot;Unhandled question type.&amp;quot;, type(q)&lt;br /&gt;
    # for multiple choice questions (incl. subclasses) we do this...&lt;br /&gt;
    @when(do_question, (MultipleChoiceQuestion,))&lt;br /&gt;
    def do_multi_questions(q):&lt;br /&gt;
        print plain_text(q.text)&lt;br /&gt;
        for a in zip(&#039;0123456789&#039;, q.answers):&lt;br /&gt;
            print &amp;quot;%5s: %s&amp;quot; % a&lt;br /&gt;
        answer = int(raw_input())&lt;br /&gt;
        q.answer = q.answers[answer]&lt;br /&gt;
        print q.correct&lt;br /&gt;
    # for missing word-style questions, which aren&#039;t implemented correctly yet, and&lt;br /&gt;
    # are a subclass of multiple choice questions... we make sure to ignore them&lt;br /&gt;
    # with a more specific rule.&lt;br /&gt;
    @when(do_question, (MissingWordQuestion,))&lt;br /&gt;
    def do_mw_question(q): # XXX: inheritance is annoying here...&lt;br /&gt;
        print &amp;quot;Unhandled question type. (MissingWordQuestion)&amp;quot;&lt;br /&gt;
7. Open questions&lt;br /&gt;
    questions = quizdata.open(&amp;quot;file://%s?format=gift&amp;quot; % path.join(base_path, &#039;tests&#039;, &#039;multi_choice.txt&#039;))&lt;br /&gt;
    for q in questions:&lt;br /&gt;
        do_question(q)&lt;br /&gt;
====&amp;quot;How to Play/Use&amp;quot; for end user====&lt;br /&gt;
This is a requirement of the RIT OLPC seminar.  The question doesn&#039;t exactly pertain to the API team&#039;s project, a more applicable question might be “How development of the API is done?” and “How do activity developers include / extend our API?”.&lt;br /&gt;
* The API is written in Python, has a set of dependencies ( [http://wiki.sugarlabs.org/go/Math4Team/RIT/Projects/Question_Support_API#Dependencies which are documented on this wiki page] ).&lt;br /&gt;
* For activity developers to include our API into an activity, we&#039;re hoping to have the Sugar development team create a mechanism for developer&#039;s to install or include components.   [[User:Enimihil|Greg Stevens]]&#039;s has a bit more knowledge on this than  [[User:bbl5660|Brian]], but we will be looking into how to package our API, and how it can be accessed by other Activities.  The issue with this later concept, is that Activities running on Sugar&#039;s platform are intentionally meant to be restricted to their own space inside of the Sugar environment.  This means that we&#039;ll either need to hack something together to make other Activities include our API, or we&#039;ll need to collaborate with people at Sugar and figure out the best practice to include our API.&lt;br /&gt;
&lt;br /&gt;
===Education Standards===&lt;br /&gt;
As a general API and not a standalone Activity, along with the nature of the API in specific, this project does not directly address any specific education standards or learning outcomes.  It is reliant on educators to write questions, or have questions available to them in usable formats.  As such, the potential educational standards this project could help to meet includes **any** standard where drilling or question/response evaluation is appropriate. (This includes a wider range of topic areas than the Math4 focus, even.)&lt;br /&gt;
&lt;br /&gt;
====A Teacher&#039;s Guide Abstract====&lt;br /&gt;
* Per the nature of this API, we&#039;ve decided that our “Teacher Guide” will be more of an abstract.  Below is a hypothetical situation of the Question Support API:Imagine a school manages a repository of quiz material that fit&#039;s some curriculum, and this repository is located at Moodle.org (for example the 4th Grade Math curriculum see: http://wiki.sugarlabs.org/go/User:Gdk/4th_Grade_Maths ).  The teacher&#039;s use of our API design might go something like this: &lt;br /&gt;
&lt;br /&gt;
* An activity that has extended / implemented our API is started by the teacher.  The teacher is presented with an input field that requires a URI (URL).  The teacher enters the URI of this week&#039;s quiz (i.e. http://moodle.org/SchoolName/ClassName/Week_11_Quiz/ )  The activity fetches the specified quiz data from the web, and presents the teacher with a summary and confirmation dialog box.  Upon confirmation, the teacher can send / assign the quiz to the class.  The class starts their corresponding activity which then also has a mechanism to either grab the assigned quiz from the Moodle.org server or from the local “School Server” (also-known-as the XS server, see: http://wiki.laptop.org/go/School_server ).  The student&#039;s complete their assigned quiz, and data is sent back to the server for reporting / grading.&lt;br /&gt;
&lt;br /&gt;
===Milestones===&lt;br /&gt;
;Initial Prototype Phase (1)&lt;br /&gt;
:Simple implementation, data model not yet nailed down, focus on import and utility to question *consumers*, Like Activities. Initial formats to include MoodleXML, GIFT.&lt;br /&gt;
        &lt;br /&gt;
;Rigorous Design Phase (2)&lt;br /&gt;
:Nail down the data model, including developing the &#039;native&#039; format, probably using a sqlite file mechanism, or other database support, if possible. Freeze the Question object (in terms of required properties,        etc.), finalize decisions about URLs for question aquisition.  Make sure requirements of other projects *can* be met by the design at this stage.&lt;br /&gt;
&lt;br /&gt;
;Full Implementation Phase (3)&lt;br /&gt;
:Complete the implementation of the import formats, including the &#039;native&#039; format.  Should be usable to other Activity developers at this point (hopefully useful, before now, but all needs should be filled at this point).  Export implementation should start now, along with prototyping for an authoring activity. (Collaboration with the reporting team *needs* to happen at this point, as the activity will probably be combined with reporting tools.)&lt;br /&gt;
&lt;br /&gt;
;Activity Development Phase (4)&lt;br /&gt;
:Complete the authoring/reporting activity for the teachers, allowing export to file formats (and possibly *serving* the questions to other XOs; requires support in activities (using the API) to support).&lt;br /&gt;
&lt;br /&gt;
===Community Contacts===&lt;br /&gt;
[[User:FGrose]], [[User:Tony37]] (see [[Talk:{{PAGENAMEE}}|talk page]])&lt;br /&gt;
&lt;br /&gt;
===RIT Project Usage===&lt;br /&gt;
{{Definition_table&lt;br /&gt;
|Produce Puzzle| No API need or usage.&lt;br /&gt;
|Lemonade Stand| No API need or usage.&lt;br /&gt;
|Assimilate| API Usage needs documented on [[Talk:{{PAGENAMEE}}|talk page]].  Progress not far enough to start implementation using the API.&lt;br /&gt;
|Fun Towers| No API need or usage.&lt;br /&gt;
|Reporting Team| Simple export format documented at [[{{PAGENAMEE}}/API_Design|API Design]].  Futher integration work would be nice, but there is more work than could be done in a year along these lines (and neither team is prepared to embark on it).&lt;br /&gt;
|Muthris| No contact from? Probably no API need or usage.&lt;br /&gt;
}}&lt;br /&gt;
===See Also===&lt;br /&gt;
{{Special:PrefixIndex/{{PAGENAMEE}}/}}&lt;/div&gt;</summary>
		<author><name>Bbl5660</name></author>
	</entry>
	<entry>
		<id>https://wiki.sugarlabs.org/index.php?title=Math4Team/RIT/Projects/Question_Support_API&amp;diff=29433</id>
		<title>Math4Team/RIT/Projects/Question Support API</title>
		<link rel="alternate" type="text/html" href="https://wiki.sugarlabs.org/index.php?title=Math4Team/RIT/Projects/Question_Support_API&amp;diff=29433"/>
		<updated>2009-05-18T19:36:19Z</updated>

		<summary type="html">&lt;p&gt;Bbl5660: /* &amp;quot;How to Play/Use&amp;quot; for end user */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;{{TOCright}}&lt;br /&gt;
==Question Support API==&lt;br /&gt;
===Project Information===&lt;br /&gt;
{{Definition_table&lt;br /&gt;
|Primary Project Contact| [[User:Enimihil|Greg Stevens]]&lt;br /&gt;
|Project Members| [[User:Enimihil|Greg Stevens]], [[User:Jfinney|Jameson Finney]], [[User:Bbl5660|Brian Long]]&lt;br /&gt;
|Source Repository| http://git.sugarlabs.org/projects/question-support-api&lt;br /&gt;
}}&lt;br /&gt;
&lt;br /&gt;
===Current Goals===&lt;br /&gt;
&lt;br /&gt;
* Documentation&lt;br /&gt;
** Packaging&lt;br /&gt;
** Documenting Dependencies and how to enable them in a development environment (Simple tutorial on setting up your Question API Development Environment)&lt;br /&gt;
** Question Authoring guidelines&lt;br /&gt;
** Integrate within lesson planning&lt;br /&gt;
** How does an instructor get the questions they have written/found into an Activity?&lt;br /&gt;
* Liase w/ other Math4 teams and Sugarlabs (What would it take to be included in the Sugar core?)&lt;br /&gt;
* Future Development (Needs / Wants — collect proposals from other teams)&lt;br /&gt;
* Discovery / Plugin  (How do activities find questions, i.e. how to get URIs to load questions from?)&lt;br /&gt;
&lt;br /&gt;
===Setting Up a Development Environment (For Newbies)===&lt;br /&gt;
These are links, tutorials and things that [[User:Bbl5660|Brian Long]] has found along the way, as well as help gained from [[User:Enimihil|Greg Stevens]].  Brian is new to the Linux / OpenSource community, and is working on documenting a development environment for &amp;lt;b&amp;gt;you&amp;lt;/b&amp;gt; and for us to continue developing this API.  The small amount of information below is meant to help someone new step into the world of developing for the Sugar environment, from Ubuntu and have all  dependencies and things setup to continue development of this API.  &amp;lt;b&amp;gt;Next&amp;lt;/b&amp;gt; Brian would like to document how to setup these sort of items for [http://wiki.laptop.org/go/Creating_an_activity Activity developers] to include our API and be able to extend it.&lt;br /&gt;
&lt;br /&gt;
* For development environments, you may consider consider first installing a linux OS and the the LAMP stack with PhpMyAdmin.  Brian is choosing Ubuntu, Aptana as a (free) Python IDE that can be used with PyDev to easily allow Python writing.  &lt;br /&gt;
* Links that Brian is relying on at the moment include:&lt;br /&gt;
** http://help.ubuntu.com/community/ApacheMySQLPHP&lt;br /&gt;
** http://www.sqlalchemy.org/docs/04/ormtutorial.html&lt;br /&gt;
** http://docs.python.org/&lt;br /&gt;
** http://andrewbleakley.com/blog/2008/11/01/installing-and-running-aptana-on-ubuntu-810/&lt;br /&gt;
** http://forums.aptana.com/viewtopic.php?f=37&amp;amp;t=7147&amp;amp;p=32918&amp;amp;hilit=ubuntu#p32918&lt;br /&gt;
&lt;br /&gt;
====Dependencies====&lt;br /&gt;
&amp;lt;!-- Development for Linux / Python / Sugar Newbies! --&amp;gt;&lt;br /&gt;
;The following are required by the Question Support API.&lt;br /&gt;
:python-setuptools&lt;br /&gt;
:pyparsing&lt;br /&gt;
:peak-rules&lt;br /&gt;
:sqlalchemy&lt;br /&gt;
&lt;br /&gt;
;You can install these via a linux terminal in this manner:&lt;br /&gt;
        sudo apt-get install python-setuptools&lt;br /&gt;
        sudo easy_install pyparsing&lt;br /&gt;
        sudo easy_install peak-rules&lt;br /&gt;
        sudo easy_install sqlalchemy&lt;br /&gt;
&lt;br /&gt;
;Exception: When developing on a Fedora based distro, you&#039;ll need to install python-setuptools-devel for easy_install&lt;br /&gt;
&lt;br /&gt;
===Motivation===&lt;br /&gt;
In the RIT class working on the Math4 projects, many proposed activities&lt;br /&gt;
require a question database of some kind.  A common API or library for&lt;br /&gt;
accessing databases in different formats, stored either locally or remotely,&lt;br /&gt;
along with a simple mechanism to determine more complex formatting or&lt;br /&gt;
presentation than simple text (e.g. to include simple graphics or&lt;br /&gt;
mathematical notation) would cover a majority of the cases where the&lt;br /&gt;
activity needs some configurable &amp;quot;curriculum data&amp;quot;.&lt;br /&gt;
&lt;br /&gt;
Eventually this library could be extended to provide hints, explanations, or&lt;br /&gt;
walkthroughs for questions, in addition to the basic metadata about level,&lt;br /&gt;
grouping, difficulty, and subject matter that would be part of the base&lt;br /&gt;
system.&lt;br /&gt;
&lt;br /&gt;
===Envisioned Usage===&lt;br /&gt;
Consider a simple flash-card-like activity.  It presents a question from a&lt;br /&gt;
list of questions, allows the student to select an answer from the provided&lt;br /&gt;
answers for the question or to enter their own answer.  Then the correct&lt;br /&gt;
answer is revealed and the student it told whether their answer is correct.&lt;br /&gt;
If the question has an explanation of the correct answer, the flash-card&lt;br /&gt;
activity will show the explanation of the correct answer.  (Note that this&lt;br /&gt;
is just a simple usage example, the interaction design of a drilling&lt;br /&gt;
activity could be very different.)&lt;br /&gt;
&lt;br /&gt;
The flash-card activity would use this proposed Quiz API for the following:&lt;br /&gt;
&lt;br /&gt;
* Loading the questions from the storage location into memory. This includes any filtering or network lookup to download the questions from a remote resource and select appropriate questions for the student.&lt;br /&gt;
&lt;br /&gt;
* Determining whether the student has entered a correct answer.&lt;br /&gt;
&lt;br /&gt;
To start with, the library would simply be a time-saving tool for developers&lt;br /&gt;
needing similar functionality, but as the XS (School Server) becomes more&lt;br /&gt;
fully developed the library should integrate the functions provided by the&lt;br /&gt;
XS to enable automated update of course material for the current topic of&lt;br /&gt;
study so the students can drill material using any tool they prefer, while&lt;br /&gt;
still reporting progress to the instructor using the XS services.&lt;br /&gt;
&lt;br /&gt;
===Current Status===&lt;br /&gt;
&lt;br /&gt;
Currently, (14 May 2009) the API supports parsing the GIFT file format well enough to import Multiple Choice and True/False questions, along with complete implementations for basic functionality of the corresponding question objects.  No support for partial credit answers is currently implemented, nor are other question types working correctly (though most can be parsed to some extent).  Export to CSV works as intended, though it is intentionally simple.  Documentation on usage and integration of the API into an activity is in the doc/ directory of [[http://git.sugarlabs.org/projects/question-support-api the repository]]. A simple, but complete usage example, using a console interface is available in tests/complete_test.py.&lt;br /&gt;
&lt;br /&gt;
===Current implementation===&lt;br /&gt;
1. Ensure that PyParser and PEAK-Rules are installed &amp;lt;br&amp;gt;&lt;br /&gt;
2. Include the quizdata module&lt;br /&gt;
    import quizdata&lt;br /&gt;
3. Select plain text output&lt;br /&gt;
    from quizdata.text import plain_text&lt;br /&gt;
4. Select desired question types&lt;br /&gt;
    from quizdata.question import MultipleChoiceQuestion, MissingWordQuestion&lt;br /&gt;
5. Import when function to assist with question sorting&lt;br /&gt;
    from peak.rules import when&lt;br /&gt;
6. Handle questions (this section should be rewritten as needed for your activity&lt;br /&gt;
    # this is the base case for any question type we don&#039;t handle otherwise.&lt;br /&gt;
    def do_question(q):&lt;br /&gt;
        print &amp;quot;Unhandled question type.&amp;quot;, type(q)&lt;br /&gt;
    # for multiple choice questions (incl. subclasses) we do this...&lt;br /&gt;
    @when(do_question, (MultipleChoiceQuestion,))&lt;br /&gt;
    def do_multi_questions(q):&lt;br /&gt;
        print plain_text(q.text)&lt;br /&gt;
        for a in zip(&#039;0123456789&#039;, q.answers):&lt;br /&gt;
            print &amp;quot;%5s: %s&amp;quot; % a&lt;br /&gt;
        answer = int(raw_input())&lt;br /&gt;
        q.answer = q.answers[answer]&lt;br /&gt;
        print q.correct&lt;br /&gt;
    # for missing word-style questions, which aren&#039;t implemented correctly yet, and&lt;br /&gt;
    # are a subclass of multiple choice questions... we make sure to ignore them&lt;br /&gt;
    # with a more specific rule.&lt;br /&gt;
    @when(do_question, (MissingWordQuestion,))&lt;br /&gt;
    def do_mw_question(q): # XXX: inheritance is annoying here...&lt;br /&gt;
        print &amp;quot;Unhandled question type. (MissingWordQuestion)&amp;quot;&lt;br /&gt;
7. Open questions&lt;br /&gt;
    questions = quizdata.open(&amp;quot;file://%s?format=gift&amp;quot; % path.join(base_path, &#039;tests&#039;, &#039;multi_choice.txt&#039;))&lt;br /&gt;
    for q in questions:&lt;br /&gt;
        do_question(q)&lt;br /&gt;
====&amp;quot;How to Play/Use&amp;quot; for end user====&lt;br /&gt;
This is a requirement of the RIT OLPC seminar.  The question doesn&#039;t exactly pertain to the API team&#039;s project, a more applicable question might be “How development of the API is done?” and “How do activity developers include / extend our API?”.&lt;br /&gt;
* The API is written in Python, has a set of dependencies ([ http://wiki.sugarlabs.org/go/Math4Team/RIT/Projects/Question_Support_API#Dependencies [which are documented on this wiki page] ).&lt;br /&gt;
* For activity developers to include our API into an activity, we&#039;re hoping to have the Sugar development team create a mechanism for developer&#039;s to install or include components.   [[User:Enimihil|Greg Stevens]]&#039;s has a bit more knowledge on this than  [[User:bbl5660|Brian]], but we will be looking into how to package our API, and how it can be accessed by other Activities.  The issue with this later concept, is that Activities running on Sugar&#039;s platform are intentionally meant to be restricted to their own space inside of the Sugar environment.  This means that we&#039;ll either need to hack something together to make other Activities include our API, or we&#039;ll need to collaborate with people at Sugar and figure out the best practice to include our API.&lt;br /&gt;
&lt;br /&gt;
===Education Standards===&lt;br /&gt;
As a general API and not a standalone Activity, along with the nature of the API in specific, this project does not directly address any specific education standards or learning outcomes.  It is reliant on educators to write questions, or have questions available to them in usable formats.  As such, the potential educational standards this project could help to meet includes **any** standard where drilling or question/response evaluation is appropriate. (This includes a wider range of topic areas than the Math4 focus, even.)&lt;br /&gt;
&lt;br /&gt;
====A Teacher&#039;s Guide Abstract====&lt;br /&gt;
* Per the nature of this API, we&#039;ve decided that our “Teacher Guide” will be more of an abstract.  Below is a hypothetical situation of the Question Support API:Imagine a school manages a repository of quiz material that fit&#039;s some curriculum, and this repository is located at Moodle.org (for example the 4th Grade Math curriculum see: http://wiki.sugarlabs.org/go/User:Gdk/4th_Grade_Maths ).  The teacher&#039;s use of our API design might go something like this: &lt;br /&gt;
&lt;br /&gt;
* An activity that has extended / implemented our API is started by the teacher.  The teacher is presented with an input field that requires a URI (URL).  The teacher enters the URI of this week&#039;s quiz (i.e. http://moodle.org/SchoolName/ClassName/Week_11_Quiz/ )  The activity fetches the specified quiz data from the web, and presents the teacher with a summary and confirmation dialog box.  Upon confirmation, the teacher can send / assign the quiz to the class.  The class starts their corresponding activity which then also has a mechanism to either grab the assigned quiz from the Moodle.org server or from the local “School Server” (also-known-as the XS server, see: http://wiki.laptop.org/go/School_server ).  The student&#039;s complete their assigned quiz, and data is sent back to the server for reporting / grading.&lt;br /&gt;
&lt;br /&gt;
===Milestones===&lt;br /&gt;
;Initial Prototype Phase (1)&lt;br /&gt;
:Simple implementation, data model not yet nailed down, focus on import and utility to question *consumers*, Like Activities. Initial formats to include MoodleXML, GIFT.&lt;br /&gt;
        &lt;br /&gt;
;Rigorous Design Phase (2)&lt;br /&gt;
:Nail down the data model, including developing the &#039;native&#039; format, probably using a sqlite file mechanism, or other database support, if possible. Freeze the Question object (in terms of required properties,        etc.), finalize decisions about URLs for question aquisition.  Make sure requirements of other projects *can* be met by the design at this stage.&lt;br /&gt;
&lt;br /&gt;
;Full Implementation Phase (3)&lt;br /&gt;
:Complete the implementation of the import formats, including the &#039;native&#039; format.  Should be usable to other Activity developers at this point (hopefully useful, before now, but all needs should be filled at this point).  Export implementation should start now, along with prototyping for an authoring activity. (Collaboration with the reporting team *needs* to happen at this point, as the activity will probably be combined with reporting tools.)&lt;br /&gt;
&lt;br /&gt;
;Activity Development Phase (4)&lt;br /&gt;
:Complete the authoring/reporting activity for the teachers, allowing export to file formats (and possibly *serving* the questions to other XOs; requires support in activities (using the API) to support).&lt;br /&gt;
&lt;br /&gt;
===Community Contacts===&lt;br /&gt;
[[User:FGrose]], [[User:Tony37]] (see [[Talk:{{PAGENAMEE}}|talk page]])&lt;br /&gt;
&lt;br /&gt;
===RIT Project Usage===&lt;br /&gt;
{{Definition_table&lt;br /&gt;
|Produce Puzzle| No API need or usage.&lt;br /&gt;
|Lemonade Stand| No API need or usage.&lt;br /&gt;
|Assimilate| API Usage needs documented on [[Talk:{{PAGENAMEE}}|talk page]].  Progress not far enough to start implementation using the API.&lt;br /&gt;
|Fun Towers| No API need or usage.&lt;br /&gt;
|Reporting Team| Simple export format documented at [[{{PAGENAMEE}}/API_Design|API Design]].  Futher integration work would be nice, but there is more work than could be done in a year along these lines (and neither team is prepared to embark on it).&lt;br /&gt;
|Muthris| No contact from? Probably no API need or usage.&lt;br /&gt;
}}&lt;br /&gt;
===See Also===&lt;br /&gt;
{{Special:PrefixIndex/{{PAGENAMEE}}/}}&lt;/div&gt;</summary>
		<author><name>Bbl5660</name></author>
	</entry>
	<entry>
		<id>https://wiki.sugarlabs.org/index.php?title=Math4Team/RIT/Projects/Question_Support_API&amp;diff=29432</id>
		<title>Math4Team/RIT/Projects/Question Support API</title>
		<link rel="alternate" type="text/html" href="https://wiki.sugarlabs.org/index.php?title=Math4Team/RIT/Projects/Question_Support_API&amp;diff=29432"/>
		<updated>2009-05-18T19:35:26Z</updated>

		<summary type="html">&lt;p&gt;Bbl5660: /* &amp;quot;How to Play/Use&amp;quot; for end user */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;{{TOCright}}&lt;br /&gt;
==Question Support API==&lt;br /&gt;
===Project Information===&lt;br /&gt;
{{Definition_table&lt;br /&gt;
|Primary Project Contact| [[User:Enimihil|Greg Stevens]]&lt;br /&gt;
|Project Members| [[User:Enimihil|Greg Stevens]], [[User:Jfinney|Jameson Finney]], [[User:Bbl5660|Brian Long]]&lt;br /&gt;
|Source Repository| http://git.sugarlabs.org/projects/question-support-api&lt;br /&gt;
}}&lt;br /&gt;
&lt;br /&gt;
===Current Goals===&lt;br /&gt;
&lt;br /&gt;
* Documentation&lt;br /&gt;
** Packaging&lt;br /&gt;
** Documenting Dependencies and how to enable them in a development environment (Simple tutorial on setting up your Question API Development Environment)&lt;br /&gt;
** Question Authoring guidelines&lt;br /&gt;
** Integrate within lesson planning&lt;br /&gt;
** How does an instructor get the questions they have written/found into an Activity?&lt;br /&gt;
* Liase w/ other Math4 teams and Sugarlabs (What would it take to be included in the Sugar core?)&lt;br /&gt;
* Future Development (Needs / Wants — collect proposals from other teams)&lt;br /&gt;
* Discovery / Plugin  (How do activities find questions, i.e. how to get URIs to load questions from?)&lt;br /&gt;
&lt;br /&gt;
===Setting Up a Development Environment (For Newbies)===&lt;br /&gt;
These are links, tutorials and things that [[User:Bbl5660|Brian Long]] has found along the way, as well as help gained from [[User:Enimihil|Greg Stevens]].  Brian is new to the Linux / OpenSource community, and is working on documenting a development environment for &amp;lt;b&amp;gt;you&amp;lt;/b&amp;gt; and for us to continue developing this API.  The small amount of information below is meant to help someone new step into the world of developing for the Sugar environment, from Ubuntu and have all  dependencies and things setup to continue development of this API.  &amp;lt;b&amp;gt;Next&amp;lt;/b&amp;gt; Brian would like to document how to setup these sort of items for [http://wiki.laptop.org/go/Creating_an_activity Activity developers] to include our API and be able to extend it.&lt;br /&gt;
&lt;br /&gt;
* For development environments, you may consider consider first installing a linux OS and the the LAMP stack with PhpMyAdmin.  Brian is choosing Ubuntu, Aptana as a (free) Python IDE that can be used with PyDev to easily allow Python writing.  &lt;br /&gt;
* Links that Brian is relying on at the moment include:&lt;br /&gt;
** http://help.ubuntu.com/community/ApacheMySQLPHP&lt;br /&gt;
** http://www.sqlalchemy.org/docs/04/ormtutorial.html&lt;br /&gt;
** http://docs.python.org/&lt;br /&gt;
** http://andrewbleakley.com/blog/2008/11/01/installing-and-running-aptana-on-ubuntu-810/&lt;br /&gt;
** http://forums.aptana.com/viewtopic.php?f=37&amp;amp;t=7147&amp;amp;p=32918&amp;amp;hilit=ubuntu#p32918&lt;br /&gt;
&lt;br /&gt;
====Dependencies====&lt;br /&gt;
&amp;lt;!-- Development for Linux / Python / Sugar Newbies! --&amp;gt;&lt;br /&gt;
;The following are required by the Question Support API.&lt;br /&gt;
:python-setuptools&lt;br /&gt;
:pyparsing&lt;br /&gt;
:peak-rules&lt;br /&gt;
:sqlalchemy&lt;br /&gt;
&lt;br /&gt;
;You can install these via a linux terminal in this manner:&lt;br /&gt;
        sudo apt-get install python-setuptools&lt;br /&gt;
        sudo easy_install pyparsing&lt;br /&gt;
        sudo easy_install peak-rules&lt;br /&gt;
        sudo easy_install sqlalchemy&lt;br /&gt;
&lt;br /&gt;
;Exception: When developing on a Fedora based distro, you&#039;ll need to install python-setuptools-devel for easy_install&lt;br /&gt;
&lt;br /&gt;
===Motivation===&lt;br /&gt;
In the RIT class working on the Math4 projects, many proposed activities&lt;br /&gt;
require a question database of some kind.  A common API or library for&lt;br /&gt;
accessing databases in different formats, stored either locally or remotely,&lt;br /&gt;
along with a simple mechanism to determine more complex formatting or&lt;br /&gt;
presentation than simple text (e.g. to include simple graphics or&lt;br /&gt;
mathematical notation) would cover a majority of the cases where the&lt;br /&gt;
activity needs some configurable &amp;quot;curriculum data&amp;quot;.&lt;br /&gt;
&lt;br /&gt;
Eventually this library could be extended to provide hints, explanations, or&lt;br /&gt;
walkthroughs for questions, in addition to the basic metadata about level,&lt;br /&gt;
grouping, difficulty, and subject matter that would be part of the base&lt;br /&gt;
system.&lt;br /&gt;
&lt;br /&gt;
===Envisioned Usage===&lt;br /&gt;
Consider a simple flash-card-like activity.  It presents a question from a&lt;br /&gt;
list of questions, allows the student to select an answer from the provided&lt;br /&gt;
answers for the question or to enter their own answer.  Then the correct&lt;br /&gt;
answer is revealed and the student it told whether their answer is correct.&lt;br /&gt;
If the question has an explanation of the correct answer, the flash-card&lt;br /&gt;
activity will show the explanation of the correct answer.  (Note that this&lt;br /&gt;
is just a simple usage example, the interaction design of a drilling&lt;br /&gt;
activity could be very different.)&lt;br /&gt;
&lt;br /&gt;
The flash-card activity would use this proposed Quiz API for the following:&lt;br /&gt;
&lt;br /&gt;
* Loading the questions from the storage location into memory. This includes any filtering or network lookup to download the questions from a remote resource and select appropriate questions for the student.&lt;br /&gt;
&lt;br /&gt;
* Determining whether the student has entered a correct answer.&lt;br /&gt;
&lt;br /&gt;
To start with, the library would simply be a time-saving tool for developers&lt;br /&gt;
needing similar functionality, but as the XS (School Server) becomes more&lt;br /&gt;
fully developed the library should integrate the functions provided by the&lt;br /&gt;
XS to enable automated update of course material for the current topic of&lt;br /&gt;
study so the students can drill material using any tool they prefer, while&lt;br /&gt;
still reporting progress to the instructor using the XS services.&lt;br /&gt;
&lt;br /&gt;
===Current Status===&lt;br /&gt;
&lt;br /&gt;
Currently, (14 May 2009) the API supports parsing the GIFT file format well enough to import Multiple Choice and True/False questions, along with complete implementations for basic functionality of the corresponding question objects.  No support for partial credit answers is currently implemented, nor are other question types working correctly (though most can be parsed to some extent).  Export to CSV works as intended, though it is intentionally simple.  Documentation on usage and integration of the API into an activity is in the doc/ directory of [[http://git.sugarlabs.org/projects/question-support-api the repository]]. A simple, but complete usage example, using a console interface is available in tests/complete_test.py.&lt;br /&gt;
&lt;br /&gt;
===Current implementation===&lt;br /&gt;
1. Ensure that PyParser and PEAK-Rules are installed &amp;lt;br&amp;gt;&lt;br /&gt;
2. Include the quizdata module&lt;br /&gt;
    import quizdata&lt;br /&gt;
3. Select plain text output&lt;br /&gt;
    from quizdata.text import plain_text&lt;br /&gt;
4. Select desired question types&lt;br /&gt;
    from quizdata.question import MultipleChoiceQuestion, MissingWordQuestion&lt;br /&gt;
5. Import when function to assist with question sorting&lt;br /&gt;
    from peak.rules import when&lt;br /&gt;
6. Handle questions (this section should be rewritten as needed for your activity&lt;br /&gt;
    # this is the base case for any question type we don&#039;t handle otherwise.&lt;br /&gt;
    def do_question(q):&lt;br /&gt;
        print &amp;quot;Unhandled question type.&amp;quot;, type(q)&lt;br /&gt;
    # for multiple choice questions (incl. subclasses) we do this...&lt;br /&gt;
    @when(do_question, (MultipleChoiceQuestion,))&lt;br /&gt;
    def do_multi_questions(q):&lt;br /&gt;
        print plain_text(q.text)&lt;br /&gt;
        for a in zip(&#039;0123456789&#039;, q.answers):&lt;br /&gt;
            print &amp;quot;%5s: %s&amp;quot; % a&lt;br /&gt;
        answer = int(raw_input())&lt;br /&gt;
        q.answer = q.answers[answer]&lt;br /&gt;
        print q.correct&lt;br /&gt;
    # for missing word-style questions, which aren&#039;t implemented correctly yet, and&lt;br /&gt;
    # are a subclass of multiple choice questions... we make sure to ignore them&lt;br /&gt;
    # with a more specific rule.&lt;br /&gt;
    @when(do_question, (MissingWordQuestion,))&lt;br /&gt;
    def do_mw_question(q): # XXX: inheritance is annoying here...&lt;br /&gt;
        print &amp;quot;Unhandled question type. (MissingWordQuestion)&amp;quot;&lt;br /&gt;
7. Open questions&lt;br /&gt;
    questions = quizdata.open(&amp;quot;file://%s?format=gift&amp;quot; % path.join(base_path, &#039;tests&#039;, &#039;multi_choice.txt&#039;))&lt;br /&gt;
    for q in questions:&lt;br /&gt;
        do_question(q)&lt;br /&gt;
====&amp;quot;How to Play/Use&amp;quot; for end user====&lt;br /&gt;
This is a requirement of the RIT OLPC seminar.  The question doesn&#039;t exactly pertain to the API team&#039;s project, a more applicable question might be “How development of the API is done?” and “How do activity developers include / extend our API?”.&lt;br /&gt;
* The API is written in Python, has a set of dependencies ([[which are documented on this wiki page | http://wiki.sugarlabs.org/go/Math4Team/RIT/Projects/Question_Support_API#Dependencies]] ).&lt;br /&gt;
* For activity developers to include our API into an activity, we&#039;re hoping to have the Sugar development team create a mechanism for developer&#039;s to install or include components.   [[User:Enimihil|Greg Stevens]]&#039;s has a bit more knowledge on this than  [[User:bbl5660|Brian]], but we will be looking into how to package our API, and how it can be accessed by other Activities.  The issue with this later concept, is that Activities running on Sugar&#039;s platform are intentionally meant to be restricted to their own space inside of the Sugar environment.  This means that we&#039;ll either need to hack something together to make other Activities include our API, or we&#039;ll need to collaborate with people at Sugar and figure out the best practice to include our API.&lt;br /&gt;
&lt;br /&gt;
===Education Standards===&lt;br /&gt;
As a general API and not a standalone Activity, along with the nature of the API in specific, this project does not directly address any specific education standards or learning outcomes.  It is reliant on educators to write questions, or have questions available to them in usable formats.  As such, the potential educational standards this project could help to meet includes **any** standard where drilling or question/response evaluation is appropriate. (This includes a wider range of topic areas than the Math4 focus, even.)&lt;br /&gt;
&lt;br /&gt;
====A Teacher&#039;s Guide Abstract====&lt;br /&gt;
* Per the nature of this API, we&#039;ve decided that our “Teacher Guide” will be more of an abstract.  Below is a hypothetical situation of the Question Support API:Imagine a school manages a repository of quiz material that fit&#039;s some curriculum, and this repository is located at Moodle.org (for example the 4th Grade Math curriculum see: http://wiki.sugarlabs.org/go/User:Gdk/4th_Grade_Maths ).  The teacher&#039;s use of our API design might go something like this: &lt;br /&gt;
&lt;br /&gt;
* An activity that has extended / implemented our API is started by the teacher.  The teacher is presented with an input field that requires a URI (URL).  The teacher enters the URI of this week&#039;s quiz (i.e. http://moodle.org/SchoolName/ClassName/Week_11_Quiz/ )  The activity fetches the specified quiz data from the web, and presents the teacher with a summary and confirmation dialog box.  Upon confirmation, the teacher can send / assign the quiz to the class.  The class starts their corresponding activity which then also has a mechanism to either grab the assigned quiz from the Moodle.org server or from the local “School Server” (also-known-as the XS server, see: http://wiki.laptop.org/go/School_server ).  The student&#039;s complete their assigned quiz, and data is sent back to the server for reporting / grading.&lt;br /&gt;
&lt;br /&gt;
===Milestones===&lt;br /&gt;
;Initial Prototype Phase (1)&lt;br /&gt;
:Simple implementation, data model not yet nailed down, focus on import and utility to question *consumers*, Like Activities. Initial formats to include MoodleXML, GIFT.&lt;br /&gt;
        &lt;br /&gt;
;Rigorous Design Phase (2)&lt;br /&gt;
:Nail down the data model, including developing the &#039;native&#039; format, probably using a sqlite file mechanism, or other database support, if possible. Freeze the Question object (in terms of required properties,        etc.), finalize decisions about URLs for question aquisition.  Make sure requirements of other projects *can* be met by the design at this stage.&lt;br /&gt;
&lt;br /&gt;
;Full Implementation Phase (3)&lt;br /&gt;
:Complete the implementation of the import formats, including the &#039;native&#039; format.  Should be usable to other Activity developers at this point (hopefully useful, before now, but all needs should be filled at this point).  Export implementation should start now, along with prototyping for an authoring activity. (Collaboration with the reporting team *needs* to happen at this point, as the activity will probably be combined with reporting tools.)&lt;br /&gt;
&lt;br /&gt;
;Activity Development Phase (4)&lt;br /&gt;
:Complete the authoring/reporting activity for the teachers, allowing export to file formats (and possibly *serving* the questions to other XOs; requires support in activities (using the API) to support).&lt;br /&gt;
&lt;br /&gt;
===Community Contacts===&lt;br /&gt;
[[User:FGrose]], [[User:Tony37]] (see [[Talk:{{PAGENAMEE}}|talk page]])&lt;br /&gt;
&lt;br /&gt;
===RIT Project Usage===&lt;br /&gt;
{{Definition_table&lt;br /&gt;
|Produce Puzzle| No API need or usage.&lt;br /&gt;
|Lemonade Stand| No API need or usage.&lt;br /&gt;
|Assimilate| API Usage needs documented on [[Talk:{{PAGENAMEE}}|talk page]].  Progress not far enough to start implementation using the API.&lt;br /&gt;
|Fun Towers| No API need or usage.&lt;br /&gt;
|Reporting Team| Simple export format documented at [[{{PAGENAMEE}}/API_Design|API Design]].  Futher integration work would be nice, but there is more work than could be done in a year along these lines (and neither team is prepared to embark on it).&lt;br /&gt;
|Muthris| No contact from? Probably no API need or usage.&lt;br /&gt;
}}&lt;br /&gt;
===See Also===&lt;br /&gt;
{{Special:PrefixIndex/{{PAGENAMEE}}/}}&lt;/div&gt;</summary>
		<author><name>Bbl5660</name></author>
	</entry>
	<entry>
		<id>https://wiki.sugarlabs.org/index.php?title=Math4Team/RIT/Projects/Question_Support_API&amp;diff=29431</id>
		<title>Math4Team/RIT/Projects/Question Support API</title>
		<link rel="alternate" type="text/html" href="https://wiki.sugarlabs.org/index.php?title=Math4Team/RIT/Projects/Question_Support_API&amp;diff=29431"/>
		<updated>2009-05-18T19:34:31Z</updated>

		<summary type="html">&lt;p&gt;Bbl5660: /* &amp;quot;How to Play/Use&amp;quot; for end user */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;{{TOCright}}&lt;br /&gt;
==Question Support API==&lt;br /&gt;
===Project Information===&lt;br /&gt;
{{Definition_table&lt;br /&gt;
|Primary Project Contact| [[User:Enimihil|Greg Stevens]]&lt;br /&gt;
|Project Members| [[User:Enimihil|Greg Stevens]], [[User:Jfinney|Jameson Finney]], [[User:Bbl5660|Brian Long]]&lt;br /&gt;
|Source Repository| http://git.sugarlabs.org/projects/question-support-api&lt;br /&gt;
}}&lt;br /&gt;
&lt;br /&gt;
===Current Goals===&lt;br /&gt;
&lt;br /&gt;
* Documentation&lt;br /&gt;
** Packaging&lt;br /&gt;
** Documenting Dependencies and how to enable them in a development environment (Simple tutorial on setting up your Question API Development Environment)&lt;br /&gt;
** Question Authoring guidelines&lt;br /&gt;
** Integrate within lesson planning&lt;br /&gt;
** How does an instructor get the questions they have written/found into an Activity?&lt;br /&gt;
* Liase w/ other Math4 teams and Sugarlabs (What would it take to be included in the Sugar core?)&lt;br /&gt;
* Future Development (Needs / Wants — collect proposals from other teams)&lt;br /&gt;
* Discovery / Plugin  (How do activities find questions, i.e. how to get URIs to load questions from?)&lt;br /&gt;
&lt;br /&gt;
===Setting Up a Development Environment (For Newbies)===&lt;br /&gt;
These are links, tutorials and things that [[User:Bbl5660|Brian Long]] has found along the way, as well as help gained from [[User:Enimihil|Greg Stevens]].  Brian is new to the Linux / OpenSource community, and is working on documenting a development environment for &amp;lt;b&amp;gt;you&amp;lt;/b&amp;gt; and for us to continue developing this API.  The small amount of information below is meant to help someone new step into the world of developing for the Sugar environment, from Ubuntu and have all  dependencies and things setup to continue development of this API.  &amp;lt;b&amp;gt;Next&amp;lt;/b&amp;gt; Brian would like to document how to setup these sort of items for [http://wiki.laptop.org/go/Creating_an_activity Activity developers] to include our API and be able to extend it.&lt;br /&gt;
&lt;br /&gt;
* For development environments, you may consider consider first installing a linux OS and the the LAMP stack with PhpMyAdmin.  Brian is choosing Ubuntu, Aptana as a (free) Python IDE that can be used with PyDev to easily allow Python writing.  &lt;br /&gt;
* Links that Brian is relying on at the moment include:&lt;br /&gt;
** http://help.ubuntu.com/community/ApacheMySQLPHP&lt;br /&gt;
** http://www.sqlalchemy.org/docs/04/ormtutorial.html&lt;br /&gt;
** http://docs.python.org/&lt;br /&gt;
** http://andrewbleakley.com/blog/2008/11/01/installing-and-running-aptana-on-ubuntu-810/&lt;br /&gt;
** http://forums.aptana.com/viewtopic.php?f=37&amp;amp;t=7147&amp;amp;p=32918&amp;amp;hilit=ubuntu#p32918&lt;br /&gt;
&lt;br /&gt;
====Dependencies====&lt;br /&gt;
&amp;lt;!-- Development for Linux / Python / Sugar Newbies! --&amp;gt;&lt;br /&gt;
;The following are required by the Question Support API.&lt;br /&gt;
:python-setuptools&lt;br /&gt;
:pyparsing&lt;br /&gt;
:peak-rules&lt;br /&gt;
:sqlalchemy&lt;br /&gt;
&lt;br /&gt;
;You can install these via a linux terminal in this manner:&lt;br /&gt;
        sudo apt-get install python-setuptools&lt;br /&gt;
        sudo easy_install pyparsing&lt;br /&gt;
        sudo easy_install peak-rules&lt;br /&gt;
        sudo easy_install sqlalchemy&lt;br /&gt;
&lt;br /&gt;
;Exception: When developing on a Fedora based distro, you&#039;ll need to install python-setuptools-devel for easy_install&lt;br /&gt;
&lt;br /&gt;
===Motivation===&lt;br /&gt;
In the RIT class working on the Math4 projects, many proposed activities&lt;br /&gt;
require a question database of some kind.  A common API or library for&lt;br /&gt;
accessing databases in different formats, stored either locally or remotely,&lt;br /&gt;
along with a simple mechanism to determine more complex formatting or&lt;br /&gt;
presentation than simple text (e.g. to include simple graphics or&lt;br /&gt;
mathematical notation) would cover a majority of the cases where the&lt;br /&gt;
activity needs some configurable &amp;quot;curriculum data&amp;quot;.&lt;br /&gt;
&lt;br /&gt;
Eventually this library could be extended to provide hints, explanations, or&lt;br /&gt;
walkthroughs for questions, in addition to the basic metadata about level,&lt;br /&gt;
grouping, difficulty, and subject matter that would be part of the base&lt;br /&gt;
system.&lt;br /&gt;
&lt;br /&gt;
===Envisioned Usage===&lt;br /&gt;
Consider a simple flash-card-like activity.  It presents a question from a&lt;br /&gt;
list of questions, allows the student to select an answer from the provided&lt;br /&gt;
answers for the question or to enter their own answer.  Then the correct&lt;br /&gt;
answer is revealed and the student it told whether their answer is correct.&lt;br /&gt;
If the question has an explanation of the correct answer, the flash-card&lt;br /&gt;
activity will show the explanation of the correct answer.  (Note that this&lt;br /&gt;
is just a simple usage example, the interaction design of a drilling&lt;br /&gt;
activity could be very different.)&lt;br /&gt;
&lt;br /&gt;
The flash-card activity would use this proposed Quiz API for the following:&lt;br /&gt;
&lt;br /&gt;
* Loading the questions from the storage location into memory. This includes any filtering or network lookup to download the questions from a remote resource and select appropriate questions for the student.&lt;br /&gt;
&lt;br /&gt;
* Determining whether the student has entered a correct answer.&lt;br /&gt;
&lt;br /&gt;
To start with, the library would simply be a time-saving tool for developers&lt;br /&gt;
needing similar functionality, but as the XS (School Server) becomes more&lt;br /&gt;
fully developed the library should integrate the functions provided by the&lt;br /&gt;
XS to enable automated update of course material for the current topic of&lt;br /&gt;
study so the students can drill material using any tool they prefer, while&lt;br /&gt;
still reporting progress to the instructor using the XS services.&lt;br /&gt;
&lt;br /&gt;
===Current Status===&lt;br /&gt;
&lt;br /&gt;
Currently, (14 May 2009) the API supports parsing the GIFT file format well enough to import Multiple Choice and True/False questions, along with complete implementations for basic functionality of the corresponding question objects.  No support for partial credit answers is currently implemented, nor are other question types working correctly (though most can be parsed to some extent).  Export to CSV works as intended, though it is intentionally simple.  Documentation on usage and integration of the API into an activity is in the doc/ directory of [[http://git.sugarlabs.org/projects/question-support-api the repository]]. A simple, but complete usage example, using a console interface is available in tests/complete_test.py.&lt;br /&gt;
&lt;br /&gt;
===Current implementation===&lt;br /&gt;
1. Ensure that PyParser and PEAK-Rules are installed &amp;lt;br&amp;gt;&lt;br /&gt;
2. Include the quizdata module&lt;br /&gt;
    import quizdata&lt;br /&gt;
3. Select plain text output&lt;br /&gt;
    from quizdata.text import plain_text&lt;br /&gt;
4. Select desired question types&lt;br /&gt;
    from quizdata.question import MultipleChoiceQuestion, MissingWordQuestion&lt;br /&gt;
5. Import when function to assist with question sorting&lt;br /&gt;
    from peak.rules import when&lt;br /&gt;
6. Handle questions (this section should be rewritten as needed for your activity&lt;br /&gt;
    # this is the base case for any question type we don&#039;t handle otherwise.&lt;br /&gt;
    def do_question(q):&lt;br /&gt;
        print &amp;quot;Unhandled question type.&amp;quot;, type(q)&lt;br /&gt;
    # for multiple choice questions (incl. subclasses) we do this...&lt;br /&gt;
    @when(do_question, (MultipleChoiceQuestion,))&lt;br /&gt;
    def do_multi_questions(q):&lt;br /&gt;
        print plain_text(q.text)&lt;br /&gt;
        for a in zip(&#039;0123456789&#039;, q.answers):&lt;br /&gt;
            print &amp;quot;%5s: %s&amp;quot; % a&lt;br /&gt;
        answer = int(raw_input())&lt;br /&gt;
        q.answer = q.answers[answer]&lt;br /&gt;
        print q.correct&lt;br /&gt;
    # for missing word-style questions, which aren&#039;t implemented correctly yet, and&lt;br /&gt;
    # are a subclass of multiple choice questions... we make sure to ignore them&lt;br /&gt;
    # with a more specific rule.&lt;br /&gt;
    @when(do_question, (MissingWordQuestion,))&lt;br /&gt;
    def do_mw_question(q): # XXX: inheritance is annoying here...&lt;br /&gt;
        print &amp;quot;Unhandled question type. (MissingWordQuestion)&amp;quot;&lt;br /&gt;
7. Open questions&lt;br /&gt;
    questions = quizdata.open(&amp;quot;file://%s?format=gift&amp;quot; % path.join(base_path, &#039;tests&#039;, &#039;multi_choice.txt&#039;))&lt;br /&gt;
    for q in questions:&lt;br /&gt;
        do_question(q)&lt;br /&gt;
====&amp;quot;How to Play/Use&amp;quot; for end user====&lt;br /&gt;
This is a requirement of the RIT OLPC seminar.  The question doesn&#039;t exactly pertain to the API team&#039;s project, a more applicable question might be “How development of the API is done?” and “How do activity developers include / extend our API?”.&lt;br /&gt;
* The API is written in Python, has a set of dependencies ([which are documented on this wiki page http://wiki.sugarlabs.org/go/Math4Team/RIT/Projects/Question_Support_API#Dependencies] ).&lt;br /&gt;
* For activity developers to include our API into an activity, we&#039;re hoping to have the Sugar development team create a mechanism for developer&#039;s to install or include components.   [[User:Enimihil|Greg Stevens]]&#039;s has a bit more knowledge on this than  [[User:bbl5660|Brian]], but we will be looking into how to package our API, and how it can be accessed by other Activities.  The issue with this later concept, is that Activities running on Sugar&#039;s platform are intentionally meant to be restricted to their own space inside of the Sugar environment.  This means that we&#039;ll either need to hack something together to make other Activities include our API, or we&#039;ll need to collaborate with people at Sugar and figure out the best practice to include our API.&lt;br /&gt;
&lt;br /&gt;
===Education Standards===&lt;br /&gt;
As a general API and not a standalone Activity, along with the nature of the API in specific, this project does not directly address any specific education standards or learning outcomes.  It is reliant on educators to write questions, or have questions available to them in usable formats.  As such, the potential educational standards this project could help to meet includes **any** standard where drilling or question/response evaluation is appropriate. (This includes a wider range of topic areas than the Math4 focus, even.)&lt;br /&gt;
&lt;br /&gt;
====A Teacher&#039;s Guide Abstract====&lt;br /&gt;
* Per the nature of this API, we&#039;ve decided that our “Teacher Guide” will be more of an abstract.  Below is a hypothetical situation of the Question Support API:Imagine a school manages a repository of quiz material that fit&#039;s some curriculum, and this repository is located at Moodle.org (for example the 4th Grade Math curriculum see: http://wiki.sugarlabs.org/go/User:Gdk/4th_Grade_Maths ).  The teacher&#039;s use of our API design might go something like this: &lt;br /&gt;
&lt;br /&gt;
* An activity that has extended / implemented our API is started by the teacher.  The teacher is presented with an input field that requires a URI (URL).  The teacher enters the URI of this week&#039;s quiz (i.e. http://moodle.org/SchoolName/ClassName/Week_11_Quiz/ )  The activity fetches the specified quiz data from the web, and presents the teacher with a summary and confirmation dialog box.  Upon confirmation, the teacher can send / assign the quiz to the class.  The class starts their corresponding activity which then also has a mechanism to either grab the assigned quiz from the Moodle.org server or from the local “School Server” (also-known-as the XS server, see: http://wiki.laptop.org/go/School_server ).  The student&#039;s complete their assigned quiz, and data is sent back to the server for reporting / grading.&lt;br /&gt;
&lt;br /&gt;
===Milestones===&lt;br /&gt;
;Initial Prototype Phase (1)&lt;br /&gt;
:Simple implementation, data model not yet nailed down, focus on import and utility to question *consumers*, Like Activities. Initial formats to include MoodleXML, GIFT.&lt;br /&gt;
        &lt;br /&gt;
;Rigorous Design Phase (2)&lt;br /&gt;
:Nail down the data model, including developing the &#039;native&#039; format, probably using a sqlite file mechanism, or other database support, if possible. Freeze the Question object (in terms of required properties,        etc.), finalize decisions about URLs for question aquisition.  Make sure requirements of other projects *can* be met by the design at this stage.&lt;br /&gt;
&lt;br /&gt;
;Full Implementation Phase (3)&lt;br /&gt;
:Complete the implementation of the import formats, including the &#039;native&#039; format.  Should be usable to other Activity developers at this point (hopefully useful, before now, but all needs should be filled at this point).  Export implementation should start now, along with prototyping for an authoring activity. (Collaboration with the reporting team *needs* to happen at this point, as the activity will probably be combined with reporting tools.)&lt;br /&gt;
&lt;br /&gt;
;Activity Development Phase (4)&lt;br /&gt;
:Complete the authoring/reporting activity for the teachers, allowing export to file formats (and possibly *serving* the questions to other XOs; requires support in activities (using the API) to support).&lt;br /&gt;
&lt;br /&gt;
===Community Contacts===&lt;br /&gt;
[[User:FGrose]], [[User:Tony37]] (see [[Talk:{{PAGENAMEE}}|talk page]])&lt;br /&gt;
&lt;br /&gt;
===RIT Project Usage===&lt;br /&gt;
{{Definition_table&lt;br /&gt;
|Produce Puzzle| No API need or usage.&lt;br /&gt;
|Lemonade Stand| No API need or usage.&lt;br /&gt;
|Assimilate| API Usage needs documented on [[Talk:{{PAGENAMEE}}|talk page]].  Progress not far enough to start implementation using the API.&lt;br /&gt;
|Fun Towers| No API need or usage.&lt;br /&gt;
|Reporting Team| Simple export format documented at [[{{PAGENAMEE}}/API_Design|API Design]].  Futher integration work would be nice, but there is more work than could be done in a year along these lines (and neither team is prepared to embark on it).&lt;br /&gt;
|Muthris| No contact from? Probably no API need or usage.&lt;br /&gt;
}}&lt;br /&gt;
===See Also===&lt;br /&gt;
{{Special:PrefixIndex/{{PAGENAMEE}}/}}&lt;/div&gt;</summary>
		<author><name>Bbl5660</name></author>
	</entry>
	<entry>
		<id>https://wiki.sugarlabs.org/index.php?title=Math4Team/RIT/Projects/Question_Support_API&amp;diff=29430</id>
		<title>Math4Team/RIT/Projects/Question Support API</title>
		<link rel="alternate" type="text/html" href="https://wiki.sugarlabs.org/index.php?title=Math4Team/RIT/Projects/Question_Support_API&amp;diff=29430"/>
		<updated>2009-05-18T19:33:31Z</updated>

		<summary type="html">&lt;p&gt;Bbl5660: /* Dependencies */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;{{TOCright}}&lt;br /&gt;
==Question Support API==&lt;br /&gt;
===Project Information===&lt;br /&gt;
{{Definition_table&lt;br /&gt;
|Primary Project Contact| [[User:Enimihil|Greg Stevens]]&lt;br /&gt;
|Project Members| [[User:Enimihil|Greg Stevens]], [[User:Jfinney|Jameson Finney]], [[User:Bbl5660|Brian Long]]&lt;br /&gt;
|Source Repository| http://git.sugarlabs.org/projects/question-support-api&lt;br /&gt;
}}&lt;br /&gt;
&lt;br /&gt;
===Current Goals===&lt;br /&gt;
&lt;br /&gt;
* Documentation&lt;br /&gt;
** Packaging&lt;br /&gt;
** Documenting Dependencies and how to enable them in a development environment (Simple tutorial on setting up your Question API Development Environment)&lt;br /&gt;
** Question Authoring guidelines&lt;br /&gt;
** Integrate within lesson planning&lt;br /&gt;
** How does an instructor get the questions they have written/found into an Activity?&lt;br /&gt;
* Liase w/ other Math4 teams and Sugarlabs (What would it take to be included in the Sugar core?)&lt;br /&gt;
* Future Development (Needs / Wants — collect proposals from other teams)&lt;br /&gt;
* Discovery / Plugin  (How do activities find questions, i.e. how to get URIs to load questions from?)&lt;br /&gt;
&lt;br /&gt;
===Setting Up a Development Environment (For Newbies)===&lt;br /&gt;
These are links, tutorials and things that [[User:Bbl5660|Brian Long]] has found along the way, as well as help gained from [[User:Enimihil|Greg Stevens]].  Brian is new to the Linux / OpenSource community, and is working on documenting a development environment for &amp;lt;b&amp;gt;you&amp;lt;/b&amp;gt; and for us to continue developing this API.  The small amount of information below is meant to help someone new step into the world of developing for the Sugar environment, from Ubuntu and have all  dependencies and things setup to continue development of this API.  &amp;lt;b&amp;gt;Next&amp;lt;/b&amp;gt; Brian would like to document how to setup these sort of items for [http://wiki.laptop.org/go/Creating_an_activity Activity developers] to include our API and be able to extend it.&lt;br /&gt;
&lt;br /&gt;
* For development environments, you may consider consider first installing a linux OS and the the LAMP stack with PhpMyAdmin.  Brian is choosing Ubuntu, Aptana as a (free) Python IDE that can be used with PyDev to easily allow Python writing.  &lt;br /&gt;
* Links that Brian is relying on at the moment include:&lt;br /&gt;
** http://help.ubuntu.com/community/ApacheMySQLPHP&lt;br /&gt;
** http://www.sqlalchemy.org/docs/04/ormtutorial.html&lt;br /&gt;
** http://docs.python.org/&lt;br /&gt;
** http://andrewbleakley.com/blog/2008/11/01/installing-and-running-aptana-on-ubuntu-810/&lt;br /&gt;
** http://forums.aptana.com/viewtopic.php?f=37&amp;amp;t=7147&amp;amp;p=32918&amp;amp;hilit=ubuntu#p32918&lt;br /&gt;
&lt;br /&gt;
====Dependencies====&lt;br /&gt;
&amp;lt;!-- Development for Linux / Python / Sugar Newbies! --&amp;gt;&lt;br /&gt;
;The following are required by the Question Support API.&lt;br /&gt;
:python-setuptools&lt;br /&gt;
:pyparsing&lt;br /&gt;
:peak-rules&lt;br /&gt;
:sqlalchemy&lt;br /&gt;
&lt;br /&gt;
;You can install these via a linux terminal in this manner:&lt;br /&gt;
        sudo apt-get install python-setuptools&lt;br /&gt;
        sudo easy_install pyparsing&lt;br /&gt;
        sudo easy_install peak-rules&lt;br /&gt;
        sudo easy_install sqlalchemy&lt;br /&gt;
&lt;br /&gt;
;Exception: When developing on a Fedora based distro, you&#039;ll need to install python-setuptools-devel for easy_install&lt;br /&gt;
&lt;br /&gt;
===Motivation===&lt;br /&gt;
In the RIT class working on the Math4 projects, many proposed activities&lt;br /&gt;
require a question database of some kind.  A common API or library for&lt;br /&gt;
accessing databases in different formats, stored either locally or remotely,&lt;br /&gt;
along with a simple mechanism to determine more complex formatting or&lt;br /&gt;
presentation than simple text (e.g. to include simple graphics or&lt;br /&gt;
mathematical notation) would cover a majority of the cases where the&lt;br /&gt;
activity needs some configurable &amp;quot;curriculum data&amp;quot;.&lt;br /&gt;
&lt;br /&gt;
Eventually this library could be extended to provide hints, explanations, or&lt;br /&gt;
walkthroughs for questions, in addition to the basic metadata about level,&lt;br /&gt;
grouping, difficulty, and subject matter that would be part of the base&lt;br /&gt;
system.&lt;br /&gt;
&lt;br /&gt;
===Envisioned Usage===&lt;br /&gt;
Consider a simple flash-card-like activity.  It presents a question from a&lt;br /&gt;
list of questions, allows the student to select an answer from the provided&lt;br /&gt;
answers for the question or to enter their own answer.  Then the correct&lt;br /&gt;
answer is revealed and the student it told whether their answer is correct.&lt;br /&gt;
If the question has an explanation of the correct answer, the flash-card&lt;br /&gt;
activity will show the explanation of the correct answer.  (Note that this&lt;br /&gt;
is just a simple usage example, the interaction design of a drilling&lt;br /&gt;
activity could be very different.)&lt;br /&gt;
&lt;br /&gt;
The flash-card activity would use this proposed Quiz API for the following:&lt;br /&gt;
&lt;br /&gt;
* Loading the questions from the storage location into memory. This includes any filtering or network lookup to download the questions from a remote resource and select appropriate questions for the student.&lt;br /&gt;
&lt;br /&gt;
* Determining whether the student has entered a correct answer.&lt;br /&gt;
&lt;br /&gt;
To start with, the library would simply be a time-saving tool for developers&lt;br /&gt;
needing similar functionality, but as the XS (School Server) becomes more&lt;br /&gt;
fully developed the library should integrate the functions provided by the&lt;br /&gt;
XS to enable automated update of course material for the current topic of&lt;br /&gt;
study so the students can drill material using any tool they prefer, while&lt;br /&gt;
still reporting progress to the instructor using the XS services.&lt;br /&gt;
&lt;br /&gt;
===Current Status===&lt;br /&gt;
&lt;br /&gt;
Currently, (14 May 2009) the API supports parsing the GIFT file format well enough to import Multiple Choice and True/False questions, along with complete implementations for basic functionality of the corresponding question objects.  No support for partial credit answers is currently implemented, nor are other question types working correctly (though most can be parsed to some extent).  Export to CSV works as intended, though it is intentionally simple.  Documentation on usage and integration of the API into an activity is in the doc/ directory of [[http://git.sugarlabs.org/projects/question-support-api the repository]]. A simple, but complete usage example, using a console interface is available in tests/complete_test.py.&lt;br /&gt;
&lt;br /&gt;
===Current implementation===&lt;br /&gt;
1. Ensure that PyParser and PEAK-Rules are installed &amp;lt;br&amp;gt;&lt;br /&gt;
2. Include the quizdata module&lt;br /&gt;
    import quizdata&lt;br /&gt;
3. Select plain text output&lt;br /&gt;
    from quizdata.text import plain_text&lt;br /&gt;
4. Select desired question types&lt;br /&gt;
    from quizdata.question import MultipleChoiceQuestion, MissingWordQuestion&lt;br /&gt;
5. Import when function to assist with question sorting&lt;br /&gt;
    from peak.rules import when&lt;br /&gt;
6. Handle questions (this section should be rewritten as needed for your activity&lt;br /&gt;
    # this is the base case for any question type we don&#039;t handle otherwise.&lt;br /&gt;
    def do_question(q):&lt;br /&gt;
        print &amp;quot;Unhandled question type.&amp;quot;, type(q)&lt;br /&gt;
    # for multiple choice questions (incl. subclasses) we do this...&lt;br /&gt;
    @when(do_question, (MultipleChoiceQuestion,))&lt;br /&gt;
    def do_multi_questions(q):&lt;br /&gt;
        print plain_text(q.text)&lt;br /&gt;
        for a in zip(&#039;0123456789&#039;, q.answers):&lt;br /&gt;
            print &amp;quot;%5s: %s&amp;quot; % a&lt;br /&gt;
        answer = int(raw_input())&lt;br /&gt;
        q.answer = q.answers[answer]&lt;br /&gt;
        print q.correct&lt;br /&gt;
    # for missing word-style questions, which aren&#039;t implemented correctly yet, and&lt;br /&gt;
    # are a subclass of multiple choice questions... we make sure to ignore them&lt;br /&gt;
    # with a more specific rule.&lt;br /&gt;
    @when(do_question, (MissingWordQuestion,))&lt;br /&gt;
    def do_mw_question(q): # XXX: inheritance is annoying here...&lt;br /&gt;
        print &amp;quot;Unhandled question type. (MissingWordQuestion)&amp;quot;&lt;br /&gt;
7. Open questions&lt;br /&gt;
    questions = quizdata.open(&amp;quot;file://%s?format=gift&amp;quot; % path.join(base_path, &#039;tests&#039;, &#039;multi_choice.txt&#039;))&lt;br /&gt;
    for q in questions:&lt;br /&gt;
        do_question(q)&lt;br /&gt;
====&amp;quot;How to Play/Use&amp;quot; for end user====&lt;br /&gt;
This is a requirement of the RIT OLPC seminar.  The question doesn&#039;t exactly pertain to the API team&#039;s project, a more applicable question might be “How development of the API is done?” and “How do activity developers include / extend our API?”.&lt;br /&gt;
* The API is written in Python, has a set of dependencies (which are documented on this wiki page).&lt;br /&gt;
* For activity developers to include our API into an activity, we&#039;re hoping to have the Sugar development team create a mechanism for developer&#039;s to install or include components.   [[User:Enimihil|Greg Stevens]]&#039;s has a bit more knowledge on this than  [[User:bbl5660|Brian]], but we will be looking into how to package our API, and how it can be accessed by other Activities.  The issue with this later concept, is that Activities running on Sugar&#039;s platform are intentionally meant to be restricted to their own space inside of the Sugar environment.  This means that we&#039;ll either need to hack something together to make other Activities include our API, or we&#039;ll need to collaborate with people at Sugar and figure out the best practice to include our API.&lt;br /&gt;
&lt;br /&gt;
===Education Standards===&lt;br /&gt;
As a general API and not a standalone Activity, along with the nature of the API in specific, this project does not directly address any specific education standards or learning outcomes.  It is reliant on educators to write questions, or have questions available to them in usable formats.  As such, the potential educational standards this project could help to meet includes **any** standard where drilling or question/response evaluation is appropriate. (This includes a wider range of topic areas than the Math4 focus, even.)&lt;br /&gt;
&lt;br /&gt;
====A Teacher&#039;s Guide Abstract====&lt;br /&gt;
* Per the nature of this API, we&#039;ve decided that our “Teacher Guide” will be more of an abstract.  Below is a hypothetical situation of the Question Support API:Imagine a school manages a repository of quiz material that fit&#039;s some curriculum, and this repository is located at Moodle.org (for example the 4th Grade Math curriculum see: http://wiki.sugarlabs.org/go/User:Gdk/4th_Grade_Maths ).  The teacher&#039;s use of our API design might go something like this: &lt;br /&gt;
&lt;br /&gt;
* An activity that has extended / implemented our API is started by the teacher.  The teacher is presented with an input field that requires a URI (URL).  The teacher enters the URI of this week&#039;s quiz (i.e. http://moodle.org/SchoolName/ClassName/Week_11_Quiz/ )  The activity fetches the specified quiz data from the web, and presents the teacher with a summary and confirmation dialog box.  Upon confirmation, the teacher can send / assign the quiz to the class.  The class starts their corresponding activity which then also has a mechanism to either grab the assigned quiz from the Moodle.org server or from the local “School Server” (also-known-as the XS server, see: http://wiki.laptop.org/go/School_server ).  The student&#039;s complete their assigned quiz, and data is sent back to the server for reporting / grading.&lt;br /&gt;
&lt;br /&gt;
===Milestones===&lt;br /&gt;
;Initial Prototype Phase (1)&lt;br /&gt;
:Simple implementation, data model not yet nailed down, focus on import and utility to question *consumers*, Like Activities. Initial formats to include MoodleXML, GIFT.&lt;br /&gt;
        &lt;br /&gt;
;Rigorous Design Phase (2)&lt;br /&gt;
:Nail down the data model, including developing the &#039;native&#039; format, probably using a sqlite file mechanism, or other database support, if possible. Freeze the Question object (in terms of required properties,        etc.), finalize decisions about URLs for question aquisition.  Make sure requirements of other projects *can* be met by the design at this stage.&lt;br /&gt;
&lt;br /&gt;
;Full Implementation Phase (3)&lt;br /&gt;
:Complete the implementation of the import formats, including the &#039;native&#039; format.  Should be usable to other Activity developers at this point (hopefully useful, before now, but all needs should be filled at this point).  Export implementation should start now, along with prototyping for an authoring activity. (Collaboration with the reporting team *needs* to happen at this point, as the activity will probably be combined with reporting tools.)&lt;br /&gt;
&lt;br /&gt;
;Activity Development Phase (4)&lt;br /&gt;
:Complete the authoring/reporting activity for the teachers, allowing export to file formats (and possibly *serving* the questions to other XOs; requires support in activities (using the API) to support).&lt;br /&gt;
&lt;br /&gt;
===Community Contacts===&lt;br /&gt;
[[User:FGrose]], [[User:Tony37]] (see [[Talk:{{PAGENAMEE}}|talk page]])&lt;br /&gt;
&lt;br /&gt;
===RIT Project Usage===&lt;br /&gt;
{{Definition_table&lt;br /&gt;
|Produce Puzzle| No API need or usage.&lt;br /&gt;
|Lemonade Stand| No API need or usage.&lt;br /&gt;
|Assimilate| API Usage needs documented on [[Talk:{{PAGENAMEE}}|talk page]].  Progress not far enough to start implementation using the API.&lt;br /&gt;
|Fun Towers| No API need or usage.&lt;br /&gt;
|Reporting Team| Simple export format documented at [[{{PAGENAMEE}}/API_Design|API Design]].  Futher integration work would be nice, but there is more work than could be done in a year along these lines (and neither team is prepared to embark on it).&lt;br /&gt;
|Muthris| No contact from? Probably no API need or usage.&lt;br /&gt;
}}&lt;br /&gt;
===See Also===&lt;br /&gt;
{{Special:PrefixIndex/{{PAGENAMEE}}/}}&lt;/div&gt;</summary>
		<author><name>Bbl5660</name></author>
	</entry>
	<entry>
		<id>https://wiki.sugarlabs.org/index.php?title=Math4Team/RIT/Projects/Question_Support_API&amp;diff=29429</id>
		<title>Math4Team/RIT/Projects/Question Support API</title>
		<link rel="alternate" type="text/html" href="https://wiki.sugarlabs.org/index.php?title=Math4Team/RIT/Projects/Question_Support_API&amp;diff=29429"/>
		<updated>2009-05-18T19:32:09Z</updated>

		<summary type="html">&lt;p&gt;Bbl5660: /* Dependencies */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;{{TOCright}}&lt;br /&gt;
==Question Support API==&lt;br /&gt;
===Project Information===&lt;br /&gt;
{{Definition_table&lt;br /&gt;
|Primary Project Contact| [[User:Enimihil|Greg Stevens]]&lt;br /&gt;
|Project Members| [[User:Enimihil|Greg Stevens]], [[User:Jfinney|Jameson Finney]], [[User:Bbl5660|Brian Long]]&lt;br /&gt;
|Source Repository| http://git.sugarlabs.org/projects/question-support-api&lt;br /&gt;
}}&lt;br /&gt;
&lt;br /&gt;
===Current Goals===&lt;br /&gt;
&lt;br /&gt;
* Documentation&lt;br /&gt;
** Packaging&lt;br /&gt;
** Documenting Dependencies and how to enable them in a development environment (Simple tutorial on setting up your Question API Development Environment)&lt;br /&gt;
** Question Authoring guidelines&lt;br /&gt;
** Integrate within lesson planning&lt;br /&gt;
** How does an instructor get the questions they have written/found into an Activity?&lt;br /&gt;
* Liase w/ other Math4 teams and Sugarlabs (What would it take to be included in the Sugar core?)&lt;br /&gt;
* Future Development (Needs / Wants — collect proposals from other teams)&lt;br /&gt;
* Discovery / Plugin  (How do activities find questions, i.e. how to get URIs to load questions from?)&lt;br /&gt;
&lt;br /&gt;
===Setting Up a Development Environment (For Newbies)===&lt;br /&gt;
These are links, tutorials and things that [[User:Bbl5660|Brian Long]] has found along the way, as well as help gained from [[User:Enimihil|Greg Stevens]].  Brian is new to the Linux / OpenSource community, and is working on documenting a development environment for &amp;lt;b&amp;gt;you&amp;lt;/b&amp;gt; and for us to continue developing this API.  The small amount of information below is meant to help someone new step into the world of developing for the Sugar environment, from Ubuntu and have all  dependencies and things setup to continue development of this API.  &amp;lt;b&amp;gt;Next&amp;lt;/b&amp;gt; Brian would like to document how to setup these sort of items for [http://wiki.laptop.org/go/Creating_an_activity Activity developers] to include our API and be able to extend it.&lt;br /&gt;
&lt;br /&gt;
* For development environments, you may consider consider first installing a linux OS and the the LAMP stack with PhpMyAdmin.  Brian is choosing Ubuntu, Aptana as a (free) Python IDE that can be used with PyDev to easily allow Python writing.  &lt;br /&gt;
* Links that Brian is relying on at the moment include:&lt;br /&gt;
** http://help.ubuntu.com/community/ApacheMySQLPHP&lt;br /&gt;
** http://www.sqlalchemy.org/docs/04/ormtutorial.html&lt;br /&gt;
** http://docs.python.org/&lt;br /&gt;
** http://andrewbleakley.com/blog/2008/11/01/installing-and-running-aptana-on-ubuntu-810/&lt;br /&gt;
** http://forums.aptana.com/viewtopic.php?f=37&amp;amp;t=7147&amp;amp;p=32918&amp;amp;hilit=ubuntu#p32918&lt;br /&gt;
&lt;br /&gt;
====Dependencies====&lt;br /&gt;
&amp;lt;!-- Development for Linux / Python / Sugar Newbies! --&amp;gt;&lt;br /&gt;
* The following are required by the Question Support API.&lt;br /&gt;
    python-setuptools&lt;br /&gt;
    pyparsing&lt;br /&gt;
    peak-rules&lt;br /&gt;
    sqlalchemy&lt;br /&gt;
&lt;br /&gt;
* You can install these via a linux terminal in this manner:&lt;br /&gt;
        sudo apt-get install python-setuptools&lt;br /&gt;
        sudo easy_install pyparsing&lt;br /&gt;
        sudo easy_install peak-rules&lt;br /&gt;
        sudo easy_install sqlalchemy&lt;br /&gt;
&lt;br /&gt;
* Exception: When developing on a Fedora based distro, you&#039;ll need to install python-setuptools-devel for easy_install&lt;br /&gt;
&lt;br /&gt;
===Motivation===&lt;br /&gt;
In the RIT class working on the Math4 projects, many proposed activities&lt;br /&gt;
require a question database of some kind.  A common API or library for&lt;br /&gt;
accessing databases in different formats, stored either locally or remotely,&lt;br /&gt;
along with a simple mechanism to determine more complex formatting or&lt;br /&gt;
presentation than simple text (e.g. to include simple graphics or&lt;br /&gt;
mathematical notation) would cover a majority of the cases where the&lt;br /&gt;
activity needs some configurable &amp;quot;curriculum data&amp;quot;.&lt;br /&gt;
&lt;br /&gt;
Eventually this library could be extended to provide hints, explanations, or&lt;br /&gt;
walkthroughs for questions, in addition to the basic metadata about level,&lt;br /&gt;
grouping, difficulty, and subject matter that would be part of the base&lt;br /&gt;
system.&lt;br /&gt;
&lt;br /&gt;
===Envisioned Usage===&lt;br /&gt;
Consider a simple flash-card-like activity.  It presents a question from a&lt;br /&gt;
list of questions, allows the student to select an answer from the provided&lt;br /&gt;
answers for the question or to enter their own answer.  Then the correct&lt;br /&gt;
answer is revealed and the student it told whether their answer is correct.&lt;br /&gt;
If the question has an explanation of the correct answer, the flash-card&lt;br /&gt;
activity will show the explanation of the correct answer.  (Note that this&lt;br /&gt;
is just a simple usage example, the interaction design of a drilling&lt;br /&gt;
activity could be very different.)&lt;br /&gt;
&lt;br /&gt;
The flash-card activity would use this proposed Quiz API for the following:&lt;br /&gt;
&lt;br /&gt;
* Loading the questions from the storage location into memory. This includes any filtering or network lookup to download the questions from a remote resource and select appropriate questions for the student.&lt;br /&gt;
&lt;br /&gt;
* Determining whether the student has entered a correct answer.&lt;br /&gt;
&lt;br /&gt;
To start with, the library would simply be a time-saving tool for developers&lt;br /&gt;
needing similar functionality, but as the XS (School Server) becomes more&lt;br /&gt;
fully developed the library should integrate the functions provided by the&lt;br /&gt;
XS to enable automated update of course material for the current topic of&lt;br /&gt;
study so the students can drill material using any tool they prefer, while&lt;br /&gt;
still reporting progress to the instructor using the XS services.&lt;br /&gt;
&lt;br /&gt;
===Current Status===&lt;br /&gt;
&lt;br /&gt;
Currently, (14 May 2009) the API supports parsing the GIFT file format well enough to import Multiple Choice and True/False questions, along with complete implementations for basic functionality of the corresponding question objects.  No support for partial credit answers is currently implemented, nor are other question types working correctly (though most can be parsed to some extent).  Export to CSV works as intended, though it is intentionally simple.  Documentation on usage and integration of the API into an activity is in the doc/ directory of [[http://git.sugarlabs.org/projects/question-support-api the repository]]. A simple, but complete usage example, using a console interface is available in tests/complete_test.py.&lt;br /&gt;
&lt;br /&gt;
===Current implementation===&lt;br /&gt;
1. Ensure that PyParser and PEAK-Rules are installed &amp;lt;br&amp;gt;&lt;br /&gt;
2. Include the quizdata module&lt;br /&gt;
    import quizdata&lt;br /&gt;
3. Select plain text output&lt;br /&gt;
    from quizdata.text import plain_text&lt;br /&gt;
4. Select desired question types&lt;br /&gt;
    from quizdata.question import MultipleChoiceQuestion, MissingWordQuestion&lt;br /&gt;
5. Import when function to assist with question sorting&lt;br /&gt;
    from peak.rules import when&lt;br /&gt;
6. Handle questions (this section should be rewritten as needed for your activity&lt;br /&gt;
    # this is the base case for any question type we don&#039;t handle otherwise.&lt;br /&gt;
    def do_question(q):&lt;br /&gt;
        print &amp;quot;Unhandled question type.&amp;quot;, type(q)&lt;br /&gt;
    # for multiple choice questions (incl. subclasses) we do this...&lt;br /&gt;
    @when(do_question, (MultipleChoiceQuestion,))&lt;br /&gt;
    def do_multi_questions(q):&lt;br /&gt;
        print plain_text(q.text)&lt;br /&gt;
        for a in zip(&#039;0123456789&#039;, q.answers):&lt;br /&gt;
            print &amp;quot;%5s: %s&amp;quot; % a&lt;br /&gt;
        answer = int(raw_input())&lt;br /&gt;
        q.answer = q.answers[answer]&lt;br /&gt;
        print q.correct&lt;br /&gt;
    # for missing word-style questions, which aren&#039;t implemented correctly yet, and&lt;br /&gt;
    # are a subclass of multiple choice questions... we make sure to ignore them&lt;br /&gt;
    # with a more specific rule.&lt;br /&gt;
    @when(do_question, (MissingWordQuestion,))&lt;br /&gt;
    def do_mw_question(q): # XXX: inheritance is annoying here...&lt;br /&gt;
        print &amp;quot;Unhandled question type. (MissingWordQuestion)&amp;quot;&lt;br /&gt;
7. Open questions&lt;br /&gt;
    questions = quizdata.open(&amp;quot;file://%s?format=gift&amp;quot; % path.join(base_path, &#039;tests&#039;, &#039;multi_choice.txt&#039;))&lt;br /&gt;
    for q in questions:&lt;br /&gt;
        do_question(q)&lt;br /&gt;
====&amp;quot;How to Play/Use&amp;quot; for end user====&lt;br /&gt;
This is a requirement of the RIT OLPC seminar.  The question doesn&#039;t exactly pertain to the API team&#039;s project, a more applicable question might be “How development of the API is done?” and “How do activity developers include / extend our API?”.&lt;br /&gt;
* The API is written in Python, has a set of dependencies (which are documented on this wiki page).&lt;br /&gt;
* For activity developers to include our API into an activity, we&#039;re hoping to have the Sugar development team create a mechanism for developer&#039;s to install or include components.   [[User:Enimihil|Greg Stevens]]&#039;s has a bit more knowledge on this than  [[User:bbl5660|Brian]], but we will be looking into how to package our API, and how it can be accessed by other Activities.  The issue with this later concept, is that Activities running on Sugar&#039;s platform are intentionally meant to be restricted to their own space inside of the Sugar environment.  This means that we&#039;ll either need to hack something together to make other Activities include our API, or we&#039;ll need to collaborate with people at Sugar and figure out the best practice to include our API.&lt;br /&gt;
&lt;br /&gt;
===Education Standards===&lt;br /&gt;
As a general API and not a standalone Activity, along with the nature of the API in specific, this project does not directly address any specific education standards or learning outcomes.  It is reliant on educators to write questions, or have questions available to them in usable formats.  As such, the potential educational standards this project could help to meet includes **any** standard where drilling or question/response evaluation is appropriate. (This includes a wider range of topic areas than the Math4 focus, even.)&lt;br /&gt;
&lt;br /&gt;
====A Teacher&#039;s Guide Abstract====&lt;br /&gt;
* Per the nature of this API, we&#039;ve decided that our “Teacher Guide” will be more of an abstract.  Below is a hypothetical situation of the Question Support API:Imagine a school manages a repository of quiz material that fit&#039;s some curriculum, and this repository is located at Moodle.org (for example the 4th Grade Math curriculum see: http://wiki.sugarlabs.org/go/User:Gdk/4th_Grade_Maths ).  The teacher&#039;s use of our API design might go something like this: &lt;br /&gt;
&lt;br /&gt;
* An activity that has extended / implemented our API is started by the teacher.  The teacher is presented with an input field that requires a URI (URL).  The teacher enters the URI of this week&#039;s quiz (i.e. http://moodle.org/SchoolName/ClassName/Week_11_Quiz/ )  The activity fetches the specified quiz data from the web, and presents the teacher with a summary and confirmation dialog box.  Upon confirmation, the teacher can send / assign the quiz to the class.  The class starts their corresponding activity which then also has a mechanism to either grab the assigned quiz from the Moodle.org server or from the local “School Server” (also-known-as the XS server, see: http://wiki.laptop.org/go/School_server ).  The student&#039;s complete their assigned quiz, and data is sent back to the server for reporting / grading.&lt;br /&gt;
&lt;br /&gt;
===Milestones===&lt;br /&gt;
;Initial Prototype Phase (1)&lt;br /&gt;
:Simple implementation, data model not yet nailed down, focus on import and utility to question *consumers*, Like Activities. Initial formats to include MoodleXML, GIFT.&lt;br /&gt;
        &lt;br /&gt;
;Rigorous Design Phase (2)&lt;br /&gt;
:Nail down the data model, including developing the &#039;native&#039; format, probably using a sqlite file mechanism, or other database support, if possible. Freeze the Question object (in terms of required properties,        etc.), finalize decisions about URLs for question aquisition.  Make sure requirements of other projects *can* be met by the design at this stage.&lt;br /&gt;
&lt;br /&gt;
;Full Implementation Phase (3)&lt;br /&gt;
:Complete the implementation of the import formats, including the &#039;native&#039; format.  Should be usable to other Activity developers at this point (hopefully useful, before now, but all needs should be filled at this point).  Export implementation should start now, along with prototyping for an authoring activity. (Collaboration with the reporting team *needs* to happen at this point, as the activity will probably be combined with reporting tools.)&lt;br /&gt;
&lt;br /&gt;
;Activity Development Phase (4)&lt;br /&gt;
:Complete the authoring/reporting activity for the teachers, allowing export to file formats (and possibly *serving* the questions to other XOs; requires support in activities (using the API) to support).&lt;br /&gt;
&lt;br /&gt;
===Community Contacts===&lt;br /&gt;
[[User:FGrose]], [[User:Tony37]] (see [[Talk:{{PAGENAMEE}}|talk page]])&lt;br /&gt;
&lt;br /&gt;
===RIT Project Usage===&lt;br /&gt;
{{Definition_table&lt;br /&gt;
|Produce Puzzle| No API need or usage.&lt;br /&gt;
|Lemonade Stand| No API need or usage.&lt;br /&gt;
|Assimilate| API Usage needs documented on [[Talk:{{PAGENAMEE}}|talk page]].  Progress not far enough to start implementation using the API.&lt;br /&gt;
|Fun Towers| No API need or usage.&lt;br /&gt;
|Reporting Team| Simple export format documented at [[{{PAGENAMEE}}/API_Design|API Design]].  Futher integration work would be nice, but there is more work than could be done in a year along these lines (and neither team is prepared to embark on it).&lt;br /&gt;
|Muthris| No contact from? Probably no API need or usage.&lt;br /&gt;
}}&lt;br /&gt;
===See Also===&lt;br /&gt;
{{Special:PrefixIndex/{{PAGENAMEE}}/}}&lt;/div&gt;</summary>
		<author><name>Bbl5660</name></author>
	</entry>
	<entry>
		<id>https://wiki.sugarlabs.org/index.php?title=Math4Team/RIT/Projects/Question_Support_API&amp;diff=29428</id>
		<title>Math4Team/RIT/Projects/Question Support API</title>
		<link rel="alternate" type="text/html" href="https://wiki.sugarlabs.org/index.php?title=Math4Team/RIT/Projects/Question_Support_API&amp;diff=29428"/>
		<updated>2009-05-18T19:29:44Z</updated>

		<summary type="html">&lt;p&gt;Bbl5660: /* Dependencies */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;{{TOCright}}&lt;br /&gt;
==Question Support API==&lt;br /&gt;
===Project Information===&lt;br /&gt;
{{Definition_table&lt;br /&gt;
|Primary Project Contact| [[User:Enimihil|Greg Stevens]]&lt;br /&gt;
|Project Members| [[User:Enimihil|Greg Stevens]], [[User:Jfinney|Jameson Finney]], [[User:Bbl5660|Brian Long]]&lt;br /&gt;
|Source Repository| http://git.sugarlabs.org/projects/question-support-api&lt;br /&gt;
}}&lt;br /&gt;
&lt;br /&gt;
===Current Goals===&lt;br /&gt;
&lt;br /&gt;
* Documentation&lt;br /&gt;
** Packaging&lt;br /&gt;
** Documenting Dependencies and how to enable them in a development environment (Simple tutorial on setting up your Question API Development Environment)&lt;br /&gt;
** Question Authoring guidelines&lt;br /&gt;
** Integrate within lesson planning&lt;br /&gt;
** How does an instructor get the questions they have written/found into an Activity?&lt;br /&gt;
* Liase w/ other Math4 teams and Sugarlabs (What would it take to be included in the Sugar core?)&lt;br /&gt;
* Future Development (Needs / Wants — collect proposals from other teams)&lt;br /&gt;
* Discovery / Plugin  (How do activities find questions, i.e. how to get URIs to load questions from?)&lt;br /&gt;
&lt;br /&gt;
===Setting Up a Development Environment (For Newbies)===&lt;br /&gt;
These are links, tutorials and things that [[User:Bbl5660|Brian Long]] has found along the way, as well as help gained from [[User:Enimihil|Greg Stevens]].  Brian is new to the Linux / OpenSource community, and is working on documenting a development environment for &amp;lt;b&amp;gt;you&amp;lt;/b&amp;gt; and for us to continue developing this API.  The small amount of information below is meant to help someone new step into the world of developing for the Sugar environment, from Ubuntu and have all  dependencies and things setup to continue development of this API.  &amp;lt;b&amp;gt;Next&amp;lt;/b&amp;gt; Brian would like to document how to setup these sort of items for [http://wiki.laptop.org/go/Creating_an_activity Activity developers] to include our API and be able to extend it.&lt;br /&gt;
&lt;br /&gt;
* For development environments, you may consider consider first installing a linux OS and the the LAMP stack with PhpMyAdmin.  Brian is choosing Ubuntu, Aptana as a (free) Python IDE that can be used with PyDev to easily allow Python writing.  &lt;br /&gt;
* Links that Brian is relying on at the moment include:&lt;br /&gt;
** http://help.ubuntu.com/community/ApacheMySQLPHP&lt;br /&gt;
** http://www.sqlalchemy.org/docs/04/ormtutorial.html&lt;br /&gt;
** http://docs.python.org/&lt;br /&gt;
** http://andrewbleakley.com/blog/2008/11/01/installing-and-running-aptana-on-ubuntu-810/&lt;br /&gt;
** http://forums.aptana.com/viewtopic.php?f=37&amp;amp;t=7147&amp;amp;p=32918&amp;amp;hilit=ubuntu#p32918&lt;br /&gt;
&lt;br /&gt;
====Dependencies====&lt;br /&gt;
&amp;lt;!-- Development for Linux / Python / Sugar Newbies! --&amp;gt;&lt;br /&gt;
* The following are required by the Question Support API.&lt;br /&gt;
        python-setuptools&lt;br /&gt;
        pyparsing&lt;br /&gt;
        peak-rules&lt;br /&gt;
        sqlalchemy&lt;br /&gt;
&lt;br /&gt;
* You can install these via a linux terminal in this manner:&lt;br /&gt;
        sudo apt-get install python-setuptools&lt;br /&gt;
        sudo easy_install pyparsing&lt;br /&gt;
        sudo easy_install peak-rules&lt;br /&gt;
        sudo easy_install sqlalchemy&lt;br /&gt;
&lt;br /&gt;
===Motivation===&lt;br /&gt;
In the RIT class working on the Math4 projects, many proposed activities&lt;br /&gt;
require a question database of some kind.  A common API or library for&lt;br /&gt;
accessing databases in different formats, stored either locally or remotely,&lt;br /&gt;
along with a simple mechanism to determine more complex formatting or&lt;br /&gt;
presentation than simple text (e.g. to include simple graphics or&lt;br /&gt;
mathematical notation) would cover a majority of the cases where the&lt;br /&gt;
activity needs some configurable &amp;quot;curriculum data&amp;quot;.&lt;br /&gt;
&lt;br /&gt;
Eventually this library could be extended to provide hints, explanations, or&lt;br /&gt;
walkthroughs for questions, in addition to the basic metadata about level,&lt;br /&gt;
grouping, difficulty, and subject matter that would be part of the base&lt;br /&gt;
system.&lt;br /&gt;
&lt;br /&gt;
===Envisioned Usage===&lt;br /&gt;
Consider a simple flash-card-like activity.  It presents a question from a&lt;br /&gt;
list of questions, allows the student to select an answer from the provided&lt;br /&gt;
answers for the question or to enter their own answer.  Then the correct&lt;br /&gt;
answer is revealed and the student it told whether their answer is correct.&lt;br /&gt;
If the question has an explanation of the correct answer, the flash-card&lt;br /&gt;
activity will show the explanation of the correct answer.  (Note that this&lt;br /&gt;
is just a simple usage example, the interaction design of a drilling&lt;br /&gt;
activity could be very different.)&lt;br /&gt;
&lt;br /&gt;
The flash-card activity would use this proposed Quiz API for the following:&lt;br /&gt;
&lt;br /&gt;
* Loading the questions from the storage location into memory. This includes any filtering or network lookup to download the questions from a remote resource and select appropriate questions for the student.&lt;br /&gt;
&lt;br /&gt;
* Determining whether the student has entered a correct answer.&lt;br /&gt;
&lt;br /&gt;
To start with, the library would simply be a time-saving tool for developers&lt;br /&gt;
needing similar functionality, but as the XS (School Server) becomes more&lt;br /&gt;
fully developed the library should integrate the functions provided by the&lt;br /&gt;
XS to enable automated update of course material for the current topic of&lt;br /&gt;
study so the students can drill material using any tool they prefer, while&lt;br /&gt;
still reporting progress to the instructor using the XS services.&lt;br /&gt;
&lt;br /&gt;
===Current Status===&lt;br /&gt;
&lt;br /&gt;
Currently, (14 May 2009) the API supports parsing the GIFT file format well enough to import Multiple Choice and True/False questions, along with complete implementations for basic functionality of the corresponding question objects.  No support for partial credit answers is currently implemented, nor are other question types working correctly (though most can be parsed to some extent).  Export to CSV works as intended, though it is intentionally simple.  Documentation on usage and integration of the API into an activity is in the doc/ directory of [[http://git.sugarlabs.org/projects/question-support-api the repository]]. A simple, but complete usage example, using a console interface is available in tests/complete_test.py.&lt;br /&gt;
&lt;br /&gt;
===Current implementation===&lt;br /&gt;
1. Ensure that PyParser and PEAK-Rules are installed &amp;lt;br&amp;gt;&lt;br /&gt;
2. Include the quizdata module&lt;br /&gt;
    import quizdata&lt;br /&gt;
3. Select plain text output&lt;br /&gt;
    from quizdata.text import plain_text&lt;br /&gt;
4. Select desired question types&lt;br /&gt;
    from quizdata.question import MultipleChoiceQuestion, MissingWordQuestion&lt;br /&gt;
5. Import when function to assist with question sorting&lt;br /&gt;
    from peak.rules import when&lt;br /&gt;
6. Handle questions (this section should be rewritten as needed for your activity&lt;br /&gt;
    # this is the base case for any question type we don&#039;t handle otherwise.&lt;br /&gt;
    def do_question(q):&lt;br /&gt;
        print &amp;quot;Unhandled question type.&amp;quot;, type(q)&lt;br /&gt;
    # for multiple choice questions (incl. subclasses) we do this...&lt;br /&gt;
    @when(do_question, (MultipleChoiceQuestion,))&lt;br /&gt;
    def do_multi_questions(q):&lt;br /&gt;
        print plain_text(q.text)&lt;br /&gt;
        for a in zip(&#039;0123456789&#039;, q.answers):&lt;br /&gt;
            print &amp;quot;%5s: %s&amp;quot; % a&lt;br /&gt;
        answer = int(raw_input())&lt;br /&gt;
        q.answer = q.answers[answer]&lt;br /&gt;
        print q.correct&lt;br /&gt;
    # for missing word-style questions, which aren&#039;t implemented correctly yet, and&lt;br /&gt;
    # are a subclass of multiple choice questions... we make sure to ignore them&lt;br /&gt;
    # with a more specific rule.&lt;br /&gt;
    @when(do_question, (MissingWordQuestion,))&lt;br /&gt;
    def do_mw_question(q): # XXX: inheritance is annoying here...&lt;br /&gt;
        print &amp;quot;Unhandled question type. (MissingWordQuestion)&amp;quot;&lt;br /&gt;
7. Open questions&lt;br /&gt;
    questions = quizdata.open(&amp;quot;file://%s?format=gift&amp;quot; % path.join(base_path, &#039;tests&#039;, &#039;multi_choice.txt&#039;))&lt;br /&gt;
    for q in questions:&lt;br /&gt;
        do_question(q)&lt;br /&gt;
====&amp;quot;How to Play/Use&amp;quot; for end user====&lt;br /&gt;
This is a requirement of the RIT OLPC seminar.  The question doesn&#039;t exactly pertain to the API team&#039;s project, a more applicable question might be “How development of the API is done?” and “How do activity developers include / extend our API?”.&lt;br /&gt;
* The API is written in Python, has a set of dependencies (which are documented on this wiki page).&lt;br /&gt;
* For activity developers to include our API into an activity, we&#039;re hoping to have the Sugar development team create a mechanism for developer&#039;s to install or include components.   [[User:Enimihil|Greg Stevens]]&#039;s has a bit more knowledge on this than  [[User:bbl5660|Brian]], but we will be looking into how to package our API, and how it can be accessed by other Activities.  The issue with this later concept, is that Activities running on Sugar&#039;s platform are intentionally meant to be restricted to their own space inside of the Sugar environment.  This means that we&#039;ll either need to hack something together to make other Activities include our API, or we&#039;ll need to collaborate with people at Sugar and figure out the best practice to include our API.&lt;br /&gt;
&lt;br /&gt;
===Education Standards===&lt;br /&gt;
As a general API and not a standalone Activity, along with the nature of the API in specific, this project does not directly address any specific education standards or learning outcomes.  It is reliant on educators to write questions, or have questions available to them in usable formats.  As such, the potential educational standards this project could help to meet includes **any** standard where drilling or question/response evaluation is appropriate. (This includes a wider range of topic areas than the Math4 focus, even.)&lt;br /&gt;
&lt;br /&gt;
====A Teacher&#039;s Guide Abstract====&lt;br /&gt;
* Per the nature of this API, we&#039;ve decided that our “Teacher Guide” will be more of an abstract.  Below is a hypothetical situation of the Question Support API:Imagine a school manages a repository of quiz material that fit&#039;s some curriculum, and this repository is located at Moodle.org (for example the 4th Grade Math curriculum see: http://wiki.sugarlabs.org/go/User:Gdk/4th_Grade_Maths ).  The teacher&#039;s use of our API design might go something like this: &lt;br /&gt;
&lt;br /&gt;
* An activity that has extended / implemented our API is started by the teacher.  The teacher is presented with an input field that requires a URI (URL).  The teacher enters the URI of this week&#039;s quiz (i.e. http://moodle.org/SchoolName/ClassName/Week_11_Quiz/ )  The activity fetches the specified quiz data from the web, and presents the teacher with a summary and confirmation dialog box.  Upon confirmation, the teacher can send / assign the quiz to the class.  The class starts their corresponding activity which then also has a mechanism to either grab the assigned quiz from the Moodle.org server or from the local “School Server” (also-known-as the XS server, see: http://wiki.laptop.org/go/School_server ).  The student&#039;s complete their assigned quiz, and data is sent back to the server for reporting / grading.&lt;br /&gt;
&lt;br /&gt;
===Milestones===&lt;br /&gt;
;Initial Prototype Phase (1)&lt;br /&gt;
:Simple implementation, data model not yet nailed down, focus on import and utility to question *consumers*, Like Activities. Initial formats to include MoodleXML, GIFT.&lt;br /&gt;
        &lt;br /&gt;
;Rigorous Design Phase (2)&lt;br /&gt;
:Nail down the data model, including developing the &#039;native&#039; format, probably using a sqlite file mechanism, or other database support, if possible. Freeze the Question object (in terms of required properties,        etc.), finalize decisions about URLs for question aquisition.  Make sure requirements of other projects *can* be met by the design at this stage.&lt;br /&gt;
&lt;br /&gt;
;Full Implementation Phase (3)&lt;br /&gt;
:Complete the implementation of the import formats, including the &#039;native&#039; format.  Should be usable to other Activity developers at this point (hopefully useful, before now, but all needs should be filled at this point).  Export implementation should start now, along with prototyping for an authoring activity. (Collaboration with the reporting team *needs* to happen at this point, as the activity will probably be combined with reporting tools.)&lt;br /&gt;
&lt;br /&gt;
;Activity Development Phase (4)&lt;br /&gt;
:Complete the authoring/reporting activity for the teachers, allowing export to file formats (and possibly *serving* the questions to other XOs; requires support in activities (using the API) to support).&lt;br /&gt;
&lt;br /&gt;
===Community Contacts===&lt;br /&gt;
[[User:FGrose]], [[User:Tony37]] (see [[Talk:{{PAGENAMEE}}|talk page]])&lt;br /&gt;
&lt;br /&gt;
===RIT Project Usage===&lt;br /&gt;
{{Definition_table&lt;br /&gt;
|Produce Puzzle| No API need or usage.&lt;br /&gt;
|Lemonade Stand| No API need or usage.&lt;br /&gt;
|Assimilate| API Usage needs documented on [[Talk:{{PAGENAMEE}}|talk page]].  Progress not far enough to start implementation using the API.&lt;br /&gt;
|Fun Towers| No API need or usage.&lt;br /&gt;
|Reporting Team| Simple export format documented at [[{{PAGENAMEE}}/API_Design|API Design]].  Futher integration work would be nice, but there is more work than could be done in a year along these lines (and neither team is prepared to embark on it).&lt;br /&gt;
|Muthris| No contact from? Probably no API need or usage.&lt;br /&gt;
}}&lt;br /&gt;
===See Also===&lt;br /&gt;
{{Special:PrefixIndex/{{PAGENAMEE}}/}}&lt;/div&gt;</summary>
		<author><name>Bbl5660</name></author>
	</entry>
	<entry>
		<id>https://wiki.sugarlabs.org/index.php?title=Math4Team/RIT/Projects/Question_Support_API&amp;diff=29427</id>
		<title>Math4Team/RIT/Projects/Question Support API</title>
		<link rel="alternate" type="text/html" href="https://wiki.sugarlabs.org/index.php?title=Math4Team/RIT/Projects/Question_Support_API&amp;diff=29427"/>
		<updated>2009-05-18T19:29:08Z</updated>

		<summary type="html">&lt;p&gt;Bbl5660: /* Dependencies that will be required / Installing them from the terminal */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;{{TOCright}}&lt;br /&gt;
==Question Support API==&lt;br /&gt;
===Project Information===&lt;br /&gt;
{{Definition_table&lt;br /&gt;
|Primary Project Contact| [[User:Enimihil|Greg Stevens]]&lt;br /&gt;
|Project Members| [[User:Enimihil|Greg Stevens]], [[User:Jfinney|Jameson Finney]], [[User:Bbl5660|Brian Long]]&lt;br /&gt;
|Source Repository| http://git.sugarlabs.org/projects/question-support-api&lt;br /&gt;
}}&lt;br /&gt;
&lt;br /&gt;
===Current Goals===&lt;br /&gt;
&lt;br /&gt;
* Documentation&lt;br /&gt;
** Packaging&lt;br /&gt;
** Documenting Dependencies and how to enable them in a development environment (Simple tutorial on setting up your Question API Development Environment)&lt;br /&gt;
** Question Authoring guidelines&lt;br /&gt;
** Integrate within lesson planning&lt;br /&gt;
** How does an instructor get the questions they have written/found into an Activity?&lt;br /&gt;
* Liase w/ other Math4 teams and Sugarlabs (What would it take to be included in the Sugar core?)&lt;br /&gt;
* Future Development (Needs / Wants — collect proposals from other teams)&lt;br /&gt;
* Discovery / Plugin  (How do activities find questions, i.e. how to get URIs to load questions from?)&lt;br /&gt;
&lt;br /&gt;
===Setting Up a Development Environment (For Newbies)===&lt;br /&gt;
These are links, tutorials and things that [[User:Bbl5660|Brian Long]] has found along the way, as well as help gained from [[User:Enimihil|Greg Stevens]].  Brian is new to the Linux / OpenSource community, and is working on documenting a development environment for &amp;lt;b&amp;gt;you&amp;lt;/b&amp;gt; and for us to continue developing this API.  The small amount of information below is meant to help someone new step into the world of developing for the Sugar environment, from Ubuntu and have all  dependencies and things setup to continue development of this API.  &amp;lt;b&amp;gt;Next&amp;lt;/b&amp;gt; Brian would like to document how to setup these sort of items for [http://wiki.laptop.org/go/Creating_an_activity Activity developers] to include our API and be able to extend it.&lt;br /&gt;
&lt;br /&gt;
* For development environments, you may consider consider first installing a linux OS and the the LAMP stack with PhpMyAdmin.  Brian is choosing Ubuntu, Aptana as a (free) Python IDE that can be used with PyDev to easily allow Python writing.  &lt;br /&gt;
* Links that Brian is relying on at the moment include:&lt;br /&gt;
** http://help.ubuntu.com/community/ApacheMySQLPHP&lt;br /&gt;
** http://www.sqlalchemy.org/docs/04/ormtutorial.html&lt;br /&gt;
** http://docs.python.org/&lt;br /&gt;
** http://andrewbleakley.com/blog/2008/11/01/installing-and-running-aptana-on-ubuntu-810/&lt;br /&gt;
** http://forums.aptana.com/viewtopic.php?f=37&amp;amp;t=7147&amp;amp;p=32918&amp;amp;hilit=ubuntu#p32918&lt;br /&gt;
&lt;br /&gt;
====Dependencies====&lt;br /&gt;
&amp;lt;!-- Development for Linux / Python / Sugar Newbies! --&amp;gt;&lt;br /&gt;
* The following are required by the Question Support API.&lt;br /&gt;
~~python-setuptools&lt;br /&gt;
~~pyparsing&lt;br /&gt;
~~peak-rules&lt;br /&gt;
~~sqlalchemy&lt;br /&gt;
&lt;br /&gt;
* You can install these via a linux terminal in this manner:&lt;br /&gt;
~~ sudo apt-get install python-setuptools&lt;br /&gt;
~~ sudo easy_install pyparsing&lt;br /&gt;
~~ sudo easy_install peak-rules&lt;br /&gt;
~~ sudo easy_install sqlalchemy&lt;br /&gt;
&lt;br /&gt;
===Motivation===&lt;br /&gt;
In the RIT class working on the Math4 projects, many proposed activities&lt;br /&gt;
require a question database of some kind.  A common API or library for&lt;br /&gt;
accessing databases in different formats, stored either locally or remotely,&lt;br /&gt;
along with a simple mechanism to determine more complex formatting or&lt;br /&gt;
presentation than simple text (e.g. to include simple graphics or&lt;br /&gt;
mathematical notation) would cover a majority of the cases where the&lt;br /&gt;
activity needs some configurable &amp;quot;curriculum data&amp;quot;.&lt;br /&gt;
&lt;br /&gt;
Eventually this library could be extended to provide hints, explanations, or&lt;br /&gt;
walkthroughs for questions, in addition to the basic metadata about level,&lt;br /&gt;
grouping, difficulty, and subject matter that would be part of the base&lt;br /&gt;
system.&lt;br /&gt;
&lt;br /&gt;
===Envisioned Usage===&lt;br /&gt;
Consider a simple flash-card-like activity.  It presents a question from a&lt;br /&gt;
list of questions, allows the student to select an answer from the provided&lt;br /&gt;
answers for the question or to enter their own answer.  Then the correct&lt;br /&gt;
answer is revealed and the student it told whether their answer is correct.&lt;br /&gt;
If the question has an explanation of the correct answer, the flash-card&lt;br /&gt;
activity will show the explanation of the correct answer.  (Note that this&lt;br /&gt;
is just a simple usage example, the interaction design of a drilling&lt;br /&gt;
activity could be very different.)&lt;br /&gt;
&lt;br /&gt;
The flash-card activity would use this proposed Quiz API for the following:&lt;br /&gt;
&lt;br /&gt;
* Loading the questions from the storage location into memory. This includes any filtering or network lookup to download the questions from a remote resource and select appropriate questions for the student.&lt;br /&gt;
&lt;br /&gt;
* Determining whether the student has entered a correct answer.&lt;br /&gt;
&lt;br /&gt;
To start with, the library would simply be a time-saving tool for developers&lt;br /&gt;
needing similar functionality, but as the XS (School Server) becomes more&lt;br /&gt;
fully developed the library should integrate the functions provided by the&lt;br /&gt;
XS to enable automated update of course material for the current topic of&lt;br /&gt;
study so the students can drill material using any tool they prefer, while&lt;br /&gt;
still reporting progress to the instructor using the XS services.&lt;br /&gt;
&lt;br /&gt;
===Current Status===&lt;br /&gt;
&lt;br /&gt;
Currently, (14 May 2009) the API supports parsing the GIFT file format well enough to import Multiple Choice and True/False questions, along with complete implementations for basic functionality of the corresponding question objects.  No support for partial credit answers is currently implemented, nor are other question types working correctly (though most can be parsed to some extent).  Export to CSV works as intended, though it is intentionally simple.  Documentation on usage and integration of the API into an activity is in the doc/ directory of [[http://git.sugarlabs.org/projects/question-support-api the repository]]. A simple, but complete usage example, using a console interface is available in tests/complete_test.py.&lt;br /&gt;
&lt;br /&gt;
===Current implementation===&lt;br /&gt;
1. Ensure that PyParser and PEAK-Rules are installed &amp;lt;br&amp;gt;&lt;br /&gt;
2. Include the quizdata module&lt;br /&gt;
    import quizdata&lt;br /&gt;
3. Select plain text output&lt;br /&gt;
    from quizdata.text import plain_text&lt;br /&gt;
4. Select desired question types&lt;br /&gt;
    from quizdata.question import MultipleChoiceQuestion, MissingWordQuestion&lt;br /&gt;
5. Import when function to assist with question sorting&lt;br /&gt;
    from peak.rules import when&lt;br /&gt;
6. Handle questions (this section should be rewritten as needed for your activity&lt;br /&gt;
    # this is the base case for any question type we don&#039;t handle otherwise.&lt;br /&gt;
    def do_question(q):&lt;br /&gt;
        print &amp;quot;Unhandled question type.&amp;quot;, type(q)&lt;br /&gt;
    # for multiple choice questions (incl. subclasses) we do this...&lt;br /&gt;
    @when(do_question, (MultipleChoiceQuestion,))&lt;br /&gt;
    def do_multi_questions(q):&lt;br /&gt;
        print plain_text(q.text)&lt;br /&gt;
        for a in zip(&#039;0123456789&#039;, q.answers):&lt;br /&gt;
            print &amp;quot;%5s: %s&amp;quot; % a&lt;br /&gt;
        answer = int(raw_input())&lt;br /&gt;
        q.answer = q.answers[answer]&lt;br /&gt;
        print q.correct&lt;br /&gt;
    # for missing word-style questions, which aren&#039;t implemented correctly yet, and&lt;br /&gt;
    # are a subclass of multiple choice questions... we make sure to ignore them&lt;br /&gt;
    # with a more specific rule.&lt;br /&gt;
    @when(do_question, (MissingWordQuestion,))&lt;br /&gt;
    def do_mw_question(q): # XXX: inheritance is annoying here...&lt;br /&gt;
        print &amp;quot;Unhandled question type. (MissingWordQuestion)&amp;quot;&lt;br /&gt;
7. Open questions&lt;br /&gt;
    questions = quizdata.open(&amp;quot;file://%s?format=gift&amp;quot; % path.join(base_path, &#039;tests&#039;, &#039;multi_choice.txt&#039;))&lt;br /&gt;
    for q in questions:&lt;br /&gt;
        do_question(q)&lt;br /&gt;
====&amp;quot;How to Play/Use&amp;quot; for end user====&lt;br /&gt;
This is a requirement of the RIT OLPC seminar.  The question doesn&#039;t exactly pertain to the API team&#039;s project, a more applicable question might be “How development of the API is done?” and “How do activity developers include / extend our API?”.&lt;br /&gt;
* The API is written in Python, has a set of dependencies (which are documented on this wiki page).&lt;br /&gt;
* For activity developers to include our API into an activity, we&#039;re hoping to have the Sugar development team create a mechanism for developer&#039;s to install or include components.   [[User:Enimihil|Greg Stevens]]&#039;s has a bit more knowledge on this than  [[User:bbl5660|Brian]], but we will be looking into how to package our API, and how it can be accessed by other Activities.  The issue with this later concept, is that Activities running on Sugar&#039;s platform are intentionally meant to be restricted to their own space inside of the Sugar environment.  This means that we&#039;ll either need to hack something together to make other Activities include our API, or we&#039;ll need to collaborate with people at Sugar and figure out the best practice to include our API.&lt;br /&gt;
&lt;br /&gt;
===Education Standards===&lt;br /&gt;
As a general API and not a standalone Activity, along with the nature of the API in specific, this project does not directly address any specific education standards or learning outcomes.  It is reliant on educators to write questions, or have questions available to them in usable formats.  As such, the potential educational standards this project could help to meet includes **any** standard where drilling or question/response evaluation is appropriate. (This includes a wider range of topic areas than the Math4 focus, even.)&lt;br /&gt;
&lt;br /&gt;
====A Teacher&#039;s Guide Abstract====&lt;br /&gt;
* Per the nature of this API, we&#039;ve decided that our “Teacher Guide” will be more of an abstract.  Below is a hypothetical situation of the Question Support API:Imagine a school manages a repository of quiz material that fit&#039;s some curriculum, and this repository is located at Moodle.org (for example the 4th Grade Math curriculum see: http://wiki.sugarlabs.org/go/User:Gdk/4th_Grade_Maths ).  The teacher&#039;s use of our API design might go something like this: &lt;br /&gt;
&lt;br /&gt;
* An activity that has extended / implemented our API is started by the teacher.  The teacher is presented with an input field that requires a URI (URL).  The teacher enters the URI of this week&#039;s quiz (i.e. http://moodle.org/SchoolName/ClassName/Week_11_Quiz/ )  The activity fetches the specified quiz data from the web, and presents the teacher with a summary and confirmation dialog box.  Upon confirmation, the teacher can send / assign the quiz to the class.  The class starts their corresponding activity which then also has a mechanism to either grab the assigned quiz from the Moodle.org server or from the local “School Server” (also-known-as the XS server, see: http://wiki.laptop.org/go/School_server ).  The student&#039;s complete their assigned quiz, and data is sent back to the server for reporting / grading.&lt;br /&gt;
&lt;br /&gt;
===Milestones===&lt;br /&gt;
;Initial Prototype Phase (1)&lt;br /&gt;
:Simple implementation, data model not yet nailed down, focus on import and utility to question *consumers*, Like Activities. Initial formats to include MoodleXML, GIFT.&lt;br /&gt;
        &lt;br /&gt;
;Rigorous Design Phase (2)&lt;br /&gt;
:Nail down the data model, including developing the &#039;native&#039; format, probably using a sqlite file mechanism, or other database support, if possible. Freeze the Question object (in terms of required properties,        etc.), finalize decisions about URLs for question aquisition.  Make sure requirements of other projects *can* be met by the design at this stage.&lt;br /&gt;
&lt;br /&gt;
;Full Implementation Phase (3)&lt;br /&gt;
:Complete the implementation of the import formats, including the &#039;native&#039; format.  Should be usable to other Activity developers at this point (hopefully useful, before now, but all needs should be filled at this point).  Export implementation should start now, along with prototyping for an authoring activity. (Collaboration with the reporting team *needs* to happen at this point, as the activity will probably be combined with reporting tools.)&lt;br /&gt;
&lt;br /&gt;
;Activity Development Phase (4)&lt;br /&gt;
:Complete the authoring/reporting activity for the teachers, allowing export to file formats (and possibly *serving* the questions to other XOs; requires support in activities (using the API) to support).&lt;br /&gt;
&lt;br /&gt;
===Community Contacts===&lt;br /&gt;
[[User:FGrose]], [[User:Tony37]] (see [[Talk:{{PAGENAMEE}}|talk page]])&lt;br /&gt;
&lt;br /&gt;
===RIT Project Usage===&lt;br /&gt;
{{Definition_table&lt;br /&gt;
|Produce Puzzle| No API need or usage.&lt;br /&gt;
|Lemonade Stand| No API need or usage.&lt;br /&gt;
|Assimilate| API Usage needs documented on [[Talk:{{PAGENAMEE}}|talk page]].  Progress not far enough to start implementation using the API.&lt;br /&gt;
|Fun Towers| No API need or usage.&lt;br /&gt;
|Reporting Team| Simple export format documented at [[{{PAGENAMEE}}/API_Design|API Design]].  Futher integration work would be nice, but there is more work than could be done in a year along these lines (and neither team is prepared to embark on it).&lt;br /&gt;
|Muthris| No contact from? Probably no API need or usage.&lt;br /&gt;
}}&lt;br /&gt;
===See Also===&lt;br /&gt;
{{Special:PrefixIndex/{{PAGENAMEE}}/}}&lt;/div&gt;</summary>
		<author><name>Bbl5660</name></author>
	</entry>
	<entry>
		<id>https://wiki.sugarlabs.org/index.php?title=Math4Team/RIT/Projects/Question_Support_API&amp;diff=29425</id>
		<title>Math4Team/RIT/Projects/Question Support API</title>
		<link rel="alternate" type="text/html" href="https://wiki.sugarlabs.org/index.php?title=Math4Team/RIT/Projects/Question_Support_API&amp;diff=29425"/>
		<updated>2009-05-18T19:24:16Z</updated>

		<summary type="html">&lt;p&gt;Bbl5660: /* &amp;quot;How to Play/Use&amp;quot; for end user */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;{{TOCright}}&lt;br /&gt;
==Question Support API==&lt;br /&gt;
===Project Information===&lt;br /&gt;
{{Definition_table&lt;br /&gt;
|Primary Project Contact| [[User:Enimihil|Greg Stevens]]&lt;br /&gt;
|Project Members| [[User:Enimihil|Greg Stevens]], [[User:Jfinney|Jameson Finney]], [[User:Bbl5660|Brian Long]]&lt;br /&gt;
|Source Repository| http://git.sugarlabs.org/projects/question-support-api&lt;br /&gt;
}}&lt;br /&gt;
&lt;br /&gt;
===Current Goals===&lt;br /&gt;
&lt;br /&gt;
* Documentation&lt;br /&gt;
** Packaging&lt;br /&gt;
** Documenting Dependencies and how to enable them in a development environment (Simple tutorial on setting up your Question API Development Environment)&lt;br /&gt;
** Question Authoring guidelines&lt;br /&gt;
** Integrate within lesson planning&lt;br /&gt;
** How does an instructor get the questions they have written/found into an Activity?&lt;br /&gt;
* Liase w/ other Math4 teams and Sugarlabs (What would it take to be included in the Sugar core?)&lt;br /&gt;
* Future Development (Needs / Wants — collect proposals from other teams)&lt;br /&gt;
* Discovery / Plugin  (How do activities find questions, i.e. how to get URIs to load questions from?)&lt;br /&gt;
&lt;br /&gt;
===Setting Up a Development Environment (For Newbies)===&lt;br /&gt;
These are links, tutorials and things that [[User:Bbl5660|Brian Long]] has found along the way, as well as help gained from [[User:Enimihil|Greg Stevens]].  Brian is new to the Linux / OpenSource community, and is working on documenting a development environment for &amp;lt;b&amp;gt;you&amp;lt;/b&amp;gt; and for us to continue developing this API.  The small amount of information below is meant to help someone new step into the world of developing for the Sugar environment, from Ubuntu and have all  dependencies and things setup to continue development of this API.  &amp;lt;b&amp;gt;Next&amp;lt;/b&amp;gt; Brian would like to document how to setup these sort of items for [http://wiki.laptop.org/go/Creating_an_activity Activity developers] to include our API and be able to extend it.&lt;br /&gt;
&lt;br /&gt;
* For development environments, you may consider consider first installing a linux OS and the the LAMP stack with PhpMyAdmin.  Brian is choosing Ubuntu, Aptana as a (free) Python IDE that can be used with PyDev to easily allow Python writing.  &lt;br /&gt;
* Links that Brian is relying on at the moment include:&lt;br /&gt;
** http://help.ubuntu.com/community/ApacheMySQLPHP&lt;br /&gt;
** http://www.sqlalchemy.org/docs/04/ormtutorial.html&lt;br /&gt;
** http://docs.python.org/&lt;br /&gt;
** http://andrewbleakley.com/blog/2008/11/01/installing-and-running-aptana-on-ubuntu-810/&lt;br /&gt;
** http://forums.aptana.com/viewtopic.php?f=37&amp;amp;t=7147&amp;amp;p=32918&amp;amp;hilit=ubuntu#p32918&lt;br /&gt;
&lt;br /&gt;
====Dependencies that will be required / Installing them from the terminal====&lt;br /&gt;
&amp;lt;!-- Development for Linux / Python / Sugar Newbies! --&amp;gt;&lt;br /&gt;
* sudo apt-get install python-setuptools&lt;br /&gt;
* sudo easy_install pyparsing&lt;br /&gt;
* sudo easy_install peak-rules&lt;br /&gt;
* sudo easy_install sqlalchemy&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
===Motivation===&lt;br /&gt;
In the RIT class working on the Math4 projects, many proposed activities&lt;br /&gt;
require a question database of some kind.  A common API or library for&lt;br /&gt;
accessing databases in different formats, stored either locally or remotely,&lt;br /&gt;
along with a simple mechanism to determine more complex formatting or&lt;br /&gt;
presentation than simple text (e.g. to include simple graphics or&lt;br /&gt;
mathematical notation) would cover a majority of the cases where the&lt;br /&gt;
activity needs some configurable &amp;quot;curriculum data&amp;quot;.&lt;br /&gt;
&lt;br /&gt;
Eventually this library could be extended to provide hints, explanations, or&lt;br /&gt;
walkthroughs for questions, in addition to the basic metadata about level,&lt;br /&gt;
grouping, difficulty, and subject matter that would be part of the base&lt;br /&gt;
system.&lt;br /&gt;
&lt;br /&gt;
===Envisioned Usage===&lt;br /&gt;
Consider a simple flash-card-like activity.  It presents a question from a&lt;br /&gt;
list of questions, allows the student to select an answer from the provided&lt;br /&gt;
answers for the question or to enter their own answer.  Then the correct&lt;br /&gt;
answer is revealed and the student it told whether their answer is correct.&lt;br /&gt;
If the question has an explanation of the correct answer, the flash-card&lt;br /&gt;
activity will show the explanation of the correct answer.  (Note that this&lt;br /&gt;
is just a simple usage example, the interaction design of a drilling&lt;br /&gt;
activity could be very different.)&lt;br /&gt;
&lt;br /&gt;
The flash-card activity would use this proposed Quiz API for the following:&lt;br /&gt;
&lt;br /&gt;
* Loading the questions from the storage location into memory. This includes any filtering or network lookup to download the questions from a remote resource and select appropriate questions for the student.&lt;br /&gt;
&lt;br /&gt;
* Determining whether the student has entered a correct answer.&lt;br /&gt;
&lt;br /&gt;
To start with, the library would simply be a time-saving tool for developers&lt;br /&gt;
needing similar functionality, but as the XS (School Server) becomes more&lt;br /&gt;
fully developed the library should integrate the functions provided by the&lt;br /&gt;
XS to enable automated update of course material for the current topic of&lt;br /&gt;
study so the students can drill material using any tool they prefer, while&lt;br /&gt;
still reporting progress to the instructor using the XS services.&lt;br /&gt;
&lt;br /&gt;
===Current Status===&lt;br /&gt;
&lt;br /&gt;
Currently, (14 May 2009) the API supports parsing the GIFT file format well enough to import Multiple Choice and True/False questions, along with complete implementations for basic functionality of the corresponding question objects.  No support for partial credit answers is currently implemented, nor are other question types working correctly (though most can be parsed to some extent).  Export to CSV works as intended, though it is intentionally simple.  Documentation on usage and integration of the API into an activity is in the doc/ directory of [[http://git.sugarlabs.org/projects/question-support-api the repository]]. A simple, but complete usage example, using a console interface is available in tests/complete_test.py.&lt;br /&gt;
&lt;br /&gt;
===Current implementation===&lt;br /&gt;
1. Ensure that PyParser and PEAK-Rules are installed &amp;lt;br&amp;gt;&lt;br /&gt;
2. Include the quizdata module&lt;br /&gt;
    import quizdata&lt;br /&gt;
3. Select plain text output&lt;br /&gt;
    from quizdata.text import plain_text&lt;br /&gt;
4. Select desired question types&lt;br /&gt;
    from quizdata.question import MultipleChoiceQuestion, MissingWordQuestion&lt;br /&gt;
5. Import when function to assist with question sorting&lt;br /&gt;
    from peak.rules import when&lt;br /&gt;
6. Handle questions (this section should be rewritten as needed for your activity&lt;br /&gt;
    # this is the base case for any question type we don&#039;t handle otherwise.&lt;br /&gt;
    def do_question(q):&lt;br /&gt;
        print &amp;quot;Unhandled question type.&amp;quot;, type(q)&lt;br /&gt;
    # for multiple choice questions (incl. subclasses) we do this...&lt;br /&gt;
    @when(do_question, (MultipleChoiceQuestion,))&lt;br /&gt;
    def do_multi_questions(q):&lt;br /&gt;
        print plain_text(q.text)&lt;br /&gt;
        for a in zip(&#039;0123456789&#039;, q.answers):&lt;br /&gt;
            print &amp;quot;%5s: %s&amp;quot; % a&lt;br /&gt;
        answer = int(raw_input())&lt;br /&gt;
        q.answer = q.answers[answer]&lt;br /&gt;
        print q.correct&lt;br /&gt;
    # for missing word-style questions, which aren&#039;t implemented correctly yet, and&lt;br /&gt;
    # are a subclass of multiple choice questions... we make sure to ignore them&lt;br /&gt;
    # with a more specific rule.&lt;br /&gt;
    @when(do_question, (MissingWordQuestion,))&lt;br /&gt;
    def do_mw_question(q): # XXX: inheritance is annoying here...&lt;br /&gt;
        print &amp;quot;Unhandled question type. (MissingWordQuestion)&amp;quot;&lt;br /&gt;
7. Open questions&lt;br /&gt;
    questions = quizdata.open(&amp;quot;file://%s?format=gift&amp;quot; % path.join(base_path, &#039;tests&#039;, &#039;multi_choice.txt&#039;))&lt;br /&gt;
    for q in questions:&lt;br /&gt;
        do_question(q)&lt;br /&gt;
====&amp;quot;How to Play/Use&amp;quot; for end user====&lt;br /&gt;
This is a requirement of the RIT OLPC seminar.  The question doesn&#039;t exactly pertain to the API team&#039;s project, a more applicable question might be “How development of the API is done?” and “How do activity developers include / extend our API?”.&lt;br /&gt;
* The API is written in Python, has a set of dependencies (which are documented on this wiki page).&lt;br /&gt;
* For activity developers to include our API into an activity, we&#039;re hoping to have the Sugar development team create a mechanism for developer&#039;s to install or include components.   [[User:Enimihil|Greg Stevens]]&#039;s has a bit more knowledge on this than  [[User:bbl5660|Brian]], but we will be looking into how to package our API, and how it can be accessed by other Activities.  The issue with this later concept, is that Activities running on Sugar&#039;s platform are intentionally meant to be restricted to their own space inside of the Sugar environment.  This means that we&#039;ll either need to hack something together to make other Activities include our API, or we&#039;ll need to collaborate with people at Sugar and figure out the best practice to include our API.&lt;br /&gt;
&lt;br /&gt;
===Education Standards===&lt;br /&gt;
As a general API and not a standalone Activity, along with the nature of the API in specific, this project does not directly address any specific education standards or learning outcomes.  It is reliant on educators to write questions, or have questions available to them in usable formats.  As such, the potential educational standards this project could help to meet includes **any** standard where drilling or question/response evaluation is appropriate. (This includes a wider range of topic areas than the Math4 focus, even.)&lt;br /&gt;
&lt;br /&gt;
====A Teacher&#039;s Guide Abstract====&lt;br /&gt;
* Per the nature of this API, we&#039;ve decided that our “Teacher Guide” will be more of an abstract.  Below is a hypothetical situation of the Question Support API:Imagine a school manages a repository of quiz material that fit&#039;s some curriculum, and this repository is located at Moodle.org (for example the 4th Grade Math curriculum see: http://wiki.sugarlabs.org/go/User:Gdk/4th_Grade_Maths ).  The teacher&#039;s use of our API design might go something like this: &lt;br /&gt;
&lt;br /&gt;
* An activity that has extended / implemented our API is started by the teacher.  The teacher is presented with an input field that requires a URI (URL).  The teacher enters the URI of this week&#039;s quiz (i.e. http://moodle.org/SchoolName/ClassName/Week_11_Quiz/ )  The activity fetches the specified quiz data from the web, and presents the teacher with a summary and confirmation dialog box.  Upon confirmation, the teacher can send / assign the quiz to the class.  The class starts their corresponding activity which then also has a mechanism to either grab the assigned quiz from the Moodle.org server or from the local “School Server” (also-known-as the XS server, see: http://wiki.laptop.org/go/School_server ).  The student&#039;s complete their assigned quiz, and data is sent back to the server for reporting / grading.&lt;br /&gt;
&lt;br /&gt;
===Milestones===&lt;br /&gt;
;Initial Prototype Phase (1)&lt;br /&gt;
:Simple implementation, data model not yet nailed down, focus on import and utility to question *consumers*, Like Activities. Initial formats to include MoodleXML, GIFT.&lt;br /&gt;
        &lt;br /&gt;
;Rigorous Design Phase (2)&lt;br /&gt;
:Nail down the data model, including developing the &#039;native&#039; format, probably using a sqlite file mechanism, or other database support, if possible. Freeze the Question object (in terms of required properties,        etc.), finalize decisions about URLs for question aquisition.  Make sure requirements of other projects *can* be met by the design at this stage.&lt;br /&gt;
&lt;br /&gt;
;Full Implementation Phase (3)&lt;br /&gt;
:Complete the implementation of the import formats, including the &#039;native&#039; format.  Should be usable to other Activity developers at this point (hopefully useful, before now, but all needs should be filled at this point).  Export implementation should start now, along with prototyping for an authoring activity. (Collaboration with the reporting team *needs* to happen at this point, as the activity will probably be combined with reporting tools.)&lt;br /&gt;
&lt;br /&gt;
;Activity Development Phase (4)&lt;br /&gt;
:Complete the authoring/reporting activity for the teachers, allowing export to file formats (and possibly *serving* the questions to other XOs; requires support in activities (using the API) to support).&lt;br /&gt;
&lt;br /&gt;
===Community Contacts===&lt;br /&gt;
[[User:FGrose]], [[User:Tony37]] (see [[Talk:{{PAGENAMEE}}|talk page]])&lt;br /&gt;
&lt;br /&gt;
===RIT Project Usage===&lt;br /&gt;
{{Definition_table&lt;br /&gt;
|Produce Puzzle| No API need or usage.&lt;br /&gt;
|Lemonade Stand| No API need or usage.&lt;br /&gt;
|Assimilate| API Usage needs documented on [[Talk:{{PAGENAMEE}}|talk page]].  Progress not far enough to start implementation using the API.&lt;br /&gt;
|Fun Towers| No API need or usage.&lt;br /&gt;
|Reporting Team| Simple export format documented at [[{{PAGENAMEE}}/API_Design|API Design]].  Futher integration work would be nice, but there is more work than could be done in a year along these lines (and neither team is prepared to embark on it).&lt;br /&gt;
|Muthris| No contact from? Probably no API need or usage.&lt;br /&gt;
}}&lt;br /&gt;
===See Also===&lt;br /&gt;
{{Special:PrefixIndex/{{PAGENAMEE}}/}}&lt;/div&gt;</summary>
		<author><name>Bbl5660</name></author>
	</entry>
	<entry>
		<id>https://wiki.sugarlabs.org/index.php?title=Math4Team/RIT/Projects/Question_Support_API&amp;diff=29424</id>
		<title>Math4Team/RIT/Projects/Question Support API</title>
		<link rel="alternate" type="text/html" href="https://wiki.sugarlabs.org/index.php?title=Math4Team/RIT/Projects/Question_Support_API&amp;diff=29424"/>
		<updated>2009-05-18T19:22:25Z</updated>

		<summary type="html">&lt;p&gt;Bbl5660: /* &amp;quot;How to Play/Use&amp;quot; for end user */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;{{TOCright}}&lt;br /&gt;
==Question Support API==&lt;br /&gt;
===Project Information===&lt;br /&gt;
{{Definition_table&lt;br /&gt;
|Primary Project Contact| [[User:Enimihil|Greg Stevens]]&lt;br /&gt;
|Project Members| [[User:Enimihil|Greg Stevens]], [[User:Jfinney|Jameson Finney]], [[User:Bbl5660|Brian Long]]&lt;br /&gt;
|Source Repository| http://git.sugarlabs.org/projects/question-support-api&lt;br /&gt;
}}&lt;br /&gt;
&lt;br /&gt;
===Current Goals===&lt;br /&gt;
&lt;br /&gt;
* Documentation&lt;br /&gt;
** Packaging&lt;br /&gt;
** Documenting Dependencies and how to enable them in a development environment (Simple tutorial on setting up your Question API Development Environment)&lt;br /&gt;
** Question Authoring guidelines&lt;br /&gt;
** Integrate within lesson planning&lt;br /&gt;
** How does an instructor get the questions they have written/found into an Activity?&lt;br /&gt;
* Liase w/ other Math4 teams and Sugarlabs (What would it take to be included in the Sugar core?)&lt;br /&gt;
* Future Development (Needs / Wants — collect proposals from other teams)&lt;br /&gt;
* Discovery / Plugin  (How do activities find questions, i.e. how to get URIs to load questions from?)&lt;br /&gt;
&lt;br /&gt;
===Setting Up a Development Environment (For Newbies)===&lt;br /&gt;
These are links, tutorials and things that [[User:Bbl5660|Brian Long]] has found along the way, as well as help gained from [[User:Enimihil|Greg Stevens]].  Brian is new to the Linux / OpenSource community, and is working on documenting a development environment for &amp;lt;b&amp;gt;you&amp;lt;/b&amp;gt; and for us to continue developing this API.  The small amount of information below is meant to help someone new step into the world of developing for the Sugar environment, from Ubuntu and have all  dependencies and things setup to continue development of this API.  &amp;lt;b&amp;gt;Next&amp;lt;/b&amp;gt; Brian would like to document how to setup these sort of items for [http://wiki.laptop.org/go/Creating_an_activity Activity developers] to include our API and be able to extend it.&lt;br /&gt;
&lt;br /&gt;
* For development environments, you may consider consider first installing a linux OS and the the LAMP stack with PhpMyAdmin.  Brian is choosing Ubuntu, Aptana as a (free) Python IDE that can be used with PyDev to easily allow Python writing.  &lt;br /&gt;
* Links that Brian is relying on at the moment include:&lt;br /&gt;
** http://help.ubuntu.com/community/ApacheMySQLPHP&lt;br /&gt;
** http://www.sqlalchemy.org/docs/04/ormtutorial.html&lt;br /&gt;
** http://docs.python.org/&lt;br /&gt;
** http://andrewbleakley.com/blog/2008/11/01/installing-and-running-aptana-on-ubuntu-810/&lt;br /&gt;
** http://forums.aptana.com/viewtopic.php?f=37&amp;amp;t=7147&amp;amp;p=32918&amp;amp;hilit=ubuntu#p32918&lt;br /&gt;
&lt;br /&gt;
====Dependencies that will be required / Installing them from the terminal====&lt;br /&gt;
&amp;lt;!-- Development for Linux / Python / Sugar Newbies! --&amp;gt;&lt;br /&gt;
* sudo apt-get install python-setuptools&lt;br /&gt;
* sudo easy_install pyparsing&lt;br /&gt;
* sudo easy_install peak-rules&lt;br /&gt;
* sudo easy_install sqlalchemy&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
===Motivation===&lt;br /&gt;
In the RIT class working on the Math4 projects, many proposed activities&lt;br /&gt;
require a question database of some kind.  A common API or library for&lt;br /&gt;
accessing databases in different formats, stored either locally or remotely,&lt;br /&gt;
along with a simple mechanism to determine more complex formatting or&lt;br /&gt;
presentation than simple text (e.g. to include simple graphics or&lt;br /&gt;
mathematical notation) would cover a majority of the cases where the&lt;br /&gt;
activity needs some configurable &amp;quot;curriculum data&amp;quot;.&lt;br /&gt;
&lt;br /&gt;
Eventually this library could be extended to provide hints, explanations, or&lt;br /&gt;
walkthroughs for questions, in addition to the basic metadata about level,&lt;br /&gt;
grouping, difficulty, and subject matter that would be part of the base&lt;br /&gt;
system.&lt;br /&gt;
&lt;br /&gt;
===Envisioned Usage===&lt;br /&gt;
Consider a simple flash-card-like activity.  It presents a question from a&lt;br /&gt;
list of questions, allows the student to select an answer from the provided&lt;br /&gt;
answers for the question or to enter their own answer.  Then the correct&lt;br /&gt;
answer is revealed and the student it told whether their answer is correct.&lt;br /&gt;
If the question has an explanation of the correct answer, the flash-card&lt;br /&gt;
activity will show the explanation of the correct answer.  (Note that this&lt;br /&gt;
is just a simple usage example, the interaction design of a drilling&lt;br /&gt;
activity could be very different.)&lt;br /&gt;
&lt;br /&gt;
The flash-card activity would use this proposed Quiz API for the following:&lt;br /&gt;
&lt;br /&gt;
* Loading the questions from the storage location into memory. This includes any filtering or network lookup to download the questions from a remote resource and select appropriate questions for the student.&lt;br /&gt;
&lt;br /&gt;
* Determining whether the student has entered a correct answer.&lt;br /&gt;
&lt;br /&gt;
To start with, the library would simply be a time-saving tool for developers&lt;br /&gt;
needing similar functionality, but as the XS (School Server) becomes more&lt;br /&gt;
fully developed the library should integrate the functions provided by the&lt;br /&gt;
XS to enable automated update of course material for the current topic of&lt;br /&gt;
study so the students can drill material using any tool they prefer, while&lt;br /&gt;
still reporting progress to the instructor using the XS services.&lt;br /&gt;
&lt;br /&gt;
===Current Status===&lt;br /&gt;
&lt;br /&gt;
Currently, (14 May 2009) the API supports parsing the GIFT file format well enough to import Multiple Choice and True/False questions, along with complete implementations for basic functionality of the corresponding question objects.  No support for partial credit answers is currently implemented, nor are other question types working correctly (though most can be parsed to some extent).  Export to CSV works as intended, though it is intentionally simple.  Documentation on usage and integration of the API into an activity is in the doc/ directory of [[http://git.sugarlabs.org/projects/question-support-api the repository]]. A simple, but complete usage example, using a console interface is available in tests/complete_test.py.&lt;br /&gt;
&lt;br /&gt;
===Current implementation===&lt;br /&gt;
1. Ensure that PyParser and PEAK-Rules are installed &amp;lt;br&amp;gt;&lt;br /&gt;
2. Include the quizdata module&lt;br /&gt;
    import quizdata&lt;br /&gt;
3. Select plain text output&lt;br /&gt;
    from quizdata.text import plain_text&lt;br /&gt;
4. Select desired question types&lt;br /&gt;
    from quizdata.question import MultipleChoiceQuestion, MissingWordQuestion&lt;br /&gt;
5. Import when function to assist with question sorting&lt;br /&gt;
    from peak.rules import when&lt;br /&gt;
6. Handle questions (this section should be rewritten as needed for your activity&lt;br /&gt;
    # this is the base case for any question type we don&#039;t handle otherwise.&lt;br /&gt;
    def do_question(q):&lt;br /&gt;
        print &amp;quot;Unhandled question type.&amp;quot;, type(q)&lt;br /&gt;
    # for multiple choice questions (incl. subclasses) we do this...&lt;br /&gt;
    @when(do_question, (MultipleChoiceQuestion,))&lt;br /&gt;
    def do_multi_questions(q):&lt;br /&gt;
        print plain_text(q.text)&lt;br /&gt;
        for a in zip(&#039;0123456789&#039;, q.answers):&lt;br /&gt;
            print &amp;quot;%5s: %s&amp;quot; % a&lt;br /&gt;
        answer = int(raw_input())&lt;br /&gt;
        q.answer = q.answers[answer]&lt;br /&gt;
        print q.correct&lt;br /&gt;
    # for missing word-style questions, which aren&#039;t implemented correctly yet, and&lt;br /&gt;
    # are a subclass of multiple choice questions... we make sure to ignore them&lt;br /&gt;
    # with a more specific rule.&lt;br /&gt;
    @when(do_question, (MissingWordQuestion,))&lt;br /&gt;
    def do_mw_question(q): # XXX: inheritance is annoying here...&lt;br /&gt;
        print &amp;quot;Unhandled question type. (MissingWordQuestion)&amp;quot;&lt;br /&gt;
7. Open questions&lt;br /&gt;
    questions = quizdata.open(&amp;quot;file://%s?format=gift&amp;quot; % path.join(base_path, &#039;tests&#039;, &#039;multi_choice.txt&#039;))&lt;br /&gt;
    for q in questions:&lt;br /&gt;
        do_question(q)&lt;br /&gt;
====&amp;quot;How to Play/Use&amp;quot; for end user====&lt;br /&gt;
This is a requirement of the RIT OLPC seminar.  The question doesn&#039;t exactly pertain to the API team&#039;s project, a more applicable question might be “How development of the API is done?” and “How do activity developers include / extend our API?”.&lt;br /&gt;
* The API is written in Python, has a set of dependencies (which are documented on this wiki page).&lt;br /&gt;
* For activity developers to include our API into an activity, we&#039;re hoping to have the Sugar development team create a mechanism for developer&#039;s to install or include components.   [[User:Enimihil|Greg Stevens]]&#039;s has a bit more knowledge on this than  [[User:bbl5660|Brian]], but we will be looking into how to package our API, and how it can be accessed by other Activities.  The issue with this later concept, is that Activities running on Sugar&#039;s platform are intentionally meant to limit each activity to it&#039;s own space inside of the Sugar environment.  This means that we&#039;ll either need to hack something together to make other activities include our API, or we&#039;ll need to speak to people at Sugar and figure out the best practice to include our API.&lt;br /&gt;
&lt;br /&gt;
===Education Standards===&lt;br /&gt;
As a general API and not a standalone Activity, along with the nature of the API in specific, this project does not directly address any specific education standards or learning outcomes.  It is reliant on educators to write questions, or have questions available to them in usable formats.  As such, the potential educational standards this project could help to meet includes **any** standard where drilling or question/response evaluation is appropriate. (This includes a wider range of topic areas than the Math4 focus, even.)&lt;br /&gt;
&lt;br /&gt;
====A Teacher&#039;s Guide Abstract====&lt;br /&gt;
* Per the nature of this API, we&#039;ve decided that our “Teacher Guide” will be more of an abstract.  Below is a hypothetical situation of the Question Support API:Imagine a school manages a repository of quiz material that fit&#039;s some curriculum, and this repository is located at Moodle.org (for example the 4th Grade Math curriculum see: http://wiki.sugarlabs.org/go/User:Gdk/4th_Grade_Maths ).  The teacher&#039;s use of our API design might go something like this: &lt;br /&gt;
&lt;br /&gt;
* An activity that has extended / implemented our API is started by the teacher.  The teacher is presented with an input field that requires a URI (URL).  The teacher enters the URI of this week&#039;s quiz (i.e. http://moodle.org/SchoolName/ClassName/Week_11_Quiz/ )  The activity fetches the specified quiz data from the web, and presents the teacher with a summary and confirmation dialog box.  Upon confirmation, the teacher can send / assign the quiz to the class.  The class starts their corresponding activity which then also has a mechanism to either grab the assigned quiz from the Moodle.org server or from the local “School Server” (also-known-as the XS server, see: http://wiki.laptop.org/go/School_server ).  The student&#039;s complete their assigned quiz, and data is sent back to the server for reporting / grading.&lt;br /&gt;
&lt;br /&gt;
===Milestones===&lt;br /&gt;
;Initial Prototype Phase (1)&lt;br /&gt;
:Simple implementation, data model not yet nailed down, focus on import and utility to question *consumers*, Like Activities. Initial formats to include MoodleXML, GIFT.&lt;br /&gt;
        &lt;br /&gt;
;Rigorous Design Phase (2)&lt;br /&gt;
:Nail down the data model, including developing the &#039;native&#039; format, probably using a sqlite file mechanism, or other database support, if possible. Freeze the Question object (in terms of required properties,        etc.), finalize decisions about URLs for question aquisition.  Make sure requirements of other projects *can* be met by the design at this stage.&lt;br /&gt;
&lt;br /&gt;
;Full Implementation Phase (3)&lt;br /&gt;
:Complete the implementation of the import formats, including the &#039;native&#039; format.  Should be usable to other Activity developers at this point (hopefully useful, before now, but all needs should be filled at this point).  Export implementation should start now, along with prototyping for an authoring activity. (Collaboration with the reporting team *needs* to happen at this point, as the activity will probably be combined with reporting tools.)&lt;br /&gt;
&lt;br /&gt;
;Activity Development Phase (4)&lt;br /&gt;
:Complete the authoring/reporting activity for the teachers, allowing export to file formats (and possibly *serving* the questions to other XOs; requires support in activities (using the API) to support).&lt;br /&gt;
&lt;br /&gt;
===Community Contacts===&lt;br /&gt;
[[User:FGrose]], [[User:Tony37]] (see [[Talk:{{PAGENAMEE}}|talk page]])&lt;br /&gt;
&lt;br /&gt;
===RIT Project Usage===&lt;br /&gt;
{{Definition_table&lt;br /&gt;
|Produce Puzzle| No API need or usage.&lt;br /&gt;
|Lemonade Stand| No API need or usage.&lt;br /&gt;
|Assimilate| API Usage needs documented on [[Talk:{{PAGENAMEE}}|talk page]].  Progress not far enough to start implementation using the API.&lt;br /&gt;
|Fun Towers| No API need or usage.&lt;br /&gt;
|Reporting Team| Simple export format documented at [[{{PAGENAMEE}}/API_Design|API Design]].  Futher integration work would be nice, but there is more work than could be done in a year along these lines (and neither team is prepared to embark on it).&lt;br /&gt;
|Muthris| No contact from? Probably no API need or usage.&lt;br /&gt;
}}&lt;br /&gt;
===See Also===&lt;br /&gt;
{{Special:PrefixIndex/{{PAGENAMEE}}/}}&lt;/div&gt;</summary>
		<author><name>Bbl5660</name></author>
	</entry>
	<entry>
		<id>https://wiki.sugarlabs.org/index.php?title=Math4Team/RIT/Projects/Question_Support_API&amp;diff=29423</id>
		<title>Math4Team/RIT/Projects/Question Support API</title>
		<link rel="alternate" type="text/html" href="https://wiki.sugarlabs.org/index.php?title=Math4Team/RIT/Projects/Question_Support_API&amp;diff=29423"/>
		<updated>2009-05-18T19:21:19Z</updated>

		<summary type="html">&lt;p&gt;Bbl5660: /* &amp;quot;How to Play/Use&amp;quot; for end user */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;{{TOCright}}&lt;br /&gt;
==Question Support API==&lt;br /&gt;
===Project Information===&lt;br /&gt;
{{Definition_table&lt;br /&gt;
|Primary Project Contact| [[User:Enimihil|Greg Stevens]]&lt;br /&gt;
|Project Members| [[User:Enimihil|Greg Stevens]], [[User:Jfinney|Jameson Finney]], [[User:Bbl5660|Brian Long]]&lt;br /&gt;
|Source Repository| http://git.sugarlabs.org/projects/question-support-api&lt;br /&gt;
}}&lt;br /&gt;
&lt;br /&gt;
===Current Goals===&lt;br /&gt;
&lt;br /&gt;
* Documentation&lt;br /&gt;
** Packaging&lt;br /&gt;
** Documenting Dependencies and how to enable them in a development environment (Simple tutorial on setting up your Question API Development Environment)&lt;br /&gt;
** Question Authoring guidelines&lt;br /&gt;
** Integrate within lesson planning&lt;br /&gt;
** How does an instructor get the questions they have written/found into an Activity?&lt;br /&gt;
* Liase w/ other Math4 teams and Sugarlabs (What would it take to be included in the Sugar core?)&lt;br /&gt;
* Future Development (Needs / Wants — collect proposals from other teams)&lt;br /&gt;
* Discovery / Plugin  (How do activities find questions, i.e. how to get URIs to load questions from?)&lt;br /&gt;
&lt;br /&gt;
===Setting Up a Development Environment (For Newbies)===&lt;br /&gt;
These are links, tutorials and things that [[User:Bbl5660|Brian Long]] has found along the way, as well as help gained from [[User:Enimihil|Greg Stevens]].  Brian is new to the Linux / OpenSource community, and is working on documenting a development environment for &amp;lt;b&amp;gt;you&amp;lt;/b&amp;gt; and for us to continue developing this API.  The small amount of information below is meant to help someone new step into the world of developing for the Sugar environment, from Ubuntu and have all  dependencies and things setup to continue development of this API.  &amp;lt;b&amp;gt;Next&amp;lt;/b&amp;gt; Brian would like to document how to setup these sort of items for [http://wiki.laptop.org/go/Creating_an_activity Activity developers] to include our API and be able to extend it.&lt;br /&gt;
&lt;br /&gt;
* For development environments, you may consider consider first installing a linux OS and the the LAMP stack with PhpMyAdmin.  Brian is choosing Ubuntu, Aptana as a (free) Python IDE that can be used with PyDev to easily allow Python writing.  &lt;br /&gt;
* Links that Brian is relying on at the moment include:&lt;br /&gt;
** http://help.ubuntu.com/community/ApacheMySQLPHP&lt;br /&gt;
** http://www.sqlalchemy.org/docs/04/ormtutorial.html&lt;br /&gt;
** http://docs.python.org/&lt;br /&gt;
** http://andrewbleakley.com/blog/2008/11/01/installing-and-running-aptana-on-ubuntu-810/&lt;br /&gt;
** http://forums.aptana.com/viewtopic.php?f=37&amp;amp;t=7147&amp;amp;p=32918&amp;amp;hilit=ubuntu#p32918&lt;br /&gt;
&lt;br /&gt;
====Dependencies that will be required / Installing them from the terminal====&lt;br /&gt;
&amp;lt;!-- Development for Linux / Python / Sugar Newbies! --&amp;gt;&lt;br /&gt;
* sudo apt-get install python-setuptools&lt;br /&gt;
* sudo easy_install pyparsing&lt;br /&gt;
* sudo easy_install peak-rules&lt;br /&gt;
* sudo easy_install sqlalchemy&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
===Motivation===&lt;br /&gt;
In the RIT class working on the Math4 projects, many proposed activities&lt;br /&gt;
require a question database of some kind.  A common API or library for&lt;br /&gt;
accessing databases in different formats, stored either locally or remotely,&lt;br /&gt;
along with a simple mechanism to determine more complex formatting or&lt;br /&gt;
presentation than simple text (e.g. to include simple graphics or&lt;br /&gt;
mathematical notation) would cover a majority of the cases where the&lt;br /&gt;
activity needs some configurable &amp;quot;curriculum data&amp;quot;.&lt;br /&gt;
&lt;br /&gt;
Eventually this library could be extended to provide hints, explanations, or&lt;br /&gt;
walkthroughs for questions, in addition to the basic metadata about level,&lt;br /&gt;
grouping, difficulty, and subject matter that would be part of the base&lt;br /&gt;
system.&lt;br /&gt;
&lt;br /&gt;
===Envisioned Usage===&lt;br /&gt;
Consider a simple flash-card-like activity.  It presents a question from a&lt;br /&gt;
list of questions, allows the student to select an answer from the provided&lt;br /&gt;
answers for the question or to enter their own answer.  Then the correct&lt;br /&gt;
answer is revealed and the student it told whether their answer is correct.&lt;br /&gt;
If the question has an explanation of the correct answer, the flash-card&lt;br /&gt;
activity will show the explanation of the correct answer.  (Note that this&lt;br /&gt;
is just a simple usage example, the interaction design of a drilling&lt;br /&gt;
activity could be very different.)&lt;br /&gt;
&lt;br /&gt;
The flash-card activity would use this proposed Quiz API for the following:&lt;br /&gt;
&lt;br /&gt;
* Loading the questions from the storage location into memory. This includes any filtering or network lookup to download the questions from a remote resource and select appropriate questions for the student.&lt;br /&gt;
&lt;br /&gt;
* Determining whether the student has entered a correct answer.&lt;br /&gt;
&lt;br /&gt;
To start with, the library would simply be a time-saving tool for developers&lt;br /&gt;
needing similar functionality, but as the XS (School Server) becomes more&lt;br /&gt;
fully developed the library should integrate the functions provided by the&lt;br /&gt;
XS to enable automated update of course material for the current topic of&lt;br /&gt;
study so the students can drill material using any tool they prefer, while&lt;br /&gt;
still reporting progress to the instructor using the XS services.&lt;br /&gt;
&lt;br /&gt;
===Current Status===&lt;br /&gt;
&lt;br /&gt;
Currently, (14 May 2009) the API supports parsing the GIFT file format well enough to import Multiple Choice and True/False questions, along with complete implementations for basic functionality of the corresponding question objects.  No support for partial credit answers is currently implemented, nor are other question types working correctly (though most can be parsed to some extent).  Export to CSV works as intended, though it is intentionally simple.  Documentation on usage and integration of the API into an activity is in the doc/ directory of [[http://git.sugarlabs.org/projects/question-support-api the repository]]. A simple, but complete usage example, using a console interface is available in tests/complete_test.py.&lt;br /&gt;
&lt;br /&gt;
===Current implementation===&lt;br /&gt;
1. Ensure that PyParser and PEAK-Rules are installed &amp;lt;br&amp;gt;&lt;br /&gt;
2. Include the quizdata module&lt;br /&gt;
    import quizdata&lt;br /&gt;
3. Select plain text output&lt;br /&gt;
    from quizdata.text import plain_text&lt;br /&gt;
4. Select desired question types&lt;br /&gt;
    from quizdata.question import MultipleChoiceQuestion, MissingWordQuestion&lt;br /&gt;
5. Import when function to assist with question sorting&lt;br /&gt;
    from peak.rules import when&lt;br /&gt;
6. Handle questions (this section should be rewritten as needed for your activity&lt;br /&gt;
    # this is the base case for any question type we don&#039;t handle otherwise.&lt;br /&gt;
    def do_question(q):&lt;br /&gt;
        print &amp;quot;Unhandled question type.&amp;quot;, type(q)&lt;br /&gt;
    # for multiple choice questions (incl. subclasses) we do this...&lt;br /&gt;
    @when(do_question, (MultipleChoiceQuestion,))&lt;br /&gt;
    def do_multi_questions(q):&lt;br /&gt;
        print plain_text(q.text)&lt;br /&gt;
        for a in zip(&#039;0123456789&#039;, q.answers):&lt;br /&gt;
            print &amp;quot;%5s: %s&amp;quot; % a&lt;br /&gt;
        answer = int(raw_input())&lt;br /&gt;
        q.answer = q.answers[answer]&lt;br /&gt;
        print q.correct&lt;br /&gt;
    # for missing word-style questions, which aren&#039;t implemented correctly yet, and&lt;br /&gt;
    # are a subclass of multiple choice questions... we make sure to ignore them&lt;br /&gt;
    # with a more specific rule.&lt;br /&gt;
    @when(do_question, (MissingWordQuestion,))&lt;br /&gt;
    def do_mw_question(q): # XXX: inheritance is annoying here...&lt;br /&gt;
        print &amp;quot;Unhandled question type. (MissingWordQuestion)&amp;quot;&lt;br /&gt;
7. Open questions&lt;br /&gt;
    questions = quizdata.open(&amp;quot;file://%s?format=gift&amp;quot; % path.join(base_path, &#039;tests&#039;, &#039;multi_choice.txt&#039;))&lt;br /&gt;
    for q in questions:&lt;br /&gt;
        do_question(q)&lt;br /&gt;
====&amp;quot;How to Play/Use&amp;quot; for end user====&lt;br /&gt;
This is a requirement of the RIT OLPC seminar.  The question doesn&#039;t exactly pertain to the API team&#039;s project, a more applicable question might be “How development of the API is done?” and “How do activity developers include / extend our API?”.&lt;br /&gt;
* The API is written in Python, has a set of dependencies (which are documented on this wiki page).&lt;br /&gt;
* For activity developers to include our API into an activity, we&#039;re hoping to have the Sugar development team create mechanism&#039;s developer&#039;s to install or include components.   [[User:Enimihil|Greg Stevens]]&#039;s has a bit more knowledge on this than  [[User:bbl5660|Brian]], but we will be looking into how to package our API, and how it can be accessed by other Activities.  The issue with this later concept, is that Activities running on Sugar&#039;s platform are intentionally meant to limit each activity to it&#039;s own space inside of the Sugar environment.  This means that we&#039;ll either need to hack something together to make other activities include our API, or we&#039;ll need to speak to people at Sugar and figure out the best practice to include our API.&lt;br /&gt;
&lt;br /&gt;
===Education Standards===&lt;br /&gt;
As a general API and not a standalone Activity, along with the nature of the API in specific, this project does not directly address any specific education standards or learning outcomes.  It is reliant on educators to write questions, or have questions available to them in usable formats.  As such, the potential educational standards this project could help to meet includes **any** standard where drilling or question/response evaluation is appropriate. (This includes a wider range of topic areas than the Math4 focus, even.)&lt;br /&gt;
&lt;br /&gt;
====A Teacher&#039;s Guide Abstract====&lt;br /&gt;
* Per the nature of this API, we&#039;ve decided that our “Teacher Guide” will be more of an abstract.  Below is a hypothetical situation of the Question Support API:Imagine a school manages a repository of quiz material that fit&#039;s some curriculum, and this repository is located at Moodle.org (for example the 4th Grade Math curriculum see: http://wiki.sugarlabs.org/go/User:Gdk/4th_Grade_Maths ).  The teacher&#039;s use of our API design might go something like this: &lt;br /&gt;
&lt;br /&gt;
* An activity that has extended / implemented our API is started by the teacher.  The teacher is presented with an input field that requires a URI (URL).  The teacher enters the URI of this week&#039;s quiz (i.e. http://moodle.org/SchoolName/ClassName/Week_11_Quiz/ )  The activity fetches the specified quiz data from the web, and presents the teacher with a summary and confirmation dialog box.  Upon confirmation, the teacher can send / assign the quiz to the class.  The class starts their corresponding activity which then also has a mechanism to either grab the assigned quiz from the Moodle.org server or from the local “School Server” (also-known-as the XS server, see: http://wiki.laptop.org/go/School_server ).  The student&#039;s complete their assigned quiz, and data is sent back to the server for reporting / grading.&lt;br /&gt;
&lt;br /&gt;
===Milestones===&lt;br /&gt;
;Initial Prototype Phase (1)&lt;br /&gt;
:Simple implementation, data model not yet nailed down, focus on import and utility to question *consumers*, Like Activities. Initial formats to include MoodleXML, GIFT.&lt;br /&gt;
        &lt;br /&gt;
;Rigorous Design Phase (2)&lt;br /&gt;
:Nail down the data model, including developing the &#039;native&#039; format, probably using a sqlite file mechanism, or other database support, if possible. Freeze the Question object (in terms of required properties,        etc.), finalize decisions about URLs for question aquisition.  Make sure requirements of other projects *can* be met by the design at this stage.&lt;br /&gt;
&lt;br /&gt;
;Full Implementation Phase (3)&lt;br /&gt;
:Complete the implementation of the import formats, including the &#039;native&#039; format.  Should be usable to other Activity developers at this point (hopefully useful, before now, but all needs should be filled at this point).  Export implementation should start now, along with prototyping for an authoring activity. (Collaboration with the reporting team *needs* to happen at this point, as the activity will probably be combined with reporting tools.)&lt;br /&gt;
&lt;br /&gt;
;Activity Development Phase (4)&lt;br /&gt;
:Complete the authoring/reporting activity for the teachers, allowing export to file formats (and possibly *serving* the questions to other XOs; requires support in activities (using the API) to support).&lt;br /&gt;
&lt;br /&gt;
===Community Contacts===&lt;br /&gt;
[[User:FGrose]], [[User:Tony37]] (see [[Talk:{{PAGENAMEE}}|talk page]])&lt;br /&gt;
&lt;br /&gt;
===RIT Project Usage===&lt;br /&gt;
{{Definition_table&lt;br /&gt;
|Produce Puzzle| No API need or usage.&lt;br /&gt;
|Lemonade Stand| No API need or usage.&lt;br /&gt;
|Assimilate| API Usage needs documented on [[Talk:{{PAGENAMEE}}|talk page]].  Progress not far enough to start implementation using the API.&lt;br /&gt;
|Fun Towers| No API need or usage.&lt;br /&gt;
|Reporting Team| Simple export format documented at [[{{PAGENAMEE}}/API_Design|API Design]].  Futher integration work would be nice, but there is more work than could be done in a year along these lines (and neither team is prepared to embark on it).&lt;br /&gt;
|Muthris| No contact from? Probably no API need or usage.&lt;br /&gt;
}}&lt;br /&gt;
===See Also===&lt;br /&gt;
{{Special:PrefixIndex/{{PAGENAMEE}}/}}&lt;/div&gt;</summary>
		<author><name>Bbl5660</name></author>
	</entry>
	<entry>
		<id>https://wiki.sugarlabs.org/index.php?title=Math4Team/RIT/Projects/Question_Support_API&amp;diff=29422</id>
		<title>Math4Team/RIT/Projects/Question Support API</title>
		<link rel="alternate" type="text/html" href="https://wiki.sugarlabs.org/index.php?title=Math4Team/RIT/Projects/Question_Support_API&amp;diff=29422"/>
		<updated>2009-05-18T19:16:30Z</updated>

		<summary type="html">&lt;p&gt;Bbl5660: /* &amp;quot;How to Play/Use&amp;quot; for end user */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;{{TOCright}}&lt;br /&gt;
==Question Support API==&lt;br /&gt;
===Project Information===&lt;br /&gt;
{{Definition_table&lt;br /&gt;
|Primary Project Contact| [[User:Enimihil|Greg Stevens]]&lt;br /&gt;
|Project Members| [[User:Enimihil|Greg Stevens]], [[User:Jfinney|Jameson Finney]], [[User:Bbl5660|Brian Long]]&lt;br /&gt;
|Source Repository| http://git.sugarlabs.org/projects/question-support-api&lt;br /&gt;
}}&lt;br /&gt;
&lt;br /&gt;
===Current Goals===&lt;br /&gt;
&lt;br /&gt;
* Documentation&lt;br /&gt;
** Packaging&lt;br /&gt;
** Documenting Dependencies and how to enable them in a development environment (Simple tutorial on setting up your Question API Development Environment)&lt;br /&gt;
** Question Authoring guidelines&lt;br /&gt;
** Integrate within lesson planning&lt;br /&gt;
** How does an instructor get the questions they have written/found into an Activity?&lt;br /&gt;
* Liase w/ other Math4 teams and Sugarlabs (What would it take to be included in the Sugar core?)&lt;br /&gt;
* Future Development (Needs / Wants — collect proposals from other teams)&lt;br /&gt;
* Discovery / Plugin  (How do activities find questions, i.e. how to get URIs to load questions from?)&lt;br /&gt;
&lt;br /&gt;
===Setting Up a Development Environment (For Newbies)===&lt;br /&gt;
These are links, tutorials and things that [[User:Bbl5660|Brian Long]] has found along the way, as well as help gained from [[User:Enimihil|Greg Stevens]].  Brian is new to the Linux / OpenSource community, and is working on documenting a development environment for &amp;lt;b&amp;gt;you&amp;lt;/b&amp;gt; and for us to continue developing this API.  The small amount of information below is meant to help someone new step into the world of developing for the Sugar environment, from Ubuntu and have all  dependencies and things setup to continue development of this API.  &amp;lt;b&amp;gt;Next&amp;lt;/b&amp;gt; Brian would like to document how to setup these sort of items for [http://wiki.laptop.org/go/Creating_an_activity Activity developers] to include our API and be able to extend it.&lt;br /&gt;
&lt;br /&gt;
* For development environments, you may consider consider first installing a linux OS and the the LAMP stack with PhpMyAdmin.  Brian is choosing Ubuntu, Aptana as a (free) Python IDE that can be used with PyDev to easily allow Python writing.  &lt;br /&gt;
* Links that Brian is relying on at the moment include:&lt;br /&gt;
** http://help.ubuntu.com/community/ApacheMySQLPHP&lt;br /&gt;
** http://www.sqlalchemy.org/docs/04/ormtutorial.html&lt;br /&gt;
** http://docs.python.org/&lt;br /&gt;
** http://andrewbleakley.com/blog/2008/11/01/installing-and-running-aptana-on-ubuntu-810/&lt;br /&gt;
** http://forums.aptana.com/viewtopic.php?f=37&amp;amp;t=7147&amp;amp;p=32918&amp;amp;hilit=ubuntu#p32918&lt;br /&gt;
&lt;br /&gt;
====Dependencies that will be required / Installing them from the terminal====&lt;br /&gt;
&amp;lt;!-- Development for Linux / Python / Sugar Newbies! --&amp;gt;&lt;br /&gt;
* sudo apt-get install python-setuptools&lt;br /&gt;
* sudo easy_install pyparsing&lt;br /&gt;
* sudo easy_install peak-rules&lt;br /&gt;
* sudo easy_install sqlalchemy&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
===Motivation===&lt;br /&gt;
In the RIT class working on the Math4 projects, many proposed activities&lt;br /&gt;
require a question database of some kind.  A common API or library for&lt;br /&gt;
accessing databases in different formats, stored either locally or remotely,&lt;br /&gt;
along with a simple mechanism to determine more complex formatting or&lt;br /&gt;
presentation than simple text (e.g. to include simple graphics or&lt;br /&gt;
mathematical notation) would cover a majority of the cases where the&lt;br /&gt;
activity needs some configurable &amp;quot;curriculum data&amp;quot;.&lt;br /&gt;
&lt;br /&gt;
Eventually this library could be extended to provide hints, explanations, or&lt;br /&gt;
walkthroughs for questions, in addition to the basic metadata about level,&lt;br /&gt;
grouping, difficulty, and subject matter that would be part of the base&lt;br /&gt;
system.&lt;br /&gt;
&lt;br /&gt;
===Envisioned Usage===&lt;br /&gt;
Consider a simple flash-card-like activity.  It presents a question from a&lt;br /&gt;
list of questions, allows the student to select an answer from the provided&lt;br /&gt;
answers for the question or to enter their own answer.  Then the correct&lt;br /&gt;
answer is revealed and the student it told whether their answer is correct.&lt;br /&gt;
If the question has an explanation of the correct answer, the flash-card&lt;br /&gt;
activity will show the explanation of the correct answer.  (Note that this&lt;br /&gt;
is just a simple usage example, the interaction design of a drilling&lt;br /&gt;
activity could be very different.)&lt;br /&gt;
&lt;br /&gt;
The flash-card activity would use this proposed Quiz API for the following:&lt;br /&gt;
&lt;br /&gt;
* Loading the questions from the storage location into memory. This includes any filtering or network lookup to download the questions from a remote resource and select appropriate questions for the student.&lt;br /&gt;
&lt;br /&gt;
* Determining whether the student has entered a correct answer.&lt;br /&gt;
&lt;br /&gt;
To start with, the library would simply be a time-saving tool for developers&lt;br /&gt;
needing similar functionality, but as the XS (School Server) becomes more&lt;br /&gt;
fully developed the library should integrate the functions provided by the&lt;br /&gt;
XS to enable automated update of course material for the current topic of&lt;br /&gt;
study so the students can drill material using any tool they prefer, while&lt;br /&gt;
still reporting progress to the instructor using the XS services.&lt;br /&gt;
&lt;br /&gt;
===Current Status===&lt;br /&gt;
&lt;br /&gt;
Currently, (14 May 2009) the API supports parsing the GIFT file format well enough to import Multiple Choice and True/False questions, along with complete implementations for basic functionality of the corresponding question objects.  No support for partial credit answers is currently implemented, nor are other question types working correctly (though most can be parsed to some extent).  Export to CSV works as intended, though it is intentionally simple.  Documentation on usage and integration of the API into an activity is in the doc/ directory of [[http://git.sugarlabs.org/projects/question-support-api the repository]]. A simple, but complete usage example, using a console interface is available in tests/complete_test.py.&lt;br /&gt;
&lt;br /&gt;
===Current implementation===&lt;br /&gt;
1. Ensure that PyParser and PEAK-Rules are installed &amp;lt;br&amp;gt;&lt;br /&gt;
2. Include the quizdata module&lt;br /&gt;
    import quizdata&lt;br /&gt;
3. Select plain text output&lt;br /&gt;
    from quizdata.text import plain_text&lt;br /&gt;
4. Select desired question types&lt;br /&gt;
    from quizdata.question import MultipleChoiceQuestion, MissingWordQuestion&lt;br /&gt;
5. Import when function to assist with question sorting&lt;br /&gt;
    from peak.rules import when&lt;br /&gt;
6. Handle questions (this section should be rewritten as needed for your activity&lt;br /&gt;
    # this is the base case for any question type we don&#039;t handle otherwise.&lt;br /&gt;
    def do_question(q):&lt;br /&gt;
        print &amp;quot;Unhandled question type.&amp;quot;, type(q)&lt;br /&gt;
    # for multiple choice questions (incl. subclasses) we do this...&lt;br /&gt;
    @when(do_question, (MultipleChoiceQuestion,))&lt;br /&gt;
    def do_multi_questions(q):&lt;br /&gt;
        print plain_text(q.text)&lt;br /&gt;
        for a in zip(&#039;0123456789&#039;, q.answers):&lt;br /&gt;
            print &amp;quot;%5s: %s&amp;quot; % a&lt;br /&gt;
        answer = int(raw_input())&lt;br /&gt;
        q.answer = q.answers[answer]&lt;br /&gt;
        print q.correct&lt;br /&gt;
    # for missing word-style questions, which aren&#039;t implemented correctly yet, and&lt;br /&gt;
    # are a subclass of multiple choice questions... we make sure to ignore them&lt;br /&gt;
    # with a more specific rule.&lt;br /&gt;
    @when(do_question, (MissingWordQuestion,))&lt;br /&gt;
    def do_mw_question(q): # XXX: inheritance is annoying here...&lt;br /&gt;
        print &amp;quot;Unhandled question type. (MissingWordQuestion)&amp;quot;&lt;br /&gt;
7. Open questions&lt;br /&gt;
    questions = quizdata.open(&amp;quot;file://%s?format=gift&amp;quot; % path.join(base_path, &#039;tests&#039;, &#039;multi_choice.txt&#039;))&lt;br /&gt;
    for q in questions:&lt;br /&gt;
        do_question(q)&lt;br /&gt;
====&amp;quot;How to Play/Use&amp;quot; for end user====&lt;br /&gt;
This is a requirement of the RIT OLPC seminar.  The question doesn&#039;t exactly pertain to the API team&#039;s project, a more applicable question might be “How development of the API is done?” and “How do activity developers include / extend our API?”.&lt;br /&gt;
* The API is written in Python, has a set of dependencies (which are documented on this wiki page).&lt;br /&gt;
* For activity developers to include our API into an activity, we&#039;re hoping to have the Sugar development team include our libraries into Sugar&#039;s main packages.   [[User:Enimihil|Greg Stevens]]&#039;s has a bit more knowledge on this than  [[User:bbl5660|Brian]] , but Brian believes both of us will be looking into how to package our API, and how it can be accessed by other Activities.  The issue with this later concept, is that Activities running on Sugar&#039;s platform are intentionally meant to limit each activity to it&#039;s own space inside of the Sugar environment.  This means that we&#039;ll either need to hack something together to make other activities include our API, or we&#039;ll need to speak to people at Sugar and figure out the best practice to include our API.&lt;br /&gt;
&lt;br /&gt;
===Education Standards===&lt;br /&gt;
As a general API and not a standalone Activity, along with the nature of the API in specific, this project does not directly address any specific education standards or learning outcomes.  It is reliant on educators to write questions, or have questions available to them in usable formats.  As such, the potential educational standards this project could help to meet includes **any** standard where drilling or question/response evaluation is appropriate. (This includes a wider range of topic areas than the Math4 focus, even.)&lt;br /&gt;
&lt;br /&gt;
====A Teacher&#039;s Guide Abstract====&lt;br /&gt;
* Per the nature of this API, we&#039;ve decided that our “Teacher Guide” will be more of an abstract.  Below is a hypothetical situation of the Question Support API:Imagine a school manages a repository of quiz material that fit&#039;s some curriculum, and this repository is located at Moodle.org (for example the 4th Grade Math curriculum see: http://wiki.sugarlabs.org/go/User:Gdk/4th_Grade_Maths ).  The teacher&#039;s use of our API design might go something like this: &lt;br /&gt;
&lt;br /&gt;
* An activity that has extended / implemented our API is started by the teacher.  The teacher is presented with an input field that requires a URI (URL).  The teacher enters the URI of this week&#039;s quiz (i.e. http://moodle.org/SchoolName/ClassName/Week_11_Quiz/ )  The activity fetches the specified quiz data from the web, and presents the teacher with a summary and confirmation dialog box.  Upon confirmation, the teacher can send / assign the quiz to the class.  The class starts their corresponding activity which then also has a mechanism to either grab the assigned quiz from the Moodle.org server or from the local “School Server” (also-known-as the XS server, see: http://wiki.laptop.org/go/School_server ).  The student&#039;s complete their assigned quiz, and data is sent back to the server for reporting / grading.&lt;br /&gt;
&lt;br /&gt;
===Milestones===&lt;br /&gt;
;Initial Prototype Phase (1)&lt;br /&gt;
:Simple implementation, data model not yet nailed down, focus on import and utility to question *consumers*, Like Activities. Initial formats to include MoodleXML, GIFT.&lt;br /&gt;
        &lt;br /&gt;
;Rigorous Design Phase (2)&lt;br /&gt;
:Nail down the data model, including developing the &#039;native&#039; format, probably using a sqlite file mechanism, or other database support, if possible. Freeze the Question object (in terms of required properties,        etc.), finalize decisions about URLs for question aquisition.  Make sure requirements of other projects *can* be met by the design at this stage.&lt;br /&gt;
&lt;br /&gt;
;Full Implementation Phase (3)&lt;br /&gt;
:Complete the implementation of the import formats, including the &#039;native&#039; format.  Should be usable to other Activity developers at this point (hopefully useful, before now, but all needs should be filled at this point).  Export implementation should start now, along with prototyping for an authoring activity. (Collaboration with the reporting team *needs* to happen at this point, as the activity will probably be combined with reporting tools.)&lt;br /&gt;
&lt;br /&gt;
;Activity Development Phase (4)&lt;br /&gt;
:Complete the authoring/reporting activity for the teachers, allowing export to file formats (and possibly *serving* the questions to other XOs; requires support in activities (using the API) to support).&lt;br /&gt;
&lt;br /&gt;
===Community Contacts===&lt;br /&gt;
[[User:FGrose]], [[User:Tony37]] (see [[Talk:{{PAGENAMEE}}|talk page]])&lt;br /&gt;
&lt;br /&gt;
===RIT Project Usage===&lt;br /&gt;
{{Definition_table&lt;br /&gt;
|Produce Puzzle| No API need or usage.&lt;br /&gt;
|Lemonade Stand| No API need or usage.&lt;br /&gt;
|Assimilate| API Usage needs documented on [[Talk:{{PAGENAMEE}}|talk page]].  Progress not far enough to start implementation using the API.&lt;br /&gt;
|Fun Towers| No API need or usage.&lt;br /&gt;
|Reporting Team| Simple export format documented at [[{{PAGENAMEE}}/API_Design|API Design]].  Futher integration work would be nice, but there is more work than could be done in a year along these lines (and neither team is prepared to embark on it).&lt;br /&gt;
|Muthris| No contact from? Probably no API need or usage.&lt;br /&gt;
}}&lt;br /&gt;
===See Also===&lt;br /&gt;
{{Special:PrefixIndex/{{PAGENAMEE}}/}}&lt;/div&gt;</summary>
		<author><name>Bbl5660</name></author>
	</entry>
	<entry>
		<id>https://wiki.sugarlabs.org/index.php?title=Math4Team/RIT/Projects/Question_Support_API&amp;diff=29421</id>
		<title>Math4Team/RIT/Projects/Question Support API</title>
		<link rel="alternate" type="text/html" href="https://wiki.sugarlabs.org/index.php?title=Math4Team/RIT/Projects/Question_Support_API&amp;diff=29421"/>
		<updated>2009-05-18T19:12:51Z</updated>

		<summary type="html">&lt;p&gt;Bbl5660: /* &amp;quot;How to Play/Use&amp;quot; for end user */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;{{TOCright}}&lt;br /&gt;
==Question Support API==&lt;br /&gt;
===Project Information===&lt;br /&gt;
{{Definition_table&lt;br /&gt;
|Primary Project Contact| [[User:Enimihil|Greg Stevens]]&lt;br /&gt;
|Project Members| [[User:Enimihil|Greg Stevens]], [[User:Jfinney|Jameson Finney]], [[User:Bbl5660|Brian Long]]&lt;br /&gt;
|Source Repository| http://git.sugarlabs.org/projects/question-support-api&lt;br /&gt;
}}&lt;br /&gt;
&lt;br /&gt;
===Current Goals===&lt;br /&gt;
&lt;br /&gt;
* Documentation&lt;br /&gt;
** Packaging&lt;br /&gt;
** Documenting Dependencies and how to enable them in a development environment (Simple tutorial on setting up your Question API Development Environment)&lt;br /&gt;
** Question Authoring guidelines&lt;br /&gt;
** Integrate within lesson planning&lt;br /&gt;
** How does an instructor get the questions they have written/found into an Activity?&lt;br /&gt;
* Liase w/ other Math4 teams and Sugarlabs (What would it take to be included in the Sugar core?)&lt;br /&gt;
* Future Development (Needs / Wants — collect proposals from other teams)&lt;br /&gt;
* Discovery / Plugin  (How do activities find questions, i.e. how to get URIs to load questions from?)&lt;br /&gt;
&lt;br /&gt;
===Setting Up a Development Environment (For Newbies)===&lt;br /&gt;
These are links, tutorials and things that [[User:Bbl5660|Brian Long]] has found along the way, as well as help gained from [[User:Enimihil|Greg Stevens]].  Brian is new to the Linux / OpenSource community, and is working on documenting a development environment for &amp;lt;b&amp;gt;you&amp;lt;/b&amp;gt; and for us to continue developing this API.  The small amount of information below is meant to help someone new step into the world of developing for the Sugar environment, from Ubuntu and have all  dependencies and things setup to continue development of this API.  &amp;lt;b&amp;gt;Next&amp;lt;/b&amp;gt; Brian would like to document how to setup these sort of items for [http://wiki.laptop.org/go/Creating_an_activity Activity developers] to include our API and be able to extend it.&lt;br /&gt;
&lt;br /&gt;
* For development environments, you may consider consider first installing a linux OS and the the LAMP stack with PhpMyAdmin.  Brian is choosing Ubuntu, Aptana as a (free) Python IDE that can be used with PyDev to easily allow Python writing.  &lt;br /&gt;
* Links that Brian is relying on at the moment include:&lt;br /&gt;
** http://help.ubuntu.com/community/ApacheMySQLPHP&lt;br /&gt;
** http://www.sqlalchemy.org/docs/04/ormtutorial.html&lt;br /&gt;
** http://docs.python.org/&lt;br /&gt;
** http://andrewbleakley.com/blog/2008/11/01/installing-and-running-aptana-on-ubuntu-810/&lt;br /&gt;
** http://forums.aptana.com/viewtopic.php?f=37&amp;amp;t=7147&amp;amp;p=32918&amp;amp;hilit=ubuntu#p32918&lt;br /&gt;
&lt;br /&gt;
====Dependencies that will be required / Installing them from the terminal====&lt;br /&gt;
&amp;lt;!-- Development for Linux / Python / Sugar Newbies! --&amp;gt;&lt;br /&gt;
* sudo apt-get install python-setuptools&lt;br /&gt;
* sudo easy_install pyparsing&lt;br /&gt;
* sudo easy_install peak-rules&lt;br /&gt;
* sudo easy_install sqlalchemy&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
===Motivation===&lt;br /&gt;
In the RIT class working on the Math4 projects, many proposed activities&lt;br /&gt;
require a question database of some kind.  A common API or library for&lt;br /&gt;
accessing databases in different formats, stored either locally or remotely,&lt;br /&gt;
along with a simple mechanism to determine more complex formatting or&lt;br /&gt;
presentation than simple text (e.g. to include simple graphics or&lt;br /&gt;
mathematical notation) would cover a majority of the cases where the&lt;br /&gt;
activity needs some configurable &amp;quot;curriculum data&amp;quot;.&lt;br /&gt;
&lt;br /&gt;
Eventually this library could be extended to provide hints, explanations, or&lt;br /&gt;
walkthroughs for questions, in addition to the basic metadata about level,&lt;br /&gt;
grouping, difficulty, and subject matter that would be part of the base&lt;br /&gt;
system.&lt;br /&gt;
&lt;br /&gt;
===Envisioned Usage===&lt;br /&gt;
Consider a simple flash-card-like activity.  It presents a question from a&lt;br /&gt;
list of questions, allows the student to select an answer from the provided&lt;br /&gt;
answers for the question or to enter their own answer.  Then the correct&lt;br /&gt;
answer is revealed and the student it told whether their answer is correct.&lt;br /&gt;
If the question has an explanation of the correct answer, the flash-card&lt;br /&gt;
activity will show the explanation of the correct answer.  (Note that this&lt;br /&gt;
is just a simple usage example, the interaction design of a drilling&lt;br /&gt;
activity could be very different.)&lt;br /&gt;
&lt;br /&gt;
The flash-card activity would use this proposed Quiz API for the following:&lt;br /&gt;
&lt;br /&gt;
* Loading the questions from the storage location into memory. This includes any filtering or network lookup to download the questions from a remote resource and select appropriate questions for the student.&lt;br /&gt;
&lt;br /&gt;
* Determining whether the student has entered a correct answer.&lt;br /&gt;
&lt;br /&gt;
To start with, the library would simply be a time-saving tool for developers&lt;br /&gt;
needing similar functionality, but as the XS (School Server) becomes more&lt;br /&gt;
fully developed the library should integrate the functions provided by the&lt;br /&gt;
XS to enable automated update of course material for the current topic of&lt;br /&gt;
study so the students can drill material using any tool they prefer, while&lt;br /&gt;
still reporting progress to the instructor using the XS services.&lt;br /&gt;
&lt;br /&gt;
===Current Status===&lt;br /&gt;
&lt;br /&gt;
Currently, (14 May 2009) the API supports parsing the GIFT file format well enough to import Multiple Choice and True/False questions, along with complete implementations for basic functionality of the corresponding question objects.  No support for partial credit answers is currently implemented, nor are other question types working correctly (though most can be parsed to some extent).  Export to CSV works as intended, though it is intentionally simple.  Documentation on usage and integration of the API into an activity is in the doc/ directory of [[http://git.sugarlabs.org/projects/question-support-api the repository]]. A simple, but complete usage example, using a console interface is available in tests/complete_test.py.&lt;br /&gt;
&lt;br /&gt;
===Current implementation===&lt;br /&gt;
1. Ensure that PyParser and PEAK-Rules are installed &amp;lt;br&amp;gt;&lt;br /&gt;
2. Include the quizdata module&lt;br /&gt;
    import quizdata&lt;br /&gt;
3. Select plain text output&lt;br /&gt;
    from quizdata.text import plain_text&lt;br /&gt;
4. Select desired question types&lt;br /&gt;
    from quizdata.question import MultipleChoiceQuestion, MissingWordQuestion&lt;br /&gt;
5. Import when function to assist with question sorting&lt;br /&gt;
    from peak.rules import when&lt;br /&gt;
6. Handle questions (this section should be rewritten as needed for your activity&lt;br /&gt;
    # this is the base case for any question type we don&#039;t handle otherwise.&lt;br /&gt;
    def do_question(q):&lt;br /&gt;
        print &amp;quot;Unhandled question type.&amp;quot;, type(q)&lt;br /&gt;
    # for multiple choice questions (incl. subclasses) we do this...&lt;br /&gt;
    @when(do_question, (MultipleChoiceQuestion,))&lt;br /&gt;
    def do_multi_questions(q):&lt;br /&gt;
        print plain_text(q.text)&lt;br /&gt;
        for a in zip(&#039;0123456789&#039;, q.answers):&lt;br /&gt;
            print &amp;quot;%5s: %s&amp;quot; % a&lt;br /&gt;
        answer = int(raw_input())&lt;br /&gt;
        q.answer = q.answers[answer]&lt;br /&gt;
        print q.correct&lt;br /&gt;
    # for missing word-style questions, which aren&#039;t implemented correctly yet, and&lt;br /&gt;
    # are a subclass of multiple choice questions... we make sure to ignore them&lt;br /&gt;
    # with a more specific rule.&lt;br /&gt;
    @when(do_question, (MissingWordQuestion,))&lt;br /&gt;
    def do_mw_question(q): # XXX: inheritance is annoying here...&lt;br /&gt;
        print &amp;quot;Unhandled question type. (MissingWordQuestion)&amp;quot;&lt;br /&gt;
7. Open questions&lt;br /&gt;
    questions = quizdata.open(&amp;quot;file://%s?format=gift&amp;quot; % path.join(base_path, &#039;tests&#039;, &#039;multi_choice.txt&#039;))&lt;br /&gt;
    for q in questions:&lt;br /&gt;
        do_question(q)&lt;br /&gt;
====&amp;quot;How to Play/Use&amp;quot; for end user====&lt;br /&gt;
This is a requirement of the RIT OLPC seminar.  The question is a bit different for the API team, a more applicable solution would be “How development of the API is done?” and “How do activity developers include / extend our API?”.&lt;br /&gt;
* The API is written in Python, has a set of dependencies (which are documented on the Question Support API wiki above)&lt;br /&gt;
* For activity developers to include our API into an activity, we&#039;re hoping to have the Sugar development team include our libraries into Sugar&#039;s main packages.   [[User:Enimihil|Greg Stevens]]&#039;s has a bit more knowledge on this than  [[User:bbl5660|Brian]] , but Brian believes both of us will be looking into how to simply package our API, and how it can be accessed by other Activities.  The issue with this later concept, is that Activities running on Sugar&#039;s platform is designed specifically to limit each activity to it&#039;s own space inside of the Sugar environment.  This means that we&#039;ll either need to hack something together to make other activities include our API, or we&#039;ll need to speak to people at Sugar and figure out the best practice to include our API.&lt;br /&gt;
&lt;br /&gt;
===Education Standards===&lt;br /&gt;
As a general API and not a standalone Activity, along with the nature of the API in specific, this project does not directly address any specific education standards or learning outcomes.  It is reliant on educators to write questions, or have questions available to them in usable formats.  As such, the potential educational standards this project could help to meet includes **any** standard where drilling or question/response evaluation is appropriate. (This includes a wider range of topic areas than the Math4 focus, even.)&lt;br /&gt;
&lt;br /&gt;
====A Teacher&#039;s Guide Abstract====&lt;br /&gt;
* Per the nature of this API, we&#039;ve decided that our “Teacher Guide” will be more of an abstract.  Below is a hypothetical situation of the Question Support API:Imagine a school manages a repository of quiz material that fit&#039;s some curriculum, and this repository is located at Moodle.org (for example the 4th Grade Math curriculum see: http://wiki.sugarlabs.org/go/User:Gdk/4th_Grade_Maths ).  The teacher&#039;s use of our API design might go something like this: &lt;br /&gt;
&lt;br /&gt;
* An activity that has extended / implemented our API is started by the teacher.  The teacher is presented with an input field that requires a URI (URL).  The teacher enters the URI of this week&#039;s quiz (i.e. http://moodle.org/SchoolName/ClassName/Week_11_Quiz/ )  The activity fetches the specified quiz data from the web, and presents the teacher with a summary and confirmation dialog box.  Upon confirmation, the teacher can send / assign the quiz to the class.  The class starts their corresponding activity which then also has a mechanism to either grab the assigned quiz from the Moodle.org server or from the local “School Server” (also-known-as the XS server, see: http://wiki.laptop.org/go/School_server ).  The student&#039;s complete their assigned quiz, and data is sent back to the server for reporting / grading.&lt;br /&gt;
&lt;br /&gt;
===Milestones===&lt;br /&gt;
;Initial Prototype Phase (1)&lt;br /&gt;
:Simple implementation, data model not yet nailed down, focus on import and utility to question *consumers*, Like Activities. Initial formats to include MoodleXML, GIFT.&lt;br /&gt;
        &lt;br /&gt;
;Rigorous Design Phase (2)&lt;br /&gt;
:Nail down the data model, including developing the &#039;native&#039; format, probably using a sqlite file mechanism, or other database support, if possible. Freeze the Question object (in terms of required properties,        etc.), finalize decisions about URLs for question aquisition.  Make sure requirements of other projects *can* be met by the design at this stage.&lt;br /&gt;
&lt;br /&gt;
;Full Implementation Phase (3)&lt;br /&gt;
:Complete the implementation of the import formats, including the &#039;native&#039; format.  Should be usable to other Activity developers at this point (hopefully useful, before now, but all needs should be filled at this point).  Export implementation should start now, along with prototyping for an authoring activity. (Collaboration with the reporting team *needs* to happen at this point, as the activity will probably be combined with reporting tools.)&lt;br /&gt;
&lt;br /&gt;
;Activity Development Phase (4)&lt;br /&gt;
:Complete the authoring/reporting activity for the teachers, allowing export to file formats (and possibly *serving* the questions to other XOs; requires support in activities (using the API) to support).&lt;br /&gt;
&lt;br /&gt;
===Community Contacts===&lt;br /&gt;
[[User:FGrose]], [[User:Tony37]] (see [[Talk:{{PAGENAMEE}}|talk page]])&lt;br /&gt;
&lt;br /&gt;
===RIT Project Usage===&lt;br /&gt;
{{Definition_table&lt;br /&gt;
|Produce Puzzle| No API need or usage.&lt;br /&gt;
|Lemonade Stand| No API need or usage.&lt;br /&gt;
|Assimilate| API Usage needs documented on [[Talk:{{PAGENAMEE}}|talk page]].  Progress not far enough to start implementation using the API.&lt;br /&gt;
|Fun Towers| No API need or usage.&lt;br /&gt;
|Reporting Team| Simple export format documented at [[{{PAGENAMEE}}/API_Design|API Design]].  Futher integration work would be nice, but there is more work than could be done in a year along these lines (and neither team is prepared to embark on it).&lt;br /&gt;
|Muthris| No contact from? Probably no API need or usage.&lt;br /&gt;
}}&lt;br /&gt;
===See Also===&lt;br /&gt;
{{Special:PrefixIndex/{{PAGENAMEE}}/}}&lt;/div&gt;</summary>
		<author><name>Bbl5660</name></author>
	</entry>
	<entry>
		<id>https://wiki.sugarlabs.org/index.php?title=Math4Team/RIT/Projects/Question_Support_API&amp;diff=29418</id>
		<title>Math4Team/RIT/Projects/Question Support API</title>
		<link rel="alternate" type="text/html" href="https://wiki.sugarlabs.org/index.php?title=Math4Team/RIT/Projects/Question_Support_API&amp;diff=29418"/>
		<updated>2009-05-18T19:11:17Z</updated>

		<summary type="html">&lt;p&gt;Bbl5660: /* Current implementation */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;{{TOCright}}&lt;br /&gt;
==Question Support API==&lt;br /&gt;
===Project Information===&lt;br /&gt;
{{Definition_table&lt;br /&gt;
|Primary Project Contact| [[User:Enimihil|Greg Stevens]]&lt;br /&gt;
|Project Members| [[User:Enimihil|Greg Stevens]], [[User:Jfinney|Jameson Finney]], [[User:Bbl5660|Brian Long]]&lt;br /&gt;
|Source Repository| http://git.sugarlabs.org/projects/question-support-api&lt;br /&gt;
}}&lt;br /&gt;
&lt;br /&gt;
===Current Goals===&lt;br /&gt;
&lt;br /&gt;
* Documentation&lt;br /&gt;
** Packaging&lt;br /&gt;
** Documenting Dependencies and how to enable them in a development environment (Simple tutorial on setting up your Question API Development Environment)&lt;br /&gt;
** Question Authoring guidelines&lt;br /&gt;
** Integrate within lesson planning&lt;br /&gt;
** How does an instructor get the questions they have written/found into an Activity?&lt;br /&gt;
* Liase w/ other Math4 teams and Sugarlabs (What would it take to be included in the Sugar core?)&lt;br /&gt;
* Future Development (Needs / Wants — collect proposals from other teams)&lt;br /&gt;
* Discovery / Plugin  (How do activities find questions, i.e. how to get URIs to load questions from?)&lt;br /&gt;
&lt;br /&gt;
===Setting Up a Development Environment (For Newbies)===&lt;br /&gt;
These are links, tutorials and things that [[User:Bbl5660|Brian Long]] has found along the way, as well as help gained from [[User:Enimihil|Greg Stevens]].  Brian is new to the Linux / OpenSource community, and is working on documenting a development environment for &amp;lt;b&amp;gt;you&amp;lt;/b&amp;gt; and for us to continue developing this API.  The small amount of information below is meant to help someone new step into the world of developing for the Sugar environment, from Ubuntu and have all  dependencies and things setup to continue development of this API.  &amp;lt;b&amp;gt;Next&amp;lt;/b&amp;gt; Brian would like to document how to setup these sort of items for [http://wiki.laptop.org/go/Creating_an_activity Activity developers] to include our API and be able to extend it.&lt;br /&gt;
&lt;br /&gt;
* For development environments, you may consider consider first installing a linux OS and the the LAMP stack with PhpMyAdmin.  Brian is choosing Ubuntu, Aptana as a (free) Python IDE that can be used with PyDev to easily allow Python writing.  &lt;br /&gt;
* Links that Brian is relying on at the moment include:&lt;br /&gt;
** http://help.ubuntu.com/community/ApacheMySQLPHP&lt;br /&gt;
** http://www.sqlalchemy.org/docs/04/ormtutorial.html&lt;br /&gt;
** http://docs.python.org/&lt;br /&gt;
** http://andrewbleakley.com/blog/2008/11/01/installing-and-running-aptana-on-ubuntu-810/&lt;br /&gt;
** http://forums.aptana.com/viewtopic.php?f=37&amp;amp;t=7147&amp;amp;p=32918&amp;amp;hilit=ubuntu#p32918&lt;br /&gt;
&lt;br /&gt;
====Dependencies that will be required / Installing them from the terminal====&lt;br /&gt;
&amp;lt;!-- Development for Linux / Python / Sugar Newbies! --&amp;gt;&lt;br /&gt;
* sudo apt-get install python-setuptools&lt;br /&gt;
* sudo easy_install pyparsing&lt;br /&gt;
* sudo easy_install peak-rules&lt;br /&gt;
* sudo easy_install sqlalchemy&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
===Motivation===&lt;br /&gt;
In the RIT class working on the Math4 projects, many proposed activities&lt;br /&gt;
require a question database of some kind.  A common API or library for&lt;br /&gt;
accessing databases in different formats, stored either locally or remotely,&lt;br /&gt;
along with a simple mechanism to determine more complex formatting or&lt;br /&gt;
presentation than simple text (e.g. to include simple graphics or&lt;br /&gt;
mathematical notation) would cover a majority of the cases where the&lt;br /&gt;
activity needs some configurable &amp;quot;curriculum data&amp;quot;.&lt;br /&gt;
&lt;br /&gt;
Eventually this library could be extended to provide hints, explanations, or&lt;br /&gt;
walkthroughs for questions, in addition to the basic metadata about level,&lt;br /&gt;
grouping, difficulty, and subject matter that would be part of the base&lt;br /&gt;
system.&lt;br /&gt;
&lt;br /&gt;
===Envisioned Usage===&lt;br /&gt;
Consider a simple flash-card-like activity.  It presents a question from a&lt;br /&gt;
list of questions, allows the student to select an answer from the provided&lt;br /&gt;
answers for the question or to enter their own answer.  Then the correct&lt;br /&gt;
answer is revealed and the student it told whether their answer is correct.&lt;br /&gt;
If the question has an explanation of the correct answer, the flash-card&lt;br /&gt;
activity will show the explanation of the correct answer.  (Note that this&lt;br /&gt;
is just a simple usage example, the interaction design of a drilling&lt;br /&gt;
activity could be very different.)&lt;br /&gt;
&lt;br /&gt;
The flash-card activity would use this proposed Quiz API for the following:&lt;br /&gt;
&lt;br /&gt;
* Loading the questions from the storage location into memory. This includes any filtering or network lookup to download the questions from a remote resource and select appropriate questions for the student.&lt;br /&gt;
&lt;br /&gt;
* Determining whether the student has entered a correct answer.&lt;br /&gt;
&lt;br /&gt;
To start with, the library would simply be a time-saving tool for developers&lt;br /&gt;
needing similar functionality, but as the XS (School Server) becomes more&lt;br /&gt;
fully developed the library should integrate the functions provided by the&lt;br /&gt;
XS to enable automated update of course material for the current topic of&lt;br /&gt;
study so the students can drill material using any tool they prefer, while&lt;br /&gt;
still reporting progress to the instructor using the XS services.&lt;br /&gt;
&lt;br /&gt;
===Current Status===&lt;br /&gt;
&lt;br /&gt;
Currently, (14 May 2009) the API supports parsing the GIFT file format well enough to import Multiple Choice and True/False questions, along with complete implementations for basic functionality of the corresponding question objects.  No support for partial credit answers is currently implemented, nor are other question types working correctly (though most can be parsed to some extent).  Export to CSV works as intended, though it is intentionally simple.  Documentation on usage and integration of the API into an activity is in the doc/ directory of [[http://git.sugarlabs.org/projects/question-support-api the repository]]. A simple, but complete usage example, using a console interface is available in tests/complete_test.py.&lt;br /&gt;
&lt;br /&gt;
===Current implementation===&lt;br /&gt;
1. Ensure that PyParser and PEAK-Rules are installed &amp;lt;br&amp;gt;&lt;br /&gt;
2. Include the quizdata module&lt;br /&gt;
    import quizdata&lt;br /&gt;
3. Select plain text output&lt;br /&gt;
    from quizdata.text import plain_text&lt;br /&gt;
4. Select desired question types&lt;br /&gt;
    from quizdata.question import MultipleChoiceQuestion, MissingWordQuestion&lt;br /&gt;
5. Import when function to assist with question sorting&lt;br /&gt;
    from peak.rules import when&lt;br /&gt;
6. Handle questions (this section should be rewritten as needed for your activity&lt;br /&gt;
    # this is the base case for any question type we don&#039;t handle otherwise.&lt;br /&gt;
    def do_question(q):&lt;br /&gt;
        print &amp;quot;Unhandled question type.&amp;quot;, type(q)&lt;br /&gt;
    # for multiple choice questions (incl. subclasses) we do this...&lt;br /&gt;
    @when(do_question, (MultipleChoiceQuestion,))&lt;br /&gt;
    def do_multi_questions(q):&lt;br /&gt;
        print plain_text(q.text)&lt;br /&gt;
        for a in zip(&#039;0123456789&#039;, q.answers):&lt;br /&gt;
            print &amp;quot;%5s: %s&amp;quot; % a&lt;br /&gt;
        answer = int(raw_input())&lt;br /&gt;
        q.answer = q.answers[answer]&lt;br /&gt;
        print q.correct&lt;br /&gt;
    # for missing word-style questions, which aren&#039;t implemented correctly yet, and&lt;br /&gt;
    # are a subclass of multiple choice questions... we make sure to ignore them&lt;br /&gt;
    # with a more specific rule.&lt;br /&gt;
    @when(do_question, (MissingWordQuestion,))&lt;br /&gt;
    def do_mw_question(q): # XXX: inheritance is annoying here...&lt;br /&gt;
        print &amp;quot;Unhandled question type. (MissingWordQuestion)&amp;quot;&lt;br /&gt;
7. Open questions&lt;br /&gt;
    questions = quizdata.open(&amp;quot;file://%s?format=gift&amp;quot; % path.join(base_path, &#039;tests&#039;, &#039;multi_choice.txt&#039;))&lt;br /&gt;
    for q in questions:&lt;br /&gt;
        do_question(q)&lt;br /&gt;
====&amp;quot;How to Play/Use&amp;quot; for end user====&lt;br /&gt;
This is a requirement of the RIT OLPC seminar.  The question is a bit different for the API team, a more applicable solution would be “How development of the API is done?” and “How do activity developers include / extend our API?”.&lt;br /&gt;
* The API is written in Python, has a set of dependencies (which are documented on the Question Support API wiki above)&lt;br /&gt;
* For activity developers to include our API into an activity, we&#039;re hoping to have the Sugar development team include our libraries into Sugar&#039;s main packages.  Greg Steven&#039;s has a bit more knowledge on this than I, but I believe both of us will be looking into how to simply package our API, and how it can be accessed by other Activities.  The issue with this later concept, is that Activities running on Sugar&#039;s platform is designed specifically to limit each activity to it&#039;s own space inside of the Sugar environment.  This means that we&#039;ll either need to hack something together to make other activities include our API, or we&#039;ll need to speak to people at Sugar and figure out the best practice for to implement.&lt;br /&gt;
&lt;br /&gt;
===Education Standards===&lt;br /&gt;
As a general API and not a standalone Activity, along with the nature of the API in specific, this project does not directly address any specific education standards or learning outcomes.  It is reliant on educators to write questions, or have questions available to them in usable formats.  As such, the potential educational standards this project could help to meet includes **any** standard where drilling or question/response evaluation is appropriate. (This includes a wider range of topic areas than the Math4 focus, even.)&lt;br /&gt;
&lt;br /&gt;
====A Teacher&#039;s Guide Abstract====&lt;br /&gt;
* Per the nature of this API, we&#039;ve decided that our “Teacher Guide” will be more of an abstract.  Below is a hypothetical situation of the Question Support API:Imagine a school manages a repository of quiz material that fit&#039;s some curriculum, and this repository is located at Moodle.org (for example the 4th Grade Math curriculum see: http://wiki.sugarlabs.org/go/User:Gdk/4th_Grade_Maths ).  The teacher&#039;s use of our API design might go something like this: &lt;br /&gt;
&lt;br /&gt;
* An activity that has extended / implemented our API is started by the teacher.  The teacher is presented with an input field that requires a URI (URL).  The teacher enters the URI of this week&#039;s quiz (i.e. http://moodle.org/SchoolName/ClassName/Week_11_Quiz/ )  The activity fetches the specified quiz data from the web, and presents the teacher with a summary and confirmation dialog box.  Upon confirmation, the teacher can send / assign the quiz to the class.  The class starts their corresponding activity which then also has a mechanism to either grab the assigned quiz from the Moodle.org server or from the local “School Server” (also-known-as the XS server, see: http://wiki.laptop.org/go/School_server ).  The student&#039;s complete their assigned quiz, and data is sent back to the server for reporting / grading.&lt;br /&gt;
&lt;br /&gt;
===Milestones===&lt;br /&gt;
;Initial Prototype Phase (1)&lt;br /&gt;
:Simple implementation, data model not yet nailed down, focus on import and utility to question *consumers*, Like Activities. Initial formats to include MoodleXML, GIFT.&lt;br /&gt;
        &lt;br /&gt;
;Rigorous Design Phase (2)&lt;br /&gt;
:Nail down the data model, including developing the &#039;native&#039; format, probably using a sqlite file mechanism, or other database support, if possible. Freeze the Question object (in terms of required properties,        etc.), finalize decisions about URLs for question aquisition.  Make sure requirements of other projects *can* be met by the design at this stage.&lt;br /&gt;
&lt;br /&gt;
;Full Implementation Phase (3)&lt;br /&gt;
:Complete the implementation of the import formats, including the &#039;native&#039; format.  Should be usable to other Activity developers at this point (hopefully useful, before now, but all needs should be filled at this point).  Export implementation should start now, along with prototyping for an authoring activity. (Collaboration with the reporting team *needs* to happen at this point, as the activity will probably be combined with reporting tools.)&lt;br /&gt;
&lt;br /&gt;
;Activity Development Phase (4)&lt;br /&gt;
:Complete the authoring/reporting activity for the teachers, allowing export to file formats (and possibly *serving* the questions to other XOs; requires support in activities (using the API) to support).&lt;br /&gt;
&lt;br /&gt;
===Community Contacts===&lt;br /&gt;
[[User:FGrose]], [[User:Tony37]] (see [[Talk:{{PAGENAMEE}}|talk page]])&lt;br /&gt;
&lt;br /&gt;
===RIT Project Usage===&lt;br /&gt;
{{Definition_table&lt;br /&gt;
|Produce Puzzle| No API need or usage.&lt;br /&gt;
|Lemonade Stand| No API need or usage.&lt;br /&gt;
|Assimilate| API Usage needs documented on [[Talk:{{PAGENAMEE}}|talk page]].  Progress not far enough to start implementation using the API.&lt;br /&gt;
|Fun Towers| No API need or usage.&lt;br /&gt;
|Reporting Team| Simple export format documented at [[{{PAGENAMEE}}/API_Design|API Design]].  Futher integration work would be nice, but there is more work than could be done in a year along these lines (and neither team is prepared to embark on it).&lt;br /&gt;
|Muthris| No contact from? Probably no API need or usage.&lt;br /&gt;
}}&lt;br /&gt;
===See Also===&lt;br /&gt;
{{Special:PrefixIndex/{{PAGENAMEE}}/}}&lt;/div&gt;</summary>
		<author><name>Bbl5660</name></author>
	</entry>
	<entry>
		<id>https://wiki.sugarlabs.org/index.php?title=Math4Team/RIT/Projects/Question_Support_API&amp;diff=29417</id>
		<title>Math4Team/RIT/Projects/Question Support API</title>
		<link rel="alternate" type="text/html" href="https://wiki.sugarlabs.org/index.php?title=Math4Team/RIT/Projects/Question_Support_API&amp;diff=29417"/>
		<updated>2009-05-18T19:08:24Z</updated>

		<summary type="html">&lt;p&gt;Bbl5660: /* A Teacher&amp;#039;s Guide Abstract */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;{{TOCright}}&lt;br /&gt;
==Question Support API==&lt;br /&gt;
===Project Information===&lt;br /&gt;
{{Definition_table&lt;br /&gt;
|Primary Project Contact| [[User:Enimihil|Greg Stevens]]&lt;br /&gt;
|Project Members| [[User:Enimihil|Greg Stevens]], [[User:Jfinney|Jameson Finney]], [[User:Bbl5660|Brian Long]]&lt;br /&gt;
|Source Repository| http://git.sugarlabs.org/projects/question-support-api&lt;br /&gt;
}}&lt;br /&gt;
&lt;br /&gt;
===Current Goals===&lt;br /&gt;
&lt;br /&gt;
* Documentation&lt;br /&gt;
** Packaging&lt;br /&gt;
** Documenting Dependencies and how to enable them in a development environment (Simple tutorial on setting up your Question API Development Environment)&lt;br /&gt;
** Question Authoring guidelines&lt;br /&gt;
** Integrate within lesson planning&lt;br /&gt;
** How does an instructor get the questions they have written/found into an Activity?&lt;br /&gt;
* Liase w/ other Math4 teams and Sugarlabs (What would it take to be included in the Sugar core?)&lt;br /&gt;
* Future Development (Needs / Wants — collect proposals from other teams)&lt;br /&gt;
* Discovery / Plugin  (How do activities find questions, i.e. how to get URIs to load questions from?)&lt;br /&gt;
&lt;br /&gt;
===Setting Up a Development Environment (For Newbies)===&lt;br /&gt;
These are links, tutorials and things that [[User:Bbl5660|Brian Long]] has found along the way, as well as help gained from [[User:Enimihil|Greg Stevens]].  Brian is new to the Linux / OpenSource community, and is working on documenting a development environment for &amp;lt;b&amp;gt;you&amp;lt;/b&amp;gt; and for us to continue developing this API.  The small amount of information below is meant to help someone new step into the world of developing for the Sugar environment, from Ubuntu and have all  dependencies and things setup to continue development of this API.  &amp;lt;b&amp;gt;Next&amp;lt;/b&amp;gt; Brian would like to document how to setup these sort of items for [http://wiki.laptop.org/go/Creating_an_activity Activity developers] to include our API and be able to extend it.&lt;br /&gt;
&lt;br /&gt;
* For development environments, you may consider consider first installing a linux OS and the the LAMP stack with PhpMyAdmin.  Brian is choosing Ubuntu, Aptana as a (free) Python IDE that can be used with PyDev to easily allow Python writing.  &lt;br /&gt;
* Links that Brian is relying on at the moment include:&lt;br /&gt;
** http://help.ubuntu.com/community/ApacheMySQLPHP&lt;br /&gt;
** http://www.sqlalchemy.org/docs/04/ormtutorial.html&lt;br /&gt;
** http://docs.python.org/&lt;br /&gt;
** http://andrewbleakley.com/blog/2008/11/01/installing-and-running-aptana-on-ubuntu-810/&lt;br /&gt;
** http://forums.aptana.com/viewtopic.php?f=37&amp;amp;t=7147&amp;amp;p=32918&amp;amp;hilit=ubuntu#p32918&lt;br /&gt;
&lt;br /&gt;
====Dependencies that will be required / Installing them from the terminal====&lt;br /&gt;
&amp;lt;!-- Development for Linux / Python / Sugar Newbies! --&amp;gt;&lt;br /&gt;
* sudo apt-get install python-setuptools&lt;br /&gt;
* sudo easy_install pyparsing&lt;br /&gt;
* sudo easy_install peak-rules&lt;br /&gt;
* sudo easy_install sqlalchemy&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
===Motivation===&lt;br /&gt;
In the RIT class working on the Math4 projects, many proposed activities&lt;br /&gt;
require a question database of some kind.  A common API or library for&lt;br /&gt;
accessing databases in different formats, stored either locally or remotely,&lt;br /&gt;
along with a simple mechanism to determine more complex formatting or&lt;br /&gt;
presentation than simple text (e.g. to include simple graphics or&lt;br /&gt;
mathematical notation) would cover a majority of the cases where the&lt;br /&gt;
activity needs some configurable &amp;quot;curriculum data&amp;quot;.&lt;br /&gt;
&lt;br /&gt;
Eventually this library could be extended to provide hints, explanations, or&lt;br /&gt;
walkthroughs for questions, in addition to the basic metadata about level,&lt;br /&gt;
grouping, difficulty, and subject matter that would be part of the base&lt;br /&gt;
system.&lt;br /&gt;
&lt;br /&gt;
===Envisioned Usage===&lt;br /&gt;
Consider a simple flash-card-like activity.  It presents a question from a&lt;br /&gt;
list of questions, allows the student to select an answer from the provided&lt;br /&gt;
answers for the question or to enter their own answer.  Then the correct&lt;br /&gt;
answer is revealed and the student it told whether their answer is correct.&lt;br /&gt;
If the question has an explanation of the correct answer, the flash-card&lt;br /&gt;
activity will show the explanation of the correct answer.  (Note that this&lt;br /&gt;
is just a simple usage example, the interaction design of a drilling&lt;br /&gt;
activity could be very different.)&lt;br /&gt;
&lt;br /&gt;
The flash-card activity would use this proposed Quiz API for the following:&lt;br /&gt;
&lt;br /&gt;
* Loading the questions from the storage location into memory. This includes any filtering or network lookup to download the questions from a remote resource and select appropriate questions for the student.&lt;br /&gt;
&lt;br /&gt;
* Determining whether the student has entered a correct answer.&lt;br /&gt;
&lt;br /&gt;
To start with, the library would simply be a time-saving tool for developers&lt;br /&gt;
needing similar functionality, but as the XS (School Server) becomes more&lt;br /&gt;
fully developed the library should integrate the functions provided by the&lt;br /&gt;
XS to enable automated update of course material for the current topic of&lt;br /&gt;
study so the students can drill material using any tool they prefer, while&lt;br /&gt;
still reporting progress to the instructor using the XS services.&lt;br /&gt;
&lt;br /&gt;
===Current Status===&lt;br /&gt;
&lt;br /&gt;
Currently, (14 May 2009) the API supports parsing the GIFT file format well enough to import Multiple Choice and True/False questions, along with complete implementations for basic functionality of the corresponding question objects.  No support for partial credit answers is currently implemented, nor are other question types working correctly (though most can be parsed to some extent).  Export to CSV works as intended, though it is intentionally simple.  Documentation on usage and integration of the API into an activity is in the doc/ directory of [[http://git.sugarlabs.org/projects/question-support-api the repository]]. A simple, but complete usage example, using a console interface is available in tests/complete_test.py.&lt;br /&gt;
&lt;br /&gt;
===Current implementation===&lt;br /&gt;
1. Ensure that PyParser and PEAK-Rules are installed &amp;lt;br&amp;gt;&lt;br /&gt;
2. Include the quizdata module&lt;br /&gt;
    import quizdata&lt;br /&gt;
3. Select plain text output&lt;br /&gt;
    from quizdata.text import plain_text&lt;br /&gt;
4. Select desired question types&lt;br /&gt;
    from quizdata.question import MultipleChoiceQuestion, MissingWordQuestion&lt;br /&gt;
5. Import when function to assist with question sorting&lt;br /&gt;
    from peak.rules import when&lt;br /&gt;
6. Handle questions (this section should be rewritten as needed for your activity&lt;br /&gt;
    # this is the base case for any question type we don&#039;t handle otherwise.&lt;br /&gt;
    def do_question(q):&lt;br /&gt;
        print &amp;quot;Unhandled question type.&amp;quot;, type(q)&lt;br /&gt;
    # for multiple choice questions (incl. subclasses) we do this...&lt;br /&gt;
    @when(do_question, (MultipleChoiceQuestion,))&lt;br /&gt;
    def do_multi_questions(q):&lt;br /&gt;
        print plain_text(q.text)&lt;br /&gt;
        for a in zip(&#039;0123456789&#039;, q.answers):&lt;br /&gt;
            print &amp;quot;%5s: %s&amp;quot; % a&lt;br /&gt;
        answer = int(raw_input())&lt;br /&gt;
        q.answer = q.answers[answer]&lt;br /&gt;
        print q.correct&lt;br /&gt;
    # for missing word-style questions, which aren&#039;t implemented correctly yet, and&lt;br /&gt;
    # are a subclass of multiple choice questions... we make sure to ignore them&lt;br /&gt;
    # with a more specific rule.&lt;br /&gt;
    @when(do_question, (MissingWordQuestion,))&lt;br /&gt;
    def do_mw_question(q): # XXX: inheritance is annoying here...&lt;br /&gt;
        print &amp;quot;Unhandled question type. (MissingWordQuestion)&amp;quot;&lt;br /&gt;
7. Open questions&lt;br /&gt;
    questions = quizdata.open(&amp;quot;file://%s?format=gift&amp;quot; % path.join(base_path, &#039;tests&#039;, &#039;multi_choice.txt&#039;))&lt;br /&gt;
    for q in questions:&lt;br /&gt;
        do_question(q)&lt;br /&gt;
&lt;br /&gt;
===Education Standards===&lt;br /&gt;
As a general API and not a standalone Activity, along with the nature of the API in specific, this project does not directly address any specific education standards or learning outcomes.  It is reliant on educators to write questions, or have questions available to them in usable formats.  As such, the potential educational standards this project could help to meet includes **any** standard where drilling or question/response evaluation is appropriate. (This includes a wider range of topic areas than the Math4 focus, even.)&lt;br /&gt;
&lt;br /&gt;
====A Teacher&#039;s Guide Abstract====&lt;br /&gt;
* Per the nature of this API, we&#039;ve decided that our “Teacher Guide” will be more of an abstract.  Below is a hypothetical situation of the Question Support API:Imagine a school manages a repository of quiz material that fit&#039;s some curriculum, and this repository is located at Moodle.org (for example the 4th Grade Math curriculum see: http://wiki.sugarlabs.org/go/User:Gdk/4th_Grade_Maths ).  The teacher&#039;s use of our API design might go something like this: &lt;br /&gt;
&lt;br /&gt;
* An activity that has extended / implemented our API is started by the teacher.  The teacher is presented with an input field that requires a URI (URL).  The teacher enters the URI of this week&#039;s quiz (i.e. http://moodle.org/SchoolName/ClassName/Week_11_Quiz/ )  The activity fetches the specified quiz data from the web, and presents the teacher with a summary and confirmation dialog box.  Upon confirmation, the teacher can send / assign the quiz to the class.  The class starts their corresponding activity which then also has a mechanism to either grab the assigned quiz from the Moodle.org server or from the local “School Server” (also-known-as the XS server, see: http://wiki.laptop.org/go/School_server ).  The student&#039;s complete their assigned quiz, and data is sent back to the server for reporting / grading.&lt;br /&gt;
&lt;br /&gt;
===Milestones===&lt;br /&gt;
;Initial Prototype Phase (1)&lt;br /&gt;
:Simple implementation, data model not yet nailed down, focus on import and utility to question *consumers*, Like Activities. Initial formats to include MoodleXML, GIFT.&lt;br /&gt;
        &lt;br /&gt;
;Rigorous Design Phase (2)&lt;br /&gt;
:Nail down the data model, including developing the &#039;native&#039; format, probably using a sqlite file mechanism, or other database support, if possible. Freeze the Question object (in terms of required properties,        etc.), finalize decisions about URLs for question aquisition.  Make sure requirements of other projects *can* be met by the design at this stage.&lt;br /&gt;
&lt;br /&gt;
;Full Implementation Phase (3)&lt;br /&gt;
:Complete the implementation of the import formats, including the &#039;native&#039; format.  Should be usable to other Activity developers at this point (hopefully useful, before now, but all needs should be filled at this point).  Export implementation should start now, along with prototyping for an authoring activity. (Collaboration with the reporting team *needs* to happen at this point, as the activity will probably be combined with reporting tools.)&lt;br /&gt;
&lt;br /&gt;
;Activity Development Phase (4)&lt;br /&gt;
:Complete the authoring/reporting activity for the teachers, allowing export to file formats (and possibly *serving* the questions to other XOs; requires support in activities (using the API) to support).&lt;br /&gt;
&lt;br /&gt;
===Community Contacts===&lt;br /&gt;
[[User:FGrose]], [[User:Tony37]] (see [[Talk:{{PAGENAMEE}}|talk page]])&lt;br /&gt;
&lt;br /&gt;
===RIT Project Usage===&lt;br /&gt;
{{Definition_table&lt;br /&gt;
|Produce Puzzle| No API need or usage.&lt;br /&gt;
|Lemonade Stand| No API need or usage.&lt;br /&gt;
|Assimilate| API Usage needs documented on [[Talk:{{PAGENAMEE}}|talk page]].  Progress not far enough to start implementation using the API.&lt;br /&gt;
|Fun Towers| No API need or usage.&lt;br /&gt;
|Reporting Team| Simple export format documented at [[{{PAGENAMEE}}/API_Design|API Design]].  Futher integration work would be nice, but there is more work than could be done in a year along these lines (and neither team is prepared to embark on it).&lt;br /&gt;
|Muthris| No contact from? Probably no API need or usage.&lt;br /&gt;
}}&lt;br /&gt;
===See Also===&lt;br /&gt;
{{Special:PrefixIndex/{{PAGENAMEE}}/}}&lt;/div&gt;</summary>
		<author><name>Bbl5660</name></author>
	</entry>
	<entry>
		<id>https://wiki.sugarlabs.org/index.php?title=Math4Team/RIT/Projects/Question_Support_API&amp;diff=29416</id>
		<title>Math4Team/RIT/Projects/Question Support API</title>
		<link rel="alternate" type="text/html" href="https://wiki.sugarlabs.org/index.php?title=Math4Team/RIT/Projects/Question_Support_API&amp;diff=29416"/>
		<updated>2009-05-18T19:06:39Z</updated>

		<summary type="html">&lt;p&gt;Bbl5660: /* A Teacher&amp;#039;s Guide Abstract */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;{{TOCright}}&lt;br /&gt;
==Question Support API==&lt;br /&gt;
===Project Information===&lt;br /&gt;
{{Definition_table&lt;br /&gt;
|Primary Project Contact| [[User:Enimihil|Greg Stevens]]&lt;br /&gt;
|Project Members| [[User:Enimihil|Greg Stevens]], [[User:Jfinney|Jameson Finney]], [[User:Bbl5660|Brian Long]]&lt;br /&gt;
|Source Repository| http://git.sugarlabs.org/projects/question-support-api&lt;br /&gt;
}}&lt;br /&gt;
&lt;br /&gt;
===Current Goals===&lt;br /&gt;
&lt;br /&gt;
* Documentation&lt;br /&gt;
** Packaging&lt;br /&gt;
** Documenting Dependencies and how to enable them in a development environment (Simple tutorial on setting up your Question API Development Environment)&lt;br /&gt;
** Question Authoring guidelines&lt;br /&gt;
** Integrate within lesson planning&lt;br /&gt;
** How does an instructor get the questions they have written/found into an Activity?&lt;br /&gt;
* Liase w/ other Math4 teams and Sugarlabs (What would it take to be included in the Sugar core?)&lt;br /&gt;
* Future Development (Needs / Wants — collect proposals from other teams)&lt;br /&gt;
* Discovery / Plugin  (How do activities find questions, i.e. how to get URIs to load questions from?)&lt;br /&gt;
&lt;br /&gt;
===Setting Up a Development Environment (For Newbies)===&lt;br /&gt;
These are links, tutorials and things that [[User:Bbl5660|Brian Long]] has found along the way, as well as help gained from [[User:Enimihil|Greg Stevens]].  Brian is new to the Linux / OpenSource community, and is working on documenting a development environment for &amp;lt;b&amp;gt;you&amp;lt;/b&amp;gt; and for us to continue developing this API.  The small amount of information below is meant to help someone new step into the world of developing for the Sugar environment, from Ubuntu and have all  dependencies and things setup to continue development of this API.  &amp;lt;b&amp;gt;Next&amp;lt;/b&amp;gt; Brian would like to document how to setup these sort of items for [http://wiki.laptop.org/go/Creating_an_activity Activity developers] to include our API and be able to extend it.&lt;br /&gt;
&lt;br /&gt;
* For development environments, you may consider consider first installing a linux OS and the the LAMP stack with PhpMyAdmin.  Brian is choosing Ubuntu, Aptana as a (free) Python IDE that can be used with PyDev to easily allow Python writing.  &lt;br /&gt;
* Links that Brian is relying on at the moment include:&lt;br /&gt;
** http://help.ubuntu.com/community/ApacheMySQLPHP&lt;br /&gt;
** http://www.sqlalchemy.org/docs/04/ormtutorial.html&lt;br /&gt;
** http://docs.python.org/&lt;br /&gt;
** http://andrewbleakley.com/blog/2008/11/01/installing-and-running-aptana-on-ubuntu-810/&lt;br /&gt;
** http://forums.aptana.com/viewtopic.php?f=37&amp;amp;t=7147&amp;amp;p=32918&amp;amp;hilit=ubuntu#p32918&lt;br /&gt;
&lt;br /&gt;
====Dependencies that will be required / Installing them from the terminal====&lt;br /&gt;
&amp;lt;!-- Development for Linux / Python / Sugar Newbies! --&amp;gt;&lt;br /&gt;
* sudo apt-get install python-setuptools&lt;br /&gt;
* sudo easy_install pyparsing&lt;br /&gt;
* sudo easy_install peak-rules&lt;br /&gt;
* sudo easy_install sqlalchemy&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
===Motivation===&lt;br /&gt;
In the RIT class working on the Math4 projects, many proposed activities&lt;br /&gt;
require a question database of some kind.  A common API or library for&lt;br /&gt;
accessing databases in different formats, stored either locally or remotely,&lt;br /&gt;
along with a simple mechanism to determine more complex formatting or&lt;br /&gt;
presentation than simple text (e.g. to include simple graphics or&lt;br /&gt;
mathematical notation) would cover a majority of the cases where the&lt;br /&gt;
activity needs some configurable &amp;quot;curriculum data&amp;quot;.&lt;br /&gt;
&lt;br /&gt;
Eventually this library could be extended to provide hints, explanations, or&lt;br /&gt;
walkthroughs for questions, in addition to the basic metadata about level,&lt;br /&gt;
grouping, difficulty, and subject matter that would be part of the base&lt;br /&gt;
system.&lt;br /&gt;
&lt;br /&gt;
===Envisioned Usage===&lt;br /&gt;
Consider a simple flash-card-like activity.  It presents a question from a&lt;br /&gt;
list of questions, allows the student to select an answer from the provided&lt;br /&gt;
answers for the question or to enter their own answer.  Then the correct&lt;br /&gt;
answer is revealed and the student it told whether their answer is correct.&lt;br /&gt;
If the question has an explanation of the correct answer, the flash-card&lt;br /&gt;
activity will show the explanation of the correct answer.  (Note that this&lt;br /&gt;
is just a simple usage example, the interaction design of a drilling&lt;br /&gt;
activity could be very different.)&lt;br /&gt;
&lt;br /&gt;
The flash-card activity would use this proposed Quiz API for the following:&lt;br /&gt;
&lt;br /&gt;
* Loading the questions from the storage location into memory. This includes any filtering or network lookup to download the questions from a remote resource and select appropriate questions for the student.&lt;br /&gt;
&lt;br /&gt;
* Determining whether the student has entered a correct answer.&lt;br /&gt;
&lt;br /&gt;
To start with, the library would simply be a time-saving tool for developers&lt;br /&gt;
needing similar functionality, but as the XS (School Server) becomes more&lt;br /&gt;
fully developed the library should integrate the functions provided by the&lt;br /&gt;
XS to enable automated update of course material for the current topic of&lt;br /&gt;
study so the students can drill material using any tool they prefer, while&lt;br /&gt;
still reporting progress to the instructor using the XS services.&lt;br /&gt;
&lt;br /&gt;
===Current Status===&lt;br /&gt;
&lt;br /&gt;
Currently, (14 May 2009) the API supports parsing the GIFT file format well enough to import Multiple Choice and True/False questions, along with complete implementations for basic functionality of the corresponding question objects.  No support for partial credit answers is currently implemented, nor are other question types working correctly (though most can be parsed to some extent).  Export to CSV works as intended, though it is intentionally simple.  Documentation on usage and integration of the API into an activity is in the doc/ directory of [[http://git.sugarlabs.org/projects/question-support-api the repository]]. A simple, but complete usage example, using a console interface is available in tests/complete_test.py.&lt;br /&gt;
&lt;br /&gt;
===Current implementation===&lt;br /&gt;
1. Ensure that PyParser and PEAK-Rules are installed &amp;lt;br&amp;gt;&lt;br /&gt;
2. Include the quizdata module&lt;br /&gt;
    import quizdata&lt;br /&gt;
3. Select plain text output&lt;br /&gt;
    from quizdata.text import plain_text&lt;br /&gt;
4. Select desired question types&lt;br /&gt;
    from quizdata.question import MultipleChoiceQuestion, MissingWordQuestion&lt;br /&gt;
5. Import when function to assist with question sorting&lt;br /&gt;
    from peak.rules import when&lt;br /&gt;
6. Handle questions (this section should be rewritten as needed for your activity&lt;br /&gt;
    # this is the base case for any question type we don&#039;t handle otherwise.&lt;br /&gt;
    def do_question(q):&lt;br /&gt;
        print &amp;quot;Unhandled question type.&amp;quot;, type(q)&lt;br /&gt;
    # for multiple choice questions (incl. subclasses) we do this...&lt;br /&gt;
    @when(do_question, (MultipleChoiceQuestion,))&lt;br /&gt;
    def do_multi_questions(q):&lt;br /&gt;
        print plain_text(q.text)&lt;br /&gt;
        for a in zip(&#039;0123456789&#039;, q.answers):&lt;br /&gt;
            print &amp;quot;%5s: %s&amp;quot; % a&lt;br /&gt;
        answer = int(raw_input())&lt;br /&gt;
        q.answer = q.answers[answer]&lt;br /&gt;
        print q.correct&lt;br /&gt;
    # for missing word-style questions, which aren&#039;t implemented correctly yet, and&lt;br /&gt;
    # are a subclass of multiple choice questions... we make sure to ignore them&lt;br /&gt;
    # with a more specific rule.&lt;br /&gt;
    @when(do_question, (MissingWordQuestion,))&lt;br /&gt;
    def do_mw_question(q): # XXX: inheritance is annoying here...&lt;br /&gt;
        print &amp;quot;Unhandled question type. (MissingWordQuestion)&amp;quot;&lt;br /&gt;
7. Open questions&lt;br /&gt;
    questions = quizdata.open(&amp;quot;file://%s?format=gift&amp;quot; % path.join(base_path, &#039;tests&#039;, &#039;multi_choice.txt&#039;))&lt;br /&gt;
    for q in questions:&lt;br /&gt;
        do_question(q)&lt;br /&gt;
&lt;br /&gt;
===Education Standards===&lt;br /&gt;
As a general API and not a standalone Activity, along with the nature of the API in specific, this project does not directly address any specific education standards or learning outcomes.  It is reliant on educators to write questions, or have questions available to them in usable formats.  As such, the potential educational standards this project could help to meet includes **any** standard where drilling or question/response evaluation is appropriate. (This includes a wider range of topic areas than the Math4 focus, even.)&lt;br /&gt;
&lt;br /&gt;
====A Teacher&#039;s Guide Abstract====&lt;br /&gt;
* Per the nature of this API, we&#039;ve decided that our “Teacher Guide” will be more of an abstract.  Below is a hypothetical situation of the Question Support API:Imagine a school manages a repository of quiz material that fit&#039;s some curriculum, and this repository is located at Moodle.org (for example the 4th Grade Math curriculum see: http://wiki.sugarlabs.org/go/User:Gdk/4th_Grade_Maths ).  The teacher&#039;s use of our API design might go something like this: &lt;br /&gt;
&lt;br /&gt;
* An activity that has extended / implemented our API is started by the teacher.  The teacher is presented with an input field that requires a URI (URL).  The teacher enters the URI of this week&#039;s quiz (i.e. http://moodle.org/SchoolName/ClassName/Week_11_Quiz/ )  The activity fetches the specified quiz data from the web, and presents the teacher with a summary and confirmation dialog box.  Upon confirmation, the teacher can send / assign the quiz to the class.  The class starts their corresponding activity which then also has a mechanism to either grab the assigned quiz from the Moodle.org server or from the local “School Server” (also-known-as the XS server; see; http://wiki.laptop.org/go/School_server ).  The student&#039;s complete their assigned quiz, and data is sent back to the server for reporting / grading.&lt;br /&gt;
&lt;br /&gt;
===Milestones===&lt;br /&gt;
;Initial Prototype Phase (1)&lt;br /&gt;
:Simple implementation, data model not yet nailed down, focus on import and utility to question *consumers*, Like Activities. Initial formats to include MoodleXML, GIFT.&lt;br /&gt;
        &lt;br /&gt;
;Rigorous Design Phase (2)&lt;br /&gt;
:Nail down the data model, including developing the &#039;native&#039; format, probably using a sqlite file mechanism, or other database support, if possible. Freeze the Question object (in terms of required properties,        etc.), finalize decisions about URLs for question aquisition.  Make sure requirements of other projects *can* be met by the design at this stage.&lt;br /&gt;
&lt;br /&gt;
;Full Implementation Phase (3)&lt;br /&gt;
:Complete the implementation of the import formats, including the &#039;native&#039; format.  Should be usable to other Activity developers at this point (hopefully useful, before now, but all needs should be filled at this point).  Export implementation should start now, along with prototyping for an authoring activity. (Collaboration with the reporting team *needs* to happen at this point, as the activity will probably be combined with reporting tools.)&lt;br /&gt;
&lt;br /&gt;
;Activity Development Phase (4)&lt;br /&gt;
:Complete the authoring/reporting activity for the teachers, allowing export to file formats (and possibly *serving* the questions to other XOs; requires support in activities (using the API) to support).&lt;br /&gt;
&lt;br /&gt;
===Community Contacts===&lt;br /&gt;
[[User:FGrose]], [[User:Tony37]] (see [[Talk:{{PAGENAMEE}}|talk page]])&lt;br /&gt;
&lt;br /&gt;
===RIT Project Usage===&lt;br /&gt;
{{Definition_table&lt;br /&gt;
|Produce Puzzle| No API need or usage.&lt;br /&gt;
|Lemonade Stand| No API need or usage.&lt;br /&gt;
|Assimilate| API Usage needs documented on [[Talk:{{PAGENAMEE}}|talk page]].  Progress not far enough to start implementation using the API.&lt;br /&gt;
|Fun Towers| No API need or usage.&lt;br /&gt;
|Reporting Team| Simple export format documented at [[{{PAGENAMEE}}/API_Design|API Design]].  Futher integration work would be nice, but there is more work than could be done in a year along these lines (and neither team is prepared to embark on it).&lt;br /&gt;
|Muthris| No contact from? Probably no API need or usage.&lt;br /&gt;
}}&lt;br /&gt;
===See Also===&lt;br /&gt;
{{Special:PrefixIndex/{{PAGENAMEE}}/}}&lt;/div&gt;</summary>
		<author><name>Bbl5660</name></author>
	</entry>
	<entry>
		<id>https://wiki.sugarlabs.org/index.php?title=Math4Team/RIT/Projects/Question_Support_API&amp;diff=29415</id>
		<title>Math4Team/RIT/Projects/Question Support API</title>
		<link rel="alternate" type="text/html" href="https://wiki.sugarlabs.org/index.php?title=Math4Team/RIT/Projects/Question_Support_API&amp;diff=29415"/>
		<updated>2009-05-18T19:05:12Z</updated>

		<summary type="html">&lt;p&gt;Bbl5660: /* A Teacher&amp;#039;s Guide Abstract */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;{{TOCright}}&lt;br /&gt;
==Question Support API==&lt;br /&gt;
===Project Information===&lt;br /&gt;
{{Definition_table&lt;br /&gt;
|Primary Project Contact| [[User:Enimihil|Greg Stevens]]&lt;br /&gt;
|Project Members| [[User:Enimihil|Greg Stevens]], [[User:Jfinney|Jameson Finney]], [[User:Bbl5660|Brian Long]]&lt;br /&gt;
|Source Repository| http://git.sugarlabs.org/projects/question-support-api&lt;br /&gt;
}}&lt;br /&gt;
&lt;br /&gt;
===Current Goals===&lt;br /&gt;
&lt;br /&gt;
* Documentation&lt;br /&gt;
** Packaging&lt;br /&gt;
** Documenting Dependencies and how to enable them in a development environment (Simple tutorial on setting up your Question API Development Environment)&lt;br /&gt;
** Question Authoring guidelines&lt;br /&gt;
** Integrate within lesson planning&lt;br /&gt;
** How does an instructor get the questions they have written/found into an Activity?&lt;br /&gt;
* Liase w/ other Math4 teams and Sugarlabs (What would it take to be included in the Sugar core?)&lt;br /&gt;
* Future Development (Needs / Wants — collect proposals from other teams)&lt;br /&gt;
* Discovery / Plugin  (How do activities find questions, i.e. how to get URIs to load questions from?)&lt;br /&gt;
&lt;br /&gt;
===Setting Up a Development Environment (For Newbies)===&lt;br /&gt;
These are links, tutorials and things that [[User:Bbl5660|Brian Long]] has found along the way, as well as help gained from [[User:Enimihil|Greg Stevens]].  Brian is new to the Linux / OpenSource community, and is working on documenting a development environment for &amp;lt;b&amp;gt;you&amp;lt;/b&amp;gt; and for us to continue developing this API.  The small amount of information below is meant to help someone new step into the world of developing for the Sugar environment, from Ubuntu and have all  dependencies and things setup to continue development of this API.  &amp;lt;b&amp;gt;Next&amp;lt;/b&amp;gt; Brian would like to document how to setup these sort of items for [http://wiki.laptop.org/go/Creating_an_activity Activity developers] to include our API and be able to extend it.&lt;br /&gt;
&lt;br /&gt;
* For development environments, you may consider consider first installing a linux OS and the the LAMP stack with PhpMyAdmin.  Brian is choosing Ubuntu, Aptana as a (free) Python IDE that can be used with PyDev to easily allow Python writing.  &lt;br /&gt;
* Links that Brian is relying on at the moment include:&lt;br /&gt;
** http://help.ubuntu.com/community/ApacheMySQLPHP&lt;br /&gt;
** http://www.sqlalchemy.org/docs/04/ormtutorial.html&lt;br /&gt;
** http://docs.python.org/&lt;br /&gt;
** http://andrewbleakley.com/blog/2008/11/01/installing-and-running-aptana-on-ubuntu-810/&lt;br /&gt;
** http://forums.aptana.com/viewtopic.php?f=37&amp;amp;t=7147&amp;amp;p=32918&amp;amp;hilit=ubuntu#p32918&lt;br /&gt;
&lt;br /&gt;
====Dependencies that will be required / Installing them from the terminal====&lt;br /&gt;
&amp;lt;!-- Development for Linux / Python / Sugar Newbies! --&amp;gt;&lt;br /&gt;
* sudo apt-get install python-setuptools&lt;br /&gt;
* sudo easy_install pyparsing&lt;br /&gt;
* sudo easy_install peak-rules&lt;br /&gt;
* sudo easy_install sqlalchemy&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
===Motivation===&lt;br /&gt;
In the RIT class working on the Math4 projects, many proposed activities&lt;br /&gt;
require a question database of some kind.  A common API or library for&lt;br /&gt;
accessing databases in different formats, stored either locally or remotely,&lt;br /&gt;
along with a simple mechanism to determine more complex formatting or&lt;br /&gt;
presentation than simple text (e.g. to include simple graphics or&lt;br /&gt;
mathematical notation) would cover a majority of the cases where the&lt;br /&gt;
activity needs some configurable &amp;quot;curriculum data&amp;quot;.&lt;br /&gt;
&lt;br /&gt;
Eventually this library could be extended to provide hints, explanations, or&lt;br /&gt;
walkthroughs for questions, in addition to the basic metadata about level,&lt;br /&gt;
grouping, difficulty, and subject matter that would be part of the base&lt;br /&gt;
system.&lt;br /&gt;
&lt;br /&gt;
===Envisioned Usage===&lt;br /&gt;
Consider a simple flash-card-like activity.  It presents a question from a&lt;br /&gt;
list of questions, allows the student to select an answer from the provided&lt;br /&gt;
answers for the question or to enter their own answer.  Then the correct&lt;br /&gt;
answer is revealed and the student it told whether their answer is correct.&lt;br /&gt;
If the question has an explanation of the correct answer, the flash-card&lt;br /&gt;
activity will show the explanation of the correct answer.  (Note that this&lt;br /&gt;
is just a simple usage example, the interaction design of a drilling&lt;br /&gt;
activity could be very different.)&lt;br /&gt;
&lt;br /&gt;
The flash-card activity would use this proposed Quiz API for the following:&lt;br /&gt;
&lt;br /&gt;
* Loading the questions from the storage location into memory. This includes any filtering or network lookup to download the questions from a remote resource and select appropriate questions for the student.&lt;br /&gt;
&lt;br /&gt;
* Determining whether the student has entered a correct answer.&lt;br /&gt;
&lt;br /&gt;
To start with, the library would simply be a time-saving tool for developers&lt;br /&gt;
needing similar functionality, but as the XS (School Server) becomes more&lt;br /&gt;
fully developed the library should integrate the functions provided by the&lt;br /&gt;
XS to enable automated update of course material for the current topic of&lt;br /&gt;
study so the students can drill material using any tool they prefer, while&lt;br /&gt;
still reporting progress to the instructor using the XS services.&lt;br /&gt;
&lt;br /&gt;
===Current Status===&lt;br /&gt;
&lt;br /&gt;
Currently, (14 May 2009) the API supports parsing the GIFT file format well enough to import Multiple Choice and True/False questions, along with complete implementations for basic functionality of the corresponding question objects.  No support for partial credit answers is currently implemented, nor are other question types working correctly (though most can be parsed to some extent).  Export to CSV works as intended, though it is intentionally simple.  Documentation on usage and integration of the API into an activity is in the doc/ directory of [[http://git.sugarlabs.org/projects/question-support-api the repository]]. A simple, but complete usage example, using a console interface is available in tests/complete_test.py.&lt;br /&gt;
&lt;br /&gt;
===Current implementation===&lt;br /&gt;
1. Ensure that PyParser and PEAK-Rules are installed &amp;lt;br&amp;gt;&lt;br /&gt;
2. Include the quizdata module&lt;br /&gt;
    import quizdata&lt;br /&gt;
3. Select plain text output&lt;br /&gt;
    from quizdata.text import plain_text&lt;br /&gt;
4. Select desired question types&lt;br /&gt;
    from quizdata.question import MultipleChoiceQuestion, MissingWordQuestion&lt;br /&gt;
5. Import when function to assist with question sorting&lt;br /&gt;
    from peak.rules import when&lt;br /&gt;
6. Handle questions (this section should be rewritten as needed for your activity&lt;br /&gt;
    # this is the base case for any question type we don&#039;t handle otherwise.&lt;br /&gt;
    def do_question(q):&lt;br /&gt;
        print &amp;quot;Unhandled question type.&amp;quot;, type(q)&lt;br /&gt;
    # for multiple choice questions (incl. subclasses) we do this...&lt;br /&gt;
    @when(do_question, (MultipleChoiceQuestion,))&lt;br /&gt;
    def do_multi_questions(q):&lt;br /&gt;
        print plain_text(q.text)&lt;br /&gt;
        for a in zip(&#039;0123456789&#039;, q.answers):&lt;br /&gt;
            print &amp;quot;%5s: %s&amp;quot; % a&lt;br /&gt;
        answer = int(raw_input())&lt;br /&gt;
        q.answer = q.answers[answer]&lt;br /&gt;
        print q.correct&lt;br /&gt;
    # for missing word-style questions, which aren&#039;t implemented correctly yet, and&lt;br /&gt;
    # are a subclass of multiple choice questions... we make sure to ignore them&lt;br /&gt;
    # with a more specific rule.&lt;br /&gt;
    @when(do_question, (MissingWordQuestion,))&lt;br /&gt;
    def do_mw_question(q): # XXX: inheritance is annoying here...&lt;br /&gt;
        print &amp;quot;Unhandled question type. (MissingWordQuestion)&amp;quot;&lt;br /&gt;
7. Open questions&lt;br /&gt;
    questions = quizdata.open(&amp;quot;file://%s?format=gift&amp;quot; % path.join(base_path, &#039;tests&#039;, &#039;multi_choice.txt&#039;))&lt;br /&gt;
    for q in questions:&lt;br /&gt;
        do_question(q)&lt;br /&gt;
&lt;br /&gt;
===Education Standards===&lt;br /&gt;
As a general API and not a standalone Activity, along with the nature of the API in specific, this project does not directly address any specific education standards or learning outcomes.  It is reliant on educators to write questions, or have questions available to them in usable formats.  As such, the potential educational standards this project could help to meet includes **any** standard where drilling or question/response evaluation is appropriate. (This includes a wider range of topic areas than the Math4 focus, even.)&lt;br /&gt;
&lt;br /&gt;
====A Teacher&#039;s Guide Abstract====&lt;br /&gt;
Per the nature of this API, we&#039;ve decided that our “Teacher Guide” will be more of an abstract.  Below is a hypothetical situation of the Question Support API:&lt;br /&gt;
&lt;br /&gt;
;Imagine a school manages a repository of quiz material that fit&#039;s it&#039;s curriculum at Moodle.org (for example the 4th Grade Math curriculum; see: http://wiki.sugarlabs.org/go/User:Gdk/4th_Grade_Maths ).  The teacher&#039;s use of our API design might go something like this: &lt;br /&gt;
&lt;br /&gt;
An activity that has extended / implemented our API is started by the teacher.  The teacher is presented with an input field that requires a URI (URL).  The teacher enters the URI of this week&#039;s quiz (i.e. http://moodle.org/SchoolName/ClassName/Week_11_Quiz/ )  The activity fetches the specified quiz data from the web, and presents the teacher with a summary and confirmation dialog box.  Upon confirmation, the teacher can send / assign the quiz to the class.  The class starts their corresponding activity which then also has a mechanism to either grab the assigned quiz from the Moodle.org server or from the local “School Server” (also-known-as the XS server; see; http://wiki.laptop.org/go/School_server ).  The student&#039;s complete their assigned quiz, and data is sent back to the server for reporting / grading.&lt;br /&gt;
&lt;br /&gt;
===Milestones===&lt;br /&gt;
;Initial Prototype Phase (1)&lt;br /&gt;
:Simple implementation, data model not yet nailed down, focus on import and utility to question *consumers*, Like Activities. Initial formats to include MoodleXML, GIFT.&lt;br /&gt;
        &lt;br /&gt;
;Rigorous Design Phase (2)&lt;br /&gt;
:Nail down the data model, including developing the &#039;native&#039; format, probably using a sqlite file mechanism, or other database support, if possible. Freeze the Question object (in terms of required properties,        etc.), finalize decisions about URLs for question aquisition.  Make sure requirements of other projects *can* be met by the design at this stage.&lt;br /&gt;
&lt;br /&gt;
;Full Implementation Phase (3)&lt;br /&gt;
:Complete the implementation of the import formats, including the &#039;native&#039; format.  Should be usable to other Activity developers at this point (hopefully useful, before now, but all needs should be filled at this point).  Export implementation should start now, along with prototyping for an authoring activity. (Collaboration with the reporting team *needs* to happen at this point, as the activity will probably be combined with reporting tools.)&lt;br /&gt;
&lt;br /&gt;
;Activity Development Phase (4)&lt;br /&gt;
:Complete the authoring/reporting activity for the teachers, allowing export to file formats (and possibly *serving* the questions to other XOs; requires support in activities (using the API) to support).&lt;br /&gt;
&lt;br /&gt;
===Community Contacts===&lt;br /&gt;
[[User:FGrose]], [[User:Tony37]] (see [[Talk:{{PAGENAMEE}}|talk page]])&lt;br /&gt;
&lt;br /&gt;
===RIT Project Usage===&lt;br /&gt;
{{Definition_table&lt;br /&gt;
|Produce Puzzle| No API need or usage.&lt;br /&gt;
|Lemonade Stand| No API need or usage.&lt;br /&gt;
|Assimilate| API Usage needs documented on [[Talk:{{PAGENAMEE}}|talk page]].  Progress not far enough to start implementation using the API.&lt;br /&gt;
|Fun Towers| No API need or usage.&lt;br /&gt;
|Reporting Team| Simple export format documented at [[{{PAGENAMEE}}/API_Design|API Design]].  Futher integration work would be nice, but there is more work than could be done in a year along these lines (and neither team is prepared to embark on it).&lt;br /&gt;
|Muthris| No contact from? Probably no API need or usage.&lt;br /&gt;
}}&lt;br /&gt;
===See Also===&lt;br /&gt;
{{Special:PrefixIndex/{{PAGENAMEE}}/}}&lt;/div&gt;</summary>
		<author><name>Bbl5660</name></author>
	</entry>
	<entry>
		<id>https://wiki.sugarlabs.org/index.php?title=Math4Team/RIT/Projects/Question_Support_API&amp;diff=29414</id>
		<title>Math4Team/RIT/Projects/Question Support API</title>
		<link rel="alternate" type="text/html" href="https://wiki.sugarlabs.org/index.php?title=Math4Team/RIT/Projects/Question_Support_API&amp;diff=29414"/>
		<updated>2009-05-18T19:04:32Z</updated>

		<summary type="html">&lt;p&gt;Bbl5660: /* A Teacher&amp;#039;s Guide Abstract */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;{{TOCright}}&lt;br /&gt;
==Question Support API==&lt;br /&gt;
===Project Information===&lt;br /&gt;
{{Definition_table&lt;br /&gt;
|Primary Project Contact| [[User:Enimihil|Greg Stevens]]&lt;br /&gt;
|Project Members| [[User:Enimihil|Greg Stevens]], [[User:Jfinney|Jameson Finney]], [[User:Bbl5660|Brian Long]]&lt;br /&gt;
|Source Repository| http://git.sugarlabs.org/projects/question-support-api&lt;br /&gt;
}}&lt;br /&gt;
&lt;br /&gt;
===Current Goals===&lt;br /&gt;
&lt;br /&gt;
* Documentation&lt;br /&gt;
** Packaging&lt;br /&gt;
** Documenting Dependencies and how to enable them in a development environment (Simple tutorial on setting up your Question API Development Environment)&lt;br /&gt;
** Question Authoring guidelines&lt;br /&gt;
** Integrate within lesson planning&lt;br /&gt;
** How does an instructor get the questions they have written/found into an Activity?&lt;br /&gt;
* Liase w/ other Math4 teams and Sugarlabs (What would it take to be included in the Sugar core?)&lt;br /&gt;
* Future Development (Needs / Wants — collect proposals from other teams)&lt;br /&gt;
* Discovery / Plugin  (How do activities find questions, i.e. how to get URIs to load questions from?)&lt;br /&gt;
&lt;br /&gt;
===Setting Up a Development Environment (For Newbies)===&lt;br /&gt;
These are links, tutorials and things that [[User:Bbl5660|Brian Long]] has found along the way, as well as help gained from [[User:Enimihil|Greg Stevens]].  Brian is new to the Linux / OpenSource community, and is working on documenting a development environment for &amp;lt;b&amp;gt;you&amp;lt;/b&amp;gt; and for us to continue developing this API.  The small amount of information below is meant to help someone new step into the world of developing for the Sugar environment, from Ubuntu and have all  dependencies and things setup to continue development of this API.  &amp;lt;b&amp;gt;Next&amp;lt;/b&amp;gt; Brian would like to document how to setup these sort of items for [http://wiki.laptop.org/go/Creating_an_activity Activity developers] to include our API and be able to extend it.&lt;br /&gt;
&lt;br /&gt;
* For development environments, you may consider consider first installing a linux OS and the the LAMP stack with PhpMyAdmin.  Brian is choosing Ubuntu, Aptana as a (free) Python IDE that can be used with PyDev to easily allow Python writing.  &lt;br /&gt;
* Links that Brian is relying on at the moment include:&lt;br /&gt;
** http://help.ubuntu.com/community/ApacheMySQLPHP&lt;br /&gt;
** http://www.sqlalchemy.org/docs/04/ormtutorial.html&lt;br /&gt;
** http://docs.python.org/&lt;br /&gt;
** http://andrewbleakley.com/blog/2008/11/01/installing-and-running-aptana-on-ubuntu-810/&lt;br /&gt;
** http://forums.aptana.com/viewtopic.php?f=37&amp;amp;t=7147&amp;amp;p=32918&amp;amp;hilit=ubuntu#p32918&lt;br /&gt;
&lt;br /&gt;
====Dependencies that will be required / Installing them from the terminal====&lt;br /&gt;
&amp;lt;!-- Development for Linux / Python / Sugar Newbies! --&amp;gt;&lt;br /&gt;
* sudo apt-get install python-setuptools&lt;br /&gt;
* sudo easy_install pyparsing&lt;br /&gt;
* sudo easy_install peak-rules&lt;br /&gt;
* sudo easy_install sqlalchemy&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
===Motivation===&lt;br /&gt;
In the RIT class working on the Math4 projects, many proposed activities&lt;br /&gt;
require a question database of some kind.  A common API or library for&lt;br /&gt;
accessing databases in different formats, stored either locally or remotely,&lt;br /&gt;
along with a simple mechanism to determine more complex formatting or&lt;br /&gt;
presentation than simple text (e.g. to include simple graphics or&lt;br /&gt;
mathematical notation) would cover a majority of the cases where the&lt;br /&gt;
activity needs some configurable &amp;quot;curriculum data&amp;quot;.&lt;br /&gt;
&lt;br /&gt;
Eventually this library could be extended to provide hints, explanations, or&lt;br /&gt;
walkthroughs for questions, in addition to the basic metadata about level,&lt;br /&gt;
grouping, difficulty, and subject matter that would be part of the base&lt;br /&gt;
system.&lt;br /&gt;
&lt;br /&gt;
===Envisioned Usage===&lt;br /&gt;
Consider a simple flash-card-like activity.  It presents a question from a&lt;br /&gt;
list of questions, allows the student to select an answer from the provided&lt;br /&gt;
answers for the question or to enter their own answer.  Then the correct&lt;br /&gt;
answer is revealed and the student it told whether their answer is correct.&lt;br /&gt;
If the question has an explanation of the correct answer, the flash-card&lt;br /&gt;
activity will show the explanation of the correct answer.  (Note that this&lt;br /&gt;
is just a simple usage example, the interaction design of a drilling&lt;br /&gt;
activity could be very different.)&lt;br /&gt;
&lt;br /&gt;
The flash-card activity would use this proposed Quiz API for the following:&lt;br /&gt;
&lt;br /&gt;
* Loading the questions from the storage location into memory. This includes any filtering or network lookup to download the questions from a remote resource and select appropriate questions for the student.&lt;br /&gt;
&lt;br /&gt;
* Determining whether the student has entered a correct answer.&lt;br /&gt;
&lt;br /&gt;
To start with, the library would simply be a time-saving tool for developers&lt;br /&gt;
needing similar functionality, but as the XS (School Server) becomes more&lt;br /&gt;
fully developed the library should integrate the functions provided by the&lt;br /&gt;
XS to enable automated update of course material for the current topic of&lt;br /&gt;
study so the students can drill material using any tool they prefer, while&lt;br /&gt;
still reporting progress to the instructor using the XS services.&lt;br /&gt;
&lt;br /&gt;
===Current Status===&lt;br /&gt;
&lt;br /&gt;
Currently, (14 May 2009) the API supports parsing the GIFT file format well enough to import Multiple Choice and True/False questions, along with complete implementations for basic functionality of the corresponding question objects.  No support for partial credit answers is currently implemented, nor are other question types working correctly (though most can be parsed to some extent).  Export to CSV works as intended, though it is intentionally simple.  Documentation on usage and integration of the API into an activity is in the doc/ directory of [[http://git.sugarlabs.org/projects/question-support-api the repository]]. A simple, but complete usage example, using a console interface is available in tests/complete_test.py.&lt;br /&gt;
&lt;br /&gt;
===Current implementation===&lt;br /&gt;
1. Ensure that PyParser and PEAK-Rules are installed &amp;lt;br&amp;gt;&lt;br /&gt;
2. Include the quizdata module&lt;br /&gt;
    import quizdata&lt;br /&gt;
3. Select plain text output&lt;br /&gt;
    from quizdata.text import plain_text&lt;br /&gt;
4. Select desired question types&lt;br /&gt;
    from quizdata.question import MultipleChoiceQuestion, MissingWordQuestion&lt;br /&gt;
5. Import when function to assist with question sorting&lt;br /&gt;
    from peak.rules import when&lt;br /&gt;
6. Handle questions (this section should be rewritten as needed for your activity&lt;br /&gt;
    # this is the base case for any question type we don&#039;t handle otherwise.&lt;br /&gt;
    def do_question(q):&lt;br /&gt;
        print &amp;quot;Unhandled question type.&amp;quot;, type(q)&lt;br /&gt;
    # for multiple choice questions (incl. subclasses) we do this...&lt;br /&gt;
    @when(do_question, (MultipleChoiceQuestion,))&lt;br /&gt;
    def do_multi_questions(q):&lt;br /&gt;
        print plain_text(q.text)&lt;br /&gt;
        for a in zip(&#039;0123456789&#039;, q.answers):&lt;br /&gt;
            print &amp;quot;%5s: %s&amp;quot; % a&lt;br /&gt;
        answer = int(raw_input())&lt;br /&gt;
        q.answer = q.answers[answer]&lt;br /&gt;
        print q.correct&lt;br /&gt;
    # for missing word-style questions, which aren&#039;t implemented correctly yet, and&lt;br /&gt;
    # are a subclass of multiple choice questions... we make sure to ignore them&lt;br /&gt;
    # with a more specific rule.&lt;br /&gt;
    @when(do_question, (MissingWordQuestion,))&lt;br /&gt;
    def do_mw_question(q): # XXX: inheritance is annoying here...&lt;br /&gt;
        print &amp;quot;Unhandled question type. (MissingWordQuestion)&amp;quot;&lt;br /&gt;
7. Open questions&lt;br /&gt;
    questions = quizdata.open(&amp;quot;file://%s?format=gift&amp;quot; % path.join(base_path, &#039;tests&#039;, &#039;multi_choice.txt&#039;))&lt;br /&gt;
    for q in questions:&lt;br /&gt;
        do_question(q)&lt;br /&gt;
&lt;br /&gt;
===Education Standards===&lt;br /&gt;
As a general API and not a standalone Activity, along with the nature of the API in specific, this project does not directly address any specific education standards or learning outcomes.  It is reliant on educators to write questions, or have questions available to them in usable formats.  As such, the potential educational standards this project could help to meet includes **any** standard where drilling or question/response evaluation is appropriate. (This includes a wider range of topic areas than the Math4 focus, even.)&lt;br /&gt;
&lt;br /&gt;
====A Teacher&#039;s Guide Abstract====&lt;br /&gt;
Per the nature of this API, we&#039;ve decided that our “Teacher Guide” will be more of an abstract.  Below is a hypothetical situation of the Question Support API:&lt;br /&gt;
;;Imagine a school manages a repository of quiz material that fit&#039;s it&#039;s curriculum at Moodle.org (for example the 4th Grade Math curriculum; see: http://wiki.sugarlabs.org/go/User:Gdk/4th_Grade_Maths ).  The teacher&#039;s use of our API design might go something like this: An activity that has extended / implemented our API is started by the teacher.  The teacher is presented with an input field that requires a URI (URL).  The teacher enters the URI of this week&#039;s quiz (i.e. http://moodle.org/SchoolName/ClassName/Week_11_Quiz/ )  The activity fetches the specified quiz data from the web, and presents the teacher with a summary and confirmation dialog box.  Upon confirmation, the teacher can send / assign the quiz to the class.  The class starts their corresponding activity which then also has a mechanism to either grab the assigned quiz from the Moodle.org server or from the local “School Server” (also-known-as the XS server; see; http://wiki.laptop.org/go/School_server ).  The student&#039;s complete their assigned quiz, and data is sent back to the server for reporting / grading.&lt;br /&gt;
&lt;br /&gt;
===Milestones===&lt;br /&gt;
;Initial Prototype Phase (1)&lt;br /&gt;
:Simple implementation, data model not yet nailed down, focus on import and utility to question *consumers*, Like Activities. Initial formats to include MoodleXML, GIFT.&lt;br /&gt;
        &lt;br /&gt;
;Rigorous Design Phase (2)&lt;br /&gt;
:Nail down the data model, including developing the &#039;native&#039; format, probably using a sqlite file mechanism, or other database support, if possible. Freeze the Question object (in terms of required properties,        etc.), finalize decisions about URLs for question aquisition.  Make sure requirements of other projects *can* be met by the design at this stage.&lt;br /&gt;
&lt;br /&gt;
;Full Implementation Phase (3)&lt;br /&gt;
:Complete the implementation of the import formats, including the &#039;native&#039; format.  Should be usable to other Activity developers at this point (hopefully useful, before now, but all needs should be filled at this point).  Export implementation should start now, along with prototyping for an authoring activity. (Collaboration with the reporting team *needs* to happen at this point, as the activity will probably be combined with reporting tools.)&lt;br /&gt;
&lt;br /&gt;
;Activity Development Phase (4)&lt;br /&gt;
:Complete the authoring/reporting activity for the teachers, allowing export to file formats (and possibly *serving* the questions to other XOs; requires support in activities (using the API) to support).&lt;br /&gt;
&lt;br /&gt;
===Community Contacts===&lt;br /&gt;
[[User:FGrose]], [[User:Tony37]] (see [[Talk:{{PAGENAMEE}}|talk page]])&lt;br /&gt;
&lt;br /&gt;
===RIT Project Usage===&lt;br /&gt;
{{Definition_table&lt;br /&gt;
|Produce Puzzle| No API need or usage.&lt;br /&gt;
|Lemonade Stand| No API need or usage.&lt;br /&gt;
|Assimilate| API Usage needs documented on [[Talk:{{PAGENAMEE}}|talk page]].  Progress not far enough to start implementation using the API.&lt;br /&gt;
|Fun Towers| No API need or usage.&lt;br /&gt;
|Reporting Team| Simple export format documented at [[{{PAGENAMEE}}/API_Design|API Design]].  Futher integration work would be nice, but there is more work than could be done in a year along these lines (and neither team is prepared to embark on it).&lt;br /&gt;
|Muthris| No contact from? Probably no API need or usage.&lt;br /&gt;
}}&lt;br /&gt;
===See Also===&lt;br /&gt;
{{Special:PrefixIndex/{{PAGENAMEE}}/}}&lt;/div&gt;</summary>
		<author><name>Bbl5660</name></author>
	</entry>
	<entry>
		<id>https://wiki.sugarlabs.org/index.php?title=Math4Team/RIT/Projects/Question_Support_API&amp;diff=29413</id>
		<title>Math4Team/RIT/Projects/Question Support API</title>
		<link rel="alternate" type="text/html" href="https://wiki.sugarlabs.org/index.php?title=Math4Team/RIT/Projects/Question_Support_API&amp;diff=29413"/>
		<updated>2009-05-18T19:04:05Z</updated>

		<summary type="html">&lt;p&gt;Bbl5660: &lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;{{TOCright}}&lt;br /&gt;
==Question Support API==&lt;br /&gt;
===Project Information===&lt;br /&gt;
{{Definition_table&lt;br /&gt;
|Primary Project Contact| [[User:Enimihil|Greg Stevens]]&lt;br /&gt;
|Project Members| [[User:Enimihil|Greg Stevens]], [[User:Jfinney|Jameson Finney]], [[User:Bbl5660|Brian Long]]&lt;br /&gt;
|Source Repository| http://git.sugarlabs.org/projects/question-support-api&lt;br /&gt;
}}&lt;br /&gt;
&lt;br /&gt;
===Current Goals===&lt;br /&gt;
&lt;br /&gt;
* Documentation&lt;br /&gt;
** Packaging&lt;br /&gt;
** Documenting Dependencies and how to enable them in a development environment (Simple tutorial on setting up your Question API Development Environment)&lt;br /&gt;
** Question Authoring guidelines&lt;br /&gt;
** Integrate within lesson planning&lt;br /&gt;
** How does an instructor get the questions they have written/found into an Activity?&lt;br /&gt;
* Liase w/ other Math4 teams and Sugarlabs (What would it take to be included in the Sugar core?)&lt;br /&gt;
* Future Development (Needs / Wants — collect proposals from other teams)&lt;br /&gt;
* Discovery / Plugin  (How do activities find questions, i.e. how to get URIs to load questions from?)&lt;br /&gt;
&lt;br /&gt;
===Setting Up a Development Environment (For Newbies)===&lt;br /&gt;
These are links, tutorials and things that [[User:Bbl5660|Brian Long]] has found along the way, as well as help gained from [[User:Enimihil|Greg Stevens]].  Brian is new to the Linux / OpenSource community, and is working on documenting a development environment for &amp;lt;b&amp;gt;you&amp;lt;/b&amp;gt; and for us to continue developing this API.  The small amount of information below is meant to help someone new step into the world of developing for the Sugar environment, from Ubuntu and have all  dependencies and things setup to continue development of this API.  &amp;lt;b&amp;gt;Next&amp;lt;/b&amp;gt; Brian would like to document how to setup these sort of items for [http://wiki.laptop.org/go/Creating_an_activity Activity developers] to include our API and be able to extend it.&lt;br /&gt;
&lt;br /&gt;
* For development environments, you may consider consider first installing a linux OS and the the LAMP stack with PhpMyAdmin.  Brian is choosing Ubuntu, Aptana as a (free) Python IDE that can be used with PyDev to easily allow Python writing.  &lt;br /&gt;
* Links that Brian is relying on at the moment include:&lt;br /&gt;
** http://help.ubuntu.com/community/ApacheMySQLPHP&lt;br /&gt;
** http://www.sqlalchemy.org/docs/04/ormtutorial.html&lt;br /&gt;
** http://docs.python.org/&lt;br /&gt;
** http://andrewbleakley.com/blog/2008/11/01/installing-and-running-aptana-on-ubuntu-810/&lt;br /&gt;
** http://forums.aptana.com/viewtopic.php?f=37&amp;amp;t=7147&amp;amp;p=32918&amp;amp;hilit=ubuntu#p32918&lt;br /&gt;
&lt;br /&gt;
====Dependencies that will be required / Installing them from the terminal====&lt;br /&gt;
&amp;lt;!-- Development for Linux / Python / Sugar Newbies! --&amp;gt;&lt;br /&gt;
* sudo apt-get install python-setuptools&lt;br /&gt;
* sudo easy_install pyparsing&lt;br /&gt;
* sudo easy_install peak-rules&lt;br /&gt;
* sudo easy_install sqlalchemy&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
===Motivation===&lt;br /&gt;
In the RIT class working on the Math4 projects, many proposed activities&lt;br /&gt;
require a question database of some kind.  A common API or library for&lt;br /&gt;
accessing databases in different formats, stored either locally or remotely,&lt;br /&gt;
along with a simple mechanism to determine more complex formatting or&lt;br /&gt;
presentation than simple text (e.g. to include simple graphics or&lt;br /&gt;
mathematical notation) would cover a majority of the cases where the&lt;br /&gt;
activity needs some configurable &amp;quot;curriculum data&amp;quot;.&lt;br /&gt;
&lt;br /&gt;
Eventually this library could be extended to provide hints, explanations, or&lt;br /&gt;
walkthroughs for questions, in addition to the basic metadata about level,&lt;br /&gt;
grouping, difficulty, and subject matter that would be part of the base&lt;br /&gt;
system.&lt;br /&gt;
&lt;br /&gt;
===Envisioned Usage===&lt;br /&gt;
Consider a simple flash-card-like activity.  It presents a question from a&lt;br /&gt;
list of questions, allows the student to select an answer from the provided&lt;br /&gt;
answers for the question or to enter their own answer.  Then the correct&lt;br /&gt;
answer is revealed and the student it told whether their answer is correct.&lt;br /&gt;
If the question has an explanation of the correct answer, the flash-card&lt;br /&gt;
activity will show the explanation of the correct answer.  (Note that this&lt;br /&gt;
is just a simple usage example, the interaction design of a drilling&lt;br /&gt;
activity could be very different.)&lt;br /&gt;
&lt;br /&gt;
The flash-card activity would use this proposed Quiz API for the following:&lt;br /&gt;
&lt;br /&gt;
* Loading the questions from the storage location into memory. This includes any filtering or network lookup to download the questions from a remote resource and select appropriate questions for the student.&lt;br /&gt;
&lt;br /&gt;
* Determining whether the student has entered a correct answer.&lt;br /&gt;
&lt;br /&gt;
To start with, the library would simply be a time-saving tool for developers&lt;br /&gt;
needing similar functionality, but as the XS (School Server) becomes more&lt;br /&gt;
fully developed the library should integrate the functions provided by the&lt;br /&gt;
XS to enable automated update of course material for the current topic of&lt;br /&gt;
study so the students can drill material using any tool they prefer, while&lt;br /&gt;
still reporting progress to the instructor using the XS services.&lt;br /&gt;
&lt;br /&gt;
===Current Status===&lt;br /&gt;
&lt;br /&gt;
Currently, (14 May 2009) the API supports parsing the GIFT file format well enough to import Multiple Choice and True/False questions, along with complete implementations for basic functionality of the corresponding question objects.  No support for partial credit answers is currently implemented, nor are other question types working correctly (though most can be parsed to some extent).  Export to CSV works as intended, though it is intentionally simple.  Documentation on usage and integration of the API into an activity is in the doc/ directory of [[http://git.sugarlabs.org/projects/question-support-api the repository]]. A simple, but complete usage example, using a console interface is available in tests/complete_test.py.&lt;br /&gt;
&lt;br /&gt;
===Current implementation===&lt;br /&gt;
1. Ensure that PyParser and PEAK-Rules are installed &amp;lt;br&amp;gt;&lt;br /&gt;
2. Include the quizdata module&lt;br /&gt;
    import quizdata&lt;br /&gt;
3. Select plain text output&lt;br /&gt;
    from quizdata.text import plain_text&lt;br /&gt;
4. Select desired question types&lt;br /&gt;
    from quizdata.question import MultipleChoiceQuestion, MissingWordQuestion&lt;br /&gt;
5. Import when function to assist with question sorting&lt;br /&gt;
    from peak.rules import when&lt;br /&gt;
6. Handle questions (this section should be rewritten as needed for your activity&lt;br /&gt;
    # this is the base case for any question type we don&#039;t handle otherwise.&lt;br /&gt;
    def do_question(q):&lt;br /&gt;
        print &amp;quot;Unhandled question type.&amp;quot;, type(q)&lt;br /&gt;
    # for multiple choice questions (incl. subclasses) we do this...&lt;br /&gt;
    @when(do_question, (MultipleChoiceQuestion,))&lt;br /&gt;
    def do_multi_questions(q):&lt;br /&gt;
        print plain_text(q.text)&lt;br /&gt;
        for a in zip(&#039;0123456789&#039;, q.answers):&lt;br /&gt;
            print &amp;quot;%5s: %s&amp;quot; % a&lt;br /&gt;
        answer = int(raw_input())&lt;br /&gt;
        q.answer = q.answers[answer]&lt;br /&gt;
        print q.correct&lt;br /&gt;
    # for missing word-style questions, which aren&#039;t implemented correctly yet, and&lt;br /&gt;
    # are a subclass of multiple choice questions... we make sure to ignore them&lt;br /&gt;
    # with a more specific rule.&lt;br /&gt;
    @when(do_question, (MissingWordQuestion,))&lt;br /&gt;
    def do_mw_question(q): # XXX: inheritance is annoying here...&lt;br /&gt;
        print &amp;quot;Unhandled question type. (MissingWordQuestion)&amp;quot;&lt;br /&gt;
7. Open questions&lt;br /&gt;
    questions = quizdata.open(&amp;quot;file://%s?format=gift&amp;quot; % path.join(base_path, &#039;tests&#039;, &#039;multi_choice.txt&#039;))&lt;br /&gt;
    for q in questions:&lt;br /&gt;
        do_question(q)&lt;br /&gt;
&lt;br /&gt;
===Education Standards===&lt;br /&gt;
As a general API and not a standalone Activity, along with the nature of the API in specific, this project does not directly address any specific education standards or learning outcomes.  It is reliant on educators to write questions, or have questions available to them in usable formats.  As such, the potential educational standards this project could help to meet includes **any** standard where drilling or question/response evaluation is appropriate. (This includes a wider range of topic areas than the Math4 focus, even.)&lt;br /&gt;
&lt;br /&gt;
====A Teacher&#039;s Guide Abstract====&lt;br /&gt;
Per the nature of this API, we&#039;ve decided that our “Teacher Guide” will be more of an abstract.  Below is a hypothetical situation of the Question Support API:&lt;br /&gt;
** Imagine a school manages a repository of quiz material that fit&#039;s it&#039;s curriculum at Moodle.org (for example the 4th Grade Math curriculum; see: http://wiki.sugarlabs.org/go/User:Gdk/4th_Grade_Maths ).  The teacher&#039;s use of our API design might go something like this: An activity that has extended / implemented our API is started by the teacher.  The teacher is presented with an input field that requires a URI (URL).  The teacher enters the URI of this week&#039;s quiz (i.e. http://moodle.org/SchoolName/ClassName/Week_11_Quiz/ )  The activity fetches the specified quiz data from the web, and presents the teacher with a summary and confirmation dialog box.  Upon confirmation, the teacher can send / assign the quiz to the class.  The class starts their corresponding activity which then also has a mechanism to either grab the assigned quiz from the Moodle.org server or from the local “School Server” (also-known-as the XS server; see; http://wiki.laptop.org/go/School_server ).  The student&#039;s complete their assigned quiz, and data is sent back to the server for reporting / grading.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
===Milestones===&lt;br /&gt;
;Initial Prototype Phase (1)&lt;br /&gt;
:Simple implementation, data model not yet nailed down, focus on import and utility to question *consumers*, Like Activities. Initial formats to include MoodleXML, GIFT.&lt;br /&gt;
        &lt;br /&gt;
;Rigorous Design Phase (2)&lt;br /&gt;
:Nail down the data model, including developing the &#039;native&#039; format, probably using a sqlite file mechanism, or other database support, if possible. Freeze the Question object (in terms of required properties,        etc.), finalize decisions about URLs for question aquisition.  Make sure requirements of other projects *can* be met by the design at this stage.&lt;br /&gt;
&lt;br /&gt;
;Full Implementation Phase (3)&lt;br /&gt;
:Complete the implementation of the import formats, including the &#039;native&#039; format.  Should be usable to other Activity developers at this point (hopefully useful, before now, but all needs should be filled at this point).  Export implementation should start now, along with prototyping for an authoring activity. (Collaboration with the reporting team *needs* to happen at this point, as the activity will probably be combined with reporting tools.)&lt;br /&gt;
&lt;br /&gt;
;Activity Development Phase (4)&lt;br /&gt;
:Complete the authoring/reporting activity for the teachers, allowing export to file formats (and possibly *serving* the questions to other XOs; requires support in activities (using the API) to support).&lt;br /&gt;
&lt;br /&gt;
===Community Contacts===&lt;br /&gt;
[[User:FGrose]], [[User:Tony37]] (see [[Talk:{{PAGENAMEE}}|talk page]])&lt;br /&gt;
&lt;br /&gt;
===RIT Project Usage===&lt;br /&gt;
{{Definition_table&lt;br /&gt;
|Produce Puzzle| No API need or usage.&lt;br /&gt;
|Lemonade Stand| No API need or usage.&lt;br /&gt;
|Assimilate| API Usage needs documented on [[Talk:{{PAGENAMEE}}|talk page]].  Progress not far enough to start implementation using the API.&lt;br /&gt;
|Fun Towers| No API need or usage.&lt;br /&gt;
|Reporting Team| Simple export format documented at [[{{PAGENAMEE}}/API_Design|API Design]].  Futher integration work would be nice, but there is more work than could be done in a year along these lines (and neither team is prepared to embark on it).&lt;br /&gt;
|Muthris| No contact from? Probably no API need or usage.&lt;br /&gt;
}}&lt;br /&gt;
===See Also===&lt;br /&gt;
{{Special:PrefixIndex/{{PAGENAMEE}}/}}&lt;/div&gt;</summary>
		<author><name>Bbl5660</name></author>
	</entry>
	<entry>
		<id>https://wiki.sugarlabs.org/index.php?title=Math4Team/RIT/Projects/Question_Support_API&amp;diff=29202</id>
		<title>Math4Team/RIT/Projects/Question Support API</title>
		<link rel="alternate" type="text/html" href="https://wiki.sugarlabs.org/index.php?title=Math4Team/RIT/Projects/Question_Support_API&amp;diff=29202"/>
		<updated>2009-05-15T15:53:03Z</updated>

		<summary type="html">&lt;p&gt;Bbl5660: &lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;{{TOCright}}&lt;br /&gt;
==Question Support API==&lt;br /&gt;
===Project Information===&lt;br /&gt;
{{Definition_table&lt;br /&gt;
|Primary Project Contact| [[User:Enimihil|Greg Stevens]]&lt;br /&gt;
|Project Members| [[User:Enimihil|Greg Stevens]], [[User:Jfinney|Jameson Finney]], [[User:Bbl5660|Brian Long]], TODO: Add yourself here...&lt;br /&gt;
|Source Repository| http://git.sugarlabs.org/projects/question-support-api&lt;br /&gt;
}}&lt;br /&gt;
&lt;br /&gt;
===Current Goals===&lt;br /&gt;
&lt;br /&gt;
* Documentation&lt;br /&gt;
** Packaging&lt;br /&gt;
** Documenting Dependencies and how to enable them in a development environment (Simple tutorial on setting up your Question API Development Environment)&lt;br /&gt;
** Question Authoring guidelines&lt;br /&gt;
** Integrate within lesson planning&lt;br /&gt;
** How does an instructor get the questions they have written/found into an Activity?&lt;br /&gt;
* Liase w/ other Math4 teams and Sugarlabs (What would it take to be included in the Sugar core?)&lt;br /&gt;
* Future Development (Needs / Wants — collect proposals from other teams)&lt;br /&gt;
* Discovery / Plugin  (How do activities find questions, i.e. how to get URIs to load questions from?)&lt;br /&gt;
&lt;br /&gt;
===Setting Up a Development Environment (For Newbies)===&lt;br /&gt;
These are links, tutorials and things that [[User:Bbl5660|Brian Long]] has found along the way, as well as help gained from [[User:Enimihil|Greg Stevens]].  Brian is new to the Linux / OpenSource community, and is working on documenting a development environment for &amp;lt;b&amp;gt;you&amp;lt;/b&amp;gt; and for us to continue developing this API.  The small amount of information below is meant to help someone new step into the world of developing for the Sugar environment, from Ubuntu and have all  dependencies and things setup to continue development of this API.  &amp;lt;b&amp;gt;Next&amp;lt;/b&amp;gt; Brian would like to document how to setup these sort of items for [http://wiki.laptop.org/go/Creating_an_activity Activity developers] to include our API and be able to extend it.&lt;br /&gt;
&lt;br /&gt;
* For development environments, you may consider consider first installing a linux OS and the the LAMP stack with PhpMyAdmin.  Brian is choosing Ubuntu, Aptana as a (free) Python IDE that can be used with PyDev to easily allow Python writing.  &lt;br /&gt;
* Links that Brian is relying on at the moment include:&lt;br /&gt;
** http://help.ubuntu.com/community/ApacheMySQLPHP&lt;br /&gt;
** http://www.sqlalchemy.org/docs/04/ormtutorial.html&lt;br /&gt;
** http://docs.python.org/&lt;br /&gt;
** http://andrewbleakley.com/blog/2008/11/01/installing-and-running-aptana-on-ubuntu-810/&lt;br /&gt;
** http://forums.aptana.com/viewtopic.php?f=37&amp;amp;t=7147&amp;amp;p=32918&amp;amp;hilit=ubuntu#p32918&lt;br /&gt;
&lt;br /&gt;
====Dependencies that will be required / Installing them from the terminal====&lt;br /&gt;
&amp;lt;!-- Development for Linux / Python / Sugar Newbies! --&amp;gt;&lt;br /&gt;
* sudo apt-get install python-setuptools&lt;br /&gt;
* sudo easy_install pyparsing&lt;br /&gt;
* sudo easy_install peak-rules&lt;br /&gt;
* sudo easy_install sqlalchemy&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
===Motivation===&lt;br /&gt;
In the RIT class working on the Math4 projects, many proposed activities&lt;br /&gt;
require a question database of some kind.  A common API or library for&lt;br /&gt;
accessing databases in different formats, stored either locally or remotely,&lt;br /&gt;
along with a simple mechanism to determine more complex formatting or&lt;br /&gt;
presentation than simple text (e.g. to include simple graphics or&lt;br /&gt;
mathematical notation) would cover a majority of the cases where the&lt;br /&gt;
activity needs some configurable &amp;quot;curriculum data&amp;quot;.&lt;br /&gt;
&lt;br /&gt;
Eventually this library could be extended to provide hints, explanations, or&lt;br /&gt;
walkthroughs for questions, in addition to the basic metadata about level,&lt;br /&gt;
grouping, difficulty, and subject matter that would be part of the base&lt;br /&gt;
system.&lt;br /&gt;
&lt;br /&gt;
===Envisioned Usage===&lt;br /&gt;
Consider a simple flash-card-like activity.  It presents a question from a&lt;br /&gt;
list of questions, allows the student to select an answer from the provided&lt;br /&gt;
answers for the question or to enter their own answer.  Then the correct&lt;br /&gt;
answer is revealed and the student it told whether their answer is correct.&lt;br /&gt;
If the question has an explanation of the correct answer, the flash-card&lt;br /&gt;
activity will show the explanation of the correct answer.  (Note that this&lt;br /&gt;
is just a simple usage example, the interaction design of a drilling&lt;br /&gt;
activity could be very different.)&lt;br /&gt;
&lt;br /&gt;
The flash-card activity would use this proposed Quiz API for the following:&lt;br /&gt;
&lt;br /&gt;
* Loading the questions from the storage location into memory. This includes any filtering or network lookup to download the questions from a remote resource and select appropriate questions for the student.&lt;br /&gt;
&lt;br /&gt;
* Determining whether the student has entered a correct answer.&lt;br /&gt;
&lt;br /&gt;
To start with, the library would simply be a time-saving tool for developers&lt;br /&gt;
needing similar functionality, but as the XS (School Server) becomes more&lt;br /&gt;
fully developed the library should integrate the functions provided by the&lt;br /&gt;
XS to enable automated update of course material for the current topic of&lt;br /&gt;
study so the students can drill material using any tool they prefer, while&lt;br /&gt;
still reporting progress to the instructor using the XS services.&lt;br /&gt;
&lt;br /&gt;
===Current Status===&lt;br /&gt;
&lt;br /&gt;
Currently, (14 May 2009) the API supports parsing the GIFT file format well enough to import Multiple Choice and True/False questions, along with complete implementations for basic functionality of the corresponding question objects.  No support for partial credit answers is currently implemented, nor are other question types working correctly (though most can be parsed to some extent).  Export to CSV works as intended, though it is intentionally simple.  Documentation on usage and integration of the API into an activity is in the doc/ directory of [[http://git.sugarlabs.org/projects/question-support-api the repository]]. A simple, but complete usage example, using a console interface is available in tests/complete_test.py.&lt;br /&gt;
&lt;br /&gt;
===Education Standards===&lt;br /&gt;
As a general API and not a standalone Activity, along with the nature of the API in specific, this project does not directly address any specific education standards or learning outcomes.  It is reliant on educators to write questions, or have questions available to them in usable formats.  As such, the potential educational standards this project could help to meet includes **any** standard where drilling or question/response evaluation is appropriate. (This includes a wider range of topic areas than the Math4 focus, even.)&lt;br /&gt;
&lt;br /&gt;
===Milestones===&lt;br /&gt;
;Initial Prototype Phase (1)&lt;br /&gt;
:Simple implementation, data model not yet nailed down, focus on import and utility to question *consumers*, Like Activities. Initial formats to include MoodleXML, GIFT.&lt;br /&gt;
        &lt;br /&gt;
;Rigorous Design Phase (2)&lt;br /&gt;
:Nail down the data model, including developing the &#039;native&#039; format, probably using a sqlite file mechanism, or other database support, if possible. Freeze the Question object (in terms of required properties,        etc.), finalize decisions about URLs for question aquisition.  Make sure requirements of other projects *can* be met by the design at this stage.&lt;br /&gt;
&lt;br /&gt;
;Full Implementation Phase (3)&lt;br /&gt;
:Complete the implementation of the import formats, including the &#039;native&#039; format.  Should be usable to other Activity developers at this point (hopefully useful, before now, but all needs should be filled at this point).  Export implementation should start now, along with prototyping for an authoring activity. (Collaboration with the reporting team *needs* to happen at this point, as the activity will probably be combined with reporting tools.)&lt;br /&gt;
&lt;br /&gt;
;Activity Development Phase (4)&lt;br /&gt;
:Complete the authoring/reporting activity for the teachers, allowing export to file formats (and possibly *serving* the questions to other XOs; requires support in activities (using the API) to support).&lt;br /&gt;
&lt;br /&gt;
===Community Contacts===&lt;br /&gt;
[[User:FGrose]], [[User:Tony37]] (see [[Talk:{{PAGENAMEE}}|talk page]])&lt;br /&gt;
&lt;br /&gt;
===RIT Project Usage===&lt;br /&gt;
{{Definition_table&lt;br /&gt;
|Produce Puzzle| No API need or usage.&lt;br /&gt;
|Lemonade Stand| No API need or usage.&lt;br /&gt;
|Assimilate| API Usage needs documented on [[Talk:{{PAGENAMEE}}|talk page]].  Progress not far enough to start implementation using the API.&lt;br /&gt;
|Fun Towers| No API need or usage.&lt;br /&gt;
|Reporting Team| Simple export format documented at [[{{PAGENAMEE}}/API_Design|API Design]].  Futher integration work would be nice, but there is more work than could be done in a year along these lines (and neither team is prepared to embark on it).&lt;br /&gt;
|Muthris| No contact from? Probably no API need or usage.&lt;br /&gt;
}}&lt;br /&gt;
===See Also===&lt;br /&gt;
{{Special:PrefixIndex/{{PAGENAMEE}}/}}&lt;/div&gt;</summary>
		<author><name>Bbl5660</name></author>
	</entry>
	<entry>
		<id>https://wiki.sugarlabs.org/index.php?title=Math4Team/RIT/Projects/Question_Support_API&amp;diff=29201</id>
		<title>Math4Team/RIT/Projects/Question Support API</title>
		<link rel="alternate" type="text/html" href="https://wiki.sugarlabs.org/index.php?title=Math4Team/RIT/Projects/Question_Support_API&amp;diff=29201"/>
		<updated>2009-05-15T15:51:10Z</updated>

		<summary type="html">&lt;p&gt;Bbl5660: &lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;{{TOCright}}&lt;br /&gt;
==Question Support API==&lt;br /&gt;
===Project Information===&lt;br /&gt;
{{Definition_table&lt;br /&gt;
|Primary Project Contact| [[User:Enimihil|Greg Stevens]]&lt;br /&gt;
|Project Members| [[User:Enimihil|Greg Stevens]], [[User:Jfinney|Jameson Finney]], [[User:Bbl5660|Brian Long]], TODO: Add yourself here...&lt;br /&gt;
|Source Repository| http://git.sugarlabs.org/projects/question-support-api&lt;br /&gt;
}}&lt;br /&gt;
&lt;br /&gt;
===Current Goals===&lt;br /&gt;
&lt;br /&gt;
* Documentation&lt;br /&gt;
** Packaging&lt;br /&gt;
** Documenting Dependencies and how to enable them in a development environment (Simple tutorial on setting up your Question API Development Environment)&lt;br /&gt;
** Question Authoring guidelines&lt;br /&gt;
** Integrate within lesson planning&lt;br /&gt;
** How does an instructor get the questions they have written/found into an Activity?&lt;br /&gt;
* Liase w/ other Math4 teams and Sugarlabs (What would it take to be included in the Sugar core?)&lt;br /&gt;
* Future Development (Needs / Wants — collect proposals from other teams)&lt;br /&gt;
* Discovery / Plugin  (How do activities find questions, i.e. how to get URIs to load questions from?)&lt;br /&gt;
&lt;br /&gt;
===Setting Up a Development Environment (For Newbies)===&lt;br /&gt;
These are links, tutorials and things that [[User:Bbl5660|Brian Long]] has found along the way, as well as help gained from [[User:Enimihil|Greg Stevens]].  Brian is new to the Linux / OpenSource community, and is working on documenting a development environment for &amp;lt;b&amp;gt;you&amp;lt;/b&amp;gt; and for us to continue developing this API.  The small amount of information below is meant to help someone new step into the world of developing for the Sugar environment, from Ubuntu and have all  dependencies and things setup to continue development of this API.  &amp;lt;b&amp;gt;Next&amp;lt;/b&amp;gt; Brian would like to document how to setup these sort of items for [http://wiki.laptop.org/go/Creating_an_activity Activity developers] to include our API and be able to extend it.&lt;br /&gt;
&lt;br /&gt;
* For development environments, you may consider consider first installing a linux OS and the the LAMP stack with PhpMyAdmin.  Brian is choosing Ubuntu, Aptana as a (free) Python IDE that can be used with PyDev to easily allow Python writing.  &lt;br /&gt;
* Links that Brian is relying on at the moment include:&lt;br /&gt;
** http://help.ubuntu.com/community/ApacheMySQLPHP&lt;br /&gt;
** http://www.sqlalchemy.org/docs/04/ormtutorial.html&lt;br /&gt;
** http://docs.python.org/&lt;br /&gt;
** http://andrewbleakley.com/blog/2008/11/01/installing-and-running-aptana-on-ubuntu-810/&lt;br /&gt;
** http://forums.aptana.com/viewtopic.php?f=37&amp;amp;t=7147&amp;amp;p=32918&amp;amp;hilit=ubuntu#p32918&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
====Dependencies that will be required / Installing them from the terminal====&lt;br /&gt;
&amp;lt;!-- Development for Linux / Python / Sugar Newbies! --&amp;gt;&lt;br /&gt;
* sudo apt-get install python-setuptools&lt;br /&gt;
* sudo easy_install pyparsing&lt;br /&gt;
* sudo easy_install peak-rules&lt;br /&gt;
* sudo easy_install sqlalchemy&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
===Motivation===&lt;br /&gt;
In the RIT class working on the Math4 projects, many proposed activities&lt;br /&gt;
require a question database of some kind.  A common API or library for&lt;br /&gt;
accessing databases in different formats, stored either locally or remotely,&lt;br /&gt;
along with a simple mechanism to determine more complex formatting or&lt;br /&gt;
presentation than simple text (e.g. to include simple graphics or&lt;br /&gt;
mathematical notation) would cover a majority of the cases where the&lt;br /&gt;
activity needs some configurable &amp;quot;curriculum data&amp;quot;.&lt;br /&gt;
&lt;br /&gt;
Eventually this library could be extended to provide hints, explanations, or&lt;br /&gt;
walkthroughs for questions, in addition to the basic metadata about level,&lt;br /&gt;
grouping, difficulty, and subject matter that would be part of the base&lt;br /&gt;
system.&lt;br /&gt;
&lt;br /&gt;
===Envisioned Usage===&lt;br /&gt;
Consider a simple flash-card-like activity.  It presents a question from a&lt;br /&gt;
list of questions, allows the student to select an answer from the provided&lt;br /&gt;
answers for the question or to enter their own answer.  Then the correct&lt;br /&gt;
answer is revealed and the student it told whether their answer is correct.&lt;br /&gt;
If the question has an explanation of the correct answer, the flash-card&lt;br /&gt;
activity will show the explanation of the correct answer.  (Note that this&lt;br /&gt;
is just a simple usage example, the interaction design of a drilling&lt;br /&gt;
activity could be very different.)&lt;br /&gt;
&lt;br /&gt;
The flash-card activity would use this proposed Quiz API for the following:&lt;br /&gt;
&lt;br /&gt;
* Loading the questions from the storage location into memory. This includes any filtering or network lookup to download the questions from a remote resource and select appropriate questions for the student.&lt;br /&gt;
&lt;br /&gt;
* Determining whether the student has entered a correct answer.&lt;br /&gt;
&lt;br /&gt;
To start with, the library would simply be a time-saving tool for developers&lt;br /&gt;
needing similar functionality, but as the XS (School Server) becomes more&lt;br /&gt;
fully developed the library should integrate the functions provided by the&lt;br /&gt;
XS to enable automated update of course material for the current topic of&lt;br /&gt;
study so the students can drill material using any tool they prefer, while&lt;br /&gt;
still reporting progress to the instructor using the XS services.&lt;br /&gt;
&lt;br /&gt;
===Current Status===&lt;br /&gt;
&lt;br /&gt;
Currently, (14 May 2009) the API supports parsing the GIFT file format well enough to import Multiple Choice and True/False questions, along with complete implementations for basic functionality of the corresponding question objects.  No support for partial credit answers is currently implemented, nor are other question types working correctly (though most can be parsed to some extent).  Export to CSV works as intended, though it is intentionally simple.  Documentation on usage and integration of the API into an activity is in the doc/ directory of [[http://git.sugarlabs.org/projects/question-support-api the repository]]. A simple, but complete usage example, using a console interface is available in tests/complete_test.py.&lt;br /&gt;
&lt;br /&gt;
===Education Standards===&lt;br /&gt;
As a general API and not a standalone Activity, along with the nature of the API in specific, this project does not directly address any specific education standards or learning outcomes.  It is reliant on educators to write questions, or have questions available to them in usable formats.  As such, the potential educational standards this project could help to meet includes **any** standard where drilling or question/response evaluation is appropriate. (This includes a wider range of topic areas than the Math4 focus, even.)&lt;br /&gt;
&lt;br /&gt;
===Milestones===&lt;br /&gt;
;Initial Prototype Phase (1)&lt;br /&gt;
:Simple implementation, data model not yet nailed down, focus on import and utility to question *consumers*, Like Activities. Initial formats to include MoodleXML, GIFT.&lt;br /&gt;
        &lt;br /&gt;
;Rigorous Design Phase (2)&lt;br /&gt;
:Nail down the data model, including developing the &#039;native&#039; format, probably using a sqlite file mechanism, or other database support, if possible. Freeze the Question object (in terms of required properties,        etc.), finalize decisions about URLs for question aquisition.  Make sure requirements of other projects *can* be met by the design at this stage.&lt;br /&gt;
&lt;br /&gt;
;Full Implementation Phase (3)&lt;br /&gt;
:Complete the implementation of the import formats, including the &#039;native&#039; format.  Should be usable to other Activity developers at this point (hopefully useful, before now, but all needs should be filled at this point).  Export implementation should start now, along with prototyping for an authoring activity. (Collaboration with the reporting team *needs* to happen at this point, as the activity will probably be combined with reporting tools.)&lt;br /&gt;
&lt;br /&gt;
;Activity Development Phase (4)&lt;br /&gt;
:Complete the authoring/reporting activity for the teachers, allowing export to file formats (and possibly *serving* the questions to other XOs; requires support in activities (using the API) to support).&lt;br /&gt;
&lt;br /&gt;
===Community Contacts===&lt;br /&gt;
[[User:FGrose]], [[User:Tony37]] (see [[Talk:{{PAGENAMEE}}|talk page]])&lt;br /&gt;
&lt;br /&gt;
===RIT Project Usage===&lt;br /&gt;
{{Definition_table&lt;br /&gt;
|Produce Puzzle| No API need or usage.&lt;br /&gt;
|Lemonade Stand| No API need or usage.&lt;br /&gt;
|Assimilate| API Usage needs documented on [[Talk:{{PAGENAMEE}}|talk page]].  Progress not far enough to start implementation using the API.&lt;br /&gt;
|Fun Towers| No API need or usage.&lt;br /&gt;
|Reporting Team| Simple export format documented at [[{{PAGENAMEE}}/API_Design|API Design]].  Futher integration work would be nice, but there is more work than could be done in a year along these lines (and neither team is prepared to embark on it).&lt;br /&gt;
|Muthris| No contact from? Probably no API need or usage.&lt;br /&gt;
}}&lt;br /&gt;
===See Also===&lt;br /&gt;
{{Special:PrefixIndex/{{PAGENAMEE}}/}}&lt;/div&gt;</summary>
		<author><name>Bbl5660</name></author>
	</entry>
	<entry>
		<id>https://wiki.sugarlabs.org/index.php?title=Math4Team/RIT/Projects/Question_Support_API&amp;diff=29200</id>
		<title>Math4Team/RIT/Projects/Question Support API</title>
		<link rel="alternate" type="text/html" href="https://wiki.sugarlabs.org/index.php?title=Math4Team/RIT/Projects/Question_Support_API&amp;diff=29200"/>
		<updated>2009-05-15T15:49:13Z</updated>

		<summary type="html">&lt;p&gt;Bbl5660: &lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;{{TOCright}}&lt;br /&gt;
==Question Support API==&lt;br /&gt;
===Project Information===&lt;br /&gt;
{{Definition_table&lt;br /&gt;
|Primary Project Contact| [[User:Enimihil|Greg Stevens]]&lt;br /&gt;
|Project Members| [[User:Enimihil|Greg Stevens]], [[User:Jfinney|Jameson Finney]], [[User:Bbl5660|Brian Long]], TODO: Add yourself here...&lt;br /&gt;
|Source Repository| http://git.sugarlabs.org/projects/question-support-api&lt;br /&gt;
}}&lt;br /&gt;
&lt;br /&gt;
===Current Goals===&lt;br /&gt;
&lt;br /&gt;
* Documentation&lt;br /&gt;
** Packaging&lt;br /&gt;
** Documenting Dependencies and how to enable them in a development environment (Simple tutorial on setting up your Question API Development Environment)&lt;br /&gt;
** Question Authoring guidelines&lt;br /&gt;
** Integrate within lesson planning&lt;br /&gt;
** How does an instructor get the questions they have written/found into an Activity?&lt;br /&gt;
* Liase w/ other Math4 teams and Sugarlabs (What would it take to be included in the Sugar core?)&lt;br /&gt;
* Future Development (Needs / Wants — collect proposals from other teams)&lt;br /&gt;
* Discovery / Plugin  (How do activities find questions, i.e. how to get URIs to load questions from?)&lt;br /&gt;
&lt;br /&gt;
===Setting Up a Development Environment (For Newbies)===&lt;br /&gt;
These are links, tutorials and things that [[User:Bbl5660|Brian Long]] has found along the way, as well as help gained from [[User:Enimihil|Greg Stevens]].  Brian is new to the Linux / OpenSource community, and is working on documenting a development environment for &amp;lt;b&amp;gt;you&amp;lt;/b&amp;gt; and for us to continue developing this API.  The small amount of information below is meant to help someone new step into the world of developing for the Sugar environment, from Ubuntu and have all  dependencies and things setup to continue development of this API.  &amp;lt;b&amp;gt;Next&amp;lt;/b&amp;gt; Brian would like to document how to setup these sort of items for [http://wiki.laptop.org/go/Creating_an_activity Activity developers] to include our API and be able to extend it.&lt;br /&gt;
&lt;br /&gt;
* For development environments, you may consider consider first installing a linux OS and the the LAMP stack with PhpMyAdmin.  Brian is choosing Ubuntu, Aptana as a (free) Python IDE that can be used with PyDev to easily allow Python writing.  &lt;br /&gt;
* Links that Brian is relying on at the moment include:&lt;br /&gt;
** http://help.ubuntu.com/community/ApacheMySQLPHP&lt;br /&gt;
** http://www.sqlalchemy.org/docs/04/ormtutorial.html&lt;br /&gt;
** http://docs.python.org/&lt;br /&gt;
&lt;br /&gt;
====Dependencies that will be required / Installing them from the terminal====&lt;br /&gt;
&amp;lt;!-- Development for Linux / Python / Sugar Newbies! --&amp;gt;&lt;br /&gt;
* sudo apt-get install python-setuptools&lt;br /&gt;
* sudo easy_install pyparsing&lt;br /&gt;
* sudo easy_install peak-rules&lt;br /&gt;
* sudo easy_install sqlalchemy&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
===Motivation===&lt;br /&gt;
In the RIT class working on the Math4 projects, many proposed activities&lt;br /&gt;
require a question database of some kind.  A common API or library for&lt;br /&gt;
accessing databases in different formats, stored either locally or remotely,&lt;br /&gt;
along with a simple mechanism to determine more complex formatting or&lt;br /&gt;
presentation than simple text (e.g. to include simple graphics or&lt;br /&gt;
mathematical notation) would cover a majority of the cases where the&lt;br /&gt;
activity needs some configurable &amp;quot;curriculum data&amp;quot;.&lt;br /&gt;
&lt;br /&gt;
Eventually this library could be extended to provide hints, explanations, or&lt;br /&gt;
walkthroughs for questions, in addition to the basic metadata about level,&lt;br /&gt;
grouping, difficulty, and subject matter that would be part of the base&lt;br /&gt;
system.&lt;br /&gt;
&lt;br /&gt;
===Envisioned Usage===&lt;br /&gt;
Consider a simple flash-card-like activity.  It presents a question from a&lt;br /&gt;
list of questions, allows the student to select an answer from the provided&lt;br /&gt;
answers for the question or to enter their own answer.  Then the correct&lt;br /&gt;
answer is revealed and the student it told whether their answer is correct.&lt;br /&gt;
If the question has an explanation of the correct answer, the flash-card&lt;br /&gt;
activity will show the explanation of the correct answer.  (Note that this&lt;br /&gt;
is just a simple usage example, the interaction design of a drilling&lt;br /&gt;
activity could be very different.)&lt;br /&gt;
&lt;br /&gt;
The flash-card activity would use this proposed Quiz API for the following:&lt;br /&gt;
&lt;br /&gt;
* Loading the questions from the storage location into memory. This includes any filtering or network lookup to download the questions from a remote resource and select appropriate questions for the student.&lt;br /&gt;
&lt;br /&gt;
* Determining whether the student has entered a correct answer.&lt;br /&gt;
&lt;br /&gt;
To start with, the library would simply be a time-saving tool for developers&lt;br /&gt;
needing similar functionality, but as the XS (School Server) becomes more&lt;br /&gt;
fully developed the library should integrate the functions provided by the&lt;br /&gt;
XS to enable automated update of course material for the current topic of&lt;br /&gt;
study so the students can drill material using any tool they prefer, while&lt;br /&gt;
still reporting progress to the instructor using the XS services.&lt;br /&gt;
&lt;br /&gt;
===Current Status===&lt;br /&gt;
&lt;br /&gt;
Currently, (14 May 2009) the API supports parsing the GIFT file format well enough to import Multiple Choice and True/False questions, along with complete implementations for basic functionality of the corresponding question objects.  No support for partial credit answers is currently implemented, nor are other question types working correctly (though most can be parsed to some extent).  Export to CSV works as intended, though it is intentionally simple.  Documentation on usage and integration of the API into an activity is in the doc/ directory of [[http://git.sugarlabs.org/projects/question-support-api the repository]]. A simple, but complete usage example, using a console interface is available in tests/complete_test.py.&lt;br /&gt;
&lt;br /&gt;
===Education Standards===&lt;br /&gt;
As a general API and not a standalone Activity, along with the nature of the API in specific, this project does not directly address any specific education standards or learning outcomes.  It is reliant on educators to write questions, or have questions available to them in usable formats.  As such, the potential educational standards this project could help to meet includes **any** standard where drilling or question/response evaluation is appropriate. (This includes a wider range of topic areas than the Math4 focus, even.)&lt;br /&gt;
&lt;br /&gt;
===Milestones===&lt;br /&gt;
;Initial Prototype Phase (1)&lt;br /&gt;
:Simple implementation, data model not yet nailed down, focus on import and utility to question *consumers*, Like Activities. Initial formats to include MoodleXML, GIFT.&lt;br /&gt;
        &lt;br /&gt;
;Rigorous Design Phase (2)&lt;br /&gt;
:Nail down the data model, including developing the &#039;native&#039; format, probably using a sqlite file mechanism, or other database support, if possible. Freeze the Question object (in terms of required properties,        etc.), finalize decisions about URLs for question aquisition.  Make sure requirements of other projects *can* be met by the design at this stage.&lt;br /&gt;
&lt;br /&gt;
;Full Implementation Phase (3)&lt;br /&gt;
:Complete the implementation of the import formats, including the &#039;native&#039; format.  Should be usable to other Activity developers at this point (hopefully useful, before now, but all needs should be filled at this point).  Export implementation should start now, along with prototyping for an authoring activity. (Collaboration with the reporting team *needs* to happen at this point, as the activity will probably be combined with reporting tools.)&lt;br /&gt;
&lt;br /&gt;
;Activity Development Phase (4)&lt;br /&gt;
:Complete the authoring/reporting activity for the teachers, allowing export to file formats (and possibly *serving* the questions to other XOs; requires support in activities (using the API) to support).&lt;br /&gt;
&lt;br /&gt;
===Community Contacts===&lt;br /&gt;
[[User:FGrose]], [[User:Tony37]] (see [[Talk:{{PAGENAMEE}}|talk page]])&lt;br /&gt;
&lt;br /&gt;
===RIT Project Usage===&lt;br /&gt;
{{Definition_table&lt;br /&gt;
|Produce Puzzle| No API need or usage.&lt;br /&gt;
|Lemonade Stand| No API need or usage.&lt;br /&gt;
|Assimilate| API Usage needs documented on [[Talk:{{PAGENAMEE}}|talk page]].  Progress not far enough to start implementation using the API.&lt;br /&gt;
|Fun Towers| No API need or usage.&lt;br /&gt;
|Reporting Team| Simple export format documented at [[{{PAGENAMEE}}/API_Design|API Design]].  Futher integration work would be nice, but there is more work than could be done in a year along these lines (and neither team is prepared to embark on it).&lt;br /&gt;
|Muthris| No contact from? Probably no API need or usage.&lt;br /&gt;
}}&lt;br /&gt;
===See Also===&lt;br /&gt;
{{Special:PrefixIndex/{{PAGENAMEE}}/}}&lt;/div&gt;</summary>
		<author><name>Bbl5660</name></author>
	</entry>
	<entry>
		<id>https://wiki.sugarlabs.org/index.php?title=Math4Team/RIT/Projects/Question_Support_API&amp;diff=29199</id>
		<title>Math4Team/RIT/Projects/Question Support API</title>
		<link rel="alternate" type="text/html" href="https://wiki.sugarlabs.org/index.php?title=Math4Team/RIT/Projects/Question_Support_API&amp;diff=29199"/>
		<updated>2009-05-15T15:47:46Z</updated>

		<summary type="html">&lt;p&gt;Bbl5660: &lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;{{TOCright}}&lt;br /&gt;
==Question Support API==&lt;br /&gt;
===Project Information===&lt;br /&gt;
{{Definition_table&lt;br /&gt;
|Primary Project Contact| [[User:Enimihil|Greg Stevens]]&lt;br /&gt;
|Project Members| [[User:Enimihil|Greg Stevens]], [[User:Jfinney|Jameson Finney]], [[User:Bbl5660|Brian Long]], TODO: Add yourself here...&lt;br /&gt;
|Source Repository| http://git.sugarlabs.org/projects/question-support-api&lt;br /&gt;
}}&lt;br /&gt;
&lt;br /&gt;
===Current Goals===&lt;br /&gt;
&lt;br /&gt;
* Documentation&lt;br /&gt;
** Packaging&lt;br /&gt;
** Documenting Dependencies and how to enable them in a development environment (Simple tutorial on setting up your Question API Development Environment)&lt;br /&gt;
&lt;br /&gt;
===Setting Up a Development Environment (For Newbies)===&lt;br /&gt;
These are links, tutorials and things that [[User:Bbl5660|Brian Long]] has found along the way, as well as help gained from [[User:Enimihil|Greg Stevens]].  Brian is new to the Linux / OpenSource community, and is working on documenting a development environment for &amp;lt;b&amp;gt;you&amp;lt;/b&amp;gt; and for us to continue developing this API.  The small amount of information below is meant to help someone new step into the world of developing for the Sugar environment, from Ubuntu and have all  dependencies and things setup to continue development of this API.  &amp;lt;b&amp;gt;Next&amp;lt;/b&amp;gt; Brian would like to document how to setup these sort of items for [http://wiki.laptop.org/go/Creating_an_activity Activity developers] to include our API and be able to extend it.&lt;br /&gt;
&lt;br /&gt;
* For development environments, you may consider consider first installing a linux OS and the the LAMP stack with PhpMyAdmin.  Brian is choosing Ubuntu, Aptana as a (free) Python IDE that can be used with PyDev to easily allow Python writing.  &lt;br /&gt;
* Links that Brian is relying on at the moment include:&lt;br /&gt;
** http://help.ubuntu.com/community/ApacheMySQLPHP&lt;br /&gt;
** http://www.sqlalchemy.org/docs/04/ormtutorial.html&lt;br /&gt;
** http://docs.python.org/&lt;br /&gt;
&lt;br /&gt;
====Dependencies that will be required / Installing them from the terminal====&lt;br /&gt;
&amp;lt;!-- Development for Linux / Python / Sugar Newbies! --&amp;gt;&lt;br /&gt;
* sudo apt-get install python-setuptools&lt;br /&gt;
* sudo easy_install pyparsing&lt;br /&gt;
* sudo easy_install peak-rules&lt;br /&gt;
* sudo easy_install sqlalchemy&lt;br /&gt;
&lt;br /&gt;
** Question Authoring guidelines&lt;br /&gt;
** Integrate within lesson planning&lt;br /&gt;
** How does an instructor get the questions they have written/found into an Activity?&lt;br /&gt;
&lt;br /&gt;
* Liase w/ other Math4 teams and Sugarlabs (What would it take to be included in the Sugar core?)&lt;br /&gt;
* Future Development (Needs / Wants — collect proposals from other teams)&lt;br /&gt;
* Discovery / Plugin  (How do activities find questions, i.e. how to get URIs to load questions from?)&lt;br /&gt;
&lt;br /&gt;
===Motivation===&lt;br /&gt;
In the RIT class working on the Math4 projects, many proposed activities&lt;br /&gt;
require a question database of some kind.  A common API or library for&lt;br /&gt;
accessing databases in different formats, stored either locally or remotely,&lt;br /&gt;
along with a simple mechanism to determine more complex formatting or&lt;br /&gt;
presentation than simple text (e.g. to include simple graphics or&lt;br /&gt;
mathematical notation) would cover a majority of the cases where the&lt;br /&gt;
activity needs some configurable &amp;quot;curriculum data&amp;quot;.&lt;br /&gt;
&lt;br /&gt;
Eventually this library could be extended to provide hints, explanations, or&lt;br /&gt;
walkthroughs for questions, in addition to the basic metadata about level,&lt;br /&gt;
grouping, difficulty, and subject matter that would be part of the base&lt;br /&gt;
system.&lt;br /&gt;
&lt;br /&gt;
===Envisioned Usage===&lt;br /&gt;
Consider a simple flash-card-like activity.  It presents a question from a&lt;br /&gt;
list of questions, allows the student to select an answer from the provided&lt;br /&gt;
answers for the question or to enter their own answer.  Then the correct&lt;br /&gt;
answer is revealed and the student it told whether their answer is correct.&lt;br /&gt;
If the question has an explanation of the correct answer, the flash-card&lt;br /&gt;
activity will show the explanation of the correct answer.  (Note that this&lt;br /&gt;
is just a simple usage example, the interaction design of a drilling&lt;br /&gt;
activity could be very different.)&lt;br /&gt;
&lt;br /&gt;
The flash-card activity would use this proposed Quiz API for the following:&lt;br /&gt;
&lt;br /&gt;
* Loading the questions from the storage location into memory. This includes any filtering or network lookup to download the questions from a remote resource and select appropriate questions for the student.&lt;br /&gt;
&lt;br /&gt;
* Determining whether the student has entered a correct answer.&lt;br /&gt;
&lt;br /&gt;
To start with, the library would simply be a time-saving tool for developers&lt;br /&gt;
needing similar functionality, but as the XS (School Server) becomes more&lt;br /&gt;
fully developed the library should integrate the functions provided by the&lt;br /&gt;
XS to enable automated update of course material for the current topic of&lt;br /&gt;
study so the students can drill material using any tool they prefer, while&lt;br /&gt;
still reporting progress to the instructor using the XS services.&lt;br /&gt;
&lt;br /&gt;
===Current Status===&lt;br /&gt;
&lt;br /&gt;
Currently, (14 May 2009) the API supports parsing the GIFT file format well enough to import Multiple Choice and True/False questions, along with complete implementations for basic functionality of the corresponding question objects.  No support for partial credit answers is currently implemented, nor are other question types working correctly (though most can be parsed to some extent).  Export to CSV works as intended, though it is intentionally simple.  Documentation on usage and integration of the API into an activity is in the doc/ directory of [[http://git.sugarlabs.org/projects/question-support-api the repository]]. A simple, but complete usage example, using a console interface is available in tests/complete_test.py.&lt;br /&gt;
&lt;br /&gt;
===Education Standards===&lt;br /&gt;
As a general API and not a standalone Activity, along with the nature of the API in specific, this project does not directly address any specific education standards or learning outcomes.  It is reliant on educators to write questions, or have questions available to them in usable formats.  As such, the potential educational standards this project could help to meet includes **any** standard where drilling or question/response evaluation is appropriate. (This includes a wider range of topic areas than the Math4 focus, even.)&lt;br /&gt;
&lt;br /&gt;
===Milestones===&lt;br /&gt;
;Initial Prototype Phase (1)&lt;br /&gt;
:Simple implementation, data model not yet nailed down, focus on import and utility to question *consumers*, Like Activities. Initial formats to include MoodleXML, GIFT.&lt;br /&gt;
        &lt;br /&gt;
;Rigorous Design Phase (2)&lt;br /&gt;
:Nail down the data model, including developing the &#039;native&#039; format, probably using a sqlite file mechanism, or other database support, if possible. Freeze the Question object (in terms of required properties,        etc.), finalize decisions about URLs for question aquisition.  Make sure requirements of other projects *can* be met by the design at this stage.&lt;br /&gt;
&lt;br /&gt;
;Full Implementation Phase (3)&lt;br /&gt;
:Complete the implementation of the import formats, including the &#039;native&#039; format.  Should be usable to other Activity developers at this point (hopefully useful, before now, but all needs should be filled at this point).  Export implementation should start now, along with prototyping for an authoring activity. (Collaboration with the reporting team *needs* to happen at this point, as the activity will probably be combined with reporting tools.)&lt;br /&gt;
&lt;br /&gt;
;Activity Development Phase (4)&lt;br /&gt;
:Complete the authoring/reporting activity for the teachers, allowing export to file formats (and possibly *serving* the questions to other XOs; requires support in activities (using the API) to support).&lt;br /&gt;
&lt;br /&gt;
===Community Contacts===&lt;br /&gt;
[[User:FGrose]], [[User:Tony37]] (see [[Talk:{{PAGENAMEE}}|talk page]])&lt;br /&gt;
&lt;br /&gt;
===RIT Project Usage===&lt;br /&gt;
{{Definition_table&lt;br /&gt;
|Produce Puzzle| No API need or usage.&lt;br /&gt;
|Lemonade Stand| No API need or usage.&lt;br /&gt;
|Assimilate| API Usage needs documented on [[Talk:{{PAGENAMEE}}|talk page]].  Progress not far enough to start implementation using the API.&lt;br /&gt;
|Fun Towers| No API need or usage.&lt;br /&gt;
|Reporting Team| Simple export format documented at [[{{PAGENAMEE}}/API_Design|API Design]].  Futher integration work would be nice, but there is more work than could be done in a year along these lines (and neither team is prepared to embark on it).&lt;br /&gt;
|Muthris| No contact from? Probably no API need or usage.&lt;br /&gt;
}}&lt;br /&gt;
===See Also===&lt;br /&gt;
{{Special:PrefixIndex/{{PAGENAMEE}}/}}&lt;/div&gt;</summary>
		<author><name>Bbl5660</name></author>
	</entry>
	<entry>
		<id>https://wiki.sugarlabs.org/index.php?title=Math4Team/RIT/Projects/Question_Support_API&amp;diff=29198</id>
		<title>Math4Team/RIT/Projects/Question Support API</title>
		<link rel="alternate" type="text/html" href="https://wiki.sugarlabs.org/index.php?title=Math4Team/RIT/Projects/Question_Support_API&amp;diff=29198"/>
		<updated>2009-05-15T15:47:19Z</updated>

		<summary type="html">&lt;p&gt;Bbl5660: &lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;{{TOCright}}&lt;br /&gt;
==Question Support API==&lt;br /&gt;
===Project Information===&lt;br /&gt;
{{Definition_table&lt;br /&gt;
|Primary Project Contact| [[User:Enimihil|Greg Stevens]]&lt;br /&gt;
|Project Members| [[User:Enimihil|Greg Stevens]], [[User:Jfinney|Jameson Finney]], [[User:Bbl5660|Brian Long]], TODO: Add yourself here...&lt;br /&gt;
|Source Repository| http://git.sugarlabs.org/projects/question-support-api&lt;br /&gt;
}}&lt;br /&gt;
&lt;br /&gt;
===Current Goals===&lt;br /&gt;
&lt;br /&gt;
* Documentation&lt;br /&gt;
** Packaging&lt;br /&gt;
** Documenting Dependencies and how to enable them in a development environment (Simple tutorial on setting up your Question API Development Environment)&lt;br /&gt;
&lt;br /&gt;
===Setting Up a Development Environment (For Newbies)===&lt;br /&gt;
These are links, tutorials and things that [[User:Bbl5660|Brian Long]] has found along the way, as well as help gained from [[User:Enimihil|Greg Stevens]].  Brian is new to the Linux / OpenSource community, and is working on documenting a development environment for &amp;lt;b&amp;gt;you&amp;lt;/b&amp;gt; and for us to continue developing this API.  The small amount of information below is meant to help someone new step into the world of developing for the Sugar environment, from Ubuntu and have all  dependencies and things setup to continue development of this API.  &amp;lt;b&amp;gt;Next&amp;lt;/b&amp;gt; Brian would like to document how to setup these sort of items for [http://wiki.laptop.org/go/Creating_an_activity Activity developers] to include our API and be able to extend it.&lt;br /&gt;
&lt;br /&gt;
* For development environments, you may consider consider first installing a linux OS and the the LAMP stack with PhpMyAdmin.  Brian is choosing Ubuntu, Aptana as a (free) Python IDE that can be used with PyDev to easily allow Python writing.  &lt;br /&gt;
* Links that Brian is relying on at the moment include:&lt;br /&gt;
** http://help.ubuntu.com/community/ApacheMySQLPHP&lt;br /&gt;
** http://www.sqlalchemy.org/docs/04/ormtutorial.html&lt;br /&gt;
** http://docs.python.org/&lt;br /&gt;
&lt;br /&gt;
===Dependencies that will be required / Installing them from the terminal===&lt;br /&gt;
&amp;lt;!-- Development for Linux / Python / Sugar Newbies! --&amp;gt;&lt;br /&gt;
* sudo apt-get install python-setuptools&lt;br /&gt;
* sudo easy_install pyparsing&lt;br /&gt;
* sudo easy_install peak-rules&lt;br /&gt;
* sudo easy_install sqlalchemy&lt;br /&gt;
&lt;br /&gt;
** Question Authoring guidelines&lt;br /&gt;
** Integrate within lesson planning&lt;br /&gt;
** How does an instructor get the questions they have written/found into an Activity?&lt;br /&gt;
&lt;br /&gt;
* Liase w/ other Math4 teams and Sugarlabs (What would it take to be included in the Sugar core?)&lt;br /&gt;
* Future Development (Needs / Wants — collect proposals from other teams)&lt;br /&gt;
* Discovery / Plugin  (How do activities find questions, i.e. how to get URIs to load questions from?)&lt;br /&gt;
&lt;br /&gt;
===Motivation===&lt;br /&gt;
In the RIT class working on the Math4 projects, many proposed activities&lt;br /&gt;
require a question database of some kind.  A common API or library for&lt;br /&gt;
accessing databases in different formats, stored either locally or remotely,&lt;br /&gt;
along with a simple mechanism to determine more complex formatting or&lt;br /&gt;
presentation than simple text (e.g. to include simple graphics or&lt;br /&gt;
mathematical notation) would cover a majority of the cases where the&lt;br /&gt;
activity needs some configurable &amp;quot;curriculum data&amp;quot;.&lt;br /&gt;
&lt;br /&gt;
Eventually this library could be extended to provide hints, explanations, or&lt;br /&gt;
walkthroughs for questions, in addition to the basic metadata about level,&lt;br /&gt;
grouping, difficulty, and subject matter that would be part of the base&lt;br /&gt;
system.&lt;br /&gt;
&lt;br /&gt;
===Envisioned Usage===&lt;br /&gt;
Consider a simple flash-card-like activity.  It presents a question from a&lt;br /&gt;
list of questions, allows the student to select an answer from the provided&lt;br /&gt;
answers for the question or to enter their own answer.  Then the correct&lt;br /&gt;
answer is revealed and the student it told whether their answer is correct.&lt;br /&gt;
If the question has an explanation of the correct answer, the flash-card&lt;br /&gt;
activity will show the explanation of the correct answer.  (Note that this&lt;br /&gt;
is just a simple usage example, the interaction design of a drilling&lt;br /&gt;
activity could be very different.)&lt;br /&gt;
&lt;br /&gt;
The flash-card activity would use this proposed Quiz API for the following:&lt;br /&gt;
&lt;br /&gt;
* Loading the questions from the storage location into memory. This includes any filtering or network lookup to download the questions from a remote resource and select appropriate questions for the student.&lt;br /&gt;
&lt;br /&gt;
* Determining whether the student has entered a correct answer.&lt;br /&gt;
&lt;br /&gt;
To start with, the library would simply be a time-saving tool for developers&lt;br /&gt;
needing similar functionality, but as the XS (School Server) becomes more&lt;br /&gt;
fully developed the library should integrate the functions provided by the&lt;br /&gt;
XS to enable automated update of course material for the current topic of&lt;br /&gt;
study so the students can drill material using any tool they prefer, while&lt;br /&gt;
still reporting progress to the instructor using the XS services.&lt;br /&gt;
&lt;br /&gt;
===Current Status===&lt;br /&gt;
&lt;br /&gt;
Currently, (14 May 2009) the API supports parsing the GIFT file format well enough to import Multiple Choice and True/False questions, along with complete implementations for basic functionality of the corresponding question objects.  No support for partial credit answers is currently implemented, nor are other question types working correctly (though most can be parsed to some extent).  Export to CSV works as intended, though it is intentionally simple.  Documentation on usage and integration of the API into an activity is in the doc/ directory of [[http://git.sugarlabs.org/projects/question-support-api the repository]]. A simple, but complete usage example, using a console interface is available in tests/complete_test.py.&lt;br /&gt;
&lt;br /&gt;
===Education Standards===&lt;br /&gt;
As a general API and not a standalone Activity, along with the nature of the API in specific, this project does not directly address any specific education standards or learning outcomes.  It is reliant on educators to write questions, or have questions available to them in usable formats.  As such, the potential educational standards this project could help to meet includes **any** standard where drilling or question/response evaluation is appropriate. (This includes a wider range of topic areas than the Math4 focus, even.)&lt;br /&gt;
&lt;br /&gt;
===Milestones===&lt;br /&gt;
;Initial Prototype Phase (1)&lt;br /&gt;
:Simple implementation, data model not yet nailed down, focus on import and utility to question *consumers*, Like Activities. Initial formats to include MoodleXML, GIFT.&lt;br /&gt;
        &lt;br /&gt;
;Rigorous Design Phase (2)&lt;br /&gt;
:Nail down the data model, including developing the &#039;native&#039; format, probably using a sqlite file mechanism, or other database support, if possible. Freeze the Question object (in terms of required properties,        etc.), finalize decisions about URLs for question aquisition.  Make sure requirements of other projects *can* be met by the design at this stage.&lt;br /&gt;
&lt;br /&gt;
;Full Implementation Phase (3)&lt;br /&gt;
:Complete the implementation of the import formats, including the &#039;native&#039; format.  Should be usable to other Activity developers at this point (hopefully useful, before now, but all needs should be filled at this point).  Export implementation should start now, along with prototyping for an authoring activity. (Collaboration with the reporting team *needs* to happen at this point, as the activity will probably be combined with reporting tools.)&lt;br /&gt;
&lt;br /&gt;
;Activity Development Phase (4)&lt;br /&gt;
:Complete the authoring/reporting activity for the teachers, allowing export to file formats (and possibly *serving* the questions to other XOs; requires support in activities (using the API) to support).&lt;br /&gt;
&lt;br /&gt;
===Community Contacts===&lt;br /&gt;
[[User:FGrose]], [[User:Tony37]] (see [[Talk:{{PAGENAMEE}}|talk page]])&lt;br /&gt;
&lt;br /&gt;
===RIT Project Usage===&lt;br /&gt;
{{Definition_table&lt;br /&gt;
|Produce Puzzle| No API need or usage.&lt;br /&gt;
|Lemonade Stand| No API need or usage.&lt;br /&gt;
|Assimilate| API Usage needs documented on [[Talk:{{PAGENAMEE}}|talk page]].  Progress not far enough to start implementation using the API.&lt;br /&gt;
|Fun Towers| No API need or usage.&lt;br /&gt;
|Reporting Team| Simple export format documented at [[{{PAGENAMEE}}/API_Design|API Design]].  Futher integration work would be nice, but there is more work than could be done in a year along these lines (and neither team is prepared to embark on it).&lt;br /&gt;
|Muthris| No contact from? Probably no API need or usage.&lt;br /&gt;
}}&lt;br /&gt;
===See Also===&lt;br /&gt;
{{Special:PrefixIndex/{{PAGENAMEE}}/}}&lt;/div&gt;</summary>
		<author><name>Bbl5660</name></author>
	</entry>
	<entry>
		<id>https://wiki.sugarlabs.org/index.php?title=Math4Team/RIT/Projects/Question_Support_API&amp;diff=29197</id>
		<title>Math4Team/RIT/Projects/Question Support API</title>
		<link rel="alternate" type="text/html" href="https://wiki.sugarlabs.org/index.php?title=Math4Team/RIT/Projects/Question_Support_API&amp;diff=29197"/>
		<updated>2009-05-15T15:44:21Z</updated>

		<summary type="html">&lt;p&gt;Bbl5660: &lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;{{TOCright}}&lt;br /&gt;
==Question Support API==&lt;br /&gt;
===Project Information===&lt;br /&gt;
{{Definition_table&lt;br /&gt;
|Primary Project Contact| [[User:Enimihil|Greg Stevens]]&lt;br /&gt;
|Project Members| [[User:Enimihil|Greg Stevens]], [[User:Jfinney|Jameson Finney]], [[User:Bbl5660|Brian Long]], TODO: Add yourself here...&lt;br /&gt;
|Source Repository| http://git.sugarlabs.org/projects/question-support-api&lt;br /&gt;
}}&lt;br /&gt;
&lt;br /&gt;
===Current Goals===&lt;br /&gt;
&lt;br /&gt;
* Documentation&lt;br /&gt;
** Packaging&lt;br /&gt;
** Documenting Dependencies and how to enable them in a development environment (Simple tutorial on setting up your Question API Development Environment)&lt;br /&gt;
&lt;br /&gt;
===Setting Up a Development Environment (For Newbies)===&lt;br /&gt;
These are links, tutorials and things that [[User:Bbl5660|Brian Long]] has found along the way, as well as help gained from [[User:Enimihil|Greg Stevens]].  Brian is new to the Linux / OpenSource community, and is working on documenting a development environment for &amp;lt;b&amp;gt;you&amp;lt;/b&amp;gt; and for us to continue developing this API.  The small amount of information below is meant to help someone new step into the world of developing for the Sugar environment, from Ubuntu and have all  dependencies and things setup to continue development of this API.  &amp;lt;b&amp;gt;Next&amp;lt;/b&amp;gt; Brian would like to document how to setup these sort of items for [http://wiki.laptop.org/go/Creating_an_activity Activity developers] to include our API and be able to extend it.&lt;br /&gt;
&lt;br /&gt;
* For development environments, you may consider consider first installing a linux OS and the the LAMP stack with PhpMyAdmin.  Brian is choosing Ubuntu, Aptana as a (free) Python IDE that can be used with PyDev to easily allow Python writing.  &lt;br /&gt;
* Links that Brian is relying on at the moment include:&lt;br /&gt;
** http://help.ubuntu.com/community/ApacheMySQLPHP&lt;br /&gt;
** http://www.sqlalchemy.org/docs/04/ormtutorial.html&lt;br /&gt;
** http://docs.python.org/&lt;br /&gt;
&lt;br /&gt;
* Dependencies that are required now, and going forward are&lt;br /&gt;
SQLAlchemy  http://www.sqlalchemy.org/docs/04/ormtutorial.html&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&amp;lt;!-- Development for Linux / Python / Sugar Newbies! --&amp;gt;&lt;br /&gt;
*** sudo apt-get install python-setuptools&lt;br /&gt;
*** sudo easy_install pyparsing&lt;br /&gt;
*** sudo easy_install peak-rules&lt;br /&gt;
*** sudo easy_install sqlalchemy&lt;br /&gt;
**** See here: http://www.sqlalchemy.org/docs/04/ormtutorial.html&lt;br /&gt;
&lt;br /&gt;
** Question Authoring guidelines&lt;br /&gt;
** Integrate within lesson planning&lt;br /&gt;
** How does an instructor get the questions they have written/found into an Activity?&lt;br /&gt;
&lt;br /&gt;
* Liase w/ other Math4 teams and Sugarlabs (What would it take to be included in the Sugar core?)&lt;br /&gt;
* Future Development (Needs / Wants — collect proposals from other teams)&lt;br /&gt;
* Discovery / Plugin  (How do activities find questions, i.e. how to get URIs to load questions from?)&lt;br /&gt;
&lt;br /&gt;
===Motivation===&lt;br /&gt;
In the RIT class working on the Math4 projects, many proposed activities&lt;br /&gt;
require a question database of some kind.  A common API or library for&lt;br /&gt;
accessing databases in different formats, stored either locally or remotely,&lt;br /&gt;
along with a simple mechanism to determine more complex formatting or&lt;br /&gt;
presentation than simple text (e.g. to include simple graphics or&lt;br /&gt;
mathematical notation) would cover a majority of the cases where the&lt;br /&gt;
activity needs some configurable &amp;quot;curriculum data&amp;quot;.&lt;br /&gt;
&lt;br /&gt;
Eventually this library could be extended to provide hints, explanations, or&lt;br /&gt;
walkthroughs for questions, in addition to the basic metadata about level,&lt;br /&gt;
grouping, difficulty, and subject matter that would be part of the base&lt;br /&gt;
system.&lt;br /&gt;
&lt;br /&gt;
===Envisioned Usage===&lt;br /&gt;
Consider a simple flash-card-like activity.  It presents a question from a&lt;br /&gt;
list of questions, allows the student to select an answer from the provided&lt;br /&gt;
answers for the question or to enter their own answer.  Then the correct&lt;br /&gt;
answer is revealed and the student it told whether their answer is correct.&lt;br /&gt;
If the question has an explanation of the correct answer, the flash-card&lt;br /&gt;
activity will show the explanation of the correct answer.  (Note that this&lt;br /&gt;
is just a simple usage example, the interaction design of a drilling&lt;br /&gt;
activity could be very different.)&lt;br /&gt;
&lt;br /&gt;
The flash-card activity would use this proposed Quiz API for the following:&lt;br /&gt;
&lt;br /&gt;
* Loading the questions from the storage location into memory. This includes any filtering or network lookup to download the questions from a remote resource and select appropriate questions for the student.&lt;br /&gt;
&lt;br /&gt;
* Determining whether the student has entered a correct answer.&lt;br /&gt;
&lt;br /&gt;
To start with, the library would simply be a time-saving tool for developers&lt;br /&gt;
needing similar functionality, but as the XS (School Server) becomes more&lt;br /&gt;
fully developed the library should integrate the functions provided by the&lt;br /&gt;
XS to enable automated update of course material for the current topic of&lt;br /&gt;
study so the students can drill material using any tool they prefer, while&lt;br /&gt;
still reporting progress to the instructor using the XS services.&lt;br /&gt;
&lt;br /&gt;
===Current Status===&lt;br /&gt;
&lt;br /&gt;
Currently, (14 May 2009) the API supports parsing the GIFT file format well enough to import Multiple Choice and True/False questions, along with complete implementations for basic functionality of the corresponding question objects.  No support for partial credit answers is currently implemented, nor are other question types working correctly (though most can be parsed to some extent).  Export to CSV works as intended, though it is intentionally simple.  Documentation on usage and integration of the API into an activity is in the doc/ directory of [[http://git.sugarlabs.org/projects/question-support-api the repository]]. A simple, but complete usage example, using a console interface is available in tests/complete_test.py.&lt;br /&gt;
&lt;br /&gt;
===Education Standards===&lt;br /&gt;
As a general API and not a standalone Activity, along with the nature of the API in specific, this project does not directly address any specific education standards or learning outcomes.  It is reliant on educators to write questions, or have questions available to them in usable formats.  As such, the potential educational standards this project could help to meet includes **any** standard where drilling or question/response evaluation is appropriate. (This includes a wider range of topic areas than the Math4 focus, even.)&lt;br /&gt;
&lt;br /&gt;
===Milestones===&lt;br /&gt;
;Initial Prototype Phase (1)&lt;br /&gt;
:Simple implementation, data model not yet nailed down, focus on import and utility to question *consumers*, Like Activities. Initial formats to include MoodleXML, GIFT.&lt;br /&gt;
        &lt;br /&gt;
;Rigorous Design Phase (2)&lt;br /&gt;
:Nail down the data model, including developing the &#039;native&#039; format, probably using a sqlite file mechanism, or other database support, if possible. Freeze the Question object (in terms of required properties,        etc.), finalize decisions about URLs for question aquisition.  Make sure requirements of other projects *can* be met by the design at this stage.&lt;br /&gt;
&lt;br /&gt;
;Full Implementation Phase (3)&lt;br /&gt;
:Complete the implementation of the import formats, including the &#039;native&#039; format.  Should be usable to other Activity developers at this point (hopefully useful, before now, but all needs should be filled at this point).  Export implementation should start now, along with prototyping for an authoring activity. (Collaboration with the reporting team *needs* to happen at this point, as the activity will probably be combined with reporting tools.)&lt;br /&gt;
&lt;br /&gt;
;Activity Development Phase (4)&lt;br /&gt;
:Complete the authoring/reporting activity for the teachers, allowing export to file formats (and possibly *serving* the questions to other XOs; requires support in activities (using the API) to support).&lt;br /&gt;
&lt;br /&gt;
===Community Contacts===&lt;br /&gt;
[[User:FGrose]], [[User:Tony37]] (see [[Talk:{{PAGENAMEE}}|talk page]])&lt;br /&gt;
&lt;br /&gt;
===RIT Project Usage===&lt;br /&gt;
{{Definition_table&lt;br /&gt;
|Produce Puzzle| No API need or usage.&lt;br /&gt;
|Lemonade Stand| No API need or usage.&lt;br /&gt;
|Assimilate| API Usage needs documented on [[Talk:{{PAGENAMEE}}|talk page]].  Progress not far enough to start implementation using the API.&lt;br /&gt;
|Fun Towers| No API need or usage.&lt;br /&gt;
|Reporting Team| Simple export format documented at [[{{PAGENAMEE}}/API_Design|API Design]].  Futher integration work would be nice, but there is more work than could be done in a year along these lines (and neither team is prepared to embark on it).&lt;br /&gt;
|Muthris| No contact from? Probably no API need or usage.&lt;br /&gt;
}}&lt;br /&gt;
===See Also===&lt;br /&gt;
{{Special:PrefixIndex/{{PAGENAMEE}}/}}&lt;/div&gt;</summary>
		<author><name>Bbl5660</name></author>
	</entry>
	<entry>
		<id>https://wiki.sugarlabs.org/index.php?title=Math4Team/RIT/Projects/Question_Support_API&amp;diff=29196</id>
		<title>Math4Team/RIT/Projects/Question Support API</title>
		<link rel="alternate" type="text/html" href="https://wiki.sugarlabs.org/index.php?title=Math4Team/RIT/Projects/Question_Support_API&amp;diff=29196"/>
		<updated>2009-05-15T15:43:42Z</updated>

		<summary type="html">&lt;p&gt;Bbl5660: &lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;{{TOCright}}&lt;br /&gt;
==Question Support API==&lt;br /&gt;
===Project Information===&lt;br /&gt;
{{Definition_table&lt;br /&gt;
|Primary Project Contact| [[User:Enimihil|Greg Stevens]]&lt;br /&gt;
|Project Members| [[User:Enimihil|Greg Stevens]], [[User:Jfinney|Jameson Finney]], [[User:Bbl5660|Brian Long]], TODO: Add yourself here...&lt;br /&gt;
|Source Repository| http://git.sugarlabs.org/projects/question-support-api&lt;br /&gt;
}}&lt;br /&gt;
&lt;br /&gt;
===Current Goals===&lt;br /&gt;
&lt;br /&gt;
* Documentation&lt;br /&gt;
** Packaging&lt;br /&gt;
** Documenting Dependencies and how to enable them in a development environment (Simple tutorial on setting up your Question API Development Environment)&lt;br /&gt;
&lt;br /&gt;
===Setting Up a Development Environment (For Newbies)===&lt;br /&gt;
These are links, tutorials and things that [[User:Bbl5660|Brian Long]] has found along the way, as well as help gained from [[User:Enimihil|Greg Stevens]].  Brian is new to the Linux / OpenSource community, and is working on documenting a development environment for &amp;lt;b&amp;gt;you&amp;lt;/b&amp;gt; and for us to continue developing this API.  The small amount of information below is meant to help someone new step into the world of developing for the Sugar environment, from Ubuntu and have all  dependencies and things setup to continue development of this API.  &amp;lt;b&amp;gt;Next&amp;lt;/b&amp;gt; Brian would like to document how to setup these sort of items for [[http://wiki.laptop.org/go/Creating_an_activity Activity developers]] to include our API and be able to extend it.&lt;br /&gt;
&lt;br /&gt;
* For development environments, you may consider consider first installing a linux OS and the the LAMP stack with PhpMyAdmin.  Brian is choosing Ubuntu, Aptana as a (free) Python IDE that can be used with PyDev to easily allow Python writing.  &lt;br /&gt;
* Links that Brian is relying on at the moment include:&lt;br /&gt;
** http://help.ubuntu.com/community/ApacheMySQLPHP&lt;br /&gt;
** http://www.sqlalchemy.org/docs/04/ormtutorial.html&lt;br /&gt;
** http://docs.python.org/&lt;br /&gt;
&lt;br /&gt;
* Dependencies that are required now, and going forward are&lt;br /&gt;
SQLAlchemy  http://www.sqlalchemy.org/docs/04/ormtutorial.html&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&amp;lt;!-- Development for Linux / Python / Sugar Newbies! --&amp;gt;&lt;br /&gt;
*** sudo apt-get install python-setuptools&lt;br /&gt;
*** sudo easy_install pyparsing&lt;br /&gt;
*** sudo easy_install peak-rules&lt;br /&gt;
*** sudo easy_install sqlalchemy&lt;br /&gt;
**** See here: http://www.sqlalchemy.org/docs/04/ormtutorial.html&lt;br /&gt;
&lt;br /&gt;
** Question Authoring guidelines&lt;br /&gt;
** Integrate within lesson planning&lt;br /&gt;
** How does an instructor get the questions they have written/found into an Activity?&lt;br /&gt;
&lt;br /&gt;
* Liase w/ other Math4 teams and Sugarlabs (What would it take to be included in the Sugar core?)&lt;br /&gt;
* Future Development (Needs / Wants — collect proposals from other teams)&lt;br /&gt;
* Discovery / Plugin  (How do activities find questions, i.e. how to get URIs to load questions from?)&lt;br /&gt;
&lt;br /&gt;
===Motivation===&lt;br /&gt;
In the RIT class working on the Math4 projects, many proposed activities&lt;br /&gt;
require a question database of some kind.  A common API or library for&lt;br /&gt;
accessing databases in different formats, stored either locally or remotely,&lt;br /&gt;
along with a simple mechanism to determine more complex formatting or&lt;br /&gt;
presentation than simple text (e.g. to include simple graphics or&lt;br /&gt;
mathematical notation) would cover a majority of the cases where the&lt;br /&gt;
activity needs some configurable &amp;quot;curriculum data&amp;quot;.&lt;br /&gt;
&lt;br /&gt;
Eventually this library could be extended to provide hints, explanations, or&lt;br /&gt;
walkthroughs for questions, in addition to the basic metadata about level,&lt;br /&gt;
grouping, difficulty, and subject matter that would be part of the base&lt;br /&gt;
system.&lt;br /&gt;
&lt;br /&gt;
===Envisioned Usage===&lt;br /&gt;
Consider a simple flash-card-like activity.  It presents a question from a&lt;br /&gt;
list of questions, allows the student to select an answer from the provided&lt;br /&gt;
answers for the question or to enter their own answer.  Then the correct&lt;br /&gt;
answer is revealed and the student it told whether their answer is correct.&lt;br /&gt;
If the question has an explanation of the correct answer, the flash-card&lt;br /&gt;
activity will show the explanation of the correct answer.  (Note that this&lt;br /&gt;
is just a simple usage example, the interaction design of a drilling&lt;br /&gt;
activity could be very different.)&lt;br /&gt;
&lt;br /&gt;
The flash-card activity would use this proposed Quiz API for the following:&lt;br /&gt;
&lt;br /&gt;
* Loading the questions from the storage location into memory. This includes any filtering or network lookup to download the questions from a remote resource and select appropriate questions for the student.&lt;br /&gt;
&lt;br /&gt;
* Determining whether the student has entered a correct answer.&lt;br /&gt;
&lt;br /&gt;
To start with, the library would simply be a time-saving tool for developers&lt;br /&gt;
needing similar functionality, but as the XS (School Server) becomes more&lt;br /&gt;
fully developed the library should integrate the functions provided by the&lt;br /&gt;
XS to enable automated update of course material for the current topic of&lt;br /&gt;
study so the students can drill material using any tool they prefer, while&lt;br /&gt;
still reporting progress to the instructor using the XS services.&lt;br /&gt;
&lt;br /&gt;
===Current Status===&lt;br /&gt;
&lt;br /&gt;
Currently, (14 May 2009) the API supports parsing the GIFT file format well enough to import Multiple Choice and True/False questions, along with complete implementations for basic functionality of the corresponding question objects.  No support for partial credit answers is currently implemented, nor are other question types working correctly (though most can be parsed to some extent).  Export to CSV works as intended, though it is intentionally simple.  Documentation on usage and integration of the API into an activity is in the doc/ directory of [[http://git.sugarlabs.org/projects/question-support-api the repository]]. A simple, but complete usage example, using a console interface is available in tests/complete_test.py.&lt;br /&gt;
&lt;br /&gt;
===Education Standards===&lt;br /&gt;
As a general API and not a standalone Activity, along with the nature of the API in specific, this project does not directly address any specific education standards or learning outcomes.  It is reliant on educators to write questions, or have questions available to them in usable formats.  As such, the potential educational standards this project could help to meet includes **any** standard where drilling or question/response evaluation is appropriate. (This includes a wider range of topic areas than the Math4 focus, even.)&lt;br /&gt;
&lt;br /&gt;
===Milestones===&lt;br /&gt;
;Initial Prototype Phase (1)&lt;br /&gt;
:Simple implementation, data model not yet nailed down, focus on import and utility to question *consumers*, Like Activities. Initial formats to include MoodleXML, GIFT.&lt;br /&gt;
        &lt;br /&gt;
;Rigorous Design Phase (2)&lt;br /&gt;
:Nail down the data model, including developing the &#039;native&#039; format, probably using a sqlite file mechanism, or other database support, if possible. Freeze the Question object (in terms of required properties,        etc.), finalize decisions about URLs for question aquisition.  Make sure requirements of other projects *can* be met by the design at this stage.&lt;br /&gt;
&lt;br /&gt;
;Full Implementation Phase (3)&lt;br /&gt;
:Complete the implementation of the import formats, including the &#039;native&#039; format.  Should be usable to other Activity developers at this point (hopefully useful, before now, but all needs should be filled at this point).  Export implementation should start now, along with prototyping for an authoring activity. (Collaboration with the reporting team *needs* to happen at this point, as the activity will probably be combined with reporting tools.)&lt;br /&gt;
&lt;br /&gt;
;Activity Development Phase (4)&lt;br /&gt;
:Complete the authoring/reporting activity for the teachers, allowing export to file formats (and possibly *serving* the questions to other XOs; requires support in activities (using the API) to support).&lt;br /&gt;
&lt;br /&gt;
===Community Contacts===&lt;br /&gt;
[[User:FGrose]], [[User:Tony37]] (see [[Talk:{{PAGENAMEE}}|talk page]])&lt;br /&gt;
&lt;br /&gt;
===RIT Project Usage===&lt;br /&gt;
{{Definition_table&lt;br /&gt;
|Produce Puzzle| No API need or usage.&lt;br /&gt;
|Lemonade Stand| No API need or usage.&lt;br /&gt;
|Assimilate| API Usage needs documented on [[Talk:{{PAGENAMEE}}|talk page]].  Progress not far enough to start implementation using the API.&lt;br /&gt;
|Fun Towers| No API need or usage.&lt;br /&gt;
|Reporting Team| Simple export format documented at [[{{PAGENAMEE}}/API_Design|API Design]].  Futher integration work would be nice, but there is more work than could be done in a year along these lines (and neither team is prepared to embark on it).&lt;br /&gt;
|Muthris| No contact from? Probably no API need or usage.&lt;br /&gt;
}}&lt;br /&gt;
===See Also===&lt;br /&gt;
{{Special:PrefixIndex/{{PAGENAMEE}}/}}&lt;/div&gt;</summary>
		<author><name>Bbl5660</name></author>
	</entry>
	<entry>
		<id>https://wiki.sugarlabs.org/index.php?title=Math4Team/RIT/Projects/Question_Support_API&amp;diff=29195</id>
		<title>Math4Team/RIT/Projects/Question Support API</title>
		<link rel="alternate" type="text/html" href="https://wiki.sugarlabs.org/index.php?title=Math4Team/RIT/Projects/Question_Support_API&amp;diff=29195"/>
		<updated>2009-05-15T15:42:37Z</updated>

		<summary type="html">&lt;p&gt;Bbl5660: &lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;{{TOCright}}&lt;br /&gt;
==Question Support API==&lt;br /&gt;
===Project Information===&lt;br /&gt;
{{Definition_table&lt;br /&gt;
|Primary Project Contact| [[User:Enimihil|Greg Stevens]]&lt;br /&gt;
|Project Members| [[User:Enimihil|Greg Stevens]], [[User:Jfinney|Jameson Finney]], [[User:Bbl5660|Brian Long]], TODO: Add yourself here...&lt;br /&gt;
|Source Repository| http://git.sugarlabs.org/projects/question-support-api&lt;br /&gt;
}}&lt;br /&gt;
&lt;br /&gt;
===Current Goals===&lt;br /&gt;
&lt;br /&gt;
* Documentation&lt;br /&gt;
** Packaging&lt;br /&gt;
** Documenting Dependencies and how to enable them in a development environment (Simple tutorial on setting up your Question API Development Environment)&lt;br /&gt;
&lt;br /&gt;
===Setting Up a Development Environment (For Newbies)===&lt;br /&gt;
These are links, tutorials and things that [[User:Bbl5660|Brian Long]] has found along the way, as well as help gained from [[User:Enimihil|Greg Stevens]].  Brian is new to the Linux / OpenSource community, and is working on documenting a development environment for &amp;lt;b&amp;gt;you&amp;lt;/b&amp;gt; and for us to continue developing this API.  The small amount of information below is meant to help someone new step into the world of developing for the Sugar environment, from Ubuntu and have all  dependencies and things setup to continue development of this API.  &amp;lt;b&amp;gt;Next&amp;lt;/b&amp;gt; Brian would like to document how to setup these sort of items for [http://wiki.laptop.org/go/Creating_an_activity | Activity developers] to include our API and be able to extend it.&lt;br /&gt;
&lt;br /&gt;
* For development environments, you may consider consider first installing a linux OS and the the LAMP stack with PhpMyAdmin.  Brian is choosing Ubuntu, Aptana as a (free) Python IDE that can be used with PyDev to easily allow Python writing.  &lt;br /&gt;
* Links that Brian is relying on at the moment include:&lt;br /&gt;
** http://help.ubuntu.com/community/ApacheMySQLPHP&lt;br /&gt;
** http://www.sqlalchemy.org/docs/04/ormtutorial.html&lt;br /&gt;
** http://docs.python.org/&lt;br /&gt;
&lt;br /&gt;
* Dependencies that are required now, and going forward are&lt;br /&gt;
SQLAlchemy  http://www.sqlalchemy.org/docs/04/ormtutorial.html&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&amp;lt;!-- Development for Linux / Python / Sugar Newbies! --&amp;gt;&lt;br /&gt;
*** sudo apt-get install python-setuptools&lt;br /&gt;
*** sudo easy_install pyparsing&lt;br /&gt;
*** sudo easy_install peak-rules&lt;br /&gt;
*** sudo easy_install sqlalchemy&lt;br /&gt;
**** See here: http://www.sqlalchemy.org/docs/04/ormtutorial.html&lt;br /&gt;
&lt;br /&gt;
** Question Authoring guidelines&lt;br /&gt;
** Integrate within lesson planning&lt;br /&gt;
** How does an instructor get the questions they have written/found into an Activity?&lt;br /&gt;
&lt;br /&gt;
* Liase w/ other Math4 teams and Sugarlabs (What would it take to be included in the Sugar core?)&lt;br /&gt;
* Future Development (Needs / Wants — collect proposals from other teams)&lt;br /&gt;
* Discovery / Plugin  (How do activities find questions, i.e. how to get URIs to load questions from?)&lt;br /&gt;
&lt;br /&gt;
===Motivation===&lt;br /&gt;
In the RIT class working on the Math4 projects, many proposed activities&lt;br /&gt;
require a question database of some kind.  A common API or library for&lt;br /&gt;
accessing databases in different formats, stored either locally or remotely,&lt;br /&gt;
along with a simple mechanism to determine more complex formatting or&lt;br /&gt;
presentation than simple text (e.g. to include simple graphics or&lt;br /&gt;
mathematical notation) would cover a majority of the cases where the&lt;br /&gt;
activity needs some configurable &amp;quot;curriculum data&amp;quot;.&lt;br /&gt;
&lt;br /&gt;
Eventually this library could be extended to provide hints, explanations, or&lt;br /&gt;
walkthroughs for questions, in addition to the basic metadata about level,&lt;br /&gt;
grouping, difficulty, and subject matter that would be part of the base&lt;br /&gt;
system.&lt;br /&gt;
&lt;br /&gt;
===Envisioned Usage===&lt;br /&gt;
Consider a simple flash-card-like activity.  It presents a question from a&lt;br /&gt;
list of questions, allows the student to select an answer from the provided&lt;br /&gt;
answers for the question or to enter their own answer.  Then the correct&lt;br /&gt;
answer is revealed and the student it told whether their answer is correct.&lt;br /&gt;
If the question has an explanation of the correct answer, the flash-card&lt;br /&gt;
activity will show the explanation of the correct answer.  (Note that this&lt;br /&gt;
is just a simple usage example, the interaction design of a drilling&lt;br /&gt;
activity could be very different.)&lt;br /&gt;
&lt;br /&gt;
The flash-card activity would use this proposed Quiz API for the following:&lt;br /&gt;
&lt;br /&gt;
* Loading the questions from the storage location into memory. This includes any filtering or network lookup to download the questions from a remote resource and select appropriate questions for the student.&lt;br /&gt;
&lt;br /&gt;
* Determining whether the student has entered a correct answer.&lt;br /&gt;
&lt;br /&gt;
To start with, the library would simply be a time-saving tool for developers&lt;br /&gt;
needing similar functionality, but as the XS (School Server) becomes more&lt;br /&gt;
fully developed the library should integrate the functions provided by the&lt;br /&gt;
XS to enable automated update of course material for the current topic of&lt;br /&gt;
study so the students can drill material using any tool they prefer, while&lt;br /&gt;
still reporting progress to the instructor using the XS services.&lt;br /&gt;
&lt;br /&gt;
===Current Status===&lt;br /&gt;
&lt;br /&gt;
Currently, (14 May 2009) the API supports parsing the GIFT file format well enough to import Multiple Choice and True/False questions, along with complete implementations for basic functionality of the corresponding question objects.  No support for partial credit answers is currently implemented, nor are other question types working correctly (though most can be parsed to some extent).  Export to CSV works as intended, though it is intentionally simple.  Documentation on usage and integration of the API into an activity is in the doc/ directory of [[http://git.sugarlabs.org/projects/question-support-api the repository]]. A simple, but complete usage example, using a console interface is available in tests/complete_test.py.&lt;br /&gt;
&lt;br /&gt;
===Education Standards===&lt;br /&gt;
As a general API and not a standalone Activity, along with the nature of the API in specific, this project does not directly address any specific education standards or learning outcomes.  It is reliant on educators to write questions, or have questions available to them in usable formats.  As such, the potential educational standards this project could help to meet includes **any** standard where drilling or question/response evaluation is appropriate. (This includes a wider range of topic areas than the Math4 focus, even.)&lt;br /&gt;
&lt;br /&gt;
===Milestones===&lt;br /&gt;
;Initial Prototype Phase (1)&lt;br /&gt;
:Simple implementation, data model not yet nailed down, focus on import and utility to question *consumers*, Like Activities. Initial formats to include MoodleXML, GIFT.&lt;br /&gt;
        &lt;br /&gt;
;Rigorous Design Phase (2)&lt;br /&gt;
:Nail down the data model, including developing the &#039;native&#039; format, probably using a sqlite file mechanism, or other database support, if possible. Freeze the Question object (in terms of required properties,        etc.), finalize decisions about URLs for question aquisition.  Make sure requirements of other projects *can* be met by the design at this stage.&lt;br /&gt;
&lt;br /&gt;
;Full Implementation Phase (3)&lt;br /&gt;
:Complete the implementation of the import formats, including the &#039;native&#039; format.  Should be usable to other Activity developers at this point (hopefully useful, before now, but all needs should be filled at this point).  Export implementation should start now, along with prototyping for an authoring activity. (Collaboration with the reporting team *needs* to happen at this point, as the activity will probably be combined with reporting tools.)&lt;br /&gt;
&lt;br /&gt;
;Activity Development Phase (4)&lt;br /&gt;
:Complete the authoring/reporting activity for the teachers, allowing export to file formats (and possibly *serving* the questions to other XOs; requires support in activities (using the API) to support).&lt;br /&gt;
&lt;br /&gt;
===Community Contacts===&lt;br /&gt;
[[User:FGrose]], [[User:Tony37]] (see [[Talk:{{PAGENAMEE}}|talk page]])&lt;br /&gt;
&lt;br /&gt;
===RIT Project Usage===&lt;br /&gt;
{{Definition_table&lt;br /&gt;
|Produce Puzzle| No API need or usage.&lt;br /&gt;
|Lemonade Stand| No API need or usage.&lt;br /&gt;
|Assimilate| API Usage needs documented on [[Talk:{{PAGENAMEE}}|talk page]].  Progress not far enough to start implementation using the API.&lt;br /&gt;
|Fun Towers| No API need or usage.&lt;br /&gt;
|Reporting Team| Simple export format documented at [[{{PAGENAMEE}}/API_Design|API Design]].  Futher integration work would be nice, but there is more work than could be done in a year along these lines (and neither team is prepared to embark on it).&lt;br /&gt;
|Muthris| No contact from? Probably no API need or usage.&lt;br /&gt;
}}&lt;br /&gt;
===See Also===&lt;br /&gt;
{{Special:PrefixIndex/{{PAGENAMEE}}/}}&lt;/div&gt;</summary>
		<author><name>Bbl5660</name></author>
	</entry>
	<entry>
		<id>https://wiki.sugarlabs.org/index.php?title=Sugar_Summer_Program&amp;diff=29194</id>
		<title>Sugar Summer Program</title>
		<link rel="alternate" type="text/html" href="https://wiki.sugarlabs.org/index.php?title=Sugar_Summer_Program&amp;diff=29194"/>
		<updated>2009-05-15T15:41:46Z</updated>

		<summary type="html">&lt;p&gt;Bbl5660: &lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;&amp;lt;noinclude&amp;gt;{{ GoogleTrans-en | es =show | bg =show | zh-CN =show | zh-TW =show | hr =show | cs =show | da =show | nl =show | fi =show | fr =show | de =show | el =show | hi =show | it =show | ja =show | ko =show | no =show | pl =show | pt =show | ro =show | ru =show | sv =show }}&lt;br /&gt;
{{TeamHeader|Sugar Summer Program|xbgColor=ffe792|roadmap_link=Ideas|roadmap_label=Ideas}}&amp;lt;/noinclude&amp;gt;{{TOCright}}&lt;br /&gt;
&lt;br /&gt;
See http://www.mail-archive.com/iaep@lists.sugarlabs.org/msg04163.html for background and reference;&amp;lt;br&amp;gt;&lt;br /&gt;
also, http://www.mail-archive.com/iaep@lists.sugarlabs.org/msg04201.html.&lt;br /&gt;
&lt;br /&gt;
This venture will depend on creative, community support and the cooperative spirit of participants.  Please join and  &#039;&#039;&#039;[[/Ideas|contribute ideas here]]&#039;&#039;&#039;, on this page, and on the [http://lists.sugarlabs.org/listinfo/iaep It&#039;s an Education Project] mailing list.&lt;br /&gt;
&lt;br /&gt;
==Sugar Institute Vision==&lt;br /&gt;
* Fill a house with design students, education students, and computer science students all coming together to work on Sugar.&lt;br /&gt;
* Something with work and living space for about 20 people to come together to work together for brief periods (a couple of weeks to a couple of months).&lt;br /&gt;
* It could be used for training deployment teams, some weeks for hackers to work together, some weeks....&lt;br /&gt;
* It could become a place for deployments and deployers to hire Sugar developers and designers for specific tasks.&lt;br /&gt;
* Flophouse, or Sugar Shack, would be a precursor to an Institute to see if this is something that is useful, cost effective, and manageable.&lt;br /&gt;
* Sugar Labs would be a technical sponsor.&lt;br /&gt;
* Give smart, passionate students, who might not be familiar with open source and community development, a chance to immerse themselves in the culture.&lt;br /&gt;
* Provide a catalyst for small groups, loosely affiliated with Sugar Labs, to form, and work on interesting projects that might feed back upstream.&lt;br /&gt;
&lt;br /&gt;
==[http://www.rit.edu/ RIT] FOSS Co-op Vision==&lt;br /&gt;
[http://www.rit.edu/ Rochester Institute of Technology, RIT], Rochester, New York, USA&lt;br /&gt;
* Modeled after http://www.hfoss.org/index.php?page=hfoss-summer-institute&lt;br /&gt;
* Support students such as those in [[olpc:RIT honors seminar, developing for the OLPC XO]] working on [[Math4Team/RIT]] who want to continue or earn required RIT Co-op credits.&lt;br /&gt;
* 350-hour work commitment by students per term.&lt;br /&gt;
* External to RIT Co-op program Supervisor(s) to oversee and grade the student work.&lt;br /&gt;
* Prefer that students locate in Rochester, NY rather than disperse. (distance co-ops an option)&lt;br /&gt;
* Paid positions when funding is available, unpaid otherwise (Student&#039;s must commit to documenting their work before leaving for a paid position).&lt;br /&gt;
* Collaborating with students that will be working on independent studies, see [[User:Bbl5660|Brian Long]] , [[User:Classclownfish|Abbi Honeycutt]] and etc.&lt;br /&gt;
&lt;br /&gt;
==Opportunity==&lt;br /&gt;
* Serve both visions in a co-sponsored, 2009 Sugar Summer Co-op program.&lt;br /&gt;
* A hybrid operation with RIT students and other interested parties would be possible.&lt;br /&gt;
* Find financial sponsors.&lt;br /&gt;
*:Sugar Labs is not currently able to provide financial support except through [[Sugar Labs/Donate|community donations]].&lt;br /&gt;
** optionally, associate with [http://www.hfoss.org/ H-FOSS].&lt;br /&gt;
** self sponsor, when possible.&lt;br /&gt;
* Use RIT Resources&lt;br /&gt;
** Laboratory, office, and meeting spaces&lt;br /&gt;
** Faculty for special projects&lt;br /&gt;
** optionally: campus housing for room and board (One could get housing and a full meal plan at RIT for something like $2500-$3500 for the summer. &#039;&#039;&#039;BUT&#039;&#039;&#039;, application deadlines have passed; though, a group application exception may be possible.)&lt;br /&gt;
* Use Rochester/Upstate New York Resources&lt;br /&gt;
** [[olpc:OLPC_Rochester,_NY| Rochester, NY Special Interest Group]] and http://www.lugor.org/.&lt;br /&gt;
** Local schools, colleges, and universities&lt;br /&gt;
** Other local institutions...&lt;br /&gt;
** [http://www.visitrochester.com/ Local] &amp;amp; [http://www.iloveny.com/home.aspx Regional] resources for the social calendar.&lt;br /&gt;
* Room and Board&lt;br /&gt;
** optionally: RIT campus housing for room and board (Application deadlines have passed, but a group application exception may be possible.)&lt;br /&gt;
** optionally: solicit Sponsor homes, like for exchange students, for those that might prefer or can&#039;t afford the other options.&lt;br /&gt;
*** a community support option for interested families&lt;br /&gt;
*** perhaps sponsors could invite appropriately-sized groups to summer cottages or vacation homes for reflective weekends or short, get-away periods.&lt;br /&gt;
** Rochester local housing: $900-1,000/month for a 3 bedroom house $1400-1600/month for a four, etc.&lt;br /&gt;
==Regional Institutes==&lt;br /&gt;
* Rochester, New York, USA (see above)&lt;br /&gt;
* Barre, Vermont, USA with Paul Flint, http://www.mail-archive.com/iaep@lists.sugarlabs.org/msg04175.html&lt;br /&gt;
*&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
[[Category:Project]]&lt;/div&gt;</summary>
		<author><name>Bbl5660</name></author>
	</entry>
	<entry>
		<id>https://wiki.sugarlabs.org/index.php?title=Sugar_Summer_Program&amp;diff=29193</id>
		<title>Sugar Summer Program</title>
		<link rel="alternate" type="text/html" href="https://wiki.sugarlabs.org/index.php?title=Sugar_Summer_Program&amp;diff=29193"/>
		<updated>2009-05-15T15:40:45Z</updated>

		<summary type="html">&lt;p&gt;Bbl5660: &lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;&amp;lt;noinclude&amp;gt;{{ GoogleTrans-en | es =show | bg =show | zh-CN =show | zh-TW =show | hr =show | cs =show | da =show | nl =show | fi =show | fr =show | de =show | el =show | hi =show | it =show | ja =show | ko =show | no =show | pl =show | pt =show | ro =show | ru =show | sv =show }}&lt;br /&gt;
{{TeamHeader|Sugar Summer Program|xbgColor=ffe792|roadmap_link=Ideas|roadmap_label=Ideas}}&amp;lt;/noinclude&amp;gt;{{TOCright}}&lt;br /&gt;
&lt;br /&gt;
See http://www.mail-archive.com/iaep@lists.sugarlabs.org/msg04163.html for background and reference;&amp;lt;br&amp;gt;&lt;br /&gt;
also, http://www.mail-archive.com/iaep@lists.sugarlabs.org/msg04201.html.&lt;br /&gt;
&lt;br /&gt;
This venture will depend on creative, community support and the cooperative spirit of participants.  Please join and  &#039;&#039;&#039;[[/Ideas|contribute ideas here]]&#039;&#039;&#039;, on this page, and on the [http://lists.sugarlabs.org/listinfo/iaep It&#039;s an Education Project] mailing list.&lt;br /&gt;
&lt;br /&gt;
==Sugar Institute Vision==&lt;br /&gt;
* Fill a house with design students, education students, and computer science students all coming together to work on Sugar.&lt;br /&gt;
* Something with work and living space for about 20 people to come together to work together for brief periods (a couple of weeks to a couple of months).&lt;br /&gt;
* It could be used for training deployment teams, some weeks for hackers to work together, some weeks....&lt;br /&gt;
* It could become a place for deployments and deployers to hire Sugar developers and designers for specific tasks.&lt;br /&gt;
* Flophouse, or Sugar Shack, would be a precursor to an Institute to see if this is something that is useful, cost effective, and manageable.&lt;br /&gt;
* Sugar Labs would be a technical sponsor.&lt;br /&gt;
* Give smart, passionate students, who might not be familiar with open source and community development, a chance to immerse themselves in the culture.&lt;br /&gt;
* Provide a catalyst for small groups, loosely affiliated with Sugar Labs, to form, and work on interesting projects that might feed back upstream.&lt;br /&gt;
&lt;br /&gt;
==[http://www.rit.edu/ RIT] FOSS Co-op Vision==&lt;br /&gt;
[http://www.rit.edu/ Rochester Institute of Technology, RIT], Rochester, New York, USA&lt;br /&gt;
* Modeled after http://www.hfoss.org/index.php?page=hfoss-summer-institute&lt;br /&gt;
* Support students such as those in [[olpc:RIT honors seminar, developing for the OLPC XO]] working on [[Math4Team/RIT]] who want to continue or earn required RIT Co-op credits.&lt;br /&gt;
* 350-hour work commitment by students per term.&lt;br /&gt;
* External to RIT Co-op program Supervisor(s) to oversee and grade the student work.&lt;br /&gt;
* Prefer that students locate in Rochester, NY rather than disperse. (distance co-ops an option)&lt;br /&gt;
* Paid positions when funding is available, unpaid otherwise (Student&#039;s must commit to documenting their work before leaving for a paid position).&lt;br /&gt;
* Collaborating with students that will be working on independent studies, see [[User:Bbl5660|Brian Long]] , [[Classclownfish|Abbi Honeycutt]] and etc.&lt;br /&gt;
&lt;br /&gt;
==Opportunity==&lt;br /&gt;
* Serve both visions in a co-sponsored, 2009 Sugar Summer Co-op program.&lt;br /&gt;
* A hybrid operation with RIT students and other interested parties would be possible.&lt;br /&gt;
* Find financial sponsors.&lt;br /&gt;
*:Sugar Labs is not currently able to provide financial support except through [[Sugar Labs/Donate|community donations]].&lt;br /&gt;
** optionally, associate with [http://www.hfoss.org/ H-FOSS].&lt;br /&gt;
** self sponsor, when possible.&lt;br /&gt;
* Use RIT Resources&lt;br /&gt;
** Laboratory, office, and meeting spaces&lt;br /&gt;
** Faculty for special projects&lt;br /&gt;
** optionally: campus housing for room and board (One could get housing and a full meal plan at RIT for something like $2500-$3500 for the summer. &#039;&#039;&#039;BUT&#039;&#039;&#039;, application deadlines have passed; though, a group application exception may be possible.)&lt;br /&gt;
* Use Rochester/Upstate New York Resources&lt;br /&gt;
** [[olpc:OLPC_Rochester,_NY| Rochester, NY Special Interest Group]] and http://www.lugor.org/.&lt;br /&gt;
** Local schools, colleges, and universities&lt;br /&gt;
** Other local institutions...&lt;br /&gt;
** [http://www.visitrochester.com/ Local] &amp;amp; [http://www.iloveny.com/home.aspx Regional] resources for the social calendar.&lt;br /&gt;
* Room and Board&lt;br /&gt;
** optionally: RIT campus housing for room and board (Application deadlines have passed, but a group application exception may be possible.)&lt;br /&gt;
** optionally: solicit Sponsor homes, like for exchange students, for those that might prefer or can&#039;t afford the other options.&lt;br /&gt;
*** a community support option for interested families&lt;br /&gt;
*** perhaps sponsors could invite appropriately-sized groups to summer cottages or vacation homes for reflective weekends or short, get-away periods.&lt;br /&gt;
** Rochester local housing: $900-1,000/month for a 3 bedroom house $1400-1600/month for a four, etc.&lt;br /&gt;
==Regional Institutes==&lt;br /&gt;
* Rochester, New York, USA (see above)&lt;br /&gt;
* Barre, Vermont, USA with Paul Flint, http://www.mail-archive.com/iaep@lists.sugarlabs.org/msg04175.html&lt;br /&gt;
*&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
[[Category:Project]]&lt;/div&gt;</summary>
		<author><name>Bbl5660</name></author>
	</entry>
	<entry>
		<id>https://wiki.sugarlabs.org/index.php?title=Math4Team/RIT/Projects/Question_Support_API&amp;diff=29190</id>
		<title>Math4Team/RIT/Projects/Question Support API</title>
		<link rel="alternate" type="text/html" href="https://wiki.sugarlabs.org/index.php?title=Math4Team/RIT/Projects/Question_Support_API&amp;diff=29190"/>
		<updated>2009-05-15T15:11:04Z</updated>

		<summary type="html">&lt;p&gt;Bbl5660: &lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;{{TOCright}}&lt;br /&gt;
==Question Support API==&lt;br /&gt;
===Project Information===&lt;br /&gt;
{{Definition_table&lt;br /&gt;
|Primary Project Contact| [[User:Enimihil|Greg Stevens]]&lt;br /&gt;
|Project Members| [[User:Enimihil|Greg Stevens]], [[User:Jfinney|Jameson Finney]], [[User:Bbl5660|Brian Long]], TODO: Add yourself here...&lt;br /&gt;
|Source Repository| http://git.sugarlabs.org/projects/question-support-api&lt;br /&gt;
}}&lt;br /&gt;
&lt;br /&gt;
===Current Goals===&lt;br /&gt;
&lt;br /&gt;
* Documentation&lt;br /&gt;
** Packaging&lt;br /&gt;
** Documenting Dependencies and how to enable them in a development environment (Simple tutorial on setting up your Question API Development Environment)&lt;br /&gt;
&lt;br /&gt;
===Setting Up a Development Environment (For Newbies)===&lt;br /&gt;
These are links, tutorials and things that [[User:Bbl5660|Brian Long]] has found along the way, as well as help gained from [[User:Enimihil|Greg Stevens]].  Brian is new to the Linux / OpenSource community, and is working on documenting a development environment for &amp;lt;b&amp;gt;you&amp;lt;/b&amp;gt; and for us to continue developing this API.  The small amount of information below is meant to help someone new step into the world of developing for the Sugar environment, from Ubuntu and have all  dependencies and things setup to continue development of this API.  &amp;lt;b&amp;gt;Next&amp;lt;/b&amp;gt; Brian would like to document how to setup these sort of items for Activity developers to include our API and be able to extend it.&lt;br /&gt;
&lt;br /&gt;
* For development environments, you may consider consider first installing a linux OS and the the LAMP stack with PhpMyAdmin.  Brian is choosing Ubuntu, Aptana as a (free) Python IDE that can be used with PyDev to easily allow Python writing.  &lt;br /&gt;
* Links that Brian is relying on at the moment include:&lt;br /&gt;
** http://help.ubuntu.com/community/ApacheMySQLPHP&lt;br /&gt;
** http://www.sqlalchemy.org/docs/04/ormtutorial.html&lt;br /&gt;
** http://docs.python.org/&lt;br /&gt;
&lt;br /&gt;
* Dependencies that are required now, and going forward are&lt;br /&gt;
SQLAlchemy  http://www.sqlalchemy.org/docs/04/ormtutorial.html&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&amp;lt;!-- Development for Linux / Python / Sugar Newbies! --&amp;gt;&lt;br /&gt;
*** sudo apt-get install python-setuptools&lt;br /&gt;
*** sudo easy_install pyparsing&lt;br /&gt;
*** sudo easy_install peak-rules&lt;br /&gt;
*** sudo easy_install sqlalchemy&lt;br /&gt;
**** See here: http://www.sqlalchemy.org/docs/04/ormtutorial.html&lt;br /&gt;
&lt;br /&gt;
** Question Authoring guidelines&lt;br /&gt;
** Integrate within lesson planning&lt;br /&gt;
** How does an instructor get the questions they have written/found into an Activity?&lt;br /&gt;
&lt;br /&gt;
* Liase w/ other Math4 teams and Sugarlabs (What would it take to be included in the Sugar core?)&lt;br /&gt;
* Future Development (Needs / Wants — collect proposals from other teams)&lt;br /&gt;
* Discovery / Plugin  (How do activities find questions, i.e. how to get URIs to load questions from?)&lt;br /&gt;
&lt;br /&gt;
===Motivation===&lt;br /&gt;
In the RIT class working on the Math4 projects, many proposed activities&lt;br /&gt;
require a question database of some kind.  A common API or library for&lt;br /&gt;
accessing databases in different formats, stored either locally or remotely,&lt;br /&gt;
along with a simple mechanism to determine more complex formatting or&lt;br /&gt;
presentation than simple text (e.g. to include simple graphics or&lt;br /&gt;
mathematical notation) would cover a majority of the cases where the&lt;br /&gt;
activity needs some configurable &amp;quot;curriculum data&amp;quot;.&lt;br /&gt;
&lt;br /&gt;
Eventually this library could be extended to provide hints, explanations, or&lt;br /&gt;
walkthroughs for questions, in addition to the basic metadata about level,&lt;br /&gt;
grouping, difficulty, and subject matter that would be part of the base&lt;br /&gt;
system.&lt;br /&gt;
&lt;br /&gt;
===Envisioned Usage===&lt;br /&gt;
Consider a simple flash-card-like activity.  It presents a question from a&lt;br /&gt;
list of questions, allows the student to select an answer from the provided&lt;br /&gt;
answers for the question or to enter their own answer.  Then the correct&lt;br /&gt;
answer is revealed and the student it told whether their answer is correct.&lt;br /&gt;
If the question has an explanation of the correct answer, the flash-card&lt;br /&gt;
activity will show the explanation of the correct answer.  (Note that this&lt;br /&gt;
is just a simple usage example, the interaction design of a drilling&lt;br /&gt;
activity could be very different.)&lt;br /&gt;
&lt;br /&gt;
The flash-card activity would use this proposed Quiz API for the following:&lt;br /&gt;
&lt;br /&gt;
* Loading the questions from the storage location into memory. This includes any filtering or network lookup to download the questions from a remote resource and select appropriate questions for the student.&lt;br /&gt;
&lt;br /&gt;
* Determining whether the student has entered a correct answer.&lt;br /&gt;
&lt;br /&gt;
To start with, the library would simply be a time-saving tool for developers&lt;br /&gt;
needing similar functionality, but as the XS (School Server) becomes more&lt;br /&gt;
fully developed the library should integrate the functions provided by the&lt;br /&gt;
XS to enable automated update of course material for the current topic of&lt;br /&gt;
study so the students can drill material using any tool they prefer, while&lt;br /&gt;
still reporting progress to the instructor using the XS services.&lt;br /&gt;
&lt;br /&gt;
===Current Status===&lt;br /&gt;
&lt;br /&gt;
Currently, (14 May 2009) the API supports parsing the GIFT file format well enough to import Multiple Choice and True/False questions, along with complete implementations for basic functionality of the corresponding question objects.  No support for partial credit answers is currently implemented, nor are other question types working correctly (though most can be parsed to some extent).  Export to CSV works as intended, though it is intentionally simple.  Documentation on usage and integration of the API into an activity is in the doc/ directory of [[http://git.sugarlabs.org/projects/question-support-api the repository]]. A simple, but complete usage example, using a console interface is available in tests/complete_test.py.&lt;br /&gt;
&lt;br /&gt;
===Education Standards===&lt;br /&gt;
As a general API and not a standalone Activity, along with the nature of the API in specific, this project does not directly address any specific education standards or learning outcomes.  It is reliant on educators to write questions, or have questions available to them in usable formats.  As such, the potential educational standards this project could help to meet includes **any** standard where drilling or question/response evaluation is appropriate. (This includes a wider range of topic areas than the Math4 focus, even.)&lt;br /&gt;
&lt;br /&gt;
===Milestones===&lt;br /&gt;
;Initial Prototype Phase (1)&lt;br /&gt;
:Simple implementation, data model not yet nailed down, focus on import and utility to question *consumers*, Like Activities. Initial formats to include MoodleXML, GIFT.&lt;br /&gt;
        &lt;br /&gt;
;Rigorous Design Phase (2)&lt;br /&gt;
:Nail down the data model, including developing the &#039;native&#039; format, probably using a sqlite file mechanism, or other database support, if possible. Freeze the Question object (in terms of required properties,        etc.), finalize decisions about URLs for question aquisition.  Make sure requirements of other projects *can* be met by the design at this stage.&lt;br /&gt;
&lt;br /&gt;
;Full Implementation Phase (3)&lt;br /&gt;
:Complete the implementation of the import formats, including the &#039;native&#039; format.  Should be usable to other Activity developers at this point (hopefully useful, before now, but all needs should be filled at this point).  Export implementation should start now, along with prototyping for an authoring activity. (Collaboration with the reporting team *needs* to happen at this point, as the activity will probably be combined with reporting tools.)&lt;br /&gt;
&lt;br /&gt;
;Activity Development Phase (4)&lt;br /&gt;
:Complete the authoring/reporting activity for the teachers, allowing export to file formats (and possibly *serving* the questions to other XOs; requires support in activities (using the API) to support).&lt;br /&gt;
&lt;br /&gt;
===Community Contacts===&lt;br /&gt;
[[User:FGrose]], [[User:Tony37]] (see [[Talk:{{PAGENAMEE}}|talk page]])&lt;br /&gt;
&lt;br /&gt;
===RIT Project Usage===&lt;br /&gt;
{{Definition_table&lt;br /&gt;
|Produce Puzzle| No API need or usage.&lt;br /&gt;
|Lemonade Stand| No API need or usage.&lt;br /&gt;
|Assimilate| API Usage needs documented on [[Talk:{{PAGENAMEE}}|talk page]].  Progress not far enough to start implementation using the API.&lt;br /&gt;
|Fun Towers| No API need or usage.&lt;br /&gt;
|Reporting Team| Simple export format documented at [[{{PAGENAMEE}}/API_Design|API Design]].  Futher integration work would be nice, but there is more work than could be done in a year along these lines (and neither team is prepared to embark on it).&lt;br /&gt;
|Muthris| No contact from? Probably no API need or usage.&lt;br /&gt;
}}&lt;br /&gt;
===See Also===&lt;br /&gt;
{{Special:PrefixIndex/{{PAGENAMEE}}/}}&lt;/div&gt;</summary>
		<author><name>Bbl5660</name></author>
	</entry>
	<entry>
		<id>https://wiki.sugarlabs.org/index.php?title=Math4Team/RIT/Projects/Question_Support_API&amp;diff=29186</id>
		<title>Math4Team/RIT/Projects/Question Support API</title>
		<link rel="alternate" type="text/html" href="https://wiki.sugarlabs.org/index.php?title=Math4Team/RIT/Projects/Question_Support_API&amp;diff=29186"/>
		<updated>2009-05-15T15:05:10Z</updated>

		<summary type="html">&lt;p&gt;Bbl5660: &lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;{{TOCright}}&lt;br /&gt;
==Question Support API==&lt;br /&gt;
===Project Information===&lt;br /&gt;
{{Definition_table&lt;br /&gt;
|Primary Project Contact| [[User:Enimihil|Greg Stevens]]&lt;br /&gt;
|Project Members| [[User:Enimihil|Greg Stevens]], [[User:Jfinney|Jameson Finney]], [[User:Bbl5660|Brian Long]], TODO: Add yourself here...&lt;br /&gt;
|Source Repository| http://git.sugarlabs.org/projects/question-support-api&lt;br /&gt;
}}&lt;br /&gt;
&lt;br /&gt;
===Current Goals===&lt;br /&gt;
&lt;br /&gt;
* Documentation&lt;br /&gt;
** Packaging&lt;br /&gt;
** Documenting Dependencies and how to enable them in a development environment (Simple tutorial on setting up your Question API Development Environment)&lt;br /&gt;
&lt;br /&gt;
===Setting Up a Development Environment (For Newbies)===&lt;br /&gt;
These are links, tutorials and things that [[User:Bbl5660|Brian Long]] has found along the way, as well as help gained from [[User:Enimihil|Greg Stevens]].  Brian is new to the Linux / OpenSource community, and is working on documenting a development environment.  The small amount of information below is meant to help someone new step into the world of developing for the Sugar environment, from Ubuntu and have all  dependencies and things setup to continue development of this API.  &amp;lt;b&amp;gt;Next&amp;lt;/b&amp;gt; Brian would like to document how to setup these sort of items for Activity developers to include our API and be able to extend it.&lt;br /&gt;
&lt;br /&gt;
* For development environments, you may consider consider first installing a linux OS and the the LAMP stack with PhpMyAdmin.  Brian is choosing Ubuntu, Aptana as a (free) Python IDE that can be used with PyDev to easily allow Python writing.  &lt;br /&gt;
* Links that Brian is relying on at the moment include:&lt;br /&gt;
** http://help.ubuntu.com/community/ApacheMySQLPHP&lt;br /&gt;
** http://www.sqlalchemy.org/docs/04/ormtutorial.html&lt;br /&gt;
** http://docs.python.org/&lt;br /&gt;
&lt;br /&gt;
* Dependencies that are required now, and going forward are&lt;br /&gt;
SQLAlchemy  http://www.sqlalchemy.org/docs/04/ormtutorial.html&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&amp;lt;!-- Development for Linux / Python / Sugar Newbies! --&amp;gt;&lt;br /&gt;
*** sudo apt-get install python-setuptools&lt;br /&gt;
*** sudo easy_install pyparsing&lt;br /&gt;
*** sudo easy_install peak-rules&lt;br /&gt;
*** sudo easy_install sqlalchemy&lt;br /&gt;
**** See here: http://www.sqlalchemy.org/docs/04/ormtutorial.html&lt;br /&gt;
&lt;br /&gt;
** Question Authoring guidelines&lt;br /&gt;
** Integrate within lesson planning&lt;br /&gt;
** How does an instructor get the questions they have written/found into an Activity?&lt;br /&gt;
&lt;br /&gt;
* Liase w/ other Math4 teams and Sugarlabs (What would it take to be included in the Sugar core?)&lt;br /&gt;
* Future Development (Needs / Wants — collect proposals from other teams)&lt;br /&gt;
* Discovery / Plugin  (How do activities find questions, i.e. how to get URIs to load questions from?)&lt;br /&gt;
&lt;br /&gt;
===Motivation===&lt;br /&gt;
In the RIT class working on the Math4 projects, many proposed activities&lt;br /&gt;
require a question database of some kind.  A common API or library for&lt;br /&gt;
accessing databases in different formats, stored either locally or remotely,&lt;br /&gt;
along with a simple mechanism to determine more complex formatting or&lt;br /&gt;
presentation than simple text (e.g. to include simple graphics or&lt;br /&gt;
mathematical notation) would cover a majority of the cases where the&lt;br /&gt;
activity needs some configurable &amp;quot;curriculum data&amp;quot;.&lt;br /&gt;
&lt;br /&gt;
Eventually this library could be extended to provide hints, explanations, or&lt;br /&gt;
walkthroughs for questions, in addition to the basic metadata about level,&lt;br /&gt;
grouping, difficulty, and subject matter that would be part of the base&lt;br /&gt;
system.&lt;br /&gt;
&lt;br /&gt;
===Envisioned Usage===&lt;br /&gt;
Consider a simple flash-card-like activity.  It presents a question from a&lt;br /&gt;
list of questions, allows the student to select an answer from the provided&lt;br /&gt;
answers for the question or to enter their own answer.  Then the correct&lt;br /&gt;
answer is revealed and the student it told whether their answer is correct.&lt;br /&gt;
If the question has an explanation of the correct answer, the flash-card&lt;br /&gt;
activity will show the explanation of the correct answer.  (Note that this&lt;br /&gt;
is just a simple usage example, the interaction design of a drilling&lt;br /&gt;
activity could be very different.)&lt;br /&gt;
&lt;br /&gt;
The flash-card activity would use this proposed Quiz API for the following:&lt;br /&gt;
&lt;br /&gt;
* Loading the questions from the storage location into memory. This includes any filtering or network lookup to download the questions from a remote resource and select appropriate questions for the student.&lt;br /&gt;
&lt;br /&gt;
* Determining whether the student has entered a correct answer.&lt;br /&gt;
&lt;br /&gt;
To start with, the library would simply be a time-saving tool for developers&lt;br /&gt;
needing similar functionality, but as the XS (School Server) becomes more&lt;br /&gt;
fully developed the library should integrate the functions provided by the&lt;br /&gt;
XS to enable automated update of course material for the current topic of&lt;br /&gt;
study so the students can drill material using any tool they prefer, while&lt;br /&gt;
still reporting progress to the instructor using the XS services.&lt;br /&gt;
&lt;br /&gt;
===Current Status===&lt;br /&gt;
&lt;br /&gt;
Currently, (14 May 2009) the API supports parsing the GIFT file format well enough to import Multiple Choice and True/False questions, along with complete implementations for basic functionality of the corresponding question objects.  No support for partial credit answers is currently implemented, nor are other question types working correctly (though most can be parsed to some extent).  Export to CSV works as intended, though it is intentionally simple.  Documentation on usage and integration of the API into an activity is in the doc/ directory of [[http://git.sugarlabs.org/projects/question-support-api the repository]]. A simple, but complete usage example, using a console interface is available in tests/complete_test.py.&lt;br /&gt;
&lt;br /&gt;
===Education Standards===&lt;br /&gt;
As a general API and not a standalone Activity, along with the nature of the API in specific, this project does not directly address any specific education standards or learning outcomes.  It is reliant on educators to write questions, or have questions available to them in usable formats.  As such, the potential educational standards this project could help to meet includes **any** standard where drilling or question/response evaluation is appropriate. (This includes a wider range of topic areas than the Math4 focus, even.)&lt;br /&gt;
&lt;br /&gt;
===Milestones===&lt;br /&gt;
;Initial Prototype Phase (1)&lt;br /&gt;
:Simple implementation, data model not yet nailed down, focus on import and utility to question *consumers*, Like Activities. Initial formats to include MoodleXML, GIFT.&lt;br /&gt;
        &lt;br /&gt;
;Rigorous Design Phase (2)&lt;br /&gt;
:Nail down the data model, including developing the &#039;native&#039; format, probably using a sqlite file mechanism, or other database support, if possible. Freeze the Question object (in terms of required properties,        etc.), finalize decisions about URLs for question aquisition.  Make sure requirements of other projects *can* be met by the design at this stage.&lt;br /&gt;
&lt;br /&gt;
;Full Implementation Phase (3)&lt;br /&gt;
:Complete the implementation of the import formats, including the &#039;native&#039; format.  Should be usable to other Activity developers at this point (hopefully useful, before now, but all needs should be filled at this point).  Export implementation should start now, along with prototyping for an authoring activity. (Collaboration with the reporting team *needs* to happen at this point, as the activity will probably be combined with reporting tools.)&lt;br /&gt;
&lt;br /&gt;
;Activity Development Phase (4)&lt;br /&gt;
:Complete the authoring/reporting activity for the teachers, allowing export to file formats (and possibly *serving* the questions to other XOs; requires support in activities (using the API) to support).&lt;br /&gt;
&lt;br /&gt;
===Community Contacts===&lt;br /&gt;
[[User:FGrose]], [[User:Tony37]] (see [[Talk:{{PAGENAMEE}}|talk page]])&lt;br /&gt;
&lt;br /&gt;
===RIT Project Usage===&lt;br /&gt;
{{Definition_table&lt;br /&gt;
|Produce Puzzle| No API need or usage.&lt;br /&gt;
|Lemonade Stand| No API need or usage.&lt;br /&gt;
|Assimilate| API Usage needs documented on [[Talk:{{PAGENAMEE}}|talk page]].  Progress not far enough to start implementation using the API.&lt;br /&gt;
|Fun Towers| No API need or usage.&lt;br /&gt;
|Reporting Team| Simple export format documented at [[{{PAGENAMEE}}/API_Design|API Design]].  Futher integration work would be nice, but there is more work than could be done in a year along these lines (and neither team is prepared to embark on it).&lt;br /&gt;
|Muthris| No contact from? Probably no API need or usage.&lt;br /&gt;
}}&lt;br /&gt;
===See Also===&lt;br /&gt;
{{Special:PrefixIndex/{{PAGENAMEE}}/}}&lt;/div&gt;</summary>
		<author><name>Bbl5660</name></author>
	</entry>
	<entry>
		<id>https://wiki.sugarlabs.org/index.php?title=Math4Team/RIT/Projects/Question_Support_API&amp;diff=29166</id>
		<title>Math4Team/RIT/Projects/Question Support API</title>
		<link rel="alternate" type="text/html" href="https://wiki.sugarlabs.org/index.php?title=Math4Team/RIT/Projects/Question_Support_API&amp;diff=29166"/>
		<updated>2009-05-15T14:34:59Z</updated>

		<summary type="html">&lt;p&gt;Bbl5660: &lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;{{TOCright}}&lt;br /&gt;
==Question Support API==&lt;br /&gt;
===Project Information===&lt;br /&gt;
{{Definition_table&lt;br /&gt;
|Primary Project Contact| [[User:Enimihil|Greg Stevens]]&lt;br /&gt;
|Project Members| [[User:Enimihil|Greg Stevens]], [[User:Jfinney|Jameson Finney]], [[User:Bbl5660|Brian Long]], TODO: Add yourself here...&lt;br /&gt;
|Source Repository| http://git.sugarlabs.org/projects/question-support-api&lt;br /&gt;
}}&lt;br /&gt;
&lt;br /&gt;
===Current Goals===&lt;br /&gt;
&lt;br /&gt;
* Documentation&lt;br /&gt;
** Packaging&lt;br /&gt;
** Documenting Dependencies and how to enable them in a development environment (Simple tutorial on setting up your Question API Development Environment)&lt;br /&gt;
&lt;br /&gt;
===Setting Up a Development Environment (For Newbies)===&lt;br /&gt;
These are links, tutorials and things that [[User:Bbl5660|Brian Long]] has found along the way, as well as help gained from [[User:Enimihil|Greg Stevens]].  Brian is new to the Linux / OpenSource community, and is working on documenting a development environment.  The small amount of information below is meant to help someone new step into the world of developing for the Sugar environment, from Ubuntu and have all of the dependencies and things setup to run independent of the &lt;br /&gt;
&lt;br /&gt;
* For development environments, you may consider consider running the LAMP stack with PhpMyAdmin as you&#039;re coding and working with Python, and SQLAlchemy: https://help.ubuntu.com/community/ApacheMySQLPHP&lt;br /&gt;
;;* (This information will be turning into a new wiki page on &amp;quot;Development for Linux / Python / Sugar Newbies!&amp;quot;&lt;br /&gt;
*** sudo apt-get install python-setuptools&lt;br /&gt;
*** sudo easy_install pyparsing&lt;br /&gt;
*** sudo easy_install peak-rules&lt;br /&gt;
*** sudo easy_install sqlalchemy&lt;br /&gt;
**** See here: http://www.sqlalchemy.org/docs/04/ormtutorial.html&lt;br /&gt;
&lt;br /&gt;
** Question Authoring guidelines&lt;br /&gt;
** Integrate within lesson planning&lt;br /&gt;
** How does an instructor get the questions they have written/found into an Activity?&lt;br /&gt;
&lt;br /&gt;
* Liase w/ other Math4 teams and Sugarlabs (What would it take to be included in the Sugar core?)&lt;br /&gt;
* Future Development (Needs / Wants — collect proposals from other teams)&lt;br /&gt;
* Discovery / Plugin  (How do activities find questions, i.e. how to get URIs to load questions from?)&lt;br /&gt;
&lt;br /&gt;
===Motivation===&lt;br /&gt;
In the RIT class working on the Math4 projects, many proposed activities&lt;br /&gt;
require a question database of some kind.  A common API or library for&lt;br /&gt;
accessing databases in different formats, stored either locally or remotely,&lt;br /&gt;
along with a simple mechanism to determine more complex formatting or&lt;br /&gt;
presentation than simple text (e.g. to include simple graphics or&lt;br /&gt;
mathematical notation) would cover a majority of the cases where the&lt;br /&gt;
activity needs some configurable &amp;quot;curriculum data&amp;quot;.&lt;br /&gt;
&lt;br /&gt;
Eventually this library could be extended to provide hints, explanations, or&lt;br /&gt;
walkthroughs for questions, in addition to the basic metadata about level,&lt;br /&gt;
grouping, difficulty, and subject matter that would be part of the base&lt;br /&gt;
system.&lt;br /&gt;
&lt;br /&gt;
===Envisioned Usage===&lt;br /&gt;
Consider a simple flash-card-like activity.  It presents a question from a&lt;br /&gt;
list of questions, allows the student to select an answer from the provided&lt;br /&gt;
answers for the question or to enter their own answer.  Then the correct&lt;br /&gt;
answer is revealed and the student it told whether their answer is correct.&lt;br /&gt;
If the question has an explanation of the correct answer, the flash-card&lt;br /&gt;
activity will show the explanation of the correct answer.  (Note that this&lt;br /&gt;
is just a simple usage example, the interaction design of a drilling&lt;br /&gt;
activity could be very different.)&lt;br /&gt;
&lt;br /&gt;
The flash-card activity would use this proposed Quiz API for the following:&lt;br /&gt;
&lt;br /&gt;
* Loading the questions from the storage location into memory. This includes any filtering or network lookup to download the questions from a remote resource and select appropriate questions for the student.&lt;br /&gt;
&lt;br /&gt;
* Determining whether the student has entered a correct answer.&lt;br /&gt;
&lt;br /&gt;
To start with, the library would simply be a time-saving tool for developers&lt;br /&gt;
needing similar functionality, but as the XS (School Server) becomes more&lt;br /&gt;
fully developed the library should integrate the functions provided by the&lt;br /&gt;
XS to enable automated update of course material for the current topic of&lt;br /&gt;
study so the students can drill material using any tool they prefer, while&lt;br /&gt;
still reporting progress to the instructor using the XS services.&lt;br /&gt;
&lt;br /&gt;
===Current Status===&lt;br /&gt;
&lt;br /&gt;
Currently, (14 May 2009) the API supports parsing the GIFT file format well enough to import Multiple Choice and True/False questions, along with complete implementations for basic functionality of the corresponding question objects.  No support for partial credit answers is currently implemented, nor are other question types working correctly (though most can be parsed to some extent).  Export to CSV works as intended, though it is intentionally simple.  Documentation on usage and integration of the API into an activity is in the doc/ directory of [[http://git.sugarlabs.org/projects/question-support-api the repository]]. A simple, but complete usage example, using a console interface is available in tests/complete_test.py.&lt;br /&gt;
&lt;br /&gt;
===Education Standards===&lt;br /&gt;
As a general API and not a standalone Activity, along with the nature of the API in specific, this project does not directly address any specific education standards or learning outcomes.  It is reliant on educators to write questions, or have questions available to them in usable formats.  As such, the potential educational standards this project could help to meet includes **any** standard where drilling or question/response evaluation is appropriate. (This includes a wider range of topic areas than the Math4 focus, even.)&lt;br /&gt;
&lt;br /&gt;
===Milestones===&lt;br /&gt;
;Initial Prototype Phase (1)&lt;br /&gt;
:Simple implementation, data model not yet nailed down, focus on import and utility to question *consumers*, Like Activities. Initial formats to include MoodleXML, GIFT.&lt;br /&gt;
        &lt;br /&gt;
;Rigorous Design Phase (2)&lt;br /&gt;
:Nail down the data model, including developing the &#039;native&#039; format, probably using a sqlite file mechanism, or other database support, if possible. Freeze the Question object (in terms of required properties,        etc.), finalize decisions about URLs for question aquisition.  Make sure requirements of other projects *can* be met by the design at this stage.&lt;br /&gt;
&lt;br /&gt;
;Full Implementation Phase (3)&lt;br /&gt;
:Complete the implementation of the import formats, including the &#039;native&#039; format.  Should be usable to other Activity developers at this point (hopefully useful, before now, but all needs should be filled at this point).  Export implementation should start now, along with prototyping for an authoring activity. (Collaboration with the reporting team *needs* to happen at this point, as the activity will probably be combined with reporting tools.)&lt;br /&gt;
&lt;br /&gt;
;Activity Development Phase (4)&lt;br /&gt;
:Complete the authoring/reporting activity for the teachers, allowing export to file formats (and possibly *serving* the questions to other XOs; requires support in activities (using the API) to support).&lt;br /&gt;
&lt;br /&gt;
===Community Contacts===&lt;br /&gt;
[[User:FGrose]], [[User:Tony37]] (see [[Talk:{{PAGENAMEE}}|talk page]])&lt;br /&gt;
&lt;br /&gt;
===RIT Project Usage===&lt;br /&gt;
{{Definition_table&lt;br /&gt;
|Produce Puzzle| No API need or usage.&lt;br /&gt;
|Lemonade Stand| No API need or usage.&lt;br /&gt;
|Assimilate| API Usage needs documented on [[Talk:{{PAGENAMEE}}|talk page]].  Progress not far enough to start implementation using the API.&lt;br /&gt;
|Fun Towers| No API need or usage.&lt;br /&gt;
|Reporting Team| Simple export format documented at [[{{PAGENAMEE}}/API_Design|API Design]].  Futher integration work would be nice, but there is more work than could be done in a year along these lines (and neither team is prepared to embark on it).&lt;br /&gt;
|Muthris| No contact from? Probably no API need or usage.&lt;br /&gt;
}}&lt;br /&gt;
===See Also===&lt;br /&gt;
{{Special:PrefixIndex/{{PAGENAMEE}}/}}&lt;/div&gt;</summary>
		<author><name>Bbl5660</name></author>
	</entry>
	<entry>
		<id>https://wiki.sugarlabs.org/index.php?title=Math4Team/RIT/Projects/Question_Support_API&amp;diff=29165</id>
		<title>Math4Team/RIT/Projects/Question Support API</title>
		<link rel="alternate" type="text/html" href="https://wiki.sugarlabs.org/index.php?title=Math4Team/RIT/Projects/Question_Support_API&amp;diff=29165"/>
		<updated>2009-05-15T14:25:26Z</updated>

		<summary type="html">&lt;p&gt;Bbl5660: &lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;{{TOCright}}&lt;br /&gt;
==Question Support API==&lt;br /&gt;
===Project Information===&lt;br /&gt;
{{Definition_table&lt;br /&gt;
|Primary Project Contact| [[User:Enimihil|Greg Stevens]]&lt;br /&gt;
|Project Members| [[User:Enimihil|Greg Stevens]], [[User:Jfinney|Jameson Finney]], [[User:Bbl5660|Brian Long]], TODO: Add yourself here...&lt;br /&gt;
|Source Repository| http://git.sugarlabs.org/projects/question-support-api&lt;br /&gt;
}}&lt;br /&gt;
&lt;br /&gt;
===Current Goals===&lt;br /&gt;
&lt;br /&gt;
* Documentation&lt;br /&gt;
** Packaging&lt;br /&gt;
** Documenting Dependencies and how to enable them in a development environment (Simple tutorial on setting up your Question API Development Environment)&lt;br /&gt;
&lt;br /&gt;
*** (For development environments, you may consider PhpMyAdmin: https://help.ubuntu.com/community/ApacheMySQLPHP)&lt;br /&gt;
;;* (This information will be turning into a new wiki page on &amp;quot;Development for Linux / Python / Sugar Newbies!&amp;quot;&lt;br /&gt;
*** sudo apt-get install python-setuptools&lt;br /&gt;
*** sudo easy_install pyparsing&lt;br /&gt;
*** sudo easy_install peak-rules&lt;br /&gt;
*** sudo easy_install sqlalchemy&lt;br /&gt;
**** See here: http://www.sqlalchemy.org/docs/04/ormtutorial.html&lt;br /&gt;
&lt;br /&gt;
** Question Authoring guidelines&lt;br /&gt;
** Integrate within lesson planning&lt;br /&gt;
** How does an instructor get the questions they have written/found into an Activity?&lt;br /&gt;
&lt;br /&gt;
* Liase w/ other Math4 teams and Sugarlabs (What would it take to be included in the Sugar core?)&lt;br /&gt;
* Future Development (Needs / Wants — collect proposals from other teams)&lt;br /&gt;
* Discovery / Plugin  (How do activities find questions, i.e. how to get URIs to load questions from?)&lt;br /&gt;
&lt;br /&gt;
===Motivation===&lt;br /&gt;
In the RIT class working on the Math4 projects, many proposed activities&lt;br /&gt;
require a question database of some kind.  A common API or library for&lt;br /&gt;
accessing databases in different formats, stored either locally or remotely,&lt;br /&gt;
along with a simple mechanism to determine more complex formatting or&lt;br /&gt;
presentation than simple text (e.g. to include simple graphics or&lt;br /&gt;
mathematical notation) would cover a majority of the cases where the&lt;br /&gt;
activity needs some configurable &amp;quot;curriculum data&amp;quot;.&lt;br /&gt;
&lt;br /&gt;
Eventually this library could be extended to provide hints, explanations, or&lt;br /&gt;
walkthroughs for questions, in addition to the basic metadata about level,&lt;br /&gt;
grouping, difficulty, and subject matter that would be part of the base&lt;br /&gt;
system.&lt;br /&gt;
&lt;br /&gt;
===Envisioned Usage===&lt;br /&gt;
Consider a simple flash-card-like activity.  It presents a question from a&lt;br /&gt;
list of questions, allows the student to select an answer from the provided&lt;br /&gt;
answers for the question or to enter their own answer.  Then the correct&lt;br /&gt;
answer is revealed and the student it told whether their answer is correct.&lt;br /&gt;
If the question has an explanation of the correct answer, the flash-card&lt;br /&gt;
activity will show the explanation of the correct answer.  (Note that this&lt;br /&gt;
is just a simple usage example, the interaction design of a drilling&lt;br /&gt;
activity could be very different.)&lt;br /&gt;
&lt;br /&gt;
The flash-card activity would use this proposed Quiz API for the following:&lt;br /&gt;
&lt;br /&gt;
* Loading the questions from the storage location into memory. This includes any filtering or network lookup to download the questions from a remote resource and select appropriate questions for the student.&lt;br /&gt;
&lt;br /&gt;
* Determining whether the student has entered a correct answer.&lt;br /&gt;
&lt;br /&gt;
To start with, the library would simply be a time-saving tool for developers&lt;br /&gt;
needing similar functionality, but as the XS (School Server) becomes more&lt;br /&gt;
fully developed the library should integrate the functions provided by the&lt;br /&gt;
XS to enable automated update of course material for the current topic of&lt;br /&gt;
study so the students can drill material using any tool they prefer, while&lt;br /&gt;
still reporting progress to the instructor using the XS services.&lt;br /&gt;
&lt;br /&gt;
===Current Status===&lt;br /&gt;
&lt;br /&gt;
Currently, (14 May 2009) the API supports parsing the GIFT file format well enough to import Multiple Choice and True/False questions, along with complete implementations for basic functionality of the corresponding question objects.  No support for partial credit answers is currently implemented, nor are other question types working correctly (though most can be parsed to some extent).  Export to CSV works as intended, though it is intentionally simple.  Documentation on usage and integration of the API into an activity is in the doc/ directory of [[http://git.sugarlabs.org/projects/question-support-api the repository]]. A simple, but complete usage example, using a console interface is available in tests/complete_test.py.&lt;br /&gt;
&lt;br /&gt;
===Education Standards===&lt;br /&gt;
As a general API and not a standalone Activity, along with the nature of the API in specific, this project does not directly address any specific education standards or learning outcomes.  It is reliant on educators to write questions, or have questions available to them in usable formats.  As such, the potential educational standards this project could help to meet includes **any** standard where drilling or question/response evaluation is appropriate. (This includes a wider range of topic areas than the Math4 focus, even.)&lt;br /&gt;
&lt;br /&gt;
===Milestones===&lt;br /&gt;
;Initial Prototype Phase (1)&lt;br /&gt;
:Simple implementation, data model not yet nailed down, focus on import and utility to question *consumers*, Like Activities. Initial formats to include MoodleXML, GIFT.&lt;br /&gt;
        &lt;br /&gt;
;Rigorous Design Phase (2)&lt;br /&gt;
:Nail down the data model, including developing the &#039;native&#039; format, probably using a sqlite file mechanism, or other database support, if possible. Freeze the Question object (in terms of required properties,        etc.), finalize decisions about URLs for question aquisition.  Make sure requirements of other projects *can* be met by the design at this stage.&lt;br /&gt;
&lt;br /&gt;
;Full Implementation Phase (3)&lt;br /&gt;
:Complete the implementation of the import formats, including the &#039;native&#039; format.  Should be usable to other Activity developers at this point (hopefully useful, before now, but all needs should be filled at this point).  Export implementation should start now, along with prototyping for an authoring activity. (Collaboration with the reporting team *needs* to happen at this point, as the activity will probably be combined with reporting tools.)&lt;br /&gt;
&lt;br /&gt;
;Activity Development Phase (4)&lt;br /&gt;
:Complete the authoring/reporting activity for the teachers, allowing export to file formats (and possibly *serving* the questions to other XOs; requires support in activities (using the API) to support).&lt;br /&gt;
&lt;br /&gt;
===Community Contacts===&lt;br /&gt;
[[User:FGrose]], [[User:Tony37]] (see [[Talk:{{PAGENAMEE}}|talk page]])&lt;br /&gt;
&lt;br /&gt;
===RIT Project Usage===&lt;br /&gt;
{{Definition_table&lt;br /&gt;
|Produce Puzzle| No API need or usage.&lt;br /&gt;
|Lemonade Stand| No API need or usage.&lt;br /&gt;
|Assimilate| API Usage needs documented on [[Talk:{{PAGENAMEE}}|talk page]].  Progress not far enough to start implementation using the API.&lt;br /&gt;
|Fun Towers| No API need or usage.&lt;br /&gt;
|Reporting Team| Simple export format documented at [[{{PAGENAMEE}}/API_Design|API Design]].  Futher integration work would be nice, but there is more work than could be done in a year along these lines (and neither team is prepared to embark on it).&lt;br /&gt;
|Muthris| No contact from? Probably no API need or usage.&lt;br /&gt;
}}&lt;br /&gt;
===See Also===&lt;br /&gt;
{{Special:PrefixIndex/{{PAGENAMEE}}/}}&lt;/div&gt;</summary>
		<author><name>Bbl5660</name></author>
	</entry>
	<entry>
		<id>https://wiki.sugarlabs.org/index.php?title=Math4Team/RIT/Projects/Question_Support_API&amp;diff=29164</id>
		<title>Math4Team/RIT/Projects/Question Support API</title>
		<link rel="alternate" type="text/html" href="https://wiki.sugarlabs.org/index.php?title=Math4Team/RIT/Projects/Question_Support_API&amp;diff=29164"/>
		<updated>2009-05-15T14:22:03Z</updated>

		<summary type="html">&lt;p&gt;Bbl5660: &lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;{{TOCright}}&lt;br /&gt;
==Question Support API==&lt;br /&gt;
===Project Information===&lt;br /&gt;
{{Definition_table&lt;br /&gt;
|Primary Project Contact| [[User:Enimihil|Greg Stevens]]&lt;br /&gt;
|Project Members| [[User:Enimihil|Greg Stevens]], [[User:Jfinney|Jameson Finney]], [[User:Bbl5660|Brian Long]], TODO: Add yourself here...&lt;br /&gt;
|Source Repository| http://git.sugarlabs.org/projects/question-support-api&lt;br /&gt;
}}&lt;br /&gt;
&lt;br /&gt;
===Current Goals===&lt;br /&gt;
&lt;br /&gt;
* Documentation&lt;br /&gt;
** Packaging&lt;br /&gt;
** Documenting Dependencies and how to enable them in a development environment (Simple tutorial on setting up your Question API Development Environment)&lt;br /&gt;
&lt;br /&gt;
;;* (This information will be turning into a new wiki page on &amp;quot;Development for Linux / Python / Sugar Newbies!&amp;quot;&lt;br /&gt;
*** sudo apt-get install python-setuptools&lt;br /&gt;
*** sudo easy_install pyparsing&lt;br /&gt;
*** sudo easy_install peak-rules&lt;br /&gt;
*** sudo easy_install sqlalchemy&lt;br /&gt;
**** See here: http://www.sqlalchemy.org/docs/04/ormtutorial.html&lt;br /&gt;
&lt;br /&gt;
** Question Authoring guidelines&lt;br /&gt;
** Integrate within lesson planning&lt;br /&gt;
** How does an instructor get the questions they have written/found into an Activity?&lt;br /&gt;
&lt;br /&gt;
* Liase w/ other Math4 teams and Sugarlabs (What would it take to be included in the Sugar core?)&lt;br /&gt;
* Future Development (Needs / Wants — collect proposals from other teams)&lt;br /&gt;
* Discovery / Plugin  (How do activities find questions, i.e. how to get URIs to load questions from?)&lt;br /&gt;
&lt;br /&gt;
===Motivation===&lt;br /&gt;
In the RIT class working on the Math4 projects, many proposed activities&lt;br /&gt;
require a question database of some kind.  A common API or library for&lt;br /&gt;
accessing databases in different formats, stored either locally or remotely,&lt;br /&gt;
along with a simple mechanism to determine more complex formatting or&lt;br /&gt;
presentation than simple text (e.g. to include simple graphics or&lt;br /&gt;
mathematical notation) would cover a majority of the cases where the&lt;br /&gt;
activity needs some configurable &amp;quot;curriculum data&amp;quot;.&lt;br /&gt;
&lt;br /&gt;
Eventually this library could be extended to provide hints, explanations, or&lt;br /&gt;
walkthroughs for questions, in addition to the basic metadata about level,&lt;br /&gt;
grouping, difficulty, and subject matter that would be part of the base&lt;br /&gt;
system.&lt;br /&gt;
&lt;br /&gt;
===Envisioned Usage===&lt;br /&gt;
Consider a simple flash-card-like activity.  It presents a question from a&lt;br /&gt;
list of questions, allows the student to select an answer from the provided&lt;br /&gt;
answers for the question or to enter their own answer.  Then the correct&lt;br /&gt;
answer is revealed and the student it told whether their answer is correct.&lt;br /&gt;
If the question has an explanation of the correct answer, the flash-card&lt;br /&gt;
activity will show the explanation of the correct answer.  (Note that this&lt;br /&gt;
is just a simple usage example, the interaction design of a drilling&lt;br /&gt;
activity could be very different.)&lt;br /&gt;
&lt;br /&gt;
The flash-card activity would use this proposed Quiz API for the following:&lt;br /&gt;
&lt;br /&gt;
* Loading the questions from the storage location into memory. This includes any filtering or network lookup to download the questions from a remote resource and select appropriate questions for the student.&lt;br /&gt;
&lt;br /&gt;
* Determining whether the student has entered a correct answer.&lt;br /&gt;
&lt;br /&gt;
To start with, the library would simply be a time-saving tool for developers&lt;br /&gt;
needing similar functionality, but as the XS (School Server) becomes more&lt;br /&gt;
fully developed the library should integrate the functions provided by the&lt;br /&gt;
XS to enable automated update of course material for the current topic of&lt;br /&gt;
study so the students can drill material using any tool they prefer, while&lt;br /&gt;
still reporting progress to the instructor using the XS services.&lt;br /&gt;
&lt;br /&gt;
===Current Status===&lt;br /&gt;
&lt;br /&gt;
Currently, (14 May 2009) the API supports parsing the GIFT file format well enough to import Multiple Choice and True/False questions, along with complete implementations for basic functionality of the corresponding question objects.  No support for partial credit answers is currently implemented, nor are other question types working correctly (though most can be parsed to some extent).  Export to CSV works as intended, though it is intentionally simple.  Documentation on usage and integration of the API into an activity is in the doc/ directory of [[http://git.sugarlabs.org/projects/question-support-api the repository]]. A simple, but complete usage example, using a console interface is available in tests/complete_test.py.&lt;br /&gt;
&lt;br /&gt;
===Education Standards===&lt;br /&gt;
As a general API and not a standalone Activity, along with the nature of the API in specific, this project does not directly address any specific education standards or learning outcomes.  It is reliant on educators to write questions, or have questions available to them in usable formats.  As such, the potential educational standards this project could help to meet includes **any** standard where drilling or question/response evaluation is appropriate. (This includes a wider range of topic areas than the Math4 focus, even.)&lt;br /&gt;
&lt;br /&gt;
===Milestones===&lt;br /&gt;
;Initial Prototype Phase (1)&lt;br /&gt;
:Simple implementation, data model not yet nailed down, focus on import and utility to question *consumers*, Like Activities. Initial formats to include MoodleXML, GIFT.&lt;br /&gt;
        &lt;br /&gt;
;Rigorous Design Phase (2)&lt;br /&gt;
:Nail down the data model, including developing the &#039;native&#039; format, probably using a sqlite file mechanism, or other database support, if possible. Freeze the Question object (in terms of required properties,        etc.), finalize decisions about URLs for question aquisition.  Make sure requirements of other projects *can* be met by the design at this stage.&lt;br /&gt;
&lt;br /&gt;
;Full Implementation Phase (3)&lt;br /&gt;
:Complete the implementation of the import formats, including the &#039;native&#039; format.  Should be usable to other Activity developers at this point (hopefully useful, before now, but all needs should be filled at this point).  Export implementation should start now, along with prototyping for an authoring activity. (Collaboration with the reporting team *needs* to happen at this point, as the activity will probably be combined with reporting tools.)&lt;br /&gt;
&lt;br /&gt;
;Activity Development Phase (4)&lt;br /&gt;
:Complete the authoring/reporting activity for the teachers, allowing export to file formats (and possibly *serving* the questions to other XOs; requires support in activities (using the API) to support).&lt;br /&gt;
&lt;br /&gt;
===Community Contacts===&lt;br /&gt;
[[User:FGrose]], [[User:Tony37]] (see [[Talk:{{PAGENAMEE}}|talk page]])&lt;br /&gt;
&lt;br /&gt;
===RIT Project Usage===&lt;br /&gt;
{{Definition_table&lt;br /&gt;
|Produce Puzzle| No API need or usage.&lt;br /&gt;
|Lemonade Stand| No API need or usage.&lt;br /&gt;
|Assimilate| API Usage needs documented on [[Talk:{{PAGENAMEE}}|talk page]].  Progress not far enough to start implementation using the API.&lt;br /&gt;
|Fun Towers| No API need or usage.&lt;br /&gt;
|Reporting Team| Simple export format documented at [[{{PAGENAMEE}}/API_Design|API Design]].  Futher integration work would be nice, but there is more work than could be done in a year along these lines (and neither team is prepared to embark on it).&lt;br /&gt;
|Muthris| No contact from? Probably no API need or usage.&lt;br /&gt;
}}&lt;br /&gt;
===See Also===&lt;br /&gt;
{{Special:PrefixIndex/{{PAGENAMEE}}/}}&lt;/div&gt;</summary>
		<author><name>Bbl5660</name></author>
	</entry>
	<entry>
		<id>https://wiki.sugarlabs.org/index.php?title=Math4Team/RIT/Projects/Question_Support_API&amp;diff=29163</id>
		<title>Math4Team/RIT/Projects/Question Support API</title>
		<link rel="alternate" type="text/html" href="https://wiki.sugarlabs.org/index.php?title=Math4Team/RIT/Projects/Question_Support_API&amp;diff=29163"/>
		<updated>2009-05-15T14:21:38Z</updated>

		<summary type="html">&lt;p&gt;Bbl5660: &lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;{{TOCright}}&lt;br /&gt;
==Question Support API==&lt;br /&gt;
===Project Information===&lt;br /&gt;
{{Definition_table&lt;br /&gt;
|Primary Project Contact| [[User:Enimihil|Greg Stevens]]&lt;br /&gt;
|Project Members| [[User:Enimihil|Greg Stevens]], [[User:Jfinney|Jameson Finney]], [[User:Bbl5660|Brian Long]], TODO: Add yourself here...&lt;br /&gt;
|Source Repository| http://git.sugarlabs.org/projects/question-support-api&lt;br /&gt;
}}&lt;br /&gt;
&lt;br /&gt;
===Current Goals===&lt;br /&gt;
&lt;br /&gt;
* Documentation&lt;br /&gt;
** Packaging&lt;br /&gt;
** Documenting Dependencies and how to enable them in a development environment (Simple tutorial on setting up your Question API Development Environment)&lt;br /&gt;
&lt;br /&gt;
*** (This information will be turning into a new wiki page on &amp;quot;Development for Linux / Python / Sugar Newbies!&amp;quot;&lt;br /&gt;
*** sudo apt-get install python-setuptools&lt;br /&gt;
*** sudo easy_install pyparsing&lt;br /&gt;
*** sudo easy_install peak-rules&lt;br /&gt;
*** sudo easy_install sqlalchemy&lt;br /&gt;
**** See here: http://www.sqlalchemy.org/docs/04/ormtutorial.html&lt;br /&gt;
&lt;br /&gt;
** Question Authoring guidelines&lt;br /&gt;
** Integrate within lesson planning&lt;br /&gt;
** How does an instructor get the questions they have written/found into an Activity?&lt;br /&gt;
&lt;br /&gt;
* Liase w/ other Math4 teams and Sugarlabs (What would it take to be included in the Sugar core?)&lt;br /&gt;
* Future Development (Needs / Wants — collect proposals from other teams)&lt;br /&gt;
* Discovery / Plugin  (How do activities find questions, i.e. how to get URIs to load questions from?)&lt;br /&gt;
&lt;br /&gt;
===Motivation===&lt;br /&gt;
In the RIT class working on the Math4 projects, many proposed activities&lt;br /&gt;
require a question database of some kind.  A common API or library for&lt;br /&gt;
accessing databases in different formats, stored either locally or remotely,&lt;br /&gt;
along with a simple mechanism to determine more complex formatting or&lt;br /&gt;
presentation than simple text (e.g. to include simple graphics or&lt;br /&gt;
mathematical notation) would cover a majority of the cases where the&lt;br /&gt;
activity needs some configurable &amp;quot;curriculum data&amp;quot;.&lt;br /&gt;
&lt;br /&gt;
Eventually this library could be extended to provide hints, explanations, or&lt;br /&gt;
walkthroughs for questions, in addition to the basic metadata about level,&lt;br /&gt;
grouping, difficulty, and subject matter that would be part of the base&lt;br /&gt;
system.&lt;br /&gt;
&lt;br /&gt;
===Envisioned Usage===&lt;br /&gt;
Consider a simple flash-card-like activity.  It presents a question from a&lt;br /&gt;
list of questions, allows the student to select an answer from the provided&lt;br /&gt;
answers for the question or to enter their own answer.  Then the correct&lt;br /&gt;
answer is revealed and the student it told whether their answer is correct.&lt;br /&gt;
If the question has an explanation of the correct answer, the flash-card&lt;br /&gt;
activity will show the explanation of the correct answer.  (Note that this&lt;br /&gt;
is just a simple usage example, the interaction design of a drilling&lt;br /&gt;
activity could be very different.)&lt;br /&gt;
&lt;br /&gt;
The flash-card activity would use this proposed Quiz API for the following:&lt;br /&gt;
&lt;br /&gt;
* Loading the questions from the storage location into memory. This includes any filtering or network lookup to download the questions from a remote resource and select appropriate questions for the student.&lt;br /&gt;
&lt;br /&gt;
* Determining whether the student has entered a correct answer.&lt;br /&gt;
&lt;br /&gt;
To start with, the library would simply be a time-saving tool for developers&lt;br /&gt;
needing similar functionality, but as the XS (School Server) becomes more&lt;br /&gt;
fully developed the library should integrate the functions provided by the&lt;br /&gt;
XS to enable automated update of course material for the current topic of&lt;br /&gt;
study so the students can drill material using any tool they prefer, while&lt;br /&gt;
still reporting progress to the instructor using the XS services.&lt;br /&gt;
&lt;br /&gt;
===Current Status===&lt;br /&gt;
&lt;br /&gt;
Currently, (14 May 2009) the API supports parsing the GIFT file format well enough to import Multiple Choice and True/False questions, along with complete implementations for basic functionality of the corresponding question objects.  No support for partial credit answers is currently implemented, nor are other question types working correctly (though most can be parsed to some extent).  Export to CSV works as intended, though it is intentionally simple.  Documentation on usage and integration of the API into an activity is in the doc/ directory of [[http://git.sugarlabs.org/projects/question-support-api the repository]]. A simple, but complete usage example, using a console interface is available in tests/complete_test.py.&lt;br /&gt;
&lt;br /&gt;
===Education Standards===&lt;br /&gt;
As a general API and not a standalone Activity, along with the nature of the API in specific, this project does not directly address any specific education standards or learning outcomes.  It is reliant on educators to write questions, or have questions available to them in usable formats.  As such, the potential educational standards this project could help to meet includes **any** standard where drilling or question/response evaluation is appropriate. (This includes a wider range of topic areas than the Math4 focus, even.)&lt;br /&gt;
&lt;br /&gt;
===Milestones===&lt;br /&gt;
;Initial Prototype Phase (1)&lt;br /&gt;
:Simple implementation, data model not yet nailed down, focus on import and utility to question *consumers*, Like Activities. Initial formats to include MoodleXML, GIFT.&lt;br /&gt;
        &lt;br /&gt;
;Rigorous Design Phase (2)&lt;br /&gt;
:Nail down the data model, including developing the &#039;native&#039; format, probably using a sqlite file mechanism, or other database support, if possible. Freeze the Question object (in terms of required properties,        etc.), finalize decisions about URLs for question aquisition.  Make sure requirements of other projects *can* be met by the design at this stage.&lt;br /&gt;
&lt;br /&gt;
;Full Implementation Phase (3)&lt;br /&gt;
:Complete the implementation of the import formats, including the &#039;native&#039; format.  Should be usable to other Activity developers at this point (hopefully useful, before now, but all needs should be filled at this point).  Export implementation should start now, along with prototyping for an authoring activity. (Collaboration with the reporting team *needs* to happen at this point, as the activity will probably be combined with reporting tools.)&lt;br /&gt;
&lt;br /&gt;
;Activity Development Phase (4)&lt;br /&gt;
:Complete the authoring/reporting activity for the teachers, allowing export to file formats (and possibly *serving* the questions to other XOs; requires support in activities (using the API) to support).&lt;br /&gt;
&lt;br /&gt;
===Community Contacts===&lt;br /&gt;
[[User:FGrose]], [[User:Tony37]] (see [[Talk:{{PAGENAMEE}}|talk page]])&lt;br /&gt;
&lt;br /&gt;
===RIT Project Usage===&lt;br /&gt;
{{Definition_table&lt;br /&gt;
|Produce Puzzle| No API need or usage.&lt;br /&gt;
|Lemonade Stand| No API need or usage.&lt;br /&gt;
|Assimilate| API Usage needs documented on [[Talk:{{PAGENAMEE}}|talk page]].  Progress not far enough to start implementation using the API.&lt;br /&gt;
|Fun Towers| No API need or usage.&lt;br /&gt;
|Reporting Team| Simple export format documented at [[{{PAGENAMEE}}/API_Design|API Design]].  Futher integration work would be nice, but there is more work than could be done in a year along these lines (and neither team is prepared to embark on it).&lt;br /&gt;
|Muthris| No contact from? Probably no API need or usage.&lt;br /&gt;
}}&lt;br /&gt;
===See Also===&lt;br /&gt;
{{Special:PrefixIndex/{{PAGENAMEE}}/}}&lt;/div&gt;</summary>
		<author><name>Bbl5660</name></author>
	</entry>
	<entry>
		<id>https://wiki.sugarlabs.org/index.php?title=Math4Team/RIT/Projects/Question_Support_API&amp;diff=29162</id>
		<title>Math4Team/RIT/Projects/Question Support API</title>
		<link rel="alternate" type="text/html" href="https://wiki.sugarlabs.org/index.php?title=Math4Team/RIT/Projects/Question_Support_API&amp;diff=29162"/>
		<updated>2009-05-15T14:20:35Z</updated>

		<summary type="html">&lt;p&gt;Bbl5660: &lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;{{TOCright}}&lt;br /&gt;
==Question Support API==&lt;br /&gt;
===Project Information===&lt;br /&gt;
{{Definition_table&lt;br /&gt;
|Primary Project Contact| [[User:Enimihil|Greg Stevens]]&lt;br /&gt;
|Project Members| [[User:Enimihil|Greg Stevens]], [[User:Jfinney|Jameson Finney]], [[User:Bbl5660|Brian Long]], TODO: Add yourself here...&lt;br /&gt;
|Source Repository| http://git.sugarlabs.org/projects/question-support-api&lt;br /&gt;
}}&lt;br /&gt;
&lt;br /&gt;
===Current Goals===&lt;br /&gt;
&lt;br /&gt;
* Documentation&lt;br /&gt;
** Packaging&lt;br /&gt;
** Documenting Dependencies and how to enable them in a development environment (Simple tutorial on setting up your Question API Development Environment)&lt;br /&gt;
&lt;br /&gt;
(This information will be turning into a new wiki page on &amp;quot;Development for Linux / Python / Sugar Newbies!&amp;quot;&lt;br /&gt;
*** sudo apt-get install python-setuptools&lt;br /&gt;
*** sudo easy_install pyparsing&lt;br /&gt;
*** sudo easy_install peak-rules&lt;br /&gt;
*** sudo easy_install sqlalchemy&lt;br /&gt;
**** See here: http://www.sqlalchemy.org/docs/04/ormtutorial.html&lt;br /&gt;
&lt;br /&gt;
** Question Authoring guidelines&lt;br /&gt;
** Integrate within lesson planning&lt;br /&gt;
** How does an instructor get the questions they have written/found into an Activity?&lt;br /&gt;
&lt;br /&gt;
* Liase w/ other Math4 teams and Sugarlabs (What would it take to be included in the Sugar core?)&lt;br /&gt;
* Future Development (Needs / Wants — collect proposals from other teams)&lt;br /&gt;
* Discovery / Plugin  (How do activities find questions, i.e. how to get URIs to load questions from?)&lt;br /&gt;
&lt;br /&gt;
===Motivation===&lt;br /&gt;
In the RIT class working on the Math4 projects, many proposed activities&lt;br /&gt;
require a question database of some kind.  A common API or library for&lt;br /&gt;
accessing databases in different formats, stored either locally or remotely,&lt;br /&gt;
along with a simple mechanism to determine more complex formatting or&lt;br /&gt;
presentation than simple text (e.g. to include simple graphics or&lt;br /&gt;
mathematical notation) would cover a majority of the cases where the&lt;br /&gt;
activity needs some configurable &amp;quot;curriculum data&amp;quot;.&lt;br /&gt;
&lt;br /&gt;
Eventually this library could be extended to provide hints, explanations, or&lt;br /&gt;
walkthroughs for questions, in addition to the basic metadata about level,&lt;br /&gt;
grouping, difficulty, and subject matter that would be part of the base&lt;br /&gt;
system.&lt;br /&gt;
&lt;br /&gt;
===Envisioned Usage===&lt;br /&gt;
Consider a simple flash-card-like activity.  It presents a question from a&lt;br /&gt;
list of questions, allows the student to select an answer from the provided&lt;br /&gt;
answers for the question or to enter their own answer.  Then the correct&lt;br /&gt;
answer is revealed and the student it told whether their answer is correct.&lt;br /&gt;
If the question has an explanation of the correct answer, the flash-card&lt;br /&gt;
activity will show the explanation of the correct answer.  (Note that this&lt;br /&gt;
is just a simple usage example, the interaction design of a drilling&lt;br /&gt;
activity could be very different.)&lt;br /&gt;
&lt;br /&gt;
The flash-card activity would use this proposed Quiz API for the following:&lt;br /&gt;
&lt;br /&gt;
* Loading the questions from the storage location into memory. This includes any filtering or network lookup to download the questions from a remote resource and select appropriate questions for the student.&lt;br /&gt;
&lt;br /&gt;
* Determining whether the student has entered a correct answer.&lt;br /&gt;
&lt;br /&gt;
To start with, the library would simply be a time-saving tool for developers&lt;br /&gt;
needing similar functionality, but as the XS (School Server) becomes more&lt;br /&gt;
fully developed the library should integrate the functions provided by the&lt;br /&gt;
XS to enable automated update of course material for the current topic of&lt;br /&gt;
study so the students can drill material using any tool they prefer, while&lt;br /&gt;
still reporting progress to the instructor using the XS services.&lt;br /&gt;
&lt;br /&gt;
===Current Status===&lt;br /&gt;
&lt;br /&gt;
Currently, (14 May 2009) the API supports parsing the GIFT file format well enough to import Multiple Choice and True/False questions, along with complete implementations for basic functionality of the corresponding question objects.  No support for partial credit answers is currently implemented, nor are other question types working correctly (though most can be parsed to some extent).  Export to CSV works as intended, though it is intentionally simple.  Documentation on usage and integration of the API into an activity is in the doc/ directory of [[http://git.sugarlabs.org/projects/question-support-api the repository]]. A simple, but complete usage example, using a console interface is available in tests/complete_test.py.&lt;br /&gt;
&lt;br /&gt;
===Education Standards===&lt;br /&gt;
As a general API and not a standalone Activity, along with the nature of the API in specific, this project does not directly address any specific education standards or learning outcomes.  It is reliant on educators to write questions, or have questions available to them in usable formats.  As such, the potential educational standards this project could help to meet includes **any** standard where drilling or question/response evaluation is appropriate. (This includes a wider range of topic areas than the Math4 focus, even.)&lt;br /&gt;
&lt;br /&gt;
===Milestones===&lt;br /&gt;
;Initial Prototype Phase (1)&lt;br /&gt;
:Simple implementation, data model not yet nailed down, focus on import and utility to question *consumers*, Like Activities. Initial formats to include MoodleXML, GIFT.&lt;br /&gt;
        &lt;br /&gt;
;Rigorous Design Phase (2)&lt;br /&gt;
:Nail down the data model, including developing the &#039;native&#039; format, probably using a sqlite file mechanism, or other database support, if possible. Freeze the Question object (in terms of required properties,        etc.), finalize decisions about URLs for question aquisition.  Make sure requirements of other projects *can* be met by the design at this stage.&lt;br /&gt;
&lt;br /&gt;
;Full Implementation Phase (3)&lt;br /&gt;
:Complete the implementation of the import formats, including the &#039;native&#039; format.  Should be usable to other Activity developers at this point (hopefully useful, before now, but all needs should be filled at this point).  Export implementation should start now, along with prototyping for an authoring activity. (Collaboration with the reporting team *needs* to happen at this point, as the activity will probably be combined with reporting tools.)&lt;br /&gt;
&lt;br /&gt;
;Activity Development Phase (4)&lt;br /&gt;
:Complete the authoring/reporting activity for the teachers, allowing export to file formats (and possibly *serving* the questions to other XOs; requires support in activities (using the API) to support).&lt;br /&gt;
&lt;br /&gt;
===Community Contacts===&lt;br /&gt;
[[User:FGrose]], [[User:Tony37]] (see [[Talk:{{PAGENAMEE}}|talk page]])&lt;br /&gt;
&lt;br /&gt;
===RIT Project Usage===&lt;br /&gt;
{{Definition_table&lt;br /&gt;
|Produce Puzzle| No API need or usage.&lt;br /&gt;
|Lemonade Stand| No API need or usage.&lt;br /&gt;
|Assimilate| API Usage needs documented on [[Talk:{{PAGENAMEE}}|talk page]].  Progress not far enough to start implementation using the API.&lt;br /&gt;
|Fun Towers| No API need or usage.&lt;br /&gt;
|Reporting Team| Simple export format documented at [[{{PAGENAMEE}}/API_Design|API Design]].  Futher integration work would be nice, but there is more work than could be done in a year along these lines (and neither team is prepared to embark on it).&lt;br /&gt;
|Muthris| No contact from? Probably no API need or usage.&lt;br /&gt;
}}&lt;br /&gt;
===See Also===&lt;br /&gt;
{{Special:PrefixIndex/{{PAGENAMEE}}/}}&lt;/div&gt;</summary>
		<author><name>Bbl5660</name></author>
	</entry>
	<entry>
		<id>https://wiki.sugarlabs.org/index.php?title=Math4Team/RIT/Projects/Question_Support_API&amp;diff=29161</id>
		<title>Math4Team/RIT/Projects/Question Support API</title>
		<link rel="alternate" type="text/html" href="https://wiki.sugarlabs.org/index.php?title=Math4Team/RIT/Projects/Question_Support_API&amp;diff=29161"/>
		<updated>2009-05-15T14:17:08Z</updated>

		<summary type="html">&lt;p&gt;Bbl5660: &lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;{{TOCright}}&lt;br /&gt;
==Question Support API==&lt;br /&gt;
===Project Information===&lt;br /&gt;
{{Definition_table&lt;br /&gt;
|Primary Project Contact| [[User:Enimihil|Greg Stevens]]&lt;br /&gt;
|Project Members| [[User:Enimihil|Greg Stevens]], [[User:Jfinney|Jameson Finney]], [[User:Bbl5660|Brian Long]], TODO: Add yourself here...&lt;br /&gt;
|Source Repository| http://git.sugarlabs.org/projects/question-support-api&lt;br /&gt;
}}&lt;br /&gt;
&lt;br /&gt;
===Current Goals===&lt;br /&gt;
&lt;br /&gt;
* Documentation&lt;br /&gt;
** Packaging&lt;br /&gt;
** Documenting Dependencies and how to enable them in a development environment (Simple tutorial on setting up your Question API Development Environment)&lt;br /&gt;
** sudo apt-get install python-setuptools&lt;br /&gt;
** sudo easy_install pyparsing&lt;br /&gt;
** sudo easy_install peak-rules&lt;br /&gt;
** sudo easy_install sqlalchemy&lt;br /&gt;
&lt;br /&gt;
** Question Authoring guidelines&lt;br /&gt;
** Integrate within lesson planning&lt;br /&gt;
** How does an instructor get the questions they have written/found into an Activity?&lt;br /&gt;
&lt;br /&gt;
* Liase w/ other Math4 teams and Sugarlabs (What would it take to be included in the Sugar core?)&lt;br /&gt;
* Future Development (Needs / Wants — collect proposals from other teams)&lt;br /&gt;
* Discovery / Plugin  (How do activities find questions, i.e. how to get URIs to load questions from?)&lt;br /&gt;
&lt;br /&gt;
===Motivation===&lt;br /&gt;
In the RIT class working on the Math4 projects, many proposed activities&lt;br /&gt;
require a question database of some kind.  A common API or library for&lt;br /&gt;
accessing databases in different formats, stored either locally or remotely,&lt;br /&gt;
along with a simple mechanism to determine more complex formatting or&lt;br /&gt;
presentation than simple text (e.g. to include simple graphics or&lt;br /&gt;
mathematical notation) would cover a majority of the cases where the&lt;br /&gt;
activity needs some configurable &amp;quot;curriculum data&amp;quot;.&lt;br /&gt;
&lt;br /&gt;
Eventually this library could be extended to provide hints, explanations, or&lt;br /&gt;
walkthroughs for questions, in addition to the basic metadata about level,&lt;br /&gt;
grouping, difficulty, and subject matter that would be part of the base&lt;br /&gt;
system.&lt;br /&gt;
&lt;br /&gt;
===Envisioned Usage===&lt;br /&gt;
Consider a simple flash-card-like activity.  It presents a question from a&lt;br /&gt;
list of questions, allows the student to select an answer from the provided&lt;br /&gt;
answers for the question or to enter their own answer.  Then the correct&lt;br /&gt;
answer is revealed and the student it told whether their answer is correct.&lt;br /&gt;
If the question has an explanation of the correct answer, the flash-card&lt;br /&gt;
activity will show the explanation of the correct answer.  (Note that this&lt;br /&gt;
is just a simple usage example, the interaction design of a drilling&lt;br /&gt;
activity could be very different.)&lt;br /&gt;
&lt;br /&gt;
The flash-card activity would use this proposed Quiz API for the following:&lt;br /&gt;
&lt;br /&gt;
* Loading the questions from the storage location into memory. This includes any filtering or network lookup to download the questions from a remote resource and select appropriate questions for the student.&lt;br /&gt;
&lt;br /&gt;
* Determining whether the student has entered a correct answer.&lt;br /&gt;
&lt;br /&gt;
To start with, the library would simply be a time-saving tool for developers&lt;br /&gt;
needing similar functionality, but as the XS (School Server) becomes more&lt;br /&gt;
fully developed the library should integrate the functions provided by the&lt;br /&gt;
XS to enable automated update of course material for the current topic of&lt;br /&gt;
study so the students can drill material using any tool they prefer, while&lt;br /&gt;
still reporting progress to the instructor using the XS services.&lt;br /&gt;
&lt;br /&gt;
===Current Status===&lt;br /&gt;
&lt;br /&gt;
Currently, (14 May 2009) the API supports parsing the GIFT file format well enough to import Multiple Choice and True/False questions, along with complete implementations for basic functionality of the corresponding question objects.  No support for partial credit answers is currently implemented, nor are other question types working correctly (though most can be parsed to some extent).  Export to CSV works as intended, though it is intentionally simple.  Documentation on usage and integration of the API into an activity is in the doc/ directory of [[http://git.sugarlabs.org/projects/question-support-api the repository]]. A simple, but complete usage example, using a console interface is available in tests/complete_test.py.&lt;br /&gt;
&lt;br /&gt;
===Education Standards===&lt;br /&gt;
As a general API and not a standalone Activity, along with the nature of the API in specific, this project does not directly address any specific education standards or learning outcomes.  It is reliant on educators to write questions, or have questions available to them in usable formats.  As such, the potential educational standards this project could help to meet includes **any** standard where drilling or question/response evaluation is appropriate. (This includes a wider range of topic areas than the Math4 focus, even.)&lt;br /&gt;
&lt;br /&gt;
===Milestones===&lt;br /&gt;
;Initial Prototype Phase (1)&lt;br /&gt;
:Simple implementation, data model not yet nailed down, focus on import and utility to question *consumers*, Like Activities. Initial formats to include MoodleXML, GIFT.&lt;br /&gt;
        &lt;br /&gt;
;Rigorous Design Phase (2)&lt;br /&gt;
:Nail down the data model, including developing the &#039;native&#039; format, probably using a sqlite file mechanism, or other database support, if possible. Freeze the Question object (in terms of required properties,        etc.), finalize decisions about URLs for question aquisition.  Make sure requirements of other projects *can* be met by the design at this stage.&lt;br /&gt;
&lt;br /&gt;
;Full Implementation Phase (3)&lt;br /&gt;
:Complete the implementation of the import formats, including the &#039;native&#039; format.  Should be usable to other Activity developers at this point (hopefully useful, before now, but all needs should be filled at this point).  Export implementation should start now, along with prototyping for an authoring activity. (Collaboration with the reporting team *needs* to happen at this point, as the activity will probably be combined with reporting tools.)&lt;br /&gt;
&lt;br /&gt;
;Activity Development Phase (4)&lt;br /&gt;
:Complete the authoring/reporting activity for the teachers, allowing export to file formats (and possibly *serving* the questions to other XOs; requires support in activities (using the API) to support).&lt;br /&gt;
&lt;br /&gt;
===Community Contacts===&lt;br /&gt;
[[User:FGrose]], [[User:Tony37]] (see [[Talk:{{PAGENAMEE}}|talk page]])&lt;br /&gt;
&lt;br /&gt;
===RIT Project Usage===&lt;br /&gt;
{{Definition_table&lt;br /&gt;
|Produce Puzzle| No API need or usage.&lt;br /&gt;
|Lemonade Stand| No API need or usage.&lt;br /&gt;
|Assimilate| API Usage needs documented on [[Talk:{{PAGENAMEE}}|talk page]].  Progress not far enough to start implementation using the API.&lt;br /&gt;
|Fun Towers| No API need or usage.&lt;br /&gt;
|Reporting Team| Simple export format documented at [[{{PAGENAMEE}}/API_Design|API Design]].  Futher integration work would be nice, but there is more work than could be done in a year along these lines (and neither team is prepared to embark on it).&lt;br /&gt;
|Muthris| No contact from? Probably no API need or usage.&lt;br /&gt;
}}&lt;br /&gt;
===See Also===&lt;br /&gt;
{{Special:PrefixIndex/{{PAGENAMEE}}/}}&lt;/div&gt;</summary>
		<author><name>Bbl5660</name></author>
	</entry>
	<entry>
		<id>https://wiki.sugarlabs.org/index.php?title=Math4Team/RIT/Projects/Question_Support_API&amp;diff=28360</id>
		<title>Math4Team/RIT/Projects/Question Support API</title>
		<link rel="alternate" type="text/html" href="https://wiki.sugarlabs.org/index.php?title=Math4Team/RIT/Projects/Question_Support_API&amp;diff=28360"/>
		<updated>2009-05-01T16:11:32Z</updated>

		<summary type="html">&lt;p&gt;Bbl5660: &lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;{{TOCright}}&lt;br /&gt;
==Question Support API==&lt;br /&gt;
===Project Information===&lt;br /&gt;
{{Definition_table&lt;br /&gt;
|Primary Project Contact| [[User:Enimihil|Greg Stevens]]&lt;br /&gt;
|Project Members| [[User:Enimihil|Greg Stevens]], [[User:Jfinney|Jameson Finney]], [[User:Bbl5660|Brian Long]], TODO: Add yourself here...&lt;br /&gt;
|Source Repository| http://git.sugarlabs.org/projects/question-support-api&lt;br /&gt;
}}&lt;br /&gt;
&lt;br /&gt;
If you are working on a project that would or could use this API, **please** put a brief description of the intended usage and/or add the requirements for your usage that aren&#039;t already listed to the [[Talk:Math4Team/RIT/Projects/Question_Support_API|talk page]] page.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
===Current Goals===&lt;br /&gt;
* Packaging&lt;br /&gt;
* Documentation&lt;br /&gt;
* Documenting Dependencies and how to enable them in a development environment (Simple tutorial on setting up your Question API Development Environment)&lt;br /&gt;
** sudo apt-get install python-setuptools&lt;br /&gt;
** sudo easy_install pyparsing&lt;br /&gt;
** sudo easy_install peak-rules&lt;br /&gt;
* Liase w/ other Math4 teams and Sugarlabs (Looking to get into the core of sugar)&lt;br /&gt;
* Future Development (Needs / Wants)&lt;br /&gt;
* Discovery / Plugin&lt;br /&gt;
* Question Authoring guidelines&lt;br /&gt;
* Integrate within lesson planning&lt;br /&gt;
* How does an instructor get the students using their quesiton material&lt;br /&gt;
&lt;br /&gt;
===Motivation===&lt;br /&gt;
In the RIT class working on the Math4 projects, many proposed activities&lt;br /&gt;
require a question database of some kind.  A common API or library for&lt;br /&gt;
accessing databases in different formats, stored either locally or remotely,&lt;br /&gt;
along with a simple mechanism to determine more complex formatting or&lt;br /&gt;
presentation than simple text (e.g. to include simple graphics or&lt;br /&gt;
mathematical notation) would cover a majority of the cases where the&lt;br /&gt;
activity needs some configurable &amp;quot;curriculum data&amp;quot;.&lt;br /&gt;
&lt;br /&gt;
Eventually this library could be extended to provide hints, explanations, or&lt;br /&gt;
walkthroughs for questions, in addition to the basic metadata about level,&lt;br /&gt;
grouping, difficulty, and subject matter that would be part of the base&lt;br /&gt;
system.&lt;br /&gt;
&lt;br /&gt;
===Envisioned Usage===&lt;br /&gt;
Consider a simple flash-card-like activity.  It presents a question from a&lt;br /&gt;
list of questions, allows the student to select an answer from the provided&lt;br /&gt;
answers for the question or to enter their own answer.  Then the correct&lt;br /&gt;
answer is revealed and the student it told whether their answer is correct.&lt;br /&gt;
If the question has an explanation of the correct answer, the flash-card&lt;br /&gt;
activity will show the explanation of the correct answer.  (Note that this&lt;br /&gt;
is just a simple usage example, the interaction design of a drilling&lt;br /&gt;
activity could be very different.)&lt;br /&gt;
&lt;br /&gt;
The flash-card activity would use this proposed Quiz API for the following:&lt;br /&gt;
&lt;br /&gt;
* Loading the questions from the storage location into memory. This includes any filtering or network lookup to download the questions from a remote resource and select appropriate questions for the student.&lt;br /&gt;
&lt;br /&gt;
* Determining whether the student has entered a correct answer.&lt;br /&gt;
&lt;br /&gt;
To start with, the library would simply be a time-saving tool for developers&lt;br /&gt;
needing similar functionality, but as the XS (School Server) becomes more&lt;br /&gt;
fully developed the library should integrate the functions provided by the&lt;br /&gt;
XS to enable automated update of course material for the current topic of&lt;br /&gt;
study so the students can drill material using any tool they prefer, while&lt;br /&gt;
still reporting progress to the instructor using the XS services.&lt;br /&gt;
&lt;br /&gt;
===Current Status===&lt;br /&gt;
&lt;br /&gt;
Work is ongoing to build a fully working setup with a single input format, along with nailing down a flexible and straightforward way to manipulate the Question objects while allowing for extensiblility in the future.  &lt;br /&gt;
&lt;br /&gt;
As of 24 Apr 2009, in the [[http://git.sugarlabs.org/projects/question-support-api/|source repository]] is a GIFT format parser and some minimal URL handling code.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
===Education Standards===&lt;br /&gt;
As a general API and not a standalone Activity, along with the nature of the API in specific, this project does not directly address any specific education standards or learning outcomes.  It is reliant on educators to write questions, or have questions available to them in usable formats.  As such, the potential educational standards this project could help to meet includes **any** standard where drilling or question/response evaluation is appropriate. (This includes a wider range of topic areas than the Math4 focus, even.)&lt;br /&gt;
&lt;br /&gt;
===Milestones===&lt;br /&gt;
;Initial Prototype Phase (1)&lt;br /&gt;
:Simple implementation, data model not yet nailed down, focus on import and utility to question *consumers*, Like Activities. Initial formats to include MoodleXML, GIFT.&lt;br /&gt;
        &lt;br /&gt;
;Rigorous Design Phase (2)&lt;br /&gt;
:Nail down the data model, including developing the &#039;native&#039; format, probably using a sqlite file mechanism, or other database support, if possible. Freeze the Question object (in terms of required properties,        etc.), finalize decisions about URLs for question aquisition.  Make sure requirements of other projects *can* be met by the design at this stage.&lt;br /&gt;
&lt;br /&gt;
;Full Implementation Phase (3)&lt;br /&gt;
:Complete the implementation of the import formats, including the &#039;native&#039; format.  Should be usable to other Activity developers at this point (hopefully useful, before now, but all needs should be filled at this point).  Export implementation should start now, along with prototyping for an authoring activity. (Collaboration with the reporting team *needs* to happen at this point, as the activity will probably be combined with reporting tools.)&lt;br /&gt;
&lt;br /&gt;
;Activity Development Phase (4)&lt;br /&gt;
:Complete the authoring/reporting activity for the teachers, allowing export to file formats (and possibly *serving* the questions to other XOs; requires support in activities (using the API) to support).&lt;br /&gt;
&lt;br /&gt;
===Community Contacts===&lt;br /&gt;
[[User:FGrose]], [[User:Tony37]] (see [[Talk:{{PAGENAMEE}}|talk page]])&lt;br /&gt;
&lt;br /&gt;
===See Also===&lt;br /&gt;
{{Special:PrefixIndex/{{PAGENAMEE}}/}}&lt;/div&gt;</summary>
		<author><name>Bbl5660</name></author>
	</entry>
	<entry>
		<id>https://wiki.sugarlabs.org/index.php?title=Math4Team/RIT/Projects/Question_Support_API&amp;diff=28359</id>
		<title>Math4Team/RIT/Projects/Question Support API</title>
		<link rel="alternate" type="text/html" href="https://wiki.sugarlabs.org/index.php?title=Math4Team/RIT/Projects/Question_Support_API&amp;diff=28359"/>
		<updated>2009-05-01T16:08:30Z</updated>

		<summary type="html">&lt;p&gt;Bbl5660: &lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;{{TOCright}}&lt;br /&gt;
==Question Support API==&lt;br /&gt;
===Project Information===&lt;br /&gt;
{{Definition_table&lt;br /&gt;
|Primary Project Contact| [[User:Enimihil|Greg Stevens]]&lt;br /&gt;
|Project Members| [[User:Enimihil|Greg Stevens]], [[User:Jfinney|Jameson Finney]], [[User:Bbl5660|Brian Long]], TODO: Add yourself here...&lt;br /&gt;
|Source Repository| http://git.sugarlabs.org/projects/question-support-api&lt;br /&gt;
}}&lt;br /&gt;
&lt;br /&gt;
If you are working on a project that would or could use this API, **please** put a brief description of the intended usage and/or add the requirements for your usage that aren&#039;t already listed to the [[Talk:Math4Team/RIT/Projects/Question_Support_API|talk page]] page.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
===Current Goals===&lt;br /&gt;
* Packaging&lt;br /&gt;
* Documentation&lt;br /&gt;
* Dependencies&lt;br /&gt;
* Liase w/ other Math4 teams and Sugarlabs (Looking to get into the core of sugar)&lt;br /&gt;
* Future Development (Needs / Wants)&lt;br /&gt;
* Discovery / Plugin&lt;br /&gt;
* Question Authoring guidelines&lt;br /&gt;
* Integrate within lesson planning&lt;br /&gt;
* How does an instructor get the students using their quesiton material&lt;br /&gt;
&lt;br /&gt;
===Motivation===&lt;br /&gt;
In the RIT class working on the Math4 projects, many proposed activities&lt;br /&gt;
require a question database of some kind.  A common API or library for&lt;br /&gt;
accessing databases in different formats, stored either locally or remotely,&lt;br /&gt;
along with a simple mechanism to determine more complex formatting or&lt;br /&gt;
presentation than simple text (e.g. to include simple graphics or&lt;br /&gt;
mathematical notation) would cover a majority of the cases where the&lt;br /&gt;
activity needs some configurable &amp;quot;curriculum data&amp;quot;.&lt;br /&gt;
&lt;br /&gt;
Eventually this library could be extended to provide hints, explanations, or&lt;br /&gt;
walkthroughs for questions, in addition to the basic metadata about level,&lt;br /&gt;
grouping, difficulty, and subject matter that would be part of the base&lt;br /&gt;
system.&lt;br /&gt;
&lt;br /&gt;
===Envisioned Usage===&lt;br /&gt;
Consider a simple flash-card-like activity.  It presents a question from a&lt;br /&gt;
list of questions, allows the student to select an answer from the provided&lt;br /&gt;
answers for the question or to enter their own answer.  Then the correct&lt;br /&gt;
answer is revealed and the student it told whether their answer is correct.&lt;br /&gt;
If the question has an explanation of the correct answer, the flash-card&lt;br /&gt;
activity will show the explanation of the correct answer.  (Note that this&lt;br /&gt;
is just a simple usage example, the interaction design of a drilling&lt;br /&gt;
activity could be very different.)&lt;br /&gt;
&lt;br /&gt;
The flash-card activity would use this proposed Quiz API for the following:&lt;br /&gt;
&lt;br /&gt;
* Loading the questions from the storage location into memory. This includes any filtering or network lookup to download the questions from a remote resource and select appropriate questions for the student.&lt;br /&gt;
&lt;br /&gt;
* Determining whether the student has entered a correct answer.&lt;br /&gt;
&lt;br /&gt;
To start with, the library would simply be a time-saving tool for developers&lt;br /&gt;
needing similar functionality, but as the XS (School Server) becomes more&lt;br /&gt;
fully developed the library should integrate the functions provided by the&lt;br /&gt;
XS to enable automated update of course material for the current topic of&lt;br /&gt;
study so the students can drill material using any tool they prefer, while&lt;br /&gt;
still reporting progress to the instructor using the XS services.&lt;br /&gt;
&lt;br /&gt;
===Current Status===&lt;br /&gt;
&lt;br /&gt;
Work is ongoing to build a fully working setup with a single input format, along with nailing down a flexible and straightforward way to manipulate the Question objects while allowing for extensiblility in the future.  &lt;br /&gt;
&lt;br /&gt;
As of 24 Apr 2009, in the [[http://git.sugarlabs.org/projects/question-support-api/|source repository]] is a GIFT format parser and some minimal URL handling code.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
===Education Standards===&lt;br /&gt;
As a general API and not a standalone Activity, along with the nature of the API in specific, this project does not directly address any specific education standards or learning outcomes.  It is reliant on educators to write questions, or have questions available to them in usable formats.  As such, the potential educational standards this project could help to meet includes **any** standard where drilling or question/response evaluation is appropriate. (This includes a wider range of topic areas than the Math4 focus, even.)&lt;br /&gt;
&lt;br /&gt;
===Milestones===&lt;br /&gt;
;Initial Prototype Phase (1)&lt;br /&gt;
:Simple implementation, data model not yet nailed down, focus on import and utility to question *consumers*, Like Activities. Initial formats to include MoodleXML, GIFT.&lt;br /&gt;
        &lt;br /&gt;
;Rigorous Design Phase (2)&lt;br /&gt;
:Nail down the data model, including developing the &#039;native&#039; format, probably using a sqlite file mechanism, or other database support, if possible. Freeze the Question object (in terms of required properties,        etc.), finalize decisions about URLs for question aquisition.  Make sure requirements of other projects *can* be met by the design at this stage.&lt;br /&gt;
&lt;br /&gt;
;Full Implementation Phase (3)&lt;br /&gt;
:Complete the implementation of the import formats, including the &#039;native&#039; format.  Should be usable to other Activity developers at this point (hopefully useful, before now, but all needs should be filled at this point).  Export implementation should start now, along with prototyping for an authoring activity. (Collaboration with the reporting team *needs* to happen at this point, as the activity will probably be combined with reporting tools.)&lt;br /&gt;
&lt;br /&gt;
;Activity Development Phase (4)&lt;br /&gt;
:Complete the authoring/reporting activity for the teachers, allowing export to file formats (and possibly *serving* the questions to other XOs; requires support in activities (using the API) to support).&lt;br /&gt;
&lt;br /&gt;
===Community Contacts===&lt;br /&gt;
[[User:FGrose]], [[User:Tony37]] (see [[Talk:{{PAGENAMEE}}|talk page]])&lt;br /&gt;
&lt;br /&gt;
===See Also===&lt;br /&gt;
{{Special:PrefixIndex/{{PAGENAMEE}}/}}&lt;/div&gt;</summary>
		<author><name>Bbl5660</name></author>
	</entry>
</feed>