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
63349dab
Commit
63349dab
authored
Mar 25, 2013
by
Arthur Barrett
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
fixed update/delete responses
parent
0f486b16
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
7 additions
and
5 deletions
+7
-5
lms/djangoapps/notes/api.py
+7
-4
lms/static/coffee/src/notes.coffee
+0
-1
No files found.
lms/djangoapps/notes/api.py
View file @
63349dab
...
@@ -105,7 +105,7 @@ def read(request, course_id, note_id):
...
@@ -105,7 +105,7 @@ def read(request, course_id, note_id):
def
update
(
request
,
course_id
,
note_id
):
def
update
(
request
,
course_id
,
note_id
):
try
:
try
:
note
=
Note
.
objects
.
get
(
note_id
)
note
=
Note
.
objects
.
get
(
id
=
note_id
)
except
:
except
:
return
[
HttpResponse
(
''
,
status
=
404
),
None
]
return
[
HttpResponse
(
''
,
status
=
404
),
None
]
...
@@ -118,13 +118,16 @@ def update(request, course_id, note_id):
...
@@ -118,13 +118,16 @@ def update(request, course_id, note_id):
log
.
debug
(
e
)
log
.
debug
(
e
)
return
[
HttpResponse
(
''
,
status
=
500
),
None
]
return
[
HttpResponse
(
''
,
status
=
500
),
None
]
note
.
save
(
update_fields
=
[
'text'
,
'tags'
,
'updated'
]
)
note
.
save
()
return
[
HttpResponse
(
''
,
status
=
303
),
None
]
response
=
HttpResponse
(
''
,
status
=
303
)
response
[
'Location'
]
=
note
.
get_absolute_url
()
return
[
response
,
None
]
def
delete
(
request
,
course_id
,
note_id
):
def
delete
(
request
,
course_id
,
note_id
):
try
:
try
:
note
=
Note
.
objects
.
get
(
note_id
)
note
=
Note
.
objects
.
get
(
id
=
note_id
)
except
:
except
:
return
[
HttpResponse
(
''
,
status
=
404
),
None
]
return
[
HttpResponse
(
''
,
status
=
404
),
None
]
...
...
lms/static/coffee/src/notes.coffee
View file @
63349dab
...
@@ -40,7 +40,6 @@ class StudentNotes
...
@@ -40,7 +40,6 @@ class StudentNotes
getStoreConfig
:
(
uri
)
->
getStoreConfig
:
(
uri
)
->
prefix
=
@
getPrefix
()
prefix
=
@
getPrefix
()
if
uri
is
null
if
uri
is
null
console
.
log
'getURIPath()'
,
uri
,
@
getURIPath
()
uri
=
@
getURIPath
()
uri
=
@
getURIPath
()
storeConfig
=
storeConfig
=
...
...
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