{"id":20945914,"url":"https://github.com/eviweb/moodle-local_sanitychecker","last_synced_at":"2026-04-26T19:32:31.082Z","repository":{"id":147347804,"uuid":"9320051","full_name":"eviweb/moodle-local_sanitychecker","owner":"eviweb","description":"This plugin provides an interface to implement sanity checks on moodle","archived":false,"fork":false,"pushed_at":"2013-12-17T12:27:56.000Z","size":300,"stargazers_count":3,"open_issues_count":0,"forks_count":2,"subscribers_count":2,"default_branch":"master","last_synced_at":"2025-12-26T08:35:07.006Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":null,"language":"PHP","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"mit","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/eviweb.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null}},"created_at":"2013-04-09T11:54:51.000Z","updated_at":"2017-10-16T08:49:01.000Z","dependencies_parsed_at":"2023-03-25T12:16:21.376Z","dependency_job_id":null,"html_url":"https://github.com/eviweb/moodle-local_sanitychecker","commit_stats":null,"previous_names":[],"tags_count":0,"template":false,"template_full_name":null,"purl":"pkg:github/eviweb/moodle-local_sanitychecker","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/eviweb%2Fmoodle-local_sanitychecker","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/eviweb%2Fmoodle-local_sanitychecker/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/eviweb%2Fmoodle-local_sanitychecker/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/eviweb%2Fmoodle-local_sanitychecker/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/eviweb","download_url":"https://codeload.github.com/eviweb/moodle-local_sanitychecker/tar.gz/refs/heads/master","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/eviweb%2Fmoodle-local_sanitychecker/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":32310804,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2026-04-26T19:15:34.056Z","status":"ssl_error","status_checked_at":"2026-04-26T19:15:15.467Z","response_time":129,"last_error":"SSL_read: unexpected eof while reading","robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":false,"can_crawl_api":true,"host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":[],"created_at":"2024-11-18T23:51:12.610Z","updated_at":"2026-04-26T19:32:31.063Z","avatar_url":"https://github.com/eviweb.png","language":"PHP","funding_links":[],"categories":[],"sub_categories":[],"readme":"Moodle - Sanity Checker\n=======================\nThis plugin provides an interface to implement sanity checks on moodle.   \n    \nMoodle version\n--------------\n\\\u003e= 2.3   \n    \nInstallation\n------------\n### go to the right directory\nBefore all, change your working directory to `YOUR_MOODLE_DIRROOT/local` where : \n*YOUR_MOODLE_DIRROOT* represents the root directory of your moodle site.   \n    \n### get the plugin\n#### using git\nClone the plugin repository by running : \n`git clone https://github.com/eviweb/moodle-local_sanitychecker.git sanitychecker`   \n    \n#### using archive\nDownload the zip archive directly from github and uncompress under *sanitychecker* directory :    \n    \n    wget -c https://github.com/eviweb/moodle-local_sanitychecker/archive/master.zip    \n    unzip master.zip \u0026\u0026 mv moodle-local_sanitychecker-master sanitychecker    \n     \n### finalize the installation\nAuthenticate with an administrator account and go to the notifications page to \nfinish the install. This page is located under :    \n`http(s)://YOUR_MOODLE_SITE/admin/index.php` where : \n*YOUR_MOODLE_SITE* is the domain of your moodle site.   \n     \nHow to use this feature\n-----------------------\nOnce installed you will find a link under `Settings \u003e Site administration` called \n`Sanity checker` by clicking on it, you will be redirected to the plugin dashboard.    \nIts table lists all the available sanity checkers under four columns :     \n    \n1.  _Name :_ the implementation name    \n2.  _Description :_ should describe what the checker is supposed to do\n3.  _Actions :_ here is displayed a dynamic link to run the actions to perform    \n\u003e   check : to run the tests    \n\u003e   resolve : in case a problem is found, apply the fix    \n4.  _Information :_ displays contextual information about what is done    \n    \nSo choose which test you want to run and click on **Run test**.    \nIf a problem is found the previous action link is renamed **Resolve issue**.   \nClick on it to apply the fix.    \n     \nHow create new sanity checker\n-----------------------------\n### implement the API\nCreate an implementation of the `SanityChecker`interface :    \n    \n    interface SanityChecker\n    {\n        /**\n         * get the sanity checker name\n         * \n         * @return string       returns the name of this implementation\n         */\n        public function getName();\n\n        /**\n         * get the description of what this sanity check does\n         * \n         * @return string       returns the description of this implementation\n         */\n        public function getDescription();\n\n        /**\n         * perform the test\n         * \n         * @return boolean      returns true if the test succeeds, false if it fails\n         */\n        public function doCheck();\n\n        /**\n         * get information on the problem detected\n         * \n         * @return string       returns information related to the detected problem\n         *                      or an empty string if there is no issue\n         */\n        public function getInformationOnIssue();\n\n        /**\n         * resolve the problem\n         */\n        public function resolveIssue();\n    }\n\nor extends the abstract `DatabaseSanityChecker` which is a class helper to perform \nsanity checks on database records.    \n     \n### register the service implementation\nAdd the class full name of your implementation on a new line in the \n`./classes/META-INF/services/evidev.moodle.plugins.sanitychecker` file.    \n    \n**For now, you add to take care about providing a way to load your class by your own\nor to install it under the `./classes` directory.**    \n    \nEach folder under the subtree of this directory, except `META-INF`, represents \na part of the class namespace.    \nTo illustrate this, the `SanityChecker` interface is declared under the namespace \n`\\evidev\\moodle\\plugins` and is located at `./classes/evidev/moodle/plugins/SanityChecker.php`\n     \nSanity Checker List\n-------------------\nPlease refer to the [related wiki page](https://github.com/eviweb/moodle-local_sanitychecker/wiki)    \n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Feviweb%2Fmoodle-local_sanitychecker","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Feviweb%2Fmoodle-local_sanitychecker","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Feviweb%2Fmoodle-local_sanitychecker/lists"}