feat: implement learners area new UI (#197)

* feat: implement learners area new UI

* fix: learners list UI

* fix: initial learner sort based on role
This commit is contained in:
Awais Ansari
2022-06-20 16:14:13 +05:00
committed by GitHub
parent 84148954d0
commit 59187d2217
34 changed files with 460 additions and 737 deletions

View File

@@ -200,21 +200,3 @@ export async function uploadFile(blob, filename, courseId, threadKey) {
}
return data;
}
/**
* Get the posts by a specific user in a course's discussions
*
* @param {string} courseId Course ID of the course
* @param {string} username Username of the user
* @param {number} page
* @returns API Response object in the format
* {
* results: [array of posts],
* pagination: {count, num_pages, next, previous}
* }
*/
export async function getUserPosts(courseId, username, { page }) {
const { data } = await getAuthenticatedHttpClient()
.get(threadsApiUrl, { params: { course_id: courseId, author: username, page } });
return data;
}