Skip to content

Commit

Permalink
SAK-46877 conversations Fix some issues with statistics reporting
Browse files Browse the repository at this point in the history
  • Loading branch information
adrianfish committed Jan 16, 2025
1 parent 94bfdbf commit 0d55b7d
Show file tree
Hide file tree
Showing 14 changed files with 488 additions and 191 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -20,16 +20,20 @@
public enum ConversationsEvents {
TOPIC_CREATED("conversations.topic.created"),
TOPIC_DELETED("conversations.topic.deleted"),
REACTED_TO_TOPIC("conversations.topic.reacted"),
UNREACTED_TO_TOPIC("conversations.topic.unreacted"),
TOPIC_UPDATED("conversations.topic.updated"),
TOPIC_UPVOTED("conversations.topic.upvoted"),
POST_CREATED("conversations.post.created"),
POST_VIEWED("conversations.post.viewed"),
POST_DELETED("conversations.post.deleted"),
REACTED_TO_POST("conversations.post.reacted"),
POST_RESTORED("conversations.post.restored"),
POST_UPDATED("conversations.post.updated"),
POST_UPVOTED("conversations.post.upvoted"),
COMMENT_CREATED("conversations.comment.created"),
COMMENT_DELETED("conversations.comment.deleted"),
COMMENT_UPDATED("conversations.comment.updated"),
REACTED_TO_TOPIC("conversations.topic.reacted"),
UNREACTED_TO_TOPIC("conversations.topic.unreacted");
COMMENT_UPDATED("conversations.comment.updated");

public final String label;

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -46,10 +46,18 @@ public interface ConversationsService {
public static final String SORT_TOPICS_CREATED_DESCENDING = "topicsCreatedDescending";
public static final String SORT_TOPICS_VIEWED_ASCENDING = "topicsViewedAscending";
public static final String SORT_TOPICS_VIEWED_DESCENDING = "topicsViewedDescending";
public static final String SORT_TOPIC_REACTIONS_ASCENDING = "topicReactionsAscending";
public static final String SORT_TOPIC_REACTIONS_DESCENDING = "topicReactionsDescending";
public static final String SORT_TOPIC_UPVOTES_ASCENDING = "topicUpvotesAscending";
public static final String SORT_TOPIC_UPVOTES_DESCENDING = "topicUpvotesDescending";
public static final String SORT_POSTS_CREATED_ASCENDING = "postsCreatedAscending";
public static final String SORT_POSTS_CREATED_DESCENDING = "postsCreatedDescending";
public static final String SORT_REACTIONS_MADE_ASCENDING = "reactionsMadeAscending";
public static final String SORT_REACTIONS_MADE_DESCENDING = "reactionsMadeDescending";
public static final String SORT_POSTS_READ_ASCENDING = "postsReadAscending";
public static final String SORT_POSTS_READ_DESCENDING = "postsReadDescending";
public static final String SORT_POST_REACTIONS_ASCENDING = "postReactionsAscending";
public static final String SORT_POST_REACTIONS_DESCENDING = "postReactionsDescending";
public static final String SORT_POST_UPVOTES_ASCENDING = "postUpvotesAscending";
public static final String SORT_POST_UPVOTES_DESCENDING = "postUpvotesDescending";

public static final String PROP_THREADS_PAGE_SIZE = "conversations.threads.page.size";
public static final String PROP_MAX_THREAD_DEPTH = "conversations.max.thread.depth";
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -16,15 +16,17 @@
package org.sakaiproject.conversations.api;

import lombok.Getter;
import lombok.Setter;

@Getter
@Setter
public class ConversationsStat {

public String name;
public Long topicsCreated;
public Long topicsViewed;
public Long topicReactions;
public Long topicUpvotes;
public Long postsCreated;
public Long reactionsMade;
public Long postReactions;
public Long postUpvotes;
public Long postsViewed;
}
20 changes: 12 additions & 8 deletions conversations/api/src/main/resources/conversations.properties
Original file line number Diff line number Diff line change
Expand Up @@ -165,17 +165,20 @@ post_private_tooltip=This post is private.
post_options=Post options
post_options_menu_tooltip=Post options menu
post_to=Post to
post_upvotes_header=Post Upvotes
posted=posted
posts_header=Posts
posts_viewed_header=Posts Viewed
private_reply=Private (only the author of the post being replied to will see this)
private_topic_reply=Private (only the author of the topic being replied to will see this)
publish=Publish
question=Q:
question_tooltip=This is a question topic
question_type_description=Questions that require an answer
add_reaction=Add Reaction
reactions_header=Reactions
reactions_tooltip=Add a reaction to this topic
topic_reactions_header=Topic Reactions
post_reactions_header=Post Reactions
reactions_tooltip=Add a reaction
replies=replies
reply=Reply
reply_to=Reply to
Expand All @@ -195,10 +198,10 @@ show_comments_tooltip=Show the comments for this post
show_topic_tooltip=Show this topic
soft_delete_this_post=Soft delete this post. You will be able to restore it later.
sort_by_author=Sort by Author
sort_by_created_posts=Sort by the number of posts created
sort_by_created_topics=Sort by the number of topics created
sort_by_reactions_made=Sort by the number of reactions made
sort_by_viewed_topics=Sort by the number of topics viewed
sort_by_created=Sort by the amount created
sort_by_reactions=Sort by the number of reactions
sort_by_upvoted=Sort by the number of reactions
sort_by_viewed=Sort by the number viewed
showdate_picker_tooltip=Show date picker
statistics=Statistics
submit_grade=Submit Grade
Expand All @@ -212,7 +215,7 @@ this_week=This Week
timeframe=Timeframe
title=Conversations
topic_author=Topic Author
topics_created_header=Topics Created
topics_header=Topics
topic_draft=This topic is a draft. Click 'Publish' to publish it.
topic_due=Topic Due:
topic_hidden=This topic is hidden from students. Click 'Show' in the options menu to show it.
Expand All @@ -223,7 +226,8 @@ topic_locked=This topic is locked and no changes can be made.
topic_locked_tooltip=This topic is locked
topic_options_menu_tooltip=Topic options menu
topic_type=Topic Type
topics_read_header=Topics Read
topic_upvotes_header=Topic Upvotes
topics_viewed_header=Topics Viewed
type_discussion=Discussion
type_question=Question
unanswered=Unanswered
Expand Down
Loading

0 comments on commit 0d55b7d

Please sign in to comment.