anchor.diff:  <%# E1860 : Auto Populate the Dates when the instructor enters the first submission date of the topic %>
   <%# This is done based on the difference in dates of the first topic in that staggered Assignment %>
   <script type="text/javascript">
  -    $('.datetimepicker').datetimepicker({
  +$('.datetimepicker').datetimepicker({
       dateFormat: 'yy/mm/dd',
       timeFormat: 'HH:mm:ss'
   });
   
  -function populateDates(topic_id, review_rounds) {
  +function populateDueDates(topic_id, review_rounds) {
       elementsArray = [];
       $('[id^="due_date_<%= @assignment.sign_up_topics[0].id %>"]').each( function(i, e) {
           /* you can use e.id instead of $(e).attr('id') */
  
positive.code:     var offsetArray = [];
      var offset = 0
      for (var i = 1; i < elementsArray.length; i++) {
          offset += dateDiffInDays(new Date(elementsArray[i-1]), new Date(elementsArray[i]))
          offsetArray.push(offset);
      }
  
      // Get the ids of input field we need to populate
  
negative.code:       <% for review_round in 1..review_rounds %>
          <% topic_id = @assignment.sign_up_topics[i].id %>
          <%# Add the javascript trigger for onfocusout only for the first input field in the table, this way we do not intentinally trigger it when changing the other dates %>
          <%# Do not add for first topic because we use that as a references %>
          <td><%= text_field :due_date, (topic_id.to_s + '_submission_' + review_round.to_s + '_due_date').to_s, size: 20, value: check_topic_due_date_value(assignment_submission_due_dates, topic_id, 1, review_round), class: 'datetimepicker', onfocusout: (i != 0 && review_round == 1) ? "javascript:populateDueDates(#{topic_id}, #{review_rounds})" : nil %></td>
          <td><%= text_field :due_date, (topic_id.to_s + '_review_' + review_round.to_s + '_due_date').to_s, size: 20, value: check_topic_due_date_value(assignment_review_due_dates, topic_id, 2, review_round), class: 'datetimepicker' %></td>
        <%end%>
      </tr>
  