Browse Source

Implementado o registro dos pares e a escolha

Igor 6 years ago
parent
commit
a751ea923f
1 changed files with 14 additions and 4 deletions
  1. 14 4
      view.php

+ 14 - 4
view.php

@@ -18,7 +18,6 @@
  * @license    http://www.gnu.org/copyleft/gpl.html GNU GPL v3 or later
  */
 
-
 require_once(dirname(dirname(dirname(__FILE__))).'/config.php');
 require_once(dirname(__FILE__).'/lib.php');
 
@@ -80,6 +79,9 @@ if(!empty($_POST)) {
   $record->peso5 = $_POST["peso"][4]; // 
   $record->peso6 = $_POST["peso"][5]; // 
 
+  // pares: 
+  $record->pares = $_POST["pares"];
+
   $DB->insert_record('nasatlx_resps', $record, false);
   echo "OK";
   exit;
@@ -117,6 +119,7 @@ var scale      = new Array();
 var left       = new Array();
 var right      = new Array();
 var def        = new Array();
+var abrv       = new Array();
 var NUM_SCALES = 6;
 
 var pairs_reg = '';
@@ -125,32 +128,39 @@ var pairs_reg = '';
 // ã ã
 // í í
 // ç ç
+abrv[0]   = "DML";
 scale[0]  = "Demanda mental"; 
 left[0]   = "Baixa";
 right[0]  = "Alta";
 def[0]    = "Quanto de esforço mental e de percepção as atividades (e.g. pensar, decidir, observar, procurar, etc) demandaram? A tarefa foi fácil ou exigente, simples ou complexa?";
 // "Quanto das atividades mental e perceptual foram exigidas (por exemplo: pensar, decidir, calcular, lembrar, observar, procurar, etc)? A tarefa foi fácil ou difícil, simples ou complexa, rigorosa ou tolerante?";
 
+abrv[1]   = "DFA";
 scale[1]  = "Demanda física"; 
 left[1]   = "Baixa";
 right[1]  = "Alta";
 def[1]    = "Quanto esforço físico foi exigido (por exemplo: empurrar, puxar, virar, controlar, ativar, etc)? A tarefa foi fácil ou exigente, morosa ou rápida, leve ou pesada?";
 
+abrv[2]   = "DTO";
 scale[2]  = "Demanda de tempo"; 
 left[2]   = "Baixa";
 right[2]  = "Alta";
 def[2]    = "Quanta pressão em relação ao tempo você sentiu no ritmo de execução da tarefa? O ritmo era lento e vagaroso ou rápido e frenético?";
 
+abrv[3]   = "DES";
 scale[3]  = "Desempenho"; 
 left[3]   = "Boa";
 right[3]  = "Ruim";
 def[3]    = "Quão bem sucedido você se considera ao realizar os objetivos da tarefa? Ficou satisfeito com o seu desempenho no cumprimento dessas metas?";
 
+
+abrv[4]   = "ESF";
 scale[4]  = "Esforço"; 
 left[4]   = "Baixo";
 right[4]  = "Alto";
 def[4]    = "O quão duro você teve de trabalhar o (mental e fisicamente) para alcançar o seu nível de desempenho?";
 
+abrv[5]   = "FRU";
 scale[5]  = "Frustração"; 
 left[5]   = "Baixa";
 right[5]  = "Alta";
@@ -310,7 +320,7 @@ function setPairLabels () {
   if (pair_num > 0) {
     pairs_reg += ', '
   }
-  pairs_reg += '{' + pair1 + ' x ' + pair2 + '}';
+  pairs_reg += '{' + abrv[indexes[0]] + ' x ' + abrv[indexes[1]] + '}';
 
   document.getElementById('pair1').value = pair1;
   document.getElementById('pair2').value = pair2;
@@ -326,7 +336,7 @@ function buttonPair1 () {
   indexes = pair[pair_num].split(" ");
   results_tally[indexes[0]]++; // register the winning item (just to total amount)
 
-  pairs_reg += ' = ' + scale[indexes[0]];
+  pairs_reg += ' = ' + abrv[indexes[0]];
 
   nextPair();
   return true;
@@ -339,7 +349,7 @@ function buttonPair2 () {
   indexes = pair[pair_num].split(" ");
   results_tally[indexes[1]]++; // register the winning item (just to total amount)
 
-  pairs_reg += ' = ' + scale[indexes[1]];
+  pairs_reg += ' = ' + abrv[indexes[1]];
 
   nextPair();
   return true;