|
|
@ -213,9 +213,9 @@ class AttachmentsController < ApplicationController
|
|
|
|
|
|
|
|
|
|
|
|
def tip_attachment_update
|
|
|
|
def tip_attachment_update
|
|
|
|
if params[:course_id]
|
|
|
|
if params[:course_id]
|
|
|
|
@tip_all_attachments = Attachment.where(:container_type => "Course", :container_id => params[:project_id])
|
|
|
|
@tip_all_attachments = Attachment.where(:container_type => "Course", :container_id => params[:course_id])
|
|
|
|
@tip_all_public_attachments = Attachment.where(:container_type => "Course", :container_id => params[:project_id], :is_public => 1)
|
|
|
|
@tip_all_public_attachments = Attachment.where(:container_type => "Course", :container_id => params[:course_id], :is_public => 1)
|
|
|
|
@tip_all_private_attachments = Attachment.where(:container_type => "Course", :container_id => params[:project_id], :is_public => 0)
|
|
|
|
@tip_all_private_attachments = Attachment.where(:container_type => "Course", :container_id => params[:course_id], :is_public => 0)
|
|
|
|
@course = Course.find(params[:course_id])
|
|
|
|
@course = Course.find(params[:course_id])
|
|
|
|
elsif params[:project_id]
|
|
|
|
elsif params[:project_id]
|
|
|
|
@tip_all_attachments = Attachment.where(:container_type => "Project", :container_id => params[:project_id])
|
|
|
|
@tip_all_attachments = Attachment.where(:container_type => "Project", :container_id => params[:project_id])
|
|
|
|