Howdy, Stranger!

It looks like you're new here. If you want to get involved, click one of these buttons!

Supported by

log, overwriting, form base

Dear Sebastian,

First of all, thank you very much for this wonderful and lifesaving programme. It’s really a must for anyone who is doing experiments in psychology.
I used the tutorials and forum a lot and I’ve been able to find all I needed so far. However, now I have a problem that’s been giving me headaches for days. I’ve read all forum posts about it but I just cannot find the solution, or it could be that I don’t understand what you’ve been proposing.

I won’t bother you with all experiment, just the problematic part. I want to give my participants a test with proposed answers and they should pick one out. In the loop I have following variables: question, responseA … responseE, q_number. After that I have a form base which I coded like this:
widget 1 1 8 2 label center=yes text="[question]"
widget 0 4 1 1 checkbox group=group1 text=a var=answer
widget 0 5 1 1 checkbox group=group1 text=b var=answer
widget 0 6 1 1 checkbox group=group1 text=c var=answer
widget 0 7 1 1 checkbox group=group1 text=d var=answer
widget 0 8 1 1 checkbox group=group1 text=e var=answer
widget 1 4 5 1 label center=no text="[repA]"
widget 1 5 5 1 label center=no text="[repB]"
widget 1 6 5 1 label center=no text="[repC]"
widget 1 7 5 1 label center=no text="[repD]"
widget 1 8 5 1 label center=no text="[repE]"
widget 5 9 1 1 button center=yes text=ok

After that I have a logger. However, when I run the experiment, what I get is only the last response. I understand it is because of my code since it rewrites it every time. I’ve tried adding several incline scripts like: if var.Q_number == 1
answer1 = 'answer'
But it didn’t work. I tried resetting the counter (but I wasn’t sure which variable I should reset). I tried using self.experiment.set("answer1", self.get("answer")) that you proposed in one of the posts, but it didn’t work. So could you please tell me what am I doing wrong and what incline script I should write in order to get in my log the answer for each question.
Thank you in advance for saving my experiment and life.

Comments

  • Hi,

    I'm not sure whether I understand your structure. Maybe it would be better if you bothered us with a little more of your experiment :smile: .
    Are the question all on the same form, or on separate forms that are executed in sequence? If they are separate then you only need add a logger in between each of the forms.

    Eudard

    Buy Me A Coffee

  • Hi Eduard,

    Thanks for your quick reply.
    In short, all questions are in the same form.

    Longer version :) :
    Basically i just want to ask participants some multiple choice questions in a random order and to collect their choice for each question. (it sounds very simple, but i'm having really hard time figuring this out)

    In the loop I have a variable "question", variables "response a", "response b", "response c" etc. and "Q_number" which is the question number.
    After that I have a form in which I present questions (widget 1 1 8 2 label center=yes text="[question]") and their proposed answers (widget 0 4 1 1 checkbox group=group1 text=a var=answer). So practically all questions are on the same form.

    Now I understand that as the program starts new question it reads the form code from the begining and it rewrites the variable answer (widget 0 4 1 1 checkbox group=group1 text=a var=answer).

    So I think I need a line or an incline script where I would tell it to save the response for each question before it continues to the next one.

    I know that it would be much easier to have a form for each question, but I'm not sure how to make them random then.

    Thank you in advance for your help.

  • Hi,

    In that case, how about not using answer for each question, but something unique?

    I know that it would be much easier to have a form for each question, but I'm not sure how to make them random then.

    That is also quite doable, especially if you have the elements (questions and answer options) already coded in a loop. If every row of your loop table has a unique question. You can make a loop-sequence which iterates over the questions. Randomization shouldn't be a problem.

    Eduard

    Buy Me A Coffee

  • Hmm I think it would be best to show how it looks (perhaps I didn't explain it that well):

    These are the experiment and the form. When I try writing something like var="answer\_[Q_number]" it tells me that answer_1 is not a valid name. And I am not sure how to use different name for each question in the same forme_base.

    The second thing you propose is precisely how I do it right now, but in one form. I cannot seem to add more than one form_base in one loop.

    I know that this is something very basic and easy and I apologize for taking your time. I'm just stucked here.

  • edited March 2018

    Oh, now it is clear. Your logger is not correctly placed. It has to be inside the sequence, right after your form, not outside the sequence. This should fix it. No need for changing variables names, and that kinda stuff.

    Eduard

    Buy Me A Coffee

  • Dear Eduard,

    Thank you so very much! I knew it was something very easy I was missing. Hahaha I cannot believe I missplaced it.

    Once again, thank you very much and have a nice weekend.

Sign In or Register to comment.

agen judi bola , sportbook, casino, togel, number game, singapore, tangkas, basket, slot, poker, dominoqq, agen bola. Semua permainan bisa dimainkan hanya dengan 1 ID. minimal deposit 50.000 ,- bonus cashback hingga 10% , diskon togel hingga 66% bisa bermain di android dan IOS kapanpun dan dimana pun. poker , bandarq , aduq, domino qq , dominobet. Semua permainan bisa dimainkan hanya dengan 1 ID. minimal deposit 10.000 ,- bonus turnover 0.5% dan bonus referral 20%. Bonus - bonus yang dihadirkan bisa terbilang cukup tinggi dan memuaskan, anda hanya perlu memasang pada situs yang memberikan bursa pasaran terbaik yaitu http://45.77.173.118/ Bola168. Situs penyedia segala jenis permainan poker online kini semakin banyak ditemukan di Internet, salah satunya TahunQQ merupakan situs Agen Judi Domino66 Dan BandarQ Terpercaya yang mampu memberikan banyak provit bagi bettornya. Permainan Yang Di Sediakan Dewi365 Juga sangat banyak Dan menarik dan Peluang untuk memenangkan Taruhan Judi online ini juga sangat mudah . Mainkan Segera Taruhan Sportbook anda bersama Agen Judi Bola Bersama Dewi365 Kemenangan Anda Berapa pun akan Terbayarkan. Tersedia 9 macam permainan seru yang bisa kamu mainkan hanya di dalam 1 ID saja. Permainan seru yang tersedia seperti Poker, Domino QQ Dan juga BandarQ Online. Semuanya tersedia lengkap hanya di ABGQQ. Situs ABGQQ sangat mudah dimenangkan, kamu juga akan mendapatkan mega bonus dan setiap pemain berhak mendapatkan cashback mingguan. ABGQQ juga telah diakui sebagai Bandar Domino Online yang menjamin sistem FAIR PLAY disetiap permainan yang bisa dimainkan dengan deposit minimal hanya Rp.25.000. DEWI365 adalah Bandar Judi Bola Terpercaya & resmi dan terpercaya di indonesia. Situs judi bola ini menyediakan fasilitas bagi anda untuk dapat bermain memainkan permainan judi bola. Didalam situs ini memiliki berbagai permainan taruhan bola terlengkap seperti Sbobet, yang membuat DEWI365 menjadi situs judi bola terbaik dan terpercaya di Indonesia. Tentunya sebagai situs yang bertugas sebagai Bandar Poker Online pastinya akan berusaha untuk menjaga semua informasi dan keamanan yang terdapat di POKERQQ13. Kotakqq adalah situs Judi Poker Online Terpercayayang menyediakan 9 jenis permainan sakong online, dominoqq, domino99, bandarq, bandar ceme, aduq, poker online, bandar poker, balak66, perang baccarat, dan capsa susun. Dengan minimal deposit withdraw 15.000 Anda sudah bisa memainkan semua permaina pkv games di situs kami. Jackpot besar,Win rate tinggi, Fair play, PKV Games