@learnpack/learnpack 5.0.308 → 5.0.310

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.
Files changed (88) hide show
  1. package/README.md +409 -409
  2. package/lib/commands/audit.js +15 -15
  3. package/lib/commands/breakToken.js +19 -19
  4. package/lib/commands/clean.js +3 -3
  5. package/lib/commands/logout.js +3 -3
  6. package/lib/commands/serve.js +16 -16
  7. package/lib/creatorDist/assets/{index-B37w_ZhT.js → index-BI7U47zy.js} +13186 -13013
  8. package/lib/creatorDist/index.html +1 -1
  9. package/lib/managers/config/index.js +77 -77
  10. package/lib/utils/creatorUtilities.js +14 -14
  11. package/lib/utils/templates/isolated/exercises/01-hello-world/README.es.md +26 -26
  12. package/lib/utils/templates/isolated/exercises/01-hello-world/README.md +26 -26
  13. package/lib/utils/templates/scorm/adlcp_rootv1p2.xsd +110 -110
  14. package/lib/utils/templates/scorm/config/index.html +209 -209
  15. package/lib/utils/templates/scorm/ims_xml.xsd +1 -1
  16. package/lib/utils/templates/scorm/imscp_rootv1p1p2.xsd +345 -345
  17. package/lib/utils/templates/scorm/imsmanifest.xml +38 -38
  18. package/lib/utils/templates/scorm/imsmd_rootv1p2p1.xsd +573 -573
  19. package/package.json +1 -1
  20. package/src/commands/audit.ts +487 -487
  21. package/src/commands/breakToken.ts +67 -67
  22. package/src/commands/clean.ts +30 -30
  23. package/src/commands/logout.ts +38 -38
  24. package/src/commands/publish.ts +517 -517
  25. package/src/commands/serve.ts +3179 -3179
  26. package/src/commands/start.ts +333 -333
  27. package/src/commands/translate.ts +123 -123
  28. package/src/creator/README.md +54 -54
  29. package/src/creator/package-lock.json +6621 -6621
  30. package/src/creator/package.json +55 -55
  31. package/src/creator/src/App.tsx +611 -608
  32. package/src/creator/src/components/FileUploader.tsx +340 -302
  33. package/src/creator/src/components/Icon.tsx +18 -18
  34. package/src/creator/src/components/LessonItem.tsx +152 -152
  35. package/src/creator/src/components/Login.tsx +259 -259
  36. package/src/creator/src/components/ParamsChecker.tsx +25 -25
  37. package/src/creator/src/components/Uploader.tsx +3 -6
  38. package/src/creator/src/components/syllabus/ContentIndex.tsx +323 -323
  39. package/src/creator/src/components/syllabus/SyllabusEditor.tsx +341 -337
  40. package/src/creator/src/i18n.ts +28 -28
  41. package/src/creator/src/locales/en.json +139 -138
  42. package/src/creator/src/locales/es.json +139 -138
  43. package/src/creator/src/utils/configTypes.ts +122 -122
  44. package/src/creator/src/utils/constants.ts +13 -13
  45. package/src/creator/src/utils/creatorUtils.ts +46 -46
  46. package/src/creator/src/utils/eventBus.ts +2 -2
  47. package/src/creator/src/utils/lib.ts +172 -172
  48. package/src/creator/src/utils/rigo.ts +1 -1
  49. package/src/creator/src/utils/socket.ts +61 -61
  50. package/src/creator/src/utils/store.ts +222 -222
  51. package/src/creator/src/vite-env.d.ts +1 -1
  52. package/src/creator/vite.config.ts +13 -13
  53. package/src/creatorDist/assets/{index-B37w_ZhT.js → index-BI7U47zy.js} +13186 -13013
  54. package/src/creatorDist/index.html +1 -1
  55. package/src/managers/config/defaults.ts +49 -49
  56. package/src/managers/config/exercise.ts +364 -364
  57. package/src/managers/config/index.ts +775 -775
  58. package/src/managers/file.ts +236 -236
  59. package/src/managers/server/routes.ts +554 -554
  60. package/src/managers/telemetry.ts +188 -188
  61. package/src/models/action.ts +13 -13
  62. package/src/models/config-manager.ts +28 -28
  63. package/src/models/config.ts +106 -106
  64. package/src/models/exercise-obj.ts +30 -30
  65. package/src/models/session.ts +39 -39
  66. package/src/models/socket.ts +61 -61
  67. package/src/models/status.ts +16 -16
  68. package/src/ui/_app/app.css +1 -1
  69. package/src/ui/_app/app.js +477 -407
  70. package/src/ui/app.tar.gz +0 -0
  71. package/src/utils/BaseCommand.ts +56 -56
  72. package/src/utils/api.ts +665 -665
  73. package/src/utils/audit.ts +392 -392
  74. package/src/utils/checkNotInstalled.ts +267 -267
  75. package/src/utils/convertCreds.js +34 -34
  76. package/src/utils/creatorUtilities.ts +504 -504
  77. package/src/utils/export/README.md +178 -178
  78. package/src/utils/incrementVersion.js +74 -74
  79. package/src/utils/misc.ts +58 -58
  80. package/src/utils/sidebarGenerator.ts +195 -195
  81. package/src/utils/templates/isolated/exercises/01-hello-world/README.es.md +26 -26
  82. package/src/utils/templates/isolated/exercises/01-hello-world/README.md +26 -26
  83. package/src/utils/templates/scorm/adlcp_rootv1p2.xsd +110 -110
  84. package/src/utils/templates/scorm/config/index.html +209 -209
  85. package/src/utils/templates/scorm/ims_xml.xsd +1 -1
  86. package/src/utils/templates/scorm/imscp_rootv1p1p2.xsd +345 -345
  87. package/src/utils/templates/scorm/imsmanifest.xml +38 -38
  88. package/src/utils/templates/scorm/imsmd_rootv1p2p1.xsd +573 -573
