Best practice forum (Archived)

Assigning managers via Totara Sync

 
Alex Büchner
Assigning managers via Totara Sync
by Alex Büchner - Thursday, 11 October 2012, 2:01 AM
 

Totara 2.2.7 has resolved a number of problems, but still crashes on me when trying to assign managers:

The following CSV file adds a new user or modifies an existing user:
"idnumber","timemodified","username","delete","firstname","lastname","email","city","country"
"tsync","0","tsync1","0","T","Sync1","tsync1@null.comLook up in Salesforce","Heidelberg","DE"
The following CSV file adds a new user or modifies an existing user AND assigns the position:
"idnumber","timemodified","username","delete","firstname","lastname","email","city","country", "posidnumber"
"tsync","0","tsync1","0","T","Sync1","tsync1@null.comLook up in Salesforce","Heidelberg","DE","des14"
The following CSV file SHOULD also assign a manager, but doesn't:
"idnumber","timemodified","username","delete","firstname","lastname","email","city","country", "posidnumber", "manageridnumber"
"tsync","0","tsync1","0","T","Sync1","tsync1@null.comLook up in Salesforce","Heidelberg","DE","des14","man23"
I have also tried the username and the internal id (in my case 23).
Error message I receive when running run_cron.php via CLI (using manageridnumber)
Running totara_sync cron...!!! Error reading from database !!!
!! Can't reopen table: 's'
SELECT DISTINCT(s.manageridnumber)
                      FROM mdl_totara_sync_user s
           LEFT OUTER JOIN mdl_user u
                        ON s.manageridnumber = u.idnumber
                     WHERE s.manageridnumber IS NOT NULL
                       AND s.manageridnumber != ''
                       AND u.idnumber IS NULL
                       AND s.manageridnumber NOT IN
                           (SELECT idnumber FROM mdl_totara_sync_user)
[array (
)] !!
!! Stack trace: * line 400 of /lib/dml/moodle_database.php: dml_read_exception thrown
* line 848 of /lib/dml/mysqli_native_moodle_database.php: call to moodle_database->query_end()
* line 473 of /admin/tool/totara_sync/elements/user.php: call to mysqli_native_moodle_database->get_recordset_sql()
* line 65 of /admin/tool/totara_sync/elements/user.php: call to totara_sync_element_user->check_sanity()
* line 50 of /admin/tool/totara_sync/lib.php: call to totara_sync_element_user->sync()
* line 16 of /admin/tool/totara_sync/run_cron.php: call to tool_totara_sync_cron()
 !!
This forum post has been removed
Thursday, 11 October 2012, 7:07 AM
The content of this forum post has been removed and can no longer be accessed.
Alex Büchner
Re: Assigning managers via Totara Sync
by Alex Büchner - Thursday, 11 October 2012, 10:04 PM
 
Thanks, Alastair. Could you email me the patch as soon as you have it? We are currently onsite with the customer and integration with SAP is critical. Thanks.
This forum post has been removed
Friday, 12 October 2012, 8:27 AM
The content of this forum post has been removed and can no longer be accessed.