Exemple #1
0
 public function export_results_action()
 {
     $sem_browse_obj = new SemBrowse();
     $tmpfile = basename($sem_browse_obj->create_result_xls());
     if ($tmpfile) {
         $this->redirect(getDownloadLink($tmpfile, _("ErgebnisVeranstaltungssuche.xls"), 4));
     } else {
         $this->render_nothing();
     }
 }
Exemple #2
0
// initialise Stud.IP-Session
require_once 'lib/export/export_linking_func.inc.php';
$intro_text = $head_text = '';
$level = Request::option('level');
$id = Request::option('id');
if ($id) {
    URLHelper::bindLinkParam('id', $id);
    URLHelper::bindLinkParam('level', $level);
}
$group_by = Request::int('group_by', 0);
// store the seleced semester in the session
if (Request::option('select_sem')) {
    $_SESSION['_default_sem'] = Request::option('select_sem');
}
$show_semester = Request::option('select_sem', $_SESSION['_default_sem']);
$sem_browse_obj = new SemBrowse(array('group_by' => 0));
$sem_browse_obj->sem_browse_data['default_sem'] = "all";
$sem_browse_obj->sem_number = false;
$sem_browse_obj->target_url = "dispatch.php/course/details/";
//teilt der nachfolgenden Include mit, wo sie die Leute hinschicken soll
$sem_browse_obj->target_id = "sem_id";
//teilt der nachfolgenden Include mit, wie die id die übergeben wird, bezeichnet werden soll
$sem_browse_obj->sem_browse_data['level'] = $level;
if ($show_semester) {
    $sem_number = SemesterData::GetSemesterIndexById($show_semester);
    $sem_browse_obj->sem_browse_data['default_sem'] = $sem_number;
    $sem_browse_obj->sem_number[0] = $sem_number;
}
switch ($level) {
    case "sbb":
        $sem_browse_obj->sem_browse_data['start_item_id'] = $id;