<commit_before>var templates = [
    "root/externallib/text!root/plugins/page/view.html",
    "root/externallib/text!root/plugins/page/dialog.html",
	"root/externallib/text!root/plugins/page/test_page.html"
];

define(templates, function (viewTpl, dialogTpl, testpageTpl) {
    var plugin = {
        settings: {
            name: "page",
            type: "mod",
            component: "mod_page",
            lang: {
                component: "core"
            }
        },

        render: function(courseId, sectionId, section, module) {
            var data = {
                "courseId": courseId,
                "sectionId": sectionId,
                "section": section,
                "module": module
            };

            return MM.tpl.render(MM.plugins.page.templates.view.html, data);
        },

        /**
         * Callback executed when the contents page is rendered.
         */
        contentsPageRendered: function() {

            $(".page-downloaded").on(MM.clickType, function(e) {
                e.preventDefault();
                var path = $(this).data("path");
                path = path.substring(0, path.lastIndexOf("/") + 1) + "index.html";
                path = MM.fs.getRoot() + "/" + path;

                MM.plugins.page._showPage(path);
            });

            $(".page-download-all").on(MM.clickType, function(e) {
                e.preventDefault();

                var contentId = $(this).data("content");
                var courseId = $(this).data("course");
                var sectionId = $(this).data("section");

                var downloadIcon = $("#download-all-" + contentId);
                if (downloadIcon) {
                    downloadIcon.attr("src", "img/loadingblack.gif");
                }

                var that = $(this);

                var errorFn = function() {
                    downloadIcon.attr("src", "img/download.png");
                    MM.popErrorMessage(MM.lang.s("errordownloading"));
                };

                // Download all the page images, css, etc...
                MM.plugins.contents.downloadAll(courseId, sectionId, contentId,
                    // Success.
                    function(paths) {
                        downloadIcon.remove();
                        var path = paths[0].filePath;
                        path = path.substring(0, path.lastIndexOf("/") + 1);
                        var link = $("#page-" + contentId);
                        link.attr("data-path", path);
                        link.removeClass("page-download-all").addClass("page-downloaded");

                        var indexFileURL = MM.fs.getRoot() + "/" + path + "index.html";

                        MM.plugins.page._showPage(indexFileURL);
                    },
                    // Error.
                    errorFn
                );
            });
        },

        _showPage: function(path) {
            var data = {
                path: path
            };
            var title = MM.tpl.render(MM.plugins.page.templates.dialog.html, data);

            MM.widgets.renderIframeModal(title, path);
        },

        templates: {
            "view": {
                html: viewTpl
            },
            "dialog": {
                html: dialogTpl
            },
			"": {
				html: test_pageTpl	
			}
        }

    };

    MM.registerPlugin(plugin);

});<commit_msg>commented all page tpl entries<commit_after>var templates = [
    "root/externallib/text!root/plugins/page/view.html",
    "root/externallib/text!root/plugins/page/dialog.html"
	//"root/externallib/text!root/plugins/page/test_page.html"
];

define(templates, function (viewTpl, dialogTpl /*testpageTpl*/) {
    var plugin = {
        settings: {
            name: "page",
            type: "mod",
            component: "mod_page",
            lang: {
                component: "core"
            }
        },

        render: function(courseId, sectionId, section, module) {
            var data = {
                "courseId": courseId,
                "sectionId": sectionId,
                "section": section,
                "module": module
            };

            return MM.tpl.render(MM.plugins.page.templates.view.html, data);
        },

        /**
         * Callback executed when the contents page is rendered.
         */
        contentsPageRendered: function() {

            $(".page-downloaded").on(MM.clickType, function(e) {
                e.preventDefault();
                var path = $(this).data("path");
                path = path.substring(0, path.lastIndexOf("/") + 1) + "index.html";
                path = MM.fs.getRoot() + "/" + path;

                MM.plugins.page._showPage(path);
            });

            $(".page-download-all").on(MM.clickType, function(e) {
                e.preventDefault();

                var contentId = $(this).data("content");
                var courseId = $(this).data("course");
                var sectionId = $(this).data("section");

                var downloadIcon = $("#download-all-" + contentId);
                if (downloadIcon) {
                    downloadIcon.attr("src", "img/loadingblack.gif");
                }

                var that = $(this);

                var errorFn = function() {
                    downloadIcon.attr("src", "img/download.png");
                    MM.popErrorMessage(MM.lang.s("errordownloading"));
                };

                // Download all the page images, css, etc...
                MM.plugins.contents.downloadAll(courseId, sectionId, contentId,
                    // Success.
                    function(paths) {
                        downloadIcon.remove();
                        var path = paths[0].filePath;
                        path = path.substring(0, path.lastIndexOf("/") + 1);
                        var link = $("#page-" + contentId);
                        link.attr("data-path", path);
                        link.removeClass("page-download-all").addClass("page-downloaded");

                        var indexFileURL = MM.fs.getRoot() + "/" + path + "index.html";

                        MM.plugins.page._showPage(indexFileURL);
                    },
                    // Error.
                    errorFn
                );
            });
        },

        _showPage: function(path) {
            var data = {
                path: path
            };
            var title = MM.tpl.render(MM.plugins.page.templates.dialog.html, data);

            MM.widgets.renderIframeModal(title, path);
        },

        templates: {
            "view": {
                html: viewTpl
            },
            "dialog": {
                html: dialogTpl
            }
			/*"test_page": {
				html: test_pageTpl	
			}*/
        }

    };

    MM.registerPlugin(plugin);

});
{'fraction_non_alphanumeric': 0.1345114648751278, 'fraction_numerical': 0.0014604936468526361, 'mean_word_length': 1.2743274659581534, 'pattern_counts': {'":': 14, '<': 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': 28, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '2840975', 'n_tokens_mistral': 1898, 'n_tokens_neox': 1737, 'n_words': 307}