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
6e75584d
Commit
6e75584d
authored
Nov 30, 2012
by
Vik Paruchuri
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Convert templates to mako
parent
a20a6c8f
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
9 additions
and
8 deletions
+9
-8
common/lib/capa/capa/responsetypes.py
+2
-3
lms/templates/open_ended_error.html
+2
-1
lms/templates/open_ended_feedback.html
+5
-4
No files found.
common/lib/capa/capa/responsetypes.py
View file @
6e75584d
...
...
@@ -24,7 +24,6 @@ import os
import
subprocess
import
xml.sax.saxutils
as
saxutils
from
shapely.geometry
import
Point
,
MultiPoint
from
django.template.loader
import
render_to_string
# specific library imports
from
calc
import
evaluator
,
UndefinedVariable
...
...
@@ -2079,9 +2078,9 @@ class OpenEndedResponse(LoncapaResponse):
feedback
=
self
.
_convert_longform_feedback_to_html
(
response_items
)
if
not
response_items
[
'success'
]:
return
render_to_string
(
"open_ended_error.html"
,
{
'errors'
:
feedback
})
return
self
.
system
.
render_template
(
"open_ended_error.html"
,
{
'errors'
:
feedback
})
feedback_template
=
render_to_string
(
"open_ended_feedback.html"
,{
feedback_template
=
self
.
system
.
render_template
(
"open_ended_feedback.html"
,{
'grader_type'
:
response_items
[
'grader_type'
],
'score'
:
response_items
[
'score'
],
'feedback'
:
feedback
,
...
...
lms/templates/open_ended_error.html
View file @
6e75584d
...
...
@@ -6,7 +6,7 @@
</div>
<div
class=
"longform"
>
<div
class=
"result-errors"
>
{{errors}
}
${errors
}
</div>
</div>
</section>
\ No newline at end of file
lms/templates/open_ended_feedback.html
View file @
6e75584d
...
...
@@ -2,15 +2,15 @@
<header>
Feedback
</header>
<div
class=
"shortform"
>
<div
class=
"result-output"
>
<p>
Score:
{{score}
}
</p>
{% if grader_type == "ML" %}
<p>
Score:
${score
}
</p>
% if grader_type == "ML":
<p>
Check below for full feedback:
</p>
{% endif %}
% endif
</div>
</div>
<div
class=
"longform"
>
<div
class=
"result-output"
>
{% autoescape off %} {{feedback}} {% endautoescape %
}
${ feedback | n
}
</div>
</div>
</section>
\ No newline at end of file
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