Automagically turn a list of names into uploadusers.txt?

Automagically turn a list of names into uploadusers.txt?

by Art Lader -
Number of replies: 9
Would it be feasible to create a Word macro or something like that that would automate the process of turning a list of student names into a usable file for creating student accounts?

Something that would turn this:

John Smith
Joe Blow
Jane Doe

into this (username, password, firstname, lastname, email):

jsmith2009, poodlehead, John, Smith, jsmith2009@ahshornets.org
jblow2009, toenail, Joe, Blow, jblow2009@ahshornets.org
jdoe2009, spam345, Jane, Doe, jdoe2009@ahshornets.org

Or is that just not really even worth looking into? ( I have between 400 and 500 names I would like to convert. )

Thanks,
Art
Average of ratings: -
In reply to Art Lader

Re: Automagically turn a list of names into uploadusers.txt?

by Art Lader -
I wonder if it would be possible to develop an online utility that anyone could use to do this? Might be pretty useful, I suppose.

Maybe there is a programmer here in Aiken who could do it for me. One of my former students, maybe...

-- Art
In reply to Art Lader

Re: Automagically turn a list of names into uploadusers.txt?

by Ray Lawrence -
What format are you converting from Art?
In reply to Ray Lawrence

Re: Automagically turn a list of names into uploadusers.txt?

by Art Lader -
Just a plain text file. Formatted like this:
540114   Saenger      Tiesha              
540194 Klebstoff Shinatra
540312 Kraftwerk Albert
220040 Drucker Erin

-- Art

In reply to Art Lader

Re: Automagically turn a list of names into uploadusers.txt?

by Zbigniew Fiedorowicz -
I would use Excel (or the OpenOffice equivalent).
Average of ratings: Useful (1)
In reply to Zbigniew Fiedorowicz

Re: Automagically turn a list of names into uploadusers.txt?

by Jan Dierckx -
Art,

This seemed like a nice little project to find out how one can read a text file with php.
This is definitely not foolproof, it doesn't check if the file really exists, it ends with some notices at the end of the file. It doesn't write a file, but only displays it in the webbrowser (but of course you can copy it from there)
It however uses Moodles builtin password generator (the one with the English word combinations my students marvel at) which would be hard to get in openoffice.
Copy it inside the root folder of a local install of Moodle on a PC and put a file with the name onlynames.txt in the same place.
This file should be formatted like this...
121212<tab>John<tab>Doe
122222<tab>Art<tab>Lader

Then run moodle/aikenlist.php
(you can change the 2009 and email. Just change the variables at the top of the code)




Average of ratings: Useful (1)
In reply to Jan Dierckx

Re: Automagically turn a list of names into uploadusers.txt?

by Art Lader -
Thanks, Jan! I am going to go try this out right now!
-- Art


In reply to Art Lader

Re: Automagically turn a list of names into uploadusers.txt?

by Art Lader -

Okay, we just opened the file we were sent in MS Excel and saved it as a tab-delimited file, then we stuck the names of the fields at the top and it worked beautifully. Thank you, thank you, thank  you. -)

I wonder if this could be turned into a web-based utility that anyone could use?

Or is that not really a useful idea?

-- Art

In reply to Art Lader

Re: Automagically turn a list of names into uploadusers.txt?

by Jan Dierckx -
A web-based utility that anyone could use, would need a lot of error-checking added to it. If you wanted to make it flexible you would also have to add some kind oftext processing language to it. That way any user could define a username as 'first character of first name and complete lastname in lower case unless this name already exists', etc...
It would be begging the question: any user capable of using this (now very) complex tool, would also be capable of writing a much simpler program which does what he/she wants.

(mmmmm, This sounds like philosophy, I just wanted to say:Glad you could use it, Art!)

In reply to Jan Dierckx

Re: Automagically turn a list of names into uploadusers.txt?

by Art Lader -
Well, Jan, you have made my life a lot easier with this.

And when our teachers report back to work in August (we have a month of school left and then a long vacation), all of our students will already have accounts. It will make life much better!

Thanks, again!

-- Art