[WWdevel] File Manager and linebreaks
Davide P.Cervone
dpvc at union.edu
Sat Jan 8 12:08:54 EST 2005
Folks:
Ken Appel's recent problems with uploading class list files suggests
that there is an issue that might need to be addressed in the File
Manager. Currently, when text files are uploaded, their contents are
save verbatim. In particular, nothing is done to adjust line
terminators for PC and Mac files to be in the unix form. This may be
the cause of some of Ken's troubles.
The question is, how should this be handled in the File Manager? It is
probably a bad idea to ALWAYS convert line breaks, as if the professor
is uploaded an image, for example, this would damage it. There are a
couple of solutions:
1. Have a checkbox under the UPLOAD button that is "convert line
breaks to unix format"
or some such wording, with a warning about not doing this for
images or binary
data. It could be checked by default, since most transfers would
be text.
2. Have another action button on the right for "Convert Line Breaks".
3. Try to use the file's extension (e.g., .lst) and contents to
determine if it is a text
file, and do the conversion automatically. (Easiest for users,
when it works, but
prone to errors.)
4. Some combination of the above.
What do you think?
A related question is should the File Manager try to be smarter about
where you are putting the files. For example, if someone puts a .lst
file in the top level rather than in templates, should there be a
warning about that? If so, what are the filetype-to-directory
mappings? I know that .lst and set.def files should go in templates,
and .pg files should be somewhere below templates. What other files
would people be uploading, and what are the restrictions on where they
should go? Is a warning sufficient, or should there be some sort of
confirmation dialog box?
Davide
More information about the webwork-devel
mailing list