rianadon / CheckPCR

A client for PCR, the homework system formerly used by The Harker School
MIT License
8 stars 3 forks source link

Fetching URL is outdated #5

Closed chiragzq closed 8 years ago

chiragzq commented 8 years ago

The fetching URL for the extension is outdated. You should use the new one (SC-Assignments) instead of the old one (Student-Assignments).

chiragzq commented 8 years ago

screenshot 2015-12-07 at 20 06 07

How you could fix this is by editing welcome.litcoffee:363 from: send "https://webappsca.pcrsoft.com/Clue/Student-Assignments-End-Date-Range/7536", "document" to send "https://webappsca.pcrsoft.com/Clue/SC-Assignments-End-Date-Range/7536", "document"

Same thing on welcome.js:385.

This is from a 6th Grade student who has stumbles upon your application.

19RyanA commented 8 years ago

Are you sure you're using the most recent version? Commit 1053c309077d4ecf6c5ff9d31535621b055ca482 should've fixed it.

You might have not seen the update notice (the app should've told you there was a more recent version) if you only use Harker's wifi since for some reason I don't think github.com can be accessed from it.

chiragzq commented 8 years ago

Yeah. Harker's wifi says it is US exclusive... D;

chiragzq commented 8 years ago

Fetched the new update. Month view seems not to be working (the regex returns an object):

Messsage: Cannot read property '1' of null
Stack: TypeError: Cannot read property '1' of null
    at parse (chrome-extension://klbncgmcphpgebbjebkncdfmmfclebaf/client.js:445:53)
    at chrome-extension://klbncgmcphpgebbjebkncdfmmfclebaf/client.js:245:11
Browser: Mozilla/5.0 (X11; CrOS x86_64 7390.68.0) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/46.0.2490.82 Safari/537.36
Version: 3e36298abc233af9c7338c99ebc3f4ffa229a62d

Additionally, the URL for welcome.js is still the old one I think.

Oh yeah, using ChromeOS, for info.

19RyanA commented 8 years ago

Sorry about that. I was reading too quickly and didn't notice that you said it was in the welcome scripts.

For the second problem, what is the value of the title variable?

Just insert console.log(title); right before line 445 in client.js and paste whatever it says here.

chiragzq commented 8 years ago

It seems the the regex that you execute is returning an object when in month view, instead of an array.

Output (before regex): http://pastebin.com/HUBdxcZb

19RyanA commented 8 years ago

I see. It's returning an array, but the double parenthesis in "Assessment#3 (Assessments (Critical Thinking and Application))" is causing the regex to not match anything.

A fix should be on the way soon.

19RyanA commented 8 years ago

Before I make a commit, could you try replacing the current regex with /\(([^)]*\)*)\)$/ and see if that fixes the problem?

19RyanA commented 8 years ago

I just found another bug so I'll make a commit with the regex change. Let me know if it fixes the problem.

chiragzq commented 8 years ago

It's good.