Totara Learn Open Discussions

Upload Users - errors importing

 
Training & Development
Upload Users - errors importing
על ידי Training & Development בתאריך 30/01/2024, 10:02
 

Hello!

https://totara.help/docs/available-fields-for-uploading-a-user

I've followed the above to put together a spreadsheet to upload users, and have tried using just one user but continue to get the following 3 errors:


Not enough columns, please verify the delimiter setting

Debug info:
Error code: csvfewcolumns

Stack trace:

  • line 500 of /lib/setuplib.php: moodle_exception thrown

  • line 192 of /admin/tool/uploaduser/locallib.php: call to print_error()

  • line 135 of /admin/tool/uploaduser/index.php: call to uu_validate_user_upload_columns()


The first I am trying to fix is the 'Not enough columns'. The only columns I listed were the required columns of username, firstname, lastname, and email, as well as the columns 'course1' and 'enrolstatus1' because my end goal is to use the upload to unenroll a group of people from a particular course.


Would you have any ideas on what I'm missing or should do to use the ''upload users' feature?


Thank you!

Andrew Metcalfe
Re: Upload Users - errors importing
על ידי Andrew Metcalfe בתאריך 30/01/2024, 13:51
קבוצה Most Helpful Contributor 2022

Typically the CSV file would have commas between fields - this one does not. The source package for the csv should be configured to use comma as delimiter. ie "Comma Separated Values".

cheers, Andrew

Training & Development
Re: Upload Users - errors importing
על ידי Training & Development בתאריך 31/01/2024, 08:37
 

Thank you Andrew - I've rebuilt to the attached but receiving the same errors.

Apologies, I use the upload CSV feature to upload course completion but I've never had to manually enter the commas. Odd.

Andrew Metcalfe
Re: Upload Users - errors importing
על ידי Andrew Metcalfe בתאריך 31/01/2024, 14:20
קבוצה Most Helpful Contributor 2022

That new file had quotations around each line which may be causing issues. Here's a template I know works. Whichever report or tool generating your list may require reconfiguring. Be careful with using Excvel for CSV's in some situations - in particular, Excel automatically strips leading zeroes, which maims any data with leading zeros.

The free app Notepad++ is excellent for transparently manipulating text files, with useful search and replace if required.


username,firstname,lastname,email,password

leofin,Leo,Finley,leo.finley@mainfreight.com,XYZZY



Training & Development
Re: Upload Users - errors importing
על ידי Training & Development בתאריך 6/02/2024, 10:33
 

Hi Andrew!

I've fixed the CSV file and am no longer getting the error importing, and if I change user profile fields they change, but after testing the following options I am still unable to unenroll a team member from the course. I've documented the tests. Would you mind letting me know if there is something I'm doing to keep the upload file from unenrolling the user from the course?

Thank you!

Servando Pineda
Re: Upload Users - errors importing
על ידי Servando Pineda בתאריך 6/02/2024, 11:15
קבוצה Partnersקבוצה TXP Site Administrator

If you want to suspend a user, the value of the column enrollstatus = 1.


1= suspended

0 = active


The enrolstatus only applies to manual enrollment.

Training & Development
Re: Upload Users - errors importing
על ידי Training & Development בתאריך 6/02/2024, 11:30
 

Thanks Servando. Re your comment: The enrolstatus only applies to manual enrollment.

Does this mean that if the user was enrolled via audience sync, self enrolment, or program enrolment that we cannot use the upload file to unenroll them?

Servando Pineda
Re: Upload Users - errors importing
על ידי Servando Pineda בתאריך 6/02/2024, 13:08
קבוצה Partnersקבוצה TXP Site Administrator

I'm not sure if it works or not. I think it will not work with audience sync, self-enrollment, or program enrollment because those types of enrollments have specific ways of adding users to the course.

If I need to unenroll a user who was enrolled by audience or program, I have to change the audience. The problem is when the audience it's syncronizade whit other courses. So I have to manually enrol in the other courses where I don't need to unrol or create a new audience whitoout the specific user and then syncronize that audience in the course... I do not know if anyone has a better way to resolve this enrollment conflict.

Training & Development
Re: Upload Users - errors importing
על ידי Training & Development בתאריך 7/02/2024, 13:52
 

My primary issue is still that using this spreadsheet is not un-enrolling the team member. I've tried using '0' as enrol status, using ''1' as enrol status, I've tried with 5 different team members, some added manually and some with audience sync. This works to enrol a team member, but not to unenrol them. Any other ideas?

Servando Pineda
Re: Upload Users - errors importing
על ידי Servando Pineda בתאריך 7/02/2024, 15:07
קבוצה Partnersקבוצה TXP Site Administrator

If you delete the manual or sync enrol method, just take care with the grades of existing users, you may need to restore them.

Raechel Wilson
Re: Upload Users - errors importing
על ידי Raechel Wilson בתאריך 14/02/2024, 16:42
 

We want to do the same - unenrol by a file. The video above seems to be only making the user inactive on the course not unenrol them altogether which we are wanting. I wonder how / if this can be done? Does anyone know?

Servando Pineda
Re: Upload Users - errors importing
על ידי Servando Pineda בתאריך 14/02/2024, 17:26
קבוצה Partnersקבוצה TXP Site Administrator

Suspending a user has the same effect as deleting the registration method. So I ask myself, what effect are you looking for?

One prblem/benefit on Totara is that when you enroll a user in a course, it creates a row in the grade and completion table, so it can't be deleted (on Totara).

Maybe you need to explain the result you are looking for.

Raechel Wilson
Re: Upload Users - errors importing
על ידי Raechel Wilson בתאריך 14/02/2024, 18:40
 

Hi Servando

It is giving us inaccurate course completion reporting due to the number of users enrolled that are either inactive or suspended.

I tested one of our courses as an example. Course completion before inactive users were unenrolled was 52.9% and after unenrol was 55.6%.

Keeping the users enrolled in the course negatively affects the course completion data as it's not reporting on the amount of people actively still enrolled / employed.

Linda Thomas
Re: Upload Users - errors importing
על ידי Linda Thomas בתאריך 15/02/2024, 07:36
 

Hi Raechel,

I had the same issue and Mandatory Course reporting integrity was a mess. I was advised to include the Is enrolled filter=Yes in reporting. I also include Number of job assignments filter is greater or equal to 1 (b/c suspended users will have zero, it's just a 2nd cautionary filter). I wish we could filter by roles, b/c we're still having inaccuracies due to 'support' staff being enrolled but not required, showing up in report but that is supposed to be addressed at a later time.

Report without filter Is Enrolled (58,834 records)

Report with filter Is Enrolled = Yes (42,470 records)



Servando Pineda
Re: Upload Users - errors importing
על ידי Servando Pineda בתאריך 15/02/2024, 09:49
קבוצה Partnersקבוצה TXP Site Administrator

Yes, I know... but the basic filters for the report are:

  • Is enrolled

  • User status


You may want to save the search filters and set as default view.

Training & Development
Re: Upload Users - errors importing
על ידי Training & Development בתאריך 29/02/2024, 13:55
 

Hi there everyone - we received the same answer a while ago and went back and added the active filter to all of the reports, made it mandatory for everyone but admin, and changed the title of the filter to 'Active Status - Choose Active'. Quite an ugly work-a-round, but it's there.