local/sanitychecker/view
Nota: Pendiente de Traducir. ¡Anímese a traducir esta página!. ( y otras páginas pendientes)
Este plugin complemento proporciona una interfaz para implementar revisiones de sanidad en Moodle.
Versión de Moodle
Moodle 2.3 o más reciente
Instalación para for Moodle 2.3, 2.4, 2.5 y 2.6
- Vaya al directorio correcto
- Antes que nada, cmabie su directorio de trabajo hacia YOUR_MOODLE_DIRROOT/local en donde : YOUR_MOODLE_DIRROOT representa el directorio raíz de su sitio Moodle
obtenga el plugin
- usando git
- Clone el repositorio del plugin repositoryal correr :
git clone https://github.com/eviweb/moodle-local_sanitychecker.git sanitychecker
usando archivo
- Descargue el archivo ZIP directamente desde github y des-comprímalo dentro del subdirectorio sanitychecker:
wget -c https://github.com/eviweb/moodle-local_sanitychecker/archive/master.zip unzip master.zip && mv moodle-local_sanitychecker-master sanitychecker
finalice la instalación
- Ingrese con una cuenta de administrador y vay a la página de notificaciones para terminar la instalación.
- Esta página está en :
http(s)://YOUR_MOODLE_SITE/admin/index.php en donde : YOUR_MOODLE_SITE es el dominio de su sitio Moodle.
Cómo usar esta característica
- Once installed you will find a link under
Settings > Site administration
- called Sanity checker. By clicking on it, you will be redirected to the plugin dashboard.
- Its table lists all the available sanity checkers under four columns :
Name : the implementation name Description : should describe what the checker is supposed to do Actions : here is displayed a dynamic link to run the actions to perform > check : to run the tests > resolve : in case a problem is found, apply the fix Information : displays contextual information about what is done
- So choose which test you want to run and click on Run test.
- If a problem is found the previous action link is renamed Resolve issue.
- Click on it to apply the fix.
How to create a new sanity checker
- implement the API
Create an implementation of the SanityChecker interface
interface SanityChecker {
/** * get the sanity checker name * * @return string returns the name of this implementation */ public function getName();
/** * get the description of what this sanity check does * * @return string returns the description of this implementation */ public function getDescription();
/** * perform the test * * @return boolean returns true if the test succeeds, false if it fails */ public function doCheck();
/** * get information on the problem detected * * @return string returns information related to the detected problem * or an empty string if there is no issue */ public function getInformationOnIssue();
/** * resolve the problem */ public function resolveIssue();
}
or extends the abstract DatabaseSanityChecker
which is a class helper to perform sanity checks on database records.
register the service implementation
Add the class full name of your implementation on a new line in the ./classes/META-INF/services/evidev.moodle.plugins.sanitychecker file.
For now, you add to take care about providing a way to load your class by your own or to install it under the ./classes directory.
Each folder under the subtree of this directory, except META-INF , represents a part of the class namespace.
- To illustrate this, the SanityChecker interface is declared under the namespace evidevmoodleplugins and is located at
./classes/evidev/moodle/plugins/SanityChecker.php
Vea tambi´+en
Página de la descarga
https://moodle.org/plugins/view.php?plugin=local_sanitychecker