Instructor tips for Moodle-WW Assignment module

From WeBWorK
Jump to: navigation, search

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 so some care is required to work around the imperfections.

The first thing to realize is that all actions are 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. The second obstacle to synchronization is that WeBWorK does not timestamp every entry into the database (I wish it did) -- hence it is not easy to tell what data has been recently updated. For example, this means that when upgrading the gradebook all of the data is transferred, not just recently changed data. This is inefficient but the amount of data is small enough so that it doesn't currently cause a big performance hit.

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.

  • If a professor in a Moodle course connects to a WeBWorK course in which they are not already an assigned user Moodle makes some attempt to translate its permission structure into WeBWorK's permission structure, so they will 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.

  • Security warning: If there is a local account in webwork with admin-privileges and a student creates a username that agrees with the username of the local account, the student gets admin-privileges on Webwork. To avoid this make sure that each user with professor level privileges in WeBWorK has a corresponding account (with the same user name) in the Moodle course. e.g. if admin is a user in WeBWorK, make sure that admin is also a user in Moodle. This will prevent a hacker from using the admin name in the Moodle course to gain professor level access to WeBWorK.

You should also check Moodle_Assignment#Limitations for other limitations.

follow us