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
b0b4a90b
Commit
b0b4a90b
authored
Dec 20, 2012
by
Alexander Kryklia
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
added gst tests for export
parent
ef1328bc
Hide whitespace changes
Inline
Side-by-side
Showing
9 changed files
with
72 additions
and
3 deletions
+72
-3
common/lib/xmodule/xmodule/tests/test_export.py
+6
-1
common/test/data/graphic_slider_tool/README.md
+2
-0
common/test/data/graphic_slider_tool/course.xml
+2
-0
common/test/data/graphic_slider_tool/course/2012_Fall.xml
+5
-0
common/test/data/graphic_slider_tool/gst/sample_gst.xml
+41
-0
common/test/data/graphic_slider_tool/policies/2012_Fall.json
+14
-0
common/test/data/graphic_slider_tool/roots/2012_Fall.xml
+1
-0
common/test/data/self_assessment/course.xml
+0
-2
common/test/data/self_assessment/course.xml
+1
-0
No files found.
common/lib/xmodule/xmodule/tests/test_export.py
View file @
b0b4a90b
...
...
@@ -41,7 +41,7 @@ def strip_filenames(descriptor):
class
RoundTripTestCase
(
unittest
.
TestCase
):
'''Check that our test courses roundtrip properly'''
def
check_export_roundtrip
(
self
,
data_dir
,
course_dir
):
# import ipdb; ipdb.set_trace()
root_dir
=
path
(
mkdtemp
())
print
"Copying test course to temp dir {0}"
.
format
(
root_dir
)
...
...
@@ -117,3 +117,8 @@ class RoundTripTestCase(unittest.TestCase):
def
test_selfassessment_roundtrip
(
self
):
#Test selfassessment xmodule to see if it exports correctly
self
.
check_export_roundtrip
(
DATA_DIR
,
"self_assessment"
)
def
test_graphicslidertool_roundtrip
(
self
):
#Test graphicslidertool xmodule to see if it exports correctly
# import ipdb; ipdb.set_trace()
self
.
check_export_roundtrip
(
DATA_DIR
,
"graphic_slider_tool"
)
common/test/data/graphic_slider_tool/README.md
0 → 100644
View file @
b0b4a90b
This is a very very simple course, useful for debugging graphical slider tool
code.
common/test/data/graphic_slider_tool/course.xml
0 → 120000
View file @
b0b4a90b
roots/2012_Fall.xml
\ No newline at end of file
common/test/data/graphic_slider_tool/course/2012_Fall.xml
0 → 100644
View file @
b0b4a90b
<course>
<chapter
url_name=
"Overview"
>
<gst
url_name=
"sample_gst"
/>
</chapter>
</course>
common/test/data/graphic_slider_tool/gst/sample_gst.xml
0 → 100644
View file @
b0b4a90b
<vertical>
<graphical_slider_tool>
<render>
<h2>
Graphic slider tool: Dynamic range and implicit functions.
</h2>
<p>
You can make x range (not ticks of x axis) of functions to depend on
parameter value. This can be useful when function domain depends
on parameter.
</p>
<p>
Also implicit functons like circle can be plotted as 2 separate
functions of same color.
</p>
<div
style=
"height:50px;"
>
<slider
var=
'a'
style=
"width:400px;float:left;"
/>
<textbox
var=
'a'
style=
"float:left;width:60px;margin-left:15px;"
/>
</div>
<plot
style=
"margin-top:15px;margin-bottom:15px;"
/>
</render>
<configuration>
<parameters>
<param
var=
"a"
min=
"5"
max=
"25"
step=
"0.5"
initial=
"12.5"
/>
</parameters>
<functions>
<function
color=
"red"
>
return Math.sqrt(a * a - x * x);
</function>
<function
color=
"red"
>
return -Math.sqrt(a * a - x * x);
</function>
</functions>
<plot>
<xrange>
<!-- dynamic range -->
<min>
return -a;
</min>
<max>
return a;
</max>
</xrange>
<num_points>
1000
</num_points>
<xticks>
-30, 6, 30
</xticks>
<yticks>
-30, 6, 30
</yticks>
</plot>
</configuration>
</graphical_slider_tool>
</vertical>
common/test/data/graphic_slider_tool/policies/2012_Fall.json
0 → 100644
View file @
b0b4a90b
{
"course/2012_Fall"
:
{
"graceperiod"
:
"2 days 5 hours 59 minutes 59 seconds"
,
"start"
:
"2015-07-17T12:00"
,
"display_name"
:
"GST Test"
,
"graded"
:
"false"
},
"chapter/Overview"
:
{
"display_name"
:
"Overview"
},
"gst/sample_gst"
:
{
"display_name"
:
"Sample GST"
,
},
}
common/test/data/graphic_slider_tool/roots/2012_Fall.xml
0 → 100644
View file @
b0b4a90b
<course
org=
"edX"
course=
"gst_test"
url_name=
"2012_Fall"
/>
common/test/data/self_assessment/course.xml
deleted
120000 → 0
View file @
ef1328bc
roots/2012_Fall.xml
\ No newline at end of file
common/test/data/self_assessment/course.xml
0 → 100644
View file @
b0b4a90b
<course
org=
"edX"
course=
"sa_test"
url_name=
"2012_Fall"
/>
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