Skip to content
Snippets Groups Projects

Compare revisions

Changes are shown as if the source revision was being merged into the target revision. Learn more about comparing revisions.

Source

Select target project
No results found

Target

Select target project
  • alexander.vorwerk/studip
  • hochschule-wismar/stud-ip
  • tleilax/studip
  • marcus/studip
  • manschwa/studip
  • eberhardt/studip
  • uol/studip
  • pluta/studip
  • thienel/extern-uni-b
  • studip/studip
  • strohm/studip
  • uni-osnabrueck/studip
  • FloB/studip
  • universit-t-rostock/studip
  • Robinyyy/studip
  • jakob.diel/studip
  • HyperSpeeed/studip
  • ann/studip
  • nod3zer0/stud-ip-siple-saml-php-plugin
19 results
Show changes
Commits on Source (586)
Showing
with 783 additions and 156 deletions
*.*~
*~
.webpack.*
composer
......@@ -6,28 +6,19 @@ node_modules
nbproject
config/config_local.inc.php
config/studip-httpd.conf
config/config.inc.php
config/config.inc.php
data/*
data/archiv/[0-9a-f]*
data/assets_cache/[0-9a-f]*
data/extern_config/*.cfg
data/media_cache/[0-9a-f]*
data/oer/*
data/oer_logos/*
data/upload_doc/*
lib/classes/dBug.php
public/.htaccess
public/assets/images/icons_working
public/assets/images/apple-touch-icon.psd
public/assets/javascripts/*.js
public/assets/javascripts/*.js.map
public/assets/javascripts/ckeditor/samples
public/assets/javascripts/ckeditor/plugins/devtools
public/assets/stylesheets/*.css
public/assets/stylesheets/*.css.map
public/pictures/banner/*.gif
......@@ -40,14 +31,15 @@ public/pictures/smile/*.gif
public/pictures/smile/*.jpeg
public/pictures/smile/*.jpg
public/pictures/smile/*.png
public/pictures/tex/[0-9a-f]*.png
public/pictures/user/[0-9a-f]*.png
public/plugins_packages/*
!public/plugins_packages/core
public/plugins_packages/core/Forum/.swp
tests/_log
tests/_helpers/CodeGuy.php
tests/_helpers/TestGuy.php
tests/_helpers/WebGuy.php
tests/_helpers/_generated
tests/_output/
.idea
......@@ -4,15 +4,14 @@ The Stud.IP CoreGroup
Marco Bohnsack <bohnsack@data-quest.de>
Rasmus Fuhse <fuhse@data-quest.de>
Till Glggler <tgloeggl@uos.de>
Till Glöggler <tgloeggl@uos.de>
Thomas Hackl <thomas.hackl@uni-passau.de>
Cornelis Kater <kater@elsa.uni-hannover.de>
Elmar Ludwig <elmar.ludwig@uos.de>
Marcus Lunzenauer <marcus.lunzenauer@elanag.com>
Nico Mller <nico.mueller@uni-oldenburg.de>
Andr Noack <noack@data-quest.de>
Nico Müller <nico.mueller@uni-oldenburg.de>
André Noack <noack@data-quest.de>
Cornelia Roser <roser@hawk-hhg.de>
Sabine Scheele <sabine.scheele@hrz.uni-giessen.de>
David Siegfried <david.siegfried@uni-vechta.de>
Martin Stratmann <martin@herrstratmann.de>
Stefan Suchi <suchi@data-quest.de>
......@@ -24,7 +23,7 @@ Credits and Comments
----------------------------------------------------------------------------
Boris Erdmann <be@shonline.de>
Kristian Khntopp <kk@shonline.de>
Kristian Köhntopp <kk@shonline.de>
PHPLib Development, all classes
Manuel Lemos <mlemos@acm.org>
......@@ -58,7 +57,7 @@ vCard-export, record of study
Florian Hansen <florian_h@gmx.net>
WAP pages for Stud.IP
Tobias Mller <tmoelle1@gwdg.de>
Tobias Möller <tmoelle1@gwdg.de>
Stud.IP-Logo
Rosemary Wilson <rwilson@uni-goettingen.de>
......@@ -68,7 +67,7 @@ Englisch translation
Oliver Brakel <obrakel@studip.de>
One of the initiators of Stud.IP
Arne Schrder <schroeder@data-quest.de>
Arne Schröder <schroeder@data-quest.de>
Ilias2-Interface, E-Learning-Modules-Interface, Export
Dennis Reil <Dennis.Reil@offis.de>
......@@ -86,7 +85,7 @@ Administration of times and room information
Jens Schmelzer <jens.schmelzer@fh-jena.de>
Smiley administration, calendar pop-up, lots of security related bugfixes
Jrg Rpke <roepke@uni-trier.de>
Jörg Röpke <roepke@uni-trier.de>
Tobias Thelen <tobias.thelen@uos.de>
Stud.IP help, event logging, wiki enhancements
......@@ -106,7 +105,9 @@ GUI & Usability
Arne Koesling <koesling@elsa.uni-hannover.de>
Andr Klaen <aklassen@uos.de>
André Klaßen <aklassen@uos.de>
Sabine Scheele <sabine.scheele@hrz.uni-giessen.de>
----------------------------------------------------------------------------
CreativeCommons sources
......@@ -119,4 +120,4 @@ http://www.flickr.com/photos/threedots/177592275/
Any others whose names we probably forgot to add (email us and we'll put you
in here)
- The StudIP Core Group <info@studip.de> 2021
The StudIP Core Group <info@studip.de> 2022
This diff is collapsed.
......@@ -780,6 +780,7 @@ RECURSIVE = YES
# run.
EXCLUDE = vendor \
composer \
public/plugins_packages \
db \
locale \
......
......@@ -16,4 +16,4 @@ können.
Also reinsehen und ausprobieren... Viel Spass damit!
You get in an try out. Have a lot of fun!
- The StudIP Core Group <info@studip.de> 2021
The StudIP Core Group <[info@studip.de](mailto:info@studip.de)> 2022
\ No newline at end of file
CODECEPT = composer/bin/codecept
SVGO = node_modules/svgo/bin/svgo
CATALOGS = locale/en/LC_MESSAGES/studip.mo locale/en/LC_MESSAGES/js-resources.json
NPM_BIN = $(shell npm bin)
RESOURCES = $(shell find resources -type f)
PHP_SOURCES = $(shell find app config lib public templates -name '*.php' \( ! -path 'public/plugins_packages/*' -o -path 'public/plugins_packages/core/*' \))
VUE_SOURCES = $(shell find resources -name '*.js' -o -name '*.vue')
# build all needed files
build: composer webpack-prod
......@@ -75,14 +79,30 @@ test-jsonapi: $(CODECEPT)
test-unit: $(CODECEPT)
$(CODECEPT) run unit
catalogs: npm $(CATALOGS)
optimize-icons: npm
$(SVGO) --config=config/svgo.config.js -f public/assets/images/icons/black -r
$(SVGO) --config=config/svgo.config.js -f public/assets/images/icons/blue -r
$(SVGO) --config=config/svgo.config.js -f public/assets/images/icons/green -r
$(SVGO) --config=config/svgo.config.js -f public/assets/images/icons/grey -r
$(SVGO) --config=config/svgo.config.js -f public/assets/images/icons/red -r
$(SVGO) --config=config/svgo.config.js -f public/assets/images/icons/white -r
$(SVGO) --config=config/svgo.config.js -f public/assets/images/icons/yellow -r
find public/assets/images/icons -type f | xargs -P0 $(NPM_BIN)/svgo -q --config=config/svgo.config.js
# default rules for gettext handling
js-%.pot: $(VUE_SOURCES)
$(NPM_BIN)/gettext-extract --attribute v-translate --output $@ $(VUE_SOURCES)
js-%.po: js-%.pot
msgmerge -qU -C $(dir $@)studip.po $@ $<
js-%.json: js-%.po
$(NPM_BIN)/gettext-compile --output $@ $<
sed -i~ 's/^{[^{]*//;s/}$$//' $@
%.pot: $(PHP_SOURCES)
xgettext -o $@ --from-code=UTF-8 $(PHP_SOURCES)
%.po: %.pot
msgmerge -qU $@ $<
%.mo: %.po
msgfmt -o $@ $<
# dummy target to force update of "doc" target
force_update:
Stud.IP
For more information on Stud.IP please visit our website at
http://www.studip.de
or our developer forum at
http://develop.studip.de
For information on how to install this package please read the INSTALL file.
All files contained in this archive are licensed as stated in the COPYING
file. Please check out the AUTHORS file to see who helped make this possible.
If you find any bugs please feel free and send an e-mail to crew@studip.de.
You can also use our bugtracker located at:
http://develop.studip.de
Future versions of this code can be downloaded from:
http://sourceforge.net/projects/studip
Thanks for taking the time to download this code. If you have any questions
please feel free to contact us.
- The StudIP Core Group <info@studip.de> 2021
<p style="text-align: center">
<a href="https://studip.de" target="_blank"><img src="https://www.studip.de/fileadmin/portal3/templates/gfx/studip_logo.svg" width="400"></a>
</p>
## Stud.IP
For more information on Stud.IP please visit our website at [https://www.studip.de](https://www.studip.de) or our developer forum at [https://develop.studip.de](https://develop.studip.de)
For information on how to install this package please read the INSTALL file.
## License
All files contained in this archive are licensed as stated in the COPYING
file. Please check out the AUTHORS file to see who helped make this possible.
## Bugs & Security Vulnerabilities
If you find any bugs please feel free and send an e-mail to [crew@studip.de.](mailto:crew@studip.de.)
You can also use our bugtracker located at: [https://gitlab.studip.de](https://gitlab.studip.de)
Future versions of this code can be downloaded from: [https://gitlab.studip.de](https://gitlab.studip.de)
Thanks for taking the time to download this code. If you have any questions please feel free to contact us.
- The StudIP Core Group <[info@studip.de](mailto:info@studip.de)> 2022
Seit der Version 1.6 gibt es einen Migrationsmechanismus für die Stud.IP Datenbank.
Eingesetzt werden kann dieser ab einem Wechsel von Stud.IP 1.5.0-2 zu 1.6.0-1:
- DATENSICHERUNG durchführen!
- ACHTUNG! Der Migrationsmechanismus ist für Sprünge über mehrere major releases
nicht getestet! Zumindest für einen Sprung von 1.5.x auf 1.7.x oder neuer
sind Probleme bekannt.
- die alten Scriptdateien durch die neuen ersetzen, dabei besonders auf die Dateien
im Verzeichnis config sowie auf eventuelle eigene Anpassungen achten.
- Datenbankaktualisierungen entweder über die Webschnittstelle:
http://mein.server.de/studip/web_migrate.php
- ODER über die Komandozeile:
studip-4.6/cli/migrate.php
vornehmen.
- ACHTUNG! Bei einem Upgrade von Version 3.x auf Version 4.x muss die alte
Konfigurationsdatei config_local.inc.php noch im Konfigurationsverzeichnis liegen
während die Migrationen ausgeführt werden.
- The StudIP Core Group <info@studip.de> 2021
Seit der Version 1.6 gibt es einen Migrationsmechanismus für die Stud.IP Datenbank.
Eingesetzt werden kann dieser ab einem Wechsel von Stud.IP 1.5.0-2 zu 1.6.0-1:
- **Datensicherungen** durchführen!
- **ACHTUNG**! Der Migrationsmechanismus ist für Sprünge über mehrere major releases nicht getestet!
- Zumindest für einen Sprung von 1.5.x auf 1.7.x oder neuer sind Probleme bekannt.
- die alten Script-Dateien durch die neuen ersetzen, dabei besonders auf die Dateien im Verzeichnis config sowie auf eventuelle eigene Anpassungen achten.
- Datenbankaktualisierungen entweder über die Webschnittstelle: `http://mein.server.de/studip/web_migrate.php`
- ODER über die Komandozeile: `studip-4.6/cli/migrate.php` vornehmen.
- **ACHTUNG**! Bei einem Upgrade von Version 3.x auf Version 4.x muss die alte Konfigurationsdatei `config_local.inc.php` noch im Konfigurationsverzeichnis liegen
während die Migrationen ausgeführt werden.
The StudIP Core Group <[info@studip.de](mailto:info@studip.de)> 2022
RELEASE 5.0.alpha-svn
RELEASE 5.0
......@@ -36,6 +36,12 @@ class Admin_ConfigurationController extends AuthenticatedController
}
$this->setupSidebar($this->range_type);
// Preserve section parameter
// This *must* be after the sidebar has been defined
if (!Request::isPost() && Request::option('section')) {
URLHelper::addLinkParam('section', Request::option('section'));
}
}
/**
......@@ -61,7 +67,7 @@ class Admin_ConfigurationController extends AuthenticatedController
// set variables for view
$this->only_section = $section;
$this->open_section = $open_section ?: $section;
$this->open_section = $open_section ?? $section;
$this->needle = $needle;
$this->sections = ConfigurationModel::getConfig($section, $needle);
......@@ -80,8 +86,6 @@ class Admin_ConfigurationController extends AuthenticatedController
*/
public function edit_configuration_action()
{
$field = Request::get('field');
$value = Request::get('value');
......@@ -99,7 +103,7 @@ class Admin_ConfigurationController extends AuthenticatedController
htmlReady($field)
));
$this->relocate('admin/configuration/configuration/' . $section);
$this->relocate("admin/configuration/configuration/{$section}#field-{$field}");
return;
}
}
......
......@@ -345,12 +345,11 @@ class Admin_CourseplanningController extends AuthenticatedController
$end_date->setTimezone(new DateTimeZone('UTC'));
$course = Course::find($course_id);
$this->seminar = new Seminar($course);
if ($course->isOpenEnded() || count($course->semesters) > 1) { // course over more than one semester
$start_weeks = $this->seminar->end_semester->getStartWeeks();
$sem_duration = $this->semester->ende - $this->semester->beginn;
$sem_weeks = $this->semester->getStartWeeks($sem_duration);
if (count($course->semesters) > 1) { // course over more than one semester
$start_weeks = $course->start_semester->getStartWeeks($course->end_semester);
$sem_weeks = $this->semester->getStartWeeks();
$sem_weeks_start = explode(' Semesterwoche ', $sem_weeks[0]);
$sem_weeks_end = explode(' Semesterwoche ', end($sem_weeks));
......@@ -851,7 +850,6 @@ class Admin_CourseplanningController extends AuthenticatedController
}
$seminars = array_map('reset', $courses);
$visit_data = get_objects_visits(array_keys($seminars), 'sem', null, null, MyRealmModel::getDefaultModules());
if (!empty($seminars)) {
foreach ($seminars as $seminar_id => $seminar) {
......@@ -861,6 +859,9 @@ class Admin_CourseplanningController extends AuthenticatedController
$seminars[$seminar_id]['dozenten'] = $dozenten;
if (in_array('contents', $params['view_filter'])) {
$tools = new SimpleCollection(ToolActivation::findbyRange_id($seminar_id, "ORDER BY position"));
$visit_data = get_objects_visits([$seminar_id], 0, null, null, $tools->pluck('plugin_id'));
$seminars[$seminar_id]['tools'] = $tools;
$seminars[$seminar_id]['visitdate'] = $visit_data[$seminar_id][0]['visitdate'];
$seminars[$seminar_id]['last_visitdate'] = $visit_data[$seminar_id][0]['last_visitdate'];
$seminars[$seminar_id]['sem_class'] = $sem_types[$seminar['status']]->getClass();
......
......@@ -279,7 +279,7 @@ class Admin_CoursesController extends AuthenticatedController
//delete all temporary permission changes
if (is_array($_SESSION)) {
foreach (array_keys($_SESSION) as $key) {
if (mb_strpos($key, 'seminar_change_view_') !== false) {
if (strpos($key, 'seminar_change_view_') === 0) {
unset($_SESSION[$key]);
}
}
......@@ -1229,7 +1229,6 @@ class Admin_CoursesController extends AuthenticatedController
}
$seminars = array_map('reset', $courses);
$visit_data = get_objects_visits(array_keys($seminars), 0, null, null, array_keys(MyRealmModel::getDefaultModules()));
if (!empty($seminars)) {
foreach ($seminars as $seminar_id => $seminar) {
......@@ -1239,9 +1238,11 @@ class Admin_CoursesController extends AuthenticatedController
$seminars[$seminar_id]['dozenten'] = $dozenten;
if (in_array('contents', $params['view_filter'])) {
$tools = new SimpleCollection(ToolActivation::findbyRange_id($seminar_id, "ORDER BY position"));
$visit_data = get_objects_visits([$seminar_id], 0, null, null, $tools->pluck('plugin_id'));
$seminars[$seminar_id]['visitdate'] = $visit_data[$seminar_id][0]['visitdate'];
$seminars[$seminar_id]['last_visitdate'] = $visit_data[$seminar_id][0]['last_visitdate'];
$seminars[$seminar_id]['tools'] = new SimpleCollection(ToolActivation::findbyRange_id($seminar_id, "ORDER BY position"));
$seminars[$seminar_id]['tools'] = $tools;
$seminars[$seminar_id]['navigation'] = MyRealmModel::getAdditionalNavigations(
$seminar_id,
$seminars[$seminar_id],
......
......@@ -326,7 +326,7 @@ class Admin_InstallController extends Trails_Controller
}
}
// COPY config.inc.php / config_local.inc.php / library_config.inc.php
// COPY config.inc.php / config_local.inc.php
if ($this->basic || $what === 'config') {
$local_inc = $this->installer->createConfigLocalInc(
$_SESSION['STUDIP_INSTALLATION']['database']['host'],
......@@ -341,7 +341,6 @@ class Admin_InstallController extends Trails_Controller
$_SESSION['STUDIP_INSTALLATION']['system']['UNI_URL'],
$_SESSION['STUDIP_INSTALLATION']['system']['UNI_CONTACT']
);
$this->installer->createLibraryConfigInc();
// Update config entries
$this->installer->updateConfigInDatabase(
......
......@@ -490,52 +490,6 @@ class Admin_PluginController extends AuthenticatedController
$this->manifest = $manifest;
}
/**
* Display the default activation set for this plugin.
*/
public function default_activation_action($plugin_id)
{
Helpbar::Get()->addPlainText(_('Einrichtungen'), _('Wählen Sie die Einrichtungen, in deren Veranstaltungen das Plugin automatisch aktiviert sein soll.'), Icon::create('info'));
$actions = new ActionsWidget();
$actions->addLink(_('Pluginverwaltung'), $this->url_for('admin/plugin'), Icon::create('plugin', 'clickable'));
Sidebar::Get()->addWidget($actions);
$plugin_manager = PluginManager::getInstance();
$plugin = $plugin_manager->getPluginInfoById($plugin_id);
$selected_inst = $plugin_manager->getDefaultActivations($plugin_id);
$this->plugin_name = $plugin['name'];
$this->plugin_id = $plugin_id;
$this->selected_inst = $selected_inst;
$this->institutes = $this->plugin_admin->getInstitutes();
}
/**
* Change the default activation for this plugin.
*/
public function save_default_activation_action($plugin_id)
{
$plugin_manager = PluginManager::getInstance();
$selected_inst = Request::optionArray('selected_inst');
$this->check_ticket();
// save selected institutes (if any)
$plugin_manager->setDefaultActivations($plugin_id, $selected_inst);
if (count($selected_inst) === 0) {
PageLayout::postSuccess(_('Die Default-Aktivierung wurde ausgeschaltet.'));
} else {
$message = ngettext(
'Für die ausgewählte Einrichtung wurde das Plugin standardmäßig aktiviert.',
'Für die ausgewählten Einrichtungen wurde das Plugin standardmäßig aktiviert.',
count($selected_inst)
);
PageLayout::postSuccess($message);
}
$this->redirect('admin/plugin/default_activation/' . $plugin_id);
}
/**
* migrate a plugin to top version
*
......
......@@ -68,17 +68,18 @@ class Admin_SemClassesController extends AuthenticatedController
$plugins = PluginManager::getInstance()->getPlugins("StudipModule");
$this->sem_class = SemClass::getClasses()[Request::get("id")];
$modules = [];
foreach ($this->sem_class->getActivatedModuleObjects() as $plugin) {
foreach ($this->sem_class->getModuleObjects() as $plugin) {
$modules[get_class($plugin)] = [
'name' => $plugin->getPluginName(),
'id' => $plugin->getPluginId(),
'enabled' => $plugin->isEnabled(),
'activated' => true
'activated' => $this->sem_class->isModuleActivated($plugin->getPluginName())
];
}
foreach ($plugins as $plugin) {
if (!$plugin->isActivatableForContext(new Course)) continue;
if (isset($modules[get_class($plugin)])) continue;
if ($this->sem_class->isModuleForbidden(get_class($plugin))) continue;
$modules[get_class($plugin)] = [
'name' => $plugin->getPluginName(),
'id' => $plugin->getPluginId(),
......@@ -97,9 +98,8 @@ class Admin_SemClassesController extends AuthenticatedController
throw new Exception("Kein Zugriff über GET");
}
$sem_class = $GLOBALS['SEM_CLASS'][Request::int("sem_class_id")];
foreach (Request::getArray("core_module_slots") as $slot => $module) {
$sem_class->setSlotModule($slot, $module);
}
$old_data_sem_class = clone $sem_class;
$sem_class->setModules(Request::getArray("modules"));
$sem_class->set('name', Request::get("sem_class_name"));
$sem_class->set('description', Request::get("sem_class_description"));
......@@ -126,6 +126,14 @@ class Admin_SemClassesController extends AuthenticatedController
$sem_class->set('show_raumzeit', Request::int("show_raumzeit"));
$sem_class->set('is_group', Request::int("is_group"));
$sem_class->store();
foreach (array_keys($sem_class->getModules()) as $module_name) {
if ($sem_class->isModuleMandatory($module_name) && !$old_data_sem_class->isModuleMandatory($module_name)) {
$sem_class->activateModuleInCourses($module_name);
}
if (!$sem_class->isModuleAllowed($module_name) && $old_data_sem_class->isModuleAllowed($module_name)) {
$sem_class->deActivateModuleInCourses($module_name);
}
}
if (!count($sem_class->getSemTypes())) {
$notice = "<br>"._("Beachten Sie, dass es noch keine Veranstaltungstypen gibt!");
}
......
......@@ -419,7 +419,8 @@ class Admin_UserController extends AuthenticatedController
//change password
if (($GLOBALS['perm']->have_perm('root') && Config::get()->ALLOW_ADMIN_USERACCESS) && (Request::get('pass_1') != '' || Request::get('pass_2') != '')) {
if (Request::get('pass_1') == Request::get('pass_2')) {
if (mb_strlen(Request::get('pass_1')) < 4) {
$validator = new email_validation_class();
if (!$validator->ValidatePassword(Request::get('pass_1'))) {
$details[] = _('Das Passwort ist zu kurz. Es sollte mindestens 8 Zeichen lang sein.');
} else {
$um->changePassword(Request::get('pass_1'));
......@@ -649,15 +650,15 @@ class Admin_UserController extends AuthenticatedController
//get formdata
$this->user = [
'username' => Request::get('username'),
'username' => trim(Request::get('username')),
'perm' => Request::option('perm'),
'visible' => Request::get('visible'),
'Vorname' => Request::get('Vorname'),
'Nachname' => Request::get('Nachname'),
'Vorname' => trim(Request::get('Vorname')),
'Nachname' => trim(Request::get('Nachname')),
'geschlecht' => Request::int('geschlecht'),
'title_front' => Request::get('title_front'),
'title_rear' => Request::get('title_rear'),
'Email' => Request::get('Email'),
'title_front' => trim(Request::get('title_front')),
'title_rear' => trim(Request::get('title_rear')),
'Email' => trim(Request::get('Email')),
'auth_plugin' => Request::get('auth_plugin'),
'institute' => Request::option('institute'),
'preferred_language' => Request::get('preferred_language')
......@@ -1234,13 +1235,14 @@ class Admin_UserController extends AuthenticatedController
}
PageLayout::setTitle(sprintf(_('Datei- und Aktivitätsübersicht für %s'), $this->fullname));
$this->queries = $this->getActivities($user_id);
$memberships = DBManager::get()->fetchAll("SELECT seminar_user.*, seminare.Name as course_name
FROM seminar_user
LEFT JOIN seminare USING (seminar_id)
WHERE user_id = ? ORDER BY seminare.start_time DESC, seminare.Name",
LEFT JOIN semester_courses ON (seminare.Seminar_id = semester_courses.course_id)
LEFT JOIN semester_data ON (semester_data.semester_id = semester_courses.semester_id)
WHERE user_id = ? GROUP BY seminare.Seminar_id ORDER BY MAX(semester_data.beginn) DESC, seminare.Name",
[$user_id],
'CourseMember::buildExisting');
......@@ -1250,6 +1252,7 @@ class Admin_UserController extends AuthenticatedController
$this->sections = [];
foreach ($memberships as $membership) {
$semester_name = $membership->course->isOpenEnded() ? _('unbegrenzt') : (string) $membership->course->start_semester->name;
if (!Request::get('view') || Request::get('view') === 'files') {
// count files for course
......@@ -1260,9 +1263,9 @@ class Admin_UserController extends AuthenticatedController
if ($count) {
if (!isset($course_files[$membership->seminar_id])) {
$course_files[$membership->course->start_semester->name][$membership->course->id]['course'] = $membership->course;
$course_files[$semester_name][$membership->course->id]['course'] = $membership->course;
}
$course_files[$membership->course->start_semester->name][$membership->course->id]['files'] = $count;
$course_files[$semester_name][$membership->course->id]['files'] = $count;
}
}
if (in_array(Request::get('view'), words('courses closed_courses'))) {
......@@ -1273,9 +1276,9 @@ class Admin_UserController extends AuthenticatedController
WHERE sc.seminar_id =?', [$membership->seminar_id]);
if ((int)$closed_course) {
$closed_courses[$membership->course->start_semester->name][$membership->course->id] = $membership;
$closed_courses[$semester_name][$membership->course->id] = $membership;
} else {
$courses[$membership->course->start_semester->name][$membership->course->id] = $membership;
$courses[$semester_name][$membership->course->id] = $membership;
}
}
}
......
......@@ -56,7 +56,6 @@ class Admission_RestrictedCoursesController extends AuthenticatedController
}
$semester = Semester::find($this->current_semester_id);
$sem_condition .= "
AND seminare.start_time <=" . (int)$semester["beginn"]."
AND (semester_courses.semester_id IS NULL OR semester_courses.semester_id = " . DBManager::get()->quote($semester->getId()) . ")
";
if ($this->sem_name_prefix) {
......
......@@ -116,12 +116,12 @@ class Admission_RuleController extends AuthenticatedController
* configure a rule of the given type.
*
* @param String $ruleType Class name of the rule to check.
* @param String $ruleId ID of the rule to save, or empty if this is a new rule.
*/
public function validate_action($ruleType)
public function validate_action($ruleType, $ruleId = '')
{
$rules = AdmissionRule::getAvailableAdmissionRules();
$rule = new $ruleType();
$rule = new $ruleType($ruleId);
$this->errors = $rule->validate(Request::getInstance());
}
}