// clear session data of seminar-assi, otherwise the navigation item "back to seminar" will vanish
$_SESSION['links_admin_data']['assi'] = false;

if ($perm->have_perm('tutor')) {    // Navigationsleiste ab status "Tutor"
    //ob_start();

    require_once 'lib/dates.inc.php';
    require_once 'lib/msg.inc.php';
    require_once 'lib/visual.inc.php';
    require_once 'lib/functions.php';

    $cssSw=new cssClassSwitcher;
    $semester=new SemesterData;
    $aux_rules=new AuxLockRules();
    $all_aux_rules=$aux_rules->getAllLockRules();

    //Einheitliches Auswahlmenu fuer Einrichtungen
    //if (((!$SessSemName[1]) || ($SessSemName["class"] == "sem")) && $list && ($view_mode == "inst")) {
        //Save data back to database and start a connection  - so we avoid some problems with large search results and data is writing back to db too late
        //page_close();
        //if(isset($admin_view)){
        //     URLHelper::bindLinkParam('admin_view',$admin_view);
        //}
        ?>
        <table width="100%" cellspacing=0 cellpadding=0 border=0>
        <?
        if ($msg) {
            echo "<tr> <td class=\"blank\" colspan=2><br>";
            parse_msg ($msg);
            echo "</td></tr>";
示例#2
0
 /**
  * Maintenance view for the specification parameters
  *
  */
 function index_action()
 {
     $this->allrules = AuxLockRules::getAllLockRules();
 }
示例#3
0
文件: courses.php 项目: ratbird/hope
 /**
  * Show all courses with more options
  */
 public function index_action()
 {
     $this->sem_create_perm = in_array(Config::get()->SEM_CREATE_PERM, array('root', 'admin', 'dozent')) ? Config::get()->SEM_CREATE_PERM : 'dozent';
     // get courses only if institutes available
     $this->actions = $this->getActions();
     $config_my_course_type_filter = $GLOBALS['user']->cfg->MY_COURSES_TYPE_FILTER;
     // Get the view filter
     $this->view_filter = $this->getFilterConfig();
     if (Request::get('sortFlag')) {
         $GLOBALS['user']->cfg->store('MEINE_SEMINARE_SORT_FLAG', Request::get('sortFlag') == 'asc' ? 'DESC' : 'ASC');
     }
     if (Request::option('sortby')) {
         $GLOBALS['user']->cfg->store('MEINE_SEMINARE_SORT', Request::option('sortby'));
     }
     $this->selected_action = $GLOBALS['user']->cfg->MY_COURSES_ACTION_AREA;
     if (is_null($this->selected_action)) {
         $this->selected_action = 1;
     }
     $this->sortby = $GLOBALS['user']->cfg->MEINE_SEMINARE_SORT;
     $this->sortFlag = $GLOBALS['user']->cfg->MEINE_SEMINARE_SORT_FLAG ?: 'ASC';
     $this->courses = $this->getCourses(array('sortby' => $this->sortby, 'sortFlag' => $this->sortFlag, 'view_filter' => $this->view_filter, 'typeFilter' => $config_my_course_type_filter));
     if (in_array('contents', $this->view_filter)) {
         $this->nav_elements = MyRealmModel::calc_nav_elements(array($this->courses));
     }
     // get all available teacher for infobox-filter
     // filter by selected teacher
     $_SESSION['MY_COURSES_LIST'] = array_map(function ($c, $id) {
         return array('Name' => $c['Name'], 'Seminar_id' => $id);
     }, array_values($this->courses), array_keys($this->courses));
     $this->all_lock_rules = new SimpleCollection(array_merge(array(array('name' => '--' . _("keine Sperrebene") . '--', 'lock_id' => 'none')), LockRule::findAllByType('sem')));
     $this->aux_lock_rules = array_merge(array(array('name' => '--' . _("keine Zusatzangaben") . '--', 'lock_id' => 'none')), AuxLockRules::getAllLockRules());
     $sidebar = Sidebar::get();
     $sidebar->setImage("sidebar/seminar-sidebar.png");
     $this->setSearchWiget();
     $this->setInstSelector();
     $this->setSemesterSelector();
     $this->setTeacherWidget();
     $this->setCourseTypeWidget($config_my_course_type_filter);
     $this->setActionsWidget($this->selected_action);
     if ($this->sem_create_perm) {
         $actions = new ActionsWidget();
         $actions->addLink(_('Neue Veranstaltung anlegen'), URLHelper::getLink('dispatch.php/course/wizard'), Icon::create('seminar+add', 'clickable'))->asDialog('size=50%');
         $sidebar->addWidget($actions, 'links');
     }
     $this->setViewWidget($this->view_filter);
     if ($this->sem_create_perm) {
         $params = array();
         if ($GLOBALS['user']->cfg->ADMIN_COURSES_SEARCHTEXT) {
             $params['search'] = $GLOBALS['user']->cfg->ADMIN_COURSES_SEARCHTEXT;
         }
         $export = new ExportWidget();
         $export->addLink(_('Als Excel exportieren'), URLHelper::getLink('dispatch.php/admin/courses/export_csv', $params), Icon::create('file-excel', 'clickable'));
         $sidebar->addWidget($export);
     }
 }