Skip to content

Commit 42563fe

Browse files
authored
Merge pull request #668 from ccnmtl/sim1-prompt-icons
Sim1 prompt icons
2 parents 74a30f2 + b41288c commit 42563fe

File tree

6 files changed

+62
-27
lines changed

6 files changed

+62
-27
lines changed

media/js/src/simulations/simulation1/graphCoefficientsSection.jsx

Lines changed: 16 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -2,6 +2,8 @@ import React from 'react';
22
import { Katex } from '../../utils/katexComponent';
33
import PropTypes from 'prop-types';
44

5+
export const STATIC_URL = window.MetricsMentor.staticUrl;
6+
57
export const GraphCoefficients = ({
68
intercept, slope, stderror, plotType, slopes, stderrs,
79
intercept3d, n, corr2d, corr3d
@@ -21,14 +23,20 @@ export const GraphCoefficients = ({
2123
</header>
2224
{plotType === '2d' && (
2325
<div className="simulation__step-content">
24-
<p>
25-
Observe how the linear regression
26-
coefficients change as you continue to
27-
adjust
28-
<Katex tex={'n'} className="katex-inline" /> and
29-
<Katex tex={'\\text{corr}(x,y)'}
30-
className="katex-inline" />.
31-
</p>
26+
<div className="prompt-block">
27+
<div className="prompt-gfx">
28+
<img src={`${STATIC_URL}/img/icon-bell.svg`}
29+
className="prompt-img"
30+
alt="Lightbulb icon: Learning goals" />
31+
</div>
32+
<p className="mb-0">
33+
Observe how the linear regression coefficients
34+
change as you continue to adjust <Katex
35+
tex={'n'} className="katex-inline" /> and
36+
<Katex tex={'\\text{corr}(x,y)'}
37+
className="katex-inline" />.
38+
</p>
39+
</div>
3240
<h2>Regression line equation:</h2>
3341
<div className="sub-content">
3442
<div className="katex-block">

media/js/src/simulations/simulation1/nullHypothesisSection.jsx

Lines changed: 18 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -2,6 +2,7 @@ import React from 'react';
22
import { Katex } from '../../utils/katexComponent';
33
import PropTypes from 'prop-types';
44

5+
export const STATIC_URL = window.MetricsMentor.staticUrl;
56

67
export const NullHypothesisSection = ({
78
slope, stderror, tvalue, startQuiz, plotType, slopes, stderrs,
@@ -28,26 +29,33 @@ export const NullHypothesisSection = ({
2829
<p>Here, the null hypothesis, <Katex tex={'{\\Eta_0}'}
2930
className="katex-inline" />, states that the
3031
population slope <Katex tex={'{\\beta_1} = 0'}
31-
className="katex-inline" />.
32-
Continue adjusting <Katex tex={'n'}
33-
className="katex-inline" /> and
34-
<Katex tex={'\\text{corr}(x,y)'}
35-
className="katex-inline" />, and observe the
36-
outcome of the test statistic <Katex tex={'t'}
3732
className="katex-inline" />.</p>
33+
<div className="prompt-block">
34+
<div className="prompt-gfx">
35+
<img src={`${STATIC_URL}/img/icon-bell.svg`}
36+
className="prompt-img"
37+
alt="Lightbulb icon: Learning goals" />
38+
</div>
39+
<p className="mb-0">
40+
Continue adjusting <Katex tex={'n'}
41+
className="katex-inline" /> and
42+
<Katex tex={'\\text{corr}(x,y)'}
43+
className="katex-inline" />, and observe
44+
the outcome of the test
45+
statistic <Katex tex={'t'}
46+
className="katex-inline" />.
47+
</p>
48+
</div>
3849
<div className="sub-content">
3950
<div className="katex-block mt-3">
4051
<Katex tex={
4152
'{\\Eta_0} : {\\beta_1} = 0'
4253
} />
4354
</div>
44-
<div className="katex-block mt-3">
45-
<Katex tex={tEquation} />
46-
</div>
4755
<div className="katex-block mt-3">
4856
<Katex tex={
4957
// eslint-disable-next-line max-len
50-
`t = \\cfrac{${slope.toFixed(3)} - 0}{${stderror.toFixed(3)}} = ${tvalue}`
58+
`${tEquation} = \\cfrac{${slope.toFixed(3)} - 0}{${stderror.toFixed(3)}} = ${tvalue}`
5159
} />
5260
</div>
5361
</div>

media/js/src/simulations/simulation1/simulationIntro.jsx

Lines changed: 1 addition & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -27,7 +27,7 @@ export const SimIntro = ({plotType}) => {
2727
</header>
2828
<div className="simulation__step-content">
2929
<p>
30-
In this simulation, you&rsquo;ll revisit
30+
In this simulation, you&rsquo;ll conduct
3131
hypothesis testing for the population slope
3232
in simple and multiple regression models. Using
3333
generated data, you&rsquo;ll review the
@@ -72,12 +72,6 @@ export const SimIntro = ({plotType}) => {
7272
significantly influence the outcomes of your
7373
hypothesis tests on the population
7474
parameters.</p>
75-
<p>Consider how the choice
76-
of <Katex tex={'\\text{corr}(x,y)'}
77-
className="katex-inline"/> and <Katex tex={'n'}
78-
className="katex-inline"/> can influence your
79-
decision regarding the null hypothesis.
80-
</p>
8175
</div>
8276

8377
)}

media/scss/_icons.scss

Lines changed: 25 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,25 @@
1+
.prompt-block {
2+
margin-left: -2.35rem;
3+
display: flex;
4+
}
5+
.prompt-gfx {
6+
width: 1.4375rem;
7+
height: 1.4375rem;
8+
flex-shrink: 0;
9+
display: flex;
10+
margin: 0 0.9375rem 0 0;
11+
padding: 0.1875rem;
12+
justify-content: center; // center horizontally
13+
align-items: center; // center vertically
14+
float: left;
15+
border-radius: 50%;
16+
border: 0;
17+
background-color: $yellow-300;
18+
}
19+
20+
.prompt-img {
21+
display: block;
22+
margin: 0.4rem;
23+
width:auto;
24+
height: 80%;
25+
}

media/scss/main.scss

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -17,4 +17,5 @@
1717
@import "rangescale";
1818
@import "forms";
1919
@import "listset";
20-
@import "katex";
20+
@import "katex";
21+
@import "icons";

metricsmentor/settings_shared.py

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -76,7 +76,6 @@
7676

7777
COURSEAFFILS_COURSESTRING_MAPPER = CourseStringMapper
7878

79-
8079
if 'integrationserver' in sys.argv:
8180
ENVIRONMENT = 'testing'
8281
SESSION_COOKIE_SECURE = False

0 commit comments

Comments
 (0)