示例#1
0
/**
 * This function "opens" an institute to work with it. Does the same
 * as selectInst() but also sets the visit date.
 *
 * @param string $inst_id the id of the institute
 *
 * @return boolean  true if successful
 */
function openInst($inst_id)
{
    if ($result = selectInst($inst_id)) {
        object_set_visit($inst_id, "inst");
    }
    return $result;
}
示例#2
0
}
// init of output via I18N
$_language_path = init_i18n($_SESSION['_language']);
//force reload of config to get translated data
list($save_sem_class, $save_sem_type) = array($GLOBALS['SEM_CLASS'], $GLOBALS['SEM_TYPE']);
include 'config.inc.php';
list($GLOBALS['SEM_CLASS'], $GLOBALS['SEM_TYPE']) = array($save_sem_class, $save_sem_type);
// Try to select the course or institute given by the parameter 'cid'
// in the current request. For compatibility reasons there is a fallback to
// the last selected one from the session
$course_id = Request::option('cid', $_SESSION['SessionSeminar']);
// Select the current course or institute if we got one from 'cid' or session.
// This also binds the global $_SESSION['SessionSeminar']
// variable to the URL parameter 'cid' for all generated links.
if (isset($course_id)) {
    selectSem($course_id) || selectInst($course_id);
    unset($course_id);
}
if (Request::get("sober") && ($GLOBALS['user']->id === "nobody" || $GLOBALS['perm']->have_perm("root"))) {
    //deactivate non-core-plugins:
    URLHelper::bindLinkParam("sober", $sober);
    PluginManager::$sober = true;
}
// load the default set of plugins
PluginEngine::loadPlugins();
// add navigation item: add modules
if ((Navigation::hasItem('/course/admin') || $GLOBALS['perm']->have_perm('admin')) && ($perm->have_studip_perm('tutor', $SessSemName[1]) && $SessSemName['class'] == 'sem') && ($SessSemName['class'] != 'sem' || !$GLOBALS['SEM_CLASS'][$GLOBALS['SEM_TYPE'][$SessSemName['art_num']]['class']]['studygroup_mode'])) {
    $plus_nav = new Navigation(_('Mehr …'), 'dispatch.php/course/plus/index');
    $plus_nav->setDescription(_("Mehr Stud.IP-Funktionen für Ihre Veranstaltung"));
    Navigation::addItem('/course/modules', $plus_nav);
}