-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathblock_facetoface.php
34 lines (26 loc) · 1.32 KB
/
block_facetoface.php
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
<?php
class block_facetoface extends block_base {
function init() {
$this->title = get_string('formaltitle', 'block_facetoface');
$this->version = 2009120400;
}
function get_content() {
global $CFG;
if ($this->content !== NULL) {
return $this->content;
}
$this->content = new stdClass;
$this->content->footer = '';
$timenow = time();
$startyear = strftime('%Y', $timenow);
$startmonth = strftime('%m', $timenow);
$startday = strftime('%d', $timenow);
$this->content->text = '';
$this->content->text .= "<ul>\n";
$this->content->text .= '<li><a href="'.$CFG->wwwroot.'/blocks/facetoface/mysignups.php">'.get_string('mybookings', 'block_facetoface')."</a></li>\n";
$this->content->text .= '<li><a href="'.$CFG->wwwroot.'/blocks/facetoface/mysessions.php">'.get_string('upcomingsessions', 'block_facetoface')."</a></li>\n";
$this->content->text .= '<li><a href="'.$CFG->wwwroot.'/blocks/facetoface/mysessions.php?startday='.$startday.'&startmonth='.$startmonth.'&startyear='.$startyear.'&endday=1&endmonth=1&endyear=2020">'.get_string('allfuturesessions', 'block_facetoface')."</a></li>\n";
$this->content->text .= "</ul>\n";
return $this->content;
}
}