slideDown

Friday, June 19, 2015

Using WeBWorK questions in Moodle quizzes -- the Moodle/WeBWorK question bridge

This is a copy of a post that I made to the Moodle forum on Quizzes.

I’m happy to announce a version of WeBWorK that can serve mathematics questions via a Moodle quiz.  This gives a tighter connection between Moodle and WeBWorK, allowing students to work exclusively with the Moodle quiz interface while WeBWorK produces the mathematics questions and processes the student answers in the background.  The result is similar to using STACK to produce and process mathematics questions.

This is a first attempt at realizing the question level WeBWorK-Moodle bridge which I proposed in this forum in my earlier post last January ( https://moodle.org/mod/forum/discuss.php?d=277922) and on my blog (http://michaelgage.blogspot.com/2015/01/connecting-webwork-to-moodle-2xs.html )

It makes most of the 25K+ mathematics questions written for WeBWorK’s OpenProblemLibrary (http://webwork.maa.org/wiki/Open_Problem_Library) available for use in Moodle quizzes as well.  The OPL began with questions designed for single and multivariable calculus courses (and that is still the majority of the collection) but has expanded in both up and down to include questions for linear algebra and differential equations, complex variables, operations research, and statistics; as well as precalculus and developmental mathematics problems and many other math subjects.

To see this Moodle/WeBWorK connection in action,  view the Moodle course for linear algebra and differential equations at (https://devel3.webwork.rochester.edu/moodle/course/view.php?id=21).  You will need to login as “visitor”, using the password “visitor” in order to view the quizzes. (Guests are not allowed to view Moodle quizzes.)

This is  a mockup of the matrix algebra/ODE course which I taught in 2009 using the Moodle/WeBWorK assignment connection (which presents an entire homework assignment using the WeBWorK interface).  In each week  you’ll see the original WeBWorK assignment that I used (the icon is a yellow spider web on blue background) and near it the Moodle Quiz version of the same assignment.  Try each of them to get a comparison between the WeBWorK/Moodle assignment bridge and the new WeBWorK/Moodle question bridge.

I have set the behavior of the Moodle Quiz so that it closely approximates the original WeBWorK assignment.  These assignments are meant primarily for homework/practice not for normative assessment.  The student can retry each question as often as she wishes and if there are several answer blanks then evaluation is given separately for each blank.

The Moodle portion of this bridge is built on the Opaque question type module implemented by Tim Hunt for interfacing with webservice test engines.  I am indebted to Tim for help and advice while I was implementing this Moodle/WeBWorK question interface.

Information for installing and configuring the Moodle Opaque question type is available on github at https://github.com/moodleou.  Specifically you need the opaque qtype module:  https://github.com/moodleou/moodle-qtype_opaque and the opaque behaviour module:  https://github.com/moodleou/moodle-qbehaviour_opaque.

I’ll provide more detailed suggestions for creating your own Moodle/WeBWorK questions later but for those somewhat familiar with both WeBWorK and Moodle here is the short explanation.
1. You create a new Opaque engine pointing to the url: https://devel3.webwork.rochester.edu/opaqueserver_wsdl and set the question bank URL for the engine to https://devel3.webwork.rochester.edu/webwork2/spring09mth165 .
2. For each question the questionID should be the same as the path of a WeBWorK problem in the OpenProblemLibrary with the following replacements.
The initial segment should be “library” instead of “Library”, each slash is replaced by two underscores, and each hyphen is replaced by three underscores. (This is required in order to conform to the Opaque client naming scheme.)
For example:
Library/Rochester/setAlgebra01RealNumbers/lhp1_31-34_mo.pg
is obtained using the questionID:
library__Rochester__setAlgebra01RealNumbers__lhp1_31___34_mo.pg

For those who are really impatient the WeBWorK server function is provided by adding the project opaque_server along side a standard WeBWorK course. The Opaque Server can be found at (https://github.com/openwebwork/opaque_server) along with minimal documentation for installing.  

This is the first version of the Moodle/WeBWorK question bridge so the behavior may change slightly in the future.  Because STACK and WeBWorK are already very similar I would be interested in creating a question type that was interchangeable between the two background mathematics engines.  Instructors would be able to mix STACK and WeBWorK questions in the same quiz in such a way that it was invisible (or nearly invisible) to students which engine was handling the question.

Your comments are welcome.

-- Mike Gage, University of Rochester, Rochester, NY

Tuesday, June 16, 2015

Embedding single WeBWorK problems in HTML pages


Whether writing a full text book or just an explanation and worksheet for a class it is often useful to include an active (even better an interactive example) within the text itself. You can always use a link to refer to a WeBWorK homework set but that doesn’t have the immediacy of a problem embedded in the page itself.  

Now you can use WeBWorK to do that -- there is a new mechanism that allows you to export the content of an individual problem without all of the buttons and navigation items that usually appear for a standard homework set. Here is an example.

Problem 1 -- interval notation




In many websites this problem is interactive, try it.   After the jump I have attached a link to an HTML page with many more examples which you can try out. You can also download the page and modify it to display other questions.  On the HTML page I have wrapped each example with a "knowl" slide down javaScript that allows you to slide open or to close each example question individually.



Monday, January 19, 2015

Connecting WeBWorK to Moodle 2.x's question type for use in Moodle quizzes.

This note was posted on moodle's quiz forum on January 7, 2015.
https://moodle.org/mod/forum/discuss.php?d=277922

I am working on plugging WeBWorK in as a back end for analyzing mathematics questions in a way similar to STACK. I will be using the opaque question type as a starting place. 

I am just beginning this project and I expect to have questions for this forum as I proceed so I thought it a good idea to introduce myself.

I am Mike Gage, a math professor at the University of Rochester, (Rochester, NY, USA) and one of the originators of the open source online homework system WeBWorK. It was originally designed to deal with mathematics at the calculus level but it now has questions from middle school through ordinary differential equations, linear algebra and complex analysis.

It already interoperates with Moodle as an assignment module -- there is single sign-on between Moodle and WeBWorK and after the student finishes their WeBWorK homework assignment the grades are returned to the google grade book. My goal is to make WeBWorK work as a question type for Moodle2.x. We already have a question type version for Moodle1.9 

For those interested here is an example of a course using WeBWorK for assignments (search for the spiderweb icon and click on it). https://hosted2.webwork.rochester.edu/moodle/course/view.php?id=3

For those interested in an example of WeBWorK being used to create question types in Moodle 1.9 (Created by Matt Leventi in 2007) https://devel1.webwork.rochester.edu/moodle/mod/quiz/attempt.php?q=256&forcenew=1 
(you can log in using the guest button). This version could use improvement but I don't plan to work on this further unless there is a large demand -- it seems better to put the effort into a Moodle2.x version. 

Finally for those interested in WeBWorK in its native form you can look at this link:
https://hosted2.webwork.rochester.edu/webwork2/2014_07_UR_demo/ (you can login using the guest button)

The home wiki for WeBWorK is http://webwork.maa.org/wiki

Thank you in advance for considering the questions I will have as I start on adapting
the opaque question type to WeBWorK. smile

Take care,

Mike 

Monday, May 26, 2014

WeBWorK::Asheville May 19 - 22, 2014

WeBWorK::Asheville   May 19 - 22, 2014

WeBWorK::Asheville::2014 was held at Western Carolina University from Monday, May 19 through Thursday May 22, 2014.   Thanks very much to Geoff Goehle at WCU for organizing the code camp.  

This was a small focused code camp attended by Mike Gage, Geoff Goehle, Peter Staab, Bruce Romano, Jason Aubrey  and John Travis and devoted principally to making progress on 
  • WeBWorK 3 -- the new AJAX based interface being developed by Peter Staab
  • the install script -- automatically installing the entire WeBWorK stack being developed by Jason Aubrey

In addition we made a start on writing a grant proposal for dissemination of WeBWorK to community colleges and to high schools, worked on refining examples that use both MultiAnswers and Scaffolding (sequential or compound problems) in the same WeBWorK question, and created a first draft of a procedure to be followed when checking in new code to the github.com/openwebwork repository.  


This camp  and previous code camps are supported by the NSF through a national dissemination grant to the MAA. 

Friday, November 1, 2013

WeBWorK accessibility projects

Hi,

There are a number of centers using WeBWorK that are interested insuring that our online homework system is accessible, that it meets universal design goals and can be used as widely as possible.  Using MathJax to represent mathematical equations has been a big boost in that direction.

Here is a post from Portland Community College one of the active centers working on the accessibility aspect of WeBWorK.  The summer MathFest conference will be held in Portland, OR in August 7-10, 2013 and there are tentative plans to hold a code camp in Portland devoted to WeBWorK accessibility on the three days proceeding MathFest. Details are still being worked out but if you are interested or have ideas or suggestions email me or Alex Jordan at Portland Community College.

Below is the report.

-- Mike

Report from Portland Community College
Kaela Parks: Director of Disability Services
Karen Sorensen: Accessibility Advocate for online courses

Chris Hughes, Scot Leavitt, Alex Jordan: Math faculty

Making Math More Accessible at Portland Community College

At Portland Community College (PCC), Disability Services (DS) is tasked with ensuring the accommodation process unfolds appropriately across and throughout a district serving approximately 90,000 students per year, 50,000 of whom are seeking credit.  In recent years the options for curricular content format and delivery have changed considerably, bringing new barriers, but also new opportunities for making math more accessible. Many courses are now designed around online engagement points that tap vast databases, generating individualized browsing sessions any time of day or night, giving users valuable and almost instantaneous feedback. While Disability Services can convert known problem sets ahead of time, and hire aides to serve as readers and scribes, it is not practical, nor does it provide equally effective communication, to try and address barriers on the fly.

The truth is that while there will always be some need for individualized accommodation, for example creating tactile representations of graphs, there is much that can and should be done on the front end to minimize the need for manual adjustments. If online engagement points comply with established Web Content Accessibility Guidelines and use proper structural markup for math content, users who rely on text to speech, braille translation, magnification, or voice recognition, can still typically get what they need. The content is built for flexibility. However, when these best practices are not honored, there is often no way DS professionals can ensure equally effective communication. We can’t reach behind the firewall and “fix” content by adding descriptions to images, putting equations into MathML, or redesigning the interface to ensure keyboard navigation.  What DS can do, and should do, is partner with Faculty, Instructional Support, and other stakeholders to help the institution recognize our shared responsibility to ensure equal access through ethical course design and curricular material adoption processes.

At PCC, online instructors develop their own courses within the learning management system. They choose the color and formatting of their text, the media, publisher materials and third party web sites and applications to use in their courses. And since the spring of 2012, all new and revised online courses paid for development by the Distance Education (DE) department are reviewed for accessibility. But how is an instructor supposed to know what’s accessible and what isn’t?

The Distance Education department has seen accessibility as an area that instructors need support. To that end, they hired an Accessibility Advocate who trains instructors and reviews courses for accessibility. And last fall (2012) the DE department co-sponsored with the Math department, two math faculty in their study of accessible mathematics. This subject specific study was so successful that the DE department hopes to emulate it with other academic program areas, especially in the STEM fields.

Math faculty members, Scot Leavitt and Chris Hughes investigated both the accessibility of content generated by the instructor and that which is delivered by homework management systems. In addition to studying commercial homework management systems such as MyMathLab, they ran a battery of accessibility tests (assisted by Math faculty Alex Jordan) on WeBWorK. The results from the WeBWorK experiments were superb- the screen reader JAWS was able to navigate easily around the web page and, most importantly, could read even the most complicated mathematical expression with the greatest of clarity.

WeBWorK is currently the only math homework management system fully endorsed by the Disability Services Office at PCC, and they are providing strong support in the creation of a dedicated server to host it. The server should be fully functional by the end of Summer 2013, and ready for wide-spread use across the college at some point within a year. Supporting WeBWorK in this way allows PCC to provide instructors with an alternative to commercial offerings that have known accessibility issues. By establishing our own WeBWorK server we ensure our community has access to a powerful homework management system that is more usable to more people more of the time. It also provides the institution with a means to ensure access for students who are enrolled in sections built around inaccessible engagement points by providing an equally effective alternative. 


Details of the Math accessibility study and other resources can be found at http://www.pcc.edu/resources/instructional-support/access/.

Wednesday, October 9, 2013

WeBWorK::Rochester::2013 October 4 - 7, 2013

WeBWorK::Rochester::2013, held at the University of Rochester from Friday October 4 through Monday October 7, was dedicated to
  • putting final touches on release/2.8 of WeBWorK 
  • integrating the new user interface created by Peter Staab into the development branch of WeBWorK
A small group of experienced WeBWorK developers participated in this code camp: Davide Cervone, David Gage, Mike Gage, Geoff Goehle, John Jones and Peter Staab. My thanks to all of them for their contributions to a very successful weekend.  My thanks also to Louise Wingrove for organizing the lodging and meals for participants.

This camp  and previous code camps are supported by the NSF through a national dissemination grant to the MAA. ( link to www.nsf.gov  once it is back up and running again. :-)  )

The first outcome of the camp is an updated release/2.8 which we plan to merge with the master branch on December 1, 2013.  We combined the original release/2.8 with most of the fixes and small features which have been submitted to the develop branch over the last three months.  Both release/2.8 and the develop branch have been running smoothly under moderate course loads on the MAA testcourse site and on the hosted2 site at the University of Rochester.  The activity devoted to release/2.8 over the next few months will be responding to bug fix requests, minor adjustments of features and general polishing of the instructor experience.  Very little has changed in the student interface and there have been very few requests for changes in this aspect of WeBWorK.  While not specifically adapted to mobile devices the student view of WeBWorK works acceptably well on iPhones, iPads and Android mobile devices.

Features of release/2.8 are listed on the wiki at: http://webwork.maa.org/wiki/Release_notes_for_WeBWorK_2.8  
(You can type release/ 2.8 into the search box of the wiki to find it.)

You can also view all of the work involved in creating release/2.8, step by step,
viewing the commits page on github. https://github.com/openwebwork/webwork2/pull/182/commits
The most recent commits are at the bottom.

The will be more exposition about new features in release/2.8 (and some under advertised features of release/2.7) in subsequent blog posts.

It should be noted that LibraryBrowser1, although it has not changed its name, has received substantial improvements in release/2.8 from the work of John Jones.  In general it should be much faster because some of the ajax calls used in librarybrowsers2&3 have been used to speed up rendering of individual problems on a library page.  When enabled, the library page also allows for the easy tagging of library problems.  (see http://webwork-jj.blogspot.com/2013/07/webwork-opl-workshop-charlottesville-va.html for more details)

The second outcome of WeBWorK::Rochester::2013 is the integration of a new AJAX/javaScript
instructor interface, largely created by Peter Staab at Fitchburg State University, which has been merged into the develop branch of WeBWorK.  This interface provides instructors with behavior that feels more like a "google app" instead of the form based interface that we have been  used to since the mid 2000's.  Peter began work on this project during WeBWorK::Rochester::2012 held a year ago June.

One of the early outcomes was "ClasslistEditor3" which has been available as an option in both release/2.7 and release/2.8.  The current version includes the ClasslistManager (renamed and improved from ClasslistEditor3) and HomeworkManager which combines the duties of the Library Browsers, the HomeworkSetsEditors(1&2) and the Instructor tools page. The HomeworkManager's library browsing functions are built on the experience gained from the prototype LibraryBrowser2 and LibraryBrowser3 which were written by David Gage.  All of these tools have been available for testing in their embryo form on previous releases, but they have now progressed to the point where they can usefully speed up many standard instructor tasks.

WeBWorK::Rochester::2013 allowed Peter to explain in person his work and his vision to several of the other core WeBWorK developers. (Peter has not been able to attend any of the code camps since last June.)  We now have a clearer idea of what has to be done to finish the transition.  We were able to make significant strides in improving reliability during the code camp itself but much more remains to be done.

The net effect of using ClasslistManager and HomeworkManager is that instructors can manipulate classlists -- add students, change passwords, or homework assignments -- create, assign, etc. immediately.  The updates of these changes to the back end server are done asynchronously and are invisible to the user.

At the moment the develop branch is fairly wild.  Some actions don't behave as you expect or as they should;  there are many features of the older editors and browsers that have not yet been implemented in the new interface. In some cases things that work fine on small sets or classes slow down drastically when the scale is increased. We expect that it will take many months before this develop branch is ready for use on a regular basis.

On the upside -- the student interface is not affected, and so far at least there is no affect on stored data.  Since the old editors are still available one can simply switch to them for features that are not yet implemented and then switch back to the new "managers" for their added convenience on tasks where they work well.

One other thing we need to watch out for.  The new javaScript interface will initially be a step backward as far as localization (translation in other languages) is concerned.  We will be enlisting all the help we can for the translating effort but there is a lot of new and quite different code that has to be internationalized.  Similarly we are concerned about whether accessibility is helped or hurt by the switch to interactive apps.  We are using standard libraries, all of which are concerned with accessibility issues, but it will take time and we look for a lot of constructive feedback to preserve the gains in accessibility that we achieved between release/2.5 and release/2.8 and insure that these gains are not lost in this next release (most likely to be called WeBWorK3 ).

For those helping with development:


  1. submit bug fixes and small feature tweaks to the release/2.8 branch
  2. submit new features to the develop branch


In all cases make sure that your are in sync with the branch you will submit to before you
send a pull request.  If the commit does not merge cleanly it will be returned for more work before it is even reviewed.

-- Mike



Wednesday, July 17, 2013

WeBWorK::Vancouver - June 27 - 30, 2013

Hi again,

Close on the heels of our participation Sage Edu Days comes the code camp at Vancouver.

We had a significant number of first time participants at this code camp:  Alex Jordan and Chris Huges, Portland Community College; Liz Brauer, ECE department at Northern Arizona University, Nandor Sieben, Math Dept at Northern Arizona University; Nora Franzova, Langara College, Vancouver; Aori Nevo, Stevens Institute of Technology, NJ.  One of the purposes of these code camp is to widen the pool of developers who feel comfortable making contributions to the WeBWorK code base.

Additional guests dropped in for part of the code camp: Davor Cubranic, Statistics dept at UBC; John Hsu, Center for Teaching, Learning and Technology at UBC; and Steven Wittens, developer of MathBox.

The remaining participants were Anneke Bart, St. Louis University; Robert Beezer, U. of Puget Sound; Mike Gage, U. of Rochester; David Gage, U. of Waterloo; Djun Kim, Myplanet Digital; Arnie Pizer, U. of Rochester and John Travis, Mississippi College.

Here are a few highlights from the code camp:


  • Yoav Freund and Matt Elkerj from UCSD gave a presentation via Skype on using webwork and machine learning to discover patterns in the past_answer log that indicate that a student is floundering and to step in before this occurs with additional scaffolding. They have a video on you tube at  https://www.youtube.com/watch?v=yYqKaYckjO8 which presents this very well. There is clearly a lot more that can be done but this is a very intriguing start.
  • Greg Kraus from NCSU gave a presentation on the accessibility of WeBWorK including both strengths (of which there are many -- especially when using MathJax) and weakness that can be improved. He has an initial document at 
    • https://docs.google.com/a/ncsu.edu/document/d/1n1aUjAxRqAxxwfUUCf0uAj923f5QokpFu-fYUvJJPcU/ listing specific items that can be fixed in the presentation layer.  
      • If you would like access to this document (and in particular if you might have time to work on some of the fixes) please write Greg (greg_kraus) at ncsu.edu.
    • Aori Nevo has already started preliminary work on this and contributed a few patches to github.
    • Alex Jordan and Chris Hughes from Portland Community College report that their IT/accessibility team is delighted with WeBWorK particularly compared to MyMathLab. I've asked them to write a blog post on their findings when they get a chance.
  • Steven Wittens gave a marvelous demonstration of MathBox, a mathematics presentation tool built on top of three.js which allows you to "show" not explain. Examples of a similar presentations are at:
  • David Gage created a package for Vagrant which allows you to set up a development site for WeBWorK on your own computer in about 5 mouse clicks and in 5 minutes. Watch David's blogpost for more details. 
  • David Gage and Aori Nevo worked on a prototype white board that allows many students to draw and the drawings are echoed on the instructors board. It's built with web components which simplifies the code. There is a lot of potential here. 
  • John Travis and Jason Aubrey presented two different ways in which Sage and WeBWorK can interact.
    • JT has a number of examples of using sage as an applet (sagelets?). The technology is available in WeBWorK-2.7 (the current master branch) 
    • Jason has added a macro that will take a program written for Sage (essentially in python) and ship it off to the sage engine to be processed and to return an answer. You might use this to symbolically integrate a function which WeBWorK would not be able to do. (This is available in release/2.8 and develop branches). 
    • Both of these approaches integrate WeBWorK and the sage cell server being developed by Jason Grout and others. The technology works very well once all the connections are set up. It could still use some work with graceful failure and error reporting when one or the other of the webservices is not connecting properly.
  • Alex and Chris also worked on the surprisingly difficult problem of correctly checking factored polynomials in the context of algebra and pre-calculus. It's difficult because one does not want to accept mathematically equivalent answers (e.g. unfactored polynomials) but the exact definition of simplified form is not well defined. (is 2x+1 correct? or 2(x+1/2). How about 2x+2 and 2(x+1)?). They are using Sage as one approach to the answer. It also gave rise to some serious but amusing questions about factoring polynomials over finite fields as possible approaches to the solution. I'm sure the algebra/pre-calculus students will be thrilled.
  • Mike and Nandor added code that makes Chromatic.pm much more portable. (Chromatic requires a compiled C program in order to check coloring on graphs.) This should make Nandor's graph theory questions (in the NAU sublibrary) much more widely available.
  • Nora was able to convert the entire placement test for Langara College into WeBWorK format.
  • Liz was adding to her collection of Electrical engineering problems (in the NAU subsection of the OPL). Thanks to Davide Cervone we are dealing successfully with the use of j as the representative of the square root of minus one. :-)
  • There were additional tweaks to the Library Browser, the OPL and also to MathView -- the very recent HTML5 based equation editor which is

Thanks to all who participated in another very successful code camp.  And our particular thanks
to Nora Franzova at Langara College and to Djun Kim from UBC/Myplanet Digital  for making all of the local arrangements.

Those who will be at MathFest in Hartford, Connecticut this August should drop by the WeBWorK
exhibit (part of the MAA exhibit) and say hi to John Travis and any other WeBWorKers who show up.

-- Mike