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
70f71857
Commit
70f71857
authored
Feb 08, 2013
by
Vik Paruchuri
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Make a legend
parent
5ac6fad1
Hide whitespace changes
Inline
Side-by-side
Showing
4 changed files
with
34 additions
and
21 deletions
+34
-21
common/lib/xmodule/xmodule/combined_open_ended_modulev1.py
+2
-2
common/lib/xmodule/xmodule/combined_open_ended_rubric.py
+4
-0
lms/templates/combined_open_ended.html
+0
-1
lms/templates/combined_open_ended_status.html
+28
-18
No files found.
common/lib/xmodule/xmodule/combined_open_ended_modulev1.py
View file @
70f71857
...
...
@@ -22,7 +22,7 @@ from .xml_module import XmlDescriptor
from
xmodule.modulestore
import
Location
import
self_assessment_module
import
open_ended_module
from
combined_open_ended_rubric
import
CombinedOpenEndedRubric
,
RubricParsingError
,
GRADER_TYPE_IMAGE_DICT
,
HUMAN_GRADER_TYPE
from
combined_open_ended_rubric
import
CombinedOpenEndedRubric
,
RubricParsingError
,
GRADER_TYPE_IMAGE_DICT
,
HUMAN_GRADER_TYPE
,
LEGEND_LIST
from
.stringify
import
stringify_children
import
dateutil
import
dateutil.parser
...
...
@@ -673,7 +673,7 @@ 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
}
context
=
{
'status_list'
:
status
,
'grader_type_image_dict'
:
GRADER_TYPE_IMAGE_DICT
,
'legend_list'
:
LEGEND_LIST
}
status_html
=
self
.
system
.
render_template
(
"combined_open_ended_status.html"
,
context
)
return
status_html
...
...
common/lib/xmodule/xmodule/combined_open_ended_rubric.py
View file @
70f71857
...
...
@@ -19,6 +19,10 @@ HUMAN_GRADER_TYPE = {
'BC'
:
'AI-Assessment'
,
}
DO_NOT_DISPLAY
=
[
'BC'
,
'IN'
]
LEGEND_LIST
=
[{
'name'
:
HUMAN_GRADER_TYPE
[
k
],
'image'
:
GRADER_TYPE_IMAGE_DICT
[
k
]}
for
k
in
GRADER_TYPE_IMAGE_DICT
.
keys
()
if
k
not
in
DO_NOT_DISPLAY
]
class
RubricParsingError
(
Exception
):
def
__init__
(
self
,
msg
):
self
.
msg
=
msg
...
...
lms/templates/combined_open_ended.html
View file @
70f71857
...
...
@@ -17,7 +17,6 @@
<input
type=
"button"
value=
"Reset"
class=
"reset-button"
name=
"reset"
/>
<input
type=
"button"
value=
"Next Step"
class=
"next-step-button"
name=
"reset"
/>
</div>
<div
class=
"combined-rubric-container"
>
</div>
...
...
lms/templates/combined_open_ended_status.html
View file @
70f71857
<div
class=
"status-elements"
>
<section
id=
"combined-open-ended-status"
class=
"combined-open-ended-status"
>
%for i in xrange(0,len(status_list)):
<
%
status=
status_list[i]%
>
%if i==len(status_list)-1:
<div
class=
"statusitem statusitem-current"
data-status-number=
"${i}"
>
%else:
<div
class=
"statusitem"
data-status-number=
"${i}"
>
%endif
%if status['grader_type'] in grader_type_image_dict:
<
%
grader_image =
grader_type_image_dict[status['grader_type']]%
>
<img
src=
"${grader_image}"
title=
${status['human_grader_type']}
>
%else:
${status['human_task']}
%endif
(${status['human_state']}) ${status['score']} / ${status['max_score']}
</div>
%endfor
</section>
<section
name=
"legend-container"
>
% for i in xrange(0,len(legend_list)):
<
%
legend_title=
legend_list[i]['name']
%
>
<
%
legend_image=
legend_list[i]['image']
%
>
<div
class=
"legenditem"
>
${legend_title}=
<img
src=
"${legend_image}"
title=
${legend_title}
>
</div>
% endfor
</section>
<section
id=
"combined-open-ended-status"
class=
"combined-open-ended-status"
>
%for i in xrange(0,len(status_list)):
<
%
status=
status_list[i]%
>
%if i==len(status_list)-1:
<div
class=
"statusitem statusitem-current"
data-status-number=
"${i}"
>
%else:
<div
class=
"statusitem"
data-status-number=
"${i}"
>
%endif
%if status['grader_type'] in grader_type_image_dict:
<
%
grader_image =
grader_type_image_dict[status['grader_type']]%
>
<img
src=
"${grader_image}"
title=
${status['human_grader_type']}
>
%else:
${status['human_task']}
%endif
(${status['human_state']}) ${status['score']} / ${status['max_score']}
</div>
%endfor
</section>
</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