Skip to content

Update: Add JSDoc documentation to content model hierarchy (fixes #852)#862

Open
joe-replin wants to merge 1 commit into
masterfrom
issue/852
Open

Update: Add JSDoc documentation to content model hierarchy (fixes #852)#862
joe-replin wants to merge 1 commit into
masterfrom
issue/852

Conversation

@joe-replin
Copy link
Copy Markdown
Contributor

Fixes #852

Update

  • courseModel.js — Added @file, @module, and @class documentation describing its role as the top-level course root node
  • contentObjectModel.js — Added module and class documentation for the shared base of pages and menus
  • pageModel.js — Added module and class documentation, clarifying that pages are leaf-level content objects containing articles
  • menuModel.js — Added module and class documentation; added JSDoc for setCustomLocking() describing its recursive locking behaviour
  • articleModel.js — Added module and class documentation for the article tier of the content hierarchy
  • blockModel.js — Added module and class documentation for the block tier
  • componentModel.js — Added module and class documentation, including a description of the compact attempt-state array format [numbers[], booleans[], arrays[]] used for SCORM tracking
  • mpabc.js — Added module and class documentation for the MPABC bootstrap controller, including a side-effects import example and description of the Adapt.contentObjects / articles / blocks / components collections it creates

Testing

  1. Open each changed file and confirm JSDoc block comments parse without syntax errors (no unclosed /** blocks)
  2. Run grunt dev and verify no build errors are introduced by the documentation additions
  3. Optionally generate API docs and confirm module and class entries appear for all eight files

Add comprehensive JSDoc comments to core model files and the mpabc controller to improve inline docs and API clarity. Files updated: articleModel, blockModel, componentModel, contentObjectModel, courseModel, menuModel, pageModel and mpabc.js. Class- and file-level descriptions were added (including relationships in the Adapt content hierarchy, attempt state notes for components, and a brief example for mpabc). Also documents MenuModel.setCustomLocking. These are documentation-only changes and do not alter runtime behavior.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Development

Successfully merging this pull request may close these issues.

JSDocs - Content Model Hierarchy

1 participant