Skip to content
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
8 changes: 5 additions & 3 deletions classes/post/post_control.php
Original file line number Diff line number Diff line change
Expand Up @@ -464,8 +464,8 @@ private function execute_reply(object $form): void {
$event->trigger();

// Subscribe to this thread.
// Please be aware that in future the use of build_db_object() should be replaced with only $this->info->discussion,
// as the subscription class should be refactored with the new way of working with posts.
// LEARNWEB-TODO: Please be aware that in future the use of build_db_object() should be replaced with only
// $this->info->discussion, as the subscription class should be refactored with the new way of working with posts.
subscriptions::moodleoverflow_post_subscription(
$form,
$this->info->moodleoverflow,
Expand Down Expand Up @@ -611,9 +611,11 @@ public function build_postform(array $pageparams) {
);

// If the post is anonymous, attachments should have an anonymous author when editing the attachment.
// LEARNWEB-TODO: Please be aware that in future the use of build_db_object() should be replaced with only
// $this->info->discussion, when the new way of working with posts is fully implemented.
if (
$draftitemid && $this->interaction == 'edit' && anonymous::is_post_anonymous(
$this->info->discussion,
$this->info->discussion->get_db_object(),
$this->info->moodleoverflow,
$this->prepost->userid
)
Expand Down
Loading