WikiEducationFoundation / WikiEduDashboard

Wiki Education Foundation's Wikipedia course dashboard system
https://dashboard.wikiedu.org
MIT License
385 stars 600 forks source link

Authorship data "Loading" message does not go away in Article Viewer if no current content is attributed to a student #5769

Closed ragesoss closed 2 months ago

ragesoss commented 2 months ago

What is happening?

In the article viewer, if all of a student's work was removed from the article, the ArticleViewer often keeps showing the loading message in the footer even after the data has been received from the WikiWho server.

Also, the new 'Show last revision' feature will incorrectly show a highlighted color instead of the 'no attributed content' message if you load authorship data for that earlier revision and then switch back to the current revision with no remaining student work.

Also, switching between the 'last' and 'current' views does not cancel pending requests to the WikiWho server; I'm not sure whether it handles the data properly if it then receives (for example) the 'current' data while in 'last' mode or vice versa.

To Reproduce

Here's a current example where this is happening:

https://dashboard.wikiedu.org/courses/Bentley_University/NAS_348_Global_Climate_Change_(Spring_2024)/students/articles/NorthShoreLife?showArticle=50887930

Expected behavior

If the authorship data is received successfully and there is no student work, it should switch to the 'no attributed work' view.

ragesoss commented 2 months ago

@om-chauhan1 would you like to take a look at this one?

omChauhanDev commented 2 months ago

sure, I will fix this.