<commit_before>{
    padding: 20,
    border: false,
    frame: false,
    xtype: 'form',

    layout: {
        type: 'anchor',
    },
   // layout: 'auto',
    autoScroll: true,

    fieldDefaults: {
        labelAlign: 'top',
        labelWidth: 100,
        labelStyle: 'font-weight:bold'
    },
    defaults: {
        margins: '0 0 10 0'
    },
    /**
     * Called by the grade-editor main window just before calling
     * setDraftstring() for the first time.
     *
     * @param config Get the grade editor configuration that is stored on the
     *      current assignment.
     */
    initializeEditor: function(config) {
        var me = this;
        this.editorConfig = Ext.JSON.decode(config.config);
        var formVal = this.editorConfig.formValues;
        this.draftfields = [];
        var nr = 0;
        var i=0;
        
        for (i=0; i<formVal.length; i++) {
            var grade = formVal[i];
            if (grade[0] == 'check') {
                var field = Ext.widget('checkboxfield', {
                    boxLabel: grade[3] + " (" + grade[1] + ")",
                    checked: parseInt(grade[2]),
                    anchor: '-1',
                    flex: 0
                });
                this.draftfields[nr] = field;
                nr++;
            } else if (grade[0] == 'number'){
                var field = Ext.widget('numberfield', {
                    fieldLabel: grade[3],
                    minValue: 0,
                    maxValue: parseInt(grade[1]),
                    anchor: '-1',
                    value: grade[2],
                    flex: 0
                });
                this.draftfields[nr] = field;
                nr++;
            }
        }

        for (i=0; i<this.draftfields.length; i++) {
            this.add(this.draftfields[i]);
        }

        this.feedback = Ext.widget('markdownfulleditor', {
            flex: 0
        });
        this.add(this.feedback);
    },

    /**
     * @private<commit_msg>apps.commentform_gradeeditor...drafteditor: Adjusted the feedback text field (#266).<commit_after>{
    padding: 20,
    border: false,
    frame: false,
    xtype: 'form',

    layout: {
        type: 'anchor',
    },
   // layout: 'auto',
    autoScroll: true,

    fieldDefaults: {
        labelAlign: 'top',
        labelWidth: 100,
        labelStyle: 'font-weight:bold'
    },
    defaults: {
        margins: '0 0 10 0'
    },
    /**
     * Called by the grade-editor main window just before calling
     * setDraftstring() for the first time.
     *
     * @param config Get the grade editor configuration that is stored on the
     *      current assignment.
     */
    initializeEditor: function(config) {
        var me = this;
        this.editorConfig = Ext.JSON.decode(config.config);
        var formVal = this.editorConfig.formValues;
        this.draftfields = [];
        var nr = 0;
        var i=0;
        
        for (i=0; i<formVal.length; i++) {
            var grade = formVal[i];
            if (grade[0] == 'check') {
                var field = Ext.widget('checkboxfield', {
                    boxLabel: grade[3] + " (" + grade[1] + ")",
                    checked: parseInt(grade[2]),
                    anchor: '-1',
                    flex: 0
                });
                this.draftfields[nr] = field;
                nr++;
            } else if (grade[0] == 'number'){
                var field = Ext.widget('numberfield', {
                    fieldLabel: grade[3],
                    minValue: 0,
                    maxValue: parseInt(grade[1]),
                    anchor: '-1',
                    value: grade[2],
                    flex: 0
                });
                this.draftfields[nr] = field;
                nr++;
            }
        }

        for (i=0; i<this.draftfields.length; i++) {
            this.add(this.draftfields[i]);
        }

        this.feedback = Ext.widget('markdownfulleditor', {
            height: 200
        });
        this.add(this.feedback);
    },

    /**
     * @private
{'fraction_non_alphanumeric': 0.12896094325718496, 'fraction_numerical': 0.014984033407025301, 'mean_word_length': 1.316268486916951, 'pattern_counts': {'":': 0, '<': 7, '<?xml version=': 0, '>': 3, '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': '4247959', 'n_tokens_mistral': 1200, 'n_tokens_neox': 1115, 'n_words': 267}