Skip to content

Created a dashboard on the admin side to see contents of each course.#175

Open
Deadman1225 wants to merge 6 commits into
Coding-Club-IITG:devfrom
Deadman1225:dev
Open

Created a dashboard on the admin side to see contents of each course.#175
Deadman1225 wants to merge 6 commits into
Coding-Club-IITG:devfrom
Deadman1225:dev

Conversation

@Deadman1225

Copy link
Copy Markdown

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.

@RsbhThakur RsbhThakur linked an issue Jul 3, 2026 that may be closed by this pull request
@RsbhThakur RsbhThakur self-requested a review July 3, 2026 06:39

@RsbhThakur RsbhThakur left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

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!

Comment thread admin/src/App.jsx Outdated
Comment thread admin/src/pages/Courses.jsx Outdated
Comment thread server/modules/admin/adminDashboard.controller.js Outdated
Comment thread server/modules/admin/adminDashboard.controller.js
Comment thread server/modules/admin/adminDashboard.controller.js Outdated

@RsbhThakur RsbhThakur left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

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.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Course View (2)

2 participants