Commit 45cca10f by Arthur Barrett

remove debugging from default notes view

parent 0e1b3999
from django.contrib.auth.decorators import login_required
from mitxmako.shortcuts import render_to_response from mitxmako.shortcuts import render_to_response
from courseware.courses import get_course_with_access from courseware.courses import get_course_with_access
from notes.models import Note from notes.models import Note
import json import json
import logging
log = logging.getLogger(__name__)
@login_required
def notes(request, course_id): def notes(request, course_id):
''' Displays a student's notes in a course. ''' ''' Displays a student's notes in a course. '''
course = get_course_with_access(request.user, course_id, 'load') course = get_course_with_access(request.user, course_id, 'load')
notes = Note.objects.filter(course_id=course_id, user=request.user).order_by('-created', 'uri') notes = Note.objects.filter(course_id=course_id, user=request.user).order_by('-created', 'uri')
json_notes = json.dumps([n.as_dict() for n in notes])
prettyprint = {'sort_keys':True, 'indent':2, 'separators':(',', ': ')}
json_notes = json.dumps([n.as_dict() for n in notes], **prettyprint)
context = { context = {
'course': course, 'course': course,
'notes': notes, 'notes': notes,
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment