Discussion Forums  >  Plugins, Customizing, Source Code

Replies: 11    Views: 91

panitoapp
Aspiring developer
Profile
Posts: 5
Reg: Jan 28, 2014
Mallorca
1,400
02/02/14 07:19 AM (11 years ago)

Plugin for Calculating a score

Does anybody know if there is any plugin or some other way to obtain a numeric score as a result of the average of different scores given to 10 questions? For example: Give a score from 0 to 3 to each of 10 questions; finally obtain an average score. anybody willing to help? thank you
 
SmugWimp
Smugger than thou...
Profile
Posts: 6316
Reg: Nov 07, 2012
Tamuning, GU
81,410
like
02/02/14 07:37 AM (11 years ago)
I've never actually bothered to work with it in 'that way', but I *think* the generic quiz plugin can do that. If not, certainly Nad's advanced should be able to. But it's conjecture; I don't know for sure. Cheers! -- Smug
 
krompa
Lost but trying
Profile
Posts: 257
Reg: Jun 14, 2013
Bristol
8,820
like
02/02/14 09:07 AM (11 years ago)
Hi there. I can help with this a bit later on (9ish GMT) when im sat at my computer. Android or ios? Obtaining and displaying an average score should be straightforward - its just a case of adding a few lines of code to the quiz.java file. I'll supply this when i'm at my computer. Can i ask why the quiz answers will score 0 - 3? Is it based on question difficulty, time taken, or are some answers worth more than others etc. This may change the soluton.
 
panitoapp
Aspiring developer
Profile
Posts: 5
Reg: Jan 28, 2014
Mallorca
1,400
like
02/02/14 09:20 AM (11 years ago)
Thank you Krompa Shure...the thing is... There are a few questions that parents of children with ADD can answer. There are 4 different possibilities: 0, 1, 2 or 3 given to "never, sometimes, frequently and always)( actually two sets of ten questions). This could help parents guess if their child could have this disorder. Therefore I am trying to build an app that can help them also with their deficits and everyday life... I am a pediatrician
 
krompa
Lost but trying
Profile
Posts: 257
Reg: Jun 14, 2013
Bristol
8,820
like
02/02/14 09:35 AM (11 years ago)
I understand. Sounds like a useful app. I'll have a think and contact you later today.
 
krompa
Lost but trying
Profile
Posts: 257
Reg: Jun 14, 2013
Bristol
8,820
like
02/02/14 10:14 AM (11 years ago)
If you havent already, create an app in your BT control panel. Add a menu page and the free interactive quiz plug-in. Add your questions to the interactive quiz.
 
panitoapp
Aspiring developer
Profile
Posts: 5
Reg: Jan 28, 2014
Mallorca
1,400
like
02/02/14 10:28 AM (11 years ago)
Ok, I will let you know when I have something ready. Actually, my first attempt is including David´s Quiz plugin. I´ll see how it works. thank you again
 
panitoapp
Aspiring developer
Profile
Posts: 5
Reg: Jan 28, 2014
Mallorca
1,400
like
02/02/14 11:28 AM (11 years ago)
Ok, I will let you know when I have something ready. Actually, my first attempt is including David´s Quiz plugin. I´ll see how it works. thank you again
 
krompa
Lost but trying
Profile
Posts: 257
Reg: Jun 14, 2013
Bristol
8,820
like
02/02/14 11:31 AM (11 years ago)
The next step is to export and open in eclipse (or ios equivalent).
 
krompa
Lost but trying
Profile
Posts: 257
Reg: Jun 14, 2013
Bristol
8,820
like
02/02/14 02:46 PM (11 years ago)
Hi there. I appreciate the above steps can be tricky and take some time, but here is some example code to help you when you are set up. In the src folder of your app is a file called BT_screen_quiz.java. To calculate an average: ~@ line 116 of the screen_quiz file, where is says "//quiz vars ..." add the following line public int average; ~@ line 1201 just before where it says //send results to URL if provided... add the following line average = totalScore / 20; This will give you an average value for your score results based on 20 questions. If you want to check the average is being calculated correctly - you can display the average result as follows: ~@ line 1215 before the line "showAlert("Quiz Complete", tmpResults);" add the following lines tmpResults += "\n" + average; tmpResults += "\n"; The result will display in the pop-up alert box that appears at the end of the quiz. This is perhaps the easiest part of the requests in your original post. Let me know how you are getting on with this and i'll look into the other requests.
 
panitoapp
Aspiring developer
Profile
Posts: 5
Reg: Jan 28, 2014
Mallorca
1,400
like
02/05/14 04:34 AM (11 years ago)
Thank you Krompa, I think that the best and easier way is to show the results as "Number of YES"answers. In that case If more than 5 "YES" then it is a positive diagnosis. The problem is that the Quiz comes with "Correct" and "Incorrect" answers.And we don´t want that... The other thing is taking out the label that comes with the package in each screen, which I can´t...(you know, the image with the brown and yellow letters "Fun..bla..bla..."
 
krompa
Lost but trying
Profile
Posts: 257
Reg: Jun 14, 2013
Bristol
8,820
like
02/07/14 06:00 AM (11 years ago)
Sounds like you have your developer env set up and working - great news. I'll take a look at this tonight when im back at my computer.
 

Login + Screen Name Required to Post

pointerLogin to participate so you can start earning points. Once you're logged in (and have a screen name entered in your profile), you can subscribe to topics, follow users, and start learning how to make apps like the pros.