Index: lams_flex/LamsAuthor/src/assets/languages/dictionary.xml =================================================================== diff -u -rf4417561d900ac7e3d5cf2202596c85e7bb7055d -r92b3c89bd281fcd2d991c4b8c821fcb3f2ebe0b5 --- lams_flex/LamsAuthor/src/assets/languages/dictionary.xml (.../dictionary.xml) (revision f4417561d900ac7e3d5cf2202596c85e7bb7055d) +++ lams_flex/LamsAuthor/src/assets/languages/dictionary.xml (.../dictionary.xml) (revision 92b3c89bd281fcd2d991c4b8c821fcb3f2ebe0b5) @@ -1,7 +1,143 @@ - - XXXXXXXXXXXXXXXXXXXX + + Draw Transition + + Use this pen to draw transitions between activities (or press CTRL key) + + + Transition + + + Optional + + + Create a set of optional activities. + + + Activity + + + Sequence + + + Create a set of optional sequences. + + + Support + + + Create a set of optional support activities. + + + Flow + + + Create flow controls activities + + + Gate + + + Create a stop point + + + Branch + + + Create branches + + + Converge + + + Merge branches in converge point + + + Group + + + Create a Grouping activity + + + Preview + + + Preview your Sequence as learners will see it + + + Random + + + Create a random grouping + + + Choose in monitor + + + Assign groupings in monitor + + + Learner's choice + + + Allow learners to choose which group they wish to be in + + + Copy the selected activity + + + Paste a copy of the selected activity + + + Zoom In + + + Zoom Out + + + Back to normal cursor + + + New learning design + + + Save learning design + + + Open learning design + + + + All + + + Contains all tools + + + Informative + + + Contains tools that you can use to inform or bring content to the user + + + Reflective + + + Contains tools that capture learner opinions and reflections + + + Collaborative + + + Contains tools that involve learners working together to achieve learning outcomes + + + Assessment + + + Contains tools that you can use to assess and evaluate learning + \ No newline at end of file Index: lams_flex/LamsAuthor/src/org/lamsfoundation/lams/author/controller/AuthorController.as =================================================================== diff -u -rd75a56dbb3bbbceaeba8a0f5367d60ac305239aa -r92b3c89bd281fcd2d991c4b8c821fcb3f2ebe0b5 --- lams_flex/LamsAuthor/src/org/lamsfoundation/lams/author/controller/AuthorController.as (.../AuthorController.as) (revision d75a56dbb3bbbceaeba8a0f5367d60ac305239aa) +++ lams_flex/LamsAuthor/src/org/lamsfoundation/lams/author/controller/AuthorController.as (.../AuthorController.as) (revision 92b3c89bd281fcd2d991c4b8c821fcb3f2ebe0b5) @@ -20,10 +20,9 @@ public class AuthorController { - public function AuthorController() - { - } + private var dictionaryFallback:XML; + public function AuthorController(){} /** * Sets the learningLibrary object on startup. @@ -54,8 +53,13 @@ } + + public function setDictionaryFallback(xml:XML):void { + dictionaryFallback = new XML(xml); + } + public function setDictionary(xml:XML):void { - Application.application.dictionary = new XMLDictionaryRegistry(xml); + Application.application.dictionary = new XMLDictionaryRegistry(xml, dictionaryFallback); } /** Index: lams_flex/LamsAuthor/src/org/lamsfoundation/lams/author/maps/MainEventMap.mxml =================================================================== diff -u -rd75a56dbb3bbbceaeba8a0f5367d60ac305239aa -r92b3c89bd281fcd2d991c4b8c821fcb3f2ebe0b5 --- lams_flex/LamsAuthor/src/org/lamsfoundation/lams/author/maps/MainEventMap.mxml (.../MainEventMap.mxml) (revision d75a56dbb3bbbceaeba8a0f5367d60ac305239aa) +++ lams_flex/LamsAuthor/src/org/lamsfoundation/lams/author/maps/MainEventMap.mxml (.../MainEventMap.mxml) (revision 92b3c89bd281fcd2d991c4b8c821fcb3f2ebe0b5) @@ -24,6 +24,9 @@ [Bindable] private var dictionaryUrl:String; + [Bindable] + private var dictionaryFallbackUrl:String; + public function init():void { if (Application.application.TESTING) { @@ -39,6 +42,7 @@ } } + dictionaryFallbackUrl = "assets/languages/dictionary.xml"; dictionaryUrl = "assets/languages/" + Application.application.locale + ".xml"; } @@ -77,6 +81,13 @@ + + + + + + + @@ -102,6 +113,7 @@ + Index: lams_flex/LamsFlexCommon/src/org/lamsfoundation/lams/common/dictionary/XMLDictionary.as =================================================================== diff -u -r288a24d430e10138d07e89241364fc014a1f9352 -r92b3c89bd281fcd2d991c4b8c821fcb3f2ebe0b5 --- lams_flex/LamsFlexCommon/src/org/lamsfoundation/lams/common/dictionary/XMLDictionary.as (.../XMLDictionary.as) (revision 288a24d430e10138d07e89241364fc014a1f9352) +++ lams_flex/LamsFlexCommon/src/org/lamsfoundation/lams/common/dictionary/XMLDictionary.as (.../XMLDictionary.as) (revision 92b3c89bd281fcd2d991c4b8c821fcb3f2ebe0b5) @@ -6,12 +6,16 @@ { private var eventDispatcher:EventDispatcher; private var dictionaryXML:XML; + private var fallbackXML:XML; - public function XMLDictionary(xml:XML) + + public function XMLDictionary(xml:XML, fallbackXMLIn:XML = null) { eventDispatcher = new EventDispatcher(); dictionaryXML = new XML(xml); + fallbackXML = new XML(fallbackXMLIn); + eventDispatcher.dispatchEvent(new XMLDictionaryEvent(XMLDictionaryEvent.COMPLETE)); } @@ -25,11 +29,27 @@ } public function getLabel(s:String):String{ - if(!isEmpty()){ + /* if(!isEmpty()){ return dictionaryXML.language.entry.(@key==s).name; } - return null; + return null; */ + + if(!isEmpty()) { + var value:String = dictionaryXML.language.entry.(@key==s).name; + + // If we dont get a value, default to fallback + if ((value == null || value == "") && fallbackXML != null && fallbackXML.toString() != ""){ + value = fallbackXML.language.entry.(@key==s).name; + } + + // If a label has been found, return it, otherwise print an error string + if (!(value == null || value == "")) { + return value; + } + } + + return "??" + s + "??"; } public function getLabelAndConcatenate(s:String, a:Array):String{ Index: lams_flex/LamsFlexCommon/src/org/lamsfoundation/lams/common/dictionary/XMLDictionaryRegistry.as =================================================================== diff -u -rd75a56dbb3bbbceaeba8a0f5367d60ac305239aa -r92b3c89bd281fcd2d991c4b8c821fcb3f2ebe0b5 --- lams_flex/LamsFlexCommon/src/org/lamsfoundation/lams/common/dictionary/XMLDictionaryRegistry.as (.../XMLDictionaryRegistry.as) (revision d75a56dbb3bbbceaeba8a0f5367d60ac305239aa) +++ lams_flex/LamsFlexCommon/src/org/lamsfoundation/lams/common/dictionary/XMLDictionaryRegistry.as (.../XMLDictionaryRegistry.as) (revision 92b3c89bd281fcd2d991c4b8c821fcb3f2ebe0b5) @@ -12,14 +12,17 @@ private var _xmlDictionary:XMLDictionary; private var keyRegistry:Array; + private var fallbackXML:XML; - public function XMLDictionaryRegistry(value:XML) + public function XMLDictionaryRegistry(value:XML, fallbackXMLIn:XML=null) { + fallbackXML = fallbackXMLIn; xml = value; + } public function set xml(value:XML):void { - _xmlDictionary = new XMLDictionary(value); + _xmlDictionary = new XMLDictionary(value, fallbackXML); this.dispatchEvent(new Event("updatedLabels")); this.dispatchEvent(new Event("updatedLabelsReplace"));