Features & Development

webwork web files location

webwork web files location

by Xiong Chiamiov -
Number of replies: 8
The large part of the webwork project I've been assigned is to give WW a complete UI overhaul. The problem is, I can't seem to find where the files are, and there doesn't seem to be any documentation on it.
In reply to Xiong Chiamiov

Re: webwork web files location

by Michael Gage -
Hi,

It's been several years since the last UI overhaul so it is probably a good idea to look at these things again. New tools such as AJAX packages have come along since the last overhaul and they could prove very useful in the UI.

Could you tell me who assigned you the project and who you are working with?

Also if you can give me a better idea of what your plans are for the UI overhaul I'll be in a better position to help out. Are you working on the student interface? or on the instructor interface? or both?

-- Mike Gage gage at math dot rochester dot edu

p.s. if you were to change forums from the current Moodle forum, what forum tool would you suggest? :-)
In reply to Michael Gage

Re: webwork web files location

by Xiong Chiamiov -
Hi and thanks for responding.

First off, apologies if I sound a bit... terse, shall we say. With long days and all, sometimes it's hard to make that extra effort to communicate properly over the internet, since emotions are easily miscommunicated.

I'm a PHP hacker (who's been slowly moving to Python) working at a local (well, for me, obviously not for you) math textbook company, XYZTextbooks, and their associated math tutorial site, MathTV.com. What I'm told is that there are 2 other applications like webwork, one being very expensive and the other being hosted on the owning company's website. Aside from wanting to cut costs, my boss likes the openness and hackability (though he wouldn't use that term) of open-source software. I haven't talked to him about licensing yet, but I have the feeling that we would be contributing it back to the main code base. From a brief reading of the artistic license, it seems like we could modify things and keep the modifications closed if we use it only within our organization, but we're not particularly afraid of our competitors using the system, and giving code back just leads to healthier code.

The idea is to have a webwork system up for people who use our textbooks (or videos), with things integrating nicely between them. Our target audience is mostly lower-end math, algebra and trig and such, for high schools and JCs. So then, the instructors using it are not going to be advanced enough in mathematics to be comfortable using PG, and the student interface needs to be fairly simple as well (because it's for people who aren't necessarily the most motivated to figure out a complicated UI).

I have very limited experience with Perl (and none with it for the web), so I have a bit of learning to do. My boss is also talking about outsourcing some of the work to Romania or somesuch. I have no idea what quality of code we'd get out of that, but at least we'd get a fair amount of work done.

This week I made a fairly simple PHP form that takes in user input and outputs a PG file for a problem. It uses an alternative syntax for some things (I essentially designed a markup language that gets parsed into perl/TeX) which *seems* bit easier to use, although it still needs some improvement. It needs a little more work to be launchable (I think I'll get that done today), but it currently only handles fairly basic problems. I'll let you know how that progresses.

Sidenote 1:
I haven't had the chance to install and administrate any forums, only use them. phpBB is of course popular, but seems to have a few issues with spammers and such. vBulletin is very nice, but commercial.
I'm actually fairly fond of the bbs used by Arch Linux, which is PunBB. It's a pretty fast and lightweight PHP-based forum that intentionally doesn't incorporate certain features (offside avatars, private messaging, file attachements), but it seems to work pretty smoothly.

Sidenote 2:
I'm also in the process of trying to get webwork working on lighttpd. There're notes on how to serve static content with it in the wiki, but I haven't figured out yet where to send things with webwork. That's kinda part of why I'm asking about this as well.
In reply to Xiong Chiamiov

Re: webwork web files location

by Michael Gage -
Hi,

I think your analysis of the licensing situation is about right. Like all open source operations we can use all of the help we can get -- particularly with help documenting existing features. :-)

There have been several projects -- in various states of completion for putting a front end on the PG authoring language. As you note the PG authoring language was designed mainly for power (e.g. calculus, linear algebra, other college level questions) and sacrificed some easy of entry which could have been obtained if we limited ourselves to more routine questions. The obvious solution is to build a simpler front end.

Some of the ideas that were put forth at the AIM-WeBWorK workshop are listed here:http://webwork.maa.org/wiki/SimplifiedEntry and at http://webwork.maa.org/wiki/AIM07/Working_Groups Robert Molson is leading this group and has designed a simplified entry system used at U. of Kentucky.

Another is the PGML (PG markdown language) where a prototype is
demonstrated here:

Davide Cervone is the originator of that.

Daniel Graham, an economist at Duke University has an xml based authoring system described at http://www.duke.edu/~dgraham/webwork/XMLaTeX-Authoring.html

You might also look at the Moodle_Integration page since that also puts a different student user interface on the WeBWorK math capabilities. It uses the webservice capabilities of WeBWorK.

Thanks for the suggestions on forums. I've also been looking at mediaWiki forum pluggins -- however I'll not be doing anything soon. We migrated much of the forum from our original site based on the pioneer 1996 Userland Frontier CMS to the Moodle format (one of the more successful educational CMS) and I'll need to rest up before I help migrate again. :-)

For rendering and serving a PG problem WeBWorK relies pretty heavily on mod_perl and the Apache::Request structure. My understanding is that
lighttpd is designed for low processing static content whereas a PG template
is definitely a high processing dynamic content object. I don't think that lighttpd will prove a good fit for serving PG questions.

If you want to follow the process (VERY briefly) Apache/WeBWorK.pm connects to WeBWorK.pm which dispatches a request to one of the ContentGenerator subclasses, such as Problem.pm.

The subroutines in Problem.pm are mapped onto a template by ContentGenerator.pm The templates are stored in conf/templates.

That's not much info but it might be of some help to you.
Problem.pm in particular needs more work to separate computation
from presentation.

Hope this helps.

-- Mike
In reply to Michael Gage

Re: webwork web files location

by Xiong Chiamiov -
Thanks, that is *most* helpful. When I get to [that] work, I'll take a closer look, but from a glance at things it looks like there are plenty of people who are trying to do something similar to what we want, so I should probably focus on helping some of those efforts out.

And since I've been trying to work on my documentation skills (documentation? *Real* programmers don't need documentation!) I will hopefully be able to improve some of the existing docs as I learn my way around things.
In reply to Michael Gage

