Open SteadyStatus21 opened 2 years ago
Usually reloading the page fixes this problem. If it still doesn't work, clear cookies for the site and log in again.
This looks like a promising project. I also have the same issue, reloading, clearing cache, or clearing cookies does not work.
Can you inspect element and show what it says in the console?
Stuck here forever
Ok, seems like an issue with getting the current period. Can you go to this branch deploy https://log-period-dates--gradenight.netlify.app/, open the console, and screenshot it again? Please expand the first object's periodDates array and all the array elements, like this:
here it is. It doesn't print in console until I reload after logging in
Oh, that's strange. Seems like your district has 7 grading periods but only gradebook data for 4 of them? I'm not sure I see a link between the listed period dates and the gradebook data.
So 2 solutions for this scenario:
Oh, that's strange. Seems like your district has 7 grading periods but only gradebook data for 4 of them? I'm not sure I see a link between the listed period dates and the gradebook data.
It seems in your code you are only fetching the gradebook data for the first 4 one by one: (gradenight/src/routes/login/+server.js)
I guess you did this is because your school only has 4 but mine has more
You don't need to add a parameter for the current reporting period. If you leave it blank in the request it should get you all the gradebooks for all the reporting periods
So you should be able to only make one client.gradebook() request instead of 4 or however many reporting periods
I see that you're using the official studentvue.js library, but you might want to look at https://github.com/EGGaming/studentvue.js I use it and it does the annoying soap request parsing for you Documentation
It seems in your code you are only fetching the gradebook data for the first 4 one by one
You're right. I forgot about that.
You don't need to add a parameter for the current reporting period. If you leave it blank in the request it should get you all the gradebooks for all the reporting periods
Ok thanks, I will try this.
I see that you're using the official studentvue.js library, but you might want to look at https://github.com/EGGaming/studentvue.js I use it and it does the annoying soap request parsing for you
I will stick to the current implementation for now, as switching would require a lot of rewriting. Thanks for the recommendation.
So you should be able to only make one client.gradebook() request instead of 4 or however many reporting periods
I've taken a look at this, and it seems making the request without a parameter will just cause it to return the current gradebook, not all of them.
Hmm yeah it seems you are correct. I think I wrote that without realizing you needed all of the gradebooks. If you want to support different schools having a different amount of reporting periods I guess you would have to get the current gradebook, then use that to get all the reporting periods, then get all the gradebooks
But thats if you want to get all the gradebooks at once. I haven't looked at your code closely but couldn't you retrieve the current gradebook then retrieve the rest on demand, like when the user selects a different reporting period from a dropdown? Or maybe you need all of them at the start for data
Late reply, but yes, I think that would work. Due to the slow speed of fetching I would probably would fetch the current gradebook first and then load the rest in the background. I don't plan on actively working on this project right now, but in the future I might consider rewriting most of it to support this. Thanks for the feedback.
Hello, I was trying to use the interface, and the console seemed to return the correct information, however the website was stuck on loading. Attached is what I can see. https://steady.likes-throwing.rocks/5uyGJ9xH7
Thanks!