WWassignment4 imitates the assignment module of Moodle and connects the student to a WeBWorK homework problem set. It automatically connects a version of the homework set for the student (no separate authentication of the student is required) and allows the results of the student's work to be transferred back to the moodle gradebook. The coordination is not yet perfect some care is required to work around the imperfections.
The first thing to realize is that the actions are all initiated by Moodle. The WeBWorK webservice responds to Moodle requests, but at the time this module was first written Moodle did not yet respond reliably to webservice requests from outside. When things get out of sync, this fact is usually the root cause.
Before a moodle course can be connected to a WeBWorK course, the WeBWorK course has to be created, and the desired homeworks sets have to be assembled using the WeBWorK tools. The due dates of the homework sets should also be set to the desired dates.
The best procedure after creating the WeBWorK course is to enter the professor and any assistants who will be helping to edit the WeBWorK course
into the WeBWorK course using the Classlist editor. Make sure the professor and her assistants can access the course and have them reset their passwords to what they desire. It is important that the user login they use for WeBWorK is the same as the user login they use for Moodle if they want to be able to access WeBWorK from Moodle. The passwords do not have to be the same.
Only professors and assistants entered in this way will be able to access the WeBWorK course directly without going first through Moodle for authentication.
• Once the WeBWorK course is set up and the WeBWorK homework sets are created then the professor logs in from Moodle and first creates a bridge from the Moodle course to the WeBWorK course and then adds links to the existing WeBWorK homework sets using the "WeBWorK problem set" activity on the Moodle course page. Once these are in place students can access their homework.
When the user clicks on the WeBWorK problem set icon in a moodle course the following happens.
(1) First moodle asks WeBWorK to check whether the user's login is present in the WeBWorK database. If not the user is entered into WeBWorK's classlist database -- with a RANDOM password. This password is never used and cannot be discovered -- it remains a secret. If the user already exists in the WeBWorK classlist database (e.g. if the user is the professor in the course) then no changes are made. Except for the instructors entered directly into WeBWorK, WeBWorK has no knowledge of students in the course until they access their first assignment. I require students to do the "Orientation" set (for credit) to insure that everyone is properly registered in both WeBWork and Moodle.
(2) If the user is present or has been created in WeBWorK then Moodle asks WeBWorK to check whether a version of the homework set has been created for the student. If the user doesn't yet have a version of the homework set a problem seed is generated and the students's homework set version is created and assigned to that student. If the user has version of the homework set then no changes are made.
(3) Finally the student is transferred to WeBWorK setting a "session key" which serves to authenticate the student whenever they answer a problem. The session key changes frequently and will expire after 20 minutes or so of inactivity. If the expiration occurs then user will have to login through Moodle in order to gain access to WeBWorK. Unless they have been directly registered into WeBWorK (as the instructors have) they will not have the proper password to login to WeBWorK directly. Session keys are also used in the stand alone WeBWorK setup to authenticate student-WeBWorK interactions except for the initial login when a password is required. When working with Moodle, WeBWorK assumes that Moodle has already authenticated the user and sets the session key without further verification.
• All modifications to the WeBWorK homeworksets have to be made using WeBWorK tools. The "WeBWorK problem set" editing module in Moodle facilitates this by providing links that will transfer the instructor to WeBWorK to accomplish the editing, or the instructor can log in to WeBWorK directly.
If the due date is changed in WeBWorK, then it is important to open the editor to the "WeBWorK problem set" link to alert it to the fact that a change has been made. It will automatically check with WeBWorK to determine current due dates. As you save the edited "WeBWorK problem set" it will also update the due dates in the calendar. Because Moodle initiates all interactions, WeBWorK cannot currently inform Moodle that a change has been made in its data.
• I am not sure of all details of what happens if a professor in a Moodle course connects to a WeBWorK course in which they are not already an assigned user, or even if this will work at all. I believe that Moodle makes some attempt to translate it's permission structure into WeBWorK's permission structure, so they may become an instructor in the new course. However, I am sure that they will be assigned a random password for WeBWorK and will never be able to connect except through Moodle authentication. Among other things this renders worthless the url links sent in the "email the instructor" messages.
The way to fix this is to have another instructor (or create a new WeBWorK instructor) who is directly registered in WeBWorK, with a normal password, to change the random password of the Moodle authenticated instructor to something that is known thus allowing them to login to WeBWorK directly.
In reply to Michael Gage
Re: Tips for using WWassignment4 connecting WeBWorK and Moodle
by Steven McKay -
Thanks, Mike.
This has been really helpful. Could I make a suggestion that it be incorporated into the wwassignment wiki?
One comment about what you said above. You said:
I can tell you that this works, because until recently this was the modus operandi for our courses that connect to webwork. Webwork assigns the teacher (on the moodle side) professor status on the webwork side. You are correct, however, that the professor can only get to webwork through moodle.
Now that I know how it works, we won't have that problem anymore :-).
S.M>
This has been really helpful. Could I make a suggestion that it be incorporated into the wwassignment wiki?
One comment about what you said above. You said:
• I am not sure of all details of what happens if a professor in a Moodle course connects to a WeBWorK course in which they are not already an assigned user, or even if this will work at all. I believe that Moodle makes some attempt to translate it's permission structure into WeBWorK's permission structure, so they may become an instructor in the new course. However, I am sure that they will be assigned a random password for WeBWorK and will never be able to connect except through Moodle authentication. Among other things this renders worthless the url links sent in the "email the instructor" messages.
I can tell you that this works, because until recently this was the modus operandi for our courses that connect to webwork. Webwork assigns the teacher (on the moodle side) professor status on the webwork side. You are correct, however, that the professor can only get to webwork through moodle.
Now that I know how it works, we won't have that problem anymore :-).
S.M>
In reply to Steven McKay
Re: Tips for using WWassignment4 connecting WeBWorK and Moodle
by Michael Gage -
Sure -- I wrote this post separately so that I could copy it over and so that it would be more visible in the forum. To date the only documentation for wwassignment have been about installation -- none for using it, so this will be a reasonable start.
I'd ask that you (and others) chime in and add corrections to the wiki-- my personal methods of using moodle-webwork is small enough and probably won't apply directly for everyone since I am simultaneously, admin, instructor and designer. :-)
By their nature wiki's are group editing projects. :-)
I'd ask that you (and others) chime in and add corrections to the wiki-- my personal methods of using moodle-webwork is small enough and probably won't apply directly for everyone since I am simultaneously, admin, instructor and designer. :-)
By their nature wiki's are group editing projects. :-)