Discussion Forums  >  Config Data, JSON, App Refresh

Replies: 10    Views: 288

krompa
Lost but trying
Profile
Posts: 257
Reg: Jun 14, 2013
Bristol
8,820
Fourm StarFourm Star
03/06/14 06:33 AM (8 years ago)

Interactive Quiz - how to edit questions 300+?

I am using the interactive quiz plug-in. In the BT Control Panel, only the first 300 questions are viewable/editable. But I have errors (four unintentional blank questions to be precise) at circa question 370. Now I can't delete/edit them. I can see the four rogue questions in the config data within the Control Panel, but edits to the config data don't appear to be possible. Any BT help appreciated.
 
AlanMac
Aspiring developer
Profile
Posts: 2612
Reg: Mar 05, 2012
Esher, UK
37,120
Fourm StarFourm StarFourm Star
like
03/06/14 08:09 AM (8 years ago)
I can't help you edit them in the control panel, but can suggest a work-around. I use the free quiz plugin (presumably the same one?) and I load all the questions from a text file, which is easy to edit and maintain. If you copy all the quiz question json (it is in config.txt) into a text file, then upload the text file as a document file via your control panel (using the files/media link), you can then instruct the quiz plugin to load from url. The plugin should load from url questions instead of using the ones you entered through your control panel and hey presto, Robert is your mothers brother!
 
krompa
Lost but trying
Profile
Posts: 257
Reg: Jun 14, 2013
Bristol
8,820
Fourm StarFourm Star
like
03/06/14 08:45 AM (8 years ago)
Thanks AlanMac. Sounds like a great solution to me. So would the first line of the .txt doc be as follows "ItemId":"747A.....etc Or does it need "child items": [{ etc Would a url from say dropbox or similar be ok?
 
nadthevlad
Code is Art
Profile
Posts: 1025
Reg: Jun 07, 2012
Denver
21,850
Fourm StarFourm StarFourm Star
like
03/06/14 09:06 AM (8 years ago)
It will look something like this (this is an advanced quiz example and not the interactive quiz). And yes you can use dropbox. https://dl.dropboxusercontent.com/u/2452503/breakers_relays_disconnectscomp_pwransw_v.txt
 
nadthevlad
Code is Art
Profile
Posts: 1025
Reg: Jun 07, 2012
Denver
21,850
Fourm StarFourm StarFourm Star
like
03/06/14 09:12 AM (8 years ago)
If you want to use a spreadsheet to manage your quiz bank there is a way to convert a google doc spreadsheet to json. http://blog.pamelafox.org/2013/06/exporting-google-spreadsheet-as-json.html There is also the smugwimp JSON converter if your using the self hosted control panel. https://btmods.com/market.php
 
mysps
Code is Art
Profile
Posts: 2082
Reg: May 14, 2011
Palma
33,320
Fourm StarFourm StarFourm Star
like
03/06/14 09:12 AM (8 years ago)
I would honestly use Excel or some type of spreadsheet. I normally start with a spreadsheet to create my quizzes. Then I break it down to json with a converter. In your case you can copy the json and also convert it to a csv file. I've had to do this with a large quiz. First I would copy the child items of the quiz and take it to jsonlint.com to have it validated. Secondly, I would head over to http://jsfiddle.net/sturtevant/vUnF9/ and paste your json at the bottom and click download csv. Now you can edit your 300+ quiz questions & answers. Thirdly, I would save this as csv. Open it in a text editor and copy paste the content then head over to http://shancarter.github.io/mr-data-converter/ to get the json. Then you can copy that data into a data url text file with the quiz content :)
 
AlanMac
Aspiring developer
Profile
Posts: 2612
Reg: Mar 05, 2012
Esher, UK
37,120
Fourm StarFourm StarFourm Star
like
03/06/14 10:33 AM (8 years ago)
The JSON file should look like this https://www.buzztouch.com/plugins/plugin.php?pid=3C10D2D5784B9D981C3F307 (when all else fails, read the instructions! lol) And I also do my quizzes in Excel, but I was thinking baby steps - first prove you can get your remote url link working, then try to reproduce the content in Excel. And lastly, I would personally prefer to keep the txt file alongside the app in my control panel, which I suggest is simpler and cleaner than using dropbox (to my mind).
 
krompa
Lost but trying
Profile
Posts: 257
Reg: Jun 14, 2013
Bristol
8,820
Fourm StarFourm Star
like
03/06/14 02:05 PM (8 years ago)
Thanks for the above. I have opted for the .txt file first. Unfortunately the app remains on the image screen (the one that used to say "fun, interesting" etc) before the questions arrive. My ad banner is still rotating at the bottom, so the app hasn't frozen, it is just not picking up any questions. I have validated the json and removed the questions from the BT control panel. Any ideas? The app is live so I would appreciate a quick response.
 
krompa
Lost but trying
Profile
Posts: 257
Reg: Jun 14, 2013
Bristol
8,820
Fourm StarFourm Star
like
03/06/14 02:49 PM (8 years ago)
Fixed. Pheeeeeewwww. Much better to store within documents folder in BT control panel. For some reason dropbox link wasn't working. Thanks for all your help AlanMac (yes, I forgot about the instructions as it's been months since I imported the plug-in), Nad (legend) and mysps. mysps - I can see how the Excel is the better option particularly for added functionality such as sorting (maybe into levels of difficulty or by subject). I will look at this in the near future. Thanks again.
 
AlanMac
Aspiring developer
Profile
Posts: 2612
Reg: Mar 05, 2012
Esher, UK
37,120
Fourm StarFourm StarFourm Star
like
03/06/14 03:13 PM (8 years ago)
Nice one - glad you are sorted.
 
mysps
Code is Art
Profile
Posts: 2082
Reg: May 14, 2011
Palma
33,320
Fourm StarFourm StarFourm Star
like
03/07/14 04:04 AM (8 years ago)
cool. glad you got it sorted!!
 

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.