mirror of
https://github.com/moodle/moodle.git
synced 2025-04-13 20:42:22 +02:00
MDL-75318 core: Event update to share course to MoodleNet
This commit is contained in:
parent
17b565f957
commit
78bc87619b
@ -54,10 +54,16 @@ class moodlenet_resource_exported extends \core\event\base {
|
||||
*/
|
||||
public function get_description() {
|
||||
$outcome = $this->other['success'] ? 'successfully shared' : 'failed to share';
|
||||
$cmids = implode("', '", $this->other['cmids']);
|
||||
|
||||
$description = "The user with id '{$this->userid}' {$outcome} activities to MoodleNet with the " .
|
||||
"following course module ids, from context with id '{$this->data['contextid']}': '{$cmids}'.";
|
||||
if (!empty($this->other['cmids'])) {
|
||||
$cmids = implode("', '", $this->other['cmids']);
|
||||
$description = "The user with id '{$this->userid}' {$outcome} activities to MoodleNet with the " .
|
||||
"following course module ids, from context with id '{$this->data['contextid']}': '{$cmids}'.";
|
||||
} else if (!empty($this->other['courseid'])) {
|
||||
$courseid = implode("', '", $this->other['courseid']);
|
||||
$description = "The user with id '{$this->userid}' {$outcome} course to MoodleNet with the " .
|
||||
"following course id, from context with id '{$this->data['contextid']}': '{$courseid}'.";
|
||||
}
|
||||
|
||||
return rtrim($description, ", '");
|
||||
}
|
||||
|
Loading…
x
Reference in New Issue
Block a user