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
7f96fbb3
Commit
7f96fbb3
authored
Feb 04, 2013
by
Vik Paruchuri
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Address review comments
parent
8bd7b60a
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
11 additions
and
12 deletions
+11
-12
lms/djangoapps/open_ended_grading/views.py
+6
-1
lms/static/coffee/src/open_ended/open_ended.coffee
+4
-4
lms/templates/open_ended_problems/open_ended_flagged_problems.html
+1
-7
No files found.
lms/djangoapps/open_ended_grading/views.py
View file @
7f96fbb3
...
@@ -244,6 +244,9 @@ def flagged_problem_list(request, course_id):
...
@@ -244,6 +244,9 @@ def flagged_problem_list(request, course_id):
@cache_control
(
no_cache
=
True
,
no_store
=
True
,
must_revalidate
=
True
)
@cache_control
(
no_cache
=
True
,
no_store
=
True
,
must_revalidate
=
True
)
def
combined_notifications
(
request
,
course_id
):
def
combined_notifications
(
request
,
course_id
):
"""
Gets combined notifications from the grading controller and displays them
"""
course
=
get_course_with_access
(
request
.
user
,
course_id
,
'load'
)
course
=
get_course_with_access
(
request
.
user
,
course_id
,
'load'
)
user
=
request
.
user
user
=
request
.
user
notifications
=
open_ended_notifications
.
combined_notifications
(
course
,
user
)
notifications
=
open_ended_notifications
.
combined_notifications
(
course
,
user
)
...
@@ -292,9 +295,11 @@ def combined_notifications(request, course_id):
...
@@ -292,9 +295,11 @@ def combined_notifications(request, course_id):
combined_dict
combined_dict
)
)
@cache_control
(
no_cache
=
True
,
no_store
=
True
,
must_revalidate
=
True
)
def
take_action_on_flags
(
request
,
course_id
):
def
take_action_on_flags
(
request
,
course_id
):
"""
"""
Takes action on student flagged submissions.
Currently, only support unflag and ban actions.
"""
"""
if
request
.
method
!=
'POST'
:
if
request
.
method
!=
'POST'
:
raise
Http404
raise
Http404
...
...
lms/static/coffee/src/open_ended/open_ended.coffee
View file @
7f96fbb3
...
@@ -23,8 +23,8 @@ class OpenEnded
...
@@ -23,8 +23,8 @@ class OpenEnded
parent_tr
=
$
(
event
.
target
).
parent
().
parent
()
parent_tr
=
$
(
event
.
target
).
parent
().
parent
()
tr_children
=
parent_tr
.
children
()
tr_children
=
parent_tr
.
children
()
action_type
=
"unflag"
action_type
=
"unflag"
submission_id
=
tr_children
[
5
].
innerText
submission_id
=
parent_tr
.
data
(
'submission-id'
)
student_id
=
tr_children
[
6
].
innerText
student_id
=
parent_tr
.
data
(
'student-id'
)
callback_func
=
@
after_action_wrapper
(
$
(
event
.
target
),
action_type
)
callback_func
=
@
after_action_wrapper
(
$
(
event
.
target
),
action_type
)
@
post
(
'take_action_on_flags'
,
{
'submission_id'
:
submission_id
,
'student_id'
:
student_id
,
'action_type'
:
action_type
},
callback_func
)
@
post
(
'take_action_on_flags'
,
{
'submission_id'
:
submission_id
,
'student_id'
:
student_id
,
'action_type'
:
action_type
},
callback_func
)
...
@@ -33,8 +33,8 @@ class OpenEnded
...
@@ -33,8 +33,8 @@ class OpenEnded
parent_tr
=
$
(
event
.
target
).
parent
().
parent
()
parent_tr
=
$
(
event
.
target
).
parent
().
parent
()
tr_children
=
parent_tr
.
children
()
tr_children
=
parent_tr
.
children
()
action_type
=
"ban"
action_type
=
"ban"
submission_id
=
tr_children
[
5
].
innerText
submission_id
=
parent_tr
.
data
(
'submission-id'
)
student_id
=
tr_children
[
6
].
innerText
student_id
=
parent_tr
.
data
(
'student-id'
)
callback_func
=
@
after_action_wrapper
(
$
(
event
.
target
),
action_type
)
callback_func
=
@
after_action_wrapper
(
$
(
event
.
target
),
action_type
)
@
post
(
'take_action_on_flags'
,
{
'submission_id'
:
submission_id
,
'student_id'
:
student_id
,
'action_type'
:
action_type
},
callback_func
)
@
post
(
'take_action_on_flags'
,
{
'submission_id'
:
submission_id
,
'student_id'
:
student_id
,
'action_type'
:
action_type
},
callback_func
)
...
...
lms/templates/open_ended_problems/open_ended_flagged_problems.html
View file @
7f96fbb3
...
@@ -34,7 +34,7 @@
...
@@ -34,7 +34,7 @@
<th></th>
<th></th>
</tr>
</tr>
%for problem in problem_list:
%for problem in problem_list:
<tr>
<tr
data-submission-id=
"${problem['submission_id']}"
data-student-id=
"${problem['student_id']}"
>
<td>
<td>
${problem['problem_name']}
${problem['problem_name']}
</td>
</td>
...
@@ -50,12 +50,6 @@
...
@@ -50,12 +50,6 @@
<td>
<td>
<div
class=
"action-taken"
></div>
<div
class=
"action-taken"
></div>
</td>
</td>
<td
style=
"display:none;"
>
${problem['submission_id']}
</td>
<td
style=
"display:none;"
>
${problem['student_id']}
</td>
</tr>
</tr>
%endfor
%endfor
</table>
</table>
...
...
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