Discussion Forums  >  Plugins, Customizing, Source Code

Replies: 4    Views: 123

ElleEyeEssay
Code is Art
Profile
Posts: 36
Reg: Jul 08, 2012
Santa Barbara, ...
4,510
07/10/12 09:14 PM (13 years ago)

Interactive Quiz 2.0 issues

I was running the 2.0 interactive quiz today and noticed that it would not randomize my questions. I debugged the program and found that in BT_screen_quiz.java, line 974: if(questionPool.size() > 0 && (quizRandomizeQuestions == "1" || quizRandomizeQuestions.toUpperCase() == "YES")){ does not execute to True even if the quizRandomizeQuestions value is 1 because "==" is not performing the correct comparison. So I changed the line of code to: if(questionPool.size() > 0 && (quizRandomizeQuestions.equals("1") || quizRandomizeQuestions.toUpperCase().equals("YES"))){ It compiles and executes correctly. I haven't coded in Java in 11 years so if the more experienced Java developers would please validate this, I'd appreciate it.
 
xtremeesolutions
Code is Art
Profile
Posts: 106
Reg: Nov 19, 2011
FootHill Ranch,...
6,610
like
07/10/12 10:12 PM (13 years ago)
I also had the similar issue and fixed it the similar way. Thanks for sharing.
 
ElleEyeEssay
Code is Art
Profile
Posts: 36
Reg: Jul 08, 2012
Santa Barbara, ...
4,510
like
07/10/12 10:39 PM (13 years ago)
Thanks. I hope I didn't add something to the forum that has already been discussed. :)
 
David @ buzztouch
buzztouch Evangelist
Profile
Posts: 6866
Reg: Jan 01, 2010
Monterey, CA
78,840
like
07/10/12 11:01 PM (13 years ago)
@ElleEyeEssay: VERY VERY helpful and for sure a syntax error on our end. We're looking into it now and will update the plugin. Funny how often us developers mix-n-match comparison operators when we work in several different languages at once. Stoked that you found and reported this - thanks again.
 
ElleEyeEssay
Code is Art
Profile
Posts: 36
Reg: Jul 08, 2012
Santa Barbara, ...
4,510
like
07/10/12 11:39 PM (13 years ago)
No problem David. Thanks for the quick response.
 

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.