Forum archive 2000-2006

Nandor Sieben - importing def files in ww2

Nandor Sieben - importing def files in ww2

by Arnold Pizer -
Number of replies: 0
inactiveTopicimporting def files in ww2 topic started 5/31/2005; 7:42:08 PM
last post 7/3/2005; 7:47:40 AM
userNandor Sieben - importing def files in ww2  blueArrow
5/31/2005; 7:42:08 PM (reads: 1242, responses: 5)
We created recommended problem sets for many of our courses. It's in the form of about a dozen def files for each course. Our instructors usually use these def files without any or with minor modification. The process is a little bit involved. The def files are available on the web. They need to download them to the local HD, then upload it into the templates directory using the file manager, then import them into sets. Would it be possible to simplify this process and do what we do with pg files. That is, would it be possible to use simlinks in the templates directory that point to a directory structure of def files organized by classes? Currently this is not possible since import only works for def files in the templeates directory. Ideally it would be possible to import def files in any subdirectory of say the "defs" subdirectory of the templates directory.

templates set1.def # currently used def files set2.def /defs # symlink to a repository of fixed def files /calc1 calc1.def . calc12.def /linalg linalg1.def linalg2.def

Nandor

<| Post or View Comments |>


userDavide P. Cervone - Re: importing def files in ww2  blueArrow
5/31/2005; 9:09:05 PM (reads: 1471, responses: 0)
Nandor:

One solution would be to put the symbolic link to the def directories as you suggest, and then have the professors use the File Manager's COPY button to copy the .def files they want into their templates directory. The name of the copied file can include ".." to mean "go up a directory", if you have a structure like

 

  templates
set1.def # currently used def files
set2.def
/defs # symlink to a repository of fixed def files
/calc1
calc1.def
.
.
.
calc12.def
/linalg
linalg1.def
linalg2.def

the instructor could navigate to the defs/calc1 directory, select calc1.def, click COPY, and then type ../../set3.def to get that set definition file copied to his templates directory as set3.def.

There is a problem, however. The file manager won't follow symbolic links. I suppose you could make a hard link rather than a symbolic one, or the file manager could be extended to follow known good links. I'll think about how best to do that.

Davide

<| Post or View Comments |>


userJohn Jones - Re: importing def files in ww2  blueArrow
5/31/2005; 11:07:49 PM (reads: 1499, responses: 0)
Hi,

Having the homework sets editor search for set*.def files makes a lot of sense for this reason. The downside would be that templates would have to be searched recursively every time the page is generated, and this would be slow.

One solution would be to have the homework sets editor page have an extra button on the import line to search for set def files. Then you only do the recursive search when you really want to.

Another solution would be to have a special name for a directory containing repositories of set definition files. Then only that directory gets recursively searched for files.

A down side to either of these approaches is that if you have standard set definition files for lots of courses, then every course will get every set definition file when they go to look at them.

If I am not mistaken, there was a posting to cvs where export/import of set definition files makes a tar (or tar.gz) file so the upload/download requires moving only one file. That would mostly solve your problem already. Then it is a single upload, then import the ones you want.

John

<| Post or View Comments |>


userDavide P. Cervone - Re: importing def files in ww2  blueArrow
7/2/2005; 5:27:26 PM (reads: 1491, responses: 0)
I just submitted an update to the File Manager that allows the system administrator to allow the File Manager to follow symbolic links to specified directories outside of the course directory. This makes my suggestion above one that you can now use. See http://webhost.math.rochester.edu/webworkdocs/discuss/msgReader$3410 for more details.

The changes also include a number of other new features, like the ability to create and unpack archives, and to automatically unpack archives when they are uploaded. So that might also make it easier for your users to obtain large numbers of set.def files easily.

Davide

<| Post or View Comments |>


userNandor Sieben - Re: importing def files in ww2  blueArrow
7/2/2005; 11:38:25 PM (reads: 1423, responses: 1)
> the instructor could navigate to the defs/calc1 directory, select > calc1.def, click COPY, and then type ../../set3.def to get that set > definition file copied to his templates directory as set3.def.

Thank you, this is going to be a useful feature. Using copy in the file manager is a little bit invonvenient though because of the need to type in a possibly long file name. I don't know what the solution for this would be. Maybe the name of the file could appear in the target input box and someone could just modify the file name.

Nandor

<| Post or View Comments |>


userDavide P. Cervone - Re: importing def files in ww2  blueArrow
7/3/2005; 7:47:40 AM (reads: 1698, responses: 0)
I already added that in this latest set of changes. Also, if you are moving the file to a new directory, there is no need to type the file's name (just as in unix mv commands). If you enter a directory (e.g., '../..') in the copy dialog box, then the file will be moved to that directory using its original name. (In the example above, the professor was changing the name of the file when he copied it, from calc1.def to set3.def)

Davide

<| Post or View Comments |>