Skip to content
Snippets Groups Projects
Forked from Stud.IP / Stud.IP
1202 commits behind the upstream repository.
Code owners
Assign users and groups as approvers for specific file changes. Learn more.
1.126_tic_4044_invisible_studygroups.php 752 B
<?php
class Tic4044InvisibleStudygroups extends Migration {

    /**
     * short description of this migration
     */
    function description() {
        return 'Allow invisible studygroups via global setting';
    }

    /**
     * perform this migration
     */
    function up() {
        Config::get()->create('STUDYGROUPS_INVISIBLE_ALLOWED', [
            'value' => 0, 
            'is_default' => 0, 
            'type' => 'boolean',
            'range' => 'global',
            'section' => 'studygroups',
            'description' => _('Ermöglicht unsichtbare Studiengruppen')
            ]);
    }

    /**
     * revert this migration
     */
    function down() {
        Config::get()->delete('STUDYGROUPS_INVISIBLE_ALLOWED');
    }

}