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
3eb18a9e
Commit
3eb18a9e
authored
Feb 09, 2013
by
Vik Paruchuri
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Fix status display/make it more robust, and fix module render error
parent
85324ec8
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
13 additions
and
6 deletions
+13
-6
common/lib/xmodule/xmodule/combined_open_ended_modulev1.py
+9
-4
common/lib/xmodule/xmodule/js/src/combinedopenended/display.coffee
+3
-1
lms/templates/combined_open_ended_status.html
+1
-1
No files found.
common/lib/xmodule/xmodule/combined_open_ended_modulev1.py
View file @
3eb18a9e
...
...
@@ -355,7 +355,7 @@ class CombinedOpenEndedV1Module():
'state'
:
self
.
state
,
'task_count'
:
len
(
self
.
task_xml
),
'task_number'
:
self
.
current_task_number
+
1
,
'status'
:
self
.
get_status
(),
'status'
:
self
.
get_status
(
False
),
'display_name'
:
self
.
display_name
,
'accept_file_upload'
:
self
.
accept_file_upload
,
'legend_list'
:
LEGEND_LIST
,
...
...
@@ -621,7 +621,7 @@ class CombinedOpenEndedV1Module():
Input: AJAX get dictionary
Output: Dictionary to be rendered via ajax that contains the result html.
"""
html
=
self
.
get_status
()
html
=
self
.
get_status
(
True
)
return
{
'html'
:
html
,
'success'
:
True
}
def
handle_ajax
(
self
,
dispatch
,
get
):
...
...
@@ -705,7 +705,7 @@ class CombinedOpenEndedV1Module():
return
json
.
dumps
(
state
)
def
get_status
(
self
):
def
get_status
(
self
,
render_via_ajax
):
"""
Gets the status panel to be displayed at the top right.
Input: None
...
...
@@ -717,7 +717,12 @@ class CombinedOpenEndedV1Module():
task_data
.
update
({
'task_number'
:
i
+
1
})
status
.
append
(
task_data
)
context
=
{
'status_list'
:
status
,
'grader_type_image_dict'
:
GRADER_TYPE_IMAGE_DICT
,
'legend_list'
:
LEGEND_LIST
}
context
=
{
'status_list'
:
status
,
'grader_type_image_dict'
:
GRADER_TYPE_IMAGE_DICT
,
'legend_list'
:
LEGEND_LIST
,
'render_via_ajax'
:
render_via_ajax
,
}
status_html
=
self
.
system
.
render_template
(
"combined_open_ended_status.html"
,
context
)
return
status_html
...
...
common/lib/xmodule/xmodule/js/src/combinedopenended/display.coffee
View file @
3eb18a9e
...
...
@@ -192,7 +192,9 @@ class @CombinedOpenEnded
@
next_problem_button
.
hide
()
@
hide_file_upload
()
@
hint_area
.
attr
(
'disabled'
,
false
)
@
show_status_current
()
if
@
task_number
>
1
or
@
child_state
!=
'initial'
@
show_status_current
()
if
@
task_number
==
1
and
@
child_state
==
'assessing'
@
prompt_hide
()
if
@
child_state
==
'done'
...
...
lms/templates/combined_open_ended_status.html
View file @
3eb18a9e
...
...
@@ -10,7 +10,7 @@
%else:
<div
class=
"statusitem"
data-status-number=
"${i}"
>
%endif
%if status['grader_type'] in grader_type_image_dict:
%if status['grader_type'] in grader_type_image_dict
and render_via_ajax
:
<
%
grader_image =
grader_type_image_dict[status['grader_type']]%
>
<img
src=
"${grader_image}"
title=
${status['human_grader_type']}
>
%else:
...
...
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