asayler / COG-Web

Web Frontend for COG
GNU Affero General Public License v3.0
2 stars 3 forks source link

Courses with no assignments/tests show as "Loading..." #34

Closed asayler closed 8 years ago

asayler commented 8 years ago

This is a minor regression likely due to all the recent JS changes.

When a course has no Assignments (or no Tests), the COG API returns an empty list. The web interface seems to recognize this (see log output below), but then fails to ever update the dropdown status to show something like instead of "Loading...". In the past, the Dropdowns stayed disabled and displayed something like "No Assignments" in this situation.

This only really comes up at the start of the semester before any assignments have been created, but it might be nice to fix.

cog-web:session requested access to `/submit/` with token: 4ecf6cd1 +0ms
debug.js:439 cog-web:session access permitted to restricted page `/submit/` +4ms
debug.js:439 cog-web:api constructing new interface object instance with token 4ecf6cd1 +27ms
debug.js:439 cog-web:common document fully loaded, now updating navigation bar active marker +5ms
debug.js:439 cog-web:common user is authenticated, populating header with user information +5ms
debug.js:439 cog-web:page:submit page initialization process started +2ms
debug.js:439 cog-web:api dispatching request to `/assignments/submitable/` +0ms
debug.js:439 cog-web:page:submit loaded 0 assignment identifier(s) from the server +374ms