feat: Add Learners list [BD-38] [TNL-8841] (#83)

Adds a new tab and listing view for learners in a course that have interacted with the discussions forums. It reports stats about the learner's created posts, comments, and reported content. 

Co-authored-by: Kshitij Sobti <kshitij@sobti.in>
This commit is contained in:
Hamza Khchine
2022-03-28 05:53:26 +00:00
committed by GitHub
parent 4b17de8c13
commit 2c40685932
27 changed files with 728 additions and 2 deletions

View File

@@ -119,6 +119,11 @@ export const TopicOrdering = {
BY_COMMENT_COUNT: 'sortByCommentCount',
};
export const LearnersOrdering = {
BY_FLAG: 'flagged',
BY_LAST_ACTIVITY: 'activity',
};
/**
* Enum for discussion provider types supported by the MFE.
* @type {{OPEN_EDX: string, LEGACY: string}}
@@ -134,6 +139,10 @@ export const Routes = {
DISCUSSIONS: {
PATH: BASE_PATH,
},
LEARNERS: {
PATH: `${BASE_PATH}/learners`,
LEARNER: `${BASE_PATH}/learners/:learnerUsername`,
},
POSTS: {
PATH: `${BASE_PATH}/topics/:topicId`,
MY_POSTS: `${BASE_PATH}/my-posts(/:postId)?`,
@@ -177,4 +186,5 @@ export const ALL_ROUTES = []
.concat(Routes.COMMENTS.PATH)
.concat(Routes.TOPICS.PATH)
.concat([Routes.POSTS.ALL_POSTS, Routes.POSTS.MY_POSTS])
.concat([Routes.LEARNERS.LEARNER, Routes.LEARNERS.PATH])
.concat([Routes.DISCUSSIONS.PATH]);