seeking help with line returns in text variable

Nov 02, 2016

The course is a scenario with branching. Each choice has positive or negative consequences. At the end of the course I want to provide feedback for each choice made: if they made a positive choice the feedback will reinforce, if negative provide suggestions for improvement. 

I'd like to use a text variable to hold the feedback for each choice. The challenge is that text variables don't allow line breaks and the feedback contains several paragraphs of text. 

I read somewhere (and tested it, with success) that if you use a text entry field you can use that to maintain line breaks in a text variable. All well and good but that's if you are letting the learner enter the text. So, I'm back to square one. 

Anyone tackled and successfully executed something like this? I did quite a bit of searching on here and I see suggestions for using JavaScript but no complete solutions that are like this. Help and code (if JS) would be greatly appreciated. 

5 Replies
Michael Shannon

I figured if anyone knew how to do this it would be you Phil. :) 

I'll work with this and see what I can come up with. It looks simple enough. One note for your information: The HTML 5 version shows the fruit names like expected but the price of the fruit doesn't show next to the fruit name like the flash version does. Although the total price works. While not important for my project I thought you should know about it. 

Michael Shannon

One downside to this solution is that I need a lot of text variables to provide feedback on some choices since they contain lists with many items. So, for instance, one choice will require 24 separate text variables. That, combined with all of the choices in the course, this is going to be quite a logistical and management challenge. 

Michael Shannon

This is definitely going to be too tedious. Isn't there a way to put line returns into JavaScript so I could just run the JavaScript to insert the full text? By the time the course is finished I'll have over thirty pages with up to four choices on each page. When you count the number of separate text variables that will have to be created for each new line that's ridiculous. 

At this point I'm leaning toward just making images with the text, use a T/F variable for each one and stack them in an iframe. It seems so much simpler than what I'm trying to hack together with the limitations of the text var. 

This discussion is closed. You can start a new discussion or contact Articulate Support.