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
4c164795
Commit
4c164795
authored
Jan 30, 2013
by
Vik Paruchuri
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Working on frontend JS for posting
parent
17fce100
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
40 additions
and
3 deletions
+40
-3
lms/djangoapps/open_ended_grading/views.py
+1
-1
lms/static/coffee/src/open_ended/open_ended.coffee
+33
-0
lms/templates/open_ended_problems/open_ended_flagged_problems.html
+6
-2
No files found.
lms/djangoapps/open_ended_grading/views.py
View file @
4c164795
...
...
@@ -309,7 +309,7 @@ def take_action_on_flags(request, course_id):
try
:
controller_qs
=
ControllerQueryService
()
response
=
controller_qs
.
take_action_on_flags
(
course_id
,
student_id
,
course
_id
,
action_type
)
response
=
controller_qs
.
take_action_on_flags
(
course_id
,
student_id
,
submission
_id
,
action_type
)
return
HttpResponse
(
response
,
mimetype
=
"application/json"
)
except
GradingServiceError
:
log
.
exception
(
"Error saving calibration grade, location: {0}, submission_id: {1}, submission_key: {2}, grader_id: {3}"
.
format
(
location
,
submission_id
,
submission_key
,
grader_id
))
...
...
lms/static/coffee/src/open_ended/open_ended.coffee
0 → 100644
View file @
4c164795
# This is a simple class that just hides the error container
# and message container when they are empty
# Can (and should be) expanded upon when our problem list
# becomes more sophisticated
class
OpenEnded
constructor
:
(
ajax_url
)
->
@
ajax_url
=
ajax_url
@
error_container
=
$
(
'.error-container'
)
@
error_container
.
toggle
(
not
@
error_container
.
is
(
':empty'
))
@
message_container
=
$
(
'.message-container'
)
@
message_container
.
toggle
(
not
@
message_container
.
is
(
':empty'
))
@
problem_list
=
$
(
'.problem-list'
)
@
ban_button
=
$
(
'.ban-button'
)
@
unflag_button
=
$
(
'.unflag-button'
)
@
ban_button
.
click
@
ban
@
unflag_button
.
click
@
unflag
unflag
:
(
event
)
=>
event
.
preventDefault
()
ban
:
(
event
)
=>
event
.
preventDefault
()
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"
})
ajax_url
=
$
(
'.open-ended-problems'
).
data
(
'ajax_url'
)
$
(
document
).
ready
(()
->
new
OpenEnded
(
ajax_url
))
lms/templates/open_ended_problems/open_ended_flagged_problems.html
View file @
4c164795
...
...
@@ -10,6 +10,10 @@
<
%
include
file=
"/courseware/course_navigation.html"
args=
"active_page='open_ended_flagged_problems'"
/>
<
%
block
name=
"js_extra"
>
<
%
static:js
group=
'open_ended'
/>
</
%
block>
<section
class=
"container"
>
<div
class=
"open-ended-problems"
data-ajax_url=
"${ajax_url}"
>
<div
class=
"error-container"
>
${error_text}
</div>
...
...
@@ -38,10 +42,10 @@
${problem['student_response']}
</td>
<td>
<a
href=
"#unflag"
class=
"unflag-button action-button"
>
Unflag
</a>
<a
href=
"#unflag"
class=
"unflag-button action-button"
data-action-type=
"unflag"
>
Unflag
</a>
</td>
<td>
<a
href=
"#ban"
class=
"ban-button action-button"
>
Ban
</a>
<a
href=
"#ban"
class=
"ban-button action-button"
data-action-type=
"ban"
>
Ban
</a>
</td>
<td
style=
"display:none;"
>
${problem['submission_id']}
...
...
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