|
|
[[_TOC_]]
|
|
|
|
|
|
### Query über Tabellen
|
|
|
|
|
|
Nachfolgendes Beispiel gibt die Nutzer eines Kurses mit der ausgewählten Rolle zurück. Berücksichtigt wird ob Enrolment-Status im Kurs `aktiv` (status=0) sowie generell (systemweit) ob User `suspended` oder `deleted` ist. Der Eintrag 0 ist in beiden Fällen ok. `contextlevel` `50` ist der Wert für den Kurkontext (siehe https://moodledev.io/docs/4.4/apis/subsystems/roles#context)
|
... | ... | @@ -172,5 +174,78 @@ Indexes: |
|
|
"mdl_user_mneuse_uix" UNIQUE, btree (mnethostid, username)
|
|
|
```
|
|
|
|
|
|
### mdl_customfield_data
|
|
|
|
|
|
```bash
|
|
|
Table "public.mdl_customfield_data"
|
|
|
Column | Type | Collation | Nullable | Default
|
|
|
----------------+-------------------------+-----------+----------+--------------------------------------------------
|
|
|
id | bigint | | not null | nextval('mdl_customfield_data_id_seq'::regclass)
|
|
|
fieldid | bigint | | not null |
|
|
|
instanceid | bigint | | not null |
|
|
|
intvalue | bigint | | |
|
|
|
decvalue | numeric(10,5) | | |
|
|
|
shortcharvalue | character varying(255) | | |
|
|
|
charvalue | character varying(1333) | | |
|
|
|
value | text | | not null |
|
|
|
valueformat | bigint | | not null |
|
|
|
valuetrust | smallint | | not null | 0
|
|
|
timecreated | bigint | | not null |
|
|
|
timemodified | bigint | | not null |
|
|
|
contextid | bigint | | |
|
|
|
Indexes:
|
|
|
"mdl_custdata_id_pk" PRIMARY KEY, btree (id)
|
|
|
"mdl_custdata_con_ix" btree (contextid)
|
|
|
"mdl_custdata_fie_ix" btree (fieldid)
|
|
|
"mdl_custdata_fiedec_ix" btree (fieldid, decvalue)
|
|
|
"mdl_custdata_fieint_ix" btree (fieldid, intvalue)
|
|
|
"mdl_custdata_fiesho_ix" btree (fieldid, shortcharvalue)
|
|
|
"mdl_custdata_insfie_uix" UNIQUE, btree (instanceid, fieldid)
|
|
|
```
|
|
|
|
|
|
|
|
|
### mdl_customfield_category
|
|
|
|
|
|
```bash
|
|
|
Table "public.mdl_customfield_category"
|
|
|
Column | Type | Collation | Nullable | Default
|
|
|
-------------------+------------------------+-----------+----------+------------------------------------------------------
|
|
|
id | bigint | | not null | nextval('mdl_customfield_category_id_seq'::regclass)
|
|
|
name | character varying(400) | | not null | ''::character varying
|
|
|
description | text | | |
|
|
|
descriptionformat | bigint | | |
|
|
|
sortorder | bigint | | |
|
|
|
timecreated | bigint | | not null |
|
|
|
timemodified | bigint | | not null |
|
|
|
component | character varying(100) | | not null | ''::character varying
|
|
|
area | character varying(100) | | not null | ''::character varying
|
|
|
itemid | bigint | | not null | 0
|
|
|
contextid | bigint | | |
|
|
|
Indexes:
|
|
|
"mdl_custcate_id_pk" PRIMARY KEY, btree (id)
|
|
|
"mdl_custcate_comareitesor_ix" btree (component, area, itemid, sortorder)
|
|
|
"mdl_custcate_con_ix" btree (contextid)
|
|
|
```
|
|
|
|
|
|
### mdl_customfield_field
|
|
|
|
|
|
```bash
|
|
|
Table "public.mdl_customfield_field"
|
|
|
Column | Type | Collation | Nullable | Default
|
|
|
-------------------+------------------------+-----------+----------+---------------------------------------------------
|
|
|
id | bigint | | not null | nextval('mdl_customfield_field_id_seq'::regclass)
|
|
|
shortname | character varying(100) | | not null | ''::character varying
|
|
|
name | character varying(400) | | not null | ''::character varying
|
|
|
type | character varying(100) | | not null | ''::character varying
|
|
|
description | text | | |
|
|
|
descriptionformat | bigint | | |
|
|
|
sortorder | bigint | | |
|
|
|
categoryid | bigint | | |
|
|
|
configdata | text | | |
|
|
|
timecreated | bigint | | not null |
|
|
|
timemodified | bigint | | not null |
|
|
|
Indexes:
|
|
|
"mdl_custfiel_id_pk" PRIMARY KEY, btree (id)
|
|
|
"mdl_custfiel_cat_ix" btree (categoryid)
|
|
|
"mdl_custfiel_catsor_ix" btree (categoryid, sortorder)
|
|
|
``` |
|
|
\ No newline at end of file |