Latest coursepresentation add common field
I treid to add a common field to the coursepresentation module (V 1.1).
I added the common field details (text type) to the semantics.json of the coursepresentation module:
"name": "moduleName",
"type": "text",
"label": "Text for your unique module name",
"default": "Module Name"
},
I assigned it all correctly in cp.js and included it to the scores list, because I wanted the header to display the module name.
this.l10n = H5P.jQuery.extend({
...
moduleName: 'Module Name',
It's shown there correctly and when I add it to the html in cp.js I now have a text in the header like
Test result <moduleName>
What i cannot figure out is how to achieve that it this common field is displayed in the common field list for editing, like for example
showSolutions: 'Show solutions',
so I can enter any text there which will be then shown.
Now I can only assign a default text in cp.js, but i am not able to edit/change that text from the GUI.
Could you please advise, what's necessary to get my this.l10n = moduleName shonw in the common field list?
Thank you!
fnoks
Wed, 10/22/2014 - 16:11
Permalink
I am not sure I follow you,
I am not sure I follow you, but you might want to read the semantics-documentation here:
http://h5p.org/semantics#text (You could try setting "common":true, even if I am not sure that is what you are after)
Please reply here if this doesn't help you!