Versions Compared

Key

  • This line was added.
  • This line was removed.
  • Formatting was changed.

...

The driver program is webct.jsp, which (obviously) is a JSP. In order for JSPs to work as part of Sakai, you must replace the filter and filter mapping in ROOT/WEB-INF/web.xml with

Code Block
   <filter>
        <filter-name>sakai.request</filter-name>
        <filter-class>org.sakaiproject.util.RequestFilter</filter-class>
    </filter>

    <filter-mapping>
        <filter-name>sakai.request</filter-name>
        <url-pattern>/*</url-pattern>
        <dispatcher>REQUEST</dispatcher>
        <dispatcher>FORWARD</dispatcher>
        <dispatcher>INCLUDE</dispatcher>
    </filter-mapping>

...

This code assumes that you have mounted your WebCT server via NFS. That avoids the need to retrieve the exported files. I can just leave them in a directory on the WebCT server. Also, the programs sometimes
need to access files on WebCT that are not included in the export archive.

If you can't mount your WebCT system, you could make a copy of .../webct/users and .../webct/webct/courses and put the copies on the sakai system where you are running the converter. However you'll also have to arrange to get the results of the Webct converter over to your sakai system. webct.jsp ssh's the command to webct, but assumes it can access the results over NFS. There are notes at the beginning of webct.jsp that describe what you'd do if you can't mount the server. You'd have to follow the ssh command by an scp
command to retrive the results. Either do scp -r to bring the whole directory, or produce a ZIP file, bring it over and unpack it.

Note that the jsp and the two Java files have parameters at the beginning that you will have to adjust. Things like the hostname of the webct server, and specific locations of things. They are carefully
commented.

Unfortunately the jsp has one big feature that probably isn't portable. It needs to find a list of all WebCT courses for a given user. I'm sure there's a way to get it from WebCT, but I can't find
it. So I use what I know about the way Rutgers names WebCT courses. We name them ending in _NETID. I've added // RUTGERS at all places in the code that depend upon this. If you don't have a
similar convention, I'm not sure what to say.

Both of the Java programs look at the current directory to figure out the name of WebCT course. This is almost certainly a bad idea. I should pass that as an argument. At any rate, we assume the current
directory is one produced by WebCT's IMS export function. Names look like Fal2006_01512104_jwr_COURSE_0617653 . The _COURSE_nnnnn is tacked on by export, so Fal2006_01512104_jwr is the course name. Feel free to fix the code to accept the course name as an argument. It's right at the start of "main" in both java files. You could replace the first about 10 lines of code with something that sets "coursename" to one of the arguments.

...