Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
E
edx-platform-release
Manage
Activity
Members
Labels
Plan
Issues
0
Issue boards
Milestones
Wiki
Code
Merge requests
1
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Deploy
Releases
Package Registry
Model registry
Operate
Terraform modules
Monitor
Incidents
Service Desk
Analyze
Value stream analytics
Contributor analytics
Repository analytics
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
Community forum
Contribute to GitLab
Provide feedback
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
Hsin-Yu Chien
edx-platform-release
Commits
c340ffe0
Commit
c340ffe0
authored
12 years ago
by
Prem Sichanugrist
Browse files
Options
Downloads
Patches
Plain Diff
Fix code formatting
parent
d690aebc
No related branches found
Branches containing commit
No related tags found
Tags containing commit
No related merge requests found
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
common/lib/capa/templates/textinput_dynamath.html
+42
-39
42 additions, 39 deletions
common/lib/capa/templates/textinput_dynamath.html
with
42 additions
and
39 deletions
common/lib/capa/templates/textinput_dynamath.html
+
42
−
39
View file @
c340ffe0
...
...
@@ -2,49 +2,52 @@
### version of textline.html which does dynammic math
###
<section
class=
"text-input-dynamath"
>
<table
style=
"display:inline; vertical-align:middle;"
><tr><td>
<input
type=
"text"
name=
"input_${id}"
id=
"input_${id}"
value=
"${value}"
%
if
size:
size=
"${size}"
%
endif
onkeyup=
"DoUpdateMath('${id}')"
/>
</td><td>
<table
style=
"display:inline; vertical-align:middle;"
>
<tr>
<td>
<input
type=
"text"
name=
"input_${id}"
id=
"input_${id}"
value=
"${value}"
size=
"${size if size else ''}"
/>
</td>
<td>
<span
id=
"answer_${id}"
></span>
<span
id=
"answer_${id}"
></span>
% if state == 'unsubmitted':
<span
class=
"unanswered"
style=
"display:inline-block;"
id=
"status_${id}"
></span>
% elif state == 'correct':
<span
class=
"correct"
id=
"status_${id}"
></span>
% elif state == 'incorrect':
<span
class=
"incorrect"
id=
"status_${id}"
></span>
% elif state == 'incomplete':
<span
class=
"incorrect"
id=
"status_${id}"
></span>
% endif
</td>
</tr>
<tr>
<td>
<span
id=
"display_${id}"
>
`{::}`
</span>
</td>
<td>
<textarea
style=
"display:none"
id=
"input_${id}_dynamath"
name=
"input_${id}_dynamath"
>
</textarea>
</td>
</tr>
</table>
% if state == 'unsubmitted':
<span
class=
"unanswered"
style=
"display:inline-block;"
id=
"status_${id}"
></span>
% elif state == 'correct':
<span
class=
"correct"
id=
"status_${id}"
></span>
% elif state == 'incorrect':
<span
class=
"incorrect"
id=
"status_${id}"
></span>
% elif state == 'incomplete':
<span
class=
"incorrect"
id=
"status_${id}"
></span>
% endif
</td></tr><tr><td>
<span
id=
"display_${id}"
>
`{::}`
</span>
</td><td>
<textarea
style=
"display:none"
id=
"input_${id}_dynamath"
name=
"input_${id}_dynamath"
>
</textarea>
</td></tr>
</table>
##
##
## javascript for dynamic math: add this math element to the MathJax rendering queue
## also adds to global jaxset js array
##
<script
type=
"text/javascript"
>
MathJax
.
Hub
.
queue
.
Push
(
function
()
{
math
=
MathJax
.
Hub
.
getAllJax
(
"
display_${id}
"
)[
0
];
if
(
math
){
jaxset
[
"
${id}
"
]
=
math
;
math
.
Text
(
document
.
getElementById
(
"
input_${id}
"
).
value
);
// UpdateMathML(math,"${id}");
}
});
</script>
##
<script
type=
"text/javascript"
>
MathJax
.
Hub
.
queue
.
Push
(
function
()
{
math
=
MathJax
.
Hub
.
getAllJax
(
"
display_${id}
"
)[
0
];
if
(
math
){
jaxset
[
"
${id}
"
]
=
math
;
math
.
Text
(
document
.
getElementById
(
"
input_${id}
"
).
value
);
// UpdateMathML(math,"${id}");
}
});
</script>
% if msg:
<br/>
<span
class=
"debug"
>
${msg|n}
</span>
<br/>
<span
class=
"debug"
>
${msg|n}
</span>
% endif
</section>
This diff is collapsed.
Click to expand it.
Preview
0%
Loading
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Save comment
Cancel
Please
register
or
sign in
to comment