Code Monkey home page Code Monkey logo

moodle-local_enrolstats's Introduction

moodle-local_enrolstats's People

Contributors

developerck avatar

Stargazers

 avatar

Watchers

 avatar

moodle-local_enrolstats's Issues

Please add travis ci support.

Some of the tests run by the Moodle.org plugins db can be run via travis-ci on each commit in your github repo. Enabling Travis integration helps you to make sure future changes to your plugin will continue to follow the guidelines.

More information on this is here:
https://moodle.org/mod/forum/discuss.php?d=323384

but the short version:
grab this file:
https://github.com/moodlehq/moodle-plugin-ci/blob/main/.travis.dist.yml
rename it as .travis.yml and put in the root of your github directory.
Go to:
https://travis-ci.org/profile/YOUR_GITHUB_USERNAME
Flick the switch for this repo.

then on every commit you make to github it will fire off a request to travis to run the tests in .travis.yml and will give you traffic lights beside each commit and generate a report.

something else you might want to change:
in .travis.yml the default file has this line:

env:
global:

MOODLE_BRANCH=MOODLE_38_STABLE
you might want to add other branches to that list - so you might want to change it something like:

env:
global:
MOODLE_BRANCH=MOODLE_35_STABLE
MOODLE_BRANCH=MOODLE_36_STABLE
MOODLE_BRANCH=MOODLE_37_STABLE

incorrect camel case in lang strings.

Moodle uses sentence case - please check your lang strings as some use camel case.

for example strings like:
$string['mystring'] = "My String";
should be:
$string['mystring'] = "My string";

Note: this is not a blocker for approval in the plugins db.

Several warnings in developer mode

There are several notices and warnings when the full developer debug mode enabled

1:
Unknown table specified in objecttable field

line 786 of /lib/classes/event/base.php: call to debugging()
line 808 of /lib/classes/event/base.php: call to core\event\base->validate_before_trigger()
line 81 of /local/enrolstats/index.php: call to core\event\base->trigger()

Since the plugin does not require any DB tables, the table should not be specified in enrolstats_view::init(). This warning is easily fixed by removing "$this->data['objecttable'] = 'local_enrolstats';" from init() in enrolstats/classes/event/enrolstats_view.php

2:
Class 'coursecat' has been renamed for the autoloader and is now deprecated. Please use 'core_course_category' instead.

line 137 of /lib/classes/component.php: call to debugging()
line ? of unknownfile: call to core_component::classloader()
line 88 of /local/enrolstats/index.php: call to spl_autoload_call()

As it says, "coursecat" should be simply renamed to in "core_course_category" enrolstats/index.php:
$courses = core_course_category::get($categoryid)->get_courses($options);
$coursecount = core_course_category::get($categoryid)->get_courses_count(array('recursive' => true));

ADDITIONALLY: there is also no need to include coursecatlib.php, so the line:
require_once($CFG->libdir . '/coursecatlib.php');
can be simply removed

3:
Notice: Undefined variable: m in /var/www/html/ticket/moodle_38/local/enrolstats/index.php on line 137

$m should be checked for existence and optionally reinitiated, e.g. $m = isset($m)?$m:'';

4:
in index.php the oage URL is most probably not right:
$PAGE->set_url(new moodle_url('/local/aac/enrols.php'));
Similarly later,
$select = new single_select(new moodle_url('/local/aac/enrols.php'), 'categoryid',

missing privacy api string.

If you view the privacy api report under admin > users > privacy and policies > "plugin privacy registry" I'd expect to see a missing string in your plugin for privacy:metadata

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.