From c8206191f1230f154ea7e6c8f8ff746bfed12382 Mon Sep 17 00:00:00 2001 From: Dave Tarrant Date: Fri, 3 Mar 2017 13:58:09 +0000 Subject: [PATCH 1/7] Adding attribution property to being this inline with graphic component --- README.md | 4 +++- example.json | 2 ++ properties.schema | 9 +++++++++ templates/gmcq.hbs | 3 +++ 4 files changed, 17 insertions(+), 1 deletion(-) diff --git a/README.md b/README.md index 18bda71..fbf0f17 100644 --- a/README.md +++ b/README.md @@ -79,7 +79,9 @@ guide the learner’s interaction with the component. >>**small** (string): File name (including path) of the image used with small device width. Path should be relative to the *src* folder (e.g., *course/en/images/origami-menu-two.jpg*). ->>**alt** (string): This text becomes the image’s `alt` attribute. +>>**alt** (string): This text becomes the image’s `alt` attribute. + +>>**attribution** (string): Optional text to be displayed as an [attribution](https://wiki.creativecommons.org/Best_practices_for_attribution). By default it is displayed below the image. Adjust positioning by modifying CSS. Text can contain HTML tags, e.g., `Copyright © 2015 by Lukasz 'Severiaan' Grela` **_feedback** (object): If the [**Tutor** extension](https://github.com/adaptlearning/adapt-contrib-tutor) is enabled, these various texts will be displayed depending on the submitted answer. **_feedback** contains values for three types of answers: **correct**, **_incorrect**, and **_partlyCorrect**. Some attributes are optional. If they are not supplied, the default that is noted below will be used. diff --git a/example.json b/example.json index 2193cb9..21f0b7c 100644 --- a/example.json +++ b/example.json @@ -24,6 +24,7 @@ "_shouldBeSelected":true, "_graphic": { "alt": "Alt text for option 1", + "attribution":"Copyright © 2015", "large": "course/en/images/gqcq-1-large.gif", "small": "course/en/images/gqcq-1-small.gif" } @@ -33,6 +34,7 @@ "_shouldBeSelected":false, "_graphic": { "alt": "Alt text for option 2", + "attribution":"Copyright © 2015", "large": "course/en/images/gqcq-2-large.gif", "small": "course/en/images/gqcq-2-small.gif" } diff --git a/properties.schema b/properties.schema index 39c7173..357cfb9 100644 --- a/properties.schema +++ b/properties.schema @@ -67,6 +67,15 @@ "validators": [], "help": "Alternative text for this items image", "translatable": true + }, + "attribution": { + "type":"string", + "required":false, + "default": "", + "inputType": "Text", + "validators": [], + "help": "Text to be displayed as an attribution", + "translatable": true } } }, diff --git a/templates/gmcq.hbs b/templates/gmcq.hbs index 93ce375..5b8ee8c 100644 --- a/templates/gmcq.hbs +++ b/templates/gmcq.hbs @@ -7,6 +7,9 @@