Giter Club home page Giter Club logo

Comments (7)

pm-tatiana avatar pm-tatiana commented on June 28, 2024

Hi @turf212 I was wondering what format you used to upload users. Do we need to add some column identifier for the company they belong too? :-( I am having issues with this too and would like to know - i am not a programmer - if maybe it is an error in procedure too... or we need to patch that code you shared... thanks in advance. Tatiana

from iomad.

turf212 avatar turf212 commented on June 28, 2024

Hi @pm-paradiso. No you don't need to have a column for the company. Procedure is:

  • In the Iomad dashboard select a company (Managers already have the company assigned so can skip this step)
  • Select the Users tab
  • Click on Upload users
  • Upload your file and select the appropriate delimiters etc
  • In the next page you get a sample of the file and you can choose what you want to happen.
  • Finish the upload.

I've attached a sample CSV file (zipped) which should help.

test.zip

from iomad.

pm-tatiana avatar pm-tatiana commented on June 28, 2024

Thanks @turf212 !
I will go ahead and test. I still have the issue of not being able to upload a file because I get an error.

from iomad.

turf212 avatar turf212 commented on June 28, 2024

What error are you getting? The normal issue with Moodle is that excel decides to be helpful and doesn't save the CSV as a true CSV, breaking the upload. Check it with notepad or similar or open and then save it through Libre Office. From the docs.moodle.org website:

If you use a spreadsheet program such as Excel to create your .csv file, check the resulting output in a text editor before you upload it. It is possible to get trailing commas on each line from an empty field if you have added and deleted columns of information prior to saving the final file. Also check the character encoding. A csv file is a simple text file (ASCII or Unicode) that can be used to upload user accounts.

Excel translates passwords that begin with - (minus) or + (plus) as zero. Even when saving as .csv and saying "Yes" to "Keep this format, and leave out any incompatible features." Check for this before uploading, as a zero halts the upload process.

If you use a formula in Excel to create fields (for example, the concatenate function to create a user name), then remember to copy the cells with the formula and use special paste with values checked to make them into an acceptable data for a csv file.

The upload will also fail if you have trailing spaces at the end of your data fields. Often, this can not be removed with a simple Find " " and Replace with "". If information has been copied from web sources than it is possible to include non-breaking spaces which will prevent your upload from being completed correctly. To find these invisible spaces, use the Find and Replace function in Excel. In the find field, hold alt and type 0160. Leave the replace field blank.

from iomad.

pm-tatiana avatar pm-tatiana commented on June 28, 2024

@turf212 what if I want to add a role to a user? for example, right now I took your csv and add a new column based on moodle I can add the column role and add the shortname. I want to add a company department manager role to a user and use the shortname but I gets this error: http://prntscr.com/ay275k

my csv has the following structure: http://prntscr.com/ay27in

from iomad.

pm-tatiana avatar pm-tatiana commented on June 28, 2024

Hey @turf212 What do you think about my last comment? Maybe an enhancement?

from iomad.

bkmarsh avatar bkmarsh commented on June 28, 2024

Hi @pm-paradiso and @turf212,
I was able to get this to work by changing the header record from "role" to "role1", and using ASCII as the encoding type.

CCA user upload.txt

from iomad.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.