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
fc4d4c82
Commit
fc4d4c82
authored
May 14, 2012
by
Prem Sichanugrist
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Fix section convention and code highlight
parent
5eac6ffa
Expand all
Hide whitespace changes
Inline
Side-by-side
Showing
4 changed files
with
36 additions
and
32 deletions
+36
-32
static/js/CodeMirror/python.js
+0
-0
templates/jstextline.html
+10
-10
templates/textbox.html
+19
-15
templates/textinput.html
+7
-7
No files found.
static/js/CodeMirror/python.js
0 → 100644
View file @
fc4d4c82
This diff is collapsed.
Click to expand it.
templates/jstextline.html
View file @
fc4d4c82
<section
class=
"text-input
"
>
<input
type=
"text"
name=
"input_${id}"
id=
"input_${id}"
value=
"${value}"
%
if
size:
size=
"${size}"
%
endif
%
if
dojs =
=
'
math
'
:
onkeyup=
"DoUpdateMath('${id}')"
%
endif
/>
<section
id=
"jstextline_${id}"
class=
"jstextline
"
>
<input
type=
"text"
name=
"input_${id}"
id=
"input_${id}"
value=
"${value}"
%
if
size:
size=
"${size}"
%
endif
%
if
dojs =
=
'
math
'
:
onkeyup=
"DoUpdateMath('${id}')"
%
endif
/>
% if dojs == 'math':
<span
id=
"display_${id}"
>
`{::}`
</span>
...
...
@@ -20,7 +20,7 @@
% if state == 'unsubmitted':
<span
class=
"unanswered"
style=
"display:inline-block;"
id=
"status_${id}"
></span>
% elif state == 'correct':
% elif state == 'correct':
<span
class=
"correct"
id=
"status_${id}"
></span>
% elif state == 'incorrect':
<span
class=
"incorrect"
id=
"status_${id}"
></span>
...
...
templates/textbox.html
View file @
fc4d4c82
<section
class=
"text-input
"
>
<section
id=
"textbox_${id}"
class=
"textbox
"
>
<textarea
rows=
"30"
cols=
"80"
name=
"input_${id}"
id=
"input_${id}"
>
${value|h}
</textarea>
<span
id=
"answer_${id}"
></span>
% if state == 'unsubmitted':
<span
class=
"unanswered"
style=
"display:inline-block;"
id=
"status_${id}"
></span>
% elif state == 'correct':
% elif state == 'correct':
<span
class=
"correct"
id=
"status_${id}"
></span>
% elif state == 'incorrect':
<span
class=
"incorrect"
id=
"status_${id}"
></span>
...
...
@@ -18,17 +18,21 @@
<span
class=
"debug"
>
${msg|n}
</span>
<br/>
<br/>
<script>
// Note: We need to make the area follow the CodeMirror for this to
// work.
$
(
function
(){
var
cm
=
CodeMirror
.
fromTextArea
(
document
.
getElementById
(
"input_${id}"
),
{
'mode'
:
"python"
});
});
</script>
<style
type=
"text/css"
>
.CodeMirror
{
border-style
:
solid
;
border-width
:
1px
;}
</style>
<br/>
<script
type=
"text/javascript"
src=
"${ settings.LIB_URL }CodeMirror/codemirror.js"
></script>
<script
type=
"text/javascript"
src=
"${ settings.LIB_URL }CodeMirror/python.js"
></script>
<link
rel=
"stylesheet"
href=
"${ settings.LIB_URL }CodeMirror/codemirror.css"
/>
<script>
// Note: We need to make the area follow the CodeMirror for this to work.
$
(
function
(){
var
cm
=
CodeMirror
.
fromTextArea
(
document
.
getElementById
(
"input_${id}"
),
{
mode
:
"python"
});
});
</script>
<style
type=
"text/css"
>
.CodeMirror
{
border-style
:
solid
;
border-width
:
1px
;}
</style>
</section>
templates/textinput.html
View file @
fc4d4c82
<section
class=
"text-
input"
>
<input
type=
"text"
name=
"input_${id}"
id=
"input_${id}"
value=
"${value}"
%
if
size:
size=
"${size}"
%
endif
/>
<section
id=
"textinput_${id}"
class=
"text
input"
>
<input
type=
"text"
name=
"input_${id}"
id=
"input_${id}"
value=
"${value}"
%
if
size:
size=
"${size}"
%
endif
/>
<span
id=
"answer_${id}"
></span>
% if state == 'unsubmitted':
<span
class=
"unanswered"
style=
"display:inline-block;"
id=
"status_${id}"
></span>
% elif state == 'correct':
% elif state == 'correct':
<span
class=
"correct"
id=
"status_${id}"
></span>
% elif state == 'incorrect':
<span
class=
"incorrect"
id=
"status_${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