Add ANALYTICS_API_KEY to config files and dashboard analytics call

This commit is contained in:
David Ormsbee
2013-03-13 16:55:40 -04:00
parent 33c2507abc
commit 8d4e0f8386
3 changed files with 5 additions and 1 deletions

View File

@@ -599,7 +599,9 @@ def instructor_dashboard(request, course_id):
logs and swallows errors.
"""
url = settings.ANALYTICS_SERVER_URL + \
"get?aname={}&course_id={}".format(analytics_name, course_id)
"get?aname={}&course_id={}&apikey={}".format(analytics_name,
course_id,
settings.ANALYTICS_API_KEY)
try:
res = requests.get(url)
except Exception:

View File

@@ -113,3 +113,4 @@ DATADOG_API = AUTH_TOKENS.get("DATADOG_API")
# Analytics dashboard server
ANALYTICS_SERVER_URL = ENV_TOKENS.get("ANALYTICS_SERVER_URL")
ANALYTICS_API_KEY = AUTH_TOKENS.get("ANALYTICS_API_KEY", "")

View File

@@ -221,3 +221,4 @@ PEARSON_TEST_PASSWORD = "12345"
########################## ANALYTICS TESTING ########################
ANALYTICS_SERVER_URL = "http://127.0.0.1:9000/"
ANALYTICS_API_KEY = ""