{"action":"created","issue":{"url":"https://api.github.com/repos/aopell/SchoologyPlus/issues/43","repository_url":"https://api.github.com/repos/aopell/SchoologyPlus","labels_url":"https://api.github.com/repos/aopell/SchoologyPlus/issues/43/labels{/name}","comments_url":"https://api.github.com/repos/aopell/SchoologyPlus/issues/43/comments","events_url":"https://api.github.com/repos/aopell/SchoologyPlus/issues/43/events","html_url":"https://github.com/aopell/SchoologyPlus/pull/43","id":353899019,"node_id":"MDExOlB1bGxSZXF1ZXN0MjEwODI2ODIy","number":43,"title":"Improve assignment tooltip generation (performance, minor styling, dropped indication)","user":{"login":"glen3b","id":3952667,"node_id":"MDQ6VXNlcjM5NTI2Njc=","avatar_url":"https://avatars1.githubusercontent.com/u/3952667?v=4","gravatar_id":"","url":"https://api.github.com/users/glen3b","html_url":"https://github.com/glen3b","followers_url":"https://api.github.com/users/glen3b/followers","following_url":"https://api.github.com/users/glen3b/following{/other_user}","gists_url":"https://api.github.com/users/glen3b/gists{/gist_id}","starred_url":"https://api.github.com/users/glen3b/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/glen3b/subscriptions","organizations_url":"https://api.github.com/users/glen3b/orgs","repos_url":"https://api.github.com/users/glen3b/repos","events_url":"https://api.github.com/users/glen3b/events{/privacy}","received_events_url":"https://api.github.com/users/glen3b/received_events","type":"User","site_admin":false},"labels":[],"state":"open","locked":false,"assignee":null,"assignees":[],"milestone":null,"comments":0,"created_at":"2018-08-24T19:19:26Z","updated_at":"2018-08-30T21:50:04Z","closed_at":null,"author_association":"COLLABORATOR","pull_request":{"url":"https://api.github.com/repos/aopell/SchoologyPlus/pulls/43","html_url":"https://github.com/aopell/SchoologyPlus/pull/43","diff_url":"https://github.com/aopell/SchoologyPlus/pull/43.diff","patch_url":"https://github.com/aopell/SchoologyPlus/pull/43.patch"},"body":"No associated issue ticket.\r\nDoes not address @aopell's comment on #37 (does not add letter grade display), although this should be fairly straightforward (and will be discussed a few paragraphs down).\r\n\r\nImprove, in a few ways, the generation of tooltips for assignments on the materials page. Improvements include:\r\n- Performance. In many cases, an API call per assignment is no longer necessary. Note that this comes at the **cost of showing all submission statuses**. Getting \"dropbox\" status required a call per assignment, so in cases where a normal (non-exception non-empty) grade has been entered into the assignment, the call is omitted and the status not displayed. This improves performance markedly for two reasons: in my environment, most assignments have `allow_dropbox` set even though they shouldn't, so once they are graded the call goes away now; if it's been processed teacher-side, the submission status isn't relevant anymore, so it's not worth time to display it.\r\n- Reliability. Related to dropbox tweaks above; for some reason on some classes the assignments API call doesn't get everything. We don't use it in tooltip generation outside of for dropbox logic, but regardless, for missing assignments we now acquire that via the specific-assignment API call. **Potential improvement:** we could limit ourselves to only querying assignments O(n) if they'd be likely to need a dropbox call; this would save time in the cases where /assignments is not reliable but everything's graded. That said I've only seen this nonreliability behavior on one class so it might not be worth optimizing for.\r\n- Styling tweaks in grade tooltip. Slightly darker slash for normal grades and a plus sign (\"+5 pts\") for extra-credit grades.\r\n- Dropped grade display in tooltip. Currently takes the form of a bold, green \"Dropped\" followed by the normal point/grade display in purple brackets. I'm not super happy with the styling, but I do like the idea of displaying dropped assignments. I considered putting \"Dropped\" on its own line above, but I don't think the points and the dropped text should have visual equivalence, and I didn't find a good way not to do that with vertical layout.\r\n\r\nRegarding the letter grade: there is a field in the API for \"calculated_grade,\" or letter grade on the teacher's Schoology-side grading scale, but few classes in my environment use this and fewer yet use it properly. Since we already have infrastructure for client-side grading scales, that's what we should use; I worry a bit about it taking up too much screen real estate, and I also am not sure that letter grades for every assignment in this context is a good idea (for categories and classes 100% I agree add letter grades where possible, but for assignments I'm not so sure). On the grades page we don't show assignment letter grades (nor do we mess with them when teachers provide, unless the user edits a grade, I think), but we do show percentages; that might be a better alternative here, but it has a heftier real estate requirement."},"comment":{"url":"https://api.github.com/repos/aopell/SchoologyPlus/issues/comments/417478403","html_url":"https://github.com/aopell/SchoologyPlus/pull/43#issuecomment-417478403","issue_url":"https://api.github.com/repos/aopell/SchoologyPlus/issues/43","id":417478403,"node_id":"MDEyOklzc3VlQ29tbWVudDQxNzQ3ODQwMw==","user":{"login":"aopell","id":5026980,"node_id":"MDQ6VXNlcjUwMjY5ODA=","avatar_url":"https://avatars2.githubusercontent.com/u/5026980?v=4","gravatar_id":"","url":"https://api.github.com/users/aopell","html_url":"https://github.com/aopell","followers_url":"https://api.github.com/users/aopell/followers","following_url":"https://api.github.com/users/aopell/following{/other_user}","gists_url":"https://api.github.com/users/aopell/gists{/gist_id}","starred_url":"https://api.github.com/users/aopell/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/aopell/subscriptions","organizations_url":"https://api.github.com/users/aopell/orgs","repos_url":"https://api.github.com/users/aopell/repos","events_url":"https://api.github.com/users/aopell/events{/privacy}","received_events_url":"https://api.github.com/users/aopell/received_events","type":"User","site_admin":false},"created_at":"2018-08-30T21:50:04Z","updated_at":"2018-08-30T21:50:04Z","author_association":"OWNER","body":"I agree with not including the letter grade based on your points above, makes perfect sense. "}}
{"actor":{"display_login":"aopell"}}