mirror of
https://github.com/moodle/moodle.git
synced 2025-03-24 09:30:17 +01:00
Merge branch 'MDL-77400-401' of https://github.com/dpalou/moodle into MOODLE_401_STABLE
This commit is contained in:
commit
0792cbf3c8
@ -69,13 +69,19 @@ class enrolment {
|
||||
*
|
||||
* @param string $value
|
||||
* @param stdClass $row
|
||||
* @return lang_string|null
|
||||
* @return string|null
|
||||
*/
|
||||
public static function enrolment_status(string $value, stdClass $row): ?lang_string {
|
||||
public static function enrolment_status(string $value, stdClass $row): ?string {
|
||||
if (!$row->userid) {
|
||||
return null;
|
||||
}
|
||||
$statusvalues = self::enrolment_values();
|
||||
return $statusvalues[(int) $value] ?? null;
|
||||
|
||||
$value = (int) $value;
|
||||
if (!array_key_exists($value, $statusvalues)) {
|
||||
return null;
|
||||
}
|
||||
|
||||
return (string) $statusvalues[$value];
|
||||
}
|
||||
}
|
||||
|
Loading…
x
Reference in New Issue
Block a user