-
Notifications
You must be signed in to change notification settings - Fork 3
/
Copy pathindex.htm
802 lines (714 loc) · 38.8 KB
/
index.htm
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
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
388
389
390
391
392
393
394
395
396
397
398
399
400
401
402
403
404
405
406
407
408
409
410
411
412
413
414
415
416
417
418
419
420
421
422
423
424
425
426
427
428
429
430
431
432
433
434
435
436
437
438
439
440
441
442
443
444
445
446
447
448
449
450
451
452
453
454
455
456
457
458
459
460
461
462
463
464
465
466
467
468
469
470
471
472
473
474
475
476
477
478
479
480
481
482
483
484
485
486
487
488
489
490
491
492
493
494
495
496
497
498
499
500
501
502
503
504
505
506
507
508
509
510
511
512
513
514
515
516
517
518
519
520
521
522
523
524
525
526
527
528
529
530
531
532
533
534
535
536
537
538
539
540
541
542
543
544
545
546
547
548
549
550
551
552
553
554
555
556
557
558
559
560
561
562
563
564
565
566
567
568
569
570
571
572
573
574
575
576
577
578
579
580
581
582
583
584
585
586
587
588
589
590
591
592
593
594
595
596
597
598
599
600
601
602
603
604
605
606
607
608
609
610
611
612
613
614
615
616
617
618
619
620
621
622
623
624
625
626
627
628
629
630
631
632
633
634
635
636
637
638
639
640
641
642
643
644
645
646
647
648
649
650
651
652
653
654
655
656
657
658
659
660
661
662
663
664
665
666
667
668
669
670
671
672
673
674
675
676
677
678
679
680
681
682
683
684
685
686
687
688
689
690
691
692
693
694
695
696
697
698
699
700
701
702
703
704
705
706
707
708
709
710
711
712
713
714
715
716
717
718
719
720
721
722
723
724
725
726
727
728
729
730
731
732
733
734
735
736
737
738
739
740
741
742
743
744
745
746
747
748
749
750
751
752
753
754
755
756
757
758
759
760
761
762
763
764
765
766
767
768
769
770
771
772
773
774
775
776
777
778
779
780
781
782
783
784
785
786
787
788
789
790
791
792
793
794
795
796
797
798
799
800
801
802
<!DOCTYPE html>
<html lang="en">
<head>
<meta http-equiv="Content-type" content="text/html; charset=utf-8" />
<meta http-equiv="X-UA-Compatible" content="IE=edge">
<title>Testing ADL wrapper</title>
<link rel="stylesheet" href="css/validationEngine.jquery.css" type="text/css"/>
<link rel="stylesheet" href="css/template.css" type="text/css"/>
</head>
<body onload="scrollTo('top')">
<form id="form1" class="formular" style="left:20px;margin:0px;padding-top:6px;">
<span id="configdisplay" class="">Endpoint: <span id="endpoint"></span></span>
<!--STATEMENT GENERATOR-->
<h2>Generate Statements <span style="font-size:12px;">(under construction!)</span><a href="#" id="statementGeneratorToggle" class="toggleLink" onclick="return false;">show/hide</a></h2>
<div class="box" id="statementGeneratorInputs" style="">
Based on the <a href="https://github.com/adlnet/xAPIWrapper" target="_blank">ADL xAPI Wrapper.</a> This will first show you the statement you are sending, then sends the statement to the LRS.
When it gets a response, it shows the <a href="https://github.com/adlnet/xAPIWrapper" target="_blank">ADL xAPI Wrapper.</a> javascript call used to send the statement. Ultimately it will generate statements for all the different Object types.
If you want to validate statements you are crafting by hand, use this validator to correct them: <a href="http://zackpierce.github.io/xAPI-Validator-JS/" target="_blank">http://zackpierce.github.io/xAPI-Validator-JS/</a>
<div id="SG_actor" class="SG_statementProperties box">
<h3>I. Actor <span class="required">Required</span></h3>
<div style="float:left;"><label>Email address <span class="required">Required</span>
<input type="text" name="mbox" value="" id="mbox"
data-validation-engine="validate[required,custom[email]]"
data-errormessage-value-missing="Email is required!"
data-errormessage-custom-error="Let me give you a hint: someone@nowhere.com"
data-errormessage="This is the fall-back error message.">
</label></div>
<div style="float:left;margin-left:12px;"><label>Full Name <span class="required">Required</span>
<input type="text" name="name" value="" id="name" data-validation-engine="validate[required]">
</label></div>
<div style="clear:both"></div>
</div>
<div id="SG_verb" class="SG_statementProperties box">
<label>
<h3>II. Verb <span class="required">Required</span></h3>
<div id="adlverbs"></div>
</label>
</div>
<div id="SG_object" class="SG_statementProperties box">
<a name="obj"></a><h3>III. Object</h3>
<label>Object Type <span class="required">Required</span>
<select id="objecttype" name="objecttype" data-validation-engine="validate[required]">
<option value="" selected>Select an Object Type...</option>
<option value="activity">Activity</option>
<!--if selected, make id and definitions fields active-->
<option value="agent">Agent</option>
<option value="group">Group</option>
<!--https://github.com/adlnet/xAPI-Spec/blob/master/xAPI.md#4142-when-the-object-is-an-agent-or-a-group-->
<option value="statementref">Statement Reference</option>
<!--https://github.com/adlnet/xAPI-Spec/blob/master/xAPI.md#statement-references-->
<option value="substatement">Sub-statement</option>
<!--https://github.com/adlnet/xAPI-Spec/blob/master/xAPI.md#statement-references-->
</select>
</label>
<div id="objectTypeActivity" name="objectTypeActivity" style="display:none" class="objectproperties">
<label><h4>A. Activity id (IRI) <span class="required">Required</span></h4>
Enter an absolute URI that will serve as the unique identifier for this activity. It need not be resolvable.
<!--http://en.wikipedia.org/wiki/Internationalized_resource_identifier
https://github.com/adlnet/xAPI-Spec/blob/master/xAPI.md#activity-id-requirements
-->
<input type="text" name="activityid1" id="activityid1" value="http://mycompanycom/myactivity/" onfocus="$('#'+this.id).val('');" data-validation-engine="validate[required, custom[url]]" data-errormessage-value-missing="A URI is required!" data-errormessage-custom-error="Let me give you a hint: http://yourcompany/activities/thisactivity/" size="40">
</label>
<h4>B. Activity Definition <span class="optional">Optional</span></h4>
<!-- https://github.com/adlnet/xAPI-Spec/blob/master/xAPI.md#activity-definition-->
<div class="box" id="activityDefinition">
<label>Activity name
<input type = "text" name="actDef_Name" id="actDef_Name" value="Fire Safety Quiz"></label>
<label>Activity description
<textarea rows="20" cols="80" name="actDef_Description" value="" id="actDef_Description" accept-charset="UTF-8"></textarea>
</label>
<label>Activity type
<!--http://www.adlnet.gov/expapi/activities/-->
<a name="acttype"></a><select id="actDef_activitytype">
<option value="" selected>Select an Activity type</option>
<option value="http://adlnet.gov/expapi/activities/assessment">assessment</option>
<option value="http://adlnet.gov/expapi/activities/course">course</option>
<option value="http://adlnet.gov/expapi/activities/file">file</option>
<option value="http://adlnet.gov/expapi/activities/interaction">interaction</option>
<option value="http://adlnet.gov/expapi/activities/lesson">lesson</option>
<option value="http://adlnet.gov/expapi/activities/link">link</option>
<option value="http://adlnet.gov/expapi/activities/media">media</option>
<option value="http://adlnet.gov/expapi/activities/meeting">meeting</option>
<option value="http://adlnet.gov/expapi/activities/module">module</option>
<option value="http://adlnet.gov/expapi/activities/objective">objective</option>
<option value="http://adlnet.gov/expapi/activities/performance">performance</option>
<option value="http://adlnet.gov/expapi/activities/simulation">simulation</option>
</select>
</label>
<label>More Info <span class="optional">(URI) SHOULD resolve to a document with human-readable information about the Activity, which MAY include a way to 'launch' the Activity.</span>
<input type = text" name="actDef_MoreInfo" value="" id="actDef_MoreInfo" value="">
</label>
<div id="actDef_InteractionProperties" class="box" style="display:none;">
<a name="intprop"></a><h3>Interaction Properties <span class="optional">(only used when the activityType is Interaction)</span></h3>
<label>Interaction Type
<select id="actDef_interactionType">
<option value="">Select an Interaction type</option>
<option value="true-false">true-false</option>
<option value="choice">choice</option>
<option value="sequencing">sequencing</option>
<option value="likert">likert</option>
<option value="matching">matching</option>
<option value="performance">performance</option>
<option value="fill-in">fill-in</option>
<option value="long-fill-in">long-fill-in</option>
<option value="numeric">numeric</option>
<option value="performance">performance</option>
<option value="other">other</option>
</select>
</label>
<div id="intComponents" class="box" display:none;"><h4>Interaction components</h4>
<div id="actDef_comp_choice" style="display:none">
<h5>Choices <a href="#" id="addChoice" onclick="return false;" class="add">Add another?</a></h5>
<div id="actDef_compChoice01">
<label>Choice ID 01 <span class="optional">(e.g. "A","01","golf","blue",etc. - a short unique ID, no spaces)</span><input id="actDef_compChoiceID01" type="text"></label>
<label>Choice Description 01 <span class="optional">(The full text of the choice or its description. English only for now)</span><input id="actDef_compChoiceDesc01" type="text"></label>
</div>
</div><!--end actDef_choice-->
<div id="actDef_comp_scale" style="display:none"><h5>(Likert) scale<a href="#" id="addScale" onclick="return false" class="add">Add another?</a></h5>
<label>Likert Scale ID 01(ex: "1", "likert_01", "a",etc. just an id that is unique for the interaction.)
<input id="actDef_compScaleID01" type="text">
</label>
<label>Description 01 <span class="optional">(The full text shown to the user of the scale item e.g. "strongly","not at all", "n/a", etc. English only for now)</span>
<input id="actDef_compScaleDesc01" type="text">
</label>
</div><!--end actDef_scale-->
<div id="actDef_comp_source" style="display:none"><h5>(Matching) Source <a href="#" id="addMatch" onclick="return false" class="add">Add another?</a></h5>
<span class="optional">There should be one target for each source</span>
<div id="actDef_compSource01">
<label>Source ID 01
<input id="actDef_compSourceID01" type="text"></label>
<label>Source Description 01 <span class="optional">(English only)</span>
<input id="actDef_compSourceDesc01" type="text">
</label>
</div><!--end actDef_source01-->
<!--need add more func-->
</div><!--end actDef_source-->
<div id="actDef_comp_target" style="display:none"><h5>(Matching) Target </h5>
<span class="optional">If you have a need for one to many or many to one matching, you'll have to edit this part of the statement manually.</span>
<div id="actDef_compTarget01">
<label>Target ID 01
<input id="actDef_compTargetID01" type="text"></label>
<label>Target Description 01 <span class="optional">(english)</span>
<input id="actDef_compTargetDesc01" type="text">
</label>
</div><!--end actDef_target01-->
<!--need add more func-->
<!--add a target for each source ?-->
</div><!--end actDef_target-->
<div id="actDef_comp_steps" style="display:none">Steps <a href="#" id="addStep" onclick="return false;">Add another?</a>
<label>Step ID 01
<input id="actDef_compStepsID01" type="text">
</label>
<label>Step Description 01<span class="optional">(english)</span>
<input id="actDef_compStepsDesc01" type="text">
</label>
</div><!--end actDef_steps-->
</div><!--end intComponents-->
<label>Correct Responses Pattern <span class="optional">Optional</span> <a href="#" id="showCorrectResponsePatternEx" onclick="return false;">Examples</a>
<textarea id="actDef_intRespPattern"></textarea>
</label>
<label>Extensions <span class="optional">Optional: Object. Map of other properties as needed.</span>
<textarea id="actDef_interactionExtensions"></textarea>
</label>
</div><!--end actDef_InteractionProperties-->
</div><!--end activityDefinition-->
</div><!--end objectTypeActivity-->
<div id="objectTypeAgent" name="objectTypeAgent" style="display:none" class="objectproperties">
<h3>Object type is Agent</h3>
<label>Email address
<!--(this could actually be several other types of identifiers)-->
<input type="text" name="objTypeAgentMbox" value="test@test.com" id="objTypeAgentMbox">
</label>
<label>Name
<input type="text" name="objTypeAgentName" value="" id="objTypeAgentName">
</label>
<!--<button type= "button" id= "sendStatementBtn3" >Send Statement</button>-->
</div><!--end objectTypeAgent-->
<div id="objectTypeGroup" name="objectTypeGroup" style="display:none" class="objectproperties">
<h3>Object type is Group</h3>
<label>Group Name
<input type="text" name="objTypeGroupName" value="" id="objTypeGroupName">
</label>
<h4>Group Members</h4>
<textarea name="groupmembers" id="groupmembers">{'mbox' : 'mailto:tom@example.com','name':'Tom Smith','objectType': 'Agent'},
{'mbox' : 'mailto:john@example.com','name':'John Anderson','objectType': 'Agent'},
{'mbox' : 'mailto:mary@example.com','name':'Mary Ryan','objectType': 'Agent'}</textarea>
</div><!--end objectTypeGroup-->
<div id="objectTypeStatementref" name="objectTypeStatementref" style="display:none" class="objectproperties">
objectTypeStatementref
must be a valid statement UUID
<input type="text" name="objTypeStRefID" value="f54d37d9-770f-4295-80e2-324a24062445" id="objTypeStRefID">
<!--<button type= "button" id= "sendStatementBtn5" >Send Statement</button>-->
</div><!--end objectTypeStatementref-->
<div id="objectTypeSubstatement" name="objectTypeSubstatement" style="display:none" class="objectproperties">
objectTypeSubstatement</div>
<button type= "button" id= "sendStatementBtn6" >Send Statement</button>
</div><!--end objectTypeSubstatement-->
</div><!--end SG_object-->
<div id="SG_result" class="SG_statementProperties box">
<h3>IV. Result <span class="optional">Optional</span><a href="#" id="resultToggle" class="toggleLink" onclick="return false;">show</a></h3>
<div id="SG_resultinputs" style="display:none;">
<div>Note: this doesn't validate yet before calculating score.scaled. Minimum score should be less than maximum score!</div>
<label>Raw Score (actual point value of score achieved, not percentage)<span class="optional">Optional</span>
<input type="number" name="SG_result_score_rawscore" id="SG_result_rawscore" maxlength="4" size="4"></label>
<label>Minimum Score (actual point value, not percentage) <span class="optional">Optional</span>
<input type="number" name="SG_result_score_minscore" id="SG_result_minscore" maxlength="4" size="4"></label>
<label>Maximum Score (actual point value, not percentage) <span class="optional">Optional</span>
<input type="number" name="SG_result_score_maxscore" id="SG_result_maxscore" maxlength="4" size="4"></label>
<label>Success <span class="optional">Optional</span>
<select name="SG_result_success1" id="SG_result_success1">
<option value="">Select an option</option>
<option value="true">true</option>
<option value="false">false</option>
</select><label>
<label>Completion <span class="optional">Optional</span>
<select name="SG_result_completion" id="SG_result_completion">
<option value="">Select an option</option>
<option value="true">true</option>
<option value="false">false</option>
</select>
<label>
<label>Response <span class="optional">Optional</span>
<textarea rows="4" cols="80" name="SG_result_response" id="SG_result_response" accept-charset="UTF-8"></textarea>
</label>
<label>Duration <span class="optional">Optional <a href="https://en.wikipedia.org/wiki/ISO_8601#Durations" target="_blank">"P23DT23H","P4Y","PT1M"</a></span>
<input type="text" value="" name="SG_result_duration" id="SG_result_duration">
</label>
<label>Extensions <span class="optional">Optional Must be an object</span>
<textarea rows="4" cols="80" name="SG_result_extensions" id="SG_result_extensions" accept-charset="UTF-8"></textarea>
</label>
<!--
Score {scaled:.9, raw:9,min:0,max:10}
success:true;
completion:true
response:string
duration:see below
extensions: object
http://www.ostyn.com/blog/2006/09/scoring-in-scorm.html
What I would do in SCORM 1.2 with the example above is report min as 0, max as 100, and raw as 80.77
This is calculated by scaling to 0..100 with the formulas
cmi.core.score.min = 0
cmi.core.score.max = 100
cmi.core.score.raw = ((internal_raw - internal_min)* (100 / (internal_max - internal_min)))
where internal_raw = 21, internal_min = 0, and internal_max = 26.
Going to SCORM 2004, the formula for the new cmi.score.scaled is even simpler:
cmi.score.scaled = ((internal_raw - internal_min)/(internal_max - internal_min))
https://en.wikipedia.org/wiki/ISO_8601#Durations
"P23DT23H" and "P4Y" are both acceptable duration representations.
To resolve ambiguity, "P1M" is a one-month duration and "PT1M" is a one-minute duration (note the time designator, T, that precedes the time value). The smallest value used may also have a decimal fraction, as in "P0.5Y" to indicate half a year. This decimal fraction may be specified with either a comma or a full stop, as in "P0,5Y" or "P0.5Y". The standard does not prohibit date and time values in a duration representation from exceeding their "carry over points" except as noted below. Thus, "PT36H" could be used as well as "P1DT12H" for representing the same duration.
For example, "P3Y6M4DT12H30M5S" represents a duration of "three years, six months, four days, twelve hours, thirty minutes, and five seconds".
duration:P is the duration designator (historically called "period") placed at the start of the duration representation.
Y is the year designator that follows the value for the number of years.
M is the month designator that follows the value for the number of months.
W is the week designator that follows the value for the number of weeks.
D is the day designator that follows the value for the number of days.
T is the time designator that precedes the time components of the representation.
H is the hour designator that follows the value for the number of hours.
M is the minute designator that follows the value for the number of minutes.
S is the second designator that follows the value for the number of seconds.-->
</div><!--end resultinputs-->
</div><!--end result-->
<div id="SG_context" class="SG_statementProperties box">
<h3>V. Context <span class="optional">Optional</span><a href="#" id="contextToggle" class="toggleLink" onclick="return false;">show</a></h3>
<div id="SG_contextinputs" style="display:none;">
<h4>A. Registration <span class="optional">(UUID) Optional: this piece is probably filled in by the launch page, the activity or an LMS </span></h4>
<label>Registration UUID <input type="text" value="" name="SG_context_registration" id="SG_context_registration">
</label>
<div id="SG_context_instructor">
<h4>Instructor <span class="optional">Optional: (Agent or Group.) Instructor that the Statement relates to, if not included as the Actor of the Statement.</span></h4>
<h3>I. Instructor <span class="required">Required</span></h3>
<div style="float:left;">
<label>Instructor email address <span class="required">Required</span>
<input type="text" name="SG_context_instructor_mbox" value="" id="SG_context_instructor_mbox"
data-validation-engine="validate[required,custom[email]]"
data-errormessage-value-missing="Instructor Email is required!"
data-errormessage-custom-error="Let me give you a hint: someone@nowhere.com">
</label>
</div>
<div style="float:left;margin-left:12px;">
<label>Instructor Name <span class="required">Required if there is an instructor</span>
<input type="text" name="SG_context_instructor_name" value="" id="SG_context_instructor_name" >
</label></div>
<div style="clear:both"></div>
</div>
<div id="SG_context_team">
<h4>Team <span class="optional">Optional: (Group.)Team that the Statement relates to, if not included as the Actor of the Statement.</span></h4>
<label>Team Name
<input type="text" name="SG_context_team_name" value="" id="SG_context_team_name">
</label>
<label>Team Members
<textarea name="SG_context_team_members" id="SG_context_team_members">
{'mbox' : 'mailto:tom@example.com','name':'Tom Smith','objectType': 'Agent'},
{'mbox' : 'mailto:john@example.com','name':'John Anderson','objectType': 'Agent'},
{'mbox' : 'mailto:mary@example.com','name':'Mary Ryan','objectType': 'Agent'}</textarea>
</label></div>
<label>contextActivities <span class="optional">Optional: (Object) map of the types of learning activity context that this statement is related to. valid types are: parent, grouping, category and other</span>
<textarea name="SG_context_contextActivities" id="SG_context_contextActivities"></textarea>
</label>
<label><h4>Revision <span class="optional">Optional: revision of the learning activity associated with this statement</span></h4>
<input type="text" value="" name="SG_context_instructor" id="SG_context_instructor">
</label>
<label><h4>Platform <span class="optional">Optional: Code representing the language in which the experience being recorded in this Statement (mainly) occurred in, if applicable and known.</span></h4>
<input type="text" value="" name="SG_context_platform" id="SG_context_platform">
</label>
<label><h4>Language <span class="optional">Optional: revision of the learning activity associated with this statement</span></h4>
<input type="text" value="" name="SG_context_instructor" id="SG_context_instructor">
</label>
<label><h4>Statement <span class="optional">Optional: Another Statement, which should be considered as context for this Statement.</span></h4>
<input type="text" value="" name="SG_context_statement" id="SG_context_statement">
</label>
<!--
The "context" field provides a place to add some contextual information to a Statement. It can store information such as the instructor for an experience, if this experience happened as part of a team Activity, or how an experience fits into some broader activity.
https://github.com/adlnet/xAPI-Spec/blob/master/xAPI.md#context
registration UUID The registration that the Statement is associated with. optional
instructor Agent (may be a Group) Instructor that the Statement relates to, if not included as the Actor of the Statement. optional
team Group Team that this Statement relates to, if not included as the Actor of the Statement. optional
contextActivities contextActivities Object A map of the types of learning activity context that this Statement is related to. Valid context types are: "parent", "grouping", "category" and "other". optional
revision String Revision of the learning activity associated with this Statement. Format is free. optional
platform String Platform used in the experience of this learning activity. optional
language String (as defined in RFC 5646) Code representing the language in which the experience being recorded in this Statement (mainly) occurred in, if applicable and known. optional
statement Statement Reference Another Statement, which should be considered as context for this Statement. optional
extensions Object A map of any other domain-specific context relevant to this Statement. For example, in a flight simulator altitude, airspeed, wind, attitude, GPS coordinates might all be relevant (See Extensions) optional
The revision property MUST only be used if the Statement's Object is an Activity.
The platform property MUST only be used if the Statement's Object is an Activity.
The language property MUST NOT be used if not applicable or unknown.
The revision property SHOULD be used to track fixes of minor issues (like a spelling error).
The revision property SHOULD NOT be used if there is a major change in learning objectives, pedagogy, or assets of an Activity. (Use a new Activity id instead).
Note: Revision has no behavioral implications within the scope of xAPI. It is simply stored, so that it is available for reporting tools.
-->
</div><!--end contextinputs-->
</div><!--end context-->
<div id="timestamp">
</div><!--end timestamp-->
<div id="stored">
<!--Set by LRS-->
</div><!--end timestamp-->
<div id="authority">
<!--Usually Set by LRS except where there is a strong trust relationship-->
</div><!--end authority-->
<div id="version">
<!--Clients SHOULD NOT set the Statement version;-->
</div><!--end version-->
<div id="SG_attachments" class="SG_statementProperties box">
<!--
Property Type Description Required
x-usageType IRI Identifies the usage of this attachment. For example: one expected use case for attachments is to include a "completion certificate". A type IRI corresponding to this usage should be coined, and used with completion certificate attachments. Required
x-display Language Map Display name (title) of this attachment. Required
description Language Map A description of the attachment Optional
contentType Internet Media Type The content type of the attachment. Required
length Integer The length of the attachment data in octets. Required
sha2 String The SHA-2 (SHA-256, SHA-384, SHA-512) hash of the attachment data. SHA-224 SHOULD not be used: a minimum key size of 256 bits is recommended. Required
fileUrl IRL An IRL at which the attachment data may be retrieved, or from which it used to be retrievable.
-->
<h4>Attachments</h4>
(not entirely working yet! If it doesn't create a SHA-2 string for you, clear your cache, refresh the page, and try again.)
<span class="optional">
IRI Identifies the usage of this attachment. For example: one expected use case for attachments is to include a "completion certificate".
A type IRI corresponding to this usage should be coined, and used with completion certificate attachments. Required
</span>
<div>
<label>Usage Type
<!--https://registry.tincanapi.com/#home/attachmentUsages-->
<select id="SG_attachments_UsageType">
<option value="" selected>Select a usage type</option>
<option value="http://adlnet.gov/expapi/attachments/signature">Signature</option>
<option value="http://id.tincanapi.com/attachment/certificate-of-completion">Certificate of Completion</option>
<option value="http://id.tincanapi.com/attachment/contract">Contract</option>
<option value="http://id.tincanapi.com/attachment/supporting_media">Supporting Media</option>
</select>
</label>
</div>
<label>
Display Title <span class="required">(English only)</span>
<input type = "text" name="SG_attachments_display_title" value="" id="SG_attachments_display_title" onclick=""/>
</label>
<label>Description <span class="optional">(English only)</span>
<input type = "text" name="SG_attachments_description" value="" id="SG_attachments_description" onclick=""/>
</label>
<label>Content Type <span class="required">The content type of the attachment. Required</span>
<!--http://reference.sitepoint.com/html/mime-types-full-->
<a name="SG_attachments_content_type"></a><select id="SG_attachments_content_type">
<option value="" selected>Select a content type for this attachment</option>
<option value="application/pdf">PDF</option>
<option value="text/html">HTML</option>
<option value="text/csv">CSV</option>
<option value="application/zip">Zip</option>
</select>
</label>
<input type="file" id="files" name="file" />
<span class="readBytesButtons">
<!-- <button data-startbyte="0" data-endbyte="4">1-5</button>
<button data-startbyte="5" data-endbyte="14">6-15</button>
<button data-startbyte="6" data-endbyte="7">7-8</button>-->
<button>submit file</button>
</span>
<div id="byte_range"></div><BR>
<div id="byte_content"></div><BR>
<div id="crypto_sha256"></div>
<label>Length <span class="required">Integer The length of the attachment data in octets. Required</span>
<input type = "number" name="SG_attachments_length" value="" id="SG_attachments_length" onclick=""/>
</label>
<label>SHA-2 <span class="required">Integer The SHA-2 (SHA-256, SHA-384, SHA-512) hash of the attachment data. SHA-224 SHOULD not be used: a minimum key size of 256 bits is recommended. Required</span>
<input type = "number" name="SG_attachments_sha2" value="" id="SG_attachments_sha2" onclick=""/>
</label>
<label>File URL <span class="required">IRL An IRL at which the attachment data may be retrieved, or from which it used to be retrievable.</span>
<input type = "url" name="SG_attachments_fileURL" value="" id="SG_attachments_fileURL" onclick=""/>
</label>
</div><!--end attachments-->
<div id="dataconstraints">
</div><!--end dataconstraints-->
<button type= "button" id= "sendStatementBtn2" >Send Statement</button>
</div><!--end Statement Generator-->
</form>
<!--**************************************************************-->
<form id="form2" class="formular" style="left:20px;margin:0px;padding-top:6px;">
<a name="sendstatementfreetext"></a><h2 style="">Send Statement<a href="#" id="sendStatementToggle" class="toggleLink" onclick="return false;">show</a></h2>
<div class="box" id="sendStatementInputs" style="display:none;">
Paste your own pre-written statement into the box below and click Send Statement 1.
If you want to validate statements you are crafting by hand, use this validator to correct them: <a href="http://zackpierce.github.io/xAPI-Validator-JS/" target="_blank">http://zackpierce.github.io/xAPI-Validator-JS/</a>
<p><a href="" id="toggle1" class="toggles closed" onclick="expandtext(this.id);return false;"></a>
<span>click to expand</span><textarea rows="10" cols="80" name="statement" value="x" id="statement" accept-charset="UTF-8" class="closed">
{"actor" : {"mbox" : "mailto:joe@example.com","name":"Joe XAPIWrapperTester","objectType": "Agent"},
"verb" : {"id" : "http://adlnet.gov/expapi/verbs/attempted",
"display" : {"en-US" : "attempted"}},
"object":{"id" : "http://adlnet.gov/expapi/activities/module/","objectType": "Activity"}}
</textarea>
<label>Paste statement into textarea above </label><button type= "button" id= "sendStatementBtn0">Send Statement 1</button></p>
<p><label>Send hardcoded example statement </label><button type= "button" id= "sendStatementBtn1">Send Statement 2</button></p>
</div><!--box-->
</form>
<!--**************************************************************-->
<form id="form3" class="formular" style="left:20px;margin:0px;padding-top:6px;">
<a name="sendstate"></a><h2>Send State<a href="#" id="sendStateToggle" class="toggleLink" onclick="return false;">show</a></h2>
<div class="box" id="sendStateInputs" style="display:none;">
I've pre-populated this with example learning module State data, but you can paste in your own instead.
<p><a href="" id="toggle2" class="toggles closed" onclick="expandtext(this.id);return false;"></a>
<span>click to expand</span><textarea rows="10" cols="80" name="stateval" value="type a key:value pair" id="stateval" class="closed">
{
"pageArray": [
{
"buttonTitle": "Chap. 0 Competency Criteria",
"title": " ",
"url": "page01.htm",
"chapter": 0,
"level": 1
},
{
"buttonTitle": "Chap. 1: Biological Features",
"title": " ",
"url": "page02.htm",
"chapter": 1,
"level": 1
},
{
"buttonTitle": "Chap. 1 Interactions Quiz",
"title": "Interactions Quiz",
"url": "page02toc.htm",
"chapter": 1,
"level": 1,
"type": "I",
"quiz": "469585915910",
"rm": "",
"countscore": "1"
},
{
"buttonTitle": "Attestation Statement",
"title": "",
"url": "attestation.htm",
"chapter": 1,
"level": 1,
"type": "I",
"quiz": "409666286641",
"rm": "",
"countscore": "1"
},
{
"buttonTitle": "Chap. 1 Learning Objectives Procurement & Husbandry",
"title": " ",
"url": "page03.htm",
"chapter": 1,
"level": 2
},
{
"buttonTitle": "Chap. 1 Rat and Mouse Behavior",
"title": " ",
"url": "page02.1.htm",
"chapter": 1,
"level": 2
},
{
"buttonTitle": "Chap. 2 Biological Parameters",
"title": " ",
"url": "page02.2.htm",
"chapter": 2,
"level": 1
},
{
"buttonTitle": "Chap. 2 Case Study",
"title": "",
"url": "quizWrap.htm?call=embed&session=6921972566591293&href=http://uhqmarkappspr1.med.umich.edu/perception5/session.php",
"chapter": 2,
"level": 2,
"type": "Q",
"quiz": "6921972566591293",
"rm": "",
"countscore": "1"
},
{
"buttonTitle": "Chap. 3 Signs of Pain, Illness & Distress",
"title": " ",
"url": "page04.htm",
"chapter": 3,
"level": 1
},
{
"buttonTitle": "Chap. 3 Interactions Quiz 2",
"title": "Interactions Quiz 2",
"url": "page05q.htm",
"chapter": 3,
"level": 2,
"type": "I",
"quiz": "5679585915911",
"rm": "",
"countscore": "1"
},
{
"buttonTitle": "Chap. 3 Table of Contents",
"title": " ",
"url": "TOC1.htm",
"chapter": 3,
"level": 2
},
{
"buttonTitle": "Ch. 4 Quiz",
"title": "",
"url": "quizWrap.htm?call=embed&session=1140870896389821&href=http://uhqmarkappspr1.med.umich.edu/perception5/session.php",
"chapter": 4,
"level": 1,
"type": "Q",
"quiz": "1140870896389821",
"rm": "",
"countscore": "1"
},
{
"buttonTitle": "Chap. 5 Table of Contents Intro to lab rat",
"title": " ",
"url": "TOC7.htm",
"chapter": 5,
"level": 1
},
{
"buttonTitle": "Chap. 5 page 8",
"title": " ",
"url": "page08.htm",
"chapter": 5,
"level": 2
},
{
"buttonTitle": "Chap. 5 Table of Contents2",
"title": " ",
"url": "TOC8.htm",
"chapter": 5,
"level": 2
},
{
"buttonTitle": "Score & Status Page",
"title": "",
"url": "scorePage.htm",
"chapter": 6,
"level": 1
}
],
"modulevars": {
"quizSetupDone": false,
"vrsnDone": false,
"justOpened": true,
"docTitle": "MLearning SCORM-compatible HTML template",
"headerTitle": "MLearning SCORM-compatible HTML template",
"moduletype": 8,
"recommendedMsg": "Recommended",
"requiredMsg": "Must be completed to finish module",
"completedMsg": "Completed",
"contentAuthEmail": ""
}
}
</textarea>
<button type= "button" id= "sendStateBtn" >Send Module State</button>
</p>
</div><!--box-->
</form>
<!--**************************************************************-->
<form id="form4" class="formular" style="left:20px;margin:0px;padding-top:6px;">
<a name="getstate"></a><h2>Get State<a href="#" id="getStateToggle" class="toggleLink" onclick="return false;">show</a></h2>
<div class="box" id="getStateInputs" style="display:none;">
<p>
<select name="stateid" id="stateid">
<option value="">Pick a State id to retrieve</option>
<option>location2</option>
<option>modulestate</option>
<option>questionstate</option>
</select>
<button type= "button" id= "getStateBtn">Get State</button>
</p>
</div><!--box-->
</form>
<!--**************************************************************-->
<form id="form5" class="formular" style="left:20px;margin:0px;padding-top:6px;">
<a name="getmodspec"></a><h2>Get module-Specific values<a href="#" id="getModuleSpecificToggle" class="toggleLink" onclick="return false;">show</a></h2>
<div class="box" id="getModuleSpecificInputs" style="height:150px;display:none;">
<div id="mainmenu" style="float:left;border:1px solid #CCCCCC;margin-right:12px;padding:10px;height:100px">
<label>Select data set to retrieve from<br/>State id = "modulestate"
<select name="dataset" id="dataset">
<option value="">Select a dataset...</option>
<option value="pa">pageArray</option>
<option value="mv">modulevars</option>
</select>
</label>
</div>
<div id="pa" class="submenu" style="display:none;float:left;border:1px solid #CCCCCC;padding:10px;height:100px">
<label>Select a page in the pagearray...
<select name="item" id="item" >
<option value="">Select page</option>
<option value="0">0</option>
<option value="1">1</option>
<option value="2">2</option>
<option value="3">3</option>
<option value="4">4</option>
<option value="5">5</option>
</select></label>
<label>Select a property of the item...
<select name="itemprop" id="itemprop" >
<option value="">Select property</option>
<option value="buttonTitle">buttonTitle</option>
<option value="chapter">chapter</option>
<option value="level">level</option>
<option value="type">type</option>
<option value="quiz">objective</option>
<option value="countscore">countscore</option>
</select></label>
<button type= "button" id= "getpaStateBtn" >Get pageArray Property from stored State</button></p>
</div> <!--pa-->
<div id="mv" class="submenu" style="display:none;float:left;border:1px solid #CCCCCC;height:100px">
<select name="modulevars" id="modulevars" >
<option value="" selected>Select var</option>
<option>quizSetupDone</option>
<option>vrsnDone</option>
<option>justOpened</option>
<option>headerTitle</option>
<option>moduleType</option>
<option>recommendedMsg</option>
<option>requiredMsg</option>
<option>completedMsg</option>
<option>contentAuthEmail</option>
</select>
<button type= "button" id= "getmvStateBtn" >Get modulevars Property from stored State</button></p>
</div>
</div><!--box-->
</form>
<!--**************************************************************-->
<form id="form6" class="formular" style="left:20px;margin:0px;padding-top:6px;">
<a name="sendagentp"></a><h2>Send Agent Profile (under construction) <a href="#" id="sendAgentProfileToggle" class="toggleLink" onclick="return false;">show</a></h2>
<div class="box" id="sendAgentProfileInputs" style="display:none;">
<label>Agent (what agent are you creating a profile for?)
<input type="text" name="AgentProfile_mbox" value="ellen2@example.com" id="AgentProfile_mbox">
<input type="text" name="AgentProfile_name" value="Ellen M2" id="AgentProfile_name">
</label>
<select id="theprofileid" onchange="checkIfOther(this.id)">
<option>umid</option>
<option>roles</option>
<option>accomplishments</option>
<option>accomplishments2</option>
<option>competencies</option>
<option value="other" >other</option>
</select>
<input type="text" id="theprofileid_other" value="" style="display:none">
<textarea id="agentProfile">
{"competencies":[
"competency 1",
"competency 2",
"competency 3",
"competency 4"
]}
</textarea>
<button type= "button" id="sendProfileBtn1" >Send Agent Profile</button>
</div>
</form>
<div id="result"><h2>Results</h2></div>
<div id="correctRespPatternExamples" ><a href="#" id="exampleClose" style="float:right;" class="required" onclick="return false;">[x]CLOSE</a>
<ul> Find the correct interaction type. Copy the quoted text, including the quotes, and paste it in the "Correct Responses Pattern" box at left. Then edit the text as appropriate for your interaction.
<li>true-false: "true"</li>
<li>choice: "golf[,]tetris"</li>
<li>fill-in: "Bob's your uncle"</li>
<li>likert: "likert_3"</li>
<li>matching: "ben[.]3[,]chris[.]2[,]troy[.]4[,]freddie[.]1"</li>
<li>sequencing: "tim[,]mike[,]ells[,]ben"</li>
<li>performance: "pong[.]1:[,]dg[.]:10[,]lunch[.]"</li>
<li>numeric: "4:"</li>
<li>other: "(35.937432,-86.868896)" //example where a location is indicated on a map</li>
</ul>
</div><!--end correctRespPatternExamples-->
</body>
<script src='//ajax.googleapis.com/ajax/libs/jquery/1.10.2/jquery.js'></script>
<!--<script src="js/languages/jquery.validationEngine-en.js" type="text/javascript" charset="utf-8"></script>
<script src="js/jquery.validationEngine.js" type="text/javascript" charset="utf-8"></script>-->
<script src="js/base64.js"></script>
<script src="js/2.5.3-crypto-sha1.js"></script>
<script src="http://crypto-js.googlecode.com/svn/tags/3.0.2/build/rollups/sha256.js"></script>
<!--<script src="js/sha256.js"></script>-->
<script src="http://crypto-js.googlecode.com/svn/tags/3.0.2/build/components/enc-base64-min.js"></script>
<script src="js/verbs.js"></script>
<script src="js/xapiwrapper.js"></script>
<script src="js/config.js"></script>
<script src='js/formfunctions.js'></script>
</html>