Globale Gruppen hochladen

Aus MoodleDocs
Wechseln zu:Navigation, Suche

Neue Funktionalität
in Moodle 3.7!

Baustelle.png Diese Seite ist noch nicht vollständig übersetzt.


Administrator(innen können eine oder mehrere globale Gruppen anlegen, indem sie ein speziell formatierte CSV-Datei hochladen.

Globale Gruppen können systemweit oder im Kontext eines Kursbereiches angelegt werden.

Hochladen der Datei

Der Ablauf ist folgendermaßen:

  1. Erstellen Sie eine CSV-Datei, die die globale(n) Gruppe(n) enthält. Detaillierte Informationen zur Formatierung der Datei finden Sie im Abschnitt weiter unten.
  2. Gehen Sie auf die Seite Einstellungen > Website-Administration > Nutzer/innen > Nutzerkonten > Globale Gruppen und klicken Sie auf den Reiter Globale Gruppen hochladen.
  3. Wählen Sie die Datei aus oder ziehen Sie sie per Drag&Drop in das entsprechende Feld. Wählen Sie die Einstellungen CSV-Trenner, Kodierung und Standardkontext (siehe unten).
  4. Klicken Sie auf den Button Vorschau und prüfen Sie die Vorschauansicht auf mögliche Fehler.
  5. Klicken Sie auf den Button Globale Gruppen hochladen. Nach dem erfolgreichen Hochladen wird angezeigt, wie viele Gruppen angelegt wurden.
  6. Klicken Sie auf den Button Weiter, um zurück zur Übersicht aller globalen Gruppen zu gelangen.

Einstellungen

CSV-Trenner

Das ist das Trennzeichen, das in der Datei verwendet wird, um die einzelnen Felder bzw. Werte voneinander abzugrenzen. Standardmäßig wird ein Komma als Trennzeichen verwendet, es gibt jedoch auch Alternativen:

,
- Komma zur Trennung der Felder
;
- Semikolon zur Trennung der Felder
:
- Doppelpunkt zur Trennung der Felder
\t
- \t (Tab) zur Trennung der Felder

Kodierung

Hier wählen Sie aus, welche Zeichenkodierung in der Datei verwendet wurde. Die Standardkodierung ist UTF-8.

Standardkontext

Hier wählen Sie den Kontext, in dem die globale(n) Gruppe(n) angeelgt werden sollen. Der Standardkontext ist Kernsystem, d.h. die globalen Gruppen können systemweit verwendet werden. Sie können globale Gruppen auch im Kontext eines Kursbereiches anlegen. In diesem Fall wählen Sie den gewünschten Kursbereich aus dem Auswahlmenü aus.

Sie können den Kontext auch über ein spezielles Feld

contextid

in der CSV-Datei angeben. Auf diese Weise ist es möglich, mit einer Datei mehrere globale Gruppen in verschiedenen Kontexten anzulegen. Ist in der Datei kein Kontext angegeben, dann wird die Gruppe im Standardkontext angelegt.

Dateiformatierung

The upload cohorts CSV text file has fields separated by a comma (or other delimiter). The first line contains valid field names (preferrably lower case). The rest of the lines (records) contain information about each new cohort.

:Tip: Avoid special characters in field information like quotes or other commas. Test a file with only one record before a large upload. :Tip: You can use a spreadsheet program to create the file with the required columns and fields. Then save the file as "CSV (comma delimited)". These files can then be opened with simple text editors for verification.

Beispieldatei zum Testen

Hier ist eine Beispieldatei zum Hochladen globaler Gruppen.

Die 1. Zeile mit den Feldnamen ist hier nur deshalb fett dargestellt, um sie von den Daten der beiden gloablen Gruppen abzugrenzen.

name,idnumber,description
Jahrgang 2019,2019,Mitglieder des Jahrgangs 2019
Jahrgang 2020,2020,Mitglieder des Jahrgangs 2020

Felder

  • Required fields:
name - the name of the cohort to be created
  • Optional fields: To provide values other than the default include one or more of the following optional fields:
contextid - used to specify the context id number of the cohorts you are uploading. For example, the context id number of a particular course category.
idnumber - used to provide an id number for the cohorts you are uploading
description - used to provide a description for the cohorts you are uploading
descriptionformat - used to specify the text format of the description. By default, the descriptionformat is set to the recommended value of 1 (FORMAT_HTML); however, values of 0 (FORMAT_MOODLE) and 2 (FORMAT_PLAIN) are also available. These format values are defined in lib/weblib.php.
visible - used to specify whether the cohorts you are uploading should be visible (1) or not (0).
  • Additional fields : If needed, there are some additional fields that while not normally used can be utilized. Additional fields typically require looking up information in other tables (such as the course categories or context tables). The additional fields provide an alternative way of finding the course category context id. A bit of extra caution is recommended in using these additional fields. The list of additional fields includes:
context - used to specify the name of the context name for each of the cohorts you are uploading.
category - used to specify the name of the category name for each of the cohorts you are uploading. For example, the category name of a particular course category.
category_id - used to specify the course category id (not idnumber) of the category for each of the cohorts you are uploading. For example, the course category id of a particular course category.
category_idnumber - used to specify the course category idnumber (not id) of the category for each of the cohorts you are uploading. For example, the course category idnumber of a particular course category.
category_path - used to specify the course category path of the category for each of the cohorts you are uploading. For example, the course category path of a particular course category.

Siehe auch