ATutor

Learning Management Tools







Pages:1 2 3 4 5 6 7 8 9 10 11 12 13 14 15


Importing Users 3 Questions


  • 2004-06-04 17:00:33

    Importing Users 3 Questions

    Hi Greg

    1. I want my users to be named with a . between their first and last names. ie ... joe cools username will be joe.cool and his email will be joe.cool@mymailserver.com

    Are there any issues with doing this in ATutor?

    I've located and changed the following code in the username check part of importcourselist.php

    stripslashes(strtolower($record['fname'].'.'.$record['lname']));
    instead of stripslashes(strtolower($record['fname'].'_'.$record['lname']));

    AND

    if (!(eregi("^[a-zA-Z0-9_.]([a-zA-Z0-9_.])*$", $record['uname']))) {
    $record['err_uname'] =
    instead of
    if (!(eregi("^[a-zA-Z0-9_]([a-zA-Z0-9_])*$", $record['uname']))) {
    $record['err_uname'] =

    ====
    2 Should a similar thing be done in the email check piece?

    I am thinking specifically of changing:
    else if (!eregi("^[a-z0-9\._-]+@+[a-z0-9\._-]+\.+[a-z]{2,4}$"
    to
    else if (!eregi("^[a-z0-9\._.+@+[a-z0-9\._.]+\.+[a-z]{2,4}$"

    =====
    3. I can import one user fine by accessing the .txt file but no luck with two or more users. I'm thinking that perhaps the Mac is not providing the proper carrage return between rows (new users in the text file)

    Sample text file:
    hector, campbell, hector.campbell@mail.ednet.ns.ca
    gail, coldwell, gail.coldwell@mail.ednet.ns.ca

    I get the following error :
    Incorrect file format on line 1.

    thanks
    larry

  • 2004-06-04 18:57:50

    Q3 answered

    My suspicion on #3 was correct. I was able to change from Macintosh to Unix for the line breaks and it worked.

    Still hoping for your expertise on Q1 and Q2

    L

    [reply][b]In reply to:[/b]
    Re:
    3. I can import one user fine by accessing the .txt file but no luck with two or more users. I'm thinking that perhaps the Mac is not providing the proper carrage return between rows (new users...
    [op]forums/view.php?fid=7;pid=1790;page=1#1790[/op][/reply]

  • 2004-06-08 12:46:34

    Importing Users - 3 Questions

    the changes in #1 seem okay..

    i do not think the changes in #2 are correct.

    we'll look into the problem at #3 in a bit more detail later on.

    joel

  • 2004-06-09 18:26:49

    Subject: Importing Users - 3 Questions

    I solved #3 ok, as per above

    L

  • 2004-06-12 12:46:26

    Re: 3 questions

    Be sure to provide enough information about your system, and the circumstances of any problems you are experiencing. Support requests lacking complete information may not get a reply. [DELETE THIS NOTICE BEFORE SENDING YOUR SUPPORT REQUEST] Joel

    It appears to work ok. What do you think might be wrong with #2?

    I\'m not a programmer, just a problem-solver and a bit of a hacker!

    Your expertise is appreciated.

    larry