Display gauge chart at the end of assessment

More
1 month 1 week ago #202093 by karencheah
I would like to be able to run an assessment and display the total score at the end graphically, specifically as a gauge chart. I was looking into using Chart JS but I can't figure out how to add script into the End message or a text display question without breaking the whole survey.

Please advise what the options are (free/paid). Thanks in advance!

Please Log in to join the conversation.

LimeSurvey Partners
More
1 month 1 week ago #202107 by tpartner
Here are some old instructions o how to use JavaScript - manual.limesurvey.org/Workarounds:_Manip...tc..29_in_LimeSurvey

Cheers,
Tony Partner

Solutions, code and workarounds presented in these forums are given without any warranty, implied or otherwise.
Official LimeSurvey Partner - partnersurveys.com

Please Log in to join the conversation.

More
1 month 1 week ago #202121 by karencheah
Thanks, Tony. I'll take a look and give it a go.

Please Log in to join the conversation.

More
1 month 1 week ago #202122 by karencheah
Unfortunately, the plugin is not compatible with LS version. I'm on Version 4.3.0+200616. Anymore ideas please?

Please Log in to join the conversation.

More
1 month 1 week ago #202130 by DenisChenu

karencheah wrote: Unfortunately, the plugin is not compatible with LS version. I'm on Version 4.3.0+200616. Anymore ideas please?

Plugin is not needed, it's an alternative.

(and yes : currently no way to have question attribute via plugins)

Assistance on LimeSurvey forum and LimeSurvey core development are on my free time.
I'm not a LimeSurvey GmbH member, professional service on demand , plugin development . I don't answer to private message.

Please Log in to join the conversation.

More
1 month 1 week ago #202144 by karencheah
Thanks, Denis. I turned off the "Filter HTML for XSS" in the global settings but I still couldn't add any javascript. So I thought that the plugin was needed.

I'm thinking of another idea that would maybe be easier than trying to do the chart within LS. What if I pass the score out as a parameter to another page where I will render the chart? The question is how to pass the score out...

Please Log in to join the conversation.

More
1 month 1 week ago #202152 by DenisChenu

karencheah wrote: Thanks, Denis. I turned off the "Filter HTML for XSS" in the global settings but I still couldn't add any javascript.

In 4.X you have a "script" block, maybe you can use it.

Assistance on LimeSurvey forum and LimeSurvey core development are on my free time.
I'm not a LimeSurvey GmbH member, professional service on demand , plugin development . I don't answer to private message.

Please Log in to join the conversation.

More
1 month 1 week ago #202167 by karencheah
Sorry, I can't seem to find this "script" block in the question or the settings. Also can't find any documentation on it.

Please Log in to join the conversation.

More
1 month 1 week ago - 1 month 1 week ago #202170 by DenisChenu
Else : you are in assesement,

Seems there are not HTML editor in 4.X


Just add

<script type="text/javascript" charset="utf-8">
alert("Test!");
</script>


And see what happen

Assistance on LimeSurvey forum and LimeSurvey core development are on my free time.
I'm not a LimeSurvey GmbH member, professional service on demand , plugin development . I don't answer to private message.
Attachments:
Last edit: 1 month 1 week ago by DenisChenu.

Please Log in to join the conversation.

More
1 month 1 week ago #202172 by karencheah
I've tried it in the question text and the end message in source code. Both didn't like it.

Please Log in to join the conversation.

More
1 month 1 week ago #202173 by karencheah
I've also turned off assessment mode.

Please Log in to join the conversation.

More
1 month 1 week ago #202174 by tpartner
Are there any JavaScript errors in the console (F12)?

Cheers,
Tony Partner

Solutions, code and workarounds presented in these forums are given without any warranty, implied or otherwise.
Official LimeSurvey Partner - partnersurveys.com
The following user(s) said Thank You: DenisChenu

Please Log in to join the conversation.

More
1 month 1 week ago #202181 by DenisChenu
Are you super admin ?

Assistance on LimeSurvey forum and LimeSurvey core development are on my free time.
I'm not a LimeSurvey GmbH member, professional service on demand , plugin development . I don't answer to private message.

Please Log in to join the conversation.

More
1 month 1 week ago #202222 by karencheah
I'm pretty sure I'm super admin as there are no other users. I'll log in and check soon. As well as paste the error messages of when I put in script.

Please Log in to join the conversation.

More
1 month 1 week ago #202223 by karencheah
I'm the only user and it says administrator next to my user. Not sure where to check if super admin but it should be.

I'm attaching screenshots of the issues. First 2 images are when I pasted the script in a text display question. When saving, it just breaks the page and doesn't save it. The last image is when I pasted script into End message.
Attachments:

Please Log in to join the conversation.

Start now!

Just create your account and start using Limesurvey today.

Register now