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
24bfe440
Commit
24bfe440
authored
Jan 08, 2013
by
Vik Paruchuri
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Some restyling, automatically check for feedback, remove reload button
parent
5273d447
Hide whitespace changes
Inline
Side-by-side
Showing
4 changed files
with
27 additions
and
12 deletions
+27
-12
common/lib/xmodule/xmodule/css/combinedopenended/display.scss
+4
-4
common/lib/xmodule/xmodule/js/src/combinedopenended/display.coffee
+17
-6
common/lib/xmodule/xmodule/open_ended_module.py
+6
-1
lms/templates/open_ended.html
+0
-1
No files found.
common/lib/xmodule/xmodule/css/combinedopenended/display.scss
View file @
24bfe440
...
...
@@ -24,12 +24,12 @@ section.combined-open-ended {
.status-container
{
float
:right
;
width
:
3
0%
;
width
:
4
0%
;
}
.item-container
{
float
:left
;
width
:
6
3%
;
width
:
5
3%
;
}
&
:after
...
...
@@ -68,8 +68,8 @@ section.open-ended-child, section.combined-open-ended-status {
}
.feedback-on-feedback
{
height
:
1
0
0px
;
width
:
1
50px
;
height
:
1
5
0px
;
width
:
2
50px
;
margin-right
:
0px
;
}
...
...
common/lib/xmodule/xmodule/js/src/combinedopenended/display.coffee
View file @
24bfe440
...
...
@@ -35,7 +35,6 @@ class @CombinedOpenEnded
@
child_state
=
@
el
.
data
(
'state'
)
@
child_type
=
@
el
.
data
(
'child-type'
)
if
@
child_type
==
"openended"
@
reload_button
=
@
$
(
'.reload-button'
)
@
skip_button
=
@
$
(
'.skip-button'
)
@
skip_button
.
click
@
skip_post_assessment
...
...
@@ -58,7 +57,6 @@ class @CombinedOpenEnded
@
next_problem_button
.
hide
()
@
hint_area
.
attr
(
'disabled'
,
false
)
if
@
child_type
==
"openended"
@
reload_button
.
hide
()
@
skip_button
.
hide
()
if
@
child_state
==
'initial'
@
answer_area
.
attr
(
"disabled"
,
false
)
...
...
@@ -70,10 +68,9 @@ class @CombinedOpenEnded
@
submit_button
.
click
@
save_assessment
if
@
child_type
==
"openended"
@
submit_button
.
hide
()
@
reload_button
.
show
()
@
queueing
()
else
if
@
child_state
==
'post_assessment'
if
@
child_type
==
"openended"
@
reload_button
.
hide
()
@
skip_button
.
show
()
@
skip_post_assessment
()
@
answer_area
.
attr
(
"disabled"
,
true
)
...
...
@@ -237,4 +234,18 @@ class @CombinedOpenEnded
@
el
.
find
(
'.open-ended-alert'
).
remove
()
alert_elem
=
"<div class='open-ended-alert'>"
+
msg
+
"</div>"
@
el
.
find
(
'.open-ended-action'
).
after
(
alert_elem
)
@
el
.
find
(
'.open-ended-alert'
).
css
(
opacity
:
0
).
animate
(
opacity
:
1
,
700
)
\ No newline at end of file
@
el
.
find
(
'.open-ended-alert'
).
css
(
opacity
:
0
).
animate
(
opacity
:
1
,
700
)
queueing
:
=>
if
@
child_state
==
"assessing"
and
@
child_type
==
"openended"
if
window
.
queuePollerID
# Only one poller 'thread' per Problem
window
.
clearTimeout
(
window
.
queuePollerID
)
window
.
queuePollerID
=
window
.
setTimeout
(
@
poll
,
10000
)
poll
:
=>
$
.
postWithPrefix
"
#{
@
ajax_url
}
/check_for_score"
,
(
response
)
=>
if
response
.
state
==
"done"
or
response
.
state
==
"post_assessment"
delete
window
.
queuePollerID
location
.
reload
()
else
window
.
queuePollerID
=
window
.
setTimeout
(
@
poll
,
10000
)
\ No newline at end of file
common/lib/xmodule/xmodule/open_ended_module.py
View file @
24bfe440
...
...
@@ -405,7 +405,7 @@ class OpenEndedModule(openendedchild.OpenEndedChild):
return
correct
def
format_feedback_with_evaluation
(
self
,
feedback
):
context
=
{
'msg'
:
feedback
,
'id'
:
"1"
,
'rows'
:
30
,
'cols'
:
3
0
}
context
=
{
'msg'
:
feedback
,
'id'
:
"1"
,
'rows'
:
50
,
'cols'
:
5
0
}
html
=
render_to_string
(
'open_ended_evaluation.html'
,
context
)
return
html
...
...
@@ -424,6 +424,7 @@ class OpenEndedModule(openendedchild.OpenEndedChild):
'score_update'
:
self
.
update_score
,
'save_post_assessment'
:
self
.
message_post
,
'skip_post_assessment'
:
self
.
skip_post_assessment
,
'check_for_score'
:
self
.
check_for_score
,
}
if
dispatch
not
in
handlers
:
...
...
@@ -438,6 +439,10 @@ class OpenEndedModule(openendedchild.OpenEndedChild):
})
return
json
.
dumps
(
d
,
cls
=
ComplexEncoder
)
def
check_for_score
(
self
,
get
,
system
):
state
=
self
.
state
return
{
'state'
:
state
}
def
save_answer
(
self
,
get
,
system
):
if
self
.
attempts
>
self
.
max_attempts
:
# If too many attempts, prevent student from saving answer and
...
...
lms/templates/open_ended.html
View file @
24bfe440
...
...
@@ -29,7 +29,6 @@
<span
id=
"answer_${id}"
></span>
<input
name=
"reload"
class=
"reload-button"
type=
"button"
value=
"Recheck for Feedback"
onclick=
"document.location.reload(true);"
/>
<div
class=
"external-grader-message"
>
${msg|n}
</div>
...
...
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