Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
E
edx-platform-release
Manage
Activity
Members
Labels
Plan
Issues
0
Issue boards
Milestones
Wiki
Code
Merge requests
1
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Deploy
Releases
Package Registry
Model registry
Operate
Terraform modules
Monitor
Incidents
Service Desk
Analyze
Value stream analytics
Contributor analytics
Repository analytics
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
Community forum
Contribute to GitLab
Provide feedback
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
Hsin-Yu Chien
edx-platform-release
Commits
8e9ec501
Commit
8e9ec501
authored
12 years ago
by
Vik Paruchuri
Browse files
Options
Downloads
Patches
Plain Diff
Implement flagging, fix urls
parent
10c7155d
No related branches found
Branches containing commit
No related tags found
Tags containing commit
No related merge requests found
Changes
3
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
lms/djangoapps/open_ended_grading/views.py
+1
-2
1 addition, 2 deletions
lms/djangoapps/open_ended_grading/views.py
lms/static/coffee/src/open_ended/open_ended.coffee
+10
-1
10 additions, 1 deletion
lms/static/coffee/src/open_ended/open_ended.coffee
lms/urls.py
+1
-1
1 addition, 1 deletion
lms/urls.py
with
12 additions
and
4 deletions
lms/djangoapps/open_ended_grading/views.py
+
1
−
2
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
:
...
...
This diff is collapsed.
Click to expand it.
lms/static/coffee/src/open_ended/open_ended.coffee
+
10
−
1
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
()
...
...
This diff is collapsed.
Click to expand it.
lms/urls.py
+
1
−
1
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
...
...
This diff is collapsed.
Click to expand it.
Preview
0%
Loading
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Save comment
Cancel
Please
register
or
sign in
to comment