[WWdevel] File Manager and linebreaks

Sam Hathaway sh002i at math.rochester.edu
Sat Jan 8 15:06:52 EST 2005


On Jan 8, 2005, at 2:45 PM, Michael Gage wrote:

> On Saturday, January 8, 2005, at 12:08  PM, Davide P.Cervone wrote:
>
>> 	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.

I'd rather deal with linebreaks in one or two places than in every 
place we deal with user-supplied files. We'd have to add 
linebreak-handling code to everywhere we deal with set definition 
files, pg source files, scoring files, etc. If you do it when the file 
is read, you are forced to be smart about it, whereas if you do it at 
upload time you can give the user a manual override.
-sam





More information about the webwork-devel mailing list