<commit_before><?php
namespace SPHERE\Application\Setting\Consumer\Service;

use SPHERE\Application\Contact\Address\Service\Entity\TblAddress;
use SPHERE\Application\Platform\Gatekeeper\Authorization\Account\Account;
use SPHERE\Application\Platform\System\Protocol\Protocol;
use SPHERE\Application\Setting\Consumer\Service\Entity\TblSetting;
use SPHERE\System\Database\Binding\AbstractData;

/**
 * Class Data
 * @package SPHERE\Application\Setting\Consumer\Service
 */
class Data extends AbstractData
{

    public function setupDatabaseContent()
    {

        $tblAccount = Account::useService()->getAccountBySession();
        if ($tblAccount && ($tblConsumer = $tblAccount->getServiceTblConsumer())) {

            $this->createSetting('Transfer', 'Indiware', 'Import', 'Lectureship_ConvertDivisionLatinToGreek',
                TblSetting::TYPE_BOOLEAN, '0');

            $this->createSetting('Contact', 'Address', 'Address', 'Format_GuiString',
                TblSetting::TYPE_STRING, TblAddress::VALUE_PLZ_ORT_OT_STR_NR);

            $this->createSetting('Api', 'Document', 'Standard', 'EnrollmentDocument_PictureAddress',
                TblSetting::TYPE_STRING, '');
            // Höhe sollte kleiner als 120px sein
            $this->createSetting('Api', 'Document', 'Standard', 'EnrollmentDocument_PictureHeight',
                TblSetting::TYPE_STRING,
                '');

            // Logo für das Zeugnis darf skalliert nicht breiter sein als 182px (bei einer höhe von 50px [Bsp.: 546 * 150 ist noch ok])
            if ($tblConsumer->getAcronym() == 'ESS') {
                $this->createSetting('Education', 'Certificate', 'Generate', 'PictureAddress', TblSetting::TYPE_STRING,
                    '/Common/Style/Resource/Logo/ESS-Zeugnis-Logo.png');
            } else {
                $this->createSetting('Education', 'Certificate', 'Generate', 'PictureAddress', TblSetting::TYPE_STRING,
                    '');
            }

            if ($tblConsumer->getAcronym() == 'ESZC'
                || $tblConsumer->getAcronym() == 'EVSC'
            ) {
                $this->createSetting('Api', 'Education', 'Certificate', 'OrientationAcronym', TblSetting::TYPE_STRING,
                    'NK');
                $this->createSetting('Api', 'Education', 'Certificate', 'ProfileAcronym', TblSetting::TYPE_STRING,
                    'PRO');
            } else {
                $this->createSetting('Api', 'Education', 'Certificate', 'OrientationAcronym', TblSetting::TYPE_STRING,
                    '');
                $this->createSetting('Api', 'Education', 'Certificate', 'ProfileAcronym', TblSetting::TYPE_STRING,
                    '');
            }

            if($tblConsumer->getAcronym() == 'EGE'
                || $tblConsumer->getAcronym() == 'DEMO') {
                $this->createSetting('Education', 'Graduation', 'Gradebook', 'IsShownAverageInStudentOverview', TblSetting::TYPE_BOOLEAN, true);
            } else {
                $this->createSetting('Education', 'Graduation', 'Gradebook', 'IsShownAverageInStudentOverview', TblSetting::TYPE_BOOLEAN, true);
            }

            if ($tblConsumer->getAcronym() == 'ESZC') {
                $this->createSetting(
                    'Education',
                    'Certificate',
                    'Prepare',
                    'IsGradeVerbalOnDiploma',
                    TblSetting::TYPE_BOOLEAN,
                    '1'
                );
            } else {
                $this->createSetting(
                    'Education',
                    'Certificate',
                    'Prepare',
                    'IsGradeVerbalOnDiploma',
                    TblSetting::TYPE_BOOLEAN,
                    '0'
                );
            }
        }<commit_msg>fix: #SSW-1558 Fehler im Mandantensetting<commit_after><?php
namespace SPHERE\Application\Setting\Consumer\Service;

use SPHERE\Application\Contact\Address\Service\Entity\TblAddress;
use SPHERE\Application\Platform\Gatekeeper\Authorization\Account\Account;
use SPHERE\Application\Platform\System\Protocol\Protocol;
use SPHERE\Application\Setting\Consumer\Service\Entity\TblSetting;
use SPHERE\System\Database\Binding\AbstractData;

/**
 * Class Data
 * @package SPHERE\Application\Setting\Consumer\Service
 */
class Data extends AbstractData
{

    public function setupDatabaseContent()
    {

        $tblAccount = Account::useService()->getAccountBySession();
        if ($tblAccount && ($tblConsumer = $tblAccount->getServiceTblConsumer())) {

            $this->createSetting('Transfer', 'Indiware', 'Import', 'Lectureship_ConvertDivisionLatinToGreek',
                TblSetting::TYPE_BOOLEAN, '0');

            $this->createSetting('Contact', 'Address', 'Address', 'Format_GuiString',
                TblSetting::TYPE_STRING, TblAddress::VALUE_PLZ_ORT_OT_STR_NR);

            $this->createSetting('Api', 'Document', 'Standard', 'EnrollmentDocument_PictureAddress',
                TblSetting::TYPE_STRING, '');
            // Höhe sollte kleiner als 120px sein
            $this->createSetting('Api', 'Document', 'Standard', 'EnrollmentDocument_PictureHeight',
                TblSetting::TYPE_STRING,
                '');

            // Logo für das Zeugnis darf skalliert nicht breiter sein als 182px (bei einer höhe von 50px [Bsp.: 546 * 150 ist noch ok])
            if ($tblConsumer->getAcronym() == 'ESS') {
                $this->createSetting('Education', 'Certificate', 'Generate', 'PictureAddress', TblSetting::TYPE_STRING,
                    '/Common/Style/Resource/Logo/ESS-Zeugnis-Logo.png');
            } else {
                $this->createSetting('Education', 'Certificate', 'Generate', 'PictureAddress', TblSetting::TYPE_STRING,
                    '');
            }

            if ($tblConsumer->getAcronym() == 'ESZC'
                || $tblConsumer->getAcronym() == 'EVSC'
            ) {
                $this->createSetting('Api', 'Education', 'Certificate', 'OrientationAcronym', TblSetting::TYPE_STRING,
                    'NK');
                $this->createSetting('Api', 'Education', 'Certificate', 'ProfileAcronym', TblSetting::TYPE_STRING,
                    'PRO');
            } else {
                $this->createSetting('Api', 'Education', 'Certificate', 'OrientationAcronym', TblSetting::TYPE_STRING,
                    '');
                $this->createSetting('Api', 'Education', 'Certificate', 'ProfileAcronym', TblSetting::TYPE_STRING,
                    '');
            }

            $this->createSetting('Education', 'Graduation', 'Gradebook', 'IsShownAverageInStudentOverview', TblSetting::TYPE_BOOLEAN, false);

            if ($tblConsumer->getAcronym() == 'ESZC') {
                $this->createSetting(
                    'Education',
                    'Certificate',
                    'Prepare',
                    'IsGradeVerbalOnDiploma',
                    TblSetting::TYPE_BOOLEAN,
                    '1'
                );
            } else {
                $this->createSetting(
                    'Education',
                    'Certificate',
                    'Prepare',
                    'IsGradeVerbalOnDiploma',
                    TblSetting::TYPE_BOOLEAN,
                    '0'
                );
            }
        }
{'fraction_non_alphanumeric': 0.13200054772011502, 'fraction_numerical': 0.00520334109270163, 'mean_word_length': 2.122702009405729, 'pattern_counts': {'":': 0, '<': 5, '<?xml version=': 0, '>': 44, 'https://': 0, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 0, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '3739095', 'n_tokens_mistral': 2079, 'n_tokens_neox': 1900, 'n_words': 309}