MDL-40682 MDL-41000 event name and description return strings

event description is non-localised string
This commit is contained in:
Marina Glancy
2013-08-06 22:25:21 +10:00
parent 4b96f2ae62
commit 2cf88d54fb
2 changed files with 5 additions and 9 deletions
+5 -8
View File
@@ -61,22 +61,19 @@ class blog_entry_created extends \core\event\base {
/**
* Returns localised general event name.
*
* @return \lang_string
* @return string
*/
public static function get_name() {
return new \lang_string("evententryadded", "core_blog");
return get_string("evententryadded", "core_blog");
}
/**
* Returns localised description of what happened.
* Returns non-localised event description with id's for admin use only.
*
* @return \lang_string
* @return string
*/
public function get_description() {
$a = new \stdClass();
$a->subject = $this->other['subject'];
$a->userid = $this->userid;
return new \lang_string("evententryaddeddesc", "core_blog", $a);
return 'Blog entry "'. $this->other['subject']. '" was created by user with id '. $this->userid;
}
/**