This repository has been archived by the owner on Jun 28, 2020. It is now read-only.
forked from lbondaryk/PlayerProto
-
Notifications
You must be signed in to change notification settings - Fork 0
/
assess_4.1.html
190 lines (168 loc) · 5.93 KB
/
assess_4.1.html
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
<!DOCTYPE html>
<html>
<head>
<title class="setTitle"></title>
<meta http-equiv="Content-Type" content="text/html;charset=utf-8" >
<meta content="width=device-width, initial-scale=1.0" name="viewport">
<meta content="Neff,Our Changing Planet" name="description">
<!-- Bootstrap -->
<link href="css/bootstrap_plus.css" rel="stylesheet" media="screen">
<link href="css/graphics_and_svg.css" rel="stylesheet">
<link href="css/learning-objective.css" rel="stylesheet">
<link href="css/module-opener.css" rel="stylesheet">
<link href="css/toc.css" rel="stylesheet">
<link href="css/grey-thing.css" rel="stylesheet">
<link href="css/eCourse-master.css" rel="stylesheet" media="screen">
</head>
<body>
<!-- Body Content -->
<div class="container-fluid contentBucket">
<div class="row-fluid">
<div class="span6 leftCol">
<h2></h2>
<div id="widget0" class="assessment">
<div class="graphTitle">Population growth equation</div>
<p class="questionText">How many people are added to a population of one million each year with a one percent growth rate? </p>
<input type="text" size="8" id="stuAnswer0" class="quizInput" />
<button class="btn btn-primary" onClick="scoreIt(Q0Data,this.parentNode.id,document.getElementById('stuAnswer0').value);">Check it</button>
</div>
<div id="widget1" class="assessment">
<div class="graphTitle">Increasing population growth</div>
<p class="questionText">Why does it take less and less time to add each additional billion people to the planet? </p>
<table class="questionTable noSwipe"><tbody>
<tr><td><input type="radio" name="Q1" value="A"></td>
<td>Because the growth rate increases as the population rises</td></tr>
<tr><td><input type="radio" name="Q1" value="B"></td>
<td>Because the total fertility rate increases with population</td></tr>
<tr><td><input type="radio" name="Q1" value="C"></td>
<td>Because as the population increases, the absolute number of births increases even
though the growth rate stays constant</td></tr>
<tr><td><input type="radio" name="Q1" value="D"></td>
<td>Because social behaviors change and people decide to have more children</td></tr>
</tbody></table>
<p></p>
<button class="btn btn-primary" onClick="scoreIt(Q1Data,this.parentNode.id,getCheckedRadio('Q1'));">Check it</button>
</div>
</div>
<div class="span6">
<p> The human population grows according to the equation</p>
<blockquote class="math">N0 × e<sup>rt</sup></blockquote>
<p> Use the population growth lab to help you answer questions about population growth.</p>
<div id="graphTarget0" > </div>
<table class="data">
<tbody>
<tr>
<td>
<div id="slider">
Growth rate:
<input id="slider_0" type="range" min="0" max="2.0" step=".1" value="1.5"
onchange="update()" /></div>
</td>
<td><span id="readout_0" class="dataLabel"></span>
</td>
</tr>
<tr>
<td>Starting population</td>
<td>People born in the first year</td>
</tr>
<tr>
<td ><input type="number" min="1000000" max="10000000" step="1000000" value="5000000" id="numInput_0" onChange="update()"></span></td>
<td><span id="readout_1" class="dataLabel"></span></td>
</tr>
</tbody>
</table>
</div>
</div>
</div>
<script src="js/jquery-latest.js"></script>
<script src="js/jquery-ui-1.10.2.custom.js"></script>
<script src="js/neff-structure.js"></script>
<script src="js/neff-master.js"></script>
<script src="js/d3.v2.min.js"></script>
<script src="js/graphing.js"></script>
<script src="js/assessment.js"></script>
<script src="js/widgets.js"></script>
<script src="js/bootstrap.min.js"></script>
<script>
var height=150, width=400, tickheight=10;
var margin0 = {top:10, bottom:6*tickheight, left:2*tickheight, right:8*tickheight};
var linkedRegions = ["#legend0","#graph01"];
var title = "Growth Rate Lab";
var litekey = [0,1,2];
var yticks = [0,50,100,150,200];
//call graphing shell
var projected = expData({
rate: 0.01,
base: 1,
pts: 300
});
var qwidth = 300, qheight=100;
makeGraph(0,width,height,margin0,title,true);
lineChartObj({
graphTarget: 0,
ordinal:0,
Data: [projected],
maxWid: width,
maxHt: height,
margin: margin0,
type:"lines",
ticks:[[5,"bottom"],[yticks,"right"]],
xLabel:"Years Elapsed",
yLabel: "Population (Millions)"
});
function update() {
var N0 =document.getElementById("numInput_0").value;
var slideAmount =document.getElementById("slider_0").value;
d3.select("#readout_0").html((d3.format("1.1f")(slideAmount))+"%");
d3.select("#readout_1").html(d3.format(",.0f")(N0*(Math.exp(slideAmount/100)-1)));
var projected = expData({
rate: 0.01*slideAmount,
base: N0/1e6,
pts: 300
});
var targetGraph = d3.select("#graph00_");
var traces = targetGraph.selectAll(".traces").select("path").data([projected]).attr("d", line);
}
update();
//obviously, the answer data shouldn't live client side, but it's all I have for now
Q0Data = {
ansType: "numeric",
answer: {
content: "10050",
response: "Calculate the new population using the exponential with <span class='math'>N0 = 1M</math> and <span class='math'>r=0.01</span>."
},
distractor:
[{
content: "10000",
response: "Calculate the exponential with <span class='math'>N0 = 1M</span> and <span class='math'>r=0.01</span> rather than just multiplying by the growth rate."
},
{
content: "100",
response: "You need to use the exponential growth equation."
}
]
};
Q1Data = {
ansType: "multipleChoice",
answer: {
content: "C",
response: "Growth rate stays constant."
},
distractor:
[{
content: "A",
response: "Does the growth rate change with population size?"
},
{
content: "B",
response: "Does the fertility rate change with population size?"
},
{
content: "D",
response: "This might happen but is it something is necessarily occurs?"
}
]
};
</script>
</body>
</htid="textInput_0"ml>