<?xml version="1.0"?>
<feed xmlns="http://www.w3.org/2005/Atom" xml:lang="en">
	<id>https://wiki.expertiza.ncsu.edu/api.php?action=feedcontributions&amp;feedformat=atom&amp;user=Jhmadhwa</id>
	<title>Expertiza_Wiki - User contributions [en]</title>
	<link rel="self" type="application/atom+xml" href="https://wiki.expertiza.ncsu.edu/api.php?action=feedcontributions&amp;feedformat=atom&amp;user=Jhmadhwa"/>
	<link rel="alternate" type="text/html" href="https://wiki.expertiza.ncsu.edu/index.php?title=Special:Contributions/Jhmadhwa"/>
	<updated>2026-05-06T06:30:40Z</updated>
	<subtitle>User contributions</subtitle>
	<generator>MediaWiki 1.41.0</generator>
	<entry>
		<id>https://wiki.expertiza.ncsu.edu/index.php?title=E1843_Issues_Related_To_Deadlines&amp;diff=118895</id>
		<title>E1843 Issues Related To Deadlines</title>
		<link rel="alternate" type="text/html" href="https://wiki.expertiza.ncsu.edu/index.php?title=E1843_Issues_Related_To_Deadlines&amp;diff=118895"/>
		<updated>2018-11-08T23:02:58Z</updated>

		<summary type="html">&lt;p&gt;Jhmadhwa: /* References */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;This wiki page is for the description of changes made under E1843 OSS assignment for Fall 2018, CSC/ECE 517.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
== '''About Expertiza''' ==&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Expertiza is an open source project based on Ruby on Rails framework and the code is available on Github. Expertiza allows the instructor to create new assignments as well as edit new or existing assignments. Instructors can also create a list of topics the students can sign up for and specify deadlines for completion of various tasks. Students can form teams in Expertiza to work on various projects and assignments as well as peer review other students' submissions. Expertiza supports submission across various document types, including the URLs Wiki pages.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
== '''Issues in the Current Project''' ==&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
1.There is no deadline that specifies when a team can drop their topics. Due to this, few problems occur: The team might drop a topic later on which is close to the submission date and this results in topic not being assigned to any other team on time such that they can submit their assignment. Also, if one team was wait listed for the same topic which the other team dropped closer to the submission deadline, then the first team will be assigned to the dropped topic which is not desirable as they might be working on their assigned topic for long time.&lt;br /&gt;
&lt;br /&gt;
2.There are different topics on which students can work during different times. This type of assignment is known as Staggered- deadline assignment in which different topics have different submission and review deadlines. For these assignments too, there is a need for &amp;quot;Drop Topics Deadline&amp;quot;. In the current implementation, the drop topic deadline is same for all the topics in a Staggered Deadline assignment which is not desirable.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
== '''Corrections made in the New Project''' ==&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
1. The instructor can specify a Drop Topic deadline date now. After a drop topic deadline passes, the &amp;quot;X&amp;quot; in the Sign-Up sheet disables so that the student cannot drop the topic and the waitlist gets cleared.&lt;br /&gt;
&lt;br /&gt;
2. Staggered deadline assignments now have different drop deadlines for different topics in that assignment.&lt;br /&gt;
&lt;br /&gt;
== '''Files modified in Current Project''' ==&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
1. app/controllers/assignments_controller.rb&lt;br /&gt;
&lt;br /&gt;
2. app/controllers/sign_up_sheet_controller.rb&lt;br /&gt;
&lt;br /&gt;
3. app/models/student_task.rb&lt;br /&gt;
&lt;br /&gt;
4. app/views/assignments/edit.html.erb&lt;br /&gt;
&lt;br /&gt;
5. app/views/sign_up_sheet/_add_signup_topics_staggered.html.erb&lt;br /&gt;
&lt;br /&gt;
6. app/views/sign_up_sheet/_due_dates.html.erb&lt;br /&gt;
&lt;br /&gt;
== '''Current Implementation''' ==&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
1. Clearing the waitlist after Drop Deadline passes is implemented in sign_up_sheet_controller.rb where it is checked if the current time is greater than the time mentioned in Drop deadline. If the deadline has been passed, the 'update_is_waitlisted' method of SignedUpTeam model is called to delete all the waitlisted teams. The code snippets for the changes made are attached below:&lt;br /&gt;
&lt;br /&gt;
(i) app/controllers/sign_up_sheet_controller.rb&lt;br /&gt;
&lt;br /&gt;
    if !topic_id1.nil? and !@drop_topic_deadline1.nil? and Time.now &amp;gt; @drop_topic_deadline1.due_at&lt;br /&gt;
    SignedUpTeam.update_is_waitlisted(topic_id1.topic_id,team_id) end&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
(ii) The 'update_is_waitlisted' method is implemented in app/models/signed_up_team.rb as follows:&lt;br /&gt;
&lt;br /&gt;
     def self.update_is_waitlisted(topic_i)&lt;br /&gt;
     topic_id1 = SignedUpTeam.where(team_id: team_id).first&lt;br /&gt;
     if @assignment.staggered_deadline?&lt;br /&gt;
     @drop_topic_deadline1 = TopicDueDate.where(parent_id: topic_id1.topic_id, deadline_type_id: 6).first rescue nil end&lt;br /&gt;
     due_dates = params[:due_date]&lt;br /&gt;
     topics = SignUpTopic.where(assignment_id: params[:assignment_id])&lt;br /&gt;
     review_rounds = assignment.num_review_rounds&lt;br /&gt;
     topics.each_with_index do |topic, index|&lt;br /&gt;
     for i in 1..review_rounds&lt;br /&gt;
         @topic_drop_topic_due_date = due_dates[topics[index].id.to_s + '_drop_topic_' + i.to_s + '_due_date']&lt;br /&gt;
         if assignment.due_dates.select {|due_date| due_date.deadline_type_id == 6 }.nil?&lt;br /&gt;
         @assignment_drop_topic_due_date = DateTime.parse(@assignment_drop_topic_due_dates[i - 1].due_at.to_s).strftime(&amp;quot;%Y-%m-%d %H:%M&amp;quot;)&lt;br /&gt;
     end&lt;br /&gt;
     end&lt;br /&gt;
&lt;br /&gt;
(iii) app/helpers/sign_up_sheet_helper.rb&lt;br /&gt;
&lt;br /&gt;
      if assignment_due_dates.length == 0&lt;br /&gt;
         assignment_due_dates = @assignment_submission_due_dates&lt;br /&gt;
      end&lt;br /&gt;
&lt;br /&gt;
(iv) app/models/student_task.rb&lt;br /&gt;
&lt;br /&gt;
     def self.get_due_date_data(assignment, timeline_list, participant)&lt;br /&gt;
     if assignment.staggered_deadline?&lt;br /&gt;
        team_id = participant.team.try(:id)&lt;br /&gt;
        topic_id1 = SignedUpTeam.where(team_id: team_id).first&lt;br /&gt;
        if !topic_id1.nil?&lt;br /&gt;
           topic_due_date = TopicDueDate.where(parent_id: topic_id1.topic_id, deadline_type_id: 6).first rescue nil&lt;br /&gt;
           timeline = {label: ('Drop Topic Deadline').humanize}&lt;br /&gt;
           timeline[:updated_at] = topic_due_date.due_at.strftime('%a, %d %b %Y %H:%M')&lt;br /&gt;
           timeline_list &amp;lt;&amp;lt; timeline&lt;br /&gt;
        end&lt;br /&gt;
     end&lt;br /&gt;
     assignment.due_dates.each do |dd|&lt;br /&gt;
     timeline = {label: (dd.deadline_type.name + ' Deadline').humanize}&lt;br /&gt;
     unless dd.due_at.nil?&lt;br /&gt;
           timeline[:updated_at] = dd.due_at.strftime('%a, %d %b %Y %H:%M')&lt;br /&gt;
           timeline_list &amp;lt;&amp;lt; timeline&lt;br /&gt;
     end&lt;br /&gt;
     end&lt;br /&gt;
     end&lt;br /&gt;
&lt;br /&gt;
(v) app/views/assignments/edit.html.erb&lt;br /&gt;
&lt;br /&gt;
    &amp;lt;% if @assignment_form.assignment.staggered_deadline == true %&amp;gt;&lt;br /&gt;
    &amp;lt;%= render partial: '/sign_up_sheet/add_signup_topics_staggered', locals: {review_rounds: @review_rounds, assignment_submission_due_dates:        @assignment_submission_due_dates, assignment_review_due_dates: @assignment_review_due_dates, assignment_drop_topic_due_dates: @assignment_drop_topic_due_dates} %&amp;gt;&lt;br /&gt;
    &amp;lt;% else %&amp;gt;&lt;br /&gt;
    &amp;lt;%= render '/sign_up_sheet/add_signup_topics' %&amp;gt;&lt;br /&gt;
    &amp;lt;% end %&amp;gt;&lt;br /&gt;
&lt;br /&gt;
(vi) app/views/sign_up_sheet/_add_signup_topics_staggered.html.erb&lt;br /&gt;
&lt;br /&gt;
     &amp;lt;%= form_tag :controller =&amp;gt; 'sign_up_sheet', :action =&amp;gt; 'save_topic_deadlines', :assignment_id =&amp;gt; @assignment.id do %&amp;gt;&lt;br /&gt;
&lt;br /&gt;
     &amp;lt;br/&amp;gt;&amp;lt;%= render :partial =&amp;gt; '/sign_up_sheet/due_dates', :locals =&amp;gt; {review_rounds: review_rounds, assignment_submission_due_dates:    assignment_submission_due_dates, assignment_review_due_dates: assignment_review_due_dates, assignment_drop_topic_due_dates: assignment_drop_topic_due_dates} %&amp;gt;&lt;br /&gt;
     &amp;lt;% end %&amp;gt;&lt;br /&gt;
&lt;br /&gt;
(vii) app/views/sign_up_sheet/_due_dates.html.erb&lt;br /&gt;
&lt;br /&gt;
      &amp;lt;tr&amp;gt;&lt;br /&gt;
      &amp;lt;th&amp;gt;Drop deadline&amp;lt;/th&amp;gt;&lt;br /&gt;
      &amp;lt;%for i in 2..review_rounds%&amp;gt;&lt;br /&gt;
      &amp;lt;td&amp;gt;&amp;lt;%= @assignment.sign_up_topics[i].topic_name %&amp;gt;&amp;lt;/td&amp;gt;&lt;br /&gt;
      &amp;lt;% for review_round in 1..review_rounds %&amp;gt;&lt;br /&gt;
      &amp;lt;% topic_id = @assignment.sign_up_topics[i].id %&amp;gt;&lt;br /&gt;
      &amp;lt;%if review_round == 1 %&amp;gt;&lt;br /&gt;
      &amp;lt;td&amp;gt;&amp;lt;%= text_field :due_date, (topic_id.to_s + '_drop_topic_' + review_round.to_s + '_due_date').to_s, size: 20, value:    check_topic_due_date_value(assignment_drop_topic_due_dates, topic_id, 6, review_round) %&amp;gt;&amp;lt;/td&amp;gt;&lt;br /&gt;
      &amp;lt;td&amp;gt;&amp;lt;%= 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) %&amp;gt;&amp;lt;/td&amp;gt;&lt;br /&gt;
      &amp;lt;td&amp;gt;&amp;lt;%= 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) %&amp;gt;&amp;lt;/td&amp;gt;&lt;br /&gt;
      &amp;lt;%else%&amp;gt;&lt;br /&gt;
      &amp;lt;td&amp;gt;&amp;lt;%= 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) %&amp;gt;&amp;lt;/td&amp;gt;&lt;br /&gt;
      &amp;lt;td&amp;gt;&amp;lt;%= 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) %&amp;gt;&amp;lt;/td&amp;gt; &amp;lt;%end%&amp;gt; &amp;lt;%end%&amp;gt;&lt;br /&gt;
      &amp;lt;/tr&amp;gt;&lt;br /&gt;
      &amp;lt;%end%&amp;gt;&lt;br /&gt;
&lt;br /&gt;
== '''Test Plan''' ==&lt;br /&gt;
&lt;br /&gt;
The project does not require any Unit Test cases to be implemented.&lt;br /&gt;
&lt;br /&gt;
== '''References''' ==&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
1. Expertiza on GitHub&lt;br /&gt;
&lt;br /&gt;
2. GitHub Project Repository Fork&lt;br /&gt;
&lt;br /&gt;
3. The live Expertiza website&lt;br /&gt;
&lt;br /&gt;
4. Demo link&lt;br /&gt;
&lt;br /&gt;
5. Expertiza project documentation wiki&lt;/div&gt;</summary>
		<author><name>Jhmadhwa</name></author>
	</entry>
	<entry>
		<id>https://wiki.expertiza.ncsu.edu/index.php?title=E1843_Issues_Related_To_Deadlines&amp;diff=118893</id>
		<title>E1843 Issues Related To Deadlines</title>
		<link rel="alternate" type="text/html" href="https://wiki.expertiza.ncsu.edu/index.php?title=E1843_Issues_Related_To_Deadlines&amp;diff=118893"/>
		<updated>2018-11-08T23:02:08Z</updated>

		<summary type="html">&lt;p&gt;Jhmadhwa: /* References */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;This wiki page is for the description of changes made under E1843 OSS assignment for Fall 2018, CSC/ECE 517.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
== '''About Expertiza''' ==&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Expertiza is an open source project based on Ruby on Rails framework and the code is available on Github. Expertiza allows the instructor to create new assignments as well as edit new or existing assignments. Instructors can also create a list of topics the students can sign up for and specify deadlines for completion of various tasks. Students can form teams in Expertiza to work on various projects and assignments as well as peer review other students' submissions. Expertiza supports submission across various document types, including the URLs Wiki pages.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
== '''Issues in the Current Project''' ==&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
1.There is no deadline that specifies when a team can drop their topics. Due to this, few problems occur: The team might drop a topic later on which is close to the submission date and this results in topic not being assigned to any other team on time such that they can submit their assignment. Also, if one team was wait listed for the same topic which the other team dropped closer to the submission deadline, then the first team will be assigned to the dropped topic which is not desirable as they might be working on their assigned topic for long time.&lt;br /&gt;
&lt;br /&gt;
2.There are different topics on which students can work during different times. This type of assignment is known as Staggered- deadline assignment in which different topics have different submission and review deadlines. For these assignments too, there is a need for &amp;quot;Drop Topics Deadline&amp;quot;. In the current implementation, the drop topic deadline is same for all the topics in a Staggered Deadline assignment which is not desirable.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
== '''Corrections made in the New Project''' ==&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
1. The instructor can specify a Drop Topic deadline date now. After a drop topic deadline passes, the &amp;quot;X&amp;quot; in the Sign-Up sheet disables so that the student cannot drop the topic and the waitlist gets cleared.&lt;br /&gt;
&lt;br /&gt;
2. Staggered deadline assignments now have different drop deadlines for different topics in that assignment.&lt;br /&gt;
&lt;br /&gt;
== '''Files modified in Current Project''' ==&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
1. app/controllers/assignments_controller.rb&lt;br /&gt;
&lt;br /&gt;
2. app/controllers/sign_up_sheet_controller.rb&lt;br /&gt;
&lt;br /&gt;
3. app/models/student_task.rb&lt;br /&gt;
&lt;br /&gt;
4. app/views/assignments/edit.html.erb&lt;br /&gt;
&lt;br /&gt;
5. app/views/sign_up_sheet/_add_signup_topics_staggered.html.erb&lt;br /&gt;
&lt;br /&gt;
6. app/views/sign_up_sheet/_due_dates.html.erb&lt;br /&gt;
&lt;br /&gt;
== '''Current Implementation''' ==&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
1. Clearing the waitlist after Drop Deadline passes is implemented in sign_up_sheet_controller.rb where it is checked if the current time is greater than the time mentioned in Drop deadline. If the deadline has been passed, the 'update_is_waitlisted' method of SignedUpTeam model is called to delete all the waitlisted teams. The code snippets for the changes made are attached below:&lt;br /&gt;
&lt;br /&gt;
(i) app/controllers/sign_up_sheet_controller.rb&lt;br /&gt;
&lt;br /&gt;
    if !topic_id1.nil? and !@drop_topic_deadline1.nil? and Time.now &amp;gt; @drop_topic_deadline1.due_at&lt;br /&gt;
    SignedUpTeam.update_is_waitlisted(topic_id1.topic_id,team_id) end&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
(ii) The 'update_is_waitlisted' method is implemented in app/models/signed_up_team.rb as follows:&lt;br /&gt;
&lt;br /&gt;
     def self.update_is_waitlisted(topic_i)&lt;br /&gt;
     topic_id1 = SignedUpTeam.where(team_id: team_id).first&lt;br /&gt;
     if @assignment.staggered_deadline?&lt;br /&gt;
     @drop_topic_deadline1 = TopicDueDate.where(parent_id: topic_id1.topic_id, deadline_type_id: 6).first rescue nil end&lt;br /&gt;
     due_dates = params[:due_date]&lt;br /&gt;
     topics = SignUpTopic.where(assignment_id: params[:assignment_id])&lt;br /&gt;
     review_rounds = assignment.num_review_rounds&lt;br /&gt;
     topics.each_with_index do |topic, index|&lt;br /&gt;
     for i in 1..review_rounds&lt;br /&gt;
         @topic_drop_topic_due_date = due_dates[topics[index].id.to_s + '_drop_topic_' + i.to_s + '_due_date']&lt;br /&gt;
         if assignment.due_dates.select {|due_date| due_date.deadline_type_id == 6 }.nil?&lt;br /&gt;
         @assignment_drop_topic_due_date = DateTime.parse(@assignment_drop_topic_due_dates[i - 1].due_at.to_s).strftime(&amp;quot;%Y-%m-%d %H:%M&amp;quot;)&lt;br /&gt;
     end&lt;br /&gt;
     end&lt;br /&gt;
&lt;br /&gt;
(iii) app/helpers/sign_up_sheet_helper.rb&lt;br /&gt;
&lt;br /&gt;
      if assignment_due_dates.length == 0&lt;br /&gt;
         assignment_due_dates = @assignment_submission_due_dates&lt;br /&gt;
      end&lt;br /&gt;
&lt;br /&gt;
(iv) app/models/student_task.rb&lt;br /&gt;
&lt;br /&gt;
     def self.get_due_date_data(assignment, timeline_list, participant)&lt;br /&gt;
     if assignment.staggered_deadline?&lt;br /&gt;
        team_id = participant.team.try(:id)&lt;br /&gt;
        topic_id1 = SignedUpTeam.where(team_id: team_id).first&lt;br /&gt;
        if !topic_id1.nil?&lt;br /&gt;
           topic_due_date = TopicDueDate.where(parent_id: topic_id1.topic_id, deadline_type_id: 6).first rescue nil&lt;br /&gt;
           timeline = {label: ('Drop Topic Deadline').humanize}&lt;br /&gt;
           timeline[:updated_at] = topic_due_date.due_at.strftime('%a, %d %b %Y %H:%M')&lt;br /&gt;
           timeline_list &amp;lt;&amp;lt; timeline&lt;br /&gt;
        end&lt;br /&gt;
     end&lt;br /&gt;
     assignment.due_dates.each do |dd|&lt;br /&gt;
     timeline = {label: (dd.deadline_type.name + ' Deadline').humanize}&lt;br /&gt;
     unless dd.due_at.nil?&lt;br /&gt;
           timeline[:updated_at] = dd.due_at.strftime('%a, %d %b %Y %H:%M')&lt;br /&gt;
           timeline_list &amp;lt;&amp;lt; timeline&lt;br /&gt;
     end&lt;br /&gt;
     end&lt;br /&gt;
     end&lt;br /&gt;
&lt;br /&gt;
(v) app/views/assignments/edit.html.erb&lt;br /&gt;
&lt;br /&gt;
    &amp;lt;% if @assignment_form.assignment.staggered_deadline == true %&amp;gt;&lt;br /&gt;
    &amp;lt;%= render partial: '/sign_up_sheet/add_signup_topics_staggered', locals: {review_rounds: @review_rounds, assignment_submission_due_dates:        @assignment_submission_due_dates, assignment_review_due_dates: @assignment_review_due_dates, assignment_drop_topic_due_dates: @assignment_drop_topic_due_dates} %&amp;gt;&lt;br /&gt;
    &amp;lt;% else %&amp;gt;&lt;br /&gt;
    &amp;lt;%= render '/sign_up_sheet/add_signup_topics' %&amp;gt;&lt;br /&gt;
    &amp;lt;% end %&amp;gt;&lt;br /&gt;
&lt;br /&gt;
(vi) app/views/sign_up_sheet/_add_signup_topics_staggered.html.erb&lt;br /&gt;
&lt;br /&gt;
     &amp;lt;%= form_tag :controller =&amp;gt; 'sign_up_sheet', :action =&amp;gt; 'save_topic_deadlines', :assignment_id =&amp;gt; @assignment.id do %&amp;gt;&lt;br /&gt;
&lt;br /&gt;
     &amp;lt;br/&amp;gt;&amp;lt;%= render :partial =&amp;gt; '/sign_up_sheet/due_dates', :locals =&amp;gt; {review_rounds: review_rounds, assignment_submission_due_dates:    assignment_submission_due_dates, assignment_review_due_dates: assignment_review_due_dates, assignment_drop_topic_due_dates: assignment_drop_topic_due_dates} %&amp;gt;&lt;br /&gt;
     &amp;lt;% end %&amp;gt;&lt;br /&gt;
&lt;br /&gt;
(vii) app/views/sign_up_sheet/_due_dates.html.erb&lt;br /&gt;
&lt;br /&gt;
      &amp;lt;tr&amp;gt;&lt;br /&gt;
      &amp;lt;th&amp;gt;Drop deadline&amp;lt;/th&amp;gt;&lt;br /&gt;
      &amp;lt;%for i in 2..review_rounds%&amp;gt;&lt;br /&gt;
      &amp;lt;td&amp;gt;&amp;lt;%= @assignment.sign_up_topics[i].topic_name %&amp;gt;&amp;lt;/td&amp;gt;&lt;br /&gt;
      &amp;lt;% for review_round in 1..review_rounds %&amp;gt;&lt;br /&gt;
      &amp;lt;% topic_id = @assignment.sign_up_topics[i].id %&amp;gt;&lt;br /&gt;
      &amp;lt;%if review_round == 1 %&amp;gt;&lt;br /&gt;
      &amp;lt;td&amp;gt;&amp;lt;%= text_field :due_date, (topic_id.to_s + '_drop_topic_' + review_round.to_s + '_due_date').to_s, size: 20, value:    check_topic_due_date_value(assignment_drop_topic_due_dates, topic_id, 6, review_round) %&amp;gt;&amp;lt;/td&amp;gt;&lt;br /&gt;
      &amp;lt;td&amp;gt;&amp;lt;%= 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) %&amp;gt;&amp;lt;/td&amp;gt;&lt;br /&gt;
      &amp;lt;td&amp;gt;&amp;lt;%= 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) %&amp;gt;&amp;lt;/td&amp;gt;&lt;br /&gt;
      &amp;lt;%else%&amp;gt;&lt;br /&gt;
      &amp;lt;td&amp;gt;&amp;lt;%= 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) %&amp;gt;&amp;lt;/td&amp;gt;&lt;br /&gt;
      &amp;lt;td&amp;gt;&amp;lt;%= 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) %&amp;gt;&amp;lt;/td&amp;gt; &amp;lt;%end%&amp;gt; &amp;lt;%end%&amp;gt;&lt;br /&gt;
      &amp;lt;/tr&amp;gt;&lt;br /&gt;
      &amp;lt;%end%&amp;gt;&lt;br /&gt;
&lt;br /&gt;
== '''Test Plan''' ==&lt;br /&gt;
&lt;br /&gt;
The project does not require any Unit Test cases to be implemented.&lt;br /&gt;
&lt;br /&gt;
== '''References''' ==&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
[1. Expertiza on GitHub]&lt;br /&gt;
&lt;br /&gt;
[2. GitHub Project Repository Fork]&lt;br /&gt;
&lt;br /&gt;
[3. The live Expertiza website]&lt;br /&gt;
&lt;br /&gt;
[4. Demo link]&lt;br /&gt;
&lt;br /&gt;
[5. Expertiza project documentation wiki]&lt;/div&gt;</summary>
		<author><name>Jhmadhwa</name></author>
	</entry>
	<entry>
		<id>https://wiki.expertiza.ncsu.edu/index.php?title=E1843_Issues_Related_To_Deadlines&amp;diff=118891</id>
		<title>E1843 Issues Related To Deadlines</title>
		<link rel="alternate" type="text/html" href="https://wiki.expertiza.ncsu.edu/index.php?title=E1843_Issues_Related_To_Deadlines&amp;diff=118891"/>
		<updated>2018-11-08T23:00:33Z</updated>

		<summary type="html">&lt;p&gt;Jhmadhwa: /* Current Implementation */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;This wiki page is for the description of changes made under E1843 OSS assignment for Fall 2018, CSC/ECE 517.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
== '''About Expertiza''' ==&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Expertiza is an open source project based on Ruby on Rails framework and the code is available on Github. Expertiza allows the instructor to create new assignments as well as edit new or existing assignments. Instructors can also create a list of topics the students can sign up for and specify deadlines for completion of various tasks. Students can form teams in Expertiza to work on various projects and assignments as well as peer review other students' submissions. Expertiza supports submission across various document types, including the URLs Wiki pages.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
== '''Issues in the Current Project''' ==&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
1.There is no deadline that specifies when a team can drop their topics. Due to this, few problems occur: The team might drop a topic later on which is close to the submission date and this results in topic not being assigned to any other team on time such that they can submit their assignment. Also, if one team was wait listed for the same topic which the other team dropped closer to the submission deadline, then the first team will be assigned to the dropped topic which is not desirable as they might be working on their assigned topic for long time.&lt;br /&gt;
&lt;br /&gt;
2.There are different topics on which students can work during different times. This type of assignment is known as Staggered- deadline assignment in which different topics have different submission and review deadlines. For these assignments too, there is a need for &amp;quot;Drop Topics Deadline&amp;quot;. In the current implementation, the drop topic deadline is same for all the topics in a Staggered Deadline assignment which is not desirable.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
== '''Corrections made in the New Project''' ==&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
1. The instructor can specify a Drop Topic deadline date now. After a drop topic deadline passes, the &amp;quot;X&amp;quot; in the Sign-Up sheet disables so that the student cannot drop the topic and the waitlist gets cleared.&lt;br /&gt;
&lt;br /&gt;
2. Staggered deadline assignments now have different drop deadlines for different topics in that assignment.&lt;br /&gt;
&lt;br /&gt;
== '''Files modified in Current Project''' ==&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
1. app/controllers/assignments_controller.rb&lt;br /&gt;
&lt;br /&gt;
2. app/controllers/sign_up_sheet_controller.rb&lt;br /&gt;
&lt;br /&gt;
3. app/models/student_task.rb&lt;br /&gt;
&lt;br /&gt;
4. app/views/assignments/edit.html.erb&lt;br /&gt;
&lt;br /&gt;
5. app/views/sign_up_sheet/_add_signup_topics_staggered.html.erb&lt;br /&gt;
&lt;br /&gt;
6. app/views/sign_up_sheet/_due_dates.html.erb&lt;br /&gt;
&lt;br /&gt;
== '''Current Implementation''' ==&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
1. Clearing the waitlist after Drop Deadline passes is implemented in sign_up_sheet_controller.rb where it is checked if the current time is greater than the time mentioned in Drop deadline. If the deadline has been passed, the 'update_is_waitlisted' method of SignedUpTeam model is called to delete all the waitlisted teams. The code snippets for the changes made are attached below:&lt;br /&gt;
&lt;br /&gt;
(i) app/controllers/sign_up_sheet_controller.rb&lt;br /&gt;
&lt;br /&gt;
    if !topic_id1.nil? and !@drop_topic_deadline1.nil? and Time.now &amp;gt; @drop_topic_deadline1.due_at&lt;br /&gt;
    SignedUpTeam.update_is_waitlisted(topic_id1.topic_id,team_id) end&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
(ii) The 'update_is_waitlisted' method is implemented in app/models/signed_up_team.rb as follows:&lt;br /&gt;
&lt;br /&gt;
     def self.update_is_waitlisted(topic_i)&lt;br /&gt;
     topic_id1 = SignedUpTeam.where(team_id: team_id).first&lt;br /&gt;
     if @assignment.staggered_deadline?&lt;br /&gt;
     @drop_topic_deadline1 = TopicDueDate.where(parent_id: topic_id1.topic_id, deadline_type_id: 6).first rescue nil end&lt;br /&gt;
     due_dates = params[:due_date]&lt;br /&gt;
     topics = SignUpTopic.where(assignment_id: params[:assignment_id])&lt;br /&gt;
     review_rounds = assignment.num_review_rounds&lt;br /&gt;
     topics.each_with_index do |topic, index|&lt;br /&gt;
     for i in 1..review_rounds&lt;br /&gt;
         @topic_drop_topic_due_date = due_dates[topics[index].id.to_s + '_drop_topic_' + i.to_s + '_due_date']&lt;br /&gt;
         if assignment.due_dates.select {|due_date| due_date.deadline_type_id == 6 }.nil?&lt;br /&gt;
         @assignment_drop_topic_due_date = DateTime.parse(@assignment_drop_topic_due_dates[i - 1].due_at.to_s).strftime(&amp;quot;%Y-%m-%d %H:%M&amp;quot;)&lt;br /&gt;
     end&lt;br /&gt;
     end&lt;br /&gt;
&lt;br /&gt;
(iii) app/helpers/sign_up_sheet_helper.rb&lt;br /&gt;
&lt;br /&gt;
      if assignment_due_dates.length == 0&lt;br /&gt;
         assignment_due_dates = @assignment_submission_due_dates&lt;br /&gt;
      end&lt;br /&gt;
&lt;br /&gt;
(iv) app/models/student_task.rb&lt;br /&gt;
&lt;br /&gt;
     def self.get_due_date_data(assignment, timeline_list, participant)&lt;br /&gt;
     if assignment.staggered_deadline?&lt;br /&gt;
        team_id = participant.team.try(:id)&lt;br /&gt;
        topic_id1 = SignedUpTeam.where(team_id: team_id).first&lt;br /&gt;
        if !topic_id1.nil?&lt;br /&gt;
           topic_due_date = TopicDueDate.where(parent_id: topic_id1.topic_id, deadline_type_id: 6).first rescue nil&lt;br /&gt;
           timeline = {label: ('Drop Topic Deadline').humanize}&lt;br /&gt;
           timeline[:updated_at] = topic_due_date.due_at.strftime('%a, %d %b %Y %H:%M')&lt;br /&gt;
           timeline_list &amp;lt;&amp;lt; timeline&lt;br /&gt;
        end&lt;br /&gt;
     end&lt;br /&gt;
     assignment.due_dates.each do |dd|&lt;br /&gt;
     timeline = {label: (dd.deadline_type.name + ' Deadline').humanize}&lt;br /&gt;
     unless dd.due_at.nil?&lt;br /&gt;
           timeline[:updated_at] = dd.due_at.strftime('%a, %d %b %Y %H:%M')&lt;br /&gt;
           timeline_list &amp;lt;&amp;lt; timeline&lt;br /&gt;
     end&lt;br /&gt;
     end&lt;br /&gt;
     end&lt;br /&gt;
&lt;br /&gt;
(v) app/views/assignments/edit.html.erb&lt;br /&gt;
&lt;br /&gt;
    &amp;lt;% if @assignment_form.assignment.staggered_deadline == true %&amp;gt;&lt;br /&gt;
    &amp;lt;%= render partial: '/sign_up_sheet/add_signup_topics_staggered', locals: {review_rounds: @review_rounds, assignment_submission_due_dates:        @assignment_submission_due_dates, assignment_review_due_dates: @assignment_review_due_dates, assignment_drop_topic_due_dates: @assignment_drop_topic_due_dates} %&amp;gt;&lt;br /&gt;
    &amp;lt;% else %&amp;gt;&lt;br /&gt;
    &amp;lt;%= render '/sign_up_sheet/add_signup_topics' %&amp;gt;&lt;br /&gt;
    &amp;lt;% end %&amp;gt;&lt;br /&gt;
&lt;br /&gt;
(vi) app/views/sign_up_sheet/_add_signup_topics_staggered.html.erb&lt;br /&gt;
&lt;br /&gt;
     &amp;lt;%= form_tag :controller =&amp;gt; 'sign_up_sheet', :action =&amp;gt; 'save_topic_deadlines', :assignment_id =&amp;gt; @assignment.id do %&amp;gt;&lt;br /&gt;
&lt;br /&gt;
     &amp;lt;br/&amp;gt;&amp;lt;%= render :partial =&amp;gt; '/sign_up_sheet/due_dates', :locals =&amp;gt; {review_rounds: review_rounds, assignment_submission_due_dates:    assignment_submission_due_dates, assignment_review_due_dates: assignment_review_due_dates, assignment_drop_topic_due_dates: assignment_drop_topic_due_dates} %&amp;gt;&lt;br /&gt;
     &amp;lt;% end %&amp;gt;&lt;br /&gt;
&lt;br /&gt;
(vii) app/views/sign_up_sheet/_due_dates.html.erb&lt;br /&gt;
&lt;br /&gt;
      &amp;lt;tr&amp;gt;&lt;br /&gt;
      &amp;lt;th&amp;gt;Drop deadline&amp;lt;/th&amp;gt;&lt;br /&gt;
      &amp;lt;%for i in 2..review_rounds%&amp;gt;&lt;br /&gt;
      &amp;lt;td&amp;gt;&amp;lt;%= @assignment.sign_up_topics[i].topic_name %&amp;gt;&amp;lt;/td&amp;gt;&lt;br /&gt;
      &amp;lt;% for review_round in 1..review_rounds %&amp;gt;&lt;br /&gt;
      &amp;lt;% topic_id = @assignment.sign_up_topics[i].id %&amp;gt;&lt;br /&gt;
      &amp;lt;%if review_round == 1 %&amp;gt;&lt;br /&gt;
      &amp;lt;td&amp;gt;&amp;lt;%= text_field :due_date, (topic_id.to_s + '_drop_topic_' + review_round.to_s + '_due_date').to_s, size: 20, value:    check_topic_due_date_value(assignment_drop_topic_due_dates, topic_id, 6, review_round) %&amp;gt;&amp;lt;/td&amp;gt;&lt;br /&gt;
      &amp;lt;td&amp;gt;&amp;lt;%= 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) %&amp;gt;&amp;lt;/td&amp;gt;&lt;br /&gt;
      &amp;lt;td&amp;gt;&amp;lt;%= 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) %&amp;gt;&amp;lt;/td&amp;gt;&lt;br /&gt;
      &amp;lt;%else%&amp;gt;&lt;br /&gt;
      &amp;lt;td&amp;gt;&amp;lt;%= 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) %&amp;gt;&amp;lt;/td&amp;gt;&lt;br /&gt;
      &amp;lt;td&amp;gt;&amp;lt;%= 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) %&amp;gt;&amp;lt;/td&amp;gt; &amp;lt;%end%&amp;gt; &amp;lt;%end%&amp;gt;&lt;br /&gt;
      &amp;lt;/tr&amp;gt;&lt;br /&gt;
      &amp;lt;%end%&amp;gt;&lt;br /&gt;
&lt;br /&gt;
== '''Test Plan''' ==&lt;br /&gt;
&lt;br /&gt;
The project does not require any Unit Test cases to be implemented.&lt;br /&gt;
&lt;br /&gt;
== '''References''' ==&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
1. Expertiza on GitHub&lt;br /&gt;
2. GitHub Project Repository Fork&lt;br /&gt;
3. The live Expertiza website&lt;br /&gt;
4. Demo link&lt;br /&gt;
5. Expertiza project documentation wiki&lt;/div&gt;</summary>
		<author><name>Jhmadhwa</name></author>
	</entry>
	<entry>
		<id>https://wiki.expertiza.ncsu.edu/index.php?title=E1843_Issues_Related_To_Deadlines&amp;diff=118890</id>
		<title>E1843 Issues Related To Deadlines</title>
		<link rel="alternate" type="text/html" href="https://wiki.expertiza.ncsu.edu/index.php?title=E1843_Issues_Related_To_Deadlines&amp;diff=118890"/>
		<updated>2018-11-08T22:54:20Z</updated>

		<summary type="html">&lt;p&gt;Jhmadhwa: /* Current Implementation */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;This wiki page is for the description of changes made under E1843 OSS assignment for Fall 2018, CSC/ECE 517.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
== '''About Expertiza''' ==&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Expertiza is an open source project based on Ruby on Rails framework and the code is available on Github. Expertiza allows the instructor to create new assignments as well as edit new or existing assignments. Instructors can also create a list of topics the students can sign up for and specify deadlines for completion of various tasks. Students can form teams in Expertiza to work on various projects and assignments as well as peer review other students' submissions. Expertiza supports submission across various document types, including the URLs Wiki pages.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
== '''Issues in the Current Project''' ==&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
1.There is no deadline that specifies when a team can drop their topics. Due to this, few problems occur: The team might drop a topic later on which is close to the submission date and this results in topic not being assigned to any other team on time such that they can submit their assignment. Also, if one team was wait listed for the same topic which the other team dropped closer to the submission deadline, then the first team will be assigned to the dropped topic which is not desirable as they might be working on their assigned topic for long time.&lt;br /&gt;
&lt;br /&gt;
2.There are different topics on which students can work during different times. This type of assignment is known as Staggered- deadline assignment in which different topics have different submission and review deadlines. For these assignments too, there is a need for &amp;quot;Drop Topics Deadline&amp;quot;. In the current implementation, the drop topic deadline is same for all the topics in a Staggered Deadline assignment which is not desirable.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
== '''Corrections made in the New Project''' ==&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
1. The instructor can specify a Drop Topic deadline date now. After a drop topic deadline passes, the &amp;quot;X&amp;quot; in the Sign-Up sheet disables so that the student cannot drop the topic and the waitlist gets cleared.&lt;br /&gt;
&lt;br /&gt;
2. Staggered deadline assignments now have different drop deadlines for different topics in that assignment.&lt;br /&gt;
&lt;br /&gt;
== '''Files modified in Current Project''' ==&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
1. app/controllers/assignments_controller.rb&lt;br /&gt;
&lt;br /&gt;
2. app/controllers/sign_up_sheet_controller.rb&lt;br /&gt;
&lt;br /&gt;
3. app/models/student_task.rb&lt;br /&gt;
&lt;br /&gt;
4. app/views/assignments/edit.html.erb&lt;br /&gt;
&lt;br /&gt;
5. app/views/sign_up_sheet/_add_signup_topics_staggered.html.erb&lt;br /&gt;
&lt;br /&gt;
6. app/views/sign_up_sheet/_due_dates.html.erb&lt;br /&gt;
&lt;br /&gt;
== '''Current Implementation''' ==&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
1. Clearing the waitlist after Drop Deadline passes is implemented in sign_up_sheet_controller.rb where it is checked if the current time is greater than the time mentioned in Drop deadline. If the deadline has been passed, the 'update_is_waitlisted' method of SignedUpTeam model is called to delete all the waitlisted teams. The code snippets for the changes made are attached below:&lt;br /&gt;
&lt;br /&gt;
(i) app/controllers/sign_up_sheet_controller.rb&lt;br /&gt;
&lt;br /&gt;
    if !topic_id1.nil? and !@drop_topic_deadline1.nil? and Time.now &amp;gt; @drop_topic_deadline1.due_at&lt;br /&gt;
    SignedUpTeam.update_is_waitlisted(topic_id1.topic_id,team_id) end&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
(ii) The 'update_is_waitlisted' method is implemented in app/models/signed_up_team.rb as follows:&lt;br /&gt;
&lt;br /&gt;
     def self.update_is_waitlisted(topic_i)&lt;br /&gt;
     topic_id1 = SignedUpTeam.where(team_id: team_id).first&lt;br /&gt;
     if @assignment.staggered_deadline?&lt;br /&gt;
     @drop_topic_deadline1 = TopicDueDate.where(parent_id: topic_id1.topic_id, deadline_type_id: 6).first rescue nil end&lt;br /&gt;
     due_dates = params[:due_date]&lt;br /&gt;
     topics = SignUpTopic.where(assignment_id: params[:assignment_id])&lt;br /&gt;
     review_rounds = assignment.num_review_rounds&lt;br /&gt;
     topics.each_with_index do |topic, index|&lt;br /&gt;
     for i in 1..review_rounds&lt;br /&gt;
         @topic_drop_topic_due_date = due_dates[topics[index].id.to_s + '_drop_topic_' + i.to_s + '_due_date']&lt;br /&gt;
         if assignment.due_dates.select {|due_date| due_date.deadline_type_id == 6 }.nil?&lt;br /&gt;
         @assignment_drop_topic_due_date = DateTime.parse(@assignment_drop_topic_due_dates[i - 1].due_at.to_s).strftime(&amp;quot;%Y-%m-%d %H:%M&amp;quot;)&lt;br /&gt;
     end&lt;br /&gt;
     end&lt;br /&gt;
&lt;br /&gt;
(iii) app/helpers/sign_up_sheet_helper.rb&lt;br /&gt;
&lt;br /&gt;
if assignment_due_dates.length == 0&lt;br /&gt;
&lt;br /&gt;
assignment_due_dates = @assignment_submission_due_dates&lt;br /&gt;
&lt;br /&gt;
end&lt;br /&gt;
&lt;br /&gt;
(iv) app/models/student_task.rb&lt;br /&gt;
&lt;br /&gt;
def self.get_due_date_data(assignment, timeline_list, participant)&lt;br /&gt;
&lt;br /&gt;
if assignment.staggered_deadline?&lt;br /&gt;
&lt;br /&gt;
team_id = participant.team.try(:id)&lt;br /&gt;
&lt;br /&gt;
topic_id1 = SignedUpTeam.where(team_id: team_id).first&lt;br /&gt;
&lt;br /&gt;
if !topic_id1.nil?&lt;br /&gt;
&lt;br /&gt;
topic_due_date = TopicDueDate.where(parent_id: topic_id1.topic_id, deadline_type_id: 6).first rescue nil&lt;br /&gt;
&lt;br /&gt;
timeline = {label: ('Drop Topic Deadline').humanize}&lt;br /&gt;
&lt;br /&gt;
timeline[:updated_at] = topic_due_date.due_at.strftime('%a, %d %b %Y %H:%M')&lt;br /&gt;
&lt;br /&gt;
timeline_list &amp;lt;&amp;lt; timeline&lt;br /&gt;
&lt;br /&gt;
end&lt;br /&gt;
&lt;br /&gt;
end&lt;br /&gt;
&lt;br /&gt;
assignment.due_dates.each do |dd|&lt;br /&gt;
&lt;br /&gt;
timeline = {label: (dd.deadline_type.name + ' Deadline').humanize}&lt;br /&gt;
&lt;br /&gt;
unless dd.due_at.nil?&lt;br /&gt;
&lt;br /&gt;
timeline[:updated_at] = dd.due_at.strftime('%a, %d %b %Y %H:%M')&lt;br /&gt;
&lt;br /&gt;
timeline_list &amp;lt;&amp;lt; timeline&lt;br /&gt;
&lt;br /&gt;
end&lt;br /&gt;
&lt;br /&gt;
end&lt;br /&gt;
&lt;br /&gt;
end&lt;br /&gt;
&lt;br /&gt;
(v) app/views/assignments/edit.html.erb&lt;br /&gt;
&lt;br /&gt;
&amp;lt;% if @assignment_form.assignment.staggered_deadline == true %&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;%= render partial: '/sign_up_sheet/add_signup_topics_staggered', locals: {review_rounds: @review_rounds, assignment_submission_due_dates: @assignment_submission_due_dates, assignment_review_due_dates: @assignment_review_due_dates, assignment_drop_topic_due_dates: @assignment_drop_topic_due_dates} %&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;% else %&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;%= render '/sign_up_sheet/add_signup_topics' %&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;% end %&amp;gt;&lt;br /&gt;
&lt;br /&gt;
(vi) app/views/sign_up_sheet/_add_signup_topics_staggered.html.erb&lt;br /&gt;
&lt;br /&gt;
&amp;lt;%= form_tag :controller =&amp;gt; 'sign_up_sheet', :action =&amp;gt; 'save_topic_deadlines', :assignment_id =&amp;gt; @assignment.id do %&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;br/&amp;gt;&amp;lt;%= render :partial =&amp;gt; '/sign_up_sheet/due_dates', :locals =&amp;gt; {review_rounds: review_rounds, assignment_submission_due_dates: assignment_submission_due_dates, assignment_review_due_dates: assignment_review_due_dates, assignment_drop_topic_due_dates: assignment_drop_topic_due_dates} %&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;% end %&amp;gt;&lt;br /&gt;
&lt;br /&gt;
(vii) app/views/sign_up_sheet/_due_dates.html.erb&lt;br /&gt;
&lt;br /&gt;
&amp;lt;tr&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;th&amp;gt;Drop deadline&amp;lt;/th&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;%for i in 2..review_rounds%&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;td&amp;gt;&amp;lt;%= @assignment.sign_up_topics[i].topic_name %&amp;gt;&amp;lt;/td&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;% for review_round in 1..review_rounds %&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;% topic_id = @assignment.sign_up_topics[i].id %&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;%if review_round == 1 %&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;td&amp;gt;&amp;lt;%= text_field :due_date, (topic_id.to_s + '_drop_topic_' + review_round.to_s + '_due_date').to_s, size: 20, value: check_topic_due_date_value(assignment_drop_topic_due_dates, topic_id, 6, review_round) %&amp;gt;&amp;lt;/td&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;td&amp;gt;&amp;lt;%= 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) %&amp;gt;&amp;lt;/td&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;td&amp;gt;&amp;lt;%= 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) %&amp;gt;&amp;lt;/td&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;%else%&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;td&amp;gt;&amp;lt;%= 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) %&amp;gt;&amp;lt;/td&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;td&amp;gt;&amp;lt;%= 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) %&amp;gt;&amp;lt;/td&amp;gt; &amp;lt;%end%&amp;gt; &amp;lt;%end%&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;/tr&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;%end%&amp;gt;&lt;br /&gt;
&lt;br /&gt;
== '''Test Plan''' ==&lt;br /&gt;
&lt;br /&gt;
The project does not require any Unit Test cases to be implemented.&lt;br /&gt;
&lt;br /&gt;
== '''References''' ==&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
1. Expertiza on GitHub&lt;br /&gt;
2. GitHub Project Repository Fork&lt;br /&gt;
3. The live Expertiza website&lt;br /&gt;
4. Demo link&lt;br /&gt;
5. Expertiza project documentation wiki&lt;/div&gt;</summary>
		<author><name>Jhmadhwa</name></author>
	</entry>
	<entry>
		<id>https://wiki.expertiza.ncsu.edu/index.php?title=E1843_Issues_Related_To_Deadlines&amp;diff=118889</id>
		<title>E1843 Issues Related To Deadlines</title>
		<link rel="alternate" type="text/html" href="https://wiki.expertiza.ncsu.edu/index.php?title=E1843_Issues_Related_To_Deadlines&amp;diff=118889"/>
		<updated>2018-11-08T22:53:36Z</updated>

		<summary type="html">&lt;p&gt;Jhmadhwa: /* Current Implementation */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;This wiki page is for the description of changes made under E1843 OSS assignment for Fall 2018, CSC/ECE 517.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
== '''About Expertiza''' ==&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Expertiza is an open source project based on Ruby on Rails framework and the code is available on Github. Expertiza allows the instructor to create new assignments as well as edit new or existing assignments. Instructors can also create a list of topics the students can sign up for and specify deadlines for completion of various tasks. Students can form teams in Expertiza to work on various projects and assignments as well as peer review other students' submissions. Expertiza supports submission across various document types, including the URLs Wiki pages.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
== '''Issues in the Current Project''' ==&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
1.There is no deadline that specifies when a team can drop their topics. Due to this, few problems occur: The team might drop a topic later on which is close to the submission date and this results in topic not being assigned to any other team on time such that they can submit their assignment. Also, if one team was wait listed for the same topic which the other team dropped closer to the submission deadline, then the first team will be assigned to the dropped topic which is not desirable as they might be working on their assigned topic for long time.&lt;br /&gt;
&lt;br /&gt;
2.There are different topics on which students can work during different times. This type of assignment is known as Staggered- deadline assignment in which different topics have different submission and review deadlines. For these assignments too, there is a need for &amp;quot;Drop Topics Deadline&amp;quot;. In the current implementation, the drop topic deadline is same for all the topics in a Staggered Deadline assignment which is not desirable.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
== '''Corrections made in the New Project''' ==&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
1. The instructor can specify a Drop Topic deadline date now. After a drop topic deadline passes, the &amp;quot;X&amp;quot; in the Sign-Up sheet disables so that the student cannot drop the topic and the waitlist gets cleared.&lt;br /&gt;
&lt;br /&gt;
2. Staggered deadline assignments now have different drop deadlines for different topics in that assignment.&lt;br /&gt;
&lt;br /&gt;
== '''Files modified in Current Project''' ==&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
1. app/controllers/assignments_controller.rb&lt;br /&gt;
&lt;br /&gt;
2. app/controllers/sign_up_sheet_controller.rb&lt;br /&gt;
&lt;br /&gt;
3. app/models/student_task.rb&lt;br /&gt;
&lt;br /&gt;
4. app/views/assignments/edit.html.erb&lt;br /&gt;
&lt;br /&gt;
5. app/views/sign_up_sheet/_add_signup_topics_staggered.html.erb&lt;br /&gt;
&lt;br /&gt;
6. app/views/sign_up_sheet/_due_dates.html.erb&lt;br /&gt;
&lt;br /&gt;
== '''Current Implementation''' ==&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
1. Clearing the waitlist after Drop Deadline passes is implemented in sign_up_sheet_controller.rb where it is checked if the current time is greater than the time mentioned in Drop deadline. If the deadline has been passed, the 'update_is_waitlisted' method of SignedUpTeam model is called to delete all the waitlisted teams. The code snippets for the changes made are attached below:&lt;br /&gt;
&lt;br /&gt;
(i) app/controllers/sign_up_sheet_controller.rb&lt;br /&gt;
&lt;br /&gt;
    if !topic_id1.nil? and !@drop_topic_deadline1.nil? and Time.now &amp;gt; @drop_topic_deadline1.due_at&lt;br /&gt;
    SignedUpTeam.update_is_waitlisted(topic_id1.topic_id,team_id) end&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
(ii) The 'update_is_waitlisted' method is implemented in app/models/signed_up_team.rb as follows:&lt;br /&gt;
&lt;br /&gt;
     def self.update_is_waitlisted(topic_i)&lt;br /&gt;
     topic_id1 = SignedUpTeam.where(team_id: team_id).first&lt;br /&gt;
     if @assignment.staggered_deadline?&lt;br /&gt;
     @drop_topic_deadline1 = TopicDueDate.where(parent_id: topic_id1.topic_id, deadline_type_id: 6).first rescue nil end&lt;br /&gt;
     due_dates = params[:due_date]&lt;br /&gt;
     topics = SignUpTopic.where(assignment_id: params[:assignment_id])&lt;br /&gt;
     review_rounds = assignment.num_review_rounds&lt;br /&gt;
     topics.each_with_index do |topic, index|&lt;br /&gt;
     for i in 1..review_rounds&lt;br /&gt;
`````````@topic_drop_topic_due_date = due_dates[topics[index].id.to_s + '_drop_topic_' + i.to_s + '_due_date']&lt;br /&gt;
`````````if assignment.due_dates.select {|due_date| due_date.deadline_type_id == 6 }.nil?&lt;br /&gt;
`````````@assignment_drop_topic_due_date = DateTime.parse(@assignment_drop_topic_due_dates[i - 1].due_at.to_s).strftime(&amp;quot;%Y-%m-%d %H:%M&amp;quot;)&lt;br /&gt;
`````end&lt;br /&gt;
`````end&lt;br /&gt;
&lt;br /&gt;
(iii) app/helpers/sign_up_sheet_helper.rb&lt;br /&gt;
&lt;br /&gt;
if assignment_due_dates.length == 0&lt;br /&gt;
&lt;br /&gt;
assignment_due_dates = @assignment_submission_due_dates&lt;br /&gt;
&lt;br /&gt;
end&lt;br /&gt;
&lt;br /&gt;
(iv) app/models/student_task.rb&lt;br /&gt;
&lt;br /&gt;
def self.get_due_date_data(assignment, timeline_list, participant)&lt;br /&gt;
&lt;br /&gt;
if assignment.staggered_deadline?&lt;br /&gt;
&lt;br /&gt;
team_id = participant.team.try(:id)&lt;br /&gt;
&lt;br /&gt;
topic_id1 = SignedUpTeam.where(team_id: team_id).first&lt;br /&gt;
&lt;br /&gt;
if !topic_id1.nil?&lt;br /&gt;
&lt;br /&gt;
topic_due_date = TopicDueDate.where(parent_id: topic_id1.topic_id, deadline_type_id: 6).first rescue nil&lt;br /&gt;
&lt;br /&gt;
timeline = {label: ('Drop Topic Deadline').humanize}&lt;br /&gt;
&lt;br /&gt;
timeline[:updated_at] = topic_due_date.due_at.strftime('%a, %d %b %Y %H:%M')&lt;br /&gt;
&lt;br /&gt;
timeline_list &amp;lt;&amp;lt; timeline&lt;br /&gt;
&lt;br /&gt;
end&lt;br /&gt;
&lt;br /&gt;
end&lt;br /&gt;
&lt;br /&gt;
assignment.due_dates.each do |dd|&lt;br /&gt;
&lt;br /&gt;
timeline = {label: (dd.deadline_type.name + ' Deadline').humanize}&lt;br /&gt;
&lt;br /&gt;
unless dd.due_at.nil?&lt;br /&gt;
&lt;br /&gt;
timeline[:updated_at] = dd.due_at.strftime('%a, %d %b %Y %H:%M')&lt;br /&gt;
&lt;br /&gt;
timeline_list &amp;lt;&amp;lt; timeline&lt;br /&gt;
&lt;br /&gt;
end&lt;br /&gt;
&lt;br /&gt;
end&lt;br /&gt;
&lt;br /&gt;
end&lt;br /&gt;
&lt;br /&gt;
(v) app/views/assignments/edit.html.erb&lt;br /&gt;
&lt;br /&gt;
&amp;lt;% if @assignment_form.assignment.staggered_deadline == true %&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;%= render partial: '/sign_up_sheet/add_signup_topics_staggered', locals: {review_rounds: @review_rounds, assignment_submission_due_dates: @assignment_submission_due_dates, assignment_review_due_dates: @assignment_review_due_dates, assignment_drop_topic_due_dates: @assignment_drop_topic_due_dates} %&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;% else %&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;%= render '/sign_up_sheet/add_signup_topics' %&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;% end %&amp;gt;&lt;br /&gt;
&lt;br /&gt;
(vi) app/views/sign_up_sheet/_add_signup_topics_staggered.html.erb&lt;br /&gt;
&lt;br /&gt;
&amp;lt;%= form_tag :controller =&amp;gt; 'sign_up_sheet', :action =&amp;gt; 'save_topic_deadlines', :assignment_id =&amp;gt; @assignment.id do %&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;br/&amp;gt;&amp;lt;%= render :partial =&amp;gt; '/sign_up_sheet/due_dates', :locals =&amp;gt; {review_rounds: review_rounds, assignment_submission_due_dates: assignment_submission_due_dates, assignment_review_due_dates: assignment_review_due_dates, assignment_drop_topic_due_dates: assignment_drop_topic_due_dates} %&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;% end %&amp;gt;&lt;br /&gt;
&lt;br /&gt;
(vii) app/views/sign_up_sheet/_due_dates.html.erb&lt;br /&gt;
&lt;br /&gt;
&amp;lt;tr&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;th&amp;gt;Drop deadline&amp;lt;/th&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;%for i in 2..review_rounds%&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;td&amp;gt;&amp;lt;%= @assignment.sign_up_topics[i].topic_name %&amp;gt;&amp;lt;/td&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;% for review_round in 1..review_rounds %&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;% topic_id = @assignment.sign_up_topics[i].id %&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;%if review_round == 1 %&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;td&amp;gt;&amp;lt;%= text_field :due_date, (topic_id.to_s + '_drop_topic_' + review_round.to_s + '_due_date').to_s, size: 20, value: check_topic_due_date_value(assignment_drop_topic_due_dates, topic_id, 6, review_round) %&amp;gt;&amp;lt;/td&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;td&amp;gt;&amp;lt;%= 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) %&amp;gt;&amp;lt;/td&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;td&amp;gt;&amp;lt;%= 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) %&amp;gt;&amp;lt;/td&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;%else%&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;td&amp;gt;&amp;lt;%= 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) %&amp;gt;&amp;lt;/td&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;td&amp;gt;&amp;lt;%= 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) %&amp;gt;&amp;lt;/td&amp;gt; &amp;lt;%end%&amp;gt; &amp;lt;%end%&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;/tr&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;%end%&amp;gt;&lt;br /&gt;
&lt;br /&gt;
== '''Test Plan''' ==&lt;br /&gt;
&lt;br /&gt;
The project does not require any Unit Test cases to be implemented.&lt;br /&gt;
&lt;br /&gt;
== '''References''' ==&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
1. Expertiza on GitHub&lt;br /&gt;
2. GitHub Project Repository Fork&lt;br /&gt;
3. The live Expertiza website&lt;br /&gt;
4. Demo link&lt;br /&gt;
5. Expertiza project documentation wiki&lt;/div&gt;</summary>
		<author><name>Jhmadhwa</name></author>
	</entry>
	<entry>
		<id>https://wiki.expertiza.ncsu.edu/index.php?title=E1843_Issues_Related_To_Deadlines&amp;diff=118888</id>
		<title>E1843 Issues Related To Deadlines</title>
		<link rel="alternate" type="text/html" href="https://wiki.expertiza.ncsu.edu/index.php?title=E1843_Issues_Related_To_Deadlines&amp;diff=118888"/>
		<updated>2018-11-08T22:51:49Z</updated>

		<summary type="html">&lt;p&gt;Jhmadhwa: /* Current Implementation */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;This wiki page is for the description of changes made under E1843 OSS assignment for Fall 2018, CSC/ECE 517.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
== '''About Expertiza''' ==&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Expertiza is an open source project based on Ruby on Rails framework and the code is available on Github. Expertiza allows the instructor to create new assignments as well as edit new or existing assignments. Instructors can also create a list of topics the students can sign up for and specify deadlines for completion of various tasks. Students can form teams in Expertiza to work on various projects and assignments as well as peer review other students' submissions. Expertiza supports submission across various document types, including the URLs Wiki pages.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
== '''Issues in the Current Project''' ==&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
1.There is no deadline that specifies when a team can drop their topics. Due to this, few problems occur: The team might drop a topic later on which is close to the submission date and this results in topic not being assigned to any other team on time such that they can submit their assignment. Also, if one team was wait listed for the same topic which the other team dropped closer to the submission deadline, then the first team will be assigned to the dropped topic which is not desirable as they might be working on their assigned topic for long time.&lt;br /&gt;
&lt;br /&gt;
2.There are different topics on which students can work during different times. This type of assignment is known as Staggered- deadline assignment in which different topics have different submission and review deadlines. For these assignments too, there is a need for &amp;quot;Drop Topics Deadline&amp;quot;. In the current implementation, the drop topic deadline is same for all the topics in a Staggered Deadline assignment which is not desirable.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
== '''Corrections made in the New Project''' ==&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
1. The instructor can specify a Drop Topic deadline date now. After a drop topic deadline passes, the &amp;quot;X&amp;quot; in the Sign-Up sheet disables so that the student cannot drop the topic and the waitlist gets cleared.&lt;br /&gt;
&lt;br /&gt;
2. Staggered deadline assignments now have different drop deadlines for different topics in that assignment.&lt;br /&gt;
&lt;br /&gt;
== '''Files modified in Current Project''' ==&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
1. app/controllers/assignments_controller.rb&lt;br /&gt;
&lt;br /&gt;
2. app/controllers/sign_up_sheet_controller.rb&lt;br /&gt;
&lt;br /&gt;
3. app/models/student_task.rb&lt;br /&gt;
&lt;br /&gt;
4. app/views/assignments/edit.html.erb&lt;br /&gt;
&lt;br /&gt;
5. app/views/sign_up_sheet/_add_signup_topics_staggered.html.erb&lt;br /&gt;
&lt;br /&gt;
6. app/views/sign_up_sheet/_due_dates.html.erb&lt;br /&gt;
&lt;br /&gt;
== '''Current Implementation''' ==&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
1. Clearing the waitlist after Drop Deadline passes is implemented in sign_up_sheet_controller.rb where it is checked if the current time is greater than the time mentioned in Drop deadline. If the deadline has been passed, the 'update_is_waitlisted' method of SignedUpTeam model is called to delete all the waitlisted teams. The code snippets for the changes made are attached below:&lt;br /&gt;
&lt;br /&gt;
(i) app/controllers/sign_up_sheet_controller.rb&lt;br /&gt;
&lt;br /&gt;
    if !topic_id1.nil? and !@drop_topic_deadline1.nil? and Time.now &amp;gt; @drop_topic_deadline1.due_at&lt;br /&gt;
    SignedUpTeam.update_is_waitlisted(topic_id1.topic_id,team_id) end&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
(ii) The 'update_is_waitlisted' method is implemented in app/models/signed_up_team.rb as follows:&lt;br /&gt;
&lt;br /&gt;
     def self.update_is_waitlisted(topic_i)&lt;br /&gt;
&lt;br /&gt;
topic_id1 = SignedUpTeam.where(team_id: team_id).first&lt;br /&gt;
&lt;br /&gt;
if @assignment.staggered_deadline?&lt;br /&gt;
&lt;br /&gt;
@drop_topic_deadline1 = TopicDueDate.where(parent_id: topic_id1.topic_id, deadline_type_id: 6).first rescue nil end&lt;br /&gt;
&lt;br /&gt;
due_dates = params[:due_date]&lt;br /&gt;
&lt;br /&gt;
topics = SignUpTopic.where(assignment_id: params[:assignment_id])&lt;br /&gt;
&lt;br /&gt;
review_rounds = assignment.num_review_rounds&lt;br /&gt;
&lt;br /&gt;
topics.each_with_index do |topic, index|&lt;br /&gt;
&lt;br /&gt;
for i in 1..review_rounds&lt;br /&gt;
&lt;br /&gt;
@topic_drop_topic_due_date = due_dates[topics[index].id.to_s + '_drop_topic_' + i.to_s + '_due_date']&lt;br /&gt;
&lt;br /&gt;
if assignment.due_dates.select {|due_date| due_date.deadline_type_id == 6 }.nil?&lt;br /&gt;
&lt;br /&gt;
@assignment_drop_topic_due_date = DateTime.parse(@assignment_drop_topic_due_dates[i - 1].due_at.to_s).strftime(&amp;quot;%Y-%m-%d %H:%M&amp;quot;)&lt;br /&gt;
&lt;br /&gt;
end&lt;br /&gt;
&lt;br /&gt;
end&lt;br /&gt;
&lt;br /&gt;
(iii) app/helpers/sign_up_sheet_helper.rb&lt;br /&gt;
&lt;br /&gt;
if assignment_due_dates.length == 0&lt;br /&gt;
&lt;br /&gt;
assignment_due_dates = @assignment_submission_due_dates&lt;br /&gt;
&lt;br /&gt;
end&lt;br /&gt;
&lt;br /&gt;
(iv) app/models/student_task.rb&lt;br /&gt;
&lt;br /&gt;
def self.get_due_date_data(assignment, timeline_list, participant)&lt;br /&gt;
&lt;br /&gt;
if assignment.staggered_deadline?&lt;br /&gt;
&lt;br /&gt;
team_id = participant.team.try(:id)&lt;br /&gt;
&lt;br /&gt;
topic_id1 = SignedUpTeam.where(team_id: team_id).first&lt;br /&gt;
&lt;br /&gt;
if !topic_id1.nil?&lt;br /&gt;
&lt;br /&gt;
topic_due_date = TopicDueDate.where(parent_id: topic_id1.topic_id, deadline_type_id: 6).first rescue nil&lt;br /&gt;
&lt;br /&gt;
timeline = {label: ('Drop Topic Deadline').humanize}&lt;br /&gt;
&lt;br /&gt;
timeline[:updated_at] = topic_due_date.due_at.strftime('%a, %d %b %Y %H:%M')&lt;br /&gt;
&lt;br /&gt;
timeline_list &amp;lt;&amp;lt; timeline&lt;br /&gt;
&lt;br /&gt;
end&lt;br /&gt;
&lt;br /&gt;
end&lt;br /&gt;
&lt;br /&gt;
assignment.due_dates.each do |dd|&lt;br /&gt;
&lt;br /&gt;
timeline = {label: (dd.deadline_type.name + ' Deadline').humanize}&lt;br /&gt;
&lt;br /&gt;
unless dd.due_at.nil?&lt;br /&gt;
&lt;br /&gt;
timeline[:updated_at] = dd.due_at.strftime('%a, %d %b %Y %H:%M')&lt;br /&gt;
&lt;br /&gt;
timeline_list &amp;lt;&amp;lt; timeline&lt;br /&gt;
&lt;br /&gt;
end&lt;br /&gt;
&lt;br /&gt;
end&lt;br /&gt;
&lt;br /&gt;
end&lt;br /&gt;
&lt;br /&gt;
(v) app/views/assignments/edit.html.erb&lt;br /&gt;
&lt;br /&gt;
&amp;lt;% if @assignment_form.assignment.staggered_deadline == true %&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;%= render partial: '/sign_up_sheet/add_signup_topics_staggered', locals: {review_rounds: @review_rounds, assignment_submission_due_dates: @assignment_submission_due_dates, assignment_review_due_dates: @assignment_review_due_dates, assignment_drop_topic_due_dates: @assignment_drop_topic_due_dates} %&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;% else %&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;%= render '/sign_up_sheet/add_signup_topics' %&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;% end %&amp;gt;&lt;br /&gt;
&lt;br /&gt;
(vi) app/views/sign_up_sheet/_add_signup_topics_staggered.html.erb&lt;br /&gt;
&lt;br /&gt;
&amp;lt;%= form_tag :controller =&amp;gt; 'sign_up_sheet', :action =&amp;gt; 'save_topic_deadlines', :assignment_id =&amp;gt; @assignment.id do %&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;br/&amp;gt;&amp;lt;%= render :partial =&amp;gt; '/sign_up_sheet/due_dates', :locals =&amp;gt; {review_rounds: review_rounds, assignment_submission_due_dates: assignment_submission_due_dates, assignment_review_due_dates: assignment_review_due_dates, assignment_drop_topic_due_dates: assignment_drop_topic_due_dates} %&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;% end %&amp;gt;&lt;br /&gt;
&lt;br /&gt;
(vii) app/views/sign_up_sheet/_due_dates.html.erb&lt;br /&gt;
&lt;br /&gt;
&amp;lt;tr&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;th&amp;gt;Drop deadline&amp;lt;/th&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;%for i in 2..review_rounds%&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;td&amp;gt;&amp;lt;%= @assignment.sign_up_topics[i].topic_name %&amp;gt;&amp;lt;/td&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;% for review_round in 1..review_rounds %&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;% topic_id = @assignment.sign_up_topics[i].id %&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;%if review_round == 1 %&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;td&amp;gt;&amp;lt;%= text_field :due_date, (topic_id.to_s + '_drop_topic_' + review_round.to_s + '_due_date').to_s, size: 20, value: check_topic_due_date_value(assignment_drop_topic_due_dates, topic_id, 6, review_round) %&amp;gt;&amp;lt;/td&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;td&amp;gt;&amp;lt;%= 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) %&amp;gt;&amp;lt;/td&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;td&amp;gt;&amp;lt;%= 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) %&amp;gt;&amp;lt;/td&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;%else%&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;td&amp;gt;&amp;lt;%= 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) %&amp;gt;&amp;lt;/td&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;td&amp;gt;&amp;lt;%= 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) %&amp;gt;&amp;lt;/td&amp;gt; &amp;lt;%end%&amp;gt; &amp;lt;%end%&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;/tr&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;%end%&amp;gt;&lt;br /&gt;
&lt;br /&gt;
== '''Test Plan''' ==&lt;br /&gt;
&lt;br /&gt;
The project does not require any Unit Test cases to be implemented.&lt;br /&gt;
&lt;br /&gt;
== '''References''' ==&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
1. Expertiza on GitHub&lt;br /&gt;
2. GitHub Project Repository Fork&lt;br /&gt;
3. The live Expertiza website&lt;br /&gt;
4. Demo link&lt;br /&gt;
5. Expertiza project documentation wiki&lt;/div&gt;</summary>
		<author><name>Jhmadhwa</name></author>
	</entry>
	<entry>
		<id>https://wiki.expertiza.ncsu.edu/index.php?title=E1843_Issues_Related_To_Deadlines&amp;diff=118887</id>
		<title>E1843 Issues Related To Deadlines</title>
		<link rel="alternate" type="text/html" href="https://wiki.expertiza.ncsu.edu/index.php?title=E1843_Issues_Related_To_Deadlines&amp;diff=118887"/>
		<updated>2018-11-08T22:51:19Z</updated>

		<summary type="html">&lt;p&gt;Jhmadhwa: /* Current Implementation */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;This wiki page is for the description of changes made under E1843 OSS assignment for Fall 2018, CSC/ECE 517.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
== '''About Expertiza''' ==&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Expertiza is an open source project based on Ruby on Rails framework and the code is available on Github. Expertiza allows the instructor to create new assignments as well as edit new or existing assignments. Instructors can also create a list of topics the students can sign up for and specify deadlines for completion of various tasks. Students can form teams in Expertiza to work on various projects and assignments as well as peer review other students' submissions. Expertiza supports submission across various document types, including the URLs Wiki pages.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
== '''Issues in the Current Project''' ==&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
1.There is no deadline that specifies when a team can drop their topics. Due to this, few problems occur: The team might drop a topic later on which is close to the submission date and this results in topic not being assigned to any other team on time such that they can submit their assignment. Also, if one team was wait listed for the same topic which the other team dropped closer to the submission deadline, then the first team will be assigned to the dropped topic which is not desirable as they might be working on their assigned topic for long time.&lt;br /&gt;
&lt;br /&gt;
2.There are different topics on which students can work during different times. This type of assignment is known as Staggered- deadline assignment in which different topics have different submission and review deadlines. For these assignments too, there is a need for &amp;quot;Drop Topics Deadline&amp;quot;. In the current implementation, the drop topic deadline is same for all the topics in a Staggered Deadline assignment which is not desirable.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
== '''Corrections made in the New Project''' ==&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
1. The instructor can specify a Drop Topic deadline date now. After a drop topic deadline passes, the &amp;quot;X&amp;quot; in the Sign-Up sheet disables so that the student cannot drop the topic and the waitlist gets cleared.&lt;br /&gt;
&lt;br /&gt;
2. Staggered deadline assignments now have different drop deadlines for different topics in that assignment.&lt;br /&gt;
&lt;br /&gt;
== '''Files modified in Current Project''' ==&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
1. app/controllers/assignments_controller.rb&lt;br /&gt;
&lt;br /&gt;
2. app/controllers/sign_up_sheet_controller.rb&lt;br /&gt;
&lt;br /&gt;
3. app/models/student_task.rb&lt;br /&gt;
&lt;br /&gt;
4. app/views/assignments/edit.html.erb&lt;br /&gt;
&lt;br /&gt;
5. app/views/sign_up_sheet/_add_signup_topics_staggered.html.erb&lt;br /&gt;
&lt;br /&gt;
6. app/views/sign_up_sheet/_due_dates.html.erb&lt;br /&gt;
&lt;br /&gt;
== '''Current Implementation''' ==&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
1. Clearing the waitlist after Drop Deadline passes is implemented in sign_up_sheet_controller.rb where it is checked if the current time is greater than the time mentioned in Drop deadline. If the deadline has been passed, the 'update_is_waitlisted' method of SignedUpTeam model is called to delete all the waitlisted teams. The code snippets for the changes made are attached below:&lt;br /&gt;
&lt;br /&gt;
(i) app/controllers/sign_up_sheet_controller.rb&lt;br /&gt;
&lt;br /&gt;
if !topic_id1.nil? and !@drop_topic_deadline1.nil? and Time.now &amp;gt; @drop_topic_deadline1.due_at&lt;br /&gt;
&lt;br /&gt;
SignedUpTeam.update_is_waitlisted(topic_id1.topic_id,team_id) end&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
(ii) The 'update_is_waitlisted' method is implemented in app/models/signed_up_team.rb as follows:&lt;br /&gt;
&lt;br /&gt;
     def self.update_is_waitlisted(topic_id, team_id)&lt;br /&gt;
&lt;br /&gt;
     waitlisted_teams = SignedUpTeam.where(topic_id: topic_id, team_id: team_id)&lt;br /&gt;
&lt;br /&gt;
waitlisted_teams.each do |team|&lt;br /&gt;
&lt;br /&gt;
if(team.is_waitlisted == true)&lt;br /&gt;
&lt;br /&gt;
SignedUpTeam.delete(team.id)&lt;br /&gt;
&lt;br /&gt;
team.save&lt;br /&gt;
&lt;br /&gt;
end&lt;br /&gt;
&lt;br /&gt;
end&lt;br /&gt;
&lt;br /&gt;
end&lt;br /&gt;
&lt;br /&gt;
2. For a Staggered - deadline assignment, each topic will have a different Drop deadline which has been implemented in app/controllers/assignments_controller.rb and app/controllers/sign_up_sheet_controller.rb by first checking if the assignment type is staggered and then retrieving the Drop Deadlines corresponding to each topic from 'TopicDueDate' table. The 'assignments' and 'due_date' views are also updated to include 'Drop topic deadline' column and Drop deadline date in the timeline present in the student view. Following files have been changed to implement this functionality:&lt;br /&gt;
&lt;br /&gt;
(i) app/controllers/assignments_controller.rb&lt;br /&gt;
&lt;br /&gt;
@assignment_submission_due_dates = @due_date_all.select {|due_date| due_date.deadline_type_id == DeadlineHelper::DEALINE_TYPE_SUBMISSION }&lt;br /&gt;
&lt;br /&gt;
@assignment_review_due_dates = @due_date_all.select {|due_date| due_date.deadline_type_id == DeadlineHelper::DEALINE_TYPE_REVIEW} @assignment_drop_topic_due_dates = @due_date_all.select {|due_date| due_date.deadline_type_id == DeadlineHelper::DEADLINE_TYPE_DROP_TOPIC }&lt;br /&gt;
&lt;br /&gt;
(ii) app/controllers/sign_up_sheet_controller.rb&lt;br /&gt;
&lt;br /&gt;
@drop_topic_deadline1 = @assignment.due_dates.find_by(deadline_type_id: 6)&lt;br /&gt;
&lt;br /&gt;
topic_id1 = SignedUpTeam.where(team_id: team_id).first&lt;br /&gt;
&lt;br /&gt;
if @assignment.staggered_deadline?&lt;br /&gt;
&lt;br /&gt;
@drop_topic_deadline1 = TopicDueDate.where(parent_id: topic_id1.topic_id, deadline_type_id: 6).first rescue nil end&lt;br /&gt;
&lt;br /&gt;
due_dates = params[:due_date]&lt;br /&gt;
&lt;br /&gt;
topics = SignUpTopic.where(assignment_id: params[:assignment_id])&lt;br /&gt;
&lt;br /&gt;
review_rounds = assignment.num_review_rounds&lt;br /&gt;
&lt;br /&gt;
topics.each_with_index do |topic, index|&lt;br /&gt;
&lt;br /&gt;
for i in 1..review_rounds&lt;br /&gt;
&lt;br /&gt;
@topic_drop_topic_due_date = due_dates[topics[index].id.to_s + '_drop_topic_' + i.to_s + '_due_date']&lt;br /&gt;
&lt;br /&gt;
if assignment.due_dates.select {|due_date| due_date.deadline_type_id == 6 }.nil?&lt;br /&gt;
&lt;br /&gt;
@assignment_drop_topic_due_date = DateTime.parse(@assignment_drop_topic_due_dates[i - 1].due_at.to_s).strftime(&amp;quot;%Y-%m-%d %H:%M&amp;quot;)&lt;br /&gt;
&lt;br /&gt;
end&lt;br /&gt;
&lt;br /&gt;
end&lt;br /&gt;
&lt;br /&gt;
(iii) app/helpers/sign_up_sheet_helper.rb&lt;br /&gt;
&lt;br /&gt;
if assignment_due_dates.length == 0&lt;br /&gt;
&lt;br /&gt;
assignment_due_dates = @assignment_submission_due_dates&lt;br /&gt;
&lt;br /&gt;
end&lt;br /&gt;
&lt;br /&gt;
(iv) app/models/student_task.rb&lt;br /&gt;
&lt;br /&gt;
def self.get_due_date_data(assignment, timeline_list, participant)&lt;br /&gt;
&lt;br /&gt;
if assignment.staggered_deadline?&lt;br /&gt;
&lt;br /&gt;
team_id = participant.team.try(:id)&lt;br /&gt;
&lt;br /&gt;
topic_id1 = SignedUpTeam.where(team_id: team_id).first&lt;br /&gt;
&lt;br /&gt;
if !topic_id1.nil?&lt;br /&gt;
&lt;br /&gt;
topic_due_date = TopicDueDate.where(parent_id: topic_id1.topic_id, deadline_type_id: 6).first rescue nil&lt;br /&gt;
&lt;br /&gt;
timeline = {label: ('Drop Topic Deadline').humanize}&lt;br /&gt;
&lt;br /&gt;
timeline[:updated_at] = topic_due_date.due_at.strftime('%a, %d %b %Y %H:%M')&lt;br /&gt;
&lt;br /&gt;
timeline_list &amp;lt;&amp;lt; timeline&lt;br /&gt;
&lt;br /&gt;
end&lt;br /&gt;
&lt;br /&gt;
end&lt;br /&gt;
&lt;br /&gt;
assignment.due_dates.each do |dd|&lt;br /&gt;
&lt;br /&gt;
timeline = {label: (dd.deadline_type.name + ' Deadline').humanize}&lt;br /&gt;
&lt;br /&gt;
unless dd.due_at.nil?&lt;br /&gt;
&lt;br /&gt;
timeline[:updated_at] = dd.due_at.strftime('%a, %d %b %Y %H:%M')&lt;br /&gt;
&lt;br /&gt;
timeline_list &amp;lt;&amp;lt; timeline&lt;br /&gt;
&lt;br /&gt;
end&lt;br /&gt;
&lt;br /&gt;
end&lt;br /&gt;
&lt;br /&gt;
end&lt;br /&gt;
&lt;br /&gt;
(v) app/views/assignments/edit.html.erb&lt;br /&gt;
&lt;br /&gt;
&amp;lt;% if @assignment_form.assignment.staggered_deadline == true %&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;%= render partial: '/sign_up_sheet/add_signup_topics_staggered', locals: {review_rounds: @review_rounds, assignment_submission_due_dates: @assignment_submission_due_dates, assignment_review_due_dates: @assignment_review_due_dates, assignment_drop_topic_due_dates: @assignment_drop_topic_due_dates} %&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;% else %&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;%= render '/sign_up_sheet/add_signup_topics' %&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;% end %&amp;gt;&lt;br /&gt;
&lt;br /&gt;
(vi) app/views/sign_up_sheet/_add_signup_topics_staggered.html.erb&lt;br /&gt;
&lt;br /&gt;
&amp;lt;%= form_tag :controller =&amp;gt; 'sign_up_sheet', :action =&amp;gt; 'save_topic_deadlines', :assignment_id =&amp;gt; @assignment.id do %&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;br/&amp;gt;&amp;lt;%= render :partial =&amp;gt; '/sign_up_sheet/due_dates', :locals =&amp;gt; {review_rounds: review_rounds, assignment_submission_due_dates: assignment_submission_due_dates, assignment_review_due_dates: assignment_review_due_dates, assignment_drop_topic_due_dates: assignment_drop_topic_due_dates} %&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;% end %&amp;gt;&lt;br /&gt;
&lt;br /&gt;
(vii) app/views/sign_up_sheet/_due_dates.html.erb&lt;br /&gt;
&lt;br /&gt;
&amp;lt;tr&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;th&amp;gt;Drop deadline&amp;lt;/th&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;%for i in 2..review_rounds%&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;td&amp;gt;&amp;lt;%= @assignment.sign_up_topics[i].topic_name %&amp;gt;&amp;lt;/td&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;% for review_round in 1..review_rounds %&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;% topic_id = @assignment.sign_up_topics[i].id %&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;%if review_round == 1 %&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;td&amp;gt;&amp;lt;%= text_field :due_date, (topic_id.to_s + '_drop_topic_' + review_round.to_s + '_due_date').to_s, size: 20, value: check_topic_due_date_value(assignment_drop_topic_due_dates, topic_id, 6, review_round) %&amp;gt;&amp;lt;/td&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;td&amp;gt;&amp;lt;%= 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) %&amp;gt;&amp;lt;/td&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;td&amp;gt;&amp;lt;%= 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) %&amp;gt;&amp;lt;/td&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;%else%&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;td&amp;gt;&amp;lt;%= 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) %&amp;gt;&amp;lt;/td&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;td&amp;gt;&amp;lt;%= 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) %&amp;gt;&amp;lt;/td&amp;gt; &amp;lt;%end%&amp;gt; &amp;lt;%end%&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;/tr&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;%end%&amp;gt;&lt;br /&gt;
&lt;br /&gt;
== '''Test Plan''' ==&lt;br /&gt;
&lt;br /&gt;
The project does not require any Unit Test cases to be implemented.&lt;br /&gt;
&lt;br /&gt;
== '''References''' ==&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
1. Expertiza on GitHub&lt;br /&gt;
2. GitHub Project Repository Fork&lt;br /&gt;
3. The live Expertiza website&lt;br /&gt;
4. Demo link&lt;br /&gt;
5. Expertiza project documentation wiki&lt;/div&gt;</summary>
		<author><name>Jhmadhwa</name></author>
	</entry>
	<entry>
		<id>https://wiki.expertiza.ncsu.edu/index.php?title=File:1.PNG&amp;diff=118886</id>
		<title>File:1.PNG</title>
		<link rel="alternate" type="text/html" href="https://wiki.expertiza.ncsu.edu/index.php?title=File:1.PNG&amp;diff=118886"/>
		<updated>2018-11-08T22:50:14Z</updated>

		<summary type="html">&lt;p&gt;Jhmadhwa: &lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;&lt;/div&gt;</summary>
		<author><name>Jhmadhwa</name></author>
	</entry>
	<entry>
		<id>https://wiki.expertiza.ncsu.edu/index.php?title=E1843_Issues_Related_To_Deadlines&amp;diff=118884</id>
		<title>E1843 Issues Related To Deadlines</title>
		<link rel="alternate" type="text/html" href="https://wiki.expertiza.ncsu.edu/index.php?title=E1843_Issues_Related_To_Deadlines&amp;diff=118884"/>
		<updated>2018-11-08T22:37:33Z</updated>

		<summary type="html">&lt;p&gt;Jhmadhwa: &lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;This wiki page is for the description of changes made under E1843 OSS assignment for Fall 2018, CSC/ECE 517.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
== '''About Expertiza''' ==&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Expertiza is an open source project based on Ruby on Rails framework and the code is available on Github. Expertiza allows the instructor to create new assignments as well as edit new or existing assignments. Instructors can also create a list of topics the students can sign up for and specify deadlines for completion of various tasks. Students can form teams in Expertiza to work on various projects and assignments as well as peer review other students' submissions. Expertiza supports submission across various document types, including the URLs Wiki pages.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
== '''Issues in the Current Project''' ==&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
1.There is no deadline that specifies when a team can drop their topics. Due to this, few problems occur: The team might drop a topic later on which is close to the submission date and this results in topic not being assigned to any other team on time such that they can submit their assignment. Also, if one team was wait listed for the same topic which the other team dropped closer to the submission deadline, then the first team will be assigned to the dropped topic which is not desirable as they might be working on their assigned topic for long time.&lt;br /&gt;
&lt;br /&gt;
2.There are different topics on which students can work during different times. This type of assignment is known as Staggered- deadline assignment in which different topics have different submission and review deadlines. For these assignments too, there is a need for &amp;quot;Drop Topics Deadline&amp;quot;. In the current implementation, the drop topic deadline is same for all the topics in a Staggered Deadline assignment which is not desirable.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
== '''Corrections made in the New Project''' ==&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
1. The instructor can specify a Drop Topic deadline date now. After a drop topic deadline passes, the &amp;quot;X&amp;quot; in the Sign-Up sheet disables so that the student cannot drop the topic and the waitlist gets cleared.&lt;br /&gt;
&lt;br /&gt;
2. Staggered deadline assignments now have different drop deadlines for different topics in that assignment.&lt;br /&gt;
&lt;br /&gt;
== '''Files modified in Current Project''' ==&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
1. app/controllers/assignments_controller.rb&lt;br /&gt;
&lt;br /&gt;
2. app/controllers/sign_up_sheet_controller.rb&lt;br /&gt;
&lt;br /&gt;
3. app/models/student_task.rb&lt;br /&gt;
&lt;br /&gt;
4. app/views/assignments/edit.html.erb&lt;br /&gt;
&lt;br /&gt;
5. app/views/sign_up_sheet/_add_signup_topics_staggered.html.erb&lt;br /&gt;
&lt;br /&gt;
6. app/views/sign_up_sheet/_due_dates.html.erb&lt;br /&gt;
&lt;br /&gt;
== '''Current Implementation''' ==&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
1. Clearing the waitlist after Drop Deadline passes is implemented in sign_up_sheet_controller.rb where it is checked if the current time is greater than the time mentioned in Drop deadline. If the deadline has been passed, the 'update_is_waitlisted' method of SignedUpTeam model is called to delete all the waitlisted teams. The code snippets for the changes made are attached below:&lt;br /&gt;
&lt;br /&gt;
(i) app/controllers/sign_up_sheet_controller.rb&lt;br /&gt;
&lt;br /&gt;
if !topic_id1.nil? and !@drop_topic_deadline1.nil? and Time.now &amp;gt; @drop_topic_deadline1.due_at&lt;br /&gt;
&lt;br /&gt;
SignedUpTeam.update_is_waitlisted(topic_id1.topic_id,team_id) end&lt;br /&gt;
&lt;br /&gt;
(ii) The 'update_is_waitlisted' method is implemented in app/models/signed_up_team.rb as follows:&lt;br /&gt;
&lt;br /&gt;
def self.update_is_waitlisted(topic_id, team_id)&lt;br /&gt;
&lt;br /&gt;
waitlisted_teams = SignedUpTeam.where(topic_id: topic_id, team_id: team_id)&lt;br /&gt;
&lt;br /&gt;
waitlisted_teams.each do |team|&lt;br /&gt;
&lt;br /&gt;
if(team.is_waitlisted == true)&lt;br /&gt;
&lt;br /&gt;
SignedUpTeam.delete(team.id)&lt;br /&gt;
&lt;br /&gt;
team.save&lt;br /&gt;
&lt;br /&gt;
end&lt;br /&gt;
&lt;br /&gt;
end&lt;br /&gt;
&lt;br /&gt;
end&lt;br /&gt;
&lt;br /&gt;
2. For a Staggered - deadline assignment, each topic will have a different Drop deadline which has been implemented in app/controllers/assignments_controller.rb and app/controllers/sign_up_sheet_controller.rb by first checking if the assignment type is staggered and then retrieving the Drop Deadlines corresponding to each topic from 'TopicDueDate' table. The 'assignments' and 'due_date' views are also updated to include 'Drop topic deadline' column and Drop deadline date in the timeline present in the student view. Following files have been changed to implement this functionality:&lt;br /&gt;
&lt;br /&gt;
(i) app/controllers/assignments_controller.rb&lt;br /&gt;
&lt;br /&gt;
@assignment_submission_due_dates = @due_date_all.select {|due_date| due_date.deadline_type_id == DeadlineHelper::DEALINE_TYPE_SUBMISSION }&lt;br /&gt;
&lt;br /&gt;
@assignment_review_due_dates = @due_date_all.select {|due_date| due_date.deadline_type_id == DeadlineHelper::DEALINE_TYPE_REVIEW} @assignment_drop_topic_due_dates = @due_date_all.select {|due_date| due_date.deadline_type_id == DeadlineHelper::DEADLINE_TYPE_DROP_TOPIC }&lt;br /&gt;
&lt;br /&gt;
(ii) app/controllers/sign_up_sheet_controller.rb&lt;br /&gt;
&lt;br /&gt;
@drop_topic_deadline1 = @assignment.due_dates.find_by(deadline_type_id: 6)&lt;br /&gt;
&lt;br /&gt;
topic_id1 = SignedUpTeam.where(team_id: team_id).first&lt;br /&gt;
&lt;br /&gt;
if @assignment.staggered_deadline?&lt;br /&gt;
&lt;br /&gt;
@drop_topic_deadline1 = TopicDueDate.where(parent_id: topic_id1.topic_id, deadline_type_id: 6).first rescue nil end&lt;br /&gt;
&lt;br /&gt;
due_dates = params[:due_date]&lt;br /&gt;
&lt;br /&gt;
topics = SignUpTopic.where(assignment_id: params[:assignment_id])&lt;br /&gt;
&lt;br /&gt;
review_rounds = assignment.num_review_rounds&lt;br /&gt;
&lt;br /&gt;
topics.each_with_index do |topic, index|&lt;br /&gt;
&lt;br /&gt;
for i in 1..review_rounds&lt;br /&gt;
&lt;br /&gt;
@topic_drop_topic_due_date = due_dates[topics[index].id.to_s + '_drop_topic_' + i.to_s + '_due_date']&lt;br /&gt;
&lt;br /&gt;
if assignment.due_dates.select {|due_date| due_date.deadline_type_id == 6 }.nil?&lt;br /&gt;
&lt;br /&gt;
@assignment_drop_topic_due_date = DateTime.parse(@assignment_drop_topic_due_dates[i - 1].due_at.to_s).strftime(&amp;quot;%Y-%m-%d %H:%M&amp;quot;)&lt;br /&gt;
&lt;br /&gt;
end&lt;br /&gt;
&lt;br /&gt;
end&lt;br /&gt;
&lt;br /&gt;
(iii) app/helpers/sign_up_sheet_helper.rb&lt;br /&gt;
&lt;br /&gt;
if assignment_due_dates.length == 0&lt;br /&gt;
&lt;br /&gt;
assignment_due_dates = @assignment_submission_due_dates&lt;br /&gt;
&lt;br /&gt;
end&lt;br /&gt;
&lt;br /&gt;
(iv) app/models/student_task.rb&lt;br /&gt;
&lt;br /&gt;
def self.get_due_date_data(assignment, timeline_list, participant)&lt;br /&gt;
&lt;br /&gt;
if assignment.staggered_deadline?&lt;br /&gt;
&lt;br /&gt;
team_id = participant.team.try(:id)&lt;br /&gt;
&lt;br /&gt;
topic_id1 = SignedUpTeam.where(team_id: team_id).first&lt;br /&gt;
&lt;br /&gt;
if !topic_id1.nil?&lt;br /&gt;
&lt;br /&gt;
topic_due_date = TopicDueDate.where(parent_id: topic_id1.topic_id, deadline_type_id: 6).first rescue nil&lt;br /&gt;
&lt;br /&gt;
timeline = {label: ('Drop Topic Deadline').humanize}&lt;br /&gt;
&lt;br /&gt;
timeline[:updated_at] = topic_due_date.due_at.strftime('%a, %d %b %Y %H:%M')&lt;br /&gt;
&lt;br /&gt;
timeline_list &amp;lt;&amp;lt; timeline&lt;br /&gt;
&lt;br /&gt;
end&lt;br /&gt;
&lt;br /&gt;
end&lt;br /&gt;
&lt;br /&gt;
assignment.due_dates.each do |dd|&lt;br /&gt;
&lt;br /&gt;
timeline = {label: (dd.deadline_type.name + ' Deadline').humanize}&lt;br /&gt;
&lt;br /&gt;
unless dd.due_at.nil?&lt;br /&gt;
&lt;br /&gt;
timeline[:updated_at] = dd.due_at.strftime('%a, %d %b %Y %H:%M')&lt;br /&gt;
&lt;br /&gt;
timeline_list &amp;lt;&amp;lt; timeline&lt;br /&gt;
&lt;br /&gt;
end&lt;br /&gt;
&lt;br /&gt;
end&lt;br /&gt;
&lt;br /&gt;
end&lt;br /&gt;
&lt;br /&gt;
(v) app/views/assignments/edit.html.erb&lt;br /&gt;
&lt;br /&gt;
&amp;lt;% if @assignment_form.assignment.staggered_deadline == true %&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;%= render partial: '/sign_up_sheet/add_signup_topics_staggered', locals: {review_rounds: @review_rounds, assignment_submission_due_dates: @assignment_submission_due_dates, assignment_review_due_dates: @assignment_review_due_dates, assignment_drop_topic_due_dates: @assignment_drop_topic_due_dates} %&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;% else %&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;%= render '/sign_up_sheet/add_signup_topics' %&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;% end %&amp;gt;&lt;br /&gt;
&lt;br /&gt;
(vi) app/views/sign_up_sheet/_add_signup_topics_staggered.html.erb&lt;br /&gt;
&lt;br /&gt;
&amp;lt;%= form_tag :controller =&amp;gt; 'sign_up_sheet', :action =&amp;gt; 'save_topic_deadlines', :assignment_id =&amp;gt; @assignment.id do %&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;br/&amp;gt;&amp;lt;%= render :partial =&amp;gt; '/sign_up_sheet/due_dates', :locals =&amp;gt; {review_rounds: review_rounds, assignment_submission_due_dates: assignment_submission_due_dates, assignment_review_due_dates: assignment_review_due_dates, assignment_drop_topic_due_dates: assignment_drop_topic_due_dates} %&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;% end %&amp;gt;&lt;br /&gt;
&lt;br /&gt;
(vii) app/views/sign_up_sheet/_due_dates.html.erb&lt;br /&gt;
&lt;br /&gt;
&amp;lt;tr&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;th&amp;gt;Drop deadline&amp;lt;/th&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;%for i in 2..review_rounds%&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;td&amp;gt;&amp;lt;%= @assignment.sign_up_topics[i].topic_name %&amp;gt;&amp;lt;/td&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;% for review_round in 1..review_rounds %&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;% topic_id = @assignment.sign_up_topics[i].id %&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;%if review_round == 1 %&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;td&amp;gt;&amp;lt;%= text_field :due_date, (topic_id.to_s + '_drop_topic_' + review_round.to_s + '_due_date').to_s, size: 20, value: check_topic_due_date_value(assignment_drop_topic_due_dates, topic_id, 6, review_round) %&amp;gt;&amp;lt;/td&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;td&amp;gt;&amp;lt;%= 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) %&amp;gt;&amp;lt;/td&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;td&amp;gt;&amp;lt;%= 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) %&amp;gt;&amp;lt;/td&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;%else%&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;td&amp;gt;&amp;lt;%= 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) %&amp;gt;&amp;lt;/td&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;td&amp;gt;&amp;lt;%= 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) %&amp;gt;&amp;lt;/td&amp;gt; &amp;lt;%end%&amp;gt; &amp;lt;%end%&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;/tr&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;%end%&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
== '''Test Plan''' ==&lt;br /&gt;
&lt;br /&gt;
The project does not require any Unit Test cases to be implemented.&lt;br /&gt;
&lt;br /&gt;
== '''References''' ==&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
1. Expertiza on GitHub&lt;br /&gt;
2. GitHub Project Repository Fork&lt;br /&gt;
3. The live Expertiza website&lt;br /&gt;
4. Demo link&lt;br /&gt;
5. Expertiza project documentation wiki&lt;/div&gt;</summary>
		<author><name>Jhmadhwa</name></author>
	</entry>
	<entry>
		<id>https://wiki.expertiza.ncsu.edu/index.php?title=E1843_Issues_Related_To_Deadlines&amp;diff=118882</id>
		<title>E1843 Issues Related To Deadlines</title>
		<link rel="alternate" type="text/html" href="https://wiki.expertiza.ncsu.edu/index.php?title=E1843_Issues_Related_To_Deadlines&amp;diff=118882"/>
		<updated>2018-11-08T22:33:40Z</updated>

		<summary type="html">&lt;p&gt;Jhmadhwa: /* Corrections made in the New Project */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;This wiki page is for the description of changes made under E1843 OSS assignment for Fall 2018, CSC/ECE 517.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
== '''About Expertiza''' ==&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Expertiza is an open source project based on Ruby on Rails framework and the code is available on Github. Expertiza allows the instructor to create new assignments as well as edit new or existing assignments. Instructors can also create a list of topics the students can sign up for and specify deadlines for completion of various tasks. Students can form teams in Expertiza to work on various projects and assignments as well as peer review other students' submissions. Expertiza supports submission across various document types, including the URLs Wiki pages.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
== '''Issues in the Current Project''' ==&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
1.There is no deadline that specifies when a team can drop their topics. Due to this, few problems occur: The team might drop a topic later on which is close to the submission date and this results in topic not being assigned to any other team on time such that they can submit their assignment. Also, if one team was wait listed for the same topic which the other team dropped closer to the submission deadline, then the first team will be assigned to the dropped topic which is not desirable as they might be working on their assigned topic for long time.&lt;br /&gt;
&lt;br /&gt;
2.There are different topics on which students can work during different times. This type of assignment is known as Staggered- deadline assignment in which different topics have different submission and review deadlines. For these assignments too, there is a need for &amp;quot;Drop Topics Deadline&amp;quot;. In the current implementation, the drop topic deadline is same for all the topics in a Staggered Deadline assignment which is not desirable.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
== '''Corrections made in the New Project''' ==&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
1. The instructor can specify a Drop Topic deadline date now. After a drop topic deadline passes, the &amp;quot;X&amp;quot; in the Sign-Up sheet disables so that the student cannot drop the topic and the waitlist gets cleared.&lt;br /&gt;
&lt;br /&gt;
2. Staggered deadline assignments now have different drop deadlines for different topics in that assignment.&lt;br /&gt;
&lt;br /&gt;
== '''Files modified in Current Project''' ==&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
1. app/controllers/assignments_controller.rb&lt;br /&gt;
&lt;br /&gt;
2. app/controllers/sign_up_sheet_controller.rb&lt;br /&gt;
&lt;br /&gt;
3. app/models/student_task.rb&lt;br /&gt;
&lt;br /&gt;
4. app/views/assignments/edit.html.erb&lt;br /&gt;
&lt;br /&gt;
5. app/views/sign_up_sheet/_add_signup_topics_staggered.html.erb&lt;br /&gt;
&lt;br /&gt;
6. app/views/sign_up_sheet/_due_dates.html.erb&lt;br /&gt;
&lt;br /&gt;
== '''Current Implementation''' ==&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
1. Clearing the waitlist after Drop Deadline passes is implemented in sign_up_sheet_controller.rb where it is checked if the current time is greater than the time mentioned in Drop deadline. If the deadline has been passed, the 'update_is_waitlisted' method of SignedUpTeam model is called to delete all the waitlisted teams. The code snippets for the changes made are attached below:&lt;br /&gt;
&lt;br /&gt;
(i) app/controllers/sign_up_sheet_controller.rb&lt;br /&gt;
&lt;br /&gt;
if !topic_id1.nil? and !@drop_topic_deadline1.nil? and Time.now &amp;gt; @drop_topic_deadline1.due_at&lt;br /&gt;
&lt;br /&gt;
SignedUpTeam.update_is_waitlisted(topic_id1.topic_id,team_id) end&lt;br /&gt;
&lt;br /&gt;
(ii) The 'update_is_waitlisted' method is implemented in app/models/signed_up_team.rb as follows:&lt;br /&gt;
&lt;br /&gt;
def self.update_is_waitlisted(topic_id, team_id)&lt;br /&gt;
&lt;br /&gt;
waitlisted_teams = SignedUpTeam.where(topic_id: topic_id, team_id: team_id)&lt;br /&gt;
&lt;br /&gt;
waitlisted_teams.each do |team|&lt;br /&gt;
&lt;br /&gt;
if(team.is_waitlisted == true)&lt;br /&gt;
&lt;br /&gt;
SignedUpTeam.delete(team.id)&lt;br /&gt;
&lt;br /&gt;
team.save&lt;br /&gt;
&lt;br /&gt;
end&lt;br /&gt;
&lt;br /&gt;
end&lt;br /&gt;
&lt;br /&gt;
end&lt;br /&gt;
&lt;br /&gt;
2. For a Staggered - deadline assignment, each topic will have a different Drop deadline which has been implemented in app/controllers/assignments_controller.rb and app/controllers/sign_up_sheet_controller.rb by first checking if the assignment type is staggered and then retrieving the Drop Deadlines corresponding to each topic from 'TopicDueDate' table. The 'assignments' and 'due_date' views are also updated to include 'Drop topic deadline' column and Drop deadline date in the timeline present in the student view. Following files have been changed to implement this functionality:&lt;br /&gt;
&lt;br /&gt;
(i) app/controllers/assignments_controller.rb&lt;br /&gt;
&lt;br /&gt;
@assignment_submission_due_dates = @due_date_all.select {|due_date| due_date.deadline_type_id == DeadlineHelper::DEALINE_TYPE_SUBMISSION }&lt;br /&gt;
&lt;br /&gt;
@assignment_review_due_dates = @due_date_all.select {|due_date| due_date.deadline_type_id == DeadlineHelper::DEALINE_TYPE_REVIEW} @assignment_drop_topic_due_dates = @due_date_all.select {|due_date| due_date.deadline_type_id == DeadlineHelper::DEADLINE_TYPE_DROP_TOPIC }&lt;br /&gt;
&lt;br /&gt;
(ii) app/controllers/sign_up_sheet_controller.rb&lt;br /&gt;
&lt;br /&gt;
@drop_topic_deadline1 = @assignment.due_dates.find_by(deadline_type_id: 6)&lt;br /&gt;
&lt;br /&gt;
topic_id1 = SignedUpTeam.where(team_id: team_id).first&lt;br /&gt;
&lt;br /&gt;
if @assignment.staggered_deadline?&lt;br /&gt;
&lt;br /&gt;
@drop_topic_deadline1 = TopicDueDate.where(parent_id: topic_id1.topic_id, deadline_type_id: 6).first rescue nil end&lt;br /&gt;
&lt;br /&gt;
due_dates = params[:due_date]&lt;br /&gt;
&lt;br /&gt;
topics = SignUpTopic.where(assignment_id: params[:assignment_id])&lt;br /&gt;
&lt;br /&gt;
review_rounds = assignment.num_review_rounds&lt;br /&gt;
&lt;br /&gt;
topics.each_with_index do |topic, index|&lt;br /&gt;
&lt;br /&gt;
for i in 1..review_rounds&lt;br /&gt;
&lt;br /&gt;
@topic_drop_topic_due_date = due_dates[topics[index].id.to_s + '_drop_topic_' + i.to_s + '_due_date']&lt;br /&gt;
&lt;br /&gt;
if assignment.due_dates.select {|due_date| due_date.deadline_type_id == 6 }.nil?&lt;br /&gt;
&lt;br /&gt;
@assignment_drop_topic_due_date = DateTime.parse(@assignment_drop_topic_due_dates[i - 1].due_at.to_s).strftime(&amp;quot;%Y-%m-%d %H:%M&amp;quot;)&lt;br /&gt;
&lt;br /&gt;
end&lt;br /&gt;
&lt;br /&gt;
end&lt;br /&gt;
&lt;br /&gt;
(iii) app/helpers/sign_up_sheet_helper.rb&lt;br /&gt;
&lt;br /&gt;
if assignment_due_dates.length == 0&lt;br /&gt;
&lt;br /&gt;
assignment_due_dates = @assignment_submission_due_dates&lt;br /&gt;
&lt;br /&gt;
end&lt;br /&gt;
&lt;br /&gt;
(iv) app/models/student_task.rb&lt;br /&gt;
&lt;br /&gt;
def self.get_due_date_data(assignment, timeline_list, participant)&lt;br /&gt;
&lt;br /&gt;
if assignment.staggered_deadline?&lt;br /&gt;
&lt;br /&gt;
team_id = participant.team.try(:id)&lt;br /&gt;
&lt;br /&gt;
topic_id1 = SignedUpTeam.where(team_id: team_id).first&lt;br /&gt;
&lt;br /&gt;
if !topic_id1.nil?&lt;br /&gt;
&lt;br /&gt;
topic_due_date = TopicDueDate.where(parent_id: topic_id1.topic_id, deadline_type_id: 6).first rescue nil&lt;br /&gt;
&lt;br /&gt;
timeline = {label: ('Drop Topic Deadline').humanize}&lt;br /&gt;
&lt;br /&gt;
timeline[:updated_at] = topic_due_date.due_at.strftime('%a, %d %b %Y %H:%M')&lt;br /&gt;
&lt;br /&gt;
timeline_list &amp;lt;&amp;lt; timeline&lt;br /&gt;
&lt;br /&gt;
end&lt;br /&gt;
&lt;br /&gt;
end&lt;br /&gt;
&lt;br /&gt;
assignment.due_dates.each do |dd|&lt;br /&gt;
&lt;br /&gt;
timeline = {label: (dd.deadline_type.name + ' Deadline').humanize}&lt;br /&gt;
&lt;br /&gt;
unless dd.due_at.nil?&lt;br /&gt;
&lt;br /&gt;
timeline[:updated_at] = dd.due_at.strftime('%a, %d %b %Y %H:%M')&lt;br /&gt;
&lt;br /&gt;
timeline_list &amp;lt;&amp;lt; timeline&lt;br /&gt;
&lt;br /&gt;
end&lt;br /&gt;
&lt;br /&gt;
end&lt;br /&gt;
&lt;br /&gt;
end&lt;br /&gt;
&lt;br /&gt;
(v) app/views/assignments/edit.html.erb&lt;br /&gt;
&lt;br /&gt;
&amp;lt;% if @assignment_form.assignment.staggered_deadline == true %&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;%= render partial: '/sign_up_sheet/add_signup_topics_staggered', locals: {review_rounds: @review_rounds, assignment_submission_due_dates: @assignment_submission_due_dates, assignment_review_due_dates: @assignment_review_due_dates, assignment_drop_topic_due_dates: @assignment_drop_topic_due_dates} %&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;% else %&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;%= render '/sign_up_sheet/add_signup_topics' %&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;% end %&amp;gt;&lt;br /&gt;
&lt;br /&gt;
(vi) app/views/sign_up_sheet/_add_signup_topics_staggered.html.erb&lt;br /&gt;
&lt;br /&gt;
&amp;lt;%= form_tag :controller =&amp;gt; 'sign_up_sheet', :action =&amp;gt; 'save_topic_deadlines', :assignment_id =&amp;gt; @assignment.id do %&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;br/&amp;gt;&amp;lt;%= render :partial =&amp;gt; '/sign_up_sheet/due_dates', :locals =&amp;gt; {review_rounds: review_rounds, assignment_submission_due_dates: assignment_submission_due_dates, assignment_review_due_dates: assignment_review_due_dates, assignment_drop_topic_due_dates: assignment_drop_topic_due_dates} %&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;% end %&amp;gt;&lt;br /&gt;
&lt;br /&gt;
(vii) app/views/sign_up_sheet/_due_dates.html.erb&lt;br /&gt;
&lt;br /&gt;
&amp;lt;tr&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;th&amp;gt;Drop deadline&amp;lt;/th&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;%for i in 2..review_rounds%&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;td&amp;gt;&amp;lt;%= @assignment.sign_up_topics[i].topic_name %&amp;gt;&amp;lt;/td&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;% for review_round in 1..review_rounds %&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;% topic_id = @assignment.sign_up_topics[i].id %&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;%if review_round == 1 %&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;td&amp;gt;&amp;lt;%= text_field :due_date, (topic_id.to_s + '_drop_topic_' + review_round.to_s + '_due_date').to_s, size: 20, value: check_topic_due_date_value(assignment_drop_topic_due_dates, topic_id, 6, review_round) %&amp;gt;&amp;lt;/td&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;td&amp;gt;&amp;lt;%= 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) %&amp;gt;&amp;lt;/td&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;td&amp;gt;&amp;lt;%= 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) %&amp;gt;&amp;lt;/td&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;%else%&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;td&amp;gt;&amp;lt;%= 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) %&amp;gt;&amp;lt;/td&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;td&amp;gt;&amp;lt;%= 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) %&amp;gt;&amp;lt;/td&amp;gt; &amp;lt;%end%&amp;gt; &amp;lt;%end%&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;/tr&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;%end%&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
== '''References''' ==&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
1. Expertiza on GitHub&lt;br /&gt;
2. GitHub Project Repository Fork&lt;br /&gt;
3. The live Expertiza website&lt;br /&gt;
4. Demo link&lt;br /&gt;
5. Expertiza project documentation wiki&lt;/div&gt;</summary>
		<author><name>Jhmadhwa</name></author>
	</entry>
	<entry>
		<id>https://wiki.expertiza.ncsu.edu/index.php?title=E1843_Issues_Related_To_Deadlines&amp;diff=118881</id>
		<title>E1843 Issues Related To Deadlines</title>
		<link rel="alternate" type="text/html" href="https://wiki.expertiza.ncsu.edu/index.php?title=E1843_Issues_Related_To_Deadlines&amp;diff=118881"/>
		<updated>2018-11-08T22:33:10Z</updated>

		<summary type="html">&lt;p&gt;Jhmadhwa: /* Files modified in Current Project */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;This wiki page is for the description of changes made under E1843 OSS assignment for Fall 2018, CSC/ECE 517.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
== '''About Expertiza''' ==&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Expertiza is an open source project based on Ruby on Rails framework and the code is available on Github. Expertiza allows the instructor to create new assignments as well as edit new or existing assignments. Instructors can also create a list of topics the students can sign up for and specify deadlines for completion of various tasks. Students can form teams in Expertiza to work on various projects and assignments as well as peer review other students' submissions. Expertiza supports submission across various document types, including the URLs Wiki pages.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
== '''Issues in the Current Project''' ==&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
1.There is no deadline that specifies when a team can drop their topics. Due to this, few problems occur: The team might drop a topic later on which is close to the submission date and this results in topic not being assigned to any other team on time such that they can submit their assignment. Also, if one team was wait listed for the same topic which the other team dropped closer to the submission deadline, then the first team will be assigned to the dropped topic which is not desirable as they might be working on their assigned topic for long time.&lt;br /&gt;
&lt;br /&gt;
2.There are different topics on which students can work during different times. This type of assignment is known as Staggered- deadline assignment in which different topics have different submission and review deadlines. For these assignments too, there is a need for &amp;quot;Drop Topics Deadline&amp;quot;. In the current implementation, the drop topic deadline is same for all the topics in a Staggered Deadline assignment which is not desirable.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
== '''Corrections made in the New Project''' ==&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
1. The instructor can specify a Drop Topic deadline date now. After a drop topic deadline passes, the &amp;quot;X&amp;quot; in the Sign-Up sheet disables so that the student cannot drop the topic and the waitlist gets cleared.&lt;br /&gt;
2. Staggered deadline assignments now have different drop deadlines for different topics in that assignment.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
== '''Files modified in Current Project''' ==&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
1. app/controllers/assignments_controller.rb&lt;br /&gt;
&lt;br /&gt;
2. app/controllers/sign_up_sheet_controller.rb&lt;br /&gt;
&lt;br /&gt;
3. app/models/student_task.rb&lt;br /&gt;
&lt;br /&gt;
4. app/views/assignments/edit.html.erb&lt;br /&gt;
&lt;br /&gt;
5. app/views/sign_up_sheet/_add_signup_topics_staggered.html.erb&lt;br /&gt;
&lt;br /&gt;
6. app/views/sign_up_sheet/_due_dates.html.erb&lt;br /&gt;
&lt;br /&gt;
== '''Current Implementation''' ==&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
1. Clearing the waitlist after Drop Deadline passes is implemented in sign_up_sheet_controller.rb where it is checked if the current time is greater than the time mentioned in Drop deadline. If the deadline has been passed, the 'update_is_waitlisted' method of SignedUpTeam model is called to delete all the waitlisted teams. The code snippets for the changes made are attached below:&lt;br /&gt;
&lt;br /&gt;
(i) app/controllers/sign_up_sheet_controller.rb&lt;br /&gt;
&lt;br /&gt;
if !topic_id1.nil? and !@drop_topic_deadline1.nil? and Time.now &amp;gt; @drop_topic_deadline1.due_at&lt;br /&gt;
&lt;br /&gt;
SignedUpTeam.update_is_waitlisted(topic_id1.topic_id,team_id) end&lt;br /&gt;
&lt;br /&gt;
(ii) The 'update_is_waitlisted' method is implemented in app/models/signed_up_team.rb as follows:&lt;br /&gt;
&lt;br /&gt;
def self.update_is_waitlisted(topic_id, team_id)&lt;br /&gt;
&lt;br /&gt;
waitlisted_teams = SignedUpTeam.where(topic_id: topic_id, team_id: team_id)&lt;br /&gt;
&lt;br /&gt;
waitlisted_teams.each do |team|&lt;br /&gt;
&lt;br /&gt;
if(team.is_waitlisted == true)&lt;br /&gt;
&lt;br /&gt;
SignedUpTeam.delete(team.id)&lt;br /&gt;
&lt;br /&gt;
team.save&lt;br /&gt;
&lt;br /&gt;
end&lt;br /&gt;
&lt;br /&gt;
end&lt;br /&gt;
&lt;br /&gt;
end&lt;br /&gt;
&lt;br /&gt;
2. For a Staggered - deadline assignment, each topic will have a different Drop deadline which has been implemented in app/controllers/assignments_controller.rb and app/controllers/sign_up_sheet_controller.rb by first checking if the assignment type is staggered and then retrieving the Drop Deadlines corresponding to each topic from 'TopicDueDate' table. The 'assignments' and 'due_date' views are also updated to include 'Drop topic deadline' column and Drop deadline date in the timeline present in the student view. Following files have been changed to implement this functionality:&lt;br /&gt;
&lt;br /&gt;
(i) app/controllers/assignments_controller.rb&lt;br /&gt;
&lt;br /&gt;
@assignment_submission_due_dates = @due_date_all.select {|due_date| due_date.deadline_type_id == DeadlineHelper::DEALINE_TYPE_SUBMISSION }&lt;br /&gt;
&lt;br /&gt;
@assignment_review_due_dates = @due_date_all.select {|due_date| due_date.deadline_type_id == DeadlineHelper::DEALINE_TYPE_REVIEW} @assignment_drop_topic_due_dates = @due_date_all.select {|due_date| due_date.deadline_type_id == DeadlineHelper::DEADLINE_TYPE_DROP_TOPIC }&lt;br /&gt;
&lt;br /&gt;
(ii) app/controllers/sign_up_sheet_controller.rb&lt;br /&gt;
&lt;br /&gt;
@drop_topic_deadline1 = @assignment.due_dates.find_by(deadline_type_id: 6)&lt;br /&gt;
&lt;br /&gt;
topic_id1 = SignedUpTeam.where(team_id: team_id).first&lt;br /&gt;
&lt;br /&gt;
if @assignment.staggered_deadline?&lt;br /&gt;
&lt;br /&gt;
@drop_topic_deadline1 = TopicDueDate.where(parent_id: topic_id1.topic_id, deadline_type_id: 6).first rescue nil end&lt;br /&gt;
&lt;br /&gt;
due_dates = params[:due_date]&lt;br /&gt;
&lt;br /&gt;
topics = SignUpTopic.where(assignment_id: params[:assignment_id])&lt;br /&gt;
&lt;br /&gt;
review_rounds = assignment.num_review_rounds&lt;br /&gt;
&lt;br /&gt;
topics.each_with_index do |topic, index|&lt;br /&gt;
&lt;br /&gt;
for i in 1..review_rounds&lt;br /&gt;
&lt;br /&gt;
@topic_drop_topic_due_date = due_dates[topics[index].id.to_s + '_drop_topic_' + i.to_s + '_due_date']&lt;br /&gt;
&lt;br /&gt;
if assignment.due_dates.select {|due_date| due_date.deadline_type_id == 6 }.nil?&lt;br /&gt;
&lt;br /&gt;
@assignment_drop_topic_due_date = DateTime.parse(@assignment_drop_topic_due_dates[i - 1].due_at.to_s).strftime(&amp;quot;%Y-%m-%d %H:%M&amp;quot;)&lt;br /&gt;
&lt;br /&gt;
end&lt;br /&gt;
&lt;br /&gt;
end&lt;br /&gt;
&lt;br /&gt;
(iii) app/helpers/sign_up_sheet_helper.rb&lt;br /&gt;
&lt;br /&gt;
if assignment_due_dates.length == 0&lt;br /&gt;
&lt;br /&gt;
assignment_due_dates = @assignment_submission_due_dates&lt;br /&gt;
&lt;br /&gt;
end&lt;br /&gt;
&lt;br /&gt;
(iv) app/models/student_task.rb&lt;br /&gt;
&lt;br /&gt;
def self.get_due_date_data(assignment, timeline_list, participant)&lt;br /&gt;
&lt;br /&gt;
if assignment.staggered_deadline?&lt;br /&gt;
&lt;br /&gt;
team_id = participant.team.try(:id)&lt;br /&gt;
&lt;br /&gt;
topic_id1 = SignedUpTeam.where(team_id: team_id).first&lt;br /&gt;
&lt;br /&gt;
if !topic_id1.nil?&lt;br /&gt;
&lt;br /&gt;
topic_due_date = TopicDueDate.where(parent_id: topic_id1.topic_id, deadline_type_id: 6).first rescue nil&lt;br /&gt;
&lt;br /&gt;
timeline = {label: ('Drop Topic Deadline').humanize}&lt;br /&gt;
&lt;br /&gt;
timeline[:updated_at] = topic_due_date.due_at.strftime('%a, %d %b %Y %H:%M')&lt;br /&gt;
&lt;br /&gt;
timeline_list &amp;lt;&amp;lt; timeline&lt;br /&gt;
&lt;br /&gt;
end&lt;br /&gt;
&lt;br /&gt;
end&lt;br /&gt;
&lt;br /&gt;
assignment.due_dates.each do |dd|&lt;br /&gt;
&lt;br /&gt;
timeline = {label: (dd.deadline_type.name + ' Deadline').humanize}&lt;br /&gt;
&lt;br /&gt;
unless dd.due_at.nil?&lt;br /&gt;
&lt;br /&gt;
timeline[:updated_at] = dd.due_at.strftime('%a, %d %b %Y %H:%M')&lt;br /&gt;
&lt;br /&gt;
timeline_list &amp;lt;&amp;lt; timeline&lt;br /&gt;
&lt;br /&gt;
end&lt;br /&gt;
&lt;br /&gt;
end&lt;br /&gt;
&lt;br /&gt;
end&lt;br /&gt;
&lt;br /&gt;
(v) app/views/assignments/edit.html.erb&lt;br /&gt;
&lt;br /&gt;
&amp;lt;% if @assignment_form.assignment.staggered_deadline == true %&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;%= render partial: '/sign_up_sheet/add_signup_topics_staggered', locals: {review_rounds: @review_rounds, assignment_submission_due_dates: @assignment_submission_due_dates, assignment_review_due_dates: @assignment_review_due_dates, assignment_drop_topic_due_dates: @assignment_drop_topic_due_dates} %&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;% else %&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;%= render '/sign_up_sheet/add_signup_topics' %&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;% end %&amp;gt;&lt;br /&gt;
&lt;br /&gt;
(vi) app/views/sign_up_sheet/_add_signup_topics_staggered.html.erb&lt;br /&gt;
&lt;br /&gt;
&amp;lt;%= form_tag :controller =&amp;gt; 'sign_up_sheet', :action =&amp;gt; 'save_topic_deadlines', :assignment_id =&amp;gt; @assignment.id do %&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;br/&amp;gt;&amp;lt;%= render :partial =&amp;gt; '/sign_up_sheet/due_dates', :locals =&amp;gt; {review_rounds: review_rounds, assignment_submission_due_dates: assignment_submission_due_dates, assignment_review_due_dates: assignment_review_due_dates, assignment_drop_topic_due_dates: assignment_drop_topic_due_dates} %&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;% end %&amp;gt;&lt;br /&gt;
&lt;br /&gt;
(vii) app/views/sign_up_sheet/_due_dates.html.erb&lt;br /&gt;
&lt;br /&gt;
&amp;lt;tr&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;th&amp;gt;Drop deadline&amp;lt;/th&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;%for i in 2..review_rounds%&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;td&amp;gt;&amp;lt;%= @assignment.sign_up_topics[i].topic_name %&amp;gt;&amp;lt;/td&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;% for review_round in 1..review_rounds %&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;% topic_id = @assignment.sign_up_topics[i].id %&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;%if review_round == 1 %&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;td&amp;gt;&amp;lt;%= text_field :due_date, (topic_id.to_s + '_drop_topic_' + review_round.to_s + '_due_date').to_s, size: 20, value: check_topic_due_date_value(assignment_drop_topic_due_dates, topic_id, 6, review_round) %&amp;gt;&amp;lt;/td&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;td&amp;gt;&amp;lt;%= 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) %&amp;gt;&amp;lt;/td&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;td&amp;gt;&amp;lt;%= 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) %&amp;gt;&amp;lt;/td&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;%else%&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;td&amp;gt;&amp;lt;%= 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) %&amp;gt;&amp;lt;/td&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;td&amp;gt;&amp;lt;%= 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) %&amp;gt;&amp;lt;/td&amp;gt; &amp;lt;%end%&amp;gt; &amp;lt;%end%&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;/tr&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;%end%&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
== '''References''' ==&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
1. Expertiza on GitHub&lt;br /&gt;
2. GitHub Project Repository Fork&lt;br /&gt;
3. The live Expertiza website&lt;br /&gt;
4. Demo link&lt;br /&gt;
5. Expertiza project documentation wiki&lt;/div&gt;</summary>
		<author><name>Jhmadhwa</name></author>
	</entry>
	<entry>
		<id>https://wiki.expertiza.ncsu.edu/index.php?title=E1843_Issues_Related_To_Deadlines&amp;diff=118880</id>
		<title>E1843 Issues Related To Deadlines</title>
		<link rel="alternate" type="text/html" href="https://wiki.expertiza.ncsu.edu/index.php?title=E1843_Issues_Related_To_Deadlines&amp;diff=118880"/>
		<updated>2018-11-08T22:32:36Z</updated>

		<summary type="html">&lt;p&gt;Jhmadhwa: &lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;This wiki page is for the description of changes made under E1843 OSS assignment for Fall 2018, CSC/ECE 517.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
== '''About Expertiza''' ==&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Expertiza is an open source project based on Ruby on Rails framework and the code is available on Github. Expertiza allows the instructor to create new assignments as well as edit new or existing assignments. Instructors can also create a list of topics the students can sign up for and specify deadlines for completion of various tasks. Students can form teams in Expertiza to work on various projects and assignments as well as peer review other students' submissions. Expertiza supports submission across various document types, including the URLs Wiki pages.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
== '''Issues in the Current Project''' ==&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
1.There is no deadline that specifies when a team can drop their topics. Due to this, few problems occur: The team might drop a topic later on which is close to the submission date and this results in topic not being assigned to any other team on time such that they can submit their assignment. Also, if one team was wait listed for the same topic which the other team dropped closer to the submission deadline, then the first team will be assigned to the dropped topic which is not desirable as they might be working on their assigned topic for long time.&lt;br /&gt;
&lt;br /&gt;
2.There are different topics on which students can work during different times. This type of assignment is known as Staggered- deadline assignment in which different topics have different submission and review deadlines. For these assignments too, there is a need for &amp;quot;Drop Topics Deadline&amp;quot;. In the current implementation, the drop topic deadline is same for all the topics in a Staggered Deadline assignment which is not desirable.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
== '''Corrections made in the New Project''' ==&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
1. The instructor can specify a Drop Topic deadline date now. After a drop topic deadline passes, the &amp;quot;X&amp;quot; in the Sign-Up sheet disables so that the student cannot drop the topic and the waitlist gets cleared.&lt;br /&gt;
2. Staggered deadline assignments now have different drop deadlines for different topics in that assignment.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
== '''Files modified in Current Project''' ==&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
1. app/controllers/assignments_controller.rb&lt;br /&gt;
2. app/controllers/sign_up_sheet_controller.rb&lt;br /&gt;
3. app/models/student_task.rb&lt;br /&gt;
4. app/views/assignments/edit.html.erb&lt;br /&gt;
5. app/views/sign_up_sheet/_add_signup_topics_staggered.html.erb&lt;br /&gt;
6. app/views/sign_up_sheet/_due_dates.html.erb&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
== '''Current Implementation''' ==&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
1. Clearing the waitlist after Drop Deadline passes is implemented in sign_up_sheet_controller.rb where it is checked if the current time is greater than the time mentioned in Drop deadline. If the deadline has been passed, the 'update_is_waitlisted' method of SignedUpTeam model is called to delete all the waitlisted teams. The code snippets for the changes made are attached below:&lt;br /&gt;
&lt;br /&gt;
(i) app/controllers/sign_up_sheet_controller.rb&lt;br /&gt;
&lt;br /&gt;
if !topic_id1.nil? and !@drop_topic_deadline1.nil? and Time.now &amp;gt; @drop_topic_deadline1.due_at&lt;br /&gt;
&lt;br /&gt;
SignedUpTeam.update_is_waitlisted(topic_id1.topic_id,team_id) end&lt;br /&gt;
&lt;br /&gt;
(ii) The 'update_is_waitlisted' method is implemented in app/models/signed_up_team.rb as follows:&lt;br /&gt;
&lt;br /&gt;
def self.update_is_waitlisted(topic_id, team_id)&lt;br /&gt;
&lt;br /&gt;
waitlisted_teams = SignedUpTeam.where(topic_id: topic_id, team_id: team_id)&lt;br /&gt;
&lt;br /&gt;
waitlisted_teams.each do |team|&lt;br /&gt;
&lt;br /&gt;
if(team.is_waitlisted == true)&lt;br /&gt;
&lt;br /&gt;
SignedUpTeam.delete(team.id)&lt;br /&gt;
&lt;br /&gt;
team.save&lt;br /&gt;
&lt;br /&gt;
end&lt;br /&gt;
&lt;br /&gt;
end&lt;br /&gt;
&lt;br /&gt;
end&lt;br /&gt;
&lt;br /&gt;
2. For a Staggered - deadline assignment, each topic will have a different Drop deadline which has been implemented in app/controllers/assignments_controller.rb and app/controllers/sign_up_sheet_controller.rb by first checking if the assignment type is staggered and then retrieving the Drop Deadlines corresponding to each topic from 'TopicDueDate' table. The 'assignments' and 'due_date' views are also updated to include 'Drop topic deadline' column and Drop deadline date in the timeline present in the student view. Following files have been changed to implement this functionality:&lt;br /&gt;
&lt;br /&gt;
(i) app/controllers/assignments_controller.rb&lt;br /&gt;
&lt;br /&gt;
@assignment_submission_due_dates = @due_date_all.select {|due_date| due_date.deadline_type_id == DeadlineHelper::DEALINE_TYPE_SUBMISSION }&lt;br /&gt;
&lt;br /&gt;
@assignment_review_due_dates = @due_date_all.select {|due_date| due_date.deadline_type_id == DeadlineHelper::DEALINE_TYPE_REVIEW} @assignment_drop_topic_due_dates = @due_date_all.select {|due_date| due_date.deadline_type_id == DeadlineHelper::DEADLINE_TYPE_DROP_TOPIC }&lt;br /&gt;
&lt;br /&gt;
(ii) app/controllers/sign_up_sheet_controller.rb&lt;br /&gt;
&lt;br /&gt;
@drop_topic_deadline1 = @assignment.due_dates.find_by(deadline_type_id: 6)&lt;br /&gt;
&lt;br /&gt;
topic_id1 = SignedUpTeam.where(team_id: team_id).first&lt;br /&gt;
&lt;br /&gt;
if @assignment.staggered_deadline?&lt;br /&gt;
&lt;br /&gt;
@drop_topic_deadline1 = TopicDueDate.where(parent_id: topic_id1.topic_id, deadline_type_id: 6).first rescue nil end&lt;br /&gt;
&lt;br /&gt;
due_dates = params[:due_date]&lt;br /&gt;
&lt;br /&gt;
topics = SignUpTopic.where(assignment_id: params[:assignment_id])&lt;br /&gt;
&lt;br /&gt;
review_rounds = assignment.num_review_rounds&lt;br /&gt;
&lt;br /&gt;
topics.each_with_index do |topic, index|&lt;br /&gt;
&lt;br /&gt;
for i in 1..review_rounds&lt;br /&gt;
&lt;br /&gt;
@topic_drop_topic_due_date = due_dates[topics[index].id.to_s + '_drop_topic_' + i.to_s + '_due_date']&lt;br /&gt;
&lt;br /&gt;
if assignment.due_dates.select {|due_date| due_date.deadline_type_id == 6 }.nil?&lt;br /&gt;
&lt;br /&gt;
@assignment_drop_topic_due_date = DateTime.parse(@assignment_drop_topic_due_dates[i - 1].due_at.to_s).strftime(&amp;quot;%Y-%m-%d %H:%M&amp;quot;)&lt;br /&gt;
&lt;br /&gt;
end&lt;br /&gt;
&lt;br /&gt;
end&lt;br /&gt;
&lt;br /&gt;
(iii) app/helpers/sign_up_sheet_helper.rb&lt;br /&gt;
&lt;br /&gt;
if assignment_due_dates.length == 0&lt;br /&gt;
&lt;br /&gt;
assignment_due_dates = @assignment_submission_due_dates&lt;br /&gt;
&lt;br /&gt;
end&lt;br /&gt;
&lt;br /&gt;
(iv) app/models/student_task.rb&lt;br /&gt;
&lt;br /&gt;
def self.get_due_date_data(assignment, timeline_list, participant)&lt;br /&gt;
&lt;br /&gt;
if assignment.staggered_deadline?&lt;br /&gt;
&lt;br /&gt;
team_id = participant.team.try(:id)&lt;br /&gt;
&lt;br /&gt;
topic_id1 = SignedUpTeam.where(team_id: team_id).first&lt;br /&gt;
&lt;br /&gt;
if !topic_id1.nil?&lt;br /&gt;
&lt;br /&gt;
topic_due_date = TopicDueDate.where(parent_id: topic_id1.topic_id, deadline_type_id: 6).first rescue nil&lt;br /&gt;
&lt;br /&gt;
timeline = {label: ('Drop Topic Deadline').humanize}&lt;br /&gt;
&lt;br /&gt;
timeline[:updated_at] = topic_due_date.due_at.strftime('%a, %d %b %Y %H:%M')&lt;br /&gt;
&lt;br /&gt;
timeline_list &amp;lt;&amp;lt; timeline&lt;br /&gt;
&lt;br /&gt;
end&lt;br /&gt;
&lt;br /&gt;
end&lt;br /&gt;
&lt;br /&gt;
assignment.due_dates.each do |dd|&lt;br /&gt;
&lt;br /&gt;
timeline = {label: (dd.deadline_type.name + ' Deadline').humanize}&lt;br /&gt;
&lt;br /&gt;
unless dd.due_at.nil?&lt;br /&gt;
&lt;br /&gt;
timeline[:updated_at] = dd.due_at.strftime('%a, %d %b %Y %H:%M')&lt;br /&gt;
&lt;br /&gt;
timeline_list &amp;lt;&amp;lt; timeline&lt;br /&gt;
&lt;br /&gt;
end&lt;br /&gt;
&lt;br /&gt;
end&lt;br /&gt;
&lt;br /&gt;
end&lt;br /&gt;
&lt;br /&gt;
(v) app/views/assignments/edit.html.erb&lt;br /&gt;
&lt;br /&gt;
&amp;lt;% if @assignment_form.assignment.staggered_deadline == true %&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;%= render partial: '/sign_up_sheet/add_signup_topics_staggered', locals: {review_rounds: @review_rounds, assignment_submission_due_dates: @assignment_submission_due_dates, assignment_review_due_dates: @assignment_review_due_dates, assignment_drop_topic_due_dates: @assignment_drop_topic_due_dates} %&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;% else %&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;%= render '/sign_up_sheet/add_signup_topics' %&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;% end %&amp;gt;&lt;br /&gt;
&lt;br /&gt;
(vi) app/views/sign_up_sheet/_add_signup_topics_staggered.html.erb&lt;br /&gt;
&lt;br /&gt;
&amp;lt;%= form_tag :controller =&amp;gt; 'sign_up_sheet', :action =&amp;gt; 'save_topic_deadlines', :assignment_id =&amp;gt; @assignment.id do %&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;br/&amp;gt;&amp;lt;%= render :partial =&amp;gt; '/sign_up_sheet/due_dates', :locals =&amp;gt; {review_rounds: review_rounds, assignment_submission_due_dates: assignment_submission_due_dates, assignment_review_due_dates: assignment_review_due_dates, assignment_drop_topic_due_dates: assignment_drop_topic_due_dates} %&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;% end %&amp;gt;&lt;br /&gt;
&lt;br /&gt;
(vii) app/views/sign_up_sheet/_due_dates.html.erb&lt;br /&gt;
&lt;br /&gt;
&amp;lt;tr&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;th&amp;gt;Drop deadline&amp;lt;/th&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;%for i in 2..review_rounds%&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;td&amp;gt;&amp;lt;%= @assignment.sign_up_topics[i].topic_name %&amp;gt;&amp;lt;/td&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;% for review_round in 1..review_rounds %&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;% topic_id = @assignment.sign_up_topics[i].id %&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;%if review_round == 1 %&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;td&amp;gt;&amp;lt;%= text_field :due_date, (topic_id.to_s + '_drop_topic_' + review_round.to_s + '_due_date').to_s, size: 20, value: check_topic_due_date_value(assignment_drop_topic_due_dates, topic_id, 6, review_round) %&amp;gt;&amp;lt;/td&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;td&amp;gt;&amp;lt;%= 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) %&amp;gt;&amp;lt;/td&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;td&amp;gt;&amp;lt;%= 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) %&amp;gt;&amp;lt;/td&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;%else%&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;td&amp;gt;&amp;lt;%= 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) %&amp;gt;&amp;lt;/td&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;td&amp;gt;&amp;lt;%= 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) %&amp;gt;&amp;lt;/td&amp;gt; &amp;lt;%end%&amp;gt; &amp;lt;%end%&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;/tr&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;%end%&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
== '''References''' ==&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
1. Expertiza on GitHub&lt;br /&gt;
2. GitHub Project Repository Fork&lt;br /&gt;
3. The live Expertiza website&lt;br /&gt;
4. Demo link&lt;br /&gt;
5. Expertiza project documentation wiki&lt;/div&gt;</summary>
		<author><name>Jhmadhwa</name></author>
	</entry>
	<entry>
		<id>https://wiki.expertiza.ncsu.edu/index.php?title=E1843_Issues_Related_To_Deadlines&amp;diff=118879</id>
		<title>E1843 Issues Related To Deadlines</title>
		<link rel="alternate" type="text/html" href="https://wiki.expertiza.ncsu.edu/index.php?title=E1843_Issues_Related_To_Deadlines&amp;diff=118879"/>
		<updated>2018-11-08T22:29:48Z</updated>

		<summary type="html">&lt;p&gt;Jhmadhwa: &lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;This wiki page is for the description of changes made under E1843 OSS assignment for Fall 2018, CSC/ECE 517.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
== '''About Expertiza''' ==&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
----&lt;br /&gt;
Expertiza is an open source project based on Ruby on Rails framework and the code is available on Github. Expertiza allows the instructor to create new assignments as well as edit new or existing assignments. Instructors can also create a list of topics the students can sign up for and specify deadlines for completion of various tasks. Students can form teams in Expertiza to work on various projects and assignments as well as peer review other students' submissions. Expertiza supports submission across various document types, including the URLs Wiki pages.&lt;br /&gt;
&lt;br /&gt;
'''Issues in the Current Project'''&lt;br /&gt;
&lt;br /&gt;
1.There is no deadline that specifies when a team can drop their topics. Due to this, few problems occur: The team might drop a topic later on which is close to the submission date and this results in topic not being assigned to any other team on time such that they can submit their assignment. Also, if one team was wait listed for the same topic which the other team dropped closer to the submission deadline, then the first team will be assigned to the dropped topic which is not desirable as they might be working on their assigned topic for long time.&lt;br /&gt;
&lt;br /&gt;
2.There are different topics on which students can work during different times. This type of assignment is known as Staggered- deadline assignment in which different topics have different submission and review deadlines. For these assignments too, there is a need for &amp;quot;Drop Topics Deadline&amp;quot;. In the current implementation, the drop topic deadline is same for all the topics in a Staggered Deadline assignment which is not desirable.&lt;br /&gt;
&lt;br /&gt;
'''Corrections made in the New Project'''&lt;br /&gt;
&lt;br /&gt;
1. The instructor can specify a Drop Topic deadline date now. After a drop topic deadline passes, the &amp;quot;X&amp;quot; in the Sign-Up sheet disables so that the student cannot drop the topic and the waitlist gets cleared.&lt;br /&gt;
2. Staggered deadline assignments now have different drop deadlines for different topics in that assignment.&lt;br /&gt;
&lt;br /&gt;
'''Files modified in Current Project'''&lt;br /&gt;
&lt;br /&gt;
1. app/controllers/assignments_controller.rb&lt;br /&gt;
2. app/controllers/sign_up_sheet_controller.rb&lt;br /&gt;
3. app/models/student_task.rb&lt;br /&gt;
4. app/views/assignments/edit.html.erb&lt;br /&gt;
5. app/views/sign_up_sheet/_add_signup_topics_staggered.html.erb&lt;br /&gt;
6. app/views/sign_up_sheet/_due_dates.html.erb&lt;br /&gt;
&lt;br /&gt;
'''Current Implementation'''&lt;br /&gt;
&lt;br /&gt;
1. Clearing the waitlist after Drop Deadline passes is implemented in sign_up_sheet_controller.rb where it is checked if the current time is greater than the time mentioned in Drop deadline. If the deadline has been passed, the 'update_is_waitlisted' method of SignedUpTeam model is called to delete all the waitlisted teams. The code snippets for the changes made are attached below:&lt;br /&gt;
&lt;br /&gt;
(i) app/controllers/sign_up_sheet_controller.rb&lt;br /&gt;
&lt;br /&gt;
if !topic_id1.nil? and !@drop_topic_deadline1.nil? and Time.now &amp;gt; @drop_topic_deadline1.due_at&lt;br /&gt;
&lt;br /&gt;
SignedUpTeam.update_is_waitlisted(topic_id1.topic_id,team_id) end&lt;br /&gt;
&lt;br /&gt;
(ii) The 'update_is_waitlisted' method is implemented in app/models/signed_up_team.rb as follows:&lt;br /&gt;
&lt;br /&gt;
def self.update_is_waitlisted(topic_id, team_id)&lt;br /&gt;
&lt;br /&gt;
waitlisted_teams = SignedUpTeam.where(topic_id: topic_id, team_id: team_id)&lt;br /&gt;
&lt;br /&gt;
waitlisted_teams.each do |team|&lt;br /&gt;
&lt;br /&gt;
if(team.is_waitlisted == true)&lt;br /&gt;
&lt;br /&gt;
SignedUpTeam.delete(team.id)&lt;br /&gt;
&lt;br /&gt;
team.save&lt;br /&gt;
&lt;br /&gt;
end&lt;br /&gt;
&lt;br /&gt;
end&lt;br /&gt;
&lt;br /&gt;
end&lt;br /&gt;
&lt;br /&gt;
2. For a Staggered - deadline assignment, each topic will have a different Drop deadline which has been implemented in app/controllers/assignments_controller.rb and app/controllers/sign_up_sheet_controller.rb by first checking if the assignment type is staggered and then retrieving the Drop Deadlines corresponding to each topic from 'TopicDueDate' table. The 'assignments' and 'due_date' views are also updated to include 'Drop topic deadline' column and Drop deadline date in the timeline present in the student view. Following files have been changed to implement this functionality:&lt;br /&gt;
&lt;br /&gt;
(i) app/controllers/assignments_controller.rb&lt;br /&gt;
&lt;br /&gt;
@assignment_submission_due_dates = @due_date_all.select {|due_date| due_date.deadline_type_id == DeadlineHelper::DEALINE_TYPE_SUBMISSION }&lt;br /&gt;
&lt;br /&gt;
@assignment_review_due_dates = @due_date_all.select {|due_date| due_date.deadline_type_id == DeadlineHelper::DEALINE_TYPE_REVIEW} @assignment_drop_topic_due_dates = @due_date_all.select {|due_date| due_date.deadline_type_id == DeadlineHelper::DEADLINE_TYPE_DROP_TOPIC }&lt;br /&gt;
&lt;br /&gt;
(ii) app/controllers/sign_up_sheet_controller.rb&lt;br /&gt;
&lt;br /&gt;
@drop_topic_deadline1 = @assignment.due_dates.find_by(deadline_type_id: 6)&lt;br /&gt;
&lt;br /&gt;
topic_id1 = SignedUpTeam.where(team_id: team_id).first&lt;br /&gt;
&lt;br /&gt;
if @assignment.staggered_deadline?&lt;br /&gt;
&lt;br /&gt;
@drop_topic_deadline1 = TopicDueDate.where(parent_id: topic_id1.topic_id, deadline_type_id: 6).first rescue nil end&lt;br /&gt;
&lt;br /&gt;
due_dates = params[:due_date]&lt;br /&gt;
&lt;br /&gt;
topics = SignUpTopic.where(assignment_id: params[:assignment_id])&lt;br /&gt;
&lt;br /&gt;
review_rounds = assignment.num_review_rounds&lt;br /&gt;
&lt;br /&gt;
topics.each_with_index do |topic, index|&lt;br /&gt;
&lt;br /&gt;
for i in 1..review_rounds&lt;br /&gt;
&lt;br /&gt;
@topic_drop_topic_due_date = due_dates[topics[index].id.to_s + '_drop_topic_' + i.to_s + '_due_date']&lt;br /&gt;
&lt;br /&gt;
if assignment.due_dates.select {|due_date| due_date.deadline_type_id == 6 }.nil?&lt;br /&gt;
&lt;br /&gt;
@assignment_drop_topic_due_date = DateTime.parse(@assignment_drop_topic_due_dates[i - 1].due_at.to_s).strftime(&amp;quot;%Y-%m-%d %H:%M&amp;quot;)&lt;br /&gt;
&lt;br /&gt;
end&lt;br /&gt;
&lt;br /&gt;
end&lt;br /&gt;
&lt;br /&gt;
(iii) app/helpers/sign_up_sheet_helper.rb&lt;br /&gt;
&lt;br /&gt;
if assignment_due_dates.length == 0&lt;br /&gt;
&lt;br /&gt;
assignment_due_dates = @assignment_submission_due_dates&lt;br /&gt;
&lt;br /&gt;
end&lt;br /&gt;
&lt;br /&gt;
(iv) app/models/student_task.rb&lt;br /&gt;
&lt;br /&gt;
def self.get_due_date_data(assignment, timeline_list, participant)&lt;br /&gt;
&lt;br /&gt;
if assignment.staggered_deadline?&lt;br /&gt;
&lt;br /&gt;
team_id = participant.team.try(:id)&lt;br /&gt;
&lt;br /&gt;
topic_id1 = SignedUpTeam.where(team_id: team_id).first&lt;br /&gt;
&lt;br /&gt;
if !topic_id1.nil?&lt;br /&gt;
&lt;br /&gt;
topic_due_date = TopicDueDate.where(parent_id: topic_id1.topic_id, deadline_type_id: 6).first rescue nil&lt;br /&gt;
&lt;br /&gt;
timeline = {label: ('Drop Topic Deadline').humanize}&lt;br /&gt;
&lt;br /&gt;
timeline[:updated_at] = topic_due_date.due_at.strftime('%a, %d %b %Y %H:%M')&lt;br /&gt;
&lt;br /&gt;
timeline_list &amp;lt;&amp;lt; timeline&lt;br /&gt;
&lt;br /&gt;
end&lt;br /&gt;
&lt;br /&gt;
end&lt;br /&gt;
&lt;br /&gt;
assignment.due_dates.each do |dd|&lt;br /&gt;
&lt;br /&gt;
timeline = {label: (dd.deadline_type.name + ' Deadline').humanize}&lt;br /&gt;
&lt;br /&gt;
unless dd.due_at.nil?&lt;br /&gt;
&lt;br /&gt;
timeline[:updated_at] = dd.due_at.strftime('%a, %d %b %Y %H:%M')&lt;br /&gt;
&lt;br /&gt;
timeline_list &amp;lt;&amp;lt; timeline&lt;br /&gt;
&lt;br /&gt;
end&lt;br /&gt;
&lt;br /&gt;
end&lt;br /&gt;
&lt;br /&gt;
end&lt;br /&gt;
&lt;br /&gt;
(v) app/views/assignments/edit.html.erb&lt;br /&gt;
&lt;br /&gt;
&amp;lt;% if @assignment_form.assignment.staggered_deadline == true %&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;%= render partial: '/sign_up_sheet/add_signup_topics_staggered', locals: {review_rounds: @review_rounds, assignment_submission_due_dates: @assignment_submission_due_dates, assignment_review_due_dates: @assignment_review_due_dates, assignment_drop_topic_due_dates: @assignment_drop_topic_due_dates} %&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;% else %&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;%= render '/sign_up_sheet/add_signup_topics' %&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;% end %&amp;gt;&lt;br /&gt;
&lt;br /&gt;
(vi) app/views/sign_up_sheet/_add_signup_topics_staggered.html.erb&lt;br /&gt;
&lt;br /&gt;
&amp;lt;%= form_tag :controller =&amp;gt; 'sign_up_sheet', :action =&amp;gt; 'save_topic_deadlines', :assignment_id =&amp;gt; @assignment.id do %&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;br/&amp;gt;&amp;lt;%= render :partial =&amp;gt; '/sign_up_sheet/due_dates', :locals =&amp;gt; {review_rounds: review_rounds, assignment_submission_due_dates: assignment_submission_due_dates, assignment_review_due_dates: assignment_review_due_dates, assignment_drop_topic_due_dates: assignment_drop_topic_due_dates} %&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;% end %&amp;gt;&lt;br /&gt;
&lt;br /&gt;
(vii) app/views/sign_up_sheet/_due_dates.html.erb&lt;br /&gt;
&lt;br /&gt;
&amp;lt;tr&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;th&amp;gt;Drop deadline&amp;lt;/th&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;%for i in 2..review_rounds%&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;td&amp;gt;&amp;lt;%= @assignment.sign_up_topics[i].topic_name %&amp;gt;&amp;lt;/td&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;% for review_round in 1..review_rounds %&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;% topic_id = @assignment.sign_up_topics[i].id %&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;%if review_round == 1 %&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;td&amp;gt;&amp;lt;%= text_field :due_date, (topic_id.to_s + '_drop_topic_' + review_round.to_s + '_due_date').to_s, size: 20, value: check_topic_due_date_value(assignment_drop_topic_due_dates, topic_id, 6, review_round) %&amp;gt;&amp;lt;/td&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;td&amp;gt;&amp;lt;%= 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) %&amp;gt;&amp;lt;/td&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;td&amp;gt;&amp;lt;%= 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) %&amp;gt;&amp;lt;/td&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;%else%&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;td&amp;gt;&amp;lt;%= 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) %&amp;gt;&amp;lt;/td&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;td&amp;gt;&amp;lt;%= 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) %&amp;gt;&amp;lt;/td&amp;gt; &amp;lt;%end%&amp;gt; &amp;lt;%end%&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;/tr&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;%end%&amp;gt;&lt;br /&gt;
&lt;br /&gt;
'''References'''&lt;br /&gt;
&lt;br /&gt;
1. Expertiza on GitHub&lt;br /&gt;
2. GitHub Project Repository Fork&lt;br /&gt;
3. The live Expertiza website&lt;br /&gt;
4. Demo link&lt;br /&gt;
5. Expertiza project documentation wiki&lt;/div&gt;</summary>
		<author><name>Jhmadhwa</name></author>
	</entry>
	<entry>
		<id>https://wiki.expertiza.ncsu.edu/index.php?title=E1843_Issues_Related_To_Deadlines&amp;diff=118691</id>
		<title>E1843 Issues Related To Deadlines</title>
		<link rel="alternate" type="text/html" href="https://wiki.expertiza.ncsu.edu/index.php?title=E1843_Issues_Related_To_Deadlines&amp;diff=118691"/>
		<updated>2018-11-05T22:30:02Z</updated>

		<summary type="html">&lt;p&gt;Jhmadhwa: &lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;This wiki page is for the description of changes made under E1843 OSS assignment for Fall 2018, CSC/ECE 517.&lt;br /&gt;
&lt;br /&gt;
'''About Expertiza'''&lt;br /&gt;
&lt;br /&gt;
Expertiza is an open source project based on Ruby on Rails framework and the code is available on Github. Expertiza allows the instructor to create new assignments as well as edit new or existing assignments. Instructors can also create a list of topics the students can sign up for and specify deadlines for completion of various tasks. Students can form teams in Expertiza to work on various projects and assignments as well as peer review other students' submissions. Expertiza supports submission across various document types, including the URLs Wiki pages.&lt;br /&gt;
&lt;br /&gt;
'''Issues in the Current Project'''&lt;br /&gt;
&lt;br /&gt;
1.There is no deadline that specifies when a team can drop their topics. Due to this, few problems occur: The team might drop a topic later on which is close to the submission date and this results in topic not being assigned to any other team on time such that they can submit their assignment. Also, if one team was wait listed for the same topic which the other team dropped closer to the submission deadline, then the first team will be assigned to the dropped topic which is not desirable as they might be working on their assigned topic for long time.&lt;br /&gt;
&lt;br /&gt;
2.There are different topics on which students can work during different times. This type of assignment is known as Staggered- deadline assignment in which different topics have different submission and review deadlines. For these assignments too, there is a need for &amp;quot;Drop Topics Deadline&amp;quot;. In the current implementation, the drop topic deadline is same for all the topics in a Staggered Deadline assignment which is not desirable.&lt;br /&gt;
&lt;br /&gt;
'''Corrections made in the New Project'''&lt;br /&gt;
&lt;br /&gt;
1. The instructor can specify a Drop Topic deadline date now. After a drop topic deadline passes, the &amp;quot;X&amp;quot; in the Sign-Up sheet disables so that the student cannot drop the topic and the waitlist gets cleared.&lt;br /&gt;
2. Staggered deadline assignments now have different drop deadlines for different topics in that assignment.&lt;br /&gt;
&lt;br /&gt;
'''Files modified in Current Project'''&lt;br /&gt;
&lt;br /&gt;
1. app/controllers/assignments_controller.rb&lt;br /&gt;
2. app/controllers/sign_up_sheet_controller.rb&lt;br /&gt;
3. app/models/student_task.rb&lt;br /&gt;
4. app/views/assignments/edit.html.erb&lt;br /&gt;
5. app/views/sign_up_sheet/_add_signup_topics_staggered.html.erb&lt;br /&gt;
6. app/views/sign_up_sheet/_due_dates.html.erb&lt;br /&gt;
&lt;br /&gt;
'''Current Implementation'''&lt;br /&gt;
&lt;br /&gt;
1. Clearing the waitlist after Drop Deadline passes is implemented in sign_up_sheet_controller.rb where it is checked if the current time is greater than the time mentioned in Drop deadline. If the deadline has been passed, the 'update_is_waitlisted' method of SignedUpTeam model is called to delete all the waitlisted teams. The code snippets for the changes made are attached below:&lt;br /&gt;
&lt;br /&gt;
(i) app/controllers/sign_up_sheet_controller.rb&lt;br /&gt;
&lt;br /&gt;
if !topic_id1.nil? and !@drop_topic_deadline1.nil? and Time.now &amp;gt; @drop_topic_deadline1.due_at&lt;br /&gt;
&lt;br /&gt;
SignedUpTeam.update_is_waitlisted(topic_id1.topic_id,team_id) end&lt;br /&gt;
&lt;br /&gt;
(ii) The 'update_is_waitlisted' method is implemented in app/models/signed_up_team.rb as follows:&lt;br /&gt;
&lt;br /&gt;
def self.update_is_waitlisted(topic_id, team_id)&lt;br /&gt;
&lt;br /&gt;
waitlisted_teams = SignedUpTeam.where(topic_id: topic_id, team_id: team_id)&lt;br /&gt;
&lt;br /&gt;
waitlisted_teams.each do |team|&lt;br /&gt;
&lt;br /&gt;
if(team.is_waitlisted == true)&lt;br /&gt;
&lt;br /&gt;
SignedUpTeam.delete(team.id)&lt;br /&gt;
&lt;br /&gt;
team.save&lt;br /&gt;
&lt;br /&gt;
end&lt;br /&gt;
&lt;br /&gt;
end&lt;br /&gt;
&lt;br /&gt;
end&lt;br /&gt;
&lt;br /&gt;
2. For a Staggered - deadline assignment, each topic will have a different Drop deadline which has been implemented in app/controllers/assignments_controller.rb and app/controllers/sign_up_sheet_controller.rb by first checking if the assignment type is staggered and then retrieving the Drop Deadlines corresponding to each topic from 'TopicDueDate' table. The 'assignments' and 'due_date' views are also updated to include 'Drop topic deadline' column and Drop deadline date in the timeline present in the student view. Following files have been changed to implement this functionality:&lt;br /&gt;
&lt;br /&gt;
(i) app/controllers/assignments_controller.rb&lt;br /&gt;
&lt;br /&gt;
@assignment_submission_due_dates = @due_date_all.select {|due_date| due_date.deadline_type_id == DeadlineHelper::DEALINE_TYPE_SUBMISSION }&lt;br /&gt;
&lt;br /&gt;
@assignment_review_due_dates = @due_date_all.select {|due_date| due_date.deadline_type_id == DeadlineHelper::DEALINE_TYPE_REVIEW} @assignment_drop_topic_due_dates = @due_date_all.select {|due_date| due_date.deadline_type_id == DeadlineHelper::DEADLINE_TYPE_DROP_TOPIC }&lt;br /&gt;
&lt;br /&gt;
(ii) app/controllers/sign_up_sheet_controller.rb&lt;br /&gt;
&lt;br /&gt;
@drop_topic_deadline1 = @assignment.due_dates.find_by(deadline_type_id: 6)&lt;br /&gt;
&lt;br /&gt;
topic_id1 = SignedUpTeam.where(team_id: team_id).first&lt;br /&gt;
&lt;br /&gt;
if @assignment.staggered_deadline?&lt;br /&gt;
&lt;br /&gt;
@drop_topic_deadline1 = TopicDueDate.where(parent_id: topic_id1.topic_id, deadline_type_id: 6).first rescue nil end&lt;br /&gt;
&lt;br /&gt;
due_dates = params[:due_date]&lt;br /&gt;
&lt;br /&gt;
topics = SignUpTopic.where(assignment_id: params[:assignment_id])&lt;br /&gt;
&lt;br /&gt;
review_rounds = assignment.num_review_rounds&lt;br /&gt;
&lt;br /&gt;
topics.each_with_index do |topic, index|&lt;br /&gt;
&lt;br /&gt;
for i in 1..review_rounds&lt;br /&gt;
&lt;br /&gt;
@topic_drop_topic_due_date = due_dates[topics[index].id.to_s + '_drop_topic_' + i.to_s + '_due_date']&lt;br /&gt;
&lt;br /&gt;
if assignment.due_dates.select {|due_date| due_date.deadline_type_id == 6 }.nil?&lt;br /&gt;
&lt;br /&gt;
@assignment_drop_topic_due_date = DateTime.parse(@assignment_drop_topic_due_dates[i - 1].due_at.to_s).strftime(&amp;quot;%Y-%m-%d %H:%M&amp;quot;)&lt;br /&gt;
&lt;br /&gt;
end&lt;br /&gt;
&lt;br /&gt;
end&lt;br /&gt;
&lt;br /&gt;
(iii) app/helpers/sign_up_sheet_helper.rb&lt;br /&gt;
&lt;br /&gt;
if assignment_due_dates.length == 0&lt;br /&gt;
&lt;br /&gt;
assignment_due_dates = @assignment_submission_due_dates&lt;br /&gt;
&lt;br /&gt;
end&lt;br /&gt;
&lt;br /&gt;
(iv) app/models/student_task.rb&lt;br /&gt;
&lt;br /&gt;
def self.get_due_date_data(assignment, timeline_list, participant)&lt;br /&gt;
&lt;br /&gt;
if assignment.staggered_deadline?&lt;br /&gt;
&lt;br /&gt;
team_id = participant.team.try(:id)&lt;br /&gt;
&lt;br /&gt;
topic_id1 = SignedUpTeam.where(team_id: team_id).first&lt;br /&gt;
&lt;br /&gt;
if !topic_id1.nil?&lt;br /&gt;
&lt;br /&gt;
topic_due_date = TopicDueDate.where(parent_id: topic_id1.topic_id, deadline_type_id: 6).first rescue nil&lt;br /&gt;
&lt;br /&gt;
timeline = {label: ('Drop Topic Deadline').humanize}&lt;br /&gt;
&lt;br /&gt;
timeline[:updated_at] = topic_due_date.due_at.strftime('%a, %d %b %Y %H:%M')&lt;br /&gt;
&lt;br /&gt;
timeline_list &amp;lt;&amp;lt; timeline&lt;br /&gt;
&lt;br /&gt;
end&lt;br /&gt;
&lt;br /&gt;
end&lt;br /&gt;
&lt;br /&gt;
assignment.due_dates.each do |dd|&lt;br /&gt;
&lt;br /&gt;
timeline = {label: (dd.deadline_type.name + ' Deadline').humanize}&lt;br /&gt;
&lt;br /&gt;
unless dd.due_at.nil?&lt;br /&gt;
&lt;br /&gt;
timeline[:updated_at] = dd.due_at.strftime('%a, %d %b %Y %H:%M')&lt;br /&gt;
&lt;br /&gt;
timeline_list &amp;lt;&amp;lt; timeline&lt;br /&gt;
&lt;br /&gt;
end&lt;br /&gt;
&lt;br /&gt;
end&lt;br /&gt;
&lt;br /&gt;
end&lt;br /&gt;
&lt;br /&gt;
(v) app/views/assignments/edit.html.erb&lt;br /&gt;
&lt;br /&gt;
&amp;lt;% if @assignment_form.assignment.staggered_deadline == true %&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;%= render partial: '/sign_up_sheet/add_signup_topics_staggered', locals: {review_rounds: @review_rounds, assignment_submission_due_dates: @assignment_submission_due_dates, assignment_review_due_dates: @assignment_review_due_dates, assignment_drop_topic_due_dates: @assignment_drop_topic_due_dates} %&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;% else %&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;%= render '/sign_up_sheet/add_signup_topics' %&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;% end %&amp;gt;&lt;br /&gt;
&lt;br /&gt;
(vi) app/views/sign_up_sheet/_add_signup_topics_staggered.html.erb&lt;br /&gt;
&lt;br /&gt;
&amp;lt;%= form_tag :controller =&amp;gt; 'sign_up_sheet', :action =&amp;gt; 'save_topic_deadlines', :assignment_id =&amp;gt; @assignment.id do %&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;br/&amp;gt;&amp;lt;%= render :partial =&amp;gt; '/sign_up_sheet/due_dates', :locals =&amp;gt; {review_rounds: review_rounds, assignment_submission_due_dates: assignment_submission_due_dates, assignment_review_due_dates: assignment_review_due_dates, assignment_drop_topic_due_dates: assignment_drop_topic_due_dates} %&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;% end %&amp;gt;&lt;br /&gt;
&lt;br /&gt;
(vii) app/views/sign_up_sheet/_due_dates.html.erb&lt;br /&gt;
&lt;br /&gt;
&amp;lt;tr&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;th&amp;gt;Drop deadline&amp;lt;/th&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;%for i in 2..review_rounds%&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;td&amp;gt;&amp;lt;%= @assignment.sign_up_topics[i].topic_name %&amp;gt;&amp;lt;/td&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;% for review_round in 1..review_rounds %&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;% topic_id = @assignment.sign_up_topics[i].id %&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;%if review_round == 1 %&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;td&amp;gt;&amp;lt;%= text_field :due_date, (topic_id.to_s + '_drop_topic_' + review_round.to_s + '_due_date').to_s, size: 20, value: check_topic_due_date_value(assignment_drop_topic_due_dates, topic_id, 6, review_round) %&amp;gt;&amp;lt;/td&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;td&amp;gt;&amp;lt;%= 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) %&amp;gt;&amp;lt;/td&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;td&amp;gt;&amp;lt;%= 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) %&amp;gt;&amp;lt;/td&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;%else%&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;td&amp;gt;&amp;lt;%= 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) %&amp;gt;&amp;lt;/td&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;td&amp;gt;&amp;lt;%= 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) %&amp;gt;&amp;lt;/td&amp;gt; &amp;lt;%end%&amp;gt; &amp;lt;%end%&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;/tr&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;%end%&amp;gt;&lt;br /&gt;
&lt;br /&gt;
'''References'''&lt;br /&gt;
&lt;br /&gt;
1. Expertiza on GitHub&lt;br /&gt;
2. GitHub Project Repository Fork&lt;br /&gt;
3. The live Expertiza website&lt;br /&gt;
4. Demo link&lt;br /&gt;
5. Expertiza project documentation wiki&lt;/div&gt;</summary>
		<author><name>Jhmadhwa</name></author>
	</entry>
	<entry>
		<id>https://wiki.expertiza.ncsu.edu/index.php?title=E1843_Issues_Related_To_Deadlines&amp;diff=118690</id>
		<title>E1843 Issues Related To Deadlines</title>
		<link rel="alternate" type="text/html" href="https://wiki.expertiza.ncsu.edu/index.php?title=E1843_Issues_Related_To_Deadlines&amp;diff=118690"/>
		<updated>2018-11-05T22:29:37Z</updated>

		<summary type="html">&lt;p&gt;Jhmadhwa: &lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;This wiki page is for the description of changes made under E1843 OSS assignment for Fall 2018, CSC/ECE 517.&lt;br /&gt;
&lt;br /&gt;
'''About Expertiza'''&lt;br /&gt;
&lt;br /&gt;
Expertiza is an open source project based on Ruby on Rails framework and the code is available on Github. Expertiza allows the instructor to create new assignments as well as edit new or existing assignments. Instructors can also create a list of topics the students can sign up for and specify deadlines for completion of various tasks. Students can form teams in Expertiza to work on various projects and assignments as well as peer review other students' submissions. Expertiza supports submission across various document types, including the URLs Wiki pages.&lt;br /&gt;
&lt;br /&gt;
'''Issues in the Current Project'''&lt;br /&gt;
&lt;br /&gt;
1.There is no deadline that specifies when a team can drop their topics. Due to this, few problems occur: The team might drop a topic later on which is close to the submission date and this results in topic not being assigned to any other team on time such that they can submit their assignment. Also, if one team was wait listed for the same topic which the other team dropped closer to the submission deadline, then the first team will be assigned to the dropped topic which is not desirable as they might be working on their assigned topic for long time.&lt;br /&gt;
&lt;br /&gt;
2.There are different topics on which students can work during different times. This type of assignment is known as Staggered- deadline assignment in which different topics have different submission and review deadlines. For these assignments too, there is a need for &amp;quot;Drop Topics Deadline&amp;quot;. In the current implementation, the drop topic deadline is same for all the topics in a Staggered Deadline assignment which is not desirable.&lt;br /&gt;
&lt;br /&gt;
'''Corrections made in the New Project'''&lt;br /&gt;
&lt;br /&gt;
1. The instructor can specify a Drop Topic deadline date now. After a drop topic deadline passes, the &amp;quot;X&amp;quot; in the Sign-Up sheet disables so that the student cannot drop the topic and the waitlist gets cleared.&lt;br /&gt;
2. Staggered deadline assignments now have different drop deadlines for different topics in that assignment.&lt;br /&gt;
&lt;br /&gt;
'''Files modified in Current Project'''&lt;br /&gt;
&lt;br /&gt;
1. app/controllers/assignments_controller.rb&lt;br /&gt;
2. app/controllers/sign_up_sheet_controller.rb&lt;br /&gt;
3. app/models/student_task.rb&lt;br /&gt;
4. app/views/assignments/edit.html.erb&lt;br /&gt;
5. app/views/sign_up_sheet/_add_signup_topics_staggered.html.erb&lt;br /&gt;
6. app/views/sign_up_sheet/_due_dates.html.erb&lt;br /&gt;
&lt;br /&gt;
'''Current Implementation'''&lt;br /&gt;
&lt;br /&gt;
1. Clearing the waitlist after Drop Deadline passes is implemented in sign_up_sheet_controller.rb where it is checked if the current time is greater than the time mentioned in Drop deadline. If the deadline has been passed, the 'update_is_waitlisted' method of SignedUpTeam model is called to delete all the waitlisted teams. The code snippets for the changes made are attached below:&lt;br /&gt;
&lt;br /&gt;
(i) app/controllers/sign_up_sheet_controller.rb&lt;br /&gt;
&lt;br /&gt;
if !topic_id1.nil? and !@drop_topic_deadline1.nil? and Time.now &amp;gt; @drop_topic_deadline1.due_at&lt;br /&gt;
&lt;br /&gt;
SignedUpTeam.update_is_waitlisted(topic_id1.topic_id,team_id) end&lt;br /&gt;
&lt;br /&gt;
(ii) The 'update_is_waitlisted' method is implemented in app/models/signed_up_team.rb as follows:&lt;br /&gt;
&lt;br /&gt;
def self.update_is_waitlisted(topic_id, team_id)&lt;br /&gt;
&lt;br /&gt;
waitlisted_teams = SignedUpTeam.where(topic_id: topic_id, team_id: team_id)&lt;br /&gt;
&lt;br /&gt;
waitlisted_teams.each do |team|&lt;br /&gt;
&lt;br /&gt;
if(team.is_waitlisted == true)&lt;br /&gt;
&lt;br /&gt;
SignedUpTeam.delete(team.id)&lt;br /&gt;
&lt;br /&gt;
team.save&lt;br /&gt;
&lt;br /&gt;
end&lt;br /&gt;
&lt;br /&gt;
end&lt;br /&gt;
&lt;br /&gt;
end&lt;br /&gt;
&lt;br /&gt;
2. For a Staggered - deadline assignment, each topic will have a different Drop deadline which has been implemented in app/controllers/assignments_controller.rb and app/controllers/sign_up_sheet_controller.rb by first checking if the assignment type is staggered and then retrieving the Drop Deadlines corresponding to each topic from 'TopicDueDate' table. The 'assignments' and 'due_date' views are also updated to include 'Drop topic deadline' column and Drop deadline date in the timeline present in the student view. Following files have been changed to implement this functionality:&lt;br /&gt;
&lt;br /&gt;
(i) app/controllers/assignments_controller.rb&lt;br /&gt;
&lt;br /&gt;
@assignment_submission_due_dates = @due_date_all.select {|due_date| due_date.deadline_type_id == DeadlineHelper::DEALINE_TYPE_SUBMISSION }&lt;br /&gt;
&lt;br /&gt;
@assignment_review_due_dates = @due_date_all.select {|due_date| due_date.deadline_type_id == DeadlineHelper::DEALINE_TYPE_REVIEW} @assignment_drop_topic_due_dates = @due_date_all.select {|due_date| due_date.deadline_type_id == DeadlineHelper::DEADLINE_TYPE_DROP_TOPIC }&lt;br /&gt;
&lt;br /&gt;
(ii) app/controllers/sign_up_sheet_controller.rb&lt;br /&gt;
&lt;br /&gt;
@drop_topic_deadline1 = @assignment.due_dates.find_by(deadline_type_id: 6)&lt;br /&gt;
&lt;br /&gt;
topic_id1 = SignedUpTeam.where(team_id: team_id).first&lt;br /&gt;
&lt;br /&gt;
if @assignment.staggered_deadline?&lt;br /&gt;
&lt;br /&gt;
@drop_topic_deadline1 = TopicDueDate.where(parent_id: topic_id1.topic_id, deadline_type_id: 6).first rescue nil end&lt;br /&gt;
&lt;br /&gt;
due_dates = params[:due_date]&lt;br /&gt;
&lt;br /&gt;
topics = SignUpTopic.where(assignment_id: params[:assignment_id])&lt;br /&gt;
&lt;br /&gt;
review_rounds = assignment.num_review_rounds&lt;br /&gt;
&lt;br /&gt;
topics.each_with_index do |topic, index|&lt;br /&gt;
&lt;br /&gt;
for i in 1..review_rounds&lt;br /&gt;
&lt;br /&gt;
@topic_drop_topic_due_date = due_dates[topics[index].id.to_s + '_drop_topic_' + i.to_s + '_due_date']&lt;br /&gt;
&lt;br /&gt;
if assignment.due_dates.select {|due_date| due_date.deadline_type_id == 6 }.nil?&lt;br /&gt;
&lt;br /&gt;
@assignment_drop_topic_due_date = DateTime.parse(@assignment_drop_topic_due_dates[i - 1].due_at.to_s).strftime(&amp;quot;%Y-%m-%d %H:%M&amp;quot;)&lt;br /&gt;
&lt;br /&gt;
end&lt;br /&gt;
&lt;br /&gt;
end&lt;br /&gt;
&lt;br /&gt;
(iii) app/helpers/sign_up_sheet_helper.rb&lt;br /&gt;
&lt;br /&gt;
if assignment_due_dates.length == 0&lt;br /&gt;
&lt;br /&gt;
assignment_due_dates = @assignment_submission_due_dates&lt;br /&gt;
&lt;br /&gt;
end&lt;br /&gt;
&lt;br /&gt;
(iv) app/models/student_task.rb&lt;br /&gt;
&lt;br /&gt;
def self.get_due_date_data(assignment, timeline_list, participant)&lt;br /&gt;
&lt;br /&gt;
if assignment.staggered_deadline?&lt;br /&gt;
&lt;br /&gt;
team_id = participant.team.try(:id)&lt;br /&gt;
&lt;br /&gt;
topic_id1 = SignedUpTeam.where(team_id: team_id).first&lt;br /&gt;
&lt;br /&gt;
if !topic_id1.nil?&lt;br /&gt;
&lt;br /&gt;
topic_due_date = TopicDueDate.where(parent_id: topic_id1.topic_id, deadline_type_id: 6).first rescue nil&lt;br /&gt;
&lt;br /&gt;
timeline = {label: ('Drop Topic Deadline').humanize}&lt;br /&gt;
&lt;br /&gt;
timeline[:updated_at] = topic_due_date.due_at.strftime('%a, %d %b %Y %H:%M')&lt;br /&gt;
&lt;br /&gt;
timeline_list &amp;lt;&amp;lt; timeline&lt;br /&gt;
&lt;br /&gt;
end&lt;br /&gt;
&lt;br /&gt;
end&lt;br /&gt;
&lt;br /&gt;
assignment.due_dates.each do |dd|&lt;br /&gt;
&lt;br /&gt;
timeline = {label: (dd.deadline_type.name + ' Deadline').humanize}&lt;br /&gt;
&lt;br /&gt;
unless dd.due_at.nil?&lt;br /&gt;
&lt;br /&gt;
timeline[:updated_at] = dd.due_at.strftime('%a, %d %b %Y %H:%M')&lt;br /&gt;
&lt;br /&gt;
timeline_list &amp;lt;&amp;lt; timeline&lt;br /&gt;
&lt;br /&gt;
end&lt;br /&gt;
&lt;br /&gt;
end&lt;br /&gt;
&lt;br /&gt;
end&lt;br /&gt;
&lt;br /&gt;
(v) app/views/assignments/edit.html.erb&lt;br /&gt;
&lt;br /&gt;
&amp;lt;% if @assignment_form.assignment.staggered_deadline == true %&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;%= render partial: '/sign_up_sheet/add_signup_topics_staggered', locals: {review_rounds: @review_rounds, assignment_submission_due_dates: @assignment_submission_due_dates, assignment_review_due_dates: @assignment_review_due_dates, assignment_drop_topic_due_dates: @assignment_drop_topic_due_dates} %&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;% else %&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;%= render '/sign_up_sheet/add_signup_topics' %&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;% end %&amp;gt;&lt;br /&gt;
&lt;br /&gt;
(vi) app/views/sign_up_sheet/_add_signup_topics_staggered.html.erb&lt;br /&gt;
&lt;br /&gt;
&amp;lt;%= form_tag :controller =&amp;gt; 'sign_up_sheet', :action =&amp;gt; 'save_topic_deadlines', :assignment_id =&amp;gt; @assignment.id do %&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;br/&amp;gt;&amp;lt;%= render :partial =&amp;gt; '/sign_up_sheet/due_dates', :locals =&amp;gt; {review_rounds: review_rounds, assignment_submission_due_dates: assignment_submission_due_dates, assignment_review_due_dates: assignment_review_due_dates, assignment_drop_topic_due_dates: assignment_drop_topic_due_dates} %&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;% end %&amp;gt;&lt;br /&gt;
&lt;br /&gt;
(vii) app/views/sign_up_sheet/_due_dates.html.erb&lt;br /&gt;
&lt;br /&gt;
&amp;lt;tr&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;th&amp;gt;Drop deadline&amp;lt;/th&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;%for i in 2..review_rounds%&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;td&amp;gt;&amp;lt;%= @assignment.sign_up_topics[i].topic_name %&amp;gt;&amp;lt;/td&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;% for review_round in 1..review_rounds %&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;% topic_id = @assignment.sign_up_topics[i].id %&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;%if review_round == 1 %&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;td&amp;gt;&amp;lt;%= text_field :due_date, (topic_id.to_s + '_drop_topic_' + review_round.to_s + '_due_date').to_s, size: 20, value: check_topic_due_date_value(assignment_drop_topic_due_dates, topic_id, 6, review_round) %&amp;gt;&amp;lt;/td&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;td&amp;gt;&amp;lt;%= 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) %&amp;gt;&amp;lt;/td&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;td&amp;gt;&amp;lt;%= 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) %&amp;gt;&amp;lt;/td&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;%else%&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;td&amp;gt;&amp;lt;%= 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) %&amp;gt;&amp;lt;/td&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;td&amp;gt;&amp;lt;%= 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) %&amp;gt;&amp;lt;/td&amp;gt; &amp;lt;%end%&amp;gt; &amp;lt;%end%&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;/tr&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;%end%&amp;gt;&lt;br /&gt;
&lt;br /&gt;
'''References'''&lt;br /&gt;
&lt;br /&gt;
[[1. Expertiza on GitHub&lt;br /&gt;
2. GitHub Project Repository Fork&lt;br /&gt;
3. The live Expertiza website&lt;br /&gt;
4. Demo link&lt;br /&gt;
5. Expertiza project documentation wiki]]&lt;/div&gt;</summary>
		<author><name>Jhmadhwa</name></author>
	</entry>
	<entry>
		<id>https://wiki.expertiza.ncsu.edu/index.php?title=E1843_Issues_Related_To_Deadlines&amp;diff=118689</id>
		<title>E1843 Issues Related To Deadlines</title>
		<link rel="alternate" type="text/html" href="https://wiki.expertiza.ncsu.edu/index.php?title=E1843_Issues_Related_To_Deadlines&amp;diff=118689"/>
		<updated>2018-11-05T22:22:52Z</updated>

		<summary type="html">&lt;p&gt;Jhmadhwa: &lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;This wiki page is for the description of changes made under E1843 OSS assignment for Fall 2018, CSC/ECE 517.&lt;br /&gt;
&lt;br /&gt;
'''About Expertiza'''&lt;br /&gt;
&lt;br /&gt;
Expertiza is an open source project based on Ruby on Rails framework and the code is available on Github. Expertiza allows the instructor to create new assignments as well as edit new or existing assignments. Instructors can also create a list of topics the students can sign up for and specify deadlines for completion of various tasks. Students can form teams in Expertiza to work on various projects and assignments as well as peer review other students' submissions. Expertiza supports submission across various document types, including the URLs Wiki pages.&lt;br /&gt;
&lt;br /&gt;
'''Issues in the Current Project'''&lt;br /&gt;
&lt;br /&gt;
1.There is no deadline that specifies when a team can drop their topics. Due to this, few problems occur: The team might drop a topic later on which is close to the submission date and this results in topic not being assigned to any other team on time such that they can submit their assignment. Also, if one team was wait listed for the same topic which the other team dropped closer to the submission deadline, then the first team will be assigned to the dropped topic which is not desirable as they might be working on their assigned topic for long time.&lt;br /&gt;
&lt;br /&gt;
2.There are different topics on which students can work during different times. This type of assignment is known as Staggered- deadline assignment in which different topics have different submission and review deadlines. For these assignments too, there is a need for &amp;quot;Drop Topics Deadline&amp;quot;. In the current implementation, the drop topic deadline is same for all the topics in a Staggered Deadline assignment which is not desirable.&lt;br /&gt;
&lt;br /&gt;
'''Corrections made in the New Project'''&lt;br /&gt;
&lt;br /&gt;
1. The instructor can specify a Drop Topic deadline date now. After a drop topic deadline passes, the &amp;quot;X&amp;quot; in the Sign-Up sheet disables so that the student cannot drop the topic and the waitlist gets cleared.&lt;br /&gt;
2. Staggered deadline assignments now have different drop deadlines for different topics in that assignment.&lt;br /&gt;
&lt;br /&gt;
'''Files modified in Current Project'''&lt;br /&gt;
&lt;br /&gt;
1. app/controllers/assignments_controller.rb&lt;br /&gt;
2. app/controllers/sign_up_sheet_controller.rb&lt;br /&gt;
3. app/models/student_task.rb&lt;br /&gt;
4. app/views/assignments/edit.html.erb&lt;br /&gt;
5. app/views/sign_up_sheet/_add_signup_topics_staggered.html.erb&lt;br /&gt;
6. app/views/sign_up_sheet/_due_dates.html.erb&lt;br /&gt;
&lt;br /&gt;
'''Current Implementation'''&lt;br /&gt;
&lt;br /&gt;
1. Clearing the waitlist after Drop Deadline passes is implemented in sign_up_sheet_controller.rb where it is checked if the current time is greater than the time mentioned in Drop deadline. If the deadline has been passed, the 'update_is_waitlisted' method of SignedUpTeam model is called to delete all the waitlisted teams. The code snippets for the changes made are attached below:&lt;br /&gt;
&lt;br /&gt;
(i) app/controllers/sign_up_sheet_controller.rb&lt;br /&gt;
&lt;br /&gt;
if !topic_id1.nil? and !@drop_topic_deadline1.nil? and Time.now &amp;gt; @drop_topic_deadline1.due_at&lt;br /&gt;
&lt;br /&gt;
SignedUpTeam.update_is_waitlisted(topic_id1.topic_id,team_id) end&lt;br /&gt;
&lt;br /&gt;
(ii) The 'update_is_waitlisted' method is implemented in app/models/signed_up_team.rb as follows:&lt;br /&gt;
&lt;br /&gt;
def self.update_is_waitlisted(topic_id, team_id)&lt;br /&gt;
&lt;br /&gt;
waitlisted_teams = SignedUpTeam.where(topic_id: topic_id, team_id: team_id)&lt;br /&gt;
&lt;br /&gt;
waitlisted_teams.each do |team|&lt;br /&gt;
&lt;br /&gt;
if(team.is_waitlisted == true)&lt;br /&gt;
&lt;br /&gt;
SignedUpTeam.delete(team.id)&lt;br /&gt;
&lt;br /&gt;
team.save&lt;br /&gt;
&lt;br /&gt;
end&lt;br /&gt;
&lt;br /&gt;
end&lt;br /&gt;
&lt;br /&gt;
end&lt;br /&gt;
&lt;br /&gt;
2. For a Staggered - deadline assignment, each topic will have a different Drop deadline which has been implemented in app/controllers/assignments_controller.rb and app/controllers/sign_up_sheet_controller.rb by first checking if the assignment type is staggered and then retrieving the Drop Deadlines corresponding to each topic from 'TopicDueDate' table. The 'assignments' and 'due_date' views are also updated to include 'Drop topic deadline' column and Drop deadline date in the timeline present in the student view. Following files have been changed to implement this functionality:&lt;br /&gt;
&lt;br /&gt;
(i) app/controllers/assignments_controller.rb&lt;br /&gt;
&lt;br /&gt;
@assignment_submission_due_dates = @due_date_all.select {|due_date| due_date.deadline_type_id == DeadlineHelper::DEALINE_TYPE_SUBMISSION }&lt;br /&gt;
&lt;br /&gt;
@assignment_review_due_dates = @due_date_all.select {|due_date| due_date.deadline_type_id == DeadlineHelper::DEALINE_TYPE_REVIEW} @assignment_drop_topic_due_dates = @due_date_all.select {|due_date| due_date.deadline_type_id == DeadlineHelper::DEADLINE_TYPE_DROP_TOPIC }&lt;br /&gt;
&lt;br /&gt;
(ii) app/controllers/sign_up_sheet_controller.rb&lt;br /&gt;
&lt;br /&gt;
@drop_topic_deadline1 = @assignment.due_dates.find_by(deadline_type_id: 6)&lt;br /&gt;
&lt;br /&gt;
topic_id1 = SignedUpTeam.where(team_id: team_id).first&lt;br /&gt;
&lt;br /&gt;
if @assignment.staggered_deadline?&lt;br /&gt;
&lt;br /&gt;
@drop_topic_deadline1 = TopicDueDate.where(parent_id: topic_id1.topic_id, deadline_type_id: 6).first rescue nil end&lt;br /&gt;
&lt;br /&gt;
due_dates = params[:due_date]&lt;br /&gt;
&lt;br /&gt;
topics = SignUpTopic.where(assignment_id: params[:assignment_id])&lt;br /&gt;
&lt;br /&gt;
review_rounds = assignment.num_review_rounds&lt;br /&gt;
&lt;br /&gt;
topics.each_with_index do |topic, index|&lt;br /&gt;
&lt;br /&gt;
for i in 1..review_rounds&lt;br /&gt;
&lt;br /&gt;
@topic_drop_topic_due_date = due_dates[topics[index].id.to_s + '_drop_topic_' + i.to_s + '_due_date']&lt;br /&gt;
&lt;br /&gt;
if assignment.due_dates.select {|due_date| due_date.deadline_type_id == 6 }.nil?&lt;br /&gt;
&lt;br /&gt;
@assignment_drop_topic_due_date = DateTime.parse(@assignment_drop_topic_due_dates[i - 1].due_at.to_s).strftime(&amp;quot;%Y-%m-%d %H:%M&amp;quot;)&lt;br /&gt;
&lt;br /&gt;
end&lt;br /&gt;
&lt;br /&gt;
end&lt;br /&gt;
&lt;br /&gt;
(iii) app/helpers/sign_up_sheet_helper.rb&lt;br /&gt;
&lt;br /&gt;
if assignment_due_dates.length == 0&lt;br /&gt;
&lt;br /&gt;
assignment_due_dates = @assignment_submission_due_dates&lt;br /&gt;
&lt;br /&gt;
end&lt;br /&gt;
&lt;br /&gt;
(iv) app/models/student_task.rb&lt;br /&gt;
&lt;br /&gt;
def self.get_due_date_data(assignment, timeline_list, participant)&lt;br /&gt;
&lt;br /&gt;
if assignment.staggered_deadline?&lt;br /&gt;
&lt;br /&gt;
team_id = participant.team.try(:id)&lt;br /&gt;
&lt;br /&gt;
topic_id1 = SignedUpTeam.where(team_id: team_id).first&lt;br /&gt;
&lt;br /&gt;
if !topic_id1.nil?&lt;br /&gt;
&lt;br /&gt;
topic_due_date = TopicDueDate.where(parent_id: topic_id1.topic_id, deadline_type_id: 6).first rescue nil&lt;br /&gt;
&lt;br /&gt;
timeline = {label: ('Drop Topic Deadline').humanize}&lt;br /&gt;
&lt;br /&gt;
timeline[:updated_at] = topic_due_date.due_at.strftime('%a, %d %b %Y %H:%M')&lt;br /&gt;
&lt;br /&gt;
timeline_list &amp;lt;&amp;lt; timeline&lt;br /&gt;
&lt;br /&gt;
end&lt;br /&gt;
&lt;br /&gt;
end&lt;br /&gt;
&lt;br /&gt;
assignment.due_dates.each do |dd|&lt;br /&gt;
&lt;br /&gt;
timeline = {label: (dd.deadline_type.name + ' Deadline').humanize}&lt;br /&gt;
&lt;br /&gt;
unless dd.due_at.nil?&lt;br /&gt;
&lt;br /&gt;
timeline[:updated_at] = dd.due_at.strftime('%a, %d %b %Y %H:%M')&lt;br /&gt;
&lt;br /&gt;
timeline_list &amp;lt;&amp;lt; timeline&lt;br /&gt;
&lt;br /&gt;
end&lt;br /&gt;
&lt;br /&gt;
end&lt;br /&gt;
&lt;br /&gt;
end&lt;br /&gt;
&lt;br /&gt;
(v) app/views/assignments/edit.html.erb&lt;br /&gt;
&lt;br /&gt;
&amp;lt;% if @assignment_form.assignment.staggered_deadline == true %&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;%= render partial: '/sign_up_sheet/add_signup_topics_staggered', locals: {review_rounds: @review_rounds, assignment_submission_due_dates: @assignment_submission_due_dates, assignment_review_due_dates: @assignment_review_due_dates, assignment_drop_topic_due_dates: @assignment_drop_topic_due_dates} %&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;% else %&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;%= render '/sign_up_sheet/add_signup_topics' %&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;% end %&amp;gt;&lt;br /&gt;
&lt;br /&gt;
(vi) app/views/sign_up_sheet/_add_signup_topics_staggered.html.erb&lt;br /&gt;
&lt;br /&gt;
&amp;lt;%= form_tag :controller =&amp;gt; 'sign_up_sheet', :action =&amp;gt; 'save_topic_deadlines', :assignment_id =&amp;gt; @assignment.id do %&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;br/&amp;gt;&amp;lt;%= render :partial =&amp;gt; '/sign_up_sheet/due_dates', :locals =&amp;gt; {review_rounds: review_rounds, assignment_submission_due_dates: assignment_submission_due_dates, assignment_review_due_dates: assignment_review_due_dates, assignment_drop_topic_due_dates: assignment_drop_topic_due_dates} %&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;% end %&amp;gt;&lt;br /&gt;
&lt;br /&gt;
(vii) app/views/sign_up_sheet/_due_dates.html.erb&lt;br /&gt;
&lt;br /&gt;
&amp;lt;tr&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;th&amp;gt;Drop deadline&amp;lt;/th&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;%for i in 2..review_rounds%&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;td&amp;gt;&amp;lt;%= @assignment.sign_up_topics[i].topic_name %&amp;gt;&amp;lt;/td&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;% for review_round in 1..review_rounds %&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;% topic_id = @assignment.sign_up_topics[i].id %&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;%if review_round == 1 %&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;td&amp;gt;&amp;lt;%= text_field :due_date, (topic_id.to_s + '_drop_topic_' + review_round.to_s + '_due_date').to_s, size: 20, value: check_topic_due_date_value(assignment_drop_topic_due_dates, topic_id, 6, review_round) %&amp;gt;&amp;lt;/td&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;td&amp;gt;&amp;lt;%= 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) %&amp;gt;&amp;lt;/td&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;td&amp;gt;&amp;lt;%= 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) %&amp;gt;&amp;lt;/td&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;%else%&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;td&amp;gt;&amp;lt;%= 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) %&amp;gt;&amp;lt;/td&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;td&amp;gt;&amp;lt;%= 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) %&amp;gt;&amp;lt;/td&amp;gt; &amp;lt;%end%&amp;gt; &amp;lt;%end%&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;/tr&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;%end%&amp;gt;&lt;br /&gt;
&lt;br /&gt;
'''References'''&lt;br /&gt;
&lt;br /&gt;
1. Expertiza on GitHub&lt;br /&gt;
2. GitHub Project Repository Fork&lt;br /&gt;
3. The live Expertiza website&lt;br /&gt;
4. Demo link&lt;br /&gt;
5. Expertiza project documentation wiki&lt;/div&gt;</summary>
		<author><name>Jhmadhwa</name></author>
	</entry>
	<entry>
		<id>https://wiki.expertiza.ncsu.edu/index.php?title=E1843_Issues_Related_To_Deadlines&amp;diff=118687</id>
		<title>E1843 Issues Related To Deadlines</title>
		<link rel="alternate" type="text/html" href="https://wiki.expertiza.ncsu.edu/index.php?title=E1843_Issues_Related_To_Deadlines&amp;diff=118687"/>
		<updated>2018-11-05T22:18:36Z</updated>

		<summary type="html">&lt;p&gt;Jhmadhwa: Created page with &amp;quot;This wiki page is for the description of changes made under E1843 OSS assignment for Fall 2018, CSC/ECE 517.  About Expertiza  Expertiza is an open source project based on Ruby o...&amp;quot;&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;This wiki page is for the description of changes made under E1843 OSS assignment for Fall 2018, CSC/ECE 517.&lt;br /&gt;
&lt;br /&gt;
About Expertiza&lt;br /&gt;
&lt;br /&gt;
Expertiza is an open source project based on Ruby on Rails framework and the code is available on Github. Expertiza allows the instructor to create new assignments as well as edit new or existing assignments. Instructors can also create a list of topics the students can sign up for and specify deadlines for completion of various tasks. Students can form teams in Expertiza to work on various projects and assignments as well as peer review other students' submissions. Expertiza supports submission across various document types, including the URLs Wiki pages.&lt;br /&gt;
&lt;br /&gt;
Issues in the Current Project&lt;br /&gt;
There is no deadline that specifies when a team can drop their topics. Due to this, few problems occur: The team might drop a topic later on which is close to the submission date and this results in topic not being assigned to any other team on time such that they can submit their assignment. Also, if one team was wait listed for the same topic which the other team dropped closer to the submission deadline, then the first team will be assigned to the dropped topic which is not desirable as they might be working on their assigned topic for long time.&lt;br /&gt;
There are different topics on which students can work during different times. This type of assignment is known as Staggered- deadline assignment in which different topics have different submission and review deadlines. For these assignments too, there is a need for &amp;quot;Drop Topics Deadline&amp;quot;. In the current implementation, the drop topic deadline is same for all the topics in a Staggered Deadline assignment which is not desirable.&lt;br /&gt;
Corrections made in the New Project&lt;br /&gt;
The instructor can specify a Drop Topic deadline date now. After a drop topic deadline passes, the &amp;quot;X&amp;quot; in the Sign-Up sheet disables so that the student cannot drop the topic and the waitlist gets cleared.&lt;br /&gt;
Staggered deadline assignments now have different drop deadlines for different topics in that assignment.&lt;br /&gt;
Files modified in Current Project&lt;br /&gt;
app/controllers/assignments_controller.rb&lt;br /&gt;
app/controllers/sign_up_sheet_controller.rb&lt;br /&gt;
app/models/student_task.rb&lt;br /&gt;
app/views/assignments/edit.html.erb&lt;br /&gt;
app/views/sign_up_sheet/_add_signup_topics_staggered.html.erb&lt;br /&gt;
app/views/sign_up_sheet/_due_dates.html.erb&lt;br /&gt;
Current Implementation&lt;br /&gt;
Clearing the waitlist after Drop Deadline passes is implemented in sign_up_sheet_controller.rb where it is checked if the current time is greater than the time mentioned in Drop deadline. If the deadline has been passed, the 'update_is_waitlisted' method of SignedUpTeam model is called to delete all the waitlisted teams. The code snippets for the changes made are attached below:&lt;br /&gt;
&lt;br /&gt;
(i) app/controllers/sign_up_sheet_controller.rb&lt;br /&gt;
&lt;br /&gt;
if !topic_id1.nil? and !@drop_topic_deadline1.nil? and Time.now &amp;gt; @drop_topic_deadline1.due_at&lt;br /&gt;
&lt;br /&gt;
SignedUpTeam.update_is_waitlisted(topic_id1.topic_id,team_id) end&lt;br /&gt;
&lt;br /&gt;
(ii) The 'update_is_waitlisted' method is implemented in app/models/signed_up_team.rb as follows:&lt;br /&gt;
&lt;br /&gt;
def self.update_is_waitlisted(topic_id, team_id)&lt;br /&gt;
&lt;br /&gt;
waitlisted_teams = SignedUpTeam.where(topic_id: topic_id, team_id: team_id)&lt;br /&gt;
&lt;br /&gt;
waitlisted_teams.each do |team|&lt;br /&gt;
&lt;br /&gt;
if(team.is_waitlisted == true)&lt;br /&gt;
&lt;br /&gt;
SignedUpTeam.delete(team.id)&lt;br /&gt;
&lt;br /&gt;
team.save&lt;br /&gt;
&lt;br /&gt;
end&lt;br /&gt;
&lt;br /&gt;
end&lt;br /&gt;
&lt;br /&gt;
end&lt;br /&gt;
&lt;br /&gt;
For a Staggered - deadline assignment, each topic will have a different Drop deadline which has been implemented in app/controllers/assignments_controller.rb and app/controllers/sign_up_sheet_controller.rb by first checking if the assignment type is staggered and then retrieving the Drop Deadlines corresponding to each topic from 'TopicDueDate' table. The 'assignments' and 'due_date' views are also updated to include 'Drop topic deadline' column and Drop deadline date in the timeline present in the student view. Following files have been changed to implement this functionality:&lt;br /&gt;
&lt;br /&gt;
(i) app/controllers/assignments_controller.rb&lt;br /&gt;
&lt;br /&gt;
@assignment_submission_due_dates = @due_date_all.select {|due_date| due_date.deadline_type_id == DeadlineHelper::DEALINE_TYPE_SUBMISSION }&lt;br /&gt;
&lt;br /&gt;
@assignment_review_due_dates = @due_date_all.select {|due_date| due_date.deadline_type_id == DeadlineHelper::DEALINE_TYPE_REVIEW} @assignment_drop_topic_due_dates = @due_date_all.select {|due_date| due_date.deadline_type_id == DeadlineHelper::DEADLINE_TYPE_DROP_TOPIC }&lt;br /&gt;
&lt;br /&gt;
(ii) app/controllers/sign_up_sheet_controller.rb&lt;br /&gt;
&lt;br /&gt;
@drop_topic_deadline1 = @assignment.due_dates.find_by(deadline_type_id: 6)&lt;br /&gt;
&lt;br /&gt;
topic_id1 = SignedUpTeam.where(team_id: team_id).first&lt;br /&gt;
&lt;br /&gt;
if @assignment.staggered_deadline?&lt;br /&gt;
&lt;br /&gt;
@drop_topic_deadline1 = TopicDueDate.where(parent_id: topic_id1.topic_id, deadline_type_id: 6).first rescue nil end&lt;br /&gt;
&lt;br /&gt;
due_dates = params[:due_date]&lt;br /&gt;
&lt;br /&gt;
topics = SignUpTopic.where(assignment_id: params[:assignment_id])&lt;br /&gt;
&lt;br /&gt;
review_rounds = assignment.num_review_rounds&lt;br /&gt;
&lt;br /&gt;
topics.each_with_index do |topic, index|&lt;br /&gt;
&lt;br /&gt;
for i in 1..review_rounds&lt;br /&gt;
&lt;br /&gt;
@topic_drop_topic_due_date = due_dates[topics[index].id.to_s + '_drop_topic_' + i.to_s + '_due_date']&lt;br /&gt;
&lt;br /&gt;
if assignment.due_dates.select {|due_date| due_date.deadline_type_id == 6 }.nil?&lt;br /&gt;
&lt;br /&gt;
@assignment_drop_topic_due_date = DateTime.parse(@assignment_drop_topic_due_dates[i - 1].due_at.to_s).strftime(&amp;quot;%Y-%m-%d %H:%M&amp;quot;)&lt;br /&gt;
&lt;br /&gt;
end&lt;br /&gt;
&lt;br /&gt;
end&lt;br /&gt;
&lt;br /&gt;
(iii) app/helpers/sign_up_sheet_helper.rb&lt;br /&gt;
&lt;br /&gt;
if assignment_due_dates.length == 0&lt;br /&gt;
&lt;br /&gt;
assignment_due_dates = @assignment_submission_due_dates&lt;br /&gt;
&lt;br /&gt;
end&lt;br /&gt;
&lt;br /&gt;
(iv) app/models/student_task.rb&lt;br /&gt;
&lt;br /&gt;
def self.get_due_date_data(assignment, timeline_list, participant)&lt;br /&gt;
&lt;br /&gt;
if assignment.staggered_deadline?&lt;br /&gt;
&lt;br /&gt;
team_id = participant.team.try(:id)&lt;br /&gt;
&lt;br /&gt;
topic_id1 = SignedUpTeam.where(team_id: team_id).first&lt;br /&gt;
&lt;br /&gt;
if !topic_id1.nil?&lt;br /&gt;
&lt;br /&gt;
topic_due_date = TopicDueDate.where(parent_id: topic_id1.topic_id, deadline_type_id: 6).first rescue nil&lt;br /&gt;
&lt;br /&gt;
timeline = {label: ('Drop Topic Deadline').humanize}&lt;br /&gt;
&lt;br /&gt;
timeline[:updated_at] = topic_due_date.due_at.strftime('%a, %d %b %Y %H:%M')&lt;br /&gt;
&lt;br /&gt;
timeline_list &amp;lt;&amp;lt; timeline&lt;br /&gt;
&lt;br /&gt;
end&lt;br /&gt;
&lt;br /&gt;
end&lt;br /&gt;
&lt;br /&gt;
assignment.due_dates.each do |dd|&lt;br /&gt;
&lt;br /&gt;
timeline = {label: (dd.deadline_type.name + ' Deadline').humanize}&lt;br /&gt;
&lt;br /&gt;
unless dd.due_at.nil?&lt;br /&gt;
&lt;br /&gt;
timeline[:updated_at] = dd.due_at.strftime('%a, %d %b %Y %H:%M')&lt;br /&gt;
&lt;br /&gt;
timeline_list &amp;lt;&amp;lt; timeline&lt;br /&gt;
&lt;br /&gt;
end&lt;br /&gt;
&lt;br /&gt;
end&lt;br /&gt;
&lt;br /&gt;
end&lt;br /&gt;
&lt;br /&gt;
(v) app/views/assignments/edit.html.erb&lt;br /&gt;
&lt;br /&gt;
&amp;lt;% if @assignment_form.assignment.staggered_deadline == true %&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;%= render partial: '/sign_up_sheet/add_signup_topics_staggered', locals: {review_rounds: @review_rounds, assignment_submission_due_dates: @assignment_submission_due_dates, assignment_review_due_dates: @assignment_review_due_dates, assignment_drop_topic_due_dates: @assignment_drop_topic_due_dates} %&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;% else %&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;%= render '/sign_up_sheet/add_signup_topics' %&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;% end %&amp;gt;&lt;br /&gt;
&lt;br /&gt;
(vi) app/views/sign_up_sheet/_add_signup_topics_staggered.html.erb&lt;br /&gt;
&lt;br /&gt;
&amp;lt;%= form_tag :controller =&amp;gt; 'sign_up_sheet', :action =&amp;gt; 'save_topic_deadlines', :assignment_id =&amp;gt; @assignment.id do %&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;br/&amp;gt;&amp;lt;%= render :partial =&amp;gt; '/sign_up_sheet/due_dates', :locals =&amp;gt; {review_rounds: review_rounds, assignment_submission_due_dates: assignment_submission_due_dates, assignment_review_due_dates: assignment_review_due_dates, assignment_drop_topic_due_dates: assignment_drop_topic_due_dates} %&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;% end %&amp;gt;&lt;br /&gt;
&lt;br /&gt;
(vii) app/views/sign_up_sheet/_due_dates.html.erb&lt;br /&gt;
&lt;br /&gt;
&amp;lt;tr&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;th&amp;gt;Drop deadline&amp;lt;/th&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;%for i in 2..review_rounds%&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;td&amp;gt;&amp;lt;%= @assignment.sign_up_topics[i].topic_name %&amp;gt;&amp;lt;/td&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;% for review_round in 1..review_rounds %&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;% topic_id = @assignment.sign_up_topics[i].id %&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;%if review_round == 1 %&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;td&amp;gt;&amp;lt;%= text_field :due_date, (topic_id.to_s + '_drop_topic_' + review_round.to_s + '_due_date').to_s, size: 20, value: check_topic_due_date_value(assignment_drop_topic_due_dates, topic_id, 6, review_round) %&amp;gt;&amp;lt;/td&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;td&amp;gt;&amp;lt;%= 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) %&amp;gt;&amp;lt;/td&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;td&amp;gt;&amp;lt;%= 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) %&amp;gt;&amp;lt;/td&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;%else%&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;td&amp;gt;&amp;lt;%= 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) %&amp;gt;&amp;lt;/td&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;td&amp;gt;&amp;lt;%= 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) %&amp;gt;&amp;lt;/td&amp;gt; &amp;lt;%end%&amp;gt; &amp;lt;%end%&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;/tr&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;%end%&amp;gt;&lt;br /&gt;
&lt;br /&gt;
References&lt;br /&gt;
Expertiza on GitHub&lt;br /&gt;
GitHub Project Repository Fork&lt;br /&gt;
The live Expertiza website&lt;br /&gt;
Demo link&lt;br /&gt;
Expertiza project documentation wiki&lt;/div&gt;</summary>
		<author><name>Jhmadhwa</name></author>
	</entry>
</feed>