<div class="menu">
  <table>
    <tr>
      <td><div class="menu_item selected"><%= linkToObjectAction "Discover", $model, "page1" %></div></td>
      <td><div class="menu_item"><%= linkToObjectAction "Challenge Motion", $model, "page2" %></div></td>
      <td><div class="menu_item"><%= linkToObjectAction "Challenge Slider", $model, "page3" %></div></td>
    </tr>
  </table>
</div>
<hr />
<div id="content">

  <h1><%= $activityRoot.name %> Report: Discover</h1>
  
  <p>Class name: <%= class_name %>, Teacher name: <%= teacher_name %></p>
  
  <p>Investigations into one dimensional motion using the motion sensor and graphs with tables.</p>
  
  <br />
  <h3>Predicting Motion</h3>
 
  <% users_who_made_prediction_graph =  users.find_all {|user| hasUserModified $predictionData, user } %>
  <% users_who_did_not_make_prediction_graph =  users.find_all {|user| ! hasUserModified $predictionData, user } %>


  <p>
    <%= users_who_made_prediction_graph.length %> out of <%= users.length %> users created a prediction graph: 
    <%= users_who_made_prediction_graph.collect { |user| user.name }.join(', ') %>
  </p>
  <p> 
    <%= users_who_did_not_make_prediction_graph.length %> out of <%= users.length %> users did not make a prediction graph: 
    <%= users_who_did_not_make_prediction_graph.collect { |user| user.name }.join(', ') %>
  </p>

  <table border="0" width="900" cellspacing="20">
    <tr>
      <td width="800">
        <%= embedObject multiUserGraph($predictionGraph, $predictionData) %>
      </td>
      <td>
        This graph has all of the student predictions for this question.
      </td>
    </tr>
  </table>

  <br />
  <h3>Describing Motion </h3>
  <%= embedObject $describeMotionQuestion.prompt %><br/>
  <table border="1">
    <tr><th>User</th><th>Answer</th><tr/>
    <% users.each do |user| %> 
    <% next unless hasUserModified $describeMotionAnswer, user %>
    <tr>
      <td><%= user.name %></td>
      <td><%= userObject($describeMotionAnswer, user).text %></td>
    </tr>
    <% end %>
  </table>
</div>