ATutor

Learning Management Tools







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


Import Enrollment NOT working


  • 2011-12-23 09:13:22

    Import Enrollment NOT working

    Attempting to import a csv file for enrollment in a course. The file uploads and is read, I receive the review page and click on Add to Enrolled List, then on Done. I receive a message that the action completed successfully but none of the imported names appear in the enrollment.

  • 2011-12-23 09:46:06

    Re: Import Enrollment NOT working

    I'm unable to reproduce the problem. I imported the following list into our demo site in a file called course_list.csv, without any problems

    "bidy", "boperooa", "bidy@boperoo.com"
    "bidya", "boperoos", "bidy1@boperoo.com"
    "bidyb", "boperood", "bidy2@boperoo.com"

    If there's anymore information you can provide to help use reproduce the problem, we'll investigate further.

  • 2011-12-27 08:29:39

    Re: Import Enrollment NOT working

    There are no errors generated as I said in my previous message. The server is Red Hat Enterprise Linux Server release 5.6, PHP is 5.2.17, mySQL is 5.0.77 and the version of aTutor appears to be 1.5.5. I am using Safari 5.1.2 browser.

    I am not the original developer that implemented aTutor so I am not familiar at all with how this system was setup.

  • 2011-12-27 09:22:12

    Re: Import Enrollment NOT working

    It is likely ATutor/PHP compatibility problem. You are using a fairly old version of ATutor with the new version of PHP. You will likely need to upgrade ATutor to fix the problem.

  • 2011-12-29 13:31:48

    Re: Import Enrollment NOT working

    I was able to find that an error (well warning) is generating:

    [29-Dec-2011 13:16:59] PHP Warning: mysql_query(): supplied argument is not a valid MySQL-Link resource in /webs/candelaSyneron/atutor/public/bounce.php on line 18
    [29-Dec-2011 13:16:59] PHP Warning: mysql_fetch_assoc(): supplied argument is not a valid MySQL result resource in /webs/candelaSyneron/atutor/public/bounce.php on line 19

    I've attached bounce.php to this post. Please advise.

  • 2011-12-30 18:46:06

    Re: Import Enrollment NOT working

    I don't see anything in bounce.php that might suggest the problem. The only thing i might suggest is enclosing the variables in the $sql statement in single quotes '$_SESSION[member_id]' and '$course'.

    Are you logged in as instructor, or an admin?

    Are you able to confirm that enrollments did not occur by looking in the course_enrollment table?

    I assume your Webserver Apache.

  • 2012-01-03 09:24:43

    Re: Import Enrollment NOT working

    Yes logged in as instructor, and yes I checked the course_enrollment table (that's how I knew it didn't work initially). Webserver is Apache.

    On the bounce.php file, the line of SQL at line 17 was something I added, because the error (on line 18) seems to indicate that there is a problem with the arguments in the $result = mysql_query($sql, $db); statement - that it wasn't happy with the $sql or $db. So, I added the line on 17:

    $sql = "SELECT * FROM ".TABLE_PREFIX."course_enrollment WHERE member_id=$_SESSION[member_id] AND course_id=$course";

    The original file doesn't seem to defined $sql or $db - not sure if that is how it came from aTutor or if a previous developer here changed it. Can you advise? Also, I tried your suggestion of adding single quotes and got the same result/error.

    Please advise on the $sql and $db values used in bounce.php.

    Thank you

  • 2012-01-03 09:29:12

    Re: Import Enrollment NOT working

    CORRECTION on my previous message - that SQL line WAS there already - my question is could it be a problem with the $db variable? Not sure where that is defined.

    Sorry for any confusion.

  • 2012-01-03 09:57:09

    Re: Import Enrollment NOT working

    $db value comes from include/lib/mysql_connect.inc.php

    What you can try,
    1. Check include/config.inc.php, make sure the supplied db credentials are correct, which affects $db. The chance that this part gets wrong is relatively slim as you won't be able to complete the installation process or start up ATutor if it's wrong.
    2. More likely the problem would be with the variables that are used to compose $sql. Try printing out $sql value and run it from mysql command line which gives more error details.

    If you still had no luck with the above suggestions, additional information you'd like to provide for us to re-produce the error are,
    1. The ATutor version that you are using, since line 17 in the recent bounce.php is not a sql any more;
    2. The file that you try to import, with test data.

  • 2012-01-03 13:50:57

    Re: Import Enrollment NOT working

    Hi Cindy - thanks for your help. I was able to (I think) narrow it down to the INSERT statement in the add_users function in enroll.inc.php.

    It seems like the sql is choking on the preferences variable which is:

    $_config[pref_defaults]

    and the value to be inserted is:

    'a:4:{s:10:"PREF";s:7:"default";s:14:"PREF_NUMBERING";i:1;s:18:"PREF_JUMP_REDIRECT";i:1;s:15:"PREF_FORM_FOCUS";i:1;}'

  • 2012-01-03 13:55:14

    Re: Import Enrollment NOT working

    Cindy - disregard my last post - I've solved the problem and it was NOT the preferences value. We had bad column/value counts (a past developer added a field/value to the enrollment table).

    I think we are all set. Thank you for your help and please thank Greg!

    Betc