Note: You are currently viewing documentation for Moodle 3.11. Up-to-date documentation for the latest stable version of Moodle may be available here: Upload users in Moodle Workplace.

Upload users in Moodle Workplace: Difference between revisions

From MoodleDocs
 
(4 intermediate revisions by 2 users not shown)
Line 1: Line 1:
{{Workplace}}
{{Workplace}}
The [[Upload users]] tool is enhanced in Moodle Workplace to allow additional functionality.
The [[Upload users]] tool is enhanced in Moodle Workplace to allow additional functionality.
==Tenant allocation==
==Tenant allocation==
A tenant can be specified using tenant field when uploading the CSV by users with the capability tool/tenant:allocate. These users will be able to specify a tenant when uploading users (both when creating new users and updating existing).
A tenant can be specified using tenant field when uploading the CSV by users with the capability tool/tenant:allocate. These users will be able to specify a tenant when uploading users (both when creating new users and updating existing).


Line 10: Line 7:


Example of the CSV file:
Example of the CSV file:
 
<syntaxhighlight lang="csv">
<code>
username,firstname,lastname,email,tenant
username,firstname,lastname,email,tenant
jonest,Tom,Jones,jonest@example.com,big
jonest,Tom,Jones,jonest@example.com,big
reznor,Trent,Reznor,reznor@example.com,small
reznor,Trent,Reznor,reznor@example.com,small
</code>
</syntaxhighlight>
 
Tenants are matched by their "ID number".
Tenants are matched by their "ID number".
[[File:workplace_tenantidnumber.png|thumb|center|300px|Locating tenant ID number]]
[[File:workplace_tenantidnumber.png|thumb|center|300px|Locating tenant ID number]]
==Job assignments==
==Job assignments==
If the current user has the capability to assign jobs (in addition to the capability to use the upload user tool), they can create jobs for users or modify dates for existing jobs. Both fields jobdepartment1 and jobposition1 must have values, and fields jobstartdate1 and jobenddate1 are optional. When a user already has a job in this department and position, the dates will be modified but the new job will not be created, in this case, empty values in start/end date fields will mean "do not modify", to remove the job end date it can be set to "0". Departments and positions are matched by their "ID number" just like tenants. It is possible to add more than one job for one user in the same line by adding jobdepartment2, jobposition2, etc.
If the current user has the capability to assign jobs (in addition to the capability to use the upload user tool), they can create jobs for users or modify dates for existing jobs. Both fields jobdepartment1 and jobposition1 must have values, and fields jobstartdate1 and jobenddate1 are optional. When a user already has a job in this department and position, the dates will be modified but the new job will not be created, in this case, empty values in start/end date fields will mean "do not modify", to remove the job end date it can be set to "0". Departments and positions are matched by their "ID number" just like tenants. It is possible to add more than one job for one user in the same line by adding jobdepartment2, jobposition2, etc.
<code>
<syntaxhighlight lang="csv">
username,firstname,lastname,email,jobdepartment1,jobposition1,jobstartdate1,jobenddate1
username,firstname,lastname,email,jobdepartment1,jobposition1,jobstartdate1,jobenddate1
jonest,Tom,Jones,jonest@example.com,exampledep,examplepos,,
jonest,Tom,Jones,jonest@example.com,exampledep,examplepos,,
reznor,Trent,Reznor,reznor@example.com,exampledep2,examplepos2,2019-05-07,
reznor,Trent,Reznor,reznor@example.com,exampledep2,examplepos2,2019-05-07,
jon,Jon,Whatever,jon@example.com,exampledep2,examplepos2,2019-05-07,2032-01-09
jon,Jon,Whatever,jon@example.com,exampledep2,examplepos2,2019-05-07,2032-01-09
</code>
</syntaxhighlight>
 
==Programs and certifications allocations==
==Programs and certifications allocations==
 
If the current user has the capability to allocate to programs and/or certifications (in addition to the capability to use the upload user tool), they can do so in the upload users tool. Only users, programs and certifications from the same tenant can be used. If the user already has a direct (manual) allocation to a program/certification or via dynamic rules, the dates will be updated. Programs and certifications are matched by their "ID number".  
If the current user has the capability to allocate to programs and/or certifications (in addition to the capability to use the upload user tool), they can do so in the upload users tool. Only users, programs and certifications from the same tenant can be used. If the user already has a direct allocation to a program/certification, the dates will be updated. Programs and certifications are matched by their "ID number".  


Programs:
Programs:
<syntaxhighlight lang="csv">
<syntaxhighlight lang="csv">
username,program1,programstartdate1,programenddate1,programduedate1
username,program1,programstartdate1,programenddate1,programduedate1
Line 44: Line 33:
user13,prog1,2019-05-12,,2032-01-09
user13,prog1,2019-05-12,,2032-01-09
</syntaxhighlight>
</syntaxhighlight>
Certifications:
Certifications:


