}
            }
        }
    }
}
$nbdates = count($dates);

// Process actions if any
if ('export' == $action) {
    export_spreadsheet($dates, $format, true);
    exit;
}

// format the session and dates to only show one booking where they span multiple dates
// i.e. multiple days startdate = firstday, finishdate = last day
$groupeddates = group_session_dates($dates);

$pagetitle = format_string(get_string('facetoface', 'facetoface') . ' ' . get_string('sessions', 'block_facetoface'));
$PAGE->navbar->add($pagetitle);
$PAGE->set_title($pagetitle);
$PAGE->set_heading($SITE->fullname);
$PAGE->set_url('/blocks/facetoface/mysessions.php');
$PAGE->set_pagelayout('standard');

echo $OUTPUT->header();
echo $OUTPUT->box_start();

// show tabs
$currenttab = 'attendees';
include_once('tabs.php');
Example #2
0
                                  JOIN {facetoface_sessions} s ON s.id = d.sessionid
                                  JOIN {facetoface} f ON f.id = s.facetoface
                                  JOIN {facetoface_signups} su ON su.sessionid = s.id
                                  JOIN {facetoface_signups_status} ss ON su.id = ss.signupid AND ss.superceded = 0
                                  JOIN {course} c ON f.course = c.id
                                 WHERE d.timestart >= ? AND d.timefinish <= ? AND
                                       su.userid = ?", array($startdate, $enddate, $user->id));

    $show_location = add_location_info($signups);
}

// format the session and dates to only show one booking where they span multiple dates
// i.e. multiple days startdate = firstday, finishdate = last day
$groupeddates = array();
if ($signups and count($signups > 0)) {
    $groupeddates = group_session_dates($signups);
}

// out of the results separate out the future sessions
$futuresessions = future_session_dates($groupeddates);
$nbfuture = 0;
if ($futuresessions and count($futuresessions) > 0) {
    $nbfuture = count($futuresessions);
}

// and the past sessions
$pastsessions = past_session_dates($groupeddates);
$nbpast = 0;
if ($pastsessions and count($pastsessions) > 0) {
    $nbpast = count($pastsessions);
}