@@ -1,110 +1,110 @@
1
- <?xml version="1.0"?>
2
- <!-- filename=adlcp_rootv1p2.xsd -->
3
- <!-- Conforms to w3c http://www.w3.org/TR/xmlschema-1/ 2000-10-24-->
4
-
5
- <xsd:schema xmlns="http://www.adlnet.org/xsd/adlcp_rootv1p2"
6
- targetNamespace="http://www.adlnet.org/xsd/adlcp_rootv1p2"
7
- xmlns:xml="http://www.w3.org/XML/1998/namespace"
8
- xmlns:imscp="http://www.imsproject.org/xsd/imscp_rootv1p1p2"
9
- xmlns:xsd="http://www.w3.org/2001/XMLSchema"
10
- elementFormDefault="unqualified"
11
- version="ADL Version 1.2">
12
-
13
- <xsd:import namespace="http://www.imsproject.org/xsd/imscp_rootv1p1p2"
14
- schemaLocation="imscp_rootv1p1p2.xsd"/>
15
-
16
- <xsd:element name="location" type="locationType"/>
17
- <xsd:element name="prerequisites" type="prerequisitesType"/>
18
- <xsd:element name="maxtimeallowed" type="maxtimeallowedType"/>
19
- <xsd:element name="timelimitaction" type="timelimitactionType"/>
20
- <xsd:element name="datafromlms" type="datafromlmsType"/>
21
- <xsd:element name="masteryscore" type="masteryscoreType"/>
22
-
23
-
24
- <xsd:element name="schema" type="newSchemaType"/>
25
- <xsd:simpleType name="newSchemaType">
26
- <xsd:restriction base="imscp:schemaType">
27
- <xsd:enumeration value="ADL SCORM"/>
28
- </xsd:restriction>
29
- </xsd:simpleType>
30
-
31
- <xsd:element name="schemaversion" type="newSchemaversionType"/>
32
- <xsd:simpleType name="newSchemaversionType">
33
- <xsd:restriction base="imscp:schemaversionType">
34
- <xsd:enumeration value="1.2"/>
35
- </xsd:restriction>
36
- </xsd:simpleType>
37
-
38
-
39
- <xsd:attribute name="scormtype">
40
- <xsd:simpleType>
41
- <xsd:restriction base="xsd:string">
42
- <xsd:enumeration value="asset"/>
43
- <xsd:enumeration value="sco"/>
44
- </xsd:restriction>
45
- </xsd:simpleType>
46
- </xsd:attribute>
47
-
48
- <xsd:simpleType name="locationType">
49
- <xsd:restriction base="xsd:string">
50
- <xsd:maxLength value="2000"/>
51
- </xsd:restriction>
52
- </xsd:simpleType>
53
-
54
-
55
- <xsd:complexType name="prerequisitesType">
56
- <xsd:simpleContent>
57
- <xsd:extension base="prerequisiteStringType">
58
- <xsd:attributeGroup ref="attr.prerequisitetype"/>
59
- </xsd:extension>
60
- </xsd:simpleContent>
61
- </xsd:complexType>
62
-
63
- <xsd:attributeGroup name="attr.prerequisitetype">
64
- <xsd:attribute name="type" use="required">
65
- <xsd:simpleType>
66
- <xsd:restriction base="xsd:string">
67
- <xsd:enumeration value="aicc_script"/>
68
- </xsd:restriction>
69
- </xsd:simpleType>
70
- </xsd:attribute>
71
- </xsd:attributeGroup>
72
-
73
- <xsd:simpleType name="maxtimeallowedType">
74
- <xsd:restriction base="xsd:string">
75
- <xsd:maxLength value="13"/>
76
- </xsd:restriction>
77
- </xsd:simpleType>
78
-
79
- <xsd:simpleType name="timelimitactionType">
80
- <xsd:restriction base="stringType">
81
- <xsd:enumeration value="exit,no message"/>
82
- <xsd:enumeration value="exit,message"/>
83
- <xsd:enumeration value="continue,no message"/>
84
- <xsd:enumeration value="continue,message"/>
85
- </xsd:restriction>
86
- </xsd:simpleType>
87
-
88
- <xsd:simpleType name="datafromlmsType">
89
- <xsd:restriction base="xsd:string">
90
- <xsd:maxLength value="255"/>
91
- </xsd:restriction>
92
- </xsd:simpleType>
93
-
94
- <xsd:simpleType name="masteryscoreType">
95
- <xsd:restriction base="xsd:string">
96
- <xsd:maxLength value="200"/>
97
- </xsd:restriction>
98
- </xsd:simpleType>
99
-
100
- <xsd:simpleType name="stringType">
101
- <xsd:restriction base="xsd:string"/>
102
- </xsd:simpleType>
103
-
104
- <xsd:simpleType name="prerequisiteStringType">
105
- <xsd:restriction base="xsd:string">
106
- <xsd:maxLength value="200"/>
107
- </xsd:restriction>
108
- </xsd:simpleType>
109
-
110
- </xsd:schema>
1
+ <?xml version="1.0"?>
2
+ <!-- filename=adlcp_rootv1p2.xsd -->
3
+ <!-- Conforms to w3c http://www.w3.org/TR/xmlschema-1/ 2000-10-24-->
4
+
5
+ <xsd:schema xmlns="http://www.adlnet.org/xsd/adlcp_rootv1p2"
6
+ targetNamespace="http://www.adlnet.org/xsd/adlcp_rootv1p2"
7
+ xmlns:xml="http://www.w3.org/XML/1998/namespace"
8
+ xmlns:imscp="http://www.imsproject.org/xsd/imscp_rootv1p1p2"
9
+ xmlns:xsd="http://www.w3.org/2001/XMLSchema"
10
+ elementFormDefault="unqualified"
11
+ version="ADL Version 1.2">
12
+
13
+ <xsd:import namespace="http://www.imsproject.org/xsd/imscp_rootv1p1p2"
14
+ schemaLocation="imscp_rootv1p1p2.xsd"/>
15
+
16
+ <xsd:element name="location" type="locationType"/>
17
+ <xsd:element name="prerequisites" type="prerequisitesType"/>
18
+ <xsd:element name="maxtimeallowed" type="maxtimeallowedType"/>
19
+ <xsd:element name="timelimitaction" type="timelimitactionType"/>
20
+ <xsd:element name="datafromlms" type="datafromlmsType"/>
21
+ <xsd:element name="masteryscore" type="masteryscoreType"/>
22
+
23
+
24
+ <xsd:element name="schema" type="newSchemaType"/>
25
+ <xsd:simpleType name="newSchemaType">
26
+ <xsd:restriction base="imscp:schemaType">
27
+ <xsd:enumeration value="ADL SCORM"/>
28
+ </xsd:restriction>
29
+ </xsd:simpleType>
30
+
31
+ <xsd:element name="schemaversion" type="newSchemaversionType"/>
32
+ <xsd:simpleType name="newSchemaversionType">
33
+ <xsd:restriction base="imscp:schemaversionType">
34
+ <xsd:enumeration value="1.2"/>
35
+ </xsd:restriction>
36
+ </xsd:simpleType>
37
+
38
+
39
+ <xsd:attribute name="scormtype">
40
+ <xsd:simpleType>
41
+ <xsd:restriction base="xsd:string">
42
+ <xsd:enumeration value="asset"/>
43
+ <xsd:enumeration value="sco"/>
44
+ </xsd:restriction>
45
+ </xsd:simpleType>
46
+ </xsd:attribute>
47
+
48
+ <xsd:simpleType name="locationType">
49
+ <xsd:restriction base="xsd:string">
50
+ <xsd:maxLength value="2000"/>
51
+ </xsd:restriction>
52
+ </xsd:simpleType>
53
+
54
+
55
+ <xsd:complexType name="prerequisitesType">
56
+ <xsd:simpleContent>
57
+ <xsd:extension base="prerequisiteStringType">
58
+ <xsd:attributeGroup ref="attr.prerequisitetype"/>
59
+ </xsd:extension>
60
+ </xsd:simpleContent>
61
+ </xsd:complexType>
62
+
63
+ <xsd:attributeGroup name="attr.prerequisitetype">
64
+ <xsd:attribute name="type" use="required">
65
+ <xsd:simpleType>
66
+ <xsd:restriction base="xsd:string">
67
+ <xsd:enumeration value="aicc_script"/>
68
+ </xsd:restriction>
69
+ </xsd:simpleType>
70
+ </xsd:attribute>
71
+ </xsd:attributeGroup>
72
+
73
+ <xsd:simpleType name="maxtimeallowedType">
74
+ <xsd:restriction base="xsd:string">
75
+ <xsd:maxLength value="13"/>
76
+ </xsd:restriction>
77
+ </xsd:simpleType>
78
+
79
+ <xsd:simpleType name="timelimitactionType">
80
+ <xsd:restriction base="stringType">
81
+ <xsd:enumeration value="exit,no message"/>
82
+ <xsd:enumeration value="exit,message"/>
83
+ <xsd:enumeration value="continue,no message"/>
84
+ <xsd:enumeration value="continue,message"/>
85
+ </xsd:restriction>
86
+ </xsd:simpleType>
87
+
88
+ <xsd:simpleType name="datafromlmsType">
89
+ <xsd:restriction base="xsd:string">
90
+ <xsd:maxLength value="255"/>
91
+ </xsd:restriction>
92
+ </xsd:simpleType>
93
+
94
+ <xsd:simpleType name="masteryscoreType">
95
+ <xsd:restriction base="xsd:string">
96
+ <xsd:maxLength value="200"/>
97
+ </xsd:restriction>
98
+ </xsd:simpleType>
99
+
100
+ <xsd:simpleType name="stringType">
101
+ <xsd:restriction base="xsd:string"/>
102
+ </xsd:simpleType>
103
+
104
+ <xsd:simpleType name="prerequisiteStringType">
105
+ <xsd:restriction base="xsd:string">
106
+ <xsd:maxLength value="200"/>
107
+ </xsd:restriction>
108
+ </xsd:simpleType>
109
+
110
+ </xsd:schema>
@@ -1,210 +1,210 @@
1
- <!DOCTYPE html
2
- PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
3
- <html xmlns="http://www.w3.org/1999/xhtml">
4
-
5
- <head>
6
- <meta charset="UTF-8">
7
- <title>{{title}}</title>
8
- <script src="api.js" type="text/javascript"></script>
9
- <script type="text/javascript">
10
-
11
-
12
- var currentPage = null;
13
- var startTimeStamp = null;
14
- var processedUnload = false;
15
- var reachedEnd = false;
16
- var language = 'es';
17
-
18
- function doStart() {
19
- startTimeStamp = new Date();
20
-
21
- ScormProcessInitialize();
22
-
23
- var completionStatus = ScormProcessGetValue('cmi.core.lesson_status');
24
- if (completionStatus == 'not attempted') {
25
- ScormProcessSetValue('cmi.core.lesson_status', 'incomplete');
26
- }
27
-
28
- var bookmark = ScormProcessGetValue('cmi.core.lesson_location');
29
-
30
- if (bookmark == '') {
31
- currentPage = 0;
32
- } else {
33
- if (
34
- confirm(
35
- 'Would you like to resume from where you previously left off?'
36
- )
37
- ) {
38
- currentPage = parseInt(bookmark, 10);
39
- } else {
40
- currentPage = 0;
41
- }
42
- }
43
-
44
- goToPage();
45
- }
46
-
47
- function goToPage() {
48
- ScormProcessSetValue('cmi.core.lesson_location', currentPage);
49
- }
50
-
51
- function doUnload(pressedExit) {
52
- if (processedUnload == true) {
53
- return;
54
- }
55
-
56
- processedUnload = true;
57
-
58
- var endTimeStamp = new Date();
59
- var totalMilliseconds =
60
- endTimeStamp.getTime() - startTimeStamp.getTime();
61
- var scormTime = ConvertMilliSecondsToSCORMTime(
62
- totalMilliseconds,
63
- false
64
- );
65
-
66
- ScormProcessSetValue('cmi.core.session_time', scormTime);
67
-
68
- if (pressedExit == false && reachedEnd == false) {
69
- ScormProcessSetValue('cmi.core.exit', 'suspend');
70
- }
71
-
72
- ScormProcessFinish();
73
- }
74
-
75
- function doPrevious() {
76
- if (currentPage > 0) {
77
- currentPage--;
78
- }
79
- goToPage();
80
- }
81
-
82
- function doNext() {
83
- if (currentPage < pageArray.length - 1) {
84
- currentPage++;
85
- }
86
- goToPage();
87
- }
88
-
89
- function doExit() {
90
- if (
91
- reachedEnd == false &&
92
- confirm('Would you like to save your progress to resume later?')
93
- ) {
94
- ScormProcessSetValue('cmi.core.exit', 'suspend');
95
- } else {
96
- ScormProcessSetValue('cmi.core.exit', '');
97
- }
98
-
99
- doUnload(true);
100
- }
101
-
102
- function ConvertMilliSecondsToSCORMTime(
103
- intTotalMilliseconds,
104
- blnIncludeFraction
105
- ) {
106
- var intHours;
107
- var intintMinutes;
108
- var intSeconds;
109
- var intMilliseconds;
110
- var intHundredths;
111
- var strCMITimeSpan;
112
-
113
- if (blnIncludeFraction == null || blnIncludeFraction == undefined) {
114
- blnIncludeFraction = true;
115
- }
116
-
117
- intMilliseconds = intTotalMilliseconds % 1000;
118
-
119
- intSeconds = ((intTotalMilliseconds - intMilliseconds) / 1000) % 60;
120
-
121
- intMinutes =
122
- ((intTotalMilliseconds - intMilliseconds - intSeconds * 1000) /
123
- 60000) %
124
- 60;
125
-
126
- intHours =
127
- (intTotalMilliseconds -
128
- intMilliseconds -
129
- intSeconds * 1000 -
130
- intMinutes * 60000) /
131
- 3600000;
132
-
133
- if (intHours == 10000) {
134
- intHours = 9999;
135
-
136
- intMinutes = (intTotalMilliseconds - intHours * 3600000) / 60000;
137
- if (intMinutes == 100) {
138
- intMinutes = 99;
139
- }
140
- intMinutes = Math.floor(intMinutes);
141
-
142
- intSeconds =
143
- (intTotalMilliseconds - intHours * 3600000 - intMinutes * 60000) /
144
- 1000;
145
- if (intSeconds == 100) {
146
- intSeconds = 99;
147
- }
148
- intSeconds = Math.floor(intSeconds);
149
-
150
- intMilliseconds =
151
- intTotalMilliseconds -
152
- intHours * 3600000 -
153
- intMinutes * 60000 -
154
- intSeconds * 1000;
155
- }
156
-
157
- intHundredths = Math.floor(intMilliseconds / 10);
158
-
159
- strCMITimeSpan =
160
- ZeroPad(intHours, 4) +
161
- ':' +
162
- ZeroPad(intMinutes, 2) +
163
- ':' +
164
- ZeroPad(intSeconds, 2);
165
-
166
- if (blnIncludeFraction) {
167
- strCMITimeSpan += '.' + intHundredths;
168
- }
169
-
170
- if (intHours > 9999) {
171
- strCMITimeSpan = '9999:99:99';
172
-
173
- if (blnIncludeFraction) {
174
- strCMITimeSpan += '.99';
175
- }
176
- }
177
-
178
- return strCMITimeSpan;
179
- }
180
-
181
- function ZeroPad(intNum, intNumDigits) {
182
- var strTemp;
183
- var intLen;
184
- var i;
185
-
186
- strTemp = new String(intNum);
187
- intLen = strTemp.length;
188
-
189
- if (intLen > intNumDigits) {
190
- strTemp = strTemp.substr(0, intNumDigits);
191
- } else {
192
- for (i = intLen; i < intNumDigits; i++) {
193
- strTemp = '0' + strTemp;
194
- }
195
- }
196
- return strTemp;
197
- }
198
-
199
-
200
- </script>
201
- <link rel="stylesheet" href="app.css">
202
- </head>
203
-
204
- <body onload="doStart();" onbeforeunload="doUnload(false);" onunload="doUnload();">
205
- <div id="root"></div>
206
- </body>
207
-
208
- <script type="module" src="app.js"></script>
209
-
1
+ <!DOCTYPE html
2
+ PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
3
+ <html xmlns="http://www.w3.org/1999/xhtml">
4
+
5
+ <head>
6
+ <meta charset="UTF-8">
7
+ <title>{{title}}</title>
8
+ <script src="api.js" type="text/javascript"></script>
9
+ <script type="text/javascript">
10
+
11
+
12
+ var currentPage = null;
13
+ var startTimeStamp = null;
14
+ var processedUnload = false;
15
+ var reachedEnd = false;
16
+ var language = 'es';
17
+
18
+ function doStart() {
19
+ startTimeStamp = new Date();
20
+
21
+ ScormProcessInitialize();
22
+
23
+ var completionStatus = ScormProcessGetValue('cmi.core.lesson_status');
24
+ if (completionStatus == 'not attempted') {
25
+ ScormProcessSetValue('cmi.core.lesson_status', 'incomplete');
26
+ }
27
+
28
+ var bookmark = ScormProcessGetValue('cmi.core.lesson_location');
29
+
30
+ if (bookmark == '') {
31
+ currentPage = 0;
32
+ } else {
33
+ if (
34
+ confirm(
35
+ 'Would you like to resume from where you previously left off?'
36
+ )
37
+ ) {
38
+ currentPage = parseInt(bookmark, 10);
39
+ } else {
40
+ currentPage = 0;
41
+ }
42
+ }
43
+
44
+ goToPage();
45
+ }
46
+
47
+ function goToPage() {
48
+ ScormProcessSetValue('cmi.core.lesson_location', currentPage);
49
+ }
50
+
51
+ function doUnload(pressedExit) {
52
+ if (processedUnload == true) {
53
+ return;
54
+ }
55
+
56
+ processedUnload = true;
57
+
58
+ var endTimeStamp = new Date();
59
+ var totalMilliseconds =
60
+ endTimeStamp.getTime() - startTimeStamp.getTime();
61
+ var scormTime = ConvertMilliSecondsToSCORMTime(
62
+ totalMilliseconds,
63
+ false
64
+ );
65
+
66
+ ScormProcessSetValue('cmi.core.session_time', scormTime);
67
+
68
+ if (pressedExit == false && reachedEnd == false) {
69
+ ScormProcessSetValue('cmi.core.exit', 'suspend');
70
+ }
71
+
72
+ ScormProcessFinish();
73
+ }
74
+
75
+ function doPrevious() {
76
+ if (currentPage > 0) {
77
+ currentPage--;
78
+ }
79
+ goToPage();
80
+ }
81
+
82
+ function doNext() {
83
+ if (currentPage < pageArray.length - 1) {
84
+ currentPage++;
85
+ }
86
+ goToPage();
87
+ }
88
+
89
+ function doExit() {
90
+ if (
91
+ reachedEnd == false &&
92
+ confirm('Would you like to save your progress to resume later?')
93
+ ) {
94
+ ScormProcessSetValue('cmi.core.exit', 'suspend');
95
+ } else {
96
+ ScormProcessSetValue('cmi.core.exit', '');
97
+ }
98
+
99
+ doUnload(true);
100
+ }
101
+
102
+ function ConvertMilliSecondsToSCORMTime(
103
+ intTotalMilliseconds,
104
+ blnIncludeFraction
105
+ ) {
106
+ var intHours;
107
+ var intintMinutes;
108
+ var intSeconds;
109
+ var intMilliseconds;
110
+ var intHundredths;
111
+ var strCMITimeSpan;
112
+
113
+ if (blnIncludeFraction == null || blnIncludeFraction == undefined) {
114
+ blnIncludeFraction = true;
115
+ }
116
+
117
+ intMilliseconds = intTotalMilliseconds % 1000;
118
+
119
+ intSeconds = ((intTotalMilliseconds - intMilliseconds) / 1000) % 60;
120
+
121
+ intMinutes =
122
+ ((intTotalMilliseconds - intMilliseconds - intSeconds * 1000) /
123
+ 60000) %
124
+ 60;
125
+
126
+ intHours =
127
+ (intTotalMilliseconds -
128
+ intMilliseconds -
129
+ intSeconds * 1000 -
130
+ intMinutes * 60000) /
131
+ 3600000;
132
+
133
+ if (intHours == 10000) {
134
+ intHours = 9999;
135
+
136
+ intMinutes = (intTotalMilliseconds - intHours * 3600000) / 60000;
137
+ if (intMinutes == 100) {
138
+ intMinutes = 99;
139
+ }
140
+ intMinutes = Math.floor(intMinutes);
141
+
142
+ intSeconds =
143
+ (intTotalMilliseconds - intHours * 3600000 - intMinutes * 60000) /
144
+ 1000;
145
+ if (intSeconds == 100) {
146
+ intSeconds = 99;
147
+ }
148
+ intSeconds = Math.floor(intSeconds);
149
+
150
+ intMilliseconds =
151
+ intTotalMilliseconds -
152
+ intHours * 3600000 -
153
+ intMinutes * 60000 -
154
+ intSeconds * 1000;
155
+ }
156
+
157
+ intHundredths = Math.floor(intMilliseconds / 10);
158
+
159
+ strCMITimeSpan =
160
+ ZeroPad(intHours, 4) +
161
+ ':' +
162
+ ZeroPad(intMinutes, 2) +
163
+ ':' +
164
+ ZeroPad(intSeconds, 2);
165
+
166
+ if (blnIncludeFraction) {
167
+ strCMITimeSpan += '.' + intHundredths;
168
+ }
169
+
170
+ if (intHours > 9999) {
171
+ strCMITimeSpan = '9999:99:99';
172
+
173
+ if (blnIncludeFraction) {
174
+ strCMITimeSpan += '.99';
175
+ }
176
+ }
177
+
178
+ return strCMITimeSpan;
179
+ }
180
+
181
+ function ZeroPad(intNum, intNumDigits) {
182
+ var strTemp;
183
+ var intLen;
184
+ var i;
185
+
186
+ strTemp = new String(intNum);
187
+ intLen = strTemp.length;
188
+
189
+ if (intLen > intNumDigits) {
190
+ strTemp = strTemp.substr(0, intNumDigits);
191
+ } else {
192
+ for (i = intLen; i < intNumDigits; i++) {
193
+ strTemp = '0' + strTemp;
194
+ }
195
+ }
196
+ return strTemp;
197
+ }
198
+
199
+
200
+ </script>
201
+ <link rel="stylesheet" href="app.css">
202
+ </head>
203
+
204
+ <body onload="doStart();" onbeforeunload="doUnload(false);" onunload="doUnload();">
205
+ <div id="root"></div>
206
+ </body>
207
+
208
+ <script type="module" src="app.js"></script>
209
+
210
210
  </html>
