Created a dashboard on the admin side to see contents of each course.#175
Created a dashboard on the admin side to see contents of each course.#175Deadman1225 wants to merge 6 commits into
Conversation
RsbhThakur
left a comment
There was a problem hiding this comment.
Note on Client Cache Desync:
Currently, when an admin deletes a file or folder using this new dashboard, it correctly deletes it from MongoDB, but the student client still shows the stale deleted file. This is because the student portal aggressively caches the course tree in sessionStorage (under the AllCourses key).
Since we want admin updates to reflect in the client, we need to invalidate this cache. As a simple fix, when navigating a folder on the client (handleFolderClick in BrowseFolder), we should fire an asynchronous background refresh API request to the backend and dispatch the fresh data to Redux. That way, any deleted items disappear dynamically for the student!
There was a problem hiding this comment.
Note on Client Cache Desync:
Currently, when an admin deletes a file or folder using this new dashboard, it correctly deletes it from MongoDB, but the student client still shows the stale deleted file. This is because the student portal aggressively caches the course tree in sessionStorage (under the AllCourses key).
Since we want admin updates to reflect in the client, we need to invalidate this cache. As a simple fix, when navigating a folder on the client (handleFolderClick in BrowseFolder), we should fire an asynchronous background refresh API request to the backend and dispatch the fresh data to Redux. That way, any deleted items disappear dynamically for the student!
Almost all issues are fixed! But this issue is still unresolved, @Deadman1225 think something for this.
The admin can see each folders and file for specific course number of students registered and contributions.
The admin can approve each contributions or reject it.
The admin can also delete any folder or file as well.