aopell/SchoologyPlus

Add support for other Schoology domains

Closed this issue · 12 comments

This has been requested by users in the past, and should, I think, be possible with the following caveats:

  • It will be hard for us to officially give support for other domains, perhaps this could be a supported-unsupported feature
  • Any hardcoded lms.lausd.net links will need to be updated, including our getApiKeys logic, although I believe the API calls should still work fine
  • The options page to authorize other domains must be on a new options page accessed other than through the LAUSD-schoology settings UI
  • We should check if the requisite optional_permissions update will annoyingly prompt on update to an existing install
  • We'll have to make sure we inject content scripts dynamically properly (i.e. avoiding duplication of injection logic) as our static manifest only works on lms.lausd.net

Yeah I've been thinking about how to do this too, and I've determined that it shouldn't be that difficult. However, there are issues with some features (off the top of my head the period sort wouldn't work).

Regarding period sort specifically, the fix to #12 should ensure it doesn't crash, although yes that won't work. Stuff like that is why I'm thinking of the possibility of a supported-unsupported status of sorts, but still adding a UI for it. I'm not sure what supported-unsupported would look like though.

If we do this and we semi-support it, we should consider supporting the base Schoology domain officially (as well as LAUSD's instance). Reasons:

  • Easier to debug (easier to create a test course)
  • Probably most popular for non-LAUSD users, everything else would be either this domain or a custom instance we can't support

This needs to be in some kind of advanced settings screen. I think we should basically just make sure it doesn't crash on the base schoology.com domain and call it good enough at that point. This isn't meant to be a universal extension, so we shouldn't worry about this all that much.

Also because of the static manifest, wouldn't we need to have people fork the project to support other domains?

If we have an advanced settings page, no, the manifest can remain static.
We can request optional permissions for all URLs (something like http://*.*/* and https://*.*/*; there's a canonical example set of patterns for this but I don't know it off the top of my head), and then use the permissions API to request access to a specific domain when the user adds it via the advanced settings page.

Commit 23bb1b8 makes Schoology Plus work on all Schoology instances hosted on *.schoology.com

Currently, the defaultDomain setting must be manually set to be the correct hostname. This should eventually be automated through detection of a schoology page loading in a content script. (User should be notified that the default changed through a popup)

For Schoology instances not hosted on *.schoology.com, we would need some kind of options page that prompts for permissions. This would require some optional permissions for all domains. This feature can eventually be tested using schoologytest.com

So with the recent changes for the upcoming 6.0 update, Schoology Plus will work on both lms.lausd.net and any subdomain of schoology.com. I'm not going to close this issue as we may someday want to support other domains, but due to problems addressed in the original issue and in comments this will be quite difficult and is therefore unlikely. This means while this isn't closed for good, it is effectively a wontfix unless there's a significant need or desire for it in the future.

I want to add that it WILL work, if you log in via the Schoology website and NOT via your schools domain that they run it on, e.g., instead of logging in at yourschoolsschoologypage.org/login you can log in at app.schoology.com might be worth adding this as something that shows up if you click the extension button while on any page that is not in the list of supported domains.

Editing the JSON file to add other instances, and manually installing changed the theme. But did not add any features

@KleinKravis can you share exactly what you edited? There are a couple of things you will need to change.

As far as a permanent solution we'll want some kind of domain-agnostic preferences screen, and we won't be able to hardcode all possible domains.

I edited only the included domains