@@ -1 +1 @@
1
- <?xml version="1.0" encoding="UTF-8"?><!-- filename=ims_xml.xsd --><xsd:schema xmlns="http://www.w3.org/XML/1998/namespace" targetNamespace="http://www.w3.org/XML/1998/namespace" xmlns:xsd="http://www.w3.org/2001/XMLSchema" elementFormDefault="qualified"> <!-- 2001-02-22 edited by Thomas Wason IMS Global Learning Consortium, Inc. --> <xsd:annotation> <xsd:documentation>In namespace-aware XML processors, the &quot;xml&quot; prefix is bound to the namespace name http://www.w3.org/XML/1998/namespace.</xsd:documentation> <xsd:documentation>Do not reference this file in XML instances</xsd:documentation> <xsd:documentation>Schawn Thropp: Changed the uriReference type to string type</xsd:documentation> </xsd:annotation> <xsd:attribute name="lang" type="xsd:language"> <xsd:annotation> <xsd:documentation>Refers to universal XML 1.0 lang attribute</xsd:documentation> </xsd:annotation> </xsd:attribute> <xsd:attribute name="base" type="xsd:string"> <xsd:annotation> <xsd:documentation>Refers to XML Base: http://www.w3.org/TR/xmlbase</xsd:documentation> </xsd:annotation> </xsd:attribute> <xsd:attribute name="link" type="xsd:string"/></xsd:schema>
1
+ <?xml version="1.0" encoding="UTF-8"?><!-- filename=ims_xml.xsd --><xsd:schema xmlns="http://www.w3.org/XML/1998/namespace" targetNamespace="http://www.w3.org/XML/1998/namespace" xmlns:xsd="http://www.w3.org/2001/XMLSchema" elementFormDefault="qualified"> <!-- 2001-02-22 edited by Thomas Wason IMS Global Learning Consortium, Inc. --> <xsd:annotation> <xsd:documentation>In namespace-aware XML processors, the &quot;xml&quot; prefix is bound to the namespace name http://www.w3.org/XML/1998/namespace.</xsd:documentation> <xsd:documentation>Do not reference this file in XML instances</xsd:documentation> <xsd:documentation>Schawn Thropp: Changed the uriReference type to string type</xsd:documentation> </xsd:annotation> <xsd:attribute name="lang" type="xsd:language"> <xsd:annotation> <xsd:documentation>Refers to universal XML 1.0 lang attribute</xsd:documentation> </xsd:annotation> </xsd:attribute> <xsd:attribute name="base" type="xsd:string"> <xsd:annotation> <xsd:documentation>Refers to XML Base: http://www.w3.org/TR/xmlbase</xsd:documentation> </xsd:annotation> </xsd:attribute> <xsd:attribute name="link" type="xsd:string"/></xsd:schema>