Picture of jim nielsen
trying to understand contentObject.json - have question
by jim nielsen - Monday, 7 March 2016, 10:17 PM
 

(not sure about this part) It looks like course.json contains all the graphic bits you intend to use in your course.

Is that true?  Does it need further explaining?

contentObjects.json seems to be the content of the first page in the demo course at: https://github.com/adaptlearning/adapt_framework/wiki/Creating-your-first-course But it contains text that I can't see anywhere? such as: "pageBody": "<strong>Scroll down to see what presentation components are available as part of the Version 2.0 core bundle.</strong>", Which although it is defined in the section which appears to be the opening page - that line appears once you get onto that secondary page.

 

I am sure there is a reason why this is so but is there an easy explanation someone can give me?

 

Picture of Chuck Lorenz
Re: trying to understand contentObject.json - have question
by Chuck Lorenz - Tuesday, 8 March 2016, 4:51 AM
 

config.json and course.json contain json data applicable across all the pages of the course.

contentObjects.json is a bit tougher to understand than the other json files. It contains data for each page/topic/menu item in the course. You will see "_type" set to both "menu" and "page". A contentObject that stands-alone or is terminal is set to "page". If instead you would like it to present more pages as menu options, set the "_type" to "menu". The hierarchical structure linking menus and pages is achieved through careful assignment of "_id" and "_parentId".

The key/value pairs you find in contentObjects.json are determined primarily by the menu you have installed. Compare with the example.json that each menu provides: https://github.com/adaptlearning/adapt-contrib-boxmenu/blob/master/example.json. But contentObjects are also pages, so they are also dependent on the page template: https://github.com/adaptlearning/adapt-contrib-vanilla/blob/master/templates/page.hbs. How and if these attributes are used is up to the course author. Because Adapt is open source, you may find examples of where the author/developer has added attributes to templates to customize her presentation. IN general, the value of "body" will appear on the menu and the value of "pageBody" will appear near the top of the page when that menu item is selected (when the menu item becomes a page). 

A page provides a container for one or more articles. An article provides a container for one or more blocks. A block provides a container for one or more components. Each of these--page, article, block, component--begins with an optional title/header, body text, and instructional text. Experience with Adapt and with creative course design will guide when and how to use these.

---------------
Graphic bits of the course are more likely to be governed by the theme than by course.json. While some components, especially adapt-contrib-graphic, are intended to present images, I think you'll find that quality designs rely on web design techniques to style the divs of the page, articles, blocks, and components.