coursecode 0.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.
- package/LICENSE +21 -0
- package/README.md +322 -0
- package/THIRD_PARTY_NOTICES.md +22 -0
- package/bin/cli.js +331 -0
- package/framework/assets/logo-coursecode-black.svg +14 -0
- package/framework/assets/logo-coursecode-white.svg +14 -0
- package/framework/assets/logo-coursecode.svg +14 -0
- package/framework/css/01-base.css +160 -0
- package/framework/css/02-layout.css +499 -0
- package/framework/css/accessibility.css +834 -0
- package/framework/css/components/accordions.css +710 -0
- package/framework/css/components/assessments.css +520 -0
- package/framework/css/components/audio-player.css +570 -0
- package/framework/css/components/badges.css +80 -0
- package/framework/css/components/breadcrumbs.css +87 -0
- package/framework/css/components/buttons.css +707 -0
- package/framework/css/components/callouts.css +1280 -0
- package/framework/css/components/cards.css +475 -0
- package/framework/css/components/carousel.css +193 -0
- package/framework/css/components/checkbox-group.css +123 -0
- package/framework/css/components/checklist.css +203 -0
- package/framework/css/components/collapse.css +96 -0
- package/framework/css/components/comparison.css +33 -0
- package/framework/css/components/content-image.css +36 -0
- package/framework/css/components/document-gallery.css +425 -0
- package/framework/css/components/dropdown.css +115 -0
- package/framework/css/components/embed-frame.css +142 -0
- package/framework/css/components/engagement.css +412 -0
- package/framework/css/components/features.css +35 -0
- package/framework/css/components/flip-cards.css +253 -0
- package/framework/css/components/footer.css +353 -0
- package/framework/css/components/forms.css +294 -0
- package/framework/css/components/hero.css +216 -0
- package/framework/css/components/images.css +528 -0
- package/framework/css/components/interactive-timeline.css +274 -0
- package/framework/css/components/intro-cards.css +30 -0
- package/framework/css/components/lightbox.css +666 -0
- package/framework/css/components/loading.css +65 -0
- package/framework/css/components/modals.css +235 -0
- package/framework/css/components/notifications.css +107 -0
- package/framework/css/components/quote.css +150 -0
- package/framework/css/components/sidebar.css +684 -0
- package/framework/css/components/slide-header.css +52 -0
- package/framework/css/components/spinner.css +62 -0
- package/framework/css/components/stats.css +44 -0
- package/framework/css/components/steps.css +232 -0
- package/framework/css/components/tables.css +90 -0
- package/framework/css/components/tabs.css +347 -0
- package/framework/css/components/timeline.css +154 -0
- package/framework/css/components/toggle.css +95 -0
- package/framework/css/components/tooltip.css +226 -0
- package/framework/css/components/video-player.css +438 -0
- package/framework/css/design-tokens.css +707 -0
- package/framework/css/framework.css +86 -0
- package/framework/css/interactions/accessibility.css +75 -0
- package/framework/css/interactions/base.css +92 -0
- package/framework/css/interactions/drag-drop.css +295 -0
- package/framework/css/interactions/fill-in-the-blank.css +236 -0
- package/framework/css/interactions/hotspots.css +69 -0
- package/framework/css/interactions/index.css +45 -0
- package/framework/css/interactions/interactive-image.css +359 -0
- package/framework/css/interactions/likert.css +126 -0
- package/framework/css/interactions/matching.css +354 -0
- package/framework/css/interactions/numeric-input.css +78 -0
- package/framework/css/interactions/sequencing.css +378 -0
- package/framework/css/interactions/true-false.css +177 -0
- package/framework/css/layouts/article.css +258 -0
- package/framework/css/layouts/base.css +30 -0
- package/framework/css/layouts/canvas.css +38 -0
- package/framework/css/layouts/focused.css +236 -0
- package/framework/css/layouts/index.css +29 -0
- package/framework/css/layouts/presentation.css +191 -0
- package/framework/css/layouts/traditional.css +52 -0
- package/framework/css/responsive.css +439 -0
- package/framework/css/utilities/accessibility-utils.css +59 -0
- package/framework/css/utilities/animations.css +419 -0
- package/framework/css/utilities/borders.css +72 -0
- package/framework/css/utilities/colors.css +76 -0
- package/framework/css/utilities/container.css +46 -0
- package/framework/css/utilities/decorative.css +442 -0
- package/framework/css/utilities/display.css +257 -0
- package/framework/css/utilities/flexbox.css +80 -0
- package/framework/css/utilities/grid.css +69 -0
- package/framework/css/utilities/icons.css +534 -0
- package/framework/css/utilities/lists.css +190 -0
- package/framework/css/utilities/spacing.css +167 -0
- package/framework/css/utilities/tables.css +81 -0
- package/framework/css/utilities/typography.css +159 -0
- package/framework/css/utilities/visibility.css +117 -0
- package/framework/docs/COURSE_AUTHORING_GUIDE.md +1773 -0
- package/framework/docs/COURSE_OUTLINE_GUIDE.md +725 -0
- package/framework/docs/COURSE_OUTLINE_TEMPLATE.md +161 -0
- package/framework/docs/DATA_MODEL.md +409 -0
- package/framework/docs/FRAMEWORK_GUIDE.md +1088 -0
- package/framework/docs/USER_GUIDE.md +583 -0
- package/framework/docs/examples/cloudflare-channel-relay.js +169 -0
- package/framework/docs/examples/cloudflare-data-worker.js +102 -0
- package/framework/docs/examples/cloudflare-error-worker.js +228 -0
- package/framework/index.html +175 -0
- package/framework/js/app/AppActions.js +410 -0
- package/framework/js/app/AppState.js +225 -0
- package/framework/js/app/AppUI.js +616 -0
- package/framework/js/assessment/AssessmentActions.js +615 -0
- package/framework/js/assessment/AssessmentFactory.js +471 -0
- package/framework/js/assessment/AssessmentState.js +322 -0
- package/framework/js/assessment/AssessmentUI.js +451 -0
- package/framework/js/automation/api-engagement.js +196 -0
- package/framework/js/automation/api-interactions.js +167 -0
- package/framework/js/automation/api.js +242 -0
- package/framework/js/automation/index.js +41 -0
- package/framework/js/components/interactions/drag-drop.js +884 -0
- package/framework/js/components/interactions/fill-in.js +535 -0
- package/framework/js/components/interactions/hotspot.js +702 -0
- package/framework/js/components/interactions/interaction-base.js +511 -0
- package/framework/js/components/interactions/likert.js +301 -0
- package/framework/js/components/interactions/matching.js +699 -0
- package/framework/js/components/interactions/multiple-choice.js +377 -0
- package/framework/js/components/interactions/numeric.js +271 -0
- package/framework/js/components/interactions/sequencing.js +423 -0
- package/framework/js/components/interactions/true-false.js +241 -0
- package/framework/js/components/ui-components/accordion.js +442 -0
- package/framework/js/components/ui-components/alert.js +88 -0
- package/framework/js/components/ui-components/audio-player.js +1193 -0
- package/framework/js/components/ui-components/callout.js +121 -0
- package/framework/js/components/ui-components/carousel.js +145 -0
- package/framework/js/components/ui-components/checkbox-group.js +87 -0
- package/framework/js/components/ui-components/checklist.js +40 -0
- package/framework/js/components/ui-components/collapse.js +114 -0
- package/framework/js/components/ui-components/comparison.js +30 -0
- package/framework/js/components/ui-components/conditional-display.js +150 -0
- package/framework/js/components/ui-components/content-image.js +41 -0
- package/framework/js/components/ui-components/dropdown.js +262 -0
- package/framework/js/components/ui-components/embed-frame.js +274 -0
- package/framework/js/components/ui-components/features.js +33 -0
- package/framework/js/components/ui-components/flip-card.js +230 -0
- package/framework/js/components/ui-components/form-validator.js +76 -0
- package/framework/js/components/ui-components/hero.js +49 -0
- package/framework/js/components/ui-components/index.js +12 -0
- package/framework/js/components/ui-components/interactive-image.js +235 -0
- package/framework/js/components/ui-components/interactive-timeline.js +285 -0
- package/framework/js/components/ui-components/intro-cards.js +35 -0
- package/framework/js/components/ui-components/lightbox.js +652 -0
- package/framework/js/components/ui-components/modal.js +386 -0
- package/framework/js/components/ui-components/notifications.js +145 -0
- package/framework/js/components/ui-components/progress.js +88 -0
- package/framework/js/components/ui-components/quote.js +41 -0
- package/framework/js/components/ui-components/stats.js +33 -0
- package/framework/js/components/ui-components/steps.js +41 -0
- package/framework/js/components/ui-components/tabs.js +255 -0
- package/framework/js/components/ui-components/timeline.js +42 -0
- package/framework/js/components/ui-components/toggle-group.js +73 -0
- package/framework/js/components/ui-components/tooltip.js +458 -0
- package/framework/js/components/ui-components/value-display.js +133 -0
- package/framework/js/components/ui-components/video-player.js +686 -0
- package/framework/js/core/component-catalog.js +121 -0
- package/framework/js/core/event-bus.js +178 -0
- package/framework/js/core/interaction-catalog.js +149 -0
- package/framework/js/dev/runtime-linter.js +1725 -0
- package/framework/js/drivers/cmi5-driver.js +768 -0
- package/framework/js/drivers/driver-factory.js +77 -0
- package/framework/js/drivers/driver-interface.js +110 -0
- package/framework/js/drivers/http-driver-base.js +241 -0
- package/framework/js/drivers/lti-driver.js +508 -0
- package/framework/js/drivers/proxy-driver.js +444 -0
- package/framework/js/drivers/scorm-12-driver.js +560 -0
- package/framework/js/drivers/scorm-2004-driver.js +775 -0
- package/framework/js/drivers/scorm-driver-base.js +112 -0
- package/framework/js/engagement/engagement-manager.js +404 -0
- package/framework/js/engagement/engagement-progress.js +191 -0
- package/framework/js/engagement/engagement-trackers.js +215 -0
- package/framework/js/engagement/requirement-strategies.js +268 -0
- package/framework/js/main.js +727 -0
- package/framework/js/managers/accessibility-manager.js +499 -0
- package/framework/js/managers/assessment-manager.js +230 -0
- package/framework/js/managers/audio-manager.js +944 -0
- package/framework/js/managers/comment-manager.js +88 -0
- package/framework/js/managers/flag-manager.js +86 -0
- package/framework/js/managers/interaction-manager.js +254 -0
- package/framework/js/managers/interaction-registry.js +96 -0
- package/framework/js/managers/objective-manager.js +423 -0
- package/framework/js/managers/score-manager.js +441 -0
- package/framework/js/managers/video-manager.js +536 -0
- package/framework/js/navigation/Breadcrumbs.js +234 -0
- package/framework/js/navigation/NavigationActions.js +1132 -0
- package/framework/js/navigation/NavigationState.js +276 -0
- package/framework/js/navigation/NavigationUI.js +574 -0
- package/framework/js/navigation/document-gallery.js +357 -0
- package/framework/js/navigation/navigation-helpers.js +175 -0
- package/framework/js/navigation/navigation-validators.js +174 -0
- package/framework/js/state/index.js +8 -0
- package/framework/js/state/lms-connection.js +482 -0
- package/framework/js/state/lms-error-utils.js +58 -0
- package/framework/js/state/state-commits.js +200 -0
- package/framework/js/state/state-domains.js +86 -0
- package/framework/js/state/state-manager.js +502 -0
- package/framework/js/state/state-validation.js +311 -0
- package/framework/js/state/transaction-log.js +41 -0
- package/framework/js/state/xapi-statement-service.js +325 -0
- package/framework/js/utilities/access-control.js +99 -0
- package/framework/js/utilities/breakpoint-manager.js +315 -0
- package/framework/js/utilities/canvas-slide.js +35 -0
- package/framework/js/utilities/conditional-display.js +388 -0
- package/framework/js/utilities/course-channel.js +214 -0
- package/framework/js/utilities/course-helpers.js +420 -0
- package/framework/js/utilities/data-reporter.js +273 -0
- package/framework/js/utilities/error-reporter.js +313 -0
- package/framework/js/utilities/hotspot-helper.js +341 -0
- package/framework/js/utilities/icons.js +348 -0
- package/framework/js/utilities/logger.js +92 -0
- package/framework/js/utilities/markdown-renderer.js +45 -0
- package/framework/js/utilities/scroll-tracker.js +68 -0
- package/framework/js/utilities/ui-initializer.js +146 -0
- package/framework/js/utilities/utilities.js +293 -0
- package/framework/js/utilities/view-manager.js +227 -0
- package/framework/js/validation/html-validators.js +422 -0
- package/framework/js/validation/scorm-validators.js +438 -0
- package/framework/js/vendor/pipwerks.js +931 -0
- package/framework/scripts/generate-narration.js +629 -0
- package/framework/scripts/tts-providers/azure-provider.js +178 -0
- package/framework/scripts/tts-providers/base-provider.js +81 -0
- package/framework/scripts/tts-providers/deepgram-provider.js +135 -0
- package/framework/scripts/tts-providers/elevenlabs-provider.js +148 -0
- package/framework/scripts/tts-providers/google-provider.js +272 -0
- package/framework/scripts/tts-providers/index.js +158 -0
- package/framework/scripts/tts-providers/openai-provider.js +143 -0
- package/framework/version.json +63 -0
- package/lib/authoring-api.js +919 -0
- package/lib/build-linter.js +450 -0
- package/lib/build-packaging.js +186 -0
- package/lib/build.js +88 -0
- package/lib/cloud.js +691 -0
- package/lib/convert.js +341 -0
- package/lib/course-parser.js +936 -0
- package/lib/course-writer.js +258 -0
- package/lib/create.js +248 -0
- package/lib/css-index.js +237 -0
- package/lib/dev.js +51 -0
- package/lib/export-content.js +1246 -0
- package/lib/headless-browser.js +413 -0
- package/lib/import.js +377 -0
- package/lib/index.js +80 -0
- package/lib/info.js +79 -0
- package/lib/interaction-formatters.js +568 -0
- package/lib/manifest/cmi5-manifest.js +63 -0
- package/lib/manifest/lti-tool-config.js +53 -0
- package/lib/manifest/manifest-factory.js +99 -0
- package/lib/manifest/scorm-12-manifest.js +61 -0
- package/lib/manifest/scorm-2004-manifest.js +94 -0
- package/lib/manifest/scorm-proxy-manifest.js +104 -0
- package/lib/manifest-parser.js +96 -0
- package/lib/mcp-prompts.js +753 -0
- package/lib/mcp-server.js +316 -0
- package/lib/narration.js +53 -0
- package/lib/pdf-structure.js +142 -0
- package/lib/preview-export.js +231 -0
- package/lib/preview-routes-api.js +662 -0
- package/lib/preview-routes-editing.js +159 -0
- package/lib/preview-routes-lms.js +230 -0
- package/lib/preview-server.js +564 -0
- package/lib/project-utils.js +269 -0
- package/lib/proxy-templates/proxy.html +68 -0
- package/lib/proxy-templates/scorm-bridge.js +112 -0
- package/lib/scaffold.js +193 -0
- package/lib/schema-extractor.js +361 -0
- package/lib/slide-source-editor.js +586 -0
- package/lib/stub-player/app-viewer.js +195 -0
- package/lib/stub-player/app.js +370 -0
- package/lib/stub-player/catalog-panel.js +312 -0
- package/lib/stub-player/config-panel.js +1303 -0
- package/lib/stub-player/content-generator.js +586 -0
- package/lib/stub-player/content-viewer.js +173 -0
- package/lib/stub-player/debug-panel.js +420 -0
- package/lib/stub-player/edit-mode.js +922 -0
- package/lib/stub-player/edit-utils.js +400 -0
- package/lib/stub-player/header-bar.js +354 -0
- package/lib/stub-player/interaction-editor.js +210 -0
- package/lib/stub-player/interactions-panel.js +565 -0
- package/lib/stub-player/lms-api.js +1094 -0
- package/lib/stub-player/login-screen.js +74 -0
- package/lib/stub-player/outline-mode.js +689 -0
- package/lib/stub-player/styles/_assessments-panel.css +245 -0
- package/lib/stub-player/styles/_base.css +89 -0
- package/lib/stub-player/styles/_catalog-icons.css +96 -0
- package/lib/stub-player/styles/_catalog-panel.css +291 -0
- package/lib/stub-player/styles/_config-panel.css +636 -0
- package/lib/stub-player/styles/_content-viewer.css +834 -0
- package/lib/stub-player/styles/_debug-panel.css +576 -0
- package/lib/stub-player/styles/_edit-mode.css +128 -0
- package/lib/stub-player/styles/_header-bar.css +343 -0
- package/lib/stub-player/styles/_interaction-editor.css +140 -0
- package/lib/stub-player/styles/_interactions-panel.css +1038 -0
- package/lib/stub-player/styles/_login-screen.css +102 -0
- package/lib/stub-player/styles/_outline-mode.css +752 -0
- package/lib/stub-player/styles.css +15 -0
- package/lib/stub-player.js +160 -0
- package/lib/test-data-reporting.js +176 -0
- package/lib/test-error-reporting.js +146 -0
- package/lib/token.js +86 -0
- package/lib/upgrade.js +257 -0
- package/lib/validation-rules.js +517 -0
- package/lib/vite-plugin-content-discovery.js +296 -0
- package/package.json +108 -0
- package/schemas/XMLSchema.dtd +402 -0
- package/schemas/adlcp_v1p3.xsd +111 -0
- package/schemas/adlnav_v1p3.xsd +61 -0
- package/schemas/adlseq_v1p3.xsd +93 -0
- package/schemas/common/anyElement.xsd +27 -0
- package/schemas/common/dataTypes.xsd +138 -0
- package/schemas/common/elementNames.xsd +767 -0
- package/schemas/common/elementTypes.xsd +786 -0
- package/schemas/common/rootElement.xsd +31 -0
- package/schemas/common/vocabTypes.xsd +345 -0
- package/schemas/common/vocabValues.xsd +257 -0
- package/schemas/datatypes.dtd +203 -0
- package/schemas/ims_xml.xsd +35 -0
- package/schemas/imscp_v1p1.xsd +368 -0
- package/schemas/imsss_v1p0.xsd +67 -0
- package/schemas/imsss_v1p0auxresource.xsd +19 -0
- package/schemas/imsss_v1p0control.xsd +20 -0
- package/schemas/imsss_v1p0delivery.xsd +17 -0
- package/schemas/imsss_v1p0limit.xsd +47 -0
- package/schemas/imsss_v1p0objective.xsd +67 -0
- package/schemas/imsss_v1p0random.xsd +16 -0
- package/schemas/imsss_v1p0rollup.xsd +46 -0
- package/schemas/imsss_v1p0seqrule.xsd +108 -0
- package/schemas/imsss_v1p0util.xsd +94 -0
- package/schemas/license.txt +17 -0
- package/schemas/lom.xsd +102 -0
- package/schemas/lomCustom.xsd +62 -0
- package/schemas/lomLoose.xsd +62 -0
- package/schemas/lomStrict.xsd +62 -0
- package/schemas/xml.xsd +81 -0
- package/template/.env.example +92 -0
- package/template/course/assets/audio/example-intro.mp3 +0 -0
- package/template/course/assets/audio/example-ui-demo--compact-player.mp3 +0 -0
- package/template/course/assets/audio/example-ui-demo--demo-modal.mp3 +0 -0
- package/template/course/assets/audio/example-ui-demo--full-player.mp3 +0 -0
- package/template/course/assets/docs/example_md_1.md +39 -0
- package/template/course/assets/docs/example_md_2.md +41 -0
- package/template/course/assets/docs/example_pdf_1_thumbnail.png +0 -0
- package/template/course/assets/docs/example_pdf_2.pdf +0 -0
- package/template/course/assets/images/course-architecture.svg +36 -0
- package/template/course/assets/images/logo.svg +14 -0
- package/template/course/assets/widgets/counter-demo.html +190 -0
- package/template/course/assets/widgets/gravity-painter.html +384 -0
- package/template/course/course-config.js +539 -0
- package/template/course/icons.js +19 -0
- package/template/course/interactions/PLUGIN_GUIDE.md +97 -0
- package/template/course/slides/example-course-structure.js +138 -0
- package/template/course/slides/example-final-exam.js +144 -0
- package/template/course/slides/example-finishing.js +127 -0
- package/template/course/slides/example-interactions-showcase.js +615 -0
- package/template/course/slides/example-preview-tour.js +129 -0
- package/template/course/slides/example-remedial.js +143 -0
- package/template/course/slides/example-summary.js +103 -0
- package/template/course/slides/example-ui-showcase.js +1805 -0
- package/template/course/slides/example-welcome.js +123 -0
- package/template/course/slides/example-workflow.js +140 -0
- package/template/course/theme.css +165 -0
- package/template/eslint.config.js +47 -0
- package/template/package.json +28 -0
- package/template/vite.config.js +339 -0
|
@@ -0,0 +1,615 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Interactions Showcase
|
|
3
|
+
* Demonstrates available interaction types with collapsible configuration examples.
|
|
4
|
+
* See COURSE_AUTHORING_GUIDE.md for full documentation.
|
|
5
|
+
*/
|
|
6
|
+
|
|
7
|
+
const { createDragDropQuestion, createFillInQuestion, createNumericQuestion, createMatchingQuestion, createMultipleChoiceQuestion, createTrueFalseQuestion } = CourseCode;
|
|
8
|
+
import courseArchitectureImg from '../assets/images/course-architecture.svg';
|
|
9
|
+
|
|
10
|
+
export const slide = {
|
|
11
|
+
render(_root, _context) {
|
|
12
|
+
const container = document.createElement('div');
|
|
13
|
+
container.innerHTML = `
|
|
14
|
+
<div class="stack-lg">
|
|
15
|
+
|
|
16
|
+
<header class="slide-header">
|
|
17
|
+
<h1>Interactions Showcase</h1>
|
|
18
|
+
<p>Explore the interaction types built into CourseCode. Click "View Config" to see how each is configured.</p>
|
|
19
|
+
</header>
|
|
20
|
+
|
|
21
|
+
<div id="workshop-tabs" data-component="tabs">
|
|
22
|
+
<div class="tab-list" role="tablist">
|
|
23
|
+
<button class="tab-button active" data-action="select-tab" data-tab="dragdrop-content" role="tab" aria-selected="true" aria-controls="dragdrop-content">
|
|
24
|
+
🧩 Drag & Drop
|
|
25
|
+
</button>
|
|
26
|
+
<button class="tab-button" data-action="select-tab" data-tab="matching-content" role="tab" aria-selected="false" aria-controls="matching-content">
|
|
27
|
+
🔗 Matching
|
|
28
|
+
</button>
|
|
29
|
+
<button class="tab-button" data-action="select-tab" data-tab="choice-content" role="tab" aria-selected="false" aria-controls="choice-content">
|
|
30
|
+
☑️ Choice
|
|
31
|
+
</button>
|
|
32
|
+
<button class="tab-button" data-action="select-tab" data-tab="textinput-content" role="tab" aria-selected="false" aria-controls="textinput-content">
|
|
33
|
+
✍️ Text Input
|
|
34
|
+
</button>
|
|
35
|
+
<button class="tab-button" data-action="select-tab" data-tab="diagram-content" role="tab" aria-selected="false" aria-controls="diagram-content">
|
|
36
|
+
🖼️ Interactive Image
|
|
37
|
+
</button>
|
|
38
|
+
</div>
|
|
39
|
+
|
|
40
|
+
<div id="dragdrop-content" class="tab-content active" role="tabpanel">
|
|
41
|
+
<div class="card no-hover stack-md">
|
|
42
|
+
<div>
|
|
43
|
+
<h2 class="text-xl font-bold">Drag and Drop</h2>
|
|
44
|
+
<p>Learners drag items into categorized drop zones. Great for sorting, matching, and classification activities:</p>
|
|
45
|
+
</div>
|
|
46
|
+
<div id="dragdrop-interaction"><div class="interaction drag-drop" data-interaction-id="system-architecture-dd">
|
|
47
|
+
<div class="question-prompt">
|
|
48
|
+
<h3>Organize these d elements into their proper categories</h3>
|
|
49
|
+
</div>
|
|
50
|
+
<div class="drag-drop-container">
|
|
51
|
+
<div class="drag-items" data-droppable="true" style="min-height: 428px;">
|
|
52
|
+
<h4>Drag these items:</h4>
|
|
53
|
+
|
|
54
|
+
<div class="drag-item" draggable="true" data-item-id="intro-slide" data-index="0" tabindex="0" role="button" aria-grabbed="false" data-testid="system-architecture-dd-drag-item-intro-slide">
|
|
55
|
+
Welcome Slide
|
|
56
|
+
</div>
|
|
57
|
+
|
|
58
|
+
<div class="drag-item" draggable="true" data-item-id="content-slide" data-index="1" tabindex="0" role="button" aria-grabbed="false" data-testid="system-architecture-dd-drag-item-content-slide">
|
|
59
|
+
Learning Content
|
|
60
|
+
</div>
|
|
61
|
+
|
|
62
|
+
<div class="drag-item" draggable="true" data-item-id="quiz" data-index="2" tabindex="0" role="button" aria-grabbed="false" data-testid="system-architecture-dd-drag-item-quiz">
|
|
63
|
+
Knowledge Check
|
|
64
|
+
</div>
|
|
65
|
+
|
|
66
|
+
<div class="drag-item" draggable="true" data-item-id="assessment" data-index="3" tabindex="0" role="button" aria-grabbed="false" data-testid="system-architecture-dd-drag-item-assessment">
|
|
67
|
+
Final Assessment
|
|
68
|
+
</div>
|
|
69
|
+
|
|
70
|
+
<div class="drag-item" draggable="true" data-item-id="summary" data-index="4" tabindex="0" role="button" aria-grabbed="false" data-testid="system-architecture-dd-drag-item-summary">
|
|
71
|
+
Course Summary
|
|
72
|
+
</div>
|
|
73
|
+
|
|
74
|
+
</div>
|
|
75
|
+
<div class="drop-zones">
|
|
76
|
+
<h4>Drop into correct zones:</h4>
|
|
77
|
+
|
|
78
|
+
<div class="drop-zone" data-zone-id="opening" data-accepts="intro-slide" data-max-items="1" role="region" aria-label="Opening" tabindex="0" data-testid="system-architecture-dd-drop-zone-opening">
|
|
79
|
+
<div class="zone-label">Opening</div>
|
|
80
|
+
<div class="zone-content">
|
|
81
|
+
</div>
|
|
82
|
+
</div>
|
|
83
|
+
|
|
84
|
+
<div class="drop-zone" data-zone-id="body" data-accepts="content-slide,quiz" data-max-items="2" role="region" aria-label="Course Body" tabindex="0" data-testid="system-architecture-dd-drop-zone-body">
|
|
85
|
+
<div class="zone-label">Course Body</div>
|
|
86
|
+
<div class="zone-content">
|
|
87
|
+
</div>
|
|
88
|
+
</div>
|
|
89
|
+
|
|
90
|
+
<div class="drop-zone" data-zone-id="closing" data-accepts="assessment,summary" data-max-items="2" role="region" aria-label="Closing" tabindex="0" data-testid="system-architecture-dd-drop-zone-closing">
|
|
91
|
+
<div class="zone-label">Closing</div>
|
|
92
|
+
<div class="zone-content">
|
|
93
|
+
</div>
|
|
94
|
+
</div>
|
|
95
|
+
|
|
96
|
+
</div>
|
|
97
|
+
</div>
|
|
98
|
+
<div class="flex flex-wrap justify-center gap-3" data-testid="system-architecture-dd-controls"><button type="button" class="btn btn-success" data-action="check-answer" data-interaction="system-architecture-dd" data-testid="system-architecture-dd-check-answer">Check Answer</button><button type="button" class="btn btn-reset" data-action="reset" data-interaction="system-architecture-dd" data-testid="system-architecture-dd-reset">Reset</button></div>
|
|
99
|
+
<div class="overall-feedback" id="system-architecture-dd_overall_feedback" aria-live="polite"></div>
|
|
100
|
+
</div></div>
|
|
101
|
+
|
|
102
|
+
<div data-component="collapse" class="mt-3">
|
|
103
|
+
<button class="btn btn-sm btn-secondary collapse-trigger" data-action="toggle-collapse" aria-controls="code-dragdrop-config" aria-expanded="false">
|
|
104
|
+
<span class="collapse-text-show">Show Code Example</span>
|
|
105
|
+
<span class="collapse-text-hide">Hide Code Example</span>
|
|
106
|
+
</button>
|
|
107
|
+
<div class="collapse-panel mt-3" id="code-dragdrop-config">
|
|
108
|
+
<pre class="bg-gray-100 p-3 rounded text-xs overflow-x-auto"><code>// Drag and Drop configuration
|
|
109
|
+
{
|
|
110
|
+
id: 'course-sections-dd',
|
|
111
|
+
prompt: 'Organize elements into categories',
|
|
112
|
+
items: [
|
|
113
|
+
{ id: 'item-1', content: 'Item text' }
|
|
114
|
+
],
|
|
115
|
+
dropZones: [
|
|
116
|
+
{ id: 'zone-1', label: 'Zone Name', accepts: ['item-1'], maxItems: 1 }
|
|
117
|
+
]
|
|
118
|
+
}</code></pre>
|
|
119
|
+
</div>
|
|
120
|
+
</div>
|
|
121
|
+
</div>
|
|
122
|
+
</div>
|
|
123
|
+
|
|
124
|
+
<div id="matching-content" class="tab-content" role="tabpanel" hidden>
|
|
125
|
+
<div class="card no-hover stack-md">
|
|
126
|
+
<div>
|
|
127
|
+
<h2 class="text-xl font-bold">Matching</h2>
|
|
128
|
+
<p>Connect items from two columns. Click an item on the left, then its match on the right:</p>
|
|
129
|
+
</div>
|
|
130
|
+
<div id="matching-interaction"><div class="interaction matching-interaction matching-deferred" data-interaction-id="lms-standards-matching" data-feedback-mode="deferred">
|
|
131
|
+
<div class="question-prompt">
|
|
132
|
+
<h3>Match each LMS standard with its description</h3>
|
|
133
|
+
<p class="matching-instruction">Click an item on the left, then click its match on the right.</p>
|
|
134
|
+
</div>
|
|
135
|
+
<div class="matching-container">
|
|
136
|
+
<div class="matching-column matching-items">
|
|
137
|
+
<h4 class="matching-column-header">Items</h4>
|
|
138
|
+
<div class="matching-list">
|
|
139
|
+
|
|
140
|
+
<button type="button" class="matching-item selected" data-item-id="scorm12" data-testid="lms-standards-matching-match-item-scorm12" aria-label="Match item: SCORM 1.2" style="--selection-color: #9333ea;">
|
|
141
|
+
<span class="matching-item-text">SCORM 1.2</span>
|
|
142
|
+
|
|
143
|
+
</button>
|
|
144
|
+
|
|
145
|
+
<button type="button" class="matching-item" data-item-id="scorm2004" data-testid="lms-standards-matching-match-item-scorm2004" aria-label="Match item: SCORM 2004">
|
|
146
|
+
<span class="matching-item-text">SCORM 2004</span>
|
|
147
|
+
|
|
148
|
+
</button>
|
|
149
|
+
|
|
150
|
+
<button type="button" class="matching-item" data-item-id="cmi5" data-testid="lms-standards-matching-match-item-cmi5" aria-label="Match item: cmi5">
|
|
151
|
+
<span class="matching-item-text">cmi5</span>
|
|
152
|
+
|
|
153
|
+
</button>
|
|
154
|
+
|
|
155
|
+
<button type="button" class="matching-item" data-item-id="xapi" data-testid="lms-standards-matching-match-item-xapi" aria-label="Match item: xAPI">
|
|
156
|
+
<span class="matching-item-text">xAPI</span>
|
|
157
|
+
|
|
158
|
+
</button>
|
|
159
|
+
|
|
160
|
+
</div>
|
|
161
|
+
</div>
|
|
162
|
+
<div class="matching-column matching-targets">
|
|
163
|
+
<h4 class="matching-column-header">Matches</h4>
|
|
164
|
+
<div class="matching-list">
|
|
165
|
+
|
|
166
|
+
<button type="button" class="matching-target" data-match-id="cmi5" data-testid="lms-standards-matching-match-target-cmi5" aria-label="Match target: xAPI-based">
|
|
167
|
+
<span class="matching-target-text">xAPI-based</span>
|
|
168
|
+
<span class="matching-connection-indicator" aria-hidden="true"></span>
|
|
169
|
+
</button>
|
|
170
|
+
|
|
171
|
+
<button type="button" class="matching-target" data-match-id="scorm12" data-testid="lms-standards-matching-match-target-scorm12" aria-label="Match target: Legacy standard">
|
|
172
|
+
<span class="matching-target-text">Legacy standard</span>
|
|
173
|
+
<span class="matching-connection-indicator" aria-hidden="true"></span>
|
|
174
|
+
</button>
|
|
175
|
+
|
|
176
|
+
<button type="button" class="matching-target" data-match-id="xapi" data-testid="lms-standards-matching-match-target-xapi" aria-label="Match target: Activity streams">
|
|
177
|
+
<span class="matching-target-text">Activity streams</span>
|
|
178
|
+
<span class="matching-connection-indicator" aria-hidden="true"></span>
|
|
179
|
+
</button>
|
|
180
|
+
|
|
181
|
+
<button type="button" class="matching-target" data-match-id="scorm2004" data-testid="lms-standards-matching-match-target-scorm2004" aria-label="Match target: Adds sequencing">
|
|
182
|
+
<span class="matching-target-text">Adds sequencing</span>
|
|
183
|
+
<span class="matching-connection-indicator" aria-hidden="true"></span>
|
|
184
|
+
</button>
|
|
185
|
+
|
|
186
|
+
</div>
|
|
187
|
+
</div>
|
|
188
|
+
</div>
|
|
189
|
+
<div class="flex flex-wrap justify-center gap-3" data-testid="lms-standards-matching-controls"><button type="button" class="btn btn-success" data-action="check-answer" data-interaction="lms-standards-matching" data-testid="lms-standards-matching-check-answer">Check Answer</button><button type="button" class="btn btn-reset" data-action="reset" data-interaction="lms-standards-matching" data-testid="lms-standards-matching-reset">Reset</button></div>
|
|
190
|
+
<div id="lms-standards-matching_feedback" class="feedback" aria-live="polite" data-testid="lms-standards-matching-feedback"></div>
|
|
191
|
+
</div></div>
|
|
192
|
+
|
|
193
|
+
<div data-component="collapse" class="mt-3">
|
|
194
|
+
<button class="btn btn-sm btn-secondary collapse-trigger" data-action="toggle-collapse" aria-controls="code-matching-config" aria-expanded="false">
|
|
195
|
+
<span class="collapse-text-show">Show Code Example</span>
|
|
196
|
+
<span class="collapse-text-hide">Hide Code Example</span>
|
|
197
|
+
</button>
|
|
198
|
+
<div class="collapse-panel mt-3" id="code-matching-config">
|
|
199
|
+
<pre class="bg-gray-100 p-3 rounded text-xs overflow-x-auto"><code>// Matching configuration
|
|
200
|
+
{
|
|
201
|
+
id: 'lms-standards-matching',
|
|
202
|
+
prompt: 'Match each item with its description',
|
|
203
|
+
pairs: [
|
|
204
|
+
{ id: 'item1', text: 'Item 1', match: 'Description 1' },
|
|
205
|
+
{ id: 'item2', text: 'Item 2', match: 'Description 2' }
|
|
206
|
+
],
|
|
207
|
+
feedbackMode: 'deferred'
|
|
208
|
+
}</code></pre>
|
|
209
|
+
</div>
|
|
210
|
+
</div>
|
|
211
|
+
</div>
|
|
212
|
+
</div>
|
|
213
|
+
|
|
214
|
+
<div id="choice-content" class="tab-content" role="tabpanel" hidden>
|
|
215
|
+
<div class="stack-lg">
|
|
216
|
+
<div class="card no-hover stack-md">
|
|
217
|
+
<div>
|
|
218
|
+
<h2 class="text-xl font-bold">Multiple Choice</h2>
|
|
219
|
+
<p>Single-select question with immediate feedback. Great for knowledge checks:</p>
|
|
220
|
+
</div>
|
|
221
|
+
<div id="multiple-choice-interaction"></div>
|
|
222
|
+
</div>
|
|
223
|
+
|
|
224
|
+
<div class="card no-hover stack-md">
|
|
225
|
+
<div>
|
|
226
|
+
<h2 class="text-xl font-bold">True / False</h2>
|
|
227
|
+
<p>Simple binary choice with explanation feedback:</p>
|
|
228
|
+
</div>
|
|
229
|
+
<div id="true-false-interaction"></div>
|
|
230
|
+
</div>
|
|
231
|
+
|
|
232
|
+
<div data-component="collapse" class="mt-3">
|
|
233
|
+
<button class="btn btn-sm btn-secondary collapse-trigger" data-action="toggle-collapse" aria-controls="code-choice-config" aria-expanded="false">
|
|
234
|
+
<span class="collapse-text-show">Show Code Example</span>
|
|
235
|
+
<span class="collapse-text-hide">Hide Code Example</span>
|
|
236
|
+
</button>
|
|
237
|
+
<div class="collapse-panel mt-3" id="code-choice-config">
|
|
238
|
+
<pre class="bg-gray-100 p-3 rounded text-xs overflow-x-auto"><code>// Multiple Choice configuration
|
|
239
|
+
{
|
|
240
|
+
id: 'question-mc',
|
|
241
|
+
prompt: 'Question text?',
|
|
242
|
+
correctAnswer: 'b',
|
|
243
|
+
choices: [
|
|
244
|
+
{ value: 'a', text: 'Option A', feedback: 'Wrong' },
|
|
245
|
+
{ value: 'b', text: 'Option B', correct: true, feedback: 'Correct!' }
|
|
246
|
+
]
|
|
247
|
+
}
|
|
248
|
+
|
|
249
|
+
// True/False configuration
|
|
250
|
+
{
|
|
251
|
+
id: 'question-tf',
|
|
252
|
+
prompt: 'Statement to evaluate.',
|
|
253
|
+
correctAnswer: true,
|
|
254
|
+
feedback: { correct: 'Right!', incorrect: 'Wrong.' }
|
|
255
|
+
}</code></pre>
|
|
256
|
+
</div>
|
|
257
|
+
</div>
|
|
258
|
+
</div>
|
|
259
|
+
</div>
|
|
260
|
+
|
|
261
|
+
<div id="textinput-content" class="tab-content" role="tabpanel" hidden>
|
|
262
|
+
<div class="stack-lg">
|
|
263
|
+
<div class="card no-hover stack-md">
|
|
264
|
+
<div>
|
|
265
|
+
<h2 class="text-xl font-bold">Simple Text Input</h2>
|
|
266
|
+
<p>Short answer question with fuzzy matching. Accepts multiple correct answers, whitespace normalization, and typo tolerance:</p>
|
|
267
|
+
</div>
|
|
268
|
+
<div id="simple-text-interaction"></div>
|
|
269
|
+
</div>
|
|
270
|
+
|
|
271
|
+
<div class="card no-hover stack-md">
|
|
272
|
+
<div>
|
|
273
|
+
<h2 class="text-xl font-bold">Q&A Stacked Layout</h2>
|
|
274
|
+
<p>Traditional question-and-answer format. Use <code>prompt</code> instead of <code>template</code>:</p>
|
|
275
|
+
</div>
|
|
276
|
+
<div id="stacked-text-interaction"></div>
|
|
277
|
+
</div>
|
|
278
|
+
|
|
279
|
+
<div class="card no-hover stack-md">
|
|
280
|
+
<div>
|
|
281
|
+
<h2 class="text-xl font-bold">Fill in the Blank (Cloze)</h2>
|
|
282
|
+
<p>Inline text inputs within flowing content using {{placeholder}} syntax:</p>
|
|
283
|
+
</div>
|
|
284
|
+
<div id="fillin-interaction"></div>
|
|
285
|
+
</div>
|
|
286
|
+
|
|
287
|
+
<div class="card no-hover stack-md">
|
|
288
|
+
<div>
|
|
289
|
+
<h2 class="text-xl font-bold">Numeric Input</h2>
|
|
290
|
+
<p>Number entry with tolerance ranges. Perfect for calculations and measurements:</p>
|
|
291
|
+
</div>
|
|
292
|
+
<div id="numeric-interaction"></div>
|
|
293
|
+
</div>
|
|
294
|
+
|
|
295
|
+
<div data-component="collapse" class="mt-3">
|
|
296
|
+
<button class="btn btn-sm btn-secondary collapse-trigger" data-action="toggle-collapse" aria-controls="code-textinput-config" aria-expanded="false">
|
|
297
|
+
<span class="collapse-text-show">Show Code Example</span>
|
|
298
|
+
<span class="collapse-text-hide">Hide Code Example</span>
|
|
299
|
+
</button>
|
|
300
|
+
<div class="collapse-panel mt-3" id="code-textinput-config">
|
|
301
|
+
<pre class="bg-gray-100 p-3 rounded text-xs overflow-x-auto"><code>// Fill-in-the-blank (cloze) configuration
|
|
302
|
+
{
|
|
303
|
+
id: 'fillin-question',
|
|
304
|
+
template: 'Complete the sentence: {{blank1}} is the answer.',
|
|
305
|
+
blanks: {
|
|
306
|
+
blank1: { correct: 'answer', placeholder: 'type here...', typoTolerance: 1 }
|
|
307
|
+
}
|
|
308
|
+
}
|
|
309
|
+
|
|
310
|
+
// Numeric input configuration
|
|
311
|
+
{
|
|
312
|
+
id: 'numeric-question',
|
|
313
|
+
prompt: 'Calculate the result:',
|
|
314
|
+
correctRange: { exact: 42 },
|
|
315
|
+
tolerance: 0,
|
|
316
|
+
units: 'items'
|
|
317
|
+
}</code></pre>
|
|
318
|
+
</div>
|
|
319
|
+
</div>
|
|
320
|
+
</div>
|
|
321
|
+
</div>
|
|
322
|
+
|
|
323
|
+
<div id="diagram-content" class="tab-content" role="tabpanel" hidden>
|
|
324
|
+
<div class="card no-hover stack-md">
|
|
325
|
+
<div>
|
|
326
|
+
<h2 class="text-xl font-bold">Interactive Image with Hotspots</h2>
|
|
327
|
+
<p>Click hotspots on images to reveal content. Links to accordions for detailed information:</p>
|
|
328
|
+
</div>
|
|
329
|
+
|
|
330
|
+
<div class="grid gap-4" style="align-items: start;">
|
|
331
|
+
<!-- Interactive Image -->
|
|
332
|
+
<div
|
|
333
|
+
class="col-8 interactive-image-container"
|
|
334
|
+
data-component="interactive-image"
|
|
335
|
+
data-accordion-id="system-accordion"
|
|
336
|
+
id="system-diagram-interactive"
|
|
337
|
+
>
|
|
338
|
+
<img src="${courseArchitectureImg}" alt="Course Architecture Diagram" class="interactive-image-img">
|
|
339
|
+
|
|
340
|
+
<!-- Hotspots -->
|
|
341
|
+
<button
|
|
342
|
+
class="interactive-image-hotspot"
|
|
343
|
+
style="top: 50.0%; left: 15.6%; width: 150px; height: 200px;"
|
|
344
|
+
data-hotspot-id="power-unit"
|
|
345
|
+
data-shape="rect"
|
|
346
|
+
data-color="danger"
|
|
347
|
+
data-border-style="transparent"
|
|
348
|
+
data-border-style-active="dashed"
|
|
349
|
+
data-fill="transparent"
|
|
350
|
+
data-fill-active="semi"
|
|
351
|
+
data-transparency="90"
|
|
352
|
+
data-scale="false"
|
|
353
|
+
data-mark-viewed="false"
|
|
354
|
+
aria-label="Slides & Content"
|
|
355
|
+
></button>
|
|
356
|
+
|
|
357
|
+
<button
|
|
358
|
+
class="interactive-image-hotspot"
|
|
359
|
+
style="top: 50%; left: 50%;"
|
|
360
|
+
data-hotspot-id="control-module"
|
|
361
|
+
data-shape="circle"
|
|
362
|
+
data-fill="solid"
|
|
363
|
+
data-border-style="none"
|
|
364
|
+
data-mark-viewed="true"
|
|
365
|
+
aria-label="CourseCode Framework"
|
|
366
|
+
>2</button>
|
|
367
|
+
|
|
368
|
+
<button
|
|
369
|
+
class="interactive-image-hotspot"
|
|
370
|
+
style="top: 37.5%; left: 84.4%;"
|
|
371
|
+
data-hotspot-id="output-interface"
|
|
372
|
+
data-shape="rounded"
|
|
373
|
+
data-mark-viewed="false"
|
|
374
|
+
aria-label="LMS Package"
|
|
375
|
+
>3</button>
|
|
376
|
+
</div>
|
|
377
|
+
|
|
378
|
+
<!-- Accordion -->
|
|
379
|
+
<div id="system-accordion" class="col-4" data-component="accordion" data-mode="single">
|
|
380
|
+
<div class="accordion-item">
|
|
381
|
+
<button class="accordion-button collapsed" data-panel="power-unit" data-action="toggle-accordion-panel">
|
|
382
|
+
<span class="accordion-title">1. Slides & Content</span>
|
|
383
|
+
<span class="accordion-icon"></span>
|
|
384
|
+
</button>
|
|
385
|
+
<div id="system-accordion-panel-power-unit" class="accordion-content" hidden>
|
|
386
|
+
<div class="accordion-body">
|
|
387
|
+
<p><strong>Location:</strong> course/slides/ directory</p>
|
|
388
|
+
<p><strong>Format:</strong> JavaScript modules with render() function</p>
|
|
389
|
+
<p><strong>Features:</strong> HTML templates, imports, narration exports</p>
|
|
390
|
+
</div>
|
|
391
|
+
</div>
|
|
392
|
+
</div>
|
|
393
|
+
|
|
394
|
+
<div class="accordion-item">
|
|
395
|
+
<button class="accordion-button collapsed" data-panel="control-module" data-action="toggle-accordion-panel">
|
|
396
|
+
<span class="accordion-title">2. CourseCode Framework</span>
|
|
397
|
+
<span class="accordion-icon"></span>
|
|
398
|
+
</button>
|
|
399
|
+
<div id="system-accordion-panel-control-module" class="accordion-content" hidden>
|
|
400
|
+
<div class="accordion-body">
|
|
401
|
+
<p><strong>Function:</strong> Manages navigation, tracking, and interactions</p>
|
|
402
|
+
<p><strong>Components:</strong> UI library, assessment system, LMS drivers</p>
|
|
403
|
+
<p><strong>Accessibility:</strong> WCAG 2.1 AA compliant</p>
|
|
404
|
+
</div>
|
|
405
|
+
</div>
|
|
406
|
+
</div>
|
|
407
|
+
|
|
408
|
+
<div class="accordion-item">
|
|
409
|
+
<button class="accordion-button collapsed" data-panel="output-interface" data-action="toggle-accordion-panel">
|
|
410
|
+
<span class="accordion-title">3. LMS Package</span>
|
|
411
|
+
<span class="accordion-icon"></span>
|
|
412
|
+
</button>
|
|
413
|
+
<div id="system-accordion-panel-output-interface" class="accordion-content" hidden>
|
|
414
|
+
<div class="accordion-body">
|
|
415
|
+
<p><strong>Output:</strong> ZIP file ready for LMS upload</p>
|
|
416
|
+
<p><strong>Standards:</strong> SCORM 1.2, SCORM 2004, cmi5</p>
|
|
417
|
+
<p><strong>Contents:</strong> HTML, JS, CSS, manifest, and assets</p>
|
|
418
|
+
</div>
|
|
419
|
+
</div>
|
|
420
|
+
</div>
|
|
421
|
+
</div>
|
|
422
|
+
</div>
|
|
423
|
+
|
|
424
|
+
<div data-component="collapse" class="mt-3">
|
|
425
|
+
<button class="btn btn-sm btn-secondary collapse-trigger" data-action="toggle-collapse" aria-controls="code-hotspot-config" aria-expanded="false">
|
|
426
|
+
<span class="collapse-text-show">Show Code Example</span>
|
|
427
|
+
<span class="collapse-text-hide">Hide Code Example</span>
|
|
428
|
+
</button>
|
|
429
|
+
<div class="collapse-panel mt-3" id="code-hotspot-config">
|
|
430
|
+
<pre class="bg-gray-100 p-3 rounded text-xs overflow-x-auto"><code><div data-component="interactive-image" data-accordion-id="my-accordion">
|
|
431
|
+
<img src="diagram.svg" alt="Diagram">
|
|
432
|
+
<button class="interactive-image-hotspot"
|
|
433
|
+
style="top: 50%; left: 15%;"
|
|
434
|
+
data-hotspot-id="section-1"
|
|
435
|
+
data-shape="circle"
|
|
436
|
+
data-fill="solid">1</button>
|
|
437
|
+
</div>
|
|
438
|
+
|
|
439
|
+
<div id="my-accordion" data-component="accordion">
|
|
440
|
+
<div class="accordion-item">
|
|
441
|
+
<button data-panel="section-1">Section 1</button>
|
|
442
|
+
<div id="my-accordion-panel-section-1">Content</div>
|
|
443
|
+
</div>
|
|
444
|
+
</div></code></pre>
|
|
445
|
+
</div>
|
|
446
|
+
</div>
|
|
447
|
+
</div>
|
|
448
|
+
</div>
|
|
449
|
+
</div>
|
|
450
|
+
|
|
451
|
+
</div>
|
|
452
|
+
`;
|
|
453
|
+
|
|
454
|
+
setupInteractions(container);
|
|
455
|
+
|
|
456
|
+
return container;
|
|
457
|
+
}
|
|
458
|
+
};
|
|
459
|
+
|
|
460
|
+
/**
|
|
461
|
+
* Sets up and initializes interactive components for the slide
|
|
462
|
+
* @param {HTMLElement} root - The root element for the slide
|
|
463
|
+
*/
|
|
464
|
+
function setupInteractions(root) {
|
|
465
|
+
// Drag and drop interaction setup
|
|
466
|
+
const dragContainer = root.querySelector('#dragdrop-interaction');
|
|
467
|
+
if (dragContainer) {
|
|
468
|
+
const dragDropConfig = {
|
|
469
|
+
id: 'system-architecture-dd',
|
|
470
|
+
label: 'Course Structure Drag-and-Drop',
|
|
471
|
+
prompt: 'Organize these course elements into their proper categories',
|
|
472
|
+
items: [
|
|
473
|
+
{ id: 'intro-slide', content: 'Welcome Slide' },
|
|
474
|
+
{ id: 'content-slide', content: 'Learning Content' },
|
|
475
|
+
{ id: 'quiz', content: 'Knowledge Check' },
|
|
476
|
+
{ id: 'assessment', content: 'Final Assessment' },
|
|
477
|
+
{ id: 'summary', content: 'Course Summary' }
|
|
478
|
+
],
|
|
479
|
+
dropZones: [
|
|
480
|
+
{ id: 'opening', label: 'Opening', accepts: ['intro-slide'], maxItems: 1 },
|
|
481
|
+
{ id: 'body', label: 'Course Body', accepts: ['content-slide', 'quiz'], maxItems: 2 },
|
|
482
|
+
{ id: 'closing', label: 'Closing', accepts: ['assessment', 'summary'], maxItems: 2 }
|
|
483
|
+
]
|
|
484
|
+
};
|
|
485
|
+
const dragDropQuestion = createDragDropQuestion(dragDropConfig);
|
|
486
|
+
dragDropQuestion.render(dragContainer);
|
|
487
|
+
}
|
|
488
|
+
|
|
489
|
+
// Matching interaction setup
|
|
490
|
+
const matchingContainer = root.querySelector('#matching-interaction');
|
|
491
|
+
if (matchingContainer) {
|
|
492
|
+
const matchingConfig = {
|
|
493
|
+
id: 'lms-standards-matching',
|
|
494
|
+
label: 'LMS Standards Matching',
|
|
495
|
+
prompt: 'Match each LMS standard with its description',
|
|
496
|
+
pairs: [
|
|
497
|
+
{ id: 'scorm12', text: 'SCORM 1.2', match: 'Legacy standard' },
|
|
498
|
+
{ id: 'scorm2004', text: 'SCORM 2004', match: 'Adds sequencing' },
|
|
499
|
+
{ id: 'cmi5', text: 'cmi5', match: 'xAPI-based' },
|
|
500
|
+
{ id: 'xapi', text: 'xAPI', match: 'Activity streams' }
|
|
501
|
+
],
|
|
502
|
+
feedbackMode: 'deferred'
|
|
503
|
+
};
|
|
504
|
+
const matchingQuestion = createMatchingQuestion(matchingConfig);
|
|
505
|
+
matchingQuestion.render(matchingContainer);
|
|
506
|
+
}
|
|
507
|
+
|
|
508
|
+
// Multiple Choice demo
|
|
509
|
+
const mcContainer = root.querySelector('#multiple-choice-interaction');
|
|
510
|
+
if (mcContainer) {
|
|
511
|
+
const mcQuestion = createMultipleChoiceQuestion({
|
|
512
|
+
id: 'framework-components-mc',
|
|
513
|
+
prompt: 'Which LMS standard introduced xAPI (Experience API)?',
|
|
514
|
+
correctAnswer: 'c',
|
|
515
|
+
choices: [
|
|
516
|
+
{ value: 'a', text: 'SCORM 1.2', feedback: 'SCORM 1.2 was released in 2001, before xAPI existed.' },
|
|
517
|
+
{ value: 'b', text: 'SCORM 2004', feedback: 'SCORM 2004 added sequencing but still used the CMI data model.' },
|
|
518
|
+
{ value: 'c', text: 'cmi5', correct: true, feedback: 'Correct! cmi5 is built on xAPI and was specifically designed for LMS use.' },
|
|
519
|
+
{ value: 'd', text: 'AICC', feedback: 'AICC was an early aviation industry standard, predating xAPI.' }
|
|
520
|
+
]
|
|
521
|
+
});
|
|
522
|
+
mcQuestion.render(mcContainer);
|
|
523
|
+
}
|
|
524
|
+
|
|
525
|
+
// True/False demo
|
|
526
|
+
const tfContainer = root.querySelector('#true-false-interaction');
|
|
527
|
+
if (tfContainer) {
|
|
528
|
+
const tfQuestion = createTrueFalseQuestion({
|
|
529
|
+
id: 'framework-components-tf',
|
|
530
|
+
prompt: 'SCORM courses can track learner progress across multiple websites.',
|
|
531
|
+
correctAnswer: false,
|
|
532
|
+
feedback: {
|
|
533
|
+
correct: 'Correct! SCORM requires courses to run within an LMS iframe and cannot track activity across external sites.',
|
|
534
|
+
incorrect: 'Not quite. SCORM is designed for single-origin LMS tracking and cannot follow learners to external websites.'
|
|
535
|
+
}
|
|
536
|
+
});
|
|
537
|
+
tfQuestion.render(tfContainer);
|
|
538
|
+
}
|
|
539
|
+
|
|
540
|
+
// Simple text input demo (single-input short answer)
|
|
541
|
+
const simpleTextContainer = root.querySelector('#simple-text-interaction');
|
|
542
|
+
if (simpleTextContainer) {
|
|
543
|
+
const simpleTextConfig = {
|
|
544
|
+
id: 'lms-standards-text',
|
|
545
|
+
label: 'LMS Standard Name',
|
|
546
|
+
template: 'Name one of the three major LMS standards: {{answer}}',
|
|
547
|
+
blanks: {
|
|
548
|
+
answer: {
|
|
549
|
+
correct: ['SCORM', 'cmi5', 'xAPI', 'Tin Can', 'Tin Can API', 'Experience API'],
|
|
550
|
+
placeholder: 'Enter standard name...',
|
|
551
|
+
typoTolerance: 1
|
|
552
|
+
}
|
|
553
|
+
}
|
|
554
|
+
};
|
|
555
|
+
const simpleTextQuestion = createFillInQuestion(simpleTextConfig);
|
|
556
|
+
simpleTextQuestion.render(simpleTextContainer);
|
|
557
|
+
}
|
|
558
|
+
|
|
559
|
+
// Fill-in (cloze) interaction setup
|
|
560
|
+
const fillContainer = root.querySelector('#fillin-interaction');
|
|
561
|
+
if (fillContainer) {
|
|
562
|
+
const fillInConfig = {
|
|
563
|
+
id: 'requirements-spec-fillin',
|
|
564
|
+
label: 'CourseCode Features Fill-in',
|
|
565
|
+
template: 'CourseCode supports SCORM 1.2, SCORM 2004, and {{format}}. The framework includes built-in {{feature}} features. Audio narration can be generated using text-to-speech.',
|
|
566
|
+
blanks: {
|
|
567
|
+
format: { correct: 'cmi5', placeholder: 'format...' },
|
|
568
|
+
feature: { correct: 'accessibility', placeholder: 'feature...', typoTolerance: 1 }
|
|
569
|
+
}
|
|
570
|
+
};
|
|
571
|
+
const fillInQuestion = createFillInQuestion(fillInConfig);
|
|
572
|
+
fillInQuestion.render(fillContainer);
|
|
573
|
+
}
|
|
574
|
+
|
|
575
|
+
// Numeric interaction setup
|
|
576
|
+
const numericContainer = root.querySelector('#numeric-interaction');
|
|
577
|
+
if (numericContainer) {
|
|
578
|
+
const numericConfig = {
|
|
579
|
+
id: 'efficiency-calculation',
|
|
580
|
+
label: 'Passing Score Calculation',
|
|
581
|
+
prompt: 'If an assessment has 20 questions and requires 80% to pass, how many questions must be answered correctly?',
|
|
582
|
+
correctRange: { exact: 16 },
|
|
583
|
+
tolerance: 0,
|
|
584
|
+
placeholder: 'Enter number...',
|
|
585
|
+
units: 'questions'
|
|
586
|
+
};
|
|
587
|
+
const numericQuestion = createNumericQuestion(numericConfig);
|
|
588
|
+
numericQuestion.render(numericContainer);
|
|
589
|
+
}
|
|
590
|
+
|
|
591
|
+
// Stacked text input demo (Q&A format - simple prompt + input)
|
|
592
|
+
const stackedContainer = root.querySelector('#stacked-text-interaction');
|
|
593
|
+
if (stackedContainer) {
|
|
594
|
+
const stackedConfig = {
|
|
595
|
+
id: 'framework-components-qa',
|
|
596
|
+
label: 'Framework Standard',
|
|
597
|
+
prompt: 'What is the name of the modern LMS standard that uses xAPI statements?',
|
|
598
|
+
blanks: {
|
|
599
|
+
answer: {
|
|
600
|
+
correct: ['cmi5', 'CMI5', 'cmi 5'],
|
|
601
|
+
placeholder: 'Enter your answer...',
|
|
602
|
+
typoTolerance: 1
|
|
603
|
+
}
|
|
604
|
+
}
|
|
605
|
+
};
|
|
606
|
+
const stackedQuestion = createFillInQuestion(stackedConfig);
|
|
607
|
+
stackedQuestion.render(stackedContainer);
|
|
608
|
+
}
|
|
609
|
+
|
|
610
|
+
// Diagram interaction setup (placeholder for future implementation)
|
|
611
|
+
const diagramContainer = root.querySelector('#diagram-interaction');
|
|
612
|
+
if (diagramContainer) {
|
|
613
|
+
diagramContainer.innerHTML = '<p>System diagram will be available soon.</p>';
|
|
614
|
+
}
|
|
615
|
+
}
|