Comments added

Signed-off-by: Valentin Popov <info@valentineus.link>
This commit is contained in:
2018-09-20 18:36:28 +04:00
parent 68a1928a4c
commit 5115697a62
2 changed files with 5 additions and 0 deletions

View File

@ -38,11 +38,13 @@ $baseUrl = new moodle_url( $mainPage );
admin_externalpage_setup( "local_webhooks", "", null, $baseUrl, array() );
$context = context_system::instance();
/* Remove the service */
if ( !empty( $deleteId ) && confirm_sesskey() ) {
local_webhooks_api::delete_service( $deleteId );
redirect( $PAGE->url, new lang_string( "deleted", "moodle" ) );
}
/* Disable / Enable the service */
if ( !empty( $hideShowId ) && confirm_sesskey() ) {
$service = local_webhooks_api::get_service( $hideShowId );
$service->status = !(bool) $service->status;