From 05ca29e9d61bbef9488a52c7121b0054c19ca61e Mon Sep 17 00:00:00 2001 From: Ross Cutler <46252169+rosscutler@users.noreply.github.com> Date: Wed, 4 Jun 2025 16:41:51 -0700 Subject: [PATCH] Add hardware requirement info and failure diagnostics --- src/template/ACR_template.html | 54 ++++++++++++++++++------------- src/template/DCR_template.html | 47 ++++++++++++++++----------- src/template/avatar_template.html | 44 ++++++++++++++----------- 3 files changed, 85 insertions(+), 60 deletions(-) diff --git a/src/template/ACR_template.html b/src/template/ACR_template.html index 10a4aea..4f742e1 100644 --- a/src/template/ACR_template.html +++ b/src/template/ACR_template.html @@ -588,9 +588,11 @@ $('.training_time').html(config['forceRetrainingInHours']+" hours" ); $('.question_number_training').html(config['trainingUrls'].length); $('.question_number').html(config['questionUrls'].length); - $('.instruction_device').html(config['device_accepted_device'].join()); - $('.scale_levels').html(config['scale_points']) -} + $('.instruction_device').html(config['device_accepted_device'].join()); + $('.scale_levels').html(config['scale_points']) + $('.min_resolution').html(config.min_resolution.w + 'x' + config.min_resolution.h) + $('.min_speed').html(config['internet_speed_Mbps']) +} /* Called as a listener whenever an input is answered in qualification @@ -972,12 +974,16 @@ record_screen_size(); record_os(); - if (refresh_rate_passed && resolution_check && device_accepted){ - activate_hit(); - }else{ - //alert("Unfortunately your hardware did not pass the minimum requirements. You may refresh this page once, if you see this message for the second time, please return this HIT."); - disableTheHIT(Hide_HIT_REASON.AUTO_TEST_FAILED); - } + if (refresh_rate_passed && resolution_check && device_accepted){ + activate_hit(); + }else{ + if(!resolution_check){ + alert('Your screen resolution is below the required ' + + config.min_resolution.w + 'x' + config.min_resolution.h + '.'); + } + //alert("Unfortunately your hardware did not pass the minimum requirements. You may refresh this page once, if you see this message for the second time, please return this HIT."); + disableTheHIT(Hide_HIT_REASON.AUTO_TEST_FAILED); + } } } //just tmp for test @@ -987,14 +993,14 @@ /** Called when downloading of all videos took too long, show a message and block the hit. **/ -function show_message_too_long_loading(){ - if(page_loading_timer){ - clearTimeout(page_loading_timer); - page_loading_timer= null; - } - alert('It looks like that your Internet connection is too slow for this task. Please return this hit and try again later with a better network connection. Thanks'); - disableTheHIT(Hide_HIT_REASON.AUTO_TEST_FAILED); -} +function show_message_too_long_loading(){ + if(page_loading_timer){ + clearTimeout(page_loading_timer); + page_loading_timer= null; + } + alert('It looks like that your Internet connection is below the required ' + config['internet_speed_Mbps'] + ' Mbps. Please return this hit and try again later with a better network connection. Thanks'); + disableTheHIT(Hide_HIT_REASON.AUTO_TEST_FAILED); +} /** called when all videos are loaded @@ -2486,10 +2492,12 @@
Payment:
@@ -3003,8 +3011,8 @@Unfortunately your hardware or internet connection did not pass the minimum requirements. You may refresh this page once, if you see this message for the second time, please return this HIT.
+Unfortunately your hardware or internet connection did not meet the minimum requirements (resolution , download speed Mbps). You may refresh this page once, if you see this message for the second time, please return this HIT.
diff --git a/src/template/DCR_template.html b/src/template/DCR_template.html
index 0fe8bf6..1ef14bb 100644
--- a/src/template/DCR_template.html
+++ b/src/template/DCR_template.html
@@ -658,7 +658,10 @@
$('.training_time').html(config['forceRetrainingInHours']+" hours" );
$('.question_number_training').html(config['trainingUrls'].length);
$('.question_number').html(config['questionUrls'].length);
- $('.instruction_device').html(config['device_accepted_device'].join());
+ $('.instruction_device').html(config['device_accepted_device'].join());
+
+ $('.min_resolution').html(config.min_resolution.w + 'x' + config.min_resolution.h);
+ $('.min_speed').html(config['internet_speed_Mbps']);
dcr = 'Within each pair only the second clip is processed.' +
'At the end of each paired presentation, you should evaluate the impairment of the second clip (Clip B) with respect to the first clip (Clip A).';
@@ -1056,12 +1059,16 @@
record_screen_size();
record_os();
- if (refresh_rate_passed && resolution_check && device_accepted){
- activate_hit();
- }else{
- //alert("Unfortunately your hardware did not pass the minimum requirements. You may refresh this page once, if you see this message for the second time, please return this HIT.");
- disableTheHIT(Hide_HIT_REASON.AUTO_TEST_FAILED);
- }
+ if (refresh_rate_passed && resolution_check && device_accepted){
+ activate_hit();
+ }else{
+ if(!resolution_check){
+ alert('Your screen resolution is below the required ' +
+ config.min_resolution.w + 'x' + config.min_resolution.h + '.');
+ }
+ //alert("Unfortunately your hardware did not pass the minimum requirements. You may refresh this page once, if you see this message for the second time, please return this HIT.");
+ disableTheHIT(Hide_HIT_REASON.AUTO_TEST_FAILED);
+ }
}
}
@@ -1071,14 +1078,14 @@
/**
Called when downloading of all videos took too long, show a message and block the hit.
**/
-function show_message_too_long_loading(){
- if(page_loading_timer){
- clearTimeout(page_loading_timer);
- page_loading_timer= null;
- }
- alert('It looks like that your Internet connection is too slow for this task. Please return this hit and try it later with a better network connection. Thanks');
- disableTheHIT(Hide_HIT_REASON.AUTO_TEST_FAILED);
-}
+function show_message_too_long_loading(){
+ if(page_loading_timer){
+ clearTimeout(page_loading_timer);
+ page_loading_timer= null;
+ }
+ alert('It looks like that your Internet connection is below the required ' + config['internet_speed_Mbps'] + ' Mbps. Please return this hit and try it later with a better network connection. Thanks');
+ disableTheHIT(Hide_HIT_REASON.AUTO_TEST_FAILED);
+}
/**
Called when all videos are loaded
@@ -2733,8 +2740,10 @@ Payment:
The result of this experiment is very important for us and other scientists working in this area. We have methods that analyze the consistency of your answers. We will use these methods to rank the submitted assignments according to quality.
@@ -3250,8 +3259,8 @@Unfortunately your hardware/connection did not pass the minimum requirements. You may refresh this page once, if you see this message for the second time, please return this HIT and try again in about 1 hour. If you try it sooner, you may see a message that there is no "There is no assignments that match to your qualification or device/connection."
+Unfortunately your hardware/connection did not meet the minimum requirements (resolution , download speed Mbps). You may refresh this page once, if you see this message for the second time, please return this HIT and try again in about 1 hour. If you try it sooner, you may see a message that there is no "There is no assignments that match to your qualification or device/connection."
diff --git a/src/template/avatar_template.html b/src/template/avatar_template.html
index 73cf157..633db22 100644
--- a/src/template/avatar_template.html
+++ b/src/template/avatar_template.html
@@ -752,7 +752,9 @@
$('.training_time').html(config['forceRetrainingInHours']+" hours" );
$('.question_number_training').html(config['trainingUrls'].length);
$('.question_number').html(config['questionUrls'].length);
- $('.instruction_device').html(config['device_accepted_device'].join());
+ $('.instruction_device').html(config['device_accepted_device'].join());
+ $('.min_resolution').html(config.min_resolution.w + 'x' + config.min_resolution.h);
+ $('.min_speed').html(config['internet_speed_Mbps']);
if (config['template']=="avatar_b"){
place_holder_task = "Imagine you want to participate in an online meeting related to your work. You or your counterpart will be represented by an avatar. For each question, please watch the provided video. On left there is an avatar representation whereas on right there is the real video. Provide your opinion on how well the provided avatar represents the facial expression of person in the video.";
place_holder_question = "Watch the video with avatar on left and real video on right. How well does the avatar represent the person and their facial expression in the video?";
@@ -1169,12 +1171,16 @@
record_screen_size();
record_os();
- if (refresh_rate_passed && resolution_check && device_accepted){
- activate_hit();
- }else{
- //alert("Unfortunately your hardware did not pass the minimum requirements. You may refresh this page once, if you see this message for the second time, please return this HIT.");
- disableTheHIT(Hide_HIT_REASON.AUTO_TEST_FAILED);
- }
+ if (refresh_rate_passed && resolution_check && device_accepted){
+ activate_hit();
+ }else{
+ if(!resolution_check){
+ alert('Your screen resolution is below the required ' +
+ config.min_resolution.w + 'x' + config.min_resolution.h + '.');
+ }
+ //alert("Unfortunately your hardware did not pass the minimum requirements. You may refresh this page once, if you see this message for the second time, please return this HIT.");
+ disableTheHIT(Hide_HIT_REASON.AUTO_TEST_FAILED);
+ }
}
}
//just tmp for test
@@ -1185,12 +1191,12 @@
Called when downloading of all videos took too long, show a message and block the hit.
**/
function show_message_too_long_loading(){
- if(page_loading_timer){
- clearTimeout(page_loading_timer);
- page_loading_timer= null;
- }
- alert('It looks like that your Internet connection is too slow for this task. Please return this hit and try again later with a better network connection. Thanks');
- disableTheHIT(Hide_HIT_REASON.AUTO_TEST_FAILED);
+ if(page_loading_timer){
+ clearTimeout(page_loading_timer);
+ page_loading_timer= null;
+ }
+ alert('It looks like that your Internet connection is below the required ' + config['internet_speed_Mbps'] + ' Mbps. Please return this hit and try again later with a better network connection. Thanks');
+ disableTheHIT(Hide_HIT_REASON.AUTO_TEST_FAILED);
}
/**
@@ -3049,10 +3055,12 @@ Payment:
@@ -3597,7 +3605,7 @@Unfortunately your hardware or internet connection did not pass the minimum requirements. You may refresh this page once, if you see this message for the second time, please return this HIT.
+Unfortunately your hardware or internet connection did not meet the minimum requirements (resolution , download speed Mbps). You may refresh this page once, if you see this message for the second time, please return this HIT.