Merge branch 'wip-mdl-41000' of git://github.com/rajeshtaneja/moodle
This commit is contained in:
@@ -82,7 +82,6 @@ $string['errorminpasswordnonalphanum'] = 'Passwords must have at least {$a} non-
|
||||
$string['errorminpasswordupper'] = 'Passwords must have at least {$a} upper case letter(s).';
|
||||
$string['errorpasswordupdate'] = 'Error updating password, password not changed';
|
||||
$string['event_user_loggedin'] = 'User has logged in';
|
||||
$string['event_user_loggedin_desc'] = 'User {$a} has logged in';
|
||||
$string['forcechangepassword'] = 'Force change password';
|
||||
$string['forcechangepasswordfirst_help'] = 'Force users to change password on their first login to Moodle.';
|
||||
$string['forcechangepassword_help'] = 'Force users to change password on their next login to Moodle.';
|
||||
|
||||
@@ -503,6 +503,7 @@ $string['unknowncourse'] = 'Unknown course named "{$a}"';
|
||||
$string['unknowncourseidnumber'] = 'Unknown course ID "{$a}"';
|
||||
$string['unknowncoursesection'] = 'Unknown course section in course "{$a}"';
|
||||
$string['unknowncourserequest'] = 'Unknown course request';
|
||||
$string['unknownevent'] = 'Unknown event';
|
||||
$string['unknownfiletype'] = 'Error unknown filtertype';
|
||||
$string['unknowngroup'] = 'Unknown group "{$a}"';
|
||||
$string['unknownhelp'] = 'Unknown help topic {$a}';
|
||||
|
||||
@@ -181,6 +181,8 @@ $string['errorbadrolename'] = 'Incorrect role name';
|
||||
$string['errorbadroleshortname'] = 'Incorrect role short name';
|
||||
$string['errorexistsrolename'] = 'Role name already exists';
|
||||
$string['errorexistsroleshortname'] = 'Role name already exists';
|
||||
$string['eventroleassigned'] = 'Role assigned';
|
||||
$string['eventroleunassigned'] = 'Role unassigned';
|
||||
$string['existingadmins'] = 'Current site administrators';
|
||||
$string['existingusers'] = '{$a} existing users';
|
||||
$string['explanation'] = 'Explanation';
|
||||
|
||||
@@ -234,25 +234,21 @@ abstract class base implements \IteratorAggregate {
|
||||
*
|
||||
* Override in subclass, we can not make it static and abstract at the same time.
|
||||
*
|
||||
* TODO: MDL-37658
|
||||
*
|
||||
* @return string|\lang_string
|
||||
* @return string
|
||||
*/
|
||||
public static function get_name() {
|
||||
// Override in subclass with real lang string.
|
||||
$parts = explode('\\', get_called_class());
|
||||
if (count($parts) !== 3) {
|
||||
return 'unknown event';
|
||||
return get_string('unknownevent', 'error');
|
||||
}
|
||||
return $parts[0].': '.str_replace('_', ' ', $parts[2]);
|
||||
}
|
||||
|
||||
/**
|
||||
* Returns localised description of what happened.
|
||||
* Returns non-localised event description with id's for admin use only.
|
||||
*
|
||||
* TODO: MDL-37658
|
||||
*
|
||||
* @return string|\lang_string
|
||||
* @return string
|
||||
*/
|
||||
public function get_description() {
|
||||
return null;
|
||||
|
||||
@@ -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;
|
||||
}
|
||||
|
||||
/**
|
||||
|
||||
@@ -36,12 +36,12 @@ defined('MOODLE_INTERNAL') || die();
|
||||
class user_loggedin extends \core\event\base {
|
||||
|
||||
/**
|
||||
* 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() {
|
||||
return new \lang_string('event_user_loggedin_desc', '', $this->get_username());
|
||||
return 'Userid ' . $this->userid . ' has logged in';
|
||||
}
|
||||
|
||||
/**
|
||||
@@ -57,10 +57,10 @@ class user_loggedin extends \core\event\base {
|
||||
/**
|
||||
* Return localised event name.
|
||||
*
|
||||
* @return \lang_string
|
||||
* @return string
|
||||
*/
|
||||
public static function get_name() {
|
||||
return new \lang_string('event_user_loggedin');
|
||||
return new get_string('event_user_loggedin', 'auth');
|
||||
}
|
||||
|
||||
/**
|
||||
|
||||
Reference in New Issue
Block a user