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
64e187fd
Commit
64e187fd
authored
Mar 27, 2012
by
Lyla Fischer
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
fixed default handling
parent
ce5540b2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
6 additions
and
2 deletions
+6
-2
djangoapps/courseware/capa/inputtypes.py
+1
-1
templates/textinput.html
+5
-1
No files found.
djangoapps/courseware/capa/inputtypes.py
View file @
64e187fd
...
...
@@ -8,7 +8,7 @@ class textline(object):
def
render
(
element
,
value
,
state
):
eid
=
element
.
get
(
'id'
)
count
=
int
(
eid
.
split
(
'_'
)[
-
2
])
-
1
# HACK
size
=
element
.
get
(
'size'
)
or
0
size
=
element
.
get
(
'size'
)
context
=
{
'id'
:
eid
,
'value'
:
value
,
'state'
:
state
,
'count'
:
count
,
'size'
:
size
}
html
=
render_to_string
(
"textinput.html"
,
context
)
return
etree
.
XML
(
html
)
...
...
templates/textinput.html
View file @
64e187fd
<section
class=
"text-input"
>
<input
type=
"text"
name=
"input_${id}"
id=
"input_${id}"
value=
"${value}"
size=
"${size}"
/>
<input
type=
"text"
name=
"input_${id}"
id=
"input_${id}"
value=
"${value}"
%
if
size
size=
"${size}"
%
endif
/>
<span
id=
"answer_${id}"
></span>
...
...
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