Wiki source code of Expertenregeln zur Prüfung von Nutzerrolle und Guppenzugehörigkeit
Last modified by Carina Enke on 19.01.2024
Show last authors
| author | version | line-number | content |
|---|---|---|---|
| 1 | {{layout}} | ||
| 2 | {{layout-section ac:type="two_right_sidebar"}} | ||
| 3 | {{layout-cell}} | ||
| 4 | By using expert rules, you can control the visibility and the access to course elements by evaluating the user role or group membership. To do this, use the expert rules **is**[AttrName]() and **in**[AttrName](). | ||
| 5 | |||
| 6 | {{info}} | ||
| 7 | All of the following example rules can be created for both the visibility and access of a course element. For matters of simplicity, the following examples only describe one scenario at a time. 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 | {{panel title="Inhalt"}} | ||
| 13 | {{toc minLevel="2"/}} | ||
| 14 | |||
| 15 | **Related Topics** | ||
| 16 | |||
| 17 | * Further [[application examples for expert rules>>doc:LMS.Benutzerhandbuch OPAL.Lehren.Kurs.Freigabe von Kursen und Kursinhalten.Expertenmodus zur Freigabe innerhalb von Kursen.Anwendungsbeispiele zu Expertenregeln.WebHome]] | ||
| 18 | * List of the complete [[Expertensyntax>>doc:LMS.Benutzerhandbuch OPAL.Lehren.Kurs.Freigabe von Kursen und Kursinhalten.Expertenmodus zur Freigabe innerhalb von Kursen.Expertensyntax.WebHome]] | ||
| 19 | {{/panel}} | ||
| 20 | {{/layout-cell}} | ||
| 21 | {{/layout-section}} | ||
| 22 | |||
| 23 | {{layout-section ac:type="single"}} | ||
| 24 | {{layout-cell}} | ||
| 25 | == Checking for user role == | ||
| 26 | |||
| 27 | The following role attributes are available in the learning platform and can be used for expert rules: | ||
| 28 | |||
| 29 | (% class="wrapped" %) | ||
| 30 | |=(% colspan="1" %)(% colspan="1" %) | ||
| 31 | ((( | ||
| 32 | Attribute | ||
| 33 | )))|=(% colspan="1" %)(% colspan="1" %) | ||
| 34 | ((( | ||
| 35 | User with | ||
| 36 | ))) | ||
| 37 | |=(% colspan="1" %)(% colspan="1" %) | ||
| 38 | ((( | ||
| 39 | GlobalAuthor | ||
| 40 | )))|(% colspan="1" %)(% colspan="1" %) | ||
| 41 | ((( | ||
| 42 | Role Author | ||
| 43 | ))) | ||
| 44 | |=(% colspan="1" %)(% colspan="1" %) | ||
| 45 | ((( | ||
| 46 | Guest | ||
| 47 | )))|(% colspan="1" %)(% colspan="1" %) | ||
| 48 | ((( | ||
| 49 | Role Guest | ||
| 50 | ))) | ||
| 51 | |=((( | ||
| 52 | ExternalUser | ||
| 53 | )))|((( | ||
| 54 | Role Externer Nutzer | ||
| 55 | ))) | ||
| 56 | |||
| 57 | (% id="HExamplesofUse" class="auto-cursor-target" %) | ||
| 58 | === Examples of Use === | ||
| 59 | |||
| 60 | (% class="relative-table wrapped" style="width:100.0%" %) | ||
| 61 | |=(% colspan="1" %)(% colspan="1" %) | ||
| 62 | ((( | ||
| 63 | Syntax in general | ||
| 64 | )))|=(% colspan="1" %)(% colspan="1" %) | ||
| 65 | ((( | ||
| 66 | Entry | ||
| 67 | )))|=(% colspan="1" %)(% colspan="1" %) | ||
| 68 | ((( | ||
| 69 | Result of this rule | ||
| 70 | ))) | ||
| 71 | |(% rowspan="3" %)(% rowspan="3" %) | ||
| 72 | ((( | ||
| 73 | //is[AttrName]()// | ||
| 74 | )))|(% colspan="1" %)(% colspan="1" %) | ||
| 75 | ((( | ||
| 76 | (% class="auto-cursor-target" %) | ||
| 77 | isGuest()=false | ||
| 78 | |||
| 79 | //Alternativ: !isGuest()// | ||
| 80 | )))|(% colspan="1" %)(% colspan="1" %) | ||
| 81 | ((( | ||
| 82 | If an entry is made in the Access tab, guests will not have access to this course element. | ||
| 83 | ))) | ||
| 84 | |(% colspan="1" %)(% colspan="1" %) | ||
| 85 | ((( | ||
| 86 | (% class="content-wrapper" %) | ||
| 87 | ((( | ||
| 88 | isGuest() | ||
| 89 | |||
| 90 | //Alternativ: isGuest()=true oder isGuest()=1// | ||
| 91 | ))) | ||
| 92 | )))|((( | ||
| 93 | If an entry is made in the Visibility tab, only guests will see this course element, while all the registered users will not. | ||
| 94 | ))) | ||
| 95 | |(% colspan="1" %)(% colspan="1" %) | ||
| 96 | ((( | ||
| 97 | isGuest() or isCourseAdministrator() | ||
| 98 | )))|(% colspan="1" %)(% colspan="1" %) | ||
| 99 | ((( | ||
| 100 | If an entry is made in the Visibility tab, only guests and course owners will see the course element. | ||
| 101 | ))) | ||
| 102 | |||
| 103 | {{info}} | ||
| 104 | Further details on the guest scenario with sample images of the course view for each user role can be found here: (% class="plugin_pagetree_children_span" %)[[Controlling based on the guest role>>doc:LMS.Benutzerhandbuch OPAL.Lehren.Kurs.Freigabe von Kursen und Kursinhalten.Expertenmodus zur Freigabe innerhalb von Kursen.Anwendungsbeispiele zu Expertenregeln.Expertenregeln zur Prüfung von Nutzerrolle und Guppenzugehörigkeit.Steuerung auf Basis der Gastrolle.WebHome]] | ||
| 105 | {{/info}} | ||
| 106 | {{/layout-cell}} | ||
| 107 | {{/layout-section}} | ||
| 108 | |||
| 109 | {{layout-section ac:type="single"}} | ||
| 110 | {{layout-cell}} | ||
| 111 | |||
| 112 | {{/layout-cell}} | ||
| 113 | {{/layout-section}} | ||
| 114 | |||
| 115 | {{layout-section ac:type="single"}} | ||
| 116 | {{layout-cell}} | ||
| 117 | (% id="HCheckingforgroupmembership" class="auto-cursor-target" %) | ||
| 118 | == Checking for group membership == | ||
| 119 | |||
| 120 | (% class="auto-cursor-target" %) | ||
| 121 | The following memberships of a user in connection with a course can be used for expert rules: | ||
| 122 | |||
| 123 | (% class="wrapped" %) | ||
| 124 | |=(% colspan="1" %)(% colspan="1" %) | ||
| 125 | ((( | ||
| 126 | Attribute | ||
| 127 | )))|=(% colspan="1" %)(% colspan="1" %) | ||
| 128 | ((( | ||
| 129 | User is a member | ||
| 130 | ))) | ||
| 131 | |=(% colspan="1" %)(% colspan="1" %) | ||
| 132 | ((( | ||
| 133 | LearningGroup | ||
| 134 | )))|(% colspan="1" %)(% colspan="1" %) | ||
| 135 | ((( | ||
| 136 | of a learning group | ||
| 137 | ))) | ||
| 138 | |=(% colspan="1" %)(% colspan="1" %) | ||
| 139 | ((( | ||
| 140 | LearningArea | ||
| 141 | )))|(% colspan="1" %)(% colspan="1" %) | ||
| 142 | ((( | ||
| 143 | of a learning area | ||
| 144 | ))) | ||
| 145 | |=(% colspan="1" %)(% colspan="1" %) | ||
| 146 | ((( | ||
| 147 | LearningGroupWaitingList | ||
| 148 | |||
| 149 | LearningAreaWaitingList | ||
| 150 | )))|(% colspan="1" %)(% colspan="1" %) | ||
| 151 | ((( | ||
| 152 | of the waiting list of a learning group or learning area | ||
| 153 | ))) | ||
| 154 | |=(% colspan="1" %)(% colspan="1" %) | ||
| 155 | ((( | ||
| 156 | CourseAdministrator | ||
| 157 | )))|(% colspan="1" %)(% colspan="1" %) | ||
| 158 | ((( | ||
| 159 | of the course owners | ||
| 160 | ))) | ||
| 161 | |=(% colspan="1" %)(% colspan="1" %) | ||
| 162 | ((( | ||
| 163 | CourseCoach | ||
| 164 | )))|(% colspan="1" %)(% colspan="1" %) | ||
| 165 | ((( | ||
| 166 | of the learning group tutor | ||
| 167 | ))) | ||
| 168 | |=(% colspan="1" %)(% colspan="1" %) | ||
| 169 | ((( | ||
| 170 | RightGroup | ||
| 171 | )))|(% colspan="1" %)(% colspan="1" %) | ||
| 172 | ((( | ||
| 173 | of a rights group | ||
| 174 | ))) | ||
| 175 | |||
| 176 | (% id="HExamplesofUse-1" class="auto-cursor-target" %) | ||
| 177 | === Examples of Use === | ||
| 178 | |||
| 179 | (% class="relative-table wrapped" style="width:100.0%" %) | ||
| 180 | |=(% colspan="1" %)(% colspan="1" %) | ||
| 181 | ((( | ||
| 182 | Syntax in general | ||
| 183 | )))|=(% colspan="1" %)(% colspan="1" %) | ||
| 184 | ((( | ||
| 185 | Example of an expert rule | ||
| 186 | )))|=(% colspan="1" %)(% colspan="1" %) | ||
| 187 | ((( | ||
| 188 | Result of this rule | ||
| 189 | ))) | ||
| 190 | |(% rowspan="2" %)(% rowspan="2" %) | ||
| 191 | ((( | ||
| 192 | //inLearningGroup("//[string]//")// | ||
| 193 | )))|(% colspan="1" %)(% colspan="1" %) | ||
| 194 | ((( | ||
| 195 | (% class="content-wrapper" %) | ||
| 196 | ((( | ||
| 197 | inLearningGroup("Beginner")= false | ||
| 198 | |||
| 199 | //Alternativ: !inLearningGroup("Beginner")// | ||
| 200 | ))) | ||
| 201 | )))|((( | ||
| 202 | 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. | ||
| 203 | ))) | ||
| 204 | |(% colspan="1" %)(% colspan="1" %) | ||
| 205 | ((( | ||
| 206 | (% class="content-wrapper" %) | ||
| 207 | ((( | ||
| 208 | (% class="auto-cursor-target" %) | ||
| 209 | inLearningGroup("Internal") | ||
| 210 | ))) | ||
| 211 | )))|(% colspan="1" %)(% colspan="1" %) | ||
| 212 | ((( | ||
| 213 | 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. | ||
| 214 | ))) | ||
| 215 | |(% colspan="1" %)(% colspan="1" %) | ||
| 216 | ((( | ||
| 217 | //(now >= date("tt.mm.yyy hh:mm")) and (now <= date("tt.mm.yyy hh:mm")) or inLearningGroup("[string]")// | ||
| 218 | )))|(% colspan="1" %)(% colspan="1" %) | ||
| 219 | ((( | ||
| 220 | (% class="content-wrapper" %) | ||
| 221 | ((( | ||
| 222 | (now >= date("22.03.2020 12:00")) and (now <= date("23.08.2020 18:00")) or inLearningGroup("Tutor") | ||
| 223 | ))) | ||
| 224 | )))|((( | ||
| 225 | 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. | ||
| 226 | ))) | ||
| 227 | |(% colspan="1" %)(% colspan="1" %) | ||
| 228 | ((( | ||
| 229 | //(now >= date("tt.mm.yyy hh:mm")) and (now <= date("tt.mm.yyy hh:mm")) or inRightGroup("[string]") or isUser("[string]")// | ||
| 230 | )))|(% colspan="1" %)(% colspan="1" %) | ||
| 231 | ((( | ||
| 232 | (% class="content-wrapper" %) | ||
| 233 | ((( | ||
| 234 | (% class="auto-cursor-target" %) | ||
| 235 | (now >= date("03.09.2020 00:00")) and (now <= date("13.10.2020 00:00")) and inRightGroup("Assessors")or isUser("Natalie") | ||
| 236 | ))) | ||
| 237 | )))|((( | ||
| 238 | 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. | ||
| 239 | ))) | ||
| 240 | {{/layout-cell}} | ||
| 241 | {{/layout-section}} | ||
| 242 | |||
| 243 | {{layout-section ac:type="single"}} | ||
| 244 | {{layout-cell}} | ||
| 245 | Create additional rules by using expert syntax. A tabular overview is provided on the page [[Expertensyntax>>doc:LMS.Benutzerhandbuch OPAL.Lehren.Kurs.Freigabe von Kursen und Kursinhalten.Expertenmodus zur Freigabe innerhalb von Kursen.Expertensyntax.WebHome]]. | ||
| 246 | {{/layout-cell}} | ||
| 247 | {{/layout-section}} | ||
| 248 | {{/layout}} |