mirror of
https://github.com/moodle/moodle.git
synced 2025-08-05 08:56:36 +02:00
MDL-41000 Events: Fixed return values for get_name() and get_description() in existing events
Changes done for following events: - \core_auth\event\user_loggedin - \core\event\role_assigned - \core\event\role_unassigned
This commit is contained in:
parent
fc9fc9fb30
commit
91665753df
5 changed files with 16 additions and 19 deletions
|
@ -35,20 +35,18 @@ class role_assigned extends base {
|
|||
/**
|
||||
* Returns localised general event name.
|
||||
*
|
||||
* @return string|\lang_string
|
||||
* @return string
|
||||
*/
|
||||
public static function get_name() {
|
||||
//TODO: MDL-37658 localise
|
||||
return 'Role assigned';
|
||||
return get_string('eventroleassigned', 'role');
|
||||
}
|
||||
|
||||
/**
|
||||
* Returns localised description of what happened.
|
||||
* Returns non-localised event description with id's for admin use only.
|
||||
*
|
||||
* @return string|\lang_string
|
||||
* @return string
|
||||
*/
|
||||
public function get_description() {
|
||||
//TODO: MDL-37658 localise
|
||||
return 'Role '.$this->objectid.' was assigned to user '.$this->relateduserid.' in context '.$this->contextid;
|
||||
}
|
||||
|
||||
|
|
|
@ -35,21 +35,19 @@ class role_unassigned extends base {
|
|||
/**
|
||||
* Returns localised general event name.
|
||||
*
|
||||
* @return string|\lang_string
|
||||
* @return string
|
||||
*/
|
||||
public static function get_name() {
|
||||
//TODO: MDL-37658 localise
|
||||
return 'Role unassigned';
|
||||
return get_string('eventroleunassigned', 'role');
|
||||
}
|
||||
|
||||
/**
|
||||
* Returns localised description of what happened.
|
||||
* Returns non-localised event description with id's for admin use only.
|
||||
*
|
||||
* @return string|\lang_string
|
||||
* @return string
|
||||
*/
|
||||
public function get_description() {
|
||||
//TODO: MDL-37658 localise
|
||||
return 'Role '.$this->objectid.'was unassigned from user '.$this->relateduserid.' in context '.$this->contextid;
|
||||
return 'Role '.$this->objectid.' was unassigned from user '.$this->relateduserid.' in context '.$this->contextid;
|
||||
}
|
||||
|
||||
/**
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue