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
4dc0859f
Commit
4dc0859f
authored
Feb 09, 2013
by
Vik Paruchuri
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Finish refactor of rubric templates, redo some margins
parent
efe5e491
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
36 additions
and
20 deletions
+36
-20
common/lib/xmodule/xmodule/combined_open_ended_rubric.py
+20
-20
common/lib/xmodule/xmodule/css/combinedopenended/display.scss
+15
-0
lms/templates/open_ended_view_only_rubric.html
+1
-0
No files found.
common/lib/xmodule/xmodule/combined_open_ended_rubric.py
View file @
4dc0859f
...
@@ -48,26 +48,26 @@ class CombinedOpenEndedRubric(object):
...
@@ -48,26 +48,26 @@ class CombinedOpenEndedRubric(object):
html: the html that corresponds to the xml given
html: the html that corresponds to the xml given
'''
'''
success
=
False
success
=
False
try
:
#
try:
rubric_categories
=
self
.
extract_categories
(
rubric_xml
)
rubric_categories
=
self
.
extract_categories
(
rubric_xml
)
rubric_scores
=
[
cat
[
'score'
]
for
cat
in
rubric_categories
]
rubric_scores
=
[
cat
[
'score'
]
for
cat
in
rubric_categories
]
max_scores
=
map
((
lambda
cat
:
cat
[
'options'
][
-
1
][
'points'
]),
rubric_categories
)
max_scores
=
map
((
lambda
cat
:
cat
[
'options'
][
-
1
][
'points'
]),
rubric_categories
)
max_score
=
max
(
max_scores
)
max_score
=
max
(
max_scores
)
rubric_template
=
'open_ended_rubric.html'
rubric_template
=
'open_ended_rubric.html'
if
self
.
view_only
:
if
self
.
view_only
:
rubric_template
=
'open_ended_view_only_rubric.html'
rubric_template
=
'open_ended_view_only_rubric.html'
html
=
self
.
system
.
render_template
(
rubric_template
,
html
=
self
.
system
.
render_template
(
rubric_template
,
{
'categories'
:
rubric_categories
,
{
'categories'
:
rubric_categories
,
'has_score'
:
self
.
has_score
,
'has_score'
:
self
.
has_score
,
'view_only'
:
self
.
view_only
,
'view_only'
:
self
.
view_only
,
'max_score'
:
max_score
,
'max_score'
:
max_score
,
'combined_rubric'
:
False
'combined_rubric'
:
False
})
})
success
=
True
success
=
True
except
:
#
except:
error_message
=
"[render_rubric] Could not parse the rubric with xml: {0}"
.
format
(
rubric_xml
)
#
error_message = "[render_rubric] Could not parse the rubric with xml: {0}".format(rubric_xml)
log
.
error
(
error_message
)
#
log.error(error_message)
raise
RubricParsingError
(
error_message
)
#
raise RubricParsingError(error_message)
return
{
'success'
:
success
,
'html'
:
html
,
'rubric_scores'
:
rubric_scores
}
return
{
'success'
:
success
,
'html'
:
html
,
'rubric_scores'
:
rubric_scores
}
def
check_if_rubric_is_parseable
(
self
,
rubric_string
,
location
,
max_score_allowed
,
max_score
):
def
check_if_rubric_is_parseable
(
self
,
rubric_string
,
location
,
max_score_allowed
,
max_score
):
...
...
common/lib/xmodule/xmodule/css/combinedopenended/display.scss
View file @
4dc0859f
...
@@ -51,6 +51,7 @@ section.legend-container {
...
@@ -51,6 +51,7 @@ section.legend-container {
display
:
inline
;
display
:
inline
;
width
:
20%
;
width
:
20%
;
}
}
margin-bottom
:
5px
;
}
}
section
.combined-open-ended-status
{
section
.combined-open-ended-status
{
...
@@ -106,6 +107,20 @@ section.combined-open-ended-status {
...
@@ -106,6 +107,20 @@ section.combined-open-ended-status {
}
}
}
}
div
.combined-rubric-container
{
ul
.rubric-list
{
list-style-type
:
none
;
padding
:
0
;
margin
:
0
;
li
{
&
.rubric-list-item
{
margin-bottom
:
2px
;
padding
:
0px
;
}
}
}
}
div
.result-container
{
div
.result-container
{
.evaluation
{
.evaluation
{
...
...
lms/templates/open_ended_view_only_rubric.html
View file @
4dc0859f
...
@@ -6,6 +6,7 @@
...
@@ -6,6 +6,7 @@
<
%
option =
category['options'][j]
%
>
<
%
option =
category['options'][j]
%
>
% if option['selected']:
% if option['selected']:
${category['description']} : ${option['points']} points
${category['description']} : ${option['points']} points
% endif
% endfor
% endfor
% endfor
% endfor
</div>
</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