Example 1 - allocating users to certification and/or updating dates in the existing allocation (start and due date can not be updated for users who are already certified or have started recertifications):
<syntaxhighlight lang="csv">
<syntaxhighlight lang="csv">
username,certification1,certificationstartdate1,certificationduedate1,certificationcertify1,certificationcertifyexpires1,certificationcertifytimecertified1
username,certification1,certificationstartdate1,certificationduedate1
user14,cert1,2019-05-12,,,,
user14,cert1,2019-05-12,
user15,cert1,2019-05-12,2032-01-09,0,,
user15,cert1,2019-05-12,2032-01-09
user12,cert1,2019-05-12,,,,
</syntaxhighlight>
user13,cert1,2019-05-12,2032-01-09,1,2032-01-09,2019-10-12
Example 2 - marking users as certified:
<syntaxhighlight lang="csv">
username,certification1,certificationcertify1,certificationcertifyexpires1,certificationcertifytimecertified1
user13,cert1,1,2032-01-09,2019-10-12
</syntaxhighlight>
Example 3 - updating the expiry date for the users who are already certified:
<syntaxhighlight lang="csv">
username,certification1,certificationexpirydate1
user16,cert1,2022-01-01
</syntaxhighlight>
</syntaxhighlight>
==Course completion==
==Course completion==
If the current user has the 'tool/datastore:uploadcoursecompletion' capability, they can upload course completion data to be stored in the Data store for users who belong to the same tenant as themselves. This data can be reported on by using the Report builder report source "Course completion from datastore".


If the current user has the 'tool/datastore:uploadcoursecompletion' capability, they can upload course completion data to be stored in the Data store for users who belong to the same tenant as themselves. This data can be reported on by using Report builder to [[Report_builder#Creating_a_custom_report|create a new report]] using the "Course completion from datastore" report source. The following is an example CSV file:
Details on the course completion mechanism can be found in a dedicated section in the [[Report builder#Data Store|Report builder]] docs.
 
<code>
username,coursecompleted1,coursecompleteddate1
student,English 101,2019-01-01
</code>
 
Courses are matched on the 'coursecompleted' field of the CSV, which should refer to the shortname of the course in Moodle. It's possible to set the completion date by using the 'coursecompleteddate' field (if this field is omitted, then the current date will be used).

Latest revision as of 09:59, 8 February 2022

workplacelogo.png This feature is part of Moodle Workplace™, which is available through Moodle Partners only.

The Upload users tool is enhanced in Moodle Workplace to allow additional functionality.

Tenant allocation

A tenant can be specified using tenant field when uploading the CSV by users with the capability tool/tenant:allocate. These users will be able to specify a tenant when uploading users (both when creating new users and updating existing).

If the current user does not have this capability, they can only create/update users in their own tenant. Use of tenant field is not allowed to these users. Note that by default, only site admins have this capability.

Example of the CSV file:

username,firstname,lastname,email,tenant
jonest,Tom,Jones,jonest@example.com,big
reznor,Trent,Reznor,reznor@example.com,small

Tenants are matched by their "ID number".

Locating tenant ID number

Job assignments

If the current user has the capability to assign jobs (in addition to the capability to use the upload user tool), they can create jobs for users or modify dates for existing jobs. Both fields jobdepartment1 and jobposition1 must have values, and fields jobstartdate1 and jobenddate1 are optional. When a user already has a job in this department and position, the dates will be modified but the new job will not be created, in this case, empty values in start/end date fields will mean "do not modify", to remove the job end date it can be set to "0". Departments and positions are matched by their "ID number" just like tenants. It is possible to add more than one job for one user in the same line by adding jobdepartment2, jobposition2, etc.

username,firstname,lastname,email,jobdepartment1,jobposition1,jobstartdate1,jobenddate1
jonest,Tom,Jones,jonest@example.com,exampledep,examplepos,,
reznor,Trent,Reznor,reznor@example.com,exampledep2,examplepos2,2019-05-07,
jon,Jon,Whatever,jon@example.com,exampledep2,examplepos2,2019-05-07,2032-01-09

Programs and certifications allocations

If the current user has the capability to allocate to programs and/or certifications (in addition to the capability to use the upload user tool), they can do so in the upload users tool. Only users, programs and certifications from the same tenant can be used. If the user already has a direct (manual) allocation to a program/certification or via dynamic rules, the dates will be updated. Programs and certifications are matched by their "ID number".

Programs:

username,program1,programstartdate1,programenddate1,programduedate1
user14,prog1,2019-05-12,,
user15,prog1,2019-05-12,2032-01-09,2032-01-09
user12,prog1,2019-05-12,2032-01-09,
user13,prog1,2019-05-12,,2032-01-09

Certifications:

Example 1 - allocating users to certification and/or updating dates in the existing allocation (start and due date can not be updated for users who are already certified or have started recertifications):

username,certification1,certificationstartdate1,certificationduedate1
user14,cert1,2019-05-12,
user15,cert1,2019-05-12,2032-01-09

Example 2 - marking users as certified:

username,certification1,certificationcertify1,certificationcertifyexpires1,certificationcertifytimecertified1
user13,cert1,1,2032-01-09,2019-10-12

Example 3 - updating the expiry date for the users who are already certified:

username,certification1,certificationexpirydate1
user16,cert1,2022-01-01

Course completion

If the current user has the 'tool/datastore:uploadcoursecompletion' capability, they can upload course completion data to be stored in the Data store for users who belong to the same tenant as themselves. This data can be reported on by using the Report builder report source "Course completion from datastore".

Details on the course completion mechanism can be found in a dedicated section in the Report builder docs.