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
943c0ff8
Commit
943c0ff8
authored
Jan 08, 2013
by
Vik Paruchuri
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Display results separately from submission logic
parent
3620fd93
Hide whitespace changes
Inline
Side-by-side
Showing
5 changed files
with
13 additions
and
11 deletions
+13
-11
common/lib/xmodule/xmodule/combined_open_ended_module.py
+3
-3
common/lib/xmodule/xmodule/css/combinedopenended/display.scss
+7
-4
common/lib/xmodule/xmodule/js/src/combinedopenended/display.coffee
+1
-0
lms/templates/combined_open_ended_results.html
+2
-0
lms/templates/open_ended.html
+0
-4
No files found.
common/lib/xmodule/xmodule/combined_open_ended_module.py
View file @
943c0ff8
...
@@ -215,7 +215,7 @@ class CombinedOpenEndedModule(XModule):
...
@@ -215,7 +215,7 @@ class CombinedOpenEndedModule(XModule):
last_post_assessment
=
task
.
latest_post_assessment
()
last_post_assessment
=
task
.
latest_post_assessment
()
last_post_feedback
=
""
last_post_feedback
=
""
if
task_type
==
"openended"
:
if
task_type
==
"openended"
:
last_post_assessment
=
task
.
latest_post_assessment
(
short_feedback
=
Tru
e
)
last_post_assessment
=
task
.
latest_post_assessment
(
short_feedback
=
Fals
e
)
last_post_evaluation
=
task
.
format_feedback_with_evaluation
(
last_post_assessment
)
last_post_evaluation
=
task
.
format_feedback_with_evaluation
(
last_post_assessment
)
last_post_assessment
=
last_post_evaluation
last_post_assessment
=
last_post_evaluation
max_score
=
task
.
max_score
()
max_score
=
task
.
max_score
()
...
@@ -249,12 +249,12 @@ class CombinedOpenEndedModule(XModule):
...
@@ -249,12 +249,12 @@ class CombinedOpenEndedModule(XModule):
return
return_html
return
return_html
def
get_results
(
self
,
get
):
def
get_results
(
self
,
get
):
task_number
=
get
[
'task_number'
]
task_number
=
int
(
get
[
'task_number'
])
self
.
update_task_states
()
self
.
update_task_states
()
response_dict
=
self
.
get_last_response
(
task_number
)
response_dict
=
self
.
get_last_response
(
task_number
)
context
=
{
'results'
:
response_dict
[
'post_assessment'
]}
context
=
{
'results'
:
response_dict
[
'post_assessment'
]}
html
=
render_to_string
(
'combined_open_ended_results.html'
,
context
)
html
=
render_to_string
(
'combined_open_ended_results.html'
,
context
)
return
html
return
{
'html'
:
html
,
'success'
:
True
}
def
handle_ajax
(
self
,
dispatch
,
get
):
def
handle_ajax
(
self
,
dispatch
,
get
):
"""
"""
...
...
common/lib/xmodule/xmodule/css/combinedopenended/display.scss
View file @
943c0ff8
...
@@ -30,6 +30,7 @@ section.combined-open-ended {
...
@@ -30,6 +30,7 @@ section.combined-open-ended {
{
{
float
:left
;
float
:left
;
width
:
53%
;
width
:
53%
;
padding-bottom
:
20px
;
}
}
.result-container
.result-container
...
@@ -49,7 +50,7 @@ section.combined-open-ended {
...
@@ -49,7 +50,7 @@ section.combined-open-ended {
}
}
}
}
section
.
open-ended-child
,
section
.
combined-open-ended-status
{
section
.combined-open-ended-status
{
.statusitem
{
.statusitem
{
background-color
:
#FAFAFA
;
background-color
:
#FAFAFA
;
...
@@ -66,9 +67,11 @@ section.open-ended-child, section.combined-open-ended-status {
...
@@ -66,9 +67,11 @@ section.open-ended-child, section.combined-open-ended-status {
font-size
:
1em
;
font-size
:
1em
;
padding-top
:
10px
;
padding-top
:
10px
;
}
}
}
div
.result-container
{
.evaluation
{
.evaluation
{
p
{
p
{
margin-bottom
:
1px
;
margin-bottom
:
1px
;
}
}
...
@@ -84,7 +87,7 @@ section.open-ended-child, section.combined-open-ended-status {
...
@@ -84,7 +87,7 @@ section.open-ended-child, section.combined-open-ended-status {
header
{
header
{
text-align
:
right
;
text-align
:
right
;
a
{
a
{
font-size
:
.
7
em
;
font-size
:
.
85
em
;
}
}
}
}
}
}
...
@@ -97,7 +100,7 @@ section.open-ended-child, section.combined-open-ended-status {
...
@@ -97,7 +100,7 @@ section.open-ended-child, section.combined-open-ended-status {
&
:first-child
{
&
:first-child
{
margin-left
:
0px
;
margin-left
:
0px
;
}
}
display
:
block
;
display
:
inline
;
margin-left
:
0px
;
margin-left
:
0px
;
label
{
label
{
...
...
common/lib/xmodule/xmodule/js/src/combinedopenended/display.coffee
View file @
943c0ff8
...
@@ -62,6 +62,7 @@ class @CombinedOpenEnded
...
@@ -62,6 +62,7 @@ class @CombinedOpenEnded
$
.
postWithPrefix
"
#{
@
ajax_url
}
/get_results"
,
data
,
(
response
)
=>
$
.
postWithPrefix
"
#{
@
ajax_url
}
/get_results"
,
data
,
(
response
)
=>
if
response
.
success
if
response
.
success
@
results_container
.
after
(
response
.
html
).
remove
()
@
results_container
.
after
(
response
.
html
).
remove
()
@
results_container
=
$
(
'.result-container'
)
@
Collapsible
.
setCollapsibles
(
@
results_container
)
@
Collapsible
.
setCollapsibles
(
@
results_container
)
else
else
@
errors_area
.
html
(
response
.
error
)
@
errors_area
.
html
(
response
.
error
)
...
...
lms/templates/combined_open_ended_results.html
View file @
943c0ff8
<div
class=
"result-container"
>
<div
class=
"result-container"
>
<h4>
Results
</h4><br/>
${results | n}
${results | n}
</div>
</div>
\ No newline at end of file
lms/templates/open_ended.html
View file @
943c0ff8
...
@@ -28,8 +28,4 @@
...
@@ -28,8 +28,4 @@
<div
class=
"open-ended-action"
></div>
<div
class=
"open-ended-action"
></div>
<span
id=
"answer_${id}"
></span>
<span
id=
"answer_${id}"
></span>
<div
class=
"external-grader-message"
>
${msg|n}
</div>
</section>
</section>
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