@didask/scol-r 2.4.0-beta.1 → 2.5.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.
- package/lib/ManifestGenerator.d.ts +9 -1
- package/lib/ManifestGenerator.js +10 -13
- package/package.json +1 -1
|
@@ -2,10 +2,18 @@ import { scormVersions } from ".";
|
|
|
2
2
|
export declare class Sco {
|
|
3
3
|
scoID: string;
|
|
4
4
|
scoTitle: string;
|
|
5
|
+
scoHref: `./${string}`;
|
|
5
6
|
author: string;
|
|
6
7
|
learningTime: number;
|
|
7
8
|
resources: string[];
|
|
8
|
-
constructor(
|
|
9
|
+
constructor(props: {
|
|
10
|
+
scoID: string;
|
|
11
|
+
scoTitle: string;
|
|
12
|
+
author: string;
|
|
13
|
+
learningTime: number;
|
|
14
|
+
scoHref: `./${string}`;
|
|
15
|
+
resources: string[];
|
|
16
|
+
});
|
|
9
17
|
}
|
|
10
18
|
export interface ManifestGeneratorProps {
|
|
11
19
|
courseId: string;
|
package/lib/ManifestGenerator.js
CHANGED
|
@@ -24,12 +24,13 @@ var __rest = (this && this.__rest) || function (s, e) {
|
|
|
24
24
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
25
25
|
exports.ManifestGenerator = exports.Sco = void 0;
|
|
26
26
|
var Sco = /** @class */ (function () {
|
|
27
|
-
function Sco(
|
|
28
|
-
this.scoID = scoID;
|
|
29
|
-
this.scoTitle = scoTitle;
|
|
30
|
-
this.author = author;
|
|
31
|
-
this.learningTime = learningTime;
|
|
32
|
-
this.resources = resources
|
|
27
|
+
function Sco(props) {
|
|
28
|
+
this.scoID = props.scoID;
|
|
29
|
+
this.scoTitle = props.scoTitle;
|
|
30
|
+
this.author = props.author;
|
|
31
|
+
this.learningTime = props.learningTime;
|
|
32
|
+
this.resources = props.resources;
|
|
33
|
+
this.scoHref = props.scoHref;
|
|
33
34
|
}
|
|
34
35
|
return Sco;
|
|
35
36
|
}());
|
|
@@ -62,18 +63,14 @@ function ManifestGenerator(_a) {
|
|
|
62
63
|
})
|
|
63
64
|
.join("\n"), "\n </organization>\n </organizations>\n <resources>\n ").concat((sharedResources === null || sharedResources === void 0 ? void 0 : sharedResources.length)
|
|
64
65
|
? "<resource adlcp:scormtype=\"asset\" type=\"webcontent\" identifier=\"shared_resources\">\n ".concat(sharedResources
|
|
65
|
-
.map(function (resource) {
|
|
66
|
-
return "<file href=\"".concat(resource, "\"/>");
|
|
67
|
-
})
|
|
66
|
+
.map(function (resource) { return "<file href=\"".concat(resource, "\"/>"); })
|
|
68
67
|
.join("\n"), "\n </resource>")
|
|
69
68
|
: "", "\n ").concat(scoList
|
|
70
69
|
.map(function (sco) {
|
|
71
|
-
return "<resource adlcp:scormtype=\"sco\" type=\"webcontent\" identifier=\"resource_".concat(sco.scoID, "\" href=\"
|
|
70
|
+
return "<resource adlcp:scormtype=\"sco\" type=\"webcontent\" identifier=\"resource_".concat(sco.scoID, "\" href=\"").concat(sco.scoHref, "\">\n ").concat((sharedResources === null || sharedResources === void 0 ? void 0 : sharedResources.length)
|
|
72
71
|
? '<dependency identifierref="shared_resources"/>'
|
|
73
72
|
: "", "\n ").concat(sco.resources
|
|
74
|
-
.map(function (resource) {
|
|
75
|
-
return "<file href=\"".concat(resource, "\"/>");
|
|
76
|
-
})
|
|
73
|
+
.map(function (resource) { return "<file href=\"".concat(resource, "\"/>"); })
|
|
77
74
|
.join("\n"), "\n </resource>");
|
|
78
75
|
})
|
|
79
76
|
.join("\n"), "\n </resources>\n </manifest>");
|