61
61
$ now = time ();
62
62
$ startTime = strtotime ($ item ['start ' ]);
63
63
$ endTime = strtotime ($ item ['start ' ]) + $ item ['duration ' ] / 1000 ;
64
- $ live = $ now < $ endTime ;
65
- $ isOnAir = $ startTime <= $ now && $ now <= $ endTime ;
66
-
67
- /* today and the next full 7 days */ ;
68
- $ isUpcoming = $ startTime <= (strtotime ("tomorrow " ) + 7 * 24 * 60 * 60 );
69
- if ($ live && !$ isUpcoming ) {
70
- continue ;
71
- }
72
64
?>
73
65
74
66
<? $ image = $ item ['presentation_preview ' ]; ?>
@@ -97,28 +89,20 @@ class="<?= ($item['visibility'] != 'false') ? 'oce_item' : 'hidden_ocvideodiv oc
97
89
data-src="<?= $ image ?> " height="200"
98
90
style="filter: grayscale(100%);">
99
91
</span>
100
- <? elseif ($ mayWatchEpisodes && (! $ live || $ isOnAir ) ) : ?>
92
+ <? elseif ($ mayWatchEpisodes ) : ?>
101
93
<a href="<?= $ video_url . $ item ['id ' ] ?> " target="_blank">
102
94
<span class="previewimage">
103
95
<img class="previewimage <?= $ item ['visibility ' ] == 'false ' ? 'ocinvisible ' : '' ?> "
104
96
data-src="<?= $ image ?> " height="200">
105
97
106
- <? if ($ live ) : ?>
107
- <img class="livebutton"
108
- src="<?= $ plugin ->getPluginURL () . '/images/live.svg ' ?> ">
109
- <? else : ?>
110
- <img class="playbutton"
111
- src="<?= $ plugin ->getPluginURL () . '/images/play.svg ' ?> ">
112
- <? endif ?>
98
+ <img class="playbutton"
99
+ src="<?= $ plugin ->getPluginURL () . '/images/play.svg ' ?> ">
113
100
</span>
114
101
</a>
115
102
<? else : ?>
116
103
<span class="previewimage">
117
104
<img class="previewimage <?= $ item ['visibility ' ] == 'false ' ? 'ocinvisible ' : '' ?> "
118
105
data-src="<?= $ image ?> " height="200">
119
- <? if ($ live ) : ?>
120
- <img class="livebutton disabled" src="<?= $ plugin ->getPluginURL () . '/images/live.svg ' ?> " style="filter: grayscale(100%);">
121
- <? endif ?>
122
106
</span>
123
107
<? endif ?>
124
108
</div>
@@ -138,17 +122,8 @@ class="<?= ($item['visibility'] != 'false') ? 'oce_item' : 'hidden_ocvideodiv oc
138
122
</h2>
139
123
<ul class="oce_contentlist">
140
124
<li class="oce_list_date">
141
- <? if ($ live ) : ?>
142
- <h3>
143
- <?= sprintf ($ _ ('Dies ist ein Livestream! Geplant: %s - %s Uhr ' ),
144
- date ("d.m.Y H:i " , strtotime ($ item ['start ' ])),
145
- date ('H:i ' , strtotime ($ item ['start ' ]) + ($ item ['duration ' ] / 1000 ))
146
- ) ?>
147
- </h3>
148
- <? else : ?>
149
- <?= $ _ ('Aufnahmezeitpunkt ' ) ?> :
150
- <?= date ("d.m.Y H:i " , strtotime ($ item ['start ' ])) ?> <?= $ _ ("Uhr " ) ?>
151
- <? endif ?>
125
+ <?= $ _ ('Aufnahmezeitpunkt ' ) ?> :
126
+ <?= date ("d.m.Y H:i " , strtotime ($ item ['start ' ])) ?> <?= $ _ ("Uhr " ) ?>
152
127
</li>
153
128
<li>
154
129
<?= $ _ ('Vortragende: ' ) ?>
@@ -180,15 +155,15 @@ class="<?= ($item['visibility'] != 'false') ? 'oce_item' : 'hidden_ocvideodiv oc
180
155
<? URLHelper::setBaseURL ($ base ); ?>
181
156
182
157
<? if (OCPerm::editAllowed ($ course_id )) : ?>
183
- <?= $ live ? '' : Studip \LinkButton::create ($ _ ($ visibility_text [$ item ['visibility ' ]] ?: $ _ ('Unbekannte Sichtbarkeit ' )),
158
+ <?= Studip \LinkButton::create ($ _ ($ visibility_text [$ item ['visibility ' ]] ?: $ _ ('Unbekannte Sichtbarkeit ' )),
184
159
'' , [
185
160
'class ' => 'oc-togglevis ocspecial oc ' . ($ item ['visibility ' ] ?: 'free ' ),
186
161
'data-episode-id ' => $ item ['id ' ],
187
162
'data-visibility ' => $ item ['visibility ' ] ?: 'invisible ' ,
188
163
'title ' => $ _ ('Sichtbarkeit für dieses Video ändern ' )
189
164
]); ?>
190
165
191
- <? if (! $ live && $ item ['has_previews ' ]) : ?>
166
+ <? if ($ item ['has_previews ' ]) : ?>
192
167
193
168
<?= Studip \LinkButton::create (
194
169
$ _ ('Schnitteditor öffnen ' ),
@@ -259,7 +234,7 @@ class="<?= ($item['visibility'] != 'false') ? 'oce_item' : 'hidden_ocvideodiv oc
259
234
260
235
261
236
<? if (OCPerm::editAllowed ($ course_id )) : ?>
262
- <?= $ live ? '' : Studip \LinkButton::create (
237
+ <?= Studip \LinkButton::create (
263
238
$ _ ('Entfernen ' ),
264
239
$ controller ->url_for ('course/remove_episode/ ' . get_ticket () . '/ ' . $ item ['id ' ]),
265
240
[
0 commit comments