@pie-element/categorize 11.0.5-esm.1 → 11.1.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -1,420 +0,0 @@
1
- import PrintElement from './print.js';
2
-
3
- var generate = {};
4
-
5
- /* const E234 = {
6
- choicesPosition: 'below',
7
- lockChoiceOrder: false,
8
- choices: [
9
- {
10
- content: 'built on board',
11
- id: '0',
12
- categoryCount: 1,
13
- },
14
- {
15
- content: 'shipped from Earth',
16
- id: '1',
17
- categoryCount: 1,
18
- },
19
- {
20
- id: '2',
21
- categoryCount: 1,
22
- content: 'carried on board',
23
- },
24
- {
25
- categoryCount: 1,
26
- content: 'rebuilt when lost or broken',
27
- id: '3',
28
- },
29
- ],
30
- categories: [
31
- {
32
- id: '0',
33
- label: 'Traditional Equipment',
34
- },
35
- {
36
- id: '1',
37
- label: '3D-Printed Equipment',
38
- },
39
- ],
40
- categoriesPerRow: 2,
41
- rationale:
42
- '<p>Traditional equipment must be carried on board or shipped from Earth. 3D-printed equipment can be built on demand or rebuilt if it gets lost or broken.</p>',
43
- prompt: '<p>Drag <span class="relative-emphasis">two</span> phrases into each of the categories.</p>',
44
- partialScoring: true,
45
- correctResponse: [
46
- {
47
- choices: ['1', '2'],
48
- category: '0',
49
- },
50
- {
51
- choices: ['0', '3'],
52
- category: '1',
53
- },
54
- ],
55
- }; */
56
-
57
- // const E236 = {
58
- // choices: [
59
- // {
60
- // id: '0',
61
- // categoryCount: 1,
62
- // content: '3 pizzas cost $30.75',
63
- // },
64
- // {
65
- // categoryCount: 1,
66
- // content: '4 pizzas cost $39.00',
67
- // id: '1',
68
- // },
69
- // {
70
- // categoryCount: 1,
71
- // content: '5 pizzas cost $57.50',
72
- // id: '2',
73
- // },
74
- // {
75
- // categoryCount: 1,
76
- // content: '6 pizzas cost $69.00',
77
- // id: '3',
78
- // },
79
- // {
80
- // id: '4',
81
- // categoryCount: 1,
82
- // content: '7 pizzas cost $71.75',
83
- // },
84
- // {
85
- // content: '8 pizzas cost $78.00',
86
- // id: '5',
87
- // categoryCount: 1,
88
- // },
89
- // ],
90
- // categories: [
91
- // {
92
- // id: '0',
93
- // label: 'Roma',
94
- // },
95
- // {
96
- // id: '1',
97
- // label: 'Pizza Plus',
98
- // },
99
- // {
100
- // id: '2',
101
- // label: 'Umberto\'s',
102
- // },
103
- // ],
104
- // categoriesPerRow: 3,
105
- // rationale:
106
- // '<p>Find the unit price for each bill&#160;by dividing the total charged by the number of pizzas ordered.</p><p>3 pizzas for $30.75 is a unit price of $30.75/3 = $10.25 - Roma</p><p>4 pizzas for $39.00 is a unit price of $39.00/4 = $9.75 - Umberto&#39;s</p><p>5 pizzas for $57.50 is a unit price of $57.50/5 = $11.50 - Pizza Plus</p><p>6 pizzas for $69.00 is a unit price of $69.00/6 = $11.50 - Pizza Plus</p><p>7 pizzas for $71.75 is a unit price of $71.75/7 = $10.25 - Roma</p><p>8 pizzas for $78.00 is a unit price of $78.00/8 = $9.75 - Umberto&#39;s</p><p></p>',
107
- // prompt:
108
- // '<p>The prices for one regular pizza at three different pizzerias are shown in the table.</p><p><img alt="image dc3a3208bce04d0398af01b84816de4e" id="dc3a3208bce04d0398af01b84816de4e" src="https://storage.googleapis.com/pie-prod-221718-assets/image/90749ad9-968c-4c80-95fe-a83f8a1647cd"></p><p>Six different pizza orders and costs are shown below. Drag and drop each order and cost to&#160;the correct pizzeria.</p>',
109
- // partialScoring: true,
110
- // correctResponse: [
111
- // {
112
- // choices: ['0', '4'],
113
- // category: '0',
114
- // },
115
- // {
116
- // choices: ['2', '3'],
117
- // category: '1',
118
- // },
119
- // {
120
- // choices: ['1', '5'],
121
- // category: '2',
122
- // },
123
- // ],
124
- // choicesPosition: 'below',
125
- // lockChoiceOrder: false,
126
- // };
127
- // const E216 = {
128
- // choices: [
129
- // {
130
- // categoryCount: 1,
131
- // content: 'to present limitations of the theory',
132
- // id: '0',
133
- // },
134
- // {
135
- // categoryCount: 1,
136
- // content: 'to state the theory',
137
- // id: '1',
138
- // },
139
- // {
140
- // categoryCount: 1,
141
- // content: 'to give evidence that the theory is correct',
142
- // id: '2',
143
- // },
144
- // {
145
- // id: '3',
146
- // categoryCount: 1,
147
- // content: 'to explain the purpose of the paragraph',
148
- // },
149
- // {
150
- // categoryCount: 1,
151
- // content: 'to explain how the theory was reached',
152
- // id: '4',
153
- // },
154
- // {
155
- // categoryCount: 1,
156
- // content: 'to explain the science behind the theory',
157
- // id: '5',
158
- // },
159
- // ],
160
- // categories: [
161
- // {
162
- // id: '0',
163
- // label: 'Purpose of the Sentence',
164
- // },
165
- // {
166
- // id: '1',
167
- // label: '',
168
- // },
169
- // {
170
- // id: '2',
171
- // label: '',
172
- // },
173
- // {
174
- // id: '3',
175
- // label: '',
176
- // },
177
- // {
178
- // id: '4',
179
- // label: '',
180
- // },
181
- // {
182
- // id: '5',
183
- // label: '',
184
- // },
185
- // ],
186
- // categoriesPerRow: 1,
187
- // rationale:
188
- // '<p>Each sentence in the paragraph serves a purpose in the paragraph&#39;s development:</p><p>Sentence 1 explains the purpose of the paragraph, to describe a theory on which kind of nap is best.</p><p>Sentence 2 states the theory, that people should take a 15-minute nap.</p><p>Sentence 3 explains the science behind the theory, that memory is turned off when the brain is sleepy.</p><p>Sentence 4 explains how the theory was reached, as a deduction based on the experiment.</p><p>Sentence 5 presents limitations of the theory.</p><p>Sentence 6 gives evidence that the theory is correct.</p>',
189
- // prompt:
190
- // '<p>Drag the purpose of each sentence to its correct classification box. Show the role each sentence serves in developing the paragraph.</p><p>1 What kind of nap is best? 2 Social psychologist and sleep expert James Maas argued that people should take a 15-minute nap when they feel sluggish. 3 By measuring electricity in the brain, he found that when a person is excessively tired, his memory is turned off even when he is awake. 4 Maas deduced that a 15-minute nap would restore the brain&#8217;s full function, including memory. 5 However, a longer 30-minute nap would put a person into Delta&#8212;a deep sleep that leaves a person groggy upon awakening. 6 Over the years, he has found that regular naps improve workers&#8217; health and reaction time, and companies&#39; productivity increases.</p><p></p><p></p>',
191
- // rowLabels: ['1', '2', '3', '4', '5', '6'],
192
- // partialScoring: true,
193
- // correctResponse: [
194
- // {
195
- // choices: ['3'],
196
- // category: '0',
197
- // },
198
- // {
199
- // choices: ['1'],
200
- // category: '1',
201
- // },
202
- // {
203
- // choices: ['5'],
204
- // category: '2',
205
- // },
206
- // {
207
- // choices: ['4'],
208
- // category: '3',
209
- // },
210
- // {
211
- // choices: ['0'],
212
- // category: '4',
213
- // },
214
- // {
215
- // category: '5',
216
- // choices: ['2'],
217
- // },
218
- // ],
219
- // choicesPosition: 'below',
220
- // lockChoiceOrder: false,
221
- // };
222
- // const E215 = {
223
- // rationale:
224
- // '<p>The function is increasing over <span class="variable">x</span>-values where the graph is rising from left to right. This occurs for <span class="variable">x</span>-values less than&#160;&#8211;1, between&#160;&#8211;1 and 3, and <span class="variable">x</span>-values larger than 8.&#160;The function is decreasing over <span class="variable">x</span>-values where the graph is falling from left to right. This occurs for <span class="variable">x</span>-values between 3&#160;and 8.</p>',
225
- // prompt:
226
- // '<p>Consider the function <span class="variable">f</span>(<span class="variable">x</span>) graphed below.</p><p><img alt="image fa651e86bf6e4ad3b521aa4679941fc0" id="fa651e86bf6e4ad3b521aa4679941fc0" src="https://storage.googleapis.com/pie-prod-221718-assets/image/918fff4d-efeb-4971-9afa-c0a1f2eba825"></p><p>Each inequality represents a range of <span class="variable">x</span>-values over which <span class="variable">f</span>(<span class="variable">x</span>) is defined. Drag and drop the correct statement into each box to classify the behavior of the function over the given range of <span class="variable">x</span>-values.</p>',
227
- // partialScoring: true,
228
- // correctResponse: [
229
- // {
230
- // category: '0',
231
- // choices: ['0'],
232
- // },
233
- // {
234
- // category: '1',
235
- // choices: ['0'],
236
- // },
237
- // {
238
- // choices: ['1'],
239
- // category: '2',
240
- // },
241
- // {
242
- // choices: ['0'],
243
- // category: '3',
244
- // },
245
- // ],
246
- // choicesPosition: 'below',
247
- // lockChoiceOrder: false,
248
- // choices: [
249
- // {
250
- // content: '<em>f</em>(<em>x</em>) is increasing',
251
- // id: '0',
252
- // },
253
- // {
254
- // id: '1',
255
- // content: '<span><em>f</em>(<em>x</em>) is decreasing</span>',
256
- // },
257
- // {
258
- // content: '<em>f</em>(<em>x</em>)<em> </em>is constant',
259
- // id: '2',
260
- // },
261
- // ],
262
- // categories: [
263
- // {
264
- // id: '0',
265
- // label: '<em>x</em> &lt; &#8722; 1',
266
- // },
267
- // {
268
- // id: '1',
269
- // label: '&#8722; 1 &lt; <em>x</em> &lt; 3',
270
- // },
271
- // {
272
- // id: '2',
273
- // label: '3 &lt; <em>x</em> &lt; 8',
274
- // },
275
- // {
276
- // id: '3',
277
- // label: '<em>x</em> &gt; 8',
278
- // },
279
- // ],
280
- // categoriesPerRow: 4,
281
- // };
282
-
283
- generate.model = (id, element) => ({
284
- id,
285
- element,
286
- 'teacherInstructions': '',
287
- 'promptEnabled': true,
288
- 'prompt': '<p><audio controls="" controlslist="nodownload" id="2ad0337f-904c-4cd6-b6d3-399c08db8642.mp3" xmlns="http://www.w3.org/1999/html"><source src="https://assets.pie-api.com/assets/c9946808-ab26-45d9-bd98-f430c97f09fc/audio/mpeg/6ab9652e-7277-4a12-8f7a-a2bfb76f127c" type="audio/mpeg">Your browser does not support the audio element.</audio></p><p>Move the equations to tell whether they are true or false.</p>',
289
- 'categories': [
290
- {
291
- 'id': '0',
292
- 'label': '<img height="150" src="https://assets.pie-api.com/assets/c9946808-ab26-45d9-bd98-f430c97f09fc/image/svg xml/ab759120-d9b0-4f6f-b755-f4f83f6bc0f7" width="265">'
293
- },
294
- {
295
- 'id': '1',
296
- 'label': '<img height="150" src="https://assets.pie-api.com/assets/c9946808-ab26-45d9-bd98-f430c97f09fc/image/svg xml/9f2a6102-7acb-43cb-8651-d75d4aece3ae" width="265">'
297
- }
298
- ],
299
- 'categoriesPerRow': 2,
300
- 'allowMaxChoicesPerCategory': false,
301
- 'maxChoicesPerCategory': 0,
302
- 'rowLabels': [],
303
- 'choices': [
304
- {
305
- 'id': '0',
306
- 'content': '\\(6+3=9-2\\)',
307
- 'categoryCount': 1,
308
- 'correctResponseCount': 1
309
- },
310
- {
311
- 'id': '1',
312
- 'content': '\\(10-4=9-5\\)',
313
- 'categoryCount': 1,
314
- 'correctResponseCount': 1
315
- },
316
- {
317
- 'id': '2',
318
- 'content': '\\(17-9=9+17\\)',
319
- 'categoryCount': 1,
320
- 'correctResponseCount': 1
321
- },
322
- {
323
- 'id': '3',
324
- 'content': '\\(11+9=10+10\\)',
325
- 'categoryCount': 1,
326
- 'correctResponseCount': 1
327
- },
328
- {
329
- 'id': '4',
330
- 'content': '\\(14-4=5+5\\)',
331
- 'categoryCount': 1,
332
- 'correctResponseCount': 1
333
- }
334
- ],
335
- 'choicesPosition': 'above',
336
- 'choicesLabel': '',
337
- 'lockChoiceOrder': true,
338
- 'allowMultiplePlacementsEnabled': 'No',
339
- 'correctResponse': [
340
- {
341
- 'category': '0',
342
- 'choices': [
343
- '3',
344
- '4'
345
- ]
346
- },
347
- {
348
- 'category': '1',
349
- 'choices': [
350
- '0',
351
- '1',
352
- '2'
353
- ]
354
- }
355
- ],
356
- 'allowAlternateEnabled': false,
357
- 'alternates': [],
358
- 'partialScoring': true,
359
- 'minRowHeight': '175px',
360
- 'fontSizeFactor': 1.3
361
- });
362
-
363
- const { model } = generate;
364
-
365
- var config = {
366
- elements: {
367
- 'categorize-element': '../..',
368
- },
369
- models: [model('1', 'categorize-element')],
370
- };
371
-
372
- // new init - just shows off print!
373
-
374
- const init = async () => {
375
- console.log('define the element...');
376
- await Promise.all(
377
- config.models.map(async (m) => {
378
- try {
379
- const printTag = `${m.element}-print`;
380
- if (customElements.get(printTag)) {
381
- return true;
382
- } else {
383
- customElements.define(printTag, PrintElement);
384
- await customElements.whenDefined(printTag);
385
- return true;
386
- }
387
- } catch (e) {
388
- return false;
389
- }
390
- })
391
- );
392
-
393
- console.log('now apply the model...');
394
- config.models.forEach((m) => {
395
- const printTag = `${m.element}-print`;
396
- const h3s = document.createElement('h3');
397
- h3s.textContent = 'student mode';
398
- document.body.appendChild(h3s);
399
- const de = document.createElement(printTag);
400
- document.body.appendChild(de);
401
- de.options = {};
402
- de.model = m;
403
-
404
- const h3 = document.createElement('h3');
405
- h3.textContent = 'instructor mode';
406
- document.body.appendChild(h3);
407
- const instr = document.createElement(printTag);
408
- document.body.appendChild(instr);
409
- instr.options = { mode: 'instructor' };
410
- instr.model = JSON.parse(JSON.stringify(m));
411
- });
412
- };
413
-
414
- init()
415
- .then(() => {
416
- console.log('ready');
417
- })
418
- .catch((e) => {
419
- console.error(e);
420
- });
package/module/print.html DELETED
@@ -1,18 +0,0 @@
1
-
2
- <!doctype html>
3
- <html>
4
- <head>
5
- <title>@pie-element/categorize@11.0.1-esm.0</title>
6
- <link
7
- href="https://fonts.googleapis.com/css?family=Roboto&display=swap"
8
- rel="stylesheet"
9
- />
10
- <style>
11
- html, body {
12
- font-family: 'Roboto', sans-serif;
13
- }
14
- </style>
15
- <script type="module" src="./print-demo.js"></script>
16
- </head>
17
- <body></body>
18
- </html>