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
8e9ec501
Commit
8e9ec501
authored
Jan 30, 2013
by
Vik Paruchuri
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Implement flagging, fix urls
parent
10c7155d
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
12 additions
and
4 deletions
+12
-4
lms/djangoapps/open_ended_grading/views.py
+1
-2
lms/static/coffee/src/open_ended/open_ended.coffee
+10
-1
lms/urls.py
+1
-1
No files found.
lms/djangoapps/open_ended_grading/views.py
View file @
8e9ec501
...
...
@@ -226,7 +226,7 @@ def flagged_problem_list(request, course_id):
error_text
=
"Could not get problem list"
success
=
False
ajax_url
=
_reverse_with_slash
(
'open_ended_problems'
,
course_id
)
ajax_url
=
_reverse_with_slash
(
'open_ended_
flagged_
problems'
,
course_id
)
return
render_to_response
(
'open_ended_problems/open_ended_flagged_problems.html'
,
{
'course'
:
course
,
...
...
@@ -308,7 +308,6 @@ def take_action_on_flags(request, course_id):
student_id
=
p
[
'student_id'
]
try
:
controller_qs
=
ControllerQueryService
()
response
=
controller_qs
.
take_action_on_flags
(
course_id
,
student_id
,
submission_id
,
action_type
)
return
HttpResponse
(
response
,
mimetype
=
"application/json"
)
except
GradingServiceError
:
...
...
lms/static/coffee/src/open_ended/open_ended.coffee
View file @
8e9ec501
...
...
@@ -24,13 +24,22 @@ class OpenEnded
ban
:
(
event
)
=>
event
.
preventDefault
()
@
gentle_alert
"Ban"
parent_tr
=
$
(
event
.
target
).
parent
().
parent
()
tr_children
=
parent_tr
.
children
()
action_type
=
"ban"
submission_id
=
tr_children
[
4
].
innerText
student_id
=
tr_children
[
5
].
innerText
@
gentle_alert
student_id
@
post
(
'take_action_on_flags'
,
{
'submission_id'
:
submission_id
,
'student_id'
:
student_id
,
'action_type'
:
action_type
},
@
handle_after_action
)
post
:
(
cmd
,
data
,
callback
)
->
# if this post request fails, the error callback will catch it
$
.
post
(
@
ajax_url
+
cmd
,
data
,
callback
)
.
error
=>
callback
({
success
:
false
,
error
:
"Error occured while performing this operation"
})
handle_after_action
:
(
data
)
->
@
gentle_alert
data
gentle_alert
:
(
msg
)
=>
if
$
(
'.message-container'
).
length
$
(
'.message-container'
).
remove
()
...
...
lms/urls.py
View file @
8e9ec501
...
...
@@ -289,7 +289,7 @@ if settings.COURSEWARE_ENABLED:
# Open Ended flagged problem list
url
(
r'^courses/(?P<course_id>[^/]+/[^/]+/[^/]+)/open_ended_flagged_problems$'
,
'open_ended_grading.views.flagged_problem_list'
,
name
=
'open_ended_flagged_problems'
),
url
(
r'^courses/(?P<course_id>[^/]+/[^/]+/[^/]+)/open_ended_flagged_problems/take_action_on_flag$'
,
url
(
r'^courses/(?P<course_id>[^/]+/[^/]+/[^/]+)/open_ended_flagged_problems/take_action_on_flag
s
$'
,
'open_ended_grading.views.take_action_on_flags'
,
name
=
'open_ended_flagged_problems_take_action'
),
# Cohorts management
...
...
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