Picture of Dean Wilson
How to remove components from the framework
by Dean Wilson - Friday, 12 August 2016, 3:19 PM
 

Hi all

I'm still new at this (with novice coding skills), so your knowledge is like gold to me at this point. 

I've been working with the default elements that come with the framework, e.g. 'Presentation components', 'question components' and 'adapt assessment'. I'm trying to start with a smaller course, so I'd like to delete some of these components.

I started by deleting the components by their ID, and tried to locate & delete all matching ID's in all folders (e.g. components.json, articles.json etc). But I find that I just run into errors because all these IDs are connected to lots of different parts of the source code. So interconnected in fact that I fear I'd never be able to successfully remove them all.

Is there a more efficient/smarter way of doing this? Or am I wrong to be 'deleting' components that I don't want in the first place? Perhaps there's a way to disable the ID's from a kind of master page?

Hope I'm making sense.

Regards, Dean

Picture of Tom Taylor
Re: How to remove components from the framework
by Tom Taylor - Monday, 15 August 2016, 3:32 PM
 

Hi Dean,

Unfortunately, I think the issues you're running into are pretty unavoidable.

If you haven't already done so, I'd recommend you have a look at the Framework in five minutes wiki page; this gives you a very quick overview of the content structure used in Adapt (among other things).

In a nutshell, content works like so: 

content objects (menus and pages) contain articles contain blocks contain components

There's a parent/child hierarchy here, which means that deleting a block but not its components will give you errors (for example).

If you're having issues with this, you can run the check-json grunt task which will validate your JSON, and let you know of any 'orphaned' objects (note that this task runs as a part of the dev and build tasks, so it's likely this was running anyway). You can read more about the grunt build tasks in this wiki page.

Picture of Dean Wilson
Re: How to remove components from the framework
by Dean Wilson - Thursday, 18 August 2016, 4:59 PM
 

Hi Tom

Many thanks for your reply here, that's very helpful. 

I've poured over the 'framework in five' and spent a lot of time looking at 'building your first course' too. 

There's one problem I can't get to the bottom of, and that is, how to create a submenu on a page. I'm unsure about whether I'm supposed to create a "_type:menu" page within the contentObjects.json file, or whether I'm supposed to house the submenu within the articles.json page. At the moment, I'm just rendering blank pages beyond the homepage... not a submenu in sight.

Perhaps I'm getting too specific into my issue. But if there's a blazingly obvious thing I'm doing wrong, or if you know a good resource for submenus, I would very appreciate your steer.