<commit_before>var templates = [
    "root/externallib/text!root/plugins/grades/activities.html"
];

define(templates,function (activities) {
    var plugin = {
        settings: {
            name: "grades",
            type: "course",
            menuURL: "#course/grades/",
            lang: {
                component: "core"
            }
        },

        routes: [
            ["course/grades/:courseid", "course_grades_activities", "viewActivities"]
        ],

        isPluginVisible: function() {
            // We store the WSName for later.
            if (MM.util.wsAvailable('core_grades_get_grades')) {
                MM.plugins.grades.wsName = 'core_grades_get_grades';
                return true;
            }
            if (MM.util.wsAvailable('local_mobile_core_grades_get_grades')) {
                MM.plugins.grades.wsName = 'local_mobile_core_grades_get_grades';
                return true;
            }
            return false;<commit_msg>MOBILE-549 Grades plugin: Only allow the local_mobile WS<commit_after>var templates = [
    "root/externallib/text!root/plugins/grades/activities.html"
];

define(templates,function (activities) {
    var plugin = {
        settings: {
            name: "grades",
            type: "course",
            menuURL: "#course/grades/",
            lang: {
                component: "core"
            }
        },

        routes: [
            ["course/grades/:courseid", "course_grades_activities", "viewActivities"]
        ],

        isPluginVisible: function() {
            // We store the WSName for later.
            // Since there is a but in the core_grades_get_grades we only allow to use the local_mobile plugin one.
            if (MM.util.wsAvailable('local_mobile_core_grades_get_grades')) {
                MM.plugins.grades.wsName = 'local_mobile_core_grades_get_grades';
                return true;
            }
            return false;
{'fraction_non_alphanumeric': 0.10621761658031088, 'fraction_numerical': 0.0015544041450777201, 'mean_word_length': 1.7904624277456647, 'pattern_counts': {'":': 0, '<': 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': '3790612', 'n_tokens_mistral': 543, 'n_tokens_neox': 523, 'n_words': 103}