Tsugi

DiscussionsService
in package

Thread and comment storage for one discussion.

The discussion is an lti_link. Callers put that link on ReqScope first. A cookie session and an LTI launch of tool/tdiscus share one link when link_key is the lessons resource_link_id.

Table of Contents

Constants

default_page_size  : mixed = 20

Methods

commentAddSubComment()  : mixed
commentDelete()  : mixed
commentDeleteDao()  : mixed
commentInsertDao()  : mixed
commentLoad()  : mixed
commentLoadForUpdate()  : mixed
comments()  : mixed
commentSetBoolean()  : mixed
commentsSortableBy()  : mixed
commentUpdateDao()  : mixed
creatorPremiumLevel()  : mixed
discussionTitle()  : mixed
ensureLessonLink()  : int
Find or create the lti_link for a lessons discussion in the current course.
getPurifier()  : mixed
hasReadBaselineForCurrentContext()  : mixed
includeParticipatingInMainBadge()  : mixed
includeParticipationAsPersonal()  : mixed
instructor()  : mixed
linkSetting()  : mixed
mainBadgeCount()  : mixed
maxDepth()  : mixed
pagedQuery()  : mixed
saveLinkSettings()  : mixed
threadDelete()  : mixed
threadInsert()  : mixed
threadLoad()  : mixed
threadLoadForUpdate()  : mixed
threadLoadMarkRead()  : mixed
threadMarkAsReadForUserDao()  : mixed
threads()  : mixed
threadSetBoolean()  : mixed
threadsSortableBy()  : mixed
threadUpdate()  : mixed
threadUserSetBoolean()  : mixed
unreadBadgeCounts()  : mixed
ensureContextReadBaselineForUser()  : mixed
extractMentionedUserIds()  : mixed
hasContextReadBaselineForUser()  : mixed
lid()  : mixed
storedLinkSettings()  : array<string, mixed>
syncMentionsForComment()  : mixed
uid()  : mixed
upsertThreadParticipation()  : mixed

Constants

Methods

commentAddSubComment()

public static commentAddSubComment(mixed $thread_id, mixed $parent_id, mixed $comment) : mixed
Parameters
$thread_id : mixed
$parent_id : mixed
$comment : mixed

commentDelete()

public static commentDelete(mixed $comment_id, mixed $thread_id) : mixed
Parameters
$comment_id : mixed
$thread_id : mixed

commentDeleteDao()

public static commentDeleteDao(mixed $comment, mixed $thread_id) : mixed
Parameters
$comment : mixed
$thread_id : mixed

commentInsertDao()

public static commentInsertDao(mixed $thread, mixed $comment[, mixed $parent_id = 0 ]) : mixed
Parameters
$thread : mixed
$comment : mixed
$parent_id : mixed = 0

commentLoad()

public static commentLoad(mixed $comment_id) : mixed
Parameters
$comment_id : mixed

commentLoadForUpdate()

public static commentLoadForUpdate(mixed $comment_id) : mixed
Parameters
$comment_id : mixed

comments()

public static comments(mixed $thread_id[, mixed $info = false ][, mixed $parent_id = 0 ]) : mixed
Parameters
$thread_id : mixed
$info : mixed = false
$parent_id : mixed = 0

commentSetBoolean()

public static commentSetBoolean(mixed $comment_id, mixed $column, mixed $value) : mixed
Parameters
$comment_id : mixed
$column : mixed
$value : mixed

commentUpdateDao()

public static commentUpdateDao(mixed $old_comment, mixed $comment) : mixed
Parameters
$old_comment : mixed
$comment : mixed

Find or create the lti_link for a lessons discussion in the current course.

public static ensureLessonLink(string $resourceLinkId) : int

link_key is the lessons resource_link_id, the same key an LTI launch stores.

Parameters
$resourceLinkId : string
Return values
int —

link_id, or 0 when the id is not a discussion in the current lessons

hasReadBaselineForCurrentContext()

public static hasReadBaselineForCurrentContext() : mixed

includeParticipatingInMainBadge()

public static includeParticipatingInMainBadge() : mixed

includeParticipationAsPersonal()

public static includeParticipationAsPersonal() : mixed

linkSetting()

public static linkSetting(mixed $key[, mixed $default = false ]) : mixed
Parameters
$key : mixed
$default : mixed = false

mainBadgeCount()

public static mainBadgeCount(mixed $counts) : mixed
Parameters
$counts : mixed

pagedQuery()

public static pagedQuery(mixed $fields, mixed $from, mixed $vars[, mixed $info = false ]) : mixed
Parameters
$fields : mixed
$from : mixed
$vars : mixed
$info : mixed = false

saveLinkSettings()

public static saveLinkSettings(array<string, mixed> $pairs) : mixed
Parameters
$pairs : array<string, mixed>

threadDelete()

public static threadDelete(mixed $thread_id) : mixed
Parameters
$thread_id : mixed

threadInsert()

public static threadInsert([mixed $data = null ]) : mixed
Parameters
$data : mixed = null

threadLoad()

public static threadLoad(mixed $thread_id) : mixed
Parameters
$thread_id : mixed

threadLoadForUpdate()

public static threadLoadForUpdate(mixed $thread_id) : mixed
Parameters
$thread_id : mixed

threadLoadMarkRead()

public static threadLoadMarkRead(mixed $thread_id) : mixed
Parameters
$thread_id : mixed

threadMarkAsReadForUserDao()

public static threadMarkAsReadForUserDao(mixed $thread) : mixed
Parameters
$thread : mixed

threads()

public static threads([mixed $info = false ]) : mixed
Parameters
$info : mixed = false

threadSetBoolean()

public static threadSetBoolean(mixed $thread_id, mixed $column, mixed $value) : mixed
Parameters
$thread_id : mixed
$column : mixed
$value : mixed

threadUpdate()

public static threadUpdate(mixed $thread_id[, mixed $data = false ]) : mixed
Parameters
$thread_id : mixed
$data : mixed = false

threadUserSetBoolean()

public static threadUserSetBoolean(mixed $thread_id, mixed $column, mixed $value) : mixed
Parameters
$thread_id : mixed
$column : mixed
$value : mixed

ensureContextReadBaselineForUser()

private static ensureContextReadBaselineForUser(mixed $link_id, mixed $user_id, mixed $context_id) : mixed
Parameters
$link_id : mixed
$user_id : mixed
$context_id : mixed

extractMentionedUserIds()

private static extractMentionedUserIds(mixed $comment_text) : mixed
Parameters
$comment_text : mixed

hasContextReadBaselineForUser()

private static hasContextReadBaselineForUser(mixed $link_id, mixed $user_id) : mixed
Parameters
$link_id : mixed
$user_id : mixed

storedLinkSettings()

private static storedLinkSettings() : array<string, mixed>
Return values
array<string, mixed>

syncMentionsForComment()

private static syncMentionsForComment(mixed $comment_id, mixed $comment_text, mixed $author_user_id) : mixed
Parameters
$comment_id : mixed
$comment_text : mixed
$author_user_id : mixed

upsertThreadParticipation()

private static upsertThreadParticipation(mixed $thread_id, mixed $user_id) : mixed
Parameters
$thread_id : mixed
$user_id : mixed

        
On this page

Search results