$output=$this->addTimestampToOutput("{$agent->getName()} is thanking {$user->getName()} for edit {$revisionRecord->getId()} on {$title->getPrefixedText()}");
$revisionRecord=$this->addToPageContent($title,$user,"an even better edit! ~~~~");
Event::create([
'type'=>'edit-thank',
'title'=>$title,
'extra'=>[
'revid'=>$revisionRecord->getId(),
'thanked-user-id'=>$user->getId(),
'source'=>'generateSampleNotifications.php',
],
'agent'=>$agent,
'timestamp'=>$this->getTimestamp(),
]);
Event::create([
'type'=>'edit-thank',
'title'=>$title,
'extra'=>[
'revid'=>$revisionRecord->getId(),
'thanked-user-id'=>$user->getId(),
'source'=>'generateSampleNotifications.php',
],
'agent'=>$otherUser,
'timestamp'=>$this->getTimestamp(),
]);
$output=$this->addTimestampToOutput("{$agent->getName()} and {$otherUser->getName()} are thanking {$user->getName()} for edit {$revisionRecord->getId()} on {$title->getPrefixedText()}");
$output=$this->addTimestampToOutput("{$agent->getName()} is adding {$user->getName()} to {$chem101->getPrefixedText()} as instructor, student, campus volunteer and online volunteer");
$this->output("$output\n");
$types=[
'ep-instructor-add-notification',
'ep-online-add-notification',
'ep-campus-add-notification',
'ep-student-add-notification',
];
foreach($typesas$type){
$notificationManager->trigger(
$type,
[
'role-add-title'=>$chem101,
'agent'=>$agent,
'users'=>[$user->getId()],
]
);
}
// NOTE: Not generating 'ep-course-talk-notification' for now
// as it requires a full setup to actually work (institution, course, instructors, students).