From 45cca10fb94e119dc18bac77a6558f06e09b68b0 Mon Sep 17 00:00:00 2001 From: Arthur Barrett Date: Mon, 6 May 2013 17:01:35 -0400 Subject: [PATCH] remove debugging from default notes view --- lms/djangoapps/notes/views.py | 12 ++++-------- 1 file changed, 4 insertions(+), 8 deletions(-) diff --git a/lms/djangoapps/notes/views.py b/lms/djangoapps/notes/views.py index 7d6390baed..865e894ac1 100644 --- a/lms/djangoapps/notes/views.py +++ b/lms/djangoapps/notes/views.py @@ -1,20 +1,16 @@ +from django.contrib.auth.decorators import login_required from mitxmako.shortcuts import render_to_response from courseware.courses import get_course_with_access from notes.models import Note import json -import logging - -log = logging.getLogger(__name__) +@login_required def notes(request, course_id): ''' Displays a student's notes in a course. ''' 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') - - prettyprint = {'sort_keys':True, 'indent':2, 'separators':(',', ': ')} - json_notes = json.dumps([n.as_dict() for n in notes], **prettyprint) - + json_notes = json.dumps([n.as_dict() for n in notes]) context = { 'course': course, 'notes': notes,