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
6306d980
Commit
6306d980
authored
Oct 16, 2012
by
Александр
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
vsepr: geometries and molecules now are passed from xml as parameters
parent
495814c7
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
6 additions
and
1 deletions
+6
-1
common/lib/capa/capa/inputtypes.py
+5
-0
common/lib/capa/capa/templates/vsepr_input.html
+1
-1
No files found.
common/lib/capa/capa/inputtypes.py
View file @
6306d980
...
...
@@ -726,6 +726,9 @@ def crystallography(element, value, status, render_template, msg=''):
escapedict
=
{
'"'
:
'"'
}
value
=
saxutils
.
escape
(
value
,
escapedict
)
molecules
=
element
.
get
(
'molecules'
)
geometries
=
element
.
get
(
'geometries'
)
context
=
{
'id'
:
eid
,
'value'
:
value
,
'state'
:
status
,
...
...
@@ -782,6 +785,8 @@ def vsepr_input(element, value, status, render_template, msg=''):
'width'
:
width
,
'height'
:
height
,
'display_file'
:
display_file
,
'molecules'
:
molecules
,
'geometries'
:
geometries
,
}
html
=
render_template
(
"vsepr_input.html"
,
context
)
...
...
common/lib/capa/capa/templates/vsepr_input.html
View file @
6306d980
...
...
@@ -2,7 +2,7 @@
<section
id=
"textinput_${id}"
class=
"textinput ${doinline}"
>
<table><tr><td
height=
'600'
>
<div
id=
"vsepr_div"
style=
"position:relative;"
>
<div
id=
"vsepr_div"
style=
"position:relative;"
data-molecules=
"${molecules}"
data-geometries=
"${geometries}"
>
<canvas
id=
"vsepr"
width=
"${width}"
height=
"${height}"
>
</canvas>
</div>
...
...
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