[WWdevel] File Manager and linebreaks

Michael Gage gage at math.rochester.edu
Sat Jan 8 14:45:07 EST 2005


On Saturday, January 8, 2005, at 12:08  PM, Davide P.Cervone wrote:

> 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.
>
Yet another -- make the import classlist smarter about recognizing line 
breaks.  I think I vote for that one.
We could have a general utility that will recognize all three line 
break types when reading in files.

> 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
>
I think a warning is sufficient.  Another possibility is to prevent the 
File Manager from writing files in the top directory.  Except
for course.conf there should be no files there in any case.  I have 
worries about allowing instructors to modify course.conf although
it is ocassionally handy it is also error prone.  At the least I think 
this should have a permission level, possibly higher than professor.

Take care,

Mike
>
>
> -------------------------------------------------------
> The SF.Net email is sponsored by: Beat the post-holiday blues
> Get a FREE limited edition SourceForge.net t-shirt from ThinkGeek.
> It's fun and FREE -- well, almost....http://www.thinkgeek.com/sfshirt
> _______________________________________________
> OpenWeBWorK-Devel mailing list
> OpenWeBWorK-Devel at lists.sourceforge.net
> https://lists.sourceforge.net/lists/listinfo/openwebwork-devel
>





More information about the webwork-devel mailing list