Example #1
0
def send_material_usage(request, course):
    stats = Stats(course)
    encoded = json.dumps(stats.material_usage())
    response = HttpResponse(encoded, content_type="application/json")
    response['Access-Control-Allow-Origin'] = '*'
    return response
Example #2
0
def send_material_usage(request, course):
    stats = Stats(course)
    encoded = json.dumps(stats.material_usage())
    return HttpResponse(encoded, content_type = "application/json")