Re: webwork web files location

by Xiong Chiamiov -
Ok, now I've taken a closer look at those things.

While I like the problem interface of Moodle, we don't need the full software package, and would prefer not to have it all, since we're looking at integrating into a current site, and different parts of a site should act similarly.

The XML authoring system is quite nice, although not suited for our needs, as we want to avoid scripting as much as possible for teachers (or whoever's entering problems).

I only got to take a brief look at PGML before the site went down, but I liked what I saw. I may take that syntax and adapt it into what I'm doing, since developing a syntax is the hardest part.

The segmented edit page is exactly what I was looking for, only not quite far enough. One of the segments in particular (http://wwrk.maa.org/moodle/mod/resource/view.php?id=24) is designed well, and has functionality that I think is quite useful.
The script I've worked up can be found here: http://production.xyztextbooks.com/wml.php/generator , with it's syntactical documentation at http://production.xyztextbooks.com/wml.php/generator/syntax . There's a lot of debugging code and such floating around, but I meant it more as a starting point for how the question interface could act, so please ignore the ugliness. The part that interests me is that integration such as that in the segment I linked above would require this to be an actual part of webwork, rather than an external script, which makes me think I should start writing it in perl.
Has anyone looked at rewriting (ugh, *that* word!) webwork using a framework, like Catalyst? While _some_ frameworks can be a bit stifling, they on the whole are quite useful once you get used to MVC, and Catalyst looks like it's everything-agnostic so that you're not tied to what the devs thought you should use for, say, a templating system. I haven't dug into the code yet (that's as soon as I finish writing all this), but I would be happy to coordinate a transition over to an MVC framework, which I think would make maintainance much less of a hassle, and allow new devs to jump in quicker.

Off to read code and get a CGI-primer! Yay!

EDIT: Oops, almost forgot! Michael, I'm guessing that you are the same Gage who started the SimplifiedEntry page on the wiki (http://webwork.maa.org/wiki/SimplifiedEntry). I went through the other day and reformatted it a bit to use wikisyntax, but I saw that there was an anchor in there that I couldn't seem to locate the actual target of. I'm guessing that you migrated that page over from somewhere, but the page references that link, so I'd like to either find it or take out the text referring to it.

Here is a revision with the anchor in place: http://webwork.maa.org/w/index.php?title=SimplifiedEntry&oldid=1769
In reply to Xiong Chiamiov

Re: webwork web files location

by Matthew Leventi -
Hi,

I am rebuilding webwork in rails. I am pretty far along, 4 months of solid work. The GUI has been completely overhauled and most of the old webwork has been stripped away. It uses the same server that the moodle plugin relies upon. There will be demo site going up mid week.

I am very interested in any work thats being done to simplify problem creation. I would love to incorporate any methods. How familiar are you with Ruby?

-Matt
In reply to Matthew Leventi

Re: webwork web files location

by Xiong Chiamiov -
Not at all, though I'm not really familiar with Perl either.

This summer I've been developing with symfony, and started another job a month and a half or so ago with Django, so I'm fairly comfortable with MVC.

If I start crash-coursing Rails (and moreso, Ruby), will you be able to give me something to chew on and return to you and see how it all works together? I was actually considering rebuilding webwork in some other language than Perl, but I decided that it would take more time and resources (and knowledge!) than I have access to. But it sounds like you've done quite a bit of work! I'd love to do anything I can to help you out.
In reply to Xiong Chiamiov

Re: webwork web files location

by Xiong Chiamiov -
(copy of email to Matthew Leventi)
I created a repo on github for what I've done and invited you into it. I'm not quite familiar with the site, or git, so I'm not sure if I went about things the best way. But it's there.

I haven't tested the methods yet to make sure that anything works. I was just testing by hand and eye before, but I'd like to actually create test cases. Then again, some adjustments need to be made to the syntax still, I'm sure.

I put up the basic syntax documentation on the wiki, copy+paste of what I had essentially written down to remind myself.

...and I haven't done any css, or even made a containing template, for that matter.

The github project is at http://github.com/xiongchiamiov/webwork/