File tree 2 files changed +7
-27
lines changed
2 files changed +7
-27
lines changed Original file line number Diff line number Diff line change @@ -78,7 +78,7 @@ public function get_content() {
78
78
if ($ ismodeautomated ) {
79
79
$ this ->page ->requires ->js_call_amd ('block_evasys_sync/invite_manager ' , 'init ' );
80
80
} else {
81
- $ hasstandardtime = self ::getstandardtimemode ($ this ->page ->course ->category );
81
+ $ hasstandardtime = \ block_evasys_sync \evasys_synchronizer ::getstandardtimemode ($ this ->page ->course ->category );
82
82
$ this ->page ->requires ->js_call_amd ('block_evasys_sync/standardtime ' , 'init ' );
83
83
}
84
84
$ evasyssynchronizer = new \block_evasys_sync \evasys_synchronizer ($ this ->page ->course ->id );
@@ -272,31 +272,5 @@ public function applicable_formats() {
272
272
public function has_config () {
273
273
return true ;
274
274
}
275
-
276
- public static function getstandardtimemode ($ category ) {
277
- global $ DB ;
278
- $ mode = $ DB ->get_record ('block_evasys_sync_categories ' , array ('course_category ' => $ category ));
279
- if ($ mode !== false ) {
280
- if ($ mode ->standard_time_start != null ) {
281
- return array ('start ' => $ mode ->standard_time_start , 'end ' => $ mode ->standard_time_end );
282
- } else {
283
- return false ;
284
- }
285
- } else {
286
- $ parents = \core_course_category::get ($ category )->get_parents ();
287
- for ($ i = count ($ parents ) - 1 ; $ i >= 0 ; $ i --) {
288
- $ mode = $ DB ->get_record ('block_evasys_sync_categories ' , array ('course_category ' => $ parents [$ i ]));
289
- if ($ mode !== false ) {
290
- if ($ mode ->standard_time_start != null ) {
291
- return array ('start ' => $ mode ->standard_time_start , 'end ' => $ mode ->standard_time_end );
292
- } else {
293
- return false ;
294
- }
295
- }
296
- }
297
- }
298
- $ default = false ;
299
- return $ default ;
300
- }
301
275
}
302
276
Original file line number Diff line number Diff line change
1
+ { {!
2
+ @template block_evasys_sync/datetimepicker
3
+ Example context (json):
4
+ {
5
+ }
6
+ }}
1
7
{ {< block_evasys_sync/datetimepicker} }
2
8
{ {$id } }start{ {/id} }
3
9
{ {/block_evasys_sync/datetimepicker} }
You can’t perform that action at this time.
0 commit comments