Forum Discussion
Results Slide Percent no Decimal Points
All,
I have a results slide which pulls in data from several other results slide.
The problem is that the results percentage is showing the percentage with decimal points. From a cosmetic point of view I would like the percentage rate to be rounded up or down to the nearest full number.
Is there a way to do this?
Thank you in advance
Rich
- RebeccaCarterCommunity Member
Hi guys,
I have tried both of the JavaScript work arounds suggested here and I can't get either to work so I assume I am doing something wrong, would anyone be willing to take a look at it for me?
PS I have added a big ugly button on the opening page to allow you to jump straight to the assessment.
Thank you :)
Hi Rebecca,
This discussion is a little bit older, so I'm not certain if folks are still subscribed here. The Javascript pieces are something I'm not equipped to help with, so you may also want to look at reaching out to folks directly using the "Contact me" button on their profile!
- RebeccaCarterCommunity Member
OK Thank you Ashley!
- RebeccaCarterCommunity Member
I never actually ever go to the bottom of this, the decimal point still haunts me :(
- HelenBound-e6e2Community Member
Its causing me some problems too as we use SCORMCLOUD to monitor and report on our Storyline courses, and if someone gets 94.78% they are shown as a fail, but if it was rounded up it would be a pass. I think this is a feature Articulate need to look at as it is such a fundamental feature.
Hi Helen,
Is your passing score set to 95%? I know some folks have used the method here to set the score to round up.
As for the idea of a feature, we're always open to new ideas and ways of doing things, so I'm going to pass this idea along as I don't see many feature requests for it outside of these ELH discussions. You can always share yours with us right here. 😁
In the meantime, could you also set your passing score to 94% to account for the scenario that a user does score a decimal percentage? I'm not sure how many questions and points you have, but I imagine that's a rare scenario?
- HelenBound-e6e2Community Member
Hi Ashley, and thanks for getting back so quickly. You're right about the number of people whose score is a few tenths out on the passmark, and if it is 94% we often do a manual override to get them to 95, I had just hoped we could run a rule that automatically does this.
- TonyChilversCommunity Member
Once you have used JS within the package to Round off the percentage score on screen,I added:
intScore = Math.round(intScore);
to the function SCORM_SetScore in SCORMFunctions.js just after the start of the function and it was correctly reporting 33/67 in a 3 question quiz.
SCORM 2004 would be the same I guess.
TC
Thanks Tony for sharing that here - hopefully it helps Helen and others!
- RebeccaCarterCommunity Member
Hi all,
I have tried to make this work on so many occasions and have followed the instructions so carefully but I just never works and I still end up with the decimal point. Would anyone be able to have a quick look at my project file to see what I may be doing wrong? I would be SO grateful!! ( I am using Storyline 3)
- RebeccaCarterCommunity Member
I realise I have posted in this thread a number of times so apologies for doing so again but I am just so stuck with this!
- PaulyBarnes1Community Member
Hey Rebecca, you're going to kick yourself or throw something at me, but your setup is perfect except for one thing. You need to set MyScore to Results.ScorePercent before executing the Javascript. Right now the javascript is looking to change MyScore, then it's injecting Results.ScorePercent into MyScore, thus doing nothing.
You're trigger jumped the gun!
Yep, you read that right. You need to switch the order of the triggers. Just tested it and it works like a charm! (Prepares to duck from a flying stapler)
Kudos on the module btw.
EDIT: Oops, looks like you got it. Excellent
Awesome Rebecca - glad you got the help you needed! It's the little things that sometimes trip us up, but I'm glad that someone here in the community was able to help!