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
68 Replies
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
- TonyChilversCommunity Member
Hi Rebecca,
Sorry I can't open a SL3 package.
I have attached a very basic example of this from SL1, the results slide is where all the JavaScript has been added.Hope that helps.
TC- RebeccaCarterCommunity Member
Thank you so much for your speedy reply! I have now managed to get this to work!! HOORAY!
I had the triggers in the wrong order all this time and that was causing it to not work properly.
Can't thank you enough!
- MaureenMatsumotCommunity Member
Hi Tony,
I was hoping that I could find a solution to this problem!
Thank you so for the attached file. I got it to work in Storyline 360!!
Thank you!!
Maureen
- TeresaVanderposCommunity Member
Hi Maureen,
I see you got the decimal point to work in Storyline 360, I still haven't managed to, would you mind sharing the file? I would love to see it....Thanks Teresa
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!