Howdy, Stranger!

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

Supported by

consent OSWeb

edited June 2020 in OpenSesame

Hi,

I need to add a consent form with a checkbox in the beginning of the experiment; and I was wondering if there is any solution to adapt it to the OSWeb for a JATOS study since I just discovered that form items are not compatible.

Best,

Hülya

Comments

  • Hi Hulya,

    Here is some Python code to have an informed consent. Of course you would have to translate it to Javascript, which will be a challenge (if not impossible) as the mouse item cannot be used in javascript inline. But maybe you can use the code to wrap a loop with Opensesame items and the mouse item to mimic the same effect.


    Here the code:

    import os
    
    def drawX(cv,x,y,color):
    	cv.line(x-14 ,y-14 , x+14 , y+14, color=color)
    	cv.line(x-14 ,y+14 , x+14 , y-14, color=color)
    	
    # create objects
    my_cv = canvas()
    my_mouse = mouse()
    my_cv.set_fgcolor('red')
    my_cv.set_penwidth(10)
    
    # image dimensions 
    Iwidth = 1535  
    Iheight = 1151 
    
    #scale image onto screen
    im_scale = min(float(var.width)/Iwidth,1) 
    new_dimX = Iwidth * im_scale
    new_dimY = Iheight * im_scale
    
    # relevant positions of important addons
    rel_Xcheck = 0.24
    rel_Ycheck = 0.78
    rel_Xtext =  0.14
    rel_Ytext = 0.02
    
    # The location of the checkbox
    x_check = -(0.5 * new_dimX - new_dimX * rel_Xcheck)
    y_check = -1 *( 0.5 * new_dimY - new_dimY * rel_Ycheck)
    # The location of the 'participant X' text
    x_text = - (0.5 * new_dimX - rel_Xtext * new_dimX)
    y_text =  - (0.5 * new_dimY - new_dimY * rel_Ytext)
    
    # load image 
    path = pool[u'InformedConsent_EN.png']
    
    #print os.getcwd()
    # show canvas
    save = False
    while True:
    	button, position, timestamp = my_mouse.get_click(timeout=20)
    
    	#draw canvas with image
    	my_cv.image(path,scale = im_scale)
    	# draw participant no on top
    	my_cv.text('subject'+ str(var.subject_nr), x = x_text, y= y_text)
    	pos, foo = my_mouse.get_pos()
    	if x_check - 10 < pos[0] < x_check + 10 and y_check - 10 < pos[1] < y_check + 10:
    		drawX(my_cv,pos[0],pos[1],"green")
    	else:
    		drawX(my_cv,pos[0],pos[1],"red")
    	my_cv.show()
    
    	if button:
    		if x_check - 10 < position[0] < x_check + 10 and y_check - 10 < position[1] < y_check + 10:
    			save = True
    			drawX(my_cv,position[0],position[1],"green")
    			clock.sleep(500)
    			break
    	my_cv.clear()
    if save:
    	
    	baseDir = os.path.join(os.getcwd(),"../experiments/predictiveSwitchingIntention/InformedConsent")
    	path = os.path.join(baseDir,'subject_no_'+str(var.subject_nr)+'.png')
    	self.experiment.window.getMovieFrame()
    	self.experiment.window.movieFrames[0].save(path)
    



    Buy Me A Coffee

  • Hi Eduard!

    Thank you very much for your response, and apologizes for my late answer.

    I also would like to ask for a similar form problem: I need o get multiple keyboard inputs as responses in one sketchpad. Is it possible? I am using the solutions that were recommended before https://forum.cogsci.nl/discussion/6274/is-a-way-to-record-id-of-participants in here, but I couldn't seem to adjust it to my needs. Basically the form is something like this:

    __ % of time I ...

    __ % of time I... and so on. Participants need to enter 10 numbers like this in one form. But when I try the upper solution, the second response always takes the first one - I fixed this by logging different variables for the second (like var.percent1, var.percent2 ... etc = ' ' in the init phase) but then the second one does not take any input at all, and looks like I need to have 10 seperate blocks and sequences and inline scripts for every single answer. Is there a more elegant way to solve this? Here is a screenshot of how I am being ridiculous.


    Best,

    Hülya

  • Hi Hülya,

    I assume you need this for OsWeb (even though you put it on the Opensesame forum). If you actually need it for offline Opensesame, there is no need to use javascript.


    I don't think I understand your issue or your approach. Would you mind explaining again. Or if your problem is the same as you described here, let's try to keep the discussion central and not spread over multiple threads. That only makes things more confusing and messy. So, if these two problems are the same, let's talk in the other discussion.

    Eduard

    Buy Me A Coffee

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