2017년 6월 15일 목요일

Can I have 100 questions per screen?


I'm making a multiple choice quiz app. The app inventor doesn't accept more than 10 screens so I have to consolidate my number of chapters which means I will have A LOT of questions per screen. One screen has about 94 questions. Do they also limit the number of question per screen? All my questions are texts, no image or sound.

--
Why you use all 10 screens?
You can use a Screen to ask the questions! For this you only need the correct programming.
See the "quiz maker" project in the gallery.

-- 
A "question" is not a programming object in App Inventor 2, so there's no such thing as a "questions limit". The questions can be asked one by one in just one label, and have multiple choices with 3 or 4 checkboxes. Also, you can set two buttons to go to the next question or go back to the previous one. Using more than 1 screen to do what you are trying to do is a waste of resources, really. 

-- 
I need more than 10 screens because my quiz is from 63 chapters. I want my quiz per chapter. If I consolidate 10 chapters in one screen, I will have around 100 questions which, as much as possible, I don't want to do. 

Is there another program out there that has no limit to the number of screens I use? 

-- 
I never said you have to place 100 questions in one screen, I said show one question at a time, reusing the same components. 
If you want to watch 100 movies, you don't buy 100 tv's right?

-- 
Sorry, what I meant was, the 100 questions don't appear in one screen. They are assigned to appear in screen 1 one at a time. I don't know if I'm making any sense, I don't know how else to explain it. 

-- 
There's a lot of different ways to do this. Did you check Nico's link above?
This is how I would do it, for simplicity I use 2 screens, but it's possible to do it with just one (by hiding some arrangements and making visible others).
Does this makes any sense to you?



-- 
I already did that. My first screen are made up of buttons, Chapter 1, Chapter 2, Chapter 3, etc. When Chapter 1 is clicked, it opens to Screen 2 where my questions for that chapter is found. It has about 23 questions. The blocks are set up that when you choose an answer for the first question, the button turns green for correct, red for wrong, then after a second, will go directly to the next question. It also has a HOME button at the bottom of every page just in case the user gets bored and wants to go HOME to choose a different chapter. 

So if I click HOME, then click Chapter 2, it will go to Screen 3 which I have 93 questions. Same set up as Chapter 1. Unfortunately, if I click Chapter 10, there will not be a Screen 11. So what I did, I made Chapter 1-10 into just one button.

-- 
You still don't understand what reusing components means. In my example, there's only 2 (TWO) screens, not one per chapter. Just two.

Screen1 will tell Screen2 which chapter the user selected. Then Screen2 will show question #1 of the chapter passed as a value from Screen1.

If the user clicks the HOME button, you CLOSE Screen2.

There's no Screen3 or 4 or 5. It's just Screen1 and Screen2 only.


--
I've been thinking about that the last couple of hours. I now know what you mean. Will try that. Thank you for your patience, time, and knowledge. :-)

-- 
I forgot to add this but I guess you already figured it out:

In Screen2, when you press NEXT QUESTION you don't go to any screen. Just get the next question with its answers and change the text in the labels and checkboxes. 
Same when you press the PREVIOUS QUESTION button.

-- 
See this app that lets you choose paths from the Big Bang to MIT,
all in one screen with a handful of components ...

-- 
MOMSHIE2  replied by personal email: (Please reply only in the forum. Thanks)

I finally figured it out!!! YEY!!! Your idea  led me to this video in youtube about simulating multiple screens. So far, it is going well. When I click the button for Chapter 1, it opens up “another screen” that has all my questions for this chapter alone. It’s not really another screen but that “screen” becomes “visible” when Chapter 1 button is clicked. Thank you!!!
Let’s see if I can do more chapters. I’m just having a hard time in the Designer view when you have to put multiple Vertical Scroll Arrangements when your “workspace” doesn’t scroll down.
But anyway, thank you!

Good to know! About the designing, it's a little annoyance, yes, but you can set some components invisible, and make them visible before compiling the apk.

-- 
Ummmm.....I keep getting this message: data partition size adjusted to match image file <93 MB> 84 MB>

Is this a problem? It slowed down the emulator.  I'm only using Screen 1 and it has 722 blocks, all text, no image or sound.

-- 
Definitely. Why do you need 722 blocks?
You should have the questions and answers in lists, not hard coded in blocks.
Check this example I did. You need to have the chapters loaded as csv files, like the one showing in my NotePad.

Then display them one by one. When the users selects a different chapter, you load the csv file that corresponds to that chapter and display the questions and answers. 
When I mean REUSE, I really mean REUSE. If you have to make the blocks for each question, then what would be the purpose of programming then?

Study this example and try to come up with the right way to implement it in your app.
Of course, there's hundreds of other ways to do this. I'm just showing you what I would do because it worked for me.



-- 
The first value of each row is the number of the correct answer.
I assumed you know how to work with lists of lists. If you don't please read this: 


-- 
Sorry, I keep forgetting to reply here.

-- 

댓글 없음:

댓글 쓰기