Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
P
problem-builder
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
OpenEdx
problem-builder
Commits
4ee4532b
Commit
4ee4532b
authored
Oct 22, 2015
by
Tim Krones
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Add tests.
parent
769192e7
Expand all
Show whitespace changes
Inline
Side-by-side
Showing
4 changed files
with
71 additions
and
4 deletions
+71
-4
problem_builder/public/js/plot.js
+1
-1
problem_builder/templates/html/plot.html
+3
-3
problem_builder/tests/integration/test_step_builder.py
+0
-0
problem_builder/tests/integration/xml_templates/step_builder_plot_overlays.xml
+67
-0
No files found.
problem_builder/public/js/plot.js
View file @
4ee4532b
...
@@ -171,7 +171,7 @@ function PlotBlock(runtime, element) {
...
@@ -171,7 +171,7 @@ function PlotBlock(runtime, element) {
}
}
}
else
{
}
else
{
overlayInfo
.
show
();
overlayInfo
.
show
();
if
(
!
overlayInfo
.
isEmpty
()
&&
!
plotInfo
.
is
(
':visible'
))
{
if
(
!
overlayInfo
.
isEmpty
()
&&
!
plotInfo
.
is
Visible
(
))
{
plotInfo
.
show
();
plotInfo
.
show
();
}
}
}
}
...
...
problem_builder/templates/html/plot.html
View file @
4ee4532b
...
@@ -48,14 +48,14 @@
...
@@ -48,14 +48,14 @@
{% for overlay in self.overlay_data %}
{% for overlay in self.overlay_data %}
<div
class=
"plot-overlay plot-overlay-{{ overlay.position }}"
>
<div
class=
"plot-overlay plot-overlay-{{ overlay.position }}"
>
{% if overlay.description or overlay.citation %}
{% if overlay.description or overlay.citation %}
<p
style=
"color: {{ overlay.point_color }};"
>
{{ overlay.plot_label }}
</p>
<p
class=
"overlay-plot-label"
style=
"color: {{ overlay.point_color }};"
>
{{ overlay.plot_label }}
</p>
{% if overlay.description %}
{% if overlay.description %}
<p>
<p
class=
"overlay-description"
>
<strong>
Description:
</strong>
{{ overlay.description }}
<strong>
Description:
</strong>
{{ overlay.description }}
</p>
</p>
{% endif %}
{% endif %}
{% if overlay.citation %}
{% if overlay.citation %}
<p>
<p
class=
"overlay-citation"
>
<strong>
Source:
</strong>
{{ overlay.citation }}
<strong>
Source:
</strong>
{{ overlay.citation }}
</p>
</p>
{% endif %}
{% endif %}
...
...
problem_builder/tests/integration/test_step_builder.py
View file @
4ee4532b
This diff is collapsed.
Click to expand it.
problem_builder/tests/integration/xml_templates/step_builder_plot_overlays.xml
0 → 100644
View file @
4ee4532b
<step-builder
url_name=
"step-builder"
display_name=
"Step Builder"
>
<sb-step
display_name=
"First step"
>
<pb-rating
name=
"rating_1_1"
low=
"Disagree"
high=
"Agree"
question=
"How much do you agree?"
correct_choices=
'["1", "2", "3", "4","5"]'
>
</pb-rating>
<pb-rating
name=
"rating_1_2"
low=
"Not important"
high=
"Very important"
question=
"How important do you think this is?"
correct_choices=
'["1", "2", "3", "4","5"]'
>
</pb-rating>
</sb-step>
<sb-step
display_name=
"Second step"
>
<pb-rating
name=
"rating_2_1"
low=
"Disagree"
high=
"Agree"
question=
"How much do you agree?"
correct_choices=
'["1", "2", "3", "4","5"]'
>
</pb-rating>
<pb-rating
name=
"rating_2_2"
low=
"Not important"
high=
"Very important"
question=
"How important do you think this is?"
correct_choices=
'["1", "2", "3", "4","5"]'
>
</pb-rating>
</sb-step>
<sb-step
display_name=
"Last step"
>
<sb-plot
plot_label=
"Custom plot label"
point_color_default=
"orange"
point_color_average=
"purple"
q1_label=
"Custom Q1 label"
q2_label=
"Custom Q2 label"
q3_label=
"Custom Q3 label"
q4_label=
"Custom Q4 label"
claims=
"2 + 2 = 5, rating_1_1, rating_1_2 The answer to everything is 42, rating_2_1, rating_2_2"
>
<sb-plot-overlay
plot_label=
"Teacher"
point_color=
"coral"
claim_data=
"2, 3 4, 2"
>
</sb-plot-overlay>
<sb-plot-overlay
plot_label=
"Researchers"
point_color=
"cornflowerblue"
description=
"Responses of leading researchers in the field"
claim_data=
"4, 4 1, 5"
>
</sb-plot-overlay>
<sb-plot-overlay
plot_label=
"Sheldon Cooper"
point_color=
"rgb(128, 128, 0)"
citation=
"The Big Bang Theory"
claim_data=
"3, 5 2, 4"
>
</sb-plot-overlay>
<sb-plot-overlay
plot_label=
"Yoda"
point_color=
"#dc143c"
description=
"Powerful you have become, the dark side I sense in you."
citation=
"Star Wars"
claim_data=
"1, 2 3, 3"
>
</sb-plot-overlay>
</sb-plot>
</sb-step>
<sb-review-step></sb-review-step>
</step-builder>
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