diff --git a/app/views/groups/_form.html.erb b/app/views/groups/_form.html.erb index de9de4966..57e4c8bc5 100644 --- a/app/views/groups/_form.html.erb +++ b/app/views/groups/_form.html.erb @@ -1,4 +1,4 @@ -<%= form_for @group, url: [@course, @assessment, @group], builder: FormBuilderWithDateTimeInput do |f| %> +<%= form_for @group, url: course_assessment_group_url(@course, @assessment, @group), builder: FormBuilderWithDateTimeInput do |f| %> <%= f.text_field :name, help_text: "Change the name of this group." %> <%= f.submit "Change Name" %> diff --git a/app/views/groups/_list_item.html.erb b/app/views/groups/_list_item.html.erb index 7f66bb261..d3ac22ec9 100644 --- a/app/views/groups/_list_item.html.erb +++ b/app/views/groups/_list_item.html.erb @@ -1,11 +1,12 @@
<%= group.assessment_user_data.all.map{|aud| aud.course_user_datum.full_name }.join(", ") %>
+<%= group.assessment_user_data.all.map{ |aud| aud.course_user_datum.full_name }.join(", ") %>
- <%= link_to "Ask to Join Group", [:join, @course, @assessment, group], method: :post %> + <%= link_to "Ask to Join Group", join_course_assessment_group_path(@course, @assessment, group), method: :post %> <% if @cud.instructor then %> - | <%= link_to "View", [@course, @assessment, group] %> - | <%= link_to "Destroy", [@course, @assessment, group], method: :delete, data: { confirm: "Are you sure you want to disband this group?" } %> + | <%= link_to "View", course_assessment_group_path(@course, @assessment, group) %> + | <%= link_to "Destroy", course_assessment_group_path(@course, @assessment, group), + method: :delete, data: { confirm: "Are you sure you want to disband this group?" } %> <% end %>
-Set the name of this group.
The email of your desired partner. They will need to confirm their membership.
Group Name | @@ -14,7 +16,7 @@ <% @groups.each do |group| %>||
---|---|---|
<%= link_to group.name, [@course, @assessment, group] %> | +<%= link_to group.name, course_assessment_group_path(@course, @assessment, group) %> | <% group.assessment_user_data.each do |aud| %> <% cud = aud.course_user_datum %> @@ -31,17 +33,25 @@ <% end %>- <%= link_to "Edit", [@course, @assessment, group] %> | - <%= link_to "Destroy", [@course, @assessment, group], method: :delete, data: { confirm: "Are you sure you want to disband this group?" } %> + <%= link_to "Edit", course_assessment_group_path(@course, @assessment, group) %> | + <%= link_to "Destroy", course_assessment_group_path(@course, @assessment, group), + method: :delete, data: { confirm: "Are you sure you want to disband this group?" } %> |
+ No Groups have been set yet. +
<% end %> -You have not confirmed your group membership yet.
- <%= link_to "Confirm Membership", [:join, @course, @assessment, @group], method: :post %> | - <%= link_to "Deny Membership", [:leave, @course, @assessment, @group], method: :post %> + <%= link_to "Confirm Membership", join_course_assessment_group_path(@course, @assessment, @group), method: :post %> | + <%= link_to "Deny Membership", leave_course_assessment_group_path(@course, @assessment, @group), method: :post %> <% elsif (@aud.membership_status & AssessmentUserDatum::GROUP_CONFIRMED) == 0 then %>Your group has not confirmed your membership yet.
<% end %> @@ -22,14 +23,22 @@ <% if !aud.group_confirmed(AssessmentUserDatum::MEMBER_CONFIRMED) then %>This Member has not Confirmed their Membership yet.
<% if @group.is_member(@aud) or @cud.instructor then %> -<%= link_to "Cancel Request", [:leave, @course, @assessment, @group, member_id: cud.id], method: :post %>
++ <%= link_to "Cancel Request", + leave_course_assessment_group_path(@course, @assessment, @group, member_id: cud.id), + method: :post %> +
<% end %> <% elsif !aud.group_confirmed(AssessmentUserDatum::GROUP_CONFIRMED) then %>This Member has not been Confirmed by the Group yet.
<% if @group.is_member(@aud) or @cud.instructor then %>- <%= link_to "Confirm Membership", [:add, @course, @assessment, @group, member_id: cud.id], method: :post %> | - <%= link_to "Deny Membership", [:leave, @course, @assessment, @group, member_id: cud.id], method: :post %> + <%= link_to "Confirm Membership", + add_course_assessment_group_path(@course, @assessment, @group, member_id: cud.id), + method: :post %> | + <%= link_to "Deny Membership", + leave_course_assessment_group_path(@course, @assessment, @group, member_id: cud.id), + method: :post %>
<% end %> <% end %> @@ -40,14 +49,14 @@ <% if @group.is_member(@aud) or @cud.instructor then %> <% if @group.assessment_user_data.size < @assessment.group_size then %>The email of your desired partner. They will need to confirm their membership.