1. Food and energy demand is expected to decrease in the coming years. True or false?
- True
- False
Your answer:
2. Technological innovation has the potential to reduce occupational safety & health risk factors. True or false?
- True
- False
Your answer:
3. One of the major impacts of climate change is on the mental health of farmers. True or false?
- True
- False
Your answer:
4. Technological innovation and smart farming pose questions over data protection and privacy. True or false?
- True
- False
Your answer:
5. Rural areas are increasingly more populated. True or false?
- True
- False
Your answer:
$(document).ready(function(){
$('.send').click(function(){ if ( (parseInt($('select.q1').children("option:selected").val()) == 0) || (parseInt($('select.q2').children("option:selected").val()) == 0) || (parseInt($('select.q3').children("option:selected").val()) == 0) || (parseInt($('select.q4').children("option:selected").val()) == 0) || (parseInt($('select.q5').children("option:selected").val()) ==0 ) ) { alert("Answer all questions"); } else { let suma = 0;
if( parseInt($('select.q1').children("option:selected").val()) == 2) { suma++; } else { var el = parseInt($('select.q1').children("option:selected").val()); $('.qo1 li:nth-child('+ el + ')').css('color','red'); }
if( parseInt($('select.q2').children("option:selected").val()) == 1) { suma++; } else { var el = parseInt($('select.q2').children("option:selected").val()); $('.qo2 li:nth-child('+ el + ')').css('color','red'); } if( parseInt($('select.q3').children("option:selected").val()) == 1) { suma++; } else { var el = parseInt($('select.q3').children("option:selected").val()); $('.qo3 li:nth-child('+ el + ')').css('color','red'); } if( parseInt($('select.q4').children("option:selected").val()) == 1) { suma++; } else { var el = parseInt($('select.q4').children("option:selected").val()); $('.qo4 li:nth-child('+ el + ')').css('color','red'); } if( parseInt($('select.q5').children("option:selected").val()) == 2) { suma++; } else { var el = parseInt($('select.q5').children("option:selected").val()); $('.qo5 li:nth-child('+ el + ')').css('color','red'); } $('.good-answer').css('color','green').css('font-weight','bold'); $('.points-panel').html("You've obtained " + suma + "/5 points. The correct answers are highlighted in green
*correct answer - green
**wrong answer - red
" ); if (suma == 1) { $('.points-panel-2').html("
- You have obtained only 1 correct answer – you should read all the module content again
" );
} else if (suma == 2) { $('.points-panel-2').html("
- You have obtained 2 correct answers - you should read all the module content again
" );
} else if (suma == 3) { $('.points-panel-2').html("
- You have 3 correct answers - you should read all the additional material again
" );
} else if (suma == 4) { $('.points-panel-2').html("
- You have 4 correct answers - you may want to read the relevant library section for more information
" ); } else { $('.points-panel-2').html("
- You have answered all questions correctly – congratulations
" ); } }
});
});