Repository navigation
Conversation
Fixed in 9378b0e. |
Fixed in d22a118. I also added support for "grades posted" events, so it may be a good idea to (partially) revert #166 and show these events (even if actual recent activity is not shown). We could also show this information in some other format. |
I have reversed this in 6974ed6 because reviving the "recent activity" would entail bringing back an area that would be blank most of the time and making the "grades posted" events easy to miss, defeating the purpose. I have made a separate issue (#232) for displaying this information. |
Fixed in #233. |
a308633 to
413a5eb
Compare
|
We should enable loading the previous year using the dropdown menu and the new API (for other years after that you can import JSON/Use transcript when that's ready) |
src/scrape.ts is for the new (REST-based) scraper. I added some code for testing the scraper; it can be run by `npm run scrape $username $password` but currently does not do much.
Implement a function in scrape.ts to scrape assignment statistics from Aspen
These are necessary for assignment statistics.
Update the frontend to comply with the API changes in assignment statistics as a result of the new implementation.
Stop frontend JS (under /public/js/) from being ignored
scrape.js is now dead code and can be removed, along with cheerio.
Fixed in f2eeaca, 30009cf, and 8292df2.
Fixed in b804953. |
Instead of assuming that PDF file names will be unique, add a new attribute `data-value` to the dropdown UI elements which corresponds to the unique `value` attributes of the `<option>` elements in the `<select>`.
|
I have requested review from @notrodes, @jadebuckwalter, @kdk1616, and @tektaxi. Given the major nature of these changes, I would like to have as many people as possible review this PR before it is merged. The reviews of anyone else from these four people are, of course, also welcomed and appreciated. |
jadebuckwalter
left a comment
There was a problem hiding this comment.
For the most part, this looks good! However, there are a few minor fixes (which may or may not be worth implementing):
The assignments for a given class are listed from oldest to newest (oldest at the top, newest at the bottom) rather than from newest to oldest, as they are in Aspen. This is not a major issue; it's just a bit of an inconvenience.
The dropdown in the Reports tab extends very far down the page. Though it's great that the new API can scrape all of the reports rather than just the most recent ones, I'm wondering if this is the best front-end design. It might be better if the dropdown shows a certain number of recent reports with an option to show older reports rather than showing them all at once; after all, it's not too often that people go back and look at their middle school report cards. This is a front-end issue and has nothing to do with the API itself, so it could be something that we fix later on.
|
@jadebuckwalter I agree that we should definitely fix the assignments issue. I feel like that would be a big help and it's much more convenient to have recent assignments first |
Use the same sorting used in Aspen to sort assignments.
|
@jadebuckwalter @tektaxi I fixed the assignments issue in 9e12fb2. As for the reports issue, I think that would require some fairly substantial changes to the dropdown code, so I am in favor of moving it to a separate issue. |
Closes #184, #90, #163, #113, and #170. This pull request migrates from scraping the Aspen website to making use of Aspen's REST API, fixing many scraping bugs in the process.
Some notes about testing the code: some of the build framework had to be changed to accommodate a new TypeScript scraper, but you should just be able to run
npm startas usual. Please remember to runnpm installto load necessary dependencies after checking out therestbranch.Known issues / to-do list:
restart-serve.sh(for the production server) as well asREADME.mdandstart.batneed to be updated to runnpm start insecureor to runtscdirectly.scrape.jsimplementation because it does not seem that the REST API exposes the assignment statistics.scrape.jsis now dead code and should be removed.