moodle/lib/classes/event/webservice_service_updated.php

83 lines
2.3 KiB
PHP
Raw Normal View History

<?php
// This file is part of Moodle - http://moodle.org/
//
// Moodle is free software: you can redistribute it and/or modify
// it under the terms of the GNU General Public License as published by
// the Free Software Foundation, either version 3 of the License, or
// (at your option) any later version.
//
// Moodle is distributed in the hope that it will be useful,
// but WITHOUT ANY WARRANTY; without even the implied warranty of
// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
// GNU General Public License for more details.
//
// You should have received a copy of the GNU General Public License
// along with Moodle. If not, see <http://www.gnu.org/licenses/>.
/**
* Web service service updated event.
*
* @package core
* @copyright 2013 Frédéric Massart
* @license http://www.gnu.org/copyleft/gpl.html GNU GPL v3 or later
*/
namespace core\event;
defined('MOODLE_INTERNAL') || die();
/**
* Web service service updated event class.
*
* @package core
* @since Moodle 2.6
* @copyright 2013 Frédéric Massart
* @license http://www.gnu.org/copyleft/gpl.html GNU GPL v3 or later
*/
class webservice_service_updated extends base {
/**
* Returns description of what happened.
*
* @return string
*/
public function get_description() {
return "The user with id '$this->userid' updated the web service with id '$this->objectid'.";
}
/**
* Return localised event name.
*
* @return string
*/
public static function get_name() {
MDL-43557 events: removed underscores from event string keys AMOS START MOV [event_legacy_logged, logstore_legacy],[eventlegacylogged,logstore_legacy] MOV [event_cohort_created,cohort],[eventcohortcreated,cohort] MOV [event_cohort_deleted,cohort],[eventcohortdeleted,cohort] MOV [event_cohort_member_added,cohort],[eventcohortmemberadded,cohort] MOV [event_cohort_member_removed,cohort],[eventcohortmemberremoved,cohort] MOV [event_cohort_updated,cohort],[eventcohortupdated,cohort] MOV [event_group_created,group],[eventgroupcreated,group] MOV [event_group_deleted,group],[eventgroupdeleted,group] MOV [event_group_member_added,group],[eventgroupmemberadded,group] MOV [event_group_member_removed,group],[eventgroupmemberremoved,group] MOV [event_group_updated,group],[eventgroupupdated,group] MOV [event_grouping_created,group],[eventgroupingcreated,group] MOV [event_grouping_deleted,group],[eventgroupingdeleted,group] MOV [event_grouping_updated,group],[eventgroupingupdated,group] MOV [event_webservice_function_called,webservice],[eventwebservicefunctioncalled,webservice] MOV [event_webservice_login_failed,webservice],[eventwebserviceloginfailed,webservice] MOV [event_webservice_service_created,webservice],[eventwebserviceservicecreated,webservice] MOV [event_webservice_service_deleted,webservice],[eventwebserviceservicedeleted,webservice] MOV [event_webservice_service_updated,webservice],[eventwebserviceserviceupdated,webservice] MOV [event_webservice_service_user_added,webservice],[eventwebserviceserviceuseradded,webservice] MOV [event_webservice_service_user_removed,webservice],[eventwebserviceserviceuserremoved,webservice] MOV [event_webservice_token_created,webservice],[eventwebservicetokencreated,webservice] MOV [event_webservice_token_sent,webservice],[eventwebservicetokensent,webservice] MOV [event_user_loggedin,auth],[eventuserloggedin,auth] MOV [event_assessable_uploaded,assignsubmission_file],[eventassessableuploaded,assignsubmission_file] MOV [event_assessable_uploaded,assignsubmission_onlinetext],[eventassessableuploaded,assignsubmission_onlinetext] MOV [event_chapter_created,mod_book],[eventchaptercreated,mod_book] MOV [event_chapter_deleted,mod_book],[eventchapterdeleted,mod_book] MOV [event_chapter_updated,mod_book],[eventchapterupdated,mod_book] MOV [event_chapter_viewed,mod_book],[eventchapterviewed,mod_book] MOV [event_book_exported,booktool_exportimscp],[eventbookexported,booktool_exportimscp] MOV [event_book_printed,booktool_print],[eventbookprinted,booktool_print] MOV [event_chapter_printed,booktool_print],[eventchapterprinted,booktool_print] MOV [event_message_sent,mod_chat],[eventmessagesent,mod_chat] MOV [event_sessions_viewed,mod_chat],[eventsessionsviewed,mod_chat] MOV [event_answer_created,mod_choice],[eventanswercreated,mod_choice] MOV [event_answer_updated,mod_choice],[eventanswerupdated,mod_choice] MOV [event_report_viewed,mod_choice],[eventreportviewed,mod_choice] MOV [event_assessable_uploaded,mod_forum],[eventassessableuploaded,mod_forum] MOV [event_assessable_uploaded,mod_workshop],[eventassessableuploaded,mod_workshop] AMOS END
2014-04-16 18:29:18 -07:00
return get_string('eventwebserviceserviceupdated', 'webservice');
}
/**
* Get URL related to the action.
*
* @return \moodle_url
*/
public function get_url() {
return new \moodle_url('/admin/webservice/service.php', array('id' => $this->objectid));
}
/**
* Init method.
*
* @return void
*/
protected function init() {
$this->context = \context_system::instance();
$this->data['crud'] = 'u';
$this->data['edulevel'] = self::LEVEL_OTHER;
$this->data['objecttable'] = 'external_services';
}
public static function get_objectid_mapping() {
// Webservices are not included in backups.
return array('db' => 'external_services', 'restore' => base::NOT_MAPPED);
}
}