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 (% class="auto-cursor-target" %)
5 Expert rules let you evaluate the enrollment date and thus control the visibility and the access to course sections. To do this, use the expert rules **getInitialEnrollmentDate**, **getRecentEnrollmentDate** and **getInitialCourseLaunchDate**.
6
7 (% class="box infomessage" %)
8 (((
9 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 couses (visibilty and access)>>doc:LMS.Benutzerhandbuch OPAL.Lehren.Kurs.Freigabe von Kursen und Kursinhalten.Freigabe innerhalb von Kursen Sichtbarkeit und Zugang.WebHome]].
10 )))
11 {{/layout-cell}}
12
13 {{layout-cell}}
14
15 {{/layout-cell}}
16 {{/layout-section}}
17
18 {{layout-section ac:type="single"}}
19 {{layout-cell}}
20 In all of the following examples, specific course elements are used. Before using these rules, note down the course element IDs of the relevant course elements for your scenario and adjust them accordingly in the expert rules.
21
22 {{info}}
23 (% class="auto-cursor-target" %)
24 Some of the following example rules check for a course element enrollment. For this purpose you can use getInitialEnrollmentDate, as long as only the first enrollment is to be considered, independently of a later deregistration from the course element. Alternatively, you can also use getRecentEnrollmentDate if each enrollment is to be re-evaluated. To simplify matters, only one scenario is described in each of the following examples.
25 {{/info}}
26
27 (% class="wrapped" %)
28 |=(% colspan="1" %)(% colspan="1" %)
29 (((
30 Syntax in General
31 )))|=(% colspan="1" %)(% colspan="1" %)
32 (((
33 Example of an expert rule
34 )))|=(% colspan="1" %)(% colspan="1" %)
35 (((
36 Result of this rule
37 )))
38 |(% rowspan="4" %)(% rowspan="4" %)
39 (((
40 //getInitialEnrollmentDate("//[integer]//")//
41 )))|(% colspan="1" %)(% colspan="1" %)
42 (((
43 getInitialEnrollmentDate("70323786958847") <= date("26.5.2020 18:00")
44 )))|(((
45 The access to a course element is possible depending on a **specific enrollment date**.
46
47 Course participants who got enrolled by means of a course element enrollment (course element ID "70323786958847") before May 26, 2020, 6 pm can use the course element.
48 )))
49 |(% colspan="1" %)(% colspan="1" %)
50 (((
51 getInitialEnrollmentDate("70323786958847") + 2h < now
52 )))|(% colspan="1" %)(% colspan="1" %)
53 (((
54 (% class="content-wrapper" %)
55 (((
56 Each course participant can see the course element **from a relative point in time**, e. g. only 2 hours after the enrollment (course element ID "70323786958847").
57 )))
58 )))
59 |(% colspan="1" %)(% colspan="1" %)
60 (((
61 getInitialEnrollmentDate("70323786958847") + 2h > now
62 )))|(% colspan="1" %)(% colspan="1" %)
63 (((
64 (% class="content-wrapper" %)
65 (((
66 Each course participant can only see the course element **up to a relative point in time**, e.g. only for the first 2 hours after the enrollment (course element ID "70323786958847").
67
68
69 )))
70
71 {{note}}
72 When using this rule, make sure that the visibility of the learning group is already limited by a higher level course element. Otherwise, if you only use this rule, non-enrolled users and guests will always have access to this course element.
73 {{/note}}
74 )))
75 |(% colspan="1" %)(% colspan="1" %)
76 (((
77 (getInitialEnrollmentDate("101524102434663") + 2h < now and getInitialEnrollmentDate("101524102434663") + 5h > now ) or isCourseCoach() or isCourseAdministrator()
78 )))|(((
79 (% class="content-wrapper" %)
80 (((
81 Each course participant can only see the course element **within a relative time period**, e. g. starting 2 hours prior to the enrollment (course element ID "70323786958847") until 5 hours after the enrollment. Course tutors are exempt from this restriction.
82 )))
83 )))
84 |(% colspan="1" %)(% colspan="1" %)
85 (((
86 //getInitialCourseLaunchDate()//
87 )))|(% colspan="1" %)(% colspan="1" %)
88 (((
89 (getInitialCourseLaunchDate() >= never) or (getInitialCourseLaunchDate() + 2h > now)
90 )))|(((
91 Each course participant can only see the course element **for a certain period of time** (during the first two hours of the first course visit).
92 )))
93 |(% colspan="1" %)(% colspan="1" %)
94 (((
95 //getInitialRecentCourseLaunchDate()//
96 )))|(% colspan="1" %)(% colspan="1" %)
97 (((
98 (getRecentCourseLaunchDate() + 10min) > now
99 )))|(((
100 The course element becomes only visible if the user has been active in the course **for more than 10 minutes**.
101 )))
102 {{/layout-cell}}
103 {{/layout-section}}
104
105 {{layout-section ac:type="single"}}
106 {{layout-cell}}
107 Create additional rules by using expert syntax. A tabular overview is provided on the page [[Expert Syntax>>doc:LMS.Benutzerhandbuch OPAL.Lehren.Kurs.Freigabe von Kursen und Kursinhalten.Expertenmodus zur Freigabe innerhalb von Kursen.Expertensyntax.WebHome||rel="nofollow" shape="rect"]].
108 {{/layout-cell}}
109 {{/layout-section}}
110 {{/layout}}