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
178be443
Commit
178be443
authored
Aug 01, 2013
by
Vik Paruchuri
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Remove legend, start to edit rubric
parent
77e57448
Show whitespace changes
Inline
Side-by-side
Showing
6 changed files
with
50 additions
and
30 deletions
+50
-30
common/lib/xmodule/xmodule/css/combinedopenended/display.scss
+14
-0
common/lib/xmodule/xmodule/js/src/combinedopenended/display.coffee
+13
-18
common/lib/xmodule/xmodule/open_ended_grading_classes/combined_open_ended_rubric.py
+10
-0
common/lib/xmodule/xmodule/open_ended_grading_classes/openendedchild.py
+0
-0
lms/templates/combinedopenended/combined_open_ended_results.html
+1
-1
lms/templates/combinedopenended/openended/open_ended_combined_rubric.html
+12
-11
No files found.
common/lib/xmodule/xmodule/css/combinedopenended/display.scss
View file @
178be443
...
@@ -207,6 +207,20 @@ div.combined-rubric-container {
...
@@ -207,6 +207,20 @@ div.combined-rubric-container {
font-size
:
.9em
;
font-size
:
.9em
;
font-weight
:
bold
;
font-weight
:
bold
;
}
}
label
.choicegroup_correct
{
&
:before
{
margin-right
:
15px
;
content
:
url('../images/correct-icon.png')
;
}
}
label
.choicegroup_incorrect
{
&
:before
{
margin-right
:
15px
;
content
:
url('../images/incorrect-icon.png')
;
}
}
}
}
div
.result-container
{
div
.result-container
{
...
...
common/lib/xmodule/xmodule/js/src/combinedopenended/display.coffee
View file @
178be443
...
@@ -55,7 +55,6 @@ class @Rubric
...
@@ -55,7 +55,6 @@ class @Rubric
data
=
{
location
:
location
,
selection
:
target_selection
,
category
:
category
}
data
=
{
location
:
location
,
selection
:
target_selection
,
category
:
category
}
Logger
.
log
'rubric_select'
,
data
Logger
.
log
'rubric_select'
,
data
# finds the scores for each rubric category
# finds the scores for each rubric category
@
get_score_list
:
()
=>
@
get_score_list
:
()
=>
# find the number of categories:
# find the number of categories:
...
@@ -97,7 +96,6 @@ class @CombinedOpenEnded
...
@@ -97,7 +96,6 @@ class @CombinedOpenEnded
submit_evaluation_sel
:
'.submit-evaluation-button'
submit_evaluation_sel
:
'.submit-evaluation-button'
result_container_sel
:
'div.result-container'
result_container_sel
:
'div.result-container'
combined_rubric_sel
:
'.combined-rubric-container'
combined_rubric_sel
:
'.combined-rubric-container'
legend_sel
:
'.legend-container'
open_ended_child_sel
:
'section.open-ended-child'
open_ended_child_sel
:
'section.open-ended-child'
error_sel
:
'.error'
error_sel
:
'.error'
answer_area_sel
:
'textarea.answer'
answer_area_sel
:
'textarea.answer'
...
@@ -114,6 +112,8 @@ class @CombinedOpenEnded
...
@@ -114,6 +112,8 @@ class @CombinedOpenEnded
sub_id_sel
:
'input.submission_id'
sub_id_sel
:
'input.submission_id'
grader_id_sel
:
'input.grader_id'
grader_id_sel
:
'input.grader_id'
grader_status_sel
:
'.grader-status'
grader_status_sel
:
'.grader-status'
info_rubric_elements_sel
:
'.rubric-elements-info'
rubric_collapse_sel
:
'.rubric-collapse'
constructor
:
(
el
)
->
constructor
:
(
el
)
->
@
el
=
el
@
el
=
el
...
@@ -194,10 +194,6 @@ class @CombinedOpenEnded
...
@@ -194,10 +194,6 @@ class @CombinedOpenEnded
else
if
@
task_number
==
1
and
@
child_state
!=
'initial'
else
if
@
task_number
==
1
and
@
child_state
!=
'initial'
@
prompt_hide
()
@
prompt_hide
()
if
@
child_state
!=
"initial"
@
show_legend_current
()
@
legend_container
=
@
$
(
@
legend_sel
)
@
find_assessment_elements
()
@
find_assessment_elements
()
@
find_hint_elements
()
@
find_hint_elements
()
...
@@ -240,7 +236,10 @@ class @CombinedOpenEnded
...
@@ -240,7 +236,10 @@ class @CombinedOpenEnded
$
.
postWithPrefix
"
#{
@
ajax_url
}
/get_combined_rubric"
,
data
,
(
response
)
=>
$
.
postWithPrefix
"
#{
@
ajax_url
}
/get_combined_rubric"
,
data
,
(
response
)
=>
if
response
.
success
if
response
.
success
@
combined_rubric_container
.
after
(
response
.
html
).
remove
()
@
combined_rubric_container
.
after
(
response
.
html
).
remove
()
@
combined_rubric_container
=
$
(
@
combined_rubric_sel
)
@
combined_rubric_container
=
@
$
(
@
combined_rubric_sel
)
@
toggle_rubric
(
""
)
@
rubric_collapse
=
@
$
(
@
rubric_collapse_sel
)
@
rubric_collapse
.
click
@
toggle_rubric
show_status_current
:
()
=>
show_status_current
:
()
=>
data
=
{}
data
=
{}
...
@@ -249,13 +248,6 @@ class @CombinedOpenEnded
...
@@ -249,13 +248,6 @@ class @CombinedOpenEnded
@
status_container
.
after
(
response
.
html
).
remove
()
@
status_container
.
after
(
response
.
html
).
remove
()
@
status_container
=
$
(
@
status_container_sel
)
@
status_container
=
$
(
@
status_container_sel
)
show_legend_current
:
()
=>
data
=
{}
$
.
postWithPrefix
"
#{
@
ajax_url
}
/get_legend"
,
data
,
(
response
)
=>
if
response
.
success
@
legend_container
.
after
(
response
.
html
).
remove
()
@
legend_container
=
$
(
@
legend_sel
)
get_last_response
:
()
=>
get_last_response
:
()
=>
data
=
{}
data
=
{}
$
.
postWithPrefix
"
#{
@
ajax_url
}
/get_last_response"
,
data
,
(
response
)
=>
$
.
postWithPrefix
"
#{
@
ajax_url
}
/get_last_response"
,
data
,
(
response
)
=>
...
@@ -302,7 +294,6 @@ class @CombinedOpenEnded
...
@@ -302,7 +294,6 @@ class @CombinedOpenEnded
@
reset_button
.
hide
()
@
reset_button
.
hide
()
@
next_problem_button
.
hide
()
@
next_problem_button
.
hide
()
@
hide_file_upload
()
@
hide_file_upload
()
@
legend_container
.
show
()
@
hint_area
.
attr
(
'disabled'
,
false
)
@
hint_area
.
attr
(
'disabled'
,
false
)
if
@
task_number
>
1
or
@
child_state
!=
'initial'
if
@
task_number
>
1
or
@
child_state
!=
'initial'
@
show_status_current
()
@
show_status_current
()
...
@@ -325,7 +316,6 @@ class @CombinedOpenEnded
...
@@ -325,7 +316,6 @@ class @CombinedOpenEnded
@
submit_button
.
prop
(
'value'
,
'Submit'
)
@
submit_button
.
prop
(
'value'
,
'Submit'
)
@
submit_button
.
click
@
save_answer
@
submit_button
.
click
@
save_answer
@
setup_file_upload
()
@
setup_file_upload
()
@
legend_container
.
hide
()
else
if
@
child_state
==
'assessing'
else
if
@
child_state
==
'assessing'
@
answer_area
.
attr
(
"disabled"
,
true
)
@
answer_area
.
attr
(
"disabled"
,
true
)
@
replace_text_inputs
()
@
replace_text_inputs
()
...
@@ -338,7 +328,6 @@ class @CombinedOpenEnded
...
@@ -338,7 +328,6 @@ class @CombinedOpenEnded
if
@
task_number
==
1
and
@
task_count
==
1
if
@
task_number
==
1
and
@
task_count
==
1
@
grader_status
=
@
$
(
@
grader_status_sel
)
@
grader_status
=
@
$
(
@
grader_status_sel
)
@
grader_status
.
html
(
"<p>Response submitted for scoring.</p>"
)
@
grader_status
.
html
(
"<p>Response submitted for scoring.</p>"
)
@
legend_container
.
hide
()
else
if
@
child_state
==
'post_assessment'
else
if
@
child_state
==
'post_assessment'
if
@
child_type
==
"openended"
if
@
child_type
==
"openended"
@
skip_button
.
show
()
@
skip_button
.
show
()
...
@@ -568,7 +557,7 @@ class @CombinedOpenEnded
...
@@ -568,7 +557,7 @@ class @CombinedOpenEnded
reload
:
->
reload
:
->
location
.
reload
()
location
.
reload
()
collapse_question
:
()
=>
collapse_question
:
(
event
)
=>
@
prompt_container
.
slideToggle
()
@
prompt_container
.
slideToggle
()
@
prompt_container
.
toggleClass
(
'open'
)
@
prompt_container
.
toggleClass
(
'open'
)
if
@
question_header
.
text
()
==
"(Hide)"
if
@
question_header
.
text
()
==
"(Hide)"
...
@@ -578,6 +567,7 @@ class @CombinedOpenEnded
...
@@ -578,6 +567,7 @@ class @CombinedOpenEnded
Logger
.
log
'oe_show_question'
,
{
location
:
@
location
}
Logger
.
log
'oe_show_question'
,
{
location
:
@
location
}
new_text
=
"(Hide)"
new_text
=
"(Hide)"
@
question_header
.
text
(
new_text
)
@
question_header
.
text
(
new_text
)
return
false
prompt_show
:
()
=>
prompt_show
:
()
=>
if
@
prompt_container
.
is
(
":hidden"
)
==
true
if
@
prompt_container
.
is
(
":hidden"
)
==
true
...
@@ -628,3 +618,8 @@ class @CombinedOpenEnded
...
@@ -628,3 +618,8 @@ class @CombinedOpenEnded
@
$
(
@
file_upload_preview_sel
)[
0
].
height
=
height_px
/
scale_factor
@
$
(
@
file_upload_preview_sel
)[
0
].
height
=
height_px
/
scale_factor
@
$
(
@
file_upload_preview_sel
).
show
()
@
$
(
@
file_upload_preview_sel
).
show
()
reader
.
readAsDataURL
(
@
$
(
@
file_upload_box_sel
)[
0
].
files
[
0
])
reader
.
readAsDataURL
(
@
$
(
@
file_upload_box_sel
)[
0
].
files
[
0
])
toggle_rubric
:
(
event
)
=>
info_rubric_elements
=
@
$
(
@
info_rubric_elements_sel
)
info_rubric_elements
.
slideToggle
()
return
false
common/lib/xmodule/xmodule/open_ended_grading_classes/combined_open_ended_rubric.py
View file @
178be443
...
@@ -208,6 +208,7 @@ class CombinedOpenEndedRubric(object):
...
@@ -208,6 +208,7 @@ class CombinedOpenEndedRubric(object):
feedback_types
)
feedback_types
)
rubric_categories
=
self
.
extract_categories
(
rubric_xml
)
rubric_categories
=
self
.
extract_categories
(
rubric_xml
)
max_scores
=
map
((
lambda
cat
:
cat
[
'options'
][
-
1
][
'points'
]),
rubric_categories
)
max_scores
=
map
((
lambda
cat
:
cat
[
'options'
][
-
1
][
'points'
]),
rubric_categories
)
actual_scores
=
[]
max_score
=
max
(
max_scores
)
max_score
=
max
(
max_scores
)
for
i
in
xrange
(
0
,
len
(
rubric_categories
)):
for
i
in
xrange
(
0
,
len
(
rubric_categories
)):
category
=
rubric_categories
[
i
]
category
=
rubric_categories
[
i
]
...
@@ -217,9 +218,18 @@ class CombinedOpenEndedRubric(object):
...
@@ -217,9 +218,18 @@ class CombinedOpenEndedRubric(object):
if
tuple
[
1
]
==
i
and
tuple
[
2
]
==
j
:
if
tuple
[
1
]
==
i
and
tuple
[
2
]
==
j
:
for
grader_type
in
tuple
[
3
]:
for
grader_type
in
tuple
[
3
]:
rubric_categories
[
i
][
'options'
][
j
][
'grader_types'
]
.
append
(
grader_type
)
rubric_categories
[
i
][
'options'
][
j
][
'grader_types'
]
.
append
(
grader_type
)
if
len
(
actual_scores
)
<=
i
:
actual_scores
.
append
([
j
])
else
:
actual_scores
[
i
]
+=
[
j
]
actual_scores
=
[
sum
(
i
)
/
len
(
i
)
for
i
in
actual_scores
]
correct
=
[
int
(
a
>.
66
)
for
a
in
actual_scores
]
html
=
self
.
system
.
render_template
(
'{0}/open_ended_combined_rubric.html'
.
format
(
self
.
TEMPLATE_DIR
),
html
=
self
.
system
.
render_template
(
'{0}/open_ended_combined_rubric.html'
.
format
(
self
.
TEMPLATE_DIR
),
{
'categories'
:
rubric_categories
,
{
'categories'
:
rubric_categories
,
'max_scores'
:
max_scores
,
'correct'
:
correct
,
'has_score'
:
True
,
'has_score'
:
True
,
'view_only'
:
True
,
'view_only'
:
True
,
'max_score'
:
max_score
,
'max_score'
:
max_score
,
...
...
common/lib/xmodule/xmodule/open_ended_grading_classes/openendedchild.py
View file @
178be443
lms/templates/combinedopenended/combined_open_ended_results.html
View file @
178be443
<div
class=
"${class_name}"
>
<div
class=
"${class_name}"
>
<h4>
${task_name}
</h4>
<h4>
${task_name}
</h4>
<a
class=
"rubric-collapse"
href=
"#"
>
(Show)
</a>
${results | n}
${results | n}
</div>
</div>
lms/templates/combinedopenended/openended/open_ended_combined_rubric.html
View file @
178be443
...
@@ -7,18 +7,19 @@
...
@@ -7,18 +7,19 @@
<
%
option =
category['options'][j]
%
>
<
%
option =
category['options'][j]
%
>
<li
class=
"rubric-list-item"
>
<li
class=
"rubric-list-item"
>
<div
class=
"rubric-label"
>
<div
class=
"rubric-label"
>
%for grader_type in category['options'][j]['grader_types']:
%if len(category['options'][j]['grader_types'])>0:
% if grader_type in grader_type_image_dict:
%if correct[i]==1:
<
%
grader_image =
grader_type_image_dict[grader_type]
%
>
<label
class=
"choicegroup_correct"
>
% if grader_type in human_grader_types:
%else:
<
%
human_title =
human_grader_types[grader_type]
%
>
<label
class=
"choicegroup_incorrect"
>
% else:
%endif
<
%
human_title =
grader_type
%
>
% endif
<img
src=
"${grader_image}"
title=
"${human_title}"
/>
% endif
%endfor
${option['points']} points : ${option['text']}
${option['points']} points : ${option['text']}
</label>
%else:
<label
class=
"rubric-elements-info"
>
${option['points']} points : ${option['text']}
</label>
%endif
</div>
</div>
</li>
</li>
% endfor
% endfor
...
...
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