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
c6c77c0c
Commit
c6c77c0c
authored
Jan 07, 2013
by
Vik Paruchuri
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Simple status display
parent
0e2355c2
Show whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
16 additions
and
9 deletions
+16
-9
common/lib/xmodule/xmodule/combined_open_ended_module.py
+7
-4
common/lib/xmodule/xmodule/openendedchild.py
+0
-4
lms/templates/combined_open_ended_status.html
+9
-1
No files found.
common/lib/xmodule/xmodule/combined_open_ended_module.py
View file @
c6c77c0c
...
...
@@ -168,7 +168,7 @@ class CombinedOpenEndedModule(XModule):
'state'
:
self
.
state
,
'task_count'
:
len
(
self
.
task_xml
),
'task_number'
:
self
.
current_task_number
+
1
,
'status'
:
"temporary status."
'status'
:
self
.
get_status
(),
}
html
=
self
.
system
.
render_template
(
'combined_open_ended.html'
,
context
)
...
...
@@ -194,8 +194,9 @@ class CombinedOpenEndedModule(XModule):
task
=
children
[
'modules'
][
task_type
](
self
.
system
,
self
.
location
,
task_parsed_xml
,
task_descriptor
,
instance_state
=
task_state
)
last_response
=
task
.
latest_answer
()
last_score
=
task
.
latest_score
()
last_post_response
=
task
.
latest_post_response
()
last_response_dict
=
{
'response'
:
last_response
,
'score'
:
last_score
,
'post_response'
:
post_response
,
'type'
:
task_type
}
last_post_assessment
=
task
.
latest_post_assessment
()
max_score
=
task
.
max_score
()
last_response_dict
=
{
'response'
:
last_response
,
'score'
:
last_score
,
'post_assessment'
:
last_post_assessment
,
'type'
:
task_type
,
'max_score'
:
max_score
}
return
last_response_dict
...
...
@@ -273,7 +274,6 @@ class CombinedOpenEndedModule(XModule):
self
.
setup_next_task
()
return
{
'success'
:
True
}
def
get_instance_state
(
self
):
"""
Get the current score and state
...
...
@@ -293,10 +293,13 @@ class CombinedOpenEndedModule(XModule):
status
=
[]
for
i
in
xrange
(
0
,
self
.
current_task_number
):
task_data
=
self
.
get_last_response
(
i
)
task_data
.
update
({
'task_number'
:
i
+
1
})
status
.
append
(
task_data
)
context
=
{
'status_list'
:
status
}
status_html
=
self
.
system
.
render_template
(
"combined_open_ended_status.html"
,
context
)
return
status_html
class
CombinedOpenEndedDescriptor
(
XmlDescriptor
,
EditingDescriptor
):
"""
Module for adding self assessment questions to courses
...
...
common/lib/xmodule/xmodule/openendedchild.py
View file @
c6c77c0c
...
...
@@ -243,9 +243,5 @@ class OpenEndedChild():
def
handle_ajax
(
self
):
pass
def
type
(
self
):
pass
lms/templates/combined_open_ended_status.html
View file @
c6c77c0c
<section
id=
"combined-open-ended-status"
class=
"combined-open-ended-status"
>
%for status in status_list:
<statusitem>
Step ${status['task_number']} : ${status['score']} / ${status['max_score']}
%if status['type']=="openended":
${status['post_assessment']}
%endif
</statusitem>
%endfor
</section>
\ No newline at end of file
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