Discussion Forums  >  Plugins, Customizing, Source Code

Replies: 1    Views: 60

Bonzo
Apple Fan
Profile
Posts: 783
Reg: Jan 30, 2012
Basingstoke
13,530
05/24/13 01:17 AM (12 years ago)

Issue when replicating quiz plugin

Im sure this is easy for someone..... Ive bascally made a copy of the interactive quiz that is supplied as a standard from Buzztouch. Ive removed anything in relation to button 3 & 4 and label 3& 4, to basically leave 2 answer boxes (making it a true or false quiz :) It works 'almost' prefectly.... My issue is, it still seems to be ranomly placing the answers over the 4 buttons. what i mean by this is. i have a correct answer of True and wrong answer of false. i would expect the to random over the 2 buttons i have left. but sometimes one of the boxes is blank because i can only assume its trying to display it in the 3rd/4th button. I hope im explaining myself well Can anyone see the code in the quiz plugin that controls where the answers are displayed, and how i can get it to ignore the 3rd and 4th box? Thanks Steve
 
Bonzo
Apple Fan
Profile
Posts: 783
Reg: Jan 30, 2012
Basingstoke
13,530
like
05/24/13 01:26 AM (12 years ago)
typical! found it as soon as i started looking again after this post i missed this block of code, and needed to // the incorrectText2 & 3 //tmp array of answers..3 are incorrect, 1 is correct NSMutableArray *tmpAnswers = [[NSMutableArray alloc] init]; [tmpAnswers addObject:[BT_strings getJsonPropertyValue:tmpQuestion.jsonVars nameOfProperty:@"incorrectText1" defaultValue:@""]]; //[tmpAnswers addObject:[BT_strings getJsonPropertyValue:tmpQuestion.jsonVars nameOfProperty:@"incorrectText2" defaultValue:@""]]; //[tmpAnswers addObject:[BT_strings getJsonPropertyValue:tmpQuestion.jsonVars nameOfProperty:@"incorrectText3" defaultValue:@""]]; [tmpAnswers addObject:[BT_strings getJsonPropertyValue:tmpQuestion.jsonVars nameOfProperty:@"correctAnswerText" defaultValue:@""]]; I now have a perfectly working true/false quiz :)
 

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.