Changes for page Expertenmodus
Last modified by Carina Enke on 18.11.2025
To version 6.4
edited by Carina Enke
on 18.11.2025
on 18.11.2025
Change comment:
There is no comment for this version
Summary
-
Page properties (1 modified, 0 added, 0 removed)
Details
- Page properties
-
- Content
-
... ... @@ -1,20 +4,7 @@ 1 -{{layout}} 2 -{{layout-section ac:type="single"}} 3 -{{layout-cell}} 4 4 **Application examples of expert rules** 5 5 6 6 In the following, you will find examples of how to use the expert syntax. 7 -{{/layout-cell}} 8 -{{/layout-section}} 9 9 10 -{{layout-section ac:type="single"}} 11 -{{layout-cell}} 12 - 13 -{{/layout-cell}} 14 -{{/layout-section}} 15 - 16 -{{layout-section ac:type="single"}} 17 -{{layout-cell}} 18 18 **Typical application examples** 19 19 20 20 {{expand title="Make individual content elements in a public course only visible to registered users ..."}} ... ... @@ -24,324 +24,45 @@ 24 24 isGuest(0)=false 25 25 {{/code}} 26 26 27 -(% class="wrapped" %) 28 28 |=((( 29 29 Configuration in the course editor 30 30 )))|((( 31 -(% class="content-wrapper" %) 32 -((( 33 33 [[image:attach:Kurseditor - Konfiguration nur registrierte Nutzer_de.png||data-xwiki-image-style="img-screen" data-xwiki-image-style-border="true" width="500"]] 34 34 ))) 35 -))) 36 36 |=((( 37 37 Course view as a registered user 38 38 )))|((( 39 -(% class="content-wrapper" %) 40 -((( 41 41 [[image:attach:Kursrun - Ansicht registrierte Nutzer_de.png||data-xwiki-image-style="img-screen" data-xwiki-image-style-border="true" width="500"]] 42 42 ))) 43 -))) 44 44 |=((( 45 45 Course view as a guest user 46 46 )))|((( 47 -(% class="content-wrapper" %) 48 -((( 49 49 [[image:attach:Kurseditor - Konfiguration nicht für Gäste_de.png||data-xwiki-image-style="img-screen" data-xwiki-image-style-border="true" width="500"]] 50 50 ))) 51 -))) 52 52 |=((( 53 53 Course view as a course owner 54 54 )))|((( 55 -(% class="content-wrapper" %) 56 -((( 57 57 [[image:attach:Kursrun - Ansicht Kursverantwortlicher_de.png||data-xwiki-image-style="img-screen" data-xwiki-image-style-border="true" width="500"]] 58 58 ))) 59 -))) 60 60 {{/expand}} 61 61 62 -{{expand title="Make individual content elements in a public course only visible to guests ..."}} 63 -Do you wish to display certain content elements in a public course only to guests and course owners? Then enter the following code into the text field next to Expert mode in the Visibility tab of the corresponding course element. This will display the course element in a publicly accessible course only to guest users and course owners. 64 64 65 -{{code}} 66 -isGuest(0)=true |isCourseAdministrator(0) 67 -{{/code}} 68 68 69 -(% class="wrapped" %) 70 -|=((( 71 -Configuration in the course editor 72 -)))|((( 73 -(% class="content-wrapper" %) 74 -((( 75 -[[image:attach:Kurseditor - Konfiguration keine Gäste_de.png||data-xwiki-image-style="img-screen" data-xwiki-image-style-border="true" width="500"]] 76 -))) 77 -))) 78 -|=((( 79 -Course view as a registered user 80 -)))|((( 81 -(% class="content-wrapper" %) 82 -((( 83 -[[image:attach:Kursansicht - nicht für registrierte Nutzer_de.png||data-xwiki-image-style="img-screen" data-xwiki-image-style-border="true" width="500"]] 84 -))) 85 -))) 86 -|=((( 87 -Course view as a guest user 88 -)))|((( 89 -(% class="content-wrapper" %) 90 -((( 91 -[[image:attach:Kursrun - Ansicht nur Gäste_de.png||data-xwiki-image-style="img-screen" data-xwiki-image-style-border="true" width="500"]] 92 -))) 93 -))) 94 -|=((( 95 -Course view as a course owner 96 -)))|((( 97 -(% class="content-wrapper" %) 98 -((( 99 -[[image:attach:Kursrun - Ansicht Kursverantwortlicher_de.png||data-xwiki-image-style="img-screen" data-xwiki-image-style-border="true" width="500"]] 100 -))) 101 -))) 102 -{{/expand}} 103 -{{/layout-cell}} 104 -{{/layout-section}} 105 105 106 -{{layout-section ac:type="single"}} 107 -{{layout-cell}} 108 -{{expand title="Activate course elements according to test result ..."}} 109 -Do you wish to activate certain course elements depending on a test? For instructions on how to implement this scenario, see the help page [[Learning path control by test result>>doc:LMS.BenutzerhandbuchOPAL.Lehren.Leitfäden.Lernwegsteuerung nach Testergebnis.WebHome]]. 110 -{{/expand}} 111 -{{/layout-cell}} 112 -{{/layout-section}} 113 113 114 -{{layout-section ac:type="single"}} 115 -{{layout-cell}} 116 -{{expand title="Further application examples of the expert syntax ..."}} 117 -{{info}} 118 -(% class="box infomessage box infomessage" %)In addition to the general examples, which can be used institution-independently, there are also institution-specific restrictions on data that will be transmitted depending on the institution. 119 119 120 -(% class="box infomessage box infomessage" %)For OPAL users, the help page [[Overview of OPAL Shibboleth>>doc:LMS.BenutzerhandbuchOPAL.Administration.OPAL Shibboleth Attribute.WebHome]] attributes contains all currently usable institution-specific attributes of Saxon institutions. 121 -{{/info}} 122 122 123 -(% class="wrapped" %) 124 -|=((( 125 -(% style="color:#3f4444" %)Examples of rules in the tabs //«//Visibility// », « //Access// », //and //« //Points// » //(structure element) 126 -)))|=((( 127 -Effects 128 -))) 129 -|((( 130 -(% class="TableParagraph" %) 131 -isGuest(0)=true 132 -)))|((( 133 -(% class="TableParagraph" %) 134 -If this code is entered in the Visibility tab, the course element will only be visible to guests, but not to registered users. 135 135 136 -(% class="TableParagraph" %) 137 -If this code is entered in the Access tab, only guests will have access to this course element. 138 138 139 -(% class="TableParagraph" %) 140 -Alternatively, the code isGuest(0) or isGuest (0)=1 can be used. 141 -))) 142 -|(% colspan="1" %)(% colspan="1" %) 143 -((( 144 -isGuest(0)=false 145 -)))|(% colspan="1" %)(% colspan="1" %) 146 -((( 147 -If this code is entered in the Visibility tab, the course element will be hidden from guests. 148 148 149 -If this code is entered in the Access tab, guests will not have access to the course element's contents. 150 -))) 151 -|((( 152 -(% class="TableParagraph" %) 153 -inLearningGroup("Beginners") = false 154 -)))|((( 155 -(% class="TableParagraph" %) 156 -With the exception of the «Beginners» group//,// the course element will be visible to all course participants. 157 -))) 158 -|((( 159 -(% class="TableParagraph" %) 160 -(now >= date("22.03.2017 12:00")) & (now <= date("23.08.2017 18:00")) | inLearningGroup("Supervisors") 161 -)))|((( 162 -(% class="TableParagraph" %) 163 -The course element will be visible to all course participants from 22.03.2017 to 23.08.2017. For the members of the «Supervisors» learning group//, //in contrast, it will be visible// //at any time//.// 164 -))) 165 -|((( 166 -(% class="TableParagraph" %) 167 -(now >= date("03.09.2017 00:00")) & (now <= date("13.10.2017 00:00")) & inRightGroup("Assessors")| isUser("Author") 168 -)))|((( 169 -(% class="TableParagraph" %) 170 -The course element will be visible to all course participants of the «Assessors» right group from 03.09.2017 to 13.10.2017. For the user with the user name «Author»//, //in contrast, it will be visible at any time. 171 -))) 172 -|(% colspan="1" %)(% colspan="1" %) 173 -((( 174 -(% class="TableParagraph" %) 175 -isInAttribute("surname","Mue") 176 -)))|(% colspan="1" %)(% colspan="1" %) 177 -((( 178 -(% class="TableParagraph" %) 179 -Returns TRUE for all users whose «surname» attribute contains// //the letter sequence "Mue". For example, it returns TRUE for the value "Mueller" or "Muehlebacher". 180 -))) 181 -|(% colspan="1" %)(% colspan="1" %) 182 -((( 183 -(% class="TableParagraph" %) 184 -(getUserProperty("orgUnit") = "Marketing") 185 -)))|(% colspan="1" %)(% colspan="1" %) 186 -((( 187 -(% class="TableParagraph" %) 188 -Checks whether a person is in the "Marketing" organisation unit. This is useful, for example, if the data is automatically transferred from LDAP. 189 -))) 190 -|(% colspan="1" %)(% colspan="1" %) 191 -((( 192 -(% class="TableParagraph" %) 193 -(getPassed("69742969114730") | getPassed("69742969115733") | getPassed("69742969118009")) * 10 194 -)))|(% colspan="1" %)(% colspan="1" %) 195 -((( 196 -(% class="TableParagraph" %) 197 -This rule can be set in the «Points» tab -> «Process points» of the Structure course element. The Structure course element shows 10 points if any of the tests (course element IDs "69742969114730", "69742969115733", or "69742969118009") will be passed, otherwise it shows 0 points. 198 -))) 199 -|(% colspan="1" %)(% colspan="1" %) 200 -((( 201 -(getScore("69742969114730") + getScore("69742969115733") + getScore("69742969118009")) >= 140 | getPassed("69978845384688") 202 -)))|(% colspan="1" %)(% colspan="1" %) 203 -((( 204 -(% class="TableParagraph" %) 205 -This rule can be set in the «Points» tab -> 206 206 207 -«Passed if» of the Structure course element. The Structure course element// //shows "passed" if a minimum of 140 points will be achieved across all tests or if «passed» will be manually set (Assessment course element// //with the ID "69978845384688"). 208 -))) 209 -|(% colspan="1" %)(% colspan="1" %) 210 -((( 211 -(% class="TableParagraph" %) 212 -getAttempts("70323786958847") > 0 213 -)))|(% colspan="1" %)(% colspan="1" %) 214 -((( 215 -(% class="TableParagraph" %) 216 -Returns TRUE as soon as the course participant has completed the test with the specified ID for the first time. 217 -))) 218 -|((( 219 -(% class="TableParagraph" %) 220 -getAttempts("70323524635734") <= 3 221 -)))|((( 222 -(% class="TableParagraph" %) 223 -Returns FALSE as soon as the course participant has saved more than 3 files to the drop box of the Task course element. 224 -))) 225 -|((( 226 -(% class="TableParagraph" %) 227 -getInitialEnrollmentDate("70323786958847") <= date("26.5.2017 18:00") 228 -)))|((( 229 -(% class="TableParagraph" %) 230 -Returns TRUE for those course participants who enrolled in one of the available groups via the Enrolment course element using a specified ID before 6 p.m. on May 26 2017. 231 -))) 232 -|(% colspan="1" %)(% colspan="1" %) 233 -((( 234 -(% class="TableParagraph" %) 235 -getInitialEnrollmentDate("70323786958847") + 2h > now 236 -)))|(% colspan="1" %)(% colspan="1" %) 237 -((( 238 -(% class="TableParagraph" %) 239 -Returns TRUE within two hours from the time of enrolment for those course participants who enrolled in one of the available groups via the Enrolment course element using a specified ID. In this way, it can be ensured that each course participant can only e.g. process a script during a certain period of time. 240 -))) 241 -|(% colspan="1" %)(% colspan="1" %) 242 -((( 243 -(% class="TableParagraph" %) 244 -(getInitialCourseLaunchDate(0) >= never) | (getInitialCourseLaunchDate(0) + 2h > now) 245 -)))|(% colspan="1" %)(% colspan="1" %) 246 -((( 247 -(% class="TableParagraph" %) 248 -Returns TRUE if the course participant has not yet visited the course, or during the first two hours of the first course visit. In this way, it can be ensured that each course participant can only see the course for a certain period of time. 249 -))) 250 -|(% colspan="1" %)(% colspan="1" %) 251 -((( 252 -(% class="TableParagraph" %) 253 -(getRecentCourseLaunchDate(0) + 10min) > now 254 -)))|(% colspan="1" %)(% colspan="1" %) 255 -((( 256 -(% class="TableParagraph" %) 257 -Returns TRUE if the user has been active in the course for more than 10 minutes. 258 -))) 259 -|((( 260 -(% class="TableParagraph" %) 261 -getOnyxTestOutcome("84692289655276","SCORE") >= 10 262 -)))|((( 263 -(% class="TableParagraph" %) 264 -Returns TRUE if the user has reached at least 10 points. 265 -))) 266 -|((( 267 -(% class="TableParagraph" %) 268 -getOnyxTestOutcomeZK("84389429397045","PASS") ="true" 269 -)))|((( 270 -(% class="TableParagraph" %) 271 -Returns TRUE if the user has passed the test. 272 -))) 273 -|((( 274 -(% class="TableParagraph" %) 275 -getMark("84692289655276") > 4 276 -)))|((( 277 -(% class="TableParagraph" %) 278 -Returns TRUE if the user's mark for the specified course element is better than 4. 279 -))) 280 -|(% colspan="1" %)(% colspan="1" %) 281 -((( 282 -getProgress("69742969114730")>=100 283 -)))|(% colspan="1" %)(% colspan="1" %) 284 -((( 285 -Returns TRUE if the user has completed the specified course element (course progress). 286 -))) 287 287 288 -{{note title="Attention!"}} 289 -Please note that the above-mentioned course element IDs are just examples. When you create a course, you need to reference the IDs of your own courses. 290 -{{/note}} 291 -{{/expand}} 292 -{{/layout-cell}} 293 -{{/layout-section}} 294 294 295 -{{layout-section ac:type="single"}} 296 -{{layout-cell}} 297 -**Expert syntax** 298 298 299 -{{expand title="Overview of the available expert syntax ..."}} 300 -(% class="wrapped" %) 301 -|=((( 302 -Type 303 -)))|=((( 304 -Syntax 305 -)))|=((( 306 -Description 307 -))) 308 -|(% rowspan="2" %)(% rowspan="2" %) 309 -((( 310 -(% class="TableParagraph" %) 311 -**Constants** 312 -)))|((( 313 -(% class="TableParagraph" %) 314 -//TRUE //or //1// 315 -)))|((( 316 -(% class="TableParagraph" %) 317 -True 318 -))) 319 -|((( 320 -(% class="TableParagraph" %) 321 -//FALSE //or //0// 322 -)))|((( 323 -(% class="TableParagraph" %) 324 -False 325 -))) 326 -|((( 327 -(% class="TableParagraph" %) 328 -**Variable** 329 -)))|((( 330 -(% class="TableParagraph" %) 331 -//now// 332 -)))|((( 333 -(% class="TableParagraph" %) 334 -Current server system time 335 -))) 336 -|(% rowspan="37" %)(% rowspan="37" %) 337 -((( 338 -(% class="TableParagraph" %) 339 -**Functions** 340 340 341 341 342 342 343 343 344 -\\ 345 345 346 346 347 347 ... ... @@ -358,7 +358,6 @@ 358 358 359 359 360 360 361 -\\ 362 362 363 363 364 364 ... ... @@ -373,7 +373,6 @@ 373 373 374 374 375 375 376 -\\\\ 377 377 378 378 379 379 ... ... @@ -393,7 +393,6 @@ 393 393 394 394 395 395 396 -\\ 397 397 398 398 399 399 ... ... @@ -465,7 +465,6 @@ 465 465 466 466 467 467 468 -\\ 469 469 470 470 471 471 ... ... @@ -497,7 +497,6 @@ 497 497 498 498 499 499 500 -\\ 501 501 502 502 503 503 ... ... @@ -516,24 +516,7 @@ 516 516 517 517 518 518 519 - 520 - 521 - 522 - 523 - 524 - 525 - 526 - 527 - 528 - 529 - 530 - 531 - 532 - 533 - 534 - 535 - 536 -\\ 222 + 537 537 )))|((( 538 538 (% class="TableParagraph" %) 539 539 //date("[date]")// ... ... @@ -908,7 +908,7 @@ 908 908 909 909 910 910 911 - \\\\\\\\597 + 912 912 )))|(% colspan="1" %)(% colspan="1" %) 913 913 ((( 914 914 (% class="TableParagraph" %) ... ... @@ -1007,8 +1007,5 @@ 1007 1007 )))|((( 1008 1008 (% class="TableParagraph" %) 1009 1009 Logical NOT 1010 -))) 1011 -{{/expand}} 1012 -{{/layout-cell}} 1013 -{{/layout-section}} 1014 -{{/layout}} 696 +))){{/expand}} 697 +