Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Clean up old code in kalite.contentload #5444

Open
benjaoming opened this issue Apr 13, 2017 · 1 comment
Open

Clean up old code in kalite.contentload #5444

benjaoming opened this issue Apr 13, 2017 · 1 comment

Comments

@benjaoming
Copy link
Contributor

benjaoming commented Apr 13, 2017

Summary

Most of kalite.contentload seems to be outdated, both on distributed and central server.

Here's a snippet from kalite.contentload.api_views:

"""
This file implements both the central and distributed server sides of
a handshake to download KA data.

Why does the central server have to be involved?
  - because we have exactly one API Key for KA, and we don't want to share it
  with distributed server accounts.
  - because we don't trust KA to keep their API static; by putting the central
  server in the middle, we can easily update, and distributed servers don't break.

Here's how it works:
* On the distributed server, there is a button on the facility user's "account" page with a button"Download data from KA".
* That button has a link to a distributed server url.  The user clicks it.
* That distributed server view sets up a proper URL/request to the central server, then redirects that central server URL.
* The central server tries to authenticate to KA (forwarding users to KA), with a call-back URL when that succeeds.
* The user authenticates with KA, and KA oauth is returned to the central server.
* The central server then uses the KA API to get the user data, interpret it, massage it, and compute (our) relevant quantities.
* The central server then uses a distributed server call-back URL to POST the downloaded user data.
* The distributed server gets that data, loads it, saves it, and then redirects the user--to their account page.
* The account page shows again, this time including the imported KA data
"""

System information

  • Operating system: all
  • Version: develop
@benjaoming
Copy link
Contributor Author

Adding to this: control_panel.views.account_management seems to invoke one remaining view update_all_distributed, however account_management is unused both on the central and distributed server.

So we can probably get rid of account_management, too.

Going to try to confirm this. However, I couldn't make a teacher account access /management/account/ which just seems blank. On a student account, it returns 404.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

1 participant