Last modified by Carina Enke on 15.01.2024

Show last authors
1 {{layout}}
2 {{layout-section ac:type="two_right_sidebar"}}
3 {{layout-cell}}
4 Expert rules let you evaluate the user attributes and thus control the visibility and the access to course sections or course element. To do this, use the expert rules **hasAttribute, isInAttribute** or **getUserProperty**.
5
6 {{info}}
7 All of the following example rules can be created for both the **visibility** and** access** of a course element. To simplify matters, only one scenario is described in each of the following examples. To learn more about the difference between visibility and access, see the page [[Publishing within courses (visibility and access)>>doc:LMS.Benutzerhandbuch OPAL.Lehren.Kurs.Freigabe von Kursen und Kursinhalten.Freigabe innerhalb von Kursen Sichtbarkeit und Zugang.WebHome||shape="rect"]].
8 {{/info}}
9 {{/layout-cell}}
10
11 {{layout-cell}}
12
13 {{/layout-cell}}
14 {{/layout-section}}
15
16 {{layout-section ac:type="single"}}
17 {{layout-cell}}
18 == General user attributes ==
19
20
21 The following user attributes are available in the learning platform and can be used for expert rules:
22
23 (% class="wrapped" %)
24 |=(((
25 Attribut
26 )))|=(((
27 Contains the user-specific value
28 )))
29 |=(% colspan="1" %)(% colspan="1" %)
30 (((
31 firstName
32 )))|(% colspan="1" %)(% colspan="1" %)
33 (((
34 First name
35 )))
36 |=(% colspan="1" %)(% colspan="1" %)
37 (((
38 lastName
39 )))|(% colspan="1" %)(% colspan="1" %)
40 (((
41 Last name
42 )))
43 |=(((
44 username / userid
45 )))|(((
46 User name
47 )))
48 |=(((
49 email
50 )))|(((
51 Email address
52 )))
53 |=(((
54 institutionalName
55 )))|(((
56 Institution / University
57 )))
58 |=(% colspan="1" %)(% colspan="1" %)
59 (((
60 institutionalUserIdentifier
61 )))|(% colspan="1" %)(% colspan="1" %)
62 (((
63 Matriculation number / User number at the institution
64 )))
65 |=(% colspan="1" %)(% colspan="1" %)
66 (((
67 standort
68 )))|(% colspan="1" %)(% colspan="1" %)
69 (((
70 Location
71 )))
72 |=(% colspan="1" %)(% colspan="1" %)
73 (((
74 termsOfStudy
75 )))|(% colspan="1" %)(% colspan="1" %)
76 (((
77 Term of study
78 )))
79 |=(% colspan="1" %)(% colspan="1" %)
80 (((
81 studySubject
82 )))|(% colspan="1" %)(% colspan="1" %)
83 (((
84 Study programme
85 )))
86 |=(% colspan="1" %)(% colspan="1" %)
87 (((
88 studyGroup
89 )))|(% colspan="1" %)(% colspan="1" %)
90 (((
91 Study group
92 )))
93 |=(% colspan="1" %)(% colspan="1" %)
94 (((
95 orgUnit
96 )))|(% colspan="1" %)(% colspan="1" %)
97 (((
98 Organisation unit
99 )))
100
101 {{note}}
102 === Institution-specific user attributes ===
103
104 Apart from the general user attributes, there are also institution-specific restrictions or extensions possible. Therefore, check which of the user attributes are available in your platform before using it. Please refer to the page [[Overview of OPAL Shibboleth Attributes>>url:https://bildungsportal.sachsen.de/help/attribute-opal_de.html||shape="rect"]] for an overview of these usable attributes and corresponding example values.
105 {{/note}}
106 {{/layout-cell}}
107 {{/layout-section}}
108
109 {{layout-section ac:type="single"}}
110 {{layout-cell}}
111 (% id="HCheckingforauserattribute" class="auto-cursor-target" %)
112 == Checking for a user attribute ==
113
114 (% class="relative-table wrapped" style="width:100.0%" %)
115 |=(% colspan="1" %)(% colspan="1" %)
116 (((
117 Syntax in general
118 )))|=(% colspan="1" %)(% colspan="1" %)
119 (((
120 Example of an expert rule
121 )))|=(% colspan="1" %)(% colspan="1" %)
122 (((
123 Result of this rule
124 )))
125 |(% colspan="1" %)(% colspan="1" %)
126 (((
127 //isInAttribute("//[AttrName]//","//[string]//")//
128 )))|(((
129 (% class="auto-cursor-target" %)
130 isInAttribute("studySubject","Chemistry")
131
132
133 )))|(% colspan="1" %)(% colspan="1" %)
134 (((
135 If this rule has been defined in the tab Access, the course element is accessible for all persons whose attribute Study programme contains the letter sequence "Chemistry".
136
137 This means that users with the study programme “Chemistry BA" or “Chemistry MA" can use the course element. Users with the study subject “Chemical water treatment”, however, cannot.
138 )))
139 |(% colspan="1" %)(% colspan="1" %)
140 (((
141 //getUserProperty("//[string]//")//
142 )))|(((
143 (% class="auto-cursor-target" %)
144 getUserProperty("orgUnit") = "Marketing"
145
146
147 )))|(% colspan="1" %)(% colspan="1" %)
148 (((
149 Only users from the "Marketing" organisation unit can see the course element if this rule has been used in the Visibility tab..
150 )))
151 |(% colspan="1" %)(% colspan="1" %)
152 (((
153 //hasAttribute("//[AttrName]//","//[string]//")//
154 )))|(% colspan="1" %)(% colspan="1" %)
155 (((
156 hasAttribute("email","muster.mann@opal.de")
157 )))|(% colspan="1" %)(% colspan="1" %)
158 (((
159 Only a user with this email address will get access to the course section.
160 )))
161 {{/layout-cell}}
162 {{/layout-section}}
163
164 {{layout-section ac:type="single"}}
165 {{layout-cell}}
166 Create additional rules by using expert syntax. A tabular overview is provided on the page [[Expert>>doc:LMS.Benutzerhandbuch OPAL.Lehren.Kurs.Freigabe von Kursen und Kursinhalten.Expertenmodus zur Freigabe innerhalb von Kursen.Expertensyntax.WebHome]] [[syntax>>doc:LMS.Benutzerhandbuch OPAL.Lehren.Kurs.Freigabe von Kursen und Kursinhalten.Expertenmodus zur Freigabe innerhalb von Kursen.Expertensyntax.WebHome]].
167 {{/layout-cell}}
168 {{/layout-section}}
169 {{/layout}}