<commit_before>define(["backbone", "underscore", "jquery", "js/views/edit_syllabus", "js/views/show_syllabus"],
        function(Backbone, _, $, EditSyllabusView, ShowSyllabusView) {
    var ListSyllabus = Backbone.View.extend({
        initialize: function() {
            this.emptyTemplate = _.template($("#no-syllabus-tpl").text());
            this.listenTo(this.collection, 'all', this.render);
            this.listenTo(this.collection, 'destroy', this.handleDestroy);
        },
        tagName: "div",
        className: "syllabus-list",
        render: function() {
            var syllabus = this.collection;
            if(syllabus.length === 0) {
                this.$el.html(this.emptyTemplate());
            } else {
                this.$el.empty();
                var that = this;
                syllabus.each(function(syllabus) {
                    var view;
                    if (syllabus.get("editing")) {
                        view = new EditSyllabusView({model: syllabus});
                    } else {
                        view = new ShowSyllabysView({model: syllabus});
                    }
                    that.$el.append(view.render().el);
                });
            }
            return this;
        },
        events: {
            "click .new-button": "addOne"
        },
        addOne: function(e) {
            if(e && e.preventDefault) { e.preventDefault(); }
            this.collection.add([{editing: true}]);<commit_msg>Cambios para definir la colleccion syllabys en course_module<commit_after>define(["backbone", "underscore", "jquery", "js/views/edit_syllabus", "js/views/show_syllabus"],
        function(Backbone, _, $, EditSyllabusView, ShowSyllabusView) {
    var ListSyllabus = Backbone.View.extend({
        initialize: function() {
            this.emptyTemplate = _.template($("#no-syllabus-tpl").text());
            this.listenTo(this.collection, 'all', this.render);
            this.listenTo(this.collection, 'destroy', this.handleDestroy);
        },
        tagName: "div",
        className: "syllabus-list",
        render: function() {
            var syllabus = this.collection;
            if(syllabus.length === 0) {
                this.$el.html(this.emptyTemplate());
            }
            else {
                this.$el.empty();
                var that = this;
                syllabus.each(function(syllabus) {
                   var view;
                  if (syllabus.get("editing")) {
                        view = new EditSyllabusView({model: syllabus});
                    } else {
                        view = new ShowSyllabusView({model: syllabus});
                    }
                    that.$el.append(view.render().el);
                });
            }
            return this;
        },
        events: {
            "click .new-button": "addOne"
        },
        addOne: function(e) {
            if(e && e.preventDefault) { e.preventDefault(); }
            this.collection.add([{editing: true}]);
{'fraction_non_alphanumeric': 0.13735899137358992, 'fraction_numerical': 0.0006635700066357001, 'mean_word_length': 1.5791274593669804, 'pattern_counts': {'":': 2, '<': 3, '<?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': '6870591', 'n_tokens_mistral': 874, 'n_tokens_neox': 844, 'n_words': 138}