<h1>New Group Assignment Grade</h1>
<h2>(Choose any group, any group assignment, grade 0-100)</h2>

<% form_for(@ggrade) do |f| %>
  <%= f.error_messages %>

  <p>
    <%= f.label :groupnum, "Group Number" %><br />
    <%= f.select :groupnum, 
    Student.find(:all, :select => "DISTINCT Students.groupnum", 
    :conditions => ["groupnum !=  ' ' "],
    :order => "groupnum").collect{|s| [s.groupnum, s.groupnum]} %>
  </p>
  <p>	
    <%= f.label :assignment_id %><br />
    <%= f.select :assignment_id, 
    Assignment.find(:all,  :conditions => ["groupf =  't' "], 
    :order => "due_date").collect{|s| [s.description, s.id]} %>
  </p>
  <p>
    <%= f.label :grade %><br />
    <%= f.text_field :grade %>
  </p>
  <p>
    <%= f.submit 'Create' %>
  </p>
<% end %>

<%= link_to 'Back', ggrades_path %>