Skip to content
Snippets Groups Projects
Select Git revision
  • 3cb7ba8d1b048af4e44390c8f15cae85a103d232
  • main default protected
  • studip-rector
  • ci-opt
  • course-members-export-as-word
  • data-vue-app
  • pipeline-improvements
  • webpack-optimizations
  • rector
  • icon-renewal
  • http-client-and-factories
  • jsonapi-atomic-operations
  • vueify-messages
  • tic-2341
  • 135-translatable-study-areas
  • extensible-sorm-action-parameters
  • sorm-configuration-trait
  • jsonapi-mvv-routes
  • docblocks-for-magic-methods
19 results

StudipLock.class.php

Blame
  • Forked from Stud.IP / Stud.IP
    Source project has a limited visibility.
    Code owners
    Assign users and groups as approvers for specific file changes. Learn more.
    Modulteil.php 11.92 KiB
    <?php
    /**
     * Modulteil.php
     * Model class for Modulteile (table mvv_modulteil)
     *
     * This program is free software; you can redistribute it and/or
     * modify it under the terms of the GNU General Public License as
     * published by the Free Software Foundation; either version 2 of
     * the License, or (at your option) any later version.
     *
     * @author      Peter Thienel <thienel@data-quest.de>
     * @license     http://www.gnu.org/licenses/gpl-2.0.html GPL version 2
     * @category    Stud.IP
     * @since       3.5
     */
    
    class Modulteil extends ModuleManagementModelTreeItem
    {
    
        private $default_language;
    
        private $count_lvgruppen;
    
        protected static function configure($config = [])
        {
            $config['db_table'] = 'mvv_modulteil';
    
            $config['belongs_to']['modul'] = [
                'class_name'  => 'Modul',
                'foreign_key' => 'modul_id',
                'assoc_func'  => 'findCached',
            ];
            $config['has_and_belongs_to_many']['abschnitte'] = [
                'class_name'     => 'StgteilAbschnitt',
                'thru_table'     => 'mvv_modulteil_stgteilabschnitt',
                'thru_key'       => 'modulteil_id',
                'thru_assoc_key' => 'abschnitt_id',
                'on_delete'      => 'delete',
                'on_store'       => 'store'
            ];
            $config['has_many']['abschnitt_assignments'] = [
                'class_name' => 'ModulteilStgteilabschnitt',
                'order_by'   => 'ORDER BY fachsemester,mkdate',
                'on_delete'  => 'delete',
                'on_store'   => 'store'
            ];
            $config['has_one']['deskriptoren'] = [
                'class_name'        => 'ModulteilDeskriptor',
                'assoc_foreign_key' => 'modulteil_id',
                'on_delete'         => 'delete',
                'on_store'          => 'store'
            ];
            $config['has_and_belongs_to_many']['lvgruppen'] = [
                'class_name'     => 'Lvgruppe',
                'thru_table'     => 'mvv_lvgruppe_modulteil',
                'thru_key'       => 'modulteil_id',
                'thru_assoc_key' => 'lvgruppe_id',
                'order_by'       => 'ORDER BY position,mkdate',
                'on_delete'      => 'delete',
                'on_store'       => 'store'
            ];
            $config['has_many']['lvgruppen_assignments'] = [
                'class_name' => 'LvgruppeModulteil',
                'order_by'   => 'ORDER BY position,mkdate',
                'on_delete'  => 'delete',
                'on_store'   => 'store'
            ];
            $config['has_many']['languages'] = [
                'class_name'        => 'ModulteilLanguage',
                'assoc_foreign_key' => 'modulteil_id',