Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
E
edx-platform
Overview
Overview
Details
Activity
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
edx
edx-platform
Commits
45cca10f
Commit
45cca10f
authored
May 06, 2013
by
Arthur Barrett
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
remove debugging from default notes view
parent
0e1b3999
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
3 additions
and
7 deletions
+3
-7
lms/djangoapps/notes/views.py
+3
-7
No files found.
lms/djangoapps/notes/views.py
View file @
45cca10f
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
,
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment