Picture of Marissa Preciado
Custom menu Authoring Tool properties.schema
by Marissa Preciado - Wednesday, 21 August 2019, 2:33 PM
 

I've created a menu based off of the Adapt Box Menu but with an additional "Topic" section that I want to be able to edit in the Authoring Tool. I've been able to edit this topic section within the framework but I'm failing at getting the properties.schema to work. I've tried a few different ways but here is what I've currently got going:

 

{
"type": "object",
"$schema": "http://json-schema.org/draft-04/schema",
"id": "http://jsonschema.net",
"$ref": "http://localhost/plugins/content/contentobject/model.schema",
"globals": {
"ariaRegion": {
"type": "string",
"required": true,
"default": "Menu",
"inputType": "Text",
"validators": [],
"translatable": true
},
"durationLabel": {
"type": "string",
"required": true,
"default": "Duration:",
"inputType": "Text",
"validators": [],
"translatable": true
},
"topicLabel": {
"type": "string",
"required": true,
"default": "Topic",
"inputType": "Text",
"validators": [],
"translatable": true
},
"menuItem": {
"type": "string",
"required": true,
"default": "Menu item.",
"inputType": "Text",
"validators": [],
"translatable": true
},
"menuEnd": {
"type": "string",
"required": true,
"default": "You have reached the end of the menu.",
"inputType": "Text",
"validators": [],
"translatable": true
}
},
"properties": {
"pluginLocations": {
"type":"object",
"required":true,
"properties":{
"config": {
"type":"object"
},
"course": {
"type":"object"
},
"contentobject": {
"type":"object",
"properties": {
"_boxmenu": {
"legend": "Box Menu",
"type": "object",
"required":false,
"properties": {
"_topic": {
"type": "string",
"required": false,
"title": "Topic",
"inputType": "TextArea"
}
}
}
}
},
"article": {
"type":"object"
},
"block": {
"type":"object"
},
"component": {
"type":"object"
}
}
}
}
}

 

Any help is greatly appreciated! Thank you.

Picture of Tom Greenfield
Re: Custom menu Authoring Tool properties.schema
by Tom Greenfield - Wednesday, 21 August 2019, 3:41 PM
 

Hi Marissa, please also post your bower JSON to assist with troubleshooting.

Picture of Marissa Preciado
Re: Custom menu Authoring Tool properties.schema
by Marissa Preciado - Wednesday, 21 August 2019, 8:12 PM
 

Sure, here it is. Thank you for your help.

{
"name": "adapt-boxMenu-0820",
"version": "0.0.5",
"framework": ">=2.1",
"homepage": "",
"issues": "https://github.com/adaptlearning/adapt_framework/issues/new",
"displayName": "Box menu Custom",
"menu": "boxmenu",
"description": "Edited for AT upload 08-20",
"main": "js/adapt-contrib-boxmenu.js",
"keywords": [
"adapt-plugin",
"adapt-menu"
],
"license": "GPLv3",
"targetAttribute": "_boxMenu"
}

Picture of Tom Greenfield
Re: Custom menu Authoring Tool properties.schema
by Tom Greenfield - Thursday, 22 August 2019, 8:24 AM
 

Thanks. You need to ensure the case of your Box Menu attributes match. Namely:

bower.json

"menu": "boxMenu"

"targetAttribute": "_boxMenu"

properties.schema

"_boxMenu"

Currently, some attributes are all lowercase. It should also be noted that plugins will conflict if they are titled differently but share the same target attribute; you should remove the original Box Menu if it's still installed in your authoring tool.