在mturk workerandbox中提交了HIT,但无法在请求者沙箱中查看结果

时间:2018-09-22 18:41:26

标签: javascript html amazon-web-services mechanicalturk

在沙盒环境中测试示例MTurk任务时,我一直遇到神秘的问题。在请求者环境中,我通过将HTML / JS代码复制/粘贴到“创建”>“编辑项目”>“(2)设计布局”下的“源”文本框中来创建任务。

我能够预览该页面上的任务,并且看来工作正常。我还可以在RequesterSandbox中发布HIT,将其放置在此页面上:RequesterSandbox > Manage > Results

我也可以登录WorkerSandbox,找到我的HIT,然后完成它。但是,当我按“提交”时,我被重定向到一个页面,该页面显示“正在加载下一个HIT ...”,然后另一个页面显示为"Sorry, we couldn't find that page. Strange...the page you were looking for is not here. Let's go home and try again"

返回到RequesterSandbox,完全没有证据表明HIT已提交,我找不到HIT结果。我怀疑它没有在WorkerSandbox中正确提交,但是我不确定如何解决它。任何建议将不胜感激!!

这是我的示例任务的HTML / javascript代码:

// extract url parameters
var queryDict = {};
location.search.substr(1).split("&").forEach(function(item) {
  queryDict[item.split("=")[0]] = item.split("=")[1]
})

// use extracted url parameters to populate form
$("#endForm").attr("action",queryDict["host"]);
$("#assignmentID").val(queryDict["assignmentId"]);
$("workerId").val(queryDict["workerId"]);
$("#hitId").val(queryDict["hitId"]); 

// reveal submit button after radio button is selected 
$('#question_buttons').change(function(){
  var btnResponse = $("input[name='theseButtons']:checked").val();
  if (btnResponse == "thisOne" || btnResponse == "thatOne") {
    $("#endTask").removeClass("hidden");
  }
})

// submit response 
$("submitButton").click(function() {
      $("#endForm").submit();
});
<!DOCTYPE html>
<html lang="en">
<head>
	<title>MTurk HIT Test</title>
	<meta charset="utf-8" />
	<meta content="width=device-width, initial-scale=1" name="viewport" />
	<link href="https://maxcdn.bootstrapcdn.com/bootstrap/3.3.7/css/bootstrap.min.css" rel="stylesheet" />
	<script src="https://ajax.googleapis.com/ajax/libs/jquery/3.3.1/jquery.min.js"></script>
</head>

<form action="https://workersandbox.mturk.com/mturk/externalSubmit" id="endForm" method="post" name="endForm">
	<input id="data" name="data" type="hidden" value="" /> 
	<input id="assignmentId" name="assignmentId" type="hidden" value="{{ assignment_id }}" /> 
	<input id="workerId" name="workerId" type="hidden" value="{{ workerId }}" /> 
	<input id="hitId" name="hitId" type="hidden" value="{{ hitId }}" />

	<div class="container">
		<h3>Write something:</h3>
		<br />
		<textarea cols="50" name="answer" rows="2"></textarea>
	</div>

	<div class="container" id="question_text">
		<h3>Select one of these options:</h3>
	</div>

	<div class="container" id="question_buttons">
		<div class="radio-inline">
			<label><input name="theseButtons" type="radio" value="thisOne" />this one</label>
		</div>

		<div class="radio-inline"><label>
			<input name="theseButtons" type="radio" value="thatOne" />that one</label>
		</div>
	</div>

	<div class="container hidden" id="endTask">
		<h3>Submit form by clicking the button below:</h3>
		<br />
		<input id="submitButton" name="submitButton" type="submit" />
	</div>
</form>

1 个答案:

答案 0 :(得分:0)

在沙盒工作界面上创建的结果不会显示在沙盒请求者页面上。

您还可以通过以下URL查看答案: MTurk HITs created Through Java API are not showing on Manage Tab on UI 有一个控制台工具可以在沙箱上管理Mturk HIT。