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
cc7c0254
Commit
cc7c0254
authored
Aug 02, 2013
by
marco
Browse files
Options
Browse Files
Download
Plain Diff
Merge branch 'feature/vik/oe-ui' of github.com:edx/edx-platform into feature/vik/oe-ui
parents
0e8c2998
178be443
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 @
cc7c0254
...
...
@@ -246,6 +246,20 @@ div.combined-rubric-container {
font-weight
:
bold
;
font-size
:
.9em
;
}
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
{
...
...
common/lib/xmodule/xmodule/js/src/combinedopenended/display.coffee
View file @
cc7c0254
...
...
@@ -55,7 +55,6 @@ class @Rubric
data
=
{
location
:
location
,
selection
:
target_selection
,
category
:
category
}
Logger
.
log
'rubric_select'
,
data
# finds the scores for each rubric category
@
get_score_list
:
()
=>
# find the number of categories:
...
...
@@ -97,7 +96,6 @@ class @CombinedOpenEnded
submit_evaluation_sel
:
'.submit-evaluation-button'
result_container_sel
:
'div.result-container'
combined_rubric_sel
:
'.combined-rubric-container'
legend_sel
:
'.legend-container'
open_ended_child_sel
:
'section.open-ended-child'
error_sel
:
'.error'
answer_area_sel
:
'textarea.answer'
...
...
@@ -114,6 +112,8 @@ class @CombinedOpenEnded
sub_id_sel
:
'input.submission_id'
grader_id_sel
:
'input.grader_id'
grader_status_sel
:
'.grader-status'
info_rubric_elements_sel
:
'.rubric-elements-info'
rubric_collapse_sel
:
'.rubric-collapse'
constructor
:
(
el
)
->
@
el
=
el
...
...
@@ -194,10 +194,6 @@ class @CombinedOpenEnded
else
if
@
task_number
==
1
and
@
child_state
!=
'initial'
@
prompt_hide
()
if
@
child_state
!=
"initial"
@
show_legend_current
()
@
legend_container
=
@
$
(
@
legend_sel
)
@
find_assessment_elements
()
@
find_hint_elements
()
...
...
@@ -240,7 +236,10 @@ class @CombinedOpenEnded
$
.
postWithPrefix
"
#{
@
ajax_url
}
/get_combined_rubric"
,
data
,
(
response
)
=>
if
response
.
success
@
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
:
()
=>
data
=
{}
...
...
@@ -249,13 +248,6 @@ class @CombinedOpenEnded
@
status_container
.
after
(
response
.
html
).
remove
()
@
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
:
()
=>
data
=
{}
$
.
postWithPrefix
"
#{
@
ajax_url
}
/get_last_response"
,
data
,
(
response
)
=>
...
...
@@ -302,7 +294,6 @@ class @CombinedOpenEnded
@
reset_button
.
hide
()
@
next_problem_button
.
hide
()
@
hide_file_upload
()
@
legend_container
.
show
()
@
hint_area
.
attr
(
'disabled'
,
false
)
if
@
task_number
>
1
or
@
child_state
!=
'initial'
@
show_status_current
()
...
...
@@ -325,7 +316,6 @@ class @CombinedOpenEnded
@
submit_button
.
prop
(
'value'
,
'Submit'
)
@
submit_button
.
click
@
save_answer
@
setup_file_upload
()
@
legend_container
.
hide
()
else
if
@
child_state
==
'assessing'
@
answer_area
.
attr
(
"disabled"
,
true
)
@
replace_text_inputs
()
...
...
@@ -338,7 +328,6 @@ class @CombinedOpenEnded
if
@
task_number
==
1
and
@
task_count
==
1
@
grader_status
=
@
$
(
@
grader_status_sel
)
@
grader_status
.
html
(
"<p>Response submitted for scoring.</p>"
)
@
legend_container
.
hide
()
else
if
@
child_state
==
'post_assessment'
if
@
child_type
==
"openended"
@
skip_button
.
show
()
...
...
@@ -568,7 +557,7 @@ class @CombinedOpenEnded
reload
:
->
location
.
reload
()
collapse_question
:
()
=>
collapse_question
:
(
event
)
=>
@
prompt_container
.
slideToggle
()
@
prompt_container
.
toggleClass
(
'open'
)
if
@
question_header
.
text
()
==
"(Hide)"
...
...
@@ -578,6 +567,7 @@ class @CombinedOpenEnded
Logger
.
log
'oe_show_question'
,
{
location
:
@
location
}
new_text
=
"↥ Hide Prompt"
@
question_header
.
text
(
new_text
)
return
false
prompt_show
:
()
=>
if
@
prompt_container
.
is
(
":hidden"
)
==
true
...
...
@@ -628,3 +618,8 @@ class @CombinedOpenEnded
@
$
(
@
file_upload_preview_sel
)[
0
].
height
=
height_px
/
scale_factor
@
$
(
@
file_upload_preview_sel
).
show
()
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 @
cc7c0254
...
...
@@ -208,6 +208,7 @@ class CombinedOpenEndedRubric(object):
feedback_types
)
rubric_categories
=
self
.
extract_categories
(
rubric_xml
)
max_scores
=
map
((
lambda
cat
:
cat
[
'options'
][
-
1
][
'points'
]),
rubric_categories
)
actual_scores
=
[]
max_score
=
max
(
max_scores
)
for
i
in
xrange
(
0
,
len
(
rubric_categories
)):
category
=
rubric_categories
[
i
]
...
...
@@ -217,9 +218,18 @@ class CombinedOpenEndedRubric(object):
if
tuple
[
1
]
==
i
and
tuple
[
2
]
==
j
:
for
grader_type
in
tuple
[
3
]:
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
),
{
'categories'
:
rubric_categories
,
'max_scores'
:
max_scores
,
'correct'
:
correct
,
'has_score'
:
True
,
'view_only'
:
True
,
'max_score'
:
max_score
,
...
...
common/lib/xmodule/xmodule/open_ended_grading_classes/openendedchild.py
View file @
cc7c0254
lms/templates/combinedopenended/combined_open_ended_results.html
View file @
cc7c0254
<div
class=
"${class_name}"
>
<h4>
${task_name}
</h4>
<h4>
${task_name}
</h4>
<a
class=
"rubric-collapse"
href=
"#"
>
(Show)
</a>
${results | n}
</div>
lms/templates/combinedopenended/openended/open_ended_combined_rubric.html
View file @
cc7c0254
...
...
@@ -7,18 +7,19 @@
<
%
option =
category['options'][j]
%
>
<li
class=
"rubric-list-item"
>
<div
class=
"rubric-label"
>
%for grader_type in category['options'][j]['grader_types']:
% if grader_type in grader_type_image_dict:
<
%
grader_image =
grader_type_image_dict[grader_type]
%
>
% if grader_type in human_grader_types:
<
%
human_title =
human_grader_types[grader_type]
%
>
% else:
<
%
human_title =
grader_type
%
>
% endif
<img
src=
"${grader_image}"
title=
"${human_title}"
/>
% endif
%endfor
%if len(category['options'][j]['grader_types'])>0:
%if correct[i]==1:
<label
class=
"choicegroup_correct"
>
%else:
<label
class=
"choicegroup_incorrect"
>
%endif
${option['points']} points : ${option['text']}
</label>
%else:
<label
class=
"rubric-elements-info"
>
${option['points']} points : ${option['text']}
</label>
%endif
</div>
</li>
% 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