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
2b492956
Commit
2b492956
authored
Jan 14, 2013
by
Vik Paruchuri
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Fix up rubric rendering
parent
0567e8f0
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
13 additions
and
5 deletions
+13
-5
common/lib/xmodule/xmodule/combined_open_ended_rubric.py
+7
-3
common/lib/xmodule/xmodule/self_assessment_module.py
+5
-1
lms/templates/self_assessment_rubric.html
+1
-1
No files found.
common/lib/xmodule/xmodule/combined_open_ended_rubric.py
View file @
2b492956
...
...
@@ -2,9 +2,13 @@ from mitxmako.shortcuts import render_to_string
class
CombinedOpenEndedRubric
:
def
render_rubric
(
self
,
rubric_xml
):
rubric_categories
=
CombinedOpenEndedRubric
.
extract_rubric_categories
(
rubric_xml
)
html
=
render_to_string
(
'open_ended_rubric.html'
,
{
'rubric_categories'
:
rubric_categories
})
@staticmethod
def
render_rubric
(
rubric_xml
):
try
:
rubric_categories
=
CombinedOpenEndedRubric
.
extract_rubric_categories
(
rubric_xml
)
html
=
render_to_string
(
'open_ended_rubric.html'
,
{
'rubric_categories'
:
rubric_categories
})
except
:
html
=
rubric_xml
return
html
@staticmethod
...
...
common/lib/xmodule/xmodule/self_assessment_module.py
View file @
2b492956
...
...
@@ -21,6 +21,8 @@ from .xml_module import XmlDescriptor
from
xmodule.modulestore
import
Location
import
openendedchild
from
combined_open_ended_rubric
import
CombinedOpenEndedRubric
log
=
logging
.
getLogger
(
"mitx.courseware"
)
class
SelfAssessmentModule
(
openendedchild
.
OpenEndedChild
):
...
...
@@ -120,8 +122,10 @@ class SelfAssessmentModule(openendedchild.OpenEndedChild):
if
self
.
state
==
self
.
INITIAL
:
return
''
rubric_html
=
CombinedOpenEndedRubric
.
render_rubric
(
self
.
rubric
)
# we'll render it
context
=
{
'rubric'
:
self
.
rubric
,
context
=
{
'rubric'
:
rubric_html
,
'max_score'
:
self
.
_max_score
,
}
...
...
lms/templates/self_assessment_rubric.html
View file @
2b492956
<div
class=
"assessment"
>
<div
class=
"rubric"
>
<h3>
Self-assess your answer with this rubric:
</h3>
${rubric}
${rubric
| n
}
</div>
% if not read_only:
...
...
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