Subtract one field from another (Quiz, Getting difference between revisions) I am using the evaluation quiz module. Users fill out the question and (not using the score that is calculated by the quix module) they are given a score by giving each of their answers points which are then totaled. 

I'm wondering is there an easy way to subtract one revision of the users answer from another revision to get the difference. 

I have no problem getting the results from each revision but just dont know how to subtract the second to latest revision from the latest revision.
I could not find a module which does the same, but you can achieve this by custom codes.Not the exact codes but still covers the major things

  // get all revisions for a node
  // this function returns array of revision in order of revisions are created,with the latest revision at the top and last revision as the next array element
  $get_revisions = array_values(node_revision_list(node_load($node_id))));
  if(count($get_revisions) &gt; 1) {
    $current_node_version = $get_revisions[0]-&gt;vid;
    $last_node_version = $get_revisions[1]-&gt;vid;
  } else {
    // No differnece,since there is only one version.
  }

  //Now load the nodes with the versions
  $current_node = node_load($node_id,$latest_node_version);
  $last_node = node_load($node_id,$last_node_version);

  // Once you have loaded nodes you can easily do the custom calculations,something like
  $field_1_diff = $current_node-&gt;field_1_diff... - $last_node-&gt;field_1_diff...