ATutor

Learning Management Tools







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


can login only one student


  • 2008-09-12 11:12:27

    can login only one student

    If you are asking for help, provide lots of detail so problems can be reproduced.

    Things to describe:
    Operating system ATutor is installed on -
    ATutor version - ATutor-1.6.1_pl1
    Patch #s applied -
    ATutor theme name -
    PHP version -5.2.6
    MySQL version -5.0.51a-community
    Webserver & version - apache 2.2.9 (unix)
    Copies of error messages -
    Changes to default settings -
    Web browser being used -
    ...and anything else relevant -

    Hello,
    i want to upload a lot of student username and password to atutor in one time.
    So i wrote a program an inserted students username nad password in atuter database directly. (in table with name members, and students's username and passwords were in txt file.)
    and i encrypted password like atutor using sha-1factory.js file.
    Now when i login with those username and password i only can login successfully with last one.
    and i get "Invalid loginname/password combination"
    But my program act on every user and pass same.
    can you help me?
    i attached one of my txtx file.

  • 2008-09-12 11:26:45

    Re: can login only one student!

    Why not use the enrollment import tool?

    http://help.atutor.ca/instructor/enrollment_course_list.php?en

  • 2008-09-12 11:28:33

    Re: can login only one student!

    Because it imports just firstname,lastname and email.
    and i want to import loginname and password.

  • 2008-09-12 11:31:23

    Re: can login only one student!

    i see.

    for those usernames passwords you have used, try comparing in the database if it's the same. As in, if your password is 'harris'

    then go to your database members table, do a select * from at_member where password = SHA1('harris')
    and see if you can get that username out.

    Also, make sure that your email is unique, 'cause each user must have unique email.

  • 2008-09-12 11:41:35

    Re: can login only one student!

    That's good sql statement.
    i tested my password. and just last password was correct!
    bu i have used the hex_sha1 function were in sha-1factory.js file in my program for encrypting passwords using javascript.
    like this:
    passw= hex_sha1(passw) ;
    is this way incorrect?

  • 2008-09-12 11:46:56

    Re: can login only one student!

    Seems right to me.

    If your last password is being encoded correctly but the previous aren't, it seems like it's something within your loop. I would suggest you to take our the hex_sha1 function for now, and simply run your program and see if the password are being stored correctly.

  • 2008-09-12 12:03:40

    Re: can login only one student!

    I tested the program for one username and password, and it was ok.
    and in loop i have just one function that do encryption and send result to php script for insert in database.
    and i did echo the passwords before encryption for testing my loop. they was correct before encryption!
    may be the hex_sha1 function have problem in loop?

  • 2008-09-12 12:34:24

    Re: can login only one student!

    I found it.
    It is because of the next line character in txt file that is at end of each line except last line.
    ;) :D
    Thank you for your help. and nice SQL statement.