Travis6876874
Posts: 0
Joined: Sat May 17, 2014 1:27 am

step by step help retrieve and shuffle. example..

Hello, I received this help a while back, I'm finally finished with my database and created new database service, its all I have done.. I really need help with step by step in order to figure it out, I realize there's a lot of solutions and choices when programming and that's what make it's a little off. But this topic is all about getting it to work on a page in a custom way that I will explain:

I'm not sure how this will effect each step but I want to ask 8 questions at a time, which makes 1 set.
, then user will be sent home. I'm going to time each question at 23 seconds, then it will go to the next question till they are answered and then return the user to home page. can you help me with this please. It's really hard for me to figure this out.

In the instructions I was given below, I have 1. finished.

  1. I have import the database service but that's it, I do not know if I'm ready to?
    my database with questions and answers also has a column, number, 1-184, so there are 184 questions answers like I mentioned. can you help me, being new it's a nightmare, I want you to know I have been and am always trying to figure it out with documentation and videos. I learn and get lost at the same time, please help me resolve this, please, lol...

    MAYBE IF I CAN JUST FIGURE OUT HOW TO DO 2 THROUGH 3.2 I'LL LEARN A WHOLE LOT, I've learned a little so far, and it makes things easier, but I need to learn more, I'm stuck on this..

    Thank You.

    So think about it, you hit a component, you try to answer one question at a time, you have 23 seconds, till the next question shows, if you answer it, you go to the next question, if you don't when 23 seconds are up it goes to the next question until all 8 are done then your sent back home, How do I configure the setting required below for this. It may not be necessary to know all this I dont know, I'm just trying to get through this, for starts making sure any settings in 2. is configured correctly, or if 2. is something that okay for now and I can go to 3 and try to get that step done. Please help me with one step at a time..

    So, here is more to learn :)

    To store

  2. It's better to store data in database as follows:

    one column - question (String)
    second column - answers (Array) http://docs.appery.io/documentation/b...

    The structure of answer cell:

    [{"answer": "Answer one", "correct": true}, {"answer": "Answer two", "correct": false}, {"answer": "Answer Tree", "correct": false}]

    In case you would like to add additional answers or more than one correct answer, hints, just transfer the cell to:

    [{"answer": "Answer one", "correct": true}, {"answer": "Answer two", "correct": false}, {"answer": "Answer Tree", "correct": false}, {"answer": "Answer four", "correct": true}]

    How to retrieve and shuffle

  3. To retrieve the column with answers import Database Service http://docs.appery.io/documentation/b... for this Database (for example Read Service).

  4. To modify your service response you need to use Generic security context and use it with your service.

    3.1 Create custom Security context service. Here is how to do this http://docs.appery.io/documentation/g...

    3.2 Use next code to wrap answer and make custome logic (Shuffling with JavaScript).

    Appery.MySecurityGeneric = Appery.createClass(SecurityContext, {
    invoke: function(service, settings) {
    var oldSuccess = settings.success;
    var onSuccess = function(value, other){
    //here you need to use JavaScript shuffle function:
    //To see what stored in the value variable please use following code:
    console.log("value = ");
    console.log(value);
    oldSuccess.call(this, value, other);
    };
    settings.success = onSuccess;
    Appery.MySecurityGeneric.$super.invoke.call(this, service, settings);
    }
    });

    Note: You should replace "MySecurityGeneric" with your Security generic context name.

  5. After you create Generic security context please use this context in your service.

Travis6876874
Posts: 0
Joined: Sat May 17, 2014 1:27 am

step by step help retrieve and shuffle. example..

I think everything needs to shuffle, but just 1,2,3,4,5,6,7,8, each set,
so the first set of questions would be shuffled, example, 3,4,6,2,1,5,8,7
then second set of questions, ex 10,16,14,11,15,9,13,12

But a user has to get all the questions right to go to a next set. but returns home after any set..then if all were answered correctly, the next set will be present when they hit the component that links them to the page with questions..

Hopefully you can understand being new, this is really hard to figure out if you have no programming skills.. it's pretty scary, I have tried to figure this out for a few days on my own, it's impossible feeling.

Maryna Brodina
Posts: 0
Joined: Thu Apr 05, 2012 7:27 am

step by step help retrieve and shuffle. example..

Hello Travis!

We are sorry, but creating custom app logic and building custom app are outside the scope of our support (http://devcenter.appery.io/support-po...).
You can contact Appery.io services team so they can help you http://appery.io/services/

Travis6876874
Posts: 0
Joined: Sat May 17, 2014 1:27 am

step by step help retrieve and shuffle. example..

can you please guide me on how to delete this question, and other questions I posted on here??

Travis6876874
Posts: 0
Joined: Sat May 17, 2014 1:27 am

step by step help retrieve and shuffle. example..

Also, I saw a way you may ask questions privately instead, can you instruct me on how to do this too.
Thank you..

Kateryna Grynko
Posts: 0
Joined: Thu Nov 15, 2012 9:13 am

step by step help retrieve and shuffle. example..

Hi Travis,

[quote:]can you please guide me on how to delete this question, and other questions I posted on here??[/quote]If I am not mistaking, deleting is possible for forum moderators only. You should be able to remove all the comments. Why do you need to delete all the questions?

[quote:]I saw a way you may ask questions privately instead, can you instruct me on how to do this too.[/quote]Sorry, not sure what you mean. To ask privately you can email a href="mailto:support@appery.io" rel="nofollow"support@appery.io/a.

Travis6876874
Posts: 0
Joined: Sat May 17, 2014 1:27 am

step by step help retrieve and shuffle. example..

Hey, well I'd like what I've asked deleted, it would be nice if that could happen. I just need to email instead, I like it better on here, I must have been mistaken, because I thought I saw a Ask Privately option before. I don't want to share the ideas with everyone, lol, I just want to share the product.If its possible that's great. If not, I have to live with it I guess. Thank Katya)

Travis6876874
Posts: 0
Joined: Sat May 17, 2014 1:27 am

step by step help retrieve and shuffle. example..

Thanks for the help

Travis6876874
Posts: 0
Joined: Sat May 17, 2014 1:27 am

step by step help retrieve and shuffle. example..

i leave it up to you, lol. I don't want it on here, hopefully you might not either, lol )) the people that make up your team are amazing to me.

Kateryna Grynko
Posts: 0
Joined: Thu Nov 15, 2012 9:13 am

step by step help retrieve and shuffle. example..

Hi Travis,

I'll do it for you, just as an exception.

Return to “Issues”