Expertenregeln zur Pruefung von Nutzerrolle und Guppenzugeoerigkeit
Prüfung auf eine Nutzerrolle
Folgende Rollenattribute sind in der Lernplattform vorhanden und können für Expertenregeln genutzt werden:
Attribut | Nutzer mit |
---|---|
GlobalAuthor | Rolle Autor |
Guest | Rolle Gast |
ExternalUser | Rolle Externer Nutzer |
Beispiele zur Verwendung
Syntax allgemein | Eintrag | Ergebnis dieser Regel |
---|---|---|
is[AttrName]() | isGuest()=false Alternativ: !isGuest() | Bei Eintrag im Tab Zugang haben Gäste keinen Zugang zu diesem Kursbaustein. |
isGuest() Alternativ: isGuest()=true oder isGuest()=1 | Bei Eintrag im Tab Sichtbarkeit sehen nur Gäste diesen Kursbaustein, alle registrierten Nutzer dagegen nicht. | |
isGuest() or isCourseAdministrator() | Bei Eintrag im Tab Sichtbarkeit sehen nur Gäste und Kursverantwortliche den Kursbaustein. |
Prüfung auf eine Gruppenzugehörigkeit
Folgende Mitgliedschaften eines Nutzers im Bezug zu einen Kurs können für Expertenregeln genutzt werden:
Attribut | Nutzer ist Mitglied |
---|---|
LearningGroup | einer Lerngruppe |
LearningArea | eines Lernbereichs |
LearningGroupWaitingList LearningAreaWaitingList | der Warteliste einer Lerngruppe bzw. eines Lernbereichs |
CourseAdministrator | der Kursverantwortlichen |
CourseCoach | der Lernruppenbetreuer |
RightGroup | einer Rechtegruppe |
Beispiele zur Verwendung
Syntax allgemein | Beispiel einer Expertenregel | Ergebnis dieser Regel |
---|---|---|
inLearningGroup("[string]") | inLearningGroup("Anfänger")= false Alternativ: !inLearningGroup("Anfänger") | Bei Eintrag im Tab Sichtbarkeit sehen mit Ausnahme der (Lern)Gruppe mit dem Titel "Anfänger" alle Kursteilnehmer den Kursbaustein. |
inLearningGroup("Intern") | Bei Eintrag im Tab Sichtbarkeit sehen nur Mitglieder der Gruppe "Intern" den Kursbaustein. Auch Kursverantwortliche und Gruppenbetreuer sehen den Kursbaustein in der Kursnavigation nicht. | |
(now >= date("tt.mm.yyy hh:mm")) and (now <= date("tt.mm.yyy hh:mm")) or inLearningGroup("[string]") | (now >= date("22.03.2020 12:00")) and (now <= date("23.08.2020 18:00")) or inLearningGroup("Betreuer") | Bei Eintrag im Tab Sichtbarkeit ist der Kursbaustein innerhalb eines Zeitraums (22.03.2020 - 23.08.2020) für alle Kursteilnehmer sichtbar, während er für Mitglieder der Lerngruppe mit dem Titel "Betreuer" jederzeit sichtbar ist. |
(now >= date("tt.mm.yyy hh:mm")) and (now <= date("tt.mm.yyy hh:mm")) or inRightGroup("[string]") or isUser("[string]") | (now >= date("03.09.2020 00:00")) and (now <= date("13.10.2020 00:00")) and inRightGroup("Assessoren")or isUser("natalie") | Bei Eintrag im Tab Sichtbarkeit ist der Kursbaustein innerhalb eines Zeitraums (03.09.2020 - 13.10.2020) für alle Kursteilnehmer der Rechtegruppe mit dem Titel "Assessoren" sichtbar, während er für die Person mit dem Benutzernamen "natalie" jederzeit sichtbar ist. |
Erstellen Sie weitere Regeln mit Hilfe Expertensyntax. Eine tabellarische Übersicht bietet die Seite Expertensyntax.
Checking for user role
The following role attributes are available in the learning platform and can be used for expert rules:
Attribute | User with |
---|---|
GlobalAuthor | Role Author |
Guest | Role Guest |
ExternalUser | Role Externer Nutzer |
Examples of Use
Syntax in general | Entry | Result of this rule |
---|---|---|
is[AttrName]() | isGuest()=false Alternativ: !isGuest() | If an entry is made in the Access tab, guests will not have access to this course element. |
isGuest() Alternativ: isGuest()=true oder isGuest()=1 | If an entry is made in the Visibility tab, only guests will see this course element, while all the registered users will not. | |
isGuest() or isCourseAdministrator() | If an entry is made in the Visibility tab, only guests and course owners will see the course element. |
Checking for group membership
The following memberships of a user in connection with a course can be used for expert rules:
Attribute | User is a member |
---|---|
LearningGroup | of a learning group |
LearningArea | of a learning area |
LearningGroupWaitingList LearningAreaWaitingList | of the waiting list of a learning group or learning area |
CourseAdministrator | of the course owners |
CourseCoach | of the learning group tutor |
RightGroup | of a rights group |
Examples of Use
Syntax in general | Example of an expert rule | Result of this rule |
---|---|---|
inLearningGroup("[string]") | inLearningGroup("Beginner")= false Alternativ: !inLearningGroup("Beginner") | If an entry is made in the Visibility tab, all course participants except for the (learning) group with the "Beginner" title will see the course element. |
inLearningGroup("Internal") | If an entry is made in the Visibility tab, only members of the "Internal" group will see the course element. Even course owners and group tutors cannot see the course element in the course navigation. | |
(now >= date("tt.mm.yyy hh:mm")) and (now <= date("tt.mm.yyy hh:mm")) or inLearningGroup("[string]") | (now >= date("22.03.2020 12:00")) and (now <= date("23.08.2020 18:00")) or inLearningGroup("Tutor") | If an entry is made in the Visibility tab, the course element will be visible to all course participants within a certain period of time (22.03.2020 - 23.08.2020), while it will be visible to members of the learning group with the title “tutor" at any time. |
(now >= date("tt.mm.yyy hh:mm")) and (now <= date("tt.mm.yyy hh:mm")) or inRightGroup("[string]") or isUser("[string]") | (now >= date("03.09.2020 00:00")) and (now <= date("13.10.2020 00:00")) and inRightGroup("Assessors")or isUser("Natalie") | If an entry is made in the Visibility tab, the course element will be visible to all course participants in the rights group with the title "Assessors" within a period of time (03.09.2020 - 13.10.2020), while it will be visible to the person with the user name "Natalie" at all times. |
Create additional rules by using expert syntax. A tabular overview is provided on the page Expertensyntax.