CSC/ECE 517 Fall 2016/oss E1649 KPS: Difference between revisions

From Expertiza_Wiki
Jump to navigation Jump to search
m (Created page with " Implementation Changes were made in the following files- * controllers/sign_up_sheet_controller.rb * views/sign_up_sheet/_all_actions.html.erb * views/sign_up_sheet/assign_topi...")
 
(First draft of 'new implementation')
Line 1: Line 1:
==New Implementation==
The new implementation allows an instructor to assign a particular topic to a team as well as remove a team from a topic. Some of the scenarios where the instructor might wish to add a team would be if the sign up deadline has passed, or if the instructor has decided to update the maximum number of teams allowed to choose a particular topic.\\
With the new implementation, Instructors/Teaching Assistants do not need to go through the trouble of impersonating a student in order to add or drop their team from topics.


Implementation
Changes were made in the following files -  
 
Changes were made in the following files-
* controllers/sign_up_sheet_controller.rb
* controllers/sign_up_sheet_controller.rb
* views/sign_up_sheet/_all_actions.html.erb
* views/sign_up_sheet/_all_actions.html.erb
* views/sign_up_sheet/assign_topic.html.erb
* views/sign_up_sheet/assign_topic.html.erb
* views/sign_up_sheet/remove_topic.html.erb
In the sign_up_sheet controller, two major methods were added:
====update_team====
This method allows an admin user to add a team to a particular topic, based on the username of any member of said team. If the number of teams already assigned to the topic is greater than or equal to the maximum number of teams allowed to pick the topic, the new team is added to the waitlist.
If a team was previously assigned a topic, and are then added by an admin to a new topic, their association with the old topic is deleted, and the required changes to the waitlists of topics are made as well.
====remove_team====
This method allows the admin to remove teams from a given topic, based on the username of a team member. First, a check is done to ensure that the team is indeed associated with the given topic. If this is the case, the entry is deleted from the table sign_up_teams, and the corresponding changes are made to the waitlist as well.

Revision as of 04:29, 28 October 2016

New Implementation

The new implementation allows an instructor to assign a particular topic to a team as well as remove a team from a topic. Some of the scenarios where the instructor might wish to add a team would be if the sign up deadline has passed, or if the instructor has decided to update the maximum number of teams allowed to choose a particular topic.\\ With the new implementation, Instructors/Teaching Assistants do not need to go through the trouble of impersonating a student in order to add or drop their team from topics.

Changes were made in the following files -

  • controllers/sign_up_sheet_controller.rb
  • views/sign_up_sheet/_all_actions.html.erb
  • views/sign_up_sheet/assign_topic.html.erb
  • views/sign_up_sheet/remove_topic.html.erb

In the sign_up_sheet controller, two major methods were added:

update_team

This method allows an admin user to add a team to a particular topic, based on the username of any member of said team. If the number of teams already assigned to the topic is greater than or equal to the maximum number of teams allowed to pick the topic, the new team is added to the waitlist. If a team was previously assigned a topic, and are then added by an admin to a new topic, their association with the old topic is deleted, and the required changes to the waitlists of topics are made as well.

remove_team

This method allows the admin to remove teams from a given topic, based on the username of a team member. First, a check is done to ensure that the team is indeed associated with the given topic. If this is the case, the entry is deleted from the table sign_up_teams, and the corresponding changes are made to the waitlist as well.