36/Subir usuarios

De MoodleDocs


note icon.png Existe documentación diferente para varias versiones de Moodle: Esta documentación corresponde a Moodle 3.2 y más recientes. Si Usted quiere ver la versión más anterior, para Moodle 2.7 y anteriores, vaya a 27/Subir usuarios.


Subir usuarios mediante archivo de texto

Hay muchas opciones para subir información (campos asociados con un usuario) con este método: desde inscribir (matricular) usuarios en varios cursos con roles específicos del curso, hasta actualizar información del usuario en el Perfil del usuario o eliminar a usuarios del sitio.

Sugerencia: Usualmente no es necesario subir usuarios masivamente con 'Subir usuarios'. Para mantener leve el trabajo de mantenimiento Used debería de explorar formas de Autenticación que no requieran mantenimiento manual, como por ejemplo, conectarse a Bases de datos externas existentes, o permitirles a los usuarios el crear sus propias cuentas (auto inscripción). Vea Autenticación para más información.

Formatos de archivo del archivo para subir usuarios

El archivo para subida de usuarios tiene campos separados por comas (o algun otro delimitador) SOLAMENTE - sin espacios. La primera línea contiene los nombres de campo válidos. El resto de las líneas (registros) contiene información sobre cada usuario.

Sugerencia: Evite usar caracteres especiales en los campos de información, como signos de comillas y signos de comas. Haga la prueba con un archivo que tenga un solo registro antes de hacer una subida grande.

Sugerencia: Usted puede usar un programa de hoja-de-cálculo para crear el archivo con las columnas y campos necesarios. Después guárdelo como "CSV (delimitado por comas)". Estos archivos pueden abrirse con editores de texto simples (como por ejemplo, Notepad++) para verificación.

Archivo de subida válido para pruebas

Aquí hay un ejemplo de un archivo simple de subida válido: (Los encabezados de columna en la primera línea del archivo solamente están resaltados en negritas en este ejemplo para distinguirlos del resto de los datos y detalles de los usuarios)

username,password,firstname,lastname,email,course1,group1,cohort1
jonest,muysecreto,Tom,Jones,jonest@escuela.edu.mx,matemáticas102,Sección 1,semestre 3
reznort,supersecreto,Trent,Reznor,reznort@colegio.edu.es,matemáticas102,Sección 3,semestre 4
translator note icon.png Nota del traductor: Los nombres de campo obligatorios DEBEN de escribirse como están en idioma inglés (username,password,firstname,lastname,email...); si los tradujera al español obtendrá un error y no funcionarán.


Campos del usuario que pueden incluirse

Sugerencia: Nosotros recomendamos encarecidamente que Usted pruebe un archivo que contenga los campos que Usted propone usar con solamente un usuario, antes de intentar una subida de archivos por vez primera.

Campos obligatorios

Estos son los campos de identificación del usuario necesarios (tal como están escritos en idioma inglés):

username,firstname,lastname,email

Se hacen revisiones de validez para:
  1. username el campo de username (nombre_de_usuario) solamente puede contener letras alfabéticas minúsculas, números, guión '-', guión_bajo '_', punto '.', o signo de arroba '@'
  2. email esté en el formato de: nombre@ejemplo.com .

translator note icon.png Nota del traductor: Evite usar letras acentuadas y eñes en el campo de username. Si necesariamente Usted necesita usar estos caracteres, deberá primeramente modificar las políticas del sitio para permitir caracteres extendidos.


Contraseñas (Passwords)

El campo password (contraseña) es opcional si se eligió la configuración de "Contraseña del usuario nuevo" está configurada a "Crear contraseña si se necesitara y enviar por email", pero es requerida si estuviera configurado a "Campo requerido en archivo".

    • Si se incluyera la contraseña, los valores deben de cumplir con los requisitos de la Política de contraseñas del sitio. Para forzar el cambio de contraseña para un usuario en particular, configure el campo de password a changeme (cámbiame).
Nota: Usted debe de escribir changeme en idioma inglés; no intente traducir esta palabra.


    • Si se omite, se generará una contraseña para cada usuario (durante el siguiente trabajo del cron y se enviarán correos de BienVenida.
    • Nota: el texto para el mensaje de BienVenida está en las configuraciones del idioma. Por favor refiérase a este hilo del foro para los detalles.

Campos del usuario opcionales

Nota: Las comas adentro de un campo deben de codificarse como &#44 - el script las decodificará y regresará a comas. Sugerencia: Para campos Booleanos con solamente dos valores, use 0 para falso y 1 par averdadero.


Para proporcionar otros valores a los por defecto, Usted puede incluir uno o más de estos campos de usuario opcionales (como están escritos en idioma inglés):

institution,department,city,country,lang,auth,timezone,idnumber,icq,phone1,phone2,address,url,description,mailformat,maildisplay,maildigest,htmleditor,autosubscribe,interests

La mayoría de estos son campos del perfil del usuario o cmpos de preferencias del usuario que pertenecen al perfil del usuario y que son llenados cuando se crea el usuario o se crean manualmente. Algunos de estos, sin embargo, requieren formatos específicos:

Vea Campos de nombre adicionales para más detalles. Algunos puntos importantes a notar son:

country - (país) use el CÓDIGO DE DOS LETRAS para cada país, en MAYÚSCULAS, como por ejemplo: AU,ES,GB,US,ES,MX,CO . Todos los nombres están en MAYÚSCULAS. Si usa "au" o "es" o "USA" como código de país resultará en un error en la base de datos. Si tiene problemas para adivinar los códigos de dos letras para un país, Usted puede consultar la lista de country names and code elements disponible en el sitio web de ISO. Un error común para los angloparlantes es usar UK para United Kingdom; debería de ser GB.

lang - (idioma) use las letras que identifican su idioma tal como están definidas en los paquetes de idioma de Moodle; por ejemplo en, es, en_us, es_mx, es_ve en Administración del sitio > Idioma > Paquetes de idioma.

auth - El campo auth (autenticación) debe usarse si el sitio emplea un método de Autenticación alternativo, como por ejemplo LDAP, porque de lo contrario el método de autenticación por defecto será manual y los usuarios que empleen un método de autenticación diferente no podrán ingresar al sitio. Use los códigos de nombre_corto definidos en Plugins > Autenticación para los diferentes tipos, como por ejemplo, manual, sin_ingreso, LDAP, CAS, MNet, db, ninguno. Si Usted no incluye una columna de autenticación auth, entonces los nuevos usuarios recién creados serán creados con el tipo de cuenta manual.

Usted puede configurar "auth" a "nologin" (sin_ingreso) en su archivo CSV, lo que significará que los usuarios creados nuevos no podrán ingresar al sitio.


timezone (zona horaria) - Debería de estar en el formato encontrado en las configuraciones de Localización en términos de Zona/Región, como por ejemplo Australia/Sydney, Asia/Kathmandu, Europe/Madrid, etc. La entrada es sensible a MAYÚSCULAS/minúsculas por lo que Europe/London funcionará pero europe/london no funcionará.

NOTA: Necesario: configuraciones para mailformat,maildisplay,htmleditor,autosubscribe

maildigest Para evitar que los usuarios reciban muchísimos Emails de cursos o de foros con suscripción forzada, use maildigest. Las opciones para este campo son 0 = Sin resumen, 1 = Resumen completo y 2 = Resumen con solamente asuntos.

Nota: Pendiente de Traducir. ¡Anímese a traducir esta página!.     ( y otras páginas pendientes)

Nombres de campos de perfil personalizados

These are optional and depend on whether you have created any custom profile fields in your site. The name of the header in file is of the form 'profile__field_xxxxx' where xxxx is the unique shortname of custom user profile field name as you created it.

The field name should match the case of the profile field shortname. So, for instance if the shortname of your custom profile field is all upper case, for example, DOB, then use a header of profile_field_DOB to match the case, not profile_field_dob, which will produce a "is not a valid field name" error. Likewise, a mixed case shortname such as Dob should have a header of profile_field_Dob. (The exception to this is if the shortname is all lower case, then any case will work in the field header, which is a historical quirk: but best practice is to match the case and you will avoid errors.)

profile_field_xxxxx

Example: To create a custom field "genre", you must write a shortname "genre" in the new field, and write "profile_field_genre" in the header of the .csv file.


For custom profile fields that are dates, use the ISO standard format YYYY-MM-DD, eg. 2014-06-19 which will then be properly localized in the interfaced. For example, a field called dohire for date of hire, the fields could be:

username,firstname,lastname,email,profile_field_dohire
blumbergh,Bill,Lumbergh,blumbergh@example.com,1990-02-19
pgibbons,Peter,BGibbons,pgibbons@example.com,1996-06-05
tsmykowski,Tom,Smykowski,tsmykowski@example.com,1970-01-01 


For custom profile fields that are a menu, use the corresponding value in the menu list from field as you defined it. For example: a custom field 'corporatedivision' with one of three values 'Management', 'Development' or 'Training'. Just insert one of those three words (e.g. 'Training') as the value for that field. Eg.

username,firstname,lastname,email,profile_field_corporatedivision
blumbergh,Bill,Lumbergh,blumbergh@example.com,Management
pgibbons,Peter,BGibbons,pgibbons@example.com,Development
tsmykowski,Tom,Smykowski,tsmykowski@example.com,Training 

Campos especiales para cambio de usuario

Three special fields are used for managing user accounts, oldusername, deleted and suspended. See below for details.

Campos para inscripción (matriculación)

You may optionally enrol users in already existing courses using manual enrolment. Only manual enrolment is done this way; if the manual enrolment method is disabled in a course, then no enrol is done.

You use fields in the upload file of this type:

course1,type1,role1,group1,enrolperiod1,enrolstatus1,course2,type2,role2,group2,enrolperiod2,enrolstatus2

etc.

Header fields must have a numeric suffix such that type1,role1,group1,enrolperiod1 and enrolstatus1 all apply to course1 for course1 to coursen. Even if you are just doing one course enrolment, you must still use the number 1 on the heading name, i.e. course1,role1, etc. Do not use the bare headings without numbers, e.g. course,role, etc as those will generate an error.


course# is the shortname of the course, if present the user will be enrolled in that course. Do not use the fullname of the course or it will generate an error. This field is the ONLY required field for a succesful enrolment. All the others are optional.

type# sets the role to be used for the enrolment. A value of 1 is default course role, 2 is legacy Teacher role and 3 is legacy Non-editing Teacher.

role# may be used to specify roles directly, using either role short name or the role id (numeric names of roles are not supported). Usually you will use the role name that is the shortname of the role as defined in Users > Permissions > Define roles, eg. student, editingteacher. If the role column is left out, the users will be enroled in the course with the default role, which is normally student.

group# may be used to assign users to groups in course, using name or id (numeric group names are not supported). NOTE: if the group does not already exist, it will be created.

enrolperiod# may be used to set the enrolment duration, in days, for each course. If not explicitly set here, all the users will get the duration as set in the Manual enrolment method of the course (which defaults to 0 meaning unlimited.)

enrolstatus# is optional as by default all newly enrolled users are set to active. If used a value of 1, it will suspend users in the course and if a user is previously set as inactive / suspended then a value of 0 will unsuspend them and make them active again.

Asignación de membresía de cohorte

You can assign users to any already existing Cohort by using only the "username" and the "Cohort ID" with just two fields in the file. Note that this is an exception to the usual case where the firstname, lastname and email address of the user are required.

cohort# is the form to use and like enrolment in courses, you have to add a number to each header, so cohort1,cohort2, etc.

Internal cohort id numbers or non-numeric Cohort IDs of existing cohorts must be used; do not use the full name are not allowed. (Note that cohort id is what is usually known elsewhere as the "shortname".)

Here is a sample CSV file:

username,cohort1,cohort2
student1,nursing,2016class
student2,nursing,2014class
student3,nursing,2014class

MNet

Existing MNetusers can be added to courses, groups or cohorts as below by using the field header mnethostid

  1. enrolling to courses: username+mnethostid+course required
  2. adding to group: username+mnethostid+course+group required
  3. adding to cohort: username+mnethostid+cohort required
  4. suspending/reviving accounts: username+mnethostid+suspended required

All other operations are ignored. You can not add users, delete them or update them (such as change names or email, profile fields, etc.)

Configurar roles del sistema

Users may also be assigned to already defined system roles, using the shortname of the system role as defined in Site administration > Users > Permissions > Define roles for roles with a system context defined.

sysrole1,sysrole2,sysrole3 etc

Users may be uploaded to a system role (usually Manager or Course creator) by entering the shortname of that role. Other roles can only be uploaded if they have already been assigned in the 'system' context. See Crear roles personalizados. Multiple roles can be assigned using sysrole2, sysrole3, etc. fields. Note that the number suffix in no way relates to the number suffixes on the enrolment fields. The numbers must go up in sequence starting at 1.

Unassigning system roles Users can also be removed from a given system role by entering the shortname of that role prefixed with a minus symbol: '-'. If the user is currently assigned to that role, they are removed from it. If the user is not currently assigned to that system role, the field value is ignored. However, the field value must refer to a system role that does exist on the system, otherwise an error will occur.

Example of a file for uploading users with global/system roles

Proceso para subir usuarios

  1. Create file for uploading
  2. Go to Site administration > Users > Accounts > Upload users
  3. Add file to upload
  4. Upload users preview - check settings and default user profile settings
  5. Upload users preview - click "Upload users"
  6. Upload users results - shows list of users, exceptions made in upload and summary of number of users
  7. Upload users results - click "Continue"
  8. Returns to Upload users screen

Vista previa al actualizar usuarios

There are various settings to better control the desired upload behaviour. These settings are found on the "Upload users preview" page.

Warning: errors updating existing accounts can affect your users badly. Be careful when using the options to update.

Tipo de subida

The Upload type specifies how to handle existing accounts.

Add new only, skip existing users
is the default Moodle upload type. It creates a new user account for each new record in the uploaded file. If an existing username is found in the uploaded file matches an existing username, that record is skipped. By skipping the existing user account, the data in the existing record is not touched (in contrast to the "Add new and update existing users" option) and a second new user account is not created (in contrast to the "Add all, append number to usernames if needed" option).
Add all, append number to usernames if needed
creates a new user account for each record in the uploaded file. If an existing user account is found, a new account will be created with a number appended to the username. For example, if a user account for username 'jsmith' already exists and a new record in the uploaded file contains a record forusername 'jsmith' an additional user account is created with a 1 appended to the username to produce user 'jsmith1'.
Add new and update existing users
creates a new user account for each new user in the upload file. If an existing user account with the same username is found, the account information is updated by the data in the uploaded file.
Update existing users only
ignores any new users found in the upload file and updates the user account if a matching username record is found in the uploaded file.

Contraseña de usuario nuevo

When creating a new user account Moodle can create a new password (if one is not provided) or require a password in the uploaded file.

Crear conytraseña si es necesario
creates a default password for the new user account if one is not provided in the uploaded file.
Field required in file
requires that a password be provided in the uploaded file in order. If a password is not provided, an error is generated and the user account is not created.

Detalles del usuario existente

The Existing user details options are only available when the Upload type allows existing user accounts to be updated. It specifies how Moodle should process user detail information for existing users.

Sin cambios
ignores user detail data in the uploaded and leaves the existing user account data unchanged.
Sobrescribir con archivo
overwrites data in the existing user account with the data provided in the uploaded file.
Sobrescribir con archivo y valores por defecto
overwrites data in the existing user account with data provided in the uploaded file and fills in the default values for existing user details when no data is provided in the uploaded file.
Rellenar los datos faltantes a partir de archivo y valores por defecto
adds data in the existing user account with data provided in the uploaded file if the field is empty (does not already contain data) and fills in the default values for existing user details when no data is provided in the uploaded file.

Detalles del usuario existente

The Existing user password option specifies how to handle password data for existing user accounts when Existing user details is set to overwrite data.

Sin cambios
ignores password field in the uploaded user file and leaves the existing user account password untouched
Actualizar
overwrites the existing user account password with the password provided in the uploaded file

Forzar cambio de contraseña

The Force password change option specifies when to tag a user account so that the next login attempt will require the user to change the user's password.

Users having a weak password
If the user account has a weak password as defined by the site's Política de contraseñas then the user will be forced to change the password during the next login attempt. This option is not shown if there the site does not have a Política de contraseñas .
None
None of the users in the uploaded file will be forced to change the password during the user's next login attempt.
All
All of the users in the uploaded file will be forced to change the password during the user's next login attempt.

Permitir cambio de nombre

If the uploaded flie contains the special oldusername field, it is possible to rename a user from the oldusername to a new username. The default setting is to not allow renames. Keep in mind that renaming a user will require the user to use the new username when logging in.

No
ignores the oldusername field and leaves the existing user account's username field unchanged.
Si
allows the existing user account's username to be changed by the data provided in the uploaded file's username field. The oldusername will be searched for and then updated with the data provided in the username column.

Añadir borrar

If the uploaded file contains the deleted special field, it is possible to use the upload file to delete existing user accounts. The default setting is to not allow deletes. Keep in mind that deleting a user account will prevent that user from logging in. As a protection, site administrator user accounts cannot be deleted with this method.

No
ignores the deleted special field in the uploaded file and leaves the existing user account unchanged
Si
allows the existing user account to be deleted when the value of the of the deleted field is 1.

Permitir suspender y activar cuentas

If the uploaded file contains the suspended special field, it is possible to use the upload file to either suspend or make active (unsuspend) existing user accounts. The default setting is to allow suspending/activating of existing user accounts. Keep in mind that suspending an existing user account will prevent that user from logging in.

Yes
allows the existing user account to be suspended when the value of the of the suspended field is 1.
No
ignores the suspended special field in the uploaded file and leaves the existing user account status unchanged.

Prevenir duplicados de direcciones Email

Es posible, pero no recomendable subir usuarios con direcciones Email duplicadas. By default, uploading users with duplicate email addresses is prevented. To allow duplicate email addresses, go to Site administration ► Plugins ► Authentication ► Manage authentication. You can tick "Allow accounts with same email". Then on the upload users screen you will be allowed to change the "Prevent email address duplicates" setting.

However, doing this is not recommended for file uploads. Test thoroughly any user uploads before implementing.

For more info, see the Gestionando autenticación docs page

Si
prevents user accounts from being created from the uploaded if an existing user account already has the same email address as found in the uploaded file's email column.
No
allows user accounts to be created if an existing user account already has the same email address found in the uploaded file's email column.

Estandarizar nombres_de_usuarios

Estandarizar nombres_de_usuarios se usa por defecto para convertir los nombres_de_usuario a letras minúsculas y quitar los caracteres ilegales. Es posible no estandarizar los nombres_de_usuarios; aunque el dejar de estandarizarlos no se recomienda.

Si
estandarizar nombres_de_usuarios encontrados en el archivo de subida antes de actualizar los existentes o crear nuevas cuentas de usuarios, para que el nombre_de_usuario solamente contenga letras minúsculas (no acentuadas ni eñe) y números.
No
se salta el estandarizar nombres_de_usuarios encontrados en el archivo de subida, por lo que los nombres_de_usuarios actualiazdos o recien creados serán exactamente como están en el archivo subido (no recomendado).

Para quienes buscan una explicación más técnica, el proceso de estandarización dse nombres_de_usuarios consiste en asegurarse de que los caracteres estén todos codificados en UTF-8 (fix_utf8), convirtiendo el nombre_de_usuario a minúsculas y después eliminando caracteres no-alfabéticos y no-numéricos (a mensoq ue Adminsitración del sitio > Seguridad > Políticas del sitio > Permiir caracteres extendidos en nombres_de_usuarios esté activado) con algo similar a:

$username = preg_replace('/[^-\.@_a-z0-9]/', , $username);

Seleccionar para acciones masivas con usuarios

After the uploaded file has finished being processed (all new accounts have been created and existing accounts updated as specified by the previous settings), there is an option to select some of those user accounts to perform additional acciones masivas con usuarios such as

  • Confirm user accounts created through Email-based self-registration which are not yet confirmed by the user
  • Send a message (requires Messaging to be enabled)
  • Delete user accounts
  • Display a list of users on a page
  • Download user data in text, ODS or Excel file format
  • Force users to change their passwords
  • Add users to a cohort

Por defecto, no hay usuarios deleccionados para Acciones masivas con usuarios .


No
No users are selected for acciones masivas con usuarios
Nuevos usuarios
Only newly created users are selected for acciones masivas con usuarios
Usuarios actualizados
Only updated user accounts are selected for acciones masivas con usuarios
Todos los usuarios
All users found (existing updated users and newly created user accounts) in the uploaded file are selected for acciones masivas con usuarios

Valores por defecto

You can provide default user values for some fields not included in the uploaded file. Some fields include:

  • Email display
  • Forum auto-subscribe
  • City/town
  • ID number
  • Institution
  • Department

Resultados de subida de usuarios

After accepting the preview settings by clicking on "Upload users", you should see the the Upload users results screen.

The results screen; everything went well!

This screen will show you any exceptions or changes that were made to each user in the upload process. For example if you were updating user information, the updated information will be shown. Or if a user was not added that record will be highlighted.

The screen will summarize how many users were uploaded or updated, indicate the number of weak passwords and the number of errors.

Potenciales avanzados de Subida de usuarios

Plantillas

Note: This section needs checking and updating if necessary for Moodle 2.0. Please do so and remove this note when finished.

The default values are processed as templates in which the following codes are allowed:

  • %l - will be replaced by the lastname
  • %f - will be replaced by the firstname
  • %u - will be replaced by the username
  • %% - will be replaced by the %

Between the percent sign (%) and any code letter (l, f or u) the following modifiers are allowed:

  • (-) minus sign - the information specified by the code letter will be converted to lowercase
  • (+) plus sign - the information specified by the code letter will be converted to UPPERCASE
  • (~) tilde sign - the information specified by the code letter will be converted to Title Case
  • a decimal number - the information specified by the code letter will be truncated to that many characters

For example, if the firstname is John and the lastname is Doe, the following values will be obtained with the specified templates:

  • %l%f = DoeJohn
  • %l%1f = DoeJ
  • %-l%+f = doeJOHN
  • %-f_%-l = john_doe
  • http://www.example.com/~%u/ results in http://www.example.com/~jdoe/ (if the username is jdoe or %-1f%-l)

Template processing is done only on default values, and not on the values retrieved from the CSV file.

In order to create correct Moodle usernames, the username is always converted to lowercase. Moreover, if the "Allow extended characters in usernames" option in the Site policies page is off, characters different to letters, digits, dash (-) and dot (.) are removed. For example if the firstname is John Jr. and the lastname is Doe, the username %-f_%-l will produce john jr._doe when Allow extended characters in usernames is on, and johnjr.doe when off.

When the "New username duplicate handling" setting is set to Append counter, an auto-increment counter will be append to duplicate usernames produced by the template. For example, if the CSV file contains the users named John Doe, Jane Doe and Jenny Doe without explicit usernames, the default username is %-1f%-l and New username duplicate handling is set to Append counter, then the usernames produced will be jdoe, jdoe2 and jdoe3.

Eliminar cuentas

If the deleted field is present, users with value 1 for it will be deleted. In this case, all the fields may be omitted, except for username. After uploading the file, be sure to change the "Upload type" to "Update existing users only" and the "Allow deletes" option to "Yes".

Tip: A similar field is available for suspended. This enables a user account to be temporarily disabled rather than completely removed.

Deleting and uploading accounts could be done with a single CSV file. For example, the following file will add the user Tom Jones and delete the user reznort:

username,firstname,lastname,deleted
jonest,Tom,Jones,0
reznort,,,1

Codificar formato de archivo

On the initial Upload user screen, you may select the file encoding format from a pull down list. These include UTF-8 (the default), ASCII, ISO-8859-1 to ISO-8859-11 or any one of over 36 formats.

Sugerencias

Hoja-de-cálculo

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.

Límites del tamaño del campo

Algunos campos tienen máximos de largo de caracteres, como se define en los campos de la BasedeDatos. Típicamente el archivo importará a la pantalla de vista previa pero no terminará el proceso. Active la depuración (debugging) para ver los campos que sean demasiado largos. El error será "User not added - error" (Usuario no añadido - error).

Los tamaños de algunos campos comunes, en el número de caracteres, son actualmente (Moodle 3.2):

  • username - 100
  • password - 255
  • idnumber - 255
  • firstname - 100
  • lastname - 100
  • lastnamephonetic - 255
  • firstnamephonetic - 255
  • middlename - 255
  • alternatename - 255
  • institution - 255
  • department - 255
  • address - 255
  • city - 120
  • icq -15
  • skype - 50
  • yahoo - 50
  • aim - 50
  • msn - 50
  • phone1 - 20
  • phone2 - 20

Todos los campos de usuario aquí enlistados

Todos los campos de usuario que son válidos en un archivo de subida están enlistados debajo, excepto por cualquier campo personalizado que Usted hubiera creado (para los cuales, vea más debajo.)
firstname,lastname,username,email,password,auth,idnumber,institution,department,city,country,timezone,lang,mailformat,maildisplay,maildigest,htmleditor,autosubscribe,skype,msn,aim,yahoo,icq,phone1,phone2,address,url,description,descriptionformat,interests,oldusername,deleted,suspended,alternatename,lastnamephonetic,firstnamephonetic,middlename

Las inscripciones (matriculaciones) a curso son mediante

course1,type1,role1,group1,enrolperiod1,enrolstatus1

en donde cada inscripción (matriculación) está agrupada por número.


Capacidades

Usted podría querer crear un rol limitado que les permita a algunos usuarios el acceder a esta función. Cree un rol y asígnelo al usuario en el nivel de sistema/sitio con las siguientes capacidades permitidas:

  • moodle/site:uploadusers
  • moodle/role:assign

And

  • In 'Allow role assignments' tab of this new role, permit it to assign the required roles that it may be uploading, especially Student, but also Teacher, Non-editing Teacher, and any other custom roles you may have created, which will be used in the uploads to assign users to.

In particular, don't forget the moodle/role:assign capability (even if these users have it in the courses they will be enrolling users in - it won't work).

Vea también

Discusiones